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.60 - (hide annotations) (download) (as text)
Fri Sep 26 06:25:36 2003 UTC (20 years, 6 months ago) by yoffy
Branch: MAIN
Changes since 1.59: +30 -17 lines
File MIME type: text/x-pascal
・お気に入りキャビネットで右クリックした場合に、表示されるメニューはポインタ直下のノードなのに対し、実際にコマンドが実行されるのは最後に選択されたノードになっていたのを修正。

1 hi_ 1.1 unit Giko;
2    
3     interface
4    
5     uses
6     Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7 hi_ 1.4 OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem,
8     {$IF Defined(DELPRO) }
9     SHDocVw,
10     MSHTML,
11     {$ELSE}
12     SHDocVw_TLB,
13     MSHTML_TLB,
14     {$IFEND}
15 yoffy 1.2 IdHTTP, ActiveX, Clipbrd, Buttons, ToolWin, {HTTPApp,} YofUtils, IdComponent,
16 hi_ 1.4 ShellAPI, ImgList, ActnList, UrlMon, Tabs, IdGlobal, StrUtils,
17 yoffy 1.2 CommCtrl, IniFiles,
18 hi_ 1.1 GikoSystem, GikoUtil, Setting, BoardGroup, ThreadControl, ItemDownload,
19     Editor, RoundData, RoundName, KeySetting, GikoPanel, Favorite, FavoriteAdd,
20     FavoriteArrange, AddressHistory, Preview, HTMLDocumentEvent, Kotehan,
21 h677 1.35 HintWindow, GikoCoolBar, GikoListView, ToolBarSetting, ToolBarUtil,
22 yoffy 1.54 IndividualAbon, Dialogs, Search;
23 hi_ 1.1
24     type
25     TGikoTreeType = (gttNone, gtt2ch, gttHistory);
26    
27     TGikoForm = class(TForm)
28     StatusBar: TStatusBar;
29     MainPanel: TPanel;
30     ClientPanel: TPanel;
31     TreeSplitter: TSplitter;
32     CabinetPanel: TPanel;
33     TreeView: TTreeView;
34     ThreadMainPanel: TPanel;
35     ListSplitter: TSplitter;
36     ViewPanel: TPanel;
37 yoffy 1.51 ListView: TGikoListView;
38 hi_ 1.1 ThreadPanel: TPanel;
39     Browser: TWebBrowser;
40     MessagePanel: TPanel;
41     MessageBar: TPanel;
42     MessageHideButton: TSpeedButton;
43     MessageListView: TListView;
44     MessageSplitter: TSplitter;
45     Panel3: TPanel;
46     SpeedButton1: TSpeedButton;
47     ToolBar1: TToolBar;
48     CabinetSelectToolButton: TToolButton;
49     HistoryToolBar: TToolBar;
50     ToolButton15: TToolButton;
51     ToolButton18: TToolButton;
52     ItemIcon16: TImageList;
53     ItemIcon32: TImageList;
54 yoffy 1.2 HotToobarImageList: TImageList;
55 yoffy 1.51 ToobarImageList: TImageList;
56 hi_ 1.1 ItemImageList: TImageList;
57 yoffy 1.2 ActionList: TActionList;
58 hi_ 1.1 LogDeleteAction: TAction;
59     KidokuAction: TAction;
60     StdToolBarVisibleAction: TAction;
61     SearchAction: TAction;
62 yoffy 1.51 GikoNaviWebPageAction: TAction;
63 hi_ 1.1 AboutAction: TAction;
64     ExitAction: TAction;
65 yoffy 1.51 MsgBarVisibleAction: TAction;
66 hi_ 1.1 StatusBarVisibleAction: TAction;
67     LargeIconAction: TAction;
68     SmallIconAction: TAction;
69     ListIconAction: TAction;
70 yoffy 1.51 DetailIconAction: TAction;
71 hi_ 1.1 Cabinet2chAction: TAction;
72     CabinetHistoryAction: TAction;
73 yoffy 1.51 CabinetVisibleAction: TAction;
74     MidokuAction: TAction;
75 hi_ 1.1 AllSelectAction: TAction;
76     UpFolderAction: TAction;
77 yoffy 1.51 ListNumberVisibleAction: TAction;
78 hi_ 1.1 AllItemAction: TAction;
79 yoffy 1.51 LogItemAction: TAction;
80     NewItemAction: TAction;
81 hi_ 1.1 SelectItemAction: TAction;
82     ShowThreadAction: TAction;
83     StopAction: TAction;
84     MainMenu: TMainMenu;
85     FileMenu: TMenuItem;
86 yoffy 1.51 DeleteMenu: TMenuItem;
87     ExitMenu: TMenuItem;
88     KidokuMenu: TMenuItem;
89 hi_ 1.1 MidokuMenu: TMenuItem;
90 yoffy 1.51 AllSelectMenu: TMenuItem;
91 hi_ 1.1 ViewMenu: TMenuItem;
92     StdToolBarMenu: TMenuItem;
93     CabinetMenu: TMenuItem;
94     N6: TMenuItem;
95 yoffy 1.51 H1: TMenuItem;
96 hi_ 1.1 N4: TMenuItem;
97 yoffy 1.51 CabinetVisibleMenu: TMenuItem;
98 hi_ 1.1 MessageMenu: TMenuItem;
99     StatusBarMenu: TMenuItem;
100     MMSep03: TMenuItem;
101 yoffy 1.51 LargeIconMenu: TMenuItem;
102 hi_ 1.1 SmallIconMenu: TMenuItem;
103     ListMenu: TMenuItem;
104     DetailMenu: TMenuItem;
105 yoffy 1.51 ToolMenu: TMenuItem;
106 hi_ 1.1 Find1: TMenuItem;
107     RoundMenu: TMenuItem;
108     MMSep04: TMenuItem;
109     OptionMenu: TMenuItem;
110     HelpMenu: TMenuItem;
111     G1: TMenuItem;
112 yoffy 1.51 N1: TMenuItem;
113 hi_ 1.1 AboutMenu: TMenuItem;
114 yoffy 1.51 IconStyle: TAction;
115 hi_ 1.1 BrowserPopupMenu: TPopupMenu;
116 yoffy 1.51 ShowThreadMenu: TMenuItem;
117 yoffy 1.2 ShowBoardMenu: TMenuItem;
118 hi_ 1.1 ShowBoardAction: TAction;
119     ListIconPopupMenu: TPopupMenu;
120     LargeIconPMenu: TMenuItem;
121     SmallIconPMenu: TMenuItem;
122     ListPMenu: TMenuItem;
123 yoffy 1.51 DetailPMenu: TMenuItem;
124     CabinetCloseAction: TAction;
125 hi_ 1.1 ClosePopupMenu: TPopupMenu;
126 yoffy 1.51 CloseMenu: TMenuItem;
127     OptionAction: TAction;
128 hi_ 1.1 U1: TMenuItem;
129     N3: TMenuItem;
130     B1: TMenuItem;
131     S1: TMenuItem;
132     N2: TMenuItem;
133     A1: TMenuItem;
134     L1: TMenuItem;
135     N5: TMenuItem;
136     S2: TMenuItem;
137 yoffy 1.51 RoundAction: TAction;
138 hi_ 1.1 ListPopupMenu: TPopupMenu;
139 yoffy 1.51 ListRoundPMenu: TMenuItem;
140 hi_ 1.1 ListReservPMenu: TMenuItem;
141     LPMSep01: TMenuItem;
142 yoffy 1.51 ItemRoundPMenu: TMenuItem;
143 hi_ 1.1 LPMSep02: TMenuItem;
144 yoffy 1.2 KidokuPMenu: TMenuItem;
145 hi_ 1.1 MidokuPMenu: TMenuItem;
146     AllSelectPMenu: TMenuItem;
147     UrlCopyPMenu: TMenuItem;
148     LPMSep05: TMenuItem;
149     DeletePMenu: TMenuItem;
150     LPMSep06: TMenuItem;
151     ViewPMenu: TMenuItem;
152     LargeIconLPMenu: TMenuItem;
153     SmallIconLPMenu: TMenuItem;
154     ListLPMenu: TMenuItem;
155     DetailLPMenu: TMenuItem;
156     T1: TMenuItem;
157     B2: TMenuItem;
158     N8: TMenuItem;
159     URLCopyAction: TAction;
160 yoffy 1.51 URLC1: TMenuItem;
161     N9: TMenuItem;
162 hi_ 1.1 N10: TMenuItem;
163 yoffy 1.51 MsgBarCloseAction: TAction;
164     ScrollTopAction: TAction;
165 hi_ 1.1 ScrollLastAction: TAction;
166     ScrollNewAction: TAction;
167     ScrollKokoAction: TAction;
168 yoffy 1.51 EditorAction: TAction;
169 hi_ 1.1 IEAction: TAction;
170     ItemReloadAction: TAction;
171 yoffy 1.51 BrowserMaxAction: TAction;
172 hi_ 1.1 G2: TMenuItem;
173     N11: TMenuItem;
174     T3: TMenuItem;
175     L2: TMenuItem;
176     N12: TMenuItem;
177     K1: TMenuItem;
178     N13: TMenuItem;
179     N14: TMenuItem;
180     R1: TMenuItem;
181     A2: TMenuItem;
182     N15: TMenuItem;
183 yoffy 1.51 SelectListReloadAction: TAction;
184     SelectThreadReloadAction: TAction;
185 hi_ 1.1 SelectTimer: TTimer;
186     KokoPopupMenu: TPopupMenu;
187     KokomadePMenu: TMenuItem;
188 yoffy 1.2 AllPMenu: TMenuItem;
189 hi_ 1.1 MenuItem1: TMenuItem;
190     MenuItem2: TMenuItem;
191     BrowserTabCloseAction: TAction;
192     BrowserTabPopupMenu: TPopupMenu;
193 yoffy 1.51 Close1: TMenuItem;
194 hi_ 1.1 KokomadeAction: TAction;
195     ZenbuAction: TAction;
196     KokoResAction: TAction;
197     SelectItemURLCopyAction: TAction;
198     SelectReservAction: TAction;
199     NotSelectTabCloseAction: TAction;
200     A3: TMenuItem;
201 yoffy 1.51 N16: TMenuItem;
202 hi_ 1.1 A4: TMenuItem;
203     TreePopupMenu: TPopupMenu;
204     TreeSelectThreadPupupMenu: TMenuItem;
205 yoffy 1.51 TreeSelectBoardPupupMenu: TMenuItem;
206 hi_ 1.1 TPMSep01: TMenuItem;
207     TreeSelectURLPupupMenu: TMenuItem;
208     TreeSelectBoradReload: TAction;
209 yoffy 1.51 TreeSelectThreadReload: TAction;
210 hi_ 1.1 TreeSelectURLCopy: TAction;
211     ListToolBarVisibleAction: TAction;
212     BrowserToolBarVisibleAction: TAction;
213     T2: TMenuItem;
214 yoffy 1.2 L3: TMenuItem;
215 hi_ 1.1 B3: TMenuItem;
216     BrowserBottomPanel: TGikoPanel;
217     CabinetSelectPopupMenu: TPopupMenu;
218     N17: TMenuItem;
219     H2: TMenuItem;
220 yoffy 1.51 ItemReservPMenu: TMenuItem;
221     RoundNamePopupMenu: TPopupMenu;
222 hi_ 1.1 SelectNewRoundName: TAction;
223 yoffy 1.51 SelectDeleteRound: TAction;
224     NewBoardAction: TAction;
225 yoffy 1.2 N7: TMenuItem;
226 hi_ 1.1 B4: TMenuItem;
227     LoginAction: TAction;
228     L4: TMenuItem;
229     KeySettingAction: TAction;
230     K2: TMenuItem;
231     AllTabCloseAction: TAction;
232 yoffy 1.51 A5: TMenuItem;
233 hi_ 1.1 N18: TMenuItem;
234     A6: TMenuItem;
235 yoffy 1.51 C1: TMenuItem;
236     V1: TMenuItem;
237     N19: TMenuItem;
238 hi_ 1.1 D1: TMenuItem;
239 yoffy 1.51 D2: TMenuItem;
240 hi_ 1.1 N20: TMenuItem;
241 yoffy 1.51 MessageImageList: TImageList;
242     ProgressBar: TProgressBar;
243     ArrangeAction: TAction;
244     URL1: TMenuItem;
245     NameURLCopyAction: TAction;
246     SelectItemNameURLCopyAction: TAction;
247 hi_ 1.1 NameUrlCopyPMenu: TMenuItem;
248     URLC2: TMenuItem;
249 yoffy 1.51 URLN1: TMenuItem;
250     N21: TMenuItem;
251     URLC3: TMenuItem;
252 yoffy 1.2 URLN2: TMenuItem;
253 hi_ 1.1 N22: TMenuItem;
254 yoffy 1.51 N23: TMenuItem;
255 yoffy 1.2 ListCoolBar: TGikoCoolBar;
256 hi_ 1.1 ListToolBar: TToolBar;
257     ViewNoButton: TToolButton;
258     IconToolButton: TToolButton;
259 yoffy 1.51 UpFolderButton: TToolButton;
260     Sepa01ToolButton: TToolButton;
261 yoffy 1.2 AllItemToolButton: TToolButton;
262 hi_ 1.1 LogItemToolButton: TToolButton;
263     NewItemToolButton: TToolButton;
264 yoffy 1.51 ListDownloadToolButton: TToolButton;
265 hi_ 1.1 ListThreadDownloadToolButton: TToolButton;
266 yoffy 1.51 ToolButton2: TToolButton;
267     ToolButton1: TToolButton;
268 yoffy 1.2 BrowserCoolBar: TGikoCoolBar;
269 hi_ 1.1 BrowserToolBar: TToolBar;
270 yoffy 1.51 BrowserSizeButton: TToolButton;
271 hi_ 1.1 ToolButton3: TToolButton;
272     TopButton: TToolButton;
273 yoffy 1.2 LastBotton: TToolButton;
274     NewButton: TToolButton;
275 yoffy 1.51 KokoButton: TToolButton;
276     ToolButton9: TToolButton;
277 yoffy 1.2 EditorButton: TToolButton;
278 hi_ 1.1 ToolButton11: TToolButton;
279     IEButton: TToolButton;
280 yoffy 1.51 ToolButton5: TToolButton;
281     ItemReloadButton: TToolButton;
282 hi_ 1.1 ListNameToolBar: TToolBar;
283 yoffy 1.51 ListNameLabel: TLabel;
284 hi_ 1.1 FolderImage: TImage;
285     BrowserNameToolBar: TToolBar;
286     ItemBoardImage: TImage;
287     BrowserBoardNameLabel: TLabel;
288 yoffy 1.51 ItemImage: TImage;
289     BrowserNameLabel: TLabel;
290     ActiveLogDeleteAction: TAction;
291     N24: TMenuItem;
292     D3: TMenuItem;
293     N25: TMenuItem;
294 hi_ 1.1 N26: TMenuItem;
295     ListNameBarVisibleAction: TAction;
296     D4: TMenuItem;
297     BrowserNameBarVisibleAction: TAction;
298     S3: TMenuItem;
299 yoffy 1.51 R2: TMenuItem;
300     TreeSelectNameURLCopy: TAction;
301     TreeSelectNameURLPupupMenu: TMenuItem;
302     N27: TMenuItem;
303 hi_ 1.1 H3: TMenuItem;
304     PaneInitAction: TAction;
305 yoffy 1.51 I1: TMenuItem;
306     BrowserTabToolBar: TToolBar;
307     BrowserTab: TTabControl;
308 hi_ 1.1 ToolButton7: TToolButton;
309 yoffy 1.2 BrowserMinAction: TAction;
310 yoffy 1.51 About1: TMenuItem;
311     N28: TMenuItem;
312     SelectTextClearAction: TAction;
313     MailTextClearAction: TAction;
314 hi_ 1.1 NameTextClearAction: TAction;
315 yoffy 1.51 S4: TMenuItem;
316 yoffy 1.2 N29: TMenuItem;
317     N30: TMenuItem;
318 hi_ 1.1 LeftmostTabSelectAction: TAction;
319 yoffy 1.51 LeftTabSelectAction: TAction;
320     RightTabSelectAction: TAction;
321     RightmostTabSelectAction: TAction;
322 yoffy 1.2 N31: TMenuItem;
323 hi_ 1.1 L5: TMenuItem;
324 yoffy 1.51 L6: TMenuItem;
325 hi_ 1.1 A7: TMenuItem;
326 yoffy 1.51 R3: TMenuItem;
327 hi_ 1.1 FavoriteMenu: TMenuItem;
328 yoffy 1.51 FavoriteAddAction: TAction;
329     N32: TMenuItem;
330 hi_ 1.1 BoardFavoriteAddMenu: TMenuItem;
331 yoffy 1.2 BoardFavoriteAddAction: TAction;
332 hi_ 1.1 ThreadFavoriteAddAction: TAction;
333     ThreadFavoriteAddMenu: TMenuItem;
334     TreeSelectFavoriteAddAction: TAction;
335 yoffy 1.2 N33: TMenuItem;
336 hi_ 1.1 TreeSelectFavoriteAddPupupMenu: TMenuItem;
337     FavoriteArrangeAction: TAction;
338     FavoriteTreeView: TTreeView;
339 yoffy 1.51 StateIconImageList: TImageList;
340     TopPanel: TPanel;
341     TopRightPanel: TPanel;
342     AnimePanel: TPanel;
343 hi_ 1.1 Animate: TAnimate;
344     TopCoolPanel: TPanel;
345 yoffy 1.51 MainCoolBar: TGikoCoolBar;
346     MenuToolBar: TToolBar;
347     StdToolBar: TToolBar;
348     RoundToolButton: TToolButton;
349     ToolButton6: TToolButton;
350 yoffy 1.2 CabinetToolButton: TToolButton;
351 yoffy 1.51 ToolButton4: TToolButton;
352 hi_ 1.1 ToolButton13: TToolButton;
353     AbortToolButton: TToolButton;
354     LoginToolButton: TToolButton;
355 yoffy 1.51 AddressToolBar: TToolBar;
356     AddressComboBox: TComboBox;
357     MoveToToolButton: TToolButton;
358 yoffy 1.2 MoveToAction: TAction;
359 yoffy 1.51 AddressImageList: TImageList;
360     AddressBarVisibleAction: TAction;
361     AddressToolBarMenu: TMenuItem;
362     T4: TMenuItem;
363 hi_ 1.1 BrowserTabVisibleAction: TAction;
364 yoffy 1.51 Show1: TMenuItem;
365     N34: TMenuItem;
366     BrowserTabTopAction: TAction;
367 yoffy 1.2 BrowserTabBottomAction: TAction;
368 hi_ 1.1 T5: TMenuItem;
369     B5: TMenuItem;
370 yoffy 1.51 N35: TMenuItem;
371     BrowserTabTabStyleAction: TAction;
372     BrowserTabButtonStyleAction: TAction;
373     BrowserTabFlatStyleAction: TAction;
374     A8: TMenuItem;
375     U2: TMenuItem;
376 hi_ 1.1 F1: TMenuItem;
377     PreviewTimer: TTimer;
378 yoffy 1.51 MonazillaWebPageAction: TAction;
379     MonazillaWebPageAction1: TMenuItem;
380 hi_ 1.1 GikoHelpAction: TAction;
381 yoffy 1.51 N36: TMenuItem;
382     H4: TMenuItem;
383     KotehanAction: TAction;
384     K3: TMenuItem;
385     LinkBarVisibleAction: TAction;
386     L7: TMenuItem;
387     N37: TMenuItem;
388     A9: TMenuItem;
389 yoffy 1.2 ChevronPopupMenu: TPopupMenu;
390 yoffy 1.51 BBS2chWebPageAction: TAction;
391 yoffy 1.2 N2N1: TMenuItem;
392 hi_ 1.1 N38: TMenuItem;
393     GikoFolderOpenAction: TAction;
394 yoffy 1.2 F2: TMenuItem;
395 yoffy 1.51 LinkToolBar: TToolBar;
396     a10: TMenuItem;
397     ToolButton8: TToolButton;
398 yoffy 1.2 ToolButton10: TToolButton;
399 yoffy 1.51 ThreadEditorAction: TAction;
400     N39: TMenuItem;
401     T6: TMenuItem;
402     N40: TMenuItem;
403 yoffy 1.2 LinkBarPopupMenu: TPopupMenu;
404 yoffy 1.51 ToolBarSettingAction: TAction;
405     T7: TMenuItem;
406     ToolButton12: TToolButton;
407     ToolButton14: TToolButton;
408     ThreadPopupMenu: TPopupMenu;
409     MenuItem4: TMenuItem;
410     MenuItem5: TMenuItem;
411     MenuItem6: TMenuItem;
412 yoffy 1.2 T8: TMenuItem;
413 yoffy 1.51 NameCopyAction: TAction;
414     BoardIEAction: TAction;
415     URLN3: TMenuItem;
416     SelectItemNameCopyAction: TAction;
417 yoffy 1.2 SelectItemNameCopyAction1: TMenuItem;
418 yoffy 1.51 B6: TMenuItem;
419     T9: TMenuItem;
420     C2: TMenuItem;
421     SelectComboBox: TComboBox;
422     MainCoolBarPopupMenu: TPopupMenu;
423     StdToolBarVisiblePMenu: TMenuItem;
424     AddressToolBarVisiblePMenu: TMenuItem;
425     LinkToolBarVisiblePMenu: TMenuItem;
426     NG1: TMenuItem;
427     NG2: TMenuItem;
428     N43: TMenuItem;
429     N44: TMenuItem;
430     L9: TMenuItem;
431     I3: TMenuItem;
432     N45: TMenuItem;
433     B9: TMenuItem;
434     R5: TMenuItem;
435     T12: TMenuItem;
436     Show3: TMenuItem;
437     N46: TMenuItem;
438     T13: TMenuItem;
439     B10: TMenuItem;
440     N47: TMenuItem;
441     A12: TMenuItem;
442     U4: TMenuItem;
443     F4: TMenuItem;
444     N48: TMenuItem;
445     T14: TMenuItem;
446     SelectItemToolButton: TToolButton;
447     SelectResToolButton: TToolButton;
448     SelectResAction: TAction;
449     ToolButton16: TToolButton;
450     AllResAction: TAction;
451     AllResToolButton: TToolButton;
452     N50: TMenuItem;
453     A11: TMenuItem;
454     S5: TMenuItem;
455     Reload: TMenuItem;
456     GoBack: TMenuItem;
457     GoFoward: TMenuItem;
458     EditAction: TAction;
459     ReloadAction: TAction;
460     GoFowardAction: TAction;
461     GoBackAction: TAction;
462     SelectComboBoxSplitter: TImage;
463     IndividualAbon1: TMenuItem;
464     N41: TMenuItem;
465     IndividualAbon2: TMenuItem;
466     N42: TMenuItem;
467     CancellIndividualAbon: TAction;
468     AntiIndividualAbon: TMenuItem;
469     N49: TMenuItem;
470     N51: TMenuItem;
471     N52: TMenuItem;
472     N53: TMenuItem;
473     SearchBoardName: TMenuItem;
474     N55: TMenuItem;
475     TreeSelectSearchBoardName: TAction;
476 yoffy 1.57 CabinetFavoriteAction: TAction;
477     N54: TMenuItem;
478     A13: TMenuItem;
479     FavoriteTreePopupMenu: TPopupMenu;
480     FavoriteTreeViewRenameAction: TAction;
481     FavoriteTreeRenamePopupMenu: TMenuItem;
482     FavoriteTreeViewNewFolderAction: TAction;
483     FavoriteTreeNewFolderPopupMenu: TMenuItem;
484     N56: TMenuItem;
485     FavoriteTreeViewDeleteAction: TAction;
486     FavoriteTreeDeletePopupMenu: TMenuItem;
487     FavoriteToolBar: TToolBar;
488     ToolButton17: TToolButton;
489     ToolButton19: TToolButton;
490 hi_ 1.1 procedure FormCreate(Sender: TObject);
491     procedure FormDestroy(Sender: TObject);
492     procedure CabinetPanelHide(Sender: TObject);
493     procedure FormClose(Sender: TObject; var Action: TCloseAction);
494     procedure TreeViewChange(Sender: TObject; Node: TTreeNode);
495     procedure ListViewData(Sender: TObject; Item: TListItem);
496     procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
497     const FindString: String; const FindPosition: TPoint;
498     FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
499     Wrap: Boolean; var Index: Integer);
500     procedure ListViewDataHint(Sender: TObject; StartIndex,
501     EndIndex: Integer);
502     procedure ListViewDataStateChange(Sender: TObject; StartIndex,
503     EndIndex: Integer; OldState, NewState: TItemStates);
504     procedure BrowserStatusTextChange(Sender: TObject;
505     const Text: WideString);
506     procedure BrowserTitleChange(Sender: TObject; const Text: WideString);
507     procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
508     procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
509     var AllowChange: Boolean);
510     procedure ListViewKeyDown(Sender: TObject; var Key: Word;
511     Shift: TShiftState);
512     procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
513     procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
514     Button: TToolButton; State: TCustomDrawState;
515     var DefaultDraw: Boolean);
516     procedure BrowserBeforeNavigate2(Sender: TObject;
517     const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
518     Headers: OleVariant; var Cancel: WordBool);
519     procedure ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
520     Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
521     var DefaultDraw: Boolean);
522     procedure TreeViewCustomDraw(Sender: TCustomTreeView;
523     const ARect: TRect; var DefaultDraw: Boolean);
524     procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
525     Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
526     procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
527     procedure TreeViewDblClick(Sender: TObject);
528 yoffy 1.57 procedure FavoriteTreeViewClick(Sender: TObject);
529 hi_ 1.1 procedure ListViewCustomDraw(Sender: TCustomListView;
530     const ARect: TRect; var DefaultDraw: Boolean);
531     procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
532     Shift: TShiftState; X, Y: Integer);
533     procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
534     procedure MessageListViewResize(Sender: TObject);
535     procedure ExitActionExecute(Sender: TObject);
536     procedure AllSelectActionExecute(Sender: TObject);
537     procedure StdToolBarVisibleActionExecute(Sender: TObject);
538     procedure MsgBarVisibleActionExecute(Sender: TObject);
539     procedure StatusBarVisibleActionExecute(Sender: TObject);
540     procedure LargeIconActionExecute(Sender: TObject);
541     procedure SmallIconActionExecute(Sender: TObject);
542     procedure ListIconActionExecute(Sender: TObject);
543     procedure DetailIconActionExecute(Sender: TObject);
544     procedure SearchActionExecute(Sender: TObject);
545     procedure OptionActionExecute(Sender: TObject);
546     procedure GikoNaviWebPageActionExecute(Sender: TObject);
547     procedure AboutActionExecute(Sender: TObject);
548     procedure Cabinet2chActionExecute(Sender: TObject);
549     procedure CabinetHistoryActionExecute(Sender: TObject);
550     procedure CabinetVisibleActionExecute(Sender: TObject);
551     procedure AllItemActionExecute(Sender: TObject);
552     procedure LogItemActionExecute(Sender: TObject);
553     procedure NewItemActionExecute(Sender: TObject);
554     procedure SelectItemActionExecute(Sender: TObject);
555     procedure ListNumberVisibleActionExecute(Sender: TObject);
556     procedure UpFolderActionExecute(Sender: TObject);
557     procedure IconStyleExecute(Sender: TObject);
558     procedure RoundActionExecute(Sender: TObject);
559     procedure StopActionExecute(Sender: TObject);
560     procedure MsgBarCloseActionExecute(Sender: TObject);
561     procedure BrowserMaxActionExecute(Sender: TObject);
562     procedure ScrollTopActionExecute(Sender: TObject);
563     procedure ScrollLastActionExecute(Sender: TObject);
564     procedure ScrollNewActionExecute(Sender: TObject);
565     procedure ScrollKokoActionExecute(Sender: TObject);
566     procedure EditorActionExecute(Sender: TObject);
567     procedure IEActionExecute(Sender: TObject);
568     procedure ShowThreadActionExecute(Sender: TObject);
569     procedure ShowBoardActionExecute(Sender: TObject);
570     procedure URLCopyActionExecute(Sender: TObject);
571     procedure ItemReloadActionExecute(Sender: TObject);
572     procedure SelectListReloadActionExecute(Sender: TObject);
573     procedure SelectThreadReloadActionExecute(Sender: TObject);
574     procedure SelectListReloadActionUpdate(Sender: TObject);
575     procedure AllItemActionUpdate(Sender: TObject);
576     procedure LogItemActionUpdate(Sender: TObject);
577     procedure NewItemActionUpdate(Sender: TObject);
578     procedure SelectItemActionUpdate(Sender: TObject);
579     procedure UpFolderActionUpdate(Sender: TObject);
580     procedure FormResize(Sender: TObject);
581     procedure ScrollTopActionUpdate(Sender: TObject);
582     procedure ScrollLastActionUpdate(Sender: TObject);
583     procedure ScrollNewActionUpdate(Sender: TObject);
584     procedure ScrollKokoActionUpdate(Sender: TObject);
585     procedure EditorActionUpdate(Sender: TObject);
586     procedure IEActionUpdate(Sender: TObject);
587     procedure ShowThreadActionUpdate(Sender: TObject);
588     procedure ShowBoardActionUpdate(Sender: TObject);
589     procedure SelectThreadReloadActionUpdate(Sender: TObject);
590     procedure ListViewSelectItem(Sender: TObject; Item: TListItem;
591     Selected: Boolean);
592     procedure SelectTimerTimer(Sender: TObject);
593 yoffy 1.51 procedure ItemReloadActionUpdate(Sender: TObject);
594 hi_ 1.1 procedure ListViewDblClick(Sender: TObject);
595 yoffy 1.51 procedure LogDeleteActionExecute(Sender: TObject);
596 hi_ 1.1 procedure KokomadeActionExecute(Sender: TObject);
597     procedure ZenbuActionExecute(Sender: TObject);
598 yoffy 1.51 procedure KokoResActionExecute(Sender: TObject);
599 hi_ 1.1 procedure ListPopupMenuPopup(Sender: TObject);
600     procedure SelectItemURLCopyActionExecute(Sender: TObject);
601     procedure SelectItemURLCopyActionUpdate(Sender: TObject);
602     procedure AllSelectActionUpdate(Sender: TObject);
603     procedure LogDeleteActionUpdate(Sender: TObject);
604     procedure BrowserTabCloseActionExecute(Sender: TObject);
605     procedure NotSelectTabCloseActionExecute(Sender: TObject);
606     procedure TreeSelectBoradReloadExecute(Sender: TObject);
607     procedure TreeSelectThreadReloadExecute(Sender: TObject);
608     procedure TreeSelectURLCopyExecute(Sender: TObject);
609     procedure TreePopupMenuPopup(Sender: TObject);
610     procedure ListToolBarVisibleActionExecute(Sender: TObject);
611     procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
612     procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
613     var Cancel: WordBool);
614     procedure ListSplitterCanResize(Sender: TObject; var NewSize: Integer;
615     var Accept: Boolean);
616     procedure ListSplitterMoved(Sender: TObject);
617     procedure BrowserTabChange(Sender: TObject);
618     procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
619     Shift: TShiftState; X, Y: Integer);
620     procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
621     State: TDragState; var Accept: Boolean);
622     procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
623     procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
624     Y: Integer);
625     procedure BrowserDocumentComplete(Sender: TObject;
626     const pDisp: IDispatch; var URL: OleVariant);
627     procedure SelectReservActionUpdate(Sender: TObject);
628     procedure RoundNamePopupMenuPopup(Sender: TObject);
629     procedure SelectNewRoundNameExecute(Sender: TObject);
630     procedure SelectDeleteRoundExecute(Sender: TObject);
631     procedure SelectReservActionExecute(Sender: TObject);
632     procedure NewBoardActionExecute(Sender: TObject);
633     procedure LoginActionExecute(Sender: TObject);
634     procedure KeySettingActionExecute(Sender: TObject);
635     procedure AllTabCloseActionExecute(Sender: TObject);
636 yoffy 1.51 procedure ArrangeActionExecute(Sender: TObject);
637     procedure NameURLCopyActionExecute(Sender: TObject);
638     procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
639 hi_ 1.1 procedure URLCopyActionUpdate(Sender: TObject);
640 yoffy 1.2 procedure NameURLCopyActionUpdate(Sender: TObject);
641 hi_ 1.1 procedure BrowserTabCloseActionUpdate(Sender: TObject);
642 yoffy 1.51 procedure NotSelectTabCloseActionUpdate(Sender: TObject);
643 hi_ 1.1 procedure AllTabCloseActionUpdate(Sender: TObject);
644     procedure SelectItemNameURLCopyActionUpdate(Sender: TObject);
645     procedure ActiveLogDeleteActionExecute(Sender: TObject);
646     procedure ActiveLogDeleteActionUpdate(Sender: TObject);
647 yoffy 1.51 procedure ListNameBarVisibleActionExecute(Sender: TObject);
648 hi_ 1.1 procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
649 yoffy 1.51 procedure TreeSelectNameURLCopyExecute(Sender: TObject);
650     procedure PaneInitActionExecute(Sender: TObject);
651 hi_ 1.1 procedure FormShow(Sender: TObject);
652     procedure BrowserTabToolBarResize(Sender: TObject);
653     procedure BrowserMinActionExecute(Sender: TObject);
654 yoffy 1.51 procedure SelectTextClearActionExecute(Sender: TObject);
655 hi_ 1.1 procedure NameTextClearActionExecute(Sender: TObject);
656 yoffy 1.51 procedure MailTextClearActionExecute(Sender: TObject);
657     procedure LeftmostTabSelectActionExecute(Sender: TObject);
658     procedure LeftTabSelectActionExecute(Sender: TObject);
659 hi_ 1.1 procedure RightTabSelectActionExecute(Sender: TObject);
660     procedure RightmostTabSelectActionExecute(Sender: TObject);
661     procedure LeftmostTabSelectActionUpdate(Sender: TObject);
662     procedure LeftTabSelectActionUpdate(Sender: TObject);
663     procedure RightTabSelectActionUpdate(Sender: TObject);
664     procedure RightmostTabSelectActionUpdate(Sender: TObject);
665     procedure FavoriteMenuClick(Sender: TObject);
666     procedure FavoriteAddActionExecute(Sender: TObject);
667     procedure FavoriteAddActionUpdate(Sender: TObject);
668     procedure BoardFavoriteAddActionExecute(Sender: TObject);
669     procedure BoardFavoriteAddActionUpdate(Sender: TObject);
670 yoffy 1.51 procedure ThreadFavoriteAddActionExecute(Sender: TObject);
671 hi_ 1.1 procedure ThreadFavoriteAddActionUpdate(Sender: TObject);
672 yoffy 1.51 procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
673 yoffy 1.2 procedure FavoriteArrangeActionExecute(Sender: TObject);
674     procedure MainCoolBarResize(Sender: TObject);
675 hi_ 1.1 procedure MoveToActionExecute(Sender: TObject);
676 yoffy 1.2 procedure AddressToolBarResize(Sender: TObject);
677 hi_ 1.1 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
678     Shift: TShiftState);
679 yoffy 1.51 procedure AddressBarVisibleActionExecute(Sender: TObject);
680 yoffy 1.2 procedure BrowserEnter(Sender: TObject);
681 hi_ 1.1 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
682 yoffy 1.51 procedure BrowserTabVisibleActionExecute(Sender: TObject);
683     procedure BrowserTabTopActionExecute(Sender: TObject);
684     procedure BrowserTabBottomActionExecute(Sender: TObject);
685     procedure BrowserTabTabStyleActionExecute(Sender: TObject);
686 hi_ 1.1 procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
687 yoffy 1.51 procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
688 hi_ 1.1 procedure PreviewTimerTimer(Sender: TObject);
689     procedure MessageHideButtonClick(Sender: TObject);
690     procedure MonazillaWebPageActionExecute(Sender: TObject);
691     procedure GikoHelpActionExecute(Sender: TObject);
692     procedure ToolButton18Click(Sender: TObject);
693     procedure KotehanActionExecute(Sender: TObject);
694 yoffy 1.51 procedure LinkBarVisibleActionExecute(Sender: TObject);
695     procedure BBS2chWebPageActionExecute(Sender: TObject);
696     procedure GikoFolderOpenActionExecute(Sender: TObject);
697 yoffy 1.2 procedure MainCoolBarBandInfo(Sender: TObject;
698     var BandInfo: PReBarBandInfoA);
699     procedure MainCoolBarChevronClick(Sender: TObject;
700 yoffy 1.51 RebarChevron: PNMRebarChevron);
701     procedure ListCoolBarBandInfo(Sender: TObject;
702     var BandInfo: PReBarBandInfoA);
703     procedure ListCoolBarChevronClick(Sender: TObject;
704     RebarChevron: PNMRebarChevron);
705     procedure BrowserCoolBarBandInfo(Sender: TObject;
706     var BandInfo: PReBarBandInfoA);
707 yoffy 1.2 procedure BrowserCoolBarChevronClick(Sender: TObject;
708 yoffy 1.51 RebarChevron: PNMRebarChevron);
709     procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
710     procedure ThreadEditorActionExecute(Sender: TObject);
711 yoffy 1.2 procedure ThreadEditorActionUpdate(Sender: TObject);
712 yoffy 1.51 procedure ToolBarSettingActionExecute(Sender: TObject);
713     procedure NameCopyActionExecute(Sender: TObject);
714     procedure BoardIEActionExecute(Sender: TObject);
715     procedure SelectItemNameCopyActionExecute(Sender: TObject);
716 yoffy 1.2 procedure SelectItemNameCopyActionUpdate(Sender: TObject);
717 yoffy 1.51 procedure BoardIEActionUpdate(Sender: TObject);
718     procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
719     WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
720     procedure NameCopyActionUpdate(Sender: TObject);
721     procedure SelectComboBoxChange(Sender: TObject);
722     procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
723     Shift: TShiftState);
724     procedure SelectComboBoxExit(Sender: TObject);
725     procedure NG1Click(Sender: TObject);
726     procedure SelectResActionExecute(Sender: TObject);
727     procedure SelectResActionUpdate(Sender: TObject);
728     procedure FormKeyDown(Sender: TObject; var Key: Word;
729     Shift: TShiftState);
730     procedure FormKeyUp(Sender: TObject; var Key: Word;
731     Shift: TShiftState);
732     procedure AllResActionExecute(Sender: TObject);
733     procedure AllResActionUpdate(Sender: TObject);
734     procedure ReloadClick(Sender: TObject);
735     procedure GoBackClick(Sender: TObject);
736     procedure GoFowardClick(Sender: TObject);
737     procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
738     var Handled: Boolean);
739     procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
740     var Handled: Boolean);
741     procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
742     var Handled: Boolean);
743     procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
744     Shift: TShiftState; X, Y: Integer);
745     procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
746     Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
747     procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
748     Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
749     procedure StatusBarResize(Sender: TObject);
750     procedure IndividualAbon1Click(Sender: TObject);
751     procedure IndividualAbon2Click(Sender: TObject);
752     procedure N42Click(Sender: TObject);
753     procedure SelectComboBoxEnter(Sender: TObject);
754     procedure AntiIndividualAbonClick(Sender: TObject);
755     procedure N51Click(Sender: TObject);
756     procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
757 yoffy 1.57 procedure CabinetFavoriteActionExecute(Sender: TObject);
758     procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X,
759     Y: Integer; State: TDragState; var Accept: Boolean);
760     procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
761     Y: Integer);
762     procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
763     var S: String);
764     procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
765     Shift: TShiftState);
766     procedure FavoriteTreePopupMenuPopup(Sender: TObject);
767     procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
768     procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
769     procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
770     procedure ToolButton19Click(Sender: TObject);
771 hi_ 1.1 private
772     { Private 鐃緒申鐃緒申 }
773    
774     FSortIndex: Integer;
775     FSortOrder: Boolean;
776    
777     FEnabledCloseButton: Boolean;
778     // ThreadCreate: TThreadCreate;
779    
780     FClickNode: TTreeNode;
781     FHttpState: Boolean;
782     FHint: TResPopup;
783     FPreviewBrowser: TPreviewBrowser;
784     FPreviewURL: string;
785    
786     FBrowserSizeHeight: Integer;
787     FBrowserSizeWidth: Integer;
788    
789     // FFavorite: TFavorite;
790     FBrowserComplete: Boolean;
791     FTabHintIndex: Integer;
792     FListStyle: TViewStyle; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
793     FItemNoVisible: Boolean; //鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?
794     FViewType: TGikoViewType; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?
795     FActiveList: TObject;
796     FActiveContent: TThreadItem; //
797     FHistoryList: TList; //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
798     FTreeType: TGikoTreeType;
799     FWorkCount: Integer;
800     FNameCookie: string;
801     FMailCookie: string;
802     // FLastRoundTime: TDateTime;
803     BrowserNullTab: TThreadItem;
804     // DoubleClickOccurred: array [TMouseButton] of Boolean;
805     FDownloadTitle: string; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
806     FDownloadMax: Integer; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?
807     FEvent: THTMLDocumentEventSink;//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?
808 h677 1.14
809 yoffy 1.51 Fkeynum : Integer; //鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
810 yoffy 1.29
811 yoffy 1.51 IsDraggingSelectComboBox : Boolean;
812     DraggingSelectComboBoxPosition : TPoint;
813 yoffy 1.29
814 yoffy 1.54 FSearchDialog: TSearchDialog;
815 yoffy 1.49
816 hi_ 1.1 procedure SetBoardTreeNode;
817     function SetCategoryListItem(ABBS2ch: TBBS2ch): Integer;
818     function SetBoardListItem(Category: TCategory): Integer;
819     function SetThreadListItem(Board: TBoard): Integer;
820     // function GetRoundName(index: integer): string;
821    
822     procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
823     procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
824     procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer);
825     procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
826     procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
827    
828     procedure SetActiveList(Obj: TObject);
829     procedure ListClick;
830     procedure ListDoubleClick;
831     procedure BrowserMovement(AName: string);
832     procedure SelectListItem(List: TList);
833     // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
834     procedure DeleteTab(ThreadItem: TThreadItem);
835     function Hook(var Message: TMessage): Boolean;
836     procedure AddRoundNameMenu(MenuItem: TMenuItem);
837     procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
838     procedure SetSelectRoundName(Sender: TObject);
839     function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
840    
841     procedure SetMenuFont;
842     // procedure CreateFavMenu(Folder: TFavoriteFolder);
843     procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
844     procedure FavoriteClick(Sender: TObject);
845 yoffy 1.2 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
846 hi_ 1.1 function OnDocumentContextMenu(Sender: TObject): WordBool;
847     // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
848     procedure SetResPopupText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean);
849     procedure ShowTextPopup;
850     //procedure ShowTextPopup(HintData: THintData);
851 yoffy 1.2 // procedure SetStdToolBar;
852     // function GetAction(ActionName: string): TContainedAction;
853 hi_ 1.1 procedure SetLinkBar;
854     function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
855 yoffy 1.2 procedure MenuBarChevronMenu;
856     procedure LinkBarChevronMenu;
857     procedure ToolBarChevronMenu(ToolBar: TToolBar);
858 yoffy 1.51 procedure ModifySelectList;
859 hi_ 1.1 protected
860     procedure CreateParams(var Params: TCreateParams); override;
861 yoffy 1.2 procedure WndProc(var Message: TMessage); override;
862 hi_ 1.1 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
863     procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
864     procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
865     public
866     { Public 鐃緒申鐃緒申 }
867     // FDownload: TDownload;
868     FControlThread: TThreadControl;
869 yoffy 1.48 procedure MoveToURL(URL: string);
870     procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
871 hi_ 1.1 procedure ReloadBBS;
872     function GetHttpState: Boolean;
873     procedure SetEnabledCloseButton(Enabled: Boolean);
874     function GetTreeNode(Data: TObject): TTreeNode;
875     procedure AppFormDeactivate(Sender: TObject);
876     // procedure CabinetPanelVisible(PanelVisible: Boolean);
877     procedure ListViewAllSelect;
878    
879     property ListStyle: TViewStyle read FListStyle write FListStyle;
880     property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
881     property ViewType: TGikoViewType read FViewType write FViewType;
882    
883     property NameCookie: string read FNameCookie write FNameCookie;
884     property MailCookie: string read FMailCookie write FMailCookie;
885    
886     procedure SetContent(ThreadItem: TThreadItem);
887     function GetActiveContent: TThreadItem;
888     function GetActiveList: TObject;
889    
890     property ActiveList: TObject read GetActiveList write SetActiveList;
891     // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
892    
893     procedure SetListViewType(AViewType: TGikoViewType); overload;
894     procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
895     procedure DownloadContent(ThreadItem: TThreadItem);
896     procedure DownloadList(Board: TBoard);
897     procedure PlaySound(SoundEventName: string);
898    
899     function AddHistory(ThreadItem: TThreadItem): Boolean;
900     procedure DeleteHistory(ThreadItem: TThreadItem);
901     procedure ClearHistory;
902     procedure Show2chTree;
903     procedure ShowHistoryTree;
904     procedure SetHistoryTreeNode;
905     // procedure SelectTreeNode(Item: TObject);
906     procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
907     procedure SetBrowserTabState;
908     // property Favorite: TFavorite read FFavorite write FFavorite;
909 yoffy 1.2 procedure SetToolBarPopup;
910 hi_ 1.1 published
911     property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
912     end;
913    
914     TFavoriteMenuItem = class(TMenuItem)
915     private
916     FData : Pointer;
917     public
918     property Data: Pointer read FData write FData;
919     end;
920    
921     TLinkToolButton = class(TToolButton)
922     private
923     FData : Pointer;
924     public
925     property Data: Pointer read FData write FData;
926     end;
927    
928     var
929     GikoForm: TGikoForm;
930    
931     implementation
932    
933     uses
934     About, Option, Round, Splash, Sort, ListSelect,
935 yoffy 1.54 NewBoard;
936 hi_ 1.1
937     const
938     CAPTION_NAME: string = '鐃?鐃?鐃?鐃?';
939     BLANK_HTML: string = 'about:blank';
940 yoffy 1.51 SELECTCOMBOBOX_NAME: string = ''; // '鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申';
941     SELECTCOMBOBOX_COLOR: TColor = clWindow;
942 hi_ 1.1
943 yoffy 1.2 //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
944     ITEM_ICON_2CH1 = 0; //2ch鐃?鐃?鐃?鐃緒申
945     ITEM_ICON_2CH2 = 1; //2ch鐃?鐃?鐃?鐃緒申
946     ITEM_ICON_CATEGORY1 = 2; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
947     ITEM_ICON_CATEGORY2 = 3; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
948     ITEM_ICON_BOARD1 = 4; //鐃緒申鐃?鐃?鐃?鐃緒申
949     ITEM_ICON_BOARD2 = 5; //鐃緒申鐃?鐃?鐃?鐃緒申
950     ITEM_ICON_THREADLOG1 = 6; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
951     ITEM_ICON_THREADLOG2 = 7; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
952     ITEM_ICON_THREAD1 = 8; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
953     ITEM_ICON_THREAD2 = 9; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
954     ITEM_ICON_THREADNEW1 = 10; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
955     ITEM_ICON_THREADNEW2 = 11; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
956     ITEM_ICON_SORT1 = 12; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
957     ITEM_ICON_SORT2 = 13; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
958    
959     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
960 yoffy 1.48 TOOL_ICON_HEIGHT_MAX = 16; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
961     TOOL_ICON_HEIGHT_MIN = 17; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
962     TOOL_ICON_HEIGHT_NORMAL = 18; //鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
963     TOOL_ICON_WIDTH_MAX = 19; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
964     TOOL_ICON_WIDTH_MIN = 20; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
965     TOOL_ICON_WIDTH_NORMAL = 21; //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
966    
967 yoffy 1.51 TOOL_ICON_FAV_FOLDER = 30; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申
968     TOOL_ICON_FAV_BOARD = 31; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
969     TOOL_ICON_FAV_THREAD = 32; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
970 hi_ 1.1
971     HTML_FILE_NAME = 'temp_preview.html';
972    
973     {$R *.DFM}
974    
975     procedure TGikoForm.CreateParams(var Params: TCreateParams);
976     begin
977     inherited;
978     if FormStyle in [fsNormal, fsStayOnTop] then begin
979     if BorderStyle in [bsSingle, bsSizeable] then begin
980     Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
981     Params.WndParent := 0;
982     end;
983     end;
984     end;
985    
986     procedure TGikoForm.FormCreate(Sender: TObject);
987     const
988     TVS_NOTOOLTIPS = $0080;
989     var
990     FileName: string;
991     Style: DWORD;
992     msg: string;
993     i: Integer;
994     wp: TWindowPlacement;
995 hi_ 1.32 s: string;
996 hi_ 1.1 begin
997     {$IFDEF DEBUG}
998     AllocConsole;
999     Writeln('============================================================');
1000     Writeln(' 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃? 鐃?鐃緒申鐃?鐃?鐃緒申');
1001     Writeln('');
1002     Writeln(' 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?');
1003     Writeln(' 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
1004     Writeln('============================================================');
1005     {$ENDIF}
1006     Application.OnDeactivate := AppFormDeactivate;
1007     Self.OnDeactivate := AppFormDeactivate;
1008     Application.HookMainWindow(Hook);
1009    
1010     FTreeType := gttNone;
1011    
1012 yoffy 1.51 FSearchDialog := nil;
1013 yoffy 1.49
1014 hi_ 1.1 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1015     Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1016    
1017     //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1018     RoundList := TRoundList.Create;
1019     RoundList.LoadRoundFile;
1020    
1021     //BBS鐃緒申鐃緒申
1022     BBS2ch := TBBS2ch.Create(GikoSys.Setting.LogFolder);
1023    
1024     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1025     // FFavorite := TFavorite.Create(FavoriteTreeView);
1026     FavoriteDM.SetFavTreeView(FavoriteTreeView);
1027     FavoriteDM.ReadFavorite;
1028    
1029     //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1030     AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1031    
1032     EnabledCloseButton := True;
1033     BoardGroup.BBS2ch.ReadBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1034     // SetBoardTreeNode; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1035     Show2chTree;
1036    
1037     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1038     ListView.ViewStyle := GikoSys.Setting.ListStyle;
1039    
1040     //鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1041     // MainCoolBar.Top := 0;
1042     // MainCoolBar.Left := 0;
1043    
1044     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
1045     AnimePanel.Top := 0;
1046     AnimePanel.Left := 0;
1047    
1048     //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1049    
1050     //鐃?鐃緒申鐃?鐃?鐃?鐃?
1051     CabinetVisibleAction.Checked := not GikoSys.Setting.CabinetVisible;
1052     CabinetVisibleAction.Execute;
1053     CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1054    
1055     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1056     MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1057     MsgBarVisibleActionExecute(nil);
1058     MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1059    
1060     //鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1061     StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1062     StatusBarVisibleActionExecute(nil);
1063    
1064     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1065     TreeView.Items.BeginUpdate;
1066     ListView.Items.BeginUpdate;
1067     try
1068     TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1069     TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1070     TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1071     TreeView.Color := GikoSys.Setting.CabinetBackColor;
1072    
1073     ListView.Font.Name := GikoSys.Setting.ListFontName;
1074     ListView.Font.Size := GikoSys.Setting.ListFontSize;
1075     ListView.Font.Color := GikoSys.Setting.ListFontColor;
1076     ListView.Color := GikoSys.Setting.ListBackColor;
1077     finally
1078     TreeView.Items.EndUpdate;
1079     ListView.Items.EndUpdate;
1080     end;
1081     //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1082     ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1083    
1084     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1085     BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1086     BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1087    
1088    
1089     // TreeView.TopItem.Expanded := True; //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1090     // TreeView.Selected := TreeView.Items[0]; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1091     SetContent(nil); //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1092    
1093     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1094     wp.length := sizeof(wp);
1095     wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1096     wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1097     wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1098     wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1099     wp.showCmd := SW_HIDE;
1100     SetWindowPlacement(Handle, @wp);
1101    
1102     // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1103     // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1104     if GikoSys.Setting.WindowMax then
1105     WindowState := wsMaximized;
1106    
1107     //鐃?鐃?鐃?鐃?鐃緒申
1108     try
1109     FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1110     if FileExists(FileName) then
1111     Animate.FileName := FileName;
1112     except
1113     end;
1114     // AnimePanel.Height := 26;
1115     // AnimePanel.Width := 39;
1116     // AnimePanel.Top := 2;
1117     // AnimePanel.Left := Width - 48;
1118    
1119     //鐃?鐃?鐃?鐃?
1120     FNameCookie := '';
1121     FMailCookie := '';
1122    
1123     //鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1124     AllItemAction.Checked := True;
1125 yoffy 1.51 AllResAction.Checked := True;
1126 hi_ 1.1
1127     //TreeView鐃緒申鐃緒申鐃緒申鐃?鐃緒申ToolTip鐃緒申鐃緒申鐃?鐃緒申
1128     Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1129     Style := Style or TVS_NOTOOLTIPS;
1130     SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1131    
1132     // 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1133     TreeView.Align := alClient;
1134 yoffy 1.57 FavoriteTreeView.Align := alClient;
1135 hi_ 1.1 FavoriteTreeView.Visible := False;
1136    
1137     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1138     // FBrowserSizeFlag := False;
1139     // FBrowserSizeHeight := ViewPanel.Height;
1140    
1141     FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1142     FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1143    
1144     ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1145     ArrangeAction.Execute;
1146    
1147     if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1148     case GikoSys.Setting.ListWidthState of
1149     glsMax: begin
1150     ViewPanel.Width := 1;
1151 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1152     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1153 hi_ 1.1 end;
1154     glsMin: begin
1155     ViewPanel.Width := GikoSys.Setting.ListWidth;
1156 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1157     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1158 hi_ 1.1 end;
1159     else begin
1160     ViewPanel.Width := GikoSys.Setting.ListWidth;
1161 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1162     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1163 hi_ 1.1 end;
1164     end;
1165     // if GikoSys.Setting.ListWidthMax then begin
1166     // ViewPanel.Width := 1;
1167     // BrowserSizeAction.ImageIndex := ICON_WIDTH_MIN;
1168     // end else begin
1169     // ViewPanel.Width := GikoSys.Setting.ListWidth;
1170     // BrowserSizeAction.ImageIndex := ICON_WIDTH_MAX;
1171     // end;
1172     end else begin
1173     case GikoSys.Setting.ListHeightState of
1174     glsMax: begin
1175     ViewPanel.Height := 1;
1176 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1177     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1178 hi_ 1.1 end;
1179     glsMin: begin
1180     ViewPanel.Height := GikoSys.Setting.ListHeight;
1181 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1182     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1183 hi_ 1.1 end;
1184     else begin
1185     ViewPanel.Height := GikoSys.Setting.ListHeight;
1186 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1187     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1188 hi_ 1.1 end;
1189     end;
1190     // if GikoSys.Setting.ListHeightState = glsMax then begin
1191     // end else begin
1192     // ViewPanel.Height := GikoSys.Setting.ListHeight;
1193     // BrowserSizeAction.ImageIndex := ICON_HEIGHT_MAX;
1194     // end;
1195     end;
1196    
1197     //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1198     // ProgressBar.Visible := False;
1199     ProgressBar.Parent := StatusBar;
1200     ProgressBar.Top := 2;
1201     ProgressBar.Left := 0;
1202     ProgressBar.Width := StatusBar.Panels[0].Width;
1203     ProgressBar.Height := StatusBar.Height - 2;
1204     ProgressBar.Position := 0;
1205    
1206     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1207     //formshow()鐃緒申鐃緒申鐃緒申
1208 yoffy 1.2
1209 hi_ 1.1 //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1210     // FDownload := TDownload.Create;
1211     // FDownload.OnDownloadEnd := OnDonloadEnd;
1212     // FDownload.OnWork := Work;
1213     // FDownload.OnWorkBegin := WorkBegin;
1214     // FDownload.OnWorkEnd := WorkEnd;
1215    
1216     //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1217     FControlThread := TThreadControl.Create(True);
1218     FControlThread.MaxThreadCount := 1;
1219     FControlThread.Resume;
1220     FControlThread.OnDownloadEnd := DownloadEnd;
1221     FControlThread.OnDownloadMsg := DownloadMsg;
1222     FControlThread.OnWork := Work;
1223     FControlThread.OnWorkBegin := WorkBegin;
1224     FControlThread.OnWorkEnd := WorkEnd;
1225     // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1226    
1227     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1228     FHistoryList := TList.Create;
1229    
1230 yoffy 1.51 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1231     SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1232 yoffy 1.2
1233 hi_ 1.1 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
1234     SetBrowserTabState;
1235    
1236     BrowserBoardNameLabel.Caption := '';
1237     BrowserNameLabel.Caption := '';
1238     FWorkCount := 0;
1239    
1240     // DetailIconAction.Execute;
1241    
1242     // FBrowserSizeHeight := ViewPanel.Height;
1243     FTabHintIndex := -1;
1244    
1245     //鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1246     // if not GikoSys.DirectoryExistsEx(BBS2ch.GetLogFolder) then begin
1247     // GikoSys.ForceDirectoriesEx(BBS2ch.GetLogFolder);
1248     // end;
1249     // FormResize(Sender);
1250     // MainCoolBarResize(Sender);
1251     // Application.ProcessMessages;
1252    
1253     //鐃緒申鐃緒申鐃?鐃?鐃?
1254     SetLinkBar;
1255    
1256     //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?
1257     SetMenuFont;
1258    
1259     //鐃?鐃?鐃緒申鐃?鐃?Wrapable
1260     ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1261     BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1262    
1263 yoffy 1.2 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1264     ReadToolBarSetting(ActionList, StdToolBar);
1265     ReadToolBarSetting(ActionList, ListToolBar);
1266 yoffy 1.51 try
1267     for i := ListToolBar.ControlCount - 1 downto 0 do
1268     begin
1269     if ListToolBar.Controls[ i ].Action = SelectItemAction then
1270     begin
1271     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1272     if (i + 1) < ListToolBar.ControlCount then
1273     if ListToolBar.Controls[ i + 1 ] is TToolButton then
1274     if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1275     ListToolBar.Controls[ i + 1 ].Visible := False;
1276    
1277     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申
1278     ListToolBar.Controls[ i ].Visible := False;
1279     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申
1280     SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1281     SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1282     SelectComboBox.Parent := ListToolBar;
1283     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
1284     SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1285     SelectComboBoxSplitter.Parent := ListToolBar;
1286    
1287     break;
1288     end;
1289     end;
1290     except
1291     end;
1292 yoffy 1.2 ReadToolBarSetting(ActionList, BrowserToolBar);
1293     SetToolBarPopup;
1294    
1295 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃?鐃?
1296     AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1297    
1298 yoffy 1.2 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1299    
1300     //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1301     if not FileExists(GikoSys.GetBoardFileName) then begin
1302     msg := '鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申' + #13#10#13#10
1303     + '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申' + #13#10
1304     + '鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?';
1305     MsgBox(SplashWindow.Handle, msg, '鐃?鐃?鐃?鐃?', MB_OK or MB_ICONINFORMATION);
1306     NewBoardAction.Execute;
1307     end;
1308    
1309     //鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1310     GikoSys.LoadKeySetting(ActionList);
1311    
1312     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1313     // FLastRoundTime := 0;
1314    
1315     //ResHint
1316     FHint := TResPopup.Create(Self);
1317    
1318     //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1319     if GikoSys.Setting.AutoLogin then
1320     LoginAction.Execute;
1321    
1322     //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?
1323     for i := 1 to ParamCount do begin
1324     MoveToURL(ParamStr(i));
1325     end;
1326     // SetStdToolBar;
1327     // SetLinkBar;
1328 h677 1.22
1329 hi_ 1.32 s := GikoSys.FAbon.NGwordname;
1330     StatusBar.Panels[2].Text := s;
1331     StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1332     StatusBarResize(Sender);
1333 yoffy 1.2 end;
1334    
1335     //
1336     //
1337     //
1338     procedure TGikoForm.FormShow(Sender: TObject);
1339     var
1340     i: Integer;
1341     CoolSet: TCoolSet;
1342     begin
1343     ShowWindow(Application.Handle, SW_HIDE);
1344    
1345     //FormCreate鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1346     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1347     StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1348     StdToolBarVisibleActionExecute( nil );
1349     AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1350     AddressBarVisibleActionExecute( nil );
1351     LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1352     LinkBarVisibleActionExecute( nil );
1353     ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1354     ListToolBarVisibleActionExecute( nil );
1355     ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1356     ListNameBarVisibleActionExecute( nil );
1357     BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1358     BrowserToolBarVisibleActionExecute( nil );
1359     BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1360     BrowserNameBarVisibleActionExecute( nil );
1361    
1362     //鐃?鐃緒申鐃?鐃?鐃?鐃?
1363     BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1364     BrowserTabVisibleActionExecute(nil);
1365    
1366     if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1367     BrowserTabTopAction.Checked := True;
1368     BrowserTabTopActionExecute(nil);
1369     end else begin
1370     BrowserTabBottomAction.Checked := True;
1371     BrowserTabBottomActionExecute(nil);
1372     end;
1373    
1374     if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1375     BrowserTabTabStyleAction.Checked := True;
1376     BrowserTabTabStyleActionExecute(nil);
1377     end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1378     BrowserTabButtonStyleAction.Checked := True;
1379     BrowserTabButtonStyleActionExecute(nil);
1380     end else begin
1381     BrowserTabFlatStyleAction.Checked := True;
1382     BrowserTabFlatStyleActionExecute(nil);
1383     end;
1384    
1385    
1386 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1387     MainCoolBar.Bands.BeginUpdate;
1388     try
1389     for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1390     CoolSet := GikoSys.Setting.MainCoolSet[i];
1391     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1392     Continue;
1393     MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1394     MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1395     MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1396     end;
1397     finally
1398     MainCoolBar.Bands.EndUpdate;
1399     end;
1400    
1401     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1402     ListCoolBar.Bands.BeginUpdate;
1403     try
1404     for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1405     CoolSet := GikoSys.Setting.ListCoolSet[i];
1406     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1407     Continue;
1408     ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1409     ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1410     ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1411     end;
1412     finally
1413     ListCoolBar.Bands.EndUpdate;
1414     end;
1415    
1416     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1417     BrowserCoolBar.Bands.BeginUpdate;
1418     try
1419     for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1420     CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1421     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1422     Continue;
1423     BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1424     BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1425     BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1426     end;
1427     finally
1428     BrowserCoolBar.Bands.EndUpdate;
1429     end;
1430    
1431     end;
1432 yoffy 1.2 {
1433 hi_ 1.1 procedure TGikoForm.SetStdToolBar;
1434     var
1435     i: Integer;
1436     FileName: string;
1437     ini: TMemIniFile;
1438     s: string;
1439     Action: TContainedAction;
1440     ToolButton: TToolButton;
1441     begin
1442     exit;
1443     for i := StdToolBar.ButtonCount - 1 downto 0 do begin
1444     StdToolBar.RemoveControl(StdToolBar.Buttons[i]);
1445     //StdToolBar.Buttons[i].Free;
1446     end;
1447     FileName := GikoSys.GetConfigDir + 'ToolBar.ini';
1448     ini := TMemIniFile.Create(FileName);
1449     i := 0;
1450     while true do begin
1451     s := ini.ReadString('StdToolBar', IntToStr(i), '');
1452     if s = '' then
1453     Break;
1454     if s = '-' then begin
1455     ToolButton := TToolButton.Create(StdToolBar);
1456     ToolButton.Style := tbsSeparator;
1457     ToolButton.Width := 8;
1458     ToolButton.Left := 10000;
1459     StdToolBar.InsertControl(ToolButton);
1460     end else begin
1461     Action := GetAction(s);
1462     if Action <> nil then begin
1463     ToolButton := TToolButton.Create(StdToolBar);
1464     ToolButton.Action := Action;
1465     ToolButton.Left := 10000;
1466     StdToolBar.InsertControl(ToolButton);
1467     end;
1468     end;
1469     Inc(i);
1470     end;
1471     end;
1472 yoffy 1.2 }
1473     {function TGikoForm.GetAction(ActionName: string): TContainedAction;
1474 hi_ 1.1 var
1475     i: Integer;
1476     begin
1477     for i := 0 to ActionList.ActionCount - 1 do begin
1478     if ActionList.Actions[i].Name = ActionName then begin
1479     Result := ActionList.Actions[i];
1480     Exit;
1481     end;
1482     end;
1483     Result := nil;
1484 yoffy 1.2 end;}
1485 hi_ 1.1
1486     procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1487     var
1488     i: Integer;
1489     CoolSet: TCoolSet;
1490     wp: TWindowPlacement;
1491     begin
1492 yoffy 1.2 // if not EnabledCloseButton then begin
1493     // CanClose := False;
1494     // Exit;
1495     // end;
1496    
1497 hi_ 1.1 CanClose := True;
1498     Application.OnDeactivate := nil;
1499     Self.OnDeactivate := nil;
1500    
1501 yoffy 1.2 //column鐃緒申
1502     if GetActiveList is TBBS2ch then begin
1503     for i := 0 to ListView.Columns.Count - 1 do
1504     GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1505     end else if GetActiveList is TCategory then begin
1506     for i := 0 to ListView.Columns.Count - 1 do
1507     GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1508     end else if GetActiveList is TBoard then begin
1509     for i := 0 to ListView.Columns.Count - 1 do
1510     GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1511     end;
1512    
1513     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1514     wp.length := sizeof(wp);
1515     GetWindowPlacement(Handle, @wp);
1516     GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1517     GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1518     GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1519     GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1520     GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1521    
1522     GikoSys.Setting.ListStyle := ListView.ViewStyle;
1523     GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1524     GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1525     GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1526     GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1527     if ArrangeAction.Checked then
1528     GikoSys.Setting.ListOrientation := gloVertical
1529     else
1530     GikoSys.Setting.ListOrientation := gloHorizontal;
1531     GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1532    
1533     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1534     for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1535     CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1536     CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1537     CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1538     GikoSys.Setting.MainCoolSet[i] := CoolSet;
1539     end;
1540     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1541     for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1542     CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1543     CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1544     CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1545     GikoSys.Setting.ListCoolSet[i] := CoolSet;
1546     end;
1547     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1548     for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1549     CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1550     CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1551     CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1552     GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1553 hi_ 1.1 end;
1554    
1555 yoffy 1.2 GikoSys.Setting.WriteWindowSettingFile;
1556     GikoSys.Setting.WriteNameMailSettingFile;
1557    
1558     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1559 hi_ 1.1 try
1560 yoffy 1.2 FavoriteDM.WriteFavorite;
1561 hi_ 1.1 except
1562     end;
1563 yoffy 1.2 // Favorite.Free;
1564 hi_ 1.1
1565     try
1566     //鐃?鐃?鐃?鐃緒申鐃?鐃?
1567     NotSelectTabCloseAction.Execute;
1568     if BrowserTab.Tabs.Count >= 1 then begin
1569     DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1570     end;
1571     except
1572     end;
1573    
1574     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申&鐃?鐃緒申
1575     try
1576     RoundList.SaveRoundFile;
1577     except
1578     end;
1579     try
1580     RoundList.Clear;
1581     except
1582     end;
1583     try
1584     RoundList.Free;
1585     except
1586     end;
1587    
1588     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1589     try
1590     FHistoryList.Free;
1591     except
1592     end;
1593    
1594     //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1595     try
1596     AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1597     except
1598     end;
1599    
1600     try
1601     FControlThread.Terminate;
1602     except
1603     end;
1604    
1605     // FDownload.Free;
1606     try
1607     SetActiveList(nil);
1608     except
1609     end;
1610     //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1611     Sleep(10);
1612     try
1613     TreeView.Items.Clear;
1614     except
1615     end;
1616    
1617     try
1618     if FavoriteDM <> nil then
1619     FavoriteDM.Free;
1620     FavoriteDM := nil;
1621     if AddressHistoryDM <> nil then
1622     AddressHistoryDM.Free;
1623     AddressHistoryDM := nil;
1624     except
1625     end;
1626     try
1627     if BBS2ch <> nil then
1628     BBS2ch.Free;
1629     BBS2ch := nil;
1630     except
1631     end;
1632 yoffy 1.2
1633     try
1634     //Hint鐃?鐃緒申
1635     if FHint <> nil then begin
1636     FHint.ReleaseHandle;
1637     FHint.Free;
1638     FHint := nil;
1639     end;
1640     //Preview鐃?鐃緒申
1641     if TPreviewBrowser <> nil then begin
1642     FPreviewBrowser.Free;
1643     FPreviewBrowser := nil;
1644     end;
1645     except
1646     end;
1647 hi_ 1.1 end;
1648    
1649     procedure TGikoForm.FormDestroy(Sender: TObject);
1650     //var
1651     // wp: TWindowPlacement;
1652     begin
1653     { //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1654     FHistoryList.Free;
1655    
1656     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1657     wp.length := sizeof(wp);
1658     GetWindowPlacement(Handle, @wp);
1659    
1660     GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1661     GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1662     GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1663     GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1664     GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1665    
1666     GikoSys.Setting.CabinetVisible := CabinetPanel.Visible;
1667     GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1668    
1669     GikoSys.Setting.WriteWindowSettingFile;
1670     GikoSys.Setting.WriteNameMailSettingFile;
1671     FDownload.Free;
1672     BBS2ch.Free;}
1673     end;
1674    
1675     //鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1676     procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1677     begin
1678     Application.Terminate;
1679     Action := caFree;
1680     end;
1681    
1682     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1683     procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1684     begin
1685     CabinetVisibleAction.Execute;
1686     // CabinetPanelVisible(false);
1687     end;
1688    
1689     procedure TGikoForm.ReloadBBS;
1690     begin
1691     //鐃?鐃?鐃?鐃緒申鐃?鐃?
1692     NotSelectTabCloseAction.Execute;
1693     if BrowserTab.Tabs.Count >= 1 then
1694     DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1695     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1696     FHistoryList.Clear;
1697     //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1698     TreeView.Items.Clear;
1699    
1700     //BBS鐃?鐃緒申
1701     BBS2ch.Free;
1702    
1703     SetActiveList(nil);
1704    
1705     FTreeType := gttNone;
1706    
1707     //BBS鐃緒申鐃緒申
1708     BBS2ch := TBBS2ch.Create(GikoSys.Setting.LogFolder);
1709    
1710     BBS2ch.ReadBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1711     Show2chTree;
1712     end;
1713    
1714     //鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1715     procedure TGikoForm.SetBoardTreeNode;
1716     var
1717     i, j: integer;
1718     Root: TTreeNode;
1719     CategoryNode: TTreeNode;
1720     BoardNode: TTreeNode;
1721     Category: TCategory;
1722     Board: TBoard;
1723     begin
1724     TreeView.Items.BeginUpdate;
1725     TreeView.Items.Clear;
1726     try
1727     Root := TreeView.Items.Add(nil, BBS2ch.Title);
1728 yoffy 1.2 Root.ImageIndex := ITEM_ICON_2CH1;
1729     Root.SelectedIndex := ITEM_ICON_2CH2;
1730 hi_ 1.1 Root.Data := BBS2ch;
1731     if SplashWindow <> nil then
1732     SplashWindow.ProgressBar.Max := BoardGroup.BBS2ch.Count;
1733    
1734     for i := 0 to BoardGroup.BBS2ch.Count - 1 do begin
1735     Category := TCategory(BoardGroup.BBS2ch.Items[i]);
1736     CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
1737     CategoryNode.Data := Category;
1738 yoffy 1.2 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
1739     CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
1740 hi_ 1.1
1741     for j := 0 to Category.Count - 1 do begin
1742     Board := TBoard(Category.Items[j]);
1743     Board.BeginUpdate;
1744     BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
1745     BoardNode.Data := Board;
1746 yoffy 1.2 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
1747     BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
1748 hi_ 1.1 Board.LoadSettings;
1749     Board.EndUpdate;
1750     end;
1751    
1752     CategoryNode.Expanded := Category.NodeExpand;
1753    
1754     if SplashWindow <> nil then begin
1755     SplashWindow.ProgressBar.StepIt;
1756     Application.ProcessMessages;
1757     end;
1758    
1759     end;
1760     finally
1761     TreeView.Items.EndUpdate;
1762     end;
1763     end;
1764    
1765     function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS2ch): Integer;
1766     const
1767     COLUMN: array[0..0] of string = ('鐃?鐃?鐃?鐃緒申鐃緒申');
1768     var
1769     ListColumn: TListColumn;
1770     i: Integer;
1771     begin
1772     ListView.Items.BeginUpdate;
1773     try
1774     Screen.Cursor := crHourGlass;
1775    
1776     ListView.Columns.Clear;
1777     for i := 0 to Length(COLUMN) - 1 do begin
1778     ListColumn := ListView.Columns.Add;
1779     ListColumn.Caption := COLUMN[i];
1780     ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
1781     end;
1782    
1783     ListView.Items.Count := 0;
1784     ListView.Items.Clear;
1785     ListView.Items.Count := ABBS2ch.Count;
1786    
1787     // UpFolderAction.Enabled := False;
1788     // AllItemAction.Enabled := False;
1789     // LogItemAction.Enabled := False;
1790     // NewItemAction.Enabled := False;
1791     // SelectItemAction.Enabled := False;
1792     // ListDownloadToolButton.Enabled := False;
1793     // BoardReservToolButton.Enabled := False;
1794     // ListThreadDownloadToolButton.Enabled := False;
1795    
1796     ListNameLabel.Caption := ABBS2ch.Title;
1797     FolderImage.Picture := nil;
1798     ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
1799    
1800 yoffy 1.2 FSortIndex := 0;
1801     FSortOrder := False;
1802     ListViewColumnClick(nil, ListView.Column[0]);
1803    
1804 hi_ 1.1 Result := ABBS2ch.Count;
1805     finally
1806     Screen.Cursor := crDefault;
1807     ListView.Items.EndUpdate;
1808     end;
1809     end;
1810    
1811     function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
1812     const
1813     COLUMN: array[0..2] of string = ('鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
1814     var
1815     ListColumn: TListColumn;
1816     i: Integer;
1817     begin
1818     ListView.Items.BeginUpdate;
1819     try
1820     Screen.Cursor := crHourGlass;
1821    
1822     ListView.Columns.Clear;
1823     for i := 0 to Length(COLUMN) - 1 do begin
1824     ListColumn := ListView.Columns.Add;
1825     ListColumn.Caption := COLUMN[i];
1826     ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
1827     end;
1828    
1829     ListView.Items.Count := 0;
1830     ListView.Items.Clear;
1831     ListView.Items.Count := Category.Count;
1832    
1833     // UpFolderAction.Enabled := True;
1834     // AllItemAction.Enabled := False;
1835     // LogItemAction.Enabled := False;
1836     // NewItemAction.Enabled := False;
1837     // SelectItemAction.Enabled := False;
1838     // ListDownloadToolButton.Enabled := False;
1839     // BoardReservToolButton.Enabled := False;
1840     // ListThreadDownloadToolButton.Enabled := False;
1841    
1842     ListNameLabel.Caption := Category.Title;
1843     FolderImage.Picture := nil;
1844     ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
1845    
1846 yoffy 1.2 FSortIndex := 0;
1847     FSortOrder := False;
1848     ListViewColumnClick(nil, ListView.Column[0]);
1849    
1850 hi_ 1.1 Result := Category.Count;
1851     finally
1852     Screen.Cursor := crDefault;
1853     ListView.Items.EndUpdate;
1854     end;
1855     end;
1856    
1857     function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
1858     const
1859     COLUMN: array[0..6] of string = ('鐃?鐃緒申鐃?鐃?鐃緒申', '鐃?鐃?鐃緒申鐃?', '鐃緒申鐃緒申', '鐃?鐃緒申',
1860     '鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
1861     COLUMN_ALIGNMENT: array[0..6] of TAlignment = (taLeftJustify, taRightJustify,
1862     taRightJustify, taRightJustify,
1863     taRightJustify, taLeftJustify,
1864     taLeftJustify);
1865     //No, 鐃?鐃緒申鐃?鐃?鐃緒申, 鐃?鐃?鐃緒申鐃?, 鐃緒申鐃緒申鐃?鐃緒申, 鐃緒申鐃緒申鐃緒申鐃緒申
1866     var
1867     ListColumn: TListColumn;
1868     i: Integer;
1869     begin
1870     ListView.Items.BeginUpdate;
1871     try
1872     Screen.Cursor := crHourGlass;
1873    
1874 yoffy 1.51 // 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1875     // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1876     if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
1877     begin
1878     ListView.Columns.Clear;
1879     for i := 0 to Length(COLUMN) - 1 do begin
1880     ListColumn := ListView.Columns.Add;
1881     ListColumn.Caption := COLUMN[i];
1882     ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
1883     ListColumn.Alignment := COLUMN_ALIGNMENT[i];
1884     end;
1885     end;
1886 hi_ 1.1
1887     ListView.Items.Count := 0;
1888     ListView.Items.Clear;
1889    
1890     case GikoForm.ViewType of
1891     gvtAll: ListView.Items.Count := Board.Count;
1892     gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
1893     gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
1894     gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
1895     end;
1896    
1897     ListNameLabel.Caption := Board.Title;
1898     FolderImage.Picture := nil;
1899     ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
1900    
1901 yoffy 1.2 FSortIndex := 0;
1902     FSortOrder := False;
1903     ListViewColumnClick(nil, ListView.Column[0]);
1904 hi_ 1.1
1905     Result := Board.Count;
1906     finally
1907     Screen.Cursor := crDefault;
1908     ListView.Items.EndUpdate;
1909     end;
1910     end;
1911    
1912     procedure TGikoForm.TreeViewChange(Sender: TObject; Node: TTreeNode);
1913     var
1914     i: Integer;
1915     begin
1916     if FTreeType = gttHistory then begin
1917     // SetContent(TThreadItem(Node.Data));
1918     InsertBrowserTab(TThreadItem(Node.Data));
1919     Exit;
1920     end;
1921    
1922     ListView.Selected := nil;
1923     ListView.Items.Count := 0;
1924     ListView.Items.Clear;
1925     // ListView.Columns.Clear;
1926    
1927     Caption := CAPTION_NAME;
1928     //Application.Title := CAPTION_NAME;
1929    
1930    
1931     if GetActiveList is TBBS2ch then begin
1932     for i := 0 to ListView.Columns.Count - 1 do
1933     GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1934     end else if GetActiveList is TCategory then begin
1935     for i := 0 to ListView.Columns.Count - 1 do
1936     GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1937     end else if GetActiveList is TBoard then begin
1938     for i := 0 to ListView.Columns.Count - 1 do
1939     GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1940     end;
1941    
1942     if TObject(Node.Data) is TBBS2ch then begin
1943     SetActiveList(Node.data);
1944     end else if TObject(Node.Data) is TCategory then begin
1945     SetActiveList(Node.data);
1946     end else if TObject(Node.Data) is TBoard then begin
1947     if not TBoard(Node.Data).IsThreadDatRead then begin
1948     Screen.Cursor := crHourGlass;
1949     try
1950     GikoSys.ReadSubjectFile(TBoard(Node.Data));
1951     finally
1952     Screen.Cursor := crDefault;
1953     end;
1954     end;
1955     SetActiveList(Node.data);
1956     end;
1957     end;
1958    
1959     procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
1960     var
1961     // FileName: string;
1962     // DateTime: TDateTime;
1963     BoardCnt: Integer;
1964     BBS: TBBS2ch;
1965     Category: TCategory;
1966     Board: TBoard;
1967     ThreadItem: TThreadItem;
1968     RepStr: string;
1969     begin
1970     if ActiveList is TBBS2ch then begin
1971     BBS := TBBS2ch(ActiveList);
1972    
1973     ListView.StateImages := nil;
1974    
1975     if BBS = nil then Exit;
1976     if BBS.Count <= 0 then Exit;
1977     if Item = nil then Exit;
1978     if Item.Index > BBS.Count then Exit;
1979     if ListView.Items.Count = 0 then Exit;
1980    
1981     if not (BBS.Items[Item.Index] is TCategory) then Exit;
1982     Category := TCategory(BBS.Items[Item.Index]);
1983    
1984     if Category = nil then Exit;
1985    
1986     if ListNumberVisibleAction.Checked then
1987     Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
1988     else
1989     Item.Caption := Category.Title;
1990    
1991 yoffy 1.2 Item.ImageIndex := ITEM_ICON_CATEGORY1;
1992 hi_ 1.1 Item.Data := Category;
1993     end else if ActiveList is TCategory then begin
1994     Category := TCategory(ActiveList);
1995    
1996     ListView.StateImages := nil;
1997    
1998     if Category = nil then Exit;
1999     if Category.Count <= 0 then Exit;
2000     if Item = nil then Exit;
2001     if Item.Index >= Category.Count then Exit;
2002     if ListView.Items.Count = 0 then Exit;
2003    
2004     if not (Category.Items[Item.Index] is TBoard) then Exit;
2005     Board := TBoard(Category.Items[Item.Index]);
2006    
2007     if Board = nil then Exit;
2008    
2009     if ListNumberVisibleAction.Checked then
2010     Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2011     else
2012     Item.Caption := Board.Title;
2013    
2014     if Item.SubItems.Count <> 2 then begin
2015     Item.SubItems.Clear;
2016     Item.SubItems.Add('');
2017     Item.SubItems.Add('');
2018     end;
2019    
2020 yoffy 1.2 Item.ImageIndex := ITEM_ICON_BOARD1;
2021 hi_ 1.1
2022     if Board.Round then
2023 yoffy 1.51 Item.SubItems[0] := Board.RoundName // '鐃?鐃緒申'
2024 hi_ 1.1 else
2025     Item.SubItems[0] := '';
2026    
2027     if Board.RoundDate = ZERO_DATE then begin
2028     Item.SubItems[1] := '';
2029     end else
2030     Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2031     Item.Data := Board;
2032     end else if ActiveList is TBoard then begin
2033     Board := TBoard(ActiveList);
2034    
2035     if GikoSys.Setting.ListIconVisible then
2036     ListView.StateImages := StateIconImageList
2037     else
2038     ListView.StateImages := nil;
2039    
2040     case GikoForm.ViewType of
2041     gvtAll: BoardCnt := Board.Count;
2042     gvtLog: BoardCnt := Board.GetLogThreadCount;
2043     gvtNew: BoardCnt := Board.GetNewThreadCount;
2044     gvtUser: BoardCnt := Board.GetUserThreadCount;
2045 yoffy 1.2 else
2046     BoardCnt := 0;
2047 hi_ 1.1 end;
2048    
2049     // if Board = nil then Exit;
2050     if BoardCnt <= 0 then Exit;
2051     if Item = nil then Exit;
2052     if Item.Index > BoardCnt then Exit;
2053     if ListView.Items.Count = 0 then Exit;
2054    
2055     // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2056    
2057     ThreadItem := nil;
2058     case GikoForm.ViewType of
2059     gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]);
2060     gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2061     gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2062     gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2063     end;
2064    
2065     if ThreadItem = nil then Exit;
2066    
2067     // if ListNumberVisibleAction.Checked then
2068     // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2069     // else
2070     RepStr := ThreadItem.Title;
2071 yoffy 1.2 //RepStr := StringReplace(RepStr, '&amp;', '&', [rfReplaceAll]);
2072 hi_ 1.1 RepStr := StringReplace(RepStr, '&lt;', '<', [rfReplaceAll]);
2073     RepStr := StringReplace(RepStr, '&gt;', '>', [rfReplaceAll]);
2074     RepStr := StringReplace(RepStr, '&quot;', '"', [rfReplaceAll]);
2075 yoffy 1.2 RepStr := StringReplace(RepStr, '&amp', '&', [rfReplaceAll]);
2076 hi_ 1.1 //RepStr := StringReplace(RepStr, '鐃緒申鐃?', ',', [rfReplaceAll]);
2077    
2078     if Item.SubItems.Count <> 6 then begin
2079     Item.SubItems.Clear;
2080     Item.SubItems.Add('');
2081     Item.SubItems.Add('');
2082     Item.SubItems.Add('');
2083     Item.SubItems.Add('');
2084     Item.SubItems.Add('');
2085     Item.SubItems.Add('');
2086     end;
2087    
2088     if ListNumberVisibleAction.Checked then
2089     Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2090     else
2091     Item.Caption := RepStr;
2092    
2093     case ThreadItem.AgeSage of
2094     gasNone: Item.StateIndex := -1;
2095 yoffy 1.51 gasNew: Item.StateIndex := 0;
2096     gasAge: Item.StateIndex := 1;
2097 hi_ 1.1 gasSage: Item.StateIndex := 2;
2098     end;
2099    
2100     if ThreadItem.IsLogFile then begin
2101 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2102 hi_ 1.1 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2103     Item.SubItems[1] := IntToStr(ThreadItem.Count);
2104     if ThreadItem.NewResCount = 0 then
2105     Item.SubItems[2] := ''
2106     else
2107     Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2108     Item.SubItems[3] := '';
2109     if ThreadItem.Round then
2110     Item.SubItems[4] := ThreadItem.RoundName
2111     else
2112     Item.SubItems[4] := '';
2113     if ThreadItem.RoundDate = ZERO_DATE then begin
2114     Item.SubItems[5] := '';
2115     end else
2116     Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2117     if ThreadItem.NewArrival then
2118 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2119 hi_ 1.1 end else begin
2120 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREAD1;
2121 hi_ 1.1 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2122     Item.SubItems[1] := '';
2123     Item.SubItems[2] := '';
2124     Item.SubItems[3] := '';
2125     Item.SubItems[4] := '';
2126     Item.SubItems[5] := '';
2127     end;
2128     Item.Data := ThreadItem;
2129     end;
2130     end;
2131    
2132     procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2133     const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2134     StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2135     var Index: Integer);
2136     begin
2137     //
2138     end;
2139    
2140     procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2141     EndIndex: Integer);
2142     begin
2143     //
2144     end;
2145    
2146     procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2147     EndIndex: Integer; OldState, NewState: TItemStates);
2148     begin
2149     //
2150     end;
2151    
2152     procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2153     var
2154     p: TPoint;
2155     s: string;
2156     tmp2: string;
2157     URL: string;
2158     ATitle: Boolean;
2159    
2160     wkBBS: string;
2161     wkKey: string;
2162    
2163 h677 1.40 //wkInt: Integer;
2164 hi_ 1.1 wkIntSt: Integer;
2165     wkIntTo: Integer;
2166    
2167     ActiveFileName: string;
2168     e: IHTMLElement;
2169     Ext: string;
2170     PathRec: TPathRec;
2171     begin
2172     try
2173     try
2174     if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin
2175     if LowerCase(OleVariant(IHTMLDocument2(Browser.Document)).charset) <> 'shift_jis' then
2176     OleVariant(IHTMLDocument2(Browser.Document)).charset := 'shift_jis';
2177     end;
2178     except
2179     end;
2180     finally
2181     end;
2182     if PreviewTimer.Enabled then
2183     PreviewTimer.Enabled := False;
2184     Application.CancelHint;
2185     if GetActiveContent <> nil then
2186     ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2187     else
2188     ActiveFileName := '';
2189    
2190     StatusBar.Panels[1].Text := Text;
2191    
2192     if FHint <> nil then begin
2193     FHint.ReleaseHandle;
2194     FHint.ClearAllRes;
2195     end;
2196     if FPreviewBrowser <> nil then
2197     ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2198    
2199     if not GikoSys.Setting.UnActivePopup then
2200     if not GikoForm.Active then
2201     Exit;
2202    
2203     //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2204     //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2205    
2206     s := '';
2207     Ext := AnsiLowerCase(ExtractFileExt(Text));
2208     if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2209     ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2210     if FPreviewBrowser = nil then begin
2211     FPreviewBrowser := TPreviewBrowser.Create(Self);
2212     ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2213     TOleControl(FPreviewBrowser).Parent := nil;
2214     end;
2215 yoffy 1.50 FPreviewBrowser.Navigate('about:blank');//鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2216 hi_ 1.1 FPreviewURL := Text;
2217     PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2218     PreviewTimer.Enabled := True;
2219     end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2220     if Pos('mailto:', Text) = 1 then begin
2221     s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2222     //鐃?鐃?鐃?鐃?鐃?鐃緒申 鐃?鐃?鐃?3鐃緒申466鐃緒申鐃緒申鐃緒申鐃緒申
2223     GetCursorPos(p);
2224     p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2225     p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2226     e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2227     if (Assigned(e)) then begin
2228     tmp2 := GikoSys.ZenToHan(e.Get_outerText);
2229     if (GikoSys.IsNumeric(tmp2)) then begin
2230     //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2231     wkBBS := GetActiveContent.ParentBoard.BBSID;
2232     wkKey := ChangeFileExt(GetActiveContent.FileName, '');
2233     wkIntSt := StrToInt(tmp2);
2234     wkIntTo := StrToInt(tmp2);
2235     //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2236     FHint.PopupType := gptThread;
2237     SetResPopupText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2238     end else begin
2239     FHint.PopupType := gptRaw;
2240     FHint.Caption := s;
2241     end;
2242     end;
2243     end else begin
2244     URL := Text;
2245 yoffy 1.54
2246     // 鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
2247 yoffy 1.55 if GikoSys.Setting.UseCSS and
2248     FileExists( GikoSys.Setting.CSSFileName + 'Header.html' ) and
2249 yoffy 1.52 (Pos( 'about:blank..', URL ) = 1) then
2250     Exit
2251     else if Pos('about:blank..', URL) = 1 then
2252     URL := StringReplace(URL, 'about:blank..', 'http://www.2ch.net', []);
2253 hi_ 1.1
2254     PathRec := Gikosys.Parse2chURL2(URL);
2255    
2256     if PathRec.FDone then begin
2257    
2258     wkIntSt := PathRec.FSt;
2259     wkIntTo := PathRec.FTo;
2260    
2261     if (wkIntSt = 0) and (wkIntTo = 0) then begin
2262     wkIntSt := 1;
2263     wkIntTo := 1;
2264     end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2265     wkIntSt := wkIntTo;
2266     end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2267     wkIntTo := wkIntSt;
2268     end else if wkIntSt > wkIntTo then begin
2269 h677 1.40 //wkInt := wkIntTo;
2270 hi_ 1.1 wkIntTo := wkIntSt;
2271     wkIntSt := wkIntTo;
2272     end;
2273     //if wkIntSt = 0 then
2274     // wkIntSt := 1;
2275     //if wkINtTo = 0 then
2276     // wkIntTo := 1;
2277     //if PathRec.FFirst then
2278     // wkIntSt := 1;
2279     if PathRec.FStBegin then
2280     wkIntSt := 1;
2281     if PathRec.FToEnd then
2282     wkIntTo := 9999;
2283    
2284     ATitle := ActiveFileName <> PathRec.FKey;
2285    
2286     //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2287     FHint.PopupType := gptThread;
2288     SetResPopupText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2289     end;
2290     end;
2291    
2292     //if s <> '' then
2293     // ShowTextPopup(s);
2294     if FHint.PopupType = gptRaw then begin
2295     if FHint.Caption <> '' then
2296     ShowTextPopup;
2297     end else begin
2298 yoffy 1.2 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2299 hi_ 1.1 ShowTextPopup;
2300     end;
2301     end;
2302     end;
2303    
2304     procedure TGikoForm.BrowserTitleChange(Sender: TObject;
2305     const Text: WideString);
2306     var
2307     Title: string;
2308     begin
2309     if (Text = BLANK_HTML) or (Text = GikoSys.GetHtmlTempFileName) then
2310     Title := CAPTION_NAME
2311     else
2312     Title := CAPTION_NAME + ' - [' + Text + ']';
2313     Caption := Title;
2314     //Application.Title := Title;
2315     end;
2316    
2317     procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2318     var
2319     SysMenu: HMenu;
2320     //SysMenuApp: HMenu;
2321     begin
2322     FEnabledCloseButton := Enabled;
2323     SysMenu := GetSystemMenu(Handle, False);
2324     //SysMenuApp := GetSystemMenu(Application.Handle, False);
2325    
2326     if Enabled then begin
2327     EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2328     //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2329     end else begin
2330     EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2331     //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2332     end;
2333    
2334     DrawMenuBar(Handle);
2335     //DrawMenuBar(Application.Handle);
2336     end;
2337    
2338     procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2339     var AllowChange: Boolean);
2340     begin
2341     if FTreeType = gtt2ch then
2342     FSortIndex := -1;
2343     end;
2344    
2345     procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2346     Shift: TShiftState);
2347     begin
2348     if Key = VK_BACK then begin
2349     // UpFolderButtonClick(Sender);
2350     end else if Key = VK_SPACE then begin
2351     // ListClick;
2352     end else if Key = VK_RETURN then begin
2353     ListDoubleClick;
2354     end;
2355     end;
2356    
2357     function TGikoForm.GetHttpState: