-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathfrmLinter.frm
111 lines (105 loc) · 3.16 KB
/
frmLinter.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
VERSION 5.00
Begin VB.Form frmLinter
Caption = "Lint Project"
ClientHeight = 6375
ClientLeft = 120
ClientTop = 465
ClientWidth = 6855
LinkTopic = "Form1"
ScaleHeight = 6375
ScaleWidth = 6855
StartUpPosition = 3 'Windows Default
Begin VB.Frame fraConfig
Caption = "Configuration:"
Height = 6135
Left = 120
TabIndex = 0
Top = 120
Width = 6615
Begin VB.TextBox txtResults
Height = 4215
Left = 120
MultiLine = -1 'True
TabIndex = 7
Top = 1800
Width = 6375
End
Begin VB.TextBox txtVBPFile
Height = 285
Left = 1680
Locked = -1 'True
TabIndex = 4
Top = 480
Width = 4215
End
Begin VB.TextBox txtFile
Height = 285
Left = 1680
TabIndex = 3
Top = 840
Width = 4215
End
Begin VB.CommandButton cmdClose
Caption = "D&one"
Height = 495
Left = 3398
TabIndex = 2
Top = 1200
Width = 1335
End
Begin VB.CommandButton cmdLint
Caption = "L&int"
Default = -1 'True
Height = 495
Left = 1958
TabIndex = 1
Top = 1200
Width = 1335
End
Begin VB.Label lblSrc
Alignment = 1 'Right Justify
Caption = "Project File:"
Height = 255
Left = 240
TabIndex = 6
Top = 480
Width = 1335
End
Begin VB.Label lblFile
Alignment = 1 'Right Justify
Caption = "Single File:"
Height = 255
Left = 240
TabIndex = 5
Top = 840
Width = 1335
End
End
End
Attribute VB_Name = "frmLinter"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
' Linting Form
Private Sub Form_Load()
txtVBPFile = modConfig.vbpFile
txtFile = ""
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdLint_Click()
Dim File As String, Results As String
fraConfig.Enabled = False
If txtFile = "" Then
Results = modQuickLint.Lint
Else
File = txtFile.Text
If InStr(File, "\") = 0 Then File = Left(txtVBPFile, InStrRev(txtVBPFile, "\")) & File
Results = modQuickLint.Lint(File)
End If
fraConfig.Enabled = True
txtResults = IIf(Results = "", "Done.", Results)
End Sub