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.527.2.3 - (show annotations) (download) (as text)
Thu Nov 3 08:12:48 2005 UTC (18 years, 5 months ago) by h677
Branch: Bdraw
CVS Tags: v1_51_0_611
Changes since 1.527.2.2: +41 -44 lines
File MIME type: text/x-pascal
WebBrowserのスクロールのタイミングとかを修正

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