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.134 - (hide annotations) (download) (as text)
Sun Nov 23 16:47:44 2003 UTC (20 years, 4 months ago) by yoffy
Branch: MAIN
Changes since 1.133: +0 -2 lines
File MIME type: text/x-pascal
・BBS を切り替えたときに自動的に 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 yoffy 1.133 FActiveBBS : TBBS;
834 hi_ 1.1 FHistoryList: TList; //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
835     FTreeType: TGikoTreeType;
836     FWorkCount: Integer;
837     FNameCookie: string;
838     FMailCookie: string;
839     // FLastRoundTime: TDateTime;
840     BrowserNullTab: TThreadItem;
841     // DoubleClickOccurred: array [TMouseButton] of Boolean;
842     FDownloadTitle: string; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
843     FDownloadMax: Integer; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?
844     FEvent: THTMLDocumentEventSink;//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?
845 h677 1.14
846 yoffy 1.51 Fkeynum : Integer; //鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
847 yoffy 1.29
848 yoffy 1.51 IsDraggingSelectComboBox : Boolean;
849     DraggingSelectComboBoxPosition : TPoint;
850 yoffy 1.29
851 yoffy 1.54 FSearchDialog: TSearchDialog;
852 yoffy 1.49
853 yoffy 1.100 FDropSpaceNode: TTreeNode;
854 yoffy 1.74
855 yoffy 1.107 FDragTime : Cardinal; //鐃緒申鐃緒申鐃?鐃緒申D&D鐃?
856     FDragButton : TToolButton; //鐃緒申鐃緒申鐃?鐃緒申D&D鐃?鐃緒申Drag鐃緒申鐃緒申鐃緒申Button鐃緒申鐃緒申
857     FDragWFirst : Boolean; //WebTab鐃緒申D&D鐃?
858 h677 1.84
859 yoffy 1.123 FListViewBackGroundColor : TColor; //ListView鐃緒申BackGroundColor
860     FUseOddResOddColor : Boolean; //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申
861     FOddColor : TColor; //鐃緒申鐃緒申鐃?
862     procedure SetBoardTreeNode( inBBS : TBBS );
863     function SetCategoryListItem(ABBS2ch: TBBS): Integer;
864 hi_ 1.1 function SetBoardListItem(Category: TCategory): Integer;
865     function SetThreadListItem(Board: TBoard): Integer;
866     // function GetRoundName(index: integer): string;
867    
868     procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
869     procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
870     procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer);
871     procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
872     procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
873    
874     procedure SetActiveList(Obj: TObject);
875     procedure ListClick;
876     procedure ListDoubleClick;
877     procedure BrowserMovement(AName: string);
878     procedure SelectListItem(List: TList);
879     // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
880     procedure DeleteTab(ThreadItem: TThreadItem);
881     function Hook(var Message: TMessage): Boolean;
882     procedure AddRoundNameMenu(MenuItem: TMenuItem);
883     procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
884     procedure SetSelectRoundName(Sender: TObject);
885     function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
886    
887     procedure SetMenuFont;
888     // procedure CreateFavMenu(Folder: TFavoriteFolder);
889     procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
890 yoffy 1.62 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
891     procedure FavoriteClick(Sender: TObject); overload;
892 yoffy 1.100 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
893 yoffy 1.2 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
894 hi_ 1.1 function OnDocumentContextMenu(Sender: TObject): WordBool;
895     // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
896 yoffy 1.123 procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
897 hi_ 1.1 procedure ShowTextPopup;
898     //procedure ShowTextPopup(HintData: THintData);
899 yoffy 1.2 // procedure SetStdToolBar;
900     // function GetAction(ActionName: string): TContainedAction;
901 hi_ 1.1 procedure SetLinkBar;
902     function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
903 yoffy 1.2 procedure MenuBarChevronMenu;
904     procedure LinkBarChevronMenu;
905     procedure ToolBarChevronMenu(ToolBar: TToolBar);
906 yoffy 1.51 procedure ModifySelectList;
907 yoffy 1.100 procedure FavoriteBrowseFolder( node: TTreeNode );
908     procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
909     procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
910     procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
911     procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
912 yoffy 1.85 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
913 yoffy 1.72 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
914 yoffy 1.100 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
915     procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
916 yoffy 1.72 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
917 yoffy 1.100 //
918     procedure BrowserTabClick(Sender: TObject);
919 yoffy 1.123 procedure SetListViewBackGroundColor(value: TColor);
920     procedure BBSMenuItemOnClick( Sender : TObject );
921 hi_ 1.1 protected
922     procedure CreateParams(var Params: TCreateParams); override;
923 yoffy 1.2 procedure WndProc(var Message: TMessage); override;
924 hi_ 1.1 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
925     procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
926     procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
927     public
928     { Public 鐃緒申鐃緒申 }
929     // FDownload: TDownload;
930     FControlThread: TThreadControl;
931 yoffy 1.48 procedure MoveToURL(URL: string);
932     procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
933 hi_ 1.1 procedure ReloadBBS;
934     function GetHttpState: Boolean;
935     procedure SetEnabledCloseButton(Enabled: Boolean);
936     function GetTreeNode(Data: TObject): TTreeNode;
937     procedure AppFormDeactivate(Sender: TObject);
938     // procedure CabinetPanelVisible(PanelVisible: Boolean);
939     procedure ListViewAllSelect;
940    
941     property ListStyle: TViewStyle read FListStyle write FListStyle;
942     property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
943     property ViewType: TGikoViewType read FViewType write FViewType;
944    
945     property NameCookie: string read FNameCookie write FNameCookie;
946     property MailCookie: string read FMailCookie write FMailCookie;
947    
948     procedure SetContent(ThreadItem: TThreadItem);
949     function GetActiveContent: TThreadItem;
950     function GetActiveList: TObject;
951    
952     property ActiveList: TObject read GetActiveList write SetActiveList;
953     // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
954    
955     procedure SetListViewType(AViewType: TGikoViewType); overload;
956     procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
957     procedure DownloadContent(ThreadItem: TThreadItem);
958     procedure DownloadList(Board: TBoard);
959     procedure PlaySound(SoundEventName: string);
960    
961     function AddHistory(ThreadItem: TThreadItem): Boolean;
962     procedure DeleteHistory(ThreadItem: TThreadItem);
963     procedure ClearHistory;
964 yoffy 1.123 procedure ShowBBSTree( inBBS : TBBS );
965 hi_ 1.1 procedure ShowHistoryTree;
966     procedure SetHistoryTreeNode;
967     // procedure SelectTreeNode(Item: TObject);
968     procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
969     procedure SetBrowserTabState;
970     // property Favorite: TFavorite read FFavorite write FFavorite;
971 yoffy 1.2 procedure SetToolBarPopup;
972 yoffy 1.100 procedure ShowFavoriteAddDialog( Item : TObject );
973 yoffy 1.123 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
974     property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
975     property OddColor : TColor read FOddColor write FOddColor;
976 h677 1.109
977 hi_ 1.1 published
978     property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
979     end;
980    
981     TFavoriteMenuItem = class(TMenuItem)
982     private
983     FData : Pointer;
984     public
985     property Data: Pointer read FData write FData;
986     end;
987    
988 yoffy 1.123 TBBSMenuItem = class(TMenuItem)
989     private
990     FData : Pointer;
991     public
992     property Data: Pointer read FData write FData;
993     end;
994    
995 hi_ 1.1 TLinkToolButton = class(TToolButton)
996     private
997     FData : Pointer;
998     public
999     property Data: Pointer read FData write FData;
1000     end;
1001    
1002     var
1003     GikoForm: TGikoForm;
1004    
1005     implementation
1006    
1007     uses
1008     About, Option, Round, Splash, Sort, ListSelect,
1009 yoffy 1.54 NewBoard;
1010 hi_ 1.1
1011     const
1012     CAPTION_NAME: string = '鐃?鐃?鐃?鐃?';
1013     BLANK_HTML: string = 'about:blank';
1014 yoffy 1.51 SELECTCOMBOBOX_NAME: string = ''; // '鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申';
1015     SELECTCOMBOBOX_COLOR: TColor = clWindow;
1016 yoffy 1.120 //D&D鐃緒申鐃?
1017     DandD_THRESHOLD = 5; //D&D鐃緒申鐃緒申鐃?鐃?pixcel)
1018 yoffy 1.2 //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1019     ITEM_ICON_2CH1 = 0; //2ch鐃?鐃?鐃?鐃緒申
1020     ITEM_ICON_2CH2 = 1; //2ch鐃?鐃?鐃?鐃緒申
1021     ITEM_ICON_CATEGORY1 = 2; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1022     ITEM_ICON_CATEGORY2 = 3; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1023 yoffy 1.120 ITEM_ICON_BOARD_NOSUBJECT = 3; //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1024 yoffy 1.2 ITEM_ICON_BOARD1 = 4; //鐃緒申鐃?鐃?鐃?鐃緒申
1025     ITEM_ICON_BOARD2 = 5; //鐃緒申鐃?鐃?鐃?鐃緒申
1026     ITEM_ICON_THREADLOG1 = 6; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1027     ITEM_ICON_THREADLOG2 = 7; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1028     ITEM_ICON_THREAD1 = 8; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1029     ITEM_ICON_THREAD2 = 9; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1030     ITEM_ICON_THREADNEW1 = 10; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1031     ITEM_ICON_THREADNEW2 = 11; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1032     ITEM_ICON_SORT1 = 12; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1033     ITEM_ICON_SORT2 = 13; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1034 yoffy 1.120 ITEM_ICON_BOARD_LOG = 17; //鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1035     ITEM_ICON_BOARD_NEW = 18; //鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1036 yoffy 1.2
1037     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1038 yoffy 1.48 TOOL_ICON_HEIGHT_MAX = 16; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1039     TOOL_ICON_HEIGHT_MIN = 17; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1040     TOOL_ICON_HEIGHT_NORMAL = 18; //鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1041     TOOL_ICON_WIDTH_MAX = 19; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1042     TOOL_ICON_WIDTH_MIN = 20; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1043     TOOL_ICON_WIDTH_NORMAL = 21; //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1044    
1045 yoffy 1.51 TOOL_ICON_FAV_FOLDER = 30; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申
1046 yoffy 1.100 TOOL_ICON_FAV_BOARD = 31; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1047 yoffy 1.51 TOOL_ICON_FAV_THREAD = 32; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1048 hi_ 1.1
1049     HTML_FILE_NAME = 'temp_preview.html';
1050    
1051     {$R *.DFM}
1052    
1053     procedure TGikoForm.CreateParams(var Params: TCreateParams);
1054     begin
1055     inherited;
1056     if FormStyle in [fsNormal, fsStayOnTop] then begin
1057     if BorderStyle in [bsSingle, bsSizeable] then begin
1058     Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1059     Params.WndParent := 0;
1060     end;
1061     end;
1062     end;
1063    
1064     procedure TGikoForm.FormCreate(Sender: TObject);
1065     const
1066     TVS_NOTOOLTIPS = $0080;
1067     var
1068     FileName: string;
1069     Style: DWORD;
1070     msg: string;
1071     i: Integer;
1072     wp: TWindowPlacement;
1073 hi_ 1.32 s: string;
1074 yoffy 1.123 item : TBBSMenuItem;
1075 hi_ 1.1 begin
1076     {$IFDEF DEBUG}
1077     AllocConsole;
1078     Writeln('============================================================');
1079     Writeln(' 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃? 鐃?鐃緒申鐃?鐃?鐃緒申');
1080     Writeln('');
1081     Writeln(' 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?');
1082     Writeln(' 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
1083     Writeln('============================================================');
1084     {$ENDIF}
1085     Application.OnDeactivate := AppFormDeactivate;
1086     Self.OnDeactivate := AppFormDeactivate;
1087     Application.HookMainWindow(Hook);
1088    
1089     FTreeType := gttNone;
1090    
1091 yoffy 1.51 FSearchDialog := nil;
1092 yoffy 1.49
1093 hi_ 1.1 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1094     Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1095    
1096     //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1097     RoundList := TRoundList.Create;
1098     RoundList.LoadRoundFile;
1099    
1100     //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1101     AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1102    
1103 yoffy 1.107 // 鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?(ReadBoardFile 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1104     InitializeBoardPlugIns;
1105 yoffy 1.105
1106 hi_ 1.1 EnabledCloseButton := True;
1107 yoffy 1.123 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申(ReadFavorite 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1108     GikoSys.ReadBoardFile;
1109 hi_ 1.1 // SetBoardTreeNode; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1110 yoffy 1.123 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1111     for i := Length( BBSs ) - 1 downto 0 do begin
1112 yoffy 1.126 try
1113     item := TBBSMenuItem.Create( PopupMenu );
1114     item.Caption := BBSs[ i ].Title;
1115     item.Data := BBSs[ i ];
1116     item.OnClick := BBSMenuItemOnClick;
1117     CabinetSelectPopupMenu.Items.Insert( 0, item );
1118     item := TBBSMenuItem.Create( PopupMenu );
1119     item.Caption := BBSs[ i ].Title;
1120     item.Data := BBSs[ i ];
1121     item.OnClick := BBSMenuItemOnClick;
1122     CabinetMenu.Insert( 0, item );
1123     except
1124     end;
1125 yoffy 1.123 end;
1126    
1127     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1128     // FFavorite := TFavorite.Create(FavoriteTreeView);
1129     FavoriteDM.SetFavTreeView(FavoriteTreeView);
1130     FavoriteDM.ReadFavorite;
1131 hi_ 1.1
1132     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1133     ListView.ViewStyle := GikoSys.Setting.ListStyle;
1134    
1135     //鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1136     // MainCoolBar.Top := 0;
1137     // MainCoolBar.Left := 0;
1138    
1139     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
1140     AnimePanel.Top := 0;
1141     AnimePanel.Left := 0;
1142    
1143     //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1144    
1145     //鐃?鐃緒申鐃?鐃?鐃?鐃?
1146     CabinetVisibleAction.Checked := not GikoSys.Setting.CabinetVisible;
1147     CabinetVisibleAction.Execute;
1148     CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1149    
1150     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1151     MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1152     MsgBarVisibleActionExecute(nil);
1153     MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1154    
1155     //鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1156     StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1157     StatusBarVisibleActionExecute(nil);
1158    
1159     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1160     TreeView.Items.BeginUpdate;
1161 yoffy 1.100 FavoriteTreeView.Items.BeginUpdate;
1162 hi_ 1.1 ListView.Items.BeginUpdate;
1163     try
1164     TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1165     TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1166     TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1167     TreeView.Color := GikoSys.Setting.CabinetBackColor;
1168    
1169 yoffy 1.67 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1170     FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1171     FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1172     FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1173    
1174 hi_ 1.1 ListView.Font.Name := GikoSys.Setting.ListFontName;
1175     ListView.Font.Size := GikoSys.Setting.ListFontSize;
1176     ListView.Font.Color := GikoSys.Setting.ListFontColor;
1177 h677 1.109 //ListView.Color := GikoSys.Setting.ListBackColor;
1178 yoffy 1.123 ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1179     FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1180     FOddColor := GikoSys.Setting.OddColor;
1181 h677 1.109
1182 hi_ 1.1 finally
1183     TreeView.Items.EndUpdate;
1184 yoffy 1.100 FavoriteTreeView.Items.EndUpdate;
1185 hi_ 1.1 ListView.Items.EndUpdate;
1186     end;
1187     //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1188     ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1189    
1190     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1191     BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1192     BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1193 yoffy 1.133 FDragWFirst := false;
1194 hi_ 1.1
1195     // TreeView.TopItem.Expanded := True; //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1196     // TreeView.Selected := TreeView.Items[0]; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1197     SetContent(nil); //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1198    
1199     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1200     wp.length := sizeof(wp);
1201     wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1202     wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1203     wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1204     wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1205     wp.showCmd := SW_HIDE;
1206     SetWindowPlacement(Handle, @wp);
1207    
1208     // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1209     // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1210     if GikoSys.Setting.WindowMax then
1211     WindowState := wsMaximized;
1212    
1213     //鐃?鐃?鐃?鐃?鐃緒申
1214     try
1215     FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1216     if FileExists(FileName) then
1217     Animate.FileName := FileName;
1218     except
1219     end;
1220     // AnimePanel.Height := 26;
1221     // AnimePanel.Width := 39;
1222     // AnimePanel.Top := 2;
1223     // AnimePanel.Left := Width - 48;
1224    
1225     //鐃?鐃?鐃?鐃?
1226     FNameCookie := '';
1227     FMailCookie := '';
1228    
1229     //鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1230     AllItemAction.Checked := True;
1231 yoffy 1.126 AllResAction.Checked := True;
1232 hi_ 1.1
1233     //TreeView鐃緒申鐃緒申鐃緒申鐃?鐃緒申ToolTip鐃緒申鐃緒申鐃?鐃緒申
1234     Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1235     Style := Style or TVS_NOTOOLTIPS;
1236     SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1237    
1238     // 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1239     TreeView.Align := alClient;
1240 yoffy 1.57 FavoriteTreeView.Align := alClient;
1241 hi_ 1.1 FavoriteTreeView.Visible := False;
1242    
1243     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1244     // FBrowserSizeFlag := False;
1245     // FBrowserSizeHeight := ViewPanel.Height;
1246    
1247     FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1248     FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1249    
1250     ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1251     ArrangeAction.Execute;
1252    
1253     if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1254     case GikoSys.Setting.ListWidthState of
1255     glsMax: begin
1256     ViewPanel.Width := 1;
1257 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1258     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1259 hi_ 1.1 end;
1260     glsMin: begin
1261     ViewPanel.Width := GikoSys.Setting.ListWidth;
1262 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1263     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1264 hi_ 1.1 end;
1265     else begin
1266     ViewPanel.Width := GikoSys.Setting.ListWidth;
1267 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1268     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1269 hi_ 1.1 end;
1270     end;
1271     // if GikoSys.Setting.ListWidthMax then begin
1272     // ViewPanel.Width := 1;
1273     // BrowserSizeAction.ImageIndex := ICON_WIDTH_MIN;
1274     // end else begin
1275     // ViewPanel.Width := GikoSys.Setting.ListWidth;
1276     // BrowserSizeAction.ImageIndex := ICON_WIDTH_MAX;
1277     // end;
1278     end else begin
1279     case GikoSys.Setting.ListHeightState of
1280     glsMax: begin
1281     ViewPanel.Height := 1;
1282 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1283     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1284 hi_ 1.1 end;
1285     glsMin: begin
1286     ViewPanel.Height := GikoSys.Setting.ListHeight;
1287 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1288     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1289 hi_ 1.1 end;
1290     else begin
1291     ViewPanel.Height := GikoSys.Setting.ListHeight;
1292 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1293     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1294 hi_ 1.1 end;
1295     end;
1296     // if GikoSys.Setting.ListHeightState = glsMax then begin
1297     // end else begin
1298     // ViewPanel.Height := GikoSys.Setting.ListHeight;
1299     // BrowserSizeAction.ImageIndex := ICON_HEIGHT_MAX;
1300     // end;
1301     end;
1302    
1303     //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1304     // ProgressBar.Visible := False;
1305     ProgressBar.Parent := StatusBar;
1306     ProgressBar.Top := 2;
1307     ProgressBar.Left := 0;
1308     ProgressBar.Width := StatusBar.Panels[0].Width;
1309     ProgressBar.Height := StatusBar.Height - 2;
1310     ProgressBar.Position := 0;
1311    
1312     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1313     //formshow()鐃緒申鐃緒申鐃緒申
1314 yoffy 1.2
1315 hi_ 1.1 //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1316     // FDownload := TDownload.Create;
1317     // FDownload.OnDownloadEnd := OnDonloadEnd;
1318     // FDownload.OnWork := Work;
1319     // FDownload.OnWorkBegin := WorkBegin;
1320     // FDownload.OnWorkEnd := WorkEnd;
1321    
1322     //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1323     FControlThread := TThreadControl.Create(True);
1324     FControlThread.MaxThreadCount := 1;
1325     FControlThread.Resume;
1326     FControlThread.OnDownloadEnd := DownloadEnd;
1327     FControlThread.OnDownloadMsg := DownloadMsg;
1328     FControlThread.OnWork := Work;
1329     FControlThread.OnWorkBegin := WorkBegin;
1330     FControlThread.OnWorkEnd := WorkEnd;
1331     // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1332    
1333     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1334     FHistoryList := TList.Create;
1335    
1336 yoffy 1.51 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1337     SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1338 yoffy 1.2
1339 hi_ 1.1 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
1340     SetBrowserTabState;
1341    
1342     BrowserBoardNameLabel.Caption := '';
1343     BrowserNameLabel.Caption := '';
1344     FWorkCount := 0;
1345    
1346     // DetailIconAction.Execute;
1347    
1348     // FBrowserSizeHeight := ViewPanel.Height;
1349     FTabHintIndex := -1;
1350    
1351     //鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1352     // if not GikoSys.DirectoryExistsEx(BBS2ch.GetLogFolder) then begin
1353     // GikoSys.ForceDirectoriesEx(BBS2ch.GetLogFolder);
1354     // end;
1355     // FormResize(Sender);
1356     // MainCoolBarResize(Sender);
1357     // Application.ProcessMessages;
1358    
1359     //鐃緒申鐃緒申鐃?鐃?鐃?
1360     SetLinkBar;
1361    
1362     //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?
1363     SetMenuFont;
1364    
1365     //鐃?鐃?鐃緒申鐃?鐃?Wrapable
1366     ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1367     BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1368    
1369 yoffy 1.2 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1370     ReadToolBarSetting(ActionList, StdToolBar);
1371     ReadToolBarSetting(ActionList, ListToolBar);
1372 yoffy 1.51 try
1373     for i := ListToolBar.ControlCount - 1 downto 0 do
1374     begin
1375     if ListToolBar.Controls[ i ].Action = SelectItemAction then
1376     begin
1377     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1378     if (i + 1) < ListToolBar.ControlCount then
1379     if ListToolBar.Controls[ i + 1 ] is TToolButton then
1380     if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1381     ListToolBar.Controls[ i + 1 ].Visible := False;
1382    
1383     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申
1384     ListToolBar.Controls[ i ].Visible := False;
1385     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申
1386     SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1387     SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1388     SelectComboBox.Parent := ListToolBar;
1389     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
1390     SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1391     SelectComboBoxSplitter.Parent := ListToolBar;
1392    
1393     break;
1394     end;
1395     end;
1396     except
1397     end;
1398 yoffy 1.2 ReadToolBarSetting(ActionList, BrowserToolBar);
1399     SetToolBarPopup;
1400 yoffy 1.126 OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes;
1401 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃?鐃?
1402     AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1403    
1404 yoffy 1.2 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1405    
1406     //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1407     if not FileExists(GikoSys.GetBoardFileName) then begin
1408     msg := '鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申' + #13#10#13#10
1409     + '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申' + #13#10
1410     + '鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?';
1411     MsgBox(SplashWindow.Handle, msg, '鐃?鐃?鐃?鐃?', MB_OK or MB_ICONINFORMATION);
1412     NewBoardAction.Execute;
1413     end;
1414    
1415     //鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1416     GikoSys.LoadKeySetting(ActionList);
1417    
1418     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1419     // FLastRoundTime := 0;
1420    
1421     //ResHint
1422     FHint := TResPopup.Create(Self);
1423    
1424 yoffy 1.100 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申(鐃緒申鐃緒申鐃緒申)
1425     // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申(鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?)
1426     i := GikoSys.Setting.CabinetIndex;
1427 yoffy 1.123 ShowBBSTree( BBSs[ 0 ] );
1428 yoffy 1.100 GikoSys.Setting.CabinetIndex := i;
1429    
1430     // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1431     Case GikoSys.Setting.CabinetIndex of
1432     0: Cabinet2chAction.Execute;
1433     1: CabinetHistoryAction.Execute;
1434     2: CabinetFavoriteAction.Execute;
1435     end;
1436 yoffy 1.67
1437 yoffy 1.2 //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1438     if GikoSys.Setting.AutoLogin then
1439     LoginAction.Execute;
1440    
1441     //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?
1442     for i := 1 to ParamCount do begin
1443     MoveToURL(ParamStr(i));
1444     end;
1445     // SetStdToolBar;
1446     // SetLinkBar;
1447 h677 1.22
1448 hi_ 1.32 s := GikoSys.FAbon.NGwordname;
1449     StatusBar.Panels[2].Text := s;
1450     StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1451     StatusBarResize(Sender);
1452 yoffy 1.2 end;
1453    
1454     //
1455     //
1456     //
1457     procedure TGikoForm.FormShow(Sender: TObject);
1458     var
1459     i: Integer;
1460     CoolSet: TCoolSet;
1461     begin
1462     ShowWindow(Application.Handle, SW_HIDE);
1463    
1464     //FormCreate鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1465     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1466     StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1467     StdToolBarVisibleActionExecute( nil );
1468     AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1469     AddressBarVisibleActionExecute( nil );
1470     LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1471     LinkBarVisibleActionExecute( nil );
1472     ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1473     ListToolBarVisibleActionExecute( nil );
1474     ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1475     ListNameBarVisibleActionExecute( nil );
1476     BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1477     BrowserToolBarVisibleActionExecute( nil );
1478     BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1479     BrowserNameBarVisibleActionExecute( nil );
1480    
1481     //鐃?鐃緒申鐃?鐃?鐃?鐃?
1482     BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1483     BrowserTabVisibleActionExecute(nil);
1484    
1485     if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1486     BrowserTabTopAction.Checked := True;
1487     BrowserTabTopActionExecute(nil);
1488     end else begin
1489     BrowserTabBottomAction.Checked := True;
1490     BrowserTabBottomActionExecute(nil);
1491     end;
1492    
1493     if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1494     BrowserTabTabStyleAction.Checked := True;
1495     BrowserTabTabStyleActionExecute(nil);
1496     end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1497     BrowserTabButtonStyleAction.Checked := True;
1498     BrowserTabButtonStyleActionExecute(nil);
1499     end else begin
1500     BrowserTabFlatStyleAction.Checked := True;
1501     BrowserTabFlatStyleActionExecute(nil);
1502     end;
1503    
1504    
1505 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1506     MainCoolBar.Bands.BeginUpdate;
1507     try
1508     for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1509     CoolSet := GikoSys.Setting.MainCoolSet[i];
1510     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1511     Continue;
1512     MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1513     MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1514     MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1515     end;
1516     finally
1517     MainCoolBar.Bands.EndUpdate;
1518     end;
1519    
1520     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1521     ListCoolBar.Bands.BeginUpdate;
1522     try
1523     for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1524     CoolSet := GikoSys.Setting.ListCoolSet[i];
1525     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1526     Continue;
1527     ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1528     ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1529     ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1530     end;
1531     finally
1532     ListCoolBar.Bands.EndUpdate;
1533     end;
1534    
1535     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1536     BrowserCoolBar.Bands.BeginUpdate;
1537     try
1538     for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1539     CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1540     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1541     Continue;
1542     BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1543     BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1544     BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1545     end;
1546     finally
1547     BrowserCoolBar.Bands.EndUpdate;
1548     end;
1549    
1550     end;
1551 yoffy 1.2 {
1552 hi_ 1.1 procedure TGikoForm.SetStdToolBar;
1553     var
1554     i: Integer;
1555     FileName: string;
1556     ini: TMemIniFile;
1557     s: string;
1558     Action: TContainedAction;
1559     ToolButton: TToolButton;
1560     begin
1561     exit;
1562     for i := StdToolBar.ButtonCount - 1 downto 0 do begin
1563     StdToolBar.RemoveControl(StdToolBar.Buttons[i]);
1564     //StdToolBar.Buttons[i].Free;
1565     end;
1566     FileName := GikoSys.GetConfigDir + 'ToolBar.ini';
1567     ini := TMemIniFile.Create(FileName);
1568     i := 0;
1569     while true do begin
1570     s := ini.ReadString('StdToolBar', IntToStr(i), '');
1571     if s = '' then
1572     Break;
1573     if s = '-' then begin
1574     ToolButton := TToolButton.Create(StdToolBar);
1575     ToolButton.Style := tbsSeparator;
1576     ToolButton.Width := 8;
1577     ToolButton.Left := 10000;
1578     StdToolBar.InsertControl(ToolButton);
1579     end else begin
1580     Action := GetAction(s);
1581     if Action <> nil then begin
1582     ToolButton := TToolButton.Create(StdToolBar);
1583     ToolButton.Action := Action;
1584     ToolButton.Left := 10000;
1585     StdToolBar.InsertControl(ToolButton);
1586     end;
1587     end;
1588     Inc(i);
1589     end;
1590     end;
1591 yoffy 1.2 }
1592     {function TGikoForm.GetAction(ActionName: string): TContainedAction;
1593 hi_ 1.1 var
1594     i: Integer;
1595     begin
1596     for i := 0 to ActionList.ActionCount - 1 do begin
1597     if ActionList.Actions[i].Name = ActionName then begin
1598     Result := ActionList.Actions[i];
1599     Exit;
1600     end;
1601     end;
1602     Result := nil;
1603 yoffy 1.2 end;}
1604 hi_ 1.1
1605     procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1606     var
1607     i: Integer;
1608     CoolSet: TCoolSet;
1609     wp: TWindowPlacement;
1610     begin
1611 yoffy 1.100 if ( GikoSys.Setting.ShowDialogForEnd ) and
1612     (MessageDlg('鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
1613     CanClose := false;
1614     Exit;
1615     end else begin
1616     CanClose := True;
1617     end;
1618 hi_ 1.1 Application.OnDeactivate := nil;
1619     Self.OnDeactivate := nil;
1620    
1621 yoffy 1.2 //column鐃緒申
1622 yoffy 1.123 if GetActiveList is TBBS then begin
1623 yoffy 1.2 for i := 0 to ListView.Columns.Count - 1 do
1624     GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1625     end else if GetActiveList is TCategory then begin
1626     for i := 0 to ListView.Columns.Count - 1 do
1627     GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1628     end else if GetActiveList is TBoard then begin
1629     for i := 0 to ListView.Columns.Count - 1 do
1630     GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1631     end;
1632    
1633     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1634     wp.length := sizeof(wp);
1635     GetWindowPlacement(Handle, @wp);
1636     GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1637     GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1638     GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1639     GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1640     GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1641    
1642     GikoSys.Setting.ListStyle := ListView.ViewStyle;
1643     GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1644     GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1645     GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1646     GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1647     if ArrangeAction.Checked then
1648     GikoSys.Setting.ListOrientation := gloVertical
1649     else
1650     GikoSys.Setting.ListOrientation := gloHorizontal;
1651     GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1652    
1653     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1654     for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1655     CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1656     CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1657     CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1658     GikoSys.Setting.MainCoolSet[i] := CoolSet;
1659     end;
1660     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1661     for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1662     CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1663     CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1664     CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1665     GikoSys.Setting.ListCoolSet[i] := CoolSet;
1666     end;
1667     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1668     for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1669     CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1670     CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1671     CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1672     GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1673 hi_ 1.1 end;
1674    
1675 yoffy 1.2 GikoSys.Setting.WriteWindowSettingFile;
1676     GikoSys.Setting.WriteNameMailSettingFile;
1677    
1678     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1679 hi_ 1.1 try
1680 yoffy 1.2 FavoriteDM.WriteFavorite;
1681 hi_ 1.1 except
1682     end;
1683 yoffy 1.2 // Favorite.Free;
1684 hi_ 1.1
1685     try
1686     //鐃?鐃?鐃?鐃緒申鐃?鐃?
1687     NotSelectTabCloseAction.Execute;
1688     if BrowserTab.Tabs.Count >= 1 then begin
1689     DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1690     end;
1691     except
1692     end;
1693    
1694     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申&鐃?鐃緒申
1695     try
1696     RoundList.SaveRoundFile;
1697     except
1698     end;
1699 yoffy 1.125
1700 hi_ 1.1 try
1701     RoundList.Clear;
1702     except
1703     end;
1704     try
1705     RoundList.Free;
1706     except
1707     end;
1708    
1709     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1710     try
1711     FHistoryList.Free;
1712     except
1713     end;
1714 yoffy 1.125
1715 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1716     try
1717     AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1718     except
1719     end;
1720    
1721     try
1722     FControlThread.Terminate;
1723     except
1724     end;
1725    
1726     // FDownload.Free;
1727     try
1728     SetActiveList(nil);
1729     except
1730     end;
1731 yoffy 1.124
1732 hi_ 1.1 //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1733     Sleep(10);
1734     try
1735     TreeView.Items.Clear;
1736     except
1737     end;
1738 yoffy 1.125
1739 hi_ 1.1 try
1740     if FavoriteDM <> nil then
1741     FavoriteDM.Free;
1742     FavoriteDM := nil;
1743     if AddressHistoryDM <> nil then
1744     AddressHistoryDM.Free;
1745     AddressHistoryDM := nil;
1746     except
1747     end;
1748 yoffy 1.125
1749 yoffy 1.126 try
1750     for i := 0 to Length( BoardPlugIns ) - 1 do begin
1751     if BoardPlugIns[ i ] <> nil then
1752     BoardPlugIns[ i ].Free;
1753     BoardPlugIns[ i ] := nil;
1754     end;
1755     except
1756     end;
1757 yoffy 1.124
1758 hi_ 1.1 try
1759 yoffy 1.123 for i := 0 to Length( BBSs ) - 1 do begin
1760     if BBSs[ i ] <> nil then
1761     BBSs[ i ].Free;
1762     BBSs[ i ] := nil;
1763     end;
1764 hi_ 1.1 except
1765     end;
1766 yoffy 1.2
1767 yoffy 1.126 try
1768     for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1769     if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1770     //CabinetSelectPopupMenu.Items[ i ].Free;
1771     CabinetSelectPopupMenu.Items.Delete( i );
1772     CabinetMenu.Delete( i );
1773     end;
1774     end;
1775     except
1776     end;
1777 yoffy 1.124
1778 yoffy 1.2 try
1779     //Hint鐃?鐃緒申
1780     if FHint <> nil then begin
1781     FHint.ReleaseHandle;
1782     FHint.Free;
1783     FHint := nil;
1784     end;
1785     //Preview鐃?鐃緒申
1786     if TPreviewBrowser <> nil then begin
1787     FPreviewBrowser.Free;
1788     FPreviewBrowser := nil;
1789     end;
1790     except
1791     end;
1792 hi_ 1.1 end;
1793    
1794     procedure TGikoForm.FormDestroy(Sender: TObject);
1795     //var
1796     // wp: TWindowPlacement;
1797     begin
1798     { //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1799     FHistoryList.Free;
1800    
1801     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1802     wp.length := sizeof(wp);
1803     GetWindowPlacement(Handle, @wp);
1804    
1805     GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1806     GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1807     GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1808     GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1809     GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1810    
1811     GikoSys.Setting.CabinetVisible := CabinetPanel.Visible;
1812     GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1813    
1814     GikoSys.Setting.WriteWindowSettingFile;
1815     GikoSys.Setting.WriteNameMailSettingFile;
1816     FDownload.Free;
1817     BBS2ch.Free;}
1818     end;
1819    
1820     //鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1821     procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1822     begin
1823     Application.Terminate;
1824     Action := caFree;
1825     end;
1826    
1827     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1828     procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1829     begin
1830     CabinetVisibleAction.Execute;
1831     // CabinetPanelVisible(false);
1832     end;
1833    
1834     procedure TGikoForm.ReloadBBS;
1835 yoffy 1.123 var
1836     i : Integer;
1837     item : TBBSMenuItem;
1838 hi_ 1.1 begin
1839     //鐃?鐃?鐃?鐃緒申鐃?鐃?
1840     NotSelectTabCloseAction.Execute;
1841     if BrowserTab.Tabs.Count >= 1 then
1842     DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1843     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1844     FHistoryList.Clear;
1845     //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1846     TreeView.Items.Clear;
1847    
1848     //BBS鐃?鐃緒申
1849 yoffy 1.126 for i := 0 to Length( BBSs ) - 1 do begin
1850     if BBSs[ i ] <> nil then
1851     BBSs[ i ].Free;
1852     BBSs[ i ] := nil;
1853     end;
1854 hi_ 1.1
1855 yoffy 1.123 ActiveList := nil;
1856 hi_ 1.1
1857     FTreeType := gttNone;
1858    
1859 yoffy 1.123 GikoSys.ReadBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1860     // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1861     for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1862 yoffy 1.126 try
1863     if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1864     CabinetSelectPopupMenu.Items[ i ].Free;
1865     CabinetSelectPopupMenu.Items.Delete( i );
1866     CabinetMenu.Delete( i );
1867     end;
1868 yoffy 1.124 except
1869 yoffy 1.126 end;
1870 yoffy 1.123 end;
1871     // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1872     for i := Length( BBSs ) - 1 downto 0 do begin
1873 yoffy 1.126 try
1874     item := TBBSMenuItem.Create( PopupMenu );
1875     item.Caption := BBSs[ i ].Title;
1876     item.Data := BBSs[ i ];
1877     item.OnClick := BBSMenuItemOnClick;
1878     CabinetSelectPopupMenu.Items.Insert( 0, item );
1879     item := TBBSMenuItem.Create( PopupMenu );
1880     item.Caption := BBSs[ i ].Title;
1881     item.Data := BBSs[ i ];
1882     item.OnClick := BBSMenuItemOnClick;
1883     CabinetMenu.Insert( 0, item );
1884 yoffy 1.124 except
1885 yoffy 1.126 end;
1886 yoffy 1.123 end;
1887     ShowBBSTree( BBSs[ 0 ] );
1888 hi_ 1.1 end;
1889    
1890     //鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1891 yoffy 1.123 procedure TGikoForm.SetBoardTreeNode(
1892     inBBS : TBBS
1893     );
1894 hi_ 1.1 var
1895 yoffy 1.120 i, j, k: integer;
1896 hi_ 1.1 Root: TTreeNode;
1897     CategoryNode: TTreeNode;
1898     BoardNode: TTreeNode;
1899     Category: TCategory;
1900     Board: TBoard;
1901     begin
1902 yoffy 1.112 // 鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1903 yoffy 1.133 FActiveBBS := inBBS;
1904 hi_ 1.1 TreeView.Items.BeginUpdate;
1905     TreeView.Items.Clear;
1906     try
1907 yoffy 1.123 try
1908     if SplashWindow <> nil then
1909     SplashWindow.ProgressBar.Max := BBSs[ 0 ].Count;
1910     except
1911     end;
1912    
1913     Root := TreeView.Items.Add( nil, inBBS.Title );
1914     Root.ImageIndex := ITEM_ICON_2CH1;
1915     Root.SelectedIndex := ITEM_ICON_2CH2;
1916     Root.Data := inBBS;
1917     for i := 0 to inBBS.Count - 1 do begin
1918     Category := TCategory(inBBS.Items[i]);
1919     CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
1920     CategoryNode.Data := Category;
1921     CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
1922     CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
1923 hi_ 1.1
1924 yoffy 1.123 for j := 0 to Category.Count - 1 do begin
1925     Board := TBoard(Category.Items[j]);
1926     Board.BeginUpdate;
1927     BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
1928     BoardNode.Data := Board;
1929     //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
1930     if not Board.IsLogFile then begin
1931     BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
1932     BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
1933     end else begin
1934     BoardNode.ImageIndex := ITEM_ICON_BOARD1;
1935     BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
1936     for k := 0 to Board.Count - 1 do begin
1937     if Board.Items[ k ].IsLogFile then begin
1938     BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
1939     BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
1940 yoffy 1.120
1941 yoffy 1.123 Break;
1942 yoffy 1.120 end;
1943     end;
1944 yoffy 1.112 end;
1945 yoffy 1.123 Board.LoadSettings;
1946     Board.EndUpdate;
1947     end;
1948 hi_ 1.1
1949 yoffy 1.123 CategoryNode.Expanded := Category.NodeExpand;
1950 hi_ 1.1
1951 yoffy 1.123 if SplashWindow <> nil then begin
1952     SplashWindow.ProgressBar.StepIt;
1953     Application.ProcessMessages;
1954 hi_ 1.1 end;
1955     end;
1956     finally
1957     TreeView.Items.EndUpdate;
1958     end;
1959     end;
1960    
1961 yoffy 1.123 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
1962 hi_ 1.1 const
1963     COLUMN: array[0..0] of string = ('鐃?鐃?鐃?鐃緒申鐃緒申');
1964     var
1965     ListColumn: TListColumn;
1966     i: Integer;
1967     begin
1968     ListView.Items.BeginUpdate;
1969     try
1970     Screen.Cursor := crHourGlass;
1971    
1972     ListView.Columns.Clear;
1973     for i := 0 to Length(COLUMN) - 1 do begin
1974     ListColumn := ListView.Columns.Add;
1975     ListColumn.Caption := COLUMN[i];
1976     ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
1977     end;
1978    
1979     ListView.Items.Count := 0;
1980     ListView.Items.Clear;
1981     ListView.Items.Count := ABBS2ch.Count;
1982    
1983     // UpFolderAction.Enabled := False;
1984     // AllItemAction.Enabled := False;
1985     // LogItemAction.Enabled := False;
1986     // NewItemAction.Enabled := False;
1987     // SelectItemAction.Enabled := False;
1988     // ListDownloadToolButton.Enabled := False;
1989     // BoardReservToolButton.Enabled := False;
1990     // ListThreadDownloadToolButton.Enabled := False;
1991    
1992     ListNameLabel.Caption := ABBS2ch.Title;
1993     FolderImage.Picture := nil;
1994     ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
1995    
1996 yoffy 1.2 FSortIndex := 0;
1997     FSortOrder := False;
1998     ListViewColumnClick(nil, ListView.Column[0]);
1999    
2000 hi_ 1.1 Result := ABBS2ch.Count;
2001     finally
2002     Screen.Cursor := crDefault;
2003     ListView.Items.EndUpdate;
2004     end;
2005     end;
2006    
2007     function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
2008     const
2009     COLUMN: array[0..2] of string = ('鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
2010     var
2011     ListColumn: TListColumn;
2012     i: Integer;
2013     begin
2014     ListView.Items.BeginUpdate;
2015     try
2016     Screen.Cursor := crHourGlass;
2017    
2018     ListView.Columns.Clear;
2019     for i := 0 to Length(COLUMN) - 1 do begin
2020     ListColumn := ListView.Columns.Add;
2021     ListColumn.Caption := COLUMN[i];
2022     ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
2023     end;
2024    
2025     ListView.Items.Count := 0;
2026     ListView.Items.Clear;
2027     ListView.Items.Count := Category.Count;
2028    
2029     // UpFolderAction.Enabled := True;
2030     // AllItemAction.Enabled := False;
2031     // LogItemAction.Enabled := False;
2032     // NewItemAction.Enabled := False;
2033     // SelectItemAction.Enabled := False;
2034     // ListDownloadToolButton.Enabled := False;
2035     // BoardReservToolButton.Enabled := False;
2036     // ListThreadDownloadToolButton.Enabled := False;
2037    
2038     ListNameLabel.Caption := Category.Title;
2039     FolderImage.Picture := nil;
2040     ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2041    
2042 yoffy 1.2 FSortIndex := 0;
2043     FSortOrder := False;
2044     ListViewColumnClick(nil, ListView.Column[0]);
2045    
2046 hi_ 1.1 Result := Category.Count;
2047     finally
2048     Screen.Cursor := crDefault;
2049     ListView.Items.EndUpdate;
2050     end;
2051     end;
2052    
2053     function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2054     const
2055     COLUMN: array[0..6] of string = ('鐃?鐃緒申鐃?鐃?鐃緒申', '鐃?鐃?鐃緒申鐃?', '鐃緒申鐃緒申', '鐃?鐃緒申',
2056     '鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
2057     COLUMN_ALIGNMENT: array[0..6] of TAlignment = (taLeftJustify, taRightJustify,
2058     taRightJustify, taRightJustify,
2059     taRightJustify, taLeftJustify,
2060     taLeftJustify);
2061     //No, 鐃?鐃緒申鐃?鐃?鐃緒申, 鐃?鐃?鐃緒申鐃?, 鐃緒申鐃緒申鐃?鐃緒申, 鐃緒申鐃緒申鐃緒申鐃緒申
2062     var
2063     ListColumn: TListColumn;
2064     i: Integer;
2065     begin
2066     ListView.Items.BeginUpdate;
2067     try
2068     Screen.Cursor := crHourGlass;
2069    
2070 yoffy 1.51 // 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2071     // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2072     if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2073     begin
2074     ListView.Columns.Clear;
2075     for i := 0 to Length(COLUMN) - 1 do begin
2076     ListColumn := ListView.Columns.Add;
2077     ListColumn.Caption := COLUMN[i];
2078     ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2079     ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2080     end;
2081     end;
2082 hi_ 1.1
2083     ListView.Items.Count := 0;
2084     ListView.Items.Clear;
2085    
2086     case GikoForm.ViewType of
2087     gvtAll: ListView.Items.Count := Board.Count;
2088     gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2089     gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2090     gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2091     end;
2092    
2093     ListNameLabel.Caption := Board.Title;
2094     FolderImage.Picture := nil;
2095     ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2096    
2097 yoffy 1.2 FSortIndex := 0;
2098     FSortOrder := False;
2099     ListViewColumnClick(nil, ListView.Column[0]);
2100 hi_ 1.1
2101     Result := Board.Count;
2102     finally
2103     Screen.Cursor := crDefault;
2104     ListView.Items.EndUpdate;
2105     end;
2106     end;
2107    
2108     procedure TGikoForm.TreeViewChange(Sender: TObject; Node: TTreeNode);
2109     var
2110     i: Integer;
2111     begin
2112     if FTreeType = gttHistory then begin
2113     // SetContent(TThreadItem(Node.Data));
2114     InsertBrowserTab(TThreadItem(Node.Data));
2115     Exit;
2116     end;
2117    
2118     ListView.Selected := nil;
2119     ListView.Items.Count := 0;
2120     ListView.Items.Clear;
2121     // ListView.Columns.Clear;
2122    
2123     Caption := CAPTION_NAME;
2124     //Application.Title := CAPTION_NAME;
2125    
2126    
2127 yoffy 1.123 if GetActiveList is TBBS then begin
2128 hi_ 1.1 for i := 0 to ListView.Columns.Count - 1 do
2129     GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
2130     end else if GetActiveList is TCategory then begin
2131     for i := 0 to ListView.Columns.Count - 1 do
2132     GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
2133     end else if GetActiveList is TBoard then begin
2134     for i := 0 to ListView.Columns.Count - 1 do
2135     GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
2136     end;
2137    
2138 yoffy 1.123 if TObject(Node.Data) is TBBS then begin
2139 hi_ 1.1 SetActiveList(Node.data);
2140     end else if TObject(Node.Data) is TCategory then begin
2141     SetActiveList(Node.data);
2142     end else if TObject(Node.Data) is TBoard then begin
2143     if not TBoard(Node.Data).IsThreadDatRead then begin
2144     Screen.Cursor := crHourGlass;
2145     try
2146     GikoSys.ReadSubjectFile(TBoard(Node.Data));
2147     finally
2148     Screen.Cursor := crDefault;
2149     end;
2150     end;
2151     SetActiveList(Node.data);
2152     end;
2153     end;
2154    
2155     procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2156     var
2157     // FileName: string;
2158     // DateTime: TDateTime;
2159     BoardCnt: Integer;
2160 yoffy 1.123 BBS: TBBS;
2161 hi_ 1.1 Category: TCategory;
2162     Board: TBoard;
2163     ThreadItem: TThreadItem;
2164     RepStr: string;
2165     begin
2166 yoffy 1.123 if ActiveList is TBBS then begin
2167     BBS := TBBS(ActiveList);
2168 yoffy 1.114
2169 hi_ 1.1 ListView.StateImages := nil;
2170    
2171     if BBS = nil then Exit;
2172     if BBS.Count <= 0 then Exit;
2173     if Item = nil then Exit;
2174     if Item.Index > BBS.Count then Exit;
2175     if ListView.Items.Count = 0 then Exit;
2176    
2177 yoffy 1.123 if not (BBS.Items[Item.index] is TCategory) then Exit;
2178     Category := TCategory(BBS.Items[Item.index]);
2179 hi_ 1.1
2180     if Category = nil then Exit;
2181    
2182     if ListNumberVisibleAction.Checked then
2183     Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2184     else
2185     Item.Caption := Category.Title;
2186    
2187 yoffy 1.2 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2188 hi_ 1.1 Item.Data := Category;
2189     end else if ActiveList is TCategory then begin
2190     Category := TCategory(ActiveList);
2191    
2192     ListView.StateImages := nil;
2193    
2194     if Category = nil then Exit;
2195     if Category.Count <= 0 then Exit;
2196     if Item = nil then Exit;
2197     if Item.Index >= Category.Count then Exit;
2198     if ListView.Items.Count = 0 then Exit;
2199    
2200     if not (Category.Items[Item.Index] is TBoard) then Exit;
2201     Board := TBoard(Category.Items[Item.Index]);
2202    
2203     if Board = nil then Exit;
2204    
2205     if ListNumberVisibleAction.Checked then
2206     Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2207     else
2208     Item.Caption := Board.Title;
2209    
2210     if Item.SubItems.Count <> 2 then begin
2211     Item.SubItems.Clear;
2212     Item.SubItems.Add('');
2213     Item.SubItems.Add('');
2214     end;
2215    
2216 yoffy 1.2 Item.ImageIndex := ITEM_ICON_BOARD1;
2217 hi_ 1.1
2218     if Board.Round then
2219 yoffy 1.51 Item.SubItems[0] := Board.RoundName // '鐃?鐃緒申'
2220 hi_ 1.1 else
2221     Item.SubItems[0] := '';
2222    
2223     if Board.RoundDate = ZERO_DATE then begin
2224     Item.SubItems[1] := '';
2225     end else
2226     Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2227     Item.Data := Board;
2228     end else if ActiveList is TBoard then begin
2229     Board := TBoard(ActiveList);
2230    
2231     if GikoSys.Setting.ListIconVisible then
2232     ListView.StateImages := StateIconImageList
2233     else
2234     ListView.StateImages := nil;
2235    
2236     case GikoForm.ViewType of
2237     gvtAll: BoardCnt := Board.Count;
2238     gvtLog: BoardCnt := Board.GetLogThreadCount;
2239     gvtNew: BoardCnt := Board.GetNewThreadCount;
2240     gvtUser: BoardCnt := Board.GetUserThreadCount;
2241 yoffy 1.2 else
2242     BoardCnt := 0;
2243 hi_ 1.1 end;
2244    
2245     // if Board = nil then Exit;
2246     if BoardCnt <= 0 then Exit;
2247     if Item = nil then Exit;
2248     if Item.Index > BoardCnt then Exit;
2249     if ListView.Items.Count = 0 then Exit;
2250    
2251     // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2252    
2253     ThreadItem := nil;
2254     case GikoForm.ViewType of
2255     gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]);
2256     gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2257     gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2258     gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2259     end;
2260    
2261     if ThreadItem = nil then Exit;
2262    
2263     // if ListNumberVisibleAction.Checked then
2264     // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2265     // else
2266     RepStr := ThreadItem.Title;
2267 yoffy 1.2 //RepStr := StringReplace(RepStr, '&amp;', '&', [rfReplaceAll]);
2268 hi_ 1.1 RepStr := StringReplace(RepStr, '&lt;', '<', [rfReplaceAll]);
2269     RepStr := StringReplace(RepStr, '&gt;', '>', [rfReplaceAll]);
2270     RepStr := StringReplace(RepStr, '&quot;', '"', [rfReplaceAll]);
2271 yoffy 1.2 RepStr := StringReplace(RepStr, '&amp', '&', [rfReplaceAll]);
2272 hi_ 1.1 //RepStr := StringReplace(RepStr, '鐃緒申鐃?', ',', [rfReplaceAll]);
2273    
2274     if Item.SubItems.Count <> 6 then begin
2275     Item.SubItems.Clear;
2276     Item.SubItems.Add('');
2277     Item.SubItems.Add('');
2278     Item.SubItems.Add('');
2279     Item.SubItems.Add('');
2280     Item.SubItems.Add('');
2281     Item.SubItems.Add('');
2282     end;
2283    
2284     if ListNumberVisibleAction.Checked then
2285     Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2286     else
2287     Item.Caption := RepStr;
2288    
2289     case ThreadItem.AgeSage of
2290     gasNone: Item.StateIndex := -1;
2291 yoffy 1.51 gasNew: Item.StateIndex := 0;
2292     gasAge: Item.StateIndex := 1;
2293 hi_ 1.1 gasSage: Item.StateIndex := 2;
2294     end;
2295    
2296     if ThreadItem.IsLogFile then begin
2297 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2298 hi_ 1.1 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2299     Item.SubItems[1] := IntToStr(ThreadItem.Count);
2300     if ThreadItem.NewResCount = 0 then
2301     Item.SubItems[2] := ''
2302     else
2303     Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2304     Item.SubItems[3] := '';
2305     if ThreadItem.Round then
2306     Item.SubItems[4] := ThreadItem.RoundName
2307     else
2308     Item.SubItems[4] := '';
2309     if ThreadItem.RoundDate = ZERO_DATE then begin
2310     Item.SubItems[5] := '';
2311