-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathfrmCreate.frm
263 lines (254 loc) · 8.7 KB
/
frmCreate.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
VERSION 5.00
Begin VB.Form frmCreate
BackColor = &H00302D2D&
BorderStyle = 0 'None
Caption = "新建项目"
ClientHeight = 5865
ClientLeft = 0
ClientTop = 0
ClientWidth = 7545
Icon = "frmCreate.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
ScaleHeight = 5865
ScaleWidth = 7545
StartUpPosition = 3 'Windows Default
Begin DragControlsIDE.DarkWindowBorder DarkWindowBorder
Left = 6840
Top = 5160
_ExtentX = 847
_ExtentY = 847
Sizable = 0 'False
End
Begin DragControlsIDE.DarkTitleBar DarkTitleBar_NoDrop
Align = 1 'Align Top
Height = 495
Left = 0
TabIndex = 8
Top = 0
Width = 7545
_ExtentX = 13309
_ExtentY = 873
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Microsoft YaHei UI"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "新建项目"
MaxButtonEnabled= 0 'False
MinButtonEnabled= 0 'False
MaxButtonVisible= 0 'False
MinButtonVisible= 0 'False
BindCaption = -1 'True
Picture = "frmCreate.frx":10CA
End
Begin DragControlsIDE.DarkImageButton cmdNewWindowProgram
Height = 765
Left = 480
TabIndex = 0
Top = 1080
Width = 6855
_ExtentX = 12091
_ExtentY = 1349
Image = "frmCreate.frx":1844
HasBorder = 0 'False
Caption = " 新建窗口程序"
Alignment = 0
End
Begin DragControlsIDE.DarkImageButton cmdNewConsoleProgram
Height = 765
Left = 480
TabIndex = 1
Top = 1920
Width = 6855
_ExtentX = 12091
_ExtentY = 1349
Image = "frmCreate.frx":1977
HasBorder = 0 'False
Caption = " 新建控制台程序"
Alignment = 0
End
Begin DragControlsIDE.DarkImageButton cmdNewPlainCpp
Height = 765
Left = 480
TabIndex = 2
Top = 2760
Width = 6855
_ExtentX = 12091
_ExtentY = 1349
Image = "frmCreate.frx":1AF8
HasBorder = 0 'False
Caption = " 新建空白C++程序"
Alignment = 0
End
Begin DragControlsIDE.DarkImageButton cmdOpenProject
Height = 765
Left = 480
TabIndex = 3
Top = 3600
Width = 6855
_ExtentX = 12091
_ExtentY = 1349
Image = "frmCreate.frx":1E3D
HasBorder = 0 'False
Caption = " 打开工程..."
Alignment = 0
End
Begin VB.Label labTip
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "创建"
BeginProperty Font
Name = "Microsoft YaHei UI"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFB00A&
Height = 330
Index = 1
Left = 600
TabIndex = 7
Top = 600
Width = 480
End
Begin VB.Label labTip
Appearance = 0 'Flat
BackColor = &H00FFB00A&
BeginProperty Font
Name = "Microsoft YaHei UI"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFB00A&
Height = 375
Index = 0
Left = 0
TabIndex = 6
Top = 600
Width = 90
End
Begin VB.Label labTip
Appearance = 0 'Flat
BackColor = &H00CEDB1A&
BeginProperty Font
Name = "Microsoft YaHei UI"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFB00A&
Height = 375
Index = 2
Left = 0
TabIndex = 5
Top = 4680
Width = 90
End
Begin VB.Label labTip
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "最近"
BeginProperty Font
Name = "Microsoft YaHei UI"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00CEDB1A&
Height = 330
Index = 3
Left = 600
TabIndex = 4
Top = 4680
Width = 480
End
End
Attribute VB_Name = "frmCreate"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'====================================================
'描述: 新建项目窗口,用户在这里选择新建项目的类型
'作者: 冰棍
'文件: frmCreateOptions.frm
'====================================================
Option Explicit
Private Sub cmdNewWindowProgram_Click()
On Error Resume Next
frmCreateOptions.TypeOption(1).Focused = True '设置工程类型
frmCreateOptions.RefreshName
frmCreateOptions.Show '显示新建选项
frmCreateOptions.edProjectName.SetFocus
Unload Me
End Sub
Private Sub cmdNewConsoleProgram_Click()
On Error Resume Next
frmCreateOptions.TypeOption(2).Focused = True '设置工程类型
frmCreateOptions.RefreshName
frmCreateOptions.Show '显示新建选项
frmCreateOptions.edProjectName.SetFocus
Unload Me
End Sub
Private Sub cmdNewPlainCpp_Click()
On Error Resume Next
frmCreateOptions.TypeOption(3).Focused = True '设置工程类型
frmCreateOptions.RefreshName
frmCreateOptions.Show '显示新建选项
frmCreateOptions.edProjectName.SetFocus
Unload Me
End Sub
Private Sub cmdOpenProject_Click()
Call frmMain.HideStartupPage
frmMain.Enabled = True
frmMain.DarkWindowBorderSizer.Bind = True
Unload Me
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If Me.DarkTitleBar_NoDrop.Visible Then '有标题栏才响应Esc键
If KeyAscii = vbKeyEscape Then '按下Esc键关闭窗体
KeyAscii = 0
Unload Me
End If
End If
End Sub
Private Sub Form_Load()
'加载语言字符串
Me.Caption = Lang_Create_Caption
Me.labTip(1).Caption = Lang_Create_CreateLabel
Me.labTip(3).Caption = Lang_Create_RecentLabel
Me.cmdNewConsoleProgram.Caption = Lang_Create_NewConsoleProgram
Me.cmdNewPlainCpp.Caption = Lang_Create_NewEmptyCpp
Me.cmdNewWindowProgram.Caption = Lang_Create_NewWindowProgram
Me.cmdOpenProject.Caption = Lang_Create_OpenProject
'---------------------------------------------------------------------
End Sub
Private Sub Form_Unload(Cancel As Integer)
If frmCreateOptions.Visible = False Then '如果取消新建,则重新激活主窗体
Unload frmCreateOptions
frmMain.Enabled = True
frmMain.DarkWindowBorderSizer.Bind = True
End If
End Sub