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.183 - (hide annotations) (download) (as text)
Sat Dec 13 09:19:24 2003 UTC (20 years, 4 months ago) by h677
Branch: MAIN
Changes since 1.182: +120 -87 lines
File MIME type: text/x-pascal
●用SSL障害のため強制ログインモード追加(2003/12/21まで)

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