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