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.605 - (hide annotations) (download) (as text)
Sun Jun 25 13:54:59 2006 UTC (17 years, 9 months ago) by h677
Branch: MAIN
CVS Tags: v1_53_0_661, v1_52_0_660
Changes since 1.604: +5 -2 lines
File MIME type: text/x-pascal
ソース中の固定文字列の見直し

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