-
Notifications
You must be signed in to change notification settings - Fork 1
/
frmOption.frm
1511 lines (1391 loc) · 47.9 KB
/
frmOption.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
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Begin VB.Form frmOption
AutoRedraw = -1 'True
BorderStyle = 1 'Fixed Single
Caption = "参数设置"
ClientHeight = 4980
ClientLeft = 2565
ClientTop = 1500
ClientWidth = 7845
FillStyle = 0 'Solid
Icon = "frmOption.frx":0000
KeyPreview = -1 'True
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
NegotiateMenus = 0 'False
ScaleHeight = 4980
ScaleWidth = 7845
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.Frame fraOption
Caption = "声音设置"
Height = 3135
Index = 3
Left = -1665
TabIndex = 47
Top = 4860
Visible = 0 'False
Width = 4815
Begin VB.Timer tmrSound
Enabled = 0 'False
Interval = 1000
Left = 4320
Top = 135
End
Begin VB.CommandButton cmdPlay
Height = 300
Left = 4275
Picture = "frmOption.frx":0E42
Style = 1 'Graphical
TabIndex = 32
Top = 2745
Width = 375
End
Begin VB.CommandButton cmdOpen
Height = 300
Left = 3825
Picture = "frmOption.frx":0E96
Style = 1 'Graphical
TabIndex = 31
Top = 2745
Width = 375
End
Begin VB.ComboBox cboSound
Height = 300
Left = 930
TabIndex = 30
Top = 2745
Width = 2790
End
Begin MSComctlLib.ListView lvwSound
Height = 2205
Left = 120
TabIndex = 28
Top = 465
Width = 4560
_ExtentX = 8043
_ExtentY = 3889
View = 3
Arrange = 2
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = 0 'False
HideColumnHeaders= -1 'True
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 2
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Key = "Name"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Key = "File"
Object.Width = 2540
EndProperty
End
Begin MSComctlLib.ImageList ilsSound
Left = 3450
Top = 180
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 1
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmOption.frx":0F11
Key = ""
EndProperty
EndProperty
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "文件(&F):"
Height = 180
Left = 165
TabIndex = 29
Top = 2790
Width = 720
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "事件(&E):"
Height = 180
Left = 165
TabIndex = 27
Top = 255
Width = 720
End
End
Begin VB.Frame fraOption
Caption = "音乐设置"
Height = 3195
Index = 2
Left = 3285
TabIndex = 46
Top = 4890
Visible = 0 'False
Width = 4860
Begin MSComctlLib.ListView lvwPlayList
Height = 2475
Left = 150
TabIndex = 34
Top = 570
Width = 3750
_ExtentX = 6615
_ExtentY = 4366
View = 3
LabelEdit = 1
LabelWrap = 0 'False
HideSelection = 0 'False
HideColumnHeaders= -1 'True
FullRowSelect = -1 'True
_Version = 393217
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 1
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Object.Width = 1589
EndProperty
End
Begin Othello.FlatButton fltbtnDown
Height = 345
Left = 3975
TabIndex = 39
Top = 2670
Width = 720
_ExtentX = 1270
_ExtentY = 609
Caption = "向下"
MousePointer = 99
Style = 2
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
EnableHot = -1 'True
ToolTip = "向下移动(Ctrl+↓)"
ForeColor = 0
End
Begin Othello.FlatButton fltbtnUp
Height = 345
Left = 3975
TabIndex = 38
Top = 2235
Width = 720
_ExtentX = 1270
_ExtentY = 609
Caption = "向上"
MousePointer = 99
Style = 2
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
EnableHot = -1 'True
ToolTip = "向上移动(Ctrl+↑)"
ForeColor = 0
End
Begin Othello.FlatButton fltbtnRemove
Height = 345
Left = 3975
TabIndex = 37
Top = 1455
Width = 720
_ExtentX = 1270
_ExtentY = 609
Caption = "删除"
MousePointer = 99
Style = 2
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
EnableHot = -1 'True
ToolTip = "删除项目(Delete)"
ForeColor = 0
End
Begin Othello.FlatButton fltbtnAdd
Height = 345
Left = 3975
TabIndex = 35
Top = 585
Width = 720
_ExtentX = 1270
_ExtentY = 609
Caption = "添加"
MousePointer = 99
Style = 2
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
EnableHot = -1 'True
ToolTip = "添加歌曲(Ctrl+A)"
ForeColor = 0
End
Begin Othello.FlatButton fltbtnEdit
Height = 345
Left = 3975
TabIndex = 36
Top = 1020
Width = 720
_ExtentX = 1270
_ExtentY = 609
Caption = "编辑"
MousePointer = 99
Style = 2
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
EnableHot = -1 'True
ToolTip = "编辑播放列表项目"
ForeColor = 0
End
Begin VB.Label lblPlayListNumber
AutoSize = -1 'True
Caption = "0"
Height = 180
Left = 3210
TabIndex = 49
Top = 300
Width = 90
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "歌曲:"
Height = 180
Left = 2700
TabIndex = 48
Top = 300
Width = 450
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "播放列表(&P):"
Height = 180
Left = 180
TabIndex = 33
Top = 300
Width = 1080
End
End
Begin VB.Frame fraOption
Caption = "网络设置"
Height = 3105
Index = 1
Left = 7695
TabIndex = 45
Top = 1110
Visible = 0 'False
Width = 4785
Begin MSWinsockLib.Winsock tcpSocks5
Left = 2745
Top = 765
_ExtentX = 741
_ExtentY = 741
_Version = 393216
End
Begin VB.TextBox txtHttpIP
Height = 285
Left = 180
TabIndex = 17
Top = 1440
Width = 3180
End
Begin VB.TextBox txtHttpPort
Height = 285
Left = 3420
TabIndex = 19
Top = 1440
Width = 1215
End
Begin Othello.FlatButton fltbtnTest
Height = 295
Left = 3420
TabIndex = 26
Top = 2610
Width = 1215
_ExtentX = 2143
_ExtentY = 529
Caption = "测试"
MousePointer = 99
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
EnableHot = -1 'True
ForeColor = 0
End
Begin VB.TextBox txtSocks5Password
Height = 285
IMEMode = 3 'DISABLE
Left = 1935
PasswordChar = "*"
TabIndex = 25
Top = 2610
Width = 1410
End
Begin VB.TextBox txtSocks5Username
Height = 285
Left = 180
TabIndex = 24
Top = 2610
Width = 1695
End
Begin VB.TextBox txtSocks5Port
Height = 285
Left = 3420
TabIndex = 23
Top = 2025
Width = 1215
End
Begin VB.TextBox txtSocks5IP
Height = 285
Left = 180
TabIndex = 21
Top = 2025
Width = 3180
End
Begin VB.CheckBox chkProxy
Caption = "使用代理服务器(&X)"
Height = 255
Left = 180
TabIndex = 15
Top = 855
Width = 1890
End
Begin VB.TextBox txtServerURL
Height = 285
Left = 1485
TabIndex = 14
Top = 360
Width = 3165
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "&HTTP 代理地址:"
Height = 180
Left = 225
TabIndex = 16
Top = 1215
Width = 1260
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "端口号(&P):"
Height = 180
Left = 3465
TabIndex = 18
Top = 1215
Width = 900
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "校验用户密码:"
Height = 180
Left = 1980
TabIndex = 51
Top = 2385
Width = 1170
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "校验用户名:"
Height = 180
Left = 225
TabIndex = 50
Top = 2385
Width = 990
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "端口号(&T):"
Height = 180
Left = 3465
TabIndex = 22
Top = 1800
Width = 900
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "Socks&5 代理地址:"
Height = 180
Left = 225
TabIndex = 20
Top = 1800
Width = 1440
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "服务器地址(&S):"
Height = 195
Left = 180
TabIndex = 13
Top = 420
Width = 1275
End
End
Begin Othello.FlatButton fltbtnApply
Height = 360
Left = 6210
TabIndex = 42
Top = 4455
Width = 1200
_ExtentX = 2117
_ExtentY = 635
Caption = "应用(&A)"
MousePointer = 99
Style = 2
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
EnableHot = -1 'True
ForeColor = 0
End
Begin Othello.FlatButton fltbtnCancel
Cancel = -1 'True
Height = 360
Left = 4875
TabIndex = 41
Top = 4455
Width = 1200
_ExtentX = 2117
_ExtentY = 635
Caption = "取消(&C)"
MousePointer = 99
Style = 2
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
EnableHot = -1 'True
ForeColor = 0
End
Begin Othello.FlatButton fltbtnOK
Default = -1 'True
Height = 360
Left = 3540
TabIndex = 40
Top = 4455
Width = 1200
_ExtentX = 2117
_ExtentY = 635
Caption = "确定(&O)"
MousePointer = 99
Style = 2
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
EnableHot = -1 'True
ForeColor = 0
End
Begin VB.PictureBox picTitle
AutoRedraw = -1 'True
BackColor = &H00000000&
BorderStyle = 0 'None
FillColor = &H00FFFFFF&
FillStyle = 0 'Solid
ForeColor = &H00FFFFFF&
Height = 615
Left = 2535
ScaleHeight = 615
ScaleWidth = 5025
TabIndex = 44
TabStop = 0 'False
Top = 150
Width = 5025
End
Begin VB.Frame fraOption
Caption = "常规设置"
Height = 3105
Index = 0
Left = 2655
TabIndex = 43
Top = 1080
Visible = 0 'False
Width = 4710
Begin MSComctlLib.ImageCombo imgcboFace
CausesValidation= 0 'False
Height = 315
Left = 1710
TabIndex = 12
Top = 2385
Width = 840
_ExtentX = 1482
_ExtentY = 556
_Version = 393216
ForeColor = -2147483640
BackColor = -2147483643
Locked = -1 'True
End
Begin VB.ComboBox cboLevel
Height = 300
ItemData = "frmOption.frx":1075
Left = 1710
List = "frmOption.frx":1094
Style = 2 'Dropdown List
TabIndex = 10
Top = 1995
Width = 1650
End
Begin VB.CheckBox chkOfflineMode
Caption = "单机游戏模式(需要重新启动游戏)(&S)"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 270
TabIndex = 8
Top = 1680
Width = 3585
End
Begin VB.CheckBox chkUserReload
Caption = "自动刷新用户列表(&U)"
Height = 195
Left = 270
TabIndex = 2
Top = 787
Width = 2010
End
Begin VB.TextBox txtTableTime
Height = 285
Left = 3660
TabIndex = 7
Top = 1125
Width = 570
End
Begin VB.CheckBox chkTableReload
Caption = "自动刷新棋局列表(&B)"
Height = 195
Left = 270
TabIndex = 5
Top = 1155
Width = 2010
End
Begin VB.TextBox txtUserTime
Height = 285
Left = 3660
TabIndex = 4
Top = 750
Width = 570
End
Begin VB.CheckBox chkDownTip
Caption = "显示落子提示(&D)"
Height = 195
Left = 270
TabIndex = 1
Top = 420
Width = 1650
End
Begin VB.Label Label17
AutoSize = -1 'True
Caption = "我的头像(&F):"
Height = 180
Left = 570
TabIndex = 11
Top = 2550
Width = 1080
End
Begin VB.Label Label16
AutoSize = -1 'True
Caption = "难度级别(&L):"
Height = 180
Left = 570
TabIndex = 9
Top = 2070
Width = 1080
End
Begin VB.Label Label15
AutoSize = -1 'True
Caption = "秒"
Height = 180
Left = 4320
TabIndex = 53
Top = 1185
Width = 180
End
Begin VB.Label Label14
AutoSize = -1 'True
Caption = "刷新间隔(&M):"
Height = 180
Left = 2535
TabIndex = 6
Top = 1170
Width = 1080
End
Begin VB.Label Label13
AutoSize = -1 'True
Caption = "秒"
Height = 180
Left = 4320
TabIndex = 52
Top = 810
Width = 180
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "刷新间隔(&T):"
Height = 180
Left = 2535
TabIndex = 3
Top = 795
Width = 1080
End
End
Begin MSComctlLib.TreeView treOption
Height = 4215
Left = 165
TabIndex = 0
Top = 135
Width = 2130
_ExtentX = 3757
_ExtentY = 7435
_Version = 393217
HideSelection = 0 'False
Indentation = 618
LabelEdit = 1
LineStyle = 1
Style = 7
HotTracking = -1 'True
SingleSel = -1 'True
Appearance = 1
End
Begin VB.Image imgFooter
Height = 285
Left = 315
Top = 4530
Width = 1650
End
End
Attribute VB_Name = "frmOption"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mlngPlayListNumber As Long
Dim mlngOptionPage As Long
Dim SoundEffects As Mmedia
Dim Socks5Status As Long
Public Function ShowEx(ByVal Page As Long) As Long
Dim Temp As Node
On Error Resume Next
If Page < 1 Or Page > treOption.Nodes.Count Then
Page = 1
End If
Set Temp = treOption.Nodes.Item(Page)
Temp.Selected = True
Call treOption_NodeClick(Temp)
Call Me.Show(vbModal, MainForm)
ShowEx = mlngOptionPage
End Function
Private Sub Form_Load()
Dim i As Long
Dim j As Long
Dim Temp As Node
Dim itmX As ListItem
Dim TempSound As String
Dim Sound(MAX_SOUND) As String
On Error GoTo ErrorHandler
Set imgFooter.Picture = frmResource.imgResFooter.Picture
Set Temp = treOption.Nodes.Add(, tvwFirst, "R1", LoadString(236))
Temp.Tag = LoadString(237)
Set Temp = treOption.Nodes.Add("R1", tvwChild, "Set1", LoadString(238))
Temp.Tag = LoadString(239)
Set Temp = treOption.Nodes.Add("R1", tvwChild, "Set2", LoadString(240))
Temp.Tag = LoadString(241)
Set Temp = treOption.Nodes.Add("R1", tvwChild, "Set3", LoadString(242))
Temp.Tag = LoadString(243)
Temp.EnsureVisible
' 初始化声音对象
Set SoundEffects = New Mmedia
' 装载设置信息
chkOfflineMode.Value = Abs(gblnSave_OfflineMode)
cboLevel.ListIndex = glngSave_Level - 1
chkDownTip.Value = Abs(gblnSave_DownTip)
chkUserReload.Value = Abs(gblnSave_OnlineAutoReload)
chkTableReload.Value = Abs(gblnSave_TableAutoReload)
txtUserTime.Text = CStr(glngSave_OnlineAutoReloadTime)
txtTableTime.Text = CStr(glngSave_TableAutoReloadTime)
' 初始化单机模式头像下拉框
Set imgcboFace.ImageList = MainForm.ilsFace
For i = 1 To Val(MainForm.ilsFace.Tag)
imgcboFace.ComboItems.Add.Image = i
Next i
imgcboFace.ComboItems.Item(glngSave_OfflineFace).Selected = True
Set lvwSound.SmallIcons = ilsSound
' 装载网络设置
If gstrSave_ServerUrl = "" Then
txtServerURL.Text = DEFAULT_gServerUrl
Else
txtServerURL.Text = ParseURL(gstrSave_ServerUrl, True)
End If
chkProxy.Value = Abs(gblnSave_UseProxy)
txtHttpIP.Text = gstrSave_HttpProxyIP
txtHttpPort.Text = CStr(glngSave_HttpProxyPort)
txtSocks5IP.Text = gstrSave_Socks5ProxyIP
txtSocks5Port.Text = CStr(glngSave_Socks5ProxyPort)
txtSocks5Username.Text = gstrSave_Socks5Username
txtSocks5Password.Text = Decipher(gstrLocalPassword, gstrSave_Socks5Password)
Call chkProxy_Click
' 装载播放列表
lvwPlayList.ColumnHeaders(1).Width = lvwPlayList.Width - 310
mlngPlayListNumber = glngSave_PlayListNumber
For i = 1 To mlngPlayListNumber
Set itmX = lvwPlayList.ListItems.Add(, , ExtractName(gstrSave_PlayListName(i)))
itmX.Tag = gstrSave_PlayListName(i)
Next i
If glngSave_PlayListPosition = 0 And glngSave_PlayListNumber > 0 Then
glngSave_PlayListPosition = 1
End If
If glngSave_PlayListPosition <= lvwPlayList.ListItems.Count And glngSave_PlayListPosition > 0 And mlngPlayListNumber > 0 Then
lvwPlayList.ListItems(glngSave_PlayListPosition).ForeColor = vbBlue
lvwPlayList.ListItems(glngSave_PlayListPosition).Selected = True
Call lvwPlayList.ListItems(glngSave_PlayListPosition).EnsureVisible
End If
lblPlayListNumber.Caption = CStr(mlngPlayListNumber)
' 装载声音列表
For i = 1 To MAX_SOUND
Set itmX = lvwSound.ListItems.Add(, , gstrSave_SoundName(i))
If gstrSave_SoundValue(i) = DEFAULT_SOUND Then
itmX.Tag = DEFAULT_SOUND
itmX.SubItems(1) = LoadString(244)
itmX.SmallIcon = 1
ElseIf gstrSave_SoundValue(i) = "" Then
itmX.Tag = ""
itmX.SubItems(1) = ""
Else
itmX.Tag = gstrSave_SoundValue(i)
itmX.SubItems(1) = ExtractName(gstrSave_SoundValue(i))
itmX.SmallIcon = 1
End If
Next i
Call cboSound.AddItem(LoadString(244))
Call cboSound.AddItem(LoadString(245))
For i = 1 To MAX_SOUND
TempSound = gstrSave_SoundValue(i)
If TempSound <> DEFAULT_SOUND And TempSound <> "" Then
Sound(i) = TempSound
End If
Next i
' 处理声音列表
For i = 1 To MAX_SOUND - 1
For j = i + 1 To MAX_SOUND
If Sound(i) = Sound(j) Then Sound(j) = ""
Next j
Next i
For i = 1 To MAX_SOUND - 1
For j = i + 1 To MAX_SOUND
If Sound(i) = "" And Sound(j) <> "" Then
Call Swap(Sound(i), Sound(j))
Exit For
End If
Next j
Next i
For i = 1 To MAX_SOUND
If Sound(i) = "" Then Exit For
Call cboSound.AddItem(Sound(i))
Next i
Call lvwSound_ItemClick(lvwSound.ListItems(1))
Call ColumnSize(lvwSound, 1, 38)
Call ColumnSize(lvwSound, 2, 55)
' 更新控件
Call chkOfflineMode_Click
Call chkUserReload_Click
Call chkTableReload_Click
Call chkProxy_Click
Exit Sub
ErrorHandler:
Call MessageBox(Me.hWnd, Err.Description, vbCritical, LoadString(181))
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Error Resume Next
Call tcpSocks5.Close
If Not (treOption.SelectedItem Is Nothing) Then
mlngOptionPage = treOption.SelectedItem.Index
Else
mlngOptionPage = 1
End If
Call SoundEffects.mmClose
Set SoundEffects = Nothing
End Sub
' 使所有更改生效!
Private Sub fltbtnApply_Click(Button As Integer)
Dim i As Long
On Error Resume Next
' 保存常规设置
gblnSave_DownTip = CBool(chkDownTip.Value)
gblnSave_OfflineMode = CBool(chkOfflineMode.Value)
glngSave_Level = cboLevel.ListIndex + 1
glngSave_OfflineFace = imgcboFace.SelectedItem.Index
gblnSave_OnlineAutoReload = CBool(chkUserReload.Value)
gblnSave_TableAutoReload = CBool(chkTableReload.Value)
glngSave_OnlineAutoReloadTime = Int(txtUserTime.Text)
glngSave_TableAutoReloadTime = Int(txtTableTime.Text)
' 保存网络设置
If txtServerURL.Text = "" Then
gstrSave_ServerUrl = ParseURL(DEFAULT_gServerUrl, False)
Else
gstrSave_ServerUrl = ParseURL(txtServerURL.Text, False)
End If
gblnSave_UseProxy = CBool(chkProxy.Value)
gstrSave_HttpProxyIP = txtHttpIP.Text
glngSave_HttpProxyPort = Int(txtHttpPort.Text)
gstrSave_Socks5ProxyIP = txtSocks5IP.Text
glngSave_Socks5ProxyPort = Int(txtSocks5Port.Text)
gstrSave_Socks5Username = txtSocks5Username.Text
gstrSave_Socks5Password = Cipher(gstrLocalPassword, txtSocks5Password.Text)
' 保存播放列表
glngSave_PlayListNumber = lvwPlayList.ListItems.Count
For i = 1 To glngSave_PlayListNumber
gstrSave_PlayListName(i) = lvwPlayList.ListItems(i).Tag
Next i
If lvwPlayList.SelectedItem Is Nothing Then
glngSave_PlayListPosition = 1
Else
glngSave_PlayListPosition = lvwPlayList.SelectedItem.Index
End If
' 保存声音列表
For i = 1 To MAX_SOUND
gstrSave_SoundValue(i) = lvwSound.ListItems.Item(i).Tag
Next i
frmOnline.tmrReload.Enabled = gblnSave_OnlineAutoReload
frmTable.tmrReload.Enabled = gblnSave_TableAutoReload
Call MainForm.DrawTable
End Sub
Private Sub cboSound_Click()
Call SetSoundList(cboSound.Text)
End Sub
Private Sub cboSound_LostFocus()
Call SetSoundList(cboSound.Text)
End Sub
Private Sub chkOfflineMode_Click()
If (chkOfflineMode.Value = vbChecked) And (Not gblnGameStart) Then
cboLevel.Enabled = True
imgcboFace.Enabled = True
Else
cboLevel.Enabled = False
imgcboFace.Enabled = False
End If
End Sub
Private Sub chkProxy_Click()
If chkProxy.Value = vbChecked Then
Call SetEnabled(txtHttpIP, True)
Call SetEnabled(txtHttpPort, True)
Call SetEnabled(txtSocks5IP, True)
Call SetEnabled(txtSocks5Port, True)
Call SetEnabled(txtSocks5Username, True)
Call SetEnabled(txtSocks5Password, True)
fltbtnTest.Enabled = True