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.120 - (hide annotations) (download) (as text)
Fri Nov 21 04:41:19 2003 UTC (20 years, 5 months ago) by yoffy
Branch: MAIN
Changes since 1.119: +22 -5 lines
File MIME type: text/x-pascal
・アイコンのビットマップがプロジェクトで使用しているものより不足しているようなので、プロジェクトから復元。
・アイコンを追加して subject.txt が読み込まれている板のアイコンを変更するようにしてみた。

1 hi_ 1.1 unit Giko;
2    
3     interface
4    
5     uses
6     Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7 yoffy 1.117 OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils, Math,
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.120 //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 yoffy 1.120 ITEM_ICON_BOARD_NOSUBJECT = 3; //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1018 yoffy 1.2 ITEM_ICON_BOARD1 = 4; //鐃緒申鐃?鐃?鐃?鐃緒申
1019     ITEM_ICON_BOARD2 = 5; //鐃緒申鐃?鐃?鐃?鐃緒申
1020     ITEM_ICON_THREADLOG1 = 6; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1021     ITEM_ICON_THREADLOG2 = 7; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1022     ITEM_ICON_THREAD1 = 8; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1023     ITEM_ICON_THREAD2 = 9; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1024     ITEM_ICON_THREADNEW1 = 10; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1025     ITEM_ICON_THREADNEW2 = 11; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1026     ITEM_ICON_SORT1 = 12; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1027     ITEM_ICON_SORT2 = 13; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1028 yoffy 1.120 ITEM_ICON_BOARD_LOG = 17; //鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1029     ITEM_ICON_BOARD_NEW = 18; //鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1030 yoffy 1.2
1031     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1032 yoffy 1.48 TOOL_ICON_HEIGHT_MAX = 16; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1033     TOOL_ICON_HEIGHT_MIN = 17; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1034     TOOL_ICON_HEIGHT_NORMAL = 18; //鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1035     TOOL_ICON_WIDTH_MAX = 19; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1036     TOOL_ICON_WIDTH_MIN = 20; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1037     TOOL_ICON_WIDTH_NORMAL = 21; //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1038    
1039 yoffy 1.51 TOOL_ICON_FAV_FOLDER = 30; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申
1040 yoffy 1.100 TOOL_ICON_FAV_BOARD = 31; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1041 yoffy 1.51 TOOL_ICON_FAV_THREAD = 32; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1042 hi_ 1.1
1043     HTML_FILE_NAME = 'temp_preview.html';
1044 yoffy 1.114 BBS_NAME_SIGNATURE = #$1B; // 鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申 BBS 鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申
1045     // 鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申
1046 hi_ 1.1
1047     {$R *.DFM}
1048    
1049     procedure TGikoForm.CreateParams(var Params: TCreateParams);
1050     begin
1051     inherited;
1052     if FormStyle in [fsNormal, fsStayOnTop] then begin
1053     if BorderStyle in [bsSingle, bsSizeable] then begin
1054     Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1055     Params.WndParent := 0;
1056     end;
1057     end;
1058     end;
1059    
1060     procedure TGikoForm.FormCreate(Sender: TObject);
1061     const
1062     TVS_NOTOOLTIPS = $0080;
1063     var
1064     FileName: string;
1065     Style: DWORD;
1066     msg: string;
1067     i: Integer;
1068     wp: TWindowPlacement;
1069 hi_ 1.32 s: string;
1070 hi_ 1.1 begin
1071     {$IFDEF DEBUG}
1072     AllocConsole;
1073     Writeln('============================================================');
1074     Writeln(' 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃? 鐃?鐃緒申鐃?鐃?鐃緒申');
1075     Writeln('');
1076     Writeln(' 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?');
1077     Writeln(' 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
1078     Writeln('============================================================');
1079     {$ENDIF}
1080     Application.OnDeactivate := AppFormDeactivate;
1081     Self.OnDeactivate := AppFormDeactivate;
1082     Application.HookMainWindow(Hook);
1083    
1084     FTreeType := gttNone;
1085    
1086 yoffy 1.51 FSearchDialog := nil;
1087 yoffy 1.49
1088 hi_ 1.1 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1089     Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1090    
1091     //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1092     RoundList := TRoundList.Create;
1093     RoundList.LoadRoundFile;
1094    
1095     //BBS鐃緒申鐃緒申
1096     BBS2ch := TBBS2ch.Create(GikoSys.Setting.LogFolder);
1097    
1098     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1099     // FFavorite := TFavorite.Create(FavoriteTreeView);
1100     FavoriteDM.SetFavTreeView(FavoriteTreeView);
1101     FavoriteDM.ReadFavorite;
1102    
1103     //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1104     AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1105    
1106 yoffy 1.107 // 鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?(ReadBoardFile 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1107     InitializeBoardPlugIns;
1108 yoffy 1.105
1109 hi_ 1.1 EnabledCloseButton := True;
1110     BoardGroup.BBS2ch.ReadBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1111     // SetBoardTreeNode; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1112    
1113     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1114     ListView.ViewStyle := GikoSys.Setting.ListStyle;
1115    
1116     //鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1117     // MainCoolBar.Top := 0;
1118     // MainCoolBar.Left := 0;
1119    
1120     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
1121     AnimePanel.Top := 0;
1122     AnimePanel.Left := 0;
1123    
1124     //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1125    
1126     //鐃?鐃緒申鐃?鐃?鐃?鐃?
1127     CabinetVisibleAction.Checked := not GikoSys.Setting.CabinetVisible;
1128     CabinetVisibleAction.Execute;
1129     CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1130    
1131     //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1132     MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1133     MsgBarVisibleActionExecute(nil);
1134     MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1135    
1136     //鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1137     StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1138     StatusBarVisibleActionExecute(nil);
1139    
1140     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1141     TreeView.Items.BeginUpdate;
1142 yoffy 1.100 FavoriteTreeView.Items.BeginUpdate;
1143 hi_ 1.1 ListView.Items.BeginUpdate;
1144     try
1145     TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1146     TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1147     TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1148     TreeView.Color := GikoSys.Setting.CabinetBackColor;
1149    
1150 yoffy 1.67 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1151     FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1152     FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1153     FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1154    
1155 hi_ 1.1 ListView.Font.Name := GikoSys.Setting.ListFontName;
1156     ListView.Font.Size := GikoSys.Setting.ListFontSize;
1157     ListView.Font.Color := GikoSys.Setting.ListFontColor;
1158 h677 1.109 //ListView.Color := GikoSys.Setting.ListBackColor;
1159     ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1160     FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1161     FOddColor := GikoSys.Setting.OddColor;
1162    
1163 hi_ 1.1 finally
1164     TreeView.Items.EndUpdate;
1165 yoffy 1.100 FavoriteTreeView.Items.EndUpdate;
1166 hi_ 1.1 ListView.Items.EndUpdate;
1167     end;
1168     //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1169     ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1170    
1171     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1172     BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1173     BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1174 yoffy 1.100 FDragWFirst := false;
1175 hi_ 1.1
1176     // TreeView.TopItem.Expanded := True; //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1177     // TreeView.Selected := TreeView.Items[0]; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1178     SetContent(nil); //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1179    
1180     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1181     wp.length := sizeof(wp);
1182     wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1183     wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1184     wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1185     wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1186     wp.showCmd := SW_HIDE;
1187     SetWindowPlacement(Handle, @wp);
1188    
1189     // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1190     // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1191     if GikoSys.Setting.WindowMax then
1192     WindowState := wsMaximized;
1193    
1194     //鐃?鐃?鐃?鐃?鐃緒申
1195     try
1196     FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1197     if FileExists(FileName) then
1198     Animate.FileName := FileName;
1199     except
1200     end;
1201     // AnimePanel.Height := 26;
1202     // AnimePanel.Width := 39;
1203     // AnimePanel.Top := 2;
1204     // AnimePanel.Left := Width - 48;
1205    
1206     //鐃?鐃?鐃?鐃?
1207     FNameCookie := '';
1208     FMailCookie := '';
1209    
1210     //鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1211     AllItemAction.Checked := True;
1212 yoffy 1.51 AllResAction.Checked := True;
1213 hi_ 1.1
1214     //TreeView鐃緒申鐃緒申鐃緒申鐃?鐃緒申ToolTip鐃緒申鐃緒申鐃?鐃緒申
1215     Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1216     Style := Style or TVS_NOTOOLTIPS;
1217     SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1218    
1219     // 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1220     TreeView.Align := alClient;
1221 yoffy 1.57 FavoriteTreeView.Align := alClient;
1222 hi_ 1.1 FavoriteTreeView.Visible := False;
1223    
1224     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1225     // FBrowserSizeFlag := False;
1226     // FBrowserSizeHeight := ViewPanel.Height;
1227    
1228     FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1229     FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1230    
1231     ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1232     ArrangeAction.Execute;
1233    
1234     if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1235     case GikoSys.Setting.ListWidthState of
1236     glsMax: begin
1237     ViewPanel.Width := 1;
1238 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1239     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1240 hi_ 1.1 end;
1241     glsMin: begin
1242     ViewPanel.Width := GikoSys.Setting.ListWidth;
1243 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1244     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1245 hi_ 1.1 end;
1246     else begin
1247     ViewPanel.Width := GikoSys.Setting.ListWidth;
1248 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1249     BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1250 hi_ 1.1 end;
1251     end;
1252     // if GikoSys.Setting.ListWidthMax then begin
1253     // ViewPanel.Width := 1;
1254     // BrowserSizeAction.ImageIndex := ICON_WIDTH_MIN;
1255     // end else begin
1256     // ViewPanel.Width := GikoSys.Setting.ListWidth;
1257     // BrowserSizeAction.ImageIndex := ICON_WIDTH_MAX;
1258     // end;
1259     end else begin
1260     case GikoSys.Setting.ListHeightState of
1261     glsMax: begin
1262     ViewPanel.Height := 1;
1263 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1264     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1265 hi_ 1.1 end;
1266     glsMin: begin
1267     ViewPanel.Height := GikoSys.Setting.ListHeight;
1268 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1269     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1270 hi_ 1.1 end;
1271     else begin
1272     ViewPanel.Height := GikoSys.Setting.ListHeight;
1273 yoffy 1.2 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1274     BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1275 hi_ 1.1 end;
1276     end;
1277     // if GikoSys.Setting.ListHeightState = glsMax then begin
1278     // end else begin
1279     // ViewPanel.Height := GikoSys.Setting.ListHeight;
1280     // BrowserSizeAction.ImageIndex := ICON_HEIGHT_MAX;
1281     // end;
1282     end;
1283    
1284     //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1285     // ProgressBar.Visible := False;
1286     ProgressBar.Parent := StatusBar;
1287     ProgressBar.Top := 2;
1288     ProgressBar.Left := 0;
1289     ProgressBar.Width := StatusBar.Panels[0].Width;
1290     ProgressBar.Height := StatusBar.Height - 2;
1291     ProgressBar.Position := 0;
1292    
1293     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1294     //formshow()鐃緒申鐃緒申鐃緒申
1295 yoffy 1.2
1296 hi_ 1.1 //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1297     // FDownload := TDownload.Create;
1298     // FDownload.OnDownloadEnd := OnDonloadEnd;
1299     // FDownload.OnWork := Work;
1300     // FDownload.OnWorkBegin := WorkBegin;
1301     // FDownload.OnWorkEnd := WorkEnd;
1302    
1303     //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1304     FControlThread := TThreadControl.Create(True);
1305     FControlThread.MaxThreadCount := 1;
1306     FControlThread.Resume;
1307     FControlThread.OnDownloadEnd := DownloadEnd;
1308     FControlThread.OnDownloadMsg := DownloadMsg;
1309     FControlThread.OnWork := Work;
1310     FControlThread.OnWorkBegin := WorkBegin;
1311     FControlThread.OnWorkEnd := WorkEnd;
1312     // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1313    
1314     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1315     FHistoryList := TList.Create;
1316    
1317 yoffy 1.51 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1318     SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1319 yoffy 1.2
1320 hi_ 1.1 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
1321     SetBrowserTabState;
1322    
1323     BrowserBoardNameLabel.Caption := '';
1324     BrowserNameLabel.Caption := '';
1325     FWorkCount := 0;
1326    
1327     // DetailIconAction.Execute;
1328    
1329     // FBrowserSizeHeight := ViewPanel.Height;
1330     FTabHintIndex := -1;
1331    
1332     //鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1333     // if not GikoSys.DirectoryExistsEx(BBS2ch.GetLogFolder) then begin
1334     // GikoSys.ForceDirectoriesEx(BBS2ch.GetLogFolder);
1335     // end;
1336     // FormResize(Sender);
1337     // MainCoolBarResize(Sender);
1338     // Application.ProcessMessages;
1339    
1340     //鐃緒申鐃緒申鐃?鐃?鐃?
1341     SetLinkBar;
1342    
1343     //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?
1344     SetMenuFont;
1345    
1346     //鐃?鐃?鐃緒申鐃?鐃?Wrapable
1347     ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1348     BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1349    
1350 yoffy 1.2 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1351     ReadToolBarSetting(ActionList, StdToolBar);
1352     ReadToolBarSetting(ActionList, ListToolBar);
1353 yoffy 1.51 try
1354     for i := ListToolBar.ControlCount - 1 downto 0 do
1355     begin
1356     if ListToolBar.Controls[ i ].Action = SelectItemAction then
1357     begin
1358     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1359     if (i + 1) < ListToolBar.ControlCount then
1360     if ListToolBar.Controls[ i + 1 ] is TToolButton then
1361     if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1362     ListToolBar.Controls[ i + 1 ].Visible := False;
1363    
1364     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申
1365     ListToolBar.Controls[ i ].Visible := False;
1366     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申
1367     SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1368     SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1369     SelectComboBox.Parent := ListToolBar;
1370     // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
1371     SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1372     SelectComboBoxSplitter.Parent := ListToolBar;
1373    
1374     break;
1375     end;
1376     end;
1377     except
1378     end;
1379 yoffy 1.2 ReadToolBarSetting(ActionList, BrowserToolBar);
1380     SetToolBarPopup;
1381 yoffy 1.100 OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes;
1382 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃?鐃?
1383     AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1384    
1385 yoffy 1.2 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1386    
1387     //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1388     if not FileExists(GikoSys.GetBoardFileName) then begin
1389     msg := '鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申' + #13#10#13#10
1390     + '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申' + #13#10
1391     + '鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?';
1392     MsgBox(SplashWindow.Handle, msg, '鐃?鐃?鐃?鐃?', MB_OK or MB_ICONINFORMATION);
1393     NewBoardAction.Execute;
1394     end;
1395    
1396     //鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1397     GikoSys.LoadKeySetting(ActionList);
1398    
1399     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1400     // FLastRoundTime := 0;
1401    
1402     //ResHint
1403     FHint := TResPopup.Create(Self);
1404    
1405 yoffy 1.100 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申(鐃緒申鐃緒申鐃緒申)
1406     // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申(鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?)
1407     i := GikoSys.Setting.CabinetIndex;
1408     Cabinet2chAction.Execute;
1409     GikoSys.Setting.CabinetIndex := i;
1410    
1411     // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1412     Case GikoSys.Setting.CabinetIndex of
1413     0: Cabinet2chAction.Execute;
1414     1: CabinetHistoryAction.Execute;
1415     2: CabinetFavoriteAction.Execute;
1416     end;
1417 yoffy 1.67
1418 yoffy 1.2 //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1419     if GikoSys.Setting.AutoLogin then
1420     LoginAction.Execute;
1421    
1422     //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?
1423     for i := 1 to ParamCount do begin
1424     MoveToURL(ParamStr(i));
1425     end;
1426     // SetStdToolBar;
1427     // SetLinkBar;
1428 h677 1.22
1429 hi_ 1.32 s := GikoSys.FAbon.NGwordname;
1430     StatusBar.Panels[2].Text := s;
1431     StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1432     StatusBarResize(Sender);
1433 yoffy 1.2 end;
1434    
1435     //
1436     //
1437     //
1438     procedure TGikoForm.FormShow(Sender: TObject);
1439     var
1440     i: Integer;
1441     CoolSet: TCoolSet;
1442     begin
1443     ShowWindow(Application.Handle, SW_HIDE);
1444    
1445     //FormCreate鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1446     //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1447     StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1448     StdToolBarVisibleActionExecute( nil );
1449     AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1450     AddressBarVisibleActionExecute( nil );
1451     LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1452     LinkBarVisibleActionExecute( nil );
1453     ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1454     ListToolBarVisibleActionExecute( nil );
1455     ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1456     ListNameBarVisibleActionExecute( nil );
1457     BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1458     BrowserToolBarVisibleActionExecute( nil );
1459     BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1460     BrowserNameBarVisibleActionExecute( nil );
1461    
1462     //鐃?鐃緒申鐃?鐃?鐃?鐃?
1463     BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1464     BrowserTabVisibleActionExecute(nil);
1465    
1466     if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1467     BrowserTabTopAction.Checked := True;
1468     BrowserTabTopActionExecute(nil);
1469     end else begin
1470     BrowserTabBottomAction.Checked := True;
1471     BrowserTabBottomActionExecute(nil);
1472     end;
1473    
1474     if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1475     BrowserTabTabStyleAction.Checked := True;
1476     BrowserTabTabStyleActionExecute(nil);
1477     end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1478     BrowserTabButtonStyleAction.Checked := True;
1479     BrowserTabButtonStyleActionExecute(nil);
1480     end else begin
1481     BrowserTabFlatStyleAction.Checked := True;
1482     BrowserTabFlatStyleActionExecute(nil);
1483     end;
1484    
1485    
1486 hi_ 1.1 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1487     MainCoolBar.Bands.BeginUpdate;
1488     try
1489     for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1490     CoolSet := GikoSys.Setting.MainCoolSet[i];
1491     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1492     Continue;
1493     MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1494     MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1495     MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1496     end;
1497     finally
1498     MainCoolBar.Bands.EndUpdate;
1499     end;
1500    
1501     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1502     ListCoolBar.Bands.BeginUpdate;
1503     try
1504     for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1505     CoolSet := GikoSys.Setting.ListCoolSet[i];
1506     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1507     Continue;
1508     ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1509     ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1510     ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1511     end;
1512     finally
1513     ListCoolBar.Bands.EndUpdate;
1514     end;
1515    
1516     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1517     BrowserCoolBar.Bands.BeginUpdate;
1518     try
1519     for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1520     CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1521     if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1522     Continue;
1523     BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1524     BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1525     BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1526     end;
1527     finally
1528     BrowserCoolBar.Bands.EndUpdate;
1529     end;
1530    
1531     end;
1532 yoffy 1.2 {
1533 hi_ 1.1 procedure TGikoForm.SetStdToolBar;
1534     var
1535     i: Integer;
1536     FileName: string;
1537     ini: TMemIniFile;
1538     s: string;
1539     Action: TContainedAction;
1540     ToolButton: TToolButton;
1541     begin
1542     exit;
1543     for i := StdToolBar.ButtonCount - 1 downto 0 do begin
1544     StdToolBar.RemoveControl(StdToolBar.Buttons[i]);
1545     //StdToolBar.Buttons[i].Free;
1546     end;
1547     FileName := GikoSys.GetConfigDir + 'ToolBar.ini';
1548     ini := TMemIniFile.Create(FileName);
1549     i := 0;
1550     while true do begin
1551     s := ini.ReadString('StdToolBar', IntToStr(i), '');
1552     if s = '' then
1553     Break;
1554     if s = '-' then begin
1555     ToolButton := TToolButton.Create(StdToolBar);
1556     ToolButton.Style := tbsSeparator;
1557     ToolButton.Width := 8;
1558     ToolButton.Left := 10000;
1559     StdToolBar.InsertControl(ToolButton);
1560     end else begin
1561     Action := GetAction(s);
1562     if Action <> nil then begin
1563     ToolButton := TToolButton.Create(StdToolBar);
1564     ToolButton.Action := Action;
1565     ToolButton.Left := 10000;
1566     StdToolBar.InsertControl(ToolButton);
1567     end;
1568     end;
1569     Inc(i);
1570     end;
1571     end;
1572 yoffy 1.2 }
1573     {function TGikoForm.GetAction(ActionName: string): TContainedAction;
1574 hi_ 1.1 var
1575     i: Integer;
1576     begin
1577     for i := 0 to ActionList.ActionCount - 1 do begin
1578     if ActionList.Actions[i].Name = ActionName then begin
1579     Result := ActionList.Actions[i];
1580     Exit;
1581     end;
1582     end;
1583     Result := nil;
1584 yoffy 1.2 end;}
1585 hi_ 1.1
1586     procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1587     var
1588     i: Integer;
1589     CoolSet: TCoolSet;
1590     wp: TWindowPlacement;
1591     begin
1592 yoffy 1.100 if ( GikoSys.Setting.ShowDialogForEnd ) and
1593     (MessageDlg('鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
1594     CanClose := false;
1595     Exit;
1596     end else begin
1597     CanClose := True;
1598     end;
1599 hi_ 1.1 Application.OnDeactivate := nil;
1600     Self.OnDeactivate := nil;
1601    
1602 yoffy 1.2 //column鐃緒申
1603     if GetActiveList is TBBS2ch then begin
1604     for i := 0 to ListView.Columns.Count - 1 do
1605     GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1606     end else if GetActiveList is TCategory then begin
1607     for i := 0 to ListView.Columns.Count - 1 do
1608     GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1609     end else if GetActiveList is TBoard then begin
1610     for i := 0 to ListView.Columns.Count - 1 do
1611     GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1612     end;
1613    
1614     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1615     wp.length := sizeof(wp);
1616     GetWindowPlacement(Handle, @wp);
1617     GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1618     GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1619     GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1620     GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1621     GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1622    
1623     GikoSys.Setting.ListStyle := ListView.ViewStyle;
1624     GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1625     GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1626     GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1627     GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1628     if ArrangeAction.Checked then
1629     GikoSys.Setting.ListOrientation := gloVertical
1630     else
1631     GikoSys.Setting.ListOrientation := gloHorizontal;
1632     GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1633    
1634     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1635     for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1636     CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1637     CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1638     CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1639     GikoSys.Setting.MainCoolSet[i] := CoolSet;
1640     end;
1641     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1642     for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1643     CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1644     CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1645     CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1646     GikoSys.Setting.ListCoolSet[i] := CoolSet;
1647     end;
1648     //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1649     for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1650     CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1651     CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1652     CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1653     GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1654 hi_ 1.1 end;
1655    
1656 yoffy 1.2 GikoSys.Setting.WriteWindowSettingFile;
1657     GikoSys.Setting.WriteNameMailSettingFile;
1658    
1659     //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1660 hi_ 1.1 try
1661 yoffy 1.2 FavoriteDM.WriteFavorite;
1662 hi_ 1.1 except
1663     end;
1664 yoffy 1.2 // Favorite.Free;
1665 hi_ 1.1
1666     try
1667     //鐃?鐃?鐃?鐃緒申鐃?鐃?
1668     NotSelectTabCloseAction.Execute;
1669     if BrowserTab.Tabs.Count >= 1 then begin
1670     DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1671     end;
1672     except
1673     end;
1674    
1675     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申&鐃?鐃緒申
1676     try
1677     RoundList.SaveRoundFile;
1678     except
1679     end;
1680     try
1681     RoundList.Clear;
1682     except
1683     end;
1684     try
1685     RoundList.Free;
1686     except
1687     end;
1688    
1689     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1690     try
1691     FHistoryList.Free;
1692     except
1693     end;
1694    
1695     //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1696     try
1697     AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1698     except
1699     end;
1700    
1701     try
1702     FControlThread.Terminate;
1703     except
1704     end;
1705    
1706     // FDownload.Free;
1707     try
1708     SetActiveList(nil);
1709     except
1710     end;
1711     //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1712     Sleep(10);
1713     try
1714     TreeView.Items.Clear;
1715     except
1716     end;
1717    
1718     try
1719     if FavoriteDM <> nil then
1720     FavoriteDM.Free;
1721     FavoriteDM := nil;
1722     if AddressHistoryDM <> nil then
1723     AddressHistoryDM.Free;
1724     AddressHistoryDM := nil;
1725     except
1726     end;
1727     try
1728     if BBS2ch <> nil then
1729     BBS2ch.Free;
1730     BBS2ch := nil;
1731     except
1732     end;
1733 yoffy 1.2
1734     try
1735     //Hint鐃?鐃緒申
1736     if FHint <> nil then begin
1737     FHint.ReleaseHandle;
1738     FHint.Free;
1739     FHint := nil;
1740     end;
1741     //Preview鐃?鐃緒申
1742     if TPreviewBrowser <> nil then begin
1743     FPreviewBrowser.Free;
1744     FPreviewBrowser := nil;
1745     end;
1746     except
1747     end;
1748 hi_ 1.1 end;
1749    
1750     procedure TGikoForm.FormDestroy(Sender: TObject);
1751     //var
1752     // wp: TWindowPlacement;
1753     begin
1754     { //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1755     FHistoryList.Free;
1756    
1757     //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1758     wp.length := sizeof(wp);
1759     GetWindowPlacement(Handle, @wp);
1760    
1761     GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1762     GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1763     GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1764     GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1765     GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1766    
1767     GikoSys.Setting.CabinetVisible := CabinetPanel.Visible;
1768     GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1769    
1770     GikoSys.Setting.WriteWindowSettingFile;
1771     GikoSys.Setting.WriteNameMailSettingFile;
1772     FDownload.Free;
1773     BBS2ch.Free;}
1774     end;
1775    
1776     //鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1777     procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1778     begin
1779     Application.Terminate;
1780     Action := caFree;
1781     end;
1782    
1783     //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1784     procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1785     begin
1786     CabinetVisibleAction.Execute;
1787     // CabinetPanelVisible(false);
1788     end;
1789    
1790     procedure TGikoForm.ReloadBBS;
1791     begin
1792     //鐃?鐃?鐃?鐃緒申鐃?鐃?
1793     NotSelectTabCloseAction.Execute;
1794     if BrowserTab.Tabs.Count >= 1 then
1795     DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1796     //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1797     FHistoryList.Clear;
1798     //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1799     TreeView.Items.Clear;
1800    
1801     //BBS鐃?鐃緒申
1802     BBS2ch.Free;
1803    
1804     SetActiveList(nil);
1805    
1806     FTreeType := gttNone;
1807    
1808     //BBS鐃緒申鐃緒申
1809     BBS2ch := TBBS2ch.Create(GikoSys.Setting.LogFolder);
1810    
1811     BBS2ch.ReadBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1812     Show2chTree;
1813     end;
1814    
1815     //鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1816     procedure TGikoForm.SetBoardTreeNode;
1817     var
1818 yoffy 1.120 i, j, k: integer;
1819 hi_ 1.1 Root: TTreeNode;
1820     CategoryNode: TTreeNode;
1821     BoardNode: TTreeNode;
1822     Category: TCategory;
1823     Board: TBoard;
1824     begin
1825 yoffy 1.112 // 鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1826     // 鐃緒申鐃?鐃緒申鐃緒申 TBBS2ch 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1827     // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申 BBS2ch 鐃緒申 1 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
1828     // 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申 TCategory 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1829 hi_ 1.1 TreeView.Items.BeginUpdate;
1830     TreeView.Items.Clear;
1831     try
1832     if SplashWindow <> nil then
1833     SplashWindow.ProgressBar.Max := BoardGroup.BBS2ch.Count;
1834    
1835     for i := 0 to BoardGroup.BBS2ch.Count - 1 do begin
1836 yoffy 1.112 if LeftStr( BoardGroup.BBS2ch.Items[ i ].Title, 1 ) = BBS_NAME_SIGNATURE then begin
1837     // 鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申 BBS 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1838     Root := TreeView.Items.Add(
1839     nil,
1840     Copy( BBS2ch.Items[ i ].Title, 2, Length( BBS2ch.Items[ i ].Title ) ) );
1841     Root.ImageIndex := ITEM_ICON_2CH1;
1842     Root.SelectedIndex := ITEM_ICON_2CH2;
1843     Root.Data := BBS2ch;
1844     end else begin
1845     Category := TCategory(BoardGroup.BBS2ch.Items[i]);
1846     CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
1847     CategoryNode.Data := Category;
1848     CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
1849     CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
1850 hi_ 1.1
1851 yoffy 1.112 for j := 0 to Category.Count - 1 do begin
1852     Board := TBoard(Category.Items[j]);
1853     Board.BeginUpdate;
1854     BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
1855     BoardNode.Data := Board;
1856 yoffy 1.120 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
1857     if not Board.IsLogFile then begin
1858     BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
1859     BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
1860     end else begin
1861     BoardNode.ImageIndex := ITEM_ICON_BOARD1;
1862     BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
1863     for k := 0 to Board.Count - 1 do begin
1864     if Board.Items[ k ].IsLogFile then begin
1865     BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
1866     BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
1867    
1868     Break;
1869     end;
1870     end;
1871     end;
1872 yoffy 1.112 Board.LoadSettings;
1873     Board.EndUpdate;
1874     end;
1875 hi_ 1.1
1876 yoffy 1.112 CategoryNode.Expanded := Category.NodeExpand;
1877 hi_ 1.1
1878 yoffy 1.112 if SplashWindow <> nil then begin
1879     SplashWindow.ProgressBar.StepIt;
1880     Application.ProcessMessages;
1881     end;
1882 hi_ 1.1 end;
1883     end;
1884     finally
1885     TreeView.Items.EndUpdate;
1886     end;
1887     end;
1888    
1889     function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS2ch): Integer;
1890     const
1891     COLUMN: array[0..0] of string = ('鐃?鐃?鐃?鐃緒申鐃緒申');
1892     var
1893     ListColumn: TListColumn;
1894     i: Integer;
1895     begin
1896     ListView.Items.BeginUpdate;
1897     try
1898     Screen.Cursor := crHourGlass;
1899    
1900     ListView.Columns.Clear;
1901     for i := 0 to Length(COLUMN) - 1 do begin
1902     ListColumn := ListView.Columns.Add;
1903     ListColumn.Caption := COLUMN[i];
1904     ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
1905     end;
1906    
1907     ListView.Items.Count := 0;
1908     ListView.Items.Clear;
1909     ListView.Items.Count := ABBS2ch.Count;
1910    
1911     // UpFolderAction.Enabled := False;
1912     // AllItemAction.Enabled := False;
1913     // LogItemAction.Enabled := False;
1914     // NewItemAction.Enabled := False;
1915     // SelectItemAction.Enabled := False;
1916     // ListDownloadToolButton.Enabled := False;
1917     // BoardReservToolButton.Enabled := False;
1918     // ListThreadDownloadToolButton.Enabled := False;
1919    
1920     ListNameLabel.Caption := ABBS2ch.Title;
1921     FolderImage.Picture := nil;
1922     ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
1923    
1924 yoffy 1.2 FSortIndex := 0;
1925     FSortOrder := False;
1926     ListViewColumnClick(nil, ListView.Column[0]);
1927    
1928 hi_ 1.1 Result := ABBS2ch.Count;
1929     finally
1930     Screen.Cursor := crDefault;
1931     ListView.Items.EndUpdate;
1932     end;
1933     end;
1934    
1935     function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
1936     const
1937     COLUMN: array[0..2] of string = ('鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
1938     var
1939     ListColumn: TListColumn;
1940     i: Integer;
1941     begin
1942     ListView.Items.BeginUpdate;
1943     try
1944     Screen.Cursor := crHourGlass;
1945    
1946     ListView.Columns.Clear;
1947     for i := 0 to Length(COLUMN) - 1 do begin
1948     ListColumn := ListView.Columns.Add;
1949     ListColumn.Caption := COLUMN[i];
1950     ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
1951     end;
1952    
1953     ListView.Items.Count := 0;
1954     ListView.Items.Clear;
1955     ListView.Items.Count := Category.Count;
1956    
1957     // UpFolderAction.Enabled := True;
1958     // AllItemAction.Enabled := False;
1959     // LogItemAction.Enabled := False;
1960     // NewItemAction.Enabled := False;
1961     // SelectItemAction.Enabled := False;
1962     // ListDownloadToolButton.Enabled := False;
1963     // BoardReservToolButton.Enabled := False;
1964     // ListThreadDownloadToolButton.Enabled := False;
1965    
1966     ListNameLabel.Caption := Category.Title;
1967     FolderImage.Picture := nil;
1968     ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
1969    
1970 yoffy 1.2 FSortIndex := 0;
1971     FSortOrder := False;
1972     ListViewColumnClick(nil, ListView.Column[0]);
1973    
1974 hi_ 1.1 Result := Category.Count;
1975     finally
1976     Screen.Cursor := crDefault;
1977     ListView.Items.EndUpdate;
1978     end;
1979     end;
1980    
1981     function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
1982     const
1983     COLUMN: array[0..6] of string = ('鐃?鐃緒申鐃?鐃?鐃緒申', '鐃?鐃?鐃緒申鐃?', '鐃緒申鐃緒申', '鐃?鐃緒申',
1984     '鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
1985     COLUMN_ALIGNMENT: array[0..6] of TAlignment = (taLeftJustify, taRightJustify,
1986     taRightJustify, taRightJustify,
1987     taRightJustify, taLeftJustify,
1988     taLeftJustify);
1989     //No, 鐃?鐃緒申鐃?鐃?鐃緒申, 鐃?鐃?鐃緒申鐃?, 鐃緒申鐃緒申鐃?鐃緒申, 鐃緒申鐃緒申鐃緒申鐃緒申
1990     var
1991     ListColumn: TListColumn;
1992     i: Integer;
1993     begin
1994     ListView.Items.BeginUpdate;
1995     try
1996     Screen.Cursor := crHourGlass;
1997    
1998 yoffy 1.51 // 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1999     // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2000     if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2001     begin
2002     ListView.Columns.Clear;
2003     for i := 0 to Length(COLUMN) - 1 do begin
2004     ListColumn := ListView.Columns.Add;
2005     ListColumn.Caption := COLUMN[i];
2006     ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2007     ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2008     end;
2009     end;
2010 hi_ 1.1
2011     ListView.Items.Count := 0;
2012     ListView.Items.Clear;
2013    
2014     case GikoForm.ViewType of
2015     gvtAll: ListView.Items.Count := Board.Count;
2016     gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2017     gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2018     gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2019     end;
2020    
2021     ListNameLabel.Caption := Board.Title;
2022     FolderImage.Picture := nil;
2023     ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2024    
2025 yoffy 1.2 FSortIndex := 0;
2026     FSortOrder := False;
2027     ListViewColumnClick(nil, ListView.Column[0]);
2028 hi_ 1.1
2029     Result := Board.Count;
2030     finally
2031     Screen.Cursor := crDefault;
2032     ListView.Items.EndUpdate;
2033     end;
2034     end;
2035    
2036     procedure TGikoForm.TreeViewChange(Sender: TObject; Node: TTreeNode);
2037     var
2038     i: Integer;
2039     begin
2040     if FTreeType = gttHistory then begin
2041     // SetContent(TThreadItem(Node.Data));
2042     InsertBrowserTab(TThreadItem(Node.Data));
2043     Exit;
2044     end;
2045    
2046     ListView.Selected := nil;
2047     ListView.Items.Count := 0;
2048     ListView.Items.Clear;
2049     // ListView.Columns.Clear;
2050    
2051     Caption := CAPTION_NAME;
2052     //Application.Title := CAPTION_NAME;
2053    
2054    
2055     if GetActiveList is TBBS2ch then begin
2056     for i := 0 to ListView.Columns.Count - 1 do
2057     GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
2058     end else if GetActiveList is TCategory then begin
2059     for i := 0 to ListView.Columns.Count - 1 do
2060     GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
2061     end else if GetActiveList is TBoard then begin
2062     for i := 0 to ListView.Columns.Count - 1 do
2063     GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
2064     end;
2065    
2066     if TObject(Node.Data) is TBBS2ch then begin
2067     SetActiveList(Node.data);
2068     end else if TObject(Node.Data) is TCategory then begin
2069     SetActiveList(Node.data);
2070     end else if TObject(Node.Data) is TBoard then begin
2071     if not TBoard(Node.Data).IsThreadDatRead then begin
2072     Screen.Cursor := crHourGlass;
2073     try
2074     GikoSys.ReadSubjectFile(TBoard(Node.Data));
2075     finally
2076     Screen.Cursor := crDefault;
2077     end;
2078     end;
2079     SetActiveList(Node.data);
2080     end;
2081     end;
2082    
2083     procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2084     var
2085     // FileName: string;
2086     // DateTime: TDateTime;
2087     BoardCnt: Integer;
2088     BBS: TBBS2ch;
2089     Category: TCategory;
2090     Board: TBoard;
2091     ThreadItem: TThreadItem;
2092     RepStr: string;
2093 yoffy 1.114 i, b, index : Integer;
2094 hi_ 1.1 begin
2095     if ActiveList is TBBS2ch then begin
2096     BBS := TBBS2ch(ActiveList);
2097    
2098 yoffy 1.114 // BBS 鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2099     i := -1;
2100     b := BBS.Count - 1;
2101     index := -1;
2102     while (i < Item.Index) and (index < b) do begin
2103     Inc( index );
2104    
2105     if LeftStr( BBS.Items[ index ].Title, 1 ) <> BBS_NAME_SIGNATURE then
2106     Inc( i );
2107     end;
2108     if i < Item.Index then begin
2109     ListView.Items.Count := i + 1;
2110     Exit;
2111     end;
2112    
2113 hi_ 1.1 ListView.StateImages := nil;
2114    
2115     if BBS = nil then Exit;
2116     if BBS.Count <= 0 then Exit;
2117     if Item = nil then Exit;
2118     if Item.Index > BBS.Count then Exit;
2119     if ListView.Items.Count = 0 then Exit;
2120    
2121 yoffy 1.114 if not (BBS.Items[index] is TCategory) then Exit;
2122     Category := TCategory(BBS.Items[index]);
2123 hi_ 1.1
2124     if Category = nil then Exit;
2125    
2126     if ListNumberVisibleAction.Checked then
2127     Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2128     else
2129     Item.Caption := Category.Title;
2130    
2131 yoffy 1.2 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2132 hi_ 1.1 Item.Data := Category;
2133     end else if ActiveList is TCategory then begin
2134     Category := TCategory(ActiveList);
2135    
2136     ListView.StateImages := nil;
2137    
2138     if Category = nil then Exit;
2139     if Category.Count <= 0 then Exit;
2140     if Item = nil then Exit;
2141     if Item.Index >= Category.Count then Exit;
2142     if ListView.Items.Count = 0 then Exit;
2143    
2144     if not (Category.Items[Item.Index] is TBoard) then Exit;
2145     Board := TBoard(Category.Items[Item.Index]);
2146    
2147     if Board = nil then Exit;
2148    
2149     if ListNumberVisibleAction.Checked then
2150     Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2151     else
2152     Item.Caption := Board.Title;
2153    
2154     if Item.SubItems.Count <> 2 then begin
2155     Item.SubItems.Clear;
2156     Item.SubItems.Add('');
2157     Item.SubItems.Add('');
2158     end;
2159    
2160 yoffy 1.2 Item.ImageIndex := ITEM_ICON_BOARD1;
2161 hi_ 1.1
2162     if Board.Round then
2163 yoffy 1.51 Item.SubItems[0] := Board.RoundName // '鐃?鐃緒申'
2164 hi_ 1.1 else
2165     Item.SubItems[0] := '';
2166    
2167     if Board.RoundDate = ZERO_DATE then begin
2168     Item.SubItems[1] := '';
2169     end else
2170     Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2171     Item.Data := Board;
2172     end else if ActiveList is TBoard then begin
2173     Board := TBoard(ActiveList);
2174    
2175     if GikoSys.Setting.ListIconVisible then
2176     ListView.StateImages := StateIconImageList
2177     else
2178     ListView.StateImages := nil;
2179    
2180     case GikoForm.ViewType of
2181     gvtAll: BoardCnt := Board.Count;
2182     gvtLog: BoardCnt := Board.GetLogThreadCount;
2183     gvtNew: BoardCnt := Board.GetNewThreadCount;
2184     gvtUser: BoardCnt := Board.GetUserThreadCount;
2185 yoffy 1.2 else
2186     BoardCnt := 0;
2187 hi_ 1.1 end;
2188    
2189     // if Board = nil then Exit;
2190     if BoardCnt <= 0 then Exit;
2191     if Item = nil then Exit;
2192     if Item.Index > BoardCnt then Exit;
2193     if ListView.Items.Count = 0 then Exit;
2194    
2195     // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2196    
2197     ThreadItem := nil;
2198     case GikoForm.ViewType of
2199     gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]);
2200     gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2201     gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2202     gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2203     end;
2204    
2205     if ThreadItem = nil then Exit;
2206    
2207     // if ListNumberVisibleAction.Checked then
2208     // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2209     // else
2210     RepStr := ThreadItem.Title;
2211 yoffy 1.2 //RepStr := StringReplace(RepStr, '&amp;', '&', [rfReplaceAll]);
2212 hi_ 1.1 RepStr := StringReplace(RepStr, '&lt;', '<', [rfReplaceAll]);
2213     RepStr := StringReplace(RepStr, '&gt;', '>', [rfReplaceAll]);
2214     RepStr := StringReplace(RepStr, '&quot;', '"', [rfReplaceAll]);
2215 yoffy 1.2 RepStr := StringReplace(RepStr, '&amp', '&', [rfReplaceAll]);
2216 hi_ 1.1 //RepStr := StringReplace(RepStr, '鐃緒申鐃?', ',', [rfReplaceAll]);
2217    
2218     if Item.SubItems.Count <> 6 then begin
2219     Item.SubItems.Clear;
2220     Item.SubItems.Add('');
2221     Item.SubItems.Add('');
2222     Item.SubItems.Add('');
2223     Item.SubItems.Add('');
2224     Item.SubItems.Add('');
2225     Item.SubItems.Add('');
2226     end;
2227    
2228     if ListNumberVisibleAction.Checked then
2229     Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2230     else
2231     Item.Caption := RepStr;
2232    
2233     case ThreadItem.AgeSage of
2234     gasNone: Item.StateIndex := -1;
2235 yoffy 1.51 gasNew: Item.StateIndex := 0;
2236     gasAge: Item.StateIndex := 1;
2237 hi_ 1.1 gasSage: Item.StateIndex := 2;
2238     end;
2239    
2240     if ThreadItem.IsLogFile then begin
2241 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2242 hi_ 1.1 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2243     Item.SubItems[1] := IntToStr(ThreadItem.Count);
2244     if ThreadItem.NewResCount = 0 then
2245     Item.SubItems[2] := ''
2246     else
2247     Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2248     Item.SubItems[3] := '';
2249     if ThreadItem.Round then
2250     Item.SubItems[4] := ThreadItem.RoundName
2251     else
2252     Item.SubItems[4] := '';
2253     if ThreadItem.RoundDate = ZERO_DATE then begin
2254     Item.SubItems[5] := '';
2255     end else
2256     Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2257     if ThreadItem.NewArrival then
2258 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2259 hi_ 1.1 end else begin
2260 yoffy 1.2 Item.ImageIndex := ITEM_ICON_THREAD1;
2261 hi_ 1.1 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2262     Item.SubItems[1] := '';
2263     Item.SubItems[2] := '';
2264     Item.SubItems[3] := '';
2265     Item.SubItems[4] := '';
2266     Item.SubItems[5] := '';
2267     end;
2268     Item.Data := ThreadItem;
2269     end;
2270     end;
2271    
2272     procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2273     const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2274     StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2275     var Index: Integer);
2276     begin
2277     //
2278     end;
2279    
2280     procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2281     EndIndex: Integer);
2282     begin
2283     //
2284     end;
2285    
2286     procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2287     EndIndex: Integer; OldState, NewState: TItemStates);
2288     begin
2289     //
2290     end;
2291    
2292     procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2293     var
2294     p: TPoint;
2295     s: string;
2296     tmp2: string;
2297     URL: string;
2298     ATitle: Boolean;
2299    
2300     wkBBS: string;
2301     wkKey: string;
2302    
2303 h677 1.40 //wkInt: Integer;
2304 hi_ 1.1 wkIntSt: Integer;
2305     wkIntTo: Integer;
2306    
2307     ActiveFileName: string;
2308     e: IHTMLElement;
2309     Ext: string;
2310     PathRec: TPathRec;
2311     begin
2312     try
2313     try
2314     if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin
2315     if LowerCase(OleVariant(IHTMLDocument2(Browser.Document)).charset) <> 'shift_jis' then
2316     OleVariant(IHTMLDocument2(Browser.Document)).charset := 'shift_jis';
2317     end;
2318     except