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.392 - (show annotations) (download) (as text)
Thu Aug 12 16:31:46 2004 UTC (19 years, 8 months ago) by yoffy
Branch: MAIN
Changes since 1.391: +1 -0 lines
File MIME type: text/x-pascal
リストツールバーのボタン配置を変更すると、
再起動または SelectComboBox のサイズを変えるまでシェブロンの位置がおかしくなるバグの修正。

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