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.557 - (hide annotations) (download) (as text)
Fri Dec 9 17:06:30 2005 UTC (18 years, 4 months ago) by h677
Branch: MAIN
Changes since 1.556: +3 -3 lines
File MIME type: text/x-pascal
HTML文字列作成関係のリファクタリング中

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