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.515.2.14 - (show annotations) (download) (as text)
Sun Jul 3 15:36:23 2005 UTC (18 years, 9 months ago) by h677
Branch: Bb50
CVS Tags: v1_50_0_593
Changes since 1.515.2.13: +12 -3 lines
File MIME type: text/x-pascal
タブの自動復元を有効にしているとスレ表示部がブランクの時に
クリックすると例外を投げる不具合の修正

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