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.153 - (hide annotations) (download) (as text)
Thu Nov 27 11:19:34 2003 UTC (20 years, 4 months ago) by h677
Branch: MAIN
Changes since 1.152: +9 -8 lines
File MIME type: text/x-pascal
終了時のアクセスバイオレーションを回避

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