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.611 - (hide annotations) (download) (as text)
Thu Jul 27 16:39:56 2006 UTC (17 years, 8 months ago) by h677
Branch: MAIN
CVS Tags: v1_53_0_669
Changes since 1.610: +4 -93 lines
File MIME type: text/x-pascal
板更新時のタブの復元に,タブの保存の機構をそのまま使用しないように修正。

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