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.574 - (hide annotations) (download) (as text)
Fri Dec 23 16:39:22 2005 UTC (18 years, 3 months ago) by h677
Branch: MAIN
CVS Tags: v1_51_0_635
Changes since 1.573: +44 -124 lines
File MIME type: text/x-pascal
キャビネットのお気に入りでのD&Dでのスレが開く不具合の修正

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