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