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.480 - (show annotations) (download) (as text)
Wed Oct 27 00:53:44 2004 UTC (19 years, 5 months ago) by yoffy
Branch: MAIN
Changes since 1.479: +79 -9 lines
File MIME type: text/x-pascal
IME 確定前スレ絞込みの導入中。

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