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.172 - (hide annotations) (download) (as text)
Fri Dec 5 10:21:48 2003 UTC (20 years, 4 months ago) by h677
Branch: MAIN
Changes since 1.171: +2 -2 lines
File MIME type: text/x-pascal
TreeViewの切り替えのボタンが押されてるときにアクティブ色になるようにボタンのプロパティを変更

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 h677 1.170 CommCtrl, IniFiles, Dialogs,
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 h677 1.170 IndividualAbon, Search, ExternalBoardManager, ExternalBoardPlugInMain,
23 yoffy 1.135 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 yoffy 1.158 UpBoardAction: TAction;
516 hi_ 1.1 procedure FormCreate(Sender: TObject);
517     procedure FormDestroy(Sender: TObject);
518     procedure CabinetPanelHide(Sender: TObject);
519     procedure FormClose(Sender: TObject; var Action: TCloseAction);
520     procedure TreeViewChange(Sender: TObject; Node: TTreeNode);
521     procedure ListViewData(Sender: TObject; Item: TListItem);
522     procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
523     const FindString: String; const FindPosition: TPoint;
524     FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
525     Wrap: Boolean; var Index: Integer);
526     procedure ListViewDataHint(Sender: TObject; StartIndex,
527     EndIndex: Integer);
528     procedure ListViewDataStateChange(Sender: TObject; StartIndex,
529     EndIndex: Integer; OldState, NewState: TItemStates);
530     procedure BrowserStatusTextChange(Sender: TObject;
531     const Text: WideString);
532     procedure BrowserTitleChange(Sender: TObject; const Text: WideString);
533     procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
534     procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
535     var AllowChange: Boolean);
536     procedure ListViewKeyDown(Sender: TObject; var Key: Word;
537     Shift: TShiftState);
538     procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
539     procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
540     Button: TToolButton; State: TCustomDrawState;
541     var DefaultDraw: Boolean);
542     procedure BrowserBeforeNavigate2(Sender: TObject;
543     const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
544     Headers: OleVariant; var Cancel: WordBool);
545     procedure ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
546     Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
547     var DefaultDraw: Boolean);
548     procedure TreeViewCustomDraw(Sender: TCustomTreeView;
549     const ARect: TRect; var DefaultDraw: Boolean);
550     procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
551     Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
552     procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
553     procedure TreeViewDblClick(Sender: TObject);
554 yoffy 1.100 procedure FavoriteTreeViewClick(Sender: TObject);
555 hi_ 1.1 procedure ListViewCustomDraw(Sender: TCustomListView;
556     const ARect: TRect; var DefaultDraw: Boolean);
557     procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
558     Shift: TShiftState; X, Y: Integer);
559     procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
560     procedure MessageListViewResize(Sender: TObject);
561     procedure ExitActionExecute(Sender: TObject);
562     procedure AllSelectActionExecute(Sender: TObject);
563     procedure StdToolBarVisibleActionExecute(Sender: TObject);
564     procedure MsgBarVisibleActionExecute(Sender: TObject);
565     procedure StatusBarVisibleActionExecute(Sender: TObject);
566     procedure LargeIconActionExecute(Sender: TObject);
567     procedure SmallIconActionExecute(Sender: TObject);
568     procedure ListIconActionExecute(Sender: TObject);
569     procedure DetailIconActionExecute(Sender: TObject);
570     procedure SearchActionExecute(Sender: TObject);
571     procedure OptionActionExecute(Sender: TObject);
572     procedure GikoNaviWebPageActionExecute(Sender: TObject);
573     procedure AboutActionExecute(Sender: TObject);
574     procedure CabinetHistoryActionExecute(Sender: TObject);
575 yoffy 1.138 procedure CabinetVisible( isVisible : Boolean );
576 hi_ 1.1 procedure CabinetVisibleActionExecute(Sender: TObject);
577     procedure AllItemActionExecute(Sender: TObject);
578     procedure LogItemActionExecute(Sender: TObject);
579     procedure NewItemActionExecute(Sender: TObject);
580     procedure SelectItemActionExecute(Sender: TObject);
581     procedure ListNumberVisibleActionExecute(Sender: TObject);
582     procedure UpFolderActionExecute(Sender: TObject);
583     procedure IconStyleExecute(Sender: TObject);
584     procedure RoundActionExecute(Sender: TObject);
585     procedure StopActionExecute(Sender: TObject);
586     procedure MsgBarCloseActionExecute(Sender: TObject);
587     procedure BrowserMaxActionExecute(Sender: TObject);
588     procedure ScrollTopActionExecute(Sender: TObject);
589     procedure ScrollLastActionExecute(Sender: TObject);
590     procedure ScrollNewActionExecute(Sender: TObject);
591     procedure ScrollKokoActionExecute(Sender: TObject);
592     procedure EditorActionExecute(Sender: TObject);
593     procedure IEActionExecute(Sender: TObject);
594     procedure ShowThreadActionExecute(Sender: TObject);
595     procedure ShowBoardActionExecute(Sender: TObject);
596     procedure URLCopyActionExecute(Sender: TObject);
597     procedure ItemReloadActionExecute(Sender: TObject);
598     procedure SelectListReloadActionExecute(Sender: TObject);
599     procedure SelectThreadReloadActionExecute(Sender: TObject);
600     procedure SelectListReloadActionUpdate(Sender: TObject);
601     procedure AllItemActionUpdate(Sender: TObject);
602     procedure LogItemActionUpdate(Sender: TObject);
603     procedure NewItemActionUpdate(Sender: TObject);
604     procedure SelectItemActionUpdate(Sender: TObject);
605     procedure UpFolderActionUpdate(Sender: TObject);
606     procedure FormResize(Sender: TObject);
607     procedure ScrollTopActionUpdate(Sender: TObject);
608     procedure ScrollLastActionUpdate(Sender: TObject);
609     procedure ScrollNewActionUpdate(Sender: TObject);
610     procedure ScrollKokoActionUpdate(Sender: TObject);
611     procedure EditorActionUpdate(Sender: TObject);
612     procedure IEActionUpdate(Sender: TObject);
613     procedure ShowThreadActionUpdate(Sender: TObject);
614     procedure ShowBoardActionUpdate(Sender: TObject);
615     procedure SelectThreadReloadActionUpdate(Sender: TObject);
616     procedure ListViewSelectItem(Sender: TObject; Item: TListItem;
617     Selected: Boolean);
618     procedure SelectTimerTimer(Sender: TObject);
619 yoffy 1.51 procedure ItemReloadActionUpdate(Sender: TObject);
620 hi_ 1.1 procedure ListViewDblClick(Sender: TObject);
621 yoffy 1.51 procedure LogDeleteActionExecute(Sender: TObject);
622 hi_ 1.1 procedure KokomadeActionExecute(Sender: TObject);
623     procedure ZenbuActionExecute(Sender: TObject);
624 yoffy 1.51 procedure KokoResActionExecute(Sender: TObject);
625 hi_ 1.1 procedure ListPopupMenuPopup(Sender: TObject);
626     procedure SelectItemURLCopyActionExecute(Sender: TObject);
627     procedure SelectItemURLCopyActionUpdate(Sender: TObject);
628     procedure AllSelectActionUpdate(Sender: TObject);
629     procedure LogDeleteActionUpdate(Sender: TObject);
630     procedure BrowserTabCloseActionExecute(Sender: TObject);
631     procedure NotSelectTabCloseActionExecute(Sender: TObject);
632     procedure TreeSelectBoradReloadExecute(Sender: TObject);
633     procedure TreeSelectThreadReloadExecute(Sender: TObject);
634     procedure TreeSelectURLCopyExecute(Sender: TObject);
635     procedure TreePopupMenuPopup(Sender: TObject);
636     procedure ListToolBarVisibleActionExecute(Sender: TObject);
637     procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
638     procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
639     var Cancel: WordBool);
640     procedure ListSplitterCanResize(Sender: TObject; var NewSize: Integer;
641     var Accept: Boolean);
642     procedure ListSplitterMoved(Sender: TObject);
643     procedure BrowserTabChange(Sender: TObject);
644     procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
645     Shift: TShiftState; X, Y: Integer);
646     procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
647     State: TDragState; var Accept: Boolean);
648     procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
649     procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
650     Y: Integer);
651     procedure BrowserDocumentComplete(Sender: TObject;
652     const pDisp: IDispatch; var URL: OleVariant);
653     procedure SelectReservActionUpdate(Sender: TObject);
654     procedure RoundNamePopupMenuPopup(Sender: TObject);
655     procedure SelectNewRoundNameExecute(Sender: TObject);
656     procedure SelectDeleteRoundExecute(Sender: TObject);
657     procedure SelectReservActionExecute(Sender: TObject);
658     procedure NewBoardActionExecute(Sender: TObject);
659     procedure LoginActionExecute(Sender: TObject);
660     procedure KeySettingActionExecute(Sender: TObject);
661     procedure AllTabCloseActionExecute(Sender: TObject);
662 yoffy 1.51 procedure ArrangeActionExecute(Sender: TObject);
663     procedure NameURLCopyActionExecute(Sender: TObject);
664     procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
665 hi_ 1.1 procedure URLCopyActionUpdate(Sender: TObject);
666 yoffy 1.2 procedure NameURLCopyActionUpdate(Sender: TObject);
667 hi_ 1.1 procedure BrowserTabCloseActionUpdate(Sender: TObject);
668 yoffy 1.51 procedure NotSelectTabCloseActionUpdate(Sender: TObject);
669 hi_ 1.1 procedure AllTabCloseActionUpdate(Sender: TObject);
670     procedure SelectItemNameURLCopyActionUpdate(Sender: TObject);
671     procedure ActiveLogDeleteActionExecute(Sender: TObject);
672     procedure ActiveLogDeleteActionUpdate(Sender: TObject);
673 yoffy 1.51 procedure ListNameBarVisibleActionExecute(Sender: TObject);
674 hi_ 1.1 procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
675 yoffy 1.51 procedure TreeSelectNameURLCopyExecute(Sender: TObject);
676     procedure PaneInitActionExecute(Sender: TObject);
677 hi_ 1.1 procedure FormShow(Sender: TObject);
678     procedure BrowserTabToolBarResize(Sender: TObject);
679     procedure BrowserMinActionExecute(Sender: TObject);
680 yoffy 1.51 procedure SelectTextClearActionExecute(Sender: TObject);
681 hi_ 1.1 procedure NameTextClearActionExecute(Sender: TObject);
682 yoffy 1.51 procedure MailTextClearActionExecute(Sender: TObject);
683     procedure LeftmostTabSelectActionExecute(Sender: TObject);
684     procedure LeftTabSelectActionExecute(Sender: TObject);
685 hi_ 1.1 procedure RightTabSelectActionExecute(Sender: TObject);
686     procedure RightmostTabSelectActionExecute(Sender: TObject);
687     procedure LeftmostTabSelectActionUpdate(Sender: TObject);
688     procedure LeftTabSelectActionUpdate(Sender: TObject);
689     procedure RightTabSelectActionUpdate(Sender: TObject);
690     procedure RightmostTabSelectActionUpdate(Sender: TObject);
691     procedure FavoriteMenuClick(Sender: TObject);
692     procedure FavoriteAddActionExecute(Sender: TObject);
693     procedure FavoriteAddActionUpdate(Sender: TObject);
694     procedure BoardFavoriteAddActionExecute(Sender: TObject);
695     procedure BoardFavoriteAddActionUpdate(Sender: TObject);
696 yoffy 1.51 procedure ThreadFavoriteAddActionExecute(Sender: TObject);
697 hi_ 1.1 procedure ThreadFavoriteAddActionUpdate(Sender: TObject);
698 yoffy 1.51 procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
699 yoffy 1.2 procedure FavoriteArrangeActionExecute(Sender: TObject);
700     procedure MainCoolBarResize(Sender: TObject);
701 hi_ 1.1 procedure MoveToActionExecute(Sender: TObject);
702 yoffy 1.2 procedure AddressToolBarResize(Sender: TObject);
703 hi_ 1.1 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
704     Shift: TShiftState);
705 yoffy 1.51 procedure AddressBarVisibleActionExecute(Sender: TObject);
706 yoffy 1.2 procedure BrowserEnter(Sender: TObject);
707 hi_ 1.1 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
708 yoffy 1.51 procedure BrowserTabVisibleActionExecute(Sender: TObject);
709     procedure BrowserTabTopActionExecute(Sender: TObject);
710     procedure BrowserTabBottomActionExecute(Sender: TObject);
711     procedure BrowserTabTabStyleActionExecute(Sender: TObject);
712 hi_ 1.1 procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
713 yoffy 1.51 procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
714 hi_ 1.1 procedure PreviewTimerTimer(Sender: TObject);
715     procedure MessageHideButtonClick(Sender: TObject);
716     procedure MonazillaWebPageActionExecute(Sender: TObject);
717     procedure GikoHelpActionExecute(Sender: TObject);
718     procedure ToolButton18Click(Sender: TObject);
719     procedure KotehanActionExecute(Sender: TObject);
720 yoffy 1.51 procedure LinkBarVisibleActionExecute(Sender: TObject);
721     procedure BBS2chWebPageActionExecute(Sender: TObject);
722     procedure GikoFolderOpenActionExecute(Sender: TObject);
723 yoffy 1.2 procedure MainCoolBarBandInfo(Sender: TObject;
724     var BandInfo: PReBarBandInfoA);
725     procedure MainCoolBarChevronClick(Sender: TObject;
726 yoffy 1.51 RebarChevron: PNMRebarChevron);
727     procedure ListCoolBarBandInfo(Sender: TObject;
728     var BandInfo: PReBarBandInfoA);
729     procedure ListCoolBarChevronClick(Sender: TObject;
730     RebarChevron: PNMRebarChevron);
731     procedure BrowserCoolBarBandInfo(Sender: TObject;
732     var BandInfo: PReBarBandInfoA);
733 yoffy 1.2 procedure BrowserCoolBarChevronClick(Sender: TObject;
734 yoffy 1.51 RebarChevron: PNMRebarChevron);
735     procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
736     procedure ThreadEditorActionExecute(Sender: TObject);
737 yoffy 1.2 procedure ThreadEditorActionUpdate(Sender: TObject);
738 yoffy 1.51 procedure ToolBarSettingActionExecute(Sender: TObject);
739     procedure NameCopyActionExecute(Sender: TObject);
740     procedure BoardIEActionExecute(Sender: TObject);
741     procedure SelectItemNameCopyActionExecute(Sender: TObject);
742 yoffy 1.2 procedure SelectItemNameCopyActionUpdate(Sender: TObject);
743 yoffy 1.51 procedure BoardIEActionUpdate(Sender: TObject);
744     procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
745     WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
746     procedure NameCopyActionUpdate(Sender: TObject);
747     procedure SelectComboBoxChange(Sender: TObject);
748     procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
749     Shift: TShiftState);
750     procedure SelectComboBoxExit(Sender: TObject);
751     procedure NG1Click(Sender: TObject);
752     procedure SelectResActionExecute(Sender: TObject);
753     procedure SelectResActionUpdate(Sender: TObject);
754     procedure FormKeyDown(Sender: TObject; var Key: Word;
755     Shift: TShiftState);
756     procedure FormKeyUp(Sender: TObject; var Key: Word;
757     Shift: TShiftState);
758     procedure AllResActionExecute(Sender: TObject);
759     procedure AllResActionUpdate(Sender: TObject);
760     procedure ReloadClick(Sender: TObject);
761     procedure GoBackClick(Sender: TObject);
762     procedure GoFowardClick(Sender: TObject);
763     procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
764     Shift: TShiftState; X, Y: Integer);
765     procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
766     Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
767     procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
768     Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
769     procedure StatusBarResize(Sender: TObject);
770     procedure IndividualAbon1Click(Sender: TObject);
771     procedure IndividualAbon2Click(Sender: TObject);
772     procedure N42Click(Sender: TObject);
773     procedure SelectComboBoxEnter(Sender: TObject);
774     procedure AntiIndividualAbonClick(Sender: TObject);
775     procedure N51Click(Sender: TObject);
776     procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
777 yoffy 1.100 procedure CabinetFavoriteActionExecute(Sender: TObject);
778     procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
779     Y: Integer);
780 yoffy 1.71 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
781 yoffy 1.100 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
782     var S: String);
783     procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
784     Shift: TShiftState);
785     procedure FavoriteTreePopupMenuPopup(Sender: TObject);
786     procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
787     procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
788     procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
789     procedure ToolButton19Click(Sender: TObject);
790     procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject);
791     procedure FavoriteTreeViewChange(Sender: TObject; Node: TTreeNode);
792     procedure FavoriteTreeViewDblClick(Sender: TObject);
793     procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject);
794     procedure FavoriteTreeViewReloadActionExecute(Sender: TObject);
795     procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
796     procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
797     procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject);
798     procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
799     procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
800     Shift: TShiftState; X, Y: Integer);
801     procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
802     State: TDragState; var Accept: Boolean);
803     procedure OnlyAHundredResExecute(Sender: TObject);
804     procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
805     Y: Integer);
806     procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
807     var Handled: Boolean);
808     procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
809     var Handled: Boolean);
810     procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
811     var Handled: Boolean);
812 yoffy 1.107 procedure ExportFavoriteFileAccept(Sender: TObject);
813     procedure ExportFavoriteFileBeforeExecute(Sender: TObject);
814 yoffy 1.139 procedure CabinetBBSActionExecute(Sender: TObject);
815 yoffy 1.142 procedure FavoriteTreeViewBrowseThreadActionExecute(Sender: TObject);
816     procedure FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
817 yoffy 1.158 procedure UpBoardActionExecute(Sender: TObject);
818     procedure UpBoardActionUpdate(Sender: TObject);
819 hi_ 1.1 private
820     { Private 鐃緒申鐃緒申 }
821    
822     FSortIndex: Integer;
823     FSortOrder: Boolean;
824    
825     FEnabledCloseButton: Boolean;
826     // ThreadCreate: TThreadCreate;
827    
828     FClickNode: TTreeNode;
829     FHttpState: Boolean;
830     FHint: TResPopup;
831     FPreviewBrowser: TPreviewBrowser;
832     FPreviewURL: string;
833    
834     FBrowserSizeHeight: Integer;
835     FBrowserSizeWidth: Integer;
836    
837     // FFavorite: TFavorite;
838     FBrowserComplete: Boolean;
839     FTabHintIndex: Integer;
840     FListStyle: TViewStyle; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
841     FItemNoVisible: Boolean; //鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?
842     FViewType: TGikoViewType; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?
843 yoffy 1.123 FActiveList: TObject;
844 hi_ 1.1 FActiveContent: TThreadItem; //
845 yoffy 1.133 FActiveBBS : TBBS;
846 hi_ 1.1 FHistoryList: TList; //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
847     FTreeType: TGikoTreeType;
848     FWorkCount: Integer;
849     FNameCookie: string;
850     FMailCookie: string;
851     // FLastRoundTime: TDateTime;
852     BrowserNullTab: TThreadItem;
853     // DoubleClickOccurred: array [TMouseButton] of Boolean;
854     FDownloadTitle: string; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
855     FDownloadMax: Integer; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?
856     FEvent: THTMLDocumentEventSink;//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?
857 h677 1.14
858 yoffy 1.51 Fkeynum : Integer; //鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
859 yoffy 1.29
860 yoffy 1.51 IsDraggingSelectComboBox : Boolean;
861     DraggingSelectComboBoxPosition : TPoint;
862 yoffy 1.29
863 yoffy 1.54 FSearchDialog: TSearchDialog;
864 yoffy 1.49
865 yoffy 1.100 FDropSpaceNode: TTreeNode;
866 yoffy 1.74
867 yoffy 1.107 FDragTime : Cardinal; //鐃緒申鐃緒申鐃?鐃緒申D&D鐃?
868     FDragButton : TToolButton; //鐃緒申鐃緒申鐃?鐃緒申D&D鐃?鐃緒申Drag鐃緒申鐃緒申鐃緒申Button鐃緒申鐃緒申
869     FDragWFirst : Boolean; //WebTab鐃緒申D&D鐃?
870 h677 1.84
871 yoffy 1.143 FListViewBackGroundColor : TColor; //ListView鐃緒申BackGroundColor
872     FUseOddResOddColor : Boolean; //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申
873     FOddColor : TColor; //鐃緒申鐃緒申鐃?
874 yoffy 1.152
875     FSelectResWord : string; // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?
876 yoffy 1.123 procedure SetBoardTreeNode( inBBS : TBBS );
877     function SetCategoryListItem(ABBS2ch: TBBS): Integer;
878 hi_ 1.1 function SetBoardListItem(Category: TCategory): Integer;
879     function SetThreadListItem(Board: TBoard): Integer;
880     // function GetRoundName(index: integer): string;
881    
882     procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
883     procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
884     procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer);
885     procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
886     procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
887    
888     procedure SetActiveList(Obj: TObject);
889     procedure ListClick;
890     procedure ListDoubleClick;
891     procedure BrowserMovement(AName: string);
892     procedure SelectListItem(List: TList);
893     // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
894     procedure DeleteTab(ThreadItem: TThreadItem);
895     function Hook(var Message: TMessage): Boolean;
896     procedure AddRoundNameMenu(MenuItem: TMenuItem);
897     procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
898     procedure SetSelectRoundName(Sender: TObject);
899     function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
900    
901     procedure SetMenuFont;
902     // procedure CreateFavMenu(Folder: TFavoriteFolder);
903     procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
904 yoffy 1.62 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
905     procedure FavoriteClick(Sender: TObject); overload;
906 yoffy 1.100 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
907 yoffy 1.2 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
908 hi_ 1.1 function OnDocumentContextMenu(Sender: TObject): WordBool;
909     // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
910 yoffy 1.123 procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
911 hi_ 1.1 procedure ShowTextPopup;
912     //procedure ShowTextPopup(HintData: THintData);
913 yoffy 1.2 // procedure SetStdToolBar;
914     // function GetAction(ActionName: string): TContainedAction;
915 hi_ 1.1 procedure SetLinkBar;
916     function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
917 yoffy 1.2 procedure MenuBarChevronMenu;
918     procedure LinkBarChevronMenu;
919     procedure ToolBarChevronMenu(ToolBar: TToolBar);
920 yoffy 1.51 procedure ModifySelectList;
921 yoffy 1.100 procedure FavoriteBrowseFolder( node: TTreeNode );
922     procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
923     procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
924     procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
925     procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
926 yoffy 1.85 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
927 yoffy 1.72 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
928 yoffy 1.100 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
929     procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
930 yoffy 1.72 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
931 yoffy 1.100 //
932 yoffy 1.143 procedure BrowserTabClick(Sender: TObject);
933     procedure SetListViewBackGroundColor(value: TColor);
934 yoffy 1.123 procedure BBSMenuItemOnClick( Sender : TObject );
935 hi_ 1.1 protected
936     procedure CreateParams(var Params: TCreateParams); override;
937 yoffy 1.2 procedure WndProc(var Message: TMessage); override;
938 hi_ 1.1 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
939     procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
940     procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
941     public
942     { Public 鐃緒申鐃緒申 }
943     // FDownload: TDownload;
944     FControlThread: TThreadControl;
945 yoffy 1.48 procedure MoveToURL(URL: string);
946     procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
947 hi_ 1.1 procedure ReloadBBS;
948     function GetHttpState: Boolean;
949     procedure SetEnabledCloseButton(Enabled: Boolean);
950     function GetTreeNode(Data: TObject): TTreeNode;
951     procedure AppFormDeactivate(Sender: TObject);
952     // procedure CabinetPanelVisible(PanelVisible: Boolean);
953     procedure ListViewAllSelect;
954    
955     property ListStyle: TViewStyle read FListStyle write FListStyle;
956     property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
957     property ViewType: TGikoViewType read FViewType write FViewType;
958    
959     property NameCookie: string read FNameCookie write FNameCookie;
960     property MailCookie: string read FMailCookie write FMailCookie;
961    
962     procedure SetContent(ThreadItem: TThreadItem);
963     function GetActiveContent: TThreadItem;
964     function GetActiveList: TObject;
965    
966     property ActiveList: TObject read GetActiveList write SetActiveList;
967     // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
968    
969     procedure SetListViewType(AViewType: TGikoViewType); overload;
970     procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
971     procedure DownloadContent(ThreadItem: TThreadItem);
972     procedure DownloadList(Board: TBoard);
973     procedure PlaySound(SoundEventName: string);
974    
975 yoffy 1.136 function AddHistory( FavItem: TFavoriteThreadItem ): Boolean;
976     procedure DeleteHistory( threadItem: TThreadItem );
977 hi_ 1.1 procedure ClearHistory;
978 yoffy 1.135 procedure SaveHistory;
979     procedure LoadHistory;
980 yoffy 1.123 procedure ShowBBSTree( inBBS : TBBS );
981 hi_ 1.1 procedure ShowHistoryTree;
982     procedure SetHistoryTreeNode;
983     // procedure SelectTreeNode(Item: TObject);
984     procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
985     procedure SetBrowserTabState;
986     // property Favorite: TFavorite read FFavorite write FFavorite;
987 yoffy 1.2 procedure SetToolBarPopup;
988 yoffy 1.100 procedure ShowFavoriteAddDialog( Item : TObject );
989 yoffy 1.143 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
990     property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
991     property OddColor : TColor read FOddColor write FOddColor;
992 h677 1.109
993 hi_ 1.1 published
994     property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
995     end;
996    
997     TFavoriteMenuItem = class(TMenuItem)
998     private
999     FData : Pointer;
1000     public
1001     property Data: Pointer read FData write FData;
1002     end;
1003    
1004 yoffy 1.123 TBBSMenuItem = class(TMenuItem)
1005     private
1006     FData : Pointer;
1007     public
1008     property Data: Pointer read FData write FData;
1009     end;
1010    
1011 hi_ 1.1 TLinkToolButton = class(TToolButton)
1012     private
1013     FData : Pointer;
1014     public
1015     property Data: Pointer read FData write FData;
1016     end;
1017    
1018     var
1019     GikoForm: TGikoForm;
1020    
1021     implementation
1022    
1023     uses
1024     About, Option, Round, Splash, Sort, ListSelect,
1025 h677 1.151 NewBoard, MojuUtils;
1026 hi_ 1.1
1027     const
1028     CAPTION_NAME: string = '鐃?鐃?鐃?鐃?';
1029     BLANK_HTML: string = 'about:blank';
1030 yoffy 1.51 SELECTCOMBOBOX_NAME: string = ''; // '鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申';
1031     SELECTCOMBOBOX_COLOR: TColor = clWindow;
1032 yoffy 1.120 //D&D鐃緒申鐃?
1033     DandD_THRESHOLD = 5; //D&D鐃緒申鐃緒申鐃?鐃?pixcel)
1034 yoffy 1.2 //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1035     ITEM_ICON_2CH1 = 0; //2ch鐃?鐃?鐃?鐃緒申
1036     ITEM_ICON_2CH2 = 1; //2ch鐃?鐃?鐃?鐃緒申
1037     ITEM_ICON_CATEGORY1 = 2; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1038     ITEM_ICON_CATEGORY2 = 3; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1039 yoffy 1.120 ITEM_ICON_BOARD_NOSUBJECT = 3; //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1040 yoffy 1.2 ITEM_ICON_BOARD1 = 4; //鐃緒申鐃?鐃?鐃?鐃緒申
1041     ITEM_ICON_BOARD2 = 5; //鐃緒申鐃?鐃?鐃?鐃緒申
1042     ITEM_ICON_THREADLOG1 = 6; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1043     ITEM_ICON_THREADLOG2 = 7; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1044     ITEM_ICON_THREAD1 = 8; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1045     ITEM_ICON_THREAD2 = 9; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1046     ITEM_ICON_THREADNEW1 = 10; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1047     ITEM_ICON_THREADNEW2 = 11; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1048     ITEM_ICON_SORT1 = 12; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1049     ITEM_ICON_SORT2 = 13; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1050 yoffy 1.120 ITEM_ICON_BOARD_LOG = 17; //鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1051     ITEM_ICON_BOARD_NEW = 18; //鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1052 yoffy 1.2
1053     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1054 yoffy 1.48 TOOL_ICON_HEIGHT_MAX = 16; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1055     TOOL_ICON_HEIGHT_MIN = 17; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1056     TOOL_ICON_HEIGHT_NORMAL = 18; //鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1057     TOOL_ICON_WIDTH_MAX = 19; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1058     TOOL_ICON_WIDTH_MIN = 20; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1059     TOOL_ICON_WIDTH_NORMAL = 21; //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1060    
1061 yoffy 1.51 TOOL_ICON_FAV_FOLDER = 30; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申
1062 yoffy 1.100 TOOL_ICON_FAV_BOARD = 31; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1063 yoffy 1.51 TOOL_ICON_FAV_THREAD = 32; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1064 hi_ 1.1
1065     HTML_FILE_NAME = 'temp_preview.html';
1066    
1067     {$R *.DFM}
1068    
1069     procedure TGikoForm.CreateParams(var Params: TCreateParams);
1070     begin
1071     inherited;
1072     if FormStyle in [fsNormal, fsStayOnTop] then begin
1073     if BorderStyle in [bsSingle, bsSizeable] then begin
1074     Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1075     Params.WndParent := 0;
1076     end;
1077     end;
1078     end;
1079    
1080     procedure TGikoForm.FormCreate(Sender: TObject);
1081     const
1082     TVS_NOTOOLTIPS = $0080;
1083     var
1084     FileName: string;
1085     Style: DWORD;
1086     msg: string;
1087     i: Integer;
1088     wp: TWindowPlacement;
1089 hi_ 1.32 s: string;
1090 yoffy 1.123 item : TBBSMenuItem;
1091 hi_ 1.1 begin
1092     {$IFDEF DEBUG}
1093     AllocConsole;
1094     Writeln('============================================================');
1095     Writeln(' 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃? 鐃?鐃緒申鐃?鐃?鐃緒申');
1096     Writeln('');
1097     Writeln(' 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?');
1098     Writeln(' 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
1099     Writeln('============================================================');
1100     {$ENDIF}
1101     Application.OnDeactivate := AppFormDeactivate;
1102     Self.OnDeactivate := AppFormDeactivate;
1103     Application.HookMainWindow(Hook);
1104    
1105     FTreeType := gttNone;
1106    
1107 yoffy 1.51 FSearchDialog := nil;
1108 yoffy 1.49
1109 hi_ 1.1 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1110     Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1111    
1112     //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1113     RoundList := TRoundList.Create;
1114     RoundList.LoadRoundFile;
1115    
1116     //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1117     AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1118    
1119 yoffy 1.135 // 鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?(ReadBoardFile, LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1120 yoffy 1.107 InitializeBoardPlugIns;
1121 yoffy 1.105
1122 hi_ 1.1 EnabledCloseButton := True;
1123 yoffy 1.123 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申(ReadFavorite 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1124     GikoSys.ReadBoardFile;
1125 hi_ 1.1 // SetBoardTreeNode; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1126 yoffy 1.123 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1127     for i := Length( BBSs ) - 1 downto 0 do begin
1128 yoffy 1.126 try
1129     item := TBBSMenuItem.Create( PopupMenu );
1130     item.Caption := BBSs[ i ].Title;
1131     item.Data := BBSs[ i ];
1132     item.OnClick := BBSMenuItemOnClick;
1133     CabinetSelectPopupMenu.Items.Insert( 0, item );
1134     item := TBBSMenuItem.Create( PopupMenu );
1135     item.Caption := BBSs[ i ].Title;
1136     item.Data := BBSs[ i ];
1137     item.OnClick := BBSMenuItemOnClick;
1138     CabinetMenu.Insert( 0, item );
1139     except
1140     end;
1141 yoffy 1.123 end;
1142    
1143 yoffy 1.135 // 鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?(LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1144     FHistoryList := TList.Create;
1145    
1146     // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1147     LoadHistory;
1148    
1149 yoffy 1.123 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1150     // FFavorite := TFavorite.Create(FavoriteTreeView);
1151     FavoriteDM.SetFavTreeView(FavoriteTreeView);
1152     FavoriteDM.ReadFavorite;
1153 hi_ 1.1
1154     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1155     ListView.ViewStyle := GikoSys.Setting.ListStyle;
1156    
1157     //鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1158     // MainCoolBar.Top := 0;
1159     // MainCoolBar.Left := 0;
1160    
1161     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
1162     AnimePanel.Top := 0;
1163     AnimePanel.Left := 0;
1164    
1165     //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1166    
1167     //鐃?鐃緒申鐃?鐃?鐃?鐃?
1168     CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1169    
1170     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1171     MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1172     MsgBarVisibleActionExecute(nil);
1173     MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1174    
1175     //鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1176     StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1177     StatusBarVisibleActionExecute(nil);
1178    
1179     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1180     TreeView.Items.BeginUpdate;
1181 yoffy 1.100 FavoriteTreeView.Items.BeginUpdate;
1182 hi_ 1.1 ListView.Items.BeginUpdate;
1183     try
1184     TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1185     TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1186     TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1187     TreeView.Color := GikoSys.Setting.CabinetBackColor;
1188    
1189 yoffy 1.67 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1190     FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1191     FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1192     FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1193    
1194 hi_ 1.1 ListView.Font.Name := GikoSys.Setting.ListFontName;
1195     ListView.Font.Size := GikoSys.Setting.ListFontSize;
1196     ListView.Font.Color := GikoSys.Setting.ListFontColor;
1197 h677 1.109 //ListView.Color := GikoSys.Setting.ListBackColor;
1198 yoffy 1.123 ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1199     FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1200     FOddColor := GikoSys.Setting.OddColor;
1201 h677 1.109
1202 hi_ 1.1 finally
1203     TreeView.Items.EndUpdate;
1204 yoffy 1.100 FavoriteTreeView.Items.EndUpdate;
1205 hi_ 1.1 ListView.Items.EndUpdate;
1206     end;
1207     //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1208     ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1209    
1210     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1211     BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1212     BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1213 yoffy 1.133 FDragWFirst := false;
1214 hi_ 1.1
1215     // TreeView.TopItem.Expanded := True; //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1216     // TreeView.Selected := TreeView.Items[0]; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1217     SetContent(nil); //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1218    
1219     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1220     wp.length := sizeof(wp);
1221     wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1222     wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1223     wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1224     wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1225     wp.showCmd := SW_HIDE;
1226     SetWindowPlacement(Handle, @wp);
1227    
1228     // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1229     // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1230     if GikoSys.Setting.WindowMax then
1231     WindowState := wsMaximized;
1232    
1233     //鐃?鐃?鐃?鐃?鐃緒申
1234     try
1235     FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1236     if FileExists(FileName) then
1237     Animate.FileName := FileName;
1238     except
1239     end;
1240    
1241     //鐃?鐃?鐃?鐃?
1242     FNameCookie := '';
1243     FMailCookie := '';
1244    
1245     //鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1246     AllItemAction.Checked := True;
1247 yoffy 1.126 AllResAction.Checked := True;
1248 hi_ 1.1
1249     //TreeView鐃緒申鐃緒申鐃緒申鐃?鐃緒申ToolTip鐃緒申鐃緒申鐃?鐃緒申
1250     Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1251     Style := Style or TVS_NOTOOLTIPS;
1252     SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1253    
1254     // 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1255     TreeView.Align := alClient;
1256 yoffy 1.57 FavoriteTreeView.Align := alClient;
1257 hi_ 1.1 FavoriteTreeView.Visible := False;
1258    
1259     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1260     // FBrowserSizeFlag := False;
1261     // FBrowserSizeHeight := ViewPanel.Height;
1262    
1263     FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1264     FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1265    
1266     ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1267     ArrangeAction.Execute;
1268    
1269     if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1270     case GikoSys.Setting.ListWidthState of
1271     glsMax: begin
1272     ViewPanel.Width := 1;
1273 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1274     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1275 hi_ 1.1 end;
1276     glsMin: begin
1277     ViewPanel.Width := GikoSys.Setting.ListWidth;
1278 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1279     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1280 hi_ 1.1 end;
1281     else begin
1282     ViewPanel.Width := GikoSys.Setting.ListWidth;
1283 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1284     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1285 hi_ 1.1 end;
1286     end;
1287     end else begin
1288     case GikoSys.Setting.ListHeightState of
1289     glsMax: begin
1290     ViewPanel.Height := 1;
1291 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1292     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1293 hi_ 1.1 end;
1294     glsMin: begin
1295     ViewPanel.Height := GikoSys.Setting.ListHeight;
1296 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1297     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1298 hi_ 1.1 end;
1299     else begin
1300     ViewPanel.Height := GikoSys.Setting.ListHeight;
1301 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1302     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1303 hi_ 1.1 end;
1304     end;
1305     end;
1306    
1307     //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1308     // ProgressBar.Visible := False;
1309     ProgressBar.Parent := StatusBar;
1310     ProgressBar.Top := 2;
1311     ProgressBar.Left := 0;
1312     ProgressBar.Width := StatusBar.Panels[0].Width;
1313     ProgressBar.Height := StatusBar.Height - 2;
1314     ProgressBar.Position := 0;
1315    
1316     //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1317     FControlThread := TThreadControl.Create(True);
1318     FControlThread.MaxThreadCount := 1;
1319     FControlThread.Resume;
1320     FControlThread.OnDownloadEnd := DownloadEnd;
1321     FControlThread.OnDownloadMsg := DownloadMsg;
1322     FControlThread.OnWork := Work;
1323     FControlThread.OnWorkBegin := WorkBegin;
1324     FControlThread.OnWorkEnd := WorkEnd;
1325     // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1326    
1327 yoffy 1.51 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1328     SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1329 yoffy 1.2
1330 hi_ 1.1 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
1331     SetBrowserTabState;
1332    
1333     BrowserBoardNameLabel.Caption := '';
1334     BrowserNameLabel.Caption := '';
1335     FWorkCount := 0;
1336    
1337     FTabHintIndex := -1;
1338    
1339     //鐃緒申鐃緒申鐃?鐃?鐃?
1340     SetLinkBar;
1341    
1342     //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?
1343     SetMenuFont;
1344    
1345     //鐃?鐃?鐃緒申鐃?鐃?Wrapable
1346     ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1347     BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1348    
1349 yoffy 1.2 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1350     ReadToolBarSetting(ActionList, StdToolBar);
1351     ReadToolBarSetting(ActionList, ListToolBar);
1352 yoffy 1.51 try
1353     for i := ListToolBar.ControlCount - 1 downto 0 do
1354     begin
1355     if ListToolBar.Controls[ i ].Action = SelectItemAction then
1356     begin
1357     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1358     if (i + 1) < ListToolBar.ControlCount then
1359     if ListToolBar.Controls[ i + 1 ] is TToolButton then
1360     if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1361     ListToolBar.Controls[ i + 1 ].Visible := False;
1362    
1363     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申
1364     ListToolBar.Controls[ i ].Visible := False;
1365     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申
1366     SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1367     SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1368     SelectComboBox.Parent := ListToolBar;
1369     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
1370     SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1371     SelectComboBoxSplitter.Parent := ListToolBar;
1372    
1373     break;
1374     end;
1375     end;
1376     except
1377     end;
1378 yoffy 1.2 ReadToolBarSetting(ActionList, BrowserToolBar);
1379     SetToolBarPopup;
1380 yoffy 1.126 OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes;
1381 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃?鐃?
1382     AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1383    
1384 yoffy 1.2 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1385    
1386     //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1387     if not FileExists(GikoSys.GetBoardFileName) then begin
1388     msg := '鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申' + #13#10#13#10
1389     + '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申' + #13#10
1390     + '鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?';
1391     MsgBox(SplashWindow.Handle, msg, '鐃?鐃?鐃?鐃?', MB_OK or MB_ICONINFORMATION);
1392     NewBoardAction.Execute;
1393     end;
1394    
1395     //鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1396     GikoSys.LoadKeySetting(ActionList);
1397    
1398     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1399     // FLastRoundTime := 0;
1400    
1401     //ResHint
1402     FHint := TResPopup.Create(Self);
1403    
1404 yoffy 1.100 // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1405 yoffy 1.140 CabinetVisible( False );
1406 yoffy 1.141 if GikoSys.Setting.CabinetVisible then begin
1407     i := CabinetSelectPopupMenu.Items.Count - 1;
1408     if GikoSys.Setting.CabinetIndex = i - 1 then
1409     CabinetHistoryAction.Execute
1410     else if GikoSys.Setting.CabinetIndex = i then
1411     CabinetFavoriteAction.Execute
1412     else begin
1413     if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1414     ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1415     CabinetBBSAction.Execute;
1416     end;
1417     end else begin
1418     ShowBBSTree( BBSs[ 0 ] );
1419     end;
1420 yoffy 1.67
1421 yoffy 1.2 //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1422     if GikoSys.Setting.AutoLogin then
1423     LoginAction.Execute;
1424    
1425     //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?
1426     for i := 1 to ParamCount do begin
1427     MoveToURL(ParamStr(i));
1428     end;
1429     // SetStdToolBar;
1430     // SetLinkBar;
1431 h677 1.22
1432 hi_ 1.32 s := GikoSys.FAbon.NGwordname;
1433     StatusBar.Panels[2].Text := s;
1434     StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1435     StatusBarResize(Sender);
1436 yoffy 1.2 end;
1437    
1438     //
1439     //
1440     //
1441     procedure TGikoForm.FormShow(Sender: TObject);
1442     var
1443     i: Integer;
1444     CoolSet: TCoolSet;
1445     begin
1446     ShowWindow(Application.Handle, SW_HIDE);
1447    
1448     //FormCreate鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1449     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1450     StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1451     StdToolBarVisibleActionExecute( nil );
1452     AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1453     AddressBarVisibleActionExecute( nil );
1454     LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1455     LinkBarVisibleActionExecute( nil );
1456     ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1457     ListToolBarVisibleActionExecute( nil );
1458     ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1459     ListNameBarVisibleActionExecute( nil );
1460     BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1461     BrowserToolBarVisibleActionExecute( nil );
1462     BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1463     BrowserNameBarVisibleActionExecute( nil );
1464    
1465     //鐃?鐃緒申鐃?鐃?鐃?鐃?
1466     BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1467     BrowserTabVisibleActionExecute(nil);
1468    
1469     if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1470     BrowserTabTopAction.Checked := True;
1471     BrowserTabTopActionExecute(nil);
1472     end else begin
1473     BrowserTabBottomAction.Checked := True;
1474     BrowserTabBottomActionExecute(nil);
1475     end;
1476    
1477     if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1478     BrowserTabTabStyleAction.Checked := True;
1479     BrowserTabTabStyleActionExecute(nil);
1480     end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1481     BrowserTabButtonStyleAction.Checked := True;
1482     BrowserTabButtonStyleActionExecute(nil);
1483     end else begin
1484     BrowserTabFlatStyleAction.Checked := True;
1485     BrowserTabFlatStyleActionExecute(nil);
1486     end;
1487    
1488    
1489 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1490     MainCoolBar.Bands.BeginUpdate;
1491     try
1492     for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1493     CoolSet := GikoSys.Setting.MainCoolSet[i];
1494     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1495     Continue;
1496     MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1497     MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1498     MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1499     end;
1500     finally
1501     MainCoolBar.Bands.EndUpdate;
1502     end;
1503    
1504     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1505     ListCoolBar.Bands.BeginUpdate;
1506     try
1507     for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1508     CoolSet := GikoSys.Setting.ListCoolSet[i];
1509     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1510     Continue;
1511     ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1512     ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1513     ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1514     end;
1515     finally
1516     ListCoolBar.Bands.EndUpdate;
1517     end;
1518    
1519     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1520     BrowserCoolBar.Bands.BeginUpdate;
1521     try
1522     for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1523     CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1524     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1525     Continue;
1526     BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1527     BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1528     BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1529     end;
1530     finally
1531     BrowserCoolBar.Bands.EndUpdate;
1532     end;
1533    
1534     end;
1535     procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1536     var
1537     i: Integer;
1538     CoolSet: TCoolSet;
1539     wp: TWindowPlacement;
1540     begin
1541 yoffy 1.100 if ( GikoSys.Setting.ShowDialogForEnd ) and
1542     (MessageDlg('鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
1543     CanClose := false;
1544     Exit;
1545     end else begin
1546     CanClose := True;
1547     end;
1548 hi_ 1.1 Application.OnDeactivate := nil;
1549     Self.OnDeactivate := nil;
1550    
1551 yoffy 1.2 //column鐃緒申
1552 yoffy 1.123 if GetActiveList is TBBS then begin
1553 yoffy 1.2 for i := 0 to ListView.Columns.Count - 1 do
1554     GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1555     end else if GetActiveList is TCategory then begin
1556     for i := 0 to ListView.Columns.Count - 1 do
1557     GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1558     end else if GetActiveList is TBoard then begin
1559     for i := 0 to ListView.Columns.Count - 1 do
1560     GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1561     end;
1562    
1563     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1564     wp.length := sizeof(wp);
1565     GetWindowPlacement(Handle, @wp);
1566     GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1567     GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1568     GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1569     GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1570     GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1571    
1572     GikoSys.Setting.ListStyle := ListView.ViewStyle;
1573     GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1574     GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1575     GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1576     GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1577     if ArrangeAction.Checked then
1578     GikoSys.Setting.ListOrientation := gloVertical
1579     else
1580     GikoSys.Setting.ListOrientation := gloHorizontal;
1581     GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1582    
1583     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1584     for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1585     CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1586     CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1587     CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1588     GikoSys.Setting.MainCoolSet[i] := CoolSet;
1589     end;
1590     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1591     for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1592     CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1593     CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1594     CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1595     GikoSys.Setting.ListCoolSet[i] := CoolSet;
1596     end;
1597     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1598     for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1599     CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1600     CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1601     CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1602     GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1603 hi_ 1.1 end;
1604    
1605 yoffy 1.2 GikoSys.Setting.WriteWindowSettingFile;
1606     GikoSys.Setting.WriteNameMailSettingFile;
1607    
1608     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1609 hi_ 1.1 try
1610 yoffy 1.2 FavoriteDM.WriteFavorite;
1611 hi_ 1.1 except
1612     end;
1613 yoffy 1.2 // Favorite.Free;
1614 hi_ 1.1
1615     try
1616     //鐃?鐃?鐃?鐃緒申鐃?鐃?
1617     NotSelectTabCloseAction.Execute;
1618     if BrowserTab.Tabs.Count >= 1 then begin
1619     DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1620     end;
1621     except
1622     end;
1623    
1624     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申&鐃?鐃緒申
1625     try
1626     RoundList.SaveRoundFile;
1627     except
1628     end;
1629 yoffy 1.125
1630 hi_ 1.1 try
1631     RoundList.Clear;
1632     except
1633     end;
1634     try
1635     RoundList.Free;
1636     except
1637     end;
1638    
1639 yoffy 1.135 //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
1640     try
1641     SaveHistory;
1642     except
1643     end;
1644    
1645 hi_ 1.1 //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1646     try
1647     FHistoryList.Free;
1648     except
1649     end;
1650 yoffy 1.125
1651 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1652     try
1653     AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1654     except
1655     end;
1656    
1657     try
1658     FControlThread.Terminate;
1659     except
1660     end;
1661    
1662     // FDownload.Free;
1663     try
1664     SetActiveList(nil);
1665     except
1666     end;
1667 yoffy 1.124
1668 hi_ 1.1 //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1669 h677 1.170 //Sleep(10);
1670     Application.ProcessMessages;
1671 hi_ 1.1 try
1672     TreeView.Items.Clear;
1673     except
1674     end;
1675 yoffy 1.125
1676 hi_ 1.1 try
1677     if FavoriteDM <> nil then
1678     FavoriteDM.Free;
1679     FavoriteDM := nil;
1680     if AddressHistoryDM <> nil then
1681     AddressHistoryDM.Free;
1682     AddressHistoryDM := nil;
1683     except
1684     end;
1685 yoffy 1.125
1686 yoffy 1.155 // TBBS 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 TCategory, TBoard, TThreadItem 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1687     // TBoard, TThreadItem 鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1688     // BoardPluteIns 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1689 yoffy 1.126 try
1690 h677 1.153 for i := 0 to Length( BBSs ) - 1 do begin
1691     if BBSs[ i ] <> nil then
1692     BBSs[ i ].Free;
1693     BBSs[ i ] := nil;
1694     end;
1695     except
1696     end;
1697 yoffy 1.155
1698 h677 1.153 try
1699 yoffy 1.126 for i := 0 to Length( BoardPlugIns ) - 1 do begin
1700     if BoardPlugIns[ i ] <> nil then
1701     BoardPlugIns[ i ].Free;
1702     BoardPlugIns[ i ] := nil;
1703     end;
1704     except
1705     end;
1706 yoffy 1.124
1707 yoffy 1.126 try
1708     for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1709     if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1710 yoffy 1.155 CabinetSelectPopupMenu.Items[ i ].Free;
1711     CabinetMenu.Items[ i ].Free;
1712 yoffy 1.126 end;
1713     end;
1714     except
1715     end;
1716 yoffy 1.124
1717 yoffy 1.2 try
1718     //Hint鐃?鐃緒申
1719     if FHint <> nil then begin
1720     FHint.ReleaseHandle;
1721     FHint.Free;
1722     FHint := nil;
1723     end;
1724     //Preview鐃?鐃緒申
1725     if TPreviewBrowser <> nil then begin
1726     FPreviewBrowser.Free;
1727     FPreviewBrowser := nil;
1728     end;
1729     except
1730     end;
1731 hi_ 1.1 end;
1732    
1733     procedure TGikoForm.FormDestroy(Sender: TObject);
1734     begin
1735     end;
1736    
1737     //鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1738     procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1739     begin
1740     Application.Terminate;
1741     Action := caFree;
1742     end;
1743    
1744     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1745     procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1746     begin
1747     CabinetVisibleAction.Execute;
1748     // CabinetPanelVisible(false);
1749     end;
1750    
1751     procedure TGikoForm.ReloadBBS;
1752 yoffy 1.123 var
1753     i : Integer;
1754 yoffy 1.149 item : TBBSMenuItem;
1755 hi_ 1.1 begin
1756     //鐃?鐃?鐃?鐃緒申鐃?鐃?
1757     NotSelectTabCloseAction.Execute;
1758     if BrowserTab.Tabs.Count >= 1 then
1759     DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1760     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1761 yoffy 1.135 //FHistoryList.Clear;
1762 hi_ 1.1 //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1763     TreeView.Items.Clear;
1764    
1765     //BBS鐃?鐃緒申
1766 yoffy 1.146 try
1767     for i := Length( BBSs ) - 1 downto 0 do begin
1768     if BBSs[ i ] <> nil then
1769     BBSs[ i ].Free;
1770     BBSs[ i ] := nil;
1771     end;
1772     except
1773 yoffy 1.126 end;
1774 hi_ 1.1
1775 yoffy 1.123 ActiveList := nil;
1776 hi_ 1.1
1777     FTreeType := gttNone;
1778    
1779 yoffy 1.123 GikoSys.ReadBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1780 yoffy 1.148 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1781     for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1782     try
1783     if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1784 yoffy 1.155 CabinetSelectPopupMenu.Items[ i ].Free;
1785     CabinetMenu.Items[ i ].Free;
1786 yoffy 1.148 end;
1787     except
1788     end;
1789     end;
1790     // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1791     for i := Length( BBSs ) - 1 downto 0 do begin
1792     try
1793     item := TBBSMenuItem.Create( PopupMenu );
1794     item.Caption := BBSs[ i ].Title;
1795     item.Data := BBSs[ i ];
1796     item.OnClick := BBSMenuItemOnClick;
1797     CabinetSelectPopupMenu.Items.Insert( 0, item );
1798     item := TBBSMenuItem.Create( PopupMenu );
1799     item.Caption := BBSs[ i ].Title;
1800     item.Data := BBSs[ i ];
1801     item.OnClick := BBSMenuItemOnClick;
1802     CabinetMenu.Insert( 0, item );
1803     except
1804     end;
1805     end;
1806 yoffy 1.123 ShowBBSTree( BBSs[ 0 ] );
1807 yoffy 1.143
1808     // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1809 yoffy 1.146 SaveHistory;
1810     try
1811     for i := FHistoryList.Count - 1 downto 0 do
1812     TFavoriteThreadItem( FHistoryList[ i ] ).Free;
1813     except
1814     end;
1815     FHistoryList.Clear;
1816 yoffy 1.143 LoadHistory;
1817    
1818     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1819     // FFavorite := TFavorite.Create(FavoriteTreeView);
1820     FavoriteTreeView.Items.Clear;
1821     FavoriteDM.SetFavTreeView(FavoriteTreeView);
1822     FavoriteDM.ReadFavorite;
1823     SetLinkBar;
1824    
1825 hi_ 1.1 end;
1826    
1827     //鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1828 yoffy 1.123 procedure TGikoForm.SetBoardTreeNode(
1829     inBBS : TBBS
1830     );
1831 hi_ 1.1 var
1832 yoffy 1.120 i, j, k: integer;
1833 hi_ 1.1 Root: TTreeNode;
1834     CategoryNode: TTreeNode;
1835     BoardNode: TTreeNode;
1836     Category: TCategory;
1837     Board: TBoard;
1838     begin
1839 yoffy 1.112 // 鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1840 yoffy 1.133 FActiveBBS := inBBS;
1841 hi_ 1.1 TreeView.Items.BeginUpdate;
1842     TreeView.Items.Clear;
1843     try
1844 yoffy 1.123 try
1845     if SplashWindow <> nil then
1846     SplashWindow.ProgressBar.Max := BBSs[ 0 ].Count;
1847     except
1848     end;
1849    
1850     Root := TreeView.Items.Add( nil, inBBS.Title );
1851     Root.ImageIndex := ITEM_ICON_2CH1;
1852     Root.SelectedIndex := ITEM_ICON_2CH2;
1853     Root.Data := inBBS;
1854     for i := 0 to inBBS.Count - 1 do begin
1855     Category := TCategory(inBBS.Items[i]);
1856     CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
1857     CategoryNode.Data := Category;
1858     CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
1859     CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
1860 hi_ 1.1
1861 yoffy 1.123 for j := 0 to Category.Count - 1 do begin
1862     Board := TBoard(Category.Items[j]);
1863     Board.BeginUpdate;
1864     BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
1865     BoardNode.Data := Board;
1866     //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
1867     if not Board.IsLogFile then begin
1868     BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
1869     BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
1870     end else begin
1871     BoardNode.ImageIndex := ITEM_ICON_BOARD1;
1872     BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
1873     for k := 0 to Board.Count - 1 do begin
1874     if Board.Items[ k ].IsLogFile then begin
1875     BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
1876     BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
1877 yoffy 1.120
1878 yoffy 1.123 Break;
1879 yoffy 1.120 end;
1880     end;
1881 yoffy 1.112 end;
1882 yoffy 1.123 Board.EndUpdate;
1883     end;
1884 hi_ 1.1
1885 yoffy 1.123 CategoryNode.Expanded := Category.NodeExpand;
1886 hi_ 1.1
1887 yoffy 1.123 if SplashWindow <> nil then begin
1888     SplashWindow.ProgressBar.StepIt;
1889     Application.ProcessMessages;
1890 hi_ 1.1 end;
1891     end;
1892     finally
1893     TreeView.Items.EndUpdate;
1894     end;
1895     end;
1896    
1897 yoffy 1.123 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
1898 hi_ 1.1 const
1899     COLUMN: array[0..0] of string = ('鐃?鐃?鐃?鐃緒申鐃緒申');
1900     var
1901     ListColumn: TListColumn;
1902     i: Integer;
1903     begin
1904     ListView.Items.BeginUpdate;
1905     try
1906     Screen.Cursor := crHourGlass;
1907    
1908     ListView.Columns.Clear;
1909     for i := 0 to Length(COLUMN) - 1 do begin
1910     ListColumn := ListView.Columns.Add;
1911     ListColumn.Caption := COLUMN[i];
1912     ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
1913     end;
1914    
1915     ListView.Items.Count := 0;
1916     ListView.Items.Clear;
1917     ListView.Items.Count := ABBS2ch.Count;
1918    
1919     // UpFolderAction.Enabled := False;
1920     // AllItemAction.Enabled := False;
1921     // LogItemAction.Enabled := False;
1922     // NewItemAction.Enabled := False;
1923     // SelectItemAction.Enabled := False;
1924     // ListDownloadToolButton.Enabled := False;
1925     // BoardReservToolButton.Enabled := False;
1926     // ListThreadDownloadToolButton.Enabled := False;
1927    
1928     ListNameLabel.Caption := ABBS2ch.Title;
1929     FolderImage.Picture := nil;
1930     ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
1931    
1932 yoffy 1.2 FSortIndex := 0;
1933     FSortOrder := False;
1934     ListViewColumnClick(nil, ListView.Column[0]);
1935    
1936 hi_ 1.1 Result := ABBS2ch.Count;
1937     finally
1938     Screen.Cursor := crDefault;
1939     ListView.Items.EndUpdate;
1940     end;
1941     end;
1942    
1943     function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
1944     const
1945     COLUMN: array[0..2] of string = ('鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
1946     var
1947     ListColumn: TListColumn;
1948     i: Integer;
1949     begin
1950     ListView.Items.BeginUpdate;
1951     try
1952     Screen.Cursor := crHourGlass;
1953    
1954     ListView.Columns.Clear;
1955     for i := 0 to Length(COLUMN) - 1 do begin
1956     ListColumn := ListView.Columns.Add;
1957     ListColumn.Caption := COLUMN[i];
1958     ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
1959     end;
1960    
1961     ListView.Items.Count := 0;
1962     ListView.Items.Clear;
1963     ListView.Items.Count := Category.Count;
1964    
1965     // UpFolderAction.Enabled := True;
1966     // AllItemAction.Enabled := False;
1967     // LogItemAction.Enabled := False;
1968     // NewItemAction.Enabled := False;
1969     // SelectItemAction.Enabled := False;
1970     // ListDownloadToolButton.Enabled := False;
1971     // BoardReservToolButton.Enabled := False;
1972     // ListThreadDownloadToolButton.Enabled := False;
1973    
1974     ListNameLabel.Caption := Category.Title;
1975     FolderImage.Picture := nil;
1976     ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
1977    
1978 yoffy 1.2 FSortIndex := 0;
1979     FSortOrder := False;
1980     ListViewColumnClick(nil, ListView.Column[0]);
1981    
1982 hi_ 1.1 Result := Category.Count;
1983     finally
1984     Screen.Cursor := crDefault;
1985     ListView.Items.EndUpdate;
1986     end;
1987     end;
1988    
1989     function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
1990     const
1991     COLUMN: array[0..6] of string = ('鐃?鐃緒申鐃?鐃?鐃緒申', '鐃?鐃?鐃緒申鐃?', '鐃緒申鐃緒申', '鐃?鐃緒申',
1992     '鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
1993     COLUMN_ALIGNMENT: array[0..6] of TAlignment = (taLeftJustify, taRightJustify,
1994     taRightJustify, taRightJustify,
1995     taRightJustify, taLeftJustify,
1996     taLeftJustify);
1997     //No, 鐃?鐃緒申鐃?鐃?鐃緒申, 鐃?鐃?鐃緒申鐃?, 鐃緒申鐃緒申鐃?鐃緒申, 鐃緒申鐃緒申鐃緒申鐃緒申
1998     var
1999     ListColumn: TListColumn;
2000     i: Integer;
2001     begin
2002     ListView.Items.BeginUpdate;
2003     try
2004     Screen.Cursor := crHourGlass;
2005    
2006 yoffy 1.51 // 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2007     // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2008     if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2009     begin
2010     ListView.Columns.Clear;
2011     for i := 0 to Length(COLUMN) - 1 do begin
2012     ListColumn := ListView.Columns.Add;
2013     ListColumn.Caption := COLUMN[i];
2014     ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2015     ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2016     end;
2017     end;
2018 hi_ 1.1
2019     ListView.Items.Count := 0;
2020     ListView.Items.Clear;
2021    
2022     case GikoForm.ViewType of
2023     gvtAll: ListView.Items.Count := Board.Count;
2024     gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2025     gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2026     gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2027     end;
2028    
2029     ListNameLabel.Caption := Board.Title;
2030     FolderImage.Picture := nil;
2031     ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2032    
2033 yoffy 1.2 FSortIndex := 0;
2034     FSortOrder := False;
2035     ListViewColumnClick(nil, ListView.Column[0]);
2036 hi_ 1.1
2037     Result := Board.Count;
2038     finally
2039     Screen.Cursor := crDefault;
2040     ListView.Items.EndUpdate;
2041     end;
2042     end;
2043    
2044     procedure TGikoForm.TreeViewChange(Sender: TObject; Node: TTreeNode);
2045     var
2046     i: Integer;
2047     begin
2048     if FTreeType = gttHistory then begin
2049 yoffy 1.145 if GetActiveContent <> TFavoriteThreadItem( Node ).Item then
2050     FavoriteClick( Node );
2051 hi_ 1.1 Exit;
2052     end;
2053    
2054     ListView.Selected := nil;
2055     ListView.Items.Count := 0;
2056     ListView.Items.Clear;
2057     // ListView.Columns.Clear;
2058    
2059     Caption := CAPTION_NAME;
2060     //Application.Title := CAPTION_NAME;
2061    
2062    
2063 yoffy 1.123 if GetActiveList is TBBS then begin
2064 hi_ 1.1 for i := 0 to ListView.Columns.Count - 1 do
2065     GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
2066     end else if GetActiveList is TCategory then begin
2067     for i := 0 to ListView.Columns.Count - 1 do
2068     GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
2069     end else if GetActiveList is TBoard then begin
2070     for i := 0 to ListView.Columns.Count - 1 do
2071     GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
2072     end;
2073    
2074 yoffy 1.123 if TObject(Node.Data) is TBBS then begin
2075 hi_ 1.1 SetActiveList(Node.data);
2076     end else if TObject(Node.Data) is TCategory then begin
2077     SetActiveList(Node.data);
2078     end else if TObject(Node.Data) is TBoard then begin
2079     if not TBoard(Node.Data).IsThreadDatRead then begin
2080     Screen.Cursor := crHourGlass;
2081     try
2082     GikoSys.ReadSubjectFile(TBoard(Node.Data));
2083     finally
2084     Screen.Cursor := crDefault;
2085     end;
2086     end;
2087     SetActiveList(Node.data);
2088     end;
2089     end;
2090    
2091     procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2092     var
2093     // FileName: string;
2094     // DateTime: TDateTime;
2095     BoardCnt: Integer;
2096 yoffy 1.123 BBS: TBBS;
2097 hi_ 1.1 Category: TCategory;
2098     Board: TBoard;
2099     ThreadItem: TThreadItem;
2100     RepStr: string;
2101 h677 1.170 ActivListObj : TObject;
2102 hi_ 1.1 begin
2103 h677 1.170 ActivListObj := ActiveList;
2104     if ActivListObj is TBBS then begin
2105     BBS := TBBS(ActivListObj);
2106 yoffy 1.114
2107 hi_ 1.1 ListView.StateImages := nil;
2108    
2109     if BBS = nil then Exit;
2110     if BBS.Count <= 0 then Exit;
2111     if Item = nil then Exit;
2112     if Item.Index > BBS.Count then Exit;
2113     if ListView.Items.Count = 0 then Exit;
2114    
2115 yoffy 1.123 if not (BBS.Items[Item.index] is TCategory) then Exit;
2116     Category := TCategory(BBS.Items[Item.index]);
2117 hi_ 1.1
2118     if Category = nil then Exit;
2119    
2120     if ListNumberVisibleAction.Checked then
2121     Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2122     else
2123     Item.Caption := Category.Title;
2124    
2125 yoffy 1.2 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2126 hi_ 1.1 Item.Data := Category;
2127 h677 1.170 end else if ActivListObj is TCategory then begin
2128     Category := TCategory(ActivListObj);
2129 hi_ 1.1
2130     ListView.StateImages := nil;
2131    
2132     if Category = nil then Exit;
2133     if Category.Count <= 0 then Exit;
2134     if Item = nil then Exit;
2135     if Item.Index >= Category.Count then Exit;
2136     if ListView.Items.Count = 0 then Exit;
2137    
2138     if not (Category.Items[Item.Index] is TBoard) then Exit;
2139     Board := TBoard(Category.Items[Item.Index]);
2140    
2141     if Board = nil then Exit;
2142    
2143     if ListNumberVisibleAction.Checked then
2144     Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2145     else
2146     Item.Caption := Board.Title;
2147    
2148     if Item.SubItems.Count <> 2 then begin
2149     Item.SubItems.Clear;
2150     Item.SubItems.Add('');
2151     Item.SubItems.Add('');
2152     end;
2153    
2154 yoffy 1.2 Item.ImageIndex := ITEM_ICON_BOARD1;
2155 hi_ 1.1
2156     if Board.Round then
2157 yoffy 1.51 Item.SubItems[0] := Board.RoundName // '鐃?鐃緒申'
2158 hi_ 1.1 else
2159     Item.SubItems[0] := '';
2160    
2161     if Board.RoundDate = ZERO_DATE then begin
2162     Item.SubItems[1] := '';
2163     end else
2164     Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2165     Item.Data := Board;
2166 h677 1.170 end else if ActivListObj is TBoard then begin
2167     Board := TBoard(ActivListObj);
2168 hi_ 1.1
2169     if GikoSys.Setting.ListIconVisible then
2170     ListView.StateImages := StateIconImageList
2171     else
2172     ListView.StateImages := nil;
2173    
2174     case GikoForm.ViewType of
2175     gvtAll: BoardCnt := Board.Count;
2176     gvtLog: BoardCnt := Board.GetLogThreadCount;
2177     gvtNew: BoardCnt := Board.GetNewThreadCount;
2178     gvtUser: BoardCnt := Board.GetUserThreadCount;
2179 yoffy 1.2 else
2180     BoardCnt := 0;
2181 hi_ 1.1 end;
2182    
2183     // if Board = nil then Exit;
2184     if BoardCnt <= 0 then Exit;
2185     if Item = nil then Exit;
2186     if Item.Index > BoardCnt then Exit;
2187     if ListView.Items.Count = 0 then Exit;
2188    
2189     // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2190    
2191     ThreadItem := nil;
2192     case GikoForm.ViewType of
2193     gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]);
2194     gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2195     gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2196     gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2197     end;
2198    
2199     if ThreadItem = nil then Exit;
2200    
2201     // if ListNumberVisibleAction.Checked then
2202     // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2203     // else
2204     RepStr := ThreadItem.Title;
2205 h677 1.151 RepStr := CustomStringReplace(RepStr, '&lt;', '<' );
2206     RepStr := CustomStringReplace(RepStr, '&gt;', '>' );
2207     RepStr := CustomStringReplace(RepStr, '&quot;', '"' );
2208     RepStr := CustomStringReplace(RepStr, '&amp', '&' );
2209 hi_ 1.1 //RepStr := StringReplace(RepStr, '鐃緒申鐃?', ',', [rfReplaceAll]);
2210    
2211     if Item.SubItems.Count <> 6 then begin
2212     Item.SubItems.Clear;
2213     Item.SubItems.Add('');
2214     Item.SubItems.Add('');
2215     Item.SubItems.Add('');
2216     Item.SubItems.Add('');
2217     Item.SubItems.Add('');
2218     Item.SubItems.Add('');
2219     end;
2220    
2221     if ListNumberVisibleAction.Checked then
2222     Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2223     else
2224     Item.Caption := RepStr;
2225    
2226     case ThreadItem.AgeSage of
2227     gasNone: Item.StateIndex := -1;
2228 yoffy 1.51 gasNew: Item.StateIndex := 0;
2229     gasAge: Item.StateIndex := 1;
2230 hi_ 1.1 gasSage: Item.StateIndex := 2;
2231     end;
2232    
2233     if ThreadItem.IsLogFile then begin
2234 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2235 hi_ 1.1 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2236     Item.SubItems[1] := IntToStr(ThreadItem.Count);
2237     if ThreadItem.NewResCount = 0 then
2238     Item.SubItems[2] := ''
2239     else
2240     Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2241     Item.SubItems[3] := '';
2242     if ThreadItem.Round then
2243     Item.SubItems[4] := ThreadItem.RoundName
2244     else
2245     Item.SubItems[4] := '';
2246     if ThreadItem.RoundDate = ZERO_DATE then begin
2247     Item.SubItems[5] := '';
2248     end else
2249     Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2250     if ThreadItem.NewArrival then
2251 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2252 hi_ 1.1 end else begin
2253 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREAD1;
2254 hi_ 1.1 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2255     Item.SubItems[1] := '';
2256     Item.SubItems[2] := '';
2257     Item.SubItems[3] := '';
2258     Item.SubItems[4] := '';
2259     Item.SubItems[5] := '';
2260     end;
2261     Item.Data := ThreadItem;
2262     end;
2263     end;
2264    
2265     procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2266     const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2267     StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2268     var Index: Integer);
2269     begin
2270     //
2271     end;
2272    
2273     procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,