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.39 - (hide annotations) (download) (as text)
Tue Sep 2 16:48:19 2003 UTC (20 years, 7 months ago) by yoffy
Branch: MAIN
Changes since 1.38: +5 -1 lines
File MIME type: text/x-pascal
・すべて表示などのボタンをいじくってると強調表示のまま ComboBox にフォーカスできてしまうことがあったので修正。

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