Develop and Download Open Source Software

Browse CVS Repository

Annotation of /gikonavigoeson/gikonavi/Giko.pas

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


Revision 1.688 - (hide annotations) (download) (as text)
Sun Apr 5 14:24:40 2009 UTC (15 years ago) by h677
Branch: MAIN
CVS Tags: v1_60_0_788, v1_60_0_789
Changes since 1.687: +8 -11 lines
File MIME type: text/x-pascal
close #15974
タブの自動復元の際の処理を見直して、ブラウザの描画待ちでメッセージを処理
せずに単純スリープするようにした。

1 hi_ 1.1 unit Giko;
2    
3     interface
4    
5     uses
6     Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7 h677 1.536 OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils,
8 hi_ 1.4 {$IF Defined(DELPRO) }
9 yoffy 1.138 SHDocVw,
10 hi_ 1.4 MSHTML,
11     {$ELSE}
12     SHDocVw_TLB,
13     MSHTML_TLB,
14     {$IFEND}
15 h677 1.183 IdHTTP, ActiveX, ActnList, ImgList,
16 h677 1.536 ToolWin, Buttons, IdComponent, UrlMon, Tabs, IdGlobal, StrUtils,
17     CommCtrl, Dialogs, GikoSystem, Setting, BoardGroup, ThreadControl, ItemDownload,
18     Editor, RoundData, GikoPanel, Favorite, HTMLDocumentEvent,
19 h677 1.636 {HintWindow,} GikoCoolBar, GikoListView, Search, ExternalBoardManager,
20 h677 1.536 ExternalBoardPlugInMain, StdActns, Variants, ExtActns,IdTCPConnection,
21 h677 1.614 IdBaseComponent, IdTCPClient, AppEvnts, BrowserRecord, MoveHistoryItem,
22 h677 1.663 ShellAPI,Preview, HistoryList, ResPopupBrowser, ExtPreviewDatamodule;
23 hi_ 1.1
24 h677 1.567 const
25     NGWORDNAME_PANEL = 3;
26     THREADSIZE_PANEL = 2;
27 h677 1.647 USER_RESPOPUPCLEAR = WM_USER + 2005; ///< wParam : TWebBrowser
28    
29 hi_ 1.1 type
30 h677 1.623
31 yoffy 1.258 TToolBarSettingSenderType = (tssNone, tssMain, tssList, tssBrowser);
32 yoffy 1.280 TMinimizeType = (mtNone, mtMinimizing, mtMinimized);
33 yoffy 1.424 TResizeType = (rtNone, rtResizing);
34 hi_ 1.1
35 h677 1.551 // TBrowserRecord = class;
36 h677 1.299
37 hi_ 1.1 TGikoForm = class(TForm)
38     StatusBar: TStatusBar;
39     MainPanel: TPanel;
40     ClientPanel: TPanel;
41     TreeSplitter: TSplitter;
42     CabinetPanel: TPanel;
43     TreeView: TTreeView;
44     ThreadMainPanel: TPanel;
45     ListSplitter: TSplitter;
46     ViewPanel: TPanel;
47 yoffy 1.51 ListView: TGikoListView;
48 hi_ 1.1 ThreadPanel: TPanel;
49     MessagePanel: TPanel;
50     MessageBar: TPanel;
51     MessageHideButton: TSpeedButton;
52     MessageListView: TListView;
53     MessageSplitter: TSplitter;
54     Panel3: TPanel;
55 h677 1.541 CabinetCloseSpeedButton: TSpeedButton;
56 hi_ 1.1 ToolBar1: TToolBar;
57     CabinetSelectToolButton: TToolButton;
58     HistoryToolBar: TToolBar;
59 h677 1.541 HistoryShowToolButton: TToolButton;
60     HistoryAllClearToolButton: TToolButton;
61 hi_ 1.1 ItemIcon16: TImageList;
62     ItemIcon32: TImageList;
63 yoffy 1.2 HotToobarImageList: TImageList;
64 hi_ 1.1 ItemImageList: TImageList;
65     MainMenu: TMainMenu;
66     FileMenu: TMenuItem;
67 yoffy 1.51 DeleteMenu: TMenuItem;
68     ExitMenu: TMenuItem;
69     KidokuMenu: TMenuItem;
70 hi_ 1.1 MidokuMenu: TMenuItem;
71 yoffy 1.51 AllSelectMenu: TMenuItem;
72 hi_ 1.1 ViewMenu: TMenuItem;
73     StdToolBarMenu: TMenuItem;
74     CabinetMenu: TMenuItem;
75 yoffy 1.51 H1: TMenuItem;
76 hi_ 1.1 N4: TMenuItem;
77 yoffy 1.51 CabinetVisibleMenu: TMenuItem;
78 hi_ 1.1 MessageMenu: TMenuItem;
79     StatusBarMenu: TMenuItem;
80     MMSep03: TMenuItem;
81 yoffy 1.51 LargeIconMenu: TMenuItem;
82 hi_ 1.1 SmallIconMenu: TMenuItem;
83     ListMenu: TMenuItem;
84     DetailMenu: TMenuItem;
85 yoffy 1.51 ToolMenu: TMenuItem;
86 hi_ 1.1 Find1: TMenuItem;
87     RoundMenu: TMenuItem;
88     MMSep04: TMenuItem;
89     OptionMenu: TMenuItem;
90     HelpMenu: TMenuItem;
91     G1: TMenuItem;
92 yoffy 1.51 N1: TMenuItem;
93 hi_ 1.1 AboutMenu: TMenuItem;
94     BrowserPopupMenu: TPopupMenu;
95 yoffy 1.51 ShowThreadMenu: TMenuItem;
96 yoffy 1.2 ShowBoardMenu: TMenuItem;
97 hi_ 1.1 ListIconPopupMenu: TPopupMenu;
98     LargeIconPMenu: TMenuItem;
99     SmallIconPMenu: TMenuItem;
100     ListPMenu: TMenuItem;
101 yoffy 1.51 DetailPMenu: TMenuItem;
102 hi_ 1.1 ClosePopupMenu: TPopupMenu;
103 yoffy 1.51 CloseMenu: TMenuItem;
104 hi_ 1.1 U1: TMenuItem;
105     N3: TMenuItem;
106     B1: TMenuItem;
107     S1: TMenuItem;
108     N2: TMenuItem;
109     A1: TMenuItem;
110     L1: TMenuItem;
111     N5: TMenuItem;
112     S2: TMenuItem;
113     ListPopupMenu: TPopupMenu;
114 yoffy 1.51 ListRoundPMenu: TMenuItem;
115 hi_ 1.1 ListReservPMenu: TMenuItem;
116     LPMSep01: TMenuItem;
117 yoffy 1.51 ItemRoundPMenu: TMenuItem;
118 hi_ 1.1 LPMSep02: TMenuItem;
119 yoffy 1.2 KidokuPMenu: TMenuItem;
120 hi_ 1.1 MidokuPMenu: TMenuItem;
121     AllSelectPMenu: TMenuItem;
122     UrlCopyPMenu: TMenuItem;
123     LPMSep05: TMenuItem;
124     DeletePMenu: TMenuItem;
125     LPMSep06: TMenuItem;
126     ViewPMenu: TMenuItem;
127     LargeIconLPMenu: TMenuItem;
128     SmallIconLPMenu: TMenuItem;
129     ListLPMenu: TMenuItem;
130     DetailLPMenu: TMenuItem;
131     T1: TMenuItem;
132     B2: TMenuItem;
133     N8: TMenuItem;
134 yoffy 1.51 URLC1: TMenuItem;
135     N9: TMenuItem;
136 hi_ 1.1 N10: TMenuItem;
137     G2: TMenuItem;
138     N11: TMenuItem;
139     T3: TMenuItem;
140     L2: TMenuItem;
141     N12: TMenuItem;
142     K1: TMenuItem;
143     N13: TMenuItem;
144     N14: TMenuItem;
145     R1: TMenuItem;
146     A2: TMenuItem;
147     N15: TMenuItem;
148     KokoPopupMenu: TPopupMenu;
149     KokomadePMenu: TMenuItem;
150 yoffy 1.2 AllPMenu: TMenuItem;
151 hi_ 1.1 MenuItem1: TMenuItem;
152     MenuItem2: TMenuItem;
153     BrowserTabPopupMenu: TPopupMenu;
154 yoffy 1.51 Close1: TMenuItem;
155 hi_ 1.1 A3: TMenuItem;
156 yoffy 1.51 N16: TMenuItem;
157 hi_ 1.1 A4: TMenuItem;
158     TreePopupMenu: TPopupMenu;
159     TreeSelectThreadPupupMenu: TMenuItem;
160 yoffy 1.51 TreeSelectBoardPupupMenu: TMenuItem;
161 hi_ 1.1 TPMSep01: TMenuItem;
162     TreeSelectURLPupupMenu: TMenuItem;
163     T2: TMenuItem;
164 yoffy 1.2 L3: TMenuItem;
165 hi_ 1.1 B3: TMenuItem;
166     BrowserBottomPanel: TGikoPanel;
167     CabinetSelectPopupMenu: TPopupMenu;
168     H2: TMenuItem;
169 yoffy 1.51 ItemReservPMenu: TMenuItem;
170     RoundNamePopupMenu: TPopupMenu;
171 yoffy 1.2 N7: TMenuItem;
172 hi_ 1.1 B4: TMenuItem;
173     L4: TMenuItem;
174     K2: TMenuItem;
175 yoffy 1.51 A5: TMenuItem;
176 hi_ 1.1 A6: TMenuItem;
177 yoffy 1.51 C1: TMenuItem;
178     V1: TMenuItem;
179     N19: TMenuItem;
180 hi_ 1.1 D1: TMenuItem;
181 yoffy 1.51 D2: TMenuItem;
182     MessageImageList: TImageList;
183     ProgressBar: TProgressBar;
184     URL1: TMenuItem;
185 hi_ 1.1 NameUrlCopyPMenu: TMenuItem;
186     URLC2: TMenuItem;
187 yoffy 1.51 URLN1: TMenuItem;
188     N21: TMenuItem;
189     URLC3: TMenuItem;
190 yoffy 1.2 URLN2: TMenuItem;
191 yoffy 1.51 N23: TMenuItem;
192 yoffy 1.2 ListCoolBar: TGikoCoolBar;
193 hi_ 1.1 ListToolBar: TToolBar;
194 yoffy 1.2 BrowserCoolBar: TGikoCoolBar;
195 hi_ 1.1 BrowserToolBar: TToolBar;
196     ListNameToolBar: TToolBar;
197 yoffy 1.51 ListNameLabel: TLabel;
198 hi_ 1.1 FolderImage: TImage;
199     BrowserNameToolBar: TToolBar;
200     ItemBoardImage: TImage;
201     BrowserBoardNameLabel: TLabel;
202 yoffy 1.51 ItemImage: TImage;
203     BrowserNameLabel: TLabel;
204     D3: TMenuItem;
205     N25: TMenuItem;
206 hi_ 1.1 N26: TMenuItem;
207     D4: TMenuItem;
208     S3: TMenuItem;
209 yoffy 1.51 R2: TMenuItem;
210     TreeSelectNameURLPupupMenu: TMenuItem;
211     N27: TMenuItem;
212 hi_ 1.1 H3: TMenuItem;
213 yoffy 1.51 I1: TMenuItem;
214     BrowserTabToolBar: TToolBar;
215     BrowserTab: TTabControl;
216     About1: TMenuItem;
217     N28: TMenuItem;
218     S4: TMenuItem;
219 yoffy 1.2 N29: TMenuItem;
220     N30: TMenuItem;
221     N31: TMenuItem;
222 hi_ 1.1 L5: TMenuItem;
223 yoffy 1.51 L6: TMenuItem;
224 hi_ 1.1 A7: TMenuItem;
225 yoffy 1.51 R3: TMenuItem;
226 hi_ 1.1 FavoriteMenu: TMenuItem;
227 yoffy 1.51 N32: TMenuItem;
228 hi_ 1.1 BoardFavoriteAddMenu: TMenuItem;
229     ThreadFavoriteAddMenu: TMenuItem;
230 yoffy 1.2 N33: TMenuItem;
231 hi_ 1.1 TreeSelectFavoriteAddPupupMenu: TMenuItem;
232     FavoriteTreeView: TTreeView;
233 yoffy 1.51 StateIconImageList: TImageList;
234     TopPanel: TPanel;
235     TopRightPanel: TPanel;
236     AnimePanel: TPanel;
237 hi_ 1.1 Animate: TAnimate;
238     TopCoolPanel: TPanel;
239 yoffy 1.51 MainCoolBar: TGikoCoolBar;
240     MenuToolBar: TToolBar;
241     StdToolBar: TToolBar;
242     AddressToolBar: TToolBar;
243     AddressComboBox: TComboBox;
244     MoveToToolButton: TToolButton;
245     AddressImageList: TImageList;
246     AddressToolBarMenu: TMenuItem;
247     T4: TMenuItem;
248     Show1: TMenuItem;
249     N34: TMenuItem;
250 hi_ 1.1 T5: TMenuItem;
251     B5: TMenuItem;
252 yoffy 1.51 N35: TMenuItem;
253     A8: TMenuItem;
254     U2: TMenuItem;
255 hi_ 1.1 F1: TMenuItem;
256     PreviewTimer: TTimer;
257 yoffy 1.51 MonazillaWebPageAction1: TMenuItem;
258     N36: TMenuItem;
259     H4: TMenuItem;
260     K3: TMenuItem;
261     L7: TMenuItem;
262     N37: TMenuItem;
263     A9: TMenuItem;
264 yoffy 1.2 ChevronPopupMenu: TPopupMenu;
265     N2N1: TMenuItem;
266 hi_ 1.1 N38: TMenuItem;
267 yoffy 1.2 F2: TMenuItem;
268 yoffy 1.51 LinkToolBar: TToolBar;
269     a10: TMenuItem;
270     N39: TMenuItem;
271     T6: TMenuItem;
272     N40: TMenuItem;
273 yoffy 1.2 LinkBarPopupMenu: TPopupMenu;
274 yoffy 1.51 T7: TMenuItem;
275     ThreadPopupMenu: TPopupMenu;
276     MenuItem4: TMenuItem;
277     MenuItem5: TMenuItem;
278     MenuItem6: TMenuItem;
279 yoffy 1.2 T8: TMenuItem;
280 yoffy 1.51 URLN3: TMenuItem;
281 yoffy 1.2 SelectItemNameCopyAction1: TMenuItem;
282 yoffy 1.51 B6: TMenuItem;
283     T9: TMenuItem;
284 h677 1.629 NameCopyPMenu: TMenuItem;
285 yoffy 1.51 SelectComboBox: TComboBox;
286     MainCoolBarPopupMenu: TPopupMenu;
287     StdToolBarVisiblePMenu: TMenuItem;
288     AddressToolBarVisiblePMenu: TMenuItem;
289     LinkToolBarVisiblePMenu: TMenuItem;
290     NG1: TMenuItem;
291     NG2: TMenuItem;
292     N43: TMenuItem;
293     N44: TMenuItem;
294     L9: TMenuItem;
295     I3: TMenuItem;
296     N45: TMenuItem;
297     B9: TMenuItem;
298     R5: TMenuItem;
299     T12: TMenuItem;
300     Show3: TMenuItem;
301     N46: TMenuItem;
302     T13: TMenuItem;
303     B10: TMenuItem;
304     N47: TMenuItem;
305     A12: TMenuItem;
306     U4: TMenuItem;
307     F4: TMenuItem;
308     N48: TMenuItem;
309     T14: TMenuItem;
310     N50: TMenuItem;
311     A11: TMenuItem;
312     S5: TMenuItem;
313     Reload: TMenuItem;
314     GoBack: TMenuItem;
315     GoFoward: TMenuItem;
316     IndividualAbon1: TMenuItem;
317     N41: TMenuItem;
318     IndividualAbon2: TMenuItem;
319 h677 1.543 AntiIndivAbonMenuItem: TMenuItem;
320 yoffy 1.51 AntiIndividualAbon: TMenuItem;
321     N49: TMenuItem;
322     N51: TMenuItem;
323     N52: TMenuItem;
324     SearchBoardName: TMenuItem;
325 yoffy 1.205 TreeSelectLogDeleteSeparator: TMenuItem;
326 yoffy 1.100 N54: TMenuItem;
327     A13: TMenuItem;
328     FavoriteTreePopupMenu: TPopupMenu;
329     FavoriteTreeRenamePopupMenu: TMenuItem;
330     FavoriteTreeNewFolderPopupMenu: TMenuItem;
331     N56: TMenuItem;
332     FavoriteTreeDeletePopupMenu: TMenuItem;
333     FavoriteToolBar: TToolBar;
334 h677 1.541 FavoriteAddToolButton: TToolButton;
335     FavoriteArrangeToolButton: TToolButton;
336 yoffy 1.100 FavoriteTreeBrowseFolderPopupMenu: TMenuItem;
337     N57: TMenuItem;
338     FavoriteTreeReloadPopupMenu: TMenuItem;
339     N58: TMenuItem;
340     FavoriteTreeURLCopyPopupMenu: TMenuItem;
341     FavoriteTreeNameCopyPopupMenu: TMenuItem;
342     FavoriteTreeLogDeletePopupMenu: TMenuItem;
343     N59: TMenuItem;
344     FavoriteTreeNameURLCopyPopupMenu: TMenuItem;
345     N60: TMenuItem;
346 yoffy 1.107 ExportFavoriteFileAction1: TMenuItem;
347 yoffy 1.142 N6: TMenuItem;
348     N17: TMenuItem;
349 h677 1.174 N18: TMenuItem;
350     N20: TMenuItem;
351 h677 1.532 N24: TMenuItem;
352 h677 1.174 N62: TMenuItem;
353 h677 1.514 N61: TMenuItem;
354 h677 1.478 N63: TMenuItem;
355 h677 1.183 N64: TMenuItem;
356 h677 1.187 dummy1: TMenuItem;
357 h677 1.570 TreeSelectLogDeletePopupMenu: TMenuItem;
358 h677 1.485 N65: TMenuItem;
359 yoffy 1.209 BBSSelectPopupMenu: TPopupMenu;
360 yoffy 1.218 PlugInMenu: TMenuItem;
361 h677 1.542 TreeSelectNamePupupMenu: TMenuItem;
362 h677 1.299 BrowserPanel: TPanel;
363 h677 1.514 SelectTimer: TTimer;
364 h677 1.340 SelectThreadSave: TMenuItem;
365 h677 1.342 N55: TMenuItem;
366 h677 1.343 N66: TMenuItem;
367     dat1: TMenuItem;
368 yoffy 1.397 OpenLogFolder: TMenuItem;
369 h677 1.346 Browser: TWebBrowser;
370 genyakun 1.353 TabSave: TMenuItem;
371 h677 1.407 TabOpen: TMenuItem;
372 yoffy 1.375 ResRangePopupMenu: TPopupMenu;
373 h677 1.547 ResRangeHundPMenuItem: TMenuItem;
374     ResRangeKokoPMenuItem: TMenuItem;
375     ResRangeNewPMenuItem: TMenuItem;
376     ResRangeAllPMenuItem: TMenuItem;
377 h677 1.570 BrowsBoradHeadAction1: TMenuItem;
378 yoffy 1.390 ThreadRangePopupMenu: TPopupMenu;
379     A15: TMenuItem;
380     L8: TMenuItem;
381 h677 1.542 N67: TMenuItem;
382 yoffy 1.390 N68: TMenuItem;
383     S6: TMenuItem;
384     N69: TMenuItem;
385 h677 1.547 ResRangeSelectPMenuItem: TMenuItem;
386 yoffy 1.415 ListColumnPopupMenu: TPopupMenu;
387 h677 1.485 N70: TMenuItem;
388     ID1: TMenuItem;
389     ID2: TMenuItem;
390     N53: TMenuItem;
391     ID3: TMenuItem;
392     N71: TMenuItem;
393 h677 1.487 N72: TMenuItem;
394     N73: TMenuItem;
395 h677 1.517 SelectComboBoxPanel: TPanel;
396     SelectComboBoxSplitter: TImage;
397     N74: TMenuItem;
398 genyakun 1.527 WikiFAQ: TMenuItem;
399 h677 1.542 GikoApplicationEvents: TApplicationEvents;
400 h677 1.583 N22: TMenuItem;
401     N42: TMenuItem;
402 h677 1.592 DAT2: TMenuItem;
403     N75: TMenuItem;
404     DAT3: TMenuItem;
405     N76: TMenuItem;
406 h677 1.600 FavoriteTreeItemNameCopyPopupMenu: TMenuItem;
407 h677 1.615 N77: TMenuItem;
408     N78: TMenuItem;
409 h677 1.618 SaveThreadFile: TMenuItem;
410     N79: TMenuItem;
411     HTML1: TMenuItem;
412     DAT4: TMenuItem;
413 h677 1.625 N80: TMenuItem;
414 h677 1.635 SameBoardThreadItem: TMenuItem;
415     N81: TMenuItem;
416 h677 1.641 N82: TMenuItem;
417     IDNG1: TMenuItem;
418     IDNG2: TMenuItem;
419 h677 1.643 ResPopupClearTimer: TTimer;
420 h677 1.670 TaskTrayPopupMenu: TPopupMenu;
421     Exit1: TMenuItem;
422 h677 1.676 N83: TMenuItem;
423 h677 1.679 UpdateGikonaviAction1: TMenuItem;
424     N84: TMenuItem;
425 yoffy 1.251 procedure FormCreate(Sender: TObject);
426 hi_ 1.1 procedure FormDestroy(Sender: TObject);
427 eggcake 1.682 procedure SaveSettingAll();
428 hi_ 1.1 procedure BrowserStatusTextChange(Sender: TObject;
429     const Text: WideString);
430     procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
431     procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
432     var AllowChange: Boolean);
433     procedure ListViewKeyDown(Sender: TObject; var Key: Word;
434     Shift: TShiftState);
435     procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
436     procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
437     Button: TToolButton; State: TCustomDrawState;
438     var DefaultDraw: Boolean);
439     procedure BrowserBeforeNavigate2(Sender: TObject;
440     const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
441     Headers: OleVariant; var Cancel: WordBool);
442     procedure TreeViewCustomDraw(Sender: TCustomTreeView;
443     const ARect: TRect; var DefaultDraw: Boolean);
444     procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
445     Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
446     procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
447     procedure ListViewCustomDraw(Sender: TCustomListView;
448     const ARect: TRect; var DefaultDraw: Boolean);
449     procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
450     Shift: TShiftState; X, Y: Integer);
451     procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
452     procedure MessageListViewResize(Sender: TObject);
453 yoffy 1.138 procedure CabinetVisible( isVisible : Boolean );
454 hi_ 1.1 procedure FormResize(Sender: TObject);
455     procedure ListPopupMenuPopup(Sender: TObject);
456     procedure TreePopupMenuPopup(Sender: TObject);
457     procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
458     var Cancel: WordBool);
459     procedure ListSplitterMoved(Sender: TObject);
460     procedure BrowserTabChange(Sender: TObject);
461     procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
462     Shift: TShiftState; X, Y: Integer);
463     procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
464     State: TDragState; var Accept: Boolean);
465     procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
466     procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
467     Y: Integer);
468     procedure BrowserDocumentComplete(Sender: TObject;
469     const pDisp: IDispatch; var URL: OleVariant);
470     procedure RoundNamePopupMenuPopup(Sender: TObject);
471     procedure FormShow(Sender: TObject);
472     procedure BrowserTabToolBarResize(Sender: TObject);
473     procedure FavoriteMenuClick(Sender: TObject);
474 yoffy 1.2 procedure MainCoolBarResize(Sender: TObject);
475     procedure AddressToolBarResize(Sender: TObject);
476 hi_ 1.1 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
477     Shift: TShiftState);
478 yoffy 1.2 procedure BrowserEnter(Sender: TObject);
479 hi_ 1.1 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
480     procedure PreviewTimerTimer(Sender: TObject);
481     procedure MessageHideButtonClick(Sender: TObject);
482 h677 1.541 procedure HistoryAllClearToolButtonClick(Sender: TObject);
483 yoffy 1.2 procedure MainCoolBarBandInfo(Sender: TObject;
484     var BandInfo: PReBarBandInfoA);
485     procedure MainCoolBarChevronClick(Sender: TObject;
486 yoffy 1.51 RebarChevron: PNMRebarChevron);
487     procedure ListCoolBarBandInfo(Sender: TObject;
488     var BandInfo: PReBarBandInfoA);
489     procedure ListCoolBarChevronClick(Sender: TObject;
490     RebarChevron: PNMRebarChevron);
491     procedure BrowserCoolBarBandInfo(Sender: TObject;
492     var BandInfo: PReBarBandInfoA);
493 yoffy 1.2 procedure BrowserCoolBarChevronClick(Sender: TObject;
494 yoffy 1.51 RebarChevron: PNMRebarChevron);
495     procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
496     procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
497     WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
498     procedure SelectComboBoxChange(Sender: TObject);
499     procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
500     Shift: TShiftState);
501     procedure SelectComboBoxExit(Sender: TObject);
502     procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
503     Shift: TShiftState; X, Y: Integer);
504     procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
505     Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
506     procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
507     Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
508     procedure StatusBarResize(Sender: TObject);
509     procedure SelectComboBoxEnter(Sender: TObject);
510 yoffy 1.100 procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
511     Y: Integer);
512 yoffy 1.71 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
513 yoffy 1.100 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
514     var S: String);
515     procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
516     Shift: TShiftState);
517     procedure FavoriteTreePopupMenuPopup(Sender: TObject);
518     procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
519     procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
520     Shift: TShiftState; X, Y: Integer);
521     procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
522     State: TDragState; var Accept: Boolean);
523     procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
524     Y: Integer);
525 yoffy 1.142 procedure FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
526 h677 1.174 procedure BrowserTabContextPopup(Sender: TObject; MousePos: TPoint;
527     var Handled: Boolean);
528 h677 1.187 procedure BrowserTabPopupMenuPopup(Sender: TObject);
529 yoffy 1.216 procedure BrowserTabResize(Sender: TObject);
530 yoffy 1.236 procedure TreeViewKeyDown(Sender: TObject; var Key: Word;
531     Shift: TShiftState);
532 yoffy 1.246 procedure FavoriteTreeViewMouseDown(Sender: TObject;
533 yoffy 1.248 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
534 yoffy 1.250 procedure MessagePanelResize(Sender: TObject);
535 yoffy 1.276 procedure OnResized;
536 h677 1.539 procedure SelectTimerTimer(Sender: TObject);
537 yoffy 1.425 procedure ListViewColumnRightClick(Sender: TObject;
538 yoffy 1.415 Column: TListColumn; Point: TPoint);
539 h677 1.478 procedure ListViewCustomDrawItem(Sender: TCustomListView;
540 h677 1.463 Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
541     procedure FormActivate(Sender: TObject);
542 h677 1.472 procedure BrowserPanelResize(Sender: TObject);
543 h677 1.482 procedure MenuToolBarResize(Sender: TObject);
544     procedure ListToolBarResize(Sender: TObject);
545     procedure BrowserToolBarResize(Sender: TObject);
546 h677 1.539 procedure KokoPopupMenuPopup(Sender: TObject);
547 h677 1.517 procedure ListViewKeyUp(Sender: TObject; var Key: Word;
548     Shift: TShiftState);
549     procedure FavoriteTreeViewEditing(Sender: TObject; Node: TTreeNode;
550     var AllowEdit: Boolean);
551 h677 1.570 procedure CabinetCloseSpeedButtonClick(Sender: TObject);
552 h677 1.541 procedure FavoriteArrangeToolButtonClick(Sender: TObject);
553 h677 1.542 procedure GikoApplicationEventsMessage(var Msg: tagMSG;
554     var Handled: Boolean);
555     procedure GikoApplicationEventsDeactivate(Sender: TObject);
556     procedure GikoApplicationEventsException(Sender: TObject; E: Exception);
557 h677 1.574 procedure TreeViewMouseDown(Sender: TObject; Button: TMouseButton;
558 h677 1.548 Shift: TShiftState; X, Y: Integer);
559 h677 1.585 procedure GetResURLMenuClick(Sender: TObject);
560 h677 1.612 procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
561     var Handled: Boolean);
562 h677 1.643 procedure ResPopupClearTimerTimer(Sender: TObject);
563 hi_ 1.1 private
564     { Private 鐃緒申鐃緒申 }
565     FEnabledCloseButton: Boolean;
566     FClickNode: TTreeNode;
567     FHttpState: Boolean;
568 h677 1.619 FPreviewBrowser: TPreviewBrowser;
569 hi_ 1.1 FPreviewURL: string;
570     FBrowserSizeHeight: Integer;
571     FBrowserSizeWidth: Integer;
572     FTabHintIndex: Integer;
573     FListStyle: TViewStyle; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
574     FItemNoVisible: Boolean; //鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?
575     FViewType: TGikoViewType; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?
576 h677 1.517 FActiveList: TObject;
577 h677 1.299 FActiveContent: TBrowserRecord; //
578 yoffy 1.133 FActiveBBS : TBBS;
579 h677 1.623 FHistoryList: THistoryList; //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
580 hi_ 1.1 FTreeType: TGikoTreeType;
581     FWorkCount: Integer;
582     FNameCookie: string;
583     FMailCookie: string;
584     FDownloadTitle: string; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
585     FDownloadMax: Integer; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?
586     FEvent: THTMLDocumentEventSink;//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?
587 yoffy 1.51 IsDraggingSelectComboBox : Boolean;
588     DraggingSelectComboBoxPosition : TPoint;
589 yoffy 1.54 FSearchDialog: TSearchDialog;
590 yoffy 1.100 FDropSpaceNode: TTreeNode;
591 yoffy 1.424 FDragTime : Cardinal; ///< 鐃緒申鐃緒申鐃?鐃緒申D&D鐃?
592     FDragButton : TToolButton; ///< 鐃緒申鐃緒申鐃?鐃緒申D&D鐃?鐃緒申Drag鐃緒申鐃緒申鐃緒申Button鐃緒申鐃緒申
593     FDragWFirst : Boolean; ///< WebTab鐃緒申D&D鐃?
594     FListViewBackGroundColor : TColor; ///< ListView鐃緒申BackGroundColor
595     FUseOddResOddColor : Boolean; ///< 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申
596     FOddColor : TColor; ///< 鐃緒申鐃緒申鐃?
597     FSelectResWord : string; ///< 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?
598     FIsIgnoreResize : TResizeType; ///< 鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
599     FIsMinimize : TMinimizeType; ///< 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
600     FOldFormWidth : Integer; ///< 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
601     FToolBarSettingSender : TToolBarSettingSenderType; ///< 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?
602     FMouseDownPos : TPoint; ///< 鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
603 h677 1.303 FBrowsers: TList;
604 yoffy 1.424 FResRangeMenuSelect : Longint; ///< ResRangeButton 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 (鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申 ResRange 鐃緒申鐃緒申)
605 h677 1.423 FStartUp : Boolean;
606 yoffy 1.427 FIsHandledWheel : Boolean; ///< 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 WM_MOUSEWHEEL 鐃緒申鐃緒申鐃緒申鐃緒申
607 h677 1.517 DiffComp: Boolean; //Add by Genyakun 鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申True鐃緒申鐃緒申鐃緒申
608 h677 1.548 FOrigenCaption: String; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
609 h677 1.581 FPreviewBrowserRect: TRect; ///< 鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
610     FActionListGroupIndexes: array of Integer; ///<GikoDM鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申GroupIndex鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
611 h677 1.636 FResPopupBrowser: TResPopupBrowser;
612 h677 1.683 FUpdateExePath: string; ///鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?
613     FUpdateExeArgs: string; ///鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
614 hi_ 1.1 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
615     procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
616 q9_ 1.233 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
617 hi_ 1.1 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
618     procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
619     procedure ListClick;
620 h677 1.295 procedure ListDoubleClick(Shift: TShiftState);
621 hi_ 1.1 function Hook(var Message: TMessage): Boolean;
622     procedure AddRoundNameMenu(MenuItem: TMenuItem);
623     procedure SetMenuFont;
624     procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
625 yoffy 1.62 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
626     procedure FavoriteClick(Sender: TObject); overload;
627 yoffy 1.100 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
628 hi_ 1.1 function OnDocumentContextMenu(Sender: TObject): WordBool;
629     function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
630 yoffy 1.2 procedure MenuBarChevronMenu;
631     procedure LinkBarChevronMenu;
632     procedure ToolBarChevronMenu(ToolBar: TToolBar);
633 yoffy 1.100 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
634     procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
635     procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
636     procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
637 yoffy 1.85 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
638 yoffy 1.72 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
639 yoffy 1.100 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
640     procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
641 yoffy 1.72 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
642 yoffy 1.236 //
643 yoffy 1.143 procedure SetListViewBackGroundColor(value: TColor);
644 yoffy 1.123 procedure BBSMenuItemOnClick( Sender : TObject );
645 yoffy 1.424 /// CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
646 yoffy 1.216 procedure SaveCoolBarSettings;
647 h677 1.471 procedure SaveMainCoolBarSettings;
648     procedure SaveBoardCoolBarSettings;
649     procedure SaveBrowserCoolBarSettings;
650 yoffy 1.424 /// CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
651 yoffy 1.216 procedure LoadCoolBarSettings;
652 yoffy 1.424 /// 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
653 yoffy 1.276 procedure OnMinimize;
654 yoffy 1.424 /// 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
655 yoffy 1.248 procedure OnMinimized;
656 yoffy 1.424 /// TreeView 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
657 yoffy 1.236 procedure TreeClick( Node : TTreeNode );
658 yoffy 1.424 /// TreeView 鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
659 yoffy 1.236 procedure TreeDoubleClick( Node : TTreeNode );
660 yoffy 1.424 /// 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃? BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
661 yoffy 1.289 procedure SetBBSMenu;
662 yoffy 1.415 /// ListColumnPopupMenu 鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?
663     procedure ListColumnPopupMenuOnClick( Sender : TObject );
664 yoffy 1.480 //! 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
665     procedure SetSelectWord( const text : string );
666 h677 1.535 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
667     function GetScreenCursor(): TCursor;
668     //鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
669     procedure SetScreenCursor(Cursor : TCursor);
670 h677 1.550 //! 鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
671     procedure CreateControlThread();
672     //! 鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
673     procedure CreateBrowsers(count: Integer);
674 h677 1.581 //! ActionList鐃緒申GroupIndex鐃緒申鐃緒申鐃緒申
675     procedure GetGroupIndex(ActionList: TActionList);
676     //! ActionList鐃緒申GroupIndex鐃緒申鐃緒申鐃緒申
677     procedure SetGroupIndex(ActionList: TActionList);
678 h677 1.585 //! 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申(鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 or 鐃?鐃緒申JUMP鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申DL鐃緒申鐃緒申)
679     procedure OpenThreadItem(Thread: TThreadItem; URL: String);
680 h677 1.596 //! ListView鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
681     procedure RefreshListView(Thread: TThreadItem);
682 h677 1.598 //! 鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
683     procedure ClearThreadRengeAction;
684 h677 1.614 //! 鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申
685     procedure UnStoredTaskTray;
686 h677 1.617 //! 鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申
687     procedure ShowEditors(nCmdShow: Integer);
688 h677 1.632 //! 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申Browser鐃緒申鐃?鐃緒申
689     procedure ReleaseOldestBrowser;
690 h677 1.635 //! 鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
691     procedure AddMenuSameBoardThread;
692     //! 鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?
693     procedure SameBoardThreadSubItemOnClick(Sender: TObject);
694 h677 1.636 //! 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
695     procedure CreateResPopupBrowser;
696 h677 1.639 //! 鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?
697     function isValidFile(FileName: String) : boolean;
698 h677 1.654 //! ListView鐃緒申D&D鐃緒申鐃緒申鐃緒申鐃緒申
699     procedure AcceptDropFiles(var Msg: TMsg);
700 h677 1.678 //! 鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
701     procedure UpdateListView();
702 h677 1.680 //! 鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
703     procedure LoadIcon();
704 hi_ 1.1 protected
705     procedure CreateParams(var Params: TCreateParams); override;
706 yoffy 1.2 procedure WndProc(var Message: TMessage); override;
707 hi_ 1.1 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
708     procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
709     procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
710     public
711     { Public 鐃緒申鐃緒申 }
712 h677 1.533 LastRoundTime: TDateTime;
713     BrowserNullTab: TBrowserRecord;
714 hi_ 1.1 FControlThread: TThreadControl;
715 h677 1.614 FIconData : TNotifyIconData;
716 yoffy 1.444 procedure MoveToURL(const inURL: string);
717 h677 1.530 function InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True) : TBrowserRecord;
718 hi_ 1.1 procedure ReloadBBS;
719     function GetHttpState: Boolean;
720     procedure SetEnabledCloseButton(Enabled: Boolean);
721     function GetTreeNode(Data: TObject): TTreeNode;
722     procedure ListViewAllSelect;
723     property ListStyle: TViewStyle read FListStyle write FListStyle;
724     property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
725     property ViewType: TGikoViewType read FViewType write FViewType;
726     property NameCookie: string read FNameCookie write FNameCookie;
727     property MailCookie: string read FMailCookie write FMailCookie;
728 h677 1.532 property ClickNode: TTreeNode read FClickNode write FClickNode;
729 h677 1.538 property TreeType: TGikoTreeType read FTreeType write FTreeType;
730 h677 1.534 property ActiveContent: TBrowserRecord read FActiveContent write FActiveContent;
731 h677 1.533 property ResRangeMenuSelect: Longint read FResRangeMenuSelect write FResRangeMenuSelect;
732 h677 1.534 property SelectResWord : string read FSelectResWord write FSelectResWord;
733     property BrowserSizeWidth: Integer read FBrowserSizeWidth write FBrowserSizeWidth;
734     property BrowserSizeHeight: Integer read FBrowserSizeHeight write FBrowserSizeHeight;
735     property SearchDialog: TSearchDialog read FSearchDialog write FSearchDialog;
736     property ToolBarSettingSender : TToolBarSettingSenderType
737     read FToolBarSettingSender write FToolBarSettingSender;
738 h677 1.535 property ScreenCursor : TCursor read GetScreenCursor write SetScreenCursor;
739 h677 1.538 property ActiveBBS : TBBS read FActiveBBS write FActiveBBS;
740     property WorkCount: Integer read FWorkCount write FWorkCount;
741 h677 1.683 property UpdateExePath: string read FUpdateExePath write FUpdateExePath;
742     property UpdateExeArgs: string read FUpdateExeArgs write FUpdateExeArgs;
743    
744 h677 1.299 procedure SetContent(inThread: TBrowserRecord);
745 h677 1.636 function GetActiveContent(popup :Boolean = false): TThreadItem;
746 hi_ 1.1 function GetActiveList: TObject;
747 h677 1.533
748 hi_ 1.1 procedure SetListViewType(AViewType: TGikoViewType); overload;
749     procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
750     procedure PlaySound(SoundEventName: string);
751 yoffy 1.123 procedure ShowBBSTree( inBBS : TBBS );
752 yoffy 1.248 procedure ShowBBSTreeOld( inBBS : TBBS );
753 hi_ 1.1 procedure ShowHistoryTree;
754     procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
755     procedure SetBrowserTabState;
756 yoffy 1.2 procedure SetToolBarPopup;
757 yoffy 1.100 procedure ShowFavoriteAddDialog( Item : TObject );
758 h677 1.433 procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
759     procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
760 yoffy 1.143 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
761     property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
762     property OddColor : TColor read FOddColor write FOddColor;
763 yoffy 1.209 function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
764 yoffy 1.218 procedure OnPlugInMenuItem( Sender : TObject );
765 h677 1.433 procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
766     /// ListView 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申 KuroutSetting鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
767     procedure ActiveListColumnSave;
768     procedure SetActiveList(Obj: TObject);
769     property ActiveList: TObject read GetActiveList write SetActiveList;
770 h677 1.482 /// CoolBar 鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
771     procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
772 h677 1.485 //鐃緒申鐃緒申ID鐃緒申鐃緒申鐃緒申鐃?鐃緒申
773     procedure IndividualAbonID(Atype : Integer);
774     //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申
775     procedure IndividualAbon(Atag, Atype : Integer);
776 h677 1.641 //鐃緒申鐃緒申ID鐃緒申NG鐃緒申鐃?鐃?鐃緒申鐃?鐃?
777     procedure AddIDtoNGWord(invisible : boolean);
778 h677 1.532 //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申 true:鐃?鐃緒申鐃緒申鐃?鐃? false:鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
779     procedure RepaintAllTabsBrowser();
780     //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
781     procedure SetLinkBar;
782     procedure FavoriteBrowseFolder( node: TTreeNode );
783     //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?
784     procedure DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
785     //鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?
786     procedure DownloadList(Board: TBoard; ForceDownload: Boolean = False);
787     //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
788     procedure DeleteHistory( threadItem: TThreadItem );
789 h677 1.606 //鐃?鐃?鐃緒申鐃緒申鐃緒申 鐃?鐃緒申鐃?鐃?鐃?鐃緒申
790 h677 1.532 procedure DeleteTab(ThreadItem: TThreadItem); overload;
791 h677 1.606 //鐃?鐃?鐃緒申鐃緒申鐃緒申 鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
792 h677 1.533 procedure DeleteTab(BrowserRecord: TBrowserRecord); overload;
793 h677 1.606 // 鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?
794     procedure DeleteTab(index, selectIndex: Integer); overload;
795 h677 1.533 //鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
796 h677 1.634 procedure BrowserMovement(const AName: string); overload;
797     //鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
798     procedure BrowserMovement(scroll: Integer); overload;
799 h677 1.533 //Application鐃緒申MainForm鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
800 h677 1.534 function GetMainForm(): TComponent;
801 h677 1.533 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
802 h677 1.534 //! 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?
803     procedure OnGestureStart(Sender: TObject);
804     //! 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申
805     procedure OnGestureMove(Sender: TObject);
806     //! 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
807     procedure OnGestureEnd(Sender: TObject);
808     /// 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
809     procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
810 h677 1.535 //ListView鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
811     procedure SelectListItem(List: TList);
812 h677 1.536 //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
813     procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
814 h677 1.537 //
815     procedure ModifySelectList;
816     //
817     procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload;
818     //
819     procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
820 h677 1.538 //
821 h677 1.537 procedure SetSelectRoundName(Sender: TObject);
822 h677 1.538 //
823     function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
824     //
825     function WebBrowserClick(Sender: TObject): WordBool;
826 h677 1.550 //! 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
827     procedure SetSelectComboBox();
828 h677 1.585
829 h677 1.614 //! 鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
830     procedure TaskTrayIconMessage(var Msg : TMsg); message WM_USER + 2010;
831 h677 1.615 //! 鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申
832     procedure StoredTaskTray;
833 h677 1.672 //! 鐃緒申ID鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
834     procedure ShowSameIDAncher(const AID: String);
835 hi_ 1.1 published
836     property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
837     end;
838    
839     TFavoriteMenuItem = class(TMenuItem)
840     private
841     FData : Pointer;
842     public
843     property Data: Pointer read FData write FData;
844     end;
845    
846 yoffy 1.123 TBBSMenuItem = class(TMenuItem)
847     private
848     FData : Pointer;
849     public
850     property Data: Pointer read FData write FData;
851     end;
852    
853 hi_ 1.1 TLinkToolButton = class(TToolButton)
854     private
855     FData : Pointer;
856     public
857     property Data: Pointer read FData write FData;
858     end;
859    
860     var
861     GikoForm: TGikoForm;
862    
863     implementation
864    
865     uses
866 h677 1.536 GikoUtil, IndividualAbon, Math, Kotehan, KeySetting,
867 h677 1.614 YofUtils, ToolBarUtil, ToolBarSetting,
868 h677 1.536 GikoXMLDoc, RoundName, IniFiles, FavoriteAdd,
869 h677 1.619 FavoriteArrange, AddressHistory, Gesture,
870 yoffy 1.480 About, Option, Round, Splash, Sort, ListSelect, Imm,
871 h677 1.521 NewBoard, MojuUtils, Clipbrd, GikoBayesian,Y_TextConverter,
872 h677 1.583 HTMLCreate, ListViewUtils, GikoDataModule, GikoMessage,
873 h677 1.630 InputAssistDataModule, Types, ReplaceDataModule;
874 hi_ 1.1
875     const
876     BLANK_HTML: string = 'about:blank';
877 h677 1.542 BROWSER_COUNT = 5; //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
878     //D&D鐃緒申鐃?
879     DandD_THRESHOLD = 5; //D&D鐃緒申鐃緒申鐃?鐃?pixcel)
880     //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
881     HTML_FILE_NAME = 'temp_preview.html';
882     //鐃緒申鐃?鐃?鐃?鐃?ID
883 yoffy 1.278 USER_TREECLICK = WM_USER + 2000;
884     USER_RESIZED = WM_USER + 2001;
885     USER_MINIMIZED = WM_USER + 2002;
886     USER_SETLINKBAR = WM_USER + 2003;
887 yoffy 1.434 USER_DOCUMENTCOMPLETE = WM_USER + 2004; ///< wParam : TWebBrowser
888 h677 1.614 USER_TASKTRAY = WM_USER + 2010;
889 hi_ 1.1 {$R *.DFM}
890    
891     procedure TGikoForm.CreateParams(var Params: TCreateParams);
892     begin
893     inherited;
894     if FormStyle in [fsNormal, fsStayOnTop] then begin
895     if BorderStyle in [bsSingle, bsSizeable] then begin
896     Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
897     Params.WndParent := 0;
898     end;
899     end;
900     end;
901    
902     procedure TGikoForm.FormCreate(Sender: TObject);
903     const
904     TVS_NOTOOLTIPS = $0080;
905     var
906     FileName: string;
907     Style: DWORD;
908     msg: string;
909     i: Integer;
910     wp: TWindowPlacement;
911     begin
912     {$IFDEF DEBUG}
913     AllocConsole;
914     Writeln('============================================================');
915     Writeln(' 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃? 鐃?鐃緒申鐃?鐃?鐃緒申');
916     Writeln('');
917     Writeln(' 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?');
918     Writeln(' 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
919     Writeln('============================================================');
920     {$ENDIF}
921 h677 1.580 //try
922 h677 1.586 Sort.SetSortDate(Now());
923 eggcake 1.665
924 h677 1.514 FTreeType := gttNone;
925     // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
926 h677 1.471 FStartUp := true;
927 hi_ 1.1 Application.HookMainWindow(Hook);
928 h677 1.514 FIsIgnoreResize := rtResizing;
929 h677 1.581 //ActionList鐃緒申GuoupIndex鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?0鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
930     //(鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申Down鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申GroupIndex鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申)
931     //鐃緒申鐃緒申鐃緒申鐃緒申Set鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?Action鐃緒申Checked鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
932     GetGroupIndex(GikoDM.GikoFormActionList);
933 yoffy 1.51 FSearchDialog := nil;
934 h677 1.636 FResPopupBrowser := nil;
935 h677 1.550 CreateBrowsers(BROWSER_COUNT);
936 h677 1.615 FIconData.uID := 0;
937 h677 1.683 FUpdateExePath := '';
938     FUpdateExeArgs := '';
939 h677 1.636
940 h677 1.514 //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?
941     SetMenuFont;
942 yoffy 1.216
943 hi_ 1.1 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
944     Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
945    
946 h677 1.680 // 鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
947     LoadIcon;
948    
949 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
950 h677 1.513 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.MaxRecordCount);
951 hi_ 1.1
952     EnabledCloseButton := True;
953 h677 1.176
954 hi_ 1.1 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
955     ListView.ViewStyle := GikoSys.Setting.ListStyle;
956    
957     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
958     AnimePanel.Top := 0;
959     AnimePanel.Left := 0;
960    
961     //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
962    
963     //鐃?鐃緒申鐃?鐃?鐃?鐃?
964     CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
965    
966     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
967 h677 1.539 GikoDM.MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
968     GikoDM.MsgBarVisibleActionExecute(nil);
969 hi_ 1.1 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
970    
971     //鐃?鐃?鐃?鐃?鐃?鐃?鐃?
972 h677 1.539 GikoDM.StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
973     GikoDM.StatusBarVisibleActionExecute(nil);
974 hi_ 1.1
975     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
976     TreeView.Items.BeginUpdate;
977 yoffy 1.100 FavoriteTreeView.Items.BeginUpdate;
978 hi_ 1.1 ListView.Items.BeginUpdate;
979     try
980     TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
981     TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
982     TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
983     TreeView.Color := GikoSys.Setting.CabinetBackColor;
984 h677 1.473 FavoriteTreeView.Font.Assign(TreeView.Font);
985 yoffy 1.67 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
986    
987 hi_ 1.1 ListView.Font.Name := GikoSys.Setting.ListFontName;
988     ListView.Font.Size := GikoSys.Setting.ListFontSize;
989     ListView.Font.Color := GikoSys.Setting.ListFontColor;
990 h677 1.473 ListView.Font.Style := [];
991     if GikoSys.Setting.ListFontBold then
992     ListView.Font.Style := [fsbold];
993     if GikoSys.Setting.ListFontItalic then
994     ListView.Font.Style := ListView.Font.Style + [fsitalic];
995    
996 yoffy 1.418 ListViewBackGroundColor := clWhite; // 鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
997     ListViewBackGroundColor := GikoSys.Setting.ListBackColor; // 鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
998 yoffy 1.236 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
999     FOddColor := GikoSys.Setting.OddColor;
1000 h677 1.109
1001 hi_ 1.1 finally
1002     TreeView.Items.EndUpdate;
1003 yoffy 1.100 FavoriteTreeView.Items.EndUpdate;
1004 hi_ 1.1 ListView.Items.EndUpdate;
1005     end;
1006     //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1007 h677 1.539 GikoDM.ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1008 hi_ 1.1
1009 h677 1.581 //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1010     GikoDM.MuteAction.Checked := GikoSys.Setting.Mute;
1011    
1012     // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1013     FResRangeMenuSelect := GikoSys.ResRange;
1014     case GikoSys.ResRange of
1015     Ord( grrAll ):
1016     begin
1017     GikoDM.AllResAction.Execute;
1018     end;
1019     Ord( grrSelect ):
1020     begin
1021     SelectComboBox.Text := SelectComboBox.Items[ 1 ];
1022     GikoDM.SelectResAction.Checked := True;
1023     end;
1024     else
1025     case FResRangeMenuSelect of
1026     Ord( grrKoko ): GikoDM.OnlyKokoResAction.Checked := True;
1027     Ord( grrNew ): GikoDM.OnlyNewResAction.Checked := True;
1028 h677 1.685 10..65535:
1029     begin
1030     GikoDM.OnlyAHundredResAction.Checked := True;
1031     GikoSys.ResRange := GikoSys.Setting.ResRangeExCount;
1032     end;
1033 h677 1.581 end;
1034     end;
1035    
1036     // 鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1037     case GikoSys.Setting.ThreadRange of
1038     gtrAll:
1039     begin
1040     GikoDM.AllItemAction.Checked := True;
1041     ViewType := gvtAll;
1042     end;
1043     gtrLog:
1044     begin
1045     GikoDM.LogItemAction.Checked := True;
1046     ViewType := gvtLog;
1047     end;
1048     gtrNew:
1049     begin
1050     GikoDM.NewItemAction.Checked := True;
1051     ViewType := gvtNew;
1052     end;
1053 h677 1.592 gtrLive:
1054     begin
1055     GikoDM.LiveItemAction.Checked := True;
1056     ViewType := gvtLive;
1057     end;
1058     gtrArch:
1059     begin
1060     GikoDM.ArchiveItemAction.Checked := True;
1061     ViewType := gvtArch;
1062     end;
1063 h677 1.581 end;
1064    
1065    
1066 hi_ 1.1 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1067     BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1068     BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1069 h677 1.473 BrowserTab.Font.Style := [];
1070     if GikoSys.Setting.BrowserTabFontBold then
1071     BrowserTab.Font.Style := [fsBold];
1072     if GikoSys.Setting.BrowserTabFontItalic then
1073     BrowserTab.Font.Style := GikoForm.BrowserTab.Font.Style + [fsItalic];
1074 h677 1.655
1075 h677 1.582 BrowserTab.DoubleBuffered := True;
1076 yoffy 1.133 FDragWFirst := false;
1077 h677 1.299 SetContent(BrowserNullTab); //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1078    
1079 h677 1.581 //鐃?鐃緒申鐃?鐃?鐃?鐃?
1080     GikoDM.BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1081    
1082     if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1083     GikoDM.BrowserTabTopAction.Checked := True;
1084     end else begin
1085     GikoDM.BrowserTabBottomAction.Checked := True;
1086     end;
1087    
1088     if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1089     GikoDM.BrowserTabTabStyleAction.Checked := True;
1090     end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1091     GikoDM.BrowserTabButtonStyleAction.Checked := True;
1092     end else begin
1093     GikoDM.BrowserTabFlatStyleAction.Checked := True;
1094     end;
1095    
1096 h677 1.514 //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1097     ProgressBar.Parent := StatusBar;
1098     ProgressBar.Top := 2;
1099     ProgressBar.Left := 0;
1100     ProgressBar.Width := StatusBar.Panels[0].Width;
1101     ProgressBar.Height := StatusBar.Height - 2;
1102     ProgressBar.Position := 0;
1103    
1104     // 鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?(ReadBoardFile, LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1105     InitializeBoardPlugIns;
1106    
1107     // 鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申(ReadFavorite 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1108     GikoSys.ListBoardFile;
1109 h677 1.580 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申
1110     try
1111 h677 1.514 // 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1112 h677 1.580 if (SplashWindow <> nil) then begin
1113     SplashWindow.ProgressBar.Max := Length(BBSs) * 20;
1114     end;
1115     except
1116     end;
1117 h677 1.514 // 鐃緒申鐃緒申鐃緒申鐃緒申BBS鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1118     for i := Length(BBSs) - 1 downto 0 do begin
1119     if not BBSs[i].IsBoardFileRead then
1120     GikoSys.ReadBoardFile(BBSs[i]);
1121    
1122     if SplashWindow <> nil then begin
1123     SplashWindow.ProgressBar.StepBy(20);
1124     SplashWindow.Update;
1125     end;
1126     end;
1127 h677 1.580
1128 h677 1.514 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1129     RoundList := TRoundList.Create;
1130     RoundList.LoadRoundBoardFile;
1131     RoundList.LoadRoundThreadFile;
1132    
1133     //TreeView鐃緒申鐃緒申鐃緒申鐃?鐃緒申ToolTip鐃緒申鐃緒申鐃?鐃緒申
1134     Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1135     Style := Style or TVS_NOTOOLTIPS;
1136     SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1137    
1138     // 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1139     TreeView.Align := alClient;
1140     FavoriteTreeView.Align := alClient;
1141     FavoriteTreeView.Visible := False;
1142    
1143     // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1144     SetBBSMenu;
1145 hi_ 1.1
1146     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1147     wp.length := sizeof(wp);
1148     wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1149     wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1150     wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1151     wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1152     wp.showCmd := SW_HIDE;
1153     SetWindowPlacement(Handle, @wp);
1154 h677 1.514 //Self.Update;
1155 hi_ 1.1
1156     if GikoSys.Setting.WindowMax then
1157 h677 1.514 WindowState := wsMaximized;
1158 hi_ 1.1
1159     //鐃?鐃?鐃?鐃?鐃緒申
1160     try
1161     FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1162     if FileExists(FileName) then
1163     Animate.FileName := FileName;
1164     except
1165     end;
1166    
1167     //鐃?鐃?鐃?鐃?
1168     FNameCookie := '';
1169     FMailCookie := '';
1170    
1171     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1172     FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1173     FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1174    
1175 yoffy 1.420
1176     // 鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?(LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1177 h677 1.623 FHistoryList := THistoryList.Create;
1178 yoffy 1.420
1179     // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1180 h677 1.623 FHistoryList.LoadFromFile(GikoSys.GetConfigDir + 'History.xml',
1181     TreeView, FTreeType);
1182 yoffy 1.420
1183     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1184     FavoriteDM.SetFavTreeView(FavoriteTreeView);
1185     FavoriteDM.ReadFavorite;
1186    
1187 h677 1.539 GikoDM.ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1188     GikoDM.ArrangeAction.Execute;
1189 hi_ 1.1
1190     if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1191     case GikoSys.Setting.ListWidthState of
1192     glsMax: begin
1193     ViewPanel.Width := 1;
1194 h677 1.558 GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
1195     GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MIN;
1196 hi_ 1.1 end;
1197     glsMin: begin
1198     ViewPanel.Width := GikoSys.Setting.ListWidth;
1199 h677 1.558 GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
1200     GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
1201 hi_ 1.1 end;
1202     else begin
1203     ViewPanel.Width := GikoSys.Setting.ListWidth;
1204 h677 1.558 GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
1205     GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MIN;
1206 hi_ 1.1 end;
1207     end;
1208     end else begin
1209     case GikoSys.Setting.ListHeightState of
1210     glsMax: begin
1211     ViewPanel.Height := 1;
1212 h677 1.558 GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
1213     GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
1214 hi_ 1.1 end;
1215     glsMin: begin
1216     ViewPanel.Height := GikoSys.Setting.ListHeight;
1217 h677 1.558 GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
1218     GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
1219 hi_ 1.1 end;
1220     else begin
1221     ViewPanel.Height := GikoSys.Setting.ListHeight;
1222 h677 1.558 GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
1223     GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
1224 hi_ 1.1 end;
1225     end;
1226     end;
1227    
1228     //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1229 h677 1.550 CreateControlThread();
1230 hi_ 1.1
1231 yoffy 1.51 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1232     SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1233 yoffy 1.2
1234 hi_ 1.1 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
1235     SetBrowserTabState;
1236    
1237     BrowserBoardNameLabel.Caption := '';
1238     BrowserNameLabel.Caption := '';
1239     FWorkCount := 0;
1240    
1241     FTabHintIndex := -1;
1242    
1243     //鐃?鐃?鐃緒申鐃?鐃?Wrapable
1244     ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1245     BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1246    
1247 yoffy 1.236 MakeDefaultINIFile();
1248 yoffy 1.2 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1249 h677 1.539 ReadToolBarSetting(GikoDM.GikoFormActionList, StdToolBar);
1250     ReadToolBarSetting(GikoDM.GikoFormActionList, ListToolBar);
1251     ReadToolBarSetting(GikoDM.GikoFormActionList, BrowserToolBar);
1252 yoffy 1.2 SetToolBarPopup;
1253 yoffy 1.375
1254 h677 1.517 //ListToolBar鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申ComboBox鐃緒申鐃?鐃?
1255 h677 1.550 SetSelectComboBox();
1256 h677 1.514
1257     //鐃?鐃?鐃緒申鐃?鐃?鐃?
1258     AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1259    
1260     //鐃緒申鐃緒申鐃?鐃?鐃?
1261     SetLinkBar;
1262 yoffy 1.2 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1263    
1264     //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1265     if not FileExists(GikoSys.GetBoardFileName) then begin
1266     msg := '鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申' + #13#10#13#10
1267     + '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申' + #13#10
1268     + '鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?';
1269     MsgBox(SplashWindow.Handle, msg, '鐃?鐃?鐃?鐃?', MB_OK or MB_ICONINFORMATION);
1270 h677 1.539 GikoDM.NewBoardAction.Execute;
1271 yoffy 1.2 end;
1272    
1273     //鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1274 h677 1.560 GikoSys.LoadKeySetting(GikoDM.GikoFormActionList, GikoSys.GetMainKeyFileName);
1275 yoffy 1.2
1276     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1277     // FLastRoundTime := 0;
1278    
1279 h677 1.547 ListView.OnData := TListViewUtils.ListViewData;
1280 h677 1.529
1281 yoffy 1.100 // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1282 h677 1.299 CabinetVisible( False );
1283 yoffy 1.141 if GikoSys.Setting.CabinetVisible then begin
1284     i := CabinetSelectPopupMenu.Items.Count - 1;
1285     if GikoSys.Setting.CabinetIndex = i - 1 then
1286 h677 1.539 GikoDM.CabinetHistoryAction.Execute
1287 yoffy 1.141 else if GikoSys.Setting.CabinetIndex = i then
1288 h677 1.539 GikoDM.CabinetFavoriteAction.Execute
1289 yoffy 1.141 else begin
1290     if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1291     ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1292 yoffy 1.265 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 2
1293 yoffy 1.424 FIsIgnoreResize := rtResizing;
1294 h677 1.539 GikoDM.CabinetBBSAction.Execute;
1295 yoffy 1.141 end;
1296     end else begin
1297 yoffy 1.248 ShowBBSTreeOld( BBSs[ 0 ] );
1298     PostMessage( Handle, USER_TREECLICK, 0, 0 );
1299 yoffy 1.141 end;
1300 yoffy 1.67
1301 yoffy 1.2 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?
1302     for i := 1 to ParamCount do begin
1303     MoveToURL(ParamStr(i));
1304     end;
1305 h677 1.22
1306 h677 1.567 GikoDM.RepaintStatusBar;
1307 hi_ 1.32 StatusBarResize(Sender);
1308 h677 1.187
1309 yoffy 1.236 dummy1.Caption := ItemReservPMenu.Caption;
1310     dummy1.Hint := ItemReservPMenu.Hint;
1311 yoffy 1.216
1312 h677 1.659 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1313     MouseGesture := TMouseGesture.Create;
1314    
1315 yoffy 1.500 {$IFDEF SPAM_FILTER_ENABLED}
1316 yoffy 1.468 // 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1317     GikoSys.Bayesian.LoadFromFile( GikoSys.Setting.GetSpamFilterFileName );
1318 yoffy 1.500 {$ENDIF}
1319 yoffy 1.468
1320 h677 1.483 //2ch鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1321 h677 1.562 GikoSys.SetGikoMessage;
1322 h677 1.514
1323 genyakun 1.497 //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1324     if GikoSys.Setting.AutoLogin then
1325 h677 1.539 GikoDM.LoginAction.Execute;
1326 genyakun 1.497
1327 h677 1.514 GikoSys.Setting.BeLogin := GikoSys.Setting.BeAutoLogin;
1328 h677 1.541
1329     //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1330     FavoriteAddToolButton.Caption := '鐃緒申鐃緒申...';
1331 h677 1.547 AntiIndivAbonMenuItem.Caption := '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申';
1332 h677 1.541
1333 h677 1.583 //鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1334     InputAssistDM.Init(GikoSys.GetInputAssistFileName);
1335 h677 1.613
1336 h677 1.630 //鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1337     ReplaceDM.LoadFromFile(GikoSys.GetReplaceFileName);
1338 h677 1.644
1339     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?
1340     ResPopupClearTimer.Interval := GikoSys.Setting.RespopupWait;
1341    
1342 h677 1.639 // D&D鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1343 h677 1.654 DragAcceptFiles(ListView.Handle, True);
1344 h677 1.651
1345     // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?
1346     if (FavoriteDM.AbEnd) then begin
1347     GikoUtil.MsgBox(Self.Handle, '鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?',
1348     '鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
1349     Self.Close;
1350     end;
1351    
1352 yoffy 1.2 end;
1353    
1354 yoffy 1.216 // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1355     procedure TGikoForm.SaveCoolBarSettings;
1356 yoffy 1.2 begin
1357    
1358 yoffy 1.424 if IsIconic( Handle ) or (FIsIgnoreResize <> rtNone) then
1359 yoffy 1.216 Exit;
1360 h677 1.471 SaveMainCoolBarSettings;
1361     SaveBoardCoolBarSettings;
1362     SaveBrowserCoolBarSettings;
1363 yoffy 1.2
1364 h677 1.471 end;
1365     procedure TGikoForm.SaveMainCoolBarSettings;
1366     var
1367     i : Integer;
1368     CoolSet : TCoolSet;
1369     begin
1370 yoffy 1.216 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1371     for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1372     CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1373     CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1374     CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1375     GikoSys.Setting.MainCoolSet[i] := CoolSet;
1376     end;
1377 h677 1.471 end;
1378     procedure TGikoForm.SaveBoardCoolBarSettings;
1379     var
1380     i : Integer;
1381     CoolSet : TCoolSet;
1382     begin
1383 yoffy 1.216 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1384     for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1385     CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1386     CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1387     CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1388     GikoSys.Setting.ListCoolSet[i] := CoolSet;
1389     end;
1390 h677 1.471 end;
1391     procedure TGikoForm.SaveBrowserCoolBarSettings;
1392     var
1393     i : Integer;
1394     CoolSet : TCoolSet;
1395     begin
1396 yoffy 1.216 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1397     for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1398     CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1399     CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1400     CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1401     GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1402 yoffy 1.2 end;
1403 yoffy 1.216 end;
1404     // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1405     procedure TGikoForm.LoadCoolBarSettings;
1406     var
1407     i : Integer;
1408     CoolSet : TCoolSet;
1409     begin
1410 yoffy 1.2
1411 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1412     MainCoolBar.Bands.BeginUpdate;
1413     try
1414 yoffy 1.216 // for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1415     for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin
1416 hi_ 1.1 CoolSet := GikoSys.Setting.MainCoolSet[i];
1417 yoffy 1.263 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1418 yoffy 1.424 FIsIgnoreResize := rtNone;
1419 yoffy 1.263 SaveCoolBarSettings;
1420     Exit;
1421     end;
1422 hi_ 1.1 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1423     MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1424 yoffy 1.264 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1425 hi_ 1.1 end;
1426     finally
1427     MainCoolBar.Bands.EndUpdate;
1428     end;
1429    
1430     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1431     ListCoolBar.Bands.BeginUpdate;
1432     try
1433 yoffy 1.216 // for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1434     for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin
1435 hi_ 1.1 CoolSet := GikoSys.Setting.ListCoolSet[i];
1436 yoffy 1.263 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1437 yoffy 1.424 FIsIgnoreResize := rtNone;
1438 yoffy 1.263 SaveCoolBarSettings;
1439     Exit;
1440     end;
1441 hi_ 1.1 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1442     ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1443     ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1444     end;
1445     finally
1446     ListCoolBar.Bands.EndUpdate;
1447     end;
1448    
1449     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1450     BrowserCoolBar.Bands.BeginUpdate;
1451     try
1452 yoffy 1.216 // for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1453 h677 1.514 for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
1454 hi_ 1.1 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1455 yoffy 1.263 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1456 yoffy 1.424 FIsIgnoreResize := rtNone;
1457 yoffy 1.263 SaveCoolBarSettings;
1458     Exit;
1459     end;
1460 hi_ 1.1 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1461     BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1462     BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1463     end;
1464     finally
1465     BrowserCoolBar.Bands.EndUpdate;
1466     end;
1467    
1468     end;
1469 yoffy 1.216 //
1470     procedure TGikoForm.FormShow(Sender: TObject);
1471 h677 1.638 var
1472     item : TThreadItem;
1473 yoffy 1.216 begin
1474 h677 1.471 if FStartUp then begin
1475 h677 1.688 FStartUp := false;
1476 h677 1.423 ShowWindow(Application.Handle, SW_HIDE);
1477     //FormCreate鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1478     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1479 h677 1.539 GikoDM.StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1480     GikoDM.StdToolBarVisibleActionExecute( nil );
1481     GikoDM.AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1482     GikoDM.AddressBarVisibleActionExecute( nil );
1483     GikoDM.LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1484     GikoDM.LinkBarVisibleActionExecute( nil );
1485     GikoDM.ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1486     GikoDM.ListToolBarVisibleActionExecute( nil );
1487     GikoDM.ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1488     GikoDM.ListNameBarVisibleActionExecute( nil );
1489     GikoDM.BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1490     GikoDM.BrowserToolBarVisibleActionExecute( nil );
1491     GikoDM.BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1492     GikoDM.BrowserNameBarVisibleActionExecute( nil );
1493 h677 1.423
1494     // CoolBar 鐃緒申鐃緒申
1495     LoadCoolBarSettings;
1496 yoffy 1.265
1497 h677 1.514 //鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1498 h677 1.517 // ResetBandInfo( ListCoolBar, ListToolBar );
1499 yoffy 1.424 FIsIgnoreResize := rtNone;
1500 genyakun 1.382
1501 h677 1.688 //ActionList鐃緒申GroupIndex鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1502     SetGroupIndex(GikoDM.GikoFormActionList);
1503    
1504 h677 1.423 //FormCrete鐃緒申鐃緒申鐃緒申鐃緒申鐃?
1505     if GikoSys.Setting.TabAutoLoadSave then begin
1506 h677 1.611 GikoDM.TabsOpenAction.Tag := 1;
1507     GikoDM.TabsOpenAction.Execute;
1508     GikoDM.TabsOpenAction.Tag := 0;
1509 h677 1.638 if (GikoSys.Setting.LastCloseTabURL <> '') then begin
1510 eggcake 1.681 if ( FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
1511 h677 1.639 while (FActiveContent.Browser.ReadyState <> READYSTATE_COMPLETE) and
1512     (FActiveContent.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
1513 h677 1.688 // 鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
1514     Sleep(1);
1515 h677 1.639 end;
1516     end;
1517 h677 1.638 item := BBSsFindThreadFromURL( GikoSys.Setting.LastCloseTabURL );
1518 h677 1.688 GikoSys.Setting.LastCloseTabURL := '';
1519 h677 1.638 if (item <> nil) and (item.IsLogFile) then begin
1520     OpenThreadItem(item, item.URL);
1521     end;
1522 h677 1.688 //ShowWindow(Self.Handle, SW_SHOW);
1523 h677 1.638 end;
1524 h677 1.423 end;
1525 yoffy 1.397 end;
1526 yoffy 1.239 end;
1527 yoffy 1.216
1528 hi_ 1.1 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1529     begin
1530 yoffy 1.331 // if GikoForm.WindowState <> wsMinimized then
1531     // SaveCoolBarSettings;
1532 h677 1.599 CanClose := True;
1533 yoffy 1.236 if ( GikoSys.Setting.ShowDialogForEnd ) and
1534     (MessageDlg('鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
1535     CanClose := false;
1536     Exit;
1537 h677 1.599 end;
1538    
1539 h677 1.638 GikoSys.Setting.LastCloseTabURL := '';
1540 h677 1.599 if GikoSys.Setting.TabAutoLoadSave then begin
1541 h677 1.611 GikoDM.TabsSaveAction.Execute;
1542 h677 1.638 if (GetActiveContent <> nil) and
1543     (GetActiveContent.IsLogFile) then begin
1544     GikoSys.Setting.LastCloseTabURL := GetActiveContent.URL;
1545     end;
1546 h677 1.599 end;
1547    
1548     if (SearchDialog <> nil) then begin
1549     if (SearchDialog.Visible) then begin
1550     SearchDialog.Close;
1551 yoffy 1.398 end;
1552 h677 1.656 try
1553     SearchDialog.Release;
1554     except
1555     end;
1556     SearchDialog := nil;
1557 yoffy 1.236 end;
1558 h677 1.609
1559     //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?EditorForm鐃緒申鐃緒申鐃緒申鐃緒申
1560     GikoDM.CloseAllEditorAction.Execute;
1561    
1562 h677 1.241 Application.UnhookMainWindow(Hook);
1563 h677 1.659 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1564 h677 1.684 FControlThread.DownloadAbort;
1565 h677 1.660 FControlThread.Terminate;
1566 eggcake 1.682
1567     //OnDestory鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申OnCloseQuery鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1568     SaveSettingAll();
1569    
1570 h677 1.241 Application.Terminate;
1571     end;
1572    
1573 eggcake 1.682 procedure TGikoForm.SaveSettingAll();
1574 h677 1.241 var
1575 yoffy 1.376 wp : TWindowPlacement;
1576 h677 1.673 WindowPlacement: TWindowPlacement;
1577 h677 1.241 begin
1578 yoffy 1.236 try
1579 yoffy 1.410 ActiveListColumnSave;
1580 yoffy 1.236 except
1581     end;
1582 eggcake 1.682
1583 yoffy 1.236 try
1584 h677 1.673 WindowPlacement.length := SizeOf(TWindowPlacement);
1585     GetWindowPlacement(Self.Handle, @WindowPlacement);
1586    
1587 h677 1.234 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1588     wp.length := sizeof(wp);
1589     GetWindowPlacement(Handle, @wp);
1590     GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1591     GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1592     GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1593     GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1594 h677 1.673 GikoSys.Setting.WindowMax := (WindowState = wsMaximized) or
1595     (WindowPlacement.flags = WPF_RESTORETOMAXIMIZED);
1596 h677 1.234 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1597 h677 1.539 GikoSys.Setting.CabinetVisible := GikoDM.CabinetVisibleAction.Checked;
1598 h677 1.234 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1599     GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1600     GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1601 h677 1.539 if GikoDM.ArrangeAction.Checked then
1602 h677 1.234 GikoSys.Setting.ListOrientation := gloVertical
1603     else
1604     GikoSys.Setting.ListOrientation := gloHorizontal;
1605     GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1606 yoffy 1.236 except
1607 yoffy 1.2 end;
1608 yoffy 1.378
1609     try
1610     // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1611     if not GikoSys.Setting.ResRangeHold then
1612 yoffy 1.380 GikoSys.Setting.ResRange := FResRangeMenuSelect;
1613 yoffy 1.378 except
1614     end;
1615 h677 1.684 //鐃緒申鐃緒申winodw鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申CoolBar鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1616     SaveCoolBarSettings;
1617     GikoSys.Setting.WriteWindowSettingFile;
1618     // 鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1619     GikoSys.Setting.WriteNameMailSettingFile;
1620 h677 1.483
1621 h677 1.583 //鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1622     InputAssistDM.SaveToFile(GikoSys.GetInputAssistFileName);
1623 yoffy 1.2
1624     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1625 hi_ 1.1 try
1626 yoffy 1.236 //FavoriteDM鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1627 h677 1.651 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1628     if not (FavoriteDM.AbEnd) then begin
1629     FavoriteDM.WriteFavorite;
1630     end;
1631 eggcake 1.682 except
1632     end;
1633    
1634     //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1635     try
1636     //AddressHistoryDM鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
1637     AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.MaxRecordCount);
1638     except
1639     end;
1640    
1641     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
1642     try
1643     FHistoryList.SaveToFile(GikoSys.GetConfigDir + 'History.xml');
1644     except
1645     end;
1646    
1647     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
1648     try
1649     RoundList.SaveRoundFile;
1650     except
1651     end;
1652 h677 1.684
1653     // 鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1654     if (FIconData.uID <> 0) then begin
1655     Shell_NotifyIcon(NIM_DELETE, @FIconData);
1656     end;
1657    
1658 eggcake 1.682 end;
1659    
1660     procedure TGikoForm.FormDestroy(Sender: TObject);
1661     var
1662     i : Integer;
1663     tmpBool : Boolean;
1664     begin
1665 h677 1.684 //鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申CoolBar鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1666     //鐃緒申鐃緒申鐃緒申鐃?OnDestroy鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1667     // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1668     if WindowState <> wsNormal then begin
1669     WindowState := wsNormal;
1670     try
1671     SaveCoolBarSettings;
1672     GikoSys.Setting.WriteWindowSettingFile;
1673     except
1674     end;
1675 eggcake 1.682 end;
1676    
1677     // 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1678     try
1679     if GikoSys.Setting.GestureEnabled then begin
1680     MouseGesture.OnGestureStart := nil;
1681     MouseGesture.OnGestureMove := nil;
1682     MouseGesture.OnGestureEnd := nil;
1683     end;
1684     MouseGesture.Clear;
1685     MouseGesture.UnHook;
1686     MouseGesture.Free;
1687     except
1688     end;
1689    
1690     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1691     try
1692 yoffy 1.236 FavoriteDM.Clear;
1693 hi_ 1.1 except
1694     end;
1695 eggcake 1.682
1696 hi_ 1.1 try
1697     //鐃?鐃?鐃?鐃緒申鐃?鐃?
1698 h677 1.321 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
1699     GikoSys.Setting.ShowDialogForAllTabClose := false;
1700 h677 1.539 GikoDM.AllTabCloseAction.Execute;
1701 h677 1.483 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
1702 h677 1.299 except
1703     end;
1704 eggcake 1.682
1705 h677 1.321 try
1706     for i := FBrowsers.Count - 1 downto 0 do begin
1707 eggcake 1.665 GikoSys.ShowRefCount('browser' + IntToStr(i), TWebBrowser(FBrowsers[i]).ControlInterface);
1708     GikoSys.ShowRefCount('document' + IntToStr(i), TWebBrowser(FBrowsers[i]).ControlInterface.Document);
1709     end;
1710    
1711     for i := FBrowsers.Count - 1 downto 0 do begin
1712 h677 1.321 TWebBrowser(FBrowsers[i]).Free;
1713     end;
1714     FBrowsers.Clear;
1715     FBrowsers.Capacity := 0;
1716     finally
1717     FBrowsers.Free;
1718 h677 1.303 end;
1719 eggcake 1.682
1720 h677 1.299 try
1721     if BrowserNullTab <> nil then begin
1722     BrowserNullTab.Browser := nil; {*BrowserNullTab鐃緒申Browser鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?
1723     *鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申Free鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
1724     *}
1725     BrowserNullTab.Free;
1726 hi_ 1.1 end;
1727     except
1728     end;
1729 h677 1.483
1730 h677 1.224 try
1731 yoffy 1.236 TreeView.Items.BeginUpdate;
1732 yoffy 1.380 TreeView.Items.GetFirstNode.Free;
1733 yoffy 1.236 TreeView.Items.Clear;
1734     TreeView.Items.EndUpdate;
1735 h677 1.224 except
1736     end;
1737 h677 1.230
1738 yoffy 1.236 try
1739     try
1740 h677 1.623 FHistoryList.Clear;
1741 yoffy 1.236 except
1742     end;
1743     finally
1744     FHistoryList.Free;
1745     end;
1746 h677 1.221
1747 eggcake 1.682
1748 yoffy 1.236 try
1749 h677 1.234 try
1750 yoffy 1.236 RoundList.Clear;
1751 h677 1.234 except
1752     end;
1753 yoffy 1.236 finally
1754     RoundList.Free;
1755     end;
1756 h677 1.182
1757 yoffy 1.236 try
1758 h677 1.660 try
1759 h677 1.684 //FControlThread.DownloadAbort;
1760 h677 1.660 FControlThread.Terminate;
1761     FControlThread.WaitFor;
1762     except
1763     end;
1764     finally
1765 h677 1.659 FControlThread.Free;
1766 yoffy 1.236 end;
1767 h677 1.609 // 鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1768     for i := GikoForm.PlugInMenu.Count - 1 downto 0 do begin
1769     GikoForm.PlugInMenu.items[i].Free;
1770     end;
1771     GikoForm.PlugInMenu.Clear;
1772    
1773 h677 1.230
1774 yoffy 1.155 // TBBS 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 TCategory, TBoard, TThreadItem 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1775     // TBoard, TThreadItem 鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1776     // BoardPluteIns 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1777 h677 1.550 for i := Length(BoardGroups) - 1 downto 0 do begin
1778 h677 1.517 //BoardGroups[i].Clear;
1779     BoardGroups[i].Free;
1780 h677 1.550 end;
1781 h677 1.514
1782 yoffy 1.126 try
1783 h677 1.220 for i := Length( BBSs ) - 1 downto 0 do begin
1784 h677 1.153 if BBSs[ i ] <> nil then
1785     BBSs[ i ].Free;
1786     BBSs[ i ] := nil;
1787     end;
1788 h677 1.675 DestorySpecialBBS(BoardGroup.SpecialBBS);
1789 h677 1.153 except
1790     end;
1791 yoffy 1.155
1792 h677 1.234 try
1793 yoffy 1.236 if FEvent <> nil then
1794     FEvent.Free;
1795 h677 1.181
1796 h677 1.636 try
1797     if FResPopupBrowser <> nil then begin
1798     TOleControl(FResPopupBrowser).Parent := nil;
1799     FResPopupBrowser.Free;
1800     end;
1801    
1802     except
1803     end;
1804 yoffy 1.2 //Preview鐃?鐃緒申
1805 h677 1.636 if FPreviewBrowser <> nil then begin
1806 yoffy 1.2 FPreviewBrowser.Free;
1807     FPreviewBrowser := nil;
1808     end;
1809     except
1810     end;
1811 h677 1.683
1812     // Update鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申
1813     if FileExists(FUpdateExePath) then begin
1814     // 鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1815     GikoSys.CreateProcess(FUpdateExePath, FUpdateExeArgs);
1816     end;
1817 hi_ 1.1 end;
1818    
1819 yoffy 1.289 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃? BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1820     procedure TGikoForm.SetBBSMenu;
1821 yoffy 1.123 var
1822     i : Integer;
1823 yoffy 1.149 item : TBBSMenuItem;
1824 hi_ 1.1 begin
1825    
1826 yoffy 1.148 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1827     for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1828     try
1829     if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1830 yoffy 1.155 CabinetSelectPopupMenu.Items[ i ].Free;
1831     CabinetMenu.Items[ i ].Free;
1832 yoffy 1.289 BBSSelectPopupMenu.Items[ i ].Free;
1833 yoffy 1.148 end;
1834     except
1835     end;
1836     end;
1837 yoffy 1.289
1838     // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1839 yoffy 1.148 for i := Length( BBSs ) - 1 downto 0 do begin
1840     try
1841     item := TBBSMenuItem.Create( PopupMenu );
1842     item.Caption := BBSs[ i ].Title;
1843     item.Data := BBSs[ i ];
1844     item.OnClick := BBSMenuItemOnClick;
1845     CabinetSelectPopupMenu.Items.Insert( 0, item );
1846     item := TBBSMenuItem.Create( PopupMenu );
1847     item.Caption := BBSs[ i ].Title;
1848     item.Data := BBSs[ i ];
1849     item.OnClick := BBSMenuItemOnClick;
1850     CabinetMenu.Insert( 0, item );
1851 yoffy 1.289 item := TBBSMenuItem.Create( PopupMenu );
1852     item.Caption := BBSs[ i ].Title;
1853     item.Data := BBSs[ i ];
1854     item.OnClick := BBSMenuItemOnClick;
1855     BBSSelectPopupMenu.Items.Insert( 0, Item );
1856 yoffy 1.148 except
1857     end;
1858     end;
1859 yoffy 1.289
1860     end;
1861    
1862     procedure TGikoForm.ReloadBBS;
1863     var
1864     i : Integer;
1865 h677 1.321 tmpBool: Boolean;
1866 yoffy 1.289 begin
1867 h677 1.517 LockWindowUpdate(Self.Handle);
1868    
1869 yoffy 1.289 //鐃?鐃?鐃?鐃緒申鐃?鐃?
1870 h677 1.321 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
1871     GikoSys.Setting.ShowDialogForAllTabClose := false;
1872 h677 1.539 GikoDM.AllTabCloseAction.Execute;
1873 h677 1.321 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
1874 h677 1.320 SetContent(BrowserNullTab);
1875 yoffy 1.289 //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1876     TreeView.Items.Clear;
1877    
1878 h677 1.515 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
1879     try
1880     RoundList.SaveRoundFile;
1881     except
1882     end;
1883     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
1884     try
1885     RoundList.Clear;
1886     except
1887     end;
1888    
1889     //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1890 h677 1.517 try
1891 h677 1.623 FHistoryList.SaveToFile(GikoSys.GetConfigDir + 'History.xml');
1892     FHistoryList.Clear;
1893 h677 1.517 except
1894     end;
1895 h677 1.515
1896     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1897 h677 1.517 try
1898     FavoriteDM.WriteFavorite;
1899     FavoriteDM.Clear;
1900     except
1901     end;
1902 h677 1.515
1903 h677 1.516 //鐃緒申鐃?鐃?鐃緒申鐃?PLUGIN鐃緒申鐃?鐃緒申
1904     for i := Length(BoardGroups) - 1 downto 0 do begin
1905 h677 1.517 try
1906     BoardGroups[i].Free;
1907     except
1908     end;
1909 h677 1.516 end;
1910 yoffy 1.289 //BBS鐃?鐃緒申
1911     try
1912     for i := Length( BBSs ) - 1 downto 0 do begin
1913     if BBSs[ i ] <> nil then
1914     BBSs[ i ].Free;
1915     BBSs[ i ] := nil;
1916     end;
1917     except
1918     end;
1919    
1920     ActiveList := nil;
1921    
1922     FTreeType := gttNone;
1923 h677 1.516
1924     //============鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申================================//
1925    
1926     // 鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?(ReadBoardFile, LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1927     InitializeBoardPlugIns;
1928    
1929 yoffy 1.289 GikoSys.ListBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1930    
1931 h677 1.515 // 鐃緒申鐃緒申鐃緒申鐃緒申BBS鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1932     for i := Length(BBSs) - 1 downto 0 do begin
1933     if not BBSs[i].IsBoardFileRead then
1934     GikoSys.ReadBoardFile(BBSs[i]);
1935     end;
1936    
1937 yoffy 1.289 // BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1938     SetBBSMenu;
1939    
1940 yoffy 1.123 ShowBBSTree( BBSs[ 0 ] );
1941 yoffy 1.143
1942     // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1943 h677 1.623 FHistoryList.LoadFromFile(GikoSys.GetConfigDir + 'History.xml',
1944     TreeView, FTreeType);
1945 yoffy 1.143
1946     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1947     FavoriteDM.ReadFavorite;
1948 yoffy 1.279
1949 yoffy 1.143 SetLinkBar;
1950    
1951 h677 1.515 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1952 h677 1.514 RoundList.LoadRoundBoardFile;
1953     RoundList.LoadRoundThreadFile;
1954    
1955 h677 1.517 LockWindowUpdate(0);
1956 hi_ 1.1 end;
1957    
1958 yoffy 1.602 {!
1959     \todo 鐃緒申鐃緒申 IE 7 鐃緒申鐃緒申 about:.. 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1960     (IE 7 鐃緒申 about:.. 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申)
1961     鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1962     }
1963 hi_ 1.1 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
1964     var
1965     p: TPoint;
1966     s: string;
1967     tmp2: string;
1968     URL: string;
1969     ATitle: Boolean;
1970    
1971 yoffy 1.130 threadItem : TThreadItem;
1972     board : TBoard;
1973 yoffy 1.163 Protocol, Host, Path, Document, Port, Bookmark: string;
1974 yoffy 1.130
1975 h677 1.333 wkInt: Integer;
1976 hi_ 1.1 wkIntSt: Integer;
1977     wkIntTo: Integer;
1978     ActiveFileName: string;
1979     e: IHTMLElement;
1980     Ext: string;
1981     PathRec: TPathRec;
1982 eggcake 1.665 Text2: string;
1983 h677 1.636 cResPopup: TResPopupBrowser;
1984 eggcake 1.665 senderBrowser :TWebBrowser;
1985     doc: IHTMLDocument2;
1986 hi_ 1.1 begin
1987 eggcake 1.665 // 鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申 about:blank.. 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1988     // IE 7 鐃緒申鐃緒申 about:blank.. 鐃緒申鐃緒申鐃緒申鐃緒申 about:.. 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申(鐃緒申鐃緒申鐃緒申鐃緒申)
1989     if Pos('about:..', Text) = 1 then
1990     Text2 := 'about:blank..' + Copy( Text, Length('about:..')+1, Length(Text) )
1991     else
1992     Text2 := Text;
1993    
1994 h677 1.316 if not( TObject(Sender) is TWebBrowser )then
1995     Exit;
1996 eggcake 1.665
1997     senderBrowser := TWebBrowser(Sender);
1998     doc := senderBrowser.ControlInterface.Document as IHTMLDocument2;
1999    
2000 hi_ 1.1 try
2001     try
2002 eggcake 1.665 if ((not senderBrowser.Busy) and Assigned(doc)) then begin
2003     if LowerCase(doc.charset) <> 'shift_jis' then begin
2004     doc.charset := 'shift_jis';
2005 h677 1.306 end;
2006 hi_ 1.1 end;
2007     except
2008     end;
2009     finally
2010     end;
2011 eggcake 1.665
2012 hi_ 1.1 if PreviewTimer.Enabled then
2013     PreviewTimer.Enabled := False;
2014 eggcake 1.665
2015 hi_ 1.1 Application.CancelHint;
2016 eggcake 1.665
2017 h677 1.333 try
2018     if GetActiveContent <> nil then
2019     ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2020     else
2021     ActiveFileName := '';
2022     except
2023     FActiveContent := nil;
2024     Exit;
2025     end;
2026 eggcake 1.665
2027 h677 1.628 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
2028     if (StatusBar.Panels[1].Text = Text2) then begin
2029 h677 1.636 if Text2 = '' then begin
2030     if FResPopupBrowser <> nil then begin
2031     if not(Sender is TResPopupBrowser) then
2032     FResPopupBrowser.Clear
2033     else begin
2034     TResPopupBrowser(Sender).ChildClear;
2035     end;
2036     end;
2037     end;
2038 h677 1.628 Exit;
2039     end;
2040 yoffy 1.602 StatusBar.Panels[1].Text := Text2;
2041 hi_ 1.1
2042 h677 1.636
2043 hi_ 1.1 if FPreviewBrowser <> nil then
2044     ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2045    
2046 h677 1.636 if FResPopupBrowser <> nil then begin
2047     if not(Sender is TResPopupBrowser) then begin
2048     if (FResPopupBrowser.Visible) then begin
2049 h677 1.646 if ResPopupClearTimer.Interval > 0 then begin
2050     ResPopupClearTimer.Enabled := True;
2051     ResPopupClearTimer.Tag := 0;
2052     end else begin
2053     FResPopupBrowser.Clear;
2054     end;
2055     end;
2056     end else begin
2057     if ResPopupClearTimer.Interval > 0 then begin
2058 h677 1.643 ResPopupClearTimer.Enabled := True;
2059 h677 1.646 ResPopupClearTimer.Tag := 1;
2060     end else begin
2061     TResPopupBrowser(Sender).ChildClear;
2062 h677 1.636 end;
2063     end;
2064     end;
2065     cResPopup := nil;
2066    
2067     if not(Sender is TResPopupBrowser) then
2068     if not GikoSys.Setting.UnActivePopup then
2069     if not GikoForm.Active then
2070     Exit;
2071 hi_ 1.1
2072 h677 1.628
2073    
2074 hi_ 1.1 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2075     //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2076 h677 1.663 // 鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申URL鐃緒申鐃?鐃?
2077     if (ExtPreviewDM.PreviewURL(Text2)) then begin
2078     Exit;
2079     end;
2080 hi_ 1.1 s := '';
2081 yoffy 1.602 Ext := AnsiLowerCase(ExtractFileExt(Text2));
2082     if (Pos('http://', Text2) = 1) and (GikoSys.Setting.PreviewVisible) and
2083 h677 1.686 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) or
2084     (Pos('http://www.nicovideo.jp/watch/', Text2) = 1) then begin
2085 hi_ 1.1 if FPreviewBrowser = nil then begin
2086     FPreviewBrowser := TPreviewBrowser.Create(Self);
2087     ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2088     TOleControl(FPreviewBrowser).Parent := nil;
2089     end;
2090 h677 1.316 FPreviewBrowser.Navigate(BLANK_HTML);//鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2091 yoffy 1.602 FPreviewURL := Text2;
2092 hi_ 1.1 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2093     PreviewTimer.Enabled := True;
2094 yoffy 1.602 end else if (Pos('about:blank', Text2) = 1) or (Pos('http://', Text2) = 1) or (Pos('mailto:', Text2) = 1) then begin
2095 h677 1.652 if (Pos('mailto:', Text2) = 1) and (GikoSys.Setting.RespopupMailTo) then begin
2096 yoffy 1.602 s := StringReplace(Text2, 'mailto:', '', [rfIgnoreCase]);
2097 hi_ 1.1 //鐃?鐃?鐃?鐃?鐃?鐃緒申 鐃?鐃?鐃?3鐃緒申466鐃緒申鐃緒申鐃緒申鐃緒申
2098     GetCursorPos(p);
2099 eggcake 1.665 p.x := p.x - senderBrowser.ClientOrigin.x;
2100     p.y := p.y - senderBrowser.ClientOrigin.y;
2101     e := doc.elementFromPoint(p.x, p.y);
2102 hi_ 1.1 if (Assigned(e)) then begin
2103 h677 1.636 CreateResPopupBrowser;
2104 h677 1.643
2105     if not(Sender is TResPopupBrowser) then begin
2106     if (FResPopupBrowser.Visible) then begin
2107     FResPopupBrowser.Clear;
2108     end;
2109     end else begin
2110     TResPopupBrowser(Sender).ChildClear;
2111     end;
2112    
2113 h677 1.636 cResPopup := FResPopupBrowser.CreateNewBrowser;
2114 h677 1.664 tmp2 := Trim(ZenToHan(e.Get_outerText));
2115 hi_ 1.1 if (GikoSys.IsNumeric(tmp2)) then begin
2116     //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2117 h677 1.600 wkIntSt := StrToInt64(tmp2);
2118     wkIntTo := StrToInt64(tmp2);
2119 h677 1.636 cResPopup.PopupType := gptThread;
2120 h677 1.637 HTMLCreater.SetResPopupText(cResPopup, GetActiveContent(true), wkIntSt, wkIntTo, False, False);
2121 hi_ 1.1 end else begin
2122 h677 1.636 cResPopup.PopupType := gptRaw;
2123     cResPopup.Title := s;
2124 hi_ 1.1 end;
2125     end;
2126     end else begin
2127 h677 1.645 CreateResPopupBrowser;
2128    
2129     if not(Sender is TResPopupBrowser) then begin
2130     if (FResPopupBrowser.Visible) then begin
2131     FResPopupBrowser.Clear;
2132     end;
2133     end else begin
2134     TResPopupBrowser(Sender).ChildClear;
2135     end;
2136    
2137 h677 1.637 threadItem := GetActiveContent(true);
2138 yoffy 1.602 URL := THTMLCreate.GetRespopupURL(Text2, threadItem.URL);
2139 yoffy 1.274 PathRec := Gikosys.Parse2chURL2(URL);
2140 q9_ 1.354 if (PathRec.FNoParam) then begin
2141     PathRec.FSt := 1;
2142     PathRec.FTo := 1;
2143 h677 1.447 end else begin
2144 q9_ 1.352 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2145 h677 1.447 end;
2146 yoffy 1.163 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
2147 hi_ 1.1
2148 h677 1.168 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
2149 yoffy 1.162
2150 yoffy 1.163 URL := GikoSys.GetBrowsableThreadURL( URL );
2151 yoffy 1.274 wkIntSt := PathRec.FSt;
2152     wkIntTo := PathRec.FTo;
2153 hi_ 1.1
2154     if (wkIntSt = 0) and (wkIntTo = 0) then begin
2155     wkIntSt := 1;
2156     wkIntTo := 1;
2157     end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2158     wkIntSt := wkIntTo;
2159     end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2160     wkIntTo := wkIntSt;
2161     end else if wkIntSt > wkIntTo then begin
2162 h677 1.333 wkInt := wkIntTo;
2163 hi_ 1.1 wkIntTo := wkIntSt;
2164 h677 1.333 wkIntSt := wkInt;
2165 hi_ 1.1 end;
2166 h677 1.299 if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
2167 yoffy 1.274 ATitle := false
2168     else
2169     ATitle := true;
2170 hi_ 1.1
2171 yoffy 1.160 threadItem := BBSsFindThreadFromURL( URL );
2172 h677 1.170
2173 yoffy 1.163 if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
2174     board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
2175 yoffy 1.274 if board <> nil then begin
2176     if not board.IsThreadDatRead then
2177     GikoSys.ReadSubjectFile( board );
2178 yoffy 1.270 threadItem := board.FindThreadFromFileName( PathRec.FKey + '.dat' );
2179 yoffy 1.274 end;
2180 yoffy 1.130 end;
2181 h677 1.319
2182 yoffy 1.130 if threadItem <> nil then begin
2183 yoffy 1.127 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2184 h677 1.512 //URL鐃緒申鐃緒申鐃緒申鐃緒申/鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2185     if ( IntToStr(wkIntSt) = ChangeFileExt(threadItem.FileName, '') ) then begin
2186     wkIntSt := 1;
2187     wkIntTo := 1;
2188     end;
2189 h677 1.636 cResPopup := FResPopupBrowser.CreateNewBrowser;
2190     cResPopup.PopupType := gptThread;
2191     HTMLCreater.SetResPopupText(cResPopup, threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2192 yoffy 1.127 end;
2193 hi_ 1.1 end;
2194 h677 1.168 end;
2195 h677 1.636 if (cResPopup <> nil) then begin
2196 h677 1.643 ResPopupClearTimer.Enabled := False;
2197    
2198 h677 1.636 if cResPopup.PopupType = gptRaw then begin
2199     if cResPopup.Title <> '' then begin
2200     cResPopup.TitlePopup;
2201     end;
2202     end else begin
2203     if cResPopup.RawDocument <> '' then begin
2204     cResPopup.Popup;
2205     end else if cResPopup.Title <> '' then begin
2206     cResPopup.TitlePopup;
2207     end;
2208     end;
2209     end;
2210 hi_ 1.1 end;
2211     end;
2212    
2213     procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2214     var
2215     SysMenu: HMenu;
2216     begin
2217     FEnabledCloseButton := Enabled;
2218     SysMenu := GetSystemMenu(Handle, False);
2219    
2220     if Enabled then begin
2221     EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2222     end else begin
2223     EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2224     end;
2225    
2226     DrawMenuBar(Handle);
2227     end;
2228    
2229     procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2230     var AllowChange: Boolean);
2231     begin
2232 q9_ 1.369 //鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2233     // if FTreeType = gtt2ch then
2234     // FSortIndex := -1;
2235 hi_ 1.1 end;
2236    
2237     procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2238     Shift: TShiftState);
2239 yoffy 1.428 var
2240     pos : TPoint;
2241 hi_ 1.1 begin
2242 yoffy 1.236 if GetActiveList is TBoard then begin
2243 yoffy 1.428 case Key of
2244     VK_BACK:; // UpFolderButtonClick(Sender);
2245     VK_SPACE: ListDoubleClick(Shift);
2246     VK_RETURN: ListClick;
2247     VK_APPS