Develop and Download Open Source Software

Browse CVS Repository

Contents of /gikonavigoeson/gikonavi/Giko.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.213 - (show annotations) (download) (as text)
Wed Mar 10 12:22:44 2004 UTC (20 years, 1 month ago) by h677
Branch: MAIN
Changes since 1.212: +5 -4 lines
File MIME type: text/x-pascal
スレ作成日をログアリのみ、未来スレは表示しないというオプションを追加

1 unit Giko;
2
3 interface
4
5 uses
6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7 OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils, Math,
8 {$IF Defined(DELPRO) }
9 SHDocVw,
10 MSHTML,
11 {$ELSE}
12 SHDocVw_TLB,
13 MSHTML_TLB,
14 {$IFEND}
15 IdHTTP, ActiveX, ActnList, ImgList,
16 ToolWin, Buttons, {Clipbrd,} {HTTPApp,} YofUtils, IdComponent,
17 ShellAPI, UrlMon, Tabs, IdGlobal, StrUtils,
18 CommCtrl, IniFiles, Dialogs,
19 GikoSystem, GikoUtil, Setting, BoardGroup, ThreadControl, ItemDownload,
20 Editor, RoundData, RoundName, KeySetting, GikoPanel, Favorite, FavoriteAdd,
21 FavoriteArrange, AddressHistory, Preview, HTMLDocumentEvent, Kotehan,
22 HintWindow, GikoCoolBar, GikoListView, ToolBarSetting, ToolBarUtil,
23 IndividualAbon, Search, ExternalBoardManager, ExternalBoardPlugInMain,
24 StdActns, GikoXMLDoc;
25
26 type
27 TGikoTreeType = (gttNone, gtt2ch, gttHistory, gttFavorite);
28
29 TGikoForm = class(TForm)
30 StatusBar: TStatusBar;
31 MainPanel: TPanel;
32 ClientPanel: TPanel;
33 TreeSplitter: TSplitter;
34 CabinetPanel: TPanel;
35 TreeView: TTreeView;
36 ThreadMainPanel: TPanel;
37 ListSplitter: TSplitter;
38 ViewPanel: TPanel;
39 ListView: TGikoListView;
40 ThreadPanel: TPanel;
41 MessagePanel: TPanel;
42 MessageBar: TPanel;
43 MessageHideButton: TSpeedButton;
44 MessageListView: TListView;
45 MessageSplitter: TSplitter;
46 Panel3: TPanel;
47 SpeedButton1: TSpeedButton;
48 ToolBar1: TToolBar;
49 CabinetSelectToolButton: TToolButton;
50 HistoryToolBar: TToolBar;
51 ToolButton15: TToolButton;
52 ToolButton18: TToolButton;
53 ItemIcon16: TImageList;
54 ItemIcon32: TImageList;
55 HotToobarImageList: TImageList;
56 ToobarImageList: TImageList;
57 ItemImageList: TImageList;
58 ActionList: TActionList;
59 LogDeleteAction: TAction;
60 KidokuAction: TAction;
61 StdToolBarVisibleAction: TAction;
62 SearchAction: TAction;
63 GikoNaviWebPageAction: TAction;
64 AboutAction: TAction;
65 ExitAction: TAction;
66 MsgBarVisibleAction: TAction;
67 StatusBarVisibleAction: TAction;
68 LargeIconAction: TAction;
69 SmallIconAction: TAction;
70 ListIconAction: TAction;
71 DetailIconAction: TAction;
72 CabinetBBSAction: TAction;
73 CabinetHistoryAction: TAction;
74 CabinetVisibleAction: TAction;
75 MidokuAction: TAction;
76 AllSelectAction: TAction;
77 UpFolderAction: TAction;
78 ListNumberVisibleAction: TAction;
79 AllItemAction: TAction;
80 LogItemAction: TAction;
81 NewItemAction: TAction;
82 SelectItemAction: TAction;
83 ShowThreadAction: TAction;
84 StopAction: TAction;
85 MainMenu: TMainMenu;
86 FileMenu: TMenuItem;
87 DeleteMenu: TMenuItem;
88 ExitMenu: TMenuItem;
89 KidokuMenu: TMenuItem;
90 MidokuMenu: TMenuItem;
91 AllSelectMenu: TMenuItem;
92 ViewMenu: TMenuItem;
93 StdToolBarMenu: TMenuItem;
94 CabinetMenu: 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 ShowBoardMenu: TMenuItem;
118 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 KidokuPMenu: TMenuItem;
145 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 AllPMenu: TMenuItem;
189 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 L3: TMenuItem;
215 B3: TMenuItem;
216 BrowserBottomPanel: TGikoPanel;
217 CabinetSelectPopupMenu: TPopupMenu;
218 H2: TMenuItem;
219 ItemReservPMenu: TMenuItem;
220 RoundNamePopupMenu: TPopupMenu;
221 SelectNewRoundName: TAction;
222 SelectDeleteRound: TAction;
223 NewBoardAction: TAction;
224 N7: TMenuItem;
225 B4: TMenuItem;
226 LoginAction: TAction;
227 L4: TMenuItem;
228 KeySettingAction: TAction;
229 K2: TMenuItem;
230 AllTabCloseAction: TAction;
231 A5: TMenuItem;
232 A6: TMenuItem;
233 C1: TMenuItem;
234 V1: TMenuItem;
235 N19: TMenuItem;
236 D1: TMenuItem;
237 D2: TMenuItem;
238 MessageImageList: TImageList;
239 ProgressBar: TProgressBar;
240 ArrangeAction: TAction;
241 URL1: TMenuItem;
242 NameURLCopyAction: TAction;
243 SelectItemNameURLCopyAction: TAction;
244 NameUrlCopyPMenu: TMenuItem;
245 URLC2: TMenuItem;
246 URLN1: TMenuItem;
247 N21: TMenuItem;
248 URLC3: TMenuItem;
249 URLN2: TMenuItem;
250 N22: TMenuItem;
251 N23: TMenuItem;
252 ListCoolBar: TGikoCoolBar;
253 ListToolBar: TToolBar;
254 ViewNoButton: TToolButton;
255 IconToolButton: TToolButton;
256 UpFolderButton: TToolButton;
257 Sepa01ToolButton: TToolButton;
258 AllItemToolButton: TToolButton;
259 LogItemToolButton: TToolButton;
260 NewItemToolButton: TToolButton;
261 ListDownloadToolButton: TToolButton;
262 ListThreadDownloadToolButton: TToolButton;
263 ToolButton2: TToolButton;
264 ToolButton1: TToolButton;
265 BrowserCoolBar: TGikoCoolBar;
266 BrowserToolBar: TToolBar;
267 BrowserSizeButton: TToolButton;
268 ToolButton3: TToolButton;
269 TopButton: TToolButton;
270 LastBotton: TToolButton;
271 NewButton: TToolButton;
272 KokoButton: TToolButton;
273 ToolButton9: TToolButton;
274 EditorButton: TToolButton;
275 ToolButton11: TToolButton;
276 IEButton: TToolButton;
277 ToolButton5: TToolButton;
278 ItemReloadButton: TToolButton;
279 ListNameToolBar: TToolBar;
280 ListNameLabel: TLabel;
281 FolderImage: TImage;
282 BrowserNameToolBar: TToolBar;
283 ItemBoardImage: TImage;
284 BrowserBoardNameLabel: TLabel;
285 ItemImage: TImage;
286 BrowserNameLabel: TLabel;
287 ActiveLogDeleteAction: TAction;
288 D3: TMenuItem;
289 N25: TMenuItem;
290 N26: TMenuItem;
291 ListNameBarVisibleAction: TAction;
292 D4: TMenuItem;
293 BrowserNameBarVisibleAction: TAction;
294 S3: TMenuItem;
295 R2: TMenuItem;
296 TreeSelectNameURLCopy: TAction;
297 TreeSelectNameURLPupupMenu: TMenuItem;
298 N27: TMenuItem;
299 H3: TMenuItem;
300 PaneInitAction: TAction;
301 I1: TMenuItem;
302 BrowserTabToolBar: TToolBar;
303 BrowserTab: TTabControl;
304 ToolButton7: TToolButton;
305 BrowserMinAction: TAction;
306 About1: TMenuItem;
307 N28: TMenuItem;
308 SelectTextClearAction: TAction;
309 MailTextClearAction: TAction;
310 NameTextClearAction: TAction;
311 S4: TMenuItem;
312 N29: TMenuItem;
313 N30: TMenuItem;
314 LeftmostTabSelectAction: TAction;
315 LeftTabSelectAction: TAction;
316 RightTabSelectAction: TAction;
317 RightmostTabSelectAction: TAction;
318 N31: TMenuItem;
319 L5: TMenuItem;
320 L6: TMenuItem;
321 A7: TMenuItem;
322 R3: TMenuItem;
323 FavoriteMenu: TMenuItem;
324 FavoriteAddAction: TAction;
325 N32: TMenuItem;
326 BoardFavoriteAddMenu: TMenuItem;
327 BoardFavoriteAddAction: TAction;
328 ThreadFavoriteAddAction: TAction;
329 ThreadFavoriteAddMenu: TMenuItem;
330 TreeSelectFavoriteAddAction: TAction;
331 N33: TMenuItem;
332 TreeSelectFavoriteAddPupupMenu: TMenuItem;
333 FavoriteArrangeAction: TAction;
334 FavoriteTreeView: TTreeView;
335 StateIconImageList: TImageList;
336 TopPanel: TPanel;
337 TopRightPanel: TPanel;
338 AnimePanel: TPanel;
339 Animate: TAnimate;
340 TopCoolPanel: TPanel;
341 MainCoolBar: TGikoCoolBar;
342 MenuToolBar: TToolBar;
343 StdToolBar: TToolBar;
344 RoundToolButton: TToolButton;
345 ToolButton6: TToolButton;
346 ToolButton4: TToolButton;
347 ToolButton13: TToolButton;
348 AbortToolButton: TToolButton;
349 LoginToolButton: TToolButton;
350 AddressToolBar: TToolBar;
351 AddressComboBox: TComboBox;
352 MoveToToolButton: TToolButton;
353 MoveToAction: TAction;
354 AddressImageList: TImageList;
355 AddressBarVisibleAction: TAction;
356 AddressToolBarMenu: TMenuItem;
357 T4: TMenuItem;
358 BrowserTabVisibleAction: TAction;
359 Show1: TMenuItem;
360 N34: TMenuItem;
361 BrowserTabTopAction: TAction;
362 BrowserTabBottomAction: TAction;
363 T5: TMenuItem;
364 B5: TMenuItem;
365 N35: TMenuItem;
366 BrowserTabTabStyleAction: TAction;
367 BrowserTabButtonStyleAction: TAction;
368 BrowserTabFlatStyleAction: TAction;
369 A8: TMenuItem;
370 U2: TMenuItem;
371 F1: TMenuItem;
372 PreviewTimer: TTimer;
373 MonazillaWebPageAction: TAction;
374 MonazillaWebPageAction1: TMenuItem;
375 GikoHelpAction: TAction;
376 N36: TMenuItem;
377 H4: TMenuItem;
378 KotehanAction: TAction;
379 K3: TMenuItem;
380 LinkBarVisibleAction: TAction;
381 L7: TMenuItem;
382 N37: TMenuItem;
383 A9: TMenuItem;
384 ChevronPopupMenu: TPopupMenu;
385 BBS2chWebPageAction: TAction;
386 N2N1: TMenuItem;
387 N38: TMenuItem;
388 GikoFolderOpenAction: TAction;
389 F2: TMenuItem;
390 LinkToolBar: TToolBar;
391 a10: TMenuItem;
392 ToolButton8: TToolButton;
393 ToolButton10: TToolButton;
394 ThreadEditorAction: TAction;
395 N39: TMenuItem;
396 T6: TMenuItem;
397 N40: TMenuItem;
398 LinkBarPopupMenu: TPopupMenu;
399 ToolBarSettingAction: TAction;
400 T7: TMenuItem;
401 ToolButton12: TToolButton;
402 ToolButton14: TToolButton;
403 ThreadPopupMenu: TPopupMenu;
404 MenuItem4: TMenuItem;
405 MenuItem5: TMenuItem;
406 MenuItem6: TMenuItem;
407 T8: TMenuItem;
408 NameCopyAction: TAction;
409 BoardIEAction: TAction;
410 URLN3: TMenuItem;
411 SelectItemNameCopyAction: TAction;
412 SelectItemNameCopyAction1: TMenuItem;
413 B6: TMenuItem;
414 T9: TMenuItem;
415 C2: TMenuItem;
416 SelectComboBox: TComboBox;
417 MainCoolBarPopupMenu: TPopupMenu;
418 StdToolBarVisiblePMenu: TMenuItem;
419 AddressToolBarVisiblePMenu: TMenuItem;
420 LinkToolBarVisiblePMenu: TMenuItem;
421 NG1: TMenuItem;
422 NG2: TMenuItem;
423 N43: TMenuItem;
424 N44: TMenuItem;
425 L9: TMenuItem;
426 I3: TMenuItem;
427 N45: TMenuItem;
428 B9: TMenuItem;
429 R5: TMenuItem;
430 T12: TMenuItem;
431 Show3: TMenuItem;
432 N46: TMenuItem;
433 T13: TMenuItem;
434 B10: TMenuItem;
435 N47: TMenuItem;
436 A12: TMenuItem;
437 U4: TMenuItem;
438 F4: TMenuItem;
439 N48: TMenuItem;
440 T14: TMenuItem;
441 SelectItemToolButton: TToolButton;
442 SelectResToolButton: TToolButton;
443 SelectResAction: TAction;
444 ToolButton16: TToolButton;
445 AllResAction: TAction;
446 AllResToolButton: TToolButton;
447 N50: TMenuItem;
448 A11: TMenuItem;
449 S5: TMenuItem;
450 Reload: TMenuItem;
451 GoBack: TMenuItem;
452 GoFoward: TMenuItem;
453 EditAction: TAction;
454 ReloadAction: TAction;
455 GoFowardAction: TAction;
456 GoBackAction: TAction;
457 SelectComboBoxSplitter: TImage;
458 IndividualAbon1: TMenuItem;
459 N41: TMenuItem;
460 IndividualAbon2: TMenuItem;
461 N42: TMenuItem;
462 CancellIndividualAbon: TAction;
463 AntiIndividualAbon: TMenuItem;
464 N49: TMenuItem;
465 N51: TMenuItem;
466 N52: TMenuItem;
467 N53: TMenuItem;
468 SearchBoardName: TMenuItem;
469 TreeSelectLogDeleteSeparator: TMenuItem;
470 TreeSelectSearchBoardName: TAction;
471 CabinetFavoriteAction: TAction;
472 N54: TMenuItem;
473 A13: TMenuItem;
474 FavoriteTreePopupMenu: TPopupMenu;
475 FavoriteTreeViewRenameAction: TAction;
476 FavoriteTreeRenamePopupMenu: TMenuItem;
477 FavoriteTreeViewNewFolderAction: TAction;
478 FavoriteTreeNewFolderPopupMenu: TMenuItem;
479 N56: TMenuItem;
480 FavoriteTreeViewDeleteAction: TAction;
481 FavoriteTreeDeletePopupMenu: TMenuItem;
482 FavoriteToolBar: TToolBar;
483 ToolButton17: TToolButton;
484 ToolButton19: TToolButton;
485 FavoriteTreeViewBrowseFolderAction: TAction;
486 FavoriteTreeBrowseFolderPopupMenu: TMenuItem;
487 N57: TMenuItem;
488 FavoriteTreeReloadPopupMenu: TMenuItem;
489 N58: TMenuItem;
490 FavoriteTreeURLCopyPopupMenu: TMenuItem;
491 FavoriteTreeNameCopyPopupMenu: TMenuItem;
492 FavoriteTreeLogDeletePopupMenu: TMenuItem;
493 N59: TMenuItem;
494 FavoriteTreeNameURLCopyPopupMenu: TMenuItem;
495 FavoriteTreeViewReloadAction: TAction;
496 FavoriteTreeViewURLCopyAction: TAction;
497 FavoriteTreeViewNameCopyAction: TAction;
498 FavoriteTreeViewNameURLCopyAction: TAction;
499 FavoriteTreeViewLogDeleteAction: TAction;
500 OnlyAHundredRes: TAction;
501 ToolButton20: TToolButton;
502 AHundredResButton: TToolButton;
503 N60: TMenuItem;
504 ExportFavoriteFileAction1: TMenuItem;
505 ExportFavoriteFile: TFileSaveAs;
506 ToolButton21: TToolButton;
507 CabinetBBSToolButton: TToolButton;
508 ToolButton23: TToolButton;
509 ToolButton24: TToolButton;
510 N6: TMenuItem;
511 N17: TMenuItem;
512 FavoriteTreeViewBrowseBoardAction: TAction;
513 FavoriteTreeViewBrowseThreadAction: TAction;
514 UpBoardAction: TAction;
515 N18: TMenuItem;
516 N20: TMenuItem;
517 N24: TMenuItem;
518 N62: TMenuItem;
519 N61: TMenuItem;
520 N63: TMenuItem;
521 KoreCopy: TAction;
522 N64: TMenuItem;
523 dummy1: TMenuItem;
524 Browser: TWebBrowser;
525 TreeSelectLogDeletePopupMenu: TMenuItem;
526 N65: TMenuItem;
527 BBSSelectPopupMenu: TPopupMenu;
528 procedure FormCreate(Sender: TObject);
529 procedure FormDestroy(Sender: TObject);
530 procedure CabinetPanelHide(Sender: TObject);
531 procedure FormClose(Sender: TObject; var Action: TCloseAction);
532 procedure TreeViewChange(Sender: TObject; Node: TTreeNode);
533 procedure ListViewData(Sender: TObject; Item: TListItem);
534 procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
535 const FindString: String; const FindPosition: TPoint;
536 FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
537 Wrap: Boolean; var Index: Integer);
538 procedure ListViewDataHint(Sender: TObject; StartIndex,
539 EndIndex: Integer);
540 procedure ListViewDataStateChange(Sender: TObject; StartIndex,
541 EndIndex: Integer; OldState, NewState: TItemStates);
542 procedure BrowserStatusTextChange(Sender: TObject;
543 const Text: WideString);
544 procedure BrowserTitleChange(Sender: TObject; const Text: WideString);
545 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
546 procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
547 var AllowChange: Boolean);
548 procedure ListViewKeyDown(Sender: TObject; var Key: Word;
549 Shift: TShiftState);
550 procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
551 procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
552 Button: TToolButton; State: TCustomDrawState;
553 var DefaultDraw: Boolean);
554 procedure BrowserBeforeNavigate2(Sender: TObject;
555 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
556 Headers: OleVariant; var Cancel: WordBool);
557 procedure ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
558 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
559 var DefaultDraw: Boolean);
560 procedure TreeViewCustomDraw(Sender: TCustomTreeView;
561 const ARect: TRect; var DefaultDraw: Boolean);
562 procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
563 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
564 procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
565 procedure TreeViewDblClick(Sender: TObject);
566 procedure FavoriteTreeViewClick(Sender: TObject);
567 procedure ListViewCustomDraw(Sender: TCustomListView;
568 const ARect: TRect; var DefaultDraw: Boolean);
569 procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
570 Shift: TShiftState; X, Y: Integer);
571 procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
572 procedure MessageListViewResize(Sender: TObject);
573 procedure ExitActionExecute(Sender: TObject);
574 procedure AllSelectActionExecute(Sender: TObject);
575 procedure StdToolBarVisibleActionExecute(Sender: TObject);
576 procedure MsgBarVisibleActionExecute(Sender: TObject);
577 procedure StatusBarVisibleActionExecute(Sender: TObject);
578 procedure LargeIconActionExecute(Sender: TObject);
579 procedure SmallIconActionExecute(Sender: TObject);
580 procedure ListIconActionExecute(Sender: TObject);
581 procedure DetailIconActionExecute(Sender: TObject);
582 procedure SearchActionExecute(Sender: TObject);
583 procedure OptionActionExecute(Sender: TObject);
584 procedure GikoNaviWebPageActionExecute(Sender: TObject);
585 procedure AboutActionExecute(Sender: TObject);
586 procedure CabinetHistoryActionExecute(Sender: TObject);
587 procedure CabinetVisible( isVisible : Boolean );
588 procedure CabinetVisibleActionExecute(Sender: TObject);
589 procedure AllItemActionExecute(Sender: TObject);
590 procedure LogItemActionExecute(Sender: TObject);
591 procedure NewItemActionExecute(Sender: TObject);
592 procedure SelectItemActionExecute(Sender: TObject);
593 procedure ListNumberVisibleActionExecute(Sender: TObject);
594 procedure UpFolderActionExecute(Sender: TObject);
595 procedure IconStyleExecute(Sender: TObject);
596 procedure RoundActionExecute(Sender: TObject);
597 procedure StopActionExecute(Sender: TObject);
598 procedure MsgBarCloseActionExecute(Sender: TObject);
599 procedure BrowserMaxActionExecute(Sender: TObject);
600 procedure ScrollTopActionExecute(Sender: TObject);
601 procedure ScrollLastActionExecute(Sender: TObject);
602 procedure ScrollNewActionExecute(Sender: TObject);
603 procedure ScrollKokoActionExecute(Sender: TObject);
604 procedure EditorActionExecute(Sender: TObject);
605 procedure IEActionExecute(Sender: TObject);
606 procedure ShowThreadActionExecute(Sender: TObject);
607 procedure ShowBoardActionExecute(Sender: TObject);
608 procedure URLCopyActionExecute(Sender: TObject);
609 procedure ItemReloadActionExecute(Sender: TObject);
610 procedure SelectListReloadActionExecute(Sender: TObject);
611 procedure SelectThreadReloadActionExecute(Sender: TObject);
612 procedure SelectListReloadActionUpdate(Sender: TObject);
613 procedure AllItemActionUpdate(Sender: TObject);
614 procedure LogItemActionUpdate(Sender: TObject);
615 procedure NewItemActionUpdate(Sender: TObject);
616 procedure SelectItemActionUpdate(Sender: TObject);
617 procedure UpFolderActionUpdate(Sender: TObject);
618 procedure FormResize(Sender: TObject);
619 procedure ScrollTopActionUpdate(Sender: TObject);
620 procedure ScrollLastActionUpdate(Sender: TObject);
621 procedure ScrollNewActionUpdate(Sender: TObject);
622 procedure ScrollKokoActionUpdate(Sender: TObject);
623 procedure EditorActionUpdate(Sender: TObject);
624 procedure IEActionUpdate(Sender: TObject);
625 procedure ShowThreadActionUpdate(Sender: TObject);
626 procedure ShowBoardActionUpdate(Sender: TObject);
627 procedure SelectThreadReloadActionUpdate(Sender: TObject);
628 procedure ListViewSelectItem(Sender: TObject; Item: TListItem;
629 Selected: Boolean);
630 procedure SelectTimerTimer(Sender: TObject);
631 procedure ItemReloadActionUpdate(Sender: TObject);
632 procedure ListViewDblClick(Sender: TObject);
633 procedure LogDeleteActionExecute(Sender: TObject);
634 procedure KokomadeActionExecute(Sender: TObject);
635 procedure ZenbuActionExecute(Sender: TObject);
636 procedure KokoResActionExecute(Sender: TObject);
637 procedure ListPopupMenuPopup(Sender: TObject);
638 procedure SelectItemURLCopyActionExecute(Sender: TObject);
639 procedure SelectItemURLCopyActionUpdate(Sender: TObject);
640 procedure AllSelectActionUpdate(Sender: TObject);
641 procedure LogDeleteActionUpdate(Sender: TObject);
642 procedure BrowserTabCloseActionExecute(Sender: TObject);
643 procedure NotSelectTabCloseActionExecute(Sender: TObject);
644 procedure TreeSelectBoradReloadExecute(Sender: TObject);
645 procedure TreeSelectThreadReloadExecute(Sender: TObject);
646 procedure TreeSelectURLCopyExecute(Sender: TObject);
647 procedure TreePopupMenuPopup(Sender: TObject);
648 procedure ListToolBarVisibleActionExecute(Sender: TObject);
649 procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
650 procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
651 var Cancel: WordBool);
652 procedure ListSplitterCanResize(Sender: TObject; var NewSize: Integer;
653 var Accept: Boolean);
654 procedure ListSplitterMoved(Sender: TObject);
655 procedure BrowserTabChange(Sender: TObject);
656 procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
657 Shift: TShiftState; X, Y: Integer);
658 procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
659 State: TDragState; var Accept: Boolean);
660 procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
661 procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
662 Y: Integer);
663 procedure BrowserDocumentComplete(Sender: TObject;
664 const pDisp: IDispatch; var URL: OleVariant);
665 procedure SelectReservActionUpdate(Sender: TObject);
666 procedure RoundNamePopupMenuPopup(Sender: TObject);
667 procedure SelectNewRoundNameExecute(Sender: TObject);
668 procedure SelectDeleteRoundExecute(Sender: TObject);
669 procedure SelectReservActionExecute(Sender: TObject);
670 procedure NewBoardActionExecute(Sender: TObject);
671 procedure LoginActionExecute(Sender: TObject);
672 procedure KeySettingActionExecute(Sender: TObject);
673 procedure AllTabCloseActionExecute(Sender: TObject);
674 procedure ArrangeActionExecute(Sender: TObject);
675 procedure NameURLCopyActionExecute(Sender: TObject);
676 procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
677 procedure URLCopyActionUpdate(Sender: TObject);
678 procedure NameURLCopyActionUpdate(Sender: TObject);
679 procedure BrowserTabCloseActionUpdate(Sender: TObject);
680 procedure NotSelectTabCloseActionUpdate(Sender: TObject);
681 procedure AllTabCloseActionUpdate(Sender: TObject);
682 procedure SelectItemNameURLCopyActionUpdate(Sender: TObject);
683 procedure ActiveLogDeleteActionExecute(Sender: TObject);
684 procedure ActiveLogDeleteActionUpdate(Sender: TObject);
685 procedure ListNameBarVisibleActionExecute(Sender: TObject);
686 procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
687 procedure TreeSelectNameURLCopyExecute(Sender: TObject);
688 procedure PaneInitActionExecute(Sender: TObject);
689 procedure FormShow(Sender: TObject);
690 procedure BrowserTabToolBarResize(Sender: TObject);
691 procedure BrowserMinActionExecute(Sender: TObject);
692 procedure SelectTextClearActionExecute(Sender: TObject);
693 procedure NameTextClearActionExecute(Sender: TObject);
694 procedure MailTextClearActionExecute(Sender: TObject);
695 procedure LeftmostTabSelectActionExecute(Sender: TObject);
696 procedure LeftTabSelectActionExecute(Sender: TObject);
697 procedure RightTabSelectActionExecute(Sender: TObject);
698 procedure RightmostTabSelectActionExecute(Sender: TObject);
699 procedure LeftmostTabSelectActionUpdate(Sender: TObject);
700 procedure LeftTabSelectActionUpdate(Sender: TObject);
701 procedure RightTabSelectActionUpdate(Sender: TObject);
702 procedure RightmostTabSelectActionUpdate(Sender: TObject);
703 procedure FavoriteMenuClick(Sender: TObject);
704 procedure FavoriteAddActionExecute(Sender: TObject);
705 procedure FavoriteAddActionUpdate(Sender: TObject);
706 procedure BoardFavoriteAddActionExecute(Sender: TObject);
707 procedure BoardFavoriteAddActionUpdate(Sender: TObject);
708 procedure ThreadFavoriteAddActionExecute(Sender: TObject);
709 procedure ThreadFavoriteAddActionUpdate(Sender: TObject);
710 procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
711 procedure FavoriteArrangeActionExecute(Sender: TObject);
712 procedure MainCoolBarResize(Sender: TObject);
713 procedure MoveToActionExecute(Sender: TObject);
714 procedure AddressToolBarResize(Sender: TObject);
715 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
716 Shift: TShiftState);
717 procedure AddressBarVisibleActionExecute(Sender: TObject);
718 procedure BrowserEnter(Sender: TObject);
719 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
720 procedure BrowserTabVisibleActionExecute(Sender: TObject);
721 procedure BrowserTabTopActionExecute(Sender: TObject);
722 procedure BrowserTabBottomActionExecute(Sender: TObject);
723 procedure BrowserTabTabStyleActionExecute(Sender: TObject);
724 procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
725 procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
726 procedure PreviewTimerTimer(Sender: TObject);
727 procedure MessageHideButtonClick(Sender: TObject);
728 procedure MonazillaWebPageActionExecute(Sender: TObject);
729 procedure GikoHelpActionExecute(Sender: TObject);
730 procedure ToolButton18Click(Sender: TObject);
731 procedure KotehanActionExecute(Sender: TObject);
732 procedure LinkBarVisibleActionExecute(Sender: TObject);
733 procedure BBS2chWebPageActionExecute(Sender: TObject);
734 procedure GikoFolderOpenActionExecute(Sender: TObject);
735 procedure MainCoolBarBandInfo(Sender: TObject;
736 var BandInfo: PReBarBandInfoA);
737 procedure MainCoolBarChevronClick(Sender: TObject;
738 RebarChevron: PNMRebarChevron);
739 procedure ListCoolBarBandInfo(Sender: TObject;
740 var BandInfo: PReBarBandInfoA);
741 procedure ListCoolBarChevronClick(Sender: TObject;
742 RebarChevron: PNMRebarChevron);
743 procedure BrowserCoolBarBandInfo(Sender: TObject;
744 var BandInfo: PReBarBandInfoA);
745 procedure BrowserCoolBarChevronClick(Sender: TObject;
746 RebarChevron: PNMRebarChevron);
747 procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
748 procedure ThreadEditorActionExecute(Sender: TObject);
749 procedure ThreadEditorActionUpdate(Sender: TObject);
750 procedure ToolBarSettingActionExecute(Sender: TObject);
751 procedure NameCopyActionExecute(Sender: TObject);
752 procedure BoardIEActionExecute(Sender: TObject);
753 procedure SelectItemNameCopyActionExecute(Sender: TObject);
754 procedure SelectItemNameCopyActionUpdate(Sender: TObject);
755 procedure BoardIEActionUpdate(Sender: TObject);
756 procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
757 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
758 procedure NameCopyActionUpdate(Sender: TObject);
759 procedure SelectComboBoxChange(Sender: TObject);
760 procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
761 Shift: TShiftState);
762 procedure SelectComboBoxExit(Sender: TObject);
763 procedure NG1Click(Sender: TObject);
764 procedure SelectResActionExecute(Sender: TObject);
765 procedure SelectResActionUpdate(Sender: TObject);
766 procedure FormKeyUp(Sender: TObject; var Key: Word;
767 Shift: TShiftState);
768 procedure AllResActionExecute(Sender: TObject);
769 procedure AllResActionUpdate(Sender: TObject);
770 procedure ReloadClick(Sender: TObject);
771 procedure GoBackClick(Sender: TObject);
772 procedure GoFowardClick(Sender: TObject);
773 procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
774 Shift: TShiftState; X, Y: Integer);
775 procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
776 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
777 procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
778 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
779 procedure StatusBarResize(Sender: TObject);
780 procedure IndividualAbon1Click(Sender: TObject);
781 procedure IndividualAbon2Click(Sender: TObject);
782 procedure N42Click(Sender: TObject);
783 procedure SelectComboBoxEnter(Sender: TObject);
784 procedure AntiIndividualAbonClick(Sender: TObject);
785 procedure N51Click(Sender: TObject);
786 procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
787 procedure CabinetFavoriteActionExecute(Sender: TObject);
788 procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
789 Y: Integer);
790 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
791 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
792 var S: String);
793 procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
794 Shift: TShiftState);
795 procedure FavoriteTreePopupMenuPopup(Sender: TObject);
796 procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
797 procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
798 procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
799 procedure ToolButton19Click(Sender: TObject);
800 procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject);
801 procedure FavoriteTreeViewChange(Sender: TObject; Node: TTreeNode);
802 procedure FavoriteTreeViewDblClick(Sender: TObject);
803 procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject);
804 procedure FavoriteTreeViewReloadActionExecute(Sender: TObject);
805 procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
806 procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
807 procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject);
808 procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
809 procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
810 Shift: TShiftState; X, Y: Integer);
811 procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
812 State: TDragState; var Accept: Boolean);
813 procedure OnlyAHundredResExecute(Sender: TObject);
814 procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
815 Y: Integer);
816 procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
817 var Handled: Boolean);
818 procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
819 var Handled: Boolean);
820 procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
821 var Handled: Boolean);
822 procedure ExportFavoriteFileAccept(Sender: TObject);
823 procedure ExportFavoriteFileBeforeExecute(Sender: TObject);
824 procedure CabinetBBSActionExecute(Sender: TObject);
825 procedure FavoriteTreeViewBrowseThreadActionExecute(Sender: TObject);
826 procedure FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
827 procedure UpBoardActionExecute(Sender: TObject);
828 procedure UpBoardActionUpdate(Sender: TObject);
829 procedure BrowserTabContextPopup(Sender: TObject; MousePos: TPoint;
830 var Handled: Boolean);
831 procedure KoreCopyExecute(Sender: TObject);
832 procedure BrowserTabPopupMenuPopup(Sender: TObject);
833 private
834 { Private 鐃緒申鐃緒申 }
835 //RoundList : TRoundList;
836 FSortIndex: Integer;
837 FSortOrder: Boolean;
838
839 FEnabledCloseButton: Boolean;
840 // ThreadCreate: TThreadCreate;
841
842 FClickNode: TTreeNode;
843 FHttpState: Boolean;
844 FHint: TResPopup;
845 FPreviewBrowser: TPreviewBrowser;
846 FPreviewURL: string;
847
848 FBrowserSizeHeight: Integer;
849 FBrowserSizeWidth: Integer;
850
851 // FFavorite: TFavorite;
852 FBrowserComplete: Boolean;
853 FTabHintIndex: Integer;
854 FListStyle: TViewStyle; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
855 FItemNoVisible: Boolean; //鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?
856 FViewType: TGikoViewType; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?
857 FActiveList: TObject;
858 FActiveContent: TThreadItem; //
859 FActiveBBS : TBBS;
860 FHistoryList: TList; //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
861 FTreeType: TGikoTreeType;
862 FWorkCount: Integer;
863 FNameCookie: string;
864 FMailCookie: string;
865 // FLastRoundTime: TDateTime;
866 BrowserNullTab: TThreadItem;
867 // DoubleClickOccurred: array [TMouseButton] of Boolean;
868 FDownloadTitle: string; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
869 FDownloadMax: Integer; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?
870 FEvent: THTMLDocumentEventSink;//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?
871
872 // Fkeynum : Integer; //鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
873
874 IsDraggingSelectComboBox : Boolean;
875 DraggingSelectComboBoxPosition : TPoint;
876
877 FSearchDialog: TSearchDialog;
878
879 FDropSpaceNode: TTreeNode;
880
881 FDragTime : Cardinal; //鐃緒申鐃緒申鐃?鐃緒申D&D鐃?
882 FDragButton : TToolButton; //鐃緒申鐃緒申鐃?鐃緒申D&D鐃?鐃緒申Drag鐃緒申鐃緒申鐃緒申Button鐃緒申鐃緒申
883 FDragWFirst : Boolean; //WebTab鐃緒申D&D鐃?
884
885 FListViewBackGroundColor : TColor; //ListView鐃緒申BackGroundColor
886 FUseOddResOddColor : Boolean; //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申
887 FOddColor : TColor; //鐃緒申鐃緒申鐃?
888
889 FSelectResWord : string; // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?
890 procedure SetBoardTreeNode( inBBS : TBBS );
891 function SetCategoryListItem(ABBS2ch: TBBS): Integer;
892 function SetBoardListItem(Category: TCategory): Integer;
893 function SetThreadListItem(Board: TBoard): Integer;
894 // function GetRoundName(index: integer): string;
895
896 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
897 procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
898 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer);
899 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
900 procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
901
902 procedure SetActiveList(Obj: TObject);
903 procedure ListClick;
904 procedure ListDoubleClick;
905 procedure BrowserMovement(AName: string);
906 procedure SelectListItem(List: TList);
907 // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
908 procedure DeleteTab(ThreadItem: TThreadItem);
909 function Hook(var Message: TMessage): Boolean;
910 procedure AddRoundNameMenu(MenuItem: TMenuItem);
911 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload;
912 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
913 procedure SetSelectRoundName(Sender: TObject);
914 function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
915
916 procedure SetMenuFont;
917 // procedure CreateFavMenu(Folder: TFavoriteFolder);
918 procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
919 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
920 procedure FavoriteClick(Sender: TObject); overload;
921 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
922 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
923 function OnDocumentContextMenu(Sender: TObject): WordBool;
924 // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
925 procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
926 procedure ShowTextPopup;
927 //procedure ShowTextPopup(HintData: THintData);
928 // procedure SetStdToolBar;
929 // function GetAction(ActionName: string): TContainedAction;
930 procedure SetLinkBar;
931 function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
932 procedure MenuBarChevronMenu;
933 procedure LinkBarChevronMenu;
934 procedure ToolBarChevronMenu(ToolBar: TToolBar);
935 procedure ModifySelectList;
936 procedure FavoriteBrowseFolder( node: TTreeNode );
937 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
938 procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
939 procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
940 procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
941 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
942 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
943 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
944 procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
945 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
946 //
947 procedure BrowserTabClick(Sender: TObject);
948 procedure SetListViewBackGroundColor(value: TColor);
949 procedure BBSMenuItemOnClick( Sender : TObject );
950 //
951 procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
952 protected
953 procedure CreateParams(var Params: TCreateParams); override;
954 procedure WndProc(var Message: TMessage); override;
955 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
956 procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
957 procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
958 public
959 { Public 鐃緒申鐃緒申 }
960 // FDownload: TDownload;
961 FControlThread: TThreadControl;
962 procedure MoveToURL(URL: string);
963 procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
964 procedure ReloadBBS;
965 function GetHttpState: Boolean;
966 procedure SetEnabledCloseButton(Enabled: Boolean);
967 function GetTreeNode(Data: TObject): TTreeNode;
968 procedure AppFormDeactivate(Sender: TObject);
969 // procedure CabinetPanelVisible(PanelVisible: Boolean);
970 procedure ListViewAllSelect;
971
972 property ListStyle: TViewStyle read FListStyle write FListStyle;
973 property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
974 property ViewType: TGikoViewType read FViewType write FViewType;
975
976 property NameCookie: string read FNameCookie write FNameCookie;
977 property MailCookie: string read FMailCookie write FMailCookie;
978
979 procedure SetContent(ThreadItem: TThreadItem);
980 function GetActiveContent: TThreadItem;
981 function GetActiveList: TObject;
982
983 property ActiveList: TObject read GetActiveList write SetActiveList;
984 // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
985
986 procedure SetListViewType(AViewType: TGikoViewType); overload;
987 procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
988 procedure DownloadContent(ThreadItem: TThreadItem);
989 procedure DownloadList(Board: TBoard);
990 procedure PlaySound(SoundEventName: string);
991
992 function AddHistory( FavItem: TFavoriteThreadItem ): Boolean;
993 procedure DeleteHistory( threadItem: TThreadItem );
994 procedure ClearHistory;
995 procedure SaveHistory;
996 procedure LoadHistory;
997 procedure ShowBBSTree( inBBS : TBBS );
998 procedure ShowHistoryTree;
999 procedure SetHistoryTreeNode;
1000 // procedure SelectTreeNode(Item: TObject);
1001 procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
1002 procedure SetBrowserTabState;
1003 // property Favorite: TFavorite read FFavorite write FFavorite;
1004 procedure SetToolBarPopup;
1005 procedure ShowFavoriteAddDialog( Item : TObject );
1006 procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
1007
1008 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
1009 property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
1010 property OddColor : TColor read FOddColor write FOddColor;
1011
1012 function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
1013
1014 published
1015 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
1016 end;
1017
1018 TFavoriteMenuItem = class(TMenuItem)
1019 private
1020 FData : Pointer;
1021 public
1022 property Data: Pointer read FData write FData;
1023 end;
1024
1025 TBBSMenuItem = class(TMenuItem)
1026 private
1027 FData : Pointer;
1028 public
1029 property Data: Pointer read FData write FData;
1030 end;
1031
1032 TLinkToolButton = class(TToolButton)
1033 private
1034 FData : Pointer;
1035 public
1036 property Data: Pointer read FData write FData;
1037 end;
1038
1039 var
1040 GikoForm: TGikoForm;
1041
1042 implementation
1043
1044 uses
1045 About, Option, Round, Splash, Sort, ListSelect,
1046 NewBoard, MojuUtils,Clipbrd;
1047
1048 const
1049 CAPTION_NAME: string = '鐃?鐃?鐃?鐃?';
1050 BLANK_HTML: string = 'about:blank';
1051 SELECTCOMBOBOX_NAME: string = ''; // '鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申';
1052 SELECTCOMBOBOX_COLOR: TColor = clWindow;
1053 //D&D鐃緒申鐃?
1054 DandD_THRESHOLD = 5; //D&D鐃緒申鐃緒申鐃?鐃?pixcel)
1055 //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1056 ITEM_ICON_2CH1 = 0; //2ch鐃?鐃?鐃?鐃緒申
1057 ITEM_ICON_2CH2 = 1; //2ch鐃?鐃?鐃?鐃緒申
1058 ITEM_ICON_CATEGORY1 = 2; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1059 ITEM_ICON_CATEGORY2 = 3; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1060 ITEM_ICON_BOARD_NOSUBJECT = 3; //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1061 ITEM_ICON_BOARD1 = 4; //鐃緒申鐃?鐃?鐃?鐃緒申
1062 ITEM_ICON_BOARD2 = 5; //鐃緒申鐃?鐃?鐃?鐃緒申
1063 ITEM_ICON_THREADLOG1 = 6; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1064 ITEM_ICON_THREADLOG2 = 7; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1065 ITEM_ICON_THREAD1 = 8; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1066 ITEM_ICON_THREAD2 = 9; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1067 ITEM_ICON_THREADNEW1 = 10; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1068 ITEM_ICON_THREADNEW2 = 11; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1069 ITEM_ICON_SORT1 = 12; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1070 ITEM_ICON_SORT2 = 13; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1071 ITEM_ICON_BOARD_LOG = 17; //鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1072 ITEM_ICON_BOARD_NEW = 18; //鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1073
1074 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1075 TOOL_ICON_HEIGHT_MAX = 16; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1076 TOOL_ICON_HEIGHT_MIN = 17; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1077 TOOL_ICON_HEIGHT_NORMAL = 18; //鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1078 TOOL_ICON_WIDTH_MAX = 19; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1079 TOOL_ICON_WIDTH_MIN = 20; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1080 TOOL_ICON_WIDTH_NORMAL = 21; //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1081
1082 TOOL_ICON_FAV_FOLDER = 30; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申
1083 TOOL_ICON_FAV_BOARD = 31; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1084 TOOL_ICON_FAV_THREAD = 32; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1085
1086 HTML_FILE_NAME = 'temp_preview.html';
1087
1088 {$R *.DFM}
1089
1090 procedure TGikoForm.CreateParams(var Params: TCreateParams);
1091 begin
1092 inherited;
1093 if FormStyle in [fsNormal, fsStayOnTop] then begin
1094 if BorderStyle in [bsSingle, bsSizeable] then begin
1095 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1096 Params.WndParent := 0;
1097 end;
1098 end;
1099 end;
1100
1101 procedure TGikoForm.FormCreate(Sender: TObject);
1102 const
1103 TVS_NOTOOLTIPS = $0080;
1104 var
1105 FileName: string;
1106 Style: DWORD;
1107 msg: string;
1108 i: Integer;
1109 wp: TWindowPlacement;
1110 s: string;
1111 item : TBBSMenuItem;
1112 begin
1113 {$IFDEF DEBUG}
1114 AllocConsole;
1115 Writeln('============================================================');
1116 Writeln(' 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃? 鐃?鐃緒申鐃?鐃?鐃緒申');
1117 Writeln('');
1118 Writeln(' 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?');
1119 Writeln(' 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
1120 Writeln('============================================================');
1121 {$ENDIF}
1122 Application.OnDeactivate := AppFormDeactivate;
1123 Self.OnDeactivate := AppFormDeactivate;
1124 Application.HookMainWindow(Hook);
1125
1126 FTreeType := gttNone;
1127
1128 FSearchDialog := nil;
1129
1130 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1131 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1132
1133
1134 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1135 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1136
1137 // 鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?(ReadBoardFile, LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1138 InitializeBoardPlugIns;
1139
1140 EnabledCloseButton := True;
1141
1142
1143 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1144 RoundList := TRoundList.Create;
1145 RoundList.LoadRoundBoardFile;
1146
1147 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申(ReadFavorite 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1148 GikoSys.ListBoardFile;
1149
1150 RoundList.LoadRoundThreadFile;
1151
1152 if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
1153 GikoSys.ListBoardFile;
1154
1155 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1156 for i := Length( BBSs ) - 1 downto 0 do begin
1157 try
1158 item := TBBSMenuItem.Create( PopupMenu );
1159 item.Caption := BBSs[ i ].Title;
1160 item.Data := BBSs[ i ];
1161 item.OnClick := BBSMenuItemOnClick;
1162 CabinetSelectPopupMenu.Items.Insert( 0, item );
1163 item := TBBSMenuItem.Create( PopupMenu );
1164 item.Caption := BBSs[ i ].Title;
1165 item.Data := BBSs[ i ];
1166 item.OnClick := BBSMenuItemOnClick;
1167 CabinetMenu.Insert( 0, item );
1168 item := TBBSMenuItem.Create( PopupMenu );
1169 item.Caption := BBSs[ i ].Title;
1170 item.Data := BBSs[ i ];
1171 item.OnClick := BBSMenuItemOnClick;
1172 BBSSelectPopupMenu.Items.Insert( 0, Item );
1173 except
1174 end;
1175 end;
1176
1177
1178 // 鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?(LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1179 FHistoryList := TList.Create;
1180
1181 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1182 LoadHistory;
1183
1184 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1185 // FFavorite := TFavorite.Create(FavoriteTreeView);
1186 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1187 FavoriteDM.ReadFavorite;
1188
1189 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1190 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1191
1192 //鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1193 // MainCoolBar.Top := 0;
1194 // MainCoolBar.Left := 0;
1195
1196 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
1197 AnimePanel.Top := 0;
1198 AnimePanel.Left := 0;
1199
1200 //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1201
1202 //鐃?鐃緒申鐃?鐃?鐃?鐃?
1203 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1204
1205 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1206 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1207 MsgBarVisibleActionExecute(nil);
1208 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1209
1210 //鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1211 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1212 StatusBarVisibleActionExecute(nil);
1213
1214 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1215 TreeView.Items.BeginUpdate;
1216 FavoriteTreeView.Items.BeginUpdate;
1217 ListView.Items.BeginUpdate;
1218 try
1219 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1220 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1221 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1222 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1223
1224 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1225 FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1226 FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1227 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1228
1229 ListView.Font.Name := GikoSys.Setting.ListFontName;
1230 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1231 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1232 //ListView.Color := GikoSys.Setting.ListBackColor;
1233 ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1234 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1235 FOddColor := GikoSys.Setting.OddColor;
1236
1237 finally
1238 TreeView.Items.EndUpdate;
1239 FavoriteTreeView.Items.EndUpdate;
1240 ListView.Items.EndUpdate;
1241 end;
1242 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1243 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1244
1245 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1246 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1247 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1248 FDragWFirst := false;
1249
1250 // TreeView.TopItem.Expanded := True; //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1251 // TreeView.Selected := TreeView.Items[0]; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1252 SetContent(nil); //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1253
1254 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1255 wp.length := sizeof(wp);
1256 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1257 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1258 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1259 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1260 wp.showCmd := SW_HIDE;
1261 SetWindowPlacement(Handle, @wp);
1262
1263 // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1264 // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1265 if GikoSys.Setting.WindowMax then
1266 WindowState := wsMaximized;
1267
1268 //鐃?鐃?鐃?鐃?鐃緒申
1269 try
1270 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1271 if FileExists(FileName) then
1272 Animate.FileName := FileName;
1273 except
1274 end;
1275
1276 //鐃?鐃?鐃?鐃?
1277 FNameCookie := '';
1278 FMailCookie := '';
1279
1280 //鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1281 AllItemAction.Checked := True;
1282 AllResAction.Checked := True;
1283
1284 //TreeView鐃緒申鐃緒申鐃緒申鐃?鐃緒申ToolTip鐃緒申鐃緒申鐃?鐃緒申
1285 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1286 Style := Style or TVS_NOTOOLTIPS;
1287 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1288
1289 // 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1290 TreeView.Align := alClient;
1291 FavoriteTreeView.Align := alClient;
1292 FavoriteTreeView.Visible := False;
1293
1294 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1295 // FBrowserSizeFlag := False;
1296 // FBrowserSizeHeight := ViewPanel.Height;
1297
1298 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1299 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1300
1301 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1302 ArrangeAction.Execute;
1303
1304 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1305 case GikoSys.Setting.ListWidthState of
1306 glsMax: begin
1307 ViewPanel.Width := 1;
1308 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1309 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1310 end;
1311 glsMin: begin
1312 ViewPanel.Width := GikoSys.Setting.ListWidth;
1313 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1314 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1315 end;
1316 else begin
1317 ViewPanel.Width := GikoSys.Setting.ListWidth;
1318 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1319 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1320 end;
1321 end;
1322 end else begin
1323 case GikoSys.Setting.ListHeightState of
1324 glsMax: begin
1325 ViewPanel.Height := 1;
1326 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1327 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1328 end;
1329 glsMin: begin
1330 ViewPanel.Height := GikoSys.Setting.ListHeight;
1331 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1332 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1333 end;
1334 else begin
1335 ViewPanel.Height := GikoSys.Setting.ListHeight;
1336 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1337 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1338 end;
1339 end;
1340 end;
1341
1342 //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1343 // ProgressBar.Visible := False;
1344 ProgressBar.Parent := StatusBar;
1345 ProgressBar.Top := 2;
1346 ProgressBar.Left := 0;
1347 ProgressBar.Width := StatusBar.Panels[0].Width;
1348 ProgressBar.Height := StatusBar.Height - 2;
1349 ProgressBar.Position := 0;
1350
1351 //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1352 FControlThread := TThreadControl.Create(True);
1353 FControlThread.MaxThreadCount := 1;
1354 FControlThread.Resume;
1355 FControlThread.OnDownloadEnd := DownloadEnd;
1356 FControlThread.OnDownloadMsg := DownloadMsg;
1357 FControlThread.OnWork := Work;
1358 FControlThread.OnWorkBegin := WorkBegin;
1359 FControlThread.OnWorkEnd := WorkEnd;
1360 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1361
1362 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1363 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1364
1365 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
1366 SetBrowserTabState;
1367
1368 BrowserBoardNameLabel.Caption := '';
1369 BrowserNameLabel.Caption := '';
1370 FWorkCount := 0;
1371
1372 FTabHintIndex := -1;
1373
1374 //鐃緒申鐃緒申鐃?鐃?鐃?
1375 SetLinkBar;
1376
1377 //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?
1378 SetMenuFont;
1379
1380 //鐃?鐃?鐃緒申鐃?鐃?Wrapable
1381 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1382 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1383
1384 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1385 ReadToolBarSetting(ActionList, StdToolBar);
1386 ReadToolBarSetting(ActionList, ListToolBar);
1387 try
1388 for i := ListToolBar.ControlCount - 1 downto 0 do
1389 begin
1390 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1391 begin
1392 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1393 if (i + 1) < ListToolBar.ControlCount then
1394 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1395 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1396 ListToolBar.Controls[ i + 1 ].Visible := False;
1397
1398 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申
1399 ListToolBar.Controls[ i ].Visible := False;
1400 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申
1401 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1402 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1403 SelectComboBox.Parent := ListToolBar;
1404 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
1405 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1406 SelectComboBoxSplitter.Parent := ListToolBar;
1407
1408 break;
1409 end;
1410 end;
1411 except
1412 end;
1413 ReadToolBarSetting(ActionList, BrowserToolBar);
1414 SetToolBarPopup;
1415 OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes;
1416 //鐃?鐃?鐃緒申鐃?鐃?鐃?
1417 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1418
1419 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1420
1421 //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1422 if not FileExists(GikoSys.GetBoardFileName) then begin
1423 msg := '鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申' + #13#10#13#10
1424 + '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申' + #13#10
1425 + '鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?';
1426 MsgBox(SplashWindow.Handle, msg, '鐃?鐃?鐃?鐃?', MB_OK or MB_ICONINFORMATION);
1427 NewBoardAction.Execute;
1428 end;
1429
1430 //鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1431 GikoSys.LoadKeySetting(ActionList);
1432
1433 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1434 // FLastRoundTime := 0;
1435
1436 //ResHint
1437 FHint := TResPopup.Create(Self);
1438
1439 // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1440 CabinetVisible( False );
1441 if GikoSys.Setting.CabinetVisible then begin
1442 i := CabinetSelectPopupMenu.Items.Count - 1;
1443 if GikoSys.Setting.CabinetIndex = i - 1 then
1444 CabinetHistoryAction.Execute
1445 else if GikoSys.Setting.CabinetIndex = i then
1446 CabinetFavoriteAction.Execute
1447 else begin
1448 if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1449 ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1450 CabinetBBSAction.Execute;
1451 end;
1452 end else begin
1453 ShowBBSTree( BBSs[ 0 ] );
1454 end;
1455
1456 //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1457 if GikoSys.Setting.AutoLogin then
1458 LoginAction.Execute;
1459
1460 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?
1461 for i := 1 to ParamCount do begin
1462 MoveToURL(ParamStr(i));
1463 end;
1464 // SetStdToolBar;
1465 // SetLinkBar;
1466
1467 s := GikoSys.FAbon.NGwordname;
1468 StatusBar.Panels[2].Text := s;
1469 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1470 StatusBarResize(Sender);
1471
1472 dummy1.Caption := ItemReservPMenu.Caption;
1473 dummy1.Hint := ItemReservPMenu.Hint;
1474
1475 end;
1476
1477 //
1478 //
1479 //
1480 procedure TGikoForm.FormShow(Sender: TObject);
1481 var
1482 i: Integer;
1483 CoolSet: TCoolSet;
1484 begin
1485 ShowWindow(Application.Handle, SW_HIDE);
1486
1487 //FormCreate鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1488 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1489 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1490 StdToolBarVisibleActionExecute( nil );
1491 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1492 AddressBarVisibleActionExecute( nil );
1493 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1494 LinkBarVisibleActionExecute( nil );
1495 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1496 ListToolBarVisibleActionExecute( nil );
1497 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1498 ListNameBarVisibleActionExecute( nil );
1499 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1500 BrowserToolBarVisibleActionExecute( nil );
1501 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1502 BrowserNameBarVisibleActionExecute( nil );
1503
1504 //鐃?鐃緒申鐃?鐃?鐃?鐃?
1505 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1506 BrowserTabVisibleActionExecute(nil);
1507
1508 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1509 BrowserTabTopAction.Checked := True;
1510 BrowserTabTopActionExecute(nil);
1511 end else begin
1512 BrowserTabBottomAction.Checked := True;
1513 BrowserTabBottomActionExecute(nil);
1514 end;
1515
1516 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1517 BrowserTabTabStyleAction.Checked := True;
1518 BrowserTabTabStyleActionExecute(nil);
1519 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1520 BrowserTabButtonStyleAction.Checked := True;
1521 BrowserTabButtonStyleActionExecute(nil);
1522 end else begin
1523 BrowserTabFlatStyleAction.Checked := True;
1524 BrowserTabFlatStyleActionExecute(nil);
1525 end;
1526
1527
1528 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1529 MainCoolBar.Bands.BeginUpdate;
1530 try
1531 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1532 CoolSet := GikoSys.Setting.MainCoolSet[i];
1533 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1534 Continue;
1535 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1536 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1537 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1538 end;
1539 finally
1540 MainCoolBar.Bands.EndUpdate;
1541 end;
1542
1543 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1544 ListCoolBar.Bands.BeginUpdate;
1545 try
1546 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1547 CoolSet := GikoSys.Setting.ListCoolSet[i];
1548 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1549 Continue;
1550 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1551 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1552 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1553 end;
1554 finally
1555 ListCoolBar.Bands.EndUpdate;
1556 end;
1557
1558 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1559 BrowserCoolBar.Bands.BeginUpdate;
1560 try
1561 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1562 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1563 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1564 Continue;
1565 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1566 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1567 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1568 end;
1569 finally
1570 BrowserCoolBar.Bands.EndUpdate;
1571 end;
1572
1573 end;
1574 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1575 var
1576 i: Integer;
1577 CoolSet: TCoolSet;
1578 wp: TWindowPlacement;
1579 begin
1580 if ( GikoSys.Setting.ShowDialogForEnd ) and
1581 (MessageDlg('鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
1582 CanClose := false;
1583 Exit;
1584 end else begin
1585 CanClose := True;
1586 end;
1587 // Application.OnDeactivate := nil;
1588 // Self.OnDeactivate := nil;
1589
1590 //column鐃緒申
1591 if GetActiveList is TBBS then begin
1592 for i := 0 to ListView.Columns.Count - 1 do
1593 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1594 end else if GetActiveList is TCategory then begin
1595 for i := 0 to ListView.Columns.Count - 1 do
1596 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1597 end else if GetActiveList is TBoard then begin
1598 for i := 0 to ListView.Columns.Count - 1 do
1599 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1600 end;
1601
1602 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1603 wp.length := sizeof(wp);
1604 GetWindowPlacement(Handle, @wp);
1605 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1606 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1607 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1608 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1609 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1610
1611 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1612 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1613 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1614 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1615 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1616 if ArrangeAction.Checked then
1617 GikoSys.Setting.ListOrientation := gloVertical
1618 else
1619 GikoSys.Setting.ListOrientation := gloHorizontal;
1620 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1621
1622 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1623 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1624 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1625 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1626 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1627 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1628 end;
1629 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1630 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1631 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1632 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1633 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1634 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1635 end;
1636 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1637 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1638 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1639 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1640 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1641 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1642 end;
1643
1644 GikoSys.Setting.WriteWindowSettingFile;
1645 GikoSys.Setting.WriteNameMailSettingFile;
1646
1647 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1648 try
1649 FavoriteDM.WriteFavorite;
1650 except
1651 end;
1652 // Favorite.Free;
1653
1654 try
1655 //鐃?鐃?鐃?鐃緒申鐃?鐃?
1656 NotSelectTabCloseAction.Execute;
1657 if BrowserTab.Tabs.Count >= 1 then begin
1658 DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1659 end;
1660 except
1661 end;
1662
1663 //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
1664 try
1665 SaveHistory;
1666 except
1667 end;
1668
1669 //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1670 try
1671 FHistoryList.Free;
1672 except
1673 end;
1674
1675 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1676 try
1677 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1678 except
1679 end;
1680
1681 try
1682 FControlThread.Terminate;
1683 except
1684 end;
1685
1686
1687
1688 // FDownload.Free;
1689 try
1690 //SetActiveList(nil);
1691 except
1692 end;
1693
1694 //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1695 //Sleep(10);
1696 Application.ProcessMessages;
1697 try
1698 TreeView.Items.Clear;
1699 except
1700 end;
1701
1702 try
1703 if FavoriteDM <> nil then
1704 FavoriteDM.Free;
1705 FavoriteDM := nil;
1706 if AddressHistoryDM <> nil then
1707 AddressHistoryDM.Free;
1708 AddressHistoryDM := nil;
1709 except
1710 end;
1711 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申&鐃?鐃緒申
1712 try
1713 RoundList.SaveRoundFile;
1714 except
1715 end;
1716
1717 try
1718 RoundList.Clear;
1719 except
1720 end;
1721 try
1722 RoundList.Free;
1723 except
1724 end;
1725
1726 // TBBS 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 TCategory, TBoard, TThreadItem 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1727 // TBoard, TThreadItem 鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1728 // BoardPluteIns 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1729 try
1730 for i := 0 to Length( BBSs ) - 1 do begin
1731 if BBSs[ i ] <> nil then
1732 BBSs[ i ].Free;
1733 BBSs[ i ] := nil;
1734 end;
1735 except
1736 end;
1737
1738 try
1739 for i := 0 to Length( BoardPlugIns ) - 1 do begin
1740 if BoardPlugIns[ i ] <> nil then
1741 BoardPlugIns[ i ].Free;
1742 BoardPlugIns[ i ] := nil;
1743 end;
1744 except
1745 end;
1746
1747 try
1748 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1749 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1750 CabinetSelectPopupMenu.Items[ i ].Free;
1751 CabinetMenu.Items[ i ].Free;
1752 end;
1753 end;
1754 except
1755 end;
1756
1757
1758 try
1759 //Hint鐃?鐃緒申
1760 if FHint <> nil then begin
1761 FHint.ReleaseHandle;
1762 FHint.Free;
1763 FHint := nil;
1764 end;
1765 //Preview鐃?鐃緒申
1766 if TPreviewBrowser <> nil then begin
1767 FPreviewBrowser.Free;
1768 FPreviewBrowser := nil;
1769 end;
1770 except
1771 end;
1772
1773
1774 end;
1775
1776 procedure TGikoForm.FormDestroy(Sender: TObject);
1777 begin
1778 ;
1779 end;
1780
1781 //鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1782 procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1783 begin
1784 // ListCoolBar.WindowProc := nil;
1785 // BrowserCoolBar.WindowProc := nil;
1786 // MainCoolBar.WindowProc := nil;
1787 Application.Terminate;
1788 Action := caFree;
1789 // Application.UnhookMainWindow(Hook);
1790 end;
1791
1792 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
1793 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1794 begin
1795 CabinetVisibleAction.Execute;
1796 // CabinetPanelVisible(false);
1797 end;
1798
1799 procedure TGikoForm.ReloadBBS;
1800 var
1801 i : Integer;
1802 item : TBBSMenuItem;
1803 begin
1804 //鐃?鐃?鐃?鐃緒申鐃?鐃?
1805 NotSelectTabCloseAction.Execute;
1806 if BrowserTab.Tabs.Count >= 1 then
1807 DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1808 //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1809 //FHistoryList.Clear;
1810 //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1811 TreeView.Items.Clear;
1812
1813 //BBS鐃?鐃緒申
1814 try
1815 for i := Length( BBSs ) - 1 downto 0 do begin
1816 if BBSs[ i ] <> nil then
1817 BBSs[ i ].Free;
1818 BBSs[ i ] := nil;
1819 end;
1820 except
1821 end;
1822
1823 ActiveList := nil;
1824
1825 FTreeType := gttNone;
1826
1827 GikoSys.ListBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1828 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1829 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1830 try
1831 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1832 CabinetSelectPopupMenu.Items[ i ].Free;
1833 CabinetMenu.Items[ i ].Free;
1834 end;
1835 except
1836 end;
1837 end;
1838 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1839 for i := Length( BBSs ) - 1 downto 0 do begin
1840 try
1841 item := TBBSMenuItem.Create( PopupMenu );
1842 item.Caption := BBSs[ i ].Title;
1843 item.Data := BBSs[ i ];
1844 item.OnClick := BBSMenuItemOnClick;
1845 CabinetSelectPopupMenu.Items.Insert( 0, item );
1846 item := TBBSMenuItem.Create( PopupMenu );
1847 item.Caption := BBSs[ i ].Title;
1848 item.Data := BBSs[ i ];
1849 item.OnClick := BBSMenuItemOnClick;
1850 CabinetMenu.Insert( 0, item );
1851 except
1852 end;
1853 end;
1854 ShowBBSTree( BBSs[ 0 ] );
1855
1856 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1857 SaveHistory;
1858 try
1859 for i := FHistoryList.Count - 1 downto 0 do
1860 TFavoriteThreadItem( FHistoryList[ i ] ).Free;
1861 except
1862 end;
1863 FHistoryList.Clear;
1864 LoadHistory;
1865
1866 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1867 // FFavorite := TFavorite.Create(FavoriteTreeView);
1868 FavoriteTreeView.Items.Clear;
1869 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1870 FavoriteDM.ReadFavorite;
1871 SetLinkBar;
1872
1873 end;
1874
1875 //鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1876 procedure TGikoForm.SetBoardTreeNode(
1877 inBBS : TBBS
1878 );
1879 var
1880 i, j, k: integer;
1881 Root: TTreeNode;
1882 CategoryNode: TTreeNode;
1883 BoardNode: TTreeNode;
1884 Category: TCategory;
1885 Board: TBoard;
1886 begin
1887 // 鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1888 FActiveBBS := inBBS;
1889 TreeView.Items.BeginUpdate;
1890 TreeView.Items.Clear;
1891 try
1892 if not inBBS.IsBoardFileRead then
1893 GikoSys.ReadBoardFile( inBBS );
1894 try
1895 if SplashWindow <> nil then
1896 SplashWindow.ProgressBar.Max := inBBS.Count;
1897 except
1898 end;
1899
1900 Root := TreeView.Items.Add( nil, inBBS.Title );
1901 Root.ImageIndex := ITEM_ICON_2CH1;
1902 Root.SelectedIndex := ITEM_ICON_2CH2;
1903 Root.Data := inBBS;
1904 for i := 0 to inBBS.Count - 1 do begin
1905 Category := TCategory(inBBS.Items[i]);
1906 CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
1907 CategoryNode.Data := Category;
1908 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
1909 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
1910
1911 for j := 0 to Category.Count - 1 do begin
1912 Board := TBoard(Category.Items[j]);
1913 Board.BeginUpdate;
1914 BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
1915 BoardNode.Data := Board;
1916 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
1917 if not Board.IsLogFile then begin
1918 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
1919 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
1920 end else begin
1921 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
1922 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
1923 for k := 0 to Board.Count - 1 do begin
1924 if Board.Items[ k ].IsLogFile then begin
1925 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
1926 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
1927
1928 Break;
1929 end;
1930 end;
1931 end;
1932 Board.EndUpdate;
1933 end;
1934
1935 CategoryNode.Expanded := Category.NodeExpand;
1936
1937 if SplashWindow <> nil then begin
1938 SplashWindow.ProgressBar.StepIt;
1939 Application.ProcessMessages;
1940 end;
1941 end;
1942 finally
1943 TreeView.Items.EndUpdate;
1944 end;
1945 end;
1946
1947 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
1948 const
1949 COLUMN: array[0..0] of string = ('鐃?鐃?鐃?鐃緒申鐃緒申');
1950 var
1951 ListColumn: TListColumn;
1952 i: Integer;
1953 begin
1954 ListView.Items.BeginUpdate;
1955 try
1956 Screen.Cursor := crHourGlass;
1957
1958 ListView.Columns.Clear;
1959 for i := 0 to Length(COLUMN) - 1 do begin
1960 ListColumn := ListView.Columns.Add;
1961 ListColumn.Caption := COLUMN[i];
1962 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
1963 end;
1964
1965 ListView.Items.Count := 0;
1966 ListView.Items.Clear;
1967 ListView.Items.Count := ABBS2ch.Count;
1968
1969 // UpFolderAction.Enabled := False;
1970 // AllItemAction.Enabled := False;
1971 // LogItemAction.Enabled := False;
1972 // NewItemAction.Enabled := False;
1973 // SelectItemAction.Enabled := False;
1974 // ListDownloadToolButton.Enabled := False;
1975 // BoardReservToolButton.Enabled := False;
1976 // ListThreadDownloadToolButton.Enabled := False;
1977
1978 ListNameLabel.Caption := ABBS2ch.Title;
1979 FolderImage.Picture := nil;
1980 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
1981
1982 FSortIndex := 0;
1983 FSortOrder := False;
1984 ListViewColumnClick(nil, ListView.Column[0]);
1985
1986 Result := ABBS2ch.Count;
1987 finally
1988 Screen.Cursor := crDefault;
1989 ListView.Items.EndUpdate;
1990 end;
1991 end;
1992
1993 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
1994 const
1995 COLUMN: array[0..2] of string = ('鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
1996 var
1997 ListColumn: TListColumn;
1998 i: Integer;
1999 begin
2000 ListView.Items.BeginUpdate;
2001 try
2002 Screen.Cursor := crHourGlass;
2003
2004 ListView.Columns.Clear;
2005 for i := 0 to Length(COLUMN) - 1 do begin
2006 ListColumn := ListView.Columns.Add;
2007 ListColumn.Caption := COLUMN[i];
2008 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
2009 end;
2010
2011 ListView.Items.Count := 0;
2012 ListView.Items.Clear;
2013 ListView.Items.Count := Category.Count;
2014
2015 // UpFolderAction.Enabled := True;
2016 // AllItemAction.Enabled := False;
2017 // LogItemAction.Enabled := False;
2018 // NewItemAction.Enabled := False;
2019 // SelectItemAction.Enabled := False;
2020 // ListDownloadToolButton.Enabled := False;
2021 // BoardReservToolButton.Enabled := False;
2022 // ListThreadDownloadToolButton.Enabled := False;
2023
2024 ListNameLabel.Caption := Category.Title;
2025 FolderImage.Picture := nil;
2026 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2027
2028 FSortIndex := 0;
2029 FSortOrder := False;
2030 ListViewColumnClick(nil, ListView.Column[0]);
2031
2032 Result := Category.Count;
2033 finally
2034 Screen.Cursor := crDefault;
2035 ListView.Items.EndUpdate;
2036 end;
2037 end;
2038
2039 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2040 const
2041 COLUMN: array[0..7] of string = ('鐃?鐃緒申鐃?鐃?鐃緒申', '鐃?鐃?鐃緒申鐃?', '鐃緒申鐃緒申', '鐃?鐃緒申',
2042 '鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申', '鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
2043 COLUMN_ALIGNMENT: array[0..7] of TAlignment = (taLeftJustify, taRightJustify,
2044 taRightJustify, taRightJustify,
2045 taRightJustify, taLeftJustify,
2046 taLeftJustify, taLeftJustify);
2047 //No, 鐃?鐃緒申鐃?鐃?鐃緒申, 鐃?鐃?鐃緒申鐃?, 鐃緒申鐃緒申鐃?鐃緒申, 鐃緒申鐃緒申鐃緒申鐃緒申
2048 var
2049 ListColumn: TListColumn;
2050 i: Integer;
2051 begin
2052 ListView.Items.BeginUpdate;
2053 try
2054 Screen.Cursor := crHourGlass;
2055
2056 // 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2057 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2058 if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2059 begin
2060 ListView.Columns.Clear;
2061 for i := 0 to Length(COLUMN) - 1 do begin
2062 ListColumn := ListView.Columns.Add;
2063 ListColumn.Caption := COLUMN[i];
2064 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2065 ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2066 end;
2067 end;
2068
2069 ListView.Items.Count := 0;
2070 ListView.Items.Clear;
2071
2072 case GikoForm.ViewType of
2073 gvtAll: ListView.Items.Count := Board.Count;
2074 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2075 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2076 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2077 end;
2078
2079 ListNameLabel.Caption := Board.Title;
2080 FolderImage.Picture := nil;
2081 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2082
2083 FSortIndex := 0;
2084 FSortOrder := False;
2085 ListViewColumnClick(nil, ListView.Column[0]);
2086
2087 Result := Board.Count;
2088 finally
2089 Screen.Cursor := crDefault;
2090 ListView.Items.EndUpdate;
2091 end;
2092 end;
2093
2094 procedure TGikoForm.TreeViewChange(Sender: TObject; Node: TTreeNode);
2095 var
2096 i: Integer;
2097 begin
2098 if FTreeType = gttHistory then begin
2099 if Node <> nil then
2100 if TObject( Node.Data ) is TFavoriteThreadItem then
2101 if GetActiveContent <> TFavoriteThreadItem( Node.Data ).Item then
2102 FavoriteClick( Node );
2103 Exit;
2104 end;
2105
2106 ListView.Selected := nil;
2107 ListView.Items.Count := 0;
2108 ListView.Items.Clear;
2109 // ListView.Columns.Clear;
2110
2111 Caption := CAPTION_NAME;
2112 //Application.Title := CAPTION_NAME;
2113
2114
2115 if GetActiveList is TBBS then begin
2116 for i := 0 to ListView.Columns.Count - 1 do
2117 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
2118 end else if GetActiveList is TCategory then begin
2119 for i := 0 to ListView.Columns.Count - 1 do
2120 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
2121 end else if GetActiveList is TBoard then begin
2122 for i := 0 to ListView.Columns.Count - 1 do
2123 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
2124 end;
2125
2126 if TObject(Node.Data) is TBBS then begin
2127 SetActiveList(Node.data);
2128 end else if TObject(Node.Data) is TCategory then begin
2129 SetActiveList(Node.data);
2130 end else if TObject(Node.Data) is TBoard then begin
2131 if not TBoard(Node.Data).IsThreadDatRead then begin
2132 Screen.Cursor := crHourGlass;
2133 try
2134 GikoSys.ReadSubjectFile(TBoard(Node.Data));
2135 finally
2136 Screen.Cursor := crDefault;
2137 end;
2138 end;
2139 SetActiveList(Node.data);
2140 end;
2141 end;
2142
2143 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2144 var
2145 // FileName: string;
2146 // DateTime: TDateTime;
2147 BoardCnt: Integer;
2148 BBS: TBBS;
2149 Category: TCategory;
2150 Board: TBoard;
2151 ThreadItem: TThreadItem;
2152 RepStr: string;
2153 ActivListObj : TObject;
2154 begin
2155 ActivListObj := ActiveList;
2156 if ActivListObj is TBBS then begin
2157 BBS := TBBS(ActivListObj);
2158
2159 ListView.StateImages := nil;
2160
2161 if BBS = nil then Exit;
2162 if BBS.Count <= 0 then Exit;
2163 if Item = nil then Exit;
2164 if Item.Index > BBS.Count then Exit;
2165 if ListView.Items.Count = 0 then Exit;
2166
2167 if not (BBS.Items[Item.index] is TCategory) then Exit;
2168 Category := TCategory(BBS.Items[Item.index]);
2169
2170 if Category = nil then Exit;
2171
2172 if ListNumberVisibleAction.Checked then
2173 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2174 else
2175 Item.Caption := Category.Title;
2176
2177 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2178 Item.Data := Category;
2179 end else if ActivListObj is TCategory then begin
2180 Category := TCategory(ActivListObj);
2181
2182 ListView.StateImages := nil;
2183
2184 if Category = nil then Exit;
2185 if Category.Count <= 0 then Exit;
2186 if Item = nil then Exit;
2187 if Item.Index >= Category.Count then Exit;
2188 if ListView.Items.Count = 0 then Exit;
2189
2190 if not (Category.Items[Item.Index] is TBoard) then Exit;
2191 Board := TBoard(Category.Items[Item.Index]);
2192
2193 if Board = nil then Exit;
2194
2195 if ListNumberVisibleAction.Checked then
2196 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2197 else
2198 Item.Caption := Board.Title;
2199
2200 if Item.SubItems.Count <> 2 then begin
2201 Item.SubItems.Clear;
2202 Item.SubItems.Add('');
2203 Item.SubItems.Add('');
2204 end;
2205
2206 Item.ImageIndex := ITEM_ICON_BOARD1;
2207
2208 if Board.Round then
2209 Item.SubItems[0] := Board.RoundName // '鐃?鐃緒申'
2210 else
2211 Item.SubItems[0] := '';
2212
2213 if Board.RoundDate = ZERO_DATE then begin
2214 Item.SubItems[1] := '';
2215 end else
2216 Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2217 Item.Data := Board;
2218 end else if ActivListObj is TBoard then begin
2219 Board := TBoard(ActivListObj);
2220
2221 if GikoSys.Setting.ListIconVisible then
2222 ListView.StateImages := StateIconImageList
2223 else
2224 ListView.StateImages := nil;
2225
2226 case GikoForm.ViewType of
2227 gvtAll: BoardCnt := Board.Count;
2228 gvtLog: BoardCnt := Board.GetLogThreadCount;
2229 gvtNew: BoardCnt := Board.GetNewThreadCount;
2230 gvtUser: BoardCnt := Board.GetUserThreadCount;
2231 else
2232 BoardCnt := 0;
2233 end;
2234
2235 // if Board = nil then Exit;
2236 if BoardCnt <= 0 then Exit;
2237 if Item = nil then Exit;
2238 if Item.Index > BoardCnt then Exit;
2239 if ListView.Items.Count = 0 then Exit;
2240
2241 // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2242
2243 ThreadItem := nil;
2244 case GikoForm.ViewType of
2245 gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]);
2246 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2247 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2248 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2249 end;
2250
2251 if ThreadItem = nil then Exit;
2252
2253 // if ListNumberVisibleAction.Checked then
2254 // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2255 // else
2256 RepStr := ThreadItem.Title;
2257 RepStr := CustomStringReplace(RepStr, '&lt;', '<' );
2258 RepStr := CustomStringReplace(RepStr, '&gt;', '>' );
2259 RepStr := CustomStringReplace(RepStr, '&quot;', '"' );
2260 RepStr := CustomStringReplace(RepStr, '&amp;', '&' );
2261 //RepStr := StringReplace(RepStr, '鐃緒申鐃?', ',', [rfReplaceAll]);
2262
2263 if Item.SubItems.Count <> 7 then begin
2264 Item.SubItems.Clear;
2265 Item.SubItems.Add('');
2266 Item.SubItems.Add('');
2267 Item.SubItems.Add('');
2268 Item.SubItems.Add('');
2269 Item.SubItems.Add('');
2270 Item.SubItems.Add('');
2271 Item.SubItems.Add('');
2272 end;
2273
2274 if ListNumberVisibleAction.Checked then
2275 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2276 else
2277 Item.Caption := RepStr;
2278
2279 case ThreadItem.AgeSage of
2280 gasNone: Item.StateIndex := -1;
2281 gasNew: Item.StateIndex := 0;
2282 gasAge: Item.StateIndex := 1;
2283 gasSage: Item.StateIndex := 2;
2284 end;
2285
2286 if ThreadItem.IsLogFile then begin
2287 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2288 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2289 Item.SubItems[1] := IntToStr(ThreadItem.Count);
2290 if ThreadItem.NewResCount = 0 then
2291 Item.SubItems[2] := ''
2292 else
2293 Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2294 Item.SubItems[3] := '';
2295 if ThreadItem.Round then
2296 Item.SubItems[4] := ThreadItem.RoundName
2297 else
2298 Item.SubItems[4] := '';
2299 if ThreadItem.RoundDate = ZERO_DATE then begin
2300 Item.SubItems[5] := '';
2301 end else
2302 Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2303 if ThreadItem.NewArrival then
2304 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2305 if ThreadItem.CreateDate = ZERO_DATE then begin
2306 Item.SubItems[6] := '';
2307 end else
2308 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2309
2310 end else begin
2311 Item.ImageIndex := ITEM_ICON_THREAD1;
2312 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2313 Item.SubItems[1] := '';
2314 Item.SubItems[2] := '';
2315 Item.SubItems[3] := '';
2316 Item.SubItems[4] := '';
2317 Item.SubItems[5] := '';
2318 if not GikoSys.Setting.CreationTimeLogs then
2319 if ThreadItem.CreateDate = ZERO_DATE then
2320 Item.SubItems[6] := ''
2321 else
2322 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2323
2324 end;
2325
2326 Item.Data := ThreadItem;
2327 end;
2328 end;
2329
2330 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2331 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2332 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2333 var Index: Integer);
2334 begin
2335
2336 //
2337 end;
2338
2339 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2340 EndIndex: Integer);
2341 begin
2342 //
2343 end;
2344
2345 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2346 EndIndex: Integer; OldState, NewState: TItemStates);
2347 begin
2348 //
2349 end;
2350
2351 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2352 var
2353 p: TPoint;
2354 s: string;
2355 tmp2: string;
2356 URL: string;
2357 ATitle: Boolean;
2358
2359 threadItem : TThreadItem;
2360 board : TBoard;
2361 Protocol, Host, Path, Document, Port, Bookmark: string;
2362
2363 //wkInt: Integer;
2364 wkIntSt: Integer;
2365 wkIntTo: Integer;
2366 ActiveFileName: string;
2367 e: IHTMLElement;
2368 Ext: string;
2369 buf: string;
2370 PathRec: TPathRec;
2371 begin
2372 try
2373 try
2374 if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin
2375 if LowerCase(OleVariant(IHTMLDocument2(Browser.Document)).charset) <> 'shift_jis' then
2376 OleVariant(IHTMLDocument2(Browser.Document)).charset := 'shift_jis';
2377 end;
2378 except
2379 end;
2380 finally
2381 end;
2382 if PreviewTimer.Enabled then
2383 PreviewTimer.Enabled := False;
2384 Application.CancelHint;
2385 if GetActiveContent <> nil then
2386 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2387 else
2388 ActiveFileName := '';
2389
2390 StatusBar.Panels[1].Text := Text;
2391
2392 if FHint <> nil then begin
2393 FHint.ReleaseHandle;
2394 FHint.ClearAllRes;
2395 end;
2396 if FPreviewBrowser <> nil then
2397 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2398
2399 if not GikoSys.Setting.UnActivePopup then
2400 if not GikoForm.Active then
2401 Exit;
2402
2403 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2404 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2405
2406 s := '';
2407 Ext := AnsiLowerCase(ExtractFileExt(Text));
2408 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2409 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2410 if FPreviewBrowser = nil then begin
2411 FPreviewBrowser := TPreviewBrowser.Create(Self);
2412 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2413 TOleControl(FPreviewBrowser).Parent := nil;
2414 end;
2415 FPreviewBrowser.Navigate('about:blank');//鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2416 FPreviewURL := Text;
2417 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2418 PreviewTimer.Enabled := True;
2419 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2420 if Pos('mailto:', Text) = 1 then begin
2421 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2422 //鐃?鐃?鐃?鐃?鐃?鐃緒申 鐃?鐃?鐃?3鐃緒申466鐃緒申鐃緒申鐃緒申鐃緒申
2423 GetCursorPos(p);
2424 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2425 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2426 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2427 if (Assigned(e)) then begin
2428 tmp2 := GikoSys.ZenToHan(e.Get_outerText);
2429 if (GikoSys.IsNumeric(tmp2)) then begin
2430 //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2431 wkIntSt := StrToInt(tmp2);
2432 wkIntTo := StrToInt(tmp2);
2433 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2434 FHint.PopupType := gptThread;
2435 SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False);
2436 end else begin
2437 FHint.PopupType := gptRaw;
2438 FHint.Caption := s;
2439 end;
2440 end;
2441 end else begin
2442 URL := Text;
2443
2444 if Pos('about:blank..', URL) = 1 then begin
2445 threadItem := GetActiveContent;
2446 if AnsiPos('http://jbbs.shitaraba.com/', threadItem.URL) <> 0 then begin
2447 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2448 Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo);
2449 if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then
2450 buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo)
2451 else if( PathRec.FSt <> 0 ) then
2452 buf := IntToStr(PathRec.FSt);
2453 end else if AnsiPos('machi.to/bbs/', threadItem.URL) <> 0 then begin
2454 URL := threaditem.URL;
2455 buf := Copy(Text,AnsiPos('&st=',Text),Length(Text)-AnsiPos('&st=',Text) + 1);
2456 end else begin
2457
2458 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2459 buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text));
2460 end;
2461 URL := URL + buf;
2462 end;
2463 PathRec := Gikosys.Parse2chURL2(URL);
2464 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2465 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
2466
2467 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
2468
2469 URL := GikoSys.GetBrowsableThreadURL( URL );
2470 wkIntSt := PathRec.FSt;
2471 wkIntTo := PathRec.FTo;
2472
2473 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2474 wkIntSt := 1;
2475 wkIntTo := 1;
2476 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2477 wkIntSt := wkIntTo;
2478 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2479 wkIntTo := wkIntSt;
2480 end else if wkIntSt > wkIntTo then begin
2481 //wkInt := wkIntTo;
2482 wkIntTo := wkIntSt;
2483 wkIntSt := wkIntTo;
2484 end;
2485 //if wkIntSt = 0 then
2486 // wkIntSt := 1;
2487 //if wkINtTo = 0 then
2488 // wkIntTo := 1;
2489 //if PathRec.FFirst then
2490 // wkIntSt := 1;
2491 if PathRec.FStBegin then
2492 wkIntSt := 1;
2493 if PathRec.FToEnd then
2494 wkIntTo := 9999;
2495
2496 //ATitle := ActiveFileName <> PathRec.FKey;
2497 if GetActiveContent.URL = URL then
2498 ATitle := false
2499 else
2500 ATitle := true;
2501
2502 threadItem := BBSsFindThreadFromURL( URL );
2503
2504 if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
2505 board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
2506 if board <> nil then
2507 threadItem := board.Find( PathRec.FKey + '.dat' );
2508
2509 end;
2510
2511 if threadItem <> nil then begin
2512 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2513 FHint.PopupType := gptThread;
2514 SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2515 end;
2516 end;
2517 end;
2518
2519 //if s <> '' then
2520 // ShowTextPopup(s);
2521 if FHint.PopupType = gptRaw then begin
2522 if FHint.Caption <> '' then
2523 ShowTextPopup;
2524 end else begin
2525 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2526 ShowTextPopup;
2527 end;
2528 end;
2529 end;
2530
2531 procedure TGikoForm.BrowserTitleChange(Sender: TObject;
2532 const Text: WideString);
2533 var
2534 Title: string;
2535 begin
2536 if (Text = BLANK_HTML) or (Text = GikoSys.GetHtmlTempFileName) then
2537 Title := CAPTION_NAME
2538 else
2539 Title := CAPTION_NAME + ' - [' + Text + ']';
2540 Caption := Title;
2541 //Application.Title := Title;
2542 end;
2543
2544 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2545 var
2546 SysMenu: HMenu;
2547 //SysMenuApp: HMenu;
2548 begin
2549 FEnabledCloseButton := Enabled;
2550 SysMenu := GetSystemMenu(Handle, False);
2551 //SysMenuApp := GetSystemMenu(Application.Handle, False);
2552
2553 if Enabled then begin
2554 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2555 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2556 end else begin
2557 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2558 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2559 end;
2560
2561 DrawMenuBar(Handle);
2562 //DrawMenuBar(Application.Handle);
2563 end;
2564
2565 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2566 var AllowChange: Boolean);
2567 begin
2568 if FTreeType = gtt2ch then
2569 FSortIndex := -1;
2570 end;
2571
2572 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2573 Shift: TShiftState);
2574 begin
2575 if Key = VK_BACK then begin
2576 // UpFolderButtonClick(Sender);
2577 end else if Key = VK_SPACE then begin
2578 // ListClick;
2579 end else if Key = VK_RETURN then begin
2580 ListDoubleClick;
2581 end;
2582 end;
2583
2584 function TGikoForm.GetHttpState: Boolean;
2585 begin
2586 Result := FHttpState;
2587 end;
2588
2589 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2590 Column: TListColumn);
2591 var
2592 i: Integer;
2593 wkBBS: TBBS;
2594 wkCategory: TCategory;
2595 wkBoard: TBoard;
2596 begin
2597 if FSortIndex = Column.Index then
2598 FSortOrder := not FSortOrder
2599 else
2600 FSortOrder := False;
2601
2602 for i := 0 to ListView.Columns.Count - 1 do
2603 ListView.Column[i].ImageIndex := -1;
2604 if FSortOrder then
2605 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
2606 else
2607 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
2608
2609 Sort.SortNoFlag := ListNumberVisibleAction.Checked;
2610
2611 //if TObject(TreeView.Selected.Data) is TBBS then begin
2612 if TObject( FActiveList ) is TBBS then begin
2613 //wkBBS := TBBS(TreeView.Selected.Data);
2614 wkBBS := TBBS( FActiveList );
2615 Sort.SortOrder := FSortOrder;
2616 Sort.SortIndex := Column.Index;
2617 wkBBS.Sort(CategorySortProc);
2618 ListView.Refresh;
2619 //end else if TObject(TreeView.Selected.Data) is TCategory then begin
2620 end else if TObject( FActiveList ) is TCategory then begin
2621 //wkCategory := TCategory(TreeView.Selected.Data);
2622 wkCategory := TCategory( FActiveList );
2623 Sort.SortOrder := FSortOrder;
2624 Sort.SortIndex := Column.Index;
2625 wkCategory.Sort(BoardSortProc);
2626 ListView.Refresh;
2627 //end else if TObject(TreeView.Selected.Data) is TBoard then begin
2628 end else if TObject( FActiveList ) is TBoard then begin
2629 //wkBoard := TBoard(TreeView.Selected.Data);
2630 wkBoard := TBoard( FActiveList );
2631 Sort.SortOrder := FSortOrder;
2632 Sort.SortIndex := Column.Index;
2633 wkBoard.Sort(ThreadItemSortProc);
2634 ListView.Refresh;
2635 end;
2636 FSortIndex := Column.Index;
2637 end;
2638
2639 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2640 Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean);
2641 var
2642 ARect: TRect;
2643 begin
2644 DefaultDraw := True;
2645 Exit;
2646 DefaultDraw := False;
2647 if (cdsSelected in State) or (cdsHot in State) then begin
2648 Sender.Canvas.Brush.Color := clHighlight;
2649 Sender.Canvas.Font.Color := clHighlightText;
2650 end else begin
2651 Sender.Canvas.Brush.Color := clBtnFace;
2652 Sender.Canvas.Font.Color := clBtnText;
2653 end;
2654 ARect := Rect(Button.Left, Button.Top, Button.Left + Button.Width, Button.Top + Button.Height);
2655 Sender.Canvas.FillRect(ARect);
2656 DrawText(Sender.Canvas.Handle, PChar(Button.Caption), -1, ARect, DT_SINGLELINE or DT_VCENTER or DT_CENTER);
2657 end;
2658
2659 function TGikoForm.GetTreeNode(Data: TObject): TTreeNode;
2660 var
2661 Nodes: TTreeNodes;
2662 i: integer;
2663 begin
2664 Nodes := TreeView.Items;
2665
2666 for i := 0 to Nodes.Count - 1 do begin
2667 if Nodes.Item[i].Data = Data then begin
2668 Result := Nodes.Item[i];
2669 Exit;
2670 end;
2671 end;
2672 Result := nil;
2673 end;
2674
2675 procedure TGikoForm.BrowserBeforeNavigate2(Sender: TObject;
2676 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
2677 Headers: OleVariant; var Cancel: WordBool);
2678 var
2679 sNo: string;
2680 p: TPoint;
2681 const
2682 kMenuName: string = 'menu:';
2683 begin
2684
2685 if Pos(kMenuName, URL) <> 0 then begin
2686 sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
2687
2688 if not GikoSys.IsNumeric(sNo) then Exit;
2689
2690 Cancel := True;
2691 GetCursorpos(p);
2692 KokoPopupMenu.Tag := StrToInt(sNo);
2693 KokoPopupMenu.Popup(p.x, p.y);
2694 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
2695 Cancel := not GikoSys.Setting.OpenMailer;
2696 end;
2697
2698 end;
2699
2700 procedure TGikoForm.ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
2701 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
2702 var DefaultDraw: Boolean);
2703 var
2704 ThreadItem: TThreadItem;
2705 begin
2706 //
2707 // TListView(Sender).Canvas.Font.Style := [];
2708 if TObject(Item.Data) is TThreadItem then begin
2709 ThreadItem := TThreadItem(Item.Data);
2710 if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
2711 ListView.Canvas.Brush.Color := FOddColor;
2712 end else begin
2713 ListView.Canvas.Brush.Color := FListViewBackGroundColor;
2714 end;
2715 // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
2716 if ThreadItem.UnRead then
2717 TListView(Sender).Canvas.Font.Style := [fsBold];
2718 end;
2719 end;
2720
2721 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
2722 begin
2723 if Application.Terminated then
2724 Exit;
2725 if PreviewTimer.Enabled then
2726 PreviewTimer.Enabled := False;
2727 //鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2728 if FHint <> nil then begin
2729 FHint.ReleaseHandle;
2730 FHint.ClearAllRes;
2731 // FHint.Free;
2732 // FHint := nil;
2733 end;
2734 if FPreviewBrowser <> nil then
2735 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2736
2737 end;
2738
2739 procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
2740 const ARect: TRect; var DefaultDraw: Boolean);
2741 var
2742 NodeRect: TRect;
2743 i, j: Integer;
2744 IsBoardNode: Boolean;
2745 Cnt: Integer;
2746 CntText: string;
2747 TextWidth: Integer;
2748 TextRect: TRect;
2749 Board: TBoard;
2750 Category: TCategory;
2751 Bitmap: TBitmap;
2752 NodeWidth: Integer;
2753 begin
2754 DefaultDraw := True;
2755
2756 if FTreeType = gttHistory then Exit;
2757
2758 TreeView.Canvas.Font.Color := clBlue;
2759 IsBoardNode := False;
2760 for i := 0 to TreeView.Items.Count - 1 do begin
2761 Cnt := 0;
2762 if not TreeView.Items[i].IsVisible then
2763 continue;
2764
2765 if TObject(TreeView.Items[i].Data) is TCategory then begin
2766 if TreeView.Items[i].Expanded then
2767 continue;
2768
2769 IsBoardNode := False;
2770 Category := TCategory(TreeView.Items[i].Data);
2771 for j := 0 to Category.Count - 1 do begin
2772 Board := Category.Items[j];
2773 if Board <> nil then begin
2774 if Board.UnRead > 0 then begin
2775 Cnt := 1;
2776 Break;
2777 end;
2778 end;
2779 end;
2780 if Cnt <> 1 then
2781 continue;
2782 end else if TObject(TreeView.Items[i].Data) is TBoard then begin
2783 IsBoardNode := True;
2784 Board := TBoard(TreeView.Items[i].Data);
2785 Cnt := Board.UnRead;
2786 if Cnt <= 0 then
2787 continue;
2788 end else
2789 continue;
2790
2791 Bitmap := TBitmap.Create;
2792 try
2793 Bitmap.Canvas.Font.Assign(TreeView.Canvas.Font);
2794 Bitmap.Canvas.Font.Style := [fsBold];
2795 NodeWidth := Bitmap.Canvas.TextWidth(TreeView.Items[i].Text);
2796 finally
2797 Bitmap.Free;
2798 end;
2799
2800 NodeRect := TreeView.Items[i].DisplayRect(True);
2801
2802 if IsBoardNode then
2803 CntText := '(' + IntToStr(Cnt) + ')'
2804 else if Cnt = 1 then
2805 CntText := '(+)';
2806
2807
2808 TextWidth := TreeView.Canvas.TextWidth(CntText);
2809
2810 TextRect := Rect(NodeRect.Left + NodeWidth + 8,
2811 NodeRect.Top,
2812 NodeRect.Left + NodeWidth + TextWidth + 8,
2813 NodeRect.Bottom);
2814 DrawText(TreeView.Canvas.Handle,
2815 PChar(CntText),
2816 -1,
2817 TextRect,
2818 DT_SINGLELINE or DT_VCENTER);
2819 end;
2820 TreeViewCustomDrawItem(nil, nil, [], DefaultDraw);
2821 end;
2822
2823 procedure TGikoForm.TreeViewCustomDrawItem(Sender: TCustomTreeView;
2824 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
2825 var
2826 Board: TBoard;
2827 Category: TCategory;
2828 i: Integer;
2829 begin
2830 DefaultDraw := True;
2831
2832 if FTreeType = gttHistory then Exit;
2833
2834 TreeView.Canvas.Font.Style := [];
2835 if Node <> nil then begin
2836 if TObject(Node.Data) is TCategory then begin
2837 Category := TCategory(Node.Data);
2838 for i := 0 to Category.Count - 1 do begin
2839 Board := Category.Items[i];
2840 if Board <> nil then begin
2841 if Board.UnRead > 0 then begin
2842 TreeView.Canvas.Font.Style := [fsBold];
2843 Break;
2844 end;
2845 end;
2846 end;
2847 end else if TObject(Node.Data) is TBoard then begin
2848 Board := TBoard(Node.Data);
2849 if Board.UnRead > 0 then
2850 TreeView.Canvas.Font.Style := [fsBold];
2851 end;
2852 end;
2853 end;
2854
2855 procedure TGikoForm.TreeViewExpanded(Sender: TObject; Node: TTreeNode);
2856 begin
2857 TreeView.Invalidate;
2858
2859 if TObject(Node.Data) is TBBS then begin
2860 TBBS(Node.Data).NodeExpand := True;
2861 end else if TObject(Node.Data) is TCategory then begin
2862 TCategory(Node.Data).NodeExpand := True;
2863 end else if TObject(Node.Data) is TBoard then begin
2864 TBoard(Node.Data).NodeExpand := True;
2865 end;
2866 end;
2867
2868 {procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
2869 begin
2870 TreeSplitter.Visible := PanelVisible;
2871 CabinetPanel.Visible := PanelVisible;
2872 CabinetToolButton.Down := PanelVisible;
2873 end;}
2874
2875 procedure TGikoForm.ListViewAllSelect;
2876 begin
2877 ListView.SetFocus;
2878 ListView.SelectAll;
2879 end;
2880
2881 procedure TGikoForm.TreeViewDblClick(Sender: TObject);
2882 var
2883 Board: TBoard;
2884 ThreadItem: TThreadItem;
2885 APoint: TPoint;
2886 HitTest: THitTests;
2887 begin
2888 GetCursorPos(APoint);
2889 APoint := TreeView.ScreenToClient(APoint);
2890 HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
2891 if not (htOnLabel in HitTest) then Exit;
2892 if TreeView.Selected = nil then Exit;
2893
2894 if FTreeType = gtt2ch then begin
2895 if not (TObject(TreeView.Selected.Data) is TBoard) then Exit;
2896 Board := TBoard(TreeView.Selected.Data);
2897 DownloadList(Board);
2898 end else if FTreeType = gttHistory then begin
2899 if not (TObject(TreeView.Selected.Data) is TFavoriteThreadItem) then Exit;
2900 ThreadItem := TFavoriteThreadItem(TreeView.Selected.Data).Item;
2901 DownloadContent(ThreadItem);
2902 end;
2903 end;
2904
2905 procedure TGikoForm.FavoriteTreeViewClick(Sender: TObject);
2906