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.124 - (hide annotations) (download) (as text)
Sat Nov 22 04:57:17 2003 UTC (20 years, 5 months ago) by yoffy
Branch: MAIN
Changes since 1.123: +54 -20 lines
File MIME type: text/x-pascal
・ギコナビを終了するときにクラッシュするので、
 根本的な解決策ではないが開放処理をシステムに任せてみた。

1 hi_ 1.1 unit Giko;
2    
3     interface
4    
5     uses
6     Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7 yoffy 1.117 OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils, Math,
8 hi_ 1.4 {$IF Defined(DELPRO) }
9 yoffy 1.107 SHDocVw,
10 hi_ 1.4 MSHTML,
11     {$ELSE}
12     SHDocVw_TLB,
13     MSHTML_TLB,
14     {$IFEND}
15 yoffy 1.2 IdHTTP, ActiveX, Clipbrd, Buttons, ToolWin, {HTTPApp,} YofUtils, IdComponent,
16 hi_ 1.4 ShellAPI, ImgList, ActnList, UrlMon, Tabs, IdGlobal, StrUtils,
17 yoffy 1.2 CommCtrl, IniFiles,
18 hi_ 1.1 GikoSystem, GikoUtil, Setting, BoardGroup, ThreadControl, ItemDownload,
19     Editor, RoundData, RoundName, KeySetting, GikoPanel, Favorite, FavoriteAdd,
20     FavoriteArrange, AddressHistory, Preview, HTMLDocumentEvent, Kotehan,
21 h677 1.35 HintWindow, GikoCoolBar, GikoListView, ToolBarSetting, ToolBarUtil,
22 yoffy 1.121 IndividualAbon, Dialogs, Search, ExternalBoardManager, ExternalBoardPlugInMain, StdActns;
23 hi_ 1.1
24     type
25     TGikoTreeType = (gttNone, gtt2ch, gttHistory);
26    
27     TGikoForm = class(TForm)
28     StatusBar: TStatusBar;
29     MainPanel: TPanel;
30     ClientPanel: TPanel;
31     TreeSplitter: TSplitter;
32     CabinetPanel: TPanel;
33     TreeView: TTreeView;
34     ThreadMainPanel: TPanel;
35     ListSplitter: TSplitter;
36     ViewPanel: TPanel;
37 yoffy 1.51 ListView: TGikoListView;
38 hi_ 1.1 ThreadPanel: TPanel;
39     Browser: TWebBrowser;
40     MessagePanel: TPanel;
41     MessageBar: TPanel;
42     MessageHideButton: TSpeedButton;
43     MessageListView: TListView;
44     MessageSplitter: TSplitter;
45     Panel3: TPanel;
46     SpeedButton1: TSpeedButton;
47     ToolBar1: TToolBar;
48     CabinetSelectToolButton: TToolButton;
49     HistoryToolBar: TToolBar;
50     ToolButton15: TToolButton;
51     ToolButton18: TToolButton;
52     ItemIcon16: TImageList;
53     ItemIcon32: TImageList;
54 yoffy 1.2 HotToobarImageList: TImageList;
55 yoffy 1.51 ToobarImageList: TImageList;
56 hi_ 1.1 ItemImageList: TImageList;
57 yoffy 1.2 ActionList: TActionList;
58 hi_ 1.1 LogDeleteAction: TAction;
59     KidokuAction: TAction;
60     StdToolBarVisibleAction: TAction;
61     SearchAction: TAction;
62 yoffy 1.51 GikoNaviWebPageAction: TAction;
63 hi_ 1.1 AboutAction: TAction;
64     ExitAction: TAction;
65 yoffy 1.51 MsgBarVisibleAction: TAction;
66 hi_ 1.1 StatusBarVisibleAction: TAction;
67     LargeIconAction: TAction;
68     SmallIconAction: TAction;
69     ListIconAction: TAction;
70 yoffy 1.51 DetailIconAction: TAction;
71 hi_ 1.1 Cabinet2chAction: TAction;
72     CabinetHistoryAction: TAction;
73 yoffy 1.51 CabinetVisibleAction: TAction;
74     MidokuAction: TAction;
75 hi_ 1.1 AllSelectAction: TAction;
76     UpFolderAction: TAction;
77 yoffy 1.51 ListNumberVisibleAction: TAction;
78 hi_ 1.1 AllItemAction: TAction;
79 yoffy 1.51 LogItemAction: TAction;
80     NewItemAction: TAction;
81 hi_ 1.1 SelectItemAction: TAction;
82     ShowThreadAction: TAction;
83     StopAction: TAction;
84     MainMenu: TMainMenu;
85     FileMenu: TMenuItem;
86 yoffy 1.51 DeleteMenu: TMenuItem;
87     ExitMenu: TMenuItem;
88     KidokuMenu: TMenuItem;
89 hi_ 1.1 MidokuMenu: TMenuItem;
90 yoffy 1.51 AllSelectMenu: TMenuItem;
91 hi_ 1.1 ViewMenu: TMenuItem;
92     StdToolBarMenu: TMenuItem;
93     CabinetMenu: TMenuItem;
94     N6: TMenuItem;
95 yoffy 1.51 H1: TMenuItem;
96 hi_ 1.1 N4: TMenuItem;
97 yoffy 1.51 CabinetVisibleMenu: TMenuItem;
98 hi_ 1.1 MessageMenu: TMenuItem;
99     StatusBarMenu: TMenuItem;
100     MMSep03: TMenuItem;
101 yoffy 1.51 LargeIconMenu: TMenuItem;
102 hi_ 1.1 SmallIconMenu: TMenuItem;
103     ListMenu: TMenuItem;
104     DetailMenu: TMenuItem;
105 yoffy 1.51 ToolMenu: TMenuItem;
106 hi_ 1.1 Find1: TMenuItem;
107     RoundMenu: TMenuItem;
108     MMSep04: TMenuItem;
109     OptionMenu: TMenuItem;
110     HelpMenu: TMenuItem;
111     G1: TMenuItem;
112 yoffy 1.51 N1: TMenuItem;
113 hi_ 1.1 AboutMenu: TMenuItem;
114 yoffy 1.51 IconStyle: TAction;
115 hi_ 1.1 BrowserPopupMenu: TPopupMenu;
116 yoffy 1.51 ShowThreadMenu: TMenuItem;
117 yoffy 1.2 ShowBoardMenu: TMenuItem;
118 hi_ 1.1 ShowBoardAction: TAction;
119     ListIconPopupMenu: TPopupMenu;
120     LargeIconPMenu: TMenuItem;
121     SmallIconPMenu: TMenuItem;
122     ListPMenu: TMenuItem;
123 yoffy 1.51 DetailPMenu: TMenuItem;
124     CabinetCloseAction: TAction;
125 hi_ 1.1 ClosePopupMenu: TPopupMenu;
126 yoffy 1.51 CloseMenu: TMenuItem;
127     OptionAction: TAction;
128 hi_ 1.1 U1: TMenuItem;
129     N3: TMenuItem;
130     B1: TMenuItem;
131     S1: TMenuItem;
132     N2: TMenuItem;
133     A1: TMenuItem;
134     L1: TMenuItem;
135     N5: TMenuItem;
136     S2: TMenuItem;
137 yoffy 1.51 RoundAction: TAction;
138 hi_ 1.1 ListPopupMenu: TPopupMenu;
139 yoffy 1.51 ListRoundPMenu: TMenuItem;
140 hi_ 1.1 ListReservPMenu: TMenuItem;
141     LPMSep01: TMenuItem;
142 yoffy 1.51 ItemRoundPMenu: TMenuItem;
143 hi_ 1.1 LPMSep02: TMenuItem;
144 yoffy 1.2 KidokuPMenu: TMenuItem;
145 hi_ 1.1 MidokuPMenu: TMenuItem;
146     AllSelectPMenu: TMenuItem;
147     UrlCopyPMenu: TMenuItem;
148     LPMSep05: TMenuItem;
149     DeletePMenu: TMenuItem;
150     LPMSep06: TMenuItem;
151     ViewPMenu: TMenuItem;
152     LargeIconLPMenu: TMenuItem;
153     SmallIconLPMenu: TMenuItem;
154     ListLPMenu: TMenuItem;
155     DetailLPMenu: TMenuItem;
156     T1: TMenuItem;
157     B2: TMenuItem;
158     N8: TMenuItem;
159     URLCopyAction: TAction;
160 yoffy 1.51 URLC1: TMenuItem;
161     N9: TMenuItem;
162 hi_ 1.1 N10: TMenuItem;
163 yoffy 1.51 MsgBarCloseAction: TAction;
164     ScrollTopAction: TAction;
165 hi_ 1.1 ScrollLastAction: TAction;
166     ScrollNewAction: TAction;
167     ScrollKokoAction: TAction;
168 yoffy 1.51 EditorAction: TAction;
169 hi_ 1.1 IEAction: TAction;
170     ItemReloadAction: TAction;
171 yoffy 1.51 BrowserMaxAction: TAction;
172 hi_ 1.1 G2: TMenuItem;
173     N11: TMenuItem;
174     T3: TMenuItem;
175     L2: TMenuItem;
176     N12: TMenuItem;
177     K1: TMenuItem;
178     N13: TMenuItem;
179     N14: TMenuItem;
180     R1: TMenuItem;
181     A2: TMenuItem;
182     N15: TMenuItem;
183 yoffy 1.51 SelectListReloadAction: TAction;
184     SelectThreadReloadAction: TAction;
185 hi_ 1.1 SelectTimer: TTimer;
186     KokoPopupMenu: TPopupMenu;
187     KokomadePMenu: TMenuItem;
188 yoffy 1.2 AllPMenu: TMenuItem;
189 hi_ 1.1 MenuItem1: TMenuItem;
190     MenuItem2: TMenuItem;
191     BrowserTabCloseAction: TAction;
192     BrowserTabPopupMenu: TPopupMenu;
193 yoffy 1.51 Close1: TMenuItem;
194 hi_ 1.1 KokomadeAction: TAction;
195     ZenbuAction: TAction;
196     KokoResAction: TAction;
197     SelectItemURLCopyAction: TAction;
198     SelectReservAction: TAction;
199     NotSelectTabCloseAction: TAction;
200     A3: TMenuItem;
201 yoffy 1.51 N16: TMenuItem;
202 hi_ 1.1 A4: TMenuItem;
203     TreePopupMenu: TPopupMenu;
204     TreeSelectThreadPupupMenu: TMenuItem;
205 yoffy 1.51 TreeSelectBoardPupupMenu: TMenuItem;
206 hi_ 1.1 TPMSep01: TMenuItem;
207     TreeSelectURLPupupMenu: TMenuItem;
208     TreeSelectBoradReload: TAction;
209 yoffy 1.51 TreeSelectThreadReload: TAction;
210 hi_ 1.1 TreeSelectURLCopy: TAction;
211     ListToolBarVisibleAction: TAction;
212     BrowserToolBarVisibleAction: TAction;
213     T2: TMenuItem;
214 yoffy 1.2 L3: TMenuItem;
215 hi_ 1.1 B3: TMenuItem;
216     BrowserBottomPanel: TGikoPanel;
217     CabinetSelectPopupMenu: TPopupMenu;
218     H2: TMenuItem;
219 yoffy 1.51 ItemReservPMenu: TMenuItem;
220     RoundNamePopupMenu: TPopupMenu;
221 hi_ 1.1 SelectNewRoundName: TAction;
222 yoffy 1.51 SelectDeleteRound: TAction;
223     NewBoardAction: TAction;
224 yoffy 1.2 N7: TMenuItem;
225 hi_ 1.1 B4: TMenuItem;
226     LoginAction: TAction;
227     L4: TMenuItem;
228     KeySettingAction: TAction;
229     K2: TMenuItem;
230     AllTabCloseAction: TAction;
231 yoffy 1.51 A5: TMenuItem;
232 hi_ 1.1 N18: TMenuItem;
233     A6: TMenuItem;
234 yoffy 1.51 C1: TMenuItem;
235     V1: TMenuItem;
236     N19: TMenuItem;
237 hi_ 1.1 D1: TMenuItem;
238 yoffy 1.51 D2: TMenuItem;
239 hi_ 1.1 N20: TMenuItem;
240 yoffy 1.51 MessageImageList: TImageList;
241     ProgressBar: TProgressBar;
242     ArrangeAction: TAction;
243     URL1: TMenuItem;
244     NameURLCopyAction: TAction;
245     SelectItemNameURLCopyAction: TAction;
246 hi_ 1.1 NameUrlCopyPMenu: TMenuItem;
247     URLC2: TMenuItem;
248 yoffy 1.51 URLN1: TMenuItem;
249     N21: TMenuItem;
250     URLC3: TMenuItem;
251 yoffy 1.2 URLN2: TMenuItem;
252 hi_ 1.1 N22: TMenuItem;
253 yoffy 1.51 N23: TMenuItem;
254 yoffy 1.2 ListCoolBar: TGikoCoolBar;
255 hi_ 1.1 ListToolBar: TToolBar;
256     ViewNoButton: TToolButton;
257     IconToolButton: TToolButton;
258 yoffy 1.51 UpFolderButton: TToolButton;
259     Sepa01ToolButton: TToolButton;
260 yoffy 1.2 AllItemToolButton: TToolButton;
261 hi_ 1.1 LogItemToolButton: TToolButton;
262     NewItemToolButton: TToolButton;
263 yoffy 1.51 ListDownloadToolButton: TToolButton;
264 hi_ 1.1 ListThreadDownloadToolButton: TToolButton;
265 yoffy 1.51 ToolButton2: TToolButton;
266     ToolButton1: TToolButton;
267 yoffy 1.2 BrowserCoolBar: TGikoCoolBar;
268 hi_ 1.1 BrowserToolBar: TToolBar;
269 yoffy 1.51 BrowserSizeButton: TToolButton;
270 hi_ 1.1 ToolButton3: TToolButton;
271     TopButton: TToolButton;
272 yoffy 1.2 LastBotton: TToolButton;
273     NewButton: TToolButton;
274 yoffy 1.51 KokoButton: TToolButton;
275     ToolButton9: TToolButton;
276 yoffy 1.2 EditorButton: TToolButton;
277 hi_ 1.1 ToolButton11: TToolButton;
278     IEButton: TToolButton;
279 yoffy 1.51 ToolButton5: TToolButton;
280     ItemReloadButton: TToolButton;
281 hi_ 1.1 ListNameToolBar: TToolBar;
282 yoffy 1.51 ListNameLabel: TLabel;
283 hi_ 1.1 FolderImage: TImage;
284     BrowserNameToolBar: TToolBar;
285     ItemBoardImage: TImage;
286     BrowserBoardNameLabel: TLabel;
287 yoffy 1.51 ItemImage: TImage;
288     BrowserNameLabel: TLabel;
289     ActiveLogDeleteAction: TAction;
290     N24: TMenuItem;
291     D3: TMenuItem;
292     N25: TMenuItem;
293 hi_ 1.1 N26: TMenuItem;
294     ListNameBarVisibleAction: TAction;
295     D4: TMenuItem;
296     BrowserNameBarVisibleAction: TAction;
297     S3: TMenuItem;
298 yoffy 1.51 R2: TMenuItem;
299     TreeSelectNameURLCopy: TAction;
300     TreeSelectNameURLPupupMenu: TMenuItem;
301     N27: TMenuItem;
302 hi_ 1.1 H3: TMenuItem;
303     PaneInitAction: TAction;
304 yoffy 1.51 I1: TMenuItem;
305     BrowserTabToolBar: TToolBar;
306     BrowserTab: TTabControl;
307 hi_ 1.1 ToolButton7: TToolButton;
308 yoffy 1.2 BrowserMinAction: TAction;
309 yoffy 1.51 About1: TMenuItem;
310     N28: TMenuItem;
311     SelectTextClearAction: TAction;
312     MailTextClearAction: TAction;
313 hi_ 1.1 NameTextClearAction: TAction;
314 yoffy 1.51 S4: TMenuItem;
315 yoffy 1.2 N29: TMenuItem;
316     N30: TMenuItem;
317 hi_ 1.1 LeftmostTabSelectAction: TAction;
318 yoffy 1.51 LeftTabSelectAction: TAction;
319     RightTabSelectAction: TAction;
320     RightmostTabSelectAction: TAction;
321 yoffy 1.2 N31: TMenuItem;
322 hi_ 1.1 L5: TMenuItem;
323 yoffy 1.51 L6: TMenuItem;
324 hi_ 1.1 A7: TMenuItem;
325 yoffy 1.51 R3: TMenuItem;
326 hi_ 1.1 FavoriteMenu: TMenuItem;
327 yoffy 1.51 FavoriteAddAction: TAction;
328     N32: TMenuItem;
329 hi_ 1.1 BoardFavoriteAddMenu: TMenuItem;
330 yoffy 1.2 BoardFavoriteAddAction: TAction;
331 hi_ 1.1 ThreadFavoriteAddAction: TAction;
332     ThreadFavoriteAddMenu: TMenuItem;
333     TreeSelectFavoriteAddAction: TAction;
334 yoffy 1.2 N33: TMenuItem;
335 hi_ 1.1 TreeSelectFavoriteAddPupupMenu: TMenuItem;
336     FavoriteArrangeAction: TAction;
337     FavoriteTreeView: TTreeView;
338 yoffy 1.51 StateIconImageList: TImageList;
339     TopPanel: TPanel;
340     TopRightPanel: TPanel;
341     AnimePanel: TPanel;
342 hi_ 1.1 Animate: TAnimate;
343     TopCoolPanel: TPanel;
344 yoffy 1.51 MainCoolBar: TGikoCoolBar;
345     MenuToolBar: TToolBar;
346     StdToolBar: TToolBar;
347     RoundToolButton: TToolButton;
348     ToolButton6: TToolButton;
349 yoffy 1.2 CabinetToolButton: TToolButton;
350 yoffy 1.51 ToolButton4: TToolButton;
351 hi_ 1.1 ToolButton13: TToolButton;
352     AbortToolButton: TToolButton;
353     LoginToolButton: TToolButton;
354 yoffy 1.51 AddressToolBar: TToolBar;
355     AddressComboBox: TComboBox;
356     MoveToToolButton: TToolButton;
357 yoffy 1.2 MoveToAction: TAction;
358 yoffy 1.51 AddressImageList: TImageList;
359     AddressBarVisibleAction: TAction;
360     AddressToolBarMenu: TMenuItem;
361     T4: TMenuItem;
362 hi_ 1.1 BrowserTabVisibleAction: TAction;
363 yoffy 1.51 Show1: TMenuItem;
364     N34: TMenuItem;
365     BrowserTabTopAction: TAction;
366 yoffy 1.2 BrowserTabBottomAction: TAction;
367 hi_ 1.1 T5: TMenuItem;
368     B5: TMenuItem;
369 yoffy 1.51 N35: TMenuItem;
370     BrowserTabTabStyleAction: TAction;
371     BrowserTabButtonStyleAction: TAction;
372     BrowserTabFlatStyleAction: TAction;
373     A8: TMenuItem;
374     U2: TMenuItem;
375 hi_ 1.1 F1: TMenuItem;
376     PreviewTimer: TTimer;
377 yoffy 1.51 MonazillaWebPageAction: TAction;
378     MonazillaWebPageAction1: TMenuItem;
379 hi_ 1.1 GikoHelpAction: TAction;
380 yoffy 1.51 N36: TMenuItem;
381     H4: TMenuItem;
382     KotehanAction: TAction;
383     K3: TMenuItem;
384     LinkBarVisibleAction: TAction;
385     L7: TMenuItem;
386     N37: TMenuItem;
387     A9: TMenuItem;
388 yoffy 1.2 ChevronPopupMenu: TPopupMenu;
389 yoffy 1.51 BBS2chWebPageAction: TAction;
390 yoffy 1.2 N2N1: TMenuItem;
391 hi_ 1.1 N38: TMenuItem;
392     GikoFolderOpenAction: TAction;
393 yoffy 1.2 F2: TMenuItem;
394 yoffy 1.51 LinkToolBar: TToolBar;
395     a10: TMenuItem;
396     ToolButton8: TToolButton;
397 yoffy 1.2 ToolButton10: TToolButton;
398 yoffy 1.51 ThreadEditorAction: TAction;
399     N39: TMenuItem;
400     T6: TMenuItem;
401     N40: TMenuItem;
402 yoffy 1.2 LinkBarPopupMenu: TPopupMenu;
403 yoffy 1.51 ToolBarSettingAction: TAction;
404     T7: TMenuItem;
405     ToolButton12: TToolButton;
406     ToolButton14: TToolButton;
407     ThreadPopupMenu: TPopupMenu;
408     MenuItem4: TMenuItem;
409     MenuItem5: TMenuItem;
410     MenuItem6: TMenuItem;
411 yoffy 1.2 T8: TMenuItem;
412 yoffy 1.51 NameCopyAction: TAction;
413     BoardIEAction: TAction;
414     URLN3: TMenuItem;
415     SelectItemNameCopyAction: TAction;
416 yoffy 1.2 SelectItemNameCopyAction1: TMenuItem;
417 yoffy 1.51 B6: TMenuItem;
418     T9: TMenuItem;
419     C2: TMenuItem;
420     SelectComboBox: TComboBox;
421     MainCoolBarPopupMenu: TPopupMenu;
422     StdToolBarVisiblePMenu: TMenuItem;
423     AddressToolBarVisiblePMenu: TMenuItem;
424     LinkToolBarVisiblePMenu: TMenuItem;
425     NG1: TMenuItem;
426     NG2: TMenuItem;
427     N43: TMenuItem;
428     N44: TMenuItem;
429     L9: TMenuItem;
430     I3: TMenuItem;
431     N45: TMenuItem;
432     B9: TMenuItem;
433     R5: TMenuItem;
434     T12: TMenuItem;
435     Show3: TMenuItem;
436     N46: TMenuItem;
437     T13: TMenuItem;
438     B10: TMenuItem;
439     N47: TMenuItem;
440     A12: TMenuItem;
441     U4: TMenuItem;
442     F4: TMenuItem;
443     N48: TMenuItem;
444     T14: TMenuItem;
445     SelectItemToolButton: TToolButton;
446     SelectResToolButton: TToolButton;
447     SelectResAction: TAction;
448     ToolButton16: TToolButton;
449     AllResAction: TAction;
450     AllResToolButton: TToolButton;
451     N50: TMenuItem;
452     A11: TMenuItem;
453     S5: TMenuItem;
454     Reload: TMenuItem;
455     GoBack: TMenuItem;
456     GoFoward: TMenuItem;
457     EditAction: TAction;
458     ReloadAction: TAction;
459     GoFowardAction: TAction;
460     GoBackAction: TAction;
461     SelectComboBoxSplitter: TImage;
462     IndividualAbon1: TMenuItem;
463     N41: TMenuItem;
464     IndividualAbon2: TMenuItem;
465     N42: TMenuItem;
466     CancellIndividualAbon: TAction;
467     AntiIndividualAbon: TMenuItem;
468     N49: TMenuItem;
469     N51: TMenuItem;
470     N52: TMenuItem;
471     N53: TMenuItem;
472     SearchBoardName: TMenuItem;
473     N55: TMenuItem;
474     TreeSelectSearchBoardName: TAction;
475 yoffy 1.100 CabinetFavoriteAction: TAction;
476     N54: TMenuItem;
477     A13: TMenuItem;
478     FavoriteTreePopupMenu: TPopupMenu;
479     FavoriteTreeViewRenameAction: TAction;
480     FavoriteTreeRenamePopupMenu: TMenuItem;
481     FavoriteTreeViewNewFolderAction: TAction;
482     FavoriteTreeNewFolderPopupMenu: TMenuItem;
483     N56: TMenuItem;
484     FavoriteTreeViewDeleteAction: TAction;
485     FavoriteTreeDeletePopupMenu: TMenuItem;
486     FavoriteToolBar: TToolBar;
487     ToolButton17: TToolButton;
488     ToolButton19: TToolButton;
489     FavoriteTreeViewBrowseFolderAction: TAction;
490     FavoriteTreeBrowseFolderPopupMenu: TMenuItem;
491     N57: TMenuItem;
492     FavoriteTreeReloadPopupMenu: TMenuItem;
493     N58: TMenuItem;
494     FavoriteTreeURLCopyPopupMenu: TMenuItem;
495     FavoriteTreeNameCopyPopupMenu: TMenuItem;
496     FavoriteTreeLogDeletePopupMenu: TMenuItem;
497     N59: TMenuItem;
498     FavoriteTreeNameURLCopyPopupMenu: TMenuItem;
499     FavoriteTreeViewReloadAction: TAction;
500     FavoriteTreeViewURLCopyAction: TAction;
501     FavoriteTreeViewNameCopyAction: TAction;
502     FavoriteTreeViewNameURLCopyAction: TAction;
503     FavoriteTreeViewLogDeleteAction: TAction;
504     OnlyAHundredRes: TAction;
505     ToolButton20: TToolButton;
506     AHundredResButton: TToolButton;
507     N60: TMenuItem;
508 yoffy 1.107 N61: TMenuItem;
509     ExportFavoriteFileAction1: TMenuItem;
510     ExportFavoriteFile: TFileSaveAs;
511 hi_ 1.1 procedure FormCreate(Sender: TObject);
512     procedure FormDestroy(Sender: TObject);
513     procedure CabinetPanelHide(Sender: TObject);
514     procedure FormClose(Sender: TObject; var Action: TCloseAction);
515     procedure TreeViewChange(Sender: TObject; Node: TTreeNode);
516     procedure ListViewData(Sender: TObject; Item: TListItem);
517     procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
518     const FindString: String; const FindPosition: TPoint;
519     FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
520     Wrap: Boolean; var Index: Integer);
521     procedure ListViewDataHint(Sender: TObject; StartIndex,
522     EndIndex: Integer);
523     procedure ListViewDataStateChange(Sender: TObject; StartIndex,
524     EndIndex: Integer; OldState, NewState: TItemStates);
525     procedure BrowserStatusTextChange(Sender: TObject;
526     const Text: WideString);
527     procedure BrowserTitleChange(Sender: TObject; const Text: WideString);
528     procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
529     procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
530     var AllowChange: Boolean);
531     procedure ListViewKeyDown(Sender: TObject; var Key: Word;
532     Shift: TShiftState);
533     procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
534     procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
535     Button: TToolButton; State: TCustomDrawState;
536     var DefaultDraw: Boolean);
537     procedure BrowserBeforeNavigate2(Sender: TObject;
538     const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
539     Headers: OleVariant; var Cancel: WordBool);
540     procedure ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
541     Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
542     var DefaultDraw: Boolean);
543     procedure TreeViewCustomDraw(Sender: TCustomTreeView;
544     const ARect: TRect; var DefaultDraw: Boolean);
545     procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
546     Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
547     procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
548     procedure TreeViewDblClick(Sender: TObject);
549 yoffy 1.100 procedure FavoriteTreeViewClick(Sender: TObject);
550 hi_ 1.1 procedure ListViewCustomDraw(Sender: TCustomListView;
551     const ARect: TRect; var DefaultDraw: Boolean);
552     procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
553     Shift: TShiftState; X, Y: Integer);
554     procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
555     procedure MessageListViewResize(Sender: TObject);
556     procedure ExitActionExecute(Sender: TObject);
557     procedure AllSelectActionExecute(Sender: TObject);
558     procedure StdToolBarVisibleActionExecute(Sender: TObject);
559     procedure MsgBarVisibleActionExecute(Sender: TObject);
560     procedure StatusBarVisibleActionExecute(Sender: TObject);
561     procedure LargeIconActionExecute(Sender: TObject);
562     procedure SmallIconActionExecute(Sender: TObject);
563     procedure ListIconActionExecute(Sender: TObject);
564     procedure DetailIconActionExecute(Sender: TObject);
565     procedure SearchActionExecute(Sender: TObject);
566     procedure OptionActionExecute(Sender: TObject);
567     procedure GikoNaviWebPageActionExecute(Sender: TObject);
568     procedure AboutActionExecute(Sender: TObject);
569     procedure CabinetHistoryActionExecute(Sender: TObject);
570     procedure CabinetVisibleActionExecute(Sender: TObject);
571     procedure AllItemActionExecute(Sender: TObject);
572     procedure LogItemActionExecute(Sender: TObject);
573     procedure NewItemActionExecute(Sender: TObject);
574     procedure SelectItemActionExecute(Sender: TObject);
575     procedure ListNumberVisibleActionExecute(Sender: TObject);
576     procedure UpFolderActionExecute(Sender: TObject);
577     procedure IconStyleExecute(Sender: TObject);
578     procedure RoundActionExecute(Sender: TObject);
579     procedure StopActionExecute(Sender: TObject);
580     procedure MsgBarCloseActionExecute(Sender: TObject);
581     procedure BrowserMaxActionExecute(Sender: TObject);
582     procedure ScrollTopActionExecute(Sender: TObject);
583     procedure ScrollLastActionExecute(Sender: TObject);
584     procedure ScrollNewActionExecute(Sender: TObject);
585     procedure ScrollKokoActionExecute(Sender: TObject);
586     procedure EditorActionExecute(Sender: TObject);
587     procedure IEActionExecute(Sender: TObject);
588     procedure ShowThreadActionExecute(Sender: TObject);
589     procedure ShowBoardActionExecute(Sender: TObject);
590     procedure URLCopyActionExecute(Sender: TObject);
591     procedure ItemReloadActionExecute(Sender: TObject);
592     procedure SelectListReloadActionExecute(Sender: TObject);
593     procedure SelectThreadReloadActionExecute(Sender: TObject);
594     procedure SelectListReloadActionUpdate(Sender: TObject);
595     procedure AllItemActionUpdate(Sender: TObject);
596     procedure LogItemActionUpdate(Sender: TObject);
597     procedure NewItemActionUpdate(Sender: TObject);
598     procedure SelectItemActionUpdate(Sender: TObject);
599     procedure UpFolderActionUpdate(Sender: TObject);
600     procedure FormResize(Sender: TObject);
601     procedure ScrollTopActionUpdate(Sender: TObject);
602     procedure ScrollLastActionUpdate(Sender: TObject);
603     procedure ScrollNewActionUpdate(Sender: TObject);
604     procedure ScrollKokoActionUpdate(Sender: TObject);
605     procedure EditorActionUpdate(Sender: TObject);
606     procedure IEActionUpdate(Sender: TObject);
607     procedure ShowThreadActionUpdate(Sender: TObject);
608     procedure ShowBoardActionUpdate(Sender: TObject);
609     procedure SelectThreadReloadActionUpdate(Sender: TObject);
610     procedure ListViewSelectItem(Sender: TObject; Item: TListItem;
611     Selected: Boolean);
612     procedure SelectTimerTimer(Sender: TObject);
613 yoffy 1.51 procedure ItemReloadActionUpdate(Sender: TObject);
614 hi_ 1.1 procedure ListViewDblClick(Sender: TObject);
615 yoffy 1.51 procedure LogDeleteActionExecute(Sender: TObject);
616 hi_ 1.1 procedure KokomadeActionExecute(Sender: TObject);
617     procedure ZenbuActionExecute(Sender: TObject);
618 yoffy 1.51 procedure KokoResActionExecute(Sender: TObject);
619 hi_ 1.1 procedure ListPopupMenuPopup(Sender: TObject);
620     procedure SelectItemURLCopyActionExecute(Sender: TObject);
621     procedure SelectItemURLCopyActionUpdate(Sender: TObject);
622     procedure AllSelectActionUpdate(Sender: TObject);
623     procedure LogDeleteActionUpdate(Sender: TObject);
624     procedure BrowserTabCloseActionExecute(Sender: TObject);
625     procedure NotSelectTabCloseActionExecute(Sender: TObject);
626     procedure TreeSelectBoradReloadExecute(Sender: TObject);
627     procedure TreeSelectThreadReloadExecute(Sender: TObject);
628     procedure TreeSelectURLCopyExecute(Sender: TObject);
629     procedure TreePopupMenuPopup(Sender: TObject);
630     procedure ListToolBarVisibleActionExecute(Sender: TObject);
631     procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
632     procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
633     var Cancel: WordBool);
634     procedure ListSplitterCanResize(Sender: TObject; var NewSize: Integer;
635     var Accept: Boolean);
636     procedure ListSplitterMoved(Sender: TObject);
637     procedure BrowserTabChange(Sender: TObject);
638     procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
639     Shift: TShiftState; X, Y: Integer);
640     procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
641     State: TDragState; var Accept: Boolean);
642     procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
643     procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
644     Y: Integer);
645     procedure BrowserDocumentComplete(Sender: TObject;
646     const pDisp: IDispatch; var URL: OleVariant);
647     procedure SelectReservActionUpdate(Sender: TObject);
648     procedure RoundNamePopupMenuPopup(Sender: TObject);
649     procedure SelectNewRoundNameExecute(Sender: TObject);
650     procedure SelectDeleteRoundExecute(Sender: TObject);
651     procedure SelectReservActionExecute(Sender: TObject);
652     procedure NewBoardActionExecute(Sender: TObject);
653     procedure LoginActionExecute(Sender: TObject);
654     procedure KeySettingActionExecute(Sender: TObject);
655     procedure AllTabCloseActionExecute(Sender: TObject);
656 yoffy 1.51 procedure ArrangeActionExecute(Sender: TObject);
657     procedure NameURLCopyActionExecute(Sender: TObject);
658     procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
659 hi_ 1.1 procedure URLCopyActionUpdate(Sender: TObject);
660 yoffy 1.2 procedure NameURLCopyActionUpdate(Sender: TObject);
661 hi_ 1.1 procedure BrowserTabCloseActionUpdate(Sender: TObject);
662 yoffy 1.51 procedure NotSelectTabCloseActionUpdate(Sender: TObject);
663 hi_ 1.1 procedure AllTabCloseActionUpdate(Sender: TObject);
664     procedure SelectItemNameURLCopyActionUpdate(Sender: TObject);
665     procedure ActiveLogDeleteActionExecute(Sender: TObject);
666     procedure ActiveLogDeleteActionUpdate(Sender: TObject);
667 yoffy 1.51 procedure ListNameBarVisibleActionExecute(Sender: TObject);
668 hi_ 1.1 procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
669 yoffy 1.51 procedure TreeSelectNameURLCopyExecute(Sender: TObject);
670     procedure PaneInitActionExecute(Sender: TObject);
671 hi_ 1.1 procedure FormShow(Sender: TObject);
672     procedure BrowserTabToolBarResize(Sender: TObject);
673     procedure BrowserMinActionExecute(Sender: TObject);
674 yoffy 1.51 procedure SelectTextClearActionExecute(Sender: TObject);
675 hi_ 1.1 procedure NameTextClearActionExecute(Sender: TObject);
676 yoffy 1.51 procedure MailTextClearActionExecute(Sender: TObject);
677     procedure LeftmostTabSelectActionExecute(Sender: TObject);
678     procedure LeftTabSelectActionExecute(Sender: TObject);
679 hi_ 1.1 procedure RightTabSelectActionExecute(Sender: TObject);
680     procedure RightmostTabSelectActionExecute(Sender: TObject);
681     procedure LeftmostTabSelectActionUpdate(Sender: TObject);
682     procedure LeftTabSelectActionUpdate(Sender: TObject);
683     procedure RightTabSelectActionUpdate(Sender: TObject);
684     procedure RightmostTabSelectActionUpdate(Sender: TObject);
685     procedure FavoriteMenuClick(Sender: TObject);
686     procedure FavoriteAddActionExecute(Sender: TObject);
687     procedure FavoriteAddActionUpdate(Sender: TObject);
688     procedure BoardFavoriteAddActionExecute(Sender: TObject);
689     procedure BoardFavoriteAddActionUpdate(Sender: TObject);
690 yoffy 1.51 procedure ThreadFavoriteAddActionExecute(Sender: TObject);
691 hi_ 1.1 procedure ThreadFavoriteAddActionUpdate(Sender: TObject);
692 yoffy 1.51 procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
693 yoffy 1.2 procedure FavoriteArrangeActionExecute(Sender: TObject);
694     procedure MainCoolBarResize(Sender: TObject);
695 hi_ 1.1 procedure MoveToActionExecute(Sender: TObject);
696 yoffy 1.2 procedure AddressToolBarResize(Sender: TObject);
697 hi_ 1.1 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
698     Shift: TShiftState);
699 yoffy 1.51 procedure AddressBarVisibleActionExecute(Sender: TObject);
700 yoffy 1.2 procedure BrowserEnter(Sender: TObject);
701 hi_ 1.1 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
702 yoffy 1.51 procedure BrowserTabVisibleActionExecute(Sender: TObject);
703     procedure BrowserTabTopActionExecute(Sender: TObject);
704     procedure BrowserTabBottomActionExecute(Sender: TObject);
705     procedure BrowserTabTabStyleActionExecute(Sender: TObject);
706 hi_ 1.1 procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
707 yoffy 1.51 procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
708 hi_ 1.1 procedure PreviewTimerTimer(Sender: TObject);
709     procedure MessageHideButtonClick(Sender: TObject);
710     procedure MonazillaWebPageActionExecute(Sender: TObject);
711     procedure GikoHelpActionExecute(Sender: TObject);
712     procedure ToolButton18Click(Sender: TObject);
713     procedure KotehanActionExecute(Sender: TObject);
714 yoffy 1.51 procedure LinkBarVisibleActionExecute(Sender: TObject);
715     procedure BBS2chWebPageActionExecute(Sender: TObject);
716     procedure GikoFolderOpenActionExecute(Sender: TObject);
717 yoffy 1.2 procedure MainCoolBarBandInfo(Sender: TObject;
718     var BandInfo: PReBarBandInfoA);
719     procedure MainCoolBarChevronClick(Sender: TObject;
720 yoffy 1.51 RebarChevron: PNMRebarChevron);
721     procedure ListCoolBarBandInfo(Sender: TObject;
722     var BandInfo: PReBarBandInfoA);
723     procedure ListCoolBarChevronClick(Sender: TObject;
724     RebarChevron: PNMRebarChevron);
725     procedure BrowserCoolBarBandInfo(Sender: TObject;
726     var BandInfo: PReBarBandInfoA);
727 yoffy 1.2 procedure BrowserCoolBarChevronClick(Sender: TObject;
728 yoffy 1.51 RebarChevron: PNMRebarChevron);
729     procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
730     procedure ThreadEditorActionExecute(Sender: TObject);
731 yoffy 1.2 procedure ThreadEditorActionUpdate(Sender: TObject);
732 yoffy 1.51 procedure ToolBarSettingActionExecute(Sender: TObject);
733     procedure NameCopyActionExecute(Sender: TObject);
734     procedure BoardIEActionExecute(Sender: TObject);
735     procedure SelectItemNameCopyActionExecute(Sender: TObject);
736 yoffy 1.2 procedure SelectItemNameCopyActionUpdate(Sender: TObject);
737 yoffy 1.51 procedure BoardIEActionUpdate(Sender: TObject);
738     procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
739     WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
740     procedure NameCopyActionUpdate(Sender: TObject);
741     procedure SelectComboBoxChange(Sender: TObject);
742     procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
743     Shift: TShiftState);
744     procedure SelectComboBoxExit(Sender: TObject);
745     procedure NG1Click(Sender: TObject);
746     procedure SelectResActionExecute(Sender: TObject);
747     procedure SelectResActionUpdate(Sender: TObject);
748     procedure FormKeyDown(Sender: TObject; var Key: Word;
749     Shift: TShiftState);
750     procedure FormKeyUp(Sender: TObject; var Key: Word;
751     Shift: TShiftState);
752     procedure AllResActionExecute(Sender: TObject);
753     procedure AllResActionUpdate(Sender: TObject);
754     procedure ReloadClick(Sender: TObject);
755     procedure GoBackClick(Sender: TObject);
756     procedure GoFowardClick(Sender: TObject);
757     procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
758     Shift: TShiftState; X, Y: Integer);
759     procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
760     Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
761     procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
762     Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
763     procedure StatusBarResize(Sender: TObject);
764     procedure IndividualAbon1Click(Sender: TObject);
765     procedure IndividualAbon2Click(Sender: TObject);
766     procedure N42Click(Sender: TObject);
767     procedure SelectComboBoxEnter(Sender: TObject);
768     procedure AntiIndividualAbonClick(Sender: TObject);
769     procedure N51Click(Sender: TObject);
770     procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
771 yoffy 1.100 procedure CabinetFavoriteActionExecute(Sender: TObject);
772     procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
773     Y: Integer);
774 yoffy 1.71 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
775 yoffy 1.100 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
776     var S: String);
777     procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
778     Shift: TShiftState);
779     procedure FavoriteTreePopupMenuPopup(Sender: TObject);
780     procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
781     procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
782     procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
783     procedure ToolButton19Click(Sender: TObject);
784     procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject);
785     procedure FavoriteTreeViewChange(Sender: TObject; Node: TTreeNode);
786     procedure FavoriteTreeViewDblClick(Sender: TObject);
787     procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject);
788     procedure FavoriteTreeViewReloadActionExecute(Sender: TObject);
789     procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
790     procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
791     procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject);
792     procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
793     procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
794     Shift: TShiftState; X, Y: Integer);
795     procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
796     State: TDragState; var Accept: Boolean);
797     procedure OnlyAHundredResExecute(Sender: TObject);
798     procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
799     Y: Integer);
800     procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
801     var Handled: Boolean);
802     procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
803     var Handled: Boolean);
804     procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
805     var Handled: Boolean);
806 yoffy 1.107 procedure ExportFavoriteFileAccept(Sender: TObject);
807     procedure ExportFavoriteFileBeforeExecute(Sender: TObject);
808 hi_ 1.1 private
809     { Private 鐃緒申鐃緒申 }
810    
811     FSortIndex: Integer;
812     FSortOrder: Boolean;
813    
814     FEnabledCloseButton: Boolean;
815     // ThreadCreate: TThreadCreate;
816    
817     FClickNode: TTreeNode;
818     FHttpState: Boolean;
819     FHint: TResPopup;
820     FPreviewBrowser: TPreviewBrowser;
821     FPreviewURL: string;
822    
823     FBrowserSizeHeight: Integer;
824     FBrowserSizeWidth: Integer;
825    
826     // FFavorite: TFavorite;
827     FBrowserComplete: Boolean;
828     FTabHintIndex: Integer;
829     FListStyle: TViewStyle; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
830     FItemNoVisible: Boolean; //鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?
831     FViewType: TGikoViewType; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?
832 yoffy 1.123 FActiveList: TObject;
833 hi_ 1.1 FActiveContent: TThreadItem; //
834     FHistoryList: TList; //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
835     FTreeType: TGikoTreeType;
836     FWorkCount: Integer;
837     FNameCookie: string;
838     FMailCookie: string;
839     // FLastRoundTime: TDateTime;
840     BrowserNullTab: TThreadItem;
841     // DoubleClickOccurred: array [TMouseButton] of Boolean;
842     FDownloadTitle: string; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
843     FDownloadMax: Integer; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?
844     FEvent: THTMLDocumentEventSink;//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?
845 h677 1.14
846 yoffy 1.51 Fkeynum : Integer; //鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
847 yoffy 1.29
848 yoffy 1.51 IsDraggingSelectComboBox : Boolean;
849     DraggingSelectComboBoxPosition : TPoint;
850 yoffy 1.29
851 yoffy 1.54 FSearchDialog: TSearchDialog;
852 yoffy 1.49
853 yoffy 1.100 FDropSpaceNode: TTreeNode;
854 yoffy 1.74
855 yoffy 1.107 FDragTime : Cardinal; //鐃緒申鐃緒申鐃?鐃緒申D&D鐃?
856     FDragButton : TToolButton; //鐃緒申鐃緒申鐃?鐃緒申D&D鐃?鐃緒申Drag鐃緒申鐃緒申鐃緒申Button鐃緒申鐃緒申
857     FDragWFirst : Boolean; //WebTab鐃緒申D&D鐃?
858 h677 1.84
859 yoffy 1.123 FListViewBackGroundColor : TColor; //ListView鐃緒申BackGroundColor
860     FUseOddResOddColor : Boolean; //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申
861     FOddColor : TColor; //鐃緒申鐃緒申鐃?
862     procedure SetBoardTreeNode( inBBS : TBBS );
863     function SetCategoryListItem(ABBS2ch: TBBS): Integer;
864 hi_ 1.1 function SetBoardListItem(Category: TCategory): Integer;
865     function SetThreadListItem(Board: TBoard): Integer;
866     // function GetRoundName(index: integer): string;
867    
868     procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
869     procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
870     procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer);
871     procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
872     procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
873    
874     procedure SetActiveList(Obj: TObject);
875     procedure ListClick;
876     procedure ListDoubleClick;
877     procedure BrowserMovement(AName: string);
878     procedure SelectListItem(List: TList);
879     // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
880     procedure DeleteTab(ThreadItem: TThreadItem);
881     function Hook(var Message: TMessage): Boolean;
882     procedure AddRoundNameMenu(MenuItem: TMenuItem);
883     procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
884     procedure SetSelectRoundName(Sender: TObject);
885     function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
886    
887     procedure SetMenuFont;
888     // procedure CreateFavMenu(Folder: TFavoriteFolder);
889     procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
890 yoffy 1.62 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
891     procedure FavoriteClick(Sender: TObject); overload;
892 yoffy 1.100 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
893 yoffy 1.2 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
894 hi_ 1.1 function OnDocumentContextMenu(Sender: TObject): WordBool;
895     // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
896 yoffy 1.123 procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
897 hi_ 1.1 procedure ShowTextPopup;
898     //procedure ShowTextPopup(HintData: THintData);
899 yoffy 1.2 // procedure SetStdToolBar;
900     // function GetAction(ActionName: string): TContainedAction;
901 hi_ 1.1 procedure SetLinkBar;
902     function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
903 yoffy 1.2 procedure MenuBarChevronMenu;
904     procedure LinkBarChevronMenu;
905     procedure ToolBarChevronMenu(ToolBar: TToolBar);
906 yoffy 1.51 procedure ModifySelectList;
907 yoffy 1.100 procedure FavoriteBrowseFolder( node: TTreeNode );
908     procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
909     procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
910     procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
911     procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
912 yoffy 1.85 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
913 yoffy 1.72 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
914 yoffy 1.100 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
915     procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
916 yoffy 1.72 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
917 yoffy 1.100 //
918     procedure BrowserTabClick(Sender: TObject);
919 yoffy 1.123 procedure SetListViewBackGroundColor(value: TColor);
920     procedure BBSMenuItemOnClick( Sender : TObject );
921 hi_ 1.1 protected
922     procedure CreateParams(var Params: TCreateParams); override;
923 yoffy 1.2 procedure WndProc(var Message: TMessage); override;
924 hi_ 1.1 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
925     procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
926     procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
927     public
928     { Public 鐃緒申鐃緒申 }
929     // FDownload: TDownload;
930     FControlThread: TThreadControl;
931 yoffy 1.48 procedure MoveToURL(URL: string);
932     procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
933 hi_ 1.1 procedure ReloadBBS;
934     function GetHttpState: Boolean;
935     procedure SetEnabledCloseButton(Enabled: Boolean);
936     function GetTreeNode(Data: TObject): TTreeNode;
937     procedure AppFormDeactivate(Sender: TObject);
938     // procedure CabinetPanelVisible(PanelVisible: Boolean);
939     procedure ListViewAllSelect;
940    
941     property ListStyle: TViewStyle read FListStyle write FListStyle;
942     property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
943     property ViewType: TGikoViewType read FViewType write FViewType;
944    
945     property NameCookie: string read FNameCookie write FNameCookie;
946     property MailCookie: string read FMailCookie write FMailCookie;
947    
948     procedure SetContent(ThreadItem: TThreadItem);
949     function GetActiveContent: TThreadItem;
950     function GetActiveList: TObject;
951    
952     property ActiveList: TObject read GetActiveList write SetActiveList;
953     // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
954    
955     procedure SetListViewType(AViewType: TGikoViewType); overload;
956     procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
957     procedure DownloadContent(ThreadItem: TThreadItem);
958     procedure DownloadList(Board: TBoard);
959     procedure PlaySound(SoundEventName: string);
960    
961     function AddHistory(ThreadItem: TThreadItem): Boolean;
962     procedure DeleteHistory(ThreadItem: TThreadItem);
963     procedure ClearHistory;
964 yoffy 1.123 procedure ShowBBSTree( inBBS : TBBS );
965 hi_ 1.1 procedure ShowHistoryTree;
966     procedure SetHistoryTreeNode;
967     // procedure SelectTreeNode(Item: TObject);
968     procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
969     procedure SetBrowserTabState;
970     // property Favorite: TFavorite read FFavorite write FFavorite;
971 yoffy 1.2 procedure SetToolBarPopup;
972 yoffy 1.100 procedure ShowFavoriteAddDialog( Item : TObject );
973 yoffy 1.123 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
974     property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
975     property OddColor : TColor read FOddColor write FOddColor;
976 h677 1.109
977 hi_ 1.1 published
978     property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
979     end;
980    
981     TFavoriteMenuItem = class(TMenuItem)
982     private
983     FData : Pointer;
984     public
985     property Data: Pointer read FData write FData;
986     end;
987    
988 yoffy 1.123 TBBSMenuItem = class(TMenuItem)
989     private
990     FData : Pointer;
991     public
992     property Data: Pointer read FData write FData;
993     end;
994    
995 hi_ 1.1 TLinkToolButton = class(TToolButton)
996     private
997     FData : Pointer;
998     public
999     property Data: Pointer read FData write FData;
1000     end;
1001    
1002     var
1003     GikoForm: TGikoForm;
1004    
1005     implementation
1006    
1007     uses
1008     About, Option, Round, Splash, Sort, ListSelect,
1009 yoffy 1.54 NewBoard;
1010 hi_ 1.1
1011     const
1012     CAPTION_NAME: string = '鐃?鐃?鐃?鐃?';
1013     BLANK_HTML: string = 'about:blank';
1014 yoffy 1.51 SELECTCOMBOBOX_NAME: string = ''; // '鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申';
1015     SELECTCOMBOBOX_COLOR: TColor = clWindow;
1016 yoffy 1.120 //D&D鐃緒申鐃?
1017     DandD_THRESHOLD = 5; //D&D鐃緒申鐃緒申鐃?鐃?pixcel)
1018 yoffy 1.2 //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1019     ITEM_ICON_2CH1 = 0; //2ch鐃?鐃?鐃?鐃緒申
1020     ITEM_ICON_2CH2 = 1; //2ch鐃?鐃?鐃?鐃緒申
1021     ITEM_ICON_CATEGORY1 = 2; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1022     ITEM_ICON_CATEGORY2 = 3; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1023 yoffy 1.120 ITEM_ICON_BOARD_NOSUBJECT = 3; //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1024 yoffy 1.2 ITEM_ICON_BOARD1 = 4; //鐃緒申鐃?鐃?鐃?鐃緒申
1025     ITEM_ICON_BOARD2 = 5; //鐃緒申鐃?鐃?鐃?鐃緒申
1026     ITEM_ICON_THREADLOG1 = 6; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1027     ITEM_ICON_THREADLOG2 = 7; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1028     ITEM_ICON_THREAD1 = 8; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1029     ITEM_ICON_THREAD2 = 9; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1030     ITEM_ICON_THREADNEW1 = 10; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1031     ITEM_ICON_THREADNEW2 = 11; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1032     ITEM_ICON_SORT1 = 12; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1033     ITEM_ICON_SORT2 = 13; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1034 yoffy 1.120 ITEM_ICON_BOARD_LOG = 17; //鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1035     ITEM_ICON_BOARD_NEW = 18; //鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1036 yoffy 1.2
1037     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1038 yoffy 1.48 TOOL_ICON_HEIGHT_MAX = 16; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1039     TOOL_ICON_HEIGHT_MIN = 17; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1040     TOOL_ICON_HEIGHT_NORMAL = 18; //鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1041     TOOL_ICON_WIDTH_MAX = 19; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1042     TOOL_ICON_WIDTH_MIN = 20; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1043     TOOL_ICON_WIDTH_NORMAL = 21; //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1044    
1045 yoffy 1.51 TOOL_ICON_FAV_FOLDER = 30; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申
1046 yoffy 1.100 TOOL_ICON_FAV_BOARD = 31; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1047 yoffy 1.51 TOOL_ICON_FAV_THREAD = 32; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1048 hi_ 1.1
1049     HTML_FILE_NAME = 'temp_preview.html';
1050    
1051     {$R *.DFM}
1052    
1053     procedure TGikoForm.CreateParams(var Params: TCreateParams);
1054     begin
1055     inherited;
1056     if FormStyle in [fsNormal, fsStayOnTop] then begin
1057     if BorderStyle in [bsSingle, bsSizeable] then begin
1058     Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1059     Params.WndParent := 0;
1060     end;
1061     end;
1062     end;
1063    
1064     procedure TGikoForm.FormCreate(Sender: TObject);
1065     const
1066     TVS_NOTOOLTIPS = $0080;
1067     var
1068     FileName: string;
1069     Style: DWORD;
1070     msg: string;
1071     i: Integer;
1072     wp: TWindowPlacement;
1073 hi_ 1.32 s: string;
1074 yoffy 1.123 item : TBBSMenuItem;
1075 hi_ 1.1 begin
1076     {$IFDEF DEBUG}
1077     AllocConsole;
1078     Writeln('============================================================');
1079     Writeln(' 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃? 鐃?鐃緒申鐃?鐃?鐃緒申');
1080     Writeln('');
1081     Writeln(' 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?');
1082     Writeln(' 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
1083     Writeln('============================================================');
1084     {$ENDIF}
1085     Application.OnDeactivate := AppFormDeactivate;
1086     Self.OnDeactivate := AppFormDeactivate;
1087     Application.HookMainWindow(Hook);
1088    
1089     FTreeType := gttNone;
1090    
1091 yoffy 1.51 FSearchDialog := nil;
1092 yoffy 1.49
1093 hi_ 1.1 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1094     Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1095    
1096     //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1097     RoundList := TRoundList.Create;
1098     RoundList.LoadRoundFile;
1099    
1100     //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1101     AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1102    
1103 yoffy 1.107 // 鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?(ReadBoardFile 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1104     InitializeBoardPlugIns;
1105 yoffy 1.105
1106 hi_ 1.1 EnabledCloseButton := True;
1107 yoffy 1.123 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申(ReadFavorite 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1108     GikoSys.ReadBoardFile;
1109 hi_ 1.1 // SetBoardTreeNode; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1110 yoffy 1.123 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1111     for i := Length( BBSs ) - 1 downto 0 do begin
1112 yoffy 1.124 try
1113     item := TBBSMenuItem.Create( PopupMenu );
1114     item.Caption := BBSs[ i ].Title;
1115     item.Data := BBSs[ i ];
1116     item.OnClick := BBSMenuItemOnClick;
1117     CabinetSelectPopupMenu.Items.Insert( 0, item );
1118     except
1119     end;
1120 yoffy 1.123 end;
1121    
1122     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1123     // FFavorite := TFavorite.Create(FavoriteTreeView);
1124     FavoriteDM.SetFavTreeView(FavoriteTreeView);
1125     FavoriteDM.ReadFavorite;
1126 hi_ 1.1
1127     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1128     ListView.ViewStyle := GikoSys.Setting.ListStyle;
1129    
1130     //鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1131     // MainCoolBar.Top := 0;
1132     // MainCoolBar.Left := 0;
1133    
1134     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
1135     AnimePanel.Top := 0;
1136     AnimePanel.Left := 0;
1137    
1138     //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1139    
1140     //鐃?鐃緒申鐃?鐃?鐃?鐃?
1141     CabinetVisibleAction.Checked := not GikoSys.Setting.CabinetVisible;
1142     CabinetVisibleAction.Execute;
1143     CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1144    
1145     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1146     MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1147     MsgBarVisibleActionExecute(nil);
1148     MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1149    
1150     //鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1151     StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1152     StatusBarVisibleActionExecute(nil);
1153    
1154     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1155     TreeView.Items.BeginUpdate;
1156 yoffy 1.100 FavoriteTreeView.Items.BeginUpdate;
1157 hi_ 1.1 ListView.Items.BeginUpdate;
1158     try
1159     TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1160     TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1161     TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1162     TreeView.Color := GikoSys.Setting.CabinetBackColor;
1163    
1164 yoffy 1.67 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1165     FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1166     FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1167     FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1168    
1169 hi_ 1.1 ListView.Font.Name := GikoSys.Setting.ListFontName;
1170     ListView.Font.Size := GikoSys.Setting.ListFontSize;
1171     ListView.Font.Color := GikoSys.Setting.ListFontColor;
1172 h677 1.109 //ListView.Color := GikoSys.Setting.ListBackColor;
1173 yoffy 1.123 ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1174     FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1175     FOddColor := GikoSys.Setting.OddColor;
1176 h677 1.109
1177 hi_ 1.1 finally
1178     TreeView.Items.EndUpdate;
1179 yoffy 1.100 FavoriteTreeView.Items.EndUpdate;
1180 hi_ 1.1 ListView.Items.EndUpdate;
1181     end;
1182     //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1183     ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1184    
1185     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1186     BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1187     BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1188 yoffy 1.100 FDragWFirst := false;
1189 hi_ 1.1
1190     // TreeView.TopItem.Expanded := True; //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1191     // TreeView.Selected := TreeView.Items[0]; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1192     SetContent(nil); //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1193    
1194     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1195     wp.length := sizeof(wp);
1196     wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1197     wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1198     wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1199     wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1200     wp.showCmd := SW_HIDE;
1201     SetWindowPlacement(Handle, @wp);
1202    
1203     // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1204     // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1205     if GikoSys.Setting.WindowMax then
1206     WindowState := wsMaximized;
1207    
1208     //鐃?鐃?鐃?鐃?鐃緒申
1209     try
1210     FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1211     if FileExists(FileName) then
1212     Animate.FileName := FileName;
1213     except
1214     end;
1215     // AnimePanel.Height := 26;
1216     // AnimePanel.Width := 39;
1217     // AnimePanel.Top := 2;
1218     // AnimePanel.Left := Width - 48;
1219    
1220     //鐃?鐃?鐃?鐃?
1221     FNameCookie := '';
1222     FMailCookie := '';
1223    
1224     //鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1225     AllItemAction.Checked := True;
1226 yoffy 1.51 AllResAction.Checked := True;
1227 hi_ 1.1
1228     //TreeView鐃緒申鐃緒申鐃緒申鐃?鐃緒申ToolTip鐃緒申鐃緒申鐃?鐃緒申
1229     Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1230     Style := Style or TVS_NOTOOLTIPS;
1231     SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1232    
1233     // 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1234     TreeView.Align := alClient;
1235 yoffy 1.57 FavoriteTreeView.Align := alClient;
1236 hi_ 1.1 FavoriteTreeView.Visible := False;
1237    
1238     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1239     // FBrowserSizeFlag := False;
1240     // FBrowserSizeHeight := ViewPanel.Height;
1241    
1242     FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1243     FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1244    
1245     ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1246     ArrangeAction.Execute;
1247    
1248     if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1249     case GikoSys.Setting.ListWidthState of
1250     glsMax: begin
1251     ViewPanel.Width := 1;
1252 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1253     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1254 hi_ 1.1 end;
1255     glsMin: begin
1256     ViewPanel.Width := GikoSys.Setting.ListWidth;
1257 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1258     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1259 hi_ 1.1 end;
1260     else begin
1261     ViewPanel.Width := GikoSys.Setting.ListWidth;
1262 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1263     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1264 hi_ 1.1 end;
1265     end;
1266     // if GikoSys.Setting.ListWidthMax then begin
1267     // ViewPanel.Width := 1;
1268     // BrowserSizeAction.ImageIndex := ICON_WIDTH_MIN;
1269     // end else begin
1270     // ViewPanel.Width := GikoSys.Setting.ListWidth;
1271     // BrowserSizeAction.ImageIndex := ICON_WIDTH_MAX;
1272     // end;
1273     end else begin
1274     case GikoSys.Setting.ListHeightState of
1275     glsMax: begin
1276     ViewPanel.Height := 1;
1277 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1278     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1279 hi_ 1.1 end;
1280     glsMin: begin
1281     ViewPanel.Height := GikoSys.Setting.ListHeight;
1282 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1283     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1284 hi_ 1.1 end;
1285     else begin
1286     ViewPanel.Height := GikoSys.Setting.ListHeight;
1287 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1288     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1289 hi_ 1.1 end;
1290     end;
1291     // if GikoSys.Setting.ListHeightState = glsMax then begin
1292     // end else begin
1293     // ViewPanel.Height := GikoSys.Setting.ListHeight;
1294     // BrowserSizeAction.ImageIndex := ICON_HEIGHT_MAX;
1295     // end;
1296     end;
1297    
1298     //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1299     // ProgressBar.Visible := False;
1300     ProgressBar.Parent := StatusBar;
1301     ProgressBar.Top := 2;
1302     ProgressBar.Left := 0;
1303     ProgressBar.Width := StatusBar.Panels[0].Width;
1304     ProgressBar.Height := StatusBar.Height - 2;
1305     ProgressBar.Position := 0;
1306    
1307     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1308     //formshow()鐃緒申鐃緒申鐃緒申
1309 yoffy 1.2
1310 hi_ 1.1 //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1311     // FDownload := TDownload.Create;
1312     // FDownload.OnDownloadEnd := OnDonloadEnd;
1313     // FDownload.OnWork := Work;
1314     // FDownload.OnWorkBegin := WorkBegin;
1315     // FDownload.OnWorkEnd := WorkEnd;
1316    
1317     //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1318     FControlThread := TThreadControl.Create(True);
1319     FControlThread.MaxThreadCount := 1;
1320     FControlThread.Resume;
1321     FControlThread.OnDownloadEnd := DownloadEnd;
1322     FControlThread.OnDownloadMsg := DownloadMsg;
1323     FControlThread.OnWork := Work;
1324     FControlThread.OnWorkBegin := WorkBegin;
1325     FControlThread.OnWorkEnd := WorkEnd;
1326     // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1327    
1328     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1329     FHistoryList := TList.Create;
1330    
1331 yoffy 1.51 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1332     SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1333 yoffy 1.2
1334 hi_ 1.1 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
1335     SetBrowserTabState;
1336    
1337     BrowserBoardNameLabel.Caption := '';
1338     BrowserNameLabel.Caption := '';
1339     FWorkCount := 0;
1340    
1341     // DetailIconAction.Execute;
1342    
1343     // FBrowserSizeHeight := ViewPanel.Height;
1344     FTabHintIndex := -1;
1345    
1346     //鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1347     // if not GikoSys.DirectoryExistsEx(BBS2ch.GetLogFolder) then begin
1348     // GikoSys.ForceDirectoriesEx(BBS2ch.GetLogFolder);
1349     // end;
1350     // FormResize(Sender);
1351     // MainCoolBarResize(Sender);
1352     // Application.ProcessMessages;
1353    
1354     //鐃緒申鐃緒申鐃?鐃?鐃?
1355     SetLinkBar;
1356    
1357     //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?
1358     SetMenuFont;
1359    
1360     //鐃?鐃?鐃緒申鐃?鐃?Wrapable
1361     ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1362     BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1363    
1364 yoffy 1.2 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1365     ReadToolBarSetting(ActionList, StdToolBar);
1366     ReadToolBarSetting(ActionList, ListToolBar);
1367 yoffy 1.51 try
1368     for i := ListToolBar.ControlCount - 1 downto 0 do
1369     begin
1370     if ListToolBar.Controls[ i ].Action = SelectItemAction then
1371     begin
1372     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1373     if (i + 1) < ListToolBar.ControlCount then
1374     if ListToolBar.Controls[ i + 1 ] is TToolButton then
1375     if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1376     ListToolBar.Controls[ i + 1 ].Visible := False;
1377    
1378     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申
1379     ListToolBar.Controls[ i ].Visible := False;
1380     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申
1381     SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1382     SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1383     SelectComboBox.Parent := ListToolBar;
1384     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
1385     SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1386     SelectComboBoxSplitter.Parent := ListToolBar;
1387    
1388     break;
1389     end;
1390     end;
1391     except
1392     end;
1393 yoffy 1.2 ReadToolBarSetting(ActionList, BrowserToolBar);
1394     SetToolBarPopup;
1395 yoffy 1.100 OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes;
1396 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃?鐃?
1397     AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1398    
1399 yoffy 1.2 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1400    
1401     //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1402     if not FileExists(GikoSys.GetBoardFileName) then begin
1403     msg := '鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申' + #13#10#13#10
1404     + '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申' + #13#10
1405     + '鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?';
1406     MsgBox(SplashWindow.Handle, msg, '鐃?鐃?鐃?鐃?', MB_OK or MB_ICONINFORMATION);
1407     NewBoardAction.Execute;
1408     end;
1409    
1410     //鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1411     GikoSys.LoadKeySetting(ActionList);
1412    
1413     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1414     // FLastRoundTime := 0;
1415    
1416     //ResHint
1417     FHint := TResPopup.Create(Self);
1418    
1419 yoffy 1.100 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申(鐃緒申鐃緒申鐃緒申)
1420     // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申(鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?)
1421     i := GikoSys.Setting.CabinetIndex;
1422 yoffy 1.123 ShowBBSTree( BBSs[ 0 ] );
1423 yoffy 1.100 GikoSys.Setting.CabinetIndex := i;
1424    
1425     // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1426     Case GikoSys.Setting.CabinetIndex of
1427     0: Cabinet2chAction.Execute;
1428     1: CabinetHistoryAction.Execute;
1429     2: CabinetFavoriteAction.Execute;
1430     end;
1431 yoffy 1.67
1432 yoffy 1.2 //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1433     if GikoSys.Setting.AutoLogin then
1434     LoginAction.Execute;
1435    
1436     //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?
1437     for i := 1 to ParamCount do begin
1438     MoveToURL(ParamStr(i));
1439     end;
1440     // SetStdToolBar;
1441     // SetLinkBar;
1442 h677 1.22
1443 hi_ 1.32 s := GikoSys.FAbon.NGwordname;
1444     StatusBar.Panels[2].Text := s;
1445     StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1446     StatusBarResize(Sender);
1447 yoffy 1.2 end;
1448    
1449     //
1450     //
1451     //
1452     procedure TGikoForm.FormShow(Sender: TObject);
1453     var
1454     i: Integer;
1455     CoolSet: TCoolSet;
1456     begin
1457     ShowWindow(Application.Handle, SW_HIDE);
1458    
1459     //FormCreate鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1460     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1461     StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1462     StdToolBarVisibleActionExecute( nil );
1463     AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1464     AddressBarVisibleActionExecute( nil );
1465     LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1466     LinkBarVisibleActionExecute( nil );
1467     ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1468     ListToolBarVisibleActionExecute( nil );
1469     ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1470     ListNameBarVisibleActionExecute( nil );
1471     BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1472     BrowserToolBarVisibleActionExecute( nil );
1473     BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1474     BrowserNameBarVisibleActionExecute( nil );
1475    
1476     //鐃?鐃緒申鐃?鐃?鐃?鐃?
1477     BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1478     BrowserTabVisibleActionExecute(nil);
1479    
1480     if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1481     BrowserTabTopAction.Checked := True;
1482     BrowserTabTopActionExecute(nil);
1483     end else begin
1484     BrowserTabBottomAction.Checked := True;
1485     BrowserTabBottomActionExecute(nil);
1486     end;
1487    
1488     if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1489     BrowserTabTabStyleAction.Checked := True;
1490     BrowserTabTabStyleActionExecute(nil);
1491     end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1492     BrowserTabButtonStyleAction.Checked := True;
1493     BrowserTabButtonStyleActionExecute(nil);
1494     end else begin
1495     BrowserTabFlatStyleAction.Checked := True;
1496     BrowserTabFlatStyleActionExecute(nil);
1497     end;
1498    
1499    
1500 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1501     MainCoolBar.Bands.BeginUpdate;
1502     try
1503     for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1504     CoolSet := GikoSys.Setting.MainCoolSet[i];
1505     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1506     Continue;
1507     MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1508     MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1509     MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1510     end;
1511     finally
1512     MainCoolBar.Bands.EndUpdate;
1513     end;
1514    
1515     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1516     ListCoolBar.Bands.BeginUpdate;
1517     try
1518     for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1519     CoolSet := GikoSys.Setting.ListCoolSet[i];
1520     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1521     Continue;
1522     ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1523     ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1524     ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1525     end;
1526     finally
1527     ListCoolBar.Bands.EndUpdate;
1528     end;
1529    
1530     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1531     BrowserCoolBar.Bands.BeginUpdate;
1532     try
1533     for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1534     CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1535     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1536     Continue;
1537     BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1538     BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1539     BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1540     end;
1541     finally
1542     BrowserCoolBar.Bands.EndUpdate;
1543     end;
1544    
1545     end;
1546 yoffy 1.2 {
1547 hi_ 1.1 procedure TGikoForm.SetStdToolBar;
1548     var
1549     i: Integer;
1550     FileName: string;
1551     ini: TMemIniFile;
1552     s: string;
1553     Action: TContainedAction;
1554     ToolButton: TToolButton;
1555     begin
1556     exit;
1557     for i := StdToolBar.ButtonCount - 1 downto 0 do begin
1558     StdToolBar.RemoveControl(StdToolBar.Buttons[i]);
1559     //StdToolBar.Buttons[i].Free;
1560     end;
1561     FileName := GikoSys.GetConfigDir + 'ToolBar.ini';
1562     ini := TMemIniFile.Create(FileName);
1563     i := 0;
1564     while true do begin
1565     s := ini.ReadString('StdToolBar', IntToStr(i), '');
1566     if s = '' then
1567     Break;
1568     if s = '-' then begin
1569     ToolButton := TToolButton.Create(StdToolBar);
1570     ToolButton.Style := tbsSeparator;
1571     ToolButton.Width := 8;
1572     ToolButton.Left := 10000;
1573     StdToolBar.InsertControl(ToolButton);
1574     end else begin
1575     Action := GetAction(s);
1576     if Action <> nil then begin
1577     ToolButton := TToolButton.Create(StdToolBar);
1578     ToolButton.Action := Action;
1579     ToolButton.Left := 10000;
1580     StdToolBar.InsertControl(ToolButton);
1581     end;
1582     end;
1583     Inc(i);
1584     end;
1585     end;
1586 yoffy 1.2 }
1587     {function TGikoForm.GetAction(ActionName: string): TContainedAction;
1588 hi_ 1.1 var
1589     i: Integer;
1590     begin
1591     for i := 0 to ActionList.ActionCount - 1 do begin
1592     if ActionList.Actions[i].Name = ActionName then begin
1593     Result := ActionList.Actions[i];
1594     Exit;
1595     end;
1596     end;
1597     Result := nil;
1598 yoffy 1.2 end;}
1599 hi_ 1.1
1600     procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1601     var
1602     i: Integer;
1603     CoolSet: TCoolSet;
1604     wp: TWindowPlacement;
1605     begin
1606 yoffy 1.100 if ( GikoSys.Setting.ShowDialogForEnd ) and
1607     (MessageDlg('鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
1608     CanClose := false;
1609     Exit;
1610     end else begin
1611     CanClose := True;
1612     end;
1613 hi_ 1.1 Application.OnDeactivate := nil;
1614     Self.OnDeactivate := nil;
1615    
1616 yoffy 1.2 //column鐃緒申
1617 yoffy 1.123 if GetActiveList is TBBS then begin
1618 yoffy 1.2 for i := 0 to ListView.Columns.Count - 1 do
1619     GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1620     end else if GetActiveList is TCategory then begin
1621     for i := 0 to ListView.Columns.Count - 1 do
1622     GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1623     end else if GetActiveList is TBoard then begin
1624     for i := 0 to ListView.Columns.Count - 1 do
1625     GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1626     end;
1627    
1628     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1629     wp.length := sizeof(wp);
1630     GetWindowPlacement(Handle, @wp);
1631     GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1632     GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1633     GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1634     GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1635     GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1636    
1637     GikoSys.Setting.ListStyle := ListView.ViewStyle;
1638     GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1639     GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1640     GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1641     GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1642     if ArrangeAction.Checked then
1643     GikoSys.Setting.ListOrientation := gloVertical
1644     else
1645     GikoSys.Setting.ListOrientation := gloHorizontal;
1646     GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1647    
1648     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1649     for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1650     CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1651     CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1652     CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1653     GikoSys.Setting.MainCoolSet[i] := CoolSet;
1654     end;
1655     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1656     for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1657     CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1658     CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1659     CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1660     GikoSys.Setting.ListCoolSet[i] := CoolSet;
1661     end;
1662     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1663     for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1664     CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1665     CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1666     CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1667     GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1668 hi_ 1.1 end;
1669    
1670 yoffy 1.2 GikoSys.Setting.WriteWindowSettingFile;
1671     GikoSys.Setting.WriteNameMailSettingFile;
1672    
1673     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1674 hi_ 1.1 try
1675 yoffy 1.2 FavoriteDM.WriteFavorite;
1676 hi_ 1.1 except
1677     end;
1678 yoffy 1.2 // Favorite.Free;
1679 hi_ 1.1
1680     try
1681     //鐃?鐃?鐃?鐃緒申鐃?鐃?
1682     NotSelectTabCloseAction.Execute;
1683     if BrowserTab.Tabs.Count >= 1 then begin
1684     DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1685     end;
1686     except
1687     end;
1688    
1689     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申&鐃?鐃緒申
1690     try
1691     RoundList.SaveRoundFile;
1692     except
1693     end;
1694 yoffy 1.124 {
1695 hi_ 1.1 try
1696     RoundList.Clear;
1697     except
1698     end;
1699     try
1700     RoundList.Free;
1701     except
1702     end;
1703    
1704     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1705     try
1706     FHistoryList.Free;
1707     except
1708     end;
1709 yoffy 1.124 }
1710 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1711     try
1712     AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1713     except
1714     end;
1715    
1716     try
1717     FControlThread.Terminate;
1718     except
1719     end;
1720    
1721 yoffy 1.124 {
1722 hi_ 1.1 // FDownload.Free;
1723     try
1724     SetActiveList(nil);
1725     except
1726     end;
1727 yoffy 1.124
1728 hi_ 1.1 //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1729     Sleep(10);
1730     try
1731     TreeView.Items.Clear;
1732     except
1733     end;
1734 yoffy 1.124 }
1735 hi_ 1.1 try
1736     if FavoriteDM <> nil then
1737     FavoriteDM.Free;
1738     FavoriteDM := nil;
1739     if AddressHistoryDM <> nil then
1740     AddressHistoryDM.Free;
1741     AddressHistoryDM := nil;
1742     except
1743     end;
1744 yoffy 1.124 {
1745     try
1746     for i := 0 to Length( BoardPlugIns ) - 1 do begin
1747     if BoardPlugIns[ i ] <> nil then
1748     BoardPlugIns[ i ].Free;
1749     BoardPlugIns[ i ] := nil;
1750     end;
1751     except
1752     end;
1753    
1754 hi_ 1.1 try
1755 yoffy 1.123 for i := 0 to Length( BBSs ) - 1 do begin
1756     if BBSs[ i ] <> nil then
1757     BBSs[ i ].Free;
1758     BBSs[ i ] := nil;
1759     end;
1760 hi_ 1.1 except
1761     end;
1762 yoffy 1.2
1763 yoffy 1.124 try
1764     for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1765     if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1766     //CabinetSelectPopupMenu.Items[ i ].Free;
1767     CabinetSelectPopupMenu.Items.Delete( i );
1768     end;
1769     end;
1770     except
1771     end;
1772    
1773 yoffy 1.2 try
1774     //Hint鐃?鐃緒申
1775     if FHint <> nil then begin
1776     FHint.ReleaseHandle;
1777     FHint.Free;
1778     FHint := nil;
1779     end;
1780     //Preview鐃?鐃緒申
1781     if TPreviewBrowser <> nil then begin
1782     FPreviewBrowser.Free;
1783     FPreviewBrowser := nil;
1784     end;
1785     except
1786     end;
1787 yoffy 1.124 }
1788 hi_ 1.1 end;
1789    
1790     procedure TGikoForm.FormDestroy(Sender: TObject);
1791     //var
1792     // wp: TWindowPlacement;
1793     begin
1794     { //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1795     FHistoryList.Free;
1796    
1797     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1798     wp.length := sizeof(wp);
1799     GetWindowPlacement(Handle, @wp);
1800    
1801     GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1802     GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1803     GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1804     GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1805     GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1806    
1807     GikoSys.Setting.CabinetVisible := CabinetPanel.Visible;
1808     GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1809    
1810     GikoSys.Setting.WriteWindowSettingFile;
1811     GikoSys.Setting.WriteNameMailSettingFile;
1812     FDownload.Free;
1813     BBS2ch.Free;}
1814     end;
1815    
1816     //鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1817     procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1818     begin
1819     Application.Terminate;
1820     Action := caFree;
1821     end;
1822    
1823     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1824     procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1825     begin
1826     CabinetVisibleAction.Execute;
1827     // CabinetPanelVisible(false);
1828     end;
1829    
1830     procedure TGikoForm.ReloadBBS;
1831 yoffy 1.123 var
1832     i : Integer;
1833     item : TBBSMenuItem;
1834 hi_ 1.1 begin
1835     //鐃?鐃?鐃?鐃緒申鐃?鐃?
1836     NotSelectTabCloseAction.Execute;
1837     if BrowserTab.Tabs.Count >= 1 then
1838     DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1839     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1840     FHistoryList.Clear;
1841     //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1842     TreeView.Items.Clear;
1843    
1844     //BBS鐃?鐃緒申
1845 yoffy 1.124 for i := 0 to Length( BBSs ) - 1 do begin
1846     if BBSs[ i ] <> nil then
1847     BBSs[ i ].Free;
1848     BBSs[ i ] := nil;
1849     end;
1850 hi_ 1.1
1851 yoffy 1.123 ActiveList := nil;
1852 hi_ 1.1
1853     FTreeType := gttNone;
1854    
1855 yoffy 1.123 GikoSys.ReadBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1856     // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1857     for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1858 yoffy 1.124 try
1859     if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1860     CabinetSelectPopupMenu.Items[ i ].Free;
1861     CabinetSelectPopupMenu.Items.Delete( i );
1862     end;
1863     except
1864     end;
1865 yoffy 1.123 end;
1866     // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1867     for i := Length( BBSs ) - 1 downto 0 do begin
1868 yoffy 1.124 try
1869     item := TBBSMenuItem.Create( PopupMenu );
1870     item.Caption := BBSs[ i ].Title;
1871     item.Data := BBSs[ i ];
1872     item.OnClick := BBSMenuItemOnClick;
1873     CabinetSelectPopupMenu.Items.Insert( 0, item );
1874     except
1875     end;
1876 yoffy 1.123 end;
1877     ShowBBSTree( BBSs[ 0 ] );
1878 hi_ 1.1 end;
1879    
1880     //鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1881 yoffy 1.123 procedure TGikoForm.SetBoardTreeNode(
1882     inBBS : TBBS
1883     );
1884 hi_ 1.1 var
1885 yoffy 1.120 i, j, k: integer;
1886 hi_ 1.1 Root: TTreeNode;
1887     CategoryNode: TTreeNode;
1888     BoardNode: TTreeNode;
1889     Category: TCategory;
1890     Board: TBoard;
1891     begin
1892 yoffy 1.112 // 鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1893 hi_ 1.1 TreeView.Items.BeginUpdate;
1894     TreeView.Items.Clear;
1895     try
1896 yoffy 1.123 try
1897     if SplashWindow <> nil then
1898     SplashWindow.ProgressBar.Max := BBSs[ 0 ].Count;
1899     except
1900     end;
1901    
1902     Root := TreeView.Items.Add( nil, inBBS.Title );
1903     Root.ImageIndex := ITEM_ICON_2CH1;
1904     Root.SelectedIndex := ITEM_ICON_2CH2;
1905     Root.Data := inBBS;
1906     for i := 0 to inBBS.Count - 1 do begin
1907     Category := TCategory(inBBS.Items[i]);
1908     CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
1909     CategoryNode.Data := Category;
1910     CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
1911     CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
1912 hi_ 1.1
1913 yoffy 1.123 for j := 0 to Category.Count - 1 do begin
1914     Board := TBoard(Category.Items[j]);
1915     Board.BeginUpdate;
1916     BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
1917     BoardNode.Data := Board;
1918     //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
1919     if not Board.IsLogFile then begin
1920     BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
1921     BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
1922     end else begin
1923     BoardNode.ImageIndex := ITEM_ICON_BOARD1;
1924     BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
1925     for k := 0 to Board.Count - 1 do begin
1926     if Board.Items[ k ].IsLogFile then begin
1927     BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
1928     BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
1929 yoffy 1.120
1930 yoffy 1.123 Break;
1931 yoffy 1.120 end;
1932     end;
1933 yoffy 1.112 end;
1934 yoffy 1.123 Board.LoadSettings;
1935     Board.EndUpdate;
1936     end;
1937 hi_ 1.1
1938 yoffy 1.123 CategoryNode.Expanded := Category.NodeExpand;
1939 hi_ 1.1
1940 yoffy 1.123 if SplashWindow <> nil then begin
1941     SplashWindow.ProgressBar.StepIt;
1942     Application.ProcessMessages;
1943 hi_ 1.1 end;
1944     end;
1945     finally
1946     TreeView.Items.EndUpdate;
1947     end;
1948     end;
1949    
1950 yoffy 1.123 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
1951 hi_ 1.1 const
1952     COLUMN: array[0..0] of string = ('鐃?鐃?鐃?鐃緒申鐃緒申');
1953     var
1954     ListColumn: TListColumn;
1955     i: Integer;
1956     begin
1957     ListView.Items.BeginUpdate;
1958     try
1959     Screen.Cursor := crHourGlass;
1960    
1961     ListView.Columns.Clear;
1962     for i := 0 to Length(COLUMN) - 1 do begin
1963     ListColumn := ListView.Columns.Add;
1964     ListColumn.Caption := COLUMN[i];
1965     ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
1966     end;
1967    
1968     ListView.Items.Count := 0;
1969     ListView.Items.Clear;
1970     ListView.Items.Count := ABBS2ch.Count;
1971    
1972     // UpFolderAction.Enabled := False;
1973     // AllItemAction.Enabled := False;
1974     // LogItemAction.Enabled := False;
1975     // NewItemAction.Enabled := False;
1976     // SelectItemAction.Enabled := False;
1977     // ListDownloadToolButton.Enabled := False;
1978     // BoardReservToolButton.Enabled := False;
1979     // ListThreadDownloadToolButton.Enabled := False;
1980    
1981     ListNameLabel.Caption := ABBS2ch.Title;
1982     FolderImage.Picture := nil;
1983     ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
1984    
1985 yoffy 1.2 FSortIndex := 0;
1986     FSortOrder := False;
1987     ListViewColumnClick(nil, ListView.Column[0]);
1988    
1989 hi_ 1.1 Result := ABBS2ch.Count;
1990     finally
1991     Screen.Cursor := crDefault;
1992     ListView.Items.EndUpdate;
1993     end;
1994     end;
1995    
1996     function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
1997     const
1998     COLUMN: array[0..2] of string = ('鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
1999     var
2000     ListColumn: TListColumn;
2001     i: Integer;
2002     begin
2003     ListView.Items.BeginUpdate;
2004     try
2005     Screen.Cursor := crHourGlass;
2006    
2007     ListView.Columns.Clear;
2008     for i := 0 to Length(COLUMN) - 1 do begin
2009     ListColumn := ListView.Columns.Add;
2010     ListColumn.Caption := COLUMN[i];
2011     ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
2012     end;
2013    
2014     ListView.Items.Count := 0;
2015     ListView.Items.Clear;
2016     ListView.Items.Count := Category.Count;
2017    
2018     // UpFolderAction.Enabled := True;
2019     // AllItemAction.Enabled := False;
2020     // LogItemAction.Enabled := False;
2021     // NewItemAction.Enabled := False;
2022     // SelectItemAction.Enabled := False;
2023     // ListDownloadToolButton.Enabled := False;
2024     // BoardReservToolButton.Enabled := False;
2025     // ListThreadDownloadToolButton.Enabled := False;
2026    
2027     ListNameLabel.Caption := Category.Title;
2028     FolderImage.Picture := nil;
2029     ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2030    
2031 yoffy 1.2 FSortIndex := 0;
2032     FSortOrder := False;
2033     ListViewColumnClick(nil, ListView.Column[0]);
2034    
2035 hi_ 1.1 Result := Category.Count;
2036     finally
2037     Screen.Cursor := crDefault;
2038     ListView.Items.EndUpdate;
2039     end;
2040     end;
2041    
2042     function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2043     const
2044     COLUMN: array[0..6] of string = ('鐃?鐃緒申鐃?鐃?鐃緒申', '鐃?鐃?鐃緒申鐃?', '鐃緒申鐃緒申', '鐃?鐃緒申',
2045     '鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
2046     COLUMN_ALIGNMENT: array[0..6] of TAlignment = (taLeftJustify, taRightJustify,
2047     taRightJustify, taRightJustify,
2048     taRightJustify, taLeftJustify,
2049     taLeftJustify);
2050     //No, 鐃?鐃緒申鐃?鐃?鐃緒申, 鐃?鐃?鐃緒申鐃?, 鐃緒申鐃緒申鐃?鐃緒申, 鐃緒申鐃緒申鐃緒申鐃緒申
2051     var
2052     ListColumn: TListColumn;
2053     i: Integer;
2054     begin
2055     ListView.Items.BeginUpdate;
2056     try
2057     Screen.Cursor := crHourGlass;
2058    
2059 yoffy 1.51 // 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2060     // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2061     if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2062     begin
2063     ListView.Columns.Clear;
2064     for i := 0 to Length(COLUMN) - 1 do begin
2065     ListColumn := ListView.Columns.Add;
2066     ListColumn.Caption := COLUMN[i];
2067     ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2068     ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2069     end;
2070     end;
2071 hi_ 1.1
2072     ListView.Items.Count := 0;
2073     ListView.Items.Clear;
2074    
2075     case GikoForm.ViewType of
2076     gvtAll: ListView.Items.Count := Board.Count;
2077     gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2078     gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2079     gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2080     end;
2081    
2082     ListNameLabel.Caption := Board.Title;
2083     FolderImage.Picture := nil;
2084     ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2085    
2086 yoffy 1.2 FSortIndex := 0;
2087     FSortOrder := False;
2088     ListViewColumnClick(nil, ListView.Column[0]);
2089 hi_ 1.1
2090     Result := Board.Count;
2091     finally
2092     Screen.Cursor := crDefault;
2093     ListView.Items.EndUpdate;
2094     end;
2095     end;
2096    
2097     procedure TGikoForm.TreeViewChange(Sender: TObject; Node: TTreeNode);
2098     var
2099     i: Integer;
2100     begin
2101     if FTreeType = gttHistory then begin
2102     // SetContent(TThreadItem(Node.Data));
2103     InsertBrowserTab(TThreadItem(Node.Data));
2104     Exit;
2105     end;
2106    
2107     ListView.Selected := nil;
2108     ListView.Items.Count := 0;
2109     ListView.Items.Clear;
2110     // ListView.Columns.Clear;
2111    
2112     Caption := CAPTION_NAME;
2113     //Application.Title := CAPTION_NAME;
2114    
2115    
2116 yoffy 1.123 if GetActiveList is TBBS then begin
2117 hi_ 1.1 for i := 0 to ListView.Columns.Count - 1 do
2118     GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
2119     end else if GetActiveList is TCategory then begin
2120     for i := 0 to ListView.Columns.Count - 1 do
2121     GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
2122     end else if GetActiveList is TBoard then begin
2123     for i := 0 to ListView.Columns.Count - 1 do
2124     GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
2125     end;
2126    
2127 yoffy 1.123 if TObject(Node.Data) is TBBS then begin
2128 hi_ 1.1 SetActiveList(Node.data);
2129     end else if TObject(Node.Data) is TCategory then begin
2130     SetActiveList(Node.data);
2131     end else if TObject(Node.Data) is TBoard then begin
2132     if not TBoard(Node.Data).IsThreadDatRead then begin
2133     Screen.Cursor := crHourGlass;
2134     try
2135     GikoSys.ReadSubjectFile(TBoard(Node.Data));
2136     finally
2137     Screen.Cursor := crDefault;
2138     end;
2139     end;
2140     SetActiveList(Node.data);
2141     end;
2142     end;
2143    
2144     procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2145     var
2146     // FileName: string;
2147     // DateTime: TDateTime;
2148     BoardCnt: Integer;
2149 yoffy 1.123 BBS: TBBS;
2150 hi_ 1.1 Category: TCategory;
2151     Board: TBoard;
2152     ThreadItem: TThreadItem;
2153     RepStr: string;
2154     begin
2155 yoffy 1.123 if ActiveList is TBBS then begin
2156     BBS := TBBS(ActiveList);
2157 yoffy 1.114
2158 hi_ 1.1 ListView.StateImages := nil;
2159    
2160     if BBS = nil then Exit;
2161     if BBS.Count <= 0 then Exit;
2162     if Item = nil then Exit;
2163     if Item.Index > BBS.Count then Exit;
2164     if ListView.Items.Count = 0 then Exit;
2165    
2166 yoffy 1.123 if not (BBS.Items[Item.index] is TCategory) then Exit;
2167     Category := TCategory(BBS.Items[Item.index]);
2168 hi_ 1.1
2169     if Category = nil then Exit;
2170    
2171     if ListNumberVisibleAction.Checked then
2172     Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2173     else
2174     Item.Caption := Category.Title;
2175    
2176 yoffy 1.2 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2177 hi_ 1.1 Item.Data := Category;
2178     end else if ActiveList is TCategory then begin
2179     Category := TCategory(ActiveList);
2180    
2181     ListView.StateImages := nil;
2182    
2183     if Category = nil then Exit;
2184     if Category.Count <= 0 then Exit;
2185     if Item = nil then Exit;
2186     if Item.Index >= Category.Count then Exit;
2187     if ListView.Items.Count = 0 then Exit;
2188    
2189     if not (Category.Items[Item.Index] is TBoard) then Exit;
2190     Board := TBoard(Category.Items[Item.Index]);
2191    
2192     if Board = nil then Exit;
2193    
2194     if ListNumberVisibleAction.Checked then
2195     Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2196     else
2197     Item.Caption := Board.Title;
2198    
2199     if Item.SubItems.Count <> 2 then begin
2200     Item.SubItems.Clear;
2201     Item.SubItems.Add('');
2202     Item.SubItems.Add('');
2203     end;
2204    
2205 yoffy 1.2 Item.ImageIndex := ITEM_ICON_BOARD1;
2206 hi_ 1.1
2207     if Board.Round then
2208 yoffy 1.51 Item.SubItems[0] := Board.RoundName // '鐃?鐃緒申'
2209 hi_ 1.1 else
2210     Item.SubItems[0] := '';
2211    
2212     if Board.RoundDate = ZERO_DATE then begin
2213     Item.SubItems[1] := '';
2214     end else
2215     Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2216     Item.Data := Board;
2217     end else if ActiveList is TBoard then begin
2218     Board := TBoard(ActiveList);
2219    
2220     if GikoSys.Setting.ListIconVisible then
2221     ListView.StateImages := StateIconImageList
2222     else
2223     ListView.StateImages := nil;
2224    
2225     case GikoForm.ViewType of
2226     gvtAll: BoardCnt := Board.Count;
2227     gvtLog: BoardCnt := Board.GetLogThreadCount;
2228     gvtNew: BoardCnt := Board.GetNewThreadCount;
2229     gvtUser: BoardCnt := Board.GetUserThreadCount;
2230 yoffy 1.2 else
2231     BoardCnt := 0;
2232 hi_ 1.1 end;
2233    
2234     // if Board = nil then Exit;
2235     if BoardCnt <= 0 then Exit;
2236     if Item = nil then Exit;
2237     if Item.Index > BoardCnt then Exit;
2238     if ListView.Items.Count = 0 then Exit;
2239    
2240     // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2241    
2242     ThreadItem := nil;
2243     case GikoForm.ViewType of
2244     gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]);
2245     gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2246     gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2247     gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2248     end;
2249    
2250     if ThreadItem = nil then Exit;
2251    
2252     // if ListNumberVisibleAction.Checked then
2253     // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2254     // else
2255     RepStr := ThreadItem.Title;
2256 yoffy 1.2 //RepStr := StringReplace(RepStr, '&amp;', '&', [rfReplaceAll]);
2257 hi_ 1.1 RepStr := StringReplace(RepStr, '&lt;', '<', [rfReplaceAll]);
2258     RepStr := StringReplace(RepStr, '&gt;', '>', [rfReplaceAll]);
2259     RepStr := StringReplace(RepStr, '&quot;', '"', [rfReplaceAll]);
2260 yoffy 1.2 RepStr := StringReplace(RepStr, '&amp', '&', [rfReplaceAll]);
2261 hi_ 1.1 //RepStr := StringReplace(RepStr, '鐃緒申鐃?', ',', [rfReplaceAll]);
2262    
2263     if Item.SubItems.Count <> 6 then begin
2264     Item.SubItems.Clear;
2265     Item.SubItems.Add('');
2266     Item.SubItems.Add('');
2267     Item.SubItems.Add('');
2268     Item.SubItems.Add('');
2269     Item.SubItems.Add('');
2270     Item.SubItems.Add('');
2271     end;
2272    
2273     if ListNumberVisibleAction.Checked then
2274     Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2275     else
2276     Item.Caption := RepStr;
2277    
2278     case ThreadItem.AgeSage of
2279     gasNone: Item.StateIndex := -1;
2280 yoffy 1.51 gasNew: Item.StateIndex := 0;
2281     gasAge: Item.StateIndex := 1;
2282 hi_ 1.1 gasSage: Item.StateIndex := 2;
2283     end;
2284    
2285     if ThreadItem.IsLogFile then begin
2286 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2287 hi_ 1.1 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2288     Item.SubItems[1] := IntToStr(ThreadItem.Count);
2289     if ThreadItem.NewResCount = 0 then
2290     Item.SubItems[2] := ''
2291     else
2292     Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2293     Item.SubItems[3] := '';
2294     if ThreadItem.Round then
2295     Item.SubItems[4] := ThreadItem.RoundName
2296     else
2297     Item.SubItems[4] := '';
2298     if ThreadItem.RoundDate = ZERO_DATE then begin
2299     Item.SubItems[5] := '';
2300     end else
2301     Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2302     if ThreadItem.NewArrival then
2303 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2304 hi_ 1.1 end else begin
2305 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREAD1;
2306 hi_ 1.1 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2307     Item.SubItems[1] := '';
2308     Item.SubItems[2] := '';
2309     Item.SubItems[3] := '';
2310     Item.SubItems[4] := '';
2311     Item.SubItems[5] := '';
2312     end;
2313     Item.Data := ThreadItem;
2314     end;
2315     end;
2316    
2317     procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2318     const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2319     StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2320     var Index: Integer);
2321     begin
2322     //
2323     end;
2324    
2325     procedure TGikoForm.ListViewDataHint(Sender: TObject;