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.696 - (hide annotations) (download) (as text)
Sun Sep 13 15:09:07 2009 UTC (14 years, 7 months ago) by h677
Branch: MAIN
CVS Tags: v1_61_0_799
Changes since 1.695: +1 -0 lines
File MIME type: text/x-pascal
ポップアップメニューのカスタマイズ画面を追加

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