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.161 - (hide annotations) (download) (as text)
Sun Nov 30 07:51:52 2003 UTC (20 years, 4 months ago) by yoffy
Branch: MAIN
Changes since 1.160: +2 -1 lines
File MIME type: text/x-pascal
・ユーザから入力された URL が一意になるように整形されていないと
 正しく検索できないので修正。

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