-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmConfig.frm
317 lines (303 loc) · 9.4 KB
/
frmConfig.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
VERSION 5.00
Begin VB.Form frmConfig
BackColor = &H00E0E0E0&
BorderStyle = 0 'None
Caption = "Configure CS Watch"
ClientHeight = 2760
ClientLeft = 0
ClientTop = 0
ClientWidth = 3255
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 2760
ScaleWidth = 3255
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.TextBox txtCSPath
Appearance = 0 'Flat
Height = 255
Left = 360
TabIndex = 8
Top = 2070
Width = 2655
End
Begin VB.TextBox txtRR
Alignment = 2 'Center
Appearance = 0 'Flat
Height = 255
Left = 840
TabIndex = 5
Top = 1380
Width = 585
End
Begin VB.CheckBox chkTransparency
BackColor = &H00E0E0E0&
Caption = "Enable Transparency"
Height = 225
Left = 360
TabIndex = 2
Top = 750
Width = 2145
End
Begin VB.Label lblCancel
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "cancel"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 195
Left = 2220
TabIndex = 10
Top = 2490
Width = 540
End
Begin VB.Line Line1
BorderColor = &H00FFFFFF&
X1 = 2850
X2 = 2850
Y1 = 2490
Y2 = 2700
End
Begin VB.Label lblOK
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "ok"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 195
Left = 2940
TabIndex = 9
Top = 2490
Width = 210
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "CounterStrike Path:"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 150
TabIndex = 7
Top = 1800
Width = 1665
End
Begin VB.Image imgImages
Height = 225
Index = 2
Left = 2940
Picture = "frmConfig.frx":0000
Top = 60
Width = 225
End
Begin VB.Image imgImages
Height = 225
Index = 0
Left = 2940
Picture = "frmConfig.frx":0430
Top = 60
Width = 240
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "seconds."
Height = 195
Left = 1500
TabIndex = 6
Top = 1410
Width = 645
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "every"
Height = 195
Left = 360
TabIndex = 4
Top = 1410
Width = 420
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Refresh Rate:"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 150
TabIndex = 3
Top = 1110
Width = 1155
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Transparency:"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 120
TabIndex = 1
Top = 450
Width = 1215
End
Begin VB.Label lblTitle
BackStyle = 0 'Transparent
Caption = "configure cswatch"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 225
Left = 810
TabIndex = 0
Top = 60
Width = 1665
End
Begin VB.Shape shpBack
Height = 525
Left = 0
Top = 0
Width = 195
End
Begin VB.Image imgTitle
Height = 330
Left = 0
Picture = "frmConfig.frx":0874
Top = 0
Width = 3255
End
Begin VB.Image imgImages
Height = 225
Index = 3
Left = 2940
Picture = "frmConfig.frx":5350
Top = 60
Width = 240
End
Begin VB.Image imgBottom
Height = 330
Left = 0
Picture = "frmConfig.frx":5794
Top = 2430
Width = 3255
End
End
Attribute VB_Name = "frmConfig"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim iniFile As String
Private Sub chkTransparency_Click()
If (chkTransparency) Then
changeAllTrans 230, 1
WriteINI "general", "transparency", "1", iniFile
Else
changeAllTrans 0, 0
WriteINI "general", "transparency", "0", iniFile
End If
End Sub
Private Sub Form_Load()
iniFile = GetShortFileName(App.Path) & "\" & INI_FILENAME
shpBack.Width = frmConfig.Width
shpBack.Height = frmConfig.Height
If (Exists(iniFile)) Then
chkTransparency = ReadINI("general", "transparency", iniFile)
txtRR.Text = ReadINI("general", "refreshrate", iniFile)
txtCSPath.Text = ReadINI("general", "cspath", iniFile)
Else
writeDefaultINI iniFile
End If
End Sub
Private Sub imgImages_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
imgImages(Index).Visible = False
End Sub
Private Sub imgImages_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
imgImages(Index).Visible = True
If (Index = 2) Then
Unload frmConfig
End If
End Sub
Private Sub imgTitle_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
FormDrag Me
End Sub
Private Sub lblCancel_Click()
Unload frmConfig
End Sub
Private Sub lblCancel_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblCancel.ForeColor = vbRed
End Sub
Private Sub lblCancel_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblCancel.ForeColor = vbWhite
End Sub
Private Sub lblOK_Click()
' write data to ini file
WriteINI "general", "transparency", chkTransparency, iniFile
WriteINI "general", "refreshrate", txtRR.Text, iniFile
WriteINI "general", "cspath", txtCSPath.Text, iniFile
frmMain.tmrRefresh.Interval = (Val(txtRR.Text) * 1000)
Unload frmConfig
End Sub
Private Sub lblOK_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblOK.ForeColor = vbRed
End Sub
Private Sub lblOK_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblOK.ForeColor = vbWhite
End Sub
Private Sub lblTitle_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
FormDrag Me
End Sub