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.116 - (hide annotations) (download) (as text)
Thu Nov 20 06:47:00 2003 UTC (20 years, 5 months ago) by yoffy
Branch: MAIN
Changes since 1.115: +2 -1 lines
File MIME type: text/x-pascal
・プラグインが独自の dat 形式を保持している場合にギコナビがそれを破壊してしまう可能性があるので修正。
 ※現状のプラグインは全て 2ch 形式の dat なので問題ない

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