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.181 - (hide annotations) (download) (as text)
Thu Dec 11 19:41:13 2003 UTC (20 years, 4 months ago) by h677
Branch: MAIN
Changes since 1.180: +26 -20 lines
File MIME type: text/x-pascal
RoundListが持ってるスレのデータはpluginが解放するかもしれないから、
解放部を最後に持っていって、nilデータは無視するようにした。

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