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