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.146 - (hide annotations) (download) (as text)
Tue Nov 25 16:03:40 2003 UTC (20 years, 4 months ago) by yoffy
Branch: MAIN
Changes since 1.145: +16 -6 lines
File MIME type: text/x-pascal
・ReloadBBS を若干強化。

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