This repository has been archived by the owner on Mar 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
frmMain.frm
234 lines (221 loc) · 7.43 KB
/
frmMain.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
VERSION 5.00
Begin VB.Form frmMain
BorderStyle = 4 'Fixed ToolWindow
Caption = "WURESET Config"
ClientHeight = 4350
ClientLeft = 45
ClientTop = 360
ClientWidth = 3975
Icon = "frmMain.frx":0000
LinkTopic = "frmMain"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4350
ScaleWidth = 3975
StartUpPosition = 3 'Windows Default
Begin VB.Frame Frame2
Caption = "Program Settings"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1455
Left = 240
TabIndex = 1
Top = 1920
Width = 3495
Begin VB.CommandButton btnColor
Caption = "..."
Height = 375
Left = 2400
TabIndex = 10
Top = 840
Width = 375
End
Begin VB.ComboBox cmbLanguage
Height = 315
Left = 1200
TabIndex = 7
Top = 360
Width = 2055
End
Begin VB.TextBox txtFont
Enabled = 0 'False
Height = 285
Left = 1200
MaxLength = 2
TabIndex = 6
Top = 840
Width = 1095
End
Begin VB.Label lblLanguage
BackStyle = 0 'Transparent
Caption = "Language:"
Height = 255
Left = 120
TabIndex = 9
Top = 360
Width = 975
End
Begin VB.Label lblFont
BackStyle = 0 'Transparent
Caption = "Font Color:"
Height = 255
Left = 120
TabIndex = 8
Top = 840
Width = 975
End
End
Begin VB.Frame Frame1
Caption = "System Information"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1335
Left = 240
TabIndex = 0
Top = 240
Width = 3495
Begin VB.Label lblSystemArchitecture
BackStyle = 0 'Transparent
Caption = "lblSystemArchitecture"
Height = 255
Left = 120
TabIndex = 4
Top = 840
Width = 3255
End
Begin VB.Label lblSystemVersion
BackStyle = 0 'Transparent
Caption = "lblSystemVersion"
Height = 255
Left = 120
TabIndex = 3
Top = 600
Width = 3255
End
Begin VB.Label lblSystemName
BackStyle = 0 'Transparent
Caption = "lblSystemName"
Height = 255
Left = 120
TabIndex = 2
Top = 360
Width = 3255
End
End
Begin VB.CommandButton btnSave
Caption = "Save"
Default = -1 'True
Height = 375
Left = 240
TabIndex = 5
Top = 3720
Width = 3495
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' This file is part of WURESET Configuration Project
' WURESET Config Free GNU Application
' Copyright (C) 2018 Manuel Gil.
'
' This program is free software: you can redistribute it and/or modify
' it under the terms of the GNU General Public License as published by
' the Free Software Foundation, either version 3 of the License, or
' (at your option) any later version.
'
' This program is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
' GNU General Public License for more details.
'
' You should have received a copy of the GNU General Public License
' along with this program. If not, see <http:'www.gnu.org/licenses/>.
'
' -----------------------------------------------------------------
' $Id$
' $Title: WURESET Config Free GNU Application. $
' $Description: Configuration for Reset Windows Update Tool. $
' $Copyright: GPL product. $
'
' $Author: Manuel Gil. $
' $version: 1.0.0.3. $
' -----------------------------------------------------------------
Option Explicit
' -----------------------------------------------------------------
' Methods
' -----------------------------------------------------------------
' This subroutine load the Form
' void Form_Load()
Private Sub Form_Load()
LoadSettings
SetLanguageFile
lblSystemName.Caption = "Name: " & systemName
lblSystemVersion.Caption = "Version: " & systemVersion
lblSystemArchitecture.Caption = "Architecture: " & systemArchitecture & "-bits"
' "Colors:" & vbCrLf & _
' " 2 = Green 9 = Light Blue" & vbCrLf & _
' " 3 = Aqua 10 = Light Green" & vbCrLf & _
' " 4 = Red 11 = Light Aqua" & vbCrLf & _
' " 5 = Purple 12 = Light Red" & vbCrLf & _
' " 6 = Yellow 13 = Light Purple" & vbCrLf & _
' " 7 = White 14 = Light Yellow" & vbCrLf & _
' " 8 = Gray 15 = Bright White"
Dim i As Integer
For i = 0 To cmbLanguage.ListCount - 1
If cmbLanguage.List(i) = programLanguage Then
cmbLanguage.ListIndex = i
End If
Next i
txtFont.Text = programFont
End Sub
' Subroutine Click on Button btnColor
' void cmdColor_Click()
Private Sub btnColor_Click()
frmColor.Show vbModal
End Sub
' Subroutine Click on Button btnSave
' void btnSave_Click()
Private Sub btnSave_Click()
' If (Text on txtFont is number) And_
' (Text on txtFont major to 2 Or minor to 15) save settings
If Not IsNumeric(txtFont.Text) Then
MsgBox "Invalid Color", vbOKOnly
txtFont.Text = "7"
txtFont.SetFocus
ElseIf CInt(txtFont.Text) < 2 Or CInt(txtFont.Text) > 15 Then
MsgBox "Invalid Color", vbOKOnly
txtFont.Text = "7"
txtFont.SetFocus
Else
' If ComboBox cmbLanguage isn't Empty
' Program Language = Text on ComboBox cmbLanguage
If cmbLanguage <> "" Then
programLanguage = cmbLanguage.Text
Else
programLanguage = ""
End If
' Program Font = Text on TextBox txtFont
programFont = txtFont.Text
' Save Program Language And Program Font
SaveSettings
MsgBox "The operation completed successfully."
Unload Me
End If
End Sub