Develop and Download Open Source Software

Browse CVS Repository

Contents of /gikonavigoeson/gikonavi/Giko.pas

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


Revision 1.511 - (show annotations) (download) (as text)
Sat Apr 2 03:08:05 2005 UTC (19 years ago) by h677
Branch: MAIN
CVS Tags: root-of-remodel
Branch point for: remodeling
Changes since 1.510: +64 -53 lines
File MIME type: text/x-pascal
Beのプロファイルへのリンクを変更と
したらばJBBSのレスアンカーの仕様変更の吸収コードの追加

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