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.138 - (hide annotations) (download) (as text)
Mon Nov 24 10:01:44 2003 UTC (20 years, 4 months ago) by yoffy
Branch: MAIN
Changes since 1.137: +71 -11 lines
File MIME type: text/x-pascal
・キャビネットがトグルするようになった。
 これにより、CabinetVisibleAction はデフォルトのボタンからはずし、
 Cabinet2chAction, CabinetHistoryAction, CabinetFavoriteAction をデフォルトに追加。

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