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