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.83 - (hide annotations) (download) (as text)
Thu Oct 2 12:09:18 2003 UTC (20 years, 6 months ago) by yoffy
Branch: MAIN
Changes since 1.82: +10 -4 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 yoffy 1.73 OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils,
8 hi_ 1.4 {$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 yoffy 1.61 FavoriteTreeViewBrowseFolderAction: TAction;
491     FavoriteTreeBrowseFolderPopupMenu: TMenuItem;
492     N57: TMenuItem;
493 yoffy 1.65 FavoriteTreeReloadPopupMenu: TMenuItem;
494     N58: TMenuItem;
495     FavoriteTreeURLCopyPopupMenu: TMenuItem;
496     FavoriteTreeNameCopyPopupMenu: TMenuItem;
497     FavoriteTreeLogDeletePopupMenu: TMenuItem;
498     N59: TMenuItem;
499     FavoriteTreeNameURLCopyPopupMenu: TMenuItem;
500     FavoriteTreeViewReloadAction: TAction;
501     FavoriteTreeViewURLCopyAction: TAction;
502     FavoriteTreeViewNameCopyAction: TAction;
503     FavoriteTreeViewNameURLCopyAction: TAction;
504     FavoriteTreeViewLogDeleteAction: TAction;
505 h677 1.70 OnlyAHundredRes: TAction;
506 h677 1.76 ToolButton20: TToolButton;
507 h677 1.81 AHundredResButton: TToolButton;
508 hi_ 1.1 procedure FormCreate(Sender: TObject);
509     procedure FormDestroy(Sender: TObject);
510     procedure CabinetPanelHide(Sender: TObject);
511     procedure FormClose(Sender: TObject; var Action: TCloseAction);
512     procedure TreeViewChange(Sender: TObject; Node: TTreeNode);
513     procedure ListViewData(Sender: TObject; Item: TListItem);
514     procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
515     const FindString: String; const FindPosition: TPoint;
516     FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
517     Wrap: Boolean; var Index: Integer);
518     procedure ListViewDataHint(Sender: TObject; StartIndex,
519     EndIndex: Integer);
520     procedure ListViewDataStateChange(Sender: TObject; StartIndex,
521     EndIndex: Integer; OldState, NewState: TItemStates);
522     procedure BrowserStatusTextChange(Sender: TObject;
523     const Text: WideString);
524     procedure BrowserTitleChange(Sender: TObject; const Text: WideString);
525     procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
526     procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
527     var AllowChange: Boolean);
528     procedure ListViewKeyDown(Sender: TObject; var Key: Word;
529     Shift: TShiftState);
530     procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
531     procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
532     Button: TToolButton; State: TCustomDrawState;
533     var DefaultDraw: Boolean);
534     procedure BrowserBeforeNavigate2(Sender: TObject;
535     const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
536     Headers: OleVariant; var Cancel: WordBool);
537     procedure ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
538     Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
539     var DefaultDraw: Boolean);
540     procedure TreeViewCustomDraw(Sender: TCustomTreeView;
541     const ARect: TRect; var DefaultDraw: Boolean);
542     procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
543     Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
544     procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
545     procedure TreeViewDblClick(Sender: TObject);
546 yoffy 1.57 procedure FavoriteTreeViewClick(Sender: TObject);
547 hi_ 1.1 procedure ListViewCustomDraw(Sender: TCustomListView;
548     const ARect: TRect; var DefaultDraw: Boolean);
549     procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
550     Shift: TShiftState; X, Y: Integer);
551     procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
552     procedure MessageListViewResize(Sender: TObject);
553     procedure ExitActionExecute(Sender: TObject);
554     procedure AllSelectActionExecute(Sender: TObject);
555     procedure StdToolBarVisibleActionExecute(Sender: TObject);
556     procedure MsgBarVisibleActionExecute(Sender: TObject);
557     procedure StatusBarVisibleActionExecute(Sender: TObject);
558     procedure LargeIconActionExecute(Sender: TObject);
559     procedure SmallIconActionExecute(Sender: TObject);
560     procedure ListIconActionExecute(Sender: TObject);
561     procedure DetailIconActionExecute(Sender: TObject);
562     procedure SearchActionExecute(Sender: TObject);
563     procedure OptionActionExecute(Sender: TObject);
564     procedure GikoNaviWebPageActionExecute(Sender: TObject);
565     procedure AboutActionExecute(Sender: TObject);
566     procedure Cabinet2chActionExecute(Sender: TObject);
567     procedure CabinetHistoryActionExecute(Sender: TObject);
568     procedure CabinetVisibleActionExecute(Sender: TObject);
569     procedure AllItemActionExecute(Sender: TObject);
570     procedure LogItemActionExecute(Sender: TObject);
571     procedure NewItemActionExecute(Sender: TObject);
572     procedure SelectItemActionExecute(Sender: TObject);
573     procedure ListNumberVisibleActionExecute(Sender: TObject);
574     procedure UpFolderActionExecute(Sender: TObject);
575     procedure IconStyleExecute(Sender: TObject);
576     procedure RoundActionExecute(Sender: TObject);
577     procedure StopActionExecute(Sender: TObject);
578     procedure MsgBarCloseActionExecute(Sender: TObject);
579     procedure BrowserMaxActionExecute(Sender: TObject);
580     procedure ScrollTopActionExecute(Sender: TObject);
581     procedure ScrollLastActionExecute(Sender: TObject);
582     procedure ScrollNewActionExecute(Sender: TObject);
583     procedure ScrollKokoActionExecute(Sender: TObject);
584     procedure EditorActionExecute(Sender: TObject);
585     procedure IEActionExecute(Sender: TObject);
586     procedure ShowThreadActionExecute(Sender: TObject);
587     procedure ShowBoardActionExecute(Sender: TObject);
588     procedure URLCopyActionExecute(Sender: TObject);
589     procedure ItemReloadActionExecute(Sender: TObject);
590     procedure SelectListReloadActionExecute(Sender: TObject);
591     procedure SelectThreadReloadActionExecute(Sender: TObject);
592     procedure SelectListReloadActionUpdate(Sender: TObject);
593     procedure AllItemActionUpdate(Sender: TObject);
594     procedure LogItemActionUpdate(Sender: TObject);
595     procedure NewItemActionUpdate(Sender: TObject);
596     procedure SelectItemActionUpdate(Sender: TObject);
597     procedure UpFolderActionUpdate(Sender: TObject);
598     procedure FormResize(Sender: TObject);
599     procedure ScrollTopActionUpdate(Sender: TObject);
600     procedure ScrollLastActionUpdate(Sender: TObject);
601     procedure ScrollNewActionUpdate(Sender: TObject);
602     procedure ScrollKokoActionUpdate(Sender: TObject);
603     procedure EditorActionUpdate(Sender: TObject);
604     procedure IEActionUpdate(Sender: TObject);
605     procedure ShowThreadActionUpdate(Sender: TObject);
606     procedure ShowBoardActionUpdate(Sender: TObject);
607     procedure SelectThreadReloadActionUpdate(Sender: TObject);
608     procedure ListViewSelectItem(Sender: TObject; Item: TListItem;
609     Selected: Boolean);
610     procedure SelectTimerTimer(Sender: TObject);
611 yoffy 1.51 procedure ItemReloadActionUpdate(Sender: TObject);
612 hi_ 1.1 procedure ListViewDblClick(Sender: TObject);
613 yoffy 1.51 procedure LogDeleteActionExecute(Sender: TObject);
614 hi_ 1.1 procedure KokomadeActionExecute(Sender: TObject);
615     procedure ZenbuActionExecute(Sender: TObject);
616 yoffy 1.51 procedure KokoResActionExecute(Sender: TObject);
617 hi_ 1.1 procedure ListPopupMenuPopup(Sender: TObject);
618     procedure SelectItemURLCopyActionExecute(Sender: TObject);
619     procedure SelectItemURLCopyActionUpdate(Sender: TObject);
620     procedure AllSelectActionUpdate(Sender: TObject);
621     procedure LogDeleteActionUpdate(Sender: TObject);
622     procedure BrowserTabCloseActionExecute(Sender: TObject);
623     procedure NotSelectTabCloseActionExecute(Sender: TObject);
624     procedure TreeSelectBoradReloadExecute(Sender: TObject);
625     procedure TreeSelectThreadReloadExecute(Sender: TObject);
626     procedure TreeSelectURLCopyExecute(Sender: TObject);
627     procedure TreePopupMenuPopup(Sender: TObject);
628     procedure ListToolBarVisibleActionExecute(Sender: TObject);
629     procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
630     procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
631     var Cancel: WordBool);
632     procedure ListSplitterCanResize(Sender: TObject; var NewSize: Integer;
633     var Accept: Boolean);
634     procedure ListSplitterMoved(Sender: TObject);
635     procedure BrowserTabChange(Sender: TObject);
636     procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
637     Shift: TShiftState; X, Y: Integer);
638     procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
639     State: TDragState; var Accept: Boolean);
640     procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
641     procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
642     Y: Integer);
643     procedure BrowserDocumentComplete(Sender: TObject;
644     const pDisp: IDispatch; var URL: OleVariant);
645     procedure SelectReservActionUpdate(Sender: TObject);
646     procedure RoundNamePopupMenuPopup(Sender: TObject);
647     procedure SelectNewRoundNameExecute(Sender: TObject);
648     procedure SelectDeleteRoundExecute(Sender: TObject);
649     procedure SelectReservActionExecute(Sender: TObject);
650     procedure NewBoardActionExecute(Sender: TObject);
651     procedure LoginActionExecute(Sender: TObject);
652     procedure KeySettingActionExecute(Sender: TObject);
653     procedure AllTabCloseActionExecute(Sender: TObject);
654 yoffy 1.51 procedure ArrangeActionExecute(Sender: TObject);
655     procedure NameURLCopyActionExecute(Sender: TObject);
656     procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
657 hi_ 1.1 procedure URLCopyActionUpdate(Sender: TObject);
658 yoffy 1.2 procedure NameURLCopyActionUpdate(Sender: TObject);
659 hi_ 1.1 procedure BrowserTabCloseActionUpdate(Sender: TObject);
660 yoffy 1.51 procedure NotSelectTabCloseActionUpdate(Sender: TObject);
661 hi_ 1.1 procedure AllTabCloseActionUpdate(Sender: TObject);
662     procedure SelectItemNameURLCopyActionUpdate(Sender: TObject);
663     procedure ActiveLogDeleteActionExecute(Sender: TObject);
664     procedure ActiveLogDeleteActionUpdate(Sender: TObject);
665 yoffy 1.51 procedure ListNameBarVisibleActionExecute(Sender: TObject);
666 hi_ 1.1 procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
667 yoffy 1.51 procedure TreeSelectNameURLCopyExecute(Sender: TObject);
668     procedure PaneInitActionExecute(Sender: TObject);
669 hi_ 1.1 procedure FormShow(Sender: TObject);
670     procedure BrowserTabToolBarResize(Sender: TObject);
671     procedure BrowserMinActionExecute(Sender: TObject);
672 yoffy 1.51 procedure SelectTextClearActionExecute(Sender: TObject);
673 hi_ 1.1 procedure NameTextClearActionExecute(Sender: TObject);
674 yoffy 1.51 procedure MailTextClearActionExecute(Sender: TObject);
675     procedure LeftmostTabSelectActionExecute(Sender: TObject);
676     procedure LeftTabSelectActionExecute(Sender: TObject);
677 hi_ 1.1 procedure RightTabSelectActionExecute(Sender: TObject);
678     procedure RightmostTabSelectActionExecute(Sender: TObject);
679     procedure LeftmostTabSelectActionUpdate(Sender: TObject);
680     procedure LeftTabSelectActionUpdate(Sender: TObject);
681     procedure RightTabSelectActionUpdate(Sender: TObject);
682     procedure RightmostTabSelectActionUpdate(Sender: TObject);
683     procedure FavoriteMenuClick(Sender: TObject);
684     procedure FavoriteAddActionExecute(Sender: TObject);
685     procedure FavoriteAddActionUpdate(Sender: TObject);
686     procedure BoardFavoriteAddActionExecute(Sender: TObject);
687     procedure BoardFavoriteAddActionUpdate(Sender: TObject);
688 yoffy 1.51 procedure ThreadFavoriteAddActionExecute(Sender: TObject);
689 hi_ 1.1 procedure ThreadFavoriteAddActionUpdate(Sender: TObject);
690 yoffy 1.51 procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
691 yoffy 1.2 procedure FavoriteArrangeActionExecute(Sender: TObject);
692     procedure MainCoolBarResize(Sender: TObject);
693 hi_ 1.1 procedure MoveToActionExecute(Sender: TObject);
694 yoffy 1.2 procedure AddressToolBarResize(Sender: TObject);
695 hi_ 1.1 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
696     Shift: TShiftState);
697 yoffy 1.51 procedure AddressBarVisibleActionExecute(Sender: TObject);
698 yoffy 1.2 procedure BrowserEnter(Sender: TObject);
699 hi_ 1.1 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
700 yoffy 1.51 procedure BrowserTabVisibleActionExecute(Sender: TObject);
701     procedure BrowserTabTopActionExecute(Sender: TObject);
702     procedure BrowserTabBottomActionExecute(Sender: TObject);
703     procedure BrowserTabTabStyleActionExecute(Sender: TObject);
704 hi_ 1.1 procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
705 yoffy 1.51 procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
706 hi_ 1.1 procedure PreviewTimerTimer(Sender: TObject);
707     procedure MessageHideButtonClick(Sender: TObject);
708     procedure MonazillaWebPageActionExecute(Sender: TObject);
709     procedure GikoHelpActionExecute(Sender: TObject);
710     procedure ToolButton18Click(Sender: TObject);
711     procedure KotehanActionExecute(Sender: TObject);
712 yoffy 1.51 procedure LinkBarVisibleActionExecute(Sender: TObject);
713     procedure BBS2chWebPageActionExecute(Sender: TObject);
714     procedure GikoFolderOpenActionExecute(Sender: TObject);
715 yoffy 1.2 procedure MainCoolBarBandInfo(Sender: TObject;
716     var BandInfo: PReBarBandInfoA);
717     procedure MainCoolBarChevronClick(Sender: TObject;
718 yoffy 1.51 RebarChevron: PNMRebarChevron);
719     procedure ListCoolBarBandInfo(Sender: TObject;
720     var BandInfo: PReBarBandInfoA);
721     procedure ListCoolBarChevronClick(Sender: TObject;
722     RebarChevron: PNMRebarChevron);
723     procedure BrowserCoolBarBandInfo(Sender: TObject;
724     var BandInfo: PReBarBandInfoA);
725 yoffy 1.2 procedure BrowserCoolBarChevronClick(Sender: TObject;
726 yoffy 1.51 RebarChevron: PNMRebarChevron);
727     procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
728     procedure ThreadEditorActionExecute(Sender: TObject);
729 yoffy 1.2 procedure ThreadEditorActionUpdate(Sender: TObject);
730 yoffy 1.51 procedure ToolBarSettingActionExecute(Sender: TObject);
731     procedure NameCopyActionExecute(Sender: TObject);
732     procedure BoardIEActionExecute(Sender: TObject);
733     procedure SelectItemNameCopyActionExecute(Sender: TObject);
734 yoffy 1.2 procedure SelectItemNameCopyActionUpdate(Sender: TObject);
735 yoffy 1.51 procedure BoardIEActionUpdate(Sender: TObject);
736     procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
737     WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
738     procedure NameCopyActionUpdate(Sender: TObject);
739     procedure SelectComboBoxChange(Sender: TObject);
740     procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
741     Shift: TShiftState);
742     procedure SelectComboBoxExit(Sender: TObject);
743     procedure NG1Click(Sender: TObject);
744     procedure SelectResActionExecute(Sender: TObject);
745     procedure SelectResActionUpdate(Sender: TObject);
746     procedure FormKeyDown(Sender: TObject; var Key: Word;
747     Shift: TShiftState);
748     procedure FormKeyUp(Sender: TObject; var Key: Word;
749     Shift: TShiftState);
750     procedure AllResActionExecute(Sender: TObject);
751     procedure AllResActionUpdate(Sender: TObject);
752     procedure ReloadClick(Sender: TObject);
753     procedure GoBackClick(Sender: TObject);
754     procedure GoFowardClick(Sender: TObject);
755     procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
756     var Handled: Boolean);
757     procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
758     var Handled: Boolean);
759     procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
760     var Handled: Boolean);
761     procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
762     Shift: TShiftState; X, Y: Integer);
763     procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
764     Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
765     procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
766     Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
767     procedure StatusBarResize(Sender: TObject);
768     procedure IndividualAbon1Click(Sender: TObject);
769     procedure IndividualAbon2Click(Sender: TObject);
770     procedure N42Click(Sender: TObject);
771     procedure SelectComboBoxEnter(Sender: TObject);
772     procedure AntiIndividualAbonClick(Sender: TObject);
773     procedure N51Click(Sender: TObject);
774     procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
775 yoffy 1.57 procedure CabinetFavoriteActionExecute(Sender: TObject);
776     procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
777     Y: Integer);
778 yoffy 1.71 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
779 yoffy 1.57 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
780     var S: String);
781     procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
782     Shift: TShiftState);
783     procedure FavoriteTreePopupMenuPopup(Sender: TObject);
784     procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
785     procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
786     procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
787     procedure ToolButton19Click(Sender: TObject);
788 yoffy 1.61 procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject);
789 yoffy 1.64 procedure FavoriteTreeViewChange(Sender: TObject; Node: TTreeNode);
790 yoffy 1.65 procedure FavoriteTreeViewDblClick(Sender: TObject);
791     procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject);
792     procedure FavoriteTreeViewReloadActionExecute(Sender: TObject);
793     procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
794     procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
795     procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject);
796 yoffy 1.68 procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
797 yoffy 1.71 procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
798     Shift: TShiftState; X, Y: Integer);
799 yoffy 1.68 procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
800     State: TDragState; var Accept: Boolean);
801 h677 1.70 procedure OnlyAHundredResExecute(Sender: TObject);
802 hi_ 1.1 private
803     { Private 鐃緒申鐃緒申 }
804    
805     FSortIndex: Integer;
806     FSortOrder: Boolean;
807    
808     FEnabledCloseButton: Boolean;
809     // ThreadCreate: TThreadCreate;
810    
811     FClickNode: TTreeNode;
812     FHttpState: Boolean;
813     FHint: TResPopup;
814     FPreviewBrowser: TPreviewBrowser;
815     FPreviewURL: string;
816    
817     FBrowserSizeHeight: Integer;
818     FBrowserSizeWidth: Integer;
819    
820     // FFavorite: TFavorite;
821     FBrowserComplete: Boolean;
822     FTabHintIndex: Integer;
823     FListStyle: TViewStyle; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
824     FItemNoVisible: Boolean; //鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?
825     FViewType: TGikoViewType; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?
826     FActiveList: TObject;
827     FActiveContent: TThreadItem; //
828     FHistoryList: TList; //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
829     FTreeType: TGikoTreeType;
830     FWorkCount: Integer;
831     FNameCookie: string;
832     FMailCookie: string;
833     // FLastRoundTime: TDateTime;
834     BrowserNullTab: TThreadItem;
835     // DoubleClickOccurred: array [TMouseButton] of Boolean;
836     FDownloadTitle: string; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
837     FDownloadMax: Integer; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?
838     FEvent: THTMLDocumentEventSink;//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?
839 h677 1.14
840 yoffy 1.51 Fkeynum : Integer; //鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
841 yoffy 1.29
842 yoffy 1.51 IsDraggingSelectComboBox : Boolean;
843     DraggingSelectComboBoxPosition : TPoint;
844 yoffy 1.29
845 yoffy 1.54 FSearchDialog: TSearchDialog;
846 yoffy 1.49
847 yoffy 1.69 FTabIsDragging: Integer;
848 yoffy 1.72 FTabMouseDownX, FTabMouseDownY: Integer;
849 yoffy 1.73 FTabMouseUpTime: TDateTime;
850 yoffy 1.71 FLinkToolButtonIsDragging: Integer;
851 yoffy 1.72 FLinkToolButtonMouseDownX, FLinkToolButtonMouseDownY: Integer;
852 yoffy 1.73 FLinkToolButtonMouseUpTime: TDateTime;
853 yoffy 1.69
854 yoffy 1.74 DropSpaceNode: TTreeNode;
855    
856 hi_ 1.1 procedure SetBoardTreeNode;
857     function SetCategoryListItem(ABBS2ch: TBBS2ch): Integer;
858     function SetBoardListItem(Category: TCategory): Integer;
859     function SetThreadListItem(Board: TBoard): Integer;
860     // function GetRoundName(index: integer): string;
861    
862     procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
863     procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
864     procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer);
865     procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
866     procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
867    
868     procedure SetActiveList(Obj: TObject);
869     procedure ListClick;
870     procedure ListDoubleClick;
871     procedure BrowserMovement(AName: string);
872     procedure SelectListItem(List: TList);
873     // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
874     procedure DeleteTab(ThreadItem: TThreadItem);
875     function Hook(var Message: TMessage): Boolean;
876     procedure AddRoundNameMenu(MenuItem: TMenuItem);
877     procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
878     procedure SetSelectRoundName(Sender: TObject);
879     function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
880    
881     procedure SetMenuFont;
882     // procedure CreateFavMenu(Folder: TFavoriteFolder);
883     procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
884 yoffy 1.62 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
885     procedure FavoriteClick(Sender: TObject); overload;
886 yoffy 1.71 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
887 yoffy 1.2 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
888 hi_ 1.1 function OnDocumentContextMenu(Sender: TObject): WordBool;
889     // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
890     procedure SetResPopupText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean);
891     procedure ShowTextPopup;
892     //procedure ShowTextPopup(HintData: THintData);
893 yoffy 1.2 // procedure SetStdToolBar;
894     // function GetAction(ActionName: string): TContainedAction;
895 hi_ 1.1 procedure SetLinkBar;
896     function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
897 yoffy 1.2 procedure MenuBarChevronMenu;
898     procedure LinkBarChevronMenu;
899     procedure ToolBarChevronMenu(ToolBar: TToolBar);
900 yoffy 1.51 procedure ModifySelectList;
901 yoffy 1.61 procedure FavoriteBrowseFolder( node: TTreeNode );
902 yoffy 1.72 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
903 yoffy 1.71 procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
904     procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
905     procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
906 h677 1.80 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
907 yoffy 1.72 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
908     procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
909     procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
910     procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
911 h677 1.77 //
912     procedure BrowserTabClick(Sender: TObject);
913 hi_ 1.1 protected
914     procedure CreateParams(var Params: TCreateParams); override;
915 yoffy 1.2 procedure WndProc(var Message: TMessage); override;
916 hi_ 1.1 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
917     procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
918     procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
919     public
920     { Public 鐃緒申鐃緒申 }
921     // FDownload: TDownload;
922     FControlThread: TThreadControl;
923 yoffy 1.48 procedure MoveToURL(URL: string);
924     procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
925 hi_ 1.1 procedure ReloadBBS;
926     function GetHttpState: Boolean;
927     procedure SetEnabledCloseButton(Enabled: Boolean);
928     function GetTreeNode(Data: TObject): TTreeNode;
929     procedure AppFormDeactivate(Sender: TObject);
930     // procedure CabinetPanelVisible(PanelVisible: Boolean);
931     procedure ListViewAllSelect;
932    
933     property ListStyle: TViewStyle read FListStyle write FListStyle;
934     property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
935     property ViewType: TGikoViewType read FViewType write FViewType;
936    
937     property NameCookie: string read FNameCookie write FNameCookie;
938     property MailCookie: string read FMailCookie write FMailCookie;
939    
940     procedure SetContent(ThreadItem: TThreadItem);
941     function GetActiveContent: TThreadItem;
942     function GetActiveList: TObject;
943    
944     property ActiveList: TObject read GetActiveList write SetActiveList;
945     // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
946    
947     procedure SetListViewType(AViewType: TGikoViewType); overload;
948     procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
949     procedure DownloadContent(ThreadItem: TThreadItem);
950     procedure DownloadList(Board: TBoard);
951     procedure PlaySound(SoundEventName: string);
952    
953     function AddHistory(ThreadItem: TThreadItem): Boolean;
954     procedure DeleteHistory(ThreadItem: TThreadItem);
955     procedure ClearHistory;
956     procedure Show2chTree;
957     procedure ShowHistoryTree;
958     procedure SetHistoryTreeNode;
959     // procedure SelectTreeNode(Item: TObject);
960     procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
961     procedure SetBrowserTabState;
962     // property Favorite: TFavorite read FFavorite write FFavorite;
963 yoffy 1.2 procedure SetToolBarPopup;
964 hi_ 1.1 published
965     property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
966     end;
967    
968     TFavoriteMenuItem = class(TMenuItem)
969     private
970     FData : Pointer;
971     public
972     property Data: Pointer read FData write FData;
973     end;
974    
975     TLinkToolButton = class(TToolButton)
976     private
977     FData : Pointer;
978     public
979     property Data: Pointer read FData write FData;
980     end;
981    
982     var
983     GikoForm: TGikoForm;
984    
985     implementation
986    
987     uses
988     About, Option, Round, Splash, Sort, ListSelect,
989 yoffy 1.54 NewBoard;
990 hi_ 1.1
991     const
992     CAPTION_NAME: string = '鐃?鐃?鐃?鐃?';
993     BLANK_HTML: string = 'about:blank';
994 yoffy 1.51 SELECTCOMBOBOX_NAME: string = ''; // '鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申';
995     SELECTCOMBOBOX_COLOR: TColor = clWindow;
996 h677 1.79 //D&D鐃緒申鐃?
997     DandD_THRESHOLD = 5; //D&D鐃緒申鐃緒申鐃?鐃?pixcel)
998 yoffy 1.2 //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
999     ITEM_ICON_2CH1 = 0; //2ch鐃?鐃?鐃?鐃緒申
1000     ITEM_ICON_2CH2 = 1; //2ch鐃?鐃?鐃?鐃緒申
1001     ITEM_ICON_CATEGORY1 = 2; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1002     ITEM_ICON_CATEGORY2 = 3; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1003     ITEM_ICON_BOARD1 = 4; //鐃緒申鐃?鐃?鐃?鐃緒申
1004     ITEM_ICON_BOARD2 = 5; //鐃緒申鐃?鐃?鐃?鐃緒申
1005     ITEM_ICON_THREADLOG1 = 6; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1006     ITEM_ICON_THREADLOG2 = 7; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1007     ITEM_ICON_THREAD1 = 8; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1008     ITEM_ICON_THREAD2 = 9; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1009     ITEM_ICON_THREADNEW1 = 10; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1010     ITEM_ICON_THREADNEW2 = 11; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1011     ITEM_ICON_SORT1 = 12; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1012     ITEM_ICON_SORT2 = 13; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1013    
1014     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1015 yoffy 1.48 TOOL_ICON_HEIGHT_MAX = 16; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1016     TOOL_ICON_HEIGHT_MIN = 17; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1017     TOOL_ICON_HEIGHT_NORMAL = 18; //鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1018     TOOL_ICON_WIDTH_MAX = 19; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1019     TOOL_ICON_WIDTH_MIN = 20; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1020     TOOL_ICON_WIDTH_NORMAL = 21; //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1021    
1022 yoffy 1.51 TOOL_ICON_FAV_FOLDER = 30; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申
1023     TOOL_ICON_FAV_BOARD = 31; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1024     TOOL_ICON_FAV_THREAD = 32; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1025 hi_ 1.1
1026     HTML_FILE_NAME = 'temp_preview.html';
1027    
1028     {$R *.DFM}
1029    
1030     procedure TGikoForm.CreateParams(var Params: TCreateParams);
1031     begin
1032     inherited;
1033     if FormStyle in [fsNormal, fsStayOnTop] then begin
1034     if BorderStyle in [bsSingle, bsSizeable] then begin
1035     Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1036     Params.WndParent := 0;
1037     end;
1038     end;
1039     end;
1040    
1041     procedure TGikoForm.FormCreate(Sender: TObject);
1042     const
1043     TVS_NOTOOLTIPS = $0080;
1044     var
1045     FileName: string;
1046     Style: DWORD;
1047     msg: string;
1048     i: Integer;
1049     wp: TWindowPlacement;
1050 hi_ 1.32 s: string;
1051 hi_ 1.1 begin
1052     {$IFDEF DEBUG}
1053     AllocConsole;
1054     Writeln('============================================================');
1055     Writeln(' 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃? 鐃?鐃緒申鐃?鐃?鐃緒申');
1056     Writeln('');
1057     Writeln(' 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?');
1058     Writeln(' 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
1059     Writeln('============================================================');
1060     {$ENDIF}
1061     Application.OnDeactivate := AppFormDeactivate;
1062     Self.OnDeactivate := AppFormDeactivate;
1063     Application.HookMainWindow(Hook);
1064    
1065     FTreeType := gttNone;
1066    
1067 yoffy 1.51 FSearchDialog := nil;
1068 yoffy 1.49
1069 hi_ 1.1 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1070     Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1071    
1072     //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1073     RoundList := TRoundList.Create;
1074     RoundList.LoadRoundFile;
1075    
1076     //BBS鐃緒申鐃緒申
1077     BBS2ch := TBBS2ch.Create(GikoSys.Setting.LogFolder);
1078    
1079     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1080     // FFavorite := TFavorite.Create(FavoriteTreeView);
1081     FavoriteDM.SetFavTreeView(FavoriteTreeView);
1082     FavoriteDM.ReadFavorite;
1083    
1084     //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1085     AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1086    
1087     EnabledCloseButton := True;
1088     BoardGroup.BBS2ch.ReadBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1089     // SetBoardTreeNode; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1090    
1091     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1092     ListView.ViewStyle := GikoSys.Setting.ListStyle;
1093    
1094     //鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1095     // MainCoolBar.Top := 0;
1096     // MainCoolBar.Left := 0;
1097    
1098     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
1099     AnimePanel.Top := 0;
1100     AnimePanel.Left := 0;
1101    
1102     //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1103    
1104     //鐃?鐃緒申鐃?鐃?鐃?鐃?
1105     CabinetVisibleAction.Checked := not GikoSys.Setting.CabinetVisible;
1106     CabinetVisibleAction.Execute;
1107     CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1108    
1109     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1110     MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1111     MsgBarVisibleActionExecute(nil);
1112     MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1113    
1114     //鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1115     StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1116     StatusBarVisibleActionExecute(nil);
1117    
1118     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1119     TreeView.Items.BeginUpdate;
1120 yoffy 1.67 FavoriteTreeView.Items.BeginUpdate;
1121 hi_ 1.1 ListView.Items.BeginUpdate;
1122     try
1123     TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1124     TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1125     TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1126     TreeView.Color := GikoSys.Setting.CabinetBackColor;
1127    
1128 yoffy 1.67 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1129     FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1130     FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1131     FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1132    
1133 hi_ 1.1 ListView.Font.Name := GikoSys.Setting.ListFontName;
1134     ListView.Font.Size := GikoSys.Setting.ListFontSize;
1135     ListView.Font.Color := GikoSys.Setting.ListFontColor;
1136     ListView.Color := GikoSys.Setting.ListBackColor;
1137     finally
1138     TreeView.Items.EndUpdate;
1139 yoffy 1.67 FavoriteTreeView.Items.EndUpdate;
1140 hi_ 1.1 ListView.Items.EndUpdate;
1141     end;
1142     //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1143     ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1144    
1145     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1146     BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1147     BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1148 h677 1.77
1149 hi_ 1.1
1150     // TreeView.TopItem.Expanded := True; //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1151     // TreeView.Selected := TreeView.Items[0]; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1152     SetContent(nil); //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1153    
1154     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1155     wp.length := sizeof(wp);
1156     wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1157     wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1158     wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1159     wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1160     wp.showCmd := SW_HIDE;
1161     SetWindowPlacement(Handle, @wp);
1162    
1163     // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1164     // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1165     if GikoSys.Setting.WindowMax then
1166     WindowState := wsMaximized;
1167    
1168     //鐃?鐃?鐃?鐃?鐃緒申
1169     try
1170     FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1171     if FileExists(FileName) then
1172     Animate.FileName := FileName;
1173     except
1174     end;
1175     // AnimePanel.Height := 26;
1176     // AnimePanel.Width := 39;
1177     // AnimePanel.Top := 2;
1178     // AnimePanel.Left := Width - 48;
1179    
1180     //鐃?鐃?鐃?鐃?
1181     FNameCookie := '';
1182     FMailCookie := '';
1183    
1184     //鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1185     AllItemAction.Checked := True;
1186 yoffy 1.51 AllResAction.Checked := True;
1187 hi_ 1.1
1188     //TreeView鐃緒申鐃緒申鐃緒申鐃?鐃緒申ToolTip鐃緒申鐃緒申鐃?鐃緒申
1189     Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1190     Style := Style or TVS_NOTOOLTIPS;
1191     SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1192    
1193     // 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1194     TreeView.Align := alClient;
1195 yoffy 1.57 FavoriteTreeView.Align := alClient;
1196 hi_ 1.1 FavoriteTreeView.Visible := False;
1197    
1198     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1199     // FBrowserSizeFlag := False;
1200     // FBrowserSizeHeight := ViewPanel.Height;
1201    
1202     FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1203     FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1204    
1205     ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1206     ArrangeAction.Execute;
1207    
1208     if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1209     case GikoSys.Setting.ListWidthState of
1210     glsMax: begin
1211     ViewPanel.Width := 1;
1212 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1213     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1214 hi_ 1.1 end;
1215     glsMin: begin
1216     ViewPanel.Width := GikoSys.Setting.ListWidth;
1217 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1218     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1219 hi_ 1.1 end;
1220     else begin
1221     ViewPanel.Width := GikoSys.Setting.ListWidth;
1222 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1223     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1224 hi_ 1.1 end;
1225     end;
1226     // if GikoSys.Setting.ListWidthMax then begin
1227     // ViewPanel.Width := 1;
1228     // BrowserSizeAction.ImageIndex := ICON_WIDTH_MIN;
1229     // end else begin
1230     // ViewPanel.Width := GikoSys.Setting.ListWidth;
1231     // BrowserSizeAction.ImageIndex := ICON_WIDTH_MAX;
1232     // end;
1233     end else begin
1234     case GikoSys.Setting.ListHeightState of
1235     glsMax: begin
1236     ViewPanel.Height := 1;
1237 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1238     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1239 hi_ 1.1 end;
1240     glsMin: begin
1241     ViewPanel.Height := GikoSys.Setting.ListHeight;
1242 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1243     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1244 hi_ 1.1 end;
1245     else begin
1246     ViewPanel.Height := GikoSys.Setting.ListHeight;
1247 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1248     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1249 hi_ 1.1 end;
1250     end;
1251     // if GikoSys.Setting.ListHeightState = glsMax then begin
1252     // end else begin
1253     // ViewPanel.Height := GikoSys.Setting.ListHeight;
1254     // BrowserSizeAction.ImageIndex := ICON_HEIGHT_MAX;
1255     // end;
1256     end;
1257    
1258     //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1259     // ProgressBar.Visible := False;
1260     ProgressBar.Parent := StatusBar;
1261     ProgressBar.Top := 2;
1262     ProgressBar.Left := 0;
1263     ProgressBar.Width := StatusBar.Panels[0].Width;
1264     ProgressBar.Height := StatusBar.Height - 2;
1265     ProgressBar.Position := 0;
1266    
1267     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1268     //formshow()鐃緒申鐃緒申鐃緒申
1269 yoffy 1.2
1270 hi_ 1.1 //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1271     // FDownload := TDownload.Create;
1272     // FDownload.OnDownloadEnd := OnDonloadEnd;
1273     // FDownload.OnWork := Work;
1274     // FDownload.OnWorkBegin := WorkBegin;
1275     // FDownload.OnWorkEnd := WorkEnd;
1276    
1277     //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1278     FControlThread := TThreadControl.Create(True);
1279     FControlThread.MaxThreadCount := 1;
1280     FControlThread.Resume;
1281     FControlThread.OnDownloadEnd := DownloadEnd;
1282     FControlThread.OnDownloadMsg := DownloadMsg;
1283     FControlThread.OnWork := Work;
1284     FControlThread.OnWorkBegin := WorkBegin;
1285     FControlThread.OnWorkEnd := WorkEnd;
1286     // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1287    
1288     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1289     FHistoryList := TList.Create;
1290    
1291 yoffy 1.51 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1292     SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1293 yoffy 1.2
1294 hi_ 1.1 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
1295     SetBrowserTabState;
1296    
1297     BrowserBoardNameLabel.Caption := '';
1298     BrowserNameLabel.Caption := '';
1299     FWorkCount := 0;
1300    
1301     // DetailIconAction.Execute;
1302    
1303     // FBrowserSizeHeight := ViewPanel.Height;
1304     FTabHintIndex := -1;
1305    
1306     //鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1307     // if not GikoSys.DirectoryExistsEx(BBS2ch.GetLogFolder) then begin
1308     // GikoSys.ForceDirectoriesEx(BBS2ch.GetLogFolder);
1309     // end;
1310     // FormResize(Sender);
1311     // MainCoolBarResize(Sender);
1312     // Application.ProcessMessages;
1313    
1314     //鐃緒申鐃緒申鐃?鐃?鐃?
1315     SetLinkBar;
1316    
1317     //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?
1318     SetMenuFont;
1319    
1320     //鐃?鐃?鐃緒申鐃?鐃?Wrapable
1321     ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1322     BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1323    
1324 yoffy 1.2 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1325     ReadToolBarSetting(ActionList, StdToolBar);
1326     ReadToolBarSetting(ActionList, ListToolBar);
1327 yoffy 1.51 try
1328     for i := ListToolBar.ControlCount - 1 downto 0 do
1329     begin
1330     if ListToolBar.Controls[ i ].Action = SelectItemAction then
1331     begin
1332     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1333     if (i + 1) < ListToolBar.ControlCount then
1334     if ListToolBar.Controls[ i + 1 ] is TToolButton then
1335     if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1336     ListToolBar.Controls[ i + 1 ].Visible := False;
1337    
1338     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申
1339     ListToolBar.Controls[ i ].Visible := False;
1340     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申
1341     SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1342     SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1343     SelectComboBox.Parent := ListToolBar;
1344     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
1345     SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1346     SelectComboBoxSplitter.Parent := ListToolBar;
1347    
1348     break;
1349     end;
1350     end;
1351     except
1352     end;
1353 yoffy 1.2 ReadToolBarSetting(ActionList, BrowserToolBar);
1354     SetToolBarPopup;
1355 h677 1.81 OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes;
1356 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃?鐃?
1357     AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1358    
1359 yoffy 1.2 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1360    
1361     //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1362     if not FileExists(GikoSys.GetBoardFileName) then begin
1363     msg := '鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申' + #13#10#13#10
1364     + '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申' + #13#10
1365     + '鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?';
1366     MsgBox(SplashWindow.Handle, msg, '鐃?鐃?鐃?鐃?', MB_OK or MB_ICONINFORMATION);
1367     NewBoardAction.Execute;
1368     end;
1369    
1370     //鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1371     GikoSys.LoadKeySetting(ActionList);
1372    
1373     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1374     // FLastRoundTime := 0;
1375    
1376     //ResHint
1377     FHint := TResPopup.Create(Self);
1378    
1379 yoffy 1.83 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申(鐃緒申鐃緒申鐃緒申)
1380     // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申(鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?)
1381     i := GikoSys.Setting.CabinetIndex;
1382     Cabinet2chAction.Execute;
1383     GikoSys.Setting.CabinetIndex := i;
1384    
1385 yoffy 1.67 // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1386     Case GikoSys.Setting.CabinetIndex of
1387     0: Cabinet2chAction.Execute;
1388     1: CabinetHistoryAction.Execute;
1389     2: CabinetFavoriteAction.Execute;
1390     end;
1391    
1392 yoffy 1.2 //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1393     if GikoSys.Setting.AutoLogin then
1394     LoginAction.Execute;
1395    
1396     //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?
1397     for i := 1 to ParamCount do begin
1398     MoveToURL(ParamStr(i));
1399     end;
1400     // SetStdToolBar;
1401     // SetLinkBar;
1402 h677 1.22
1403 hi_ 1.32 s := GikoSys.FAbon.NGwordname;
1404     StatusBar.Panels[2].Text := s;
1405     StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1406     StatusBarResize(Sender);
1407 yoffy 1.2 end;
1408    
1409     //
1410     //
1411     //
1412     procedure TGikoForm.FormShow(Sender: TObject);
1413     var
1414     i: Integer;
1415     CoolSet: TCoolSet;
1416     begin
1417     ShowWindow(Application.Handle, SW_HIDE);
1418    
1419     //FormCreate鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1420     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1421     StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1422     StdToolBarVisibleActionExecute( nil );
1423     AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1424     AddressBarVisibleActionExecute( nil );
1425     LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1426     LinkBarVisibleActionExecute( nil );
1427     ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1428     ListToolBarVisibleActionExecute( nil );
1429     ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1430     ListNameBarVisibleActionExecute( nil );
1431     BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1432     BrowserToolBarVisibleActionExecute( nil );
1433     BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1434     BrowserNameBarVisibleActionExecute( nil );
1435    
1436     //鐃?鐃緒申鐃?鐃?鐃?鐃?
1437     BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1438     BrowserTabVisibleActionExecute(nil);
1439    
1440     if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1441     BrowserTabTopAction.Checked := True;
1442     BrowserTabTopActionExecute(nil);
1443     end else begin
1444     BrowserTabBottomAction.Checked := True;
1445     BrowserTabBottomActionExecute(nil);
1446     end;
1447    
1448     if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1449     BrowserTabTabStyleAction.Checked := True;
1450     BrowserTabTabStyleActionExecute(nil);
1451     end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1452     BrowserTabButtonStyleAction.Checked := True;
1453     BrowserTabButtonStyleActionExecute(nil);
1454     end else begin
1455     BrowserTabFlatStyleAction.Checked := True;
1456     BrowserTabFlatStyleActionExecute(nil);
1457     end;
1458    
1459    
1460 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1461     MainCoolBar.Bands.BeginUpdate;
1462     try
1463     for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1464     CoolSet := GikoSys.Setting.MainCoolSet[i];
1465     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1466     Continue;
1467     MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1468     MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1469     MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1470     end;
1471     finally
1472     MainCoolBar.Bands.EndUpdate;
1473     end;
1474    
1475     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1476     ListCoolBar.Bands.BeginUpdate;
1477     try
1478     for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1479     CoolSet := GikoSys.Setting.ListCoolSet[i];
1480     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1481     Continue;
1482     ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1483     ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1484     ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1485     end;
1486     finally
1487     ListCoolBar.Bands.EndUpdate;
1488     end;
1489    
1490     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1491     BrowserCoolBar.Bands.BeginUpdate;
1492     try
1493     for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1494     CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1495     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1496     Continue;
1497     BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1498     BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1499     BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1500     end;
1501     finally
1502     BrowserCoolBar.Bands.EndUpdate;
1503     end;
1504    
1505     end;
1506 yoffy 1.2 {
1507 hi_ 1.1 procedure TGikoForm.SetStdToolBar;
1508     var
1509     i: Integer;
1510     FileName: string;
1511     ini: TMemIniFile;
1512     s: string;
1513     Action: TContainedAction;
1514     ToolButton: TToolButton;
1515     begin
1516     exit;
1517     for i := StdToolBar.ButtonCount - 1 downto 0 do begin
1518     StdToolBar.RemoveControl(StdToolBar.Buttons[i]);
1519     //StdToolBar.Buttons[i].Free;
1520     end;
1521     FileName := GikoSys.GetConfigDir + 'ToolBar.ini';
1522     ini := TMemIniFile.Create(FileName);
1523     i := 0;
1524     while true do begin
1525     s := ini.ReadString('StdToolBar', IntToStr(i), '');
1526     if s = '' then
1527     Break;
1528     if s = '-' then begin
1529     ToolButton := TToolButton.Create(StdToolBar);
1530     ToolButton.Style := tbsSeparator;
1531     ToolButton.Width := 8;
1532     ToolButton.Left := 10000;
1533     StdToolBar.InsertControl(ToolButton);
1534     end else begin
1535     Action := GetAction(s);
1536     if Action <> nil then begin
1537     ToolButton := TToolButton.Create(StdToolBar);
1538     ToolButton.Action := Action;
1539     ToolButton.Left := 10000;
1540     StdToolBar.InsertControl(ToolButton);
1541     end;
1542     end;
1543     Inc(i);
1544     end;
1545     end;
1546 yoffy 1.2 }
1547     {function TGikoForm.GetAction(ActionName: string): TContainedAction;
1548 hi_ 1.1 var
1549     i: Integer;
1550     begin
1551     for i := 0 to ActionList.ActionCount - 1 do begin
1552     if ActionList.Actions[i].Name = ActionName then begin
1553     Result := ActionList.Actions[i];
1554     Exit;
1555     end;
1556     end;
1557     Result := nil;
1558 yoffy 1.2 end;}
1559 hi_ 1.1
1560     procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1561     var
1562     i: Integer;
1563     CoolSet: TCoolSet;
1564     wp: TWindowPlacement;
1565     begin
1566 yoffy 1.2 // if not EnabledCloseButton then begin
1567     // CanClose := False;
1568     // Exit;
1569     // end;
1570    
1571 hi_ 1.1 CanClose := True;
1572     Application.OnDeactivate := nil;
1573     Self.OnDeactivate := nil;
1574    
1575 yoffy 1.2 //column鐃緒申
1576     if GetActiveList is TBBS2ch then begin
1577     for i := 0 to ListView.Columns.Count - 1 do
1578     GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1579     end else if GetActiveList is TCategory then begin
1580     for i := 0 to ListView.Columns.Count - 1 do
1581     GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1582     end else if GetActiveList is TBoard then begin
1583     for i := 0 to ListView.Columns.Count - 1 do
1584     GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1585     end;
1586    
1587     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1588     wp.length := sizeof(wp);
1589     GetWindowPlacement(Handle, @wp);
1590     GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1591     GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1592     GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1593     GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1594     GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1595    
1596     GikoSys.Setting.ListStyle := ListView.ViewStyle;
1597     GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1598     GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1599     GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1600     GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1601     if ArrangeAction.Checked then
1602     GikoSys.Setting.ListOrientation := gloVertical
1603     else
1604     GikoSys.Setting.ListOrientation := gloHorizontal;
1605     GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1606    
1607     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1608     for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1609     CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1610     CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1611     CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1612     GikoSys.Setting.MainCoolSet[i] := CoolSet;
1613     end;
1614     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1615     for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1616     CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1617     CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1618     CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1619     GikoSys.Setting.ListCoolSet[i] := CoolSet;
1620     end;
1621     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1622     for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1623     CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1624     CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1625     CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1626     GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1627 hi_ 1.1 end;
1628    
1629 yoffy 1.2 GikoSys.Setting.WriteWindowSettingFile;
1630     GikoSys.Setting.WriteNameMailSettingFile;
1631    
1632     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1633 hi_ 1.1 try
1634 yoffy 1.2 FavoriteDM.WriteFavorite;
1635 hi_ 1.1 except
1636     end;
1637 yoffy 1.2 // Favorite.Free;
1638 hi_ 1.1
1639     try
1640     //鐃?鐃?鐃?鐃緒申鐃?鐃?
1641     NotSelectTabCloseAction.Execute;
1642     if BrowserTab.Tabs.Count >= 1 then begin
1643     DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1644     end;
1645     except
1646     end;
1647    
1648     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申&鐃?鐃緒申
1649     try
1650     RoundList.SaveRoundFile;
1651     except
1652     end;
1653     try
1654     RoundList.Clear;
1655     except
1656     end;
1657     try
1658     RoundList.Free;
1659     except
1660     end;
1661    
1662     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1663     try
1664     FHistoryList.Free;
1665     except
1666     end;
1667    
1668     //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1669     try
1670     AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1671     except
1672     end;
1673    
1674     try
1675     FControlThread.Terminate;
1676     except
1677     end;
1678    
1679     // FDownload.Free;
1680     try
1681     SetActiveList(nil);
1682     except
1683     end;
1684     //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1685     Sleep(10);
1686     try
1687     TreeView.Items.Clear;
1688     except
1689     end;
1690    
1691     try
1692     if FavoriteDM <> nil then
1693     FavoriteDM.Free;
1694     FavoriteDM := nil;
1695     if AddressHistoryDM <> nil then
1696     AddressHistoryDM.Free;
1697     AddressHistoryDM := nil;
1698     except
1699     end;
1700     try
1701     if BBS2ch <> nil then
1702     BBS2ch.Free;
1703     BBS2ch := nil;
1704     except
1705     end;
1706 yoffy 1.2
1707     try
1708     //Hint鐃?鐃緒申
1709     if FHint <> nil then begin
1710     FHint.ReleaseHandle;
1711     FHint.Free;
1712     FHint := nil;
1713     end;
1714     //Preview鐃?鐃緒申
1715     if TPreviewBrowser <> nil then begin
1716     FPreviewBrowser.Free;
1717     FPreviewBrowser := nil;
1718     end;
1719     except
1720     end;
1721 hi_ 1.1 end;
1722    
1723     procedure TGikoForm.FormDestroy(Sender: TObject);
1724     //var
1725     // wp: TWindowPlacement;
1726     begin
1727     { //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1728     FHistoryList.Free;
1729    
1730     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1731     wp.length := sizeof(wp);
1732     GetWindowPlacement(Handle, @wp);
1733    
1734     GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1735     GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1736     GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1737     GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1738     GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1739    
1740     GikoSys.Setting.CabinetVisible := CabinetPanel.Visible;
1741     GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1742    
1743     GikoSys.Setting.WriteWindowSettingFile;
1744     GikoSys.Setting.WriteNameMailSettingFile;
1745     FDownload.Free;
1746     BBS2ch.Free;}
1747     end;
1748    
1749     //鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1750     procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1751     begin
1752     Application.Terminate;
1753     Action := caFree;
1754     end;
1755    
1756     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1757     procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1758     begin
1759     CabinetVisibleAction.Execute;
1760     // CabinetPanelVisible(false);
1761     end;
1762    
1763     procedure TGikoForm.ReloadBBS;
1764     begin
1765     //鐃?鐃?鐃?鐃緒申鐃?鐃?
1766     NotSelectTabCloseAction.Execute;
1767     if BrowserTab.Tabs.Count >= 1 then
1768     DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1769     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1770     FHistoryList.Clear;
1771     //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1772     TreeView.Items.Clear;
1773    
1774     //BBS鐃?鐃緒申
1775     BBS2ch.Free;
1776    
1777     SetActiveList(nil);
1778    
1779     FTreeType := gttNone;
1780    
1781     //BBS鐃緒申鐃緒申
1782     BBS2ch := TBBS2ch.Create(GikoSys.Setting.LogFolder);
1783    
1784     BBS2ch.ReadBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1785     Show2chTree;
1786     end;
1787    
1788     //鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1789     procedure TGikoForm.SetBoardTreeNode;
1790     var
1791     i, j: integer;
1792     Root: TTreeNode;
1793     CategoryNode: TTreeNode;
1794     BoardNode: TTreeNode;
1795     Category: TCategory;
1796     Board: TBoard;
1797     begin
1798     TreeView.Items.BeginUpdate;
1799     TreeView.Items.Clear;
1800     try
1801     Root := TreeView.Items.Add(nil, BBS2ch.Title);
1802 yoffy 1.2 Root.ImageIndex := ITEM_ICON_2CH1;
1803     Root.SelectedIndex := ITEM_ICON_2CH2;
1804 hi_ 1.1 Root.Data := BBS2ch;
1805     if SplashWindow <> nil then
1806     SplashWindow.ProgressBar.Max := BoardGroup.BBS2ch.Count;
1807    
1808     for i := 0 to BoardGroup.BBS2ch.Count - 1 do begin
1809     Category := TCategory(BoardGroup.BBS2ch.Items[i]);
1810     CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
1811     CategoryNode.Data := Category;
1812 yoffy 1.2 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
1813     CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
1814 hi_ 1.1
1815     for j := 0 to Category.Count - 1 do begin
1816     Board := TBoard(Category.Items[j]);
1817     Board.BeginUpdate;
1818     BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
1819     BoardNode.Data := Board;
1820 yoffy 1.2 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
1821     BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
1822 hi_ 1.1 Board.LoadSettings;
1823     Board.EndUpdate;
1824     end;
1825    
1826     CategoryNode.Expanded := Category.NodeExpand;
1827    
1828     if SplashWindow <> nil then begin
1829     SplashWindow.ProgressBar.StepIt;
1830     Application.ProcessMessages;
1831     end;
1832    
1833     end;
1834     finally
1835     TreeView.Items.EndUpdate;
1836     end;
1837     end;
1838    
1839     function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS2ch): Integer;
1840     const
1841     COLUMN: array[0..0] of string = ('鐃?鐃?鐃?鐃緒申鐃緒申');
1842     var
1843     ListColumn: TListColumn;
1844     i: Integer;
1845     begin
1846     ListView.Items.BeginUpdate;
1847     try
1848     Screen.Cursor := crHourGlass;
1849    
1850     ListView.Columns.Clear;
1851     for i := 0 to Length(COLUMN) - 1 do begin
1852     ListColumn := ListView.Columns.Add;
1853     ListColumn.Caption := COLUMN[i];
1854     ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
1855     end;
1856    
1857     ListView.Items.Count := 0;
1858     ListView.Items.Clear;
1859     ListView.Items.Count := ABBS2ch.Count;
1860    
1861     // UpFolderAction.Enabled := False;
1862     // AllItemAction.Enabled := False;
1863     // LogItemAction.Enabled := False;
1864     // NewItemAction.Enabled := False;
1865     // SelectItemAction.Enabled := False;
1866     // ListDownloadToolButton.Enabled := False;
1867     // BoardReservToolButton.Enabled := False;
1868     // ListThreadDownloadToolButton.Enabled := False;
1869    
1870     ListNameLabel.Caption := ABBS2ch.Title;
1871     FolderImage.Picture := nil;
1872     ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
1873    
1874 yoffy 1.2 FSortIndex := 0;
1875     FSortOrder := False;
1876     ListViewColumnClick(nil, ListView.Column[0]);
1877    
1878 hi_ 1.1 Result := ABBS2ch.Count;
1879     finally
1880     Screen.Cursor := crDefault;
1881     ListView.Items.EndUpdate;
1882     end;
1883     end;
1884    
1885     function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
1886     const
1887     COLUMN: array[0..2] of string = ('鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
1888     var
1889     ListColumn: TListColumn;
1890     i: Integer;
1891     begin
1892     ListView.Items.BeginUpdate;
1893     try
1894     Screen.Cursor := crHourGlass;
1895    
1896     ListView.Columns.Clear;
1897     for i := 0 to Length(COLUMN) - 1 do begin
1898     ListColumn := ListView.Columns.Add;
1899     ListColumn.Caption := COLUMN[i];
1900     ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
1901     end;
1902    
1903     ListView.Items.Count := 0;
1904     ListView.Items.Clear;
1905     ListView.Items.Count := Category.Count;
1906    
1907     // UpFolderAction.Enabled := True;
1908     // AllItemAction.Enabled := False;
1909     // LogItemAction.Enabled := False;
1910     // NewItemAction.Enabled := False;
1911     // SelectItemAction.Enabled := False;
1912     // ListDownloadToolButton.Enabled := False;
1913     // BoardReservToolButton.Enabled := False;
1914     // ListThreadDownloadToolButton.Enabled := False;
1915    
1916     ListNameLabel.Caption := Category.Title;
1917     FolderImage.Picture := nil;
1918     ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
1919    
1920 yoffy 1.2 FSortIndex := 0;
1921     FSortOrder := False;
1922     ListViewColumnClick(nil, ListView.Column[0]);
1923    
1924 hi_ 1.1 Result := Category.Count;
1925     finally
1926     Screen.Cursor := crDefault;
1927     ListView.Items.EndUpdate;
1928     end;
1929     end;
1930    
1931     function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
1932     const
1933     COLUMN: array[0..6] of string = ('鐃?鐃緒申鐃?鐃?鐃緒申', '鐃?鐃?鐃緒申鐃?', '鐃緒申鐃緒申', '鐃?鐃緒申',
1934     '鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
1935     COLUMN_ALIGNMENT: array[0..6] of TAlignment = (taLeftJustify, taRightJustify,
1936     taRightJustify, taRightJustify,
1937     taRightJustify, taLeftJustify,
1938     taLeftJustify);
1939     //No, 鐃?鐃緒申鐃?鐃?鐃緒申, 鐃?鐃?鐃緒申鐃?, 鐃緒申鐃緒申鐃?鐃緒申, 鐃緒申鐃緒申鐃緒申鐃緒申
1940     var
1941     ListColumn: TListColumn;
1942     i: Integer;
1943     begin
1944     ListView.Items.BeginUpdate;
1945     try
1946     Screen.Cursor := crHourGlass;
1947    
1948 yoffy 1.51 // 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1949     // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1950     if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
1951     begin
1952     ListView.Columns.Clear;
1953     for i := 0 to Length(COLUMN) - 1 do begin
1954     ListColumn := ListView.Columns.Add;
1955     ListColumn.Caption := COLUMN[i];
1956     ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
1957     ListColumn.Alignment := COLUMN_ALIGNMENT[i];
1958     end;
1959     end;
1960 hi_ 1.1
1961     ListView.Items.Count := 0;
1962     ListView.Items.Clear;
1963    
1964     case GikoForm.ViewType of
1965     gvtAll: ListView.Items.Count := Board.Count;
1966     gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
1967     gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
1968     gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
1969     end;
1970    
1971     ListNameLabel.Caption := Board.Title;
1972     FolderImage.Picture := nil;
1973     ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
1974    
1975 yoffy 1.2 FSortIndex := 0;
1976     FSortOrder := False;
1977     ListViewColumnClick(nil, ListView.Column[0]);
1978 hi_ 1.1
1979     Result := Board.Count;
1980     finally
1981     Screen.Cursor := crDefault;
1982     ListView.Items.EndUpdate;
1983     end;
1984     end;
1985    
1986     procedure TGikoForm.TreeViewChange(Sender: TObject; Node: TTreeNode);
1987     var
1988     i: Integer;
1989     begin
1990     if FTreeType = gttHistory then begin
1991     // SetContent(TThreadItem(Node.Data));
1992     InsertBrowserTab(TThreadItem(Node.Data));
1993     Exit;
1994     end;
1995    
1996     ListView.Selected := nil;
1997     ListView.Items.Count := 0;
1998     ListView.Items.Clear;
1999     // ListView.Columns.Clear;
2000    
2001     Caption := CAPTION_NAME;
2002     //Application.Title := CAPTION_NAME;
2003    
2004    
2005     if GetActiveList is TBBS2ch then begin
2006     for i := 0 to ListView.Columns.Count - 1 do
2007     GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
2008     end else if GetActiveList is TCategory then begin
2009     for i := 0 to ListView.Columns.Count - 1 do
2010     GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
2011     end else if GetActiveList is TBoard then begin
2012     for i := 0 to ListView.Columns.Count - 1 do
2013     GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
2014     end;
2015    
2016     if TObject(Node.Data) is TBBS2ch then begin
2017     SetActiveList(Node.data);
2018     end else if TObject(Node.Data) is TCategory then begin
2019     SetActiveList(Node.data);
2020     end else if TObject(Node.Data) is TBoard then begin
2021     if not TBoard(Node.Data).IsThreadDatRead then begin
2022     Screen.Cursor := crHourGlass;
2023     try
2024     GikoSys.ReadSubjectFile(TBoard(Node.Data));
2025     finally
2026     Screen.Cursor := crDefault;
2027     end;
2028     end;
2029     SetActiveList(Node.data);
2030     end;
2031     end;
2032    
2033     procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2034     var
2035     // FileName: string;
2036     // DateTime: TDateTime;
2037     BoardCnt: Integer;
2038     BBS: TBBS2ch;
2039     Category: TCategory;
2040     Board: TBoard;
2041     ThreadItem: TThreadItem;
2042     RepStr: string;
2043     begin
2044     if ActiveList is TBBS2ch then begin
2045     BBS := TBBS2ch(ActiveList);
2046    
2047     ListView.StateImages := nil;
2048    
2049     if BBS = nil then Exit;
2050     if BBS.Count <= 0 then Exit;
2051     if Item = nil then Exit;
2052     if Item.Index > BBS.Count then Exit;
2053     if ListView.Items.Count = 0 then Exit;
2054    
2055     if not (BBS.Items[Item.Index] is TCategory) then Exit;
2056     Category := TCategory(BBS.Items[Item.Index]);
2057    
2058     if Category = nil then Exit;
2059    
2060     if ListNumberVisibleAction.Checked then
2061     Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2062     else
2063     Item.Caption := Category.Title;
2064    
2065 yoffy 1.2 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2066 hi_ 1.1 Item.Data := Category;
2067     end else if ActiveList is TCategory then begin
2068     Category := TCategory(ActiveList);
2069    
2070     ListView.StateImages := nil;
2071    
2072     if Category = nil then Exit;
2073     if Category.Count <= 0 then Exit;
2074     if Item = nil then Exit;
2075     if Item.Index >= Category.Count then Exit;
2076     if ListView.Items.Count = 0 then Exit;
2077    
2078     if not (Category.Items[Item.Index] is TBoard) then Exit;
2079     Board := TBoard(Category.Items[Item.Index]);
2080    
2081     if Board = nil then Exit;
2082    
2083     if ListNumberVisibleAction.Checked then
2084     Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2085     else
2086     Item.Caption := Board.Title;
2087    
2088     if Item.SubItems.Count <> 2 then begin
2089     Item.SubItems.Clear;
2090     Item.SubItems.Add('');
2091     Item.SubItems.Add('');
2092     end;
2093    
2094 yoffy 1.2 Item.ImageIndex := ITEM_ICON_BOARD1;
2095 hi_ 1.1
2096     if Board.Round then
2097 yoffy 1.51 Item.SubItems[0] := Board.RoundName // '鐃?鐃緒申'
2098 hi_ 1.1 else
2099     Item.SubItems[0] := '';
2100    
2101     if Board.RoundDate = ZERO_DATE then begin
2102     Item.SubItems[1] := '';
2103     end else
2104     Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2105     Item.Data := Board;
2106     end else if ActiveList is TBoard then begin
2107     Board := TBoard(ActiveList);
2108    
2109     if GikoSys.Setting.ListIconVisible then
2110     ListView.StateImages := StateIconImageList
2111     else
2112     ListView.StateImages := nil;
2113    
2114     case GikoForm.ViewType of
2115     gvtAll: BoardCnt := Board.Count;
2116     gvtLog: BoardCnt := Board.GetLogThreadCount;
2117     gvtNew: BoardCnt := Board.GetNewThreadCount;
2118     gvtUser: BoardCnt := Board.GetUserThreadCount;
2119 yoffy 1.2 else
2120     BoardCnt := 0;
2121 hi_ 1.1 end;
2122    
2123     // if Board = nil then Exit;
2124     if BoardCnt <= 0 then Exit;
2125     if Item = nil then Exit;
2126     if Item.Index > BoardCnt then Exit;
2127     if ListView.Items.Count = 0 then Exit;
2128    
2129     // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2130    
2131     ThreadItem := nil;
2132     case GikoForm.ViewType of
2133     gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]);
2134     gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2135     gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2136     gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2137     end;
2138    
2139     if ThreadItem = nil then Exit;
2140    
2141     // if ListNumberVisibleAction.Checked then
2142     // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2143     // else
2144     RepStr := ThreadItem.Title;
2145 yoffy 1.2 //RepStr := StringReplace(RepStr, '&amp;', '&', [rfReplaceAll]);
2146 hi_ 1.1 RepStr := StringReplace(RepStr, '&lt;', '<', [rfReplaceAll]);
2147     RepStr := StringReplace(RepStr, '&gt;', '>', [rfReplaceAll]);
2148     RepStr := StringReplace(RepStr, '&quot;', '"', [rfReplaceAll]);
2149 yoffy 1.2 RepStr := StringReplace(RepStr, '&amp', '&', [rfReplaceAll]);
2150 hi_ 1.1 //RepStr := StringReplace(RepStr, '鐃緒申鐃?', ',', [rfReplaceAll]);
2151    
2152     if Item.SubItems.Count <> 6 then begin
2153     Item.SubItems.Clear;
2154     Item.SubItems.Add('');
2155     Item.SubItems.Add('');
2156     Item.SubItems.Add('');
2157     Item.SubItems.Add('');
2158     Item.SubItems.Add('');
2159     Item.SubItems.Add('');
2160     end;
2161    
2162     if ListNumberVisibleAction.Checked then
2163     Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2164     else
2165     Item.Caption := RepStr;
2166    
2167     case ThreadItem.AgeSage of
2168     gasNone: Item.StateIndex := -1;
2169 yoffy 1.51 gasNew: Item.StateIndex := 0;
2170     gasAge: Item.StateIndex := 1;
2171 hi_ 1.1 gasSage: Item.StateIndex := 2;
2172     end;
2173    
2174     if ThreadItem.IsLogFile then begin
2175 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2176 hi_ 1.1 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2177     Item.SubItems[1] := IntToStr(ThreadItem.Count);
2178     if ThreadItem.NewResCount = 0 then
2179     Item.SubItems[2] := ''
2180     else
2181     Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2182     Item.SubItems[3] := '';
2183     if ThreadItem.Round then
2184     Item.SubItems[4] := ThreadItem.RoundName
2185     else
2186     Item.SubItems[4] := '';
2187     if ThreadItem.RoundDate = ZERO_DATE then begin
2188     Item.SubItems[5] := '';
2189     end else
2190     Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2191     if ThreadItem.NewArrival then
2192 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2193 hi_ 1.1 end else begin
2194 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREAD1;
2195 hi_ 1.1 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2196     Item.SubItems[1] := '';
2197     Item.SubItems[2] := '';
2198     Item.SubItems[3] := '';
2199     Item.SubItems[4] := '';
2200     Item.SubItems[5] := '';
2201     end;
2202     Item.Data := ThreadItem;
2203     end;
2204     end;
2205    
2206     procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2207     const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2208     StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2209     var Index: Integer);
2210     begin
2211     //
2212     end;
2213    
2214     procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2215     EndIndex: Integer);
2216     begin
2217     //
2218     end;
2219    
2220     procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2221     EndIndex: Integer; OldState, NewState: TItemStates);
2222     begin
2223     //
2224     end;
2225    
2226     procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2227     var
2228     p: TPoint;
2229     s: string;
2230     tmp2: string;
2231     URL: string;
2232     ATitle: Boolean;
2233    
2234     wkBBS: string;
2235     wkKey: string;
2236    
2237 h677 1.40 //wkInt: Integer;
2238 hi_ 1.1 wkIntSt: Integer;
2239     wkIntTo: Integer;
2240    
2241     ActiveFileName: string;
2242     e: IHTMLElement;
2243     Ext: string;
2244     PathRec: TPathRec;
2245     begin
2246     try
2247     try
2248     if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin
2249     if LowerCase(OleVariant(IHTMLDocument2(Browser.Document)).charset) <> 'shift_jis' then
2250     OleVariant(IHTMLDocument2(Browser.Document)).charset := 'shift_jis';
2251     end;
2252     except
2253     end;
2254     finally
2255     end;
2256     if PreviewTimer.Enabled then
2257     PreviewTimer.Enabled := False;
2258     Application.CancelHint;
2259     if GetActiveContent <> nil then
2260     ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2261     else
2262     ActiveFileName := '';
2263    
2264     StatusBar.Panels[1].Text := Text;
2265    
2266     if FHint <> nil then begin
2267     FHint.ReleaseHandle;
2268     FHint.ClearAllRes;
2269     end;
2270     if FPreviewBrowser <> nil then
2271     ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2272    
2273     if not GikoSys.Setting.UnActivePopup then
2274     if not GikoForm.Active then
2275     Exit;
2276    
2277     //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2278     //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2279    
2280     s := '';
2281     Ext := AnsiLowerCase(ExtractFileExt(Text));
2282     if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2283     ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2284     if FPreviewBrowser = nil then begin
2285     FPreviewBrowser := TPreviewBrowser.Create(Self);
2286     ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2287     TOleControl(FPreviewBrowser).Parent := nil;
2288     end;
2289 yoffy 1.50 FPreviewBrowser.Navigate('about:blank');//鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2290 hi_ 1.1 FPreviewURL := Text;
2291     PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2292     PreviewTimer.Enabled := True;
2293     end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2294     if Pos('mailto:', Text) = 1 then begin
2295     s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2296     //鐃?鐃?鐃?鐃?鐃?鐃緒申 鐃?鐃?鐃?3鐃緒申466鐃緒申鐃緒申鐃緒申鐃緒申
2297     GetCursorPos(p);
2298     p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2299     p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2300     e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2301     if (Assigned(e)) then begin
2302     tmp2 := GikoSys.ZenToHan(e.Get_outerText);
2303     if (GikoSys.IsNumeric(tmp2)) then begin
2304     //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2305     wkBBS := GetActiveContent.ParentBoard.BBSID;
2306     wkKey := ChangeFileExt(GetActiveContent.FileName, '');
2307     wkIntSt := StrToInt(tmp2);
2308     wkIntTo := StrToInt(tmp2);
2309     //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2310     FHint.PopupType := gptThread;
2311     SetResPopupText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2312     end else begin
2313     FHint.PopupType := gptRaw;
2314     FHint.Caption := s;
2315     end;
2316     end;
2317     end else begin
2318     URL := Text;
2319 yoffy 1.54
2320 yoffy 1.67 if Pos('about:blank..', URL) = 1 then
2321 yoffy 1.66 URL := StringReplace(URL, 'about:blank..', 'http://www.2ch.net', []);
2322 hi_ 1.1
2323     PathRec := Gikosys.Parse2chURL2(URL);
2324    
2325     if PathRec.FDone then begin
2326    
2327     wkIntSt := PathRec