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.400 - (show annotations) (download) (as text)
Sun Aug 22 02:42:29 2004 UTC (19 years, 8 months ago) by genyakun
Branch: MAIN
Changes since 1.399: +43 -2 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 private
929 { Private 鐃緒申鐃緒申 }
930 //RoundList : TRoundList;
931 FSortIndex: Integer;
932 FSortOrder: Boolean;
933
934 FEnabledCloseButton: Boolean;
935 // ThreadCreate: TThreadCreate;
936
937 FClickNode: TTreeNode;
938 FHttpState: Boolean;
939 FHint: TResPopup;
940 FPreviewBrowser: TPreviewBrowser;
941 FPreviewURL: string;
942
943 FBrowserSizeHeight: Integer;
944 FBrowserSizeWidth: Integer;
945
946 // FFavorite: TFavorite;
947 FTabHintIndex: Integer;
948 FListStyle: TViewStyle; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
949 FItemNoVisible: Boolean; //鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?
950 FViewType: TGikoViewType; //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?
951 FActiveList: TObject;
952 FActiveContent: TBrowserRecord; //
953 FActiveBBS : TBBS;
954 FHistoryList: TList; //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?
955 FTreeType: TGikoTreeType;
956 FWorkCount: Integer;
957 FNameCookie: string;
958 FMailCookie: string;
959 // FLastRoundTime: TDateTime;
960 BrowserNullTab: TBrowserRecord;
961 // DoubleClickOccurred: array [TMouseButton] of Boolean;
962 FDownloadTitle: string; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
963 FDownloadMax: Integer; //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?
964 FEvent: THTMLDocumentEventSink;//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?
965
966 // Fkeynum : Integer; //鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
967
968 IsDraggingSelectComboBox : Boolean;
969 DraggingSelectComboBoxPosition : TPoint;
970
971 FSearchDialog: TSearchDialog;
972
973 FDropSpaceNode: TTreeNode;
974
975 FDragTime : Cardinal; //鐃緒申鐃緒申鐃?鐃緒申D&D鐃?
976 FDragButton : TToolButton; //鐃緒申鐃緒申鐃?鐃緒申D&D鐃?鐃緒申Drag鐃緒申鐃緒申鐃緒申Button鐃緒申鐃緒申
977 FDragWFirst : Boolean; //WebTab鐃緒申D&D鐃?
978
979 FListViewBackGroundColor : TColor; //ListView鐃緒申BackGroundColor
980 FUseOddResOddColor : Boolean; //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申
981 FOddColor : TColor; //鐃緒申鐃緒申鐃?
982
983 FSelectResWord : string; // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?
984 FIsIgnoreResize : Boolean; // 鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
985 FIsMinimize : TMinimizeType; // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
986 FOldFormWidth : Integer; // 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
987 FToolBarSettingSender : TToolBarSettingSenderType; // 鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?
988 FMouseDownPos : TPoint; // 鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
989 FBrowsers: TList;
990 FResRangeMenuSelect : Longint; ///< ResRangeButton 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 (鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申 ResRange 鐃緒申鐃緒申)
991 procedure SetBoardTreeNode( inBBS : TBBS );
992 function SetCategoryListItem(ABBS2ch: TBBS): Integer;
993 function SetBoardListItem(Category: TCategory): Integer;
994 function SetThreadListItem(Board: TBoard): Integer;
995 // function GetRoundName(index: integer): string;
996
997 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
998 procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
999 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
1000 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
1001 procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
1002
1003 procedure SetActiveList(Obj: TObject);
1004 procedure ListClick;
1005 procedure ListDoubleClick(Shift: TShiftState);
1006 procedure BrowserMovement(const AName: string); overload;
1007 procedure BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord); overload;
1008 procedure SelectListItem(List: TList);
1009 // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
1010 procedure DeleteTab(ThreadItem: TThreadItem); overload;
1011 procedure DeleteTab(BrowserRecord: TBrowserRecord); overload;
1012 function Hook(var Message: TMessage): Boolean;
1013 procedure AddRoundNameMenu(MenuItem: TMenuItem);
1014 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload;
1015 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
1016 procedure SetSelectRoundName(Sender: TObject);
1017 function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
1018
1019 procedure SetMenuFont;
1020 // procedure CreateFavMenu(Folder: TFavoriteFolder);
1021 procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
1022 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
1023 procedure FavoriteClick(Sender: TObject); overload;
1024 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
1025 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
1026 function OnDocumentContextMenu(Sender: TObject): WordBool;
1027 // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
1028 procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
1029 procedure ShowTextPopup;
1030 //procedure ShowTextPopup(HintData: THintData);
1031 // procedure SetStdToolBar;
1032 // function GetAction(ActionName: string): TContainedAction;
1033 procedure SetLinkBar;
1034 function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
1035 procedure MenuBarChevronMenu;
1036 procedure LinkBarChevronMenu;
1037 procedure ToolBarChevronMenu(ToolBar: TToolBar);
1038 procedure ModifySelectList;
1039 procedure FavoriteBrowseFolder( node: TTreeNode );
1040 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
1041 procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
1042 procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
1043 procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
1044 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
1045 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
1046 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
1047 procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
1048 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
1049 //
1050 procedure SetListViewBackGroundColor(value: TColor);
1051 procedure BBSMenuItemOnClick( Sender : TObject );
1052 //
1053 procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
1054 // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1055 procedure SaveCoolBarSettings;
1056 // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1057 procedure LoadCoolBarSettings;
1058 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1059 procedure OnMinimize;
1060 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1061 procedure OnMinimized;
1062 // CoolBar 鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1063 procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
1064 // TreeView 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1065 procedure TreeClick( Node : TTreeNode );
1066 // TreeView 鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1067 procedure TreeDoubleClick( Node : TTreeNode );
1068 // 鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1069 procedure HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
1070 // 鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1071 // 鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 True 鐃緒申鐃緒申鐃緒申
1072 function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
1073 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃? BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1074 procedure SetBBSMenu;
1075 function WebBrowserClick(Sender: TObject): WordBool;
1076 procedure SkinorCSSFilesCopy(path: string);
1077 // 鐃?鐃?鐃緒申鐃緒申
1078 function GetTabURLs(AStringList: TStringList) : Boolean;
1079 // 鐃?鐃?鐃緒申鐃緒申
1080 function SaveTabURLs : Boolean;
1081 // 鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申
1082 function LoadTabURLs : Boolean;
1083 // 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1084 procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
1085 protected
1086 procedure CreateParams(var Params: TCreateParams); override;
1087 procedure WndProc(var Message: TMessage); override;
1088 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
1089 procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
1090 procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
1091
1092 public
1093 { Public 鐃緒申鐃緒申 }
1094 // FDownload: TDownload;
1095 FControlThread: TThreadControl;
1096 procedure MoveToURL(URL: string);
1097 procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
1098 procedure ReloadBBS;
1099 function GetHttpState: Boolean;
1100 procedure SetEnabledCloseButton(Enabled: Boolean);
1101 function GetTreeNode(Data: TObject): TTreeNode;
1102 procedure AppFormDeactivate(Sender: TObject);
1103 // procedure CabinetPanelVisible(PanelVisible: Boolean);
1104 procedure ListViewAllSelect;
1105
1106 property ListStyle: TViewStyle read FListStyle write FListStyle;
1107 property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
1108 property ViewType: TGikoViewType read FViewType write FViewType;
1109
1110 property NameCookie: string read FNameCookie write FNameCookie;
1111 property MailCookie: string read FMailCookie write FMailCookie;
1112
1113 procedure SetContent(inThread: TBrowserRecord);
1114 function GetActiveContent: TThreadItem;
1115 function GetActiveList: TObject;
1116
1117 property ActiveList: TObject read GetActiveList write SetActiveList;
1118 // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
1119
1120 procedure SetListViewType(AViewType: TGikoViewType); overload;
1121 procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
1122 procedure DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
1123 procedure DownloadList(Board: TBoard; ForceDownload: Boolean = False);
1124 procedure PlaySound(SoundEventName: string);
1125
1126 function AddHistory( FavItem: TFavoriteThreadItem ): Boolean;
1127 procedure DeleteHistory( threadItem: TThreadItem );
1128 procedure ClearHistory;
1129 procedure SaveHistory;
1130 procedure LoadHistory;
1131 procedure ShowBBSTree( inBBS : TBBS );
1132 procedure ShowBBSTreeOld( inBBS : TBBS );
1133 procedure ShowHistoryTree;
1134 procedure SetHistoryTreeNode;
1135 // procedure SelectTreeNode(Item: TObject);
1136 procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
1137 procedure SetBrowserTabState;
1138 // property Favorite: TFavorite read FFavorite write FFavorite;
1139 procedure SetToolBarPopup;
1140 procedure ShowFavoriteAddDialog( Item : TObject );
1141 procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
1142 procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
1143 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
1144 property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
1145 property OddColor : TColor read FOddColor write FOddColor;
1146
1147 function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
1148 procedure OnPlugInMenuItem( Sender : TObject );
1149 procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
1150
1151 published
1152 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
1153 end;
1154
1155 TFavoriteMenuItem = class(TMenuItem)
1156 private
1157 FData : Pointer;
1158 public
1159 property Data: Pointer read FData write FData;
1160 end;
1161
1162 TBBSMenuItem = class(TMenuItem)
1163 private
1164 FData : Pointer;
1165 public
1166 property Data: Pointer read FData write FData;
1167 end;
1168
1169 TLinkToolButton = class(TToolButton)
1170 private
1171 FData : Pointer;
1172 public
1173 property Data: Pointer read FData write FData;
1174 end;
1175
1176 TBrowserRecord = class( TObject )
1177 private
1178 FBrowser : TWebBrowser;
1179 FEvent: THTMLDocumentEventSink;//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?
1180 FThread : TThreadItem;
1181 FLastSize : Integer;
1182 FRepaint : Boolean;
1183 // FOnlyHundred: Boolean;
1184 public
1185 destructor Destroy; override;
1186 property Browser : TWebBrowser read FBrowser write FBrowser;
1187 property Thread : TThreadItem read FThread write FThread;
1188 property LastSize : Integer read FLastSize write FLastSize;
1189 property Repaint : Boolean read FRepaint write FRepaint;
1190 // property OnlyHundred : Boolean read FOnlyHundred write FOnlyHundred;
1191 end;
1192
1193 var
1194 GikoForm: TGikoForm;
1195
1196 implementation
1197
1198 uses
1199 About, Option, Round, Splash, Sort, ListSelect,
1200 NewBoard, MojuUtils,Clipbrd;
1201
1202 const
1203 CAPTION_NAME: string = '鐃?鐃?鐃?鐃?';
1204 BLANK_HTML: string = 'about:blank';
1205 SELECTCOMBOBOX_NAME: string = ''; // '鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申';
1206 SELECTCOMBOBOX_COLOR: TColor = clWindow;
1207 //D&D鐃緒申鐃?
1208 DandD_THRESHOLD = 5; //D&D鐃緒申鐃緒申鐃?鐃?pixcel)
1209 //鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1210 ITEM_ICON_2CH1 = 0; //2ch鐃?鐃?鐃?鐃緒申
1211 ITEM_ICON_2CH2 = 1; //2ch鐃?鐃?鐃?鐃緒申
1212 ITEM_ICON_CATEGORY1 = 2; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1213 ITEM_ICON_CATEGORY2 = 3; //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1214 ITEM_ICON_BOARD_NOSUBJECT = 3; //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1215 ITEM_ICON_BOARD1 = 4; //鐃緒申鐃?鐃?鐃?鐃緒申
1216 ITEM_ICON_BOARD2 = 5; //鐃緒申鐃?鐃?鐃?鐃緒申
1217 ITEM_ICON_THREADLOG1 = 6; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1218 ITEM_ICON_THREADLOG2 = 7; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1219 ITEM_ICON_THREAD1 = 8; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1220 ITEM_ICON_THREAD2 = 9; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?
1221 ITEM_ICON_THREADNEW1 = 10; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1222 ITEM_ICON_THREADNEW2 = 11; //鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1223 ITEM_ICON_SORT1 = 12; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1224 ITEM_ICON_SORT2 = 13; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申
1225 ITEM_ICON_BOARD_LOG = 17; //鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1226 ITEM_ICON_BOARD_NEW = 18; //鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1227
1228 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1229 TOOL_ICON_HEIGHT_MAX = 16; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1230 TOOL_ICON_HEIGHT_MIN = 17; //鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1231 TOOL_ICON_HEIGHT_NORMAL = 18; //鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1232 TOOL_ICON_WIDTH_MAX = 19; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1233 TOOL_ICON_WIDTH_MIN = 20; //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1234 TOOL_ICON_WIDTH_NORMAL = 21; //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1235
1236 TOOL_ICON_FAV_FOLDER = 30; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申
1237 TOOL_ICON_FAV_BOARD = 31; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1238 TOOL_ICON_FAV_THREAD = 32; //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1239
1240 HTML_FILE_NAME = 'temp_preview.html';
1241
1242 WM_XBUTTONDOWN = $020B;
1243 WM_XBUTTONUP = $020C;
1244 WM_XBUTTONDBLCLK = $020D;
1245 XBUTTON1 = $0001;
1246 XBUTTON2 = $0002;
1247 USER_TREECLICK = WM_USER + 2000;
1248 USER_RESIZED = WM_USER + 2001;
1249 USER_MINIMIZED = WM_USER + 2002;
1250 USER_SETLINKBAR = WM_USER + 2003;
1251 SELECTTIME_INTERBAL = 110;
1252
1253 BROWSER_COUNT = 5; //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申
1254 {$R *.DFM}
1255
1256 procedure TGikoForm.CreateParams(var Params: TCreateParams);
1257 begin
1258 inherited;
1259 if FormStyle in [fsNormal, fsStayOnTop] then begin
1260 if BorderStyle in [bsSingle, bsSizeable] then begin
1261 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1262 Params.WndParent := 0;
1263 end;
1264 end;
1265 end;
1266
1267 procedure TGikoForm.FormCreate(Sender: TObject);
1268 const
1269 TVS_NOTOOLTIPS = $0080;
1270 var
1271 FileName: string;
1272 Style: DWORD;
1273 msg: string;
1274 i: Integer;
1275 wp: TWindowPlacement;
1276 s: string;
1277 newbrowser: TWebBrowser;
1278 begin
1279 {$IFDEF DEBUG}
1280 AllocConsole;
1281 Writeln('============================================================');
1282 Writeln(' 鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃? 鐃?鐃緒申鐃?鐃?鐃緒申');
1283 Writeln('');
1284 Writeln(' 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?');
1285 Writeln(' 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
1286 Writeln('============================================================');
1287 {$ENDIF}
1288 Application.OnDeactivate := AppFormDeactivate;
1289 Self.OnDeactivate := AppFormDeactivate;
1290 Application.HookMainWindow(Hook);
1291 Application.OnMessage := HandleAppMessage; //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?by鐃?鐃緒申鐃緒申鐃緒申
1292 Self.DoubleBuffered := true;
1293 FTreeType := gttNone;
1294
1295 FSearchDialog := nil;
1296 BrowserNullTab := TBrowserRecord.Create;
1297 BrowserNullTab.Browser := Browser;
1298 BrowserNullTab.Browser.Navigate(BLANK_HTML);
1299 FBrowsers := TList.Create;
1300 for i := 0 to BROWSER_COUNT -1 do begin
1301 FBrowsers.Add(TWebBrowser.Create(nil));
1302 newBrowser := FBrowsers[FBrowsers.Count - 1];
1303 TOleControl(newBrowser).Parent := BrowserPanel;
1304 newBrowser.Align := alNone;
1305 newBrowser.Left := 0;
1306 newBrowser.Top := 0;
1307 //newBrowser.DoubleBuffered := true;
1308 newBrowser.OnDocumentComplete := BrowserDocumentComplete;
1309 newBrowser.OnBeforeNavigate2 := BrowserBeforeNavigate2;
1310 newBrowser.OnEnter := BrowserEnter;
1311 newBrowser.OnNewWindow2 := BrowserNewWindow2;
1312 newBrowser.OnStatusTextChange := BrowserStatusTextChange;
1313 //newBrowser.OnTitleChange := BrowserTitleChange;
1314 newBrowser.Navigate(BLANK_HTML);
1315 ShowWindow(newBrowser.Handle, SW_HIDE);
1316
1317 end;
1318 BrowserNullTab.Browser.BringToFront;
1319 ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
1320
1321 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1322 FIsIgnoreResize := True;
1323
1324 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申
1325 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1326
1327
1328 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1329 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1330
1331 // 鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?(ReadBoardFile, LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1332 InitializeBoardPlugIns;
1333
1334 EnabledCloseButton := True;
1335
1336
1337 //鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1338 RoundList := TRoundList.Create;
1339 RoundList.LoadRoundBoardFile;
1340
1341 // 鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申(ReadFavorite 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1342 GikoSys.ListBoardFile;
1343
1344 RoundList.LoadRoundThreadFile;
1345
1346 if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
1347 GikoSys.ListBoardFile;
1348
1349 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1350 SetBBSMenu;
1351
1352 // 鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?(LoadHistory 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申)
1353 FHistoryList := TList.Create;
1354
1355 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1356 LoadHistory;
1357
1358 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1359 // FFavorite := TFavorite.Create(FavoriteTreeView);
1360 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1361 FavoriteDM.ReadFavorite;
1362
1363 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1364 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1365
1366 //鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?
1367 // MainCoolBar.Top := 0;
1368 // MainCoolBar.Left := 0;
1369
1370 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?
1371 AnimePanel.Top := 0;
1372 AnimePanel.Left := 0;
1373
1374 //鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1375
1376 //鐃?鐃緒申鐃?鐃?鐃?鐃?
1377 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1378
1379 //鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
1380 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1381 MsgBarVisibleActionExecute(nil);
1382 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1383
1384 //鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1385 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1386 StatusBarVisibleActionExecute(nil);
1387
1388 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申
1389 TreeView.Items.BeginUpdate;
1390 FavoriteTreeView.Items.BeginUpdate;
1391 ListView.Items.BeginUpdate;
1392 try
1393 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1394 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1395 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1396 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1397
1398 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1399 FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1400 FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1401 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1402
1403 ListView.Font.Name := GikoSys.Setting.ListFontName;
1404 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1405 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1406 //ListView.Color := GikoSys.Setting.ListBackColor;
1407 ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1408 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1409 FOddColor := GikoSys.Setting.OddColor;
1410
1411 finally
1412 TreeView.Items.EndUpdate;
1413 FavoriteTreeView.Items.EndUpdate;
1414 ListView.Items.EndUpdate;
1415 end;
1416 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1417 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1418
1419 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?
1420 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1421 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1422 FDragWFirst := false;
1423 SetContent(BrowserNullTab); //鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1424 // TreeView.TopItem.Expanded := True; //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1425 // TreeView.Selected := TreeView.Items[0]; //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1426
1427
1428 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1429 wp.length := sizeof(wp);
1430 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1431 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1432 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1433 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1434 wp.showCmd := SW_HIDE;
1435 SetWindowPlacement(Handle, @wp);
1436
1437 // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1438 // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1439 if GikoSys.Setting.WindowMax then
1440 WindowState := wsMaximized;
1441
1442 //鐃?鐃?鐃?鐃?鐃緒申
1443 try
1444 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1445 if FileExists(FileName) then
1446 Animate.FileName := FileName;
1447 except
1448 end;
1449
1450 //鐃?鐃?鐃?鐃?
1451 FNameCookie := '';
1452 FMailCookie := '';
1453
1454 //鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1455 AllItemAction.Checked := True;
1456 AllResAction.Checked := True;
1457
1458 //TreeView鐃緒申鐃緒申鐃緒申鐃?鐃緒申ToolTip鐃緒申鐃緒申鐃?鐃緒申
1459 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1460 Style := Style or TVS_NOTOOLTIPS;
1461 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1462
1463 // 鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1464 TreeView.Align := alClient;
1465 FavoriteTreeView.Align := alClient;
1466 FavoriteTreeView.Visible := False;
1467
1468 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1469 // FBrowserSizeFlag := False;
1470 // FBrowserSizeHeight := ViewPanel.Height;
1471
1472 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1473 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1474
1475 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1476 ArrangeAction.Execute;
1477
1478 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1479 case GikoSys.Setting.ListWidthState of
1480 glsMax: begin
1481 ViewPanel.Width := 1;
1482 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1483 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1484 end;
1485 glsMin: begin
1486 ViewPanel.Width := GikoSys.Setting.ListWidth;
1487 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1488 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1489 end;
1490 else begin
1491 ViewPanel.Width := GikoSys.Setting.ListWidth;
1492 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1493 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1494 end;
1495 end;
1496 end else begin
1497 case GikoSys.Setting.ListHeightState of
1498 glsMax: begin
1499 ViewPanel.Height := 1;
1500 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1501 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1502 end;
1503 glsMin: begin
1504 ViewPanel.Height := GikoSys.Setting.ListHeight;
1505 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1506 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1507 end;
1508 else begin
1509 ViewPanel.Height := GikoSys.Setting.ListHeight;
1510 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1511 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1512 end;
1513 end;
1514 end;
1515
1516 //鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1517 // ProgressBar.Visible := False;
1518 ProgressBar.Parent := StatusBar;
1519 ProgressBar.Top := 2;
1520 ProgressBar.Left := 0;
1521 ProgressBar.Width := StatusBar.Panels[0].Width;
1522 ProgressBar.Height := StatusBar.Height - 2;
1523 ProgressBar.Position := 0;
1524
1525 //鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?
1526 FControlThread := TThreadControl.Create(True);
1527 FControlThread.MaxThreadCount := 1;
1528 FControlThread.Resume;
1529 FControlThread.OnDownloadEnd := DownloadEnd;
1530 FControlThread.OnDownloadMsg := DownloadMsg;
1531 FControlThread.OnWork := Work;
1532 FControlThread.OnWorkBegin := WorkBegin;
1533 FControlThread.OnWorkEnd := WorkEnd;
1534 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1535
1536 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1537 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1538
1539 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申
1540 SetBrowserTabState;
1541
1542 BrowserBoardNameLabel.Caption := '';
1543 BrowserNameLabel.Caption := '';
1544 FWorkCount := 0;
1545
1546 FTabHintIndex := -1;
1547
1548 //鐃緒申鐃緒申鐃?鐃?鐃?
1549 SetLinkBar;
1550
1551 //鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?
1552 SetMenuFont;
1553
1554 //鐃?鐃?鐃緒申鐃?鐃?Wrapable
1555 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1556 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1557
1558 KeepDefaultToolButton(StdToolBar, TmpToolBar);
1559 KeepDefaultToolButton(ListToolBar, TmpToolBar);
1560 KeepDefaultToolButton(BrowserToolBar, TmpToolBar);
1561
1562 MakeDefaultINIFile();
1563 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1564 ReadToolBarSetting(ActionList, StdToolBar);
1565 ReadToolBarSetting(ActionList, ListToolBar);
1566 try
1567 for i := ListToolBar.ControlCount - 1 downto 0 do
1568 begin
1569 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1570 begin
1571 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申
1572 if (i + 1) < ListToolBar.ControlCount then
1573 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1574 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1575 ListToolBar.Controls[ i + 1 ].Visible := False;
1576
1577 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申
1578 ListToolBar.Controls[ i ].Visible := False;
1579 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申
1580 SelectComboBox.Parent := ListToolBar;
1581 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1582 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1583 // 鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申
1584 SelectComboBoxSplitter.Parent := ListToolBar;
1585 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1586
1587 break;
1588 end;
1589 end;
1590 except
1591 end;
1592 ReadToolBarSetting(ActionList, BrowserToolBar);
1593 SetToolBarPopup;
1594
1595 // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1596 FResRangeMenuSelect := GikoSys.ResRange;
1597 case GikoSys.ResRange of
1598 Ord( grrAll ):
1599 begin
1600 AllResAction.Execute;
1601 end;
1602 Ord( grrSelect ):
1603 begin
1604 SelectComboBox.Text := SelectComboBox.Items[ 1 ];
1605 SelectResAction.Checked := True;
1606 end;
1607 else
1608 // ResRangeAction.Execute;
1609 case FResRangeMenuSelect of
1610 Ord( grrKoko ): OnlyKokoResAction.Checked := True;
1611 Ord( grrNew ): OnlyNewResAction.Checked := True;
1612 100: OnlyAHundredResAction.Checked := True;
1613 end;
1614 end;
1615
1616 // 鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
1617 // ThreadRangeAction.Execute;
1618 case GikoSys.Setting.ThreadRange of
1619 gtrAll:
1620 begin
1621 AllItemAction.Checked := True;
1622 ViewType := gvtAll;
1623 end;
1624 gtrLog:
1625 begin
1626 LogItemAction.Checked := True;
1627 ViewType := gvtLog;
1628 end;
1629 gtrNew:
1630 begin
1631 NewItemAction.Checked := True;
1632 ViewType := gvtNew;
1633 end;
1634 end;
1635
1636 //鐃?鐃?鐃緒申鐃?鐃?鐃?
1637 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1638
1639 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1640
1641 //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申
1642 if not FileExists(GikoSys.GetBoardFileName) then begin
1643 msg := '鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申' + #13#10#13#10
1644 + '鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申' + #13#10
1645 + '鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?';
1646 MsgBox(SplashWindow.Handle, msg, '鐃?鐃?鐃?鐃?', MB_OK or MB_ICONINFORMATION);
1647 NewBoardAction.Execute;
1648 end;
1649
1650 //鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1651 GikoSys.LoadKeySetting(ActionList);
1652
1653 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1654 // FLastRoundTime := 0;
1655
1656 //ResHint
1657 FHint := TResPopup.Create(Self);
1658
1659 // 鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
1660 CabinetVisible( False );
1661 if GikoSys.Setting.CabinetVisible then begin
1662 i := CabinetSelectPopupMenu.Items.Count - 1;
1663 if GikoSys.Setting.CabinetIndex = i - 1 then
1664 CabinetHistoryAction.Execute
1665 else if GikoSys.Setting.CabinetIndex = i then
1666 CabinetFavoriteAction.Execute
1667 else begin
1668 if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1669 ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1670 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 2
1671 FIsIgnoreResize := True;
1672 CabinetBBSAction.Execute;
1673 end;
1674 end else begin
1675 ShowBBSTreeOld( BBSs[ 0 ] );
1676 PostMessage( Handle, USER_TREECLICK, 0, 0 );
1677 end;
1678
1679 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 3
1680 FIsIgnoreResize := True;
1681
1682 //鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申
1683 if GikoSys.Setting.AutoLogin then
1684 LoginAction.Execute;
1685
1686 //鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?
1687 for i := 1 to ParamCount do begin
1688 MoveToURL(ParamStr(i));
1689 end;
1690 // SetStdToolBar;
1691 // SetLinkBar;
1692
1693 s := GikoSys.FAbon.NGwordname;
1694 StatusBar.Panels[2].Text := s;
1695 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1696 StatusBarResize(Sender);
1697
1698 dummy1.Caption := ItemReservPMenu.Caption;
1699 dummy1.Hint := ItemReservPMenu.Hint;
1700
1701 //Samba24鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?
1702 GikoSys.SambaFileExists();
1703
1704 //鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 (AV鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申)
1705 end;
1706
1707 // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1708 procedure TGikoForm.SaveCoolBarSettings;
1709 var
1710 i : Integer;
1711 CoolSet : TCoolSet;
1712 begin
1713
1714 if IsIconic( Handle ) or FIsIgnoreResize then
1715 Exit;
1716
1717 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1718 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1719 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1720 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1721 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1722 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1723 end;
1724 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1725 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1726 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1727 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1728 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1729 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1730 end;
1731 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1732 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1733 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1734 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1735 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1736 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1737 end;
1738
1739 end;
1740
1741 // CoolBar 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1742 procedure TGikoForm.LoadCoolBarSettings;
1743 var
1744 i : Integer;
1745 CoolSet : TCoolSet;
1746 begin
1747
1748 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Main)
1749 MainCoolBar.Bands.BeginUpdate;
1750 try
1751 // for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1752 for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin
1753 CoolSet := GikoSys.Setting.MainCoolSet[i];
1754 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1755 FIsIgnoreResize := False;
1756 SaveCoolBarSettings;
1757 Exit;
1758 end;
1759 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1760 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1761 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1762 end;
1763 finally
1764 MainCoolBar.Bands.EndUpdate;
1765 end;
1766
1767 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Board)
1768 ListCoolBar.Bands.BeginUpdate;
1769 try
1770 // for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1771 for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin
1772 CoolSet := GikoSys.Setting.ListCoolSet[i];
1773 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1774 FIsIgnoreResize := False;
1775 SaveCoolBarSettings;
1776 Exit;
1777 end;
1778 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1779 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1780 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1781 end;
1782 finally
1783 ListCoolBar.Bands.EndUpdate;
1784 end;
1785
1786 //鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申(Browser)
1787 BrowserCoolBar.Bands.BeginUpdate;
1788 try
1789 // for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1790 for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
1791 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1792 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1793 FIsIgnoreResize := False;
1794 SaveCoolBarSettings;
1795 Exit;
1796 end;
1797 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1798 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1799 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1800 end;
1801 finally
1802 BrowserCoolBar.Bands.EndUpdate;
1803 end;
1804
1805 end;
1806
1807 //
1808 //
1809 //
1810 procedure TGikoForm.FormShow(Sender: TObject);
1811 begin
1812 ShowWindow(Application.Handle, SW_HIDE);
1813
1814 //FormCreate鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申FormShow鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1815 //鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申
1816 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1817 StdToolBarVisibleActionExecute( nil );
1818 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1819 AddressBarVisibleActionExecute( nil );
1820 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1821 LinkBarVisibleActionExecute( nil );
1822 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1823 ListToolBarVisibleActionExecute( nil );
1824 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1825 ListNameBarVisibleActionExecute( nil );
1826 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1827 BrowserToolBarVisibleActionExecute( nil );
1828 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1829 BrowserNameBarVisibleActionExecute( nil );
1830
1831 //鐃?鐃緒申鐃?鐃?鐃?鐃?
1832 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1833 BrowserTabVisibleActionExecute(nil);
1834
1835 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1836 BrowserTabTopAction.Checked := True;
1837 BrowserTabTopActionExecute(nil);
1838 end else begin
1839 BrowserTabBottomAction.Checked := True;
1840 BrowserTabBottomActionExecute(nil);
1841 end;
1842
1843 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1844 BrowserTabTabStyleAction.Checked := True;
1845 BrowserTabTabStyleActionExecute(nil);
1846 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1847 BrowserTabButtonStyleAction.Checked := True;
1848 BrowserTabButtonStyleActionExecute(nil);
1849 end else begin
1850 BrowserTabFlatStyleAction.Checked := True;
1851 BrowserTabFlatStyleActionExecute(nil);
1852 end;
1853
1854 // CoolBar 鐃緒申鐃緒申
1855 LoadCoolBarSettings;
1856
1857 FIsIgnoreResize := False;
1858
1859 //TabAutoLoad
1860 //FormCrete鐃緒申鐃緒申鐃緒申鐃緒申鐃?
1861 if GikoSys.Setting.TabAutoLoadSave then begin
1862 TabAutoLoadAction.Execute;
1863 end;
1864
1865 end;
1866
1867 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1868 begin
1869 // if GikoForm.WindowState <> wsMinimized then
1870 // SaveCoolBarSettings;
1871 if ( GikoSys.Setting.ShowDialogForEnd ) and
1872 (MessageDlg('鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
1873 CanClose := false;
1874 Exit;
1875 end else begin
1876 CanClose := True;
1877 if GikoSys.Setting.TabAutoLoadSave then begin
1878 TabAutoSaveAction.Execute;
1879 end;
1880 end;
1881 //Application.HookMainWindow(Hook);
1882 Application.UnhookMainWindow(Hook);
1883 Application.Terminate;
1884 end;
1885
1886 procedure TGikoForm.FormDestroy(Sender: TObject);
1887 var
1888 i : Integer;
1889 // CoolSet: TCoolSet;
1890 wp : TWindowPlacement;
1891 tmpBool : Boolean;
1892 begin
1893 // Application.OnDeactivate := nil;
1894 // Self.OnDeactivate := nil;
1895 try
1896 //column鐃緒申
1897 if GetActiveList is TBBS then begin
1898 for i := 0 to ListView.Columns.Count - 1 do
1899 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1900 end else if GetActiveList is TCategory then begin
1901 for i := 0 to ListView.Columns.Count - 1 do
1902 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1903 end else if GetActiveList is TBoard then begin
1904 for i := 0 to ListView.Columns.Count - 1 do
1905 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1906 end;
1907 except
1908 end;
1909 try
1910 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
1911 wp.length := sizeof(wp);
1912 GetWindowPlacement(Handle, @wp);
1913 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1914 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1915 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1916 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1917 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1918
1919 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1920 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1921 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1922 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1923 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1924 if ArrangeAction.Checked then
1925 GikoSys.Setting.ListOrientation := gloVertical
1926 else
1927 GikoSys.Setting.ListOrientation := gloHorizontal;
1928 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1929 except
1930 end;
1931
1932 try
1933 // 鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
1934 if not GikoSys.Setting.ResRangeHold then
1935 GikoSys.Setting.ResRange := FResRangeMenuSelect;
1936 except
1937 end;
1938
1939 // 鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申 CoolBar 鐃緒申鐃緒申
1940 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1941 {
1942 // 鐃緒申FormDestroy鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?2004/04/09鐃?
1943 // CoolBar 鐃緒申鐃緒申
1944 if GikoForm.WindowState <> wsMinimized then
1945 SaveCoolBarSettings;
1946 }
1947 try
1948 GikoSys.Setting.WriteWindowSettingFile;
1949 GikoSys.Setting.WriteNameMailSettingFile;
1950 except
1951 end;
1952
1953 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
1954 try
1955 //FavoriteDM鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1956 FavoriteDM.WriteFavorite;
1957 FavoriteDM.Clear;
1958 except
1959 end;
1960
1961 try
1962 //鐃?鐃?鐃?鐃緒申鐃?鐃?
1963 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
1964 GikoSys.Setting.ShowDialogForAllTabClose := false;
1965 AllTabCloseAction.Execute;
1966 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
1967 except
1968 end;
1969 try
1970 LockWindowUpdate(Self.Handle);
1971 for i := FBrowsers.Count - 1 downto 0 do begin
1972 TWebBrowser(FBrowsers[i]).Free;
1973 end;
1974 FBrowsers.Clear;
1975 FBrowsers.Capacity := 0;
1976 finally
1977 FBrowsers.Free;
1978 end;
1979 try
1980 if BrowserNullTab <> nil then begin
1981 BrowserNullTab.Browser := nil; {*BrowserNullTab鐃緒申Browser鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?
1982 *鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申Free鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
1983 *}
1984 BrowserNullTab.Free;
1985 end;
1986 except
1987 end;
1988 LockWindowUpdate(0);
1989 try
1990 TreeView.Items.BeginUpdate;
1991 TreeView.Items.GetFirstNode.Free;
1992 TreeView.Items.Clear;
1993 TreeView.Items.EndUpdate;
1994 except
1995 end;
1996
1997 //鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
1998 try
1999 //AddressHistoryDM鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2000 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
2001 except
2002 end;
2003
2004 //鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申
2005 try
2006 SaveHistory;
2007 except
2008 end;
2009 try
2010 try
2011 ClearHistory;
2012 except
2013 end;
2014 finally
2015 FHistoryList.Free;
2016 end;
2017
2018 //鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申&鐃?鐃緒申
2019 try
2020 RoundList.SaveRoundFile;
2021 except
2022 end;
2023 try
2024 try
2025 RoundList.Clear;
2026 except
2027 end;
2028 finally
2029 RoundList.Free;
2030 end;
2031
2032 try
2033 try
2034 FControlThread.Terminate;
2035 FControlThread.WaitFor;
2036 except
2037 end;
2038 finally
2039 FControlThread.Free;
2040 end;
2041
2042 // TBBS 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申 TCategory, TBoard, TThreadItem 鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2043 // TBoard, TThreadItem 鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申
2044 // BoardPluteIns 鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2045 try
2046 for i := Length( BBSs ) - 1 downto 0 do begin
2047 if BBSs[ i ] <> nil then
2048 BBSs[ i ].Free;
2049 BBSs[ i ] := nil;
2050 end;
2051 except
2052 end;
2053
2054 try
2055 for i := Length( BoardPlugIns ) - 1 downto 0 do begin
2056 if BoardPlugIns[ i ] <> nil then
2057 BoardPlugIns[ i ].Free;
2058 BoardPlugIns[ i ] := nil;
2059 end;
2060 except
2061 end;
2062
2063 try
2064 if FEvent <> nil then
2065 FEvent.Free;
2066
2067 //Hint鐃?鐃緒申
2068 if FHint <> nil then begin
2069 FHint.ReleaseHandle;
2070 FHint.Free;
2071 FHint := nil;
2072 end;
2073 //Preview鐃?鐃緒申
2074 if TPreviewBrowser <> nil then begin
2075 FPreviewBrowser.Free;
2076 FPreviewBrowser := nil;
2077 end;
2078 except
2079 end;
2080
2081 end;
2082
2083 //鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
2084 procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
2085 begin
2086 end;
2087 //鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃?
2088 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
2089 begin
2090 CabinetVisibleAction.Execute;
2091 // CabinetPanelVisible(false);
2092 end;
2093
2094 // 鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃? BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?
2095 procedure TGikoForm.SetBBSMenu;
2096 var
2097 i : Integer;
2098 item : TBBSMenuItem;
2099 begin
2100
2101 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2102 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
2103 try
2104 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
2105 CabinetSelectPopupMenu.Items[ i ].Free;
2106 CabinetMenu.Items[ i ].Free;
2107 BBSSelectPopupMenu.Items[ i ].Free;
2108 end;
2109 except
2110 end;
2111 end;
2112
2113 // 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申
2114 for i := Length( BBSs ) - 1 downto 0 do begin
2115 try
2116 item := TBBSMenuItem.Create( PopupMenu );
2117 item.Caption := BBSs[ i ].Title;
2118 item.Data := BBSs[ i ];
2119 item.OnClick := BBSMenuItemOnClick;
2120 CabinetSelectPopupMenu.Items.Insert( 0, item );
2121 item := TBBSMenuItem.Create( PopupMenu );
2122 item.Caption := BBSs[ i ].Title;
2123 item.Data := BBSs[ i ];
2124 item.OnClick := BBSMenuItemOnClick;
2125 CabinetMenu.Insert( 0, item );
2126 item := TBBSMenuItem.Create( PopupMenu );
2127 item.Caption := BBSs[ i ].Title;
2128 item.Data := BBSs[ i ];
2129 item.OnClick := BBSMenuItemOnClick;
2130 BBSSelectPopupMenu.Items.Insert( 0, Item );
2131 except
2132 end;
2133 end;
2134
2135 end;
2136
2137 procedure TGikoForm.ReloadBBS;
2138 var
2139 i : Integer;
2140 tmpBool: Boolean;
2141 begin
2142 //鐃?鐃?鐃?鐃緒申鐃?鐃?
2143 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
2144 GikoSys.Setting.ShowDialogForAllTabClose := false;
2145 AllTabCloseAction.Execute;
2146 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
2147
2148 SetContent(BrowserNullTab);
2149 //TreeView鐃?鐃緒申鐃?鐃?BBS2ch.Free鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申XP鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?
2150 TreeView.Items.Clear;
2151
2152 //BBS鐃?鐃緒申
2153 try
2154 for i := Length( BBSs ) - 1 downto 0 do begin
2155 if BBSs[ i ] <> nil then
2156 BBSs[ i ].Free;
2157 BBSs[ i ] := nil;
2158 end;
2159 except
2160 end;
2161
2162 ActiveList := nil;
2163
2164 FTreeType := gttNone;
2165
2166 GikoSys.ListBoardFile; //鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申
2167
2168 // BBS 鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?
2169 SetBBSMenu;
2170
2171 ShowBBSTree( BBSs[ 0 ] );
2172
2173 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2174 SaveHistory;
2175 ClearHistory;
2176 LoadHistory;
2177
2178 //鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2179 FavoriteDM.WriteFavorite;
2180 FavoriteDM.Clear;
2181 FavoriteDM.ReadFavorite;
2182
2183 SetLinkBar;
2184
2185 end;
2186
2187 //鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申
2188 procedure TGikoForm.SetBoardTreeNode(
2189 inBBS : TBBS
2190 );
2191 var
2192 i, j, k: integer;
2193 Root: TTreeNode;
2194 CategoryNode: TTreeNode;
2195 BoardNode: TTreeNode;
2196 Category: TCategory;
2197 Board: TBoard;
2198 begin
2199 // 鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申
2200 FActiveBBS := inBBS;
2201 TreeView.Items.BeginUpdate;
2202 TreeView.Items.Clear;
2203 try
2204 if not inBBS.IsBoardFileRead then
2205 GikoSys.ReadBoardFile( inBBS );
2206 try
2207 if SplashWindow <> nil then
2208 SplashWindow.ProgressBar.Max := inBBS.Count;
2209 except
2210 end;
2211
2212 // 鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?
2213 if ( GikoSys.Setting.BBSSortIndex <> 0 ) or ( GikoSys.Setting.BBSSortOrder <> true ) then begin
2214 Sort.SortOrder := true;
2215 Sort.SortIndex := 0;
2216 Sort.SortNoFlag := true;
2217 inBBS.Sort(CategorySortProc);
2218 end;
2219
2220 Root := TreeView.Items.Add( nil, inBBS.Title );
2221 Root.ImageIndex := ITEM_ICON_2CH1;
2222 Root.SelectedIndex := ITEM_ICON_2CH2;
2223 Root.Data := inBBS;
2224 for i := 0 to inBBS.Count - 1 do begin
2225 Category := TCategory(inBBS.Items[i]);
2226 CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
2227 CategoryNode.Data := Category;
2228 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
2229 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
2230
2231 // 鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃?鐃?
2232 if ( GikoSys.Setting.CategorySortIndex <> 0 ) or ( GikoSys.Setting.CategorySortOrder <> true ) then begin
2233 Sort.SortOrder := true;
2234 Sort.SortIndex := 0;
2235 Sort.SortNoFlag := true;
2236 Category.CustomSort(BoardSortProc);
2237 end;
2238
2239 for j := 0 to Category.Count - 1 do begin
2240 Board := TBoard(Category.Items[j]);
2241 Board.BeginUpdate;
2242 BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
2243 BoardNode.Data := Board;
2244 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
2245 if not Board.IsLogFile then begin
2246 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
2247 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
2248 end else begin
2249 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
2250 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
2251 for k := 0 to Board.Count - 1 do begin
2252 if Board.Items[ k ].IsLogFile then begin
2253 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
2254 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
2255
2256 Break;
2257 end;
2258 end;
2259 end;
2260 Board.EndUpdate;
2261 end;
2262
2263 CategoryNode.Expanded := Category.NodeExpand;
2264
2265 if SplashWindow <> nil then begin
2266 SplashWindow.ProgressBar.StepIt;
2267 Application.ProcessMessages;
2268 end;
2269 end;
2270 finally
2271 TreeView.Items.EndUpdate;
2272 end;
2273 end;
2274
2275 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
2276 const
2277 COLUMN: array[0..0] of string = ('鐃?鐃?鐃?鐃緒申鐃緒申');
2278 var
2279 ListColumn: TListColumn;
2280 i: Integer;
2281 begin
2282 ListView.Items.BeginUpdate;
2283 try
2284 Screen.Cursor := crHourGlass;
2285
2286 ListView.Columns.Clear;
2287 for i := 0 to Length(COLUMN) - 1 do begin
2288 ListColumn := ListView.Columns.Add;
2289 ListColumn.Caption := COLUMN[i];
2290 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
2291 end;
2292
2293 ListView.Items.Count := 0;
2294 ListView.Items.Clear;
2295 ListView.Items.Count := ABBS2ch.Count;
2296
2297 // UpFolderAction.Enabled := False;
2298 // AllItemAction.Enabled := False;
2299 // LogItemAction.Enabled := False;
2300 // NewItemAction.Enabled := False;
2301 // SelectItemAction.Enabled := False;
2302 // ListDownloadToolButton.Enabled := False;
2303 // BoardReservToolButton.Enabled := False;
2304 // ListThreadDownloadToolButton.Enabled := False;
2305
2306 ListNameLabel.Caption := ABBS2ch.Title;
2307 FolderImage.Picture := nil;
2308 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
2309
2310 FSortIndex := GikoSys.Setting.BBSSortIndex;
2311 FSortOrder := GikoSys.Setting.BBSSortOrder;
2312 if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
2313 ListViewSort(nil, ListView.Column[FSortIndex]);
2314
2315 Result := ABBS2ch.Count;
2316 finally
2317 Screen.Cursor := crDefault;
2318 ListView.Items.EndUpdate;
2319 end;
2320 end;
2321
2322 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
2323 const
2324 COLUMN: array[0..2] of string = ('鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申');
2325 var
2326 ListColumn: TListColumn;
2327 i: Integer;
2328 begin
2329 ListView.Items.BeginUpdate;
2330 try
2331 Screen.Cursor := crHourGlass;
2332
2333 ListView.Columns.Clear;
2334 for i := 0 to Length(COLUMN) - 1 do begin
2335 ListColumn := ListView.Columns.Add;
2336 ListColumn.Caption := COLUMN[i];
2337 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
2338 end;
2339
2340 ListView.Items.Count := 0;
2341 ListView.Items.Clear;
2342 ListView.Items.Count := Category.Count;
2343
2344 // UpFolderAction.Enabled := True;
2345 // AllItemAction.Enabled := False;
2346 // LogItemAction.Enabled := False;
2347 // NewItemAction.Enabled := False;
2348 // SelectItemAction.Enabled := False;
2349 // ListDownloadToolButton.Enabled := False;
2350 // BoardReservToolButton.Enabled := False;
2351 // ListThreadDownloadToolButton.Enabled := False;
2352
2353 ListNameLabel.Caption := Category.Title;
2354 FolderImage.Picture := nil;
2355 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2356
2357 FSortIndex := GikoSys.Setting.CategorySortIndex;
2358 FSortOrder := GikoSys.Setting.CategorySortOrder;
2359 if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
2360 ListViewSort(nil, ListView.Column[FSortIndex]);
2361
2362 Result := Category.Count;
2363 finally
2364 Screen.Cursor := crDefault;
2365 ListView.Items.EndUpdate;
2366 end;
2367 end;
2368
2369 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2370 const
2371 COLUMN: array[0..7] of string = ('鐃?鐃緒申鐃?鐃?鐃緒申', '鐃?鐃?鐃緒申鐃?', '鐃緒申鐃緒申', '鐃?鐃緒申',
2372 '鐃緒申鐃緒申', '鐃緒申鐃緒申鐃?鐃緒申', '鐃緒申鐃緒申鐃緒申鐃緒申', '鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申');
2373 COLUMN_NONACQUIREDCOUNT: string = '鐃緒申鐃緒申鐃緒申';
2374 COLUMN_ALIGNMENT: array[0..7] of TAlignment = (taLeftJustify, taRightJustify,
2375 taRightJustify, taRightJustify,
2376 taRightJustify, taLeftJustify,
2377 taLeftJustify, taLeftJustify);
2378 //No, 鐃?鐃緒申鐃?鐃?鐃緒申, 鐃?鐃?鐃緒申鐃?, 鐃緒申鐃緒申鐃?鐃緒申, 鐃緒申鐃緒申鐃緒申鐃緒申
2379 var
2380 ListColumn: TListColumn;
2381 i: Integer;
2382 begin
2383 ListView.Items.BeginUpdate;
2384 try
2385 Screen.Cursor := crHourGlass;
2386
2387 // 鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2388 // 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2389 if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2390 begin
2391 ListView.Columns.Clear;
2392 for i := 0 to Length(COLUMN) - 1 do begin
2393 ListColumn := ListView.Columns.Add;
2394 ListColumn.Caption := COLUMN[i];
2395 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2396 ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2397 end;
2398 end;
2399 if GikoSys.Setting.NonAcquiredCount then
2400 ListView.Columns[2].Caption := COLUMN_NONACQUIREDCOUNT
2401 else
2402 ListView.Columns[2].Caption := COLUMN[2];
2403
2404 ListView.Items.Count := 0;
2405 ListView.Items.Clear;
2406
2407 case GikoForm.ViewType of
2408 gvtAll: ListView.Items.Count := Board.Count;
2409 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2410 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2411 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2412 end;
2413
2414 ListNameLabel.Caption := Board.Title;
2415 FolderImage.Picture := nil;
2416 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2417
2418 FSortIndex := GikoSys.Setting.BoardSortIndex;
2419 FSortOrder := GikoSys.Setting.BoardSortOrder;
2420 if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
2421 ListViewSort(nil, ListView.Column[FSortIndex]);
2422
2423 Result := Board.Count;
2424 finally
2425 Screen.Cursor := crDefault;
2426 ListView.Items.EndUpdate;
2427 end;
2428 end;
2429
2430 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2431 var
2432 // FileName: string;
2433 // DateTime: TDateTime;
2434 BoardCnt: Integer;
2435 BBS: TBBS;
2436 Category: TCategory;
2437 Board: TBoard;
2438 ThreadItem: TThreadItem;
2439 RepStr: string;
2440 ActivListObj : TObject;
2441 begin
2442 ActivListObj := ActiveList;
2443 if ActivListObj is TBBS then begin
2444 BBS := TBBS(ActivListObj);
2445
2446 ListView.StateImages := nil;
2447
2448 if BBS = nil then Exit;
2449 if BBS.Count <= 0 then Exit;
2450 if Item = nil then Exit;
2451 if Item.Index >= BBS.Count then Exit;
2452 if ListView.Items.Count = 0 then Exit;
2453
2454 if not (BBS.Items[Item.index] is TCategory) then Exit;
2455 Category := TCategory(BBS.Items[Item.index]);
2456
2457 if Category = nil then Exit;
2458
2459 if ListNumberVisibleAction.Checked then
2460 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2461 else
2462 Item.Caption := Category.Title;
2463
2464 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2465 Item.Data := Category;
2466 end else if ActivListObj is TCategory then begin
2467 Category := TCategory(ActivListObj);
2468
2469 ListView.StateImages := nil;
2470
2471 if Category = nil then Exit;
2472 if Category.Count <= 0 then Exit;
2473 if Item = nil then Exit;
2474 if Item.Index >= Category.Count then Exit;
2475 if ListView.Items.Count = 0 then Exit;
2476
2477 if not (Category.Items[Item.Index] is TBoard) then Exit;
2478 Board := TBoard(Category.Items[Item.Index]);
2479
2480 if Board = nil then Exit;
2481
2482 if ListNumberVisibleAction.Checked then
2483 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2484 else
2485 Item.Caption := Board.Title;
2486
2487 if Item.SubItems.Count <> 2 then begin
2488 Item.SubItems.Clear;
2489 Item.SubItems.Add('');
2490 Item.SubItems.Add('');
2491 end;
2492
2493 Item.ImageIndex := ITEM_ICON_BOARD1;
2494
2495 if Board.Round then
2496 Item.SubItems[0] := Board.RoundName // '鐃?鐃緒申'
2497 else
2498 Item.SubItems[0] := '';
2499
2500 if Board.RoundDate = ZERO_DATE then begin
2501 Item.SubItems[1] := '';
2502 end else
2503 Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2504 Item.Data := Board;
2505 end else if ActivListObj is TBoard then begin
2506 Board := TBoard(ActivListObj);
2507
2508 if GikoSys.Setting.ListIconVisible then
2509 ListView.StateImages := StateIconImageList
2510 else
2511 ListView.StateImages := nil;
2512
2513 case GikoForm.ViewType of
2514 gvtAll: BoardCnt := Board.Count;
2515 gvtLog: BoardCnt := Board.GetLogThreadCount;
2516 gvtNew: BoardCnt := Board.GetNewThreadCount;
2517 gvtUser: BoardCnt := Board.GetUserThreadCount;
2518 else
2519 BoardCnt := 0;
2520 end;
2521
2522 // if Board = nil then Exit;
2523 if BoardCnt <= 0 then Exit;
2524 if Item = nil then Exit;
2525 if Item.Index > BoardCnt then Exit;
2526 if ListView.Items.Count = 0 then Exit;
2527
2528 // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2529
2530 ThreadItem := nil;
2531 case GikoForm.ViewType of
2532 gvtAll: if Item.Index >= Board.Count then Exit else
2533 ThreadItem := TThreadItem(Board.Items[Item.Index]);
2534 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2535 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2536 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2537 end;
2538
2539 if ThreadItem = nil then Exit;
2540
2541 // if ListNumberVisibleAction.Checked then
2542 // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2543 // else
2544 RepStr := ThreadItem.Title;
2545 RepStr := CustomStringReplace(RepStr, '&lt;', '<' );
2546 RepStr := CustomStringReplace(RepStr, '&gt;', '>' );
2547 RepStr := CustomStringReplace(RepStr, '&quot;', '"' );
2548 RepStr := CustomStringReplace(RepStr, '&amp;', '&' );
2549 //RepStr := StringReplace(RepStr, '鐃緒申鐃?', ',', [rfReplaceAll]);
2550
2551 if Item.SubItems.Count <> 7 then begin
2552 Item.SubItems.Clear;
2553 Item.SubItems.Add('');
2554 Item.SubItems.Add('');
2555 Item.SubItems.Add('');
2556 Item.SubItems.Add('');
2557 Item.SubItems.Add('');
2558 Item.SubItems.Add('');
2559 Item.SubItems.Add('');
2560 end;
2561
2562 if ListNumberVisibleAction.Checked then
2563 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2564 else
2565 Item.Caption := RepStr;
2566
2567 case ThreadItem.AgeSage of
2568 gasNone: Item.StateIndex := -1;
2569 gasNew: Item.StateIndex := 0;
2570 gasAge: Item.StateIndex := 1;
2571 gasSage: Item.StateIndex := 2;
2572 end;
2573
2574 if ThreadItem.IsLogFile then begin
2575 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2576 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2577 if GikoSys.Setting.NonAcquiredCount then
2578 Item.SubItems[1] := IntToStr(ThreadItem.AllResCount - ThreadItem.Count)
2579 else
2580 Item.SubItems[1] := IntToStr(ThreadItem.Count);
2581 if ThreadItem.NewResCount = 0 then
2582 Item.SubItems[2] := ''
2583 else
2584 Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2585 Item.SubItems[3] := '';
2586 if ThreadItem.Round then
2587 Item.SubItems[4] := ThreadItem.RoundName
2588 else
2589 Item.SubItems[4] := '';
2590 if ThreadItem.RoundDate = ZERO_DATE then begin
2591 Item.SubItems[5] := '';
2592 end else
2593 Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2594 if ThreadItem.NewArrival then
2595 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2596 if ThreadItem.CreateDate = ZERO_DATE then begin
2597 Item.SubItems[6] := '';
2598 end else
2599 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2600
2601 end else begin
2602 Item.ImageIndex := ITEM_ICON_THREAD1;
2603 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2604 Item.SubItems[1] := '';
2605 Item.SubItems[2] := '';
2606 Item.SubItems[3] := '';
2607 Item.SubItems[4] := '';
2608 Item.SubItems[5] := '';
2609 if not GikoSys.Setting.CreationTimeLogs then
2610 if ThreadItem.CreateDate = ZERO_DATE then
2611 Item.SubItems[6] := ''
2612 else
2613 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2614
2615 end;
2616
2617 Item.Data := ThreadItem;
2618 end;
2619 end;
2620
2621 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2622 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2623 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2624 var Index: Integer);
2625 begin
2626
2627 //
2628 end;
2629
2630 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2631 EndIndex: Integer);
2632 begin
2633 //
2634 end;
2635
2636 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2637 EndIndex: Integer; OldState, NewState: TItemStates);
2638 begin
2639 //
2640 end;
2641
2642 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2643 var
2644 p: TPoint;
2645 s: string;
2646 tmp2: string;
2647 URL: string;
2648 ATitle: Boolean;
2649
2650 threadItem : TThreadItem;
2651 board : TBoard;
2652 Protocol, Host, Path, Document, Port, Bookmark: string;
2653
2654 wkInt: Integer;
2655 wkIntSt: Integer;
2656 wkIntTo: Integer;
2657 ActiveFileName: string;
2658 e: IHTMLElement;
2659 Ext: string;
2660 buf: string;
2661 PathRec: TPathRec;
2662 begin
2663 if not( TObject(Sender) is TWebBrowser )then
2664 Exit;
2665 try
2666 try
2667 if (TWebBrowser(Sender) <> nil) and (not TWebBrowser(Sender).Busy) and (Assigned(TWebBrowser(Sender).Document)) then begin
2668 if LowerCase(OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset) <> 'shift_jis' then begin
2669 OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset := 'shift_jis';
2670 end;
2671 end;
2672 except
2673 end;
2674 finally
2675 end;
2676 if PreviewTimer.Enabled then
2677 PreviewTimer.Enabled := False;
2678 Application.CancelHint;
2679 try
2680 if GetActiveContent <> nil then
2681 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2682 else
2683 ActiveFileName := '';
2684 except
2685 FActiveContent := nil;
2686 Exit;
2687 end;
2688
2689 StatusBar.Panels[1].Text := Text;
2690
2691 if FHint <> nil then begin
2692 FHint.ReleaseHandle;
2693 FHint.ClearAllRes;
2694 end;
2695 if FPreviewBrowser <> nil then
2696 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2697
2698 if not GikoSys.Setting.UnActivePopup then
2699 if not GikoForm.Active then
2700 Exit;
2701
2702 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2703 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2704
2705 s := '';
2706 Ext := AnsiLowerCase(ExtractFileExt(Text));
2707 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2708 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2709 if FPreviewBrowser = nil then begin
2710 FPreviewBrowser := TPreviewBrowser.Create(Self);
2711 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2712 TOleControl(FPreviewBrowser).Parent := nil;
2713 end;
2714 FPreviewBrowser.Navigate(BLANK_HTML);//鐃?鐃緒申鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2715 FPreviewURL := Text;
2716 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2717 PreviewTimer.Enabled := True;
2718 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2719 if Pos('mailto:', Text) = 1 then begin
2720 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2721 //鐃?鐃?鐃?鐃?鐃?鐃緒申 鐃?鐃?鐃?3鐃緒申466鐃緒申鐃緒申鐃緒申鐃緒申
2722 GetCursorPos(p);
2723 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2724 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2725 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2726 if (Assigned(e)) then begin
2727 tmp2 := ZenToHan(e.Get_outerText);
2728 if (GikoSys.IsNumeric(tmp2)) then begin
2729 //鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?
2730 wkIntSt := StrToInt(tmp2);
2731 wkIntTo := StrToInt(tmp2);
2732 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2733 FHint.PopupType := gptThread;
2734 SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False);
2735 end else begin
2736 FHint.PopupType := gptRaw;
2737 FHint.Caption := s;
2738 end;
2739 end;
2740 end else begin
2741 threadItem := GetActiveContent;
2742 if Pos('about:blank..', Text) = 1 then begin
2743 if AnsiPos('http://jbbs.shitaraba.com/', threadItem.URL) <> 0 then begin
2744 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2745 Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo);
2746 if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then
2747 buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo)
2748 else if( PathRec.FSt <> 0 ) then
2749 buf := IntToStr(PathRec.FSt);
2750 end else if AnsiPos('machi.to/bbs/', threadItem.URL) <> 0 then begin
2751 URL := threaditem.URL;
2752 buf := Copy(Text,AnsiPos('&st=',Text),Length(Text)-AnsiPos('&st=',Text) + 1);
2753 end else begin
2754 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2755 buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text));
2756 end;
2757 URL := URL + buf;
2758 end else begin
2759 URL := Text;
2760 end;
2761 PathRec := Gikosys.Parse2chURL2(URL);
2762 if (PathRec.FNoParam) then begin
2763 PathRec.FSt := 1;
2764 PathRec.FTo := 1;
2765 end else
2766 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2767 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
2768
2769 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
2770
2771 URL := GikoSys.GetBrowsableThreadURL( URL );
2772 wkIntSt := PathRec.FSt;
2773 wkIntTo := PathRec.FTo;
2774
2775 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2776 wkIntSt := 1;
2777 wkIntTo := 1;
2778 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2779 wkIntSt := wkIntTo;
2780 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2781 wkIntTo := wkIntSt;
2782 end else if wkIntSt > wkIntTo then begin
2783 wkInt := wkIntTo;
2784 wkIntTo := wkIntSt;
2785 wkIntSt := wkInt;
2786 end;
2787 //if wkIntSt = 0 then
2788 // wkIntSt := 1;
2789 //if wkINtTo = 0 then
2790 // wkIntTo := 1;
2791 //if PathRec.FFirst then
2792 // wkIntSt := 1;
2793 if PathRec.FStBegin then
2794 wkIntSt := 1;
2795 if PathRec.FToEnd then
2796 wkIntTo := 9999;
2797
2798 //ATitle := ActiveFileName <> PathRec.FKey;
2799 if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
2800 ATitle := false
2801 else
2802 ATitle := true;
2803
2804 threadItem := BBSsFindThreadFromURL( URL );
2805
2806 if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
2807 board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
2808 if board <> nil then begin
2809 if not board.IsThreadDatRead then
2810 GikoSys.ReadSubjectFile( board );
2811 threadItem := board.FindThreadFromFileName( PathRec.FKey + '.dat' );
2812 end;
2813 end;
2814
2815 if threadItem <> nil then begin
2816 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2817 FHint.PopupType := gptThread;
2818 SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2819 end;
2820 end;
2821 end;
2822
2823 //if s <> '' then
2824 // ShowTextPopup(s);
2825 if FHint.PopupType = gptRaw then begin
2826 if FHint.Caption <> '' then
2827 ShowTextPopup;
2828 end else begin
2829 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2830 ShowTextPopup;
2831 end;
2832 end;
2833 end;
2834
2835 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2836 var
2837 SysMenu: HMenu;
2838 //SysMenuApp: HMenu;
2839 begin
2840 FEnabledCloseButton := Enabled;
2841 SysMenu := GetSystemMenu(Handle, False);
2842 //SysMenuApp := GetSystemMenu(Application.Handle, False);
2843
2844 if Enabled then begin
2845 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2846 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2847 end else begin
2848 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2849 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2850 end;
2851
2852 DrawMenuBar(Handle);
2853 //DrawMenuBar(Application.Handle);
2854 end;
2855
2856 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2857 var AllowChange: Boolean);
2858 begin
2859 //鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
2860 // if FTreeType = gtt2ch then
2861 // FSortIndex := -1;
2862 end;
2863
2864 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2865 Shift: TShiftState);
2866 begin
2867 if GetActiveList is TBoard then begin
2868 if Key = VK_BACK then begin
2869 // UpFolderButtonClick(Sender);
2870 end else if Key = VK_SPACE then begin
2871 ListDoubleClick(Shift);
2872 end else if Key = VK_RETURN then begin
2873 ListClick;
2874 end;
2875 end else begin // TBBS, TCategory
2876 if Key = VK_BACK then begin
2877 // UpFolderButtonClick(Sender);
2878 end else if Key = VK_SPACE then begin
2879 ListClick;
2880 end else if Key = VK_RETURN then begin
2881 ListDoubleClick(Shift);
2882 end;
2883 end;
2884 end;
2885
2886 function TGikoForm.GetHttpState: Boolean;
2887 begin
2888 Result := FHttpState;
2889 end;
2890
2891 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2892 Column: TListColumn);
2893 var
2894 i: Integer;
2895 wkBBS: TBBS;
2896 wkCategory: TCategory;
2897 wkBoard: TBoard;
2898 begin
2899 if FSortIndex = Column.Index then
2900 FSortOrder := not FSortOrder
2901 else
2902 FSortOrder := False;
2903 ListViewSort(Sender, Column);
2904 end;
2905
2906 procedure TGikoForm.ListViewSort(Sender: TObject; Column: TListColumn);
2907 var
2908 i: Integer;
2909 wkBBS: TBBS;
2910 wkCategory: TCategory;
2911 wkBoard: TBoard;
2912 begin
2913 for i := 0 to ListView.Columns.Count - 1 do
2914 ListView.Column[i].ImageIndex :=