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.648 - (hide annotations) (download) (as text)
Sun Sep 2 10:50:22 2007 UTC (16 years, 7 months ago) by h677
Branch: MAIN
CVS Tags: v1_57_0_729
Changes since 1.647: +4 -1 lines
File MIME type: text/x-pascal
NGワード">>"で始まる文字列をコメントとする機能を追加

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 //! D&D鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
696     procedure WMDropFiles(var Msg: TWMDropFiles); Message WM_DropFiles;
697     //! 鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?
698     function isValidFile(FileName: String) : boolean;
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 yoffy 1.216
706 hi_ 1.1 public
707     { Public 鐃緒申鐃緒申 }
708 h677 1.533 LastRoundTime: TDateTime;
709     BrowserNullTab: TBrowserRecord;
710 hi_ 1.1 FControlThread: TThreadControl;
711 h677 1.614 FIconData : TNotifyIconData;
712 yoffy 1.444 procedure MoveToURL(const inURL: string);
713 h677 1.530 function InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True) : TBrowserRecord;
714 hi_ 1.1 procedure ReloadBBS;
715     function GetHttpState: Boolean;
716     procedure SetEnabledCloseButton(Enabled: Boolean);
717     function GetTreeNode(Data: TObject): TTreeNode;
718     procedure ListViewAllSelect;
719     property ListStyle: TViewStyle read FListStyle write FListStyle;
720     property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
721     property ViewType: TGikoViewType read FViewType write FViewType;
722     property NameCookie: string read FNameCookie write FNameCookie;
723     property MailCookie: string read FMailCookie write FMailCookie;
724 h677 1.532 property ClickNode: TTreeNode read FClickNode write FClickNode;
725 h677 1.538 property TreeType: TGikoTreeType read FTreeType write FTreeType;
726 h677 1.534 property ActiveContent: TBrowserRecord read FActiveContent write FActiveContent;
727 h677 1.533 property ResRangeMenuSelect: Longint read FResRangeMenuSelect write FResRangeMenuSelect;
728 h677 1.534 property SelectResWord : string read FSelectResWord write FSelectResWord;
729     property BrowserSizeWidth: Integer read FBrowserSizeWidth write FBrowserSizeWidth;
730     property BrowserSizeHeight: Integer read FBrowserSizeHeight write FBrowserSizeHeight;
731     property SearchDialog: TSearchDialog read FSearchDialog write FSearchDialog;
732     property ToolBarSettingSender : TToolBarSettingSenderType
733     read FToolBarSettingSender write FToolBarSettingSender;
734 h677 1.535 property ScreenCursor : TCursor read GetScreenCursor write SetScreenCursor;
735 h677 1.538 property ActiveBBS : TBBS read FActiveBBS write FActiveBBS;
736     property WorkCount: Integer read FWorkCount write FWorkCount;
737 h677 1.299 procedure SetContent(inThread: TBrowserRecord);
738 h677 1.636 function GetActiveContent(popup :Boolean = false): TThreadItem;
739 hi_ 1.1 function GetActiveList: TObject;
740 h677 1.533
741 hi_ 1.1 procedure SetListViewType(AViewType: TGikoViewType); overload;
742     procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
743     procedure PlaySound(SoundEventName: string);
744 yoffy 1.123 procedure ShowBBSTree( inBBS : TBBS );
745 yoffy 1.248 procedure ShowBBSTreeOld( inBBS : TBBS );
746 hi_ 1.1 procedure ShowHistoryTree;
747     procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
748     procedure SetBrowserTabState;
749 yoffy 1.2 procedure SetToolBarPopup;
750 yoffy 1.100 procedure ShowFavoriteAddDialog( Item : TObject );
751 h677 1.433 procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
752     procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
753 yoffy 1.143 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
754     property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
755     property OddColor : TColor read FOddColor write FOddColor;
756 yoffy 1.209 function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
757 yoffy 1.218 procedure OnPlugInMenuItem( Sender : TObject );
758 h677 1.433 procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
759     /// ListView 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申 KuroutSetting鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
760     procedure ActiveListColumnSave;
761     procedure SetActiveList(Obj: TObject);
762     property ActiveList: TObject read GetActiveList write SetActiveList;
763 h677 1.482 /// CoolBar 鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
764     procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
765 h677 1.485 //鐃緒申鐃緒申ID鐃緒申鐃緒申鐃緒申鐃?鐃緒申
766     procedure IndividualAbonID(Atype : Integer);
767     //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申
768     procedure IndividualAbon(Atag, Atype : Integer);
769 h677 1.641 //鐃緒申鐃緒申ID鐃緒申NG鐃緒申鐃?鐃?鐃緒申鐃?鐃?
770     procedure AddIDtoNGWord(invisible : boolean);
771 h677 1.532 //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申 true:鐃?鐃緒申鐃緒申鐃?鐃? false:鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
772     procedure RepaintAllTabsBrowser();
773     //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
774     procedure SetLinkBar;
775     procedure FavoriteBrowseFolder( node: TTreeNode );
776     //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?
777     procedure DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
778     //鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?
779     procedure DownloadList(Board: TBoard; ForceDownload: Boolean = False);
780     //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
781     procedure DeleteHistory( threadItem: TThreadItem );
782 h677 1.606 //鐃?鐃?鐃緒申鐃緒申鐃緒申 鐃?鐃緒申鐃?鐃?鐃?鐃緒申
783 h677 1.532 procedure DeleteTab(ThreadItem: TThreadItem); overload;
784 h677 1.606 //鐃?鐃?鐃緒申鐃緒申鐃緒申 鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
785 h677 1.533 procedure DeleteTab(BrowserRecord: TBrowserRecord); overload;
786 h677 1.606 // 鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?
787     procedure DeleteTab(index, selectIndex: Integer); overload;
788 h677 1.533 //鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
789 h677 1.634 procedure BrowserMovement(const AName: string); overload;
790     //鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
791     procedure BrowserMovement(scroll: Integer); overload;
792 h677 1.533 //Application鐃緒申MainForm鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
793 h677 1.534 function GetMainForm(): TComponent;
794 h677 1.533 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
795 h677 1.534 //! 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?
796     procedure OnGestureStart(Sender: TObject);
797     //! 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申
798     procedure OnGestureMove(Sender: TObject);
799     //! 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
800     procedure OnGestureEnd(Sender: TObject);
801     /// 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
802     procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
803 h677 1.535 //ListView鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
804     procedure SelectListItem(List: TList);
805 h677 1.536 //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
806     procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
807 h677 1.537 //
808     procedure ModifySelectList;
809     //
810     procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload;
811     //
812     procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
813 h677 1.538 //
814 h677 1.537 procedure SetSelectRoundName(Sender: TObject);
815 h677 1.538 //
816     function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
817     //
818     function WebBrowserClick(Sender: TObject): WordBool;
819 h677 1.550 //! 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
820     procedure SetSelectComboBox();
821 h677 1.585
822 h677 1.614 //! 鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
823     procedure TaskTrayIconMessage(var Msg : TMsg); message WM_USER + 2010;
824 h677 1.615 //! 鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申
825     procedure StoredTaskTray;
826 hi_ 1.1 published
827     property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
828     end;
829    
830     TFavoriteMenuItem = class(TMenuItem)
831     private
832     FData : Pointer;
833     public
834     property Data: Pointer read FData write FData;
835     end;
836    
837 yoffy 1.123 TBBSMenuItem = class(TMenuItem)
838     private
839     FData : Pointer;
840     public
841     property Data: Pointer read FData write FData;
842     end;
843    
844 hi_ 1.1 TLinkToolButton = class(TToolButton)
845     private
846     FData : Pointer;
847     public
848     property Data: Pointer read FData write FData;
849     end;
850    
851     var
852     GikoForm: TGikoForm;
853    
854     implementation
855    
856     uses
857 h677 1.536 GikoUtil, IndividualAbon, Math, Kotehan, KeySetting,
858 h677 1.614 YofUtils, ToolBarUtil, ToolBarSetting,
859 h677 1.536 GikoXMLDoc, RoundName, IniFiles, FavoriteAdd,
860 h677 1.619 FavoriteArrange, AddressHistory, Gesture,
861 yoffy 1.480 About, Option, Round, Splash, Sort, ListSelect, Imm,
862 h677 1.521 NewBoard, MojuUtils, Clipbrd, GikoBayesian,Y_TextConverter,
863 h677 1.583 HTMLCreate, ListViewUtils, GikoDataModule, GikoMessage,
864 h677 1.630 InputAssistDataModule, Types, ReplaceDataModule;
865 hi_ 1.1
866     const
867     BLANK_HTML: string = 'about:blank';
868 h677 1.542 BROWSER_COUNT = 5; //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
869     //D&D鐃緒申鐃?
870     DandD_THRESHOLD = 5; //D&D鐃緒申鐃緒申鐃?鐃?pixcel)
871     //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
872     HTML_FILE_NAME = 'temp_preview.html';
873     //鐃緒申鐃?鐃?鐃?鐃?ID
874 yoffy 1.278 USER_TREECLICK = WM_USER + 2000;
875     USER_RESIZED = WM_USER + 2001;
876     USER_MINIMIZED = WM_USER + 2002;
877     USER_SETLINKBAR = WM_USER + 2003;
878 yoffy 1.434 USER_DOCUMENTCOMPLETE = WM_USER + 2004; ///< wParam : TWebBrowser
879 h677 1.614 USER_TASKTRAY = WM_USER + 2010;
880 hi_ 1.1 {$R *.DFM}
881    
882     procedure TGikoForm.CreateParams(var Params: TCreateParams);
883     begin
884     inherited;
885     if FormStyle in [fsNormal, fsStayOnTop] then begin
886     if BorderStyle in [bsSingle, bsSizeable] then begin
887     Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
888     Params.WndParent := 0;
889     end;
890     end;
891     end;
892    
893     procedure TGikoForm.FormCreate(Sender: TObject);
894     const
895     TVS_NOTOOLTIPS = $0080;
896     var
897     FileName: string;
898     Style: DWORD;
899     msg: string;
900     i: Integer;
901     wp: TWindowPlacement;
902     begin
903     {$IFDEF DEBUG}
904     AllocConsole;
905     Writeln('============================================================');
906     Writeln(' 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃? 鐃?鐃緒申鐃?鐃?鐃緒申');
907     Writeln('');
908     Writeln(' 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?');
909     Writeln(' 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
910     Writeln('============================================================');
911     {$ENDIF}
912 h677 1.580 //try
913 h677 1.586 Sort.SetSortDate(Now());
914    
915 h677 1.514 FTreeType := gttNone;
916     // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
917 h677 1.471 FStartUp := true;
918 hi_ 1.1 Application.HookMainWindow(Hook);
919 h677 1.514 FIsIgnoreResize := rtResizing;
920 h677 1.581 //ActionList鐃緒申GuoupIndex鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?0鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
921     //(鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申Down鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申GroupIndex鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申)
922     //鐃緒申鐃緒申鐃緒申鐃緒申Set鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?Action鐃緒申Checked鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
923     GetGroupIndex(GikoDM.GikoFormActionList);
924 yoffy 1.51 FSearchDialog := nil;
925 h677 1.636 FResPopupBrowser := nil;
926 h677 1.550 CreateBrowsers(BROWSER_COUNT);
927 h677 1.615 FIconData.uID := 0;
928 h677 1.636
929 h677 1.514 //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?
930     SetMenuFont;
931 yoffy 1.216
932 hi_ 1.1 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
933     Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
934    
935     //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
936 h677 1.513 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.MaxRecordCount);
937 hi_ 1.1
938     EnabledCloseButton := True;
939 h677 1.176
940 hi_ 1.1 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
941     ListView.ViewStyle := GikoSys.Setting.ListStyle;
942    
943     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
944     AnimePanel.Top := 0;
945     AnimePanel.Left := 0;
946    
947     //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
948    
949     //鐃?鐃緒申鐃?鐃?鐃?鐃?
950     CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
951    
952     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
953 h677 1.539 GikoDM.MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
954     GikoDM.MsgBarVisibleActionExecute(nil);
955 hi_ 1.1 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
956    
957     //鐃?鐃?鐃?鐃?鐃?鐃?鐃?
958 h677 1.539 GikoDM.StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
959     GikoDM.StatusBarVisibleActionExecute(nil);
960 hi_ 1.1
961     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
962     TreeView.Items.BeginUpdate;
963 yoffy 1.100 FavoriteTreeView.Items.BeginUpdate;
964 hi_ 1.1 ListView.Items.BeginUpdate;
965     try
966     TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
967     TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
968     TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
969     TreeView.Color := GikoSys.Setting.CabinetBackColor;
970 h677 1.473 FavoriteTreeView.Font.Assign(TreeView.Font);
971 yoffy 1.67 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
972    
973 hi_ 1.1 ListView.Font.Name := GikoSys.Setting.ListFontName;
974     ListView.Font.Size := GikoSys.Setting.ListFontSize;
975     ListView.Font.Color := GikoSys.Setting.ListFontColor;
976 h677 1.473 ListView.Font.Style := [];
977     if GikoSys.Setting.ListFontBold then
978     ListView.Font.Style := [fsbold];
979     if GikoSys.Setting.ListFontItalic then
980     ListView.Font.Style := ListView.Font.Style + [fsitalic];
981    
982 yoffy 1.418 ListViewBackGroundColor := clWhite; // 鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
983     ListViewBackGroundColor := GikoSys.Setting.ListBackColor; // 鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
984 yoffy 1.236 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
985     FOddColor := GikoSys.Setting.OddColor;
986 h677 1.109
987 hi_ 1.1 finally
988     TreeView.Items.EndUpdate;
989 yoffy 1.100 FavoriteTreeView.Items.EndUpdate;
990 hi_ 1.1 ListView.Items.EndUpdate;
991     end;
992     //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
993 h677 1.539 GikoDM.ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
994 hi_ 1.1
995 h677 1.581 //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
996     GikoDM.MuteAction.Checked := GikoSys.Setting.Mute;
997    
998     // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
999     FResRangeMenuSelect := GikoSys.ResRange;
1000     case GikoSys.ResRange of
1001     Ord( grrAll ):
1002     begin
1003     GikoDM.AllResAction.Execute;
1004     end;
1005     Ord( grrSelect ):
1006     begin
1007     SelectComboBox.Text := SelectComboBox.Items[ 1 ];
1008     GikoDM.SelectResAction.Checked := True;
1009     end;
1010     else
1011     case FResRangeMenuSelect of
1012     Ord( grrKoko ): GikoDM.OnlyKokoResAction.Checked := True;
1013     Ord( grrNew ): GikoDM.OnlyNewResAction.Checked := True;
1014     100: GikoDM.OnlyAHundredResAction.Checked := True;
1015     end;
1016     end;
1017    
1018     // 鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1019     case GikoSys.Setting.ThreadRange of
1020     gtrAll:
1021     begin
1022     GikoDM.AllItemAction.Checked := True;
1023     ViewType := gvtAll;
1024     end;
1025     gtrLog:
1026     begin
1027     GikoDM.LogItemAction.Checked := True;
1028     ViewType := gvtLog;
1029     end;
1030     gtrNew:
1031     begin
1032     GikoDM.NewItemAction.Checked := True;
1033     ViewType := gvtNew;
1034     end;
1035 h677 1.592 gtrLive:
1036     begin
1037     GikoDM.LiveItemAction.Checked := True;
1038     ViewType := gvtLive;
1039     end;
1040     gtrArch:
1041     begin
1042     GikoDM.ArchiveItemAction.Checked := True;
1043     ViewType := gvtArch;
1044     end;
1045 h677 1.581 end;
1046    
1047    
1048 hi_ 1.1 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1049     BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1050     BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1051 h677 1.473 BrowserTab.Font.Style := [];
1052     if GikoSys.Setting.BrowserTabFontBold then
1053     BrowserTab.Font.Style := [fsBold];
1054     if GikoSys.Setting.BrowserTabFontItalic then
1055     BrowserTab.Font.Style := GikoForm.BrowserTab.Font.Style + [fsItalic];
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 yoffy 1.500 {$IFDEF SPAM_FILTER_ENABLED}
1294 yoffy 1.468 // 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1295     GikoSys.Bayesian.LoadFromFile( GikoSys.Setting.GetSpamFilterFileName );
1296 yoffy 1.500 {$ENDIF}
1297 yoffy 1.468
1298 yoffy 1.456 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1299     MouseGesture := TMouseGesture.Create;
1300     GikoSys.Setting.Gestures.LoadGesture(
1301 h677 1.539 GikoSys.Setting.GetGestureFileName, GikoDM.GikoFormActionList );
1302 yoffy 1.456 MouseGesture.Margin := GikoSys.Setting.Gestures.Margin;
1303     MouseGesture.OnGestureStart := OnGestureStart;
1304     MouseGesture.OnGestureMove := OnGestureMove;
1305     MouseGesture.OnGestureEnd := OnGestureEnd;
1306 yoffy 1.457 if GikoSys.Setting.GestureEnabled then
1307     MouseGesture.SetHook( Handle );
1308 genyakun 1.458
1309 h677 1.483 //2ch鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1310 h677 1.562 GikoSys.SetGikoMessage;
1311 h677 1.514
1312 genyakun 1.497 //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1313     if GikoSys.Setting.AutoLogin then
1314 h677 1.539 GikoDM.LoginAction.Execute;
1315 genyakun 1.497
1316 h677 1.514 GikoSys.Setting.BeLogin := GikoSys.Setting.BeAutoLogin;
1317 h677 1.541
1318     //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1319     FavoriteAddToolButton.Caption := '鐃緒申鐃緒申...';
1320 h677 1.547 AntiIndivAbonMenuItem.Caption := '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申';
1321 h677 1.541
1322 h677 1.583 //鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1323     InputAssistDM.Init(GikoSys.GetInputAssistFileName);
1324 h677 1.613
1325 h677 1.630 //鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1326     ReplaceDM.LoadFromFile(GikoSys.GetReplaceFileName);
1327 h677 1.644
1328     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?
1329     ResPopupClearTimer.Interval := GikoSys.Setting.RespopupWait;
1330    
1331 h677 1.639 // D&D鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1332     DragAcceptFiles(Self.Handle, True);
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     try
1534     SearchDialog.Release;
1535     except
1536     end;
1537     SearchDialog := nil;
1538 yoffy 1.398 end;
1539 yoffy 1.236 end;
1540 h677 1.609
1541     //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?EditorForm鐃緒申鐃緒申鐃緒申鐃緒申
1542     GikoDM.CloseAllEditorAction.Execute;
1543    
1544 h677 1.241 Application.UnhookMainWindow(Hook);
1545     Application.Terminate;
1546     end;
1547    
1548     procedure TGikoForm.FormDestroy(Sender: TObject);
1549     var
1550 yoffy 1.376 i : Integer;
1551 h677 1.241 // CoolSet: TCoolSet;
1552 yoffy 1.376 wp : TWindowPlacement;
1553     tmpBool : Boolean;
1554 h677 1.241 begin
1555 yoffy 1.460 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1556 yoffy 1.456 try
1557     MouseGesture.UnHook;
1558     except
1559     end;
1560 yoffy 1.236 try
1561 yoffy 1.410 ActiveListColumnSave;
1562 yoffy 1.236 except
1563     end;
1564     try
1565 h677 1.234 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1566     wp.length := sizeof(wp);
1567     GetWindowPlacement(Handle, @wp);
1568     GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1569     GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1570     GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1571     GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1572     GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1573    
1574     GikoSys.Setting.ListStyle := ListView.ViewStyle;
1575 h677 1.539 GikoSys.Setting.CabinetVisible := GikoDM.CabinetVisibleAction.Checked;
1576 h677 1.234 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1577     GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1578     GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1579 h677 1.539 if GikoDM.ArrangeAction.Checked then
1580 h677 1.234 GikoSys.Setting.ListOrientation := gloVertical
1581     else
1582     GikoSys.Setting.ListOrientation := gloHorizontal;
1583     GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1584 yoffy 1.236 except
1585 yoffy 1.2 end;
1586 yoffy 1.378
1587     try
1588     // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1589     if not GikoSys.Setting.ResRangeHold then
1590 yoffy 1.380 GikoSys.Setting.ResRange := FResRangeMenuSelect;
1591 yoffy 1.378 except
1592     end;
1593 h677 1.483 if WindowState <> wsNormal then
1594     WindowState := wsNormal;
1595     SaveCoolBarSettings;
1596     try
1597     GikoSys.Setting.WriteWindowSettingFile;
1598     GikoSys.Setting.WriteNameMailSettingFile;
1599     except
1600     end;
1601 yoffy 1.378 // 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申 CoolBar 鐃緒申鐃緒申
1602 yoffy 1.216 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1603 h677 1.482
1604 yoffy 1.263 // 鐃緒申FormDestroy鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?2004/04/09鐃?
1605 yoffy 1.216 // CoolBar 鐃緒申鐃緒申
1606 h677 1.482 //if (GikoForm.WindowState <> wsMinimized) and (GikoForm.WindowState <> wsMaximized) then
1607 h677 1.483
1608 h677 1.583 //鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1609     InputAssistDM.SaveToFile(GikoSys.GetInputAssistFileName);
1610 yoffy 1.2
1611     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1612 hi_ 1.1 try
1613 yoffy 1.236 //FavoriteDM鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1614 yoffy 1.2 FavoriteDM.WriteFavorite;
1615 yoffy 1.236 FavoriteDM.Clear;
1616 hi_ 1.1 except
1617     end;
1618 h677 1.483 LockWindowUpdate(Self.Handle);
1619 hi_ 1.1 try
1620     //鐃?鐃?鐃?鐃緒申鐃?鐃?
1621 h677 1.321 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
1622     GikoSys.Setting.ShowDialogForAllTabClose := false;
1623 h677 1.539 GikoDM.AllTabCloseAction.Execute;
1624 h677 1.483 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
1625 h677 1.299 except
1626     end;
1627 h677 1.321 try
1628     for i := FBrowsers.Count - 1 downto 0 do begin
1629     TWebBrowser(FBrowsers[i]).Free;
1630     end;
1631     FBrowsers.Clear;
1632     FBrowsers.Capacity := 0;
1633     finally
1634     FBrowsers.Free;
1635 h677 1.303 end;
1636 h677 1.299 try
1637     if BrowserNullTab <> nil then begin
1638     BrowserNullTab.Browser := nil; {*BrowserNullTab鐃緒申Browser鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?
1639     *鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申Free鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
1640     *}
1641     BrowserNullTab.Free;
1642 hi_ 1.1 end;
1643     except
1644     end;
1645 h677 1.483
1646 h677 1.224 try
1647 yoffy 1.236 TreeView.Items.BeginUpdate;
1648 yoffy 1.380 TreeView.Items.GetFirstNode.Free;
1649 yoffy 1.236 TreeView.Items.Clear;
1650     TreeView.Items.EndUpdate;
1651 h677 1.224 except
1652     end;
1653 h677 1.230
1654 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1655     try
1656 yoffy 1.236 //AddressHistoryDM鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
1657 h677 1.513 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.MaxRecordCount);
1658 hi_ 1.1 except
1659     end;
1660    
1661 h677 1.234 //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
1662 hi_ 1.1 try
1663 h677 1.623 FHistoryList.SaveToFile(GikoSys.GetConfigDir + 'History.xml');
1664 hi_ 1.1 except
1665     end;
1666 yoffy 1.236 try
1667     try
1668 h677 1.623 FHistoryList.Clear;
1669 yoffy 1.236 except
1670     end;
1671     finally
1672     FHistoryList.Free;
1673     end;
1674 h677 1.221
1675 h677 1.182 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申&鐃?鐃緒申
1676     try
1677     RoundList.SaveRoundFile;
1678     except
1679     end;
1680 yoffy 1.236 try
1681 h677 1.234 try
1682 yoffy 1.236 RoundList.Clear;
1683 h677 1.234 except
1684     end;
1685 yoffy 1.236 finally
1686     RoundList.Free;
1687     end;
1688 h677 1.182
1689 yoffy 1.236 try
1690 h677 1.234 try
1691     FControlThread.Terminate;
1692 yoffy 1.236 FControlThread.WaitFor;
1693 h677 1.234 except
1694 h677 1.219 end;
1695 yoffy 1.236 finally
1696     FControlThread.Free;
1697     end;
1698 h677 1.609 // 鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1699     for i := GikoForm.PlugInMenu.Count - 1 downto 0 do begin
1700     GikoForm.PlugInMenu.items[i].Free;
1701     end;
1702     GikoForm.PlugInMenu.Clear;
1703    
1704 h677 1.230
1705 yoffy 1.155 // TBBS 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 TCategory, TBoard, TThreadItem 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1706     // TBoard, TThreadItem 鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1707     // BoardPluteIns 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1708 h677 1.550 for i := Length(BoardGroups) - 1 downto 0 do begin
1709 h677 1.517 //BoardGroups[i].Clear;
1710     BoardGroups[i].Free;
1711 h677 1.550 end;
1712 h677 1.514
1713 yoffy 1.126 try
1714 h677 1.220 for i := Length( BBSs ) - 1 downto 0 do begin
1715 h677 1.153 if BBSs[ i ] <> nil then
1716     BBSs[ i ].Free;
1717     BBSs[ i ] := nil;
1718     end;
1719     except
1720     end;
1721 yoffy 1.155
1722 h677 1.234 try
1723 yoffy 1.236 if FEvent <> nil then
1724     FEvent.Free;
1725 h677 1.181
1726 h677 1.636 // TODO 鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申
1727     try
1728     if FResPopupBrowser <> nil then begin
1729     TOleControl(FResPopupBrowser).Parent := nil;
1730     FResPopupBrowser.Free;
1731     end;
1732    
1733     except
1734     end;
1735 yoffy 1.2 //Preview鐃?鐃緒申
1736 h677 1.636 if FPreviewBrowser <> nil then begin
1737 yoffy 1.2 FPreviewBrowser.Free;
1738     FPreviewBrowser := nil;
1739     end;
1740     except
1741     end;
1742 h677 1.550 LockWindowUpdate(0);
1743 hi_ 1.1 end;
1744    
1745 yoffy 1.289 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃? BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1746     procedure TGikoForm.SetBBSMenu;
1747 yoffy 1.123 var
1748     i : Integer;
1749 yoffy 1.149 item : TBBSMenuItem;
1750 hi_ 1.1 begin
1751    
1752 yoffy 1.148 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1753     for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1754     try
1755     if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1756 yoffy 1.155 CabinetSelectPopupMenu.Items[ i ].Free;
1757     CabinetMenu.Items[ i ].Free;
1758 yoffy 1.289 BBSSelectPopupMenu.Items[ i ].Free;
1759 yoffy 1.148 end;
1760     except
1761     end;
1762     end;
1763 yoffy 1.289
1764     // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1765 yoffy 1.148 for i := Length( BBSs ) - 1 downto 0 do begin
1766     try
1767     item := TBBSMenuItem.Create( PopupMenu );
1768     item.Caption := BBSs[ i ].Title;
1769     item.Data := BBSs[ i ];
1770     item.OnClick := BBSMenuItemOnClick;
1771     CabinetSelectPopupMenu.Items.Insert( 0, item );
1772     item := TBBSMenuItem.Create( PopupMenu );
1773     item.Caption := BBSs[ i ].Title;
1774     item.Data := BBSs[ i ];
1775     item.OnClick := BBSMenuItemOnClick;
1776     CabinetMenu.Insert( 0, item );
1777 yoffy 1.289 item := TBBSMenuItem.Create( PopupMenu );
1778     item.Caption := BBSs[ i ].Title;
1779     item.Data := BBSs[ i ];
1780     item.OnClick := BBSMenuItemOnClick;
1781     BBSSelectPopupMenu.Items.Insert( 0, Item );
1782 yoffy 1.148 except
1783     end;
1784     end;
1785 yoffy 1.289
1786     end;
1787    
1788     procedure TGikoForm.ReloadBBS;
1789     var
1790     i : Integer;
1791 h677 1.321 tmpBool: Boolean;
1792 yoffy 1.289 begin
1793 h677 1.517 LockWindowUpdate(Self.Handle);
1794    
1795 yoffy 1.289 //鐃?鐃?鐃?鐃緒申鐃?鐃?
1796 h677 1.321 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
1797     GikoSys.Setting.ShowDialogForAllTabClose := false;
1798 h677 1.539 GikoDM.AllTabCloseAction.Execute;
1799 h677 1.321 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
1800 h677 1.320 SetContent(BrowserNullTab);
1801 yoffy 1.289 //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1802     TreeView.Items.Clear;
1803    
1804 h677 1.515 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
1805     try
1806     RoundList.SaveRoundFile;
1807     except
1808     end;
1809     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
1810     try
1811     RoundList.Clear;
1812     except
1813     end;
1814    
1815     //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1816 h677 1.517 try
1817 h677 1.623 FHistoryList.SaveToFile(GikoSys.GetConfigDir + 'History.xml');
1818     FHistoryList.Clear;
1819 h677 1.517 except
1820     end;
1821 h677 1.515
1822     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1823 h677 1.517 try
1824     FavoriteDM.WriteFavorite;
1825     FavoriteDM.Clear;
1826     except
1827     end;
1828 h677 1.515
1829 h677 1.516 //鐃緒申鐃?鐃?鐃緒申鐃?PLUGIN鐃緒申鐃?鐃緒申
1830     for i := Length(BoardGroups) - 1 downto 0 do begin
1831 h677 1.517 try
1832     BoardGroups[i].Free;
1833     except
1834     end;
1835 h677 1.516 end;
1836 yoffy 1.289 //BBS鐃?鐃緒申
1837     try
1838     for i := Length( BBSs ) - 1 downto 0 do begin
1839     if BBSs[ i ] <> nil then
1840     BBSs[ i ].Free;
1841     BBSs[ i ] := nil;
1842     end;
1843     except
1844     end;
1845    
1846     ActiveList := nil;
1847    
1848     FTreeType := gttNone;
1849 h677 1.516
1850     //============鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申================================//
1851    
1852     // 鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?(ReadBoardFile, LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1853     InitializeBoardPlugIns;
1854    
1855 yoffy 1.289 GikoSys.ListBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1856    
1857 h677 1.515 // 鐃緒申鐃緒申鐃緒申鐃緒申BBS鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1858     for i := Length(BBSs) - 1 downto 0 do begin
1859     if not BBSs[i].IsBoardFileRead then
1860     GikoSys.ReadBoardFile(BBSs[i]);
1861     end;
1862    
1863 yoffy 1.289 // BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1864     SetBBSMenu;
1865    
1866 yoffy 1.123 ShowBBSTree( BBSs[ 0 ] );
1867 yoffy 1.143
1868     // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1869 h677 1.623 FHistoryList.LoadFromFile(GikoSys.GetConfigDir + 'History.xml',
1870     TreeView, FTreeType);
1871 yoffy 1.143
1872     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1873     FavoriteDM.ReadFavorite;
1874 yoffy 1.279
1875 yoffy 1.143 SetLinkBar;
1876    
1877 h677 1.515 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1878 h677 1.514 RoundList.LoadRoundBoardFile;
1879     RoundList.LoadRoundThreadFile;
1880    
1881 h677 1.517 LockWindowUpdate(0);
1882 hi_ 1.1 end;
1883    
1884 yoffy 1.602 {!
1885     \todo 鐃緒申鐃緒申 IE 7 鐃緒申鐃緒申 about:.. 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1886     (IE 7 鐃緒申 about:.. 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申)
1887     鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1888     }
1889 hi_ 1.1 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
1890     var
1891     p: TPoint;
1892     s: string;
1893     tmp2: string;
1894     URL: string;
1895     ATitle: Boolean;
1896    
1897 yoffy 1.130 threadItem : TThreadItem;
1898     board : TBoard;
1899 yoffy 1.163 Protocol, Host, Path, Document, Port, Bookmark: string;
1900 yoffy 1.130
1901 h677 1.333 wkInt: Integer;
1902 hi_ 1.1 wkIntSt: Integer;
1903     wkIntTo: Integer;
1904     ActiveFileName: string;
1905     e: IHTMLElement;
1906     Ext: string;
1907     PathRec: TPathRec;
1908 yoffy 1.602 Text2: string;
1909 h677 1.636 cResPopup: TResPopupBrowser;
1910 hi_ 1.1 begin
1911 yoffy 1.602 // 鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申 about:blank.. 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1912     // IE 7 鐃緒申鐃緒申 about:blank.. 鐃緒申鐃緒申鐃緒申鐃緒申 about:.. 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申(鐃緒申鐃緒申鐃緒申鐃緒申)
1913     if Pos('about:..', Text) = 1 then
1914 yoffy 1.603 Text2 := 'about:blank..' + Copy( Text, Length('about:..')+1, Length(Text) )
1915     else
1916     Text2 := Text;
1917 h677 1.316 if not( TObject(Sender) is TWebBrowser )then
1918     Exit;
1919 hi_ 1.1 try
1920     try
1921 h677 1.316 if (TWebBrowser(Sender) <> nil) and (not TWebBrowser(Sender).Busy) and (Assigned(TWebBrowser(Sender).Document)) then begin
1922     if LowerCase(OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset) <> 'shift_jis' then begin
1923     OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset := 'shift_jis';
1924 h677 1.306 end;
1925 hi_ 1.1 end;
1926     except
1927     end;
1928     finally
1929     end;
1930     if PreviewTimer.Enabled then
1931     PreviewTimer.Enabled := False;
1932     Application.CancelHint;
1933 h677 1.333 try
1934     if GetActiveContent <> nil then
1935     ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
1936     else
1937     ActiveFileName := '';
1938     except
1939     FActiveContent := nil;
1940     Exit;
1941     end;
1942 h677 1.628 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1943     if (StatusBar.Panels[1].Text = Text2) then begin
1944 h677 1.636 if Text2 = '' then begin
1945     if FResPopupBrowser <> nil then begin
1946     if not(Sender is TResPopupBrowser) then
1947     FResPopupBrowser.Clear
1948     else begin
1949     TResPopupBrowser(Sender).ChildClear;
1950     end;
1951     end;
1952     end;
1953 h677 1.628 Exit;
1954     end;
1955 yoffy 1.602 StatusBar.Panels[1].Text := Text2;
1956 hi_ 1.1
1957 h677 1.636
1958 hi_ 1.1 if FPreviewBrowser <> nil then
1959     ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
1960    
1961 h677 1.636 if FResPopupBrowser <> nil then begin
1962     if not(Sender is TResPopupBrowser) then begin
1963     if (FResPopupBrowser.Visible) then begin
1964 h677 1.646 if ResPopupClearTimer.Interval > 0 then begin
1965     ResPopupClearTimer.Enabled := True;
1966     ResPopupClearTimer.Tag := 0;
1967     end else begin
1968     FResPopupBrowser.Clear;
1969     end;
1970     end;
1971     end else begin
1972     if ResPopupClearTimer.Interval > 0 then begin
1973 h677 1.643 ResPopupClearTimer.Enabled := True;
1974 h677 1.646 ResPopupClearTimer.Tag := 1;
1975     end else begin
1976     TResPopupBrowser(Sender).ChildClear;
1977 h677 1.636 end;
1978     end;
1979     end;
1980     cResPopup := nil;
1981    
1982     if not(Sender is TResPopupBrowser) then
1983     if not GikoSys.Setting.UnActivePopup then
1984     if not GikoForm.Active then
1985     Exit;
1986 hi_ 1.1
1987 h677 1.628
1988    
1989 hi_ 1.1 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
1990     //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
1991    
1992     s := '';
1993 yoffy 1.602 Ext := AnsiLowerCase(ExtractFileExt(Text2));
1994     if (Pos('http://', Text2) = 1) and (GikoSys.Setting.PreviewVisible) and
1995 hi_ 1.1 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
1996     if FPreviewBrowser = nil then begin
1997     FPreviewBrowser := TPreviewBrowser.Create(Self);
1998     ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
1999     TOleControl(FPreviewBrowser).Parent := nil;
2000     end;
2001 h677 1.316 FPreviewBrowser.Navigate(BLANK_HTML);//鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2002 yoffy 1.602 FPreviewURL := Text2;
2003 hi_ 1.1 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2004     PreviewTimer.Enabled := True;
2005 yoffy 1.602 end else if (Pos('about:blank', Text2) = 1) or (Pos('http://', Text2) = 1) or (Pos('mailto:', Text2) = 1) then begin
2006     if Pos('mailto:', Text2) = 1 then begin
2007     s := StringReplace(Text2, 'mailto:', '', [rfIgnoreCase]);
2008 hi_ 1.1 //鐃?鐃?鐃?鐃?鐃?鐃緒申 鐃?鐃?鐃?3鐃緒申466鐃緒申鐃緒申鐃緒申鐃緒申
2009     GetCursorPos(p);
2010     p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2011     p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2012     e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2013     if (Assigned(e)) then begin
2014 h677 1.636 CreateResPopupBrowser;
2015 h677 1.643
2016     if not(Sender is TResPopupBrowser) then begin
2017     if (FResPopupBrowser.Visible) then begin
2018     FResPopupBrowser.Clear;
2019     end;
2020     end else begin
2021     TResPopupBrowser(Sender).ChildClear;
2022     end;
2023    
2024 h677 1.636 cResPopup := FResPopupBrowser.CreateNewBrowser;
2025 h677 1.297 tmp2 := ZenToHan(e.Get_outerText);
2026 hi_ 1.1 if (GikoSys.IsNumeric(tmp2)) then begin
2027     //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2028 h677 1.600 wkIntSt := StrToInt64(tmp2);
2029     wkIntTo := StrToInt64(tmp2);
2030 h677 1.636 cResPopup.PopupType := gptThread;
2031 h677 1.637 HTMLCreater.SetResPopupText(cResPopup, GetActiveContent(true), wkIntSt, wkIntTo, False, False);
2032 hi_ 1.1 end else begin
2033 h677 1.636 cResPopup.PopupType := gptRaw;
2034     cResPopup.Title := s;
2035 hi_ 1.1 end;
2036     end;
2037     end else begin
2038 h677 1.645 CreateResPopupBrowser;
2039    
2040     if not(Sender is TResPopupBrowser) then begin
2041     if (FResPopupBrowser.Visible) then begin
2042     FResPopupBrowser.Clear;
2043     end;
2044     end else begin
2045     TResPopupBrowser(Sender).ChildClear;
2046     end;
2047    
2048 h677 1.637 threadItem := GetActiveContent(true);
2049 yoffy 1.602 URL := THTMLCreate.GetRespopupURL(Text2, threadItem.URL);
2050 yoffy 1.274 PathRec := Gikosys.Parse2chURL2(URL);
2051 q9_ 1.354 if (PathRec.FNoParam) then begin
2052     PathRec.FSt := 1;
2053     PathRec.FTo := 1;
2054 h677 1.447 end else begin
2055 q9_ 1.352 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2056 h677 1.447 end;
2057 yoffy 1.163 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
2058 hi_ 1.1
2059 h677 1.168 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
2060 yoffy 1.162
2061 yoffy 1.163 URL := GikoSys.GetBrowsableThreadURL( URL );
2062 yoffy 1.274 wkIntSt := PathRec.FSt;
2063     wkIntTo := PathRec.FTo;
2064 hi_ 1.1
2065     if (wkIntSt = 0) and (wkIntTo = 0) then begin
2066     wkIntSt := 1;
2067     wkIntTo := 1;
2068     end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2069     wkIntSt := wkIntTo;
2070     end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2071     wkIntTo := wkIntSt;
2072     end else if wkIntSt > wkIntTo then begin
2073 h677 1.333 wkInt := wkIntTo;
2074 hi_ 1.1 wkIntTo := wkIntSt;
2075 h677 1.333 wkIntSt := wkInt;
2076 hi_ 1.1 end;
2077 h677 1.299 if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
2078 yoffy 1.274 ATitle := false
2079     else
2080     ATitle := true;
2081 hi_ 1.1
2082 yoffy 1.160 threadItem := BBSsFindThreadFromURL( URL );
2083 h677 1.170
2084 yoffy 1.163 if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
2085     board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
2086 yoffy 1.274 if board <> nil then begin
2087     if not board.IsThreadDatRead then
2088     GikoSys.ReadSubjectFile( board );
2089 yoffy 1.270 threadItem := board.FindThreadFromFileName( PathRec.FKey + '.dat' );
2090 yoffy 1.274 end;
2091 yoffy 1.130 end;
2092 h677 1.319
2093 yoffy 1.130 if threadItem <> nil then begin
2094 yoffy 1.127 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2095 h677 1.512 //URL鐃緒申鐃緒申鐃緒申鐃緒申/鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2096     if ( IntToStr(wkIntSt) = ChangeFileExt(threadItem.FileName, '') ) then begin
2097     wkIntSt := 1;
2098     wkIntTo := 1;
2099     end;
2100 h677 1.636 cResPopup := FResPopupBrowser.CreateNewBrowser;
2101     cResPopup.PopupType := gptThread;
2102     HTMLCreater.SetResPopupText(cResPopup, threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2103 yoffy 1.127 end;
2104 hi_ 1.1 end;
2105 h677 1.168 end;
2106 h677 1.636 if (cResPopup <> nil) then begin
2107 h677 1.643 ResPopupClearTimer.Enabled := False;
2108    
2109 h677 1.636 if cResPopup.PopupType = gptRaw then begin
2110     if cResPopup.Title <> '' then begin
2111     cResPopup.TitlePopup;
2112     end;
2113     end else begin
2114     if cResPopup.RawDocument <> '' then begin
2115     cResPopup.Popup;
2116     end else if cResPopup.Title <> '' then begin
2117     cResPopup.TitlePopup;
2118     end;
2119     end;
2120     end;
2121 hi_ 1.1 end;
2122     end;
2123    
2124     procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2125     var
2126     SysMenu: HMenu;
2127     begin
2128     FEnabledCloseButton := Enabled;
2129     SysMenu := GetSystemMenu(Handle, False);
2130    
2131     if Enabled then begin
2132     EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2133     end else begin
2134     EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2135     end;
2136    
2137     DrawMenuBar(Handle);
2138     end;
2139    
2140     procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2141     var AllowChange: Boolean);
2142     begin
2143 q9_ 1.369 //鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2144     // if FTreeType = gtt2ch then
2145     // FSortIndex := -1;
2146 hi_ 1.1 end;
2147    
2148     procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2149     Shift: TShiftState);
2150 yoffy 1.428 var
2151     pos : TPoint;
2152 hi_ 1.1 begin
2153 yoffy 1.236 if GetActiveList is TBoard then begin
2154 yoffy 1.428 case Key of
2155     VK_BACK:; // UpFolderButtonClick(Sender);
2156     VK_SPACE: ListDoubleClick(Shift);
2157     VK_RETURN: ListClick;
2158     VK_APPS:
2159     begin
2160     if ListView.Selected <> nil then begin
2161     pos.X := ListView.Column[ 0 ].Width;
2162     pos.Y := ListView.Selected.Top;
2163     end else begin
2164     pos.X := ListView.Left;
2165     pos.Y := ListView.Top;
2166     end;
2167     Windows.ClientToScreen( ListView.Handle, pos );
2168     ListPopupMenu.Popup( pos.X, pos.Y );
2169     end;
2170 yoffy 1.236 end;
2171     end else begin // TBBS, TCategory
2172 yoffy 1.428 case Key of
2173     VK_BACK:; // UpFolderButtonClick(Sender);
2174     VK_SPACE: ListClick;
2175     VK_RETURN: ListDoubleClick(Shift);
2176     VK_APPS:
2177     begin
2178     if ListView.Selected <> nil then begin
2179     pos.X := ListView.Column[ 0 ].Width;
2180     pos.Y := ListView.Selected.Top;
2181     end else begin
2182     pos.X := ListView.Left;
2183     pos.Y := ListView.Top;
2184     end;
2185     Windows.ClientToScreen( ListView.Handle, pos );
2186     ListPopupMenu.Popup( pos.X, pos.Y );
2187     end;
2188 yoffy 1.236 end;
2189 hi_ 1.1 end;
2190     end;
2191    
2192     function TGikoForm.GetHttpState: Boolean;
2193     begin
2194     Result := FHttpState;
2195     end;
2196    
2197     procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2198     Column: TListColumn);
2199 yoffy 1.413 var
2200     id, idx : Integer;
2201     orderList : TList;
2202 h677 1.570 vSortIndex : Integer;
2203     vSortOrder : Boolean;
2204 hi_ 1.1 begin
2205 h677 1.530 idx := TListViewUtils.ActiveListTrueColumn( Column ).Tag;
2206 h677 1.570 if TObject( FActiveList ) is TBBS then begin
2207     orderList := GikoSys.Setting.BBSColumnOrder;
2208     vSortIndex := GikoSys.Setting.BBSSortIndex;
2209     vSortOrder := GikoSys.Setting.BBSSortOrder;
2210     end else if TObject( FActiveList ) is TCategory then begin
2211     orderList := GikoSys.Setting.CategoryColumnOrder;
2212     vSortIndex := GikoSys.Setting.CategorySortIndex;
2213     vSortOrder := GikoSys.Setting.CategorySortOrder;
2214     end else if TObject( FActiveList ) is TBoard then begin
2215     orderList := GikoSys.Setting.BoardColumnOrder;
2216     vSortIndex := GikoSys.Setting.BoardSortIndex;
2217     vSortOrder := GikoSys.Setting.BoardSortOrder;
2218     end else
2219 yoffy 1.413 Exit;
2220    
2221     id := Integer( orderList[ idx ] );
2222    
2223 h677 1.570
2224     if vSortIndex = id then
2225     vSortOrder := not vSortOrder
2226 h677 1.464 else begin
2227 h677 1.572 vSortOrder := id = 0;
2228 h677 1.570 end;
2229 h677 1.572
2230 h677 1.570 TListViewUtils.ListViewSort(Sender, ListView, Column, GikoDM.ListNumberVisibleAction.Checked, vSortOrder);
2231 hi_ 1.1 end;
2232    
2233     procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2234     Button: TToolButton; State: TCustomDrawState; var