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.695 - (hide annotations) (download) (as text)
Sat Jul 11 04:34:17 2009 UTC (14 years, 9 months ago) by h677
Branch: MAIN
CVS Tags: v1_61_0_798
Changes since 1.694: +26 -18 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 h677 1.536 OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils,
8 hi_ 1.4 {$IF Defined(DELPRO) }
9 yoffy 1.138 SHDocVw,
10 hi_ 1.4 MSHTML,
11     {$ELSE}
12     SHDocVw_TLB,
13     MSHTML_TLB,
14     {$IFEND}
15 h677 1.183 IdHTTP, ActiveX, ActnList, ImgList,
16 h677 1.536 ToolWin, Buttons, IdComponent, UrlMon, Tabs, IdGlobal, StrUtils,
17     CommCtrl, Dialogs, GikoSystem, Setting, BoardGroup, ThreadControl, ItemDownload,
18     Editor, RoundData, GikoPanel, Favorite, HTMLDocumentEvent,
19 h677 1.636 {HintWindow,} GikoCoolBar, GikoListView, Search, ExternalBoardManager,
20 h677 1.536 ExternalBoardPlugInMain, StdActns, Variants, ExtActns,IdTCPConnection,
21 h677 1.614 IdBaseComponent, IdTCPClient, AppEvnts, BrowserRecord, MoveHistoryItem,
22 h677 1.663 ShellAPI,Preview, HistoryList, ResPopupBrowser, ExtPreviewDatamodule;
23 hi_ 1.1
24 h677 1.567 const
25     NGWORDNAME_PANEL = 3;
26     THREADSIZE_PANEL = 2;
27 h677 1.689 USER_POPUPCLEAR = WM_USER + 2005; ///< wParam : TWebBrowser
28 hi_ 1.1 type
29 h677 1.623
30 yoffy 1.258 TToolBarSettingSenderType = (tssNone, tssMain, tssList, tssBrowser);
31 yoffy 1.280 TMinimizeType = (mtNone, mtMinimizing, mtMinimized);
32 yoffy 1.424 TResizeType = (rtNone, rtResizing);
33 hi_ 1.1
34 h677 1.551 // TBrowserRecord = class;
35 h677 1.299
36 hi_ 1.1 TGikoForm = class(TForm)
37     StatusBar: TStatusBar;
38     MainPanel: TPanel;
39     ClientPanel: TPanel;
40     TreeSplitter: TSplitter;
41     CabinetPanel: TPanel;
42     TreeView: TTreeView;
43     ThreadMainPanel: TPanel;
44     ListSplitter: TSplitter;
45     ViewPanel: TPanel;
46 yoffy 1.51 ListView: TGikoListView;
47 hi_ 1.1 ThreadPanel: TPanel;
48     MessagePanel: TPanel;
49     MessageBar: TPanel;
50     MessageHideButton: TSpeedButton;
51     MessageListView: TListView;
52     MessageSplitter: TSplitter;
53     Panel3: TPanel;
54 h677 1.541 CabinetCloseSpeedButton: TSpeedButton;
55 hi_ 1.1 ToolBar1: TToolBar;
56     CabinetSelectToolButton: TToolButton;
57     HistoryToolBar: TToolBar;
58 h677 1.541 HistoryShowToolButton: TToolButton;
59     HistoryAllClearToolButton: TToolButton;
60 hi_ 1.1 ItemIcon16: TImageList;
61     ItemIcon32: TImageList;
62 yoffy 1.2 HotToobarImageList: TImageList;
63 hi_ 1.1 ItemImageList: TImageList;
64     MainMenu: TMainMenu;
65     FileMenu: TMenuItem;
66 yoffy 1.51 DeleteMenu: TMenuItem;
67     ExitMenu: TMenuItem;
68     KidokuMenu: TMenuItem;
69 hi_ 1.1 MidokuMenu: TMenuItem;
70 yoffy 1.51 AllSelectMenu: TMenuItem;
71 hi_ 1.1 ViewMenu: TMenuItem;
72     StdToolBarMenu: TMenuItem;
73     CabinetMenu: TMenuItem;
74 yoffy 1.51 H1: TMenuItem;
75 hi_ 1.1 N4: TMenuItem;
76 yoffy 1.51 CabinetVisibleMenu: TMenuItem;
77 hi_ 1.1 MessageMenu: TMenuItem;
78     StatusBarMenu: TMenuItem;
79     MMSep03: TMenuItem;
80 yoffy 1.51 LargeIconMenu: TMenuItem;
81 hi_ 1.1 SmallIconMenu: TMenuItem;
82     ListMenu: TMenuItem;
83     DetailMenu: TMenuItem;
84 yoffy 1.51 ToolMenu: TMenuItem;
85 hi_ 1.1 Find1: TMenuItem;
86     RoundMenu: TMenuItem;
87     MMSep04: TMenuItem;
88     OptionMenu: TMenuItem;
89     HelpMenu: TMenuItem;
90     G1: TMenuItem;
91 yoffy 1.51 N1: TMenuItem;
92 hi_ 1.1 AboutMenu: TMenuItem;
93     BrowserPopupMenu: TPopupMenu;
94 yoffy 1.51 ShowThreadMenu: TMenuItem;
95 yoffy 1.2 ShowBoardMenu: TMenuItem;
96 hi_ 1.1 ListIconPopupMenu: TPopupMenu;
97     LargeIconPMenu: TMenuItem;
98     SmallIconPMenu: TMenuItem;
99     ListPMenu: TMenuItem;
100 yoffy 1.51 DetailPMenu: TMenuItem;
101 hi_ 1.1 ClosePopupMenu: TPopupMenu;
102 yoffy 1.51 CloseMenu: TMenuItem;
103 hi_ 1.1 U1: TMenuItem;
104     N3: TMenuItem;
105     B1: TMenuItem;
106     S1: TMenuItem;
107     N2: TMenuItem;
108     A1: TMenuItem;
109     L1: TMenuItem;
110     N5: TMenuItem;
111     S2: TMenuItem;
112     ListPopupMenu: TPopupMenu;
113 yoffy 1.51 ListRoundPMenu: TMenuItem;
114 hi_ 1.1 ListReservPMenu: TMenuItem;
115     LPMSep01: TMenuItem;
116 yoffy 1.51 ItemRoundPMenu: TMenuItem;
117 hi_ 1.1 LPMSep02: TMenuItem;
118 yoffy 1.2 KidokuPMenu: TMenuItem;
119 hi_ 1.1 MidokuPMenu: TMenuItem;
120     AllSelectPMenu: TMenuItem;
121     UrlCopyPMenu: TMenuItem;
122     LPMSep05: TMenuItem;
123     DeletePMenu: TMenuItem;
124     LPMSep06: TMenuItem;
125     ViewPMenu: TMenuItem;
126     LargeIconLPMenu: TMenuItem;
127     SmallIconLPMenu: TMenuItem;
128     ListLPMenu: TMenuItem;
129     DetailLPMenu: TMenuItem;
130     T1: TMenuItem;
131     B2: TMenuItem;
132     N8: TMenuItem;
133 yoffy 1.51 URLC1: TMenuItem;
134     N9: TMenuItem;
135 hi_ 1.1 N10: TMenuItem;
136     G2: TMenuItem;
137     N11: TMenuItem;
138     T3: TMenuItem;
139     L2: TMenuItem;
140     N12: TMenuItem;
141     K1: TMenuItem;
142     N13: TMenuItem;
143     N14: TMenuItem;
144     R1: TMenuItem;
145     A2: TMenuItem;
146     N15: TMenuItem;
147     KokoPopupMenu: TPopupMenu;
148     KokomadePMenu: TMenuItem;
149 yoffy 1.2 AllPMenu: TMenuItem;
150 hi_ 1.1 MenuItem1: TMenuItem;
151     MenuItem2: TMenuItem;
152     BrowserTabPopupMenu: TPopupMenu;
153 yoffy 1.51 Close1: TMenuItem;
154 hi_ 1.1 A3: TMenuItem;
155 yoffy 1.51 N16: TMenuItem;
156 hi_ 1.1 A4: TMenuItem;
157     TreePopupMenu: TPopupMenu;
158     TreeSelectThreadPupupMenu: TMenuItem;
159 yoffy 1.51 TreeSelectBoardPupupMenu: TMenuItem;
160 hi_ 1.1 TPMSep01: TMenuItem;
161     TreeSelectURLPupupMenu: TMenuItem;
162     T2: TMenuItem;
163 yoffy 1.2 L3: TMenuItem;
164 hi_ 1.1 B3: TMenuItem;
165     BrowserBottomPanel: TGikoPanel;
166     CabinetSelectPopupMenu: TPopupMenu;
167     H2: TMenuItem;
168 yoffy 1.51 ItemReservPMenu: TMenuItem;
169     RoundNamePopupMenu: TPopupMenu;
170 yoffy 1.2 N7: TMenuItem;
171 hi_ 1.1 B4: TMenuItem;
172     L4: TMenuItem;
173     K2: TMenuItem;
174 yoffy 1.51 A5: TMenuItem;
175 hi_ 1.1 A6: TMenuItem;
176 yoffy 1.51 C1: TMenuItem;
177     V1: TMenuItem;
178     N19: TMenuItem;
179 hi_ 1.1 D1: TMenuItem;
180 yoffy 1.51 D2: TMenuItem;
181     MessageImageList: TImageList;
182     ProgressBar: TProgressBar;
183     URL1: TMenuItem;
184 hi_ 1.1 NameUrlCopyPMenu: TMenuItem;
185     URLC2: TMenuItem;
186 yoffy 1.51 URLN1: TMenuItem;
187     N21: TMenuItem;
188     URLC3: TMenuItem;
189 yoffy 1.2 URLN2: TMenuItem;
190 yoffy 1.51 N23: TMenuItem;
191 yoffy 1.2 ListCoolBar: TGikoCoolBar;
192 hi_ 1.1 ListToolBar: TToolBar;
193 yoffy 1.2 BrowserCoolBar: TGikoCoolBar;
194 hi_ 1.1 BrowserToolBar: TToolBar;
195     ListNameToolBar: TToolBar;
196 yoffy 1.51 ListNameLabel: TLabel;
197 hi_ 1.1 FolderImage: TImage;
198     BrowserNameToolBar: TToolBar;
199     ItemBoardImage: TImage;
200     BrowserBoardNameLabel: TLabel;
201 yoffy 1.51 ItemImage: TImage;
202     BrowserNameLabel: TLabel;
203     D3: TMenuItem;
204     N25: TMenuItem;
205 hi_ 1.1 N26: TMenuItem;
206     D4: TMenuItem;
207     S3: TMenuItem;
208 yoffy 1.51 R2: TMenuItem;
209     TreeSelectNameURLPupupMenu: TMenuItem;
210     N27: TMenuItem;
211 hi_ 1.1 H3: TMenuItem;
212 yoffy 1.51 I1: TMenuItem;
213     BrowserTabToolBar: TToolBar;
214     BrowserTab: TTabControl;
215     About1: TMenuItem;
216     N28: TMenuItem;
217     S4: TMenuItem;
218 yoffy 1.2 N29: TMenuItem;
219     N30: TMenuItem;
220     N31: TMenuItem;
221 hi_ 1.1 L5: TMenuItem;
222 yoffy 1.51 L6: TMenuItem;
223 hi_ 1.1 A7: TMenuItem;
224 yoffy 1.51 R3: TMenuItem;
225 hi_ 1.1 FavoriteMenu: TMenuItem;
226 yoffy 1.51 N32: TMenuItem;
227 hi_ 1.1 BoardFavoriteAddMenu: TMenuItem;
228     ThreadFavoriteAddMenu: TMenuItem;
229 yoffy 1.2 N33: TMenuItem;
230 hi_ 1.1 TreeSelectFavoriteAddPupupMenu: TMenuItem;
231     FavoriteTreeView: TTreeView;
232 yoffy 1.51 StateIconImageList: TImageList;
233     TopPanel: TPanel;
234     TopRightPanel: TPanel;
235     AnimePanel: TPanel;
236 hi_ 1.1 Animate: TAnimate;
237     TopCoolPanel: TPanel;
238 yoffy 1.51 MainCoolBar: TGikoCoolBar;
239     MenuToolBar: TToolBar;
240     StdToolBar: TToolBar;
241     AddressToolBar: TToolBar;
242     AddressComboBox: TComboBox;
243     MoveToToolButton: TToolButton;
244     AddressImageList: TImageList;
245     AddressToolBarMenu: TMenuItem;
246     T4: TMenuItem;
247     Show1: TMenuItem;
248     N34: TMenuItem;
249 hi_ 1.1 T5: TMenuItem;
250     B5: TMenuItem;
251 yoffy 1.51 N35: TMenuItem;
252     A8: TMenuItem;
253     U2: TMenuItem;
254 hi_ 1.1 F1: TMenuItem;
255     PreviewTimer: TTimer;
256 yoffy 1.51 MonazillaWebPageAction1: TMenuItem;
257     N36: TMenuItem;
258     H4: TMenuItem;
259     K3: TMenuItem;
260     L7: TMenuItem;
261     N37: TMenuItem;
262     A9: TMenuItem;
263 yoffy 1.2 ChevronPopupMenu: TPopupMenu;
264     N2N1: TMenuItem;
265 hi_ 1.1 N38: TMenuItem;
266 yoffy 1.2 F2: TMenuItem;
267 yoffy 1.51 LinkToolBar: TToolBar;
268     a10: TMenuItem;
269     N39: TMenuItem;
270     T6: TMenuItem;
271     N40: TMenuItem;
272 yoffy 1.2 LinkBarPopupMenu: TPopupMenu;
273 yoffy 1.51 T7: TMenuItem;
274     ThreadPopupMenu: TPopupMenu;
275     MenuItem4: TMenuItem;
276     MenuItem5: TMenuItem;
277     MenuItem6: TMenuItem;
278 yoffy 1.2 T8: TMenuItem;
279 yoffy 1.51 URLN3: TMenuItem;
280 yoffy 1.2 SelectItemNameCopyAction1: TMenuItem;
281 yoffy 1.51 B6: TMenuItem;
282     T9: TMenuItem;
283 h677 1.629 NameCopyPMenu: TMenuItem;
284 yoffy 1.51 SelectComboBox: TComboBox;
285     MainCoolBarPopupMenu: TPopupMenu;
286     StdToolBarVisiblePMenu: TMenuItem;
287     AddressToolBarVisiblePMenu: TMenuItem;
288     LinkToolBarVisiblePMenu: TMenuItem;
289     NG1: TMenuItem;
290     NG2: TMenuItem;
291     N43: TMenuItem;
292     N44: TMenuItem;
293     L9: TMenuItem;
294     I3: TMenuItem;
295     N45: TMenuItem;
296     B9: TMenuItem;
297     R5: TMenuItem;
298     T12: TMenuItem;
299     Show3: TMenuItem;
300     N46: TMenuItem;
301     T13: TMenuItem;
302     B10: TMenuItem;
303     N47: TMenuItem;
304     A12: TMenuItem;
305     U4: TMenuItem;
306     F4: TMenuItem;
307     N48: TMenuItem;
308     T14: TMenuItem;
309     N50: TMenuItem;
310     A11: TMenuItem;
311     S5: TMenuItem;
312     Reload: TMenuItem;
313     GoBack: TMenuItem;
314     GoFoward: TMenuItem;
315     IndividualAbon1: TMenuItem;
316     N41: TMenuItem;
317     IndividualAbon2: TMenuItem;
318 h677 1.543 AntiIndivAbonMenuItem: TMenuItem;
319 yoffy 1.51 AntiIndividualAbon: TMenuItem;
320     N49: TMenuItem;
321     N51: TMenuItem;
322     N52: TMenuItem;
323     SearchBoardName: TMenuItem;
324 yoffy 1.205 TreeSelectLogDeleteSeparator: TMenuItem;
325 yoffy 1.100 N54: TMenuItem;
326     A13: TMenuItem;
327     FavoriteTreePopupMenu: TPopupMenu;
328     FavoriteTreeRenamePopupMenu: TMenuItem;
329     FavoriteTreeNewFolderPopupMenu: TMenuItem;
330     N56: TMenuItem;
331     FavoriteTreeDeletePopupMenu: TMenuItem;
332     FavoriteToolBar: TToolBar;
333 h677 1.541 FavoriteAddToolButton: TToolButton;
334     FavoriteArrangeToolButton: TToolButton;
335 yoffy 1.100 FavoriteTreeBrowseFolderPopupMenu: TMenuItem;
336     N57: TMenuItem;
337     FavoriteTreeReloadPopupMenu: TMenuItem;
338     N58: TMenuItem;
339     FavoriteTreeURLCopyPopupMenu: TMenuItem;
340     FavoriteTreeNameCopyPopupMenu: TMenuItem;
341     FavoriteTreeLogDeletePopupMenu: TMenuItem;
342     N59: TMenuItem;
343     FavoriteTreeNameURLCopyPopupMenu: TMenuItem;
344     N60: TMenuItem;
345 yoffy 1.107 ExportFavoriteFileAction1: TMenuItem;
346 yoffy 1.142 N6: TMenuItem;
347     N17: TMenuItem;
348 h677 1.174 N18: TMenuItem;
349     N20: TMenuItem;
350 h677 1.532 N24: TMenuItem;
351 h677 1.174 N62: TMenuItem;
352 h677 1.514 N61: TMenuItem;
353 h677 1.478 N63: TMenuItem;
354 h677 1.183 N64: TMenuItem;
355 h677 1.187 dummy1: TMenuItem;
356 h677 1.570 TreeSelectLogDeletePopupMenu: TMenuItem;
357 h677 1.485 N65: TMenuItem;
358 yoffy 1.209 BBSSelectPopupMenu: TPopupMenu;
359 yoffy 1.218 PlugInMenu: TMenuItem;
360 h677 1.542 TreeSelectNamePupupMenu: TMenuItem;
361 h677 1.299 BrowserPanel: TPanel;
362 h677 1.514 SelectTimer: TTimer;
363 h677 1.340 SelectThreadSave: TMenuItem;
364 h677 1.342 N55: TMenuItem;
365 h677 1.343 N66: TMenuItem;
366     dat1: TMenuItem;
367 yoffy 1.397 OpenLogFolder: TMenuItem;
368 h677 1.346 Browser: TWebBrowser;
369 genyakun 1.353 TabSave: TMenuItem;
370 h677 1.407 TabOpen: TMenuItem;
371 yoffy 1.375 ResRangePopupMenu: TPopupMenu;
372 h677 1.547 ResRangeHundPMenuItem: TMenuItem;
373     ResRangeKokoPMenuItem: TMenuItem;
374     ResRangeNewPMenuItem: TMenuItem;
375     ResRangeAllPMenuItem: TMenuItem;
376 h677 1.570 BrowsBoradHeadAction1: TMenuItem;
377 yoffy 1.390 ThreadRangePopupMenu: TPopupMenu;
378     A15: TMenuItem;
379     L8: TMenuItem;
380 h677 1.542 N67: TMenuItem;
381 yoffy 1.390 N68: TMenuItem;
382     S6: TMenuItem;
383     N69: TMenuItem;
384 h677 1.547 ResRangeSelectPMenuItem: TMenuItem;
385 yoffy 1.415 ListColumnPopupMenu: TPopupMenu;
386 h677 1.485 N70: TMenuItem;
387     ID1: TMenuItem;
388     ID2: TMenuItem;
389     N53: TMenuItem;
390     ID3: TMenuItem;
391     N71: TMenuItem;
392 h677 1.487 N72: TMenuItem;
393     N73: TMenuItem;
394 h677 1.517 SelectComboBoxPanel: TPanel;
395     SelectComboBoxSplitter: TImage;
396     N74: TMenuItem;
397 genyakun 1.527 WikiFAQ: TMenuItem;
398 h677 1.542 GikoApplicationEvents: TApplicationEvents;
399 h677 1.583 N22: TMenuItem;
400     N42: TMenuItem;
401 h677 1.592 DAT2: TMenuItem;
402     N75: TMenuItem;
403     DAT3: TMenuItem;
404     N76: TMenuItem;
405 h677 1.600 FavoriteTreeItemNameCopyPopupMenu: TMenuItem;
406 h677 1.615 N77: TMenuItem;
407     N78: TMenuItem;
408 h677 1.618 SaveThreadFile: TMenuItem;
409     N79: TMenuItem;
410     HTML1: TMenuItem;
411     DAT4: TMenuItem;
412 h677 1.625 N80: TMenuItem;
413 h677 1.635 SameBoardThreadItem: TMenuItem;
414     N81: TMenuItem;
415 h677 1.641 N82: TMenuItem;
416     IDNG1: TMenuItem;
417     IDNG2: TMenuItem;
418 h677 1.643 ResPopupClearTimer: TTimer;
419 h677 1.670 TaskTrayPopupMenu: TPopupMenu;
420     Exit1: TMenuItem;
421 h677 1.676 N83: TMenuItem;
422 h677 1.679 UpdateGikonaviAction1: TMenuItem;
423     N84: TMenuItem;
424 h677 1.691 N85: TMenuItem;
425     URL2: TMenuItem;
426     URLPATHINFO1: TMenuItem;
427     URLQUERYSTRING1: TMenuItem;
428 yoffy 1.251 procedure FormCreate(Sender: TObject);
429 hi_ 1.1 procedure FormDestroy(Sender: TObject);
430 eggcake 1.682 procedure SaveSettingAll();
431 hi_ 1.1 procedure BrowserStatusTextChange(Sender: TObject;
432     const Text: WideString);
433     procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
434     procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
435     var AllowChange: Boolean);
436     procedure ListViewKeyDown(Sender: TObject; var Key: Word;
437     Shift: TShiftState);
438     procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
439     procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
440     Button: TToolButton; State: TCustomDrawState;
441     var DefaultDraw: Boolean);
442     procedure BrowserBeforeNavigate2(Sender: TObject;
443     const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
444     Headers: OleVariant; var Cancel: WordBool);
445     procedure TreeViewCustomDraw(Sender: TCustomTreeView;
446     const ARect: TRect; var DefaultDraw: Boolean);
447     procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
448     Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
449     procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
450     procedure ListViewCustomDraw(Sender: TCustomListView;
451     const ARect: TRect; var DefaultDraw: Boolean);
452     procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
453     Shift: TShiftState; X, Y: Integer);
454     procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
455     procedure MessageListViewResize(Sender: TObject);
456 yoffy 1.138 procedure CabinetVisible( isVisible : Boolean );
457 hi_ 1.1 procedure FormResize(Sender: TObject);
458     procedure ListPopupMenuPopup(Sender: TObject);
459     procedure TreePopupMenuPopup(Sender: TObject);
460     procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
461     var Cancel: WordBool);
462     procedure ListSplitterMoved(Sender: TObject);
463     procedure BrowserTabChange(Sender: TObject);
464     procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
465     Shift: TShiftState; X, Y: Integer);
466     procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
467     State: TDragState; var Accept: Boolean);
468     procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
469     procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
470     Y: Integer);
471     procedure BrowserDocumentComplete(Sender: TObject;
472     const pDisp: IDispatch; var URL: OleVariant);
473     procedure RoundNamePopupMenuPopup(Sender: TObject);
474     procedure FormShow(Sender: TObject);
475     procedure BrowserTabToolBarResize(Sender: TObject);
476     procedure FavoriteMenuClick(Sender: TObject);
477 yoffy 1.2 procedure MainCoolBarResize(Sender: TObject);
478     procedure AddressToolBarResize(Sender: TObject);
479 hi_ 1.1 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
480     Shift: TShiftState);
481 yoffy 1.2 procedure BrowserEnter(Sender: TObject);
482 hi_ 1.1 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
483     procedure PreviewTimerTimer(Sender: TObject);
484     procedure MessageHideButtonClick(Sender: TObject);
485 h677 1.541 procedure HistoryAllClearToolButtonClick(Sender: TObject);
486 yoffy 1.2 procedure MainCoolBarBandInfo(Sender: TObject;
487     var BandInfo: PReBarBandInfoA);
488     procedure MainCoolBarChevronClick(Sender: TObject;
489 yoffy 1.51 RebarChevron: PNMRebarChevron);
490     procedure ListCoolBarBandInfo(Sender: TObject;
491     var BandInfo: PReBarBandInfoA);
492     procedure ListCoolBarChevronClick(Sender: TObject;
493     RebarChevron: PNMRebarChevron);
494     procedure BrowserCoolBarBandInfo(Sender: TObject;
495     var BandInfo: PReBarBandInfoA);
496 yoffy 1.2 procedure BrowserCoolBarChevronClick(Sender: TObject;
497 yoffy 1.51 RebarChevron: PNMRebarChevron);
498     procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
499     procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
500     WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
501     procedure SelectComboBoxChange(Sender: TObject);
502     procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
503     Shift: TShiftState);
504     procedure SelectComboBoxExit(Sender: TObject);
505     procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
506     Shift: TShiftState; X, Y: Integer);
507     procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
508     Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
509     procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
510     Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
511     procedure StatusBarResize(Sender: TObject);
512     procedure SelectComboBoxEnter(Sender: TObject);
513 yoffy 1.100 procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
514     Y: Integer);
515 yoffy 1.71 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
516 yoffy 1.100 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
517     var S: String);
518     procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
519     Shift: TShiftState);
520     procedure FavoriteTreePopupMenuPopup(Sender: TObject);
521     procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
522     procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
523     Shift: TShiftState; X, Y: Integer);
524     procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
525     State: TDragState; var Accept: Boolean);
526     procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
527     Y: Integer);
528 yoffy 1.142 procedure FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
529 h677 1.174 procedure BrowserTabContextPopup(Sender: TObject; MousePos: TPoint;
530     var Handled: Boolean);
531 h677 1.187 procedure BrowserTabPopupMenuPopup(Sender: TObject);
532 yoffy 1.216 procedure BrowserTabResize(Sender: TObject);
533 yoffy 1.236 procedure TreeViewKeyDown(Sender: TObject; var Key: Word;
534     Shift: TShiftState);
535 yoffy 1.246 procedure FavoriteTreeViewMouseDown(Sender: TObject;
536 yoffy 1.248 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
537 yoffy 1.250 procedure MessagePanelResize(Sender: TObject);
538 yoffy 1.276 procedure OnResized;
539 h677 1.539 procedure SelectTimerTimer(Sender: TObject);
540 yoffy 1.425 procedure ListViewColumnRightClick(Sender: TObject;
541 yoffy 1.415 Column: TListColumn; Point: TPoint);
542 h677 1.478 procedure ListViewCustomDrawItem(Sender: TCustomListView;
543 h677 1.463 Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
544     procedure FormActivate(Sender: TObject);
545 h677 1.472 procedure BrowserPanelResize(Sender: TObject);
546 h677 1.482 procedure MenuToolBarResize(Sender: TObject);
547     procedure ListToolBarResize(Sender: TObject);
548     procedure BrowserToolBarResize(Sender: TObject);
549 h677 1.539 procedure KokoPopupMenuPopup(Sender: TObject);
550 h677 1.517 procedure ListViewKeyUp(Sender: TObject; var Key: Word;
551     Shift: TShiftState);
552     procedure FavoriteTreeViewEditing(Sender: TObject; Node: TTreeNode;
553     var AllowEdit: Boolean);
554 h677 1.570 procedure CabinetCloseSpeedButtonClick(Sender: TObject);
555 h677 1.541 procedure FavoriteArrangeToolButtonClick(Sender: TObject);
556 h677 1.542 procedure GikoApplicationEventsMessage(var Msg: tagMSG;
557     var Handled: Boolean);
558     procedure GikoApplicationEventsDeactivate(Sender: TObject);
559     procedure GikoApplicationEventsException(Sender: TObject; E: Exception);
560 h677 1.574 procedure TreeViewMouseDown(Sender: TObject; Button: TMouseButton;
561 h677 1.548 Shift: TShiftState; X, Y: Integer);
562 h677 1.585 procedure GetResURLMenuClick(Sender: TObject);
563 h677 1.612 procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
564     var Handled: Boolean);
565 h677 1.643 procedure ResPopupClearTimerTimer(Sender: TObject);
566 hi_ 1.1 private
567     { Private 鐃緒申鐃緒申 }
568     FEnabledCloseButton: Boolean;
569     FClickNode: TTreeNode;
570     FHttpState: Boolean;
571 h677 1.619 FPreviewBrowser: TPreviewBrowser;
572 hi_ 1.1 FPreviewURL: string;
573     FBrowserSizeHeight: Integer;
574     FBrowserSizeWidth: Integer;
575     FTabHintIndex: Integer;
576     FListStyle: TViewStyle; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
577     FItemNoVisible: Boolean; //鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?
578     FViewType: TGikoViewType; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?
579 h677 1.517 FActiveList: TObject;
580 h677 1.299 FActiveContent: TBrowserRecord; //
581 yoffy 1.133 FActiveBBS : TBBS;
582 h677 1.623 FHistoryList: THistoryList; //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
583 hi_ 1.1 FTreeType: TGikoTreeType;
584     FWorkCount: Integer;
585     FNameCookie: string;
586     FMailCookie: string;
587     FDownloadTitle: string; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
588     FDownloadMax: Integer; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?
589     FEvent: THTMLDocumentEventSink;//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?
590 yoffy 1.51 IsDraggingSelectComboBox : Boolean;
591     DraggingSelectComboBoxPosition : TPoint;
592 yoffy 1.54 FSearchDialog: TSearchDialog;
593 yoffy 1.100 FDropSpaceNode: TTreeNode;
594 yoffy 1.424 FDragTime : Cardinal; ///< 鐃緒申鐃緒申鐃?鐃緒申D&D鐃?
595     FDragButton : TToolButton; ///< 鐃緒申鐃緒申鐃?鐃緒申D&D鐃?鐃緒申Drag鐃緒申鐃緒申鐃緒申Button鐃緒申鐃緒申
596     FDragWFirst : Boolean; ///< WebTab鐃緒申D&D鐃?
597     FListViewBackGroundColor : TColor; ///< ListView鐃緒申BackGroundColor
598     FUseOddResOddColor : Boolean; ///< 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申
599     FOddColor : TColor; ///< 鐃緒申鐃緒申鐃?
600     FSelectResWord : string; ///< 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?
601     FIsIgnoreResize : TResizeType; ///< 鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
602     FIsMinimize : TMinimizeType; ///< 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
603     FOldFormWidth : Integer; ///< 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
604     FToolBarSettingSender : TToolBarSettingSenderType; ///< 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?
605     FMouseDownPos : TPoint; ///< 鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
606 h677 1.303 FBrowsers: TList;
607 yoffy 1.424 FResRangeMenuSelect : Longint; ///< ResRangeButton 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 (鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申 ResRange 鐃緒申鐃緒申)
608 h677 1.423 FStartUp : Boolean;
609 yoffy 1.427 FIsHandledWheel : Boolean; ///< 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 WM_MOUSEWHEEL 鐃緒申鐃緒申鐃緒申鐃緒申
610 h677 1.517 DiffComp: Boolean; //Add by Genyakun 鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申True鐃緒申鐃緒申鐃緒申
611 h677 1.548 FOrigenCaption: String; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
612 h677 1.581 FPreviewBrowserRect: TRect; ///< 鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
613     FActionListGroupIndexes: array of Integer; ///<GikoDM鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申GroupIndex鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
614 h677 1.636 FResPopupBrowser: TResPopupBrowser;
615 h677 1.683 FUpdateExePath: string; ///鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?
616     FUpdateExeArgs: string; ///鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
617 h677 1.690 FKokoPopupThreadItem: TThreadItem;
618 hi_ 1.1 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
619     procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
620 q9_ 1.233 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
621 hi_ 1.1 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
622     procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
623     procedure ListClick;
624 h677 1.295 procedure ListDoubleClick(Shift: TShiftState);
625 hi_ 1.1 function Hook(var Message: TMessage): Boolean;
626     procedure AddRoundNameMenu(MenuItem: TMenuItem);
627     procedure SetMenuFont;
628     procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
629 yoffy 1.62 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
630     procedure FavoriteClick(Sender: TObject); overload;
631 yoffy 1.100 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
632 hi_ 1.1 function OnDocumentContextMenu(Sender: TObject): WordBool;
633     function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
634 yoffy 1.2 procedure MenuBarChevronMenu;
635     procedure LinkBarChevronMenu;
636     procedure ToolBarChevronMenu(ToolBar: TToolBar);
637 yoffy 1.100 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
638     procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
639     procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
640     procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
641 yoffy 1.85 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
642 yoffy 1.72 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
643 yoffy 1.100 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
644     procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
645 yoffy 1.72 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
646 yoffy 1.236 //
647 yoffy 1.143 procedure SetListViewBackGroundColor(value: TColor);
648 yoffy 1.123 procedure BBSMenuItemOnClick( Sender : TObject );
649 yoffy 1.424 /// CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
650 yoffy 1.216 procedure SaveCoolBarSettings;
651 h677 1.471 procedure SaveMainCoolBarSettings;
652     procedure SaveBoardCoolBarSettings;
653     procedure SaveBrowserCoolBarSettings;
654 yoffy 1.424 /// CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
655 yoffy 1.216 procedure LoadCoolBarSettings;
656 yoffy 1.424 /// 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
657 yoffy 1.276 procedure OnMinimize;
658 yoffy 1.424 /// 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
659 yoffy 1.248 procedure OnMinimized;
660 yoffy 1.424 /// TreeView 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
661 yoffy 1.236 procedure TreeClick( Node : TTreeNode );
662 yoffy 1.424 /// TreeView 鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
663 yoffy 1.236 procedure TreeDoubleClick( Node : TTreeNode );
664 yoffy 1.424 /// 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃? BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
665 yoffy 1.289 procedure SetBBSMenu;
666 yoffy 1.415 /// ListColumnPopupMenu 鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?
667     procedure ListColumnPopupMenuOnClick( Sender : TObject );
668 yoffy 1.480 //! 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
669     procedure SetSelectWord( const text : string );
670 h677 1.535 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
671     function GetScreenCursor(): TCursor;
672     //鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
673     procedure SetScreenCursor(Cursor : TCursor);
674 h677 1.550 //! 鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
675     procedure CreateControlThread();
676     //! 鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
677     procedure CreateBrowsers(count: Integer);
678 h677 1.581 //! ActionList鐃緒申GroupIndex鐃緒申鐃緒申鐃緒申
679     procedure GetGroupIndex(ActionList: TActionList);
680     //! ActionList鐃緒申GroupIndex鐃緒申鐃緒申鐃緒申
681     procedure SetGroupIndex(ActionList: TActionList);
682 h677 1.585 //! 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申(鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 or 鐃?鐃緒申JUMP鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申DL鐃緒申鐃緒申)
683     procedure OpenThreadItem(Thread: TThreadItem; URL: String);
684 h677 1.596 //! ListView鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
685     procedure RefreshListView(Thread: TThreadItem);
686 h677 1.598 //! 鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
687     procedure ClearThreadRengeAction;
688 h677 1.614 //! 鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申
689     procedure UnStoredTaskTray;
690 h677 1.617 //! 鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申
691     procedure ShowEditors(nCmdShow: Integer);
692 h677 1.632 //! 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申Browser鐃緒申鐃?鐃緒申
693     procedure ReleaseOldestBrowser;
694 h677 1.635 //! 鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
695 h677 1.695 procedure AddMenuSameBoardThread(MenuItem: TMenuItem);
696 h677 1.635 //! 鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?
697     procedure SameBoardThreadSubItemOnClick(Sender: TObject);
698 h677 1.636 //! 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
699     procedure CreateResPopupBrowser;
700 h677 1.639 //! 鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?
701     function isValidFile(FileName: String) : boolean;
702 h677 1.654 //! ListView鐃緒申D&D鐃緒申鐃緒申鐃緒申鐃緒申
703     procedure AcceptDropFiles(var Msg: TMsg);
704 h677 1.678 //! 鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
705     procedure UpdateListView();
706 h677 1.680 //! 鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
707     procedure LoadIcon();
708 h677 1.694 //! 鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
709     procedure LoadPopupMenu();
710 hi_ 1.1 protected
711     procedure CreateParams(var Params: TCreateParams); override;
712 yoffy 1.2 procedure WndProc(var Message: TMessage); override;
713 hi_ 1.1 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
714     procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
715     procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
716     public
717     { Public 鐃緒申鐃緒申 }
718 h677 1.533 LastRoundTime: TDateTime;
719     BrowserNullTab: TBrowserRecord;
720 hi_ 1.1 FControlThread: TThreadControl;
721 h677 1.614 FIconData : TNotifyIconData;
722 h677 1.692 procedure MoveToURL(const inURL: string; KeyMask: Boolean = False);
723 h677 1.530 function InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True) : TBrowserRecord;
724 hi_ 1.1 procedure ReloadBBS;
725     function GetHttpState: Boolean;
726     procedure SetEnabledCloseButton(Enabled: Boolean);
727     function GetTreeNode(Data: TObject): TTreeNode;
728     procedure ListViewAllSelect;
729     property ListStyle: TViewStyle read FListStyle write FListStyle;
730     property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
731     property ViewType: TGikoViewType read FViewType write FViewType;
732     property NameCookie: string read FNameCookie write FNameCookie;
733     property MailCookie: string read FMailCookie write FMailCookie;
734 h677 1.532 property ClickNode: TTreeNode read FClickNode write FClickNode;
735 h677 1.538 property TreeType: TGikoTreeType read FTreeType write FTreeType;
736 h677 1.534 property ActiveContent: TBrowserRecord read FActiveContent write FActiveContent;
737 h677 1.533 property ResRangeMenuSelect: Longint read FResRangeMenuSelect write FResRangeMenuSelect;
738 h677 1.534 property SelectResWord : string read FSelectResWord write FSelectResWord;
739     property BrowserSizeWidth: Integer read FBrowserSizeWidth write FBrowserSizeWidth;
740     property BrowserSizeHeight: Integer read FBrowserSizeHeight write FBrowserSizeHeight;
741     property SearchDialog: TSearchDialog read FSearchDialog write FSearchDialog;
742     property ToolBarSettingSender : TToolBarSettingSenderType
743     read FToolBarSettingSender write FToolBarSettingSender;
744 h677 1.535 property ScreenCursor : TCursor read GetScreenCursor write SetScreenCursor;
745 h677 1.538 property ActiveBBS : TBBS read FActiveBBS write FActiveBBS;
746     property WorkCount: Integer read FWorkCount write FWorkCount;
747 h677 1.683 property UpdateExePath: string read FUpdateExePath write FUpdateExePath;
748     property UpdateExeArgs: string read FUpdateExeArgs write FUpdateExeArgs;
749    
750 h677 1.299 procedure SetContent(inThread: TBrowserRecord);
751 h677 1.636 function GetActiveContent(popup :Boolean = false): TThreadItem;
752 hi_ 1.1 function GetActiveList: TObject;
753 h677 1.533
754 hi_ 1.1 procedure SetListViewType(AViewType: TGikoViewType); overload;
755     procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
756     procedure PlaySound(SoundEventName: string);
757 yoffy 1.123 procedure ShowBBSTree( inBBS : TBBS );
758 yoffy 1.248 procedure ShowBBSTreeOld( inBBS : TBBS );
759 hi_ 1.1 procedure ShowHistoryTree;
760     procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
761     procedure SetBrowserTabState;
762 yoffy 1.2 procedure SetToolBarPopup;
763 yoffy 1.100 procedure ShowFavoriteAddDialog( Item : TObject );
764 h677 1.433 procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
765     procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
766 yoffy 1.143 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
767     property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
768     property OddColor : TColor read FOddColor write FOddColor;
769 h677 1.690 //! 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
770     property KokoPopupThreadItem : TThreadItem read FKokoPopupThreadItem;
771    
772 yoffy 1.209 function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
773 yoffy 1.218 procedure OnPlugInMenuItem( Sender : TObject );
774 h677 1.433 procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
775     /// ListView 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申 KuroutSetting鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
776     procedure ActiveListColumnSave;
777     procedure SetActiveList(Obj: TObject);
778     property ActiveList: TObject read GetActiveList write SetActiveList;
779 h677 1.482 /// CoolBar 鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
780     procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
781 h677 1.485 //鐃緒申鐃緒申ID鐃緒申鐃緒申鐃緒申鐃?鐃緒申
782     procedure IndividualAbonID(Atype : Integer);
783     //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申
784     procedure IndividualAbon(Atag, Atype : Integer);
785 h677 1.641 //鐃緒申鐃緒申ID鐃緒申NG鐃緒申鐃?鐃?鐃緒申鐃?鐃?
786     procedure AddIDtoNGWord(invisible : boolean);
787 h677 1.532 //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申 true:鐃?鐃緒申鐃緒申鐃?鐃? false:鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
788     procedure RepaintAllTabsBrowser();
789     //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
790     procedure SetLinkBar;
791     procedure FavoriteBrowseFolder( node: TTreeNode );
792     //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?
793     procedure DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
794     //鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?
795     procedure DownloadList(Board: TBoard; ForceDownload: Boolean = False);
796     //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
797     procedure DeleteHistory( threadItem: TThreadItem );
798 h677 1.606 //鐃?鐃?鐃緒申鐃緒申鐃緒申 鐃?鐃緒申鐃?鐃?鐃?鐃緒申
799 h677 1.532 procedure DeleteTab(ThreadItem: TThreadItem); overload;
800 h677 1.606 //鐃?鐃?鐃緒申鐃緒申鐃緒申 鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
801 h677 1.533 procedure DeleteTab(BrowserRecord: TBrowserRecord); overload;
802 h677 1.606 // 鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?
803     procedure DeleteTab(index, selectIndex: Integer); overload;
804 h677 1.533 //鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
805 h677 1.634 procedure BrowserMovement(const AName: string); overload;
806     //鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
807     procedure BrowserMovement(scroll: Integer); overload;
808 h677 1.533 //Application鐃緒申MainForm鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
809 h677 1.534 function GetMainForm(): TComponent;
810 h677 1.533 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
811 h677 1.534 //! 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?
812     procedure OnGestureStart(Sender: TObject);
813     //! 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申
814     procedure OnGestureMove(Sender: TObject);
815     //! 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
816     procedure OnGestureEnd(Sender: TObject);
817     /// 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
818     procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
819 h677 1.535 //ListView鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
820     procedure SelectListItem(List: TList);
821 h677 1.536 //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
822     procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
823 h677 1.537 //
824     procedure ModifySelectList;
825     //
826     procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload;
827     //
828     procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
829 h677 1.538 //
830 h677 1.537 procedure SetSelectRoundName(Sender: TObject);
831 h677 1.538 //
832     function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
833     //
834     function WebBrowserClick(Sender: TObject): WordBool;
835 h677 1.550 //! 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
836     procedure SetSelectComboBox();
837 h677 1.585
838 h677 1.614 //! 鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
839     procedure TaskTrayIconMessage(var Msg : TMsg); message WM_USER + 2010;
840 h677 1.615 //! 鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申
841     procedure StoredTaskTray;
842 h677 1.672 //! 鐃緒申ID鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
843     procedure ShowSameIDAncher(const AID: String);
844 hi_ 1.1 published
845     property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
846     end;
847    
848     TFavoriteMenuItem = class(TMenuItem)
849     private
850     FData : Pointer;
851     public
852     property Data: Pointer read FData write FData;
853     end;
854    
855 yoffy 1.123 TBBSMenuItem = class(TMenuItem)
856     private
857     FData : Pointer;
858     public
859     property Data: Pointer read FData write FData;
860     end;
861    
862 hi_ 1.1 TLinkToolButton = class(TToolButton)
863     private
864     FData : Pointer;
865     public
866     property Data: Pointer read FData write FData;
867     end;
868    
869     var
870     GikoForm: TGikoForm;
871    
872     implementation
873    
874     uses
875 h677 1.536 GikoUtil, IndividualAbon, Math, Kotehan, KeySetting,
876 h677 1.614 YofUtils, ToolBarUtil, ToolBarSetting,
877 h677 1.536 GikoXMLDoc, RoundName, IniFiles, FavoriteAdd,
878 h677 1.619 FavoriteArrange, AddressHistory, Gesture,
879 yoffy 1.480 About, Option, Round, Splash, Sort, ListSelect, Imm,
880 h677 1.521 NewBoard, MojuUtils, Clipbrd, GikoBayesian,Y_TextConverter,
881 h677 1.583 HTMLCreate, ListViewUtils, GikoDataModule, GikoMessage,
882 h677 1.695 InputAssistDataModule, Types, ReplaceDataModule, PopupMenuUtil;
883 hi_ 1.1
884     const
885     BLANK_HTML: string = 'about:blank';
886 h677 1.542 BROWSER_COUNT = 5; //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
887     //D&D鐃緒申鐃?
888     DandD_THRESHOLD = 5; //D&D鐃緒申鐃緒申鐃?鐃?pixcel)
889     //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
890     HTML_FILE_NAME = 'temp_preview.html';
891     //鐃緒申鐃?鐃?鐃?鐃?ID
892 yoffy 1.278 USER_TREECLICK = WM_USER + 2000;
893     USER_RESIZED = WM_USER + 2001;
894     USER_MINIMIZED = WM_USER + 2002;
895     USER_SETLINKBAR = WM_USER + 2003;
896 yoffy 1.434 USER_DOCUMENTCOMPLETE = WM_USER + 2004; ///< wParam : TWebBrowser
897 h677 1.614 USER_TASKTRAY = WM_USER + 2010;
898 hi_ 1.1 {$R *.DFM}
899    
900     procedure TGikoForm.CreateParams(var Params: TCreateParams);
901     begin
902     inherited;
903     if FormStyle in [fsNormal, fsStayOnTop] then begin
904     if BorderStyle in [bsSingle, bsSizeable] then begin
905     Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
906     Params.WndParent := 0;
907     end;
908     end;
909     end;
910    
911     procedure TGikoForm.FormCreate(Sender: TObject);
912     const
913     TVS_NOTOOLTIPS = $0080;
914     var
915     FileName: string;
916     Style: DWORD;
917     msg: string;
918     i: Integer;
919     wp: TWindowPlacement;
920     begin
921     {$IFDEF DEBUG}
922     AllocConsole;
923     Writeln('============================================================');
924     Writeln(' 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃? 鐃?鐃緒申鐃?鐃?鐃緒申');
925     Writeln('');
926     Writeln(' 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?');
927     Writeln(' 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
928     Writeln('============================================================');
929     {$ENDIF}
930 h677 1.580 //try
931 h677 1.586 Sort.SetSortDate(Now());
932 eggcake 1.665
933 h677 1.514 FTreeType := gttNone;
934     // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
935 h677 1.471 FStartUp := true;
936 hi_ 1.1 Application.HookMainWindow(Hook);
937 h677 1.514 FIsIgnoreResize := rtResizing;
938 h677 1.581 //ActionList鐃緒申GuoupIndex鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?0鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
939     //(鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申Down鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申GroupIndex鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申)
940     //鐃緒申鐃緒申鐃緒申鐃緒申Set鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?Action鐃緒申Checked鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
941     GetGroupIndex(GikoDM.GikoFormActionList);
942 yoffy 1.51 FSearchDialog := nil;
943 h677 1.636 FResPopupBrowser := nil;
944 h677 1.550 CreateBrowsers(BROWSER_COUNT);
945 h677 1.615 FIconData.uID := 0;
946 h677 1.683 FUpdateExePath := '';
947     FUpdateExeArgs := '';
948 h677 1.636
949 h677 1.514 //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?
950     SetMenuFont;
951 yoffy 1.216
952 hi_ 1.1 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
953     Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
954    
955 h677 1.680 // 鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
956     LoadIcon;
957    
958 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
959 h677 1.513 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.MaxRecordCount);
960 hi_ 1.1
961     EnabledCloseButton := True;
962 h677 1.176
963 hi_ 1.1 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
964     ListView.ViewStyle := GikoSys.Setting.ListStyle;
965    
966     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
967     AnimePanel.Top := 0;
968     AnimePanel.Left := 0;
969    
970     //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
971    
972     //鐃?鐃緒申鐃?鐃?鐃?鐃?
973     CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
974    
975     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
976 h677 1.539 GikoDM.MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
977     GikoDM.MsgBarVisibleActionExecute(nil);
978 hi_ 1.1 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
979    
980     //鐃?鐃?鐃?鐃?鐃?鐃?鐃?
981 h677 1.539 GikoDM.StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
982     GikoDM.StatusBarVisibleActionExecute(nil);
983 hi_ 1.1
984     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
985     TreeView.Items.BeginUpdate;
986 yoffy 1.100 FavoriteTreeView.Items.BeginUpdate;
987 hi_ 1.1 ListView.Items.BeginUpdate;
988     try
989     TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
990     TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
991     TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
992     TreeView.Color := GikoSys.Setting.CabinetBackColor;
993 h677 1.473 FavoriteTreeView.Font.Assign(TreeView.Font);
994 yoffy 1.67 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
995    
996 hi_ 1.1 ListView.Font.Name := GikoSys.Setting.ListFontName;
997     ListView.Font.Size := GikoSys.Setting.ListFontSize;
998     ListView.Font.Color := GikoSys.Setting.ListFontColor;
999 h677 1.473 ListView.Font.Style := [];
1000     if GikoSys.Setting.ListFontBold then
1001     ListView.Font.Style := [fsbold];
1002     if GikoSys.Setting.ListFontItalic then
1003     ListView.Font.Style := ListView.Font.Style + [fsitalic];
1004    
1005 yoffy 1.418 ListViewBackGroundColor := clWhite; // 鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1006     ListViewBackGroundColor := GikoSys.Setting.ListBackColor; // 鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1007 yoffy 1.236 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1008     FOddColor := GikoSys.Setting.OddColor;
1009 h677 1.109
1010 hi_ 1.1 finally
1011     TreeView.Items.EndUpdate;
1012 yoffy 1.100 FavoriteTreeView.Items.EndUpdate;
1013 hi_ 1.1 ListView.Items.EndUpdate;
1014     end;
1015     //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1016 h677 1.539 GikoDM.ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1017 hi_ 1.1
1018 h677 1.581 //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1019     GikoDM.MuteAction.Checked := GikoSys.Setting.Mute;
1020    
1021     // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1022     FResRangeMenuSelect := GikoSys.ResRange;
1023     case GikoSys.ResRange of
1024     Ord( grrAll ):
1025     begin
1026     GikoDM.AllResAction.Execute;
1027     end;
1028     Ord( grrSelect ):
1029     begin
1030     SelectComboBox.Text := SelectComboBox.Items[ 1 ];
1031     GikoDM.SelectResAction.Checked := True;
1032     end;
1033     else
1034     case FResRangeMenuSelect of
1035     Ord( grrKoko ): GikoDM.OnlyKokoResAction.Checked := True;
1036     Ord( grrNew ): GikoDM.OnlyNewResAction.Checked := True;
1037 h677 1.685 10..65535:
1038     begin
1039     GikoDM.OnlyAHundredResAction.Checked := True;
1040     GikoSys.ResRange := GikoSys.Setting.ResRangeExCount;
1041     end;
1042 h677 1.581 end;
1043     end;
1044    
1045     // 鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1046     case GikoSys.Setting.ThreadRange of
1047     gtrAll:
1048     begin
1049     GikoDM.AllItemAction.Checked := True;
1050     ViewType := gvtAll;
1051     end;
1052     gtrLog:
1053     begin
1054     GikoDM.LogItemAction.Checked := True;
1055     ViewType := gvtLog;
1056     end;
1057     gtrNew:
1058     begin
1059     GikoDM.NewItemAction.Checked := True;
1060     ViewType := gvtNew;
1061     end;
1062 h677 1.592 gtrLive:
1063     begin
1064     GikoDM.LiveItemAction.Checked := True;
1065     ViewType := gvtLive;
1066     end;
1067     gtrArch:
1068     begin
1069     GikoDM.ArchiveItemAction.Checked := True;
1070     ViewType := gvtArch;
1071     end;
1072 h677 1.581 end;
1073    
1074    
1075 hi_ 1.1 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1076     BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1077     BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1078 h677 1.473 BrowserTab.Font.Style := [];
1079     if GikoSys.Setting.BrowserTabFontBold then
1080     BrowserTab.Font.Style := [fsBold];
1081     if GikoSys.Setting.BrowserTabFontItalic then
1082     BrowserTab.Font.Style := GikoForm.BrowserTab.Font.Style + [fsItalic];
1083 h677 1.655
1084 h677 1.582 BrowserTab.DoubleBuffered := True;
1085 yoffy 1.133 FDragWFirst := false;
1086 h677 1.299 SetContent(BrowserNullTab); //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1087    
1088 h677 1.581 //鐃?鐃緒申鐃?鐃?鐃?鐃?
1089     GikoDM.BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1090    
1091     if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1092     GikoDM.BrowserTabTopAction.Checked := True;
1093     end else begin
1094     GikoDM.BrowserTabBottomAction.Checked := True;
1095     end;
1096    
1097     if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1098     GikoDM.BrowserTabTabStyleAction.Checked := True;
1099     end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1100     GikoDM.BrowserTabButtonStyleAction.Checked := True;
1101     end else begin
1102     GikoDM.BrowserTabFlatStyleAction.Checked := True;
1103     end;
1104    
1105 h677 1.514 //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1106     ProgressBar.Parent := StatusBar;
1107     ProgressBar.Top := 2;
1108     ProgressBar.Left := 0;
1109     ProgressBar.Width := StatusBar.Panels[0].Width;
1110     ProgressBar.Height := StatusBar.Height - 2;
1111     ProgressBar.Position := 0;
1112    
1113     // 鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?(ReadBoardFile, LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1114     InitializeBoardPlugIns;
1115    
1116     // 鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申(ReadFavorite 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1117     GikoSys.ListBoardFile;
1118 h677 1.580 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申
1119     try
1120 h677 1.514 // 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1121 h677 1.580 if (SplashWindow <> nil) then begin
1122     SplashWindow.ProgressBar.Max := Length(BBSs) * 20;
1123     end;
1124     except
1125     end;
1126 h677 1.514 // 鐃緒申鐃緒申鐃緒申鐃緒申BBS鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1127     for i := Length(BBSs) - 1 downto 0 do begin
1128     if not BBSs[i].IsBoardFileRead then
1129     GikoSys.ReadBoardFile(BBSs[i]);
1130    
1131     if SplashWindow <> nil then begin
1132     SplashWindow.ProgressBar.StepBy(20);
1133     SplashWindow.Update;
1134     end;
1135     end;
1136 h677 1.580
1137 h677 1.514 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1138     RoundList := TRoundList.Create;
1139     RoundList.LoadRoundBoardFile;
1140     RoundList.LoadRoundThreadFile;
1141    
1142     //TreeView鐃緒申鐃緒申鐃緒申鐃?鐃緒申ToolTip鐃緒申鐃緒申鐃?鐃緒申
1143     Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1144     Style := Style or TVS_NOTOOLTIPS;
1145     SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1146    
1147     // 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1148     TreeView.Align := alClient;
1149     FavoriteTreeView.Align := alClient;
1150     FavoriteTreeView.Visible := False;
1151    
1152     // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1153     SetBBSMenu;
1154 hi_ 1.1
1155     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1156     wp.length := sizeof(wp);
1157     wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1158     wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1159     wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1160     wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1161     wp.showCmd := SW_HIDE;
1162     SetWindowPlacement(Handle, @wp);
1163 h677 1.514 //Self.Update;
1164 hi_ 1.1
1165     if GikoSys.Setting.WindowMax then
1166 h677 1.514 WindowState := wsMaximized;
1167 hi_ 1.1
1168     //鐃?鐃?鐃?鐃?鐃緒申
1169     try
1170     FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1171     if FileExists(FileName) then
1172     Animate.FileName := FileName;
1173     except
1174     end;
1175    
1176     //鐃?鐃?鐃?鐃?
1177     FNameCookie := '';
1178     FMailCookie := '';
1179    
1180     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1181     FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1182     FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1183    
1184 yoffy 1.420
1185     // 鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?(LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1186 h677 1.623 FHistoryList := THistoryList.Create;
1187 yoffy 1.420
1188     // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1189 h677 1.623 FHistoryList.LoadFromFile(GikoSys.GetConfigDir + 'History.xml',
1190     TreeView, FTreeType);
1191 yoffy 1.420
1192     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1193     FavoriteDM.SetFavTreeView(FavoriteTreeView);
1194     FavoriteDM.ReadFavorite;
1195    
1196 h677 1.539 GikoDM.ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1197     GikoDM.ArrangeAction.Execute;
1198 hi_ 1.1
1199     if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1200     case GikoSys.Setting.ListWidthState of
1201     glsMax: begin
1202     ViewPanel.Width := 1;
1203 h677 1.558 GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
1204     GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MIN;
1205 hi_ 1.1 end;
1206     glsMin: begin
1207     ViewPanel.Width := GikoSys.Setting.ListWidth;
1208 h677 1.558 GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
1209     GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_NORMAL;
1210 hi_ 1.1 end;
1211     else begin
1212     ViewPanel.Width := GikoSys.Setting.ListWidth;
1213 h677 1.558 GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MAX;
1214     GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_WIDTH_MIN;
1215 hi_ 1.1 end;
1216     end;
1217     end else begin
1218     case GikoSys.Setting.ListHeightState of
1219     glsMax: begin
1220     ViewPanel.Height := 1;
1221 h677 1.558 GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
1222     GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
1223 hi_ 1.1 end;
1224     glsMin: begin
1225     ViewPanel.Height := GikoSys.Setting.ListHeight;
1226 h677 1.558 GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
1227     GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_NORMAL;
1228 hi_ 1.1 end;
1229     else begin
1230     ViewPanel.Height := GikoSys.Setting.ListHeight;
1231 h677 1.558 GikoDM.BrowserMaxAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MAX;
1232     GikoDM.BrowserMinAction.ImageIndex := GikoDataModule.TOOL_ICON_HEIGHT_MIN;
1233 hi_ 1.1 end;
1234     end;
1235     end;
1236    
1237     //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1238 h677 1.550 CreateControlThread();
1239 hi_ 1.1
1240 yoffy 1.51 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1241     SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1242 yoffy 1.2
1243 hi_ 1.1 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
1244     SetBrowserTabState;
1245    
1246     BrowserBoardNameLabel.Caption := '';
1247     BrowserNameLabel.Caption := '';
1248     FWorkCount := 0;
1249    
1250     FTabHintIndex := -1;
1251    
1252     //鐃?鐃?鐃緒申鐃?鐃?Wrapable
1253     ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1254     BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1255    
1256 yoffy 1.236 MakeDefaultINIFile();
1257 yoffy 1.2 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1258 h677 1.539 ReadToolBarSetting(GikoDM.GikoFormActionList, StdToolBar);
1259     ReadToolBarSetting(GikoDM.GikoFormActionList, ListToolBar);
1260     ReadToolBarSetting(GikoDM.GikoFormActionList, BrowserToolBar);
1261 yoffy 1.2 SetToolBarPopup;
1262 yoffy 1.375
1263 h677 1.517 //ListToolBar鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申ComboBox鐃緒申鐃?鐃?
1264 h677 1.550 SetSelectComboBox();
1265 h677 1.514
1266     //鐃?鐃?鐃緒申鐃?鐃?鐃?
1267     AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1268    
1269     //鐃緒申鐃緒申鐃?鐃?鐃?
1270     SetLinkBar;
1271 yoffy 1.2 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1272    
1273     //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1274     if not FileExists(GikoSys.GetBoardFileName) then begin
1275     msg := '鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申' + #13#10#13#10
1276     + '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申' + #13#10
1277     + '鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?';
1278     MsgBox(SplashWindow.Handle, msg, '鐃?鐃?鐃?鐃?', MB_OK or MB_ICONINFORMATION);
1279 h677 1.539 GikoDM.NewBoardAction.Execute;
1280 yoffy 1.2 end;
1281    
1282     //鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1283 h677 1.560 GikoSys.LoadKeySetting(GikoDM.GikoFormActionList, GikoSys.GetMainKeyFileName);
1284 yoffy 1.2
1285     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1286     // FLastRoundTime := 0;
1287    
1288 h677 1.547 ListView.OnData := TListViewUtils.ListViewData;
1289 h677 1.529
1290 yoffy 1.100 // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1291 h677 1.299 CabinetVisible( False );
1292 yoffy 1.141 if GikoSys.Setting.CabinetVisible then begin
1293     i := CabinetSelectPopupMenu.Items.Count - 1;
1294     if GikoSys.Setting.CabinetIndex = i - 1 then
1295 h677 1.539 GikoDM.CabinetHistoryAction.Execute
1296 yoffy 1.141 else if GikoSys.Setting.CabinetIndex = i then
1297 h677 1.539 GikoDM.CabinetFavoriteAction.Execute
1298 yoffy 1.141 else begin
1299     if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1300     ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1301 yoffy 1.265 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 2
1302 yoffy 1.424 FIsIgnoreResize := rtResizing;
1303 h677 1.539 GikoDM.CabinetBBSAction.Execute;
1304 yoffy 1.141 end;
1305     end else begin
1306 yoffy 1.248 ShowBBSTreeOld( BBSs[ 0 ] );
1307     PostMessage( Handle, USER_TREECLICK, 0, 0 );
1308 yoffy 1.141 end;
1309 yoffy 1.67
1310 yoffy 1.2 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?
1311     for i := 1 to ParamCount do begin
1312     MoveToURL(ParamStr(i));
1313     end;
1314 h677 1.22
1315 h677 1.567 GikoDM.RepaintStatusBar;
1316 hi_ 1.32 StatusBarResize(Sender);
1317 h677 1.187
1318 h677 1.695 // dummy1.Caption := ItemReservPMenu.Caption;
1319     // dummy1.Hint := ItemReservPMenu.Hint;
1320     // 鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1321     PopupMenuUtil.ReadSetting(GikoDM.GikoFormActionList, BrowserTabPopupMenu);
1322 h677 1.659 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1323     MouseGesture := TMouseGesture.Create;
1324    
1325 yoffy 1.500 {$IFDEF SPAM_FILTER_ENABLED}
1326 yoffy 1.468 // 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1327     GikoSys.Bayesian.LoadFromFile( GikoSys.Setting.GetSpamFilterFileName );
1328 yoffy 1.500 {$ENDIF}
1329 yoffy 1.468
1330 h677 1.483 //2ch鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1331 h677 1.562 GikoSys.SetGikoMessage;
1332 h677 1.514
1333 genyakun 1.497 //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1334     if GikoSys.Setting.AutoLogin then
1335 h677 1.539 GikoDM.LoginAction.Execute;
1336 genyakun 1.497
1337 h677 1.514 GikoSys.Setting.BeLogin := GikoSys.Setting.BeAutoLogin;
1338 h677 1.541
1339     //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1340     FavoriteAddToolButton.Caption := '鐃緒申鐃緒申...';
1341 h677 1.547 AntiIndivAbonMenuItem.Caption := '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申';
1342 h677 1.541
1343 h677 1.583 //鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1344     InputAssistDM.Init(GikoSys.GetInputAssistFileName);
1345 h677 1.613
1346 h677 1.630 //鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1347     ReplaceDM.LoadFromFile(GikoSys.GetReplaceFileName);
1348 h677 1.644
1349     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?
1350     ResPopupClearTimer.Interval := GikoSys.Setting.RespopupWait;
1351    
1352 h677 1.639 // D&D鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1353 h677 1.654 DragAcceptFiles(ListView.Handle, True);
1354 h677 1.651
1355 h677 1.695
1356 h677 1.651 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?
1357     if (FavoriteDM.AbEnd) then begin
1358 h677 1.693 GikoUtil.MsgBox(Self.Handle,
1359     '鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?'#13#10 +
1360     '鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?config/' + Favorite.FAVORITE_FILE_NAME +
1361     ' 鐃緒申 config/~' + Favorite.FAVORITE_FILE_NAME + '(鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)鐃緒申'#13#10 +
1362     '鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?',
1363 h677 1.651 '鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
1364 h677 1.693 GikoDM.GikoFolderOpenAction.Execute;
1365 h677 1.651 Self.Close;
1366     end;
1367    
1368 yoffy 1.2 end;
1369    
1370 yoffy 1.216 // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1371     procedure TGikoForm.SaveCoolBarSettings;
1372 yoffy 1.2 begin
1373    
1374 yoffy 1.424 if IsIconic( Handle ) or (FIsIgnoreResize <> rtNone) then
1375 yoffy 1.216 Exit;
1376 h677 1.471 SaveMainCoolBarSettings;
1377     SaveBoardCoolBarSettings;
1378     SaveBrowserCoolBarSettings;
1379 yoffy 1.2
1380 h677 1.471 end;
1381     procedure TGikoForm.SaveMainCoolBarSettings;
1382     var
1383     i : Integer;
1384     CoolSet : TCoolSet;
1385     begin
1386 yoffy 1.216 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1387     for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1388     CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1389     CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1390     CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1391     GikoSys.Setting.MainCoolSet[i] := CoolSet;
1392     end;
1393 h677 1.471 end;
1394     procedure TGikoForm.SaveBoardCoolBarSettings;
1395     var
1396     i : Integer;
1397     CoolSet : TCoolSet;
1398     begin
1399 yoffy 1.216 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1400     for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1401     CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1402     CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1403     CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1404     GikoSys.Setting.ListCoolSet[i] := CoolSet;
1405     end;
1406 h677 1.471 end;
1407     procedure TGikoForm.SaveBrowserCoolBarSettings;
1408     var
1409     i : Integer;
1410     CoolSet : TCoolSet;
1411     begin
1412 yoffy 1.216 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1413     for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1414     CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1415     CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1416     CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1417     GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1418 yoffy 1.2 end;
1419 yoffy 1.216 end;
1420     // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1421     procedure TGikoForm.LoadCoolBarSettings;
1422     var
1423     i : Integer;
1424     CoolSet : TCoolSet;
1425     begin
1426 yoffy 1.2
1427 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1428     MainCoolBar.Bands.BeginUpdate;
1429     try
1430 yoffy 1.216 // for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1431     for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin
1432 hi_ 1.1 CoolSet := GikoSys.Setting.MainCoolSet[i];
1433 yoffy 1.263 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1434 yoffy 1.424 FIsIgnoreResize := rtNone;
1435 yoffy 1.263 SaveCoolBarSettings;
1436     Exit;
1437     end;
1438 hi_ 1.1 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1439     MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1440 yoffy 1.264 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1441 hi_ 1.1 end;
1442     finally
1443     MainCoolBar.Bands.EndUpdate;
1444     end;
1445    
1446     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1447     ListCoolBar.Bands.BeginUpdate;
1448     try
1449 yoffy 1.216 // for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1450     for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin
1451 hi_ 1.1 CoolSet := GikoSys.Setting.ListCoolSet[i];
1452 yoffy 1.263 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1453 yoffy 1.424 FIsIgnoreResize := rtNone;
1454 yoffy 1.263 SaveCoolBarSettings;
1455     Exit;
1456     end;
1457 hi_ 1.1 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1458     ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1459     ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1460     end;
1461     finally
1462     ListCoolBar.Bands.EndUpdate;
1463     end;
1464    
1465     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1466     BrowserCoolBar.Bands.BeginUpdate;
1467     try
1468 yoffy 1.216 // for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1469 h677 1.514 for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
1470 hi_ 1.1 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1471 yoffy 1.263 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1472 yoffy 1.424 FIsIgnoreResize := rtNone;
1473 yoffy 1.263 SaveCoolBarSettings;
1474     Exit;
1475     end;
1476 hi_ 1.1 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1477     BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1478     BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1479     end;
1480     finally
1481     BrowserCoolBar.Bands.EndUpdate;
1482     end;
1483    
1484     end;
1485 yoffy 1.216 //
1486     procedure TGikoForm.FormShow(Sender: TObject);
1487 h677 1.638 var
1488     item : TThreadItem;
1489 yoffy 1.216 begin
1490 h677 1.471 if FStartUp then begin
1491 h677 1.688 FStartUp := false;
1492 h677 1.423 ShowWindow(Application.Handle, SW_HIDE);
1493     //FormCreate鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1494     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1495 h677 1.539 GikoDM.StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1496     GikoDM.StdToolBarVisibleActionExecute( nil );
1497     GikoDM.AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1498     GikoDM.AddressBarVisibleActionExecute( nil );
1499     GikoDM.LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1500     GikoDM.LinkBarVisibleActionExecute( nil );
1501     GikoDM.ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1502     GikoDM.ListToolBarVisibleActionExecute( nil );
1503     GikoDM.ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1504     GikoDM.ListNameBarVisibleActionExecute( nil );
1505     GikoDM.BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1506     GikoDM.BrowserToolBarVisibleActionExecute( nil );
1507     GikoDM.BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1508     GikoDM.BrowserNameBarVisibleActionExecute( nil );
1509 h677 1.423
1510     // CoolBar 鐃緒申鐃緒申
1511     LoadCoolBarSettings;
1512 yoffy 1.265
1513 h677 1.514 //鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1514 h677 1.517 // ResetBandInfo( ListCoolBar, ListToolBar );
1515 yoffy 1.424 FIsIgnoreResize := rtNone;
1516 genyakun 1.382
1517 h677 1.688 //ActionList鐃緒申GroupIndex鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1518     SetGroupIndex(GikoDM.GikoFormActionList);
1519    
1520 h677 1.423 //FormCrete鐃緒申鐃緒申鐃緒申鐃緒申鐃?
1521     if GikoSys.Setting.TabAutoLoadSave then begin
1522 h677 1.611 GikoDM.TabsOpenAction.Tag := 1;
1523     GikoDM.TabsOpenAction.Execute;
1524     GikoDM.TabsOpenAction.Tag := 0;
1525 h677 1.638 if (GikoSys.Setting.LastCloseTabURL <> '') then begin
1526 eggcake 1.681 if ( FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
1527 h677 1.639 while (FActiveContent.Browser.ReadyState <> READYSTATE_COMPLETE) and
1528     (FActiveContent.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
1529 h677 1.688 // 鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
1530     Sleep(1);
1531 h677 1.639 end;
1532     end;
1533 h677 1.638 item := BBSsFindThreadFromURL( GikoSys.Setting.LastCloseTabURL );
1534 h677 1.688 GikoSys.Setting.LastCloseTabURL := '';
1535 h677 1.638 if (item <> nil) and (item.IsLogFile) then begin
1536     OpenThreadItem(item, item.URL);
1537     end;
1538 h677 1.688 //ShowWindow(Self.Handle, SW_SHOW);
1539 h677 1.638 end;
1540 h677 1.423 end;
1541 yoffy 1.397 end;
1542 yoffy 1.239 end;
1543 yoffy 1.216
1544 hi_ 1.1 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1545     begin
1546 yoffy 1.331 // if GikoForm.WindowState <> wsMinimized then
1547     // SaveCoolBarSettings;
1548 h677 1.599 CanClose := True;
1549 yoffy 1.236 if ( GikoSys.Setting.ShowDialogForEnd ) and
1550     (MessageDlg('鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
1551     CanClose := false;
1552     Exit;
1553 h677 1.599 end;
1554    
1555 h677 1.638 GikoSys.Setting.LastCloseTabURL := '';
1556 h677 1.599 if GikoSys.Setting.TabAutoLoadSave then begin
1557 h677 1.611 GikoDM.TabsSaveAction.Execute;
1558 h677 1.638 if (GetActiveContent <> nil) and
1559     (GetActiveContent.IsLogFile) then begin
1560     GikoSys.Setting.LastCloseTabURL := GetActiveContent.URL;
1561     end;
1562 h677 1.599 end;
1563    
1564     if (SearchDialog <> nil) then begin
1565     if (SearchDialog.Visible) then begin
1566     SearchDialog.Close;
1567 yoffy 1.398 end;
1568 h677 1.656 try
1569     SearchDialog.Release;
1570     except
1571     end;
1572     SearchDialog := nil;
1573 yoffy 1.236 end;
1574 h677 1.609
1575     //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?EditorForm鐃緒申鐃緒申鐃緒申鐃緒申
1576     GikoDM.CloseAllEditorAction.Execute;
1577    
1578 h677 1.241 Application.UnhookMainWindow(Hook);
1579 h677 1.659 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1580 h677 1.684 FControlThread.DownloadAbort;
1581 h677 1.660 FControlThread.Terminate;
1582 eggcake 1.682
1583     //OnDestory鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申OnCloseQuery鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1584     SaveSettingAll();
1585    
1586 h677 1.241 Application.Terminate;
1587     end;
1588    
1589 eggcake 1.682 procedure TGikoForm.SaveSettingAll();
1590 h677 1.241 var
1591 yoffy 1.376 wp : TWindowPlacement;
1592 h677 1.673 WindowPlacement: TWindowPlacement;
1593 h677 1.241 begin
1594 yoffy 1.236 try
1595 yoffy 1.410 ActiveListColumnSave;
1596 yoffy 1.236 except
1597     end;
1598 eggcake 1.682
1599 yoffy 1.236 try
1600 h677 1.673 WindowPlacement.length := SizeOf(TWindowPlacement);
1601     GetWindowPlacement(Self.Handle, @WindowPlacement);
1602    
1603 h677 1.234 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1604     wp.length := sizeof(wp);
1605     GetWindowPlacement(Handle, @wp);
1606     GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1607     GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1608     GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1609     GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1610 h677 1.673 GikoSys.Setting.WindowMax := (WindowState = wsMaximized) or
1611     (WindowPlacement.flags = WPF_RESTORETOMAXIMIZED);
1612 h677 1.234 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1613 h677 1.539 GikoSys.Setting.CabinetVisible := GikoDM.CabinetVisibleAction.Checked;
1614 h677 1.234 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1615     GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1616     GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1617 h677 1.539 if GikoDM.ArrangeAction.Checked then
1618 h677 1.234 GikoSys.Setting.ListOrientation := gloVertical
1619     else
1620     GikoSys.Setting.ListOrientation := gloHorizontal;
1621     GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1622 yoffy 1.236 except
1623 yoffy 1.2 end;
1624 yoffy 1.378
1625     try
1626     // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1627     if not GikoSys.Setting.ResRangeHold then
1628 yoffy 1.380 GikoSys.Setting.ResRange := FResRangeMenuSelect;
1629 yoffy 1.378 except
1630     end;
1631 h677 1.684 //鐃緒申鐃緒申winodw鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申CoolBar鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1632     SaveCoolBarSettings;
1633     GikoSys.Setting.WriteWindowSettingFile;
1634     // 鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1635     GikoSys.Setting.WriteNameMailSettingFile;
1636 h677 1.483
1637 h677 1.583 //鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1638     InputAssistDM.SaveToFile(GikoSys.GetInputAssistFileName);
1639 yoffy 1.2
1640     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1641 hi_ 1.1 try
1642 yoffy 1.236 //FavoriteDM鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1643 h677 1.651 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1644     if not (FavoriteDM.AbEnd) then begin
1645     FavoriteDM.WriteFavorite;
1646     end;
1647 eggcake 1.682 except
1648     end;
1649    
1650     //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1651     try
1652     //AddressHistoryDM鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
1653     AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.MaxRecordCount);
1654     except
1655     end;
1656    
1657     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
1658     try
1659     FHistoryList.SaveToFile(GikoSys.GetConfigDir + 'History.xml');
1660     except
1661     end;
1662    
1663     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
1664     try
1665     RoundList.SaveRoundFile;
1666     except
1667     end;
1668 h677 1.684
1669     // 鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1670     if (FIconData.uID <> 0) then begin
1671     Shell_NotifyIcon(NIM_DELETE, @FIconData);
1672     end;
1673    
1674 eggcake 1.682 end;
1675    
1676     procedure TGikoForm.FormDestroy(Sender: TObject);
1677     var
1678     i : Integer;
1679     tmpBool : Boolean;
1680     begin
1681 h677 1.684 //鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申CoolBar鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1682     //鐃緒申鐃緒申鐃緒申鐃?OnDestroy鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1683     // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1684     if WindowState <> wsNormal then begin
1685     WindowState := wsNormal;
1686     try
1687     SaveCoolBarSettings;
1688     GikoSys.Setting.WriteWindowSettingFile;
1689     except
1690     end;
1691 eggcake 1.682 end;
1692    
1693     // 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1694     try
1695     if GikoSys.Setting.GestureEnabled then begin
1696     MouseGesture.OnGestureStart := nil;
1697     MouseGesture.OnGestureMove := nil;
1698     MouseGesture.OnGestureEnd := nil;
1699     end;
1700     MouseGesture.Clear;
1701     MouseGesture.UnHook;
1702     MouseGesture.Free;
1703     except
1704     end;
1705    
1706     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1707     try
1708 yoffy 1.236 FavoriteDM.Clear;
1709 hi_ 1.1 except
1710     end;
1711 eggcake 1.682
1712 hi_ 1.1 try
1713     //鐃?鐃?鐃?鐃緒申鐃?鐃?
1714 h677 1.321 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
1715     GikoSys.Setting.ShowDialogForAllTabClose := false;
1716 h677 1.539 GikoDM.AllTabCloseAction.Execute;
1717 h677 1.483 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
1718 h677 1.299 except
1719     end;
1720 eggcake 1.682
1721 h677 1.321 try
1722     for i := FBrowsers.Count - 1 downto 0 do begin
1723 eggcake 1.665 GikoSys.ShowRefCount('browser' + IntToStr(i), TWebBrowser(FBrowsers[i]).ControlInterface);
1724     GikoSys.ShowRefCount('document' + IntToStr(i), TWebBrowser(FBrowsers[i]).ControlInterface.Document);
1725     end;
1726    
1727     for i := FBrowsers.Count - 1 downto 0 do begin
1728 h677 1.321 TWebBrowser(FBrowsers[i]).Free;
1729     end;
1730     FBrowsers.Clear;
1731     FBrowsers.Capacity := 0;
1732     finally
1733     FBrowsers.Free;
1734 h677 1.303 end;
1735 eggcake 1.682
1736 h677 1.299 try
1737     if BrowserNullTab <> nil then begin
1738     BrowserNullTab.Browser := nil; {*BrowserNullTab鐃緒申Browser鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?
1739     *鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申Free鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
1740     *}
1741     BrowserNullTab.Free;
1742 hi_ 1.1 end;
1743     except
1744     end;
1745 h677 1.483
1746 h677 1.224 try
1747 yoffy 1.236 TreeView.Items.BeginUpdate;
1748 yoffy 1.380 TreeView.Items.GetFirstNode.Free;
1749 yoffy 1.236 TreeView.Items.Clear;
1750     TreeView.Items.EndUpdate;
1751 h677 1.224 except
1752     end;
1753 h677 1.230
1754 yoffy 1.236 try
1755     try
1756 h677 1.623 FHistoryList.Clear;
1757 yoffy 1.236 except
1758     end;
1759     finally
1760     FHistoryList.Free;
1761     end;
1762 h677 1.221
1763 eggcake 1.682
1764 yoffy 1.236 try
1765 h677 1.234 try
1766 yoffy 1.236 RoundList.Clear;
1767 h677 1.234 except
1768     end;
1769 yoffy 1.236 finally
1770     RoundList.Free;
1771     end;
1772 h677 1.182
1773 yoffy 1.236 try
1774 h677 1.660 try
1775 h677 1.684 //FControlThread.DownloadAbort;
1776 h677 1.660 FControlThread.Terminate;
1777     FControlThread.WaitFor;
1778     except
1779     end;
1780     finally
1781 h677 1.659 FControlThread.Free;
1782 yoffy 1.236 end;
1783 h677 1.609 // 鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1784     for i := GikoForm.PlugInMenu.Count - 1 downto 0 do begin
1785     GikoForm.PlugInMenu.items[i].Free;
1786     end;
1787     GikoForm.PlugInMenu.Clear;
1788    
1789 h677 1.230
1790 yoffy 1.155 // TBBS 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 TCategory, TBoard, TThreadItem 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1791     // TBoard, TThreadItem 鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1792     // BoardPluteIns 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1793 h677 1.550 for i := Length(BoardGroups) - 1 downto 0 do begin
1794 h677 1.517 //BoardGroups[i].Clear;
1795     BoardGroups[i].Free;
1796 h677 1.550 end;
1797 h677 1.514
1798 yoffy 1.126 try
1799 h677 1.220 for i := Length( BBSs ) - 1 downto 0 do begin
1800 h677 1.153 if BBSs[ i ] <> nil then
1801     BBSs[ i ].Free;
1802     BBSs[ i ] := nil;
1803     end;
1804 h677 1.675 DestorySpecialBBS(BoardGroup.SpecialBBS);
1805 h677 1.153 except
1806     end;
1807 yoffy 1.155
1808 h677 1.234 try
1809 yoffy 1.236 if FEvent <> nil then
1810     FEvent.Free;
1811 h677 1.181
1812 h677 1.636 try
1813     if FResPopupBrowser <> nil then begin
1814     TOleControl(FResPopupBrowser).Parent := nil;
1815     FResPopupBrowser.Free;
1816     end;
1817    
1818     except
1819     end;
1820 yoffy 1.2 //Preview鐃?鐃緒申
1821 h677 1.636 if FPreviewBrowser <> nil then begin
1822 yoffy 1.2 FPreviewBrowser.Free;
1823     FPreviewBrowser := nil;
1824     end;
1825     except
1826     end;
1827 h677 1.683
1828     // Update鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申
1829     if FileExists(FUpdateExePath) then begin
1830     // 鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1831     GikoSys.CreateProcess(FUpdateExePath, FUpdateExeArgs);
1832     end;
1833 hi_ 1.1 end;
1834    
1835 yoffy 1.289 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃? BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1836     procedure TGikoForm.SetBBSMenu;
1837 yoffy 1.123 var
1838     i : Integer;
1839 yoffy 1.149 item : TBBSMenuItem;
1840 hi_ 1.1 begin
1841    
1842 yoffy 1.148 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1843     for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1844     try
1845     if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1846 yoffy 1.155 CabinetSelectPopupMenu.Items[ i ].Free;
1847     CabinetMenu.Items[ i ].Free;
1848 yoffy 1.289 BBSSelectPopupMenu.Items[ i ].Free;
1849 yoffy 1.148 end;
1850     except
1851     end;
1852     end;
1853 yoffy 1.289
1854     // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1855 yoffy 1.148 for i := Length( BBSs ) - 1 downto 0 do begin
1856     try
1857     item := TBBSMenuItem.Create( PopupMenu );
1858     item.Caption := BBSs[ i ].Title;
1859     item.Data := BBSs[ i ];
1860     item.OnClick := BBSMenuItemOnClick;
1861     CabinetSelectPopupMenu.Items.Insert( 0, item );
1862     item := TBBSMenuItem.Create( PopupMenu );
1863     item.Caption := BBSs[ i ].Title;
1864     item.Data := BBSs[ i ];
1865     item.OnClick := BBSMenuItemOnClick;
1866     CabinetMenu.Insert( 0, item );
1867 yoffy 1.289 item := TBBSMenuItem.Create( PopupMenu );
1868     item.Caption := BBSs[ i ].Title;
1869     item.Data := BBSs[ i ];
1870     item.OnClick := BBSMenuItemOnClick;
1871     BBSSelectPopupMenu.Items.Insert( 0, Item );
1872 yoffy 1.148 except
1873     end;
1874     end;
1875 yoffy 1.289
1876     end;
1877    
1878     procedure TGikoForm.ReloadBBS;
1879     var
1880     i : Integer;
1881 h677 1.321 tmpBool: Boolean;
1882 yoffy 1.289 begin
1883 h677 1.517 LockWindowUpdate(Self.Handle);
1884    
1885 yoffy 1.289 //鐃?鐃?鐃?鐃緒申鐃?鐃?
1886 h677 1.321 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
1887     GikoSys.Setting.ShowDialogForAllTabClose := false;
1888 h677 1.539 GikoDM.AllTabCloseAction.Execute;
1889 h677 1.321 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
1890 h677 1.320 SetContent(BrowserNullTab);
1891 yoffy 1.289 //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1892     TreeView.Items.Clear;
1893    
1894 h677 1.515 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
1895     try
1896     RoundList.SaveRoundFile;
1897     except
1898     end;
1899     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
1900     try
1901     RoundList.Clear;
1902     except
1903     end;
1904    
1905     //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1906 h677 1.517 try
1907 h677 1.623 FHistoryList.SaveToFile(GikoSys.GetConfigDir + 'History.xml');
1908     FHistoryList.Clear;
1909 h677 1.517 except
1910     end;
1911 h677 1.515
1912     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1913 h677 1.517 try
1914     FavoriteDM.WriteFavorite;
1915     FavoriteDM.Clear;
1916     except
1917     end;
1918 h677 1.515
1919 h677 1.516 //鐃緒申鐃?鐃?鐃緒申鐃?PLUGIN鐃緒申鐃?鐃緒申
1920     for i := Length(BoardGroups) - 1 downto 0 do begin
1921 h677 1.517 try
1922     BoardGroups[i].Free;
1923     except
1924     end;
1925 h677 1.516 end;
1926 yoffy 1.289 //BBS鐃?鐃緒申
1927     try
1928     for i := Length( BBSs ) - 1 downto 0 do begin
1929     if BBSs[ i ] <> nil then
1930     BBSs[ i ].Free;
1931     BBSs[ i ] := nil;
1932     end;
1933     except
1934     end;
1935    
1936     ActiveList := nil;
1937    
1938     FTreeType := gttNone;
1939 h677 1.516
1940     //============鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申================================//
1941    
1942     // 鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?(ReadBoardFile, LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1943     InitializeBoardPlugIns;
1944    
1945 yoffy 1.289 GikoSys.ListBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1946    
1947 h677 1.515 // 鐃緒申鐃緒申鐃緒申鐃緒申BBS鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1948     for i := Length(BBSs) - 1 downto 0 do begin
1949     if not BBSs[i].IsBoardFileRead then
1950     GikoSys.ReadBoardFile(BBSs[i]);
1951     end;
1952    
1953 yoffy 1.289 // BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1954     SetBBSMenu;
1955    
1956 yoffy 1.123 ShowBBSTree( BBSs[ 0 ] );
1957 yoffy 1.143
1958     // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1959 h677 1.623 FHistoryList.LoadFromFile(GikoSys.GetConfigDir + 'History.xml',
1960     TreeView, FTreeType);
1961 yoffy 1.143
1962     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1963     FavoriteDM.ReadFavorite;
1964 yoffy 1.279
1965 yoffy 1.143 SetLinkBar;
1966    
1967 h677 1.515 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1968 h677 1.514 RoundList.LoadRoundBoardFile;
1969     RoundList.LoadRoundThreadFile;
1970    
1971 h677 1.517 LockWindowUpdate(0);
1972 hi_ 1.1 end;
1973    
1974 yoffy 1.602 {!
1975     \todo 鐃緒申鐃緒申 IE 7 鐃緒申鐃緒申 about:.. 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1976     (IE 7 鐃緒申 about:.. 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申)
1977     鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1978     }
1979 hi_ 1.1 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
1980     var
1981     p: TPoint;
1982     s: string;
1983     tmp2: string;
1984     URL: string;
1985     ATitle: Boolean;
1986    
1987 yoffy 1.130 threadItem : TThreadItem;
1988     board : TBoard;
1989 yoffy 1.163 Protocol, Host, Path, Document, Port, Bookmark: string;
1990 yoffy 1.130
1991 h677 1.333 wkInt: Integer;
1992 hi_ 1.1 wkIntSt: Integer;
1993     wkIntTo: Integer;
1994     ActiveFileName: string;
1995     e: IHTMLElement;
1996     Ext: string;
1997     PathRec: TPathRec;
1998 eggcake 1.665 Text2: string;
1999 h677 1.636 cResPopup: TResPopupBrowser;
2000 eggcake 1.665 senderBrowser :TWebBrowser;
2001     doc: IHTMLDocument2;
2002 hi_ 1.1 begin
2003 eggcake 1.665 // 鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申 about:blank.. 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2004     // IE 7 鐃緒申鐃緒申 about:blank.. 鐃緒申鐃緒申鐃緒申鐃緒申 about:.. 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申(鐃緒申鐃緒申鐃緒申鐃緒申)
2005     if Pos('about:..', Text) = 1 then
2006     Text2 := 'about:blank..' + Copy( Text, Length('about:..')+1, Length(Text) )
2007     else
2008     Text2 := Text;
2009    
2010 h677 1.316 if not( TObject(Sender) is TWebBrowser )then
2011     Exit;
2012 eggcake 1.665
2013     senderBrowser := TWebBrowser(Sender);
2014     doc := senderBrowser.ControlInterface.Document as IHTMLDocument2;
2015    
2016 hi_ 1.1 try
2017     try
2018 eggcake 1.665 if ((not senderBrowser.Busy) and Assigned(doc)) then begin
2019     if LowerCase(doc.charset) <> 'shift_jis' then begin
2020     doc.charset := 'shift_jis';
2021 h677 1.306 end;
2022 hi_ 1.1 end;
2023     except
2024     end;
2025     finally
2026     end;
2027 eggcake 1.665
2028 hi_ 1.1 if PreviewTimer.Enabled then
2029     PreviewTimer.Enabled := False;
2030 eggcake 1.665
2031 hi_ 1.1 Application.CancelHint;
2032 eggcake 1.665
2033 h677 1.333 try
2034     if GetActiveContent <> nil then
2035     ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2036     else
2037     ActiveFileName := '';
2038     except
2039     FActiveContent := nil;
2040     Exit;
2041     end;
2042 eggcake 1.665
2043 h677 1.628 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
2044     if (StatusBar.Panels[1].Text = Text2) then begin
2045 h677 1.636 if Text2 = '' then begin
2046     if FResPopupBrowser <> nil then begin
2047     if not(Sender is TResPopupBrowser) then
2048     FResPopupBrowser.Clear
2049     else begin
2050     TResPopupBrowser(Sender).ChildClear;
2051     end;
2052     end;
2053     end;
2054 h677 1.628 Exit;
2055     end;
2056 yoffy 1.602 StatusBar.Panels[1].Text := Text2;
2057 hi_ 1.1
2058 h677 1.636
2059 hi_ 1.1 if FPreviewBrowser <> nil then
2060     ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2061    
2062 h677 1.636 if FResPopupBrowser <> nil then begin
2063     if not(Sender is TResPopupBrowser) then begin
2064     if (FResPopupBrowser.Visible) then begin
2065 h677 1.646 if ResPopupClearTimer.Interval > 0 then begin
2066     ResPopupClearTimer.Enabled := True;
2067     ResPopupClearTimer.Tag := 0;
2068     end else begin
2069     FResPopupBrowser.Clear;
2070     end;
2071     end;
2072     end else begin
2073     if ResPopupClearTimer.Interval > 0 then begin
2074 h677 1.643 ResPopupClearTimer.Enabled := True;
2075 h677 1.646 ResPopupClearTimer.Tag := 1;
2076     end else begin
2077     TResPopupBrowser(Sender).ChildClear;
2078 h677 1.636 end;
2079     end;
2080     end;
2081     cResPopup := nil;
2082    
2083     if not(Sender is TResPopupBrowser) then
2084     if not GikoSys.Setting.UnActivePopup then
2085     if not GikoForm.Active then
2086     Exit;
2087 hi_ 1.1
2088 h677 1.628
2089    
2090 hi_ 1.1 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2091     //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2092 h677 1.663 // 鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申URL鐃緒申鐃?鐃?
2093     if (ExtPreviewDM.PreviewURL(Text2)) then begin
2094     Exit;
2095     end;
2096 hi_ 1.1 s := '';
2097 yoffy 1.602 Ext := AnsiLowerCase(ExtractFileExt(Text2));
2098     if (Pos('http://', Text2) = 1) and (GikoSys.Setting.PreviewVisible) and
2099 h677 1.686 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) or
2100     (Pos('http://www.nicovideo.jp/watch/', Text2) = 1) then begin
2101 hi_ 1.1 if FPreviewBrowser = nil then begin
2102     FPreviewBrowser := TPreviewBrowser.Create(Self);
2103     ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2104     TOleControl(FPreviewBrowser).Parent := nil;
2105     end;
2106 h677 1.316 FPreviewBrowser.Navigate(BLANK_HTML);//鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2107 yoffy 1.602 FPreviewURL := Text2;
2108 hi_ 1.1 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2109     PreviewTimer.Enabled := True;
2110 yoffy 1.602 end else if (Pos('about:blank', Text2) = 1) or (Pos('http://', Text2) = 1) or (Pos('mailto:', Text2) = 1) then begin
2111 h677 1.652 if (Pos('mailto:', Text2) = 1) and (GikoSys.Setting.RespopupMailTo) then begin
2112 yoffy 1.602 s := StringReplace(Text2, 'mailto:', '', [rfIgnoreCase]);
2113 hi_ 1.1 //鐃?鐃?鐃?鐃?鐃?鐃緒申 鐃?鐃?鐃?3鐃緒申466鐃緒申鐃緒申鐃緒申鐃緒申
2114     GetCursorPos(p);
2115 eggcake 1.665 p.x := p.x - senderBrowser.ClientOrigin.x;
2116     p.y := p.y - senderBrowser.ClientOrigin.y;
2117     e := doc.elementFromPoint(p.x, p.y);
2118 hi_ 1.1 if (Assigned(e)) then begin
2119 h677 1.636 CreateResPopupBrowser;
2120 h677 1.643
2121     if not(Sender is TResPopupBrowser) then begin
2122     if (FResPopupBrowser.Visible) then begin
2123     FResPopupBrowser.Clear;
2124     end;
2125     end else begin
2126     TResPopupBrowser(Sender).ChildClear;
2127     end;
2128    
2129 h677 1.636 cResPopup := FResPopupBrowser.CreateNewBrowser;
2130 h677 1.664 tmp2 := Trim(ZenToHan(e.Get_outerText));
2131 hi_ 1.1 if (GikoSys.IsNumeric(tmp2)) then begin
2132     //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2133 h677 1.600 wkIntSt := StrToInt64(tmp2);
2134     wkIntTo := StrToInt64(tmp2);
2135 h677 1.636 cResPopup.PopupType := gptThread;
2136 h677 1.637 HTMLCreater.SetResPopupText(cResPopup, GetActiveContent(true), wkIntSt, wkIntTo, False, False);
2137 hi_ 1.1 end else begin
2138 h677 1.636 cResPopup.PopupType := gptRaw;
2139     cResPopup.Title := s;
2140 hi_ 1.1 end;
2141     end;
2142     end else begin
2143 h677 1.645 CreateResPopupBrowser;
2144    
2145     if not(Sender is TResPopupBrowser) then begin
2146     if (FResPopupBrowser.Visible) then begin
2147     FResPopupBrowser.Clear;
2148     end;
2149     end else begin
2150     TResPopupBrowser(Sender).ChildClear;
2151     end;
2152    
2153 h677 1.637 threadItem := GetActiveContent(true);
2154 yoffy 1.602 URL := THTMLCreate.GetRespopupURL(Text2, threadItem.URL);
2155 yoffy 1.274 PathRec := Gikosys.Parse2chURL2(URL);
2156 q9_ 1.354 if (PathRec.FNoParam) then begin
2157     PathRec.FSt := 1;
2158     PathRec.FTo := 1;
2159 h677 1.447 end else begin
2160 q9_ 1.352 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2161 h677 1.447 end;
2162 yoffy 1.163 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
2163 hi_ 1.1
2164 h677 1.168 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
2165 yoffy 1.162
2166 yoffy 1.163 URL := GikoSys.GetBrowsableThreadURL( URL );
2167 yoffy 1.274 wkIntSt := PathRec.FSt;
2168     wkIntTo := PathRec.FTo;
2169 hi_ 1.1
2170     if (wkIntSt = 0) and (wkIntTo = 0) then begin
2171     wkIntSt := 1;
2172     wkIntTo := 1;
2173     end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2174     wkIntSt := wkIntTo;
2175     end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2176     wkIntTo := wkIntSt;
2177     end else if wkIntSt > wkIntTo then begin
2178 h677 1.333 wkInt := wkIntTo;
2179 hi_ 1.1 wkIntTo := wkIntSt;
2180 h677 1.333 wkIntSt := wkInt;
2181 hi_ 1.1 end;
2182 h677 1.299 if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
2183 yoffy 1.274 ATitle := false
2184     else
2185     ATitle := true;
2186 hi_ 1.1
2187 yoffy 1.160 threadItem := BBSsFindThreadFromURL( URL );
2188 h677 1.170
2189 yoffy 1.163 if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
2190     board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
2191 yoffy 1.274 if board <> nil then begin
2192     if not board.IsThreadDatRead then
2193     GikoSys.ReadSubjectFile( board );
2194 yoffy 1.270 threadItem := board.FindThreadFromFileName( PathRec.FKey + '.dat' );
2195 yoffy 1.274 end;
2196 yoffy 1.130 end;
2197 h677 1.319
2198 yoffy 1.130 if threadItem <> nil then begin
2199 yoffy 1.127 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2200 h677 1.512 //URL鐃緒申鐃緒申鐃緒申鐃緒申/鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2201     if ( IntToStr(wkIntSt) = ChangeFileExt(threadItem.FileName, '') ) then begin
2202     wkIntSt := 1;
2203     wkIntTo := 1;
2204     end;
2205 h677 1.636 cResPopup := FResPopupBrowser.CreateNewBrowser;
2206     cResPopup.PopupType := gptThread;
2207     HTMLCreater.SetResPopupText(cResPopup, threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2208 yoffy 1.127 end;
2209 hi_ 1.1 end;
2210 h677 1.168 end;
2211 h677 1.636 if (cResPopup <> nil) then begin
2212 h677 1.643 ResPopupClearTimer.Enabled := False;
2213    
2214 h677 1.636 if cResPopup.PopupType = gptRaw then begin
2215     if cResPopup.Title <> '' then begin
2216     cResPopup.TitlePopup;
2217     end;
2218     end else begin
2219     if cResPopup.RawDocument <> '' then begin
2220     cResPopup.Popup;
2221     end else if cResPopup.Title <> '' then begin
2222     cResPopup.TitlePopup;
2223     end;
2224     end;
2225     end;
2226 hi_ 1.1 end;
2227     end;
2228    
2229     procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2230     var
2231     SysMenu: HMenu;
2232     begin
2233     FEnabledCloseButton := Enabled;
2234     SysMenu := GetSystemMenu(Handle, False);
2235    
2236     if Enabled then begin
2237     EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2238     end else begin
2239     EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2240     end;
2241    
2242     DrawMenuBar(Handle);
2243     end;
2244    
2245     procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2246     var AllowChange: