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.50 - (hide annotations) (download) (as text)
Sun Sep 21 13:28:16 2003 UTC (20 years, 7 months ago) by yoffy
Branch: MAIN
Changes since 1.49: +8 -1 lines
File MIME type: text/x-pascal
・スキンに対応。

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