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