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.489 - (show annotations) (download) (as text)
Fri Nov 5 14:25:48 2004 UTC (19 years, 5 months ago) by h677
Branch: MAIN
CVS Tags: bv1_49_0_564
Changes since 1.488: +5 -14 lines
File MIME type: text/x-pascal
板更新時にタブが無いときにメッセージを出さないようにした。

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