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.662 - (hide annotations) (download) (as text)
Sun Mar 2 03:54:08 2008 UTC (16 years, 1 month ago) by h677
Branch: MAIN
Changes since 1.661: +5 -3 lines
File MIME type: text/x-pascal
レス数1000越えで巡回登録を消すのを2chのみに限定

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