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.394 - (show annotations) (download) (as text)
Sun Aug 15 16:06:59 2004 UTC (19 years, 8 months ago) by yoffy
Branch: MAIN
Changes since 1.393: +53 -17 lines
File MIME type: text/x-pascal
- 履歴の削除に同意を求めるようになった。
- お気に入り、ログ、履歴の削除に関するダイアログを
 アイコンは「!」に、[いいえ] をデフォルトに、SHIFT キーでダイアログの省略で統一。

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