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