Develop and Download Open Source Software

Browse CVS Repository

Annotation of /gikonavigoeson/gikonavi/Option.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (hide annotations) (download) (as text)
Mon Aug 18 08:13:38 2003 UTC (20 years, 8 months ago) by h677
Branch: MAIN
CVS Tags: b35, b36
Changes since 1.3: +0 -22 lines
File MIME type: text/x-pascal
連続する同英字をNGにする機能の有効性が低いので削除した

1 hi_ 1.1 unit Option;
2    
3     interface
4    
5     uses
6     Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7     ComCtrls, StdCtrls, ExtCtrls, Dialogs, FileCtrl, MMSystem,
8     GikoSystem, GikoUtil, Buttons, UrlMon, Menus, ImgList;
9    
10     type
11     TOptionDialog = class(TForm)
12     OkBotton: TButton;
13     CancelBotton: TButton;
14     OptionTab: TPageControl;
15     ConnectSheet: TTabSheet;
16     Font1Sheet: TTabSheet;
17     ApplyButton: TButton;
18     FontDialog: TFontDialog;
19     ColorDialog: TColorDialog;
20     ReadProxyGroupBox: TGroupBox;
21     ReadAddressLabel: TLabel;
22     ReadPortLabel: TLabel;
23     ReadProxyCheck: TCheckBox;
24     ReadProxyAddressEdit: TEdit;
25     ReadPortEdit: TEdit;
26     ReadProxyUserIDEdit: TEdit;
27     ReadProxyPasswordEdit: TEdit;
28     ReadUserIDLabel: TLabel;
29     ReadPasswordLabel: TLabel;
30     FolderSheet: TTabSheet;
31     FolderGroupBox: TGroupBox;
32     LogFolderEdit: TEdit;
33     LogFolderButton: TButton;
34     Label1: TLabel;
35     Label2: TLabel;
36     ThreadSheet: TTabSheet;
37     SoundSheet: TTabSheet;
38     SoundEventGroupBox: TGroupBox;
39     SoundListView: TListView;
40     SoundReferButton: TButton;
41     SoundFileEdit: TEdit;
42     OpenDialog: TOpenDialog;
43     WriteProxyGroupBox: TGroupBox;
44     WriteAddressLabel: TLabel;
45     WritePortLabel: TLabel;
46     WriteUserIDLabel: TLabel;
47     WritePasswordLabel: TLabel;
48     WriteProxyCheck: TCheckBox;
49     WriteProxyAddressEdit: TEdit;
50     WritePortEdit: TEdit;
51     WriteProxyUserIDEdit: TEdit;
52     WriteProxyPasswordEdit: TEdit;
53     BoardSheet: TTabSheet;
54     GroupBox4: TGroupBox;
55     BoardURL2chEdit: TEdit;
56     Label13: TLabel;
57     UserIDSheet: TTabSheet;
58     GroupBox3: TGroupBox;
59     Label9: TLabel;
60     Label10: TLabel;
61     UserIDEdit: TEdit;
62     PasswordEdit: TEdit;
63     SoundPlayButton: TBitBtn;
64     AutoLoginCheckBox: TCheckBox;
65     Tora3URLLabel: TLabel;
66     Label12: TLabel;
67     Label5: TLabel;
68     GroupBox5: TGroupBox;
69     ComboBox1: TComboBox;
70     Label6: TLabel;
71     Label7: TLabel;
72     Label8: TLabel;
73     ComboBox2: TComboBox;
74     ComboBox3: TComboBox;
75     Label4: TLabel;
76     Edit1: TEdit;
77     Button1: TButton;
78     CabinetFontBotton: TButton;
79     CabinetColorBotton: TButton;
80     CabinetDefaultButton: TButton;
81     CabinetMemo: TMemo;
82     ListMemo: TMemo;
83     ListFontBotton: TButton;
84     ListColorBotton: TButton;
85     ListDefaultBotton: TButton;
86     HintFontButton: TButton;
87     HintBackButton: TButton;
88     HintDefaultButton: TButton;
89     HintMemo: TMemo;
90     EditorMemo: TMemo;
91     EditorFontBotton: TButton;
92     EditorColorBotton: TButton;
93     EditorDefaultBotton: TButton;
94     BrowserTabMemo: TMemo;
95     BruwserTabFontButton: TButton;
96     BrowserTabDefaultButton: TButton;
97     Bevel1: TBevel;
98     Bevel2: TBevel;
99     GroupBox1: TGroupBox;
100     GroupBox2: TGroupBox;
101     URLAppCheckBox: TCheckBox;
102     AppFolderLabel: TLabel;
103     AppFolderEdit: TEdit;
104     AppFolderButton: TButton;
105     OpenMailerCheckBox: TCheckBox;
106     TabSheet1: TTabSheet;
107     PopupPositionRadioGroup: TRadioGroup;
108     TabAddRadioGroup: TRadioGroup;
109     TabSheet2: TTabSheet;
110     GroupBox7: TGroupBox;
111     URLDisplayCheckBox: TCheckBox;
112     Label3: TLabel;
113     Label11: TLabel;
114     TabStopAddressBarCheckBox: TCheckBox;
115     AddressHistoryCountEdit: TEdit;
116     LinkAddCheckBox: TCheckBox;
117     GroupBox8: TGroupBox;
118     PreviewVisibleCheckBox: TCheckBox;
119     PreviewSizeComboBox: TComboBox;
120     Label14: TLabel;
121     Label15: TLabel;
122     PreviewWaitEdit: TEdit;
123     Label16: TLabel;
124     ShowMailCheckBox: TCheckBox;
125     TabSheet3: TTabSheet;
126     GroupBox9: TGroupBox;
127     ThreadListIconCheckBox: TCheckBox;
128     GroupBox6: TGroupBox;
129     LogDeleteMessageCheckBox: TCheckBox;
130     GroupBox10: TGroupBox;
131     UnActivePopupCheckBox: TCheckBox;
132     GroupBox11: TGroupBox;
133     RecvBufferSize: TEdit;
134     Label17: TLabel;
135     ProxyProtocolCheckBox: TCheckBox;
136     ProtocolCheckBox: TCheckBox;
137     Label18: TLabel;
138     Label19: TLabel;
139     Bevel5: TBevel;
140     Label20: TLabel;
141     Label21: TLabel;
142     Label22: TLabel;
143     Label23: TLabel;
144     TabSheet4: TTabSheet;
145     lblSFont: TLabel;
146     GroupBox12: TGroupBox;
147     CSSCheckBox: TCheckBox;
148     CSSListLabel: TLabel;
149     CSSListView: TListView;
150     GroupBox13: TGroupBox;
151     PostTimeCheckBox: TCheckBox;
152     Label24: TLabel;
153     Label25: TLabel;
154     PostTimeEdit: TEdit;
155     PostTimeLabel: TLabel;
156     Label27: TLabel;
157     PutPostTimeRadioButton: TRadioButton;
158     BackPostTimeRadioButton: TRadioButton;
159 yoffy 1.2 ResPopupBoldCheckBox: TCheckBox;
160 h677 1.3 NGwordSheet: TTabSheet;
161     GroupBox14: TGroupBox;
162     RloCheckBox: TCheckBox;
163     ReplaceulCheckBox: TCheckBox;
164     PopUpAbonCheckBox: TCheckBox;
165 hi_ 1.1 procedure FormCreate(Sender: TObject);
166     procedure FormDestroy(Sender: TObject);
167     procedure ApplyButtonClick(Sender: TObject);
168     procedure CabinetFontBottonClick(Sender: TObject);
169     procedure CabinetColorBottonClick(Sender: TObject);
170     procedure EditorFontBottonClick(Sender: TObject);
171     procedure OkBottonClick(Sender: TObject);
172     procedure ReadProxyCheckClick(Sender: TObject);
173     procedure ListFontBottonClick(Sender: TObject);
174     procedure ListColorBottonClick(Sender: TObject);
175     procedure EditorColorBottonClick(Sender: TObject);
176     procedure CabinetDefaultButtonClick(Sender: TObject);
177     procedure ReadPortEditExit(Sender: TObject);
178     procedure ListDefaultBottonClick(Sender: TObject);
179     procedure EditorDefaultBottonClick(Sender: TObject);
180     procedure HintFontButtonClick(Sender: TObject);
181     procedure HintBackButtonClick(Sender: TObject);
182     procedure HintDefaultButtonClick(Sender: TObject);
183     procedure LogFolderButtonClick(Sender: TObject);
184     procedure FormClose(Sender: TObject; var Action: TCloseAction);
185     procedure SoundReferButtonClick(Sender: TObject);
186     procedure SoundPlayButtonClick(Sender: TObject);
187     procedure SoundListViewChanging(Sender: TObject; Item: TListItem;
188     Change: TItemChange; var AllowChange: Boolean);
189     procedure SoundFileEditChange(Sender: TObject);
190     procedure OptionTabChange(Sender: TObject);
191     procedure AppFolderButtonClick(Sender: TObject);
192     procedure WriteProxyCheckClick(Sender: TObject);
193     procedure WritePortEditExit(Sender: TObject);
194     procedure Tora3URLLabelClick(Sender: TObject);
195     procedure HotKeyEnter(Sender: TObject);
196     procedure HotKeyExit(Sender: TObject);
197     procedure URLAppCheckBoxClick(Sender: TObject);
198     procedure BruwserTabFontButtonClick(Sender: TObject);
199     procedure BrowserTabDefaultButtonClick(Sender: TObject);
200     procedure AddressHistoryCountEditExit(Sender: TObject);
201     procedure PreviewWaitEditExit(Sender: TObject);
202     procedure RecvBufferSizeExit(Sender: TObject);
203     procedure CSSCheckBoxClick(Sender: TObject);
204     procedure PostTimeEditExit(Sender: TObject);
205     procedure PostTimeCheckBoxClick(Sender: TObject);
206     private
207     { Private 鐃緒申鐃緒申 }
208     FClose: Boolean;
209     function GetMemoText(font: TFont; text: string): string;
210     // function GetFontText(Font: TFont; Text: string): string;
211     procedure SetValue;
212     procedure SaveSetting;
213     procedure SettingApply;
214     function CheckFolder: Boolean;
215 h677 1.3 procedure SetAbonpropertys;
216 hi_ 1.1 public
217     { Public 鐃緒申鐃緒申 }
218     end;
219    
220     var
221     OptionDialog: TOptionDialog;
222    
223     implementation
224    
225     uses
226     Giko, Editor, Setting, ActnList;
227    
228     const
229     FONT_TEXT: string = '%s %d pt';
230     MEMO_CABINET: string = '鐃?鐃緒申鐃?鐃?鐃?鐃?';
231     MEMO_THREAD: string = '鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?';
232     MEMO_BROWSERPOPUP: string = '鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?';
233     MEMO_BROWSERTAB: string = '鐃?鐃緒申鐃?鐃?鐃?鐃?';
234     MEMO_EDITOR: string = '鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?';
235     DEFAULT_FONT_NAME: string = '鐃?鐃? 鐃?鐃?鐃?鐃?鐃?';
236     DEFAULT_FONT_SIZE: Integer = 9;
237     DEFAULT_TABFONT_NAME: string = '鐃?鐃? 鐃?鐃?鐃?鐃?鐃?';
238     DEFAULT_TABFONT_SIZE: Integer = 9;
239     URL_TORA3: WideString = 'http://2ch.tora3.net/';
240    
241     {$R *.DFM}
242    
243     procedure TOptionDialog.FormCreate(Sender: TObject);
244     begin
245     FClose := True;
246    
247     OptionTab.ActivePage := ConnectSheet;
248     SetValue;
249    
250     CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
251     ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD);
252     HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP);
253     BrowserTabMemo.Text := GetMemoText(BrowserTabMemo.Font, MEMO_BROWSERTAB);
254     EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR);
255    
256     Tora3URLLabel.Cursor := 5;
257     lblSFont.Caption := '鐃緒申鐃?鐃?鐃緒申'#13#10#13#10
258     + '鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?'#13#10
259     + '鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申';
260     CSSCheckBoxClick(Sender);
261     PostTimeCheckBoxClick(Sender);
262     end;
263    
264     procedure TOptionDialog.FormDestroy(Sender: TObject);
265     begin
266     sndPlaySound(nil, SND_ASYNC);
267     end;
268    
269     procedure TOptionDialog.OkBottonClick(Sender: TObject);
270     begin
271     FClose := True;
272     RecvBufferSizeExit(Sender);
273     ReadPortEditExit(Sender);
274     WritePortEditExit(Sender);
275     AddressHistoryCountEditExit(Sender);
276     PreviewWaitEditExit(Sender);
277     PostTimeEditExit(Sender);
278    
279     if not CheckFolder then begin
280     FClose := False;
281     Exit;
282     end;
283     SaveSetting;
284     SettingApply;
285 h677 1.3 SetAbonpropertys;
286 hi_ 1.1 end;
287    
288     procedure TOptionDialog.ApplyButtonClick(Sender: TObject);
289     begin
290     RecvBufferSizeExit(Sender);
291     ReadPortEditExit(Sender);
292     WritePortEditExit(Sender);
293     AddressHistoryCountEditExit(Sender);
294     PreviewWaitEditExit(Sender);
295     PostTimeEditExit(Sender);
296    
297     if not CheckFolder then begin
298     FClose := False;
299     Exit;
300     end;
301     SaveSetting;
302     SettingApply;
303 h677 1.3 SetAbonpropertys;
304 hi_ 1.1 FClose := False;
305     end;
306    
307     //function TOptionDialog.GetFontText(Font: TFont; Text: string): string;
308     //begin
309     // result := Format(Text, [Font.Name, Font.Size]);
310     //end;
311    
312     function TOptionDialog.GetMemoText(font: TFont; text: string): string;
313     var
314     s: string;
315     begin
316     s := '';
317     if font <> nil then
318     s := Format(FONT_TEXT, [Font.Name, Font.Size]) + #13#10;
319     Result := s + text;
320     end;
321    
322     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
323     procedure TOptionDialog.CabinetFontBottonClick(Sender: TObject);
324     begin
325     FontDialog.Options := [fdAnsiOnly, fdEffects];
326     FontDialog.Font.Assign(CabinetMemo.Font);
327     if FontDialog.Execute then begin
328     FontDialog.Font.Style := FontDialog.Font.Style - [fsUnderline] - [fsStrikeout];
329     CabinetMemo.Font.Assign(FontDialog.Font);
330     CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
331     CabinetMemo.Font.Charset := SHIFTJIS_CHARSET;
332     end;
333     end;
334    
335     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
336     procedure TOptionDialog.CabinetColorBottonClick(Sender: TObject);
337     begin
338     ColorDialog.Color := CabinetMemo.Color;
339     if ColorDialog.Execute then begin
340     CabinetMemo.Color := ColorDialog.Color;
341     end;
342     end;
343    
344     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
345     procedure TOptionDialog.CabinetDefaultButtonClick(Sender: TObject);
346     begin
347     CabinetMemo.Font.Name := DEFAULT_FONT_NAME;
348     CabinetMemo.Font.Size := DEFAULT_FONT_SIZE;
349     CabinetMemo.Font.Color := clWindowText;
350     CabinetMemo.Font.Style := [];
351     CabinetMemo.Color := clWindow;
352     CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
353     end;
354    
355     //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
356     procedure TOptionDialog.ListFontBottonClick(Sender: TObject);
357     begin
358     FontDialog.Options := [fdAnsiOnly, fdEffects];
359     FontDialog.Font.Assign(ListMemo.Font);
360     if FontDialog.Execute then begin
361     ListMemo.Font.Assign(FontDialog.Font);
362     ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD);
363     ListMemo.Font.Charset := SHIFTJIS_CHARSET;
364     end;
365     end;
366    
367     //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
368     procedure TOptionDialog.ListColorBottonClick(Sender: TObject);
369     begin
370     ColorDialog.Color := ListMemo.Color;
371     if ColorDialog.Execute then begin
372     ListMemo.Color := ColorDialog.Color;
373     end;
374     end;
375    
376     //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
377     procedure TOptionDialog.ListDefaultBottonClick(Sender: TObject);
378     begin
379     ListMemo.Font.Name := DEFAULT_FONT_NAME;
380     ListMemo.Font.Size := DEFAULT_FONT_SIZE;
381     ListMemo.Font.Color := clWindowText;
382     ListMemo.Font.Style := [];
383     ListMemo.Color := clWindow;
384     ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD);
385     end;
386    
387     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
388     procedure TOptionDialog.HintFontButtonClick(Sender: TObject);
389     begin
390     FontDialog.Options := [fdAnsiOnly, fdEffects];
391     FontDialog.Font.Assign(HintMemo.Font);
392     if FontDialog.Execute then begin
393     HintMemo.Font.Assign(FontDialog.Font);
394     HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP);
395     HintMemo.Font.Charset := SHIFTJIS_CHARSET;
396     end;
397     end;
398    
399     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
400     procedure TOptionDialog.HintBackButtonClick(Sender: TObject);
401     begin
402     ColorDialog.Color := HintMemo.Color;
403     if ColorDialog.Execute then begin
404     HintMemo.Color := ColorDialog.Color;
405     end;
406     end;
407    
408     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
409     procedure TOptionDialog.HintDefaultButtonClick(Sender: TObject);
410     begin
411     HintMemo.Font.Name := DEFAULT_FONT_NAME;
412     HintMemo.Font.Size := DEFAULT_FONT_SIZE;
413     HintMemo.Font.Color := clWindowText;
414     HintMemo.Font.Style := [];
415     HintMemo.Color := clInfoBk;
416     HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP);
417     end;
418    
419     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
420     procedure TOptionDialog.BruwserTabFontButtonClick(Sender: TObject);
421     begin
422     FontDialog.Options := [fdAnsiOnly];
423     FontDialog.Font.Assign(BrowserTabMemo.Font);
424     if FontDialog.Execute then begin
425     BrowserTabMemo.Font.Assign(FontDialog.Font);
426     BrowserTabMemo.Text := GetMemoText(FontDialog.Font, MEMO_BROWSERTAB);
427     BrowserTabMemo.Font.Charset := SHIFTJIS_CHARSET;
428     end;
429     end;
430    
431     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
432     procedure TOptionDialog.BrowserTabDefaultButtonClick(Sender: TObject);
433     begin
434     BrowserTabMemo.Font.Name := DEFAULT_TABFONT_NAME;
435     BrowserTabMemo.Font.Size := DEFAULT_TABFONT_SIZE;
436     BrowserTabMemo.Font.Color := clWindowText;
437     BrowserTabMemo.Font.Style := [];
438     BrowserTabMemo.Color := clBtnFace;
439     BrowserTabMemo.Text := GetMemoText(BrowserTabMemo.Font, MEMO_BROWSERTAB);
440     end;
441    
442     //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
443     procedure TOptionDialog.EditorFontBottonClick(Sender: TObject);
444     begin
445     FontDialog.Options := [fdAnsiOnly, fdEffects];
446     FontDialog.Font.Assign(EditorMemo.Font);
447     if FontDialog.Execute then begin
448     EditorMemo.Font.Assign(FontDialog.Font);
449     EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR);
450     EditorMemo.Font.Charset := SHIFTJIS_CHARSET;
451     end;
452     end;
453    
454     //鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
455     procedure TOptionDialog.EditorColorBottonClick(Sender: TObject);
456     begin
457     ColorDialog.Color := EditorMemo.Font.Color;
458     if ColorDialog.Execute then begin
459     EditorMemo.Color := ColorDialog.Color;
460     end;
461     end;
462    
463     //鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
464     procedure TOptionDialog.EditorDefaultBottonClick(Sender: TObject);
465     begin
466     EditorMemo.Font.Name := DEFAULT_FONT_NAME;
467     EditorMemo.Font.Size := DEFAULT_FONT_SIZE;
468     EditorMemo.Font.Color := clWindowText;
469     EditorMemo.Font.Style := [];
470     EditorMemo.Color := clWindow;
471     EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR);
472     end;
473    
474     procedure TOptionDialog.SetValue;
475     var
476     i: Integer;
477     Item: TListItem;
478     s: string;
479 yoffy 1.2 idx: Integer;
480 hi_ 1.1 FileList: TStringList;
481     begin
482     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
483     RecvBufferSize.Text := IntToStr(Gikosys.Setting.RecvBufferSize);
484     //HTTP1.1鐃?鐃?
485     ProtocolCheckBox.Checked := GikoSys.Setting.Protocol;
486     //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申HTTP1.1鐃?鐃?
487     ProxyProtocolCheckBox.Checked := Gikosys.Setting.ProxyProtocol;
488    
489     //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?
490     ReadProxyCheck.Checked := GikoSys.Setting.ReadProxy;
491     ReadProxyCheckClick(nil);
492     ReadProxyAddressEdit.Text := GikoSys.Setting.ReadProxyAddress;
493     ReadPortEdit.Text := IntToStr(GikoSys.Setting.ReadProxyPort);
494     ReadProxyUserIDEdit.Text := GikoSys.Setting.ReadProxyUserID;
495     ReadProxyPasswordEdit.Text := GikoSys.Setting.ReadProxyPassword;
496     //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?
497     WriteProxyCheck.Checked := GikoSys.Setting.WriteProxy;
498     WriteProxyCheckClick(nil);
499     WriteProxyAddressEdit.Text := GikoSys.Setting.WriteProxyAddress;
500     WritePortEdit.Text := IntToStr(GikoSys.Setting.WriteProxyPort);
501     WriteProxyUserIDEdit.Text := GikoSys.Setting.WriteProxyUserID;
502     WriteProxyPasswordEdit.Text := GikoSys.Setting.WriteProxyPassword;
503     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
504     CabinetMemo.Font.Name := GikoSys.Setting.CabinetFontName;
505     CabinetMemo.Font.Size := GikoSys.Setting.CabinetFontSize;
506     CabinetMemo.Font.Color := GikoSys.Setting.CabinetFontColor;
507     CabinetMemo.Color := GikoSys.Setting.CabinetBackColor;
508     //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?
509     ListMemo.Font.Name := GikoSys.Setting.ListFontName;
510     ListMemo.Font.Size := GikoSys.Setting.ListFontSize;
511     ListMemo.Font.Color := GikoSys.Setting.ListFontColor;
512     ListMemo.Color := GikoSys.Setting.ListBackColor;
513     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
514     HintMemo.Font.Name := GikoSys.Setting.HintFontName;
515     HintMemo.Font.Size := GikoSys.Setting.HintFontSize;
516     HintMemo.Font.Color := GikoSys.Setting.HintFontColor;
517     HintMemo.Color := GikoSys.Setting.HintBackColor;
518     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
519     BrowserTabMemo.Font.Name := GikoSys.Setting.BrowserTabFontName;
520     BrowserTabMemo.Font.Size := GikoSys.Setting.BrowserTabFontSize;
521     BrowserTabMemo.Font.Style := [];
522     if GikoSys.Setting.BrowserTabFontBold then
523     BrowserTabMemo.Font.Style := BrowserTabMemo.Font.Style + [fsBold];
524     if GikoSys.Setting.BrowserTabFontItalic then
525     BrowserTabMemo.Font.Style := BrowserTabMemo.Font.Style + [fsItalic];
526     //鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?
527     EditorMemo.Font.Name := GikoSys.Setting.EditorFontName;
528     EditorMemo.Font.Size := GikoSys.Setting.EditorFontSize;
529     EditorMemo.Font.Color := GikoSys.Setting.EditorFontColor;
530     EditorMemo.Color := GikoSys.Setting.EditorBackColor;
531     //CSS鐃?鐃緒申
532     CSSCheckBox.Checked := GikoSys.Setting.UseCSS;
533     //
534     //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
535     FileList := TStringList.Create;
536     try
537 yoffy 1.2 GikoSys.GetFileList(GikoSys.GetStyleSheetDir, '*.css', FileList, True, True);
538    
539     Idx := Length(GikoSys.GetStyleSheetDir);
540     for i := 0 to FileList.Count - 1 do
541     FileList[i] := Copy(FileList[i], Idx + 1, Length(FileList[i]));
542 hi_ 1.1 FileList.Sort;
543     for i := 0 to FileList.Count - 1 do begin
544 yoffy 1.2 //s := ExtractFileName(FileList[i]);
545     if LowerCase(FileList[i]) = 'default.css' then
546 hi_ 1.1 Item := CSSListView.Items.Insert(0)
547     else
548     Item := CSSListView.Items.Add;
549 yoffy 1.2 Item.Caption := ChangeFileExt(FileList[i], '');
550     if LowerCase(FileList[i]) = LowerCase(GikoSys.Setting.CSSFileName) then
551 hi_ 1.1 Item.Selected := True;
552     end;
553     finally
554     FileList.Free;
555     end;
556     if (CSSListView.ItemIndex = -1) and (CSSListView.Items.Count > 0) then
557     CSSListView.Items[0].Selected := True;
558    
559     //Mail鐃緒申鐃?鐃緒申
560     ShowMailCheckBox.Checked := GikoSys.Setting.ShowMail;
561     //鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?
562     TabAddRadioGroup.ItemIndex := Ord(GikoSys.Setting.BrowserTabAppend);
563     //鐃緒申鐃?鐃?URL
564     BoardURL2chEdit.Text := GikoSys.Setting.BoardURL2ch;
565     //鐃?鐃緒申
566     UserIDEdit.Text := GikoSys.Setting.UserID;
567     PasswordEdit.Text := GikoSys.Setting.Password;
568     AutoLoginCheckBox.Checked := GikoSys.Setting.AutoLogin;
569     //鐃緒申鐃?鐃?鐃?鐃緒申鐃?
570     if GikoSys.Setting.NewLogFolder = '' then
571     LogFolderEdit.Text := GikoSys.Setting.LogFolder
572     else
573     LogFolderEdit.Text := GikoSys.Setting.NewLogFolder;
574     //鐃?鐃?鐃緒申鐃?
575     for i := 0 to GikoSys.Setting.GetSoundCount - 1 do begin
576     Item := SoundListView.Items.Add;
577     Item.Caption := GikoSys.Setting.SoundViewName[i];
578     if FileExists(GikoSys.Setting.SoundFileName[i]) then
579     Item.SubItems.Add(GikoSys.Setting.SoundFileName[i])
580     else
581     Item.SubItems.Add('');
582     end;
583     //URL鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
584     URLAppCheckBox.Checked := GikoSys.Setting.URLApp;
585     URLAppCheckBoxClick(nil);
586     AppFolderEdit.Text := GikoSys.Setting.URLAppFile;
587    
588     //mailto鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
589     OpenMailerCheckBox.Checked := GikoSys.Setting.OpenMailer;
590    
591     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?
592     LogDeleteMessageCheckBox.Checked := GikoSys.Setting.DeleteMsg;
593    
594     //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
595     case GikoSys.Setting.PopupPosition of
596     gppRightTop: PopupPositionRadioGroup.ItemIndex := 0;
597     gppRight: PopupPositionRadioGroup.ItemIndex := 1;
598     gppRightBottom: PopupPositionRadioGroup.ItemIndex := 2;
599     gppTop: PopupPositionRadioGroup.ItemIndex := 3;
600     gppCenter: PopupPositionRadioGroup.ItemIndex := 4;
601     gppBottom: PopupPositionRadioGroup.ItemIndex := 5;
602     gppLeftTop: PopupPositionRadioGroup.ItemIndex := 6;
603     gppLeft: PopupPositionRadioGroup.ItemIndex := 7;
604     gppLeftBottom: PopupPositionRadioGroup.ItemIndex := 8;
605     end;
606    
607     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
608     UnActivePopupCheckBox.Checked := GikoSys.Setting.UnActivePopup;
609 yoffy 1.2 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
610     ResPopupBoldCheckBox.Checked := GikoSys.Setting.ResPopupHeaderBold;
611 hi_ 1.1
612     //鐃?鐃?鐃緒申鐃?鐃?鐃?
613     URLDisplayCheckBox.Checked := GikoSys.Setting.URLDisplay;
614     TabStopAddressBarCheckBox.Checked := GikoSys.Setting.AddressBarTabStop;
615     LinkAddCheckBox.Checked := GikoSys.Setting.LinkAddAddressBar;
616     AddressHistoryCountEdit.Text := IntToStr(GikoSys.Setting.AddressHistoryCount);
617    
618     //HTML鐃?鐃緒申鐃?鐃緒申鐃?
619     PreviewVisibleCheckBox.Checked := GikoSys.Setting.PreviewVisible;
620     PreviewWaitEdit.Text := IntToStr(GikoSys.Setting.PreviewWait);
621     PreviewSizeComboBox.ItemIndex := 2;
622     case GikoSys.Setting.PreviewSize of
623     gpsXLarge: PreviewSizeComboBox.ItemIndex := 4;
624     gpsLarge: PreviewSizeComboBox.ItemIndex := 3;
625     gpsMedium: PreviewSizeComboBox.ItemIndex := 2;
626     gpsSmall: PreviewSizeComboBox.ItemIndex := 1;
627     gpsXSmall: PreviewSizeComboBox.ItemIndex := 0;
628     end;
629    
630     //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
631     ThreadListIconCheckBox.Checked := GikoSys.Setting.ListIconVisible;
632    
633     //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
634     PostTimeCheckBox.Checked := GikoSys.Setting.UseMachineTime;
635     PostTimeEdit.Text := IntToStr(GikoSys.Setting.TimeAdjustSec);
636     if GikoSys.Setting.TimeAdjust then
637     PutPostTimeRadioButton.Checked := True
638     else
639     BackPostTimeRadioButton.Checked := True;
640 h677 1.3 //鐃緒申鐃緒申鐃?鐃緒申
641     RloCheckBox.Checked := GikoSys.Setting.AbonDeleterlo;
642     ReplaceulCheckBox.Checked := GikoSys.Setting.AbonReplaceul;
643     PopUpAbonCheckBox.Checked := GikoSys.Setting.PopUpAbon;
644    
645 hi_ 1.1 end;
646    
647     procedure TOptionDialog.SaveSetting;
648     var
649     i: Integer;
650     // Item: TListItem;
651     begin
652     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
653     Gikosys.Setting.RecvBufferSize := StrToInt(RecvBufferSize.Text);
654     //HTTP1.1鐃?鐃?
655     GikoSys.Setting.Protocol := ProtocolCheckBox.Checked;
656     //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申HTTP1.1鐃?鐃?
657     Gikosys.Setting.ProxyProtocol := ProxyProtocolCheckBox.Checked;
658    
659     GikoSys.Setting.ReadProxy := ReadProxyCheck.Checked;
660     GikoSys.Setting.ReadProxyAddress := ReadProxyAddressEdit.Text;
661     GikoSys.Setting.ReadProxyPort := StrToInt(ReadPortEdit.Text);
662     GikoSys.Setting.ReadProxyUserID := ReadProxyUserIDEdit.Text;
663     GikoSys.Setting.ReadProxyPassword := ReadProxyPasswordEdit.Text;
664    
665     GikoSys.Setting.WriteProxy := WriteProxyCheck.Checked;
666     GikoSys.Setting.WriteProxyAddress := WriteProxyAddressEdit.Text;
667     GikoSys.Setting.WriteProxyPort := StrToInt(WritePortEdit.Text);
668     GikoSys.Setting.WriteProxyUserID := WriteProxyUserIDEdit.Text;
669     GikoSys.Setting.WriteProxyPassword := WriteProxyPasswordEdit.Text;
670    
671     GikoSys.Setting.CabinetFontName := CabinetMemo.Font.Name;
672     GikoSys.Setting.CabinetFontSize := CabinetMemo.Font.Size;
673     GikoSys.Setting.CabinetFontColor := CabinetMemo.Font.Color;
674     GikoSys.Setting.CabinetBackColor := CabinetMemo.Color;
675    
676     GikoSys.Setting.ListFontName := ListMemo.Font.Name;
677     GikoSys.Setting.ListFontSize := ListMemo.Font.Size;
678     GikoSys.Setting.ListFontColor := ListMemo.Font.Color;
679     GikoSys.Setting.ListBackColor := ListMemo.Color;
680    
681     GikoSys.Setting.HintFontName := HintMemo.Font.Name;
682     GikoSys.Setting.HintFontSize := HintMemo.Font.Size;
683     GikoSys.Setting.HintFontColor := HintMemo.Font.Color;
684     GikoSys.Setting.HintBackColor := HintMemo.Color;
685    
686     GikoSys.Setting.BrowserTabFontName := BrowserTabMemo.Font.Name;
687     GikoSys.Setting.BrowserTabFontSize := BrowserTabMemo.Font.Size;
688    
689     GikoSys.Setting.EditorFontName := EditorMemo.Font.Name;
690     GikoSys.Setting.EditorFontSize := EditorMemo.Font.Size;
691     GikoSys.Setting.EditorFontColor := EditorMemo.Font.Color;
692     GikoSys.Setting.EditorBackColor := EditorMemo.Color;
693     //CSS鐃?鐃緒申
694     GikoSys.Setting.UseCSS := CSSCheckBox.Checked;
695     //CSS鐃?鐃?鐃?鐃緒申鐃緒申
696     GikoSys.Setting.CSSFileName := 'default.css';
697     if CSSListView.Items.Count > 0 then begin
698     try
699     GikoSys.Setting.CSSFileName := CSSListView.Items[CSSListView.ItemIndex].Caption + '.css'
700     except
701     end;
702     end;
703    
704     //Mail鐃緒申鐃?鐃緒申
705     GikoSys.Setting.ShowMail := ShowMailCheckBox.Checked;
706    
707     GikoSys.Setting.BrowserTabAppend := TGikoTabAppend(TabAddRadioGroup.ItemIndex);
708    
709     GikoSys.Setting.BoardURL2ch := BoardURL2chEdit.Text;
710    
711     GikoSys.Setting.UserID := UserIDEdit.Text;
712     GikoSys.Setting.Password := PasswordEdit.Text;
713     GikoSys.Setting.AutoLogin := AutoLoginCheckBox.Checked;
714    
715     GikoSys.Setting.URLApp := URLAppCheckBox.Checked;
716     GikoSys.Setting.URLAppFile := AppFolderEdit.Text;
717    
718     GikoSys.Setting.OpenMailer := OpenMailerCheckBox.Checked;
719     GikoSys.Setting.DeleteMsg := LogDeleteMessageCheckBox.Checked;
720    
721     //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
722     case PopupPositionRadioGroup.ItemIndex of
723     0: GikoSys.Setting.PopupPosition := gppRightTop;
724     1: GikoSys.Setting.PopupPosition := gppRight;
725     2: GikoSys.Setting.PopupPosition := gppRightBottom;
726     3: GikoSys.Setting.PopupPosition := gppTop;
727     4: GikoSys.Setting.PopupPosition := gppCenter;
728     5: GikoSys.Setting.PopupPosition := gppBottom;
729     6: GikoSys.Setting.PopupPosition := gppLeftTop;
730     7: GikoSys.Setting.PopupPosition := gppLeft;
731     8: GikoSys.Setting.PopupPosition := gppLeftBottom;
732     end;
733    
734     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
735     GikoSys.Setting.UnActivePopup := UnActivePopupCheckBox.Checked;
736 yoffy 1.2 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
737     GikoSys.Setting.ResPopupHeaderBold := ResPopupBoldCheckBox.Checked;
738 hi_ 1.1
739     //鐃?鐃?鐃緒申鐃?鐃?鐃?
740     GikoSys.Setting.URLDisplay := URLDisplayCheckBox.Checked;
741     GikoSys.Setting.AddressBarTabStop := TabStopAddressBarCheckBox.Checked;
742     GikoSys.Setting.LinkAddAddressBar := LinkAddCheckBox.Checked;
743     if GikoSys.IsNumeric(AddressHistoryCountEdit.Text) then
744     GikoSys.Setting.AddressHistoryCount := StrToInt(AddressHistoryCountEdit.Text)
745     else
746     GikoSys.Setting.AddressHistoryCount := 100;
747    
748     //HTML鐃?鐃緒申鐃?鐃緒申鐃?
749     GikoSys.Setting.PreviewVisible := PreviewVisibleCheckBox.Checked;
750     if GikoSys.IsNumeric(PreviewWaitEdit.Text) then
751     GikoSys.Setting.PreviewWait := StrToInt(PreviewWaitEdit.Text)
752     else
753     GikoSys.Setting.PreviewWait := 500;
754     case PreviewSizeComboBox.ItemIndex of
755     0: GikoSys.Setting.PreviewSize := gpsXSmall;
756     1: GikoSys.Setting.PreviewSize := gpsSmall;
757     2: GikoSys.Setting.PreviewSize := gpsMedium;
758     3: GikoSys.Setting.PreviewSize := gpsLarge;
759     4: GikoSys.Setting.PreviewSize := gpsXLarge;
760     end;
761    
762     //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
763     GikoSys.Setting.ListIconVisible := ThreadListIconCheckBox.Checked;
764    
765     //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
766     GikoSys.Setting.UseMachineTime := PostTimeCheckBox.Checked;
767     if GikoSys.IsNumeric(PostTimeEdit.Text) then
768     GikoSys.Setting.TimeAdjustSec := StrToInt(PostTimeEdit.Text)
769     else
770     GikoSys.Setting.TimeAdjustSec := 0;
771     GikoSys.Setting.TimeAdjust := PutPostTimeRadioButton.Checked;
772    
773    
774     GikoSys.Setting.WriteSystemSettingFile;
775     // GikoForm.SetBrowserTabState;
776    
777     if LogFolderEdit.Text <> '' then begin
778     GikoSys.Setting.NewLogFolder := LogFolderEdit.Text;
779     GikoSys.Setting.WriteFolderSettingFile;
780     end;
781    
782     for i := 0 to SoundListView.Items.Count - 1 do begin
783     if FileExists(SoundListView.Items[i].SubItems[0]) then
784     GikoSys.Setting.SoundFileName[i] := SoundListView.Items[i].SubItems[0]
785     else
786     GikoSys.Setting.SoundFileName[i] := '';
787     end;
788 h677 1.3
789     //鐃緒申鐃緒申鐃?鐃緒申
790     GikoSys.Setting.AbonDeleterlo := RloCheckBox.Checked;
791     GikoSys.Setting.AbonReplaceul := ReplaceulCheckBox.Checked;
792     GikoSys.Setting.PopUpAbon := PopUpAbonCheckBox.Checked;
793 hi_ 1.1 end;
794    
795     procedure TOptionDialog.SettingApply;
796     var
797     i: Integer;
798     begin
799     GikoForm.TreeView.Items.BeginUpdate;
800     GikoForm.ListView.Items.BeginUpdate;
801     try
802     GikoForm.TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
803     GikoForm.TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
804     GikoForm.TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
805     GikoForm.TreeView.Color := GikoSys.Setting.CabinetBackColor;
806    
807     GikoForm.ListView.Font.Name := GikoSys.Setting.ListFontName;
808     GikoForm.ListView.Font.Size := GikoSys.Setting.ListFontSize;
809     GikoForm.ListView.Font.Color := GikoSys.Setting.ListFontColor;
810     GikoForm.ListView.Color := GikoSys.Setting.ListBackColor;
811    
812     GikoForm.BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
813     GikoForm.BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
814     // GikoForm.BrowserTab.Height := (GikoSys.Setting.BrowserTabFontSize * 2) + 1;
815     // GikoForm.BrowserBottomPanel.Height := GikoForm.BrowserTab.Height;
816    
817     for i := 0 to Screen.CustomFormCount - 1 do begin
818     if TObject(Screen.CustomForms[i]) is TEditorForm then begin
819     TEditorForm(Screen.CustomForms[i]).SetFont;
820     end;
821     end;
822    
823     finally
824     GikoForm.TreeView.Items.EndUpdate;
825     GikoForm.ListView.Items.EndUpdate;
826     end;
827    
828     //鐃?鐃?鐃緒申鐃?鐃?鐃?
829     for i := GikoForm.AddressComboBox.Items.Count - 1 downto 0 do begin
830     if GikoSys.Setting.AddressHistoryCount >= GikoForm.AddressComboBox.Items.Count then
831     Break;
832     GikoForm.AddressComboBox.Items.Delete(i);
833     end;
834     GikoForm.AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
835     end;
836    
837     procedure TOptionDialog.ReadProxyCheckClick(Sender: TObject);
838     begin
839     ReadProxyAddressEdit.Enabled := ReadProxyCheck.Checked;
840     ReadPortEdit.Enabled := ReadProxyCheck.Checked;
841     ReadProxyUserIDEdit.Enabled := ReadProxyCheck.Checked;
842     ReadProxyPasswordEdit.Enabled := ReadProxyCheck.Checked;
843    
844     ReadAddressLabel.Enabled := ReadProxyCheck.Checked;
845     ReadPortLabel.Enabled := ReadProxyCheck.Checked;
846     ReadUserIDLabel.Enabled := ReadProxyCheck.Checked;
847     ReadPasswordLabel.Enabled := ReadProxyCheck.Checked;
848     end;
849    
850     procedure TOptionDialog.ReadPortEditExit(Sender: TObject);
851     begin
852     if not GikoSys.IsNumeric(ReadPortEdit.Text) then
853     ReadPortEdit.Text := '0';
854     end;
855    
856     procedure TOptionDialog.LogFolderButtonClick(Sender: TObject);
857     var
858     Root: WideString;
859     Dir: string;
860     begin
861     Root := '';
862     if SelectDirectory('鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申', Root, Dir) then begin
863     LogFolderEdit.Text := Dir;
864     end;
865     end;
866    
867     function TOptionDialog.CheckFolder: Boolean;
868     begin
869     if Trim(LogFolderEdit.Text) = '' then
870     LogFolderEdit.Text := ExtractFilePath(Application.ExeName) + 'Log';
871    
872     if DirectoryExists(LogFolderEdit.Text) then begin
873     Result := True;
874     end else begin
875     if MsgBox(Handle, '鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?', '鐃?鐃?鐃?鐃?', MB_YESNO or MB_ICONQUESTION) = IDYES then begin
876     //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
877     try
878     GikoSys.ForceDirectoriesEx(LogFolderEdit.Text);
879     Result := True
880     except
881     MsgBox(Handle, '鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?', '鐃?鐃緒申鐃?', MB_OK or MB_ICONSTOP);
882     OptionTab.ActivePage := FolderSheet;
883     LogFolderEdit.SetFocus;
884     Result := False;
885     end;
886     end else
887     Result := False;
888     end;
889     end;
890    
891     procedure TOptionDialog.FormClose(Sender: TObject; var Action: TCloseAction);
892     begin
893     if not FClose then
894     Action := caNone;
895     FClose := True;
896     end;
897    
898     procedure TOptionDialog.SoundReferButtonClick(Sender: TObject);
899     begin
900     OpenDialog.Filter := '鐃?鐃?鐃緒申鐃? (*.wav)|*.wav|鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申 (*.*)|*.*';
901     sndPlaySound(nil, SND_ASYNC);
902     if OpenDialog.Execute then begin
903     SoundFileEdit.Text := OpenDialog.FileName;
904     end;
905     end;
906    
907     procedure TOptionDialog.SoundPlayButtonClick(Sender: TObject);
908     begin
909     if not FileExists(SoundFileEdit.Text) then begin
910     MsgBox(Handle, '鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申', '鐃?鐃緒申鐃?', MB_ICONSTOP or MB_OK);
911     SoundFileEdit.Text := '';
912     Exit;
913     end;
914     if not sndPlaySound(PChar(SoundFileEdit.Text), SND_ASYNC or SND_NOSTOP) then begin
915     sndPlaySound(nil, SND_ASYNC);
916     end;
917     end;
918    
919     procedure TOptionDialog.SoundListViewChanging(Sender: TObject;
920     Item: TListItem; Change: TItemChange; var AllowChange: Boolean);
921     begin
922     if Item.SubItems.Count > 0 then
923     SoundFileEdit.Text := Item.SubItems[0];
924     end;
925    
926     procedure TOptionDialog.SoundFileEditChange(Sender: TObject);
927     var
928     Item: TListItem;
929     begin
930     sndPlaySound(nil, SND_ASYNC);
931     Item := SoundListView.Selected;
932     if Item = nil then Exit;
933    
934     if FileExists(SoundFileEdit.Text) then
935     Item.SubItems[0] := SoundFileEdit.Text;
936     if Trim(SoundFileEdit.Text) = '' then
937     Item.SubItems[0] := '';
938     end;
939    
940     procedure TOptionDialog.OptionTabChange(Sender: TObject);
941     begin
942     sndPlaySound(nil, SND_ASYNC);
943     end;
944    
945     procedure TOptionDialog.AppFolderButtonClick(Sender: TObject);
946     begin
947     OpenDialog.Filter := '鐃緒申鐃?鐃?鐃?鐃?鐃緒申 (*.exe)|*.exe|鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申 (*.*)|*.*';
948     if OpenDialog.Execute then
949     AppFolderEdit.Text := OpenDialog.FileName;
950     end;
951    
952     procedure TOptionDialog.WriteProxyCheckClick(Sender: TObject);
953     begin
954     WriteProxyAddressEdit.Enabled := WriteProxyCheck.Checked;
955     WritePortEdit.Enabled := WriteProxyCheck.Checked;
956     WriteProxyUserIDEdit.Enabled := WriteProxyCheck.Checked;
957     WriteProxyPasswordEdit.Enabled := WriteProxyCheck.Checked;
958    
959     WriteAddressLabel.Enabled := WriteProxyCheck.Checked;
960     WritePortLabel.Enabled := WriteProxyCheck.Checked;
961     WriteUserIDLabel.Enabled := WriteProxyCheck.Checked;
962     WritePasswordLabel.Enabled := WriteProxyCheck.Checked;
963     end;
964    
965     procedure TOptionDialog.WritePortEditExit(Sender: TObject);
966     begin
967     if not GikoSys.IsNumeric(WritePortEdit.Text) then
968     WritePortEdit.Text := '0';
969     end;
970    
971     procedure TOptionDialog.Tora3URLLabelClick(Sender: TObject);
972     begin
973     GikoSys.OpenBrowser(URL_TORA3, gbtAuto);
974     end;
975    
976     procedure TOptionDialog.HotKeyEnter(Sender: TObject);
977     begin
978     OkBotton.Default := False;
979     CancelBotton.Cancel := False;
980     end;
981    
982     procedure TOptionDialog.HotKeyExit(Sender: TObject);
983     begin
984     OkBotton.Default := True;
985     CancelBotton.Cancel := True;
986     end;
987    
988     procedure TOptionDialog.URLAppCheckBoxClick(Sender: TObject);
989     begin
990     AppFolderLabel.Enabled := URLAppCheckBox.Checked;
991     AppFolderEdit.Enabled := URLAppCheckBox.Checked;
992     AppFolderButton.Enabled := URLAppCheckBox.Checked;
993     end;
994    
995     procedure TOptionDialog.AddressHistoryCountEditExit(Sender: TObject);
996     begin
997     if not GikoSys.IsNumeric(AddressHistoryCountEdit.Text) then
998     AddressHistoryCountEdit.Text := '100';
999     end;
1000    
1001     procedure TOptionDialog.PreviewWaitEditExit(Sender: TObject);
1002     begin
1003     if not GikoSys.IsNumeric(PreviewWaitEdit.Text) then
1004     PreviewWaitEdit.Text := '500';
1005     if StrToInt(PreviewWaitEdit.Text) < 500 then
1006     PreviewWaitEdit.Text := '500';
1007     if StrToInt(PreviewWaitEdit.Text) > 9999 then
1008     PreviewWaitEdit.Text := '9999';
1009     end;
1010    
1011     procedure TOptionDialog.RecvBufferSizeExit(Sender: TObject);
1012     begin
1013     if not GikoSys.IsNumeric(RecvBufferSize.Text) then
1014     RecvBufferSize.Text := '4096';
1015     if StrToInt(RecvBufferSize.Text) < 256 then
1016     RecvBufferSize.Text := '4096';
1017     end;
1018    
1019     procedure TOptionDialog.CSSCheckBoxClick(Sender: TObject);
1020     begin
1021     CSSListLabel.Enabled := CSSCheckBox.Checked;
1022     CSSListView.Enabled := CSSCheckBox.Checked;
1023     end;
1024    
1025     procedure TOptionDialog.PostTimeEditExit(Sender: TObject);
1026     begin
1027     if not GikoSys.IsNumeric(PostTimeEdit.Text) then
1028     PostTimeEdit.Text := '0';
1029     end;
1030    
1031     procedure TOptionDialog.PostTimeCheckBoxClick(Sender: TObject);
1032     begin
1033     PostTimeLabel.Enabled := PostTimeCheckBox.Checked;
1034     PostTimeEdit.Enabled := PostTimeCheckBox.Checked;
1035     PutPostTimeRadioButton.Enabled := PostTimeCheckBox.Checked;
1036     BackPostTimeRadioButton.Enabled := PostTimeCheckBox.Checked;
1037     end;
1038 h677 1.3 procedure TOptionDialog.SetAbonpropertys;
1039     begin
1040     //鐃緒申鐃緒申鐃?鐃緒申
1041     GikoSys.FAbon.Deleterlo := RloCheckBox.Checked;
1042     GikoSys.FAbon.Replaceul := ReplaceulCheckBox.Checked;
1043     GikoSys.FAbon.AbonPopupRes := PopUpAbonCheckBox.Checked;
1044 hi_ 1.1
1045 h677 1.3 end;
1046 hi_ 1.1 end.
1047    

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26