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