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.67 - (hide annotations) (download) (as text)
Sun Sep 28 05:32:39 2003 UTC (20 years, 6 months ago) by yoffy
Branch: MAIN
Changes since 1.66: +23 -10 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    
1061     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1062     ListView.ViewStyle := GikoSys.Setting.ListStyle;
1063    
1064     //鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1065     // MainCoolBar.Top := 0;
1066     // MainCoolBar.Left := 0;
1067    
1068     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
1069     AnimePanel.Top := 0;
1070     AnimePanel.Left := 0;
1071    
1072     //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1073    
1074     //鐃?鐃緒申鐃?鐃?鐃?鐃?
1075     CabinetVisibleAction.Checked := not GikoSys.Setting.CabinetVisible;
1076     CabinetVisibleAction.Execute;
1077     CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1078    
1079     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1080     MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1081     MsgBarVisibleActionExecute(nil);
1082     MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1083    
1084     //鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1085     StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1086     StatusBarVisibleActionExecute(nil);
1087    
1088     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1089     TreeView.Items.BeginUpdate;
1090 yoffy 1.67 FavoriteTreeView.Items.BeginUpdate;
1091 hi_ 1.1 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 yoffy 1.67 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1099     FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1100     FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1101     FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1102    
1103 hi_ 1.1 ListView.Font.Name := GikoSys.Setting.ListFontName;
1104     ListView.Font.Size := GikoSys.Setting.ListFontSize;
1105     ListView.Font.Color := GikoSys.Setting.ListFontColor;
1106     ListView.Color := GikoSys.Setting.ListBackColor;
1107     finally
1108     TreeView.Items.EndUpdate;
1109 yoffy 1.67 FavoriteTreeView.Items.EndUpdate;
1110 hi_ 1.1 ListView.Items.EndUpdate;
1111     end;
1112     //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1113     ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1114    
1115     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1116     BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1117     BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1118    
1119    
1120     // TreeView.TopItem.Expanded := True; //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1121     // TreeView.Selected := TreeView.Items[0]; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1122     SetContent(nil); //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1123    
1124     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1125     wp.length := sizeof(wp);
1126     wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1127     wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1128     wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1129     wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1130     wp.showCmd := SW_HIDE;
1131     SetWindowPlacement(Handle, @wp);
1132    
1133     // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1134     // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1135     if GikoSys.Setting.WindowMax then
1136     WindowState := wsMaximized;
1137    
1138     //鐃?鐃?鐃?鐃?鐃緒申
1139     try
1140     FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1141     if FileExists(FileName) then
1142     Animate.FileName := FileName;
1143     except
1144     end;
1145     // AnimePanel.Height := 26;
1146     // AnimePanel.Width := 39;
1147     // AnimePanel.Top := 2;
1148     // AnimePanel.Left := Width - 48;
1149    
1150     //鐃?鐃?鐃?鐃?
1151     FNameCookie := '';
1152     FMailCookie := '';
1153    
1154     //鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1155     AllItemAction.Checked := True;
1156 yoffy 1.51 AllResAction.Checked := True;
1157 hi_ 1.1
1158     //TreeView鐃緒申鐃緒申鐃緒申鐃?鐃緒申ToolTip鐃緒申鐃緒申鐃?鐃緒申
1159     Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1160     Style := Style or TVS_NOTOOLTIPS;
1161     SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1162    
1163     // 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1164     TreeView.Align := alClient;
1165 yoffy 1.57 FavoriteTreeView.Align := alClient;
1166 hi_ 1.1 FavoriteTreeView.Visible := False;
1167    
1168     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1169     // FBrowserSizeFlag := False;
1170     // FBrowserSizeHeight := ViewPanel.Height;
1171    
1172     FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1173     FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1174    
1175     ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1176     ArrangeAction.Execute;
1177    
1178     if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1179     case GikoSys.Setting.ListWidthState of
1180     glsMax: begin
1181     ViewPanel.Width := 1;
1182 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1183     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1184 hi_ 1.1 end;
1185     glsMin: begin
1186     ViewPanel.Width := GikoSys.Setting.ListWidth;
1187 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1188     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1189 hi_ 1.1 end;
1190     else begin
1191     ViewPanel.Width := GikoSys.Setting.ListWidth;
1192 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1193     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1194 hi_ 1.1 end;
1195     end;
1196     // if GikoSys.Setting.ListWidthMax then begin
1197     // ViewPanel.Width := 1;
1198     // BrowserSizeAction.ImageIndex := ICON_WIDTH_MIN;
1199     // end else begin
1200     // ViewPanel.Width := GikoSys.Setting.ListWidth;
1201     // BrowserSizeAction.ImageIndex := ICON_WIDTH_MAX;
1202     // end;
1203     end else begin
1204     case GikoSys.Setting.ListHeightState of
1205     glsMax: begin
1206     ViewPanel.Height := 1;
1207 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1208     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1209 hi_ 1.1 end;
1210     glsMin: begin
1211     ViewPanel.Height := GikoSys.Setting.ListHeight;
1212 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1213     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1214 hi_ 1.1 end;
1215     else begin
1216     ViewPanel.Height := GikoSys.Setting.ListHeight;
1217 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1218     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1219 hi_ 1.1 end;
1220     end;
1221     // if GikoSys.Setting.ListHeightState = glsMax then begin
1222     // end else begin
1223     // ViewPanel.Height := GikoSys.Setting.ListHeight;
1224     // BrowserSizeAction.ImageIndex := ICON_HEIGHT_MAX;
1225     // end;
1226     end;
1227    
1228     //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1229     // ProgressBar.Visible := False;
1230     ProgressBar.Parent := StatusBar;
1231     ProgressBar.Top := 2;
1232     ProgressBar.Left := 0;
1233     ProgressBar.Width := StatusBar.Panels[0].Width;
1234     ProgressBar.Height := StatusBar.Height - 2;
1235     ProgressBar.Position := 0;
1236    
1237     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1238     //formshow()鐃緒申鐃緒申鐃緒申
1239 yoffy 1.2
1240 hi_ 1.1 //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1241     // FDownload := TDownload.Create;
1242     // FDownload.OnDownloadEnd := OnDonloadEnd;
1243     // FDownload.OnWork := Work;
1244     // FDownload.OnWorkBegin := WorkBegin;
1245     // FDownload.OnWorkEnd := WorkEnd;
1246    
1247     //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1248     FControlThread := TThreadControl.Create(True);
1249     FControlThread.MaxThreadCount := 1;
1250     FControlThread.Resume;
1251     FControlThread.OnDownloadEnd := DownloadEnd;
1252     FControlThread.OnDownloadMsg := DownloadMsg;
1253     FControlThread.OnWork := Work;
1254     FControlThread.OnWorkBegin := WorkBegin;
1255     FControlThread.OnWorkEnd := WorkEnd;
1256     // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1257    
1258     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1259     FHistoryList := TList.Create;
1260    
1261 yoffy 1.51 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1262     SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1263 yoffy 1.2
1264 hi_ 1.1 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
1265     SetBrowserTabState;
1266    
1267     BrowserBoardNameLabel.Caption := '';
1268     BrowserNameLabel.Caption := '';
1269     FWorkCount := 0;
1270    
1271     // DetailIconAction.Execute;
1272    
1273     // FBrowserSizeHeight := ViewPanel.Height;
1274     FTabHintIndex := -1;
1275    
1276     //鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1277     // if not GikoSys.DirectoryExistsEx(BBS2ch.GetLogFolder) then begin
1278     // GikoSys.ForceDirectoriesEx(BBS2ch.GetLogFolder);
1279     // end;
1280     // FormResize(Sender);
1281     // MainCoolBarResize(Sender);
1282     // Application.ProcessMessages;
1283    
1284     //鐃緒申鐃緒申鐃?鐃?鐃?
1285     SetLinkBar;
1286    
1287     //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?
1288     SetMenuFont;
1289    
1290     //鐃?鐃?鐃緒申鐃?鐃?Wrapable
1291     ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1292     BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1293    
1294 yoffy 1.2 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1295     ReadToolBarSetting(ActionList, StdToolBar);
1296     ReadToolBarSetting(ActionList, ListToolBar);
1297 yoffy 1.51 try
1298     for i := ListToolBar.ControlCount - 1 downto 0 do
1299     begin
1300     if ListToolBar.Controls[ i ].Action = SelectItemAction then
1301     begin
1302     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1303     if (i + 1) < ListToolBar.ControlCount then
1304     if ListToolBar.Controls[ i + 1 ] is TToolButton then
1305     if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1306     ListToolBar.Controls[ i + 1 ].Visible := False;
1307    
1308     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申
1309     ListToolBar.Controls[ i ].Visible := False;
1310     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申
1311     SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1312     SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1313     SelectComboBox.Parent := ListToolBar;
1314     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
1315     SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1316     SelectComboBoxSplitter.Parent := ListToolBar;
1317    
1318     break;
1319     end;
1320     end;
1321     except
1322     end;
1323 yoffy 1.2 ReadToolBarSetting(ActionList, BrowserToolBar);
1324     SetToolBarPopup;
1325    
1326 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃?鐃?
1327     AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1328    
1329 yoffy 1.2 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1330    
1331     //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1332     if not FileExists(GikoSys.GetBoardFileName) then begin
1333     msg := '鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申' + #13#10#13#10
1334     + '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申' + #13#10
1335     + '鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?';
1336     MsgBox(SplashWindow.Handle, msg, '鐃?鐃?鐃?鐃?', MB_OK or MB_ICONINFORMATION);
1337     NewBoardAction.Execute;
1338     end;
1339    
1340     //鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1341     GikoSys.LoadKeySetting(ActionList);
1342    
1343     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1344     // FLastRoundTime := 0;
1345    
1346     //ResHint
1347     FHint := TResPopup.Create(Self);
1348    
1349 yoffy 1.67 // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1350     Case GikoSys.Setting.CabinetIndex of
1351     0: Cabinet2chAction.Execute;
1352     1: CabinetHistoryAction.Execute;
1353     2: CabinetFavoriteAction.Execute;
1354     end;
1355    
1356 yoffy 1.2 //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1357     if GikoSys.Setting.AutoLogin then
1358     LoginAction.Execute;
1359    
1360     //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?
1361     for i := 1 to ParamCount do begin
1362     MoveToURL(ParamStr(i));
1363     end;
1364     // SetStdToolBar;
1365     // SetLinkBar;
1366 h677 1.22
1367 hi_ 1.32 s := GikoSys.FAbon.NGwordname;
1368     StatusBar.Panels[2].Text := s;
1369     StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1370     StatusBarResize(Sender);
1371 yoffy 1.2 end;
1372    
1373     //
1374     //
1375     //
1376     procedure TGikoForm.FormShow(Sender: TObject);
1377     var
1378     i: Integer;
1379     CoolSet: TCoolSet;
1380     begin
1381     ShowWindow(Application.Handle, SW_HIDE);
1382    
1383     //FormCreate鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1384     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1385     StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1386     StdToolBarVisibleActionExecute( nil );
1387     AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1388     AddressBarVisibleActionExecute( nil );
1389     LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1390     LinkBarVisibleActionExecute( nil );
1391     ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1392     ListToolBarVisibleActionExecute( nil );
1393     ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1394     ListNameBarVisibleActionExecute( nil );
1395     BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1396     BrowserToolBarVisibleActionExecute( nil );
1397     BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1398     BrowserNameBarVisibleActionExecute( nil );
1399    
1400     //鐃?鐃緒申鐃?鐃?鐃?鐃?
1401     BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1402     BrowserTabVisibleActionExecute(nil);
1403    
1404     if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1405     BrowserTabTopAction.Checked := True;
1406     BrowserTabTopActionExecute(nil);
1407     end else begin
1408     BrowserTabBottomAction.Checked := True;
1409     BrowserTabBottomActionExecute(nil);
1410     end;
1411    
1412     if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1413     BrowserTabTabStyleAction.Checked := True;
1414     BrowserTabTabStyleActionExecute(nil);
1415     end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1416     BrowserTabButtonStyleAction.Checked := True;
1417     BrowserTabButtonStyleActionExecute(nil);
1418     end else begin
1419     BrowserTabFlatStyleAction.Checked := True;
1420     BrowserTabFlatStyleActionExecute(nil);
1421     end;
1422    
1423    
1424 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1425     MainCoolBar.Bands.BeginUpdate;
1426     try
1427     for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1428     CoolSet := GikoSys.Setting.MainCoolSet[i];
1429     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1430     Continue;
1431     MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1432     MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1433     MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1434     end;
1435     finally
1436     MainCoolBar.Bands.EndUpdate;
1437     end;
1438    
1439     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1440     ListCoolBar.Bands.BeginUpdate;
1441     try
1442     for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1443     CoolSet := GikoSys.Setting.ListCoolSet[i];
1444     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1445     Continue;
1446     ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1447     ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1448     ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1449     end;
1450     finally
1451     ListCoolBar.Bands.EndUpdate;
1452     end;
1453    
1454     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1455     BrowserCoolBar.Bands.BeginUpdate;
1456     try
1457     for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1458     CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1459     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1460     Continue;
1461     BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1462     BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1463     BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1464     end;
1465     finally
1466     BrowserCoolBar.Bands.EndUpdate;
1467     end;
1468    
1469     end;
1470 yoffy 1.2 {
1471 hi_ 1.1 procedure TGikoForm.SetStdToolBar;
1472     var
1473     i: Integer;
1474     FileName: string;
1475     ini: TMemIniFile;
1476     s: string;
1477     Action: TContainedAction;
1478     ToolButton: TToolButton;
1479     begin
1480     exit;
1481     for i := StdToolBar.ButtonCount - 1 downto 0 do begin
1482     StdToolBar.RemoveControl(StdToolBar.Buttons[i]);
1483     //StdToolBar.Buttons[i].Free;
1484     end;
1485     FileName := GikoSys.GetConfigDir + 'ToolBar.ini';
1486     ini := TMemIniFile.Create(FileName);
1487     i := 0;
1488     while true do begin
1489     s := ini.ReadString('StdToolBar', IntToStr(i), '');
1490     if s = '' then
1491     Break;
1492     if s = '-' then begin
1493     ToolButton := TToolButton.Create(StdToolBar);
1494     ToolButton.Style := tbsSeparator;
1495     ToolButton.Width := 8;
1496     ToolButton.Left := 10000;
1497     StdToolBar.InsertControl(ToolButton);
1498     end else begin
1499     Action := GetAction(s);
1500     if Action <> nil then begin
1501     ToolButton := TToolButton.Create(StdToolBar);
1502     ToolButton.Action := Action;
1503     ToolButton.Left := 10000;
1504     StdToolBar.InsertControl(ToolButton);
1505     end;
1506     end;
1507     Inc(i);
1508     end;
1509     end;
1510 yoffy 1.2 }
1511     {function TGikoForm.GetAction(ActionName: string): TContainedAction;
1512 hi_ 1.1 var
1513     i: Integer;
1514     begin
1515     for i := 0 to ActionList.ActionCount - 1 do begin
1516     if ActionList.Actions[i].Name = ActionName then begin
1517     Result := ActionList.Actions[i];
1518     Exit;
1519     end;
1520     end;
1521     Result := nil;
1522 yoffy 1.2 end;}
1523 hi_ 1.1
1524     procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1525     var
1526     i: Integer;
1527     CoolSet: TCoolSet;
1528     wp: TWindowPlacement;
1529     begin
1530 yoffy 1.2 // if not EnabledCloseButton then begin
1531     // CanClose := False;
1532     // Exit;
1533     // end;
1534    
1535 hi_ 1.1 CanClose := True;
1536     Application.OnDeactivate := nil;
1537     Self.OnDeactivate := nil;
1538    
1539 yoffy 1.2 //column鐃緒申
1540     if GetActiveList is TBBS2ch then begin
1541     for i := 0 to ListView.Columns.Count - 1 do
1542     GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1543     end else if GetActiveList is TCategory then begin
1544     for i := 0 to ListView.Columns.Count - 1 do
1545     GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1546     end else if GetActiveList is TBoard then begin
1547     for i := 0 to ListView.Columns.Count - 1 do
1548     GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1549     end;
1550    
1551     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1552     wp.length := sizeof(wp);
1553     GetWindowPlacement(Handle, @wp);
1554     GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1555     GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1556     GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1557     GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1558     GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1559    
1560     GikoSys.Setting.ListStyle := ListView.ViewStyle;
1561     GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1562     GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1563     GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1564     GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1565     if ArrangeAction.Checked then
1566     GikoSys.Setting.ListOrientation := gloVertical
1567     else
1568     GikoSys.Setting.ListOrientation := gloHorizontal;
1569     GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1570    
1571     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1572     for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1573     CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1574     CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1575     CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1576     GikoSys.Setting.MainCoolSet[i] := CoolSet;
1577     end;
1578     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1579     for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1580     CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1581     CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1582     CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1583     GikoSys.Setting.ListCoolSet[i] := CoolSet;
1584     end;
1585     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1586     for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1587     CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1588     CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1589     CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1590     GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1591 hi_ 1.1 end;
1592    
1593 yoffy 1.2 GikoSys.Setting.WriteWindowSettingFile;
1594     GikoSys.Setting.WriteNameMailSettingFile;
1595    
1596     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1597 hi_ 1.1 try
1598 yoffy 1.2 FavoriteDM.WriteFavorite;
1599 hi_ 1.1 except
1600     end;
1601 yoffy 1.2 // Favorite.Free;
1602 hi_ 1.1
1603     try
1604     //鐃?鐃?鐃?鐃緒申鐃?鐃?
1605     NotSelectTabCloseAction.Execute;
1606     if BrowserTab.Tabs.Count >= 1 then begin
1607     DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1608     end;
1609     except
1610     end;
1611    
1612     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申&鐃?鐃緒申
1613     try
1614     RoundList.SaveRoundFile;
1615     except
1616     end;
1617     try
1618     RoundList.Clear;
1619     except
1620     end;
1621     try
1622     RoundList.Free;
1623     except
1624     end;
1625    
1626     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1627     try
1628     FHistoryList.Free;
1629     except
1630     end;
1631    
1632     //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1633     try
1634     AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1635     except
1636     end;
1637    
1638     try
1639     FControlThread.Terminate;
1640     except
1641     end;
1642    
1643     // FDownload.Free;
1644     try
1645     SetActiveList(nil);
1646     except
1647     end;
1648     //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1649     Sleep(10);
1650     try
1651     TreeView.Items.Clear;
1652     except
1653     end;
1654    
1655     try
1656     if FavoriteDM <> nil then
1657     FavoriteDM.Free;
1658     FavoriteDM := nil;
1659     if AddressHistoryDM <> nil then
1660     AddressHistoryDM.Free;
1661     AddressHistoryDM := nil;
1662     except
1663     end;
1664     try
1665     if BBS2ch <> nil then
1666     BBS2ch.Free;
1667     BBS2ch := nil;
1668     except
1669     end;
1670 yoffy 1.2
1671     try
1672     //Hint鐃?鐃緒申
1673     if FHint <> nil then begin
1674     FHint.ReleaseHandle;
1675     FHint.Free;
1676     FHint := nil;
1677     end;
1678     //Preview鐃?鐃緒申
1679     if TPreviewBrowser <> nil then begin
1680     FPreviewBrowser.Free;
1681     FPreviewBrowser := nil;
1682     end;
1683     except
1684     end;
1685 hi_ 1.1 end;
1686    
1687     procedure TGikoForm.FormDestroy(Sender: TObject);
1688     //var
1689     // wp: TWindowPlacement;
1690     begin
1691     { //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1692     FHistoryList.Free;
1693    
1694     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1695     wp.length := sizeof(wp);
1696     GetWindowPlacement(Handle, @wp);
1697    
1698     GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1699     GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1700     GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1701     GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1702     GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1703    
1704     GikoSys.Setting.CabinetVisible := CabinetPanel.Visible;
1705     GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1706    
1707     GikoSys.Setting.WriteWindowSettingFile;
1708     GikoSys.Setting.WriteNameMailSettingFile;
1709     FDownload.Free;
1710     BBS2ch.Free;}
1711     end;
1712    
1713     //鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1714     procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1715     begin
1716     Application.Terminate;
1717     Action := caFree;
1718     end;
1719    
1720     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1721     procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1722     begin
1723     CabinetVisibleAction.Execute;
1724     // CabinetPanelVisible(false);
1725     end;
1726    
1727     procedure TGikoForm.ReloadBBS;
1728     begin
1729     //鐃?鐃?鐃?鐃緒申鐃?鐃?
1730     NotSelectTabCloseAction.Execute;
1731     if BrowserTab.Tabs.Count >= 1 then
1732     DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1733     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1734     FHistoryList.Clear;
1735     //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1736     TreeView.Items.Clear;
1737    
1738     //BBS鐃?鐃緒申
1739     BBS2ch.Free;
1740    
1741     SetActiveList(nil);
1742    
1743     FTreeType := gttNone;
1744    
1745     //BBS鐃緒申鐃緒申
1746     BBS2ch := TBBS2ch.Create(GikoSys.Setting.LogFolder);
1747    
1748     BBS2ch.ReadBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1749     Show2chTree;
1750     end;
1751    
1752     //鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1753     procedure TGikoForm.SetBoardTreeNode;
1754     var
1755     i, j: integer;
1756     Root: TTreeNode;
1757     CategoryNode: TTreeNode;
1758     BoardNode: TTreeNode;
1759     Category: TCategory;
1760     Board: TBoard;
1761     begin
1762     TreeView.Items.BeginUpdate;
1763     TreeView.Items.Clear;
1764     try
1765     Root := TreeView.Items.Add(nil, BBS2ch.Title);
1766 yoffy 1.2 Root.ImageIndex := ITEM_ICON_2CH1;
1767     Root.SelectedIndex := ITEM_ICON_2CH2;
1768 hi_ 1.1 Root.Data := BBS2ch;
1769     if SplashWindow <> nil then
1770     SplashWindow.ProgressBar.Max := BoardGroup.BBS2ch.Count;
1771    
1772     for i := 0 to BoardGroup.BBS2ch.Count - 1 do begin
1773     Category := TCategory(BoardGroup.BBS2ch.Items[i]);
1774     CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
1775     CategoryNode.Data := Category;
1776 yoffy 1.2 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
1777     CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
1778 hi_ 1.1
1779     for j := 0 to Category.Count - 1 do begin
1780     Board := TBoard(Category.Items[j]);
1781     Board.BeginUpdate;
1782     BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
1783     BoardNode.Data := Board;
1784 yoffy 1.2 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
1785     BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
1786 hi_ 1.1 Board.LoadSettings;
1787     Board.EndUpdate;
1788     end;
1789    
1790     CategoryNode.Expanded := Category.NodeExpand;
1791    
1792     if SplashWindow <> nil then begin
1793     SplashWindow.ProgressBar.StepIt;
1794     Application.ProcessMessages;
1795     end;
1796    
1797     end;
1798     finally
1799     TreeView.Items.EndUpdate;
1800     end;
1801     end;
1802    
1803     function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS2ch): Integer;
1804     const
1805     COLUMN: array[0..0] of string = ('鐃?鐃?鐃?鐃緒申鐃緒申');
1806     var
1807     ListColumn: TListColumn;
1808     i: Integer;
1809     begin
1810     ListView.Items.BeginUpdate;
1811     try
1812     Screen.Cursor := crHourGlass;
1813    
1814     ListView.Columns.Clear;
1815     for i := 0 to Length(COLUMN) - 1 do begin
1816     ListColumn := ListView.Columns.Add;
1817     ListColumn.Caption := COLUMN[i];
1818     ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
1819     end;
1820    
1821     ListView.Items.Count := 0;
1822     ListView.Items.Clear;
1823     ListView.Items.Count := ABBS2ch.Count;
1824    
1825     // UpFolderAction.Enabled := False;
1826     // AllItemAction.Enabled := False;
1827     // LogItemAction.Enabled := False;
1828     // NewItemAction.Enabled := False;
1829     // SelectItemAction.Enabled := False;
1830     // ListDownloadToolButton.Enabled := False;
1831     // BoardReservToolButton.Enabled := False;
1832     // ListThreadDownloadToolButton.Enabled := False;
1833    
1834     ListNameLabel.Caption := ABBS2ch.Title;
1835     FolderImage.Picture := nil;
1836     ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
1837    
1838 yoffy 1.2 FSortIndex := 0;
1839     FSortOrder := False;
1840     ListViewColumnClick(nil, ListView.Column[0]);
1841    
1842 hi_ 1.1 Result := ABBS2ch.Count;
1843     finally
1844     Screen.Cursor := crDefault;
1845     ListView.Items.EndUpdate;
1846     end;
1847     end;
1848    
1849     function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
1850     const
1851     COLUMN: array[0..2] of string = ('鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
1852     var
1853     ListColumn: TListColumn;
1854     i: Integer;
1855     begin
1856     ListView.Items.BeginUpdate;
1857     try
1858     Screen.Cursor := crHourGlass;
1859    
1860     ListView.Columns.Clear;
1861     for i := 0 to Length(COLUMN) - 1 do begin
1862     ListColumn := ListView.Columns.Add;
1863     ListColumn.Caption := COLUMN[i];
1864     ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
1865     end;
1866    
1867     ListView.Items.Count := 0;
1868     ListView.Items.Clear;
1869     ListView.Items.Count := Category.Count;
1870    
1871     // UpFolderAction.Enabled := True;
1872     // AllItemAction.Enabled := False;
1873     // LogItemAction.Enabled := False;
1874     // NewItemAction.Enabled := False;
1875     // SelectItemAction.Enabled := False;
1876     // ListDownloadToolButton.Enabled := False;
1877     // BoardReservToolButton.Enabled := False;
1878     // ListThreadDownloadToolButton.Enabled := False;
1879    
1880     ListNameLabel.Caption := Category.Title;
1881     FolderImage.Picture := nil;
1882     ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
1883    
1884 yoffy 1.2 FSortIndex := 0;
1885     FSortOrder := False;
1886     ListViewColumnClick(nil, ListView.Column[0]);
1887    
1888 hi_ 1.1 Result := Category.Count;
1889     finally
1890     Screen.Cursor := crDefault;
1891     ListView.Items.EndUpdate;
1892     end;
1893     end;
1894    
1895     function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
1896     const
1897     COLUMN: array[0..6] of string = ('鐃?鐃緒申鐃?鐃?鐃緒申', '鐃?鐃?鐃緒申鐃?', '鐃緒申鐃緒申', '鐃?鐃緒申',
1898     '鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
1899     COLUMN_ALIGNMENT: array[0..6] of TAlignment = (taLeftJustify, taRightJustify,
1900     taRightJustify, taRightJustify,
1901     taRightJustify, taLeftJustify,
1902     taLeftJustify);
1903     //No, 鐃?鐃緒申鐃?鐃?鐃緒申, 鐃?鐃?鐃緒申鐃?, 鐃緒申鐃緒申鐃?鐃緒申, 鐃緒申鐃緒申鐃緒申鐃緒申
1904     var
1905     ListColumn: TListColumn;
1906     i: Integer;
1907     begin
1908     ListView.Items.BeginUpdate;
1909     try
1910     Screen.Cursor := crHourGlass;
1911    
1912 yoffy 1.51 // 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1913     // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1914     if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
1915     begin
1916     ListView.Columns.Clear;
1917     for i := 0 to Length(COLUMN) - 1 do begin
1918     ListColumn := ListView.Columns.Add;
1919     ListColumn.Caption := COLUMN[i];
1920     ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
1921     ListColumn.Alignment := COLUMN_ALIGNMENT[i];
1922     end;
1923     end;
1924 hi_ 1.1
1925     ListView.Items.Count := 0;
1926     ListView.Items.Clear;
1927    
1928     case GikoForm.ViewType of
1929     gvtAll: ListView.Items.Count := Board.Count;
1930     gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
1931     gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
1932     gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
1933     end;
1934    
1935     ListNameLabel.Caption := Board.Title;
1936     FolderImage.Picture := nil;
1937     ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
1938    
1939 yoffy 1.2 FSortIndex := 0;
1940     FSortOrder := False;
1941     ListViewColumnClick(nil, ListView.Column[0]);
1942 hi_ 1.1
1943     Result := Board.Count;
1944     finally
1945     Screen.Cursor := crDefault;
1946     ListView.Items.EndUpdate;
1947     end;
1948     end;
1949    
1950     procedure TGikoForm.TreeViewChange(Sender: TObject; Node: TTreeNode);
1951     var
1952     i: Integer;
1953     begin
1954     if FTreeType = gttHistory then begin
1955     // SetContent(TThreadItem(Node.Data));
1956     InsertBrowserTab(TThreadItem(Node.Data));
1957     Exit;
1958     end;
1959    
1960     ListView.Selected := nil;
1961     ListView.Items.Count := 0;
1962     ListView.Items.Clear;
1963     // ListView.Columns.Clear;
1964    
1965     Caption := CAPTION_NAME;
1966     //Application.Title := CAPTION_NAME;
1967    
1968    
1969     if GetActiveList is TBBS2ch then begin
1970     for i := 0 to ListView.Columns.Count - 1 do
1971     GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1972     end else if GetActiveList is TCategory then begin
1973     for i := 0 to ListView.Columns.Count - 1 do
1974     GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1975     end else if GetActiveList is TBoard then begin
1976     for i := 0 to ListView.Columns.Count - 1 do
1977     GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1978     end;
1979    
1980     if TObject(Node.Data) is TBBS2ch then begin
1981     SetActiveList(Node.data);
1982     end else if TObject(Node.Data) is TCategory then begin
1983     SetActiveList(Node.data);
1984     end else if TObject(Node.Data) is TBoard then begin
1985     if not TBoard(Node.Data).IsThreadDatRead then begin
1986     Screen.Cursor := crHourGlass;
1987     try
1988     GikoSys.ReadSubjectFile(TBoard(Node.Data));
1989     finally
1990     Screen.Cursor := crDefault;
1991     end;
1992     end;
1993     SetActiveList(Node.data);
1994     end;
1995     end;
1996    
1997     procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
1998     var
1999     // FileName: string;
2000     // DateTime: TDateTime;
2001     BoardCnt: Integer;
2002     BBS: TBBS2ch;
2003     Category: TCategory;
2004     Board: TBoard;
2005     ThreadItem: TThreadItem;
2006     RepStr: string;
2007     begin
2008     if ActiveList is TBBS2ch then begin
2009     BBS := TBBS2ch(ActiveList);
2010    
2011     ListView.StateImages := nil;
2012    
2013     if BBS = nil then Exit;
2014     if BBS.Count <= 0 then Exit;
2015     if Item = nil then Exit;
2016     if Item.Index > BBS.Count then Exit;
2017     if ListView.Items.Count = 0 then Exit;
2018    
2019     if not (BBS.Items[Item.Index] is TCategory) then Exit;
2020     Category := TCategory(BBS.Items[Item.Index]);
2021    
2022     if Category = nil then Exit;
2023    
2024     if ListNumberVisibleAction.Checked then
2025     Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2026     else
2027     Item.Caption := Category.Title;
2028    
2029 yoffy 1.2 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2030 hi_ 1.1 Item.Data := Category;
2031     end else if ActiveList is TCategory then begin
2032     Category := TCategory(ActiveList);
2033    
2034     ListView.StateImages := nil;
2035    
2036     if Category = nil then Exit;
2037     if Category.Count <= 0 then Exit;
2038     if Item = nil then Exit;
2039     if Item.Index >= Category.Count then Exit;
2040     if ListView.Items.Count = 0 then Exit;
2041    
2042     if not (Category.Items[Item.Index] is TBoard) then Exit;
2043     Board := TBoard(Category.Items[Item.Index]);
2044    
2045     if Board = nil then Exit;
2046    
2047     if ListNumberVisibleAction.Checked then
2048     Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2049     else
2050     Item.Caption := Board.Title;
2051    
2052     if Item.SubItems.Count <> 2 then begin
2053     Item.SubItems.Clear;
2054     Item.SubItems.Add('');
2055     Item.SubItems.Add('');
2056     end;
2057    
2058 yoffy 1.2 Item.ImageIndex := ITEM_ICON_BOARD1;
2059 hi_ 1.1
2060     if Board.Round then
2061 yoffy 1.51 Item.SubItems[0] := Board.RoundName // '鐃?鐃緒申'
2062 hi_ 1.1 else
2063     Item.SubItems[0] := '';
2064    
2065     if Board.RoundDate = ZERO_DATE then begin
2066     Item.SubItems[1] := '';
2067     end else
2068     Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2069     Item.Data := Board;
2070     end else if ActiveList is TBoard then begin
2071     Board := TBoard(ActiveList);
2072    
2073     if GikoSys.Setting.ListIconVisible then
2074     ListView.StateImages := StateIconImageList
2075     else
2076     ListView.StateImages := nil;
2077    
2078     case GikoForm.ViewType of
2079     gvtAll: BoardCnt := Board.Count;
2080     gvtLog: BoardCnt := Board.GetLogThreadCount;
2081     gvtNew: BoardCnt := Board.GetNewThreadCount;
2082     gvtUser: BoardCnt := Board.GetUserThreadCount;
2083 yoffy 1.2 else
2084     BoardCnt := 0;
2085 hi_ 1.1 end;
2086    
2087     // if Board = nil then Exit;
2088     if BoardCnt <= 0 then Exit;
2089     if Item = nil then Exit;
2090     if Item.Index > BoardCnt then Exit;
2091     if ListView.Items.Count = 0 then Exit;
2092    
2093     // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2094    
2095     ThreadItem := nil;
2096     case GikoForm.ViewType of
2097     gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]);
2098     gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2099     gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2100     gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2101     end;
2102    
2103     if ThreadItem = nil then Exit;
2104    
2105     // if ListNumberVisibleAction.Checked then
2106     // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2107     // else
2108     RepStr := ThreadItem.Title;
2109 yoffy 1.2 //RepStr := StringReplace(RepStr, '&amp;', '&', [rfReplaceAll]);
2110 hi_ 1.1 RepStr := StringReplace(RepStr, '&lt;', '<', [rfReplaceAll]);
2111     RepStr := StringReplace(RepStr, '&gt;', '>', [rfReplaceAll]);
2112     RepStr := StringReplace(RepStr, '&quot;', '"', [rfReplaceAll]);
2113 yoffy 1.2 RepStr := StringReplace(RepStr, '&amp', '&', [rfReplaceAll]);
2114 hi_ 1.1 //RepStr := StringReplace(RepStr, '鐃緒申鐃?', ',', [rfReplaceAll]);
2115    
2116     if Item.SubItems.Count <> 6 then begin
2117     Item.SubItems.Clear;
2118     Item.SubItems.Add('');
2119     Item.SubItems.Add('');
2120     Item.SubItems.Add('');
2121     Item.SubItems.Add('');
2122     Item.SubItems.Add('');
2123     Item.SubItems.Add('');
2124     end;
2125    
2126     if ListNumberVisibleAction.Checked then
2127     Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2128     else
2129     Item.Caption := RepStr;
2130    
2131     case ThreadItem.AgeSage of
2132     gasNone: Item.StateIndex := -1;
2133 yoffy 1.51 gasNew: Item.StateIndex := 0;
2134     gasAge: Item.StateIndex := 1;
2135 hi_ 1.1 gasSage: Item.StateIndex := 2;
2136     end;
2137    
2138     if ThreadItem.IsLogFile then begin
2139 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2140 hi_ 1.1 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2141     Item.SubItems[1] := IntToStr(ThreadItem.Count);
2142     if ThreadItem.NewResCount = 0 then
2143     Item.SubItems[2] := ''
2144     else
2145     Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2146     Item.SubItems[3] := '';
2147     if ThreadItem.Round then
2148     Item.SubItems[4] := ThreadItem.RoundName
2149     else
2150     Item.SubItems[4] := '';
2151     if ThreadItem.RoundDate = ZERO_DATE then begin
2152     Item.SubItems[5] := '';
2153     end else
2154     Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2155     if ThreadItem.NewArrival then
2156 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2157 hi_ 1.1 end else begin
2158 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREAD1;
2159 hi_ 1.1 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2160     Item.SubItems[1] := '';
2161     Item.SubItems[2] := '';
2162     Item.SubItems[3] := '';
2163     Item.SubItems[4] := '';
2164     Item.SubItems[5] := '';
2165     end;
2166     Item.Data := ThreadItem;
2167     end;
2168     end;
2169    
2170     procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2171     const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2172     StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2173     var Index: Integer);
2174     begin
2175     //
2176     end;
2177    
2178     procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2179     EndIndex: Integer);
2180     begin
2181     //
2182     end;
2183    
2184     procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2185     EndIndex: Integer; OldState, NewState: TItemStates);
2186     begin
2187     //
2188     end;
2189    
2190     procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2191     var
2192     p: TPoint;
2193     s: string;
2194     tmp2: string;
2195     URL: string;
2196     ATitle: Boolean;
2197    
2198     wkBBS: string;
2199     wkKey: string;
2200    
2201 h677 1.40 //wkInt: Integer;
2202 hi_ 1.1 wkIntSt: Integer;
2203     wkIntTo: Integer;
2204    
2205     ActiveFileName: string;
2206     e: IHTMLElement;
2207     Ext: string;
2208     PathRec: TPathRec;
2209     begin
2210     try
2211     try
2212     if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin
2213     if LowerCase(OleVariant(IHTMLDocument2(Browser.Document)).charset) <> 'shift_jis' then
2214     OleVariant(IHTMLDocument2(Browser.Document)).charset := 'shift_jis';
2215     end;
2216     except
2217     end;
2218     finally
2219     end;
2220     if PreviewTimer.Enabled then
2221     PreviewTimer.Enabled := False;
2222     Application.CancelHint;
2223     if GetActiveContent <> nil then
2224     ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2225     else
2226     ActiveFileName := '';
2227    
2228     StatusBar.Panels[1].Text := Text;
2229    
2230     if FHint <> nil then begin
2231     FHint.ReleaseHandle;
2232     FHint.ClearAllRes;
2233     end;
2234     if FPreviewBrowser <> nil then
2235     ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2236    
2237     if not GikoSys.Setting.UnActivePopup then
2238     if not GikoForm.Active then
2239     Exit;
2240    
2241     //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2242     //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2243    
2244     s := '';
2245     Ext := AnsiLowerCase(ExtractFileExt(Text));
2246     if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2247     ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2248     if FPreviewBrowser = nil then begin
2249     FPreviewBrowser := TPreviewBrowser.Create(Self);
2250     ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2251     TOleControl(FPreviewBrowser).Parent := nil;
2252     end;
2253 yoffy 1.50 FPreviewBrowser.Navigate('about:blank');//鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2254 hi_ 1.1 FPreviewURL := Text;
2255     PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2256     PreviewTimer.Enabled := True;
2257     end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2258     if Pos('mailto:', Text) = 1 then begin
2259     s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2260     //鐃?鐃?鐃?鐃?鐃?鐃緒申 鐃?鐃?鐃?3鐃緒申466鐃緒申鐃緒申鐃緒申鐃緒申
2261     GetCursorPos(p);
2262     p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2263     p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2264     e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2265     if (Assigned(e)) then begin
2266     tmp2 := GikoSys.ZenToHan(e.Get_outerText);
2267     if (GikoSys.IsNumeric(tmp2)) then begin
2268     //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2269     wkBBS := GetActiveContent.ParentBoard.BBSID;
2270     wkKey := ChangeFileExt(GetActiveContent.FileName, '');
2271     wkIntSt := StrToInt(tmp2);
2272     wkIntTo := StrToInt(tmp2);
2273     //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2274     FHint.PopupType := gptThread;
2275     SetResPopupText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2276     end else begin
2277     FHint.PopupType := gptRaw;
2278     FHint.Caption := s;
2279     end;
2280     end;
2281     end else begin
2282     URL := Text;
2283 yoffy 1.54
2284 yoffy 1.67 if Pos('about:blank..', URL) = 1 then
2285 yoffy 1.66 URL := StringReplace(URL, 'about:blank..', 'http://www.2ch.net', []);
2286 hi_ 1.1
2287     PathRec := Gikosys.Parse2chURL2(URL);
2288    
2289     if PathRec.FDone then begin
2290    
2291     wkIntSt := PathRec.FSt;
2292     wkIntTo := PathRec.FTo;
2293    
2294     if (wkIntSt = 0) and (wkIntTo = 0) then begin
2295     wkIntSt := 1;
2296     wkIntTo := 1;
2297     end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2298     wkIntSt := wkIntTo;
2299     end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2300     wkIntTo := wkIntSt;
2301     end else if wkIntSt > wkIntTo then begin
2302 h677 1.40 //wkInt := wkIntTo;
2303 hi_ 1.1 wkIntTo := wkIntSt;
2304     wkIntSt := wkIntTo;
2305     end;
2306     //if wkIntSt = 0 then
2307     // wkIntSt := 1;
2308     //if wkINtTo = 0 then
2309     // wkIntTo := 1;
2310     //if PathRec.FFirst then
2311     // wkIntSt := 1;
2312     if PathRec.FStBegin then
2313     wkIntSt := 1;
2314     if PathRec.FToEnd then
2315     wkIntTo := 9999;
2316    
2317     ATitle := ActiveFileName <> PathRec.FKey;
2318    
2319     //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2320     FHint.PopupType := gptThread;
2321     SetResPopupText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2322     end;
2323     end;
2324    
2325     //if s <> '' then
2326     // ShowTextPopup(s);
2327     if FHint.PopupType = gptRaw then begin
2328     if FHint.Caption <> '' then
2329     ShowTextPopup;
2330     end else begin
2331 yoffy 1.2 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2332 hi_ 1.1 ShowTextPopup;
2333     end;
2334     end;
2335     end;
2336    
2337     procedure TGikoForm.BrowserTitleChange(Sender: TObject;
2338     const Text: WideString);
2339     var
2340     Title: string;
2341     begin
2342     if (Text = BLANK_HTML) or (Text = GikoSys.GetHtmlTempFileName) then
2343     Title