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.540 - (hide annotations) (download) (as text)
Mon Nov 21 14:25:23 2005 UTC (18 years, 5 months ago) by h677
Branch: MAIN
Changes since 1.539: +0 -1 lines
File MIME type: text/x-pascal
ToolbarImageをGikoDMので共通化。
BrowserMaxandForcusイベントのUpdateイベントがつけ間違っていたのを修正。

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