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.461 - (show annotations) (download) (as text)
Sun Oct 17 00:08:46 2004 UTC (19 years, 6 months ago) by yoffy
Branch: MAIN
Changes since 1.460: +9 -0 lines
File MIME type: text/x-pascal
履歴の数をアドレス履歴の制限数と同数に制限するようになった。

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