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