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.84 - (hide annotations) (download) (as text)
Thu Oct 2 13:14:30 2003 UTC (20 years, 6 months ago) by h677
Branch: MAIN
Changes since 1.83: +30 -4 lines
File MIME type: text/x-pascal
瞬間的ドラッグで、ドラッグモードになってしまうのを防ぐようにした。

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