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