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.521 - (show annotations) (download) (as text)
Sat Aug 20 05:20:35 2005 UTC (18 years, 8 months ago) by h677
Branch: MAIN
Changes since 1.520: +4 -2 lines
File MIME type: text/x-pascal
GikoSystemからスレッドの内容のHTMLを作成する部分を分割

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