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.125 - (hide annotations) (download) (as text)
Sat Nov 22 06:48:15 2003 UTC (20 years, 5 months ago) by yoffy
Branch: MAIN
Changes since 1.124: +4 -6 lines
File MIME type: text/x-pascal
・R1.124の処置を取り消し。

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.125
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.125
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     // FDownload.Free;
1722     try
1723     SetActiveList(nil);
1724     except
1725     end;
1726 yoffy 1.124
1727 hi_ 1.1 //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1728     Sleep(10);
1729     try
1730     TreeView.Items.Clear;
1731     except
1732     end;
1733 yoffy 1.125
1734 hi_ 1.1 try
1735     if FavoriteDM <> nil then
1736     FavoriteDM.Free;
1737     FavoriteDM := nil;
1738     if AddressHistoryDM <> nil then
1739     AddressHistoryDM.Free;
1740     AddressHistoryDM := nil;
1741     except
1742     end;
1743 yoffy 1.125
1744 yoffy 1.124 try
1745     for i := 0 to Length( BoardPlugIns ) - 1 do begin
1746     if BoardPlugIns[ i ] <> nil then
1747     BoardPlugIns[ i ].Free;
1748     BoardPlugIns[ i ] := nil;
1749     end;
1750     except
1751     end;
1752    
1753 hi_ 1.1 try
1754 yoffy 1.123 for i := 0 to Length( BBSs ) - 1 do begin
1755     if BBSs[ i ] <> nil then
1756     BBSs[ i ].Free;
1757     BBSs[ i ] := nil;
1758     end;
1759 hi_ 1.1 except
1760     end;
1761 yoffy 1.2
1762 yoffy 1.124 try
1763     for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1764     if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1765     //CabinetSelectPopupMenu.Items[ i ].Free;
1766     CabinetSelectPopupMenu.Items.Delete( i );
1767     end;
1768     end;
1769     except
1770     end;
1771    
1772 yoffy 1.2 try
1773     //Hint鐃?鐃緒申
1774     if FHint <> nil then begin
1775     FHint.ReleaseHandle;
1776     FHint.Free;
1777     FHint := nil;
1778     end;
1779     //Preview鐃?鐃緒申
1780     if TPreviewBrowser <> nil then begin
1781     FPreviewBrowser.Free;
1782     FPreviewBrowser := nil;
1783     end;
1784     except
1785     end;
1786 hi_ 1.1 end;
1787    
1788     procedure TGikoForm.FormDestroy(Sender: TObject);
1789     //var
1790     // wp: TWindowPlacement;
1791     begin
1792     { //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1793     FHistoryList.Free;
1794    
1795     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1796     wp.length := sizeof(wp);
1797     GetWindowPlacement(Handle, @wp);
1798    
1799     GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1800     GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1801     GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1802     GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1803     GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1804    
1805     GikoSys.Setting.CabinetVisible := CabinetPanel.Visible;
1806     GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1807    
1808     GikoSys.Setting.WriteWindowSettingFile;
1809     GikoSys.Setting.WriteNameMailSettingFile;
1810     FDownload.Free;
1811     BBS2ch.Free;}
1812     end;
1813    
1814     //鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1815     procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1816     begin
1817     Application.Terminate;
1818     Action := caFree;
1819     end;
1820    
1821     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1822     procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1823     begin
1824     CabinetVisibleAction.Execute;
1825     // CabinetPanelVisible(false);
1826     end;
1827    
1828     procedure TGikoForm.ReloadBBS;
1829 yoffy 1.123 var
1830     i : Integer;
1831     item : TBBSMenuItem;
1832 hi_ 1.1 begin
1833     //鐃?鐃?鐃?鐃緒申鐃?鐃?
1834     NotSelectTabCloseAction.Execute;
1835     if BrowserTab.Tabs.Count >= 1 then
1836     DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1837     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1838     FHistoryList.Clear;
1839     //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1840     TreeView.Items.Clear;
1841    
1842     //BBS鐃?鐃緒申
1843 yoffy 1.124 for i := 0 to Length( BBSs ) - 1 do begin
1844     if BBSs[ i ] <> nil then
1845     BBSs[ i ].Free;
1846     BBSs[ i ] := nil;
1847     end;
1848 hi_ 1.1
1849 yoffy 1.123 ActiveList := nil;
1850 hi_ 1.1
1851     FTreeType := gttNone;
1852    
1853 yoffy 1.123 GikoSys.ReadBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1854     // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1855     for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1856 yoffy 1.124 try
1857     if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1858     CabinetSelectPopupMenu.Items[ i ].Free;
1859     CabinetSelectPopupMenu.Items.Delete( i );
1860     end;
1861     except
1862     end;
1863 yoffy 1.123 end;
1864     // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1865     for i := Length( BBSs ) - 1 downto 0 do begin
1866 yoffy 1.124 try
1867     item := TBBSMenuItem.Create( PopupMenu );
1868     item.Caption := BBSs[ i ].Title;
1869     item.Data := BBSs[ i ];
1870     item.OnClick := BBSMenuItemOnClick;
1871     CabinetSelectPopupMenu.Items.Insert( 0, item );
1872     except
1873     end;
1874 yoffy 1.123 end;
1875     ShowBBSTree( BBSs[ 0 ] );
1876 hi_ 1.1 end;
1877    
1878     //鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1879 yoffy 1.123 procedure TGikoForm.SetBoardTreeNode(
1880     inBBS : TBBS
1881     );
1882 hi_ 1.1 var
1883 yoffy 1.120 i, j, k: integer;
1884 hi_ 1.1 Root: TTreeNode;
1885     CategoryNode: TTreeNode;
1886     BoardNode: TTreeNode;
1887     Category: TCategory;
1888     Board: TBoard;
1889     begin
1890 yoffy 1.112 // 鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1891 hi_ 1.1 TreeView.Items.BeginUpdate;
1892     TreeView.Items.Clear;
1893     try
1894 yoffy 1.123 try
1895     if SplashWindow <> nil then
1896     SplashWindow.ProgressBar.Max := BBSs[ 0 ].Count;
1897     except
1898     end;
1899    
1900     Root := TreeView.Items.Add( nil, inBBS.Title );
1901     Root.ImageIndex := ITEM_ICON_2CH1;
1902     Root.SelectedIndex := ITEM_ICON_2CH2;
1903     Root.Data := inBBS;
1904     for i := 0 to inBBS.Count - 1 do begin
1905     Category := TCategory(inBBS.Items[i]);
1906     CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
1907     CategoryNode.Data := Category;
1908     CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
1909     CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
1910 hi_ 1.1
1911 yoffy 1.123 for j := 0 to Category.Count - 1 do begin
1912     Board := TBoard(Category.Items[j]);
1913     Board.BeginUpdate;
1914     BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
1915     BoardNode.Data := Board;
1916     //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
1917     if not Board.IsLogFile then begin
1918     BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
1919     BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
1920     end else begin
1921     BoardNode.ImageIndex := ITEM_ICON_BOARD1;
1922     BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
1923     for k := 0 to Board.Count - 1 do begin
1924     if Board.Items[ k ].IsLogFile then begin
1925     BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
1926     BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
1927 yoffy 1.120
1928 yoffy 1.123 Break;
1929 yoffy 1.120 end;
1930     end;
1931 yoffy 1.112 end;
1932 yoffy 1.123 Board.LoadSettings;
1933     Board.EndUpdate;
1934     end;
1935 hi_ 1.1
1936 yoffy 1.123 CategoryNode.Expanded := Category.NodeExpand;
1937 hi_ 1.1
1938 yoffy 1.123 if SplashWindow <> nil then begin
1939     SplashWindow.ProgressBar.StepIt;
1940     Application.ProcessMessages;
1941 hi_ 1.1 end;
1942     end;
1943     finally
1944     TreeView.Items.EndUpdate;
1945     end;
1946     end;
1947    
1948 yoffy 1.123 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
1949 hi_ 1.1 const
1950     COLUMN: array[0..0] of string = ('鐃?鐃?鐃?鐃緒申鐃緒申');
1951     var
1952     ListColumn: TListColumn;
1953     i: Integer;
1954     begin
1955     ListView.Items.BeginUpdate;
1956     try
1957     Screen.Cursor := crHourGlass;
1958    
1959     ListView.Columns.Clear;
1960     for i := 0 to Length(COLUMN) - 1 do begin
1961     ListColumn := ListView.Columns.Add;
1962     ListColumn.Caption := COLUMN[i];
1963     ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
1964     end;
1965    
1966     ListView.Items.Count := 0;
1967     ListView.Items.Clear;
1968     ListView.Items.Count := ABBS2ch.Count;
1969    
1970     // UpFolderAction.Enabled := False;
1971     // AllItemAction.Enabled := False;
1972     // LogItemAction.Enabled := False;
1973     // NewItemAction.Enabled := False;
1974     // SelectItemAction.Enabled := False;
1975     // ListDownloadToolButton.Enabled := False;
1976     // BoardReservToolButton.Enabled := False;
1977     // ListThreadDownloadToolButton.Enabled := False;
1978    
1979     ListNameLabel.Caption := ABBS2ch.Title;
1980     FolderImage.Picture := nil;
1981     ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
1982    
1983 yoffy 1.2 FSortIndex := 0;
1984     FSortOrder := False;
1985     ListViewColumnClick(nil, ListView.Column[0]);
1986    
1987 hi_ 1.1 Result := ABBS2ch.Count;
1988     finally
1989     Screen.Cursor := crDefault;
1990     ListView.Items.EndUpdate;
1991     end;
1992     end;
1993    
1994     function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
1995     const
1996     COLUMN: array[0..2] of string = ('鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
1997     var
1998     ListColumn: TListColumn;
1999     i: Integer;
2000     begin
2001     ListView.Items.BeginUpdate;
2002     try
2003     Screen.Cursor := crHourGlass;
2004    
2005     ListView.Columns.Clear;
2006     for i := 0 to Length(COLUMN) - 1 do begin
2007     ListColumn := ListView.Columns.Add;
2008     ListColumn.Caption := COLUMN[i];
2009     ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
2010     end;
2011    
2012     ListView.Items.Count := 0;
2013     ListView.Items.Clear;
2014     ListView.Items.Count := Category.Count;
2015    
2016     // UpFolderAction.Enabled := True;
2017     // AllItemAction.Enabled := False;
2018     // LogItemAction.Enabled := False;
2019     // NewItemAction.Enabled := False;
2020     // SelectItemAction.Enabled := False;
2021     // ListDownloadToolButton.Enabled := False;
2022     // BoardReservToolButton.Enabled := False;
2023     // ListThreadDownloadToolButton.Enabled := False;
2024    
2025     ListNameLabel.Caption := Category.Title;
2026     FolderImage.Picture := nil;
2027     ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2028    
2029 yoffy 1.2 FSortIndex := 0;
2030     FSortOrder := False;
2031     ListViewColumnClick(nil, ListView.Column[0]);
2032    
2033 hi_ 1.1 Result := Category.Count;
2034     finally
2035     Screen.Cursor := crDefault;
2036     ListView.Items.EndUpdate;
2037     end;
2038     end;
2039    
2040     function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2041     const
2042     COLUMN: array[0..6] of string = ('鐃?鐃緒申鐃?鐃?鐃緒申', '鐃?鐃?鐃緒申鐃?', '鐃緒申鐃緒申', '鐃?鐃緒申',
2043     '鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
2044     COLUMN_ALIGNMENT: array[0..6] of TAlignment = (taLeftJustify, taRightJustify,
2045     taRightJustify, taRightJustify,
2046     taRightJustify, taLeftJustify,
2047     taLeftJustify);
2048     //No, 鐃?鐃緒申鐃?鐃?鐃緒申, 鐃?鐃?鐃緒申鐃?, 鐃緒申鐃緒申鐃?鐃緒申, 鐃緒申鐃緒申鐃緒申鐃緒申
2049     var
2050     ListColumn: TListColumn;
2051     i: Integer;
2052     begin
2053     ListView.Items.BeginUpdate;
2054     try
2055     Screen.Cursor := crHourGlass;
2056    
2057 yoffy 1.51 // 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2058     // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2059     if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2060     begin
2061     ListView.Columns.Clear;
2062     for i := 0 to Length(COLUMN) - 1 do begin
2063     ListColumn := ListView.Columns.Add;
2064     ListColumn.Caption := COLUMN[i];
2065     ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2066     ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2067     end;
2068     end;
2069 hi_ 1.1
2070     ListView.Items.Count := 0;
2071     ListView.Items.Clear;
2072    
2073     case GikoForm.ViewType of
2074     gvtAll: ListView.Items.Count := Board.Count;
2075     gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2076     gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2077     gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2078     end;
2079    
2080     ListNameLabel.Caption := Board.Title;
2081     FolderImage.Picture := nil;
2082     ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2083    
2084 yoffy 1.2 FSortIndex := 0;
2085     FSortOrder := False;
2086     ListViewColumnClick(nil, ListView.Column[0]);
2087 hi_ 1.1
2088     Result := Board.Count;
2089     finally
2090     Screen.Cursor := crDefault;
2091     ListView.Items.EndUpdate;
2092     end;
2093     end;
2094    
2095     procedure TGikoForm.TreeViewChange(Sender: TObject; Node: TTreeNode);
2096     var
2097     i: Integer;
2098     begin
2099     if FTreeType = gttHistory then begin
2100     // SetContent(TThreadItem(Node.Data));
2101     InsertBrowserTab(TThreadItem(Node.Data));
2102     Exit;
2103     end;
2104    
2105     ListView.Selected := nil;
2106     ListView.Items.Count := 0;
2107     ListView.Items.Clear;
2108     // ListView.Columns.Clear;
2109    
2110     Caption := CAPTION_NAME;
2111     //Application.Title := CAPTION_NAME;
2112    
2113    
2114 yoffy 1.123 if GetActiveList is TBBS then begin
2115 hi_ 1.1 for i := 0 to ListView.Columns.Count - 1 do
2116     GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
2117     end else if GetActiveList is TCategory then begin
2118     for i := 0 to ListView.Columns.Count - 1 do
2119     GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
2120     end else if GetActiveList is TBoard then begin
2121     for i := 0 to ListView.Columns.Count - 1 do
2122     GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
2123     end;
2124    
2125 yoffy 1.123 if TObject(Node.Data) is TBBS then begin
2126 hi_ 1.1 SetActiveList(Node.data);
2127     end else if TObject(Node.Data) is TCategory then begin
2128     SetActiveList(Node.data);
2129     end else if TObject(Node.Data) is TBoard then begin
2130     if not TBoard(Node.Data).IsThreadDatRead then begin
2131     Screen.Cursor := crHourGlass;
2132     try
2133     GikoSys.ReadSubjectFile(TBoard(Node.Data));
2134     finally
2135     Screen.Cursor := crDefault;
2136     end;
2137     end;
2138     SetActiveList(Node.data);
2139     end;
2140     end;
2141    
2142     procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2143     var
2144     // FileName: string;
2145     // DateTime: TDateTime;
2146     BoardCnt: Integer;
2147 yoffy 1.123 BBS: TBBS;
2148 hi_ 1.1 Category: TCategory;
2149     Board: TBoard;
2150     ThreadItem: TThreadItem;
2151     RepStr: string;
2152     begin
2153 yoffy 1.123 if ActiveList is TBBS then begin
2154     BBS := TBBS(ActiveList);
2155 yoffy 1.114
2156 hi_ 1.1 ListView.StateImages := nil;
2157    
2158     if BBS = nil then Exit;
2159     if BBS.Count <= 0 then Exit;
2160     if Item = nil then Exit;
2161     if Item.Index > BBS.Count then Exit;
2162     if ListView.Items.Count = 0 then Exit;
2163    
2164 yoffy 1.123 if not (BBS.Items[Item.index] is TCategory) then Exit;
2165     Category := TCategory(BBS.Items[Item.index]);
2166 hi_ 1.1
2167     if Category = nil then Exit;
2168    
2169     if ListNumberVisibleAction.Checked then
2170     Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2171     else
2172     Item.Caption := Category.Title;
2173    
2174 yoffy 1.2 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2175 hi_ 1.1 Item.Data := Category;
2176     end else if ActiveList is TCategory then begin
2177     Category := TCategory(ActiveList);
2178    
2179     ListView.StateImages := nil;
2180    
2181     if Category = nil then Exit;
2182     if Category.Count <= 0 then Exit;
2183     if Item = nil then Exit;
2184     if Item.Index >= Category.Count then Exit;
2185     if ListView.Items.Count = 0 then Exit;
2186    
2187     if not (Category.Items[Item.Index] is TBoard) then Exit;
2188     Board := TBoard(Category.Items[Item.Index]);
2189    
2190     if Board = nil then Exit;
2191    
2192     if ListNumberVisibleAction.Checked then
2193     Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2194     else
2195     Item.Caption := Board.Title;
2196    
2197     if Item.SubItems.Count <> 2 then begin
2198     Item.SubItems.Clear;
2199     Item.SubItems.Add('');
2200     Item.SubItems.Add('');
2201     end;
2202    
2203 yoffy 1.2 Item.ImageIndex := ITEM_ICON_BOARD1;
2204 hi_ 1.1
2205     if Board.Round then
2206 yoffy 1.51 Item.SubItems[0] := Board.RoundName // '鐃?鐃緒申'
2207 hi_ 1.1 else
2208     Item.SubItems[0] := '';
2209    
2210     if Board.RoundDate = ZERO_DATE then begin
2211     Item.SubItems[1] := '';
2212     end else
2213     Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2214     Item.Data := Board;
2215     end else if ActiveList is TBoard then begin
2216     Board := TBoard(ActiveList);
2217    
2218     if GikoSys.Setting.ListIconVisible then
2219     ListView.StateImages := StateIconImageList
2220     else
2221     ListView.StateImages := nil;
2222    
2223     case GikoForm.ViewType of
2224     gvtAll: BoardCnt := Board.Count;
2225     gvtLog: BoardCnt := Board.GetLogThreadCount;
2226     gvtNew: BoardCnt := Board.GetNewThreadCount;
2227     gvtUser: BoardCnt := Board.GetUserThreadCount;
2228 yoffy 1.2 else
2229     BoardCnt := 0;
2230 hi_ 1.1 end;
2231    
2232     // if Board = nil then Exit;
2233     if BoardCnt <= 0 then Exit;
2234     if Item = nil then Exit;
2235     if Item.Index > BoardCnt then Exit;
2236     if ListView.Items.Count = 0 then Exit;
2237    
2238     // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2239    
2240     ThreadItem := nil;
2241     case GikoForm.ViewType of
2242     gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]);
2243     gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2244     gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2245     gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2246     end;
2247    
2248     if ThreadItem = nil then Exit;
2249    
2250     // if ListNumberVisibleAction.Checked then
2251     // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2252     // else
2253     RepStr := ThreadItem.Title;
2254 yoffy 1.2 //RepStr := StringReplace(RepStr, '&amp;', '&', [rfReplaceAll]);
2255 hi_ 1.1 RepStr := StringReplace(RepStr, '&lt;', '<', [rfReplaceAll]);
2256     RepStr := StringReplace(RepStr, '&gt;', '>', [rfReplaceAll]);
2257     RepStr := StringReplace(RepStr, '&quot;', '"', [rfReplaceAll]);
2258 yoffy 1.2 RepStr := StringReplace(RepStr, '&amp', '&', [rfReplaceAll]);
2259 hi_ 1.1 //RepStr := StringReplace(RepStr, '鐃緒申鐃?', ',', [rfReplaceAll]);
2260    
2261     if Item.SubItems.Count <> 6 then begin
2262     Item.SubItems.Clear;
2263     Item.SubItems.Add('');
2264     Item.SubItems.Add('');
2265     Item.SubItems.Add('');
2266     Item.SubItems.Add('');
2267     Item.SubItems.Add('');
2268     Item.SubItems.Add('');
2269     end;
2270    
2271     if ListNumberVisibleAction.Checked then
2272     Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2273     else
2274     Item.Caption := RepStr;
2275    
2276     case ThreadItem.AgeSage of
2277     gasNone: Item.StateIndex := -1;
2278 yoffy 1.51 gasNew: Item.StateIndex := 0;
2279     gasAge: Item.StateIndex := 1;
2280 hi_ 1.1 gasSage: Item.StateIndex := 2;
2281     end;
2282    
2283     if ThreadItem.IsLogFile then begin
2284 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2285 hi_ 1.1 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2286     Item.SubItems[1] := IntToStr(ThreadItem.Count);
2287     if ThreadItem.NewResCount = 0 then
2288     Item.SubItems[2] := ''
2289     else
2290     Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2291     Item.SubItems[3] := '';
2292     if ThreadItem.Round then
2293     Item.SubItems[4] := ThreadItem.RoundName
2294     else
2295     Item.SubItems[4] := '';
2296     if ThreadItem.RoundDate = ZERO_DATE then begin
2297     Item.SubItems[5] := '';
2298     end else
2299     Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2300     if ThreadItem.NewArrival then
2301 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2302 hi_ 1.1 end else begin
2303 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREAD1;
2304 hi_ 1.1 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2305     Item.SubItems[1] := '';
2306     Item.SubItems[2] := '';
2307     Item.SubItems[3] := '';
2308     Item.SubItems[4] := '';
2309     Item.SubItems[5] := '';
2310     end;
2311     Item.Data := ThreadItem;
2312     end;
2313     end;
2314    
2315     procedure TGikoForm.