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.9 - (show annotations) (download) (as text)
Thu May 19 14:46:22 2005 UTC (18 years, 11 months ago) by h677
Branch: remodeling
Changes since 1.511.2.8: +11 -8 lines
File MIME type: text/x-pascal
1.511.2.8の修正だとスレをDLしてもスクロールしてしまっていたので、スクロールしないように
修正した。

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
1761 // 鐃緒申鐃緒申鐃緒申鐃緒申BBS鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1762 for i := Length(BBSs) - 1 downto 0 do begin
1763 if not BBSs[i].IsBoardFileRead then
1764 GikoSys.ReadBoardFile(BBSs[i]);
1765
1766 if SplashWindow <> nil then begin
1767 SplashWindow.ProgressBar.StepBy(20);
1768 Application.ProcessMessages;
1769 end;
1770 end;
1771
1772 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1773 RoundList := TRoundList.Create;
1774 RoundList.LoadRoundBoardFile;
1775 RoundList.LoadRoundThreadFile;
1776
1777 //if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
1778 // GikoSys.ListBoardFile;
1779
1780 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?
1781 for i := 1 to ParamCount do begin
1782 MoveToURL(ParamStr(i));
1783 end;
1784 // SetStdToolBar;
1785 // SetLinkBar;
1786
1787 s := GikoSys.FAbon.NGwordname;
1788 StatusBar.Panels[2].Text := s;
1789 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1790 StatusBarResize(Sender);
1791
1792 dummy1.Caption := ItemReservPMenu.Caption;
1793 dummy1.Hint := ItemReservPMenu.Hint;
1794
1795 //Samba24鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?
1796 GikoSys.SambaFileExists();
1797
1798 {$IFDEF SPAM_FILTER_ENABLED}
1799 // 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1800 GikoSys.Bayesian.LoadFromFile( GikoSys.Setting.GetSpamFilterFileName );
1801 {$ENDIF}
1802
1803 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1804 MouseGesture := TMouseGesture.Create;
1805 GikoSys.Setting.Gestures.LoadGesture(
1806 GikoSys.Setting.GetGestureFileName, ActionList );
1807 MouseGesture.Margin := GikoSys.Setting.Gestures.Margin;
1808 MouseGesture.OnGestureStart := OnGestureStart;
1809 MouseGesture.OnGestureMove := OnGestureMove;
1810 MouseGesture.OnGestureEnd := OnGestureEnd;
1811 if GikoSys.Setting.GestureEnabled then
1812 MouseGesture.SetHook( Handle );
1813
1814 //2ch鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1815 GikoSys.Setting.SetMessages;
1816 {
1817 //2ch鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1818 if GikoSys.Setting.GengoSupport then begin
1819 if GikoSys.Setting.Gengo = nil then
1820 GikoSys.Setting.Gengo := TStringList.Create;
1821 if FileExists(GikoSys.GetConfigDir + 'language.ini') then
1822 GikoSys.Setting.Gengo.LoadFromFile(GikoSys.GetConfigDir + 'language.ini')
1823 else
1824 GikoSys.Setting.GengoSupport := false;
1825 end;
1826 }
1827 //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1828 if GikoSys.Setting.AutoLogin then
1829 LoginAction.Execute;
1830
1831 MuteAction.Checked := GikoSys.Setting.Mute;
1832
1833 GikoSys.Setting.BeLogin := GikoSys.Setting.BeAutoLogin;
1834 // LockWindowUpdate(0);
1835 end;
1836
1837 // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1838 procedure TGikoForm.SaveCoolBarSettings;
1839 begin
1840
1841 if IsIconic( Handle ) or (FIsIgnoreResize <> rtNone) then
1842 Exit;
1843 SaveMainCoolBarSettings;
1844 SaveBoardCoolBarSettings;
1845 SaveBrowserCoolBarSettings;
1846
1847 end;
1848 procedure TGikoForm.SaveMainCoolBarSettings;
1849 var
1850 i : Integer;
1851 CoolSet : TCoolSet;
1852 begin
1853 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1854 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1855 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1856 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1857 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1858 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1859 end;
1860 end;
1861 procedure TGikoForm.SaveBoardCoolBarSettings;
1862 var
1863 i : Integer;
1864 CoolSet : TCoolSet;
1865 begin
1866 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1867 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1868 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1869 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1870 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1871 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1872 end;
1873 end;
1874 procedure TGikoForm.SaveBrowserCoolBarSettings;
1875 var
1876 i : Integer;
1877 CoolSet : TCoolSet;
1878 begin
1879 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1880 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1881 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1882 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1883 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1884 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1885 end;
1886 end;
1887 // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1888 procedure TGikoForm.LoadCoolBarSettings;
1889 var
1890 i : Integer;
1891 CoolSet : TCoolSet;
1892 begin
1893
1894 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1895 MainCoolBar.Bands.BeginUpdate;
1896 try
1897 // for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1898 for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin
1899 CoolSet := GikoSys.Setting.MainCoolSet[i];
1900 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1901 FIsIgnoreResize := rtNone;
1902 SaveCoolBarSettings;
1903 Exit;
1904 end;
1905 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1906 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1907 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1908 end;
1909 finally
1910 MainCoolBar.Bands.EndUpdate;
1911 end;
1912
1913 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1914 ListCoolBar.Bands.BeginUpdate;
1915 try
1916 // for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1917 for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin
1918 CoolSet := GikoSys.Setting.ListCoolSet[i];
1919 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1920 FIsIgnoreResize := rtNone;
1921 SaveCoolBarSettings;
1922 Exit;
1923 end;
1924 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1925 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1926 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1927 end;
1928 finally
1929 ListCoolBar.Bands.EndUpdate;
1930 end;
1931
1932 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1933 BrowserCoolBar.Bands.BeginUpdate;
1934 try
1935 // for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1936 for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
1937 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1938 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1939 FIsIgnoreResize := rtNone;
1940 SaveCoolBarSettings;
1941 Exit;
1942 end;
1943 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1944 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1945 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1946 end;
1947 finally
1948 BrowserCoolBar.Bands.EndUpdate;
1949 end;
1950
1951 end;
1952
1953 //
1954 //
1955 //
1956 procedure TGikoForm.FormShow(Sender: TObject);
1957 begin
1958 if FStartUp then begin
1959 ShowWindow(Application.Handle, SW_HIDE);
1960
1961 //FormCreate鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1962 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1963 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1964 StdToolBarVisibleActionExecute( nil );
1965 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1966 AddressBarVisibleActionExecute( nil );
1967 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1968 LinkBarVisibleActionExecute( nil );
1969 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1970 ListToolBarVisibleActionExecute( nil );
1971 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1972 ListNameBarVisibleActionExecute( nil );
1973 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1974 BrowserToolBarVisibleActionExecute( nil );
1975 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1976 BrowserNameBarVisibleActionExecute( nil );
1977
1978 //鐃?鐃緒申鐃?鐃?鐃?鐃?
1979 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1980 BrowserTabVisibleActionExecute(nil);
1981
1982 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1983 BrowserTabTopAction.Checked := True;
1984 BrowserTabTopActionExecute(nil);
1985 end else begin
1986 BrowserTabBottomAction.Checked := True;
1987 BrowserTabBottomActionExecute(nil);
1988 end;
1989
1990 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1991 BrowserTabTabStyleAction.Checked := True;
1992 BrowserTabTabStyleActionExecute(nil);
1993 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1994 BrowserTabButtonStyleAction.Checked := True;
1995 BrowserTabButtonStyleActionExecute(nil);
1996 end else begin
1997 BrowserTabFlatStyleAction.Checked := True;
1998 BrowserTabFlatStyleActionExecute(nil);
1999 end;
2000
2001 // ListView 鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?
2002 // ListView.FullDrag := True;
2003
2004 // CoolBar 鐃緒申鐃緒申
2005 LoadCoolBarSettings;
2006
2007 FIsIgnoreResize := rtNone;
2008
2009 //TabAutoLoad
2010 //FormCrete鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2011 if GikoSys.Setting.TabAutoLoadSave then begin
2012 TabAutoLoadAction.Execute;
2013 end;
2014 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
2015 if GikoSys.Setting.GengoSupport then begin
2016 //鐃?鐃緒申鐃?
2017 //Test鐃緒申鐃緒申
2018 end;
2019 FStartUp := false;
2020 end;
2021 end;
2022
2023 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
2024 begin
2025 // if GikoForm.WindowState <> wsMinimized then
2026 // SaveCoolBarSettings;
2027 if ( GikoSys.Setting.ShowDialogForEnd ) and
2028 (MessageDlg('鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
2029 CanClose := false;
2030 Exit;
2031 end else begin
2032 CanClose := True;
2033 if GikoSys.Setting.TabAutoLoadSave then begin
2034 TabAutoSaveAction.Execute;
2035 end;
2036 end;
2037 { //2ch鐃緒申鐃緒申鐃緒申鐃緒申Free
2038 if GikoSys.Setting.Gengo <> nil then begin
2039 GikoSys.Setting.Gengo.Free;
2040 end;
2041 }
2042 //Application.HookMainWindow(Hook);
2043 Application.UnhookMainWindow(Hook);
2044 Application.Terminate;
2045 end;
2046
2047 procedure TGikoForm.FormDestroy(Sender: TObject);
2048 var
2049 i : Integer;
2050 // CoolSet: TCoolSet;
2051 wp : TWindowPlacement;
2052 tmpBool : Boolean;
2053 begin
2054 // Application.OnDeactivate := nil;
2055 // Self.OnDeactivate := nil;
2056 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
2057 try
2058 MouseGesture.UnHook;
2059 except
2060 end;
2061 try
2062 ActiveListColumnSave;
2063 except
2064 end;
2065 try
2066 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
2067 wp.length := sizeof(wp);
2068 GetWindowPlacement(Handle, @wp);
2069 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
2070 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
2071 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
2072 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
2073 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
2074
2075 GikoSys.Setting.ListStyle := ListView.ViewStyle;
2076 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
2077 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
2078 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
2079 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
2080 if ArrangeAction.Checked then
2081 GikoSys.Setting.ListOrientation := gloVertical
2082 else
2083 GikoSys.Setting.ListOrientation := gloHorizontal;
2084 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
2085 except
2086 end;
2087
2088 try
2089 // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
2090 if not GikoSys.Setting.ResRangeHold then
2091 GikoSys.Setting.ResRange := FResRangeMenuSelect;
2092 except
2093 end;
2094 if WindowState <> wsNormal then
2095 WindowState := wsNormal;
2096 SaveCoolBarSettings;
2097 try
2098 GikoSys.Setting.WriteWindowSettingFile;
2099 GikoSys.Setting.WriteNameMailSettingFile;
2100 except
2101 end;
2102 // 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申 CoolBar 鐃緒申鐃緒申
2103 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2104
2105 // 鐃緒申FormDestroy鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?2004/04/09鐃?
2106 // CoolBar 鐃緒申鐃緒申
2107 //if (GikoForm.WindowState <> wsMinimized) and (GikoForm.WindowState <> wsMaximized) then
2108
2109
2110 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2111 try
2112 //FavoriteDM鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
2113 FavoriteDM.WriteFavorite;
2114 FavoriteDM.Clear;
2115 except
2116 end;
2117 LockWindowUpdate(Self.Handle);
2118 try
2119 //鐃?鐃?鐃?鐃緒申鐃?鐃?
2120 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
2121 GikoSys.Setting.ShowDialogForAllTabClose := false;
2122 AllTabCloseAction.Execute;
2123 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
2124 except
2125 end;
2126 try
2127 for i := FBrowsers.Count - 1 downto 0 do begin
2128 TWebBrowser(FBrowsers[i]).Free;
2129 end;
2130 FBrowsers.Clear;
2131 FBrowsers.Capacity := 0;
2132 finally
2133 FBrowsers.Free;
2134 end;
2135 try
2136 if BrowserNullTab <> nil then begin
2137 BrowserNullTab.Browser := nil; {*BrowserNullTab鐃緒申Browser鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?
2138 *鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申Free鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2139 *}
2140 BrowserNullTab.Free;
2141 end;
2142 except
2143 end;
2144
2145 try
2146 TreeView.Items.BeginUpdate;
2147 TreeView.Items.GetFirstNode.Free;
2148 TreeView.Items.Clear;
2149 TreeView.Items.EndUpdate;
2150 except
2151 end;
2152
2153 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
2154 try
2155 //AddressHistoryDM鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2156 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
2157 except
2158 end;
2159
2160 //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
2161 try
2162 SaveHistory;
2163 except
2164 end;
2165 try
2166 try
2167 ClearHistory;
2168 except
2169 end;
2170 finally
2171 FHistoryList.Free;
2172 end;
2173
2174 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申&鐃?鐃緒申
2175 try
2176 RoundList.SaveRoundFile;
2177 except
2178 end;
2179 try
2180 try
2181 RoundList.Clear;
2182 except
2183 end;
2184 finally
2185 RoundList.Free;
2186 end;
2187
2188 try
2189 try
2190 FControlThread.Terminate;
2191 FControlThread.WaitFor;
2192 except
2193 end;
2194 finally
2195 FControlThread.Free;
2196 end;
2197
2198 // TBBS 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 TCategory, TBoard, TThreadItem 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2199 // TBoard, TThreadItem 鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
2200 // BoardPluteIns 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2201 for i := Length(BoardGroups) - 1 downto 0 do begin
2202 BoardGroups[i].Clear;
2203 end;
2204
2205 try
2206 for i := Length( BBSs ) - 1 downto 0 do begin
2207 if BBSs[ i ] <> nil then
2208 BBSs[ i ].Free;
2209 BBSs[ i ] := nil;
2210 end;
2211 except
2212 end;
2213
2214
2215 try
2216 for i := Length( BoardPlugIns ) - 1 downto 0 do begin
2217 if BoardPlugIns[ i ] <> nil then
2218 BoardPlugIns[ i ].Free;
2219 BoardPlugIns[ i ] := nil;
2220 end;
2221 except
2222 end;
2223
2224 try
2225 if FEvent <> nil then
2226 FEvent.Free;
2227
2228 //Hint鐃?鐃緒申
2229 if FHint <> nil then begin
2230 FHint.ReleaseHandle;
2231 FHint.Free;
2232 FHint := nil;
2233 end;
2234 //Preview鐃?鐃緒申
2235 if TPreviewBrowser <> nil then begin
2236 FPreviewBrowser.Free;
2237 FPreviewBrowser := nil;
2238 end;
2239 except
2240 end;
2241 LockWindowUpdate(0);
2242 end;
2243
2244 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
2245 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
2246 begin
2247 CabinetVisibleAction.Execute;
2248 // CabinetPanelVisible(false);
2249 end;
2250
2251 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃? BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
2252 procedure TGikoForm.SetBBSMenu;
2253 var
2254 i : Integer;
2255 item : TBBSMenuItem;
2256 begin
2257
2258 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2259 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
2260 try
2261 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
2262 CabinetSelectPopupMenu.Items[ i ].Free;
2263 CabinetMenu.Items[ i ].Free;
2264 BBSSelectPopupMenu.Items[ i ].Free;
2265 end;
2266 except
2267 end;
2268 end;
2269
2270 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2271 for i := Length( BBSs ) - 1 downto 0 do begin
2272 try
2273 item := TBBSMenuItem.Create( PopupMenu );
2274 item.Caption := BBSs[ i ].Title;
2275 item.Data := BBSs[ i ];
2276 item.OnClick := BBSMenuItemOnClick;
2277 CabinetSelectPopupMenu.Items.Insert( 0, item );
2278 item := TBBSMenuItem.Create( PopupMenu );
2279 item.Caption := BBSs[ i ].Title;
2280 item.Data := BBSs[ i ];
2281 item.OnClick := BBSMenuItemOnClick;
2282 CabinetMenu.Insert( 0, item );
2283 item := TBBSMenuItem.Create( PopupMenu );
2284 item.Caption := BBSs[ i ].Title;
2285 item.Data := BBSs[ i ];
2286 item.OnClick := BBSMenuItemOnClick;
2287 BBSSelectPopupMenu.Items.Insert( 0, Item );
2288 except
2289 end;
2290 end;
2291
2292 end;
2293
2294 procedure TGikoForm.ReloadBBS;
2295 var
2296 i : Integer;
2297 tmpBool: Boolean;
2298 begin
2299 //鐃?鐃?鐃?鐃緒申鐃?鐃?
2300 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
2301 GikoSys.Setting.ShowDialogForAllTabClose := false;
2302 AllTabCloseAction.Execute;
2303 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
2304
2305 SetContent(BrowserNullTab);
2306 //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
2307 TreeView.Items.Clear;
2308
2309 //BBS鐃?鐃緒申
2310 try
2311 for i := Length( BBSs ) - 1 downto 0 do begin
2312 if BBSs[ i ] <> nil then
2313 BBSs[ i ].Free;
2314 BBSs[ i ] := nil;
2315 end;
2316 except
2317 end;
2318
2319 ActiveList := nil;
2320
2321 FTreeType := gttNone;
2322 //GikoSys.FBoardURLList.Clear;
2323 for i := Length(BoardGroups) - 1 downto 0 do begin
2324 BoardGroups[i].Clear;
2325 end;
2326 GikoSys.ListBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
2327
2328 // BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?
2329 SetBBSMenu;
2330
2331 ShowBBSTree( BBSs[ 0 ] );
2332
2333 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2334 SaveHistory;
2335 ClearHistory;
2336 LoadHistory;
2337
2338 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2339 FavoriteDM.WriteFavorite;
2340 FavoriteDM.Clear;
2341 FavoriteDM.ReadFavorite;
2342
2343 SetLinkBar;
2344
2345 // 鐃緒申鐃緒申鐃緒申鐃緒申BBS鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2346 for i := Length(BBSs) - 1 downto 0 do begin
2347 if not BBSs[i].IsBoardFileRead then
2348 GikoSys.ReadBoardFile(BBSs[i]);
2349 end;
2350
2351 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申&鐃?鐃緒申
2352 try
2353 RoundList.SaveRoundFile;
2354 except
2355 end;
2356 try
2357 RoundList.Clear;
2358 except
2359 end;
2360 RoundList.LoadRoundBoardFile;
2361 RoundList.LoadRoundThreadFile;
2362
2363 //
2364 TabsOpenAction.Execute;
2365 end;
2366
2367 //鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
2368 procedure TGikoForm.SetBoardTreeNode(
2369 inBBS : TBBS
2370 );
2371 var
2372 i, j, k: integer;
2373 Root: TTreeNode;
2374 CategoryNode: TTreeNode;
2375 BoardNode: TTreeNode;
2376 Category: TCategory;
2377 Board: TBoard;
2378 begin
2379 // 鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
2380 FActiveBBS := inBBS;
2381 TreeView.Items.BeginUpdate;
2382 TreeView.Items.Clear;
2383 try
2384 if not inBBS.IsBoardFileRead then
2385 GikoSys.ReadBoardFile( inBBS );
2386 try
2387 if SplashWindow <> nil then
2388 //SplashWindow.ProgressBar.Max := inBBS.Count;
2389 SplashWindow.ProgressBar.Max := inBBS.Count + Length(BBSs) * 20;
2390 except
2391 end;
2392
2393 // 鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?
2394 if ( GikoSys.Setting.BBSSortIndex <> 0 ) or ( GikoSys.Setting.BBSSortOrder <> true ) then begin
2395 Sort.SortOrder := true;
2396 Sort.SortIndex := 0;
2397 Sort.SortNoFlag := true;
2398 inBBS.Sort(CategorySortProc);
2399 end;
2400
2401 Root := TreeView.Items.Add( nil, inBBS.Title );
2402 Root.ImageIndex := ITEM_ICON_2CH1;
2403 Root.SelectedIndex := ITEM_ICON_2CH2;
2404 Root.Data := inBBS;
2405 for i := inBBS.Count - 1 downto 0 do begin
2406 Category := TCategory(inBBS.Items[i]);
2407 CategoryNode := TreeView.Items.AddChildFirst(Root, Category.Title);
2408 CategoryNode.Data := Category;
2409 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
2410 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
2411
2412 // 鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?
2413 if ( GikoSys.Setting.CategorySortIndex <> 0 ) or ( GikoSys.Setting.CategorySortOrder <> true ) then begin
2414 Sort.SortOrder := true;
2415 Sort.SortIndex := 0;
2416 Sort.SortNoFlag := true;
2417 Category.CustomSort(BoardSortProc);
2418 end;
2419
2420 for j := Category.Count - 1 downto 0 do begin
2421 Board := TBoard(Category.Items[j]);
2422 Board.BeginUpdate;
2423 BoardNode := TreeView.Items.AddChildFirst(CategoryNode, Board.Title);
2424 BoardNode.Data := Board;
2425 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
2426 if not Board.IsLogFile then begin
2427 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
2428 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
2429 end else begin
2430 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
2431 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
2432 for k := 0 to Board.Count - 1 do begin
2433 if Board.Items[ k ].IsLogFile then begin
2434 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
2435 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
2436
2437 Break;
2438 end;
2439 end;
2440 end;
2441 Board.EndUpdate;
2442 end;
2443
2444 CategoryNode.Expanded := Category.NodeExpand;
2445
2446 if SplashWindow <> nil then begin
2447 SplashWindow.ProgressBar.StepIt;
2448 Application.ProcessMessages;
2449 end;
2450 end;
2451 finally
2452 TreeView.Items.EndUpdate;
2453 end;
2454 end;
2455
2456 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
2457 var
2458 TitleColumn : TListColumn;
2459 ListColumn : TListColumn;
2460 i, id, idx : Integer;
2461 begin
2462 ListView.Items.BeginUpdate;
2463 try
2464 Screen.Cursor := crHourGlass;
2465
2466 ListView.Columns.Clear;
2467 TitleColumn := ListView.Columns.Add;
2468 TitleColumn.Caption := GikoBBSColumnCaption[ Ord( gbbscTitle ) ];
2469 TitleColumn.Width := GikoSys.Setting.BBSColumnWidth[ Ord( gbbscTitle ) ];
2470 idx := 0;
2471 for i := 0 to GikoSys.Setting.BBSColumnOrder.Count - 1 do begin
2472 if GikoSys.Setting.BBSColumnOrder[ i ] = gbbscTitle then begin
2473 TitleColumn.Tag := i;
2474 idx := i;
2475 end else begin
2476 id := Ord( GikoSys.Setting.BBSColumnOrder[ i ] );
2477 if (Integer( Low( TGikoBBSColumnID ) ) <= id) and
2478 (id <= Integer( High( TGikoBBSColumnID ) )) then begin
2479 ListColumn := ListView.Columns.Add;
2480 // ListColumn.Tag := id;
2481 ListColumn.Tag := i;
2482 ListColumn.Caption := GikoBBSColumnCaption[ id ];
2483 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[ id ];
2484 end;
2485 end;
2486 end;
2487 TitleColumn.Index := idx;
2488
2489 ListView.Items.Count := 0;
2490 ListView.Items.Clear;
2491 ListView.Items.Count := ABBS2ch.Count;
2492
2493 // UpFolderAction.Enabled := False;
2494 // AllItemAction.Enabled := False;
2495 // LogItemAction.Enabled := False;
2496 // NewItemAction.Enabled := False;
2497 // SelectItemAction.Enabled := False;
2498 // ListDownloadToolButton.Enabled := False;
2499 // BoardReservToolButton.Enabled := False;
2500 // ListThreadDownloadToolButton.Enabled := False;
2501
2502 ListNameLabel.Caption := ABBS2ch.Title;
2503 FolderImage.Picture := nil;
2504 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
2505
2506 FSortIndex := GikoSys.Setting.BBSSortIndex;
2507 FSortOrder := GikoSys.Setting.BBSSortOrder;
2508 for i := ListView.Columns.Count - 1 downto 0 do begin
2509 idx := ListView.Column[ i ].Tag;
2510 if FSortIndex = Ord( GikoSys.Setting.BBSColumnOrder[ idx ] ) then
2511 ListViewSort( nil, ListView.Column[ i ] );
2512 end;
2513
2514 Result := ABBS2ch.Count;
2515 finally
2516 Screen.Cursor := crDefault;
2517 ListView.Items.EndUpdate;
2518 end;
2519 end;
2520
2521 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
2522 var
2523 TitleColumn : TListColumn;
2524 ListColumn : TListColumn;
2525 i, id, idx : Integer;
2526 begin
2527 ListView.Items.BeginUpdate;
2528 try
2529 Screen.Cursor := crHourGlass;
2530
2531 ListView.Columns.Clear;
2532 TitleColumn := ListView.Columns.Add;
2533 TitleColumn.Caption := GikoCategoryColumnCaption[ Ord( gccTitle ) ];
2534 TitleColumn.Width := GikoSys.Setting.CategoryColumnWidth[ Ord( gccTitle ) ];
2535 idx := 0;
2536 for i := 0 to GikoSys.Setting.CategoryColumnOrder.Count - 1 do begin
2537 if GikoSys.Setting.CategoryColumnOrder[ i ] = gccTitle then begin
2538 TitleColumn.Tag := i;
2539 idx := i;
2540 end else begin
2541 id := Ord( GikoSys.Setting.CategoryColumnOrder[ i ] );
2542 if (Integer( Low( TGikoCategoryColumnID ) ) <= id) and
2543 (id <= Integer( High( TGikoCategoryColumnID ) )) then begin
2544 ListColumn := ListView.Columns.Add;
2545 // ListColumn.Tag := id;
2546 ListColumn.Tag := i;
2547 ListColumn.Caption := GikoCategoryColumnCaption[ id ];
2548 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[ id ];
2549 end;
2550 end;
2551 end;
2552 TitleColumn.Index := idx;
2553
2554 ListView.Items.Count := 0;
2555 ListView.Items.Clear;
2556 ListView.Items.Count := Category.Count;
2557
2558 for i := Category.Count - 1 downto 0 do begin
2559 if( Category.Items[i].ParentCategory <> Category ) then begin
2560 Category.Items[i].ParentCategory := Category;
2561 Category.Items[i].No := i + 1;
2562 end;
2563 end;
2564 // UpFolderAction.Enabled := True;
2565 // AllItemAction.Enabled := False;
2566 // LogItemAction.Enabled := False;
2567 // NewItemAction.Enabled := False;
2568 // SelectItemAction.Enabled := False;
2569 // ListDownloadToolButton.Enabled := False;
2570 // BoardReservToolButton.Enabled := False;
2571 // ListThreadDownloadToolButton.Enabled := False;
2572
2573 ListNameLabel.Caption := Category.Title;
2574 FolderImage.Picture := nil;
2575 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2576
2577 FSortIndex := GikoSys.Setting.CategorySortIndex;
2578 FSortOrder := GikoSys.Setting.CategorySortOrder;
2579 for i := ListView.Columns.Count - 1 downto 0 do begin
2580 idx := ListView.Column[ i ].Tag;
2581 if FSortIndex = Ord( GikoSys.Setting.CategoryColumnOrder[ idx ] ) then
2582 ListViewSort( nil, ListView.Column[ i ] );
2583 end;
2584
2585 Result := Category.Count;
2586 finally
2587 Screen.Cursor := crDefault;
2588 ListView.Items.EndUpdate;
2589 end;
2590 end;
2591
2592 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2593 var
2594 TitleColumn : TListColumn;
2595 ListColumn : TListColumn;
2596 i, id, idx : Integer;
2597 begin
2598 ListView.Items.BeginUpdate;
2599 try
2600 Screen.Cursor := crHourGlass;
2601
2602 {*
2603 // 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2604 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2605 if ListView.Columns.Count <> GikoSys.Setting.BoardColumnOrder.Count then
2606 *}
2607 begin
2608 ListView.Columns.Clear;
2609 TitleColumn := ListView.Columns.Add;
2610 TitleColumn.Caption := GikoBoardColumnCaption[ Ord( gbcTitle ) ];
2611 TitleColumn.Width := GikoSys.Setting.BoardColumnWidth[ Ord( gbcTitle ) ];
2612 idx := 0;
2613 for i := 0 to GikoSys.Setting.BoardColumnOrder.Count - 1 do begin
2614 if GikoSys.Setting.BoardColumnOrder[ i ] = gbcTitle then begin
2615 TitleColumn.Tag := i;
2616 idx := i;
2617 end else begin
2618 id := Ord( GikoSys.Setting.BoardColumnOrder[ i ] );
2619 if (Integer( Low( TGikoBoardColumnID ) ) <= id) and
2620 (id <= Integer( High( TGikoBoardColumnID ) )) then begin
2621 ListColumn := ListView.Columns.Add;
2622 ListColumn.Caption := GikoBoardColumnCaption[ id ];
2623 // ListColumn.Tag := id;
2624 ListColumn.Tag := i;
2625 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[ id ];
2626 ListColumn.Alignment := GikoBoardColumnAlignment[ id ];
2627 end;
2628 end;
2629 end;
2630 TitleColumn.Index := idx;
2631 end;
2632
2633 ListView.Items.Count := 0;
2634 ListView.Items.Clear;
2635
2636 {case GikoForm.ViewType of
2637 gvtAll: ListView.Items.Count := Board.Count;
2638 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2639 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2640 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2641 end;
2642 }
2643
2644 Board.LogThreadCount := Board.GetLogThreadCount;
2645 Board.NewThreadCount := Board.GetNewThreadCount;
2646 Board.UserThreadCount:= Board.GetUserThreadCount;
2647
2648 case GikoForm.ViewType of
2649 gvtAll: ListView.Items.Count := Board.Count;
2650 gvtLog: ListView.Items.Count := Board.LogThreadCount;
2651 gvtNew: ListView.Items.Count := Board.NewThreadCount;
2652 gvtUser: ListView.Items.Count := Board.UserThreadCount;
2653 end;
2654
2655 ListNameLabel.Caption := Board.Title;
2656 FolderImage.Picture := nil;
2657 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2658
2659 FSortIndex := GikoSys.Setting.BoardSortIndex;
2660 FSortOrder := GikoSys.Setting.BoardSortOrder;
2661 for i := ListView.Columns.Count - 1 downto 0 do begin
2662 idx := ListView.Column[ i ].Tag;
2663 if FSortIndex = Ord( GikoSys.Setting.BoardColumnOrder[ idx ] ) then
2664 ListViewSort( nil, ListView.Column[ i ] );
2665 end;
2666
2667 Result := Board.Count;
2668 finally
2669 Screen.Cursor := crDefault;
2670 ListView.Items.EndUpdate;
2671 end;
2672 end;
2673
2674 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2675 var
2676 // FileName: string;
2677 // DateTime: TDateTime;
2678 BoardCnt: Integer;
2679 BBS: TBBS;
2680 Category: TCategory;
2681 Board: TBoard;
2682 ThreadItem: TThreadItem;
2683 RepStr: string;
2684 ActivListObj : TObject;
2685 i, idx : Integer;
2686 begin
2687 ActivListObj := ActiveList;
2688 if ActivListObj is TBBS then begin
2689 //===== 鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃? =====
2690 BBS := TBBS(ActivListObj);
2691
2692 ListView.StateImages := nil;
2693
2694 if (BBS = nil) or (BBS.Count <= 0) or (Item = nil)
2695 or (Item.Index >= BBS.Count) or (ListView.Items.Count = 0)
2696 or (not (BBS.Items[Item.index] is TCategory)) then Exit;
2697 //if BBS.Count <= 0 then Exit;
2698 //if Item = nil then Exit;
2699 //if Item.Index >= BBS.Count then Exit;
2700 //if ListView.Items.Count = 0 then Exit;
2701
2702 //if not (BBS.Items[Item.index] is TCategory) then Exit;
2703 Category := TCategory(BBS.Items[Item.index]);
2704
2705 if Category = nil then Exit;
2706
2707 if ListNumberVisibleAction.Checked then
2708 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2709 else
2710 Item.Caption := Category.Title;
2711
2712 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2713 Item.Data := Category;
2714
2715 end else if ActivListObj is TCategory then begin
2716
2717 //===== 鐃緒申鐃緒申鐃?鐃? =====
2718 Category := TCategory(ActivListObj);
2719
2720 ListView.StateImages := nil;
2721
2722 if (Category = nil) or (Category.Count <= 0) or (Item = nil)
2723 or (Item.Index >= Category.Count) or (ListView.Items.Count = 0)
2724 or (not (Category.Items[Item.Index] is TBoard)) then Exit;
2725 //if Category.Count <= 0 then Exit;
2726 //if Item = nil then Exit;
2727 //if Item.Index >= Category.Count then Exit;
2728 //if ListView.Items.Count = 0 then Exit;
2729
2730 //if not (Category.Items[Item.Index] is TBoard) then Exit;
2731 Board := TBoard(Category.Items[Item.Index]);
2732
2733 if Board = nil then Exit;
2734
2735 if ListNumberVisibleAction.Checked then
2736 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2737 //Item.Caption := IntToStr(Item.Index + 1) + ': ' + Board.Title
2738 else
2739 Item.Caption := Board.Title;
2740
2741 if Item.SubItems.Count <> ListView.Columns.Count then begin
2742 Item.SubItems.Clear;
2743 Item.SubItems.Capacity := GikoSys.Setting.CategoryColumnOrder.Count;
2744 for i := GikoSys.Setting.CategoryColumnOrder.Count - 1 downto 1 do
2745 Item.SubItems.Add('');
2746 end;
2747
2748 Item.ImageIndex := ITEM_ICON_BOARD1;
2749 idx := 0;
2750 for i := 0 to ListView.Columns.Count - 1 do begin
2751 if GikoSys.Setting.CategoryColumnOrder.Count <= i then
2752 Break;
2753 // case TGikoCategoryColumnID( ListView.Column[ i ].Tag ) of
2754 case GikoSys.Setting.CategoryColumnOrder[ i ] of
2755 gccTitle:
2756 // Item.Caption 鐃緒申 SubItems 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2757 Dec( idx );
2758
2759 gccRoundName:
2760 if Board.Round then
2761 Item.SubItems[ idx ] := Board.RoundName // '鐃?鐃緒申'
2762 else
2763 Item.SubItems[ idx ] := '';
2764
2765 gccLastModified:
2766 if Board.RoundDate = ZERO_DATE then begin
2767 Item.SubItems[ idx ] := '';
2768 end else
2769 Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2770 end;
2771 Inc( idx );
2772 end;
2773
2774 Item.Data := Board;
2775
2776 end else if ActivListObj is TBoard then begin
2777
2778 //===== 鐃?鐃緒申鐃緒申鐃?鐃? =====
2779 Board := TBoard(ActivListObj);
2780
2781 if GikoSys.Setting.ListIconVisible then
2782 ListView.StateImages := StateIconImageList
2783 else
2784 ListView.StateImages := nil;
2785
2786
2787 case GikoForm.ViewType of
2788 gvtAll: BoardCnt := Board.Count;
2789 gvtLog: BoardCnt := Board.LogThreadCount;
2790 gvtNew: BoardCnt := Board.NewThreadCount;
2791 gvtUser: BoardCnt := Board.UserThreadCount;
2792 else
2793 BoardCnt := 0;
2794 end;
2795 {
2796 case GikoForm.ViewType of
2797 gvtAll: BoardCnt := Board.Count;
2798 gvtLog: BoardCnt := Board.GetLogThreadCount;
2799 gvtNew: BoardCnt := Board.GetNewThreadCount;
2800 gvtUser: BoardCnt := Board.GetUserThreadCount;
2801 else
2802 BoardCnt := 0;
2803 end;
2804 }
2805 // if Board = nil then Exit;
2806 if (BoardCnt <= 0) or (Item = nil) or (Item.Index > BoardCnt)
2807 or (ListView.Items.Count = 0) or (not (Board.Items[Item.Index] is TThreadItem)) then Exit;
2808
2809 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?/////////////////////////////////////////////////////
2810 ThreadItem := nil;
2811 case GikoForm.ViewType of
2812 gvtAll: if Item.Index >= Board.Count then Exit else
2813 ThreadItem := TThreadItem(Board.Items[Item.Index]);
2814 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2815 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2816 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2817 end;
2818 //////////////////////////////////////////////////////////////////////////
2819
2820 if ThreadItem = nil then Exit;
2821
2822 RepStr := CustomStringReplace(ThreadItem.Title, '&lt;', '<' );
2823 RepStr := CustomStringReplace(RepStr, '&gt;', '>' );
2824 RepStr := CustomStringReplace(RepStr, '&quot;', '"' );
2825 RepStr := CustomStringReplace(RepStr, '&amp;', '&' );
2826 //RepStr := StringReplace(RepStr, '鐃緒申鐃?', ',', [rfReplaceAll]);
2827 if Item.SubItems.Count <> ListView.Columns.Count then begin
2828 Item.SubItems.Clear;
2829 Item.SubItems.Capacity := GikoSys.Setting.BoardColumnOrder.Count;
2830 for i := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 1 do
2831 Item.SubItems.Add('');
2832 end;
2833
2834 if ListNumberVisibleAction.Checked then
2835 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2836 else
2837 Item.Caption := RepStr;
2838
2839 case ThreadItem.AgeSage of
2840 gasNone: Item.StateIndex := -1;
2841 gasNew: Item.StateIndex := 0;
2842 gasAge: Item.StateIndex := 1;
2843 gasSage: Item.StateIndex := 2;
2844 end;
2845
2846 if ThreadItem.IsLogFile then begin
2847 idx := 0;
2848 for i := 0 to ListView.Columns.Count - 1 do begin
2849 if GikoSys.Setting.BoardColumnOrder.Count <= i then
2850 Break;
2851 // case TGikoBoardColumnID( ListView.Column[ i ].Tag ) of
2852 case GikoSys.Setting.BoardColumnOrder[ i ] of
2853 gbcTitle:
2854 // Item.Caption 鐃緒申 SubItems 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2855 Dec( idx );
2856
2857 gbcAllCount:
2858 Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount);
2859
2860 gbcLocalCount:
2861 Item.SubItems[ idx ] := IntToStr(ThreadItem.Count);
2862
2863 gbcNonAcqCount:
2864 Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount - ThreadItem.Count);
2865
2866 gbcNewCount:
2867 if ThreadItem.NewResCount = 0 then
2868 Item.SubItems[ idx ] := ''
2869 else
2870 Item.SubItems[ idx ] := IntToStr(ThreadItem.NewResCount);
2871
2872 gbcUnReadCount:
2873 Item.SubItems[ idx ] := '';
2874
2875 gbcRoundName:
2876 if ThreadItem.Round then
2877 Item.SubItems[ idx ] := ThreadItem.RoundName
2878 else
2879 Item.SubItems[ idx ] := '';
2880
2881 gbcRoundDate://gbcLastModified:
2882 if (ThreadItem.RoundDate = ZERO_DATE) then begin
2883 Item.SubItems[ idx ] := '';
2884 end else
2885 Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2886
2887 gbcCreated:
2888 if ThreadItem.CreateDate = ZERO_DATE then begin
2889 Item.SubItems[ idx ] := '';
2890 end else
2891 Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2892
2893 gbcLastModified:
2894 if (ThreadItem.LastModified = ZERO_DATE) then begin
2895 Item.SubItems[ idx ] := '';
2896 end else
2897 Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.LastModified);
2898
2899
2900 end;
2901 Inc( idx );
2902 end;
2903
2904 if ThreadItem.NewArrival then
2905 Item.ImageIndex := ITEM_ICON_THREADNEW1
2906 else
2907 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2908
2909
2910 end else begin
2911 idx := 0;
2912 for i := 0 to GikoSys.Setting.BoardColumnOrder.Count - 1 do begin
2913 // case TGikoBoardColumnID( ListView.Column[ i ].Tag ) of
2914 case GikoSys.Setting.BoardColumnOrder[ i ] of
2915 gbcTitle:
2916 // Item.Caption 鐃緒申 SubItems 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2917 Dec( idx );
2918
2919 gbcAllCount:
2920 Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount);
2921
2922 gbcRoundDate://gbcLastModified:
2923 Item.SubItems[ idx ] := '';
2924
2925 gbcCreated:
2926 if ThreadItem.CreateDate = ZERO_DATE then begin
2927 Item.SubItems[ idx ] := '';
2928 end else
2929 Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2930
2931 gbcLastModified:
2932 Item.SubItems[ idx ] := '';
2933
2934 else
2935 Item.SubItems[ idx ] := '';
2936 end;
2937 Inc( idx );
2938 end;
2939 if ThreadItem.NewArrival then
2940 Item.ImageIndex := ITEM_ICON_THREADNEW1
2941 else
2942 Item.ImageIndex := ITEM_ICON_THREAD1;
2943 end;
2944
2945 Item.Data := ThreadItem;
2946
2947 end;
2948