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.511.2.7 - (show annotations) (download) (as text)
Wed May 18 14:36:11 2005 UTC (18 years, 11 months ago) by h677
Branch: remodeling
Changes since 1.511.2.6: +36 -9 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 BeLogInOutAction: TAction;
604 procedure FormCreate(Sender: TObject);
605 procedure FormDestroy(Sender: TObject);
606 procedure CabinetPanelHide(Sender: TObject);
607 procedure ListViewData(Sender: TObject; Item: TListItem);
608 procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
609 const FindString: String; const FindPosition: TPoint;
610 FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
611 Wrap: Boolean; var Index: Integer);
612 procedure ListViewDataHint(Sender: TObject; StartIndex,
613 EndIndex: Integer);
614 procedure ListViewDataStateChange(Sender: TObject; StartIndex,
615 EndIndex: Integer; OldState, NewState: TItemStates);
616 procedure BrowserStatusTextChange(Sender: TObject;
617 const Text: WideString);
618 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
619 procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
620 var AllowChange: Boolean);
621 procedure ListViewKeyDown(Sender: TObject; var Key: Word;
622 Shift: TShiftState);
623 procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
624 procedure ListViewSort(Sender: TObject; Column: TListColumn);
625 procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
626 Button: TToolButton; State: TCustomDrawState;
627 var DefaultDraw: Boolean);
628 procedure BrowserBeforeNavigate2(Sender: TObject;
629 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
630 Headers: OleVariant; var Cancel: WordBool);
631 procedure TreeViewCustomDraw(Sender: TCustomTreeView;
632 const ARect: TRect; var DefaultDraw: Boolean);
633 procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
634 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
635 procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
636 procedure TreeViewDblClick(Sender: TObject);
637 procedure ListViewCustomDraw(Sender: TCustomListView;
638 const ARect: TRect; var DefaultDraw: Boolean);
639 procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
640 Shift: TShiftState; X, Y: Integer);
641 procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
642 procedure MessageListViewResize(Sender: TObject);
643 procedure ExitActionExecute(Sender: TObject);
644 procedure AllSelectActionExecute(Sender: TObject);
645 procedure StdToolBarVisibleActionExecute(Sender: TObject);
646 procedure MsgBarVisibleActionExecute(Sender: TObject);
647 procedure StatusBarVisibleActionExecute(Sender: TObject);
648 procedure LargeIconActionExecute(Sender: TObject);
649 procedure SmallIconActionExecute(Sender: TObject);
650 procedure ListIconActionExecute(Sender: TObject);
651 procedure DetailIconActionExecute(Sender: TObject);
652 procedure SearchActionExecute(Sender: TObject);
653 procedure OptionActionExecute(Sender: TObject);
654 procedure GikoNaviWebPageActionExecute(Sender: TObject);
655 procedure AboutActionExecute(Sender: TObject);
656 procedure CabinetHistoryActionExecute(Sender: TObject);
657 procedure CabinetVisible( isVisible : Boolean );
658 procedure CabinetVisibleActionExecute(Sender: TObject);
659 procedure AllItemActionExecute(Sender: TObject);
660 procedure LogItemActionExecute(Sender: TObject);
661 procedure NewItemActionExecute(Sender: TObject);
662 procedure SelectItemActionExecute(Sender: TObject);
663 procedure ListNumberVisibleActionExecute(Sender: TObject);
664 procedure UpFolderActionExecute(Sender: TObject);
665 procedure IconStyleExecute(Sender: TObject);
666 procedure RoundActionExecute(Sender: TObject);
667 procedure StopActionExecute(Sender: TObject);
668 procedure MsgBarCloseActionExecute(Sender: TObject);
669 procedure BrowserMaxActionExecute(Sender: TObject);
670 procedure ScrollTopActionExecute(Sender: TObject);
671 procedure ScrollLastActionExecute(Sender: TObject);
672 procedure ScrollNewActionExecute(Sender: TObject);
673 procedure ScrollKokoActionExecute(Sender: TObject);
674 procedure EditorActionExecute(Sender: TObject);
675 procedure IEActionExecute(Sender: TObject);
676 procedure ShowThreadActionExecute(Sender: TObject);
677 procedure ShowBoardActionExecute(Sender: TObject);
678 procedure URLCopyActionExecute(Sender: TObject);
679 procedure ItemReloadActionExecute(Sender: TObject);
680 procedure SelectListReloadActionExecute(Sender: TObject);
681 procedure SelectThreadReloadActionExecute(Sender: TObject);
682 procedure SelectListReloadActionUpdate(Sender: TObject);
683 procedure AllItemActionUpdate(Sender: TObject);
684 procedure LogItemActionUpdate(Sender: TObject);
685 procedure NewItemActionUpdate(Sender: TObject);
686 procedure SelectItemActionUpdate(Sender: TObject);
687 procedure UpFolderActionUpdate(Sender: TObject);
688 procedure FormResize(Sender: TObject);
689 procedure ScrollTopActionUpdate(Sender: TObject);
690 procedure ScrollLastActionUpdate(Sender: TObject);
691 procedure ScrollNewActionUpdate(Sender: TObject);
692 procedure ScrollKokoActionUpdate(Sender: TObject);
693 procedure EditorActionUpdate(Sender: TObject);
694 procedure IEActionUpdate(Sender: TObject);
695 procedure ShowThreadActionUpdate(Sender: TObject);
696 procedure ShowBoardActionUpdate(Sender: TObject);
697 procedure SelectThreadReloadActionUpdate(Sender: TObject);
698 procedure ItemReloadActionUpdate(Sender: TObject);
699 procedure LogDeleteActionExecute(Sender: TObject);
700 procedure KokomadeActionExecute(Sender: TObject);
701 procedure ZenbuActionExecute(Sender: TObject);
702 procedure KokoResActionExecute(Sender: TObject);
703 procedure ListPopupMenuPopup(Sender: TObject);
704 procedure SelectItemURLCopyActionExecute(Sender: TObject);
705 procedure SelectItemURLCopyActionUpdate(Sender: TObject);
706 procedure AllSelectActionUpdate(Sender: TObject);
707 procedure LogDeleteActionUpdate(Sender: TObject);
708 procedure BrowserTabCloseActionExecute(Sender: TObject);
709 procedure NotSelectTabCloseActionExecute(Sender: TObject);
710 procedure TreeSelectBoradReloadExecute(Sender: TObject);
711 procedure TreeSelectThreadReloadExecute(Sender: TObject);
712 procedure TreeSelectURLCopyExecute(Sender: TObject);
713 procedure TreePopupMenuPopup(Sender: TObject);
714 procedure ListToolBarVisibleActionExecute(Sender: TObject);
715 procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
716 procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
717 var Cancel: WordBool);
718 procedure ListSplitterMoved(Sender: TObject);
719 procedure BrowserTabChange(Sender: TObject);
720 procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
721 Shift: TShiftState; X, Y: Integer);
722 procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
723 State: TDragState; var Accept: Boolean);
724 procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
725 procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
726 Y: Integer);
727 procedure BrowserDocumentComplete(Sender: TObject;
728 const pDisp: IDispatch; var URL: OleVariant);
729 procedure SelectReservActionUpdate(Sender: TObject);
730 procedure RoundNamePopupMenuPopup(Sender: TObject);
731 procedure SelectNewRoundNameExecute(Sender: TObject);
732 procedure SelectDeleteRoundExecute(Sender: TObject);
733 procedure SelectReservActionExecute(Sender: TObject);
734 procedure NewBoardActionExecute(Sender: TObject);
735 procedure LoginActionExecute(Sender: TObject);
736 procedure KeySettingActionExecute(Sender: TObject);
737 procedure AllTabCloseActionExecute(Sender: TObject);
738 procedure ArrangeActionExecute(Sender: TObject);
739 procedure NameURLCopyActionExecute(Sender: TObject);
740 procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
741 procedure URLCopyActionUpdate(Sender: TObject);
742 procedure NameURLCopyActionUpdate(Sender: TObject);
743 procedure BrowserTabCloseActionUpdate(Sender: TObject);
744 procedure NotSelectTabCloseActionUpdate(Sender: TObject);
745 procedure AllTabCloseActionUpdate(Sender: TObject);
746 procedure SelectItemNameURLCopyActionUpdate(Sender: TObject);
747 procedure ActiveLogDeleteActionExecute(Sender: TObject);
748 procedure ActiveLogDeleteActionUpdate(Sender: TObject);
749 procedure ListNameBarVisibleActionExecute(Sender: TObject);
750 procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
751 procedure TreeSelectNameURLCopyExecute(Sender: TObject);
752 procedure PaneInitActionExecute(Sender: TObject);
753 procedure FormShow(Sender: TObject);
754 procedure BrowserTabToolBarResize(Sender: TObject);
755 procedure BrowserMinActionExecute(Sender: TObject);
756 procedure SelectTextClearActionExecute(Sender: TObject);
757 procedure NameTextClearActionExecute(Sender: TObject);
758 procedure MailTextClearActionExecute(Sender: TObject);
759 procedure LeftmostTabSelectActionExecute(Sender: TObject);
760 procedure LeftTabSelectActionExecute(Sender: TObject);
761 procedure RightTabSelectActionExecute(Sender: TObject);
762 procedure RightmostTabSelectActionExecute(Sender: TObject);
763 procedure LeftmostTabSelectActionUpdate(Sender: TObject);
764 procedure LeftTabSelectActionUpdate(Sender: TObject);
765 procedure RightTabSelectActionUpdate(Sender: TObject);
766 procedure RightmostTabSelectActionUpdate(Sender: TObject);
767 procedure FavoriteMenuClick(Sender: TObject);
768 procedure FavoriteAddActionExecute(Sender: TObject);
769 procedure FavoriteAddActionUpdate(Sender: TObject);
770 procedure BoardFavoriteAddActionExecute(Sender: TObject);
771 procedure BoardFavoriteAddActionUpdate(Sender: TObject);
772 procedure ThreadFavoriteAddActionExecute(Sender: TObject);
773 procedure ThreadFavoriteAddActionUpdate(Sender: TObject);
774 procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
775 procedure FavoriteArrangeActionExecute(Sender: TObject);
776 procedure MainCoolBarResize(Sender: TObject);
777 procedure MoveToActionExecute(Sender: TObject);
778 procedure AddressToolBarResize(Sender: TObject);
779 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
780 Shift: TShiftState);
781 procedure AddressBarVisibleActionExecute(Sender: TObject);
782 procedure BrowserEnter(Sender: TObject);
783 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
784 procedure BrowserTabVisibleActionExecute(Sender: TObject);
785 procedure BrowserTabTopActionExecute(Sender: TObject);
786 procedure BrowserTabBottomActionExecute(Sender: TObject);
787 procedure BrowserTabTabStyleActionExecute(Sender: TObject);
788 procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
789 procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
790 procedure PreviewTimerTimer(Sender: TObject);
791 procedure MessageHideButtonClick(Sender: TObject);
792 procedure MonazillaWebPageActionExecute(Sender: TObject);
793 procedure GikoHelpActionExecute(Sender: TObject);
794 procedure ToolButton18Click(Sender: TObject);
795 procedure KotehanActionExecute(Sender: TObject);
796 procedure LinkBarVisibleActionExecute(Sender: TObject);
797 procedure BBS2chWebPageActionExecute(Sender: TObject);
798 procedure GikoFolderOpenActionExecute(Sender: TObject);
799 procedure MainCoolBarBandInfo(Sender: TObject;
800 var BandInfo: PReBarBandInfoA);
801 procedure MainCoolBarChevronClick(Sender: TObject;
802 RebarChevron: PNMRebarChevron);
803 procedure ListCoolBarBandInfo(Sender: TObject;
804 var BandInfo: PReBarBandInfoA);
805 procedure ListCoolBarChevronClick(Sender: TObject;
806 RebarChevron: PNMRebarChevron);
807 procedure BrowserCoolBarBandInfo(Sender: TObject;
808 var BandInfo: PReBarBandInfoA);
809 procedure BrowserCoolBarChevronClick(Sender: TObject;
810 RebarChevron: PNMRebarChevron);
811 procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
812 procedure ThreadEditorActionExecute(Sender: TObject);
813 procedure ThreadEditorActionUpdate(Sender: TObject);
814 procedure ToolBarSettingActionExecute(Sender: TObject);
815 procedure NameCopyActionExecute(Sender: TObject);
816 procedure BoardIEActionExecute(Sender: TObject);
817 procedure SelectItemNameCopyActionExecute(Sender: TObject);
818 procedure SelectItemNameCopyActionUpdate(Sender: TObject);
819 procedure BoardIEActionUpdate(Sender: TObject);
820 procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
821 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
822 procedure NameCopyActionUpdate(Sender: TObject);
823 procedure SelectComboBoxChange(Sender: TObject);
824 procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
825 Shift: TShiftState);
826 procedure SelectComboBoxExit(Sender: TObject);
827 procedure SelectResActionExecute(Sender: TObject);
828 procedure SelectResActionUpdate(Sender: TObject);
829 procedure AllResActionExecute(Sender: TObject);
830 procedure AllResActionUpdate(Sender: TObject);
831 procedure ReloadClick(Sender: TObject);
832 procedure GoBackClick(Sender: TObject);
833 procedure GoFowardClick(Sender: TObject);
834 procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
835 Shift: TShiftState; X, Y: Integer);
836 procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
837 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
838 procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
839 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
840 procedure StatusBarResize(Sender: TObject);
841 procedure SelectComboBoxEnter(Sender: TObject);
842 procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
843 procedure CabinetFavoriteActionExecute(Sender: TObject);
844 procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
845 Y: Integer);
846 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
847 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
848 var S: String);
849 procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
850 Shift: TShiftState);
851 procedure FavoriteTreePopupMenuPopup(Sender: TObject);
852 procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
853 procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
854 procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
855 procedure ToolButton19Click(Sender: TObject);
856 procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject);
857 procedure FavoriteTreeViewDblClick(Sender: TObject);
858 procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject);
859 procedure FavoriteTreeViewReloadActionExecute(Sender: TObject);
860 procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
861 procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
862 procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject);
863 procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
864 procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
865 Shift: TShiftState; X, Y: Integer);
866 procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
867 State: TDragState; var Accept: Boolean);
868 procedure ResRangeActionExecute(Sender: TObject);
869 procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
870 Y: Integer);
871 procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
872 var Handled: Boolean);
873 procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
874 var Handled: Boolean);
875 procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
876 var Handled: Boolean);
877 procedure ExportFavoriteFileAccept(Sender: TObject);
878 procedure ExportFavoriteFileBeforeExecute(Sender: TObject);
879 procedure CabinetBBSActionExecute(Sender: TObject);
880 procedure FavoriteTreeViewBrowseThreadActionExecute(Sender: TObject);
881 procedure FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
882 procedure UpBoardActionExecute(Sender: TObject);
883 procedure UpBoardActionUpdate(Sender: TObject);
884 procedure BrowserTabContextPopup(Sender: TObject; MousePos: TPoint;
885 var Handled: Boolean);
886 procedure KoreCopyExecute(Sender: TObject);
887 procedure BrowserTabPopupMenuPopup(Sender: TObject);
888 procedure BrowserTabResize(Sender: TObject);
889 procedure TreeViewClick(Sender: TObject);
890 procedure TreeViewKeyDown(Sender: TObject; var Key: Word;
891 Shift: TShiftState);
892 procedure FavoriteTreeViewMouseDown(Sender: TObject;
893 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
894 procedure MessagePanelResize(Sender: TObject);
895 procedure OnResized;
896 procedure TreeSelectNameCopyExecute(Sender: TObject);
897 procedure FavoriteTreeViewMouseUp(Sender: TObject;
898 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
899 procedure ResRangeActionUpdate(Sender: TObject);
900 procedure SetFocusForBrowserActionExecute(Sender: TObject);
901 procedure SetFocusForBrowserActionUpdate(Sender: TObject);
902 procedure SetFocusForThreadListActionExecute(Sender: TObject);
903 procedure SetFocusForCabinetActionExecute(Sender: TObject);
904 procedure BrowserMaxAndFocusActionExecute(Sender: TObject);
905 procedure BrowserMaxAndFocusActionUpdate(Sender: TObject);
906 procedure ThreadlistMaxAndFocusActionExecute(Sender: TObject);
907 procedure SetFocusForCabinetActionUpdate(Sender: TObject);
908 procedure ListViewSelectItem(Sender: TObject; Item: TListItem;
909 Selected: Boolean);
910 procedure SelectTimerTimer(Sender: TObject);
911 procedure SelectItemSaveForHTMLExecute(Sender: TObject);
912 procedure KidokuActionExecute(Sender: TObject);
913 procedure MidokuActionExecute(Sender: TObject);
914 procedure SelectItemSaveForDatExecute(Sender: TObject);
915 procedure LogFolderOpenActionExecute(Sender: TObject);
916 procedure LogFolderOpenActionUpdate(Sender: TObject);
917 procedure TabsSaveActionExecute(Sender: TObject);
918 procedure TabsOpenActionExecute(Sender: TObject);
919 procedure OnlyAHundredResActionExecute(Sender: TObject);
920 procedure OnlyKokoResActionExecute(Sender: TObject);
921 procedure OnlyNewResActionExecute(Sender: TObject);
922 procedure BrowsBoradHeadActionExecute(Sender: TObject);
923 procedure BrowsBoradHeadActionUpdate(Sender: TObject);
924 procedure EditNGActionExecute(Sender: TObject);
925 procedure ThreadRangeActionUpdate(Sender: TObject);
926 procedure ThreadRangeActionExecute(Sender: TObject);
927 procedure TabAutoSaveActionExecute(Sender: TObject);
928 procedure TabAutoLoadActionExecute(Sender: TObject);
929 procedure ListViewColumnRightClick(Sender: TObject;
930 Column: TListColumn; Point: TPoint);
931 procedure JumpToNumOfResActionExecute(Sender: TObject);
932 procedure JumpToNumOfResActionUpdate(Sender: TObject);
933 procedure FavoriteTreeViewCollapseActionExecute(Sender: TObject);
934 procedure ListViewCustomDrawItem(Sender: TCustomListView;
935 Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
936 procedure FormActivate(Sender: TObject);
937 procedure BrowserPanelResize(Sender: TObject);
938 procedure MenuToolBarResize(Sender: TObject);
939 procedure ListToolBarResize(Sender: TObject);
940 procedure BrowserToolBarResize(Sender: TObject);
941 procedure RightTabCloseActionExecute(Sender: TObject);
942 procedure RightTabCloseActionUpdate(Sender: TObject);
943 procedure LeftTabCloseActionExecute(Sender: TObject);
944 procedure LeftTabCloseActionUpdate(Sender: TObject);
945 procedure SameIDResAnchorActionExecute(Sender: TObject);
946 procedure IndividualAbon1ActionExecute(Sender: TObject);
947 procedure IndividualAbon0ActionExecute(Sender: TObject);
948 procedure AntiIndividualAbonActionExecute(Sender: TObject);
949 procedure AntiIndividualAbonDlgActionExecute(Sender: TObject);
950 procedure IndividualAbonID1ActionExecute(Sender: TObject);
951 procedure IndividualAbonID0ActionExecute(Sender: TObject);
952 procedure KokoPopupMenuPopup(Sender: TObject);
953 procedure MuteActionExecute(Sender: TObject);
954 procedure SortActiveColumnActionExecute(Sender: TObject);
955 procedure SortNextColumnActionExecute(Sender: TObject);
956 procedure SortPrevColumnActionExecute(Sender: TObject);
957 procedure MessageListViewAdvancedCustomDrawItem(
958 Sender: TCustomListView; Item: TListItem; State: TCustomDrawState;
959 Stage: TCustomDrawStage; var DefaultDraw: Boolean);
960 procedure BeLogInOutActionExecute(Sender: TObject);
961 procedure BeLogInOutActionUpdate(Sender: TObject);
962 private
963 { Private 鐃緒申鐃緒申 }
964 //RoundList : TRoundList;
965 FSortIndex: Integer;
966 FSortOrder: Boolean;
967
968 FEnabledCloseButton: Boolean;
969 // ThreadCreate: TThreadCreate;
970
971 FClickNode: TTreeNode;
972 FHttpState: Boolean;
973 FHint: TResPopup;
974 FPreviewBrowser: TWebBrowser;
975 FPreviewURL: string;
976
977 FBrowserSizeHeight: Integer;
978 FBrowserSizeWidth: Integer;
979
980 // FFavorite: TFavorite;
981 FTabHintIndex: Integer;
982 FListStyle: TViewStyle; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
983 FItemNoVisible: Boolean; //鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?
984 FViewType: TGikoViewType; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?
985 FActiveList: TObject;
986 FActiveContent: TBrowserRecord; //
987 FActiveBBS : TBBS;
988 FHistoryList: TList; //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
989 FTreeType: TGikoTreeType;
990 FWorkCount: Integer;
991 FNameCookie: string;
992 FMailCookie: string;
993 // FLastRoundTime: TDateTime;
994 BrowserNullTab: TBrowserRecord;
995 // DoubleClickOccurred: array [TMouseButton] of Boolean;
996 FDownloadTitle: string; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
997 FDownloadMax: Integer; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?
998 FEvent: THTMLDocumentEventSink;//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?
999
1000 // Fkeynum : Integer; //鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1001
1002 IsDraggingSelectComboBox : Boolean;
1003 DraggingSelectComboBoxPosition : TPoint;
1004
1005 FSearchDialog: TSearchDialog;
1006
1007 FDropSpaceNode: TTreeNode;
1008
1009 FDragTime : Cardinal; ///< 鐃緒申鐃緒申鐃?鐃緒申D&D鐃?
1010 FDragButton : TToolButton; ///< 鐃緒申鐃緒申鐃?鐃緒申D&D鐃?鐃緒申Drag鐃緒申鐃緒申鐃緒申Button鐃緒申鐃緒申
1011 FDragWFirst : Boolean; ///< WebTab鐃緒申D&D鐃?
1012
1013 FListViewBackGroundColor : TColor; ///< ListView鐃緒申BackGroundColor
1014 FUseOddResOddColor : Boolean; ///< 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申
1015 FOddColor : TColor; ///< 鐃緒申鐃緒申鐃?
1016
1017 FSelectResWord : string; ///< 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?
1018 FIsIgnoreResize : TResizeType; ///< 鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1019 FIsMinimize : TMinimizeType; ///< 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1020 FOldFormWidth : Integer; ///< 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
1021 FToolBarSettingSender : TToolBarSettingSenderType; ///< 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?
1022 FMouseDownPos : TPoint; ///< 鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
1023 FBrowsers: TList;
1024 FResRangeMenuSelect : Longint; ///< ResRangeButton 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 (鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申 ResRange 鐃緒申鐃緒申)
1025 FStartUp : Boolean;
1026 FIsHandledWheel : Boolean; ///< 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 WM_MOUSEWHEEL 鐃緒申鐃緒申鐃緒申鐃緒申
1027 DiffComp: Boolean; //Add by Genyakun 鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申True鐃緒申鐃緒申鐃緒申
1028 procedure SetBoardTreeNode( inBBS : TBBS );
1029 function SetCategoryListItem(ABBS2ch: TBBS): Integer;
1030 function SetBoardListItem(Category: TCategory): Integer;
1031 function SetThreadListItem(Board: TBoard): Integer;
1032 // function GetRoundName(index: integer): string;
1033
1034 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
1035 procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
1036 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
1037 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
1038 procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
1039
1040
1041 procedure ListClick;
1042 procedure ListDoubleClick(Shift: TShiftState);
1043 procedure BrowserMovement(const AName: string); overload;
1044 procedure BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord); overload;
1045 procedure SelectListItem(List: TList);
1046 // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
1047 procedure DeleteTab(ThreadItem: TThreadItem); overload;
1048 procedure DeleteTab(BrowserRecord: TBrowserRecord); overload;
1049 function Hook(var Message: TMessage): Boolean;
1050 procedure AddRoundNameMenu(MenuItem: TMenuItem);
1051 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload;
1052 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
1053 procedure SetSelectRoundName(Sender: TObject);
1054 function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
1055
1056 procedure SetMenuFont;
1057 // procedure CreateFavMenu(Folder: TFavoriteFolder);
1058 procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
1059 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
1060 procedure FavoriteClick(Sender: TObject); overload;
1061 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
1062 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
1063 function OnDocumentContextMenu(Sender: TObject): WordBool;
1064 // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
1065 procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
1066 procedure ShowTextPopup;
1067 //procedure ShowTextPopup(HintData: THintData);
1068 // procedure SetStdToolBar;
1069 // function GetAction(ActionName: string): TContainedAction;
1070 procedure SetLinkBar;
1071 function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
1072 procedure MenuBarChevronMenu;
1073 procedure LinkBarChevronMenu;
1074 procedure ToolBarChevronMenu(ToolBar: TToolBar);
1075 procedure ModifySelectList;
1076 procedure FavoriteBrowseFolder( node: TTreeNode );
1077 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
1078 procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
1079 procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
1080 procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
1081 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
1082 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
1083 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
1084 procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
1085 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
1086 //
1087 procedure SetListViewBackGroundColor(value: TColor);
1088 procedure BBSMenuItemOnClick( Sender : TObject );
1089 //
1090 procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
1091 /// CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1092 procedure SaveCoolBarSettings;
1093 procedure SaveMainCoolBarSettings;
1094 procedure SaveBoardCoolBarSettings;
1095 procedure SaveBrowserCoolBarSettings;
1096 /// CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1097 procedure LoadCoolBarSettings;
1098 /// 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1099 procedure OnMinimize;
1100 /// 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1101 procedure OnMinimized;
1102 /// TreeView 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1103 procedure TreeClick( Node : TTreeNode );
1104 /// TreeView 鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1105 procedure TreeDoubleClick( Node : TTreeNode );
1106 /// 鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1107 procedure HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
1108 /// 鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1109 /// 鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 True 鐃緒申鐃緒申鐃緒申
1110 // function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
1111 /// 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃? BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1112 procedure SetBBSMenu;
1113 function WebBrowserClick(Sender: TObject): WordBool;
1114 procedure SkinorCSSFilesCopy(path: string);
1115 /// 鐃?鐃?鐃緒申鐃緒申
1116 function GetTabURLs(AStringList: TStringList) : Boolean;
1117 /// 鐃?鐃?鐃緒申鐃緒申
1118 function SaveTabURLs : Boolean;
1119 /// 鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申
1120 function LoadTabURLs : Boolean;
1121 /// 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1122 procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
1123 /// ListView 鐃緒申 Column 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1124 function ActiveListTrueColumn( column : TListColumn ) : TListColumn;
1125 /// ListColumnPopupMenu 鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?
1126 procedure ListColumnPopupMenuOnClick( Sender : TObject );
1127 // BrowserRecord鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FBrowser鐃緒申鐃?鐃緒申
1128 procedure ReleaseBrowser( BRecord: TBrowserRecord);
1129 //! 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?
1130 procedure OnGestureStart(Sender: TObject);
1131 //! 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申
1132 procedure OnGestureMove(Sender: TObject);
1133 //! 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1134 procedure OnGestureEnd(Sender: TObject);
1135 //! 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1136 procedure SetSelectWord( const text : string );
1137 //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申 true:鐃?鐃緒申鐃緒申鐃?鐃? false:鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
1138 procedure RepaintAllTabsBrowser();
1139 //鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申URL鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1140 function GetRespopupURL(AText, AThreadURL : string): string;
1141 protected
1142 procedure CreateParams(var Params: TCreateParams); override;
1143 procedure WndProc(var Message: TMessage); override;
1144 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
1145 procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
1146 procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
1147
1148 public
1149 { Public 鐃緒申鐃緒申 }
1150 LastRoundTime: TDateTime;
1151 FControlThread: TThreadControl;
1152 procedure MoveToURL(const inURL: string);
1153 function InsertBrowserTab(
1154 ThreadItem : TThreadItem;
1155 ActiveTab : Boolean = True
1156 ) : TBrowserRecord;
1157 procedure ReloadBBS;
1158 function GetHttpState: Boolean;
1159 procedure SetEnabledCloseButton(Enabled: Boolean);
1160 function GetTreeNode(Data: TObject): TTreeNode;
1161 procedure AppFormDeactivate(Sender: TObject);
1162 procedure ListViewAllSelect;
1163 property ListStyle: TViewStyle read FListStyle write FListStyle;
1164 property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
1165 property ViewType: TGikoViewType read FViewType write FViewType;
1166 property NameCookie: string read FNameCookie write FNameCookie;
1167 property MailCookie: string read FMailCookie write FMailCookie;
1168 procedure SetContent(inThread: TBrowserRecord);
1169 function GetActiveContent: TThreadItem;
1170 function GetActiveList: TObject;
1171 procedure SetListViewType(AViewType: TGikoViewType); overload;
1172 procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
1173 procedure DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
1174 procedure DownloadList(Board: TBoard; ForceDownload: Boolean = False);
1175 procedure PlaySound(SoundEventName: string);
1176 function AddHistory( FavItem: TFavoriteThreadItem ): Boolean;
1177 procedure DeleteHistory( threadItem: TThreadItem );
1178 procedure ClearHistory;
1179 procedure SaveHistory;
1180 procedure LoadHistory;
1181 procedure ShowBBSTree( inBBS : TBBS );
1182 procedure ShowBBSTreeOld( inBBS : TBBS );
1183 procedure ShowHistoryTree;
1184 procedure SetHistoryTreeNode;
1185 procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
1186 procedure SetBrowserTabState;
1187 procedure SetToolBarPopup;
1188 procedure ShowFavoriteAddDialog( Item : TObject );
1189 procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
1190 procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
1191 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
1192 property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
1193 property OddColor : TColor read FOddColor write FOddColor;
1194 function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
1195 procedure OnPlugInMenuItem( Sender : TObject );
1196 procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
1197 /// ListView 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申 KuroutSetting鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1198 procedure ActiveListColumnSave;
1199 procedure SetActiveList(Obj: TObject);
1200 property ActiveList: TObject read GetActiveList write SetActiveList;
1201 /// CoolBar 鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1202 procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
1203 //鐃緒申鐃緒申ID鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1204 procedure IndividualAbonID(Atype : Integer);
1205 //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申
1206 procedure IndividualAbon(Atag, Atype : Integer);
1207 //ID鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
1208 procedure IDAnchorPopup(Abody :string);
1209 published
1210 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
1211 end;
1212
1213 TFavoriteMenuItem = class(TMenuItem)
1214 private
1215 FData : Pointer;
1216 public
1217 property Data: Pointer read FData write FData;
1218 end;
1219
1220 TBBSMenuItem = class(TMenuItem)
1221 private
1222 FData : Pointer;
1223 public
1224 property Data: Pointer read FData write FData;
1225 end;
1226
1227 TLinkToolButton = class(TToolButton)
1228 private
1229 FData : Pointer;
1230 public
1231 property Data: Pointer read FData write FData;
1232 end;
1233
1234 TBrowserRecord = class( TObject )
1235 private
1236 FBrowser : TWebBrowser;
1237 FEvent: THTMLDocumentEventSink; ///< 鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?
1238 FThread : TThreadItem;
1239 FLastSize : Integer;
1240 FRepaint : Boolean;
1241 FMovement : string; ///< 鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?
1242 public
1243 destructor Destroy; override;
1244 property Browser : TWebBrowser read FBrowser write FBrowser;
1245 property Thread : TThreadItem read FThread write FThread;
1246 property LastSize : Integer read FLastSize write FLastSize;
1247 property Repaint : Boolean read FRepaint write FRepaint;
1248 property Movement : string read FMovement write FMovement;
1249 end;
1250
1251 var
1252 GikoForm: TGikoForm;
1253
1254 implementation
1255
1256 uses
1257 About, Option, Round, Splash, Sort, ListSelect, Imm,
1258 NewBoard, MojuUtils, Clipbrd, GikoBayesian,Y_TextConverter;
1259
1260 const
1261 CAPTION_NAME: string = '鐃?鐃?鐃?鐃?';
1262 BLANK_HTML: string = 'about:blank';
1263 SELECTCOMBOBOX_NAME: string = ''; // '鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申';
1264 SELECTCOMBOBOX_COLOR: TColor = clWindow;
1265 //D&D鐃緒申鐃?
1266 DandD_THRESHOLD = 5; //D&D鐃緒申鐃緒申鐃?鐃?pixcel)
1267 //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1268 ITEM_ICON_2CH1 = 0; //2ch鐃?鐃?鐃?鐃緒申
1269 ITEM_ICON_2CH2 = 1; //2ch鐃?鐃?鐃?鐃緒申
1270 ITEM_ICON_CATEGORY1 = 2; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1271 ITEM_ICON_CATEGORY2 = 3; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1272 ITEM_ICON_BOARD_NOSUBJECT = 3; //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1273 ITEM_ICON_BOARD1 = 4; //鐃緒申鐃?鐃?鐃?鐃緒申
1274 ITEM_ICON_BOARD2 = 5; //鐃緒申鐃?鐃?鐃?鐃緒申
1275 ITEM_ICON_THREADLOG1 = 6; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1276 ITEM_ICON_THREADLOG2 = 7; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1277 ITEM_ICON_THREAD1 = 8; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1278 ITEM_ICON_THREAD2 = 9; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1279 ITEM_ICON_THREADNEW1 = 10; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1280 ITEM_ICON_THREADNEW2 = 11; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1281 ITEM_ICON_SORT1 = 12; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1282 ITEM_ICON_SORT2 = 13; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1283 ITEM_ICON_BOARD_LOG = 17; //鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1284 ITEM_ICON_BOARD_NEW = 18; //鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1285
1286 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1287 TOOL_ICON_HEIGHT_MAX = 16; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1288 TOOL_ICON_HEIGHT_MIN = 17; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1289 TOOL_ICON_HEIGHT_NORMAL = 18; //鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1290 TOOL_ICON_WIDTH_MAX = 19; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1291 TOOL_ICON_WIDTH_MIN = 20; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1292 TOOL_ICON_WIDTH_NORMAL = 21; //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1293
1294 TOOL_ICON_FAV_FOLDER = 30; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申
1295 TOOL_ICON_FAV_BOARD = 31; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1296 TOOL_ICON_FAV_THREAD = 32; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1297
1298 HTML_FILE_NAME = 'temp_preview.html';
1299
1300 WM_XBUTTONDOWN = $020B;
1301 WM_XBUTTONUP = $020C;
1302 WM_XBUTTONDBLCLK = $020D;
1303 XBUTTON1 = $0001;
1304 XBUTTON2 = $0002;
1305 USER_TREECLICK = WM_USER + 2000;
1306 USER_RESIZED = WM_USER + 2001;
1307 USER_MINIMIZED = WM_USER + 2002;
1308 USER_SETLINKBAR = WM_USER + 2003;
1309 USER_DOCUMENTCOMPLETE = WM_USER + 2004; ///< wParam : TWebBrowser
1310 SELECTTIME_INTERBAL = 110;
1311
1312 BROWSER_COUNT = 5; //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
1313 {$R *.DFM}
1314
1315 procedure TGikoForm.CreateParams(var Params: TCreateParams);
1316 begin
1317 inherited;
1318 if FormStyle in [fsNormal, fsStayOnTop] then begin
1319 if BorderStyle in [bsSingle, bsSizeable] then begin
1320 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1321 Params.WndParent := 0;
1322 end;
1323 end;
1324 end;
1325
1326 procedure TGikoForm.FormCreate(Sender: TObject);
1327 const
1328 TVS_NOTOOLTIPS = $0080;
1329 var
1330 FileName: string;
1331 Style: DWORD;
1332 msg: string;
1333 i: Integer;
1334 wp: TWindowPlacement;
1335 s: string;
1336 newbrowser: TWebBrowser;
1337 begin
1338 {$IFDEF DEBUG}
1339 AllocConsole;
1340 Writeln('============================================================');
1341 Writeln(' 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃? 鐃?鐃緒申鐃?鐃?鐃緒申');
1342 Writeln('');
1343 Writeln(' 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?');
1344 Writeln(' 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
1345 Writeln('============================================================');
1346 {$ENDIF}
1347 FStartUp := true;
1348 // LockWindowUpdate(Self.Handle);
1349 Application.OnDeactivate := AppFormDeactivate;
1350 //Self.OnDeactivate := AppFormDeactivate;
1351 Application.HookMainWindow(Hook);
1352 // Application.OnMessage := HandleAppMessage; //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?by鐃?鐃緒申鐃緒申鐃緒申
1353 FTreeType := gttNone;
1354
1355 FSearchDialog := nil;
1356 BrowserNullTab := TBrowserRecord.Create;
1357 BrowserNullTab.Browser := Browser;
1358 BrowserNullTab.Browser.Navigate(BLANK_HTML);
1359 FBrowsers := TList.Create;
1360 for i := 0 to BROWSER_COUNT -1 do begin
1361 FBrowsers.Add(TWebBrowser.Create(nil));
1362 newBrowser := FBrowsers[FBrowsers.Count - 1];
1363 TOleControl(newBrowser).Parent := BrowserPanel;
1364 TOleControl(newBrowser).Align := alNone;
1365 TOleControl(newBrowser).Left := 0;
1366 TOleControl(newBrowser).Top := 0;
1367 //newBrowser.StatusBar := false;
1368 //newBrowser.MenuBar := false;
1369 //newBrowser.AddressBar := false;
1370 newBrowser.OnDocumentComplete := BrowserDocumentComplete;
1371 newBrowser.OnBeforeNavigate2 := BrowserBeforeNavigate2;
1372 newBrowser.OnEnter := BrowserEnter;
1373 newBrowser.OnNewWindow2 := BrowserNewWindow2;
1374 newBrowser.OnStatusTextChange := BrowserStatusTextChange;
1375 newBrowser.Navigate(BLANK_HTML);
1376 ShowWindow(newBrowser.Handle, SW_HIDE);
1377
1378 end;
1379 BrowserNullTab.Browser.BringToFront;
1380 ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
1381
1382 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1383 FIsIgnoreResize := rtResizing;
1384
1385 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1386 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1387
1388
1389 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1390 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1391
1392 EnabledCloseButton := True;
1393
1394 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1395 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1396
1397 //鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1398 // MainCoolBar.Top := 0;
1399 // MainCoolBar.Left := 0;
1400
1401 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
1402 AnimePanel.Top := 0;
1403 AnimePanel.Left := 0;
1404
1405 //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1406
1407 //鐃?鐃緒申鐃?鐃?鐃?鐃?
1408 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1409
1410 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1411 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1412 MsgBarVisibleActionExecute(nil);
1413 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1414
1415 //鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1416 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1417 StatusBarVisibleActionExecute(nil);
1418
1419 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1420 TreeView.Items.BeginUpdate;
1421 FavoriteTreeView.Items.BeginUpdate;
1422 ListView.Items.BeginUpdate;
1423 try
1424 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1425 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1426 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1427 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1428 {TreeView.Font.Style := [];
1429 if GikoSys.Setting.CabinetFontBold then
1430 TreeView.Font.Style := [fsBold];
1431 if GikoSys.Setting.CabinetFontItalic then
1432 TreeView.Font.Style := TreeView.Font.Style + [fsItalic];
1433 }
1434 //FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1435 //FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1436 //FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1437 FavoriteTreeView.Font.Assign(TreeView.Font);
1438 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1439
1440 ListView.Font.Name := GikoSys.Setting.ListFontName;
1441 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1442 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1443 ListView.Font.Style := [];
1444 if GikoSys.Setting.ListFontBold then
1445 ListView.Font.Style := [fsbold];
1446 if GikoSys.Setting.ListFontItalic then
1447 ListView.Font.Style := ListView.Font.Style + [fsitalic];
1448
1449 ListViewBackGroundColor := clWhite; // 鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1450 ListViewBackGroundColor := GikoSys.Setting.ListBackColor; // 鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1451 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1452 FOddColor := GikoSys.Setting.OddColor;
1453
1454 finally
1455 TreeView.Items.EndUpdate;
1456 FavoriteTreeView.Items.EndUpdate;
1457 ListView.Items.EndUpdate;
1458 end;
1459 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1460 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1461
1462 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1463 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1464 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1465 BrowserTab.Font.Style := [];
1466 if GikoSys.Setting.BrowserTabFontBold then
1467 BrowserTab.Font.Style := [fsBold];
1468 if GikoSys.Setting.BrowserTabFontItalic then
1469 BrowserTab.Font.Style := GikoForm.BrowserTab.Font.Style + [fsItalic];
1470 FDragWFirst := false;
1471 SetContent(BrowserNullTab); //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1472 // TreeView.TopItem.Expanded := True; //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1473 // TreeView.Selected := TreeView.Items[0]; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1474
1475
1476 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1477 wp.length := sizeof(wp);
1478 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1479 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1480 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1481 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1482 wp.showCmd := SW_HIDE;
1483 SetWindowPlacement(Handle, @wp);
1484
1485 // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1486 // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1487 if GikoSys.Setting.WindowMax then
1488 WindowState := wsMaximized;
1489
1490 //鐃?鐃?鐃?鐃?鐃緒申
1491 try
1492 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1493 if FileExists(FileName) then
1494 Animate.FileName := FileName;
1495 except
1496 end;
1497
1498 //鐃?鐃?鐃?鐃?
1499 FNameCookie := '';
1500 FMailCookie := '';
1501
1502 //鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1503 AllItemAction.Checked := True;
1504 AllResAction.Checked := True;
1505
1506 //TreeView鐃緒申鐃緒申鐃緒申鐃?鐃緒申ToolTip鐃緒申鐃緒申鐃?鐃緒申
1507 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1508 Style := Style or TVS_NOTOOLTIPS;
1509 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1510
1511 // 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1512 TreeView.Align := alClient;
1513 FavoriteTreeView.Align := alClient;
1514 FavoriteTreeView.Visible := False;
1515
1516 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1517 // FBrowserSizeFlag := False;
1518 // FBrowserSizeHeight := ViewPanel.Height;
1519
1520 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1521 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1522
1523 // 鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?(ReadBoardFile, LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1524 InitializeBoardPlugIns;
1525
1526 { //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1527 RoundList := TRoundList.Create;
1528 RoundList.LoadRoundBoardFile;
1529 }
1530 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申(ReadFavorite 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1531 GikoSys.ListBoardFile;
1532
1533 { RoundList.LoadRoundThreadFile;
1534
1535 if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
1536 GikoSys.ListBoardFile;
1537 }
1538
1539 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1540 SetBBSMenu;
1541
1542 // 鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?(LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1543 FHistoryList := TList.Create;
1544
1545 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1546 LoadHistory;
1547
1548 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1549 // FFavorite := TFavorite.Create(FavoriteTreeView);
1550 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1551 FavoriteDM.ReadFavorite;
1552
1553 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1554 ArrangeAction.Execute;
1555
1556 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1557 case GikoSys.Setting.ListWidthState of
1558 glsMax: begin
1559 ViewPanel.Width := 1;
1560 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1561 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1562 end;
1563 glsMin: begin
1564 ViewPanel.Width := GikoSys.Setting.ListWidth;
1565 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1566 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1567 end;
1568 else begin
1569 ViewPanel.Width := GikoSys.Setting.ListWidth;
1570 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1571 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1572 end;
1573 end;
1574 end else begin
1575 case GikoSys.Setting.ListHeightState of
1576 glsMax: begin
1577 ViewPanel.Height := 1;
1578 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1579 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1580 end;
1581 glsMin: begin
1582 ViewPanel.Height := GikoSys.Setting.ListHeight;
1583 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1584 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1585 end;
1586 else begin
1587 ViewPanel.Height := GikoSys.Setting.ListHeight;
1588 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1589 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1590 end;
1591 end;
1592 end;
1593
1594 //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1595 // ProgressBar.Visible := False;
1596 ProgressBar.Parent := StatusBar;
1597 ProgressBar.Top := 2;
1598 ProgressBar.Left := 0;
1599 ProgressBar.Width := StatusBar.Panels[0].Width;
1600 ProgressBar.Height := StatusBar.Height - 2;
1601 ProgressBar.Position := 0;
1602
1603 //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1604 FControlThread := TThreadControl.Create(True);
1605 FControlThread.MaxThreadCount := 1;
1606 FControlThread.Resume;
1607 FControlThread.OnDownloadEnd := DownloadEnd;
1608 FControlThread.OnDownloadMsg := DownloadMsg;
1609 FControlThread.OnWork := Work;
1610 FControlThread.OnWorkBegin := WorkBegin;
1611 FControlThread.OnWorkEnd := WorkEnd;
1612 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1613
1614 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1615 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1616
1617 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
1618 SetBrowserTabState;
1619
1620 BrowserBoardNameLabel.Caption := '';
1621 BrowserNameLabel.Caption := '';
1622 FWorkCount := 0;
1623
1624 FTabHintIndex := -1;
1625
1626 //鐃緒申鐃緒申鐃?鐃?鐃?
1627 SetLinkBar;
1628
1629 //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?
1630 SetMenuFont;
1631
1632 //鐃?鐃?鐃緒申鐃?鐃?Wrapable
1633 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1634 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1635
1636 KeepDefaultToolButton(StdToolBar, TmpToolBar);
1637 KeepDefaultToolButton(ListToolBar, TmpToolBar);
1638 KeepDefaultToolButton(BrowserToolBar, TmpToolBar);
1639
1640 MakeDefaultINIFile();
1641 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1642 ReadToolBarSetting(ActionList, StdToolBar);
1643 ReadToolBarSetting(ActionList, ListToolBar);
1644 try
1645 for i := ListToolBar.ControlCount - 1 downto 0 do
1646 begin
1647 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1648 begin
1649 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1650 if (i + 1) < ListToolBar.ControlCount then
1651 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1652 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1653 ListToolBar.Controls[ i + 1 ].Visible := False;
1654
1655 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申
1656 ListToolBar.Controls[ i ].Visible := False;
1657 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申
1658 SelectComboBox.Parent := ListToolBar;
1659 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1660 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1661 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
1662 SelectComboBoxSplitter.Parent := ListToolBar;
1663 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1664
1665 break;
1666 end;
1667 end;
1668 except
1669 end;
1670 ReadToolBarSetting(ActionList, BrowserToolBar);
1671 SetToolBarPopup;
1672
1673 // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1674 FResRangeMenuSelect := GikoSys.ResRange;
1675 case GikoSys.ResRange of
1676 Ord( grrAll ):
1677 begin
1678 AllResAction.Execute;
1679 end;
1680 Ord( grrSelect ):
1681 begin
1682 SelectComboBox.Text := SelectComboBox.Items[ 1 ];
1683 SelectResAction.Checked := True;
1684 end;
1685 else
1686 // ResRangeAction.Execute;
1687 case FResRangeMenuSelect of
1688 Ord( grrKoko ): OnlyKokoResAction.Checked := True;
1689 Ord( grrNew ): OnlyNewResAction.Checked := True;
1690 100: OnlyAHundredResAction.Checked := True;
1691 end;
1692 end;
1693
1694 // 鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1695 // ThreadRangeAction.Execute;
1696 case GikoSys.Setting.ThreadRange of
1697 gtrAll:
1698 begin
1699 AllItemAction.Checked := True;
1700 ViewType := gvtAll;
1701 end;
1702 gtrLog:
1703 begin
1704 LogItemAction.Checked := True;
1705 ViewType := gvtLog;
1706 end;
1707 gtrNew:
1708 begin
1709 NewItemAction.Checked := True;
1710 ViewType := gvtNew;
1711 end;
1712 end;
1713
1714 //鐃?鐃?鐃緒申鐃?鐃?鐃?
1715 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1716
1717 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1718
1719 //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1720 if not FileExists(GikoSys.GetBoardFileName) then begin
1721 msg := '鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申' + #13#10#13#10
1722 + '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申' + #13#10
1723 + '鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?';
1724 MsgBox(SplashWindow.Handle, msg, '鐃?鐃?鐃?鐃?', MB_OK or MB_ICONINFORMATION);
1725 NewBoardAction.Execute;
1726 end;
1727
1728 //鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1729 GikoSys.LoadKeySetting(ActionList);
1730
1731 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1732 // FLastRoundTime := 0;
1733
1734 //ResHint
1735 FHint := TResPopup.Create(Self);
1736
1737 // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1738 CabinetVisible( False );
1739 if GikoSys.Setting.CabinetVisible then begin
1740 i := CabinetSelectPopupMenu.Items.Count - 1;
1741 if GikoSys.Setting.CabinetIndex = i - 1 then
1742 CabinetHistoryAction.Execute
1743 else if GikoSys.Setting.CabinetIndex = i then
1744 CabinetFavoriteAction.Execute
1745 else begin
1746 if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1747 ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1748 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 2
1749 FIsIgnoreResize := rtResizing;
1750 CabinetBBSAction.Execute;
1751 end;
1752 end else begin
1753 ShowBBSTreeOld( BBSs[ 0 ] );
1754 PostMessage( Handle, USER_TREECLICK, 0, 0 );
1755 end;
1756
1757 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 3
1758 FIsIgnoreResize := rtResizing;
1759
1760 // 鐃緒申鐃緒申鐃緒申鐃緒申BBS鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1761 for i := Length(BBSs) - 1 downto 0 do begin
1762 if not BBSs[i].IsBoardFileRead then
1763 GikoSys.ReadBoardFile(BBSs[i]);
1764 end;
1765
1766 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1767 RoundList := TRoundList.Create;
1768 RoundList.LoadRoundBoardFile;
1769 RoundList.LoadRoundThreadFile;
1770
1771 //if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
1772 // GikoSys.ListBoardFile;
1773
1774 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?
1775 for i := 1 to ParamCount do begin
1776 MoveToURL(ParamStr(i));
1777 end;
1778 // SetStdToolBar;
1779 // SetLinkBar;
1780
1781 s := GikoSys.FAbon.NGwordname;
1782 StatusBar.Panels[2].Text := s;
1783 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1784 StatusBarResize(Sender);
1785
1786 dummy1.Caption := ItemReservPMenu.Caption;
1787 dummy1.Hint := ItemReservPMenu.Hint;
1788
1789 //Samba24鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?
1790 GikoSys.SambaFileExists();
1791
1792 {$IFDEF SPAM_FILTER_ENABLED}
1793 // 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1794 GikoSys.Bayesian.LoadFromFile( GikoSys.Setting.GetSpamFilterFileName );
1795 {$ENDIF}
1796
1797 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1798 MouseGesture := TMouseGesture.Create;
1799 GikoSys.Setting.Gestures.LoadGesture(
1800 GikoSys.Setting.GetGestureFileName, ActionList );
1801 MouseGesture.Margin := GikoSys.Setting.Gestures.Margin;
1802 MouseGesture.OnGestureStart := OnGestureStart;
1803 MouseGesture.OnGestureMove := OnGestureMove;
1804 MouseGesture.OnGestureEnd := OnGestureEnd;
1805 if GikoSys.Setting.GestureEnabled then
1806 MouseGesture.SetHook( Handle );
1807
1808 //2ch鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1809 GikoSys.Setting.SetMessages;
1810 {
1811 //2ch鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1812 if GikoSys.Setting.GengoSupport then begin
1813 if GikoSys.Setting.Gengo = nil then
1814 GikoSys.Setting.Gengo := TStringList.Create;
1815 if FileExists(GikoSys.GetConfigDir + 'language.ini') then
1816 GikoSys.Setting.Gengo.LoadFromFile(GikoSys.GetConfigDir + 'language.ini')
1817 else
1818 GikoSys.Setting.GengoSupport := false;
1819 end;
1820 }
1821 //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1822 if GikoSys.Setting.AutoLogin then
1823 LoginAction.Execute;
1824
1825 MuteAction.Checked := GikoSys.Setting.Mute;
1826
1827 GikoSys.Setting.BeLogin := GikoSys.Setting.BeAutoLogin;
1828 // LockWindowUpdate(0);
1829 end;
1830
1831 // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1832 procedure TGikoForm.SaveCoolBarSettings;
1833 begin
1834
1835 if IsIconic( Handle ) or (FIsIgnoreResize <> rtNone) then
1836 Exit;
1837 SaveMainCoolBarSettings;
1838 SaveBoardCoolBarSettings;
1839 SaveBrowserCoolBarSettings;
1840
1841 end;
1842 procedure TGikoForm.SaveMainCoolBarSettings;
1843 var
1844 i : Integer;
1845 CoolSet : TCoolSet;
1846 begin
1847 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1848 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1849 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1850 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1851 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1852 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1853 end;
1854 end;
1855 procedure TGikoForm.SaveBoardCoolBarSettings;
1856 var
1857 i : Integer;
1858 CoolSet : TCoolSet;
1859 begin
1860 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1861 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1862 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1863 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1864 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1865 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1866 end;
1867 end;
1868 procedure TGikoForm.SaveBrowserCoolBarSettings;
1869 var
1870 i : Integer;
1871 CoolSet : TCoolSet;
1872 begin
1873 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1874 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1875 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1876 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1877 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1878 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1879 end;
1880 end;
1881 // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1882 procedure TGikoForm.LoadCoolBarSettings;
1883 var
1884 i : Integer;
1885 CoolSet : TCoolSet;
1886 begin
1887
1888 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1889 MainCoolBar.Bands.BeginUpdate;
1890 try
1891 // for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1892 for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin
1893 CoolSet := GikoSys.Setting.MainCoolSet[i];
1894 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1895 FIsIgnoreResize := rtNone;
1896 SaveCoolBarSettings;
1897 Exit;
1898 end;
1899 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1900 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1901 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1902 end;
1903 finally
1904 MainCoolBar.Bands.EndUpdate;
1905 end;
1906
1907 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1908 ListCoolBar.Bands.BeginUpdate;
1909 try
1910 // for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1911 for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin
1912 CoolSet := GikoSys.Setting.ListCoolSet[i];
1913 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1914 FIsIgnoreResize := rtNone;
1915 SaveCoolBarSettings;
1916 Exit;
1917 end;
1918 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1919 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1920 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1921 end;
1922 finally
1923 ListCoolBar.Bands.EndUpdate;
1924 end;
1925
1926 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1927 BrowserCoolBar.Bands.BeginUpdate;
1928 try
1929 // for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1930 for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
1931 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1932 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1933 FIsIgnoreResize := rtNone;
1934 SaveCoolBarSettings;
1935 Exit;
1936 end;
1937 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1938 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1939 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1940 end;
1941 finally
1942 BrowserCoolBar.Bands.EndUpdate;
1943 end;
1944
1945 end;
1946
1947 //
1948 //
1949 //
1950 procedure TGikoForm.FormShow(Sender: TObject);
1951 begin
1952 if FStartUp then begin
1953 ShowWindow(Application.Handle, SW_HIDE);
1954
1955 //FormCreate鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1956 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1957 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1958 StdToolBarVisibleActionExecute( nil );
1959 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1960 AddressBarVisibleActionExecute( nil );
1961 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1962 LinkBarVisibleActionExecute( nil );
1963 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1964 ListToolBarVisibleActionExecute( nil );
1965 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1966 ListNameBarVisibleActionExecute( nil );
1967 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1968 BrowserToolBarVisibleActionExecute( nil );
1969 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1970 BrowserNameBarVisibleActionExecute( nil );
1971
1972 //鐃?鐃緒申鐃?鐃?鐃?鐃?
1973 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1974 BrowserTabVisibleActionExecute(nil);
1975
1976 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1977 BrowserTabTopAction.Checked := True;
1978 BrowserTabTopActionExecute(nil);
1979 end else begin
1980 BrowserTabBottomAction.Checked := True;
1981 BrowserTabBottomActionExecute(nil);
1982 end;
1983
1984 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1985 BrowserTabTabStyleAction.Checked := True;
1986 BrowserTabTabStyleActionExecute(nil);
1987 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1988 BrowserTabButtonStyleAction.Checked := True;
1989 BrowserTabButtonStyleActionExecute(nil);
1990 end else begin
1991 BrowserTabFlatStyleAction.Checked := True;
1992 BrowserTabFlatStyleActionExecute(nil);
1993 end;
1994
1995 // ListView 鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?
1996 // ListView.FullDrag := True;
1997
1998 // CoolBar 鐃緒申鐃緒申
1999 LoadCoolBarSettings;
2000
2001 FIsIgnoreResize := rtNone;
2002
2003 //TabAutoLoad
2004 //FormCrete鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2005 if GikoSys.Setting.TabAutoLoadSave then begin
2006 TabAutoLoadAction.Execute;
2007 end;
2008 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
2009 if GikoSys.Setting.GengoSupport then begin
2010 //鐃?鐃緒申鐃?
2011 //Test鐃緒申鐃緒申
2012 end;
2013 FStartUp := false;
2014 end;
2015 end;
2016
2017 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
2018 begin
2019 // if GikoForm.WindowState <> wsMinimized then
2020 // SaveCoolBarSettings;
2021 if ( GikoSys.Setting.ShowDialogForEnd ) and
2022 (MessageDlg('鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
2023 CanClose := false;
2024 Exit;
2025 end else begin
2026 CanClose := True;
2027 if GikoSys.Setting.TabAutoLoadSave then begin
2028 TabAutoSaveAction.Execute;
2029 end;
2030 end;
2031 { //2ch鐃緒申鐃緒申鐃緒申鐃緒申Free
2032 if GikoSys.Setting.Gengo <> nil then begin
2033 GikoSys.Setting.Gengo.Free;
2034 end;
2035 }
2036 //Application.HookMainWindow(Hook);
2037 Application.UnhookMainWindow(Hook);
2038 Application.Terminate;
2039 end;
2040
2041 procedure TGikoForm.FormDestroy(Sender: TObject);
2042 var
2043 i : Integer;
2044 // CoolSet: TCoolSet;
2045 wp : TWindowPlacement;
2046 tmpBool : Boolean;
2047 begin
2048 // Application.OnDeactivate := nil;
2049 // Self.OnDeactivate := nil;
2050 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
2051 try
2052 MouseGesture.UnHook;
2053 except
2054 end;
2055 try
2056 ActiveListColumnSave;
2057 except
2058 end;
2059 try
2060 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
2061 wp.length := sizeof(wp);
2062 GetWindowPlacement(Handle, @wp);
2063 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
2064 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
2065 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
2066 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
2067 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
2068
2069 GikoSys.Setting.ListStyle := ListView.ViewStyle;
2070 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
2071 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
2072 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
2073 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
2074 if ArrangeAction.Checked then
2075 GikoSys.Setting.ListOrientation := gloVertical
2076 else
2077 GikoSys.Setting.ListOrientation := gloHorizontal;
2078 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
2079 except
2080 end;
2081
2082 try
2083 // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
2084 if not GikoSys.Setting.ResRangeHold then
2085 GikoSys.Setting.ResRange := FResRangeMenuSelect;
2086 except
2087 end;
2088 if WindowState <> wsNormal then
2089 WindowState := wsNormal;
2090 SaveCoolBarSettings;
2091 try
2092 GikoSys.Setting.WriteWindowSettingFile;
2093 GikoSys.Setting.WriteNameMailSettingFile;
2094 except
2095 end;
2096 // 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申 CoolBar 鐃緒申鐃緒申
2097 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2098
2099 // 鐃緒申FormDestroy鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?2004/04/09鐃?
2100 // CoolBar 鐃緒申鐃緒申
2101 //if (GikoForm.WindowState <> wsMinimized) and (GikoForm.WindowState <> wsMaximized) then
2102
2103
2104 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2105 try
2106 //FavoriteDM鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
2107 FavoriteDM.WriteFavorite;
2108 FavoriteDM.Clear;
2109 except
2110 end;
2111 LockWindowUpdate(Self.Handle);
2112 try
2113 //鐃?鐃?鐃?鐃緒申鐃?鐃?
2114 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
2115 GikoSys.Setting.ShowDialogForAllTabClose := false;
2116 AllTabCloseAction.Execute;
2117 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
2118 except
2119 end;
2120 try
2121 for i := FBrowsers.Count - 1 downto 0 do begin
2122 TWebBrowser(FBrowsers[i]).Free;
2123 end;
2124 FBrowsers.Clear;
2125 FBrowsers.Capacity := 0;
2126 finally
2127 FBrowsers.Free;
2128 end;
2129 try
2130 if BrowserNullTab <> nil then begin
2131 BrowserNullTab.Browser := nil; {*BrowserNullTab鐃緒申Browser鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?
2132 *鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申Free鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2133 *}
2134 BrowserNullTab.Free;
2135 end;
2136 except
2137 end;
2138
2139 try
2140 TreeView.Items.BeginUpdate;
2141 TreeView.Items.GetFirstNode.Free;
2142 TreeView.Items.Clear;
2143 TreeView.Items.EndUpdate;
2144 except
2145 end;
2146
2147 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
2148 try
2149 //AddressHistoryDM鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2150 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
2151 except
2152 end;
2153
2154 //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
2155 try
2156 SaveHistory;
2157 except
2158 end;
2159 try
2160 try
2161 ClearHistory;
2162 except
2163 end;
2164 finally
2165 FHistoryList.Free;
2166 end;
2167
2168 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申&鐃?鐃緒申
2169 try
2170 RoundList.SaveRoundFile;
2171 except
2172 end;
2173 try
2174 try
2175 RoundList.Clear;
2176 except
2177 end;
2178 finally
2179 RoundList.Free;
2180 end;
2181
2182 try
2183 try
2184 FControlThread.Terminate;
2185 FControlThread.WaitFor;
2186 except
2187 end;
2188 finally
2189 FControlThread.Free;
2190 end;
2191
2192 // TBBS 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 TCategory, TBoard, TThreadItem 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2193 // TBoard, TThreadItem 鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
2194 // BoardPluteIns 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2195 for i := Length(BoardGroups) - 1 downto 0 do begin
2196 BoardGroups[i].Clear;
2197 end;
2198
2199 try
2200 for i := Length( BBSs ) - 1 downto 0 do begin
2201 if BBSs[ i ] <> nil then
2202 BBSs[ i ].Free;
2203 BBSs[ i ] := nil;
2204 end;
2205 except
2206 end;
2207
2208
2209 try
2210 for i := Length( BoardPlugIns ) - 1 downto 0 do begin
2211 if BoardPlugIns[ i ] <> nil then
2212 BoardPlugIns[ i ].Free;
2213 BoardPlugIns[ i ] := nil;
2214 end;
2215 except
2216 end;
2217
2218 try
2219 if FEvent <> nil then
2220 FEvent.Free;
2221
2222 //Hint鐃?鐃緒申
2223 if FHint <> nil then begin
2224 FHint.ReleaseHandle;
2225 FHint.Free;
2226 FHint := nil;
2227 end;
2228 //Preview鐃?鐃緒申
2229 if TPreviewBrowser <> nil then begin
2230 FPreviewBrowser.Free;
2231 FPreviewBrowser := nil;
2232 end;
2233 except
2234 end;
2235 LockWindowUpdate(0);
2236 end;
2237
2238 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
2239 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
2240 begin
2241 CabinetVisibleAction.Execute;
2242 // CabinetPanelVisible(false);
2243 end;
2244
2245 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃? BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
2246 procedure TGikoForm.SetBBSMenu;
2247 var
2248 i : Integer;
2249 item : TBBSMenuItem;
2250 begin
2251
2252 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2253 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
2254 try
2255 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
2256 CabinetSelectPopupMenu.Items[ i ].Free;
2257 CabinetMenu.Items[ i ].Free;
2258 BBSSelectPopupMenu.Items[ i ].Free;
2259 end;
2260 except
2261 end;
2262 end;
2263
2264 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2265 for i := Length( BBSs ) - 1 downto 0 do begin
2266 try
2267 item := TBBSMenuItem.Create( PopupMenu );
2268 item.Caption := BBSs[ i ].Title;
2269 item.Data := BBSs[ i ];
2270 item.OnClick := BBSMenuItemOnClick;
2271 CabinetSelectPopupMenu.Items.Insert( 0, item );
2272 item := TBBSMenuItem.Create( PopupMenu );
2273 item.Caption := BBSs[ i ].Title;
2274 item.Data := BBSs[ i ];
2275 item.OnClick := BBSMenuItemOnClick;
2276 CabinetMenu.Insert( 0, item );
2277 item := TBBSMenuItem.Create( PopupMenu );
2278 item.Caption := BBSs[ i ].Title;
2279 item.Data := BBSs[ i ];
2280 item.OnClick := BBSMenuItemOnClick;
2281 BBSSelectPopupMenu.Items.Insert( 0, Item );
2282 except
2283 end;
2284 end;
2285
2286 end;
2287
2288 procedure TGikoForm.ReloadBBS;
2289 var
2290 i : Integer;
2291 tmpBool: Boolean;
2292 begin
2293 //鐃?鐃?鐃?鐃緒申鐃?鐃?
2294 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
2295 GikoSys.Setting.ShowDialogForAllTabClose := false;
2296 AllTabCloseAction.Execute;
2297 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
2298
2299 SetContent(BrowserNullTab);
2300 //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
2301 TreeView.Items.Clear;
2302
2303 //BBS鐃?鐃緒申
2304 try
2305 for i := Length( BBSs ) - 1 downto 0 do begin
2306 if BBSs[ i ] <> nil then
2307 BBSs[ i ].Free;
2308 BBSs[ i ] := nil;
2309 end;
2310 except
2311 end;
2312
2313 ActiveList := nil;
2314
2315 FTreeType := gttNone;
2316 //GikoSys.FBoardURLList.Clear;
2317 for i := Length(BoardGroups) - 1 downto 0 do begin
2318 BoardGroups[i].Clear;
2319 end;
2320 GikoSys.ListBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
2321
2322 // BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?
2323 SetBBSMenu;
2324
2325 ShowBBSTree( BBSs[ 0 ] );
2326
2327 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2328 SaveHistory;
2329 ClearHistory;
2330 LoadHistory;
2331
2332 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2333 FavoriteDM.WriteFavorite;
2334 FavoriteDM.Clear;
2335 FavoriteDM.ReadFavorite;
2336
2337 SetLinkBar;
2338
2339 // 鐃緒申鐃緒申鐃緒申鐃緒申BBS鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2340 for i := Length(BBSs) - 1 downto 0 do begin
2341 if not BBSs[i].IsBoardFileRead then
2342 GikoSys.ReadBoardFile(BBSs[i]);
2343 end;
2344
2345 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申&鐃?鐃緒申
2346 try
2347 RoundList.SaveRoundFile;
2348 except
2349 end;
2350 try
2351 RoundList.Clear;
2352 except
2353 end;
2354 RoundList.LoadRoundBoardFile;
2355 RoundList.LoadRoundThreadFile;
2356
2357 //
2358 TabsOpenAction.Execute;
2359 end;
2360
2361 //鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
2362 procedure TGikoForm.SetBoardTreeNode(
2363 inBBS : TBBS
2364 );
2365 var
2366 i, j, k: integer;
2367 Root: TTreeNode;
2368 CategoryNode: TTreeNode;
2369 BoardNode: TTreeNode;
2370 Category: TCategory;
2371 Board: TBoard;
2372 begin
2373 // 鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
2374 FActiveBBS := inBBS;
2375 TreeView.Items.BeginUpdate;
2376 TreeView.Items.Clear;
2377 try
2378 if not inBBS.IsBoardFileRead then
2379 GikoSys.ReadBoardFile( inBBS );
2380 try
2381 if SplashWindow <> nil then
2382 SplashWindow.ProgressBar.Max := inBBS.Count;
2383 except
2384 end;
2385
2386 // 鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?
2387 if ( GikoSys.Setting.BBSSortIndex <> 0 ) or ( GikoSys.Setting.BBSSortOrder <> true ) then begin
2388 Sort.SortOrder := true;
2389 Sort.SortIndex := 0;
2390 Sort.SortNoFlag := true;
2391 inBBS.Sort(CategorySortProc);
2392 end;
2393
2394 Root := TreeView.Items.Add( nil, inBBS.Title );
2395 Root.ImageIndex := ITEM_ICON_2CH1;
2396 Root.SelectedIndex := ITEM_ICON_2CH2;
2397 Root.Data := inBBS;
2398 for i := inBBS.Count - 1 downto 0 do begin
2399 Category := TCategory(inBBS.Items[i]);
2400 CategoryNode := TreeView.Items.AddChildFirst(Root, Category.Title);
2401 CategoryNode.Data := Category;
2402 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
2403 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
2404
2405 // 鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?
2406 if ( GikoSys.Setting.CategorySortIndex <> 0 ) or ( GikoSys.Setting.CategorySortOrder <> true ) then begin
2407 Sort.SortOrder := true;
2408 Sort.SortIndex := 0;
2409 Sort.SortNoFlag := true;
2410 Category.CustomSort(BoardSortProc);
2411 end;
2412
2413 for j := Category.Count - 1 downto 0 do begin
2414 Board := TBoard(Category.Items[j]);
2415 Board.BeginUpdate;
2416 BoardNode := TreeView.Items.AddChildFirst(CategoryNode, Board.Title);
2417 BoardNode.Data := Board;
2418 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
2419 if not Board.IsLogFile then begin
2420 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
2421 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
2422 end else begin
2423 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
2424 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
2425 for k := 0 to Board.Count - 1 do begin
2426 if Board.Items[ k ].IsLogFile then begin
2427 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
2428 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
2429
2430 Break;
2431 end;
2432 end;
2433 end;
2434 Board.EndUpdate;
2435 end;
2436
2437 CategoryNode.Expanded := Category.NodeExpand;
2438
2439 if SplashWindow <> nil then begin
2440 SplashWindow.ProgressBar.StepIt;
2441 Application.ProcessMessages;
2442 end;
2443 end;
2444 finally
2445 TreeView.Items.EndUpdate;
2446 end;
2447 end;
2448
2449 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
2450 var
2451 TitleColumn : TListColumn;
2452 ListColumn : TListColumn;
2453 i, id, idx : Integer;
2454 begin
2455 ListView.Items.BeginUpdate;
2456 try
2457 Screen.Cursor := crHourGlass;
2458
2459 ListView.Columns.Clear;
2460 TitleColumn := ListView.Columns.Add;
2461 TitleColumn.Caption := GikoBBSColumnCaption[ Ord( gbbscTitle ) ];
2462 TitleColumn.Width := GikoSys.Setting.BBSColumnWidth[ Ord( gbbscTitle ) ];
2463 idx := 0;
2464 for i := 0 to GikoSys.Setting.BBSColumnOrder.Count - 1 do begin
2465 if GikoSys.Setting.BBSColumnOrder[ i ] = gbbscTitle then begin
2466 TitleColumn.Tag := i;
2467 idx := i;
2468 end else begin
2469 id := Ord( GikoSys.Setting.BBSColumnOrder[ i ] );
2470 if (Integer( Low( TGikoBBSColumnID ) ) <= id) and
2471 (id <= Integer( High( TGikoBBSColumnID ) )) then begin
2472 ListColumn := ListView.Columns.Add;
2473 // ListColumn.Tag := id;
2474 ListColumn.Tag := i;
2475 ListColumn.Caption := GikoBBSColumnCaption[ id ];
2476 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[ id ];
2477 end;
2478 end;
2479 end;
2480 TitleColumn.Index := idx;
2481
2482 ListView.Items.Count := 0;
2483 ListView.Items.Clear;
2484 ListView.Items.Count := ABBS2ch.Count;
2485
2486 // UpFolderAction.Enabled := False;
2487 // AllItemAction.Enabled := False;
2488 // LogItemAction.Enabled := False;
2489 // NewItemAction.Enabled := False;
2490 // SelectItemAction.Enabled := False;
2491 // ListDownloadToolButton.Enabled := False;
2492 // BoardReservToolButton.Enabled := False;
2493 // ListThreadDownloadToolButton.Enabled := False;
2494
2495 ListNameLabel.Caption := ABBS2ch.Title;
2496 FolderImage.Picture := nil;
2497 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
2498
2499 FSortIndex := GikoSys.Setting.BBSSortIndex;
2500 FSortOrder := GikoSys.Setting.BBSSortOrder;
2501 for i := ListView.Columns.Count - 1 downto 0 do begin
2502 idx := ListView.Column[ i ].Tag;
2503 if FSortIndex = Ord( GikoSys.Setting.BBSColumnOrder[ idx ] ) then
2504 ListViewSort( nil, ListView.Column[ i ] );
2505 end;
2506
2507 Result := ABBS2ch.Count;
2508 finally
2509 Screen.Cursor := crDefault;
2510 ListView.Items.EndUpdate;
2511 end;
2512 end;
2513
2514 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
2515 var
2516 TitleColumn : TListColumn;
2517 ListColumn : TListColumn;
2518 i, id, idx : Integer;
2519 begin
2520 ListView.Items.BeginUpdate;
2521 try
2522 Screen.Cursor := crHourGlass;
2523
2524 ListView.Columns.Clear;
2525 TitleColumn := ListView.Columns.Add;
2526 TitleColumn.Caption := GikoCategoryColumnCaption[ Ord( gccTitle ) ];
2527 TitleColumn.Width := GikoSys.Setting.CategoryColumnWidth[ Ord( gccTitle ) ];
2528 idx := 0;
2529 for i := 0 to GikoSys.Setting.CategoryColumnOrder.Count - 1 do begin
2530 if GikoSys.Setting.CategoryColumnOrder[ i ] = gccTitle then begin
2531 TitleColumn.Tag := i;
2532 idx := i;
2533 end else begin
2534 id := Ord( GikoSys.Setting.CategoryColumnOrder[ i ] );
2535 if (Integer( Low( TGikoCategoryColumnID ) ) <= id) and
2536 (id <= Integer( High( TGikoCategoryColumnID ) )) then begin
2537 ListColumn := ListView.Columns.Add;
2538 // ListColumn.Tag := id;
2539 ListColumn.Tag := i;
2540 ListColumn.Caption := GikoCategoryColumnCaption[ id ];
2541 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[ id ];
2542 end;
2543 end;
2544 end;
2545 TitleColumn.Index := idx;
2546
2547 ListView.Items.Count := 0;
2548 ListView.Items.Clear;
2549 ListView.Items.Count := Category.Count;
2550
2551 for i := Category.Count - 1 downto 0 do begin
2552 if( Category.Items[i].ParentCategory <> Category ) then begin
2553 Category.Items[i].ParentCategory := Category;
2554 Category.Items[i].No := i + 1;
2555 end;
2556 end;
2557 // UpFolderAction.Enabled := True;
2558 // AllItemAction.Enabled := False;
2559 // LogItemAction.Enabled := False;
2560 // NewItemAction.Enabled := False;
2561 // SelectItemAction.Enabled := False;
2562 // ListDownloadToolButton.Enabled := False;
2563 // BoardReservToolButton.Enabled := False;
2564 // ListThreadDownloadToolButton.Enabled := False;
2565
2566 ListNameLabel.Caption := Category.Title;
2567 FolderImage.Picture := nil;
2568 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2569
2570 FSortIndex := GikoSys.Setting.CategorySortIndex;
2571 FSortOrder := GikoSys.Setting.CategorySortOrder;
2572 for i := ListView.Columns.Count - 1 downto 0 do begin
2573 idx := ListView.Column[ i ].Tag;
2574 if FSortIndex = Ord( GikoSys.Setting.CategoryColumnOrder[ idx ] ) then
2575 ListViewSort( nil, ListView.Column[ i ] );
2576 end;
2577
2578 Result := Category.Count;
2579 finally
2580 Screen.Cursor := crDefault;
2581 ListView.Items.EndUpdate;
2582 end;
2583 end;
2584
2585 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2586 var
2587 TitleColumn : TListColumn;
2588 ListColumn : TListColumn;
2589 i, id, idx : Integer;
2590 begin
2591 ListView.Items.BeginUpdate;
2592 try
2593 Screen.Cursor := crHourGlass;
2594
2595 {*
2596 // 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2597 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2598 if ListView.Columns.Count <> GikoSys.Setting.BoardColumnOrder.Count then
2599 *}
2600 begin
2601 ListView.Columns.Clear;
2602 TitleColumn := ListView.Columns.Add;
2603 TitleColumn.Caption := GikoBoardColumnCaption[ Ord( gbcTitle ) ];
2604 TitleColumn.Width := GikoSys.Setting.BoardColumnWidth[ Ord( gbcTitle ) ];
2605 idx := 0;
2606 for i := 0 to GikoSys.Setting.BoardColumnOrder.Count - 1 do begin
2607 if GikoSys.Setting.BoardColumnOrder[ i ] = gbcTitle then begin
2608 TitleColumn.Tag := i;
2609 idx := i;
2610 end else begin
2611 id := Ord( GikoSys.Setting.BoardColumnOrder[ i ] );
2612 if (Integer( Low( TGikoBoardColumnID ) ) <= id) and
2613 (id <= Integer( High( TGikoBoardColumnID ) )) then begin
2614 ListColumn := ListView.Columns.Add;
2615 ListColumn.Caption := GikoBoardColumnCaption[ id ];
2616 // ListColumn.Tag := id;
2617 ListColumn.Tag := i;
2618 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[ id ];
2619 ListColumn.Alignment := GikoBoardColumnAlignment[ id ];
2620 end;
2621 end;
2622 end;
2623 TitleColumn.Index := idx;
2624 end;
2625
2626 ListView.Items.Count := 0;
2627 ListView.Items.Clear;
2628
2629 {case GikoForm.ViewType of
2630 gvtAll: ListView.Items.Count := Board.Count;
2631 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2632 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2633 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2634 end;
2635 }
2636
2637 Board.LogThreadCount := Board.GetLogThreadCount;
2638 Board.NewThreadCount := Board.GetNewThreadCount;
2639 Board.UserThreadCount:= Board.GetUserThreadCount;
2640
2641 case GikoForm.ViewType of
2642 gvtAll: ListView.Items.Count := Board.Count;
2643 gvtLog: ListView.Items.Count := Board.LogThreadCount;
2644 gvtNew: ListView.Items.Count := Board.NewThreadCount;
2645 gvtUser: ListView.Items.Count := Board.UserThreadCount;
2646 end;
2647
2648 ListNameLabel.Caption := Board.Title;
2649 FolderImage.Picture := nil;
2650 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2651
2652 FSortIndex := GikoSys.Setting.BoardSortIndex;
2653 FSortOrder := GikoSys.Setting.BoardSortOrder;
2654 for i := ListView.Columns.Count - 1 downto 0 do begin
2655 idx := ListView.Column[ i ].Tag;
2656 if FSortIndex = Ord( GikoSys.Setting.BoardColumnOrder[ idx ] ) then
2657 ListViewSort( nil, ListView.Column[ i ] );
2658 end;
2659
2660 Result := Board.Count;
2661 finally
2662 Screen.Cursor := crDefault;
2663 ListView.Items.EndUpdate;
2664 end;
2665 end;
2666
2667 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2668 var
2669 // FileName: string;
2670 // DateTime: TDateTime;
2671 BoardCnt: Integer;
2672 BBS: TBBS;
2673 Category: TCategory;
2674 Board: TBoard;
2675 ThreadItem: TThreadItem;
2676 RepStr: string;
2677 ActivListObj : TObject;
2678 i, idx : Integer;
2679 begin
2680 ActivListObj := ActiveList;
2681 if ActivListObj is TBBS then begin
2682 //===== 鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃? =====
2683 BBS := TBBS(ActivListObj);
2684
2685 ListView.StateImages := nil;
2686
2687 if (BBS = nil) or (BBS.Count <= 0) or (Item = nil)
2688 or (Item.Index >= BBS.Count) or (ListView.Items.Count = 0)
2689 or (not (BBS.Items[Item.index] is TCategory)) then Exit;
2690 //if BBS.Count <= 0 then Exit;
2691 //if Item = nil then Exit;
2692 //if Item.Index >= BBS.Count then Exit;
2693 //if ListView.Items.Count = 0 then Exit;
2694
2695 //if not (BBS.Items[Item.index] is TCategory) then Exit;
2696 Category := TCategory(BBS.Items[Item.index]);
2697
2698 if Category = nil then Exit;
2699
2700 if ListNumberVisibleAction.Checked then
2701 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2702 else
2703 Item.Caption := Category.Title;
2704
2705 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2706 Item.Data := Category;
2707
2708 end else if ActivListObj is TCategory then begin
2709
2710 //===== 鐃緒申鐃緒申鐃?鐃? =====
2711 Category := TCategory(ActivListObj);
2712
2713 ListView.StateImages := nil;
2714
2715 if (Category = nil) or (Category.Count <= 0) or (Item = nil)
2716 or (Item.Index >= Category.Count) or (ListView.Items.Count = 0)
2717 or (not (Category.Items[Item.Index] is TBoard)) then Exit;
2718 //if Category.Count <= 0 then Exit;
2719 //if Item = nil then Exit;
2720 //if Item.Index >= Category.Count then Exit;
2721 //if ListView.Items.Count = 0 then Exit;
2722
2723 //if not (Category.Items[Item.Index] is TBoard) then Exit;
2724 Board := TBoard(Category.Items[Item.Index]);
2725
2726 if Board = nil then Exit;
2727
2728 if ListNumberVisibleAction.Checked then
2729 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2730 //Item.Caption := IntToStr(Item.Index + 1) + ': ' + Board.Title
2731 else
2732 Item.Caption := Board.Title;
2733
2734 if Item.SubItems.Count <> ListView.Columns.Count then begin
2735 Item.SubItems.Clear;
2736 Item.SubItems.Capacity := GikoSys.Setting.CategoryColumnOrder.Count;
2737 for i := GikoSys.Setting.CategoryColumnOrder.Count - 1 downto 1 do
2738 Item.SubItems.Add('');
2739 end;
2740
2741 Item.ImageIndex := ITEM_ICON_BOARD1;
2742 idx := 0;
2743 for i := 0 to ListView.Columns.Count - 1 do begin
2744 if GikoSys.Setting.CategoryColumnOrder.Count <= i then
2745 Break;
2746 // case TGikoCategoryColumnID( ListView.Column[ i ].Tag ) of
2747 case GikoSys.Setting.CategoryColumnOrder[ i ] of
2748 gccTitle:
2749 // Item.Caption 鐃緒申 SubItems 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2750 Dec( idx );
2751
2752 gccRoundName:
2753 if Board.Round then
2754 Item.SubItems[ idx ] := Board.RoundName // '鐃?鐃緒申'
2755 else
2756 Item.SubItems[ idx ] := '';
2757
2758 gccLastModified:
2759 if Board.RoundDate = ZERO_DATE then begin
2760 Item.SubItems[ idx ] := '';
2761 end else
2762 Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2763 end;
2764 Inc( idx );
2765 end;
2766
2767 Item.Data := Board;
2768
2769 end else if ActivListObj is TBoard then begin
2770
2771 //===== 鐃?鐃緒申鐃緒申鐃?鐃? =====
2772 Board := TBoard(ActivListObj);
2773
2774 if GikoSys.Setting.ListIconVisible then
2775 ListView.StateImages := StateIconImageList
2776 else
2777 ListView.StateImages := nil;
2778
2779
2780 case GikoForm.ViewType of
2781 gvtAll: BoardCnt := Board.Count;
2782 gvtLog: BoardCnt := Board.LogThreadCount;
2783 gvtNew: BoardCnt := Board.NewThreadCount;
2784 gvtUser: BoardCnt := Board.UserThreadCount;
2785 else
2786 BoardCnt := 0;
2787 end;
2788 {
2789 case GikoForm.ViewType of
2790 gvtAll: BoardCnt := Board.Count;
2791 gvtLog: BoardCnt := Board.GetLogThreadCount;
2792 gvtNew: BoardCnt := Board.GetNewThreadCount;
2793 gvtUser: BoardCnt := Board.GetUserThreadCount;
2794 else
2795 BoardCnt := 0;
2796 end;
2797 }
2798 // if Board = nil then Exit;
2799 if (BoardCnt <= 0) or (Item = nil) or (Item.Index > BoardCnt)
2800 or (ListView.Items.Count = 0) or (not (Board.Items[Item.Index] is TThreadItem)) then Exit;
2801
2802 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?/////////////////////////////////////////////////////
2803 ThreadItem := nil;
2804 case GikoForm.ViewType of
2805 gvtAll: if Item.Index >= Board.Count then Exit else
2806 ThreadItem := TThreadItem(Board.Items[Item.Index]);
2807 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2808 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2809 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2810 end;
2811 //////////////////////////////////////////////////////////////////////////
2812
2813 if ThreadItem = nil then Exit;
2814
2815 RepStr := CustomStringReplace(ThreadItem.Title, '&lt;', '<' );
2816 RepStr := CustomStringReplace(RepStr, '&gt;', '>' );
2817 RepStr := CustomStringReplace(RepStr, '&quot;', '"' );
2818 RepStr := CustomStringReplace(RepStr, '&amp;', '&' );
2819 //RepStr := StringReplace(RepStr, '鐃緒申鐃?', ',', [rfReplaceAll]);
2820 if Item.SubItems.Count <> ListView.Columns.Count then begin
2821 Item.SubItems.Clear;
2822 Item.SubItems.Capacity := GikoSys.Setting.BoardColumnOrder.Count;
2823 for i := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 1 do
2824 Item.SubItems.Add('');
2825 end;
2826
2827 if ListNumberVisibleAction.Checked then
2828 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2829 else
2830 Item.Caption := RepStr;
2831
2832 case ThreadItem.AgeSage of
2833 gasNone: Item.StateIndex := -1;
2834 gasNew: Item.StateIndex := 0;
2835 gasAge: Item.StateIndex := 1;
2836 gasSage: Item.StateIndex := 2;
2837 end;
2838
2839 if ThreadItem.IsLogFile then begin
2840 idx := 0;
2841 for i := 0 to ListView.Columns.Count - 1 do begin
2842 if GikoSys.Setting.BoardColumnOrder.Count <= i then
2843 Break;
2844 // case TGikoBoardColumnID( ListView.Column[ i ].Tag ) of
2845 case GikoSys.Setting.BoardColumnOrder[ i ] of
2846 gbcTitle:
2847 // Item.Caption 鐃緒申 SubItems 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2848 Dec( idx );
2849
2850 gbcAllCount:
2851 Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount);
2852
2853 gbcLocalCount:
2854 Item.SubItems[ idx ] := IntToStr(ThreadItem.Count);
2855
2856 gbcNonAcqCount:
2857 Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount - ThreadItem.Count);
2858
2859 gbcNewCount:
2860 if ThreadItem.NewResCount = 0 then
2861 Item.SubItems[ idx ] := ''
2862 else
2863 Item.SubItems[ idx ] := IntToStr(ThreadItem.NewResCount);
2864
2865 gbcUnReadCount:
2866 Item.SubItems[ idx ] := '';
2867
2868 gbcRoundName:
2869 if ThreadItem.Round then
2870 Item.SubItems[ idx ] := ThreadItem.RoundName
2871 else
2872 Item.SubItems[ idx ] := '';
2873
2874 gbcRoundDate://gbcLastModified:
2875 if (ThreadItem.RoundDate = ZERO_DATE) then begin
2876 Item.SubItems[ idx ] := '';
2877 end else
2878 Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2879
2880 gbcCreated:
2881 if ThreadItem.CreateDate = ZERO_DATE then begin
2882 Item.SubItems[ idx ] := '';
2883 end else
2884 Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2885
2886 gbcLastModified:
2887 if (ThreadItem.LastModified = ZERO_DATE) then begin
2888 Item.SubItems[ idx ] := '';
2889 end else
2890 Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.LastModified);
2891
2892
2893 end;
2894 Inc( idx );
2895 end;
2896
2897 if ThreadItem.NewArrival then
2898 Item.ImageIndex := ITEM_ICON_THREADNEW1
2899 else
2900 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2901
2902
2903 end else begin
2904 idx := 0;
2905 for i := 0 to GikoSys.Setting.BoardColumnOrder.Count - 1 do begin
2906 // case TGikoBoardColumnID( ListView.Column[ i ].Tag ) of
2907 case GikoSys.Setting.BoardColumnOrder[ i ] of
2908 gbcTitle:
2909 // Item.Caption 鐃緒申 SubItems 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2910 Dec( idx );
2911
2912 gbcAllCount:
2913 Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount);
2914
2915 gbcRoundDate://gbcLastModified:
2916 Item.SubItems[ idx ] := '';
2917
2918 gbcCreated:
2919 if ThreadItem.CreateDate = ZERO_DATE then begin
2920 Item.SubItems[ idx ] := '';
2921 end else
2922 Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2923
2924 gbcLastModified:
2925 Item.SubItems[ idx ] := '';
2926
2927 else
2928 Item.SubItems[ idx ] := '';
2929 end;
2930 Inc( idx );
2931 end;
2932 if ThreadItem.NewArrival then
2933 Item.ImageIndex := ITEM_ICON_THREADNEW1
2934 else
2935 Item.ImageIndex := ITEM_ICON_THREAD1;
2936 end;
2937
2938 Item.Data := ThreadItem;
2939
2940 end;
2941 end;
2942
2943 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2944 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2945 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2946 var