Develop and Download Open Source Software

Browse CVS Repository

Contents of /gikonavigoeson/gikonavi/Giko.pas

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


Revision 1.511.2.1 - (show annotations) (download) (as text)
Wed May 4 06:25:59 2005 UTC (18 years, 11 months ago) by h677
Branch: remodeling
Changes since 1.511: +47 -12 lines
File MIME type: text/x-pascal
ThreadItemの持っていたプロパティを削って、省メモリ化

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