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.411 - (show annotations) (download) (as text)
Wed Sep 8 13:02:29 2004 UTC (19 years, 7 months ago) by yoffy
Branch: MAIN
Changes since 1.410: +3 -3 lines
File MIME type: text/x-pascal
カラム幅が正しく保存されないバグを修正。

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