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