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.46 - (hide annotations) (download) (as text)
Wed Sep 17 07:13:03 2003 UTC (20 years, 7 months ago) by h677
Branch: MAIN
Changes since 1.45: +28 -0 lines
File MIME type: text/x-pascal
レス番号クリックメニューに個別あぼ〜んの解除を追加。メインメニューの個別あぼ〜ん解除をスレのところに移動。

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