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