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.569 - (hide annotations) (download) (as text)
Mon Dec 19 15:33:16 2005 UTC (18 years, 4 months ago) by h677
Branch: MAIN
CVS Tags: v1_51_0_632
Changes since 1.568: +3 -0 lines
File MIME type: text/x-pascal
スレ一覧DL後にソートしなかった不具合の修正

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