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.468 - (show annotations) (download) (as text)
Wed Oct 20 18:24:59 2004 UTC (19 years, 6 months ago) by yoffy
Branch: MAIN
CVS Tags: v1_50_0_561
Changes since 1.467: +72 -11 lines
File MIME type: text/x-pascal
スパムフィルタの導入。

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