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.126 - (hide annotations) (download) (as text)
Sat Nov 22 13:44:49 2003 UTC (20 years, 5 months ago) by yoffy
Branch: MAIN
Changes since 1.125: +92 -48 lines
File MIME type: text/x-pascal
・メニューバーのキャビネットにも BBS の一覧が表示されるようになった。

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