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.634 - (hide annotations) (download) (as text)
Sat Apr 14 16:52:57 2007 UTC (17 years ago) by h677
Branch: MAIN
CVS Tags: v1_56_0_698
Changes since 1.633: +11 -2 lines
File MIME type: text/x-pascal
ブラウザのページUp/Downアクションの追加
イメージ以外のリンクURLを取得するアクションを追加

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