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.202 - (hide annotations) (download) (as text)
Sat Mar 6 12:58:00 2004 UTC (20 years, 1 month ago) by yoffy
Branch: MAIN
CVS Tags: b46
Changes since 1.201: +6 -6 lines
File MIME type: text/x-pascal
・速度改善のため、お気に入りへの追加時に既に登録されているかのチェックを
 URL のみで比較するように変更。

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