6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7 OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils, Math,
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;
27 TGikoTreeType = (gttNone, gtt2ch, gttHistory, gttFavorite);
28 TToolBarSettingSenderType = (tssNone, tssMain, tssList, tssBrowser);
29 TMinimizeType = (mtNone, mtMinimizing, mtMinimized);
31 TBrowserRecord = class;
33 TGikoForm = class(TForm)
34 StatusBar: TStatusBar;
37 TreeSplitter: TSplitter;
40 ThreadMainPanel: TPanel;
41 ListSplitter: TSplitter;
43 ListView: TGikoListView;
47 MessageHideButton: TSpeedButton;
48 MessageListView: TListView;
49 MessageSplitter: TSplitter;
51 SpeedButton1: TSpeedButton;
53 CabinetSelectToolButton: TToolButton;
54 HistoryToolBar: TToolBar;
55 ToolButton15: TToolButton;
56 ToolButton18: TToolButton;
57 ItemIcon16: TImageList;
58 ItemIcon32: TImageList;
59 HotToobarImageList: TImageList;
60 ToobarImageList: TImageList;
61 ItemImageList: TImageList;
62 ActionList: TActionList;
63 LogDeleteAction: TAction;
64 KidokuAction: TAction;
65 StdToolBarVisibleAction: TAction;
66 SearchAction: TAction;
67 GikoNaviWebPageAction: TAction;
70 MsgBarVisibleAction: TAction;
71 StatusBarVisibleAction: TAction;
72 LargeIconAction: TAction;
73 SmallIconAction: TAction;
74 ListIconAction: TAction;
75 DetailIconAction: TAction;
76 CabinetBBSAction: TAction;
77 CabinetHistoryAction: TAction;
78 CabinetVisibleAction: TAction;
79 MidokuAction: TAction;
80 AllSelectAction: TAction;
81 UpFolderAction: TAction;
82 ListNumberVisibleAction: TAction;
83 AllItemAction: TAction;
84 LogItemAction: TAction;
85 NewItemAction: TAction;
86 SelectItemAction: TAction;
87 ShowThreadAction: TAction;
91 DeleteMenu: TMenuItem;
93 KidokuMenu: TMenuItem;
94 MidokuMenu: TMenuItem;
95 AllSelectMenu: TMenuItem;
97 StdToolBarMenu: TMenuItem;
98 CabinetMenu: TMenuItem;
101 CabinetVisibleMenu: TMenuItem;
102 MessageMenu: TMenuItem;
103 StatusBarMenu: TMenuItem;
105 LargeIconMenu: TMenuItem;
106 SmallIconMenu: TMenuItem;
108 DetailMenu: TMenuItem;
111 RoundMenu: TMenuItem;
113 OptionMenu: TMenuItem;
117 AboutMenu: TMenuItem;
119 BrowserPopupMenu: TPopupMenu;
120 ShowThreadMenu: TMenuItem;
121 ShowBoardMenu: TMenuItem;
122 ShowBoardAction: TAction;
123 ListIconPopupMenu: TPopupMenu;
124 LargeIconPMenu: TMenuItem;
125 SmallIconPMenu: TMenuItem;
126 ListPMenu: TMenuItem;
127 DetailPMenu: TMenuItem;
128 CabinetCloseAction: TAction;
129 ClosePopupMenu: TPopupMenu;
130 CloseMenu: TMenuItem;
131 OptionAction: TAction;
141 RoundAction: TAction;
142 ListPopupMenu: TPopupMenu;
143 ListRoundPMenu: TMenuItem;
144 ListReservPMenu: TMenuItem;
146 ItemRoundPMenu: TMenuItem;
148 KidokuPMenu: TMenuItem;
149 MidokuPMenu: TMenuItem;
150 AllSelectPMenu: TMenuItem;
151 UrlCopyPMenu: TMenuItem;
153 DeletePMenu: TMenuItem;
155 ViewPMenu: TMenuItem;
156 LargeIconLPMenu: TMenuItem;
157 SmallIconLPMenu: TMenuItem;
158 ListLPMenu: TMenuItem;
159 DetailLPMenu: TMenuItem;
163 URLCopyAction: TAction;
167 MsgBarCloseAction: TAction;
168 ScrollTopAction: TAction;
169 ScrollLastAction: TAction;
170 ScrollNewAction: TAction;
171 ScrollKokoAction: TAction;
172 EditorAction: TAction;
174 ItemReloadAction: TAction;
175 BrowserMaxAction: TAction;
187 SelectListReloadAction: TAction;
188 SelectThreadReloadAction: TAction;
189 KokoPopupMenu: TPopupMenu;
190 KokomadePMenu: TMenuItem;
192 MenuItem1: TMenuItem;
193 MenuItem2: TMenuItem;
194 BrowserTabCloseAction: TAction;
195 BrowserTabPopupMenu: TPopupMenu;
197 KokomadeAction: TAction;
198 ZenbuAction: TAction;
199 KokoResAction: TAction;
200 SelectItemURLCopyAction: TAction;
201 SelectReservAction: TAction;
202 NotSelectTabCloseAction: TAction;
206 TreePopupMenu: TPopupMenu;
207 TreeSelectThreadPupupMenu: TMenuItem;
208 TreeSelectBoardPupupMenu: TMenuItem;
210 TreeSelectURLPupupMenu: TMenuItem;
211 TreeSelectBoradReload: TAction;
212 TreeSelectThreadReload: TAction;
213 TreeSelectURLCopy: TAction;
214 ListToolBarVisibleAction: TAction;
215 BrowserToolBarVisibleAction: TAction;
219 BrowserBottomPanel: TGikoPanel;
220 CabinetSelectPopupMenu: TPopupMenu;
222 ItemReservPMenu: TMenuItem;
223 RoundNamePopupMenu: TPopupMenu;
224 SelectNewRoundName: TAction;
225 SelectDeleteRound: TAction;
226 NewBoardAction: TAction;
229 LoginAction: TAction;
231 KeySettingAction: TAction;
233 AllTabCloseAction: TAction;
241 MessageImageList: TImageList;
242 ProgressBar: TProgressBar;
243 ArrangeAction: TAction;
245 NameURLCopyAction: TAction;
246 SelectItemNameURLCopyAction: TAction;
247 NameUrlCopyPMenu: 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;
285 BrowserNameToolBar: TToolBar;
286 ItemBoardImage: TImage;
287 BrowserBoardNameLabel: TLabel;
289 BrowserNameLabel: TLabel;
290 ActiveLogDeleteAction: TAction;
294 ListNameBarVisibleAction: TAction;
296 BrowserNameBarVisibleAction: TAction;
299 TreeSelectNameURLCopy: TAction;
300 TreeSelectNameURLPupupMenu: TMenuItem;
303 PaneInitAction: TAction;
305 BrowserTabToolBar: TToolBar;
306 BrowserTab: TTabControl;
307 ToolButton7: TToolButton;
308 BrowserMinAction: TAction;
311 SelectTextClearAction: TAction;
312 MailTextClearAction: TAction;
313 NameTextClearAction: TAction;
317 LeftmostTabSelectAction: TAction;
318 LeftTabSelectAction: TAction;
319 RightTabSelectAction: TAction;
320 RightmostTabSelectAction: TAction;
326 FavoriteMenu: TMenuItem;
327 FavoriteAddAction: TAction;
329 BoardFavoriteAddMenu: TMenuItem;
330 BoardFavoriteAddAction: TAction;
331 ThreadFavoriteAddAction: TAction;
332 ThreadFavoriteAddMenu: TMenuItem;
333 TreeSelectFavoriteAddAction: TAction;
335 TreeSelectFavoriteAddPupupMenu: TMenuItem;
336 FavoriteArrangeAction: TAction;
337 FavoriteTreeView: TTreeView;
338 StateIconImageList: TImageList;
340 TopRightPanel: TPanel;
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;
361 BrowserTabVisibleAction: TAction;
364 BrowserTabTopAction: TAction;
365 BrowserTabBottomAction: TAction;
369 BrowserTabTabStyleAction: TAction;
370 BrowserTabButtonStyleAction: TAction;
371 BrowserTabFlatStyleAction: TAction;
375 PreviewTimer: TTimer;
376 MonazillaWebPageAction: TAction;
377 MonazillaWebPageAction1: TMenuItem;
378 GikoHelpAction: TAction;
381 KotehanAction: TAction;
383 LinkBarVisibleAction: TAction;
387 ChevronPopupMenu: TPopupMenu;
388 BBS2chWebPageAction: TAction;
391 GikoFolderOpenAction: TAction;
393 LinkToolBar: TToolBar;
395 ToolButton8: TToolButton;
396 ToolButton10: TToolButton;
397 ThreadEditorAction: TAction;
401 LinkBarPopupMenu: TPopupMenu;
402 ToolBarSettingAction: TAction;
404 ToolButton12: TToolButton;
405 ToolButton14: TToolButton;
406 ThreadPopupMenu: TPopupMenu;
407 MenuItem4: TMenuItem;
408 MenuItem5: TMenuItem;
409 MenuItem6: TMenuItem;
411 NameCopyAction: TAction;
412 BoardIEAction: TAction;
414 SelectItemNameCopyAction: TAction;
415 SelectItemNameCopyAction1: TMenuItem;
419 SelectComboBox: TComboBox;
420 MainCoolBarPopupMenu: TPopupMenu;
421 StdToolBarVisiblePMenu: TMenuItem;
422 AddressToolBarVisiblePMenu: TMenuItem;
423 LinkToolBarVisiblePMenu: TMenuItem;
444 SelectItemToolButton: TToolButton;
445 SelectResToolButton: TToolButton;
446 SelectResAction: TAction;
447 ToolButton16: TToolButton;
448 AllResAction: TAction;
449 AllResToolButton: TToolButton;
457 ReloadAction: TAction;
458 GoFowardAction: TAction;
459 GoBackAction: TAction;
460 SelectComboBoxSplitter: TImage;
461 IndividualAbon1: TMenuItem;
463 IndividualAbon2: TMenuItem;
465 CancellIndividualAbon: TAction;
466 AntiIndividualAbon: TMenuItem;
471 SearchBoardName: TMenuItem;
472 TreeSelectLogDeleteSeparator: TMenuItem;
473 TreeSelectSearchBoardName: TAction;
474 CabinetFavoriteAction: TAction;
477 FavoriteTreePopupMenu: TPopupMenu;
478 FavoriteTreeViewRenameAction: TAction;
479 FavoriteTreeRenamePopupMenu: TMenuItem;
480 FavoriteTreeViewNewFolderAction: TAction;
481 FavoriteTreeNewFolderPopupMenu: TMenuItem;
483 FavoriteTreeViewDeleteAction: TAction;
484 FavoriteTreeDeletePopupMenu: TMenuItem;
485 FavoriteToolBar: TToolBar;
486 ToolButton17: TToolButton;
487 ToolButton19: TToolButton;
488 FavoriteTreeViewBrowseFolderAction: TAction;
489 FavoriteTreeBrowseFolderPopupMenu: TMenuItem;
491 FavoriteTreeReloadPopupMenu: TMenuItem;
493 FavoriteTreeURLCopyPopupMenu: TMenuItem;
494 FavoriteTreeNameCopyPopupMenu: TMenuItem;
495 FavoriteTreeLogDeletePopupMenu: TMenuItem;
497 FavoriteTreeNameURLCopyPopupMenu: TMenuItem;
498 FavoriteTreeViewReloadAction: TAction;
499 FavoriteTreeViewURLCopyAction: TAction;
500 FavoriteTreeViewNameCopyAction: TAction;
501 FavoriteTreeViewNameURLCopyAction: TAction;
502 FavoriteTreeViewLogDeleteAction: TAction;
503 OnlyAHundredRes: TAction;
504 ToolButton20: TToolButton;
505 AHundredResButton: TToolButton;
507 ExportFavoriteFileAction1: TMenuItem;
508 ExportFavoriteFile: TFileSaveAs;
509 ToolButton21: TToolButton;
510 CabinetBBSToolButton: TToolButton;
511 ToolButton23: TToolButton;
512 ToolButton24: TToolButton;
515 FavoriteTreeViewBrowseBoardAction: TAction;
516 FavoriteTreeViewBrowseThreadAction: TAction;
517 UpBoardAction: TAction;
527 TreeSelectLogDeletePopupMenu: TMenuItem;
529 BBSSelectPopupMenu: TPopupMenu;
530 PlugInMenu: TMenuItem;
531 TmpToolBar: TToolBar;
532 TreeSelectNameCopy: TAction;
533 TreeSelectNamePupupMenu: TMenuItem;
534 Browser: TWebBrowser;
535 BrowserPanel: TPanel;
536 SetFocusForBrowserAction: TAction;
537 SetFocusForThreadListAction: TAction;
538 SetFocusForCabinetAction: TAction;
540 ThreadlistMaxAndFocusAction: TAction;
541 BrowserMaxAndFocusAction: TAction;
542 UpBoardButton: TToolButton;
544 procedure FormCreate(Sender: TObject);
545 procedure FormDestroy(Sender: TObject);
546 procedure CabinetPanelHide(Sender: TObject);
547 procedure FormClose(Sender: TObject; var Action: TCloseAction);
548 procedure ListViewData(Sender: TObject; Item: TListItem);
549 procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
550 const FindString: String; const FindPosition: TPoint;
551 FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
552 Wrap: Boolean; var Index: Integer);
553 procedure ListViewDataHint(Sender: TObject; StartIndex,
555 procedure ListViewDataStateChange(Sender: TObject; StartIndex,
556 EndIndex: Integer; OldState, NewState: TItemStates);
557 procedure BrowserStatusTextChange(Sender: TObject;
558 const Text: WideString);
559 procedure BrowserTitleChange(Sender: TObject; const Text: WideString);
560 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
561 procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
562 var AllowChange: Boolean);
563 procedure ListViewKeyDown(Sender: TObject; var Key: Word;
565 procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
566 procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
567 Button: TToolButton; State: TCustomDrawState;
568 var DefaultDraw: Boolean);
569 procedure BrowserBeforeNavigate2(Sender: TObject;
570 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
571 Headers: OleVariant; var Cancel: WordBool);
572 procedure ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
573 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
574 var DefaultDraw: Boolean);
575 procedure TreeViewCustomDraw(Sender: TCustomTreeView;
576 const ARect: TRect; var DefaultDraw: Boolean);
577 procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
578 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
579 procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
580 procedure TreeViewDblClick(Sender: TObject);
581 procedure ListViewCustomDraw(Sender: TCustomListView;
582 const ARect: TRect; var DefaultDraw: Boolean);
583 procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
584 Shift: TShiftState; X, Y: Integer);
585 procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
586 procedure MessageListViewResize(Sender: TObject);
587 procedure ExitActionExecute(Sender: TObject);
588 procedure AllSelectActionExecute(Sender: TObject);
589 procedure StdToolBarVisibleActionExecute(Sender: TObject);
590 procedure MsgBarVisibleActionExecute(Sender: TObject);
591 procedure StatusBarVisibleActionExecute(Sender: TObject);
592 procedure LargeIconActionExecute(Sender: TObject);
593 procedure SmallIconActionExecute(Sender: TObject);
594 procedure ListIconActionExecute(Sender: TObject);
595 procedure DetailIconActionExecute(Sender: TObject);
596 procedure SearchActionExecute(Sender: TObject);
597 procedure OptionActionExecute(Sender: TObject);
598 procedure GikoNaviWebPageActionExecute(Sender: TObject);
599 procedure AboutActionExecute(Sender: TObject);
600 procedure CabinetHistoryActionExecute(Sender: TObject);
601 procedure CabinetVisible( isVisible : Boolean );
602 procedure CabinetVisibleActionExecute(Sender: TObject);
603 procedure AllItemActionExecute(Sender: TObject);
604 procedure LogItemActionExecute(Sender: TObject);
605 procedure NewItemActionExecute(Sender: TObject);
606 procedure SelectItemActionExecute(Sender: TObject);
607 procedure ListNumberVisibleActionExecute(Sender: TObject);
608 procedure UpFolderActionExecute(Sender: TObject);
609 procedure IconStyleExecute(Sender: TObject);
610 procedure RoundActionExecute(Sender: TObject);
611 procedure StopActionExecute(Sender: TObject);
612 procedure MsgBarCloseActionExecute(Sender: TObject);
613 procedure BrowserMaxActionExecute(Sender: TObject);
614 procedure ScrollTopActionExecute(Sender: TObject);
615 procedure ScrollLastActionExecute(Sender: TObject);
616 procedure ScrollNewActionExecute(Sender: TObject);
617 procedure ScrollKokoActionExecute(Sender: TObject);
618 procedure EditorActionExecute(Sender: TObject);
619 procedure IEActionExecute(Sender: TObject);
620 procedure ShowThreadActionExecute(Sender: TObject);
621 procedure ShowBoardActionExecute(Sender: TObject);
622 procedure URLCopyActionExecute(Sender: TObject);
623 procedure ItemReloadActionExecute(Sender: TObject);
624 procedure SelectListReloadActionExecute(Sender: TObject);
625 procedure SelectThreadReloadActionExecute(Sender: TObject);
626 procedure SelectListReloadActionUpdate(Sender: TObject);
627 procedure AllItemActionUpdate(Sender: TObject);
628 procedure LogItemActionUpdate(Sender: TObject);
629 procedure NewItemActionUpdate(Sender: TObject);
630 procedure SelectItemActionUpdate(Sender: TObject);
631 procedure UpFolderActionUpdate(Sender: TObject);
632 procedure FormResize(Sender: TObject);
633 procedure ScrollTopActionUpdate(Sender: TObject);
634 procedure ScrollLastActionUpdate(Sender: TObject);
635 procedure ScrollNewActionUpdate(Sender: TObject);
636 procedure ScrollKokoActionUpdate(Sender: TObject);
637 procedure EditorActionUpdate(Sender: TObject);
638 procedure IEActionUpdate(Sender: TObject);
639 procedure ShowThreadActionUpdate(Sender: TObject);
640 procedure ShowBoardActionUpdate(Sender: TObject);
641 procedure SelectThreadReloadActionUpdate(Sender: TObject);
642 procedure ItemReloadActionUpdate(Sender: TObject);
643 procedure LogDeleteActionExecute(Sender: TObject);
644 procedure KokomadeActionExecute(Sender: TObject);
645 procedure ZenbuActionExecute(Sender: TObject);
646 procedure KokoResActionExecute(Sender: TObject);
647 procedure ListPopupMenuPopup(Sender: TObject);
648 procedure SelectItemURLCopyActionExecute(Sender: TObject);
649 procedure SelectItemURLCopyActionUpdate(Sender: TObject);
650 procedure AllSelectActionUpdate(Sender: TObject);
651 procedure LogDeleteActionUpdate(Sender: TObject);
652 procedure BrowserTabCloseActionExecute(Sender: TObject);
653 procedure NotSelectTabCloseActionExecute(Sender: TObject);
654 procedure TreeSelectBoradReloadExecute(Sender: TObject);
655 procedure TreeSelectThreadReloadExecute(Sender: TObject);
656 procedure TreeSelectURLCopyExecute(Sender: TObject);
657 procedure TreePopupMenuPopup(Sender: TObject);
658 procedure ListToolBarVisibleActionExecute(Sender: TObject);
659 procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
660 procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
661 var Cancel: WordBool);
662 procedure ListSplitterCanResize(Sender: TObject; var NewSize: Integer;
663 var Accept: Boolean);
664 procedure ListSplitterMoved(Sender: TObject);
665 procedure BrowserTabChange(Sender: TObject);
666 procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
667 Shift: TShiftState; X, Y: Integer);
668 procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
669 State: TDragState; var Accept: Boolean);
670 procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
671 procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
673 procedure BrowserDocumentComplete(Sender: TObject;
674 const pDisp: IDispatch; var URL: OleVariant);
675 procedure SelectReservActionUpdate(Sender: TObject);
676 procedure RoundNamePopupMenuPopup(Sender: TObject);
677 procedure SelectNewRoundNameExecute(Sender: TObject);
678 procedure SelectDeleteRoundExecute(Sender: TObject);
679 procedure SelectReservActionExecute(Sender: TObject);
680 procedure NewBoardActionExecute(Sender: TObject);
681 procedure LoginActionExecute(Sender: TObject);
682 procedure KeySettingActionExecute(Sender: TObject);
683 procedure AllTabCloseActionExecute(Sender: TObject);
684 procedure ArrangeActionExecute(Sender: TObject);
685 procedure NameURLCopyActionExecute(Sender: TObject);
686 procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
687 procedure URLCopyActionUpdate(Sender: TObject);
688 procedure NameURLCopyActionUpdate(Sender: TObject);
689 procedure BrowserTabCloseActionUpdate(Sender: TObject);
690 procedure NotSelectTabCloseActionUpdate(Sender: TObject);
691 procedure AllTabCloseActionUpdate(Sender: TObject);
692 procedure SelectItemNameURLCopyActionUpdate(Sender: TObject);
693 procedure ActiveLogDeleteActionExecute(Sender: TObject);
694 procedure ActiveLogDeleteActionUpdate(Sender: TObject);
695 procedure ListNameBarVisibleActionExecute(Sender: TObject);
696 procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
697 procedure TreeSelectNameURLCopyExecute(Sender: TObject);
698 procedure PaneInitActionExecute(Sender: TObject);
699 procedure FormShow(Sender: TObject);
700 procedure BrowserTabToolBarResize(Sender: TObject);
701 procedure BrowserMinActionExecute(Sender: TObject);
702 procedure SelectTextClearActionExecute(Sender: TObject);
703 procedure NameTextClearActionExecute(Sender: TObject);
704 procedure MailTextClearActionExecute(Sender: TObject);
705 procedure LeftmostTabSelectActionExecute(Sender: TObject);
706 procedure LeftTabSelectActionExecute(Sender: TObject);
707 procedure RightTabSelectActionExecute(Sender: TObject);
708 procedure RightmostTabSelectActionExecute(Sender: TObject);
709 procedure LeftmostTabSelectActionUpdate(Sender: TObject);
710 procedure LeftTabSelectActionUpdate(Sender: TObject);
711 procedure RightTabSelectActionUpdate(Sender: TObject);
712 procedure RightmostTabSelectActionUpdate(Sender: TObject);
713 procedure FavoriteMenuClick(Sender: TObject);
714 procedure FavoriteAddActionExecute(Sender: TObject);
715 procedure FavoriteAddActionUpdate(Sender: TObject);
716 procedure BoardFavoriteAddActionExecute(Sender: TObject);
717 procedure BoardFavoriteAddActionUpdate(Sender: TObject);
718 procedure ThreadFavoriteAddActionExecute(Sender: TObject);
719 procedure ThreadFavoriteAddActionUpdate(Sender: TObject);
720 procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
721 procedure FavoriteArrangeActionExecute(Sender: TObject);
722 procedure MainCoolBarResize(Sender: TObject);
723 procedure MoveToActionExecute(Sender: TObject);
724 procedure AddressToolBarResize(Sender: TObject);
725 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
727 procedure AddressBarVisibleActionExecute(Sender: TObject);
728 procedure BrowserEnter(Sender: TObject);
729 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
730 procedure BrowserTabVisibleActionExecute(Sender: TObject);
731 procedure BrowserTabTopActionExecute(Sender: TObject);
732 procedure BrowserTabBottomActionExecute(Sender: TObject);
733 procedure BrowserTabTabStyleActionExecute(Sender: TObject);
734 procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
735 procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
736 procedure PreviewTimerTimer(Sender: TObject);
737 procedure MessageHideButtonClick(Sender: TObject);
738 procedure MonazillaWebPageActionExecute(Sender: TObject);
739 procedure GikoHelpActionExecute(Sender: TObject);
740 procedure ToolButton18Click(Sender: TObject);
741 procedure KotehanActionExecute(Sender: TObject);
742 procedure LinkBarVisibleActionExecute(Sender: TObject);
743 procedure BBS2chWebPageActionExecute(Sender: TObject);
744 procedure GikoFolderOpenActionExecute(Sender: TObject);
745 procedure MainCoolBarBandInfo(Sender: TObject;
746 var BandInfo: PReBarBandInfoA);
747 procedure MainCoolBarChevronClick(Sender: TObject;
748 RebarChevron: PNMRebarChevron);
749 procedure ListCoolBarBandInfo(Sender: TObject;
750 var BandInfo: PReBarBandInfoA);
751 procedure ListCoolBarChevronClick(Sender: TObject;
752 RebarChevron: PNMRebarChevron);
753 procedure BrowserCoolBarBandInfo(Sender: TObject;
754 var BandInfo: PReBarBandInfoA);
755 procedure BrowserCoolBarChevronClick(Sender: TObject;
756 RebarChevron: PNMRebarChevron);
757 procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
758 procedure ThreadEditorActionExecute(Sender: TObject);
759 procedure ThreadEditorActionUpdate(Sender: TObject);
760 procedure ToolBarSettingActionExecute(Sender: TObject);
761 procedure NameCopyActionExecute(Sender: TObject);
762 procedure BoardIEActionExecute(Sender: TObject);
763 procedure SelectItemNameCopyActionExecute(Sender: TObject);
764 procedure SelectItemNameCopyActionUpdate(Sender: TObject);
765 procedure BoardIEActionUpdate(Sender: TObject);
766 procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
767 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
768 procedure NameCopyActionUpdate(Sender: TObject);
769 procedure SelectComboBoxChange(Sender: TObject);
770 procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
772 procedure SelectComboBoxExit(Sender: TObject);
773 procedure NG1Click(Sender: TObject);
774 procedure SelectResActionExecute(Sender: TObject);
775 procedure SelectResActionUpdate(Sender: TObject);
776 procedure FormKeyUp(Sender: TObject; var Key: Word;
778 procedure AllResActionExecute(Sender: TObject);
779 procedure AllResActionUpdate(Sender: TObject);
780 procedure ReloadClick(Sender: TObject);
781 procedure GoBackClick(Sender: TObject);
782 procedure GoFowardClick(Sender: TObject);
783 procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
784 Shift: TShiftState; X, Y: Integer);
785 procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
786 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
787 procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
788 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
789 procedure StatusBarResize(Sender: TObject);
790 procedure IndividualAbon1Click(Sender: TObject);
791 procedure IndividualAbon2Click(Sender: TObject);
792 procedure N42Click(Sender: TObject);
793 procedure SelectComboBoxEnter(Sender: TObject);
794 procedure AntiIndividualAbonClick(Sender: TObject);
795 procedure N51Click(Sender: TObject);
796 procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
797 procedure CabinetFavoriteActionExecute(Sender: TObject);
798 procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
800 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
801 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
803 procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
805 procedure FavoriteTreePopupMenuPopup(Sender: TObject);
806 procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
807 procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
808 procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
809 procedure ToolButton19Click(Sender: TObject);
810 procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject);
811 procedure FavoriteTreeViewDblClick(Sender: TObject);
812 procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject);
813 procedure FavoriteTreeViewReloadActionExecute(Sender: TObject);
814 procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
815 procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
816 procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject);
817 procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
818 procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
819 Shift: TShiftState; X, Y: Integer);
820 procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
821 State: TDragState; var Accept: Boolean);
822 procedure OnlyAHundredResExecute(Sender: TObject);
823 procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
825 procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
826 var Handled: Boolean);
827 procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
828 var Handled: Boolean);
829 procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
830 var Handled: Boolean);
831 procedure ExportFavoriteFileAccept(Sender: TObject);
832 procedure ExportFavoriteFileBeforeExecute(Sender: TObject);
833 procedure CabinetBBSActionExecute(Sender: TObject);
834 procedure FavoriteTreeViewBrowseThreadActionExecute(Sender: TObject);
835 procedure FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
836 procedure UpBoardActionExecute(Sender: TObject);
837 procedure UpBoardActionUpdate(Sender: TObject);
838 procedure BrowserTabContextPopup(Sender: TObject; MousePos: TPoint;
839 var Handled: Boolean);
840 procedure KoreCopyExecute(Sender: TObject);
841 procedure BrowserTabPopupMenuPopup(Sender: TObject);
842 procedure MenuToolBarResize(Sender: TObject);
843 procedure StdToolBarResize(Sender: TObject);
844 procedure LinkToolBarResize(Sender: TObject);
845 procedure ListNameToolBarResize(Sender: TObject);
846 procedure ListToolBarResize(Sender: TObject);
847 procedure BrowserNameToolBarResize(Sender: TObject);
848 procedure BrowserToolBarResize(Sender: TObject);
849 procedure BrowserTabResize(Sender: TObject);
850 procedure TreeViewClick(Sender: TObject);
851 procedure TreeViewKeyDown(Sender: TObject; var Key: Word;
853 procedure FavoriteTreeViewMouseDown(Sender: TObject;
854 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
855 procedure MessagePanelResize(Sender: TObject);
857 procedure TreeSelectNameCopyExecute(Sender: TObject);
858 procedure FavoriteTreeViewMouseUp(Sender: TObject;
859 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
860 procedure OnlyAHundredResUpdate(Sender: TObject);
861 procedure SetFocusForBrowserActionExecute(Sender: TObject);
862 procedure SetFocusForBrowserActionUpdate(Sender: TObject);
863 procedure SetFocusForThreadListActionExecute(Sender: TObject);
864 procedure SetFocusForCabinetActionExecute(Sender: TObject);
865 procedure BrowserMaxAndFocusActionExecute(Sender: TObject);
866 procedure BrowserMaxAndFocusActionUpdate(Sender: TObject);
867 procedure ThreadlistMaxAndFocusActionExecute(Sender: TObject);
868 procedure ListViewExit(Sender: TObject);
869 procedure SetFocusForCabinetActionUpdate(Sender: TObject);
870 procedure ListViewSelectItem(Sender: TObject; Item: TListItem;
872 procedure SelectTimerTimer(Sender: TObject);
875 //RoundList : TRoundList;
879 FEnabledCloseButton: Boolean;
880 // ThreadCreate: TThreadCreate;
882 FClickNode: TTreeNode;
885 FPreviewBrowser: TPreviewBrowser;
888 FBrowserSizeHeight: Integer;
889 FBrowserSizeWidth: Integer;
891 // FFavorite: TFavorite;
892 FTabHintIndex: Integer;
893 FListStyle: TViewStyle; //
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93\83X
\83^
\83C
\83\8b
894 FItemNoVisible: Boolean; //
\83\8a\83X
\83g
\94Ô
\8d\86\95\
\8e¦
\83t
\83\89\83O
895 FViewType: TGikoViewType; //
\83\8a\83X
\83g
\83A
\83C
\83e
\83\80\95\
\8e¦
\83^
\83C
\83v
896 FActiveList: TObject;
897 FActiveContent: TBrowserRecord; //
899 FHistoryList: TList; //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
900 FTreeType: TGikoTreeType;
904 // FLastRoundTime: TDateTime;
905 BrowserNullTab: TBrowserRecord;
906 // DoubleClickOccurred: array [TMouseButton] of Boolean;
907 FDownloadTitle: string; //
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86\82Ì
\83^
\83C
\83g
\83\8b\96¼
908 FDownloadMax: Integer; //
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86\82Ì
\8dÅ
\91å
\83T
\83C
\83Y
909 FEvent: THTMLDocumentEventSink;//
\83u
\83\89\83E
\83U
\83h
\83L
\83\85\83\81\83\93\83g
\83C
\83x
\83\93\83g
911 // Fkeynum : Integer; //
\83L
\81[
\83{
\81[
\83h
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\97p
913 IsDraggingSelectComboBox : Boolean;
914 DraggingSelectComboBoxPosition : TPoint;
916 FSearchDialog: TSearchDialog;
918 FDropSpaceNode: TTreeNode;
920 FDragTime : Cardinal; //
\83\8a\83\93\83N
\82ÌD&D
\97p
921 FDragButton : TToolButton; //
\83\8a\83\93\83N
\82ÌD&D
\97p
\82ÉDrag
\82µ
\82Ä
\82éButton
\95Û
\91¶
922 FDragWFirst : Boolean; //WebTab
\82ÌD&D
\97p
924 FListViewBackGroundColor : TColor; //ListView
\82ÌBackGroundColor
925 FUseOddResOddColor : Boolean; //
\8eæ
\93¾
\83\8c\83X
\90\94\82Æ
\83X
\83\8c\83b
\83h
\82Ì
\83\8c\83X
\90\94\82ª
\88á
\82Á
\82½
\82Æ
\82«
\82É
\91¼
\82Ì
\90F
\82Å
\95\
\8e¦
926 FOddColor : TColor; //
\82»
\82Ì
\90F
928 FSelectResWord : string; //
\83\8c\83X
\8di
\8d\9e\83\8f\81[
\83h
929 FIsIgnoreResize : Boolean; //
\83\8a\83T
\83C
\83Y
\83C
\83x
\83\93\83g
\82ð
\96³
\8e\8b\82·
\82é
\82©
\82Ç
\82¤
\82©
930 FIsMinimize : TMinimizeType; //
\8dÅ
\8f¬
\89»
\82µ
\82Ä
\82¢
\82é
\8dÅ
\92\86\82©
931 FOldFormWidth : Integer; //
\92¼
\91O
\82Ì
\83E
\83B
\83\93\83h
\83E
\82Ì
\95\9d
932 FToolBarSettingSender : TToolBarSettingSenderType; //
\83c
\81[
\83\8b\83o
\81[
\90Ý
\92è
\82ð
\83N
\83\8a\83b
\83N
\82µ
\82½
\83N
\81[
\83\8b\83o
\81[
933 FMouseDownPos : TPoint; //
\83u
\83\89\83E
\83U
\83^
\83u
\82Å
\83}
\83E
\83X
\82ð
\89\9f\82µ
\82½
\82Æ
\82«
\82Ì
\8dÀ
\95W
935 procedure SetBoardTreeNode( inBBS : TBBS );
936 function SetCategoryListItem(ABBS2ch: TBBS): Integer;
937 function SetBoardListItem(Category: TCategory): Integer;
938 function SetThreadListItem(Board: TBoard): Integer;
939 // function GetRoundName(index: integer): string;
941 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
942 procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
943 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
944 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
945 procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
947 procedure SetActiveList(Obj: TObject);
949 procedure ListDoubleClick(Shift: TShiftState);
950 procedure BrowserMovement(const AName: string); overload;
951 procedure BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord); overload;
952 procedure SelectListItem(List: TList);
953 // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
954 procedure DeleteTab(ThreadItem: TThreadItem); overload;
955 procedure DeleteTab(BrowserRecord: TBrowserRecord); overload;
956 function Hook(var Message: TMessage): Boolean;
957 procedure AddRoundNameMenu(MenuItem: TMenuItem);
958 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload;
959 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
960 procedure SetSelectRoundName(Sender: TObject);
961 function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
963 procedure SetMenuFont;
964 // procedure CreateFavMenu(Folder: TFavoriteFolder);
965 procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
966 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
967 procedure FavoriteClick(Sender: TObject); overload;
968 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
969 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
970 function OnDocumentContextMenu(Sender: TObject): WordBool;
971 // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
972 procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
973 procedure ShowTextPopup;
974 //procedure ShowTextPopup(HintData: THintData);
975 // procedure SetStdToolBar;
976 // function GetAction(ActionName: string): TContainedAction;
977 procedure SetLinkBar;
978 function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
979 procedure MenuBarChevronMenu;
980 procedure LinkBarChevronMenu;
981 procedure ToolBarChevronMenu(ToolBar: TToolBar);
982 procedure ModifySelectList;
983 procedure FavoriteBrowseFolder( node: TTreeNode );
984 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
985 procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
986 procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
987 procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
988 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
989 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
990 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
991 procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
992 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
994 procedure SetListViewBackGroundColor(value: TColor);
995 procedure BBSMenuItemOnClick( Sender : TObject );
997 procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
998 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82É
\95Û
\91¶
999 procedure SaveCoolBarSettings;
1000 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82©
\82ç
\95\9c\8c³
1001 procedure LoadCoolBarSettings;
1002 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82é
1003 procedure OnMinimize;
1004 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82½
1005 procedure OnMinimized;
1006 // CoolBar
\82ª
\83T
\83C
\83Y
\95Ï
\8dX
\82³
\82ê
\82½
1007 procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
1008 // TreeView
\82ª
\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
1009 procedure TreeClick( Node : TTreeNode );
1010 // TreeView
\82ª
\83_
\83u
\83\8b\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
1011 procedure TreeDoubleClick( Node : TTreeNode );
1012 //
\83M
\83R
\83i
\83r
\82Ì
\83\81\83b
\83Z
\81[
\83W
\83\8b\81[
\83v
\82ð
\89¡
\8eæ
\82è
\82µ
\82Ü
\82·
1013 procedure HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
1014 //
\83u
\83\89\83E
\83U
\82Ì
\83L
\81[
\83_
\83E
\83\93\83C
\83x
\83\93\83g
1015 //
\83C
\83x
\83\93\83g
\82ð
\8eæ
\82è
\88µ
\82Á
\82½
\8fê
\8d\87\82Í True
\82ð
\95Ô
\82·
1016 function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
1017 //
\8ae
\8f\8a\82É
\82 \82é
\83L
\83\83\83r
\83l
\83b
\83g
\81E BBS
\83\81\83j
\83\85\81[
\82ð
\83Z
\83b
\83g
\81^
\8dX
\90V
1018 procedure SetBBSMenu;
1019 function WebBrowserClick(Sender: TObject): WordBool;
1021 procedure CreateParams(var Params: TCreateParams); override;
1022 procedure WndProc(var Message: TMessage); override;
1023 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
1024 procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
1025 procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
1029 // FDownload: TDownload;
1030 FControlThread: TThreadControl;
1031 procedure MoveToURL(URL: string);
1032 procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
1033 procedure ReloadBBS;
1034 function GetHttpState: Boolean;
1035 procedure SetEnabledCloseButton(Enabled: Boolean);
1036 function GetTreeNode(Data: TObject): TTreeNode;
1037 procedure AppFormDeactivate(Sender: TObject);
1038 // procedure CabinetPanelVisible(PanelVisible: Boolean);
1039 procedure ListViewAllSelect;
1041 property ListStyle: TViewStyle read FListStyle write FListStyle;
1042 property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
1043 property ViewType: TGikoViewType read FViewType write FViewType;
1045 property NameCookie: string read FNameCookie write FNameCookie;
1046 property MailCookie: string read FMailCookie write FMailCookie;
1048 procedure SetContent(inThread: TBrowserRecord);
1049 function GetActiveContent: TThreadItem;
1050 function GetActiveList: TObject;
1052 property ActiveList: TObject read GetActiveList write SetActiveList;
1053 // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
1055 procedure SetListViewType(AViewType: TGikoViewType); overload;
1056 procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
1057 procedure DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
1058 procedure DownloadList(Board: TBoard; ForceDownload: Boolean = False);
1059 procedure PlaySound(SoundEventName: string);
1061 function AddHistory( FavItem: TFavoriteThreadItem ): Boolean;
1062 procedure DeleteHistory( threadItem: TThreadItem );
1063 procedure ClearHistory;
1064 procedure SaveHistory;
1065 procedure LoadHistory;
1066 procedure ShowBBSTree( inBBS : TBBS );
1067 procedure ShowBBSTreeOld( inBBS : TBBS );
1068 procedure ShowHistoryTree;
1069 procedure SetHistoryTreeNode;
1070 // procedure SelectTreeNode(Item: TObject);
1071 procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
1072 procedure SetBrowserTabState;
1073 // property Favorite: TFavorite read FFavorite write FFavorite;
1074 procedure SetToolBarPopup;
1075 procedure ShowFavoriteAddDialog( Item : TObject );
1076 procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
1077 procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
1078 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
1079 property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
1080 property OddColor : TColor read FOddColor write FOddColor;
1082 function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
1083 procedure OnPlugInMenuItem( Sender : TObject );
1086 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
1089 TFavoriteMenuItem = class(TMenuItem)
1093 property Data: Pointer read FData write FData;
1096 TBBSMenuItem = class(TMenuItem)
1100 property Data: Pointer read FData write FData;
1103 TLinkToolButton = class(TToolButton)
1107 property Data: Pointer read FData write FData;
1110 TBrowserRecord = class( TObject )
1112 FBrowser : TWebBrowser;
1113 FEvent: THTMLDocumentEventSink;//
\83u
\83\89\83E
\83U
\83h
\83L
\83\85\83\81\83\93\83g
\83C
\83x
\83\93\83g
1114 FThread : TThreadItem;
1115 FLastSize : Integer;
1117 FOnlyHundred: Boolean;
1119 destructor Destroy; override;
1120 property Browser : TWebBrowser read FBrowser write FBrowser;
1121 property Thread : TThreadItem read FThread write FThread;
1122 property LastSize : Integer read FLastSize write FLastSize;
1123 property Repaint : Boolean read FRepaint write FRepaint;
1124 property OnlyHundred : Boolean read FOnlyHundred write FOnlyHundred;
1128 GikoForm: TGikoForm;
1133 About, Option, Round, Splash, Sort, ListSelect,
1134 NewBoard, MojuUtils,Clipbrd;
1137 CAPTION_NAME: string = '
\83M
\83R
\83i
\83r';
1138 BLANK_HTML: string = 'about:blank';
1139 SELECTCOMBOBOX_NAME: string = ''; // '
\83X
\83\8c\83b
\83h
\8di
\8d\9e\8c\9f\8dõ';
1140 SELECTCOMBOBOX_COLOR: TColor = clWindow;
1142 DandD_THRESHOLD = 5; //D&D
\82Ìè
\87\92l
\81ipixcel)
1143 //
\83c
\83\8a\81[
\81E
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93
1144 ITEM_ICON_2CH1 = 0; //2ch
\83A
\83C
\83R
\83\93
1145 ITEM_ICON_2CH2 = 1; //2ch
\83A
\83C
\83R
\83\93
1146 ITEM_ICON_CATEGORY1 = 2; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1147 ITEM_ICON_CATEGORY2 = 3; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1148 ITEM_ICON_BOARD_NOSUBJECT = 3; //
\93Ç
\82Ý
\8d\9e\82Ü
\82ê
\82Ä
\82¢
\82È
\82¢
\94Â
\83A
\83C
\83R
\83\93
1149 ITEM_ICON_BOARD1 = 4; //
\94Â
\83A
\83C
\83R
\83\93
1150 ITEM_ICON_BOARD2 = 5; //
\94Â
\83A
\83C
\83R
\83\93
1151 ITEM_ICON_THREADLOG1 = 6; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1152 ITEM_ICON_THREADLOG2 = 7; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1153 ITEM_ICON_THREAD1 = 8; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1154 ITEM_ICON_THREAD2 = 9; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1155 ITEM_ICON_THREADNEW1 = 10; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1156 ITEM_ICON_THREADNEW2 = 11; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1157 ITEM_ICON_SORT1 = 12; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1158 ITEM_ICON_SORT2 = 13; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1159 ITEM_ICON_BOARD_LOG = 17; //
\83X
\83\8c\83\8d\83O
\82 \82è
\94Â
\83A
\83C
\83R
\83\93
1160 ITEM_ICON_BOARD_NEW = 18; //
\83X
\83\8c\90V
\92\85\94Â
\83A
\83C
\83R
\83\93
1162 //
\83c
\81[
\83\8b\83o
\81[
\83A
\83C
\83R
\83\93
1163 TOOL_ICON_HEIGHT_MAX = 16; //
\8d\82\82³
\8dÅ
\91å
\83A
\83C
\83R
\83\93
1164 TOOL_ICON_HEIGHT_MIN = 17; //
\8d\82\82³
\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1165 TOOL_ICON_HEIGHT_NORMAL = 18; //
\8d\82\82³
\95W
\8f\80\83A
\83C
\83R
\83\93
1166 TOOL_ICON_WIDTH_MAX = 19; //
\95\9d\8dÅ
\91å
\83A
\83C
\83R
\83\93
1167 TOOL_ICON_WIDTH_MIN = 20; //
\95\9d\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1168 TOOL_ICON_WIDTH_NORMAL = 21; //
\95\9d\95W
\8f\80\83A
\83C
\83R
\83\93
1170 TOOL_ICON_FAV_FOLDER = 30; //
\82¨
\8bC
\82É
\93ü
\82è
\83t
\83H
\83\8b\83_
\83A
\83C
\83R
\83\93
1171 TOOL_ICON_FAV_BOARD = 31; //
\82¨
\8bC
\82É
\93ü
\82è
\94Â
\83A
\83C
\83R
\83\93
1172 TOOL_ICON_FAV_THREAD = 32; //
\82¨
\8bC
\82É
\93ü
\82è
\83X
\83\8c\83A
\83C
\83R
\83\93
1174 HTML_FILE_NAME = 'temp_preview.html';
1176 WM_XBUTTONDOWN = $020B;
1177 WM_XBUTTONUP = $020C;
1178 WM_XBUTTONDBLCLK = $020D;
1181 USER_TREECLICK = WM_USER + 2000;
1182 USER_RESIZED = WM_USER + 2001;
1183 USER_MINIMIZED = WM_USER + 2002;
1184 USER_SETLINKBAR = WM_USER + 2003;
1188 procedure TGikoForm.CreateParams(var Params: TCreateParams);
1191 if FormStyle in [fsNormal, fsStayOnTop] then begin
1192 if BorderStyle in [bsSingle, bsSizeable] then begin
1193 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1194 Params.WndParent := 0;
1199 procedure TGikoForm.FormCreate(Sender: TObject);
1201 TVS_NOTOOLTIPS = $0080;
1207 wp: TWindowPlacement;
1209 newbrowser: TWebBrowser;
1213 Writeln('============================================================');
1214 Writeln('
\83M
\83R
\83i
\83r
\83f
\83o
\83b
\83O
\83R
\83\93\83\
\81[
\83\8b');
1216 Writeln('
\82±
\82Ì
\89æ
\96Ê
\82ð
\95Â
\82¶
\82È
\82¢
\82Å
\82
\82¾
\82³
\82¢
\81B');
1217 Writeln('
\8fI
\97¹
\8e\9e\82Í
\81A
\83M
\83R
\83i
\83r
\83E
\83B
\83\93\83h
\83E
\82ð
\95Â
\82¶
\82Ä
\82
\82¾
\82³
\82¢');
1218 Writeln('============================================================');
1220 Application.OnDeactivate := AppFormDeactivate;
1221 Self.OnDeactivate := AppFormDeactivate;
1222 Application.HookMainWindow(Hook);
1223 Application.OnMessage := HandleAppMessage; //
\82È
\82ñ
\82©
\96³
\82
\82Ä
\82à
\91å
\8fä
\95v
\82É
\82È
\82Á
\82½
\81@by
\81@
\82à
\82¶
\82ã
1225 FTreeType := gttNone;
1227 FSearchDialog := nil;
1228 BrowserNullTab := TBrowserRecord.Create;
1229 BrowserNullTab.Browser := Browser;
1230 BrowserNullTab.Browser.Navigate(BLANK_HTML);
1231 FBrowsers := TList.Create;
1232 for i := 0 to 4 do begin
1233 newBrowser := TWebBrowser.Create(nil);
1234 TOleControl(newBrowser).Parent := BrowserPanel;
1235 TOleControl(newBrowser).Align := alClient;
1236 newBrowser.OnDocumentComplete := BrowserDocumentComplete;
1237 newBrowser.OnBeforeNavigate2 := BrowserBeforeNavigate2;
1238 newBrowser.OnEnter := BrowserEnter;
1239 newBrowser.OnNewWindow2 := BrowserNewWindow2;
1240 newBrowser.OnStatusTextChange := BrowserStatusTextChange;
1241 newBrowser.OnTitleChange := BrowserTitleChange;
1242 newBrowser.Navigate(BLANK_HTML);
1243 ShowWindow(newBrowser.Handle, SW_HIDE);
1244 FBrowsers.Add(newBrowser);
1246 BrowserNullTab.Browser.BringToFront;
1247 ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
1249 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô
1250 FIsIgnoreResize := True;
1252 //
\8eè
\82Ì
\83J
\81[
\83\
\83\8b
1253 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1256 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1257 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1259 //
\8aO
\95\94\94Â
\83v
\83\89\83O
\83C
\83\93\82ð
\83\8d\81[
\83h(ReadBoardFile, LoadHistory
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1260 InitializeBoardPlugIns;
1262 EnabledCloseButton := True;
1265 //
\8f\84\89ñ
\83f
\81[
\83^
\93Ç
\82Ý
\8d\9e\82Ý
1266 RoundList := TRoundList.Create;
1267 RoundList.LoadRoundBoardFile;
1269 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\97ñ
\8b\93(ReadFavorite
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1270 GikoSys.ListBoardFile;
1272 RoundList.LoadRoundThreadFile;
1274 if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
1275 GikoSys.ListBoardFile;
1277 //
\83\81\83j
\83\85\81[
\82É
\92Ç
\89Á
1280 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g(LoadHistory
\82æ
\82è
\82à
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1281 FHistoryList := TList.Create;
1283 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1286 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
1287 // FFavorite := TFavorite.Create(FavoriteTreeView);
1288 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1289 FavoriteDM.ReadFavorite;
1291 //
\83\8a\83X
\83g
\83X
\83^
\83C
\83\8b
1292 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1294 //
\83\81\83C
\83\93\83N
\81[
\83\8b\83o
\81[
\88Ê
\92u
1295 // MainCoolBar.Top := 0;
1296 // MainCoolBar.Left := 0;
1298 //
\83A
\83j
\83\81\83p
\83l
\83\8b\88Ê
\92u
1299 AnimePanel.Top := 0;
1300 AnimePanel.Left := 0;
1302 //
\8ae
\8eí
\89Â
\8e\8b\8fó
\91Ô
\82È
\82Ç
\90Ý
\92è
1304 //
\83L
\83\83\83r
\83l
\83b
\83g
1305 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1307 //
\83\81\83b
\83Z
\81[
\83W
\83o
\81[
1308 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1309 MsgBarVisibleActionExecute(nil);
1310 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1312 //
\83X
\83e
\81[
\83^
\83X
\83o
\81[
1313 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1314 StatusBarVisibleActionExecute(nil);
1316 //
\83t
\83H
\83\93\83g
\81E
\90F
\90Ý
\92è
1317 TreeView.Items.BeginUpdate;
1318 FavoriteTreeView.Items.BeginUpdate;
1319 ListView.Items.BeginUpdate;
1321 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1322 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1323 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1324 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1326 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1327 FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1328 FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1329 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1331 ListView.Font.Name := GikoSys.Setting.ListFontName;
1332 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1333 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1334 //ListView.Color := GikoSys.Setting.ListBackColor;
1335 ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1336 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1337 FOddColor := GikoSys.Setting.OddColor;
1340 TreeView.Items.EndUpdate;
1341 FavoriteTreeView.Items.EndUpdate;
1342 ListView.Items.EndUpdate;
1344 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1345 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1347 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
1348 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1349 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1350 FDragWFirst := false;
1351 SetContent(BrowserNullTab); //
\83u
\83\89\83E
\83U
\82ð
\8bó
\94\92\95\
\8e¦
1352 // TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
1353 // TreeView.Selected := TreeView.Items[0]; //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
1356 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95\9c\8c³
1357 wp.length := sizeof(wp);
1358 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1359 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1360 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1361 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1362 wp.showCmd := SW_HIDE;
1363 SetWindowPlacement(Handle, @wp);
1365 // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1366 // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1367 if GikoSys.Setting.WindowMax then
1368 WindowState := wsMaximized;
1370 //
\83M
\83R
\83A
\83j
\83\81
1372 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1373 if FileExists(FileName) then
1374 Animate.FileName := FileName;
1382 //
\83X
\83\8c\91S
\95\94\95\
\8e¦
\83{
\83^
\83\93\82ð
\89\9f\82³
\82ê
\82½
\8fó
\91Ô
\82É
\82·
\82é
1383 AllItemAction.Checked := True;
1384 AllResAction.Checked := True;
1386 //TreeView
\82Ì
\8e×
\96\82\8fL
\82¢ToolTip
\82ð
\94ñ
\95\
\8e¦
1387 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1388 Style := Style or TVS_NOTOOLTIPS;
1389 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1391 //
\83c
\83\8a\81[
\82ð
\83\81\83C
\83\93\82¾
\82¯
\95\
\8e¦
\82É
\82µ
\82Ä
\8dÅ
\91å
\89»
1392 TreeView.Align := alClient;
1393 FavoriteTreeView.Align := alClient;
1394 FavoriteTreeView.Visible := False;
1396 //
\83u
\83\89\83E
\83U
\83T
\83C
\83Y
\95Ï
\8dX
\82Ì
\8f\89\8aú
\89»
1397 // FBrowserSizeFlag := False;
1398 // FBrowserSizeHeight := ViewPanel.Height;
1400 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1401 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1403 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1404 ArrangeAction.Execute;
1406 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1407 case GikoSys.Setting.ListWidthState of
1409 ViewPanel.Width := 1;
1410 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1411 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1414 ViewPanel.Width := GikoSys.Setting.ListWidth;
1415 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1416 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1419 ViewPanel.Width := GikoSys.Setting.ListWidth;
1420 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1421 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1425 case GikoSys.Setting.ListHeightState of
1427 ViewPanel.Height := 1;
1428 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1429 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1432 ViewPanel.Height := GikoSys.Setting.ListHeight;
1433 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1434 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1437 ViewPanel.Height := GikoSys.Setting.ListHeight;
1438 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1439 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1444 //
\83v
\83\8d\83O
\83\8c\83X
\83o
\81[
\82Ì
\8f\89\8aú
\89»
1445 // ProgressBar.Visible := False;
1446 ProgressBar.Parent := StatusBar;
1447 ProgressBar.Top := 2;
1448 ProgressBar.Left := 0;
1449 ProgressBar.Width := StatusBar.Panels[0].Width;
1450 ProgressBar.Height := StatusBar.Height - 2;
1451 ProgressBar.Position := 0;
1453 //
\83_
\83E
\83\93\83\8d\81[
\83h
\83I
\83u
\83W
\83F
\83N
\83g
1454 FControlThread := TThreadControl.Create(True);
1455 FControlThread.MaxThreadCount := 1;
1456 FControlThread.Resume;
1457 FControlThread.OnDownloadEnd := DownloadEnd;
1458 FControlThread.OnDownloadMsg := DownloadMsg;
1459 FControlThread.OnWork := Work;
1460 FControlThread.OnWorkBegin := WorkBegin;
1461 FControlThread.OnWorkEnd := WorkEnd;
1462 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1464 //
\8di
\8d\9e\8c\9f\8dõ
\97\9a\97ð
1465 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1467 //
\83u
\83\89\83E
\83U
\83^
\83u
\90Ý
\92è
1470 BrowserBoardNameLabel.Caption := '';
1471 BrowserNameLabel.Caption := '';
1474 FTabHintIndex := -1;
1476 //
\83\8a\83\93\83N
\83o
\81[
1479 //
\83\81\83j
\83\85\81[
\83t
\83H
\83\93\83g
1482 //
\83c
\81[
\83\8b\83o
\81[Wrapable
1483 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1484 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1486 KeepDefaultToolButton(StdToolBar, TmpToolBar);
1487 KeepDefaultToolButton(ListToolBar, TmpToolBar);
1488 KeepDefaultToolButton(BrowserToolBar, TmpToolBar);
1490 MakeDefaultINIFile();
1491 //
\83c
\81[
\83\8b\83{
\83^
\83\93\93Ç
\82Ý
\8d\9e\82Ý
1492 ReadToolBarSetting(ActionList, StdToolBar);
1493 ReadToolBarSetting(ActionList, ListToolBar);
1495 for i := ListToolBar.ControlCount - 1 downto 0 do
1497 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1499 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\82Ì
\97×
\82É
\83Z
\83p
\83\8c\81[
\83^
\82ª
\82 \82é
\8fê
\8d\87\82Í
\89B
\82·
1500 if (i + 1) < ListToolBar.ControlCount then
1501 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1502 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1503 ListToolBar.Controls[ i + 1 ].Visible := False;
1505 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
1506 ListToolBar.Controls[ i ].Visible := False;
1507 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
1508 SelectComboBox.Parent := ListToolBar;
1509 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1510 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1511 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
1512 SelectComboBoxSplitter.Parent := ListToolBar;
1513 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1520 ReadToolBarSetting(ActionList, BrowserToolBar);
1522 OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes;
1523 //
\83A
\83h
\83\8c\83X
\83o
\81[
1524 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1526 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³
\82ÍFormShow
\82É
\88Ú
\93®
\82µ
\82½
1528 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\82ª
\96³
\82¢
\8fê
\8d\87\82Í
\83\81\83b
\83Z
\81[
\83W
\95\
\8e¦
1529 if not FileExists(GikoSys.GetBoardFileName) then begin
1530 msg := '
\82±
\82Ì
\83\81\83b
\83Z
\81[
\83W
\82Í
\83M
\83R
\83i
\83r
\82ð
\8f\89\82ß
\82Ä
\8eg
\97p
\82·
\82é
\82Æ
\82«
\82É
\82P
\89ñ
\82¾
\82¯
\95\
\8e¦
\82³
\82ê
\82Ü
\82·' + #13#10#13#10
1531 + '
\82±
\82ê
\82©
\82ç
\81A
\81u
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\81v
\82Ì
\83A
\83h
\83\8c\83X
\88ê
\97\97\82ð
\83_
\83E
\83\93\83\8d\81[
\83h
\82µ
\82Ü
\82·' + #13#10
1532 + '
\8e\9f\82É
\8fo
\82Ä
\82
\82é
\89æ
\96Ê
\82Å
\81A
\81u
\8dX
\90V
\81v
\83{
\83^
\83\93\82ð
\89\9f\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
1533 MsgBox(SplashWindow.Handle, msg, '
\83M
\83R
\83i
\83r', MB_OK or MB_ICONINFORMATION);
1534 NewBoardAction.Execute;
1537 //
\83L
\81[
\90Ý
\92è
\93Ç
\82Ý
\8d\9e\82Ý
1538 GikoSys.LoadKeySetting(ActionList);
1540 //
\8dÅ
\8fI
\8f\84\89ñ
\8e\9e\8aÔ
1541 // FLastRoundTime := 0;
1544 FHint := TResPopup.Create(Self);
1546 //
\8dÅ
\8cã
\82É
\91I
\91ð
\82³
\82ê
\82½
\83L
\83\83\83r
\83l
\83b
\83g
\82Ì
\95\9c\8c³
1547 CabinetVisible( False );
1548 if GikoSys.Setting.CabinetVisible then begin
1549 i := CabinetSelectPopupMenu.Items.Count - 1;
1550 if GikoSys.Setting.CabinetIndex = i - 1 then
1551 CabinetHistoryAction.Execute
1552 else if GikoSys.Setting.CabinetIndex = i then
1553 CabinetFavoriteAction.Execute
1555 if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1556 ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1557 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô 2
1558 FIsIgnoreResize := True;
1559 CabinetBBSAction.Execute;
1562 ShowBBSTreeOld( BBSs[ 0 ] );
1563 PostMessage( Handle, USER_TREECLICK, 0, 0 );
1566 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô 3
1567 FIsIgnoreResize := True;
1569 //
\83I
\81[
\83g
\83\8d\83O
\83C
\83\93
1570 if GikoSys.Setting.AutoLogin then
1571 LoginAction.Execute;
1573 //
\88ø
\90\94\82ª
\82 \82Á
\82½
\82ç
\83X
\83\8c\82ð
\8aJ
\82
\81i
\96¢
\8eæ
\93¾
\82È
\82ç
\83_
\83E
\83\93\83\8d\81[
\83h
\81j
1574 for i := 1 to ParamCount do begin
1575 MoveToURL(ParamStr(i));
1580 s := GikoSys.FAbon.NGwordname;
1581 StatusBar.Panels[2].Text := s;
1582 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1583 StatusBarResize(Sender);
1585 dummy1.Caption := ItemReservPMenu.Caption;
1586 dummy1.Hint := ItemReservPMenu.Hint;
1588 //Samba24
\82Ì
\83t
\83@
\83C
\83\8b\83`
\83F
\83b
\83N
1589 GikoSys.SambaFileExists();
1593 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82É
\95Û
\91¶
1594 procedure TGikoForm.SaveCoolBarSettings;
1600 if IsIconic( Handle ) or FIsIgnoreResize then
1603 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Main)
1604 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1605 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1606 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1607 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1608 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1610 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Board)
1611 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1612 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1613 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1614 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1615 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1617 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Browser)
1618 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1619 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1620 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1621 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1622 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1627 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82©
\82ç
\95\9c\8c³
1628 procedure TGikoForm.LoadCoolBarSettings;
1634 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Main)
1635 MainCoolBar.Bands.BeginUpdate;
1637 // for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1638 for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin
1639 CoolSet := GikoSys.Setting.MainCoolSet[i];
1640 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1641 FIsIgnoreResize := False;
1642 SaveCoolBarSettings;
1645 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1646 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1647 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1650 MainCoolBar.Bands.EndUpdate;
1653 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Board)
1654 ListCoolBar.Bands.BeginUpdate;
1656 // for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1657 for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin
1658 CoolSet := GikoSys.Setting.ListCoolSet[i];
1659 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1660 FIsIgnoreResize := False;
1661 SaveCoolBarSettings;
1664 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1665 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1666 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1669 ListCoolBar.Bands.EndUpdate;
1672 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Browser)
1673 BrowserCoolBar.Bands.BeginUpdate;
1675 // for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1676 for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
1677 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1678 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1679 FIsIgnoreResize := False;
1680 SaveCoolBarSettings;
1683 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1684 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1685 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1688 BrowserCoolBar.Bands.EndUpdate;
1696 procedure TGikoForm.FormShow(Sender: TObject);
1698 ShowWindow(Application.Handle, SW_HIDE);
1700 //FormCreate
\82Å
\82â
\82é
\82Æ
\89Â
\8e\8b\90Ý
\92è
\82ª
\94½
\89f
\82³
\82ê
\82È
\82¢
\8fê
\8d\87\82ª
\82 \82é
\82Ì
\82ÅFormShow
\82Å
\82â
\82é
\82±
\82Æ
\82É
\82µ
\82½
1701 //
\83c
\81[
\83\8b\83o
\81[
\95\
\8e¦
1702 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1703 StdToolBarVisibleActionExecute( nil );
1704 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1705 AddressBarVisibleActionExecute( nil );
1706 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1707 LinkBarVisibleActionExecute( nil );
1708 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1709 ListToolBarVisibleActionExecute( nil );
1710 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1711 ListNameBarVisibleActionExecute( nil );
1712 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1713 BrowserToolBarVisibleActionExecute( nil );
1714 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1715 BrowserNameBarVisibleActionExecute( nil );
1717 //
\83u
\83\89\83E
\83U
\83^
\83u
1718 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1719 BrowserTabVisibleActionExecute(nil);
1721 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1722 BrowserTabTopAction.Checked := True;
1723 BrowserTabTopActionExecute(nil);
1725 BrowserTabBottomAction.Checked := True;
1726 BrowserTabBottomActionExecute(nil);
1729 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1730 BrowserTabTabStyleAction.Checked := True;
1731 BrowserTabTabStyleActionExecute(nil);
1732 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1733 BrowserTabButtonStyleAction.Checked := True;
1734 BrowserTabButtonStyleActionExecute(nil);
1736 BrowserTabFlatStyleAction.Checked := True;
1737 BrowserTabFlatStyleActionExecute(nil);
1740 // CoolBar
\95\9c\8c³
1741 LoadCoolBarSettings;
1743 FIsIgnoreResize := False;
1746 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1748 if GikoForm.WindowState <> wsMinimized then
1749 SaveCoolBarSettings;
1750 if ( GikoSys.Setting.ShowDialogForEnd ) and
1751 (MessageDlg('
\83M
\83R
\83i
\83r
\82ð
\8fI
\97¹
\82µ
\82Ä
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin
1757 //Application.HookMainWindow(Hook);
1758 Application.UnhookMainWindow(Hook);
1759 Application.Terminate;
1762 procedure TGikoForm.FormDestroy(Sender: TObject);
1765 // CoolSet: TCoolSet;
1766 wp: TWindowPlacement;
1769 // Application.OnDeactivate := nil;
1770 // Self.OnDeactivate := nil;
1773 if GetActiveList is TBBS then begin
1774 for i := 0 to ListView.Columns.Count - 1 do
1775 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1776 end else if GetActiveList is TCategory then begin
1777 for i := 0 to ListView.Columns.Count - 1 do
1778 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1779 end else if GetActiveList is TBoard then begin
1780 for i := 0 to ListView.Columns.Count - 1 do
1781 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1786 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95Û
\91¶
1787 wp.length := sizeof(wp);
1788 GetWindowPlacement(Handle, @wp);
1789 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1790 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1791 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1792 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1793 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1795 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1796 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1797 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1798 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1799 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1800 if ArrangeAction.Checked then
1801 GikoSys.Setting.ListOrientation := gloVertical
1803 GikoSys.Setting.ListOrientation := gloHorizontal;
1804 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1807 //
\83\8a\83A
\83\8b\83^
\83C
\83\80\82É
\95Û
\91¶
\82³
\82ê
\82é
\82Ì
\82Å
\81A
\82Ü
\82½
\81A
\83E
\83B
\83\93\83h
\83E
\83T
\83C
\83Y
\82ª CoolBar
\82æ
\82è
1808 //
\8f¬
\82³
\82
\82È
\82Á
\82Ä
\82¢
\82é
\82Æ
\82«
\82É
\95Û
\91¶
\82·
\82é
\82Æ
\92l
\82ª
\8fã
\8f\91\82«
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\82Ì
\82Å
\82±
\82±
\82Å
\82Í
\95Û
\91¶
\82µ
\82È
\82¢
1810 //
\81ªFormDestroy
\92\86\82É
\88Ú
\93®
\82µ
\82½
\82Ì
\82Å
\81A
\82±
\82±
\82Å
\95Û
\91¶
\82µ
\82È
\82¢
\82Æ
\82¢
\82¯
\82È
\82¢
\82Æ
\8ev
\82¤
\81B
\81i
\82à
\82¶
\82ã
\81@2004/04/09
\81j
1812 if GikoForm.WindowState <> wsMinimized then
1813 SaveCoolBarSettings;
1816 GikoSys.Setting.WriteWindowSettingFile;
1817 GikoSys.Setting.WriteNameMailSettingFile;
1821 //
\82¨
\8bC
\82É
\93ü
\82è
\95Û
\91¶
1823 //FavoriteDM
\82Í
\8e©
\93®
\90¶
\90¬
\83t
\83H
\81[
\83\80\82È
\82Ì
\82Å
\81A
\89ð
\95ú
\82Í
\8e©
\93®
\93I
\82É
\82³
\82ê
\82é
1824 FavoriteDM.WriteFavorite;
1830 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1831 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
1832 GikoSys.Setting.ShowDialogForAllTabClose := false;
1833 AllTabCloseAction.Execute;
1834 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
1838 LockWindowUpdate(Self.Handle);
1839 for i := FBrowsers.Count - 1 downto 0 do begin
1840 TWebBrowser(FBrowsers[i]).Free;
1843 FBrowsers.Capacity := 0;
1848 if BrowserNullTab <> nil then begin
1849 BrowserNullTab.Browser := nil; {*BrowserNullTab
\82ÌBrowser
\82Í
\90Ý
\8cv
\8e\9e\82É
\93\
\82è
\95t
\82¯
\82Ä
\82é
\93z
1850 *
\82È
\82Ì
\82Å
\82±
\82±
\82ÅFree
\82³
\82ê
\82é
\82Æ
\8d¢
\82é
\82Ì
\82Å
\82Í
\82¸
\82µ
\82Ä
\82µ
\82Ü
\82¤
\81B
1852 BrowserNullTab.Free;
1856 LockWindowUpdate(0);
1858 TreeView.Items.BeginUpdate;
1859 for i := TreeView.Items.Count - 1 downto 0 do begin
1860 TreeView.Items[i].Free;
1862 TreeView.Items.Clear;
1863 TreeView.Items.EndUpdate;
1867 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\95Û
\91¶
1869 //AddressHistoryDM
\82Í
\8e©
\93®
\90¶
\90¬
\83t
\83H
\81[
\83\80\82È
\82Ì
\82Å
\81A
\89ð
\95ú
\82Í
\8e©
\93®
\93I
\82É
\82³
\82ê
\82é
\81B
1870 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1874 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
\95Û
\91¶
1888 //
\8f\84\89ñ
\83\8a\83X
\83g
\95Û
\91¶&
\94j
\8aü
1890 RoundList.SaveRoundFile;
1904 FControlThread.Terminate;
1905 FControlThread.WaitFor;
1909 FControlThread.Free;
1912 // TBBS
\82Í
\95Û
\8e\9d\82µ
\82Ä
\82¢
\82é TCategory, TBoard, TThreadItem
\82·
\82×
\82Ä
\82ð
\8aJ
\95ú
\82·
\82é
1913 // TBoard, TThreadItem
\82Ì
\83f
\83X
\83g
\83\89\83N
\83^
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94j
\8aü
\82ð
\93`
\82¦
\82é
\82Ì
\82Å
1914 // BoardPluteIns
\82Ì
\8aJ
\95ú
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ
1916 for i := Length( BBSs ) - 1 downto 0 do begin
1917 if BBSs[ i ] <> nil then
1925 for i := Length( BoardPlugIns ) - 1 downto 0 do begin
1926 if BoardPlugIns[ i ] <> nil then
1927 BoardPlugIns[ i ].Free;
1928 BoardPlugIns[ i ] := nil;
1934 if FEvent <> nil then
1938 if FHint <> nil then begin
1939 FHint.ReleaseHandle;
1944 if TPreviewBrowser <> nil then begin
1945 FPreviewBrowser.Free;
1946 FPreviewBrowser := nil;
1953 //
\83t
\83H
\81[
\83\80\83N
\83\8d\81[
\83Y
1954 procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1957 //
\83L
\83\83\83r
\83l
\83b
\83g
\81~
\83{
\83^
\83\93\83N
\83\8a\83b
\83N
1958 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1960 CabinetVisibleAction.Execute;
1961 // CabinetPanelVisible(false);
1964 //
\8ae
\8f\8a\82É
\82 \82é
\83L
\83\83\83r
\83l
\83b
\83g
\81E BBS
\83\81\83j
\83\85\81[
\82ð
\83Z
\83b
\83g
\81^
\8dX
\90V
1965 procedure TGikoForm.SetBBSMenu;
1968 item : TBBSMenuItem;
1971 //
\83\81\83j
\83\85\81[
\82ð
\8dí
\8f\9c
1972 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1974 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1975 CabinetSelectPopupMenu.Items[ i ].Free;
1976 CabinetMenu.Items[ i ].Free;
1977 BBSSelectPopupMenu.Items[ i ].Free;
1983 //
\83\81\83j
\83\85\81[
\82ð
\90Ý
\92è
1984 for i := Length( BBSs ) - 1 downto 0 do begin
1986 item := TBBSMenuItem.Create( PopupMenu );
1987 item.Caption := BBSs[ i ].Title;
1988 item.Data := BBSs[ i ];
1989 item.OnClick := BBSMenuItemOnClick;
1990 CabinetSelectPopupMenu.Items.Insert( 0, item );
1991 item := TBBSMenuItem.Create( PopupMenu );
1992 item.Caption := BBSs[ i ].Title;
1993 item.Data := BBSs[ i ];
1994 item.OnClick := BBSMenuItemOnClick;
1995 CabinetMenu.Insert( 0, item );
1996 item := TBBSMenuItem.Create( PopupMenu );
1997 item.Caption := BBSs[ i ].Title;
1998 item.Data := BBSs[ i ];
1999 item.OnClick := BBSMenuItemOnClick;
2000 BBSSelectPopupMenu.Items.Insert( 0, Item );
2007 procedure TGikoForm.ReloadBBS;
2012 //
\83^
\83u
\83N
\83\8d\81[
\83Y
2013 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
2014 GikoSys.Setting.ShowDialogForAllTabClose := false;
2015 AllTabCloseAction.Execute;
2016 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
2018 SetContent(BrowserNullTab);
2019 //TreeView
\83N
\83\8a\83A
\81iBBS2ch.Free
\82Ì
\8cã
\82É
\83N
\83\8a\83A
\82·
\82é
\82ÆXP
\83X
\83^
\83C
\83\8b\8e\9e\82É
\83G
\83\89\81[
\8fo
\82é
\81j
2020 TreeView.Items.Clear;
2024 for i := Length( BBSs ) - 1 downto 0 do begin
2025 if BBSs[ i ] <> nil then
2034 FTreeType := gttNone;
2036 GikoSys.ListBoardFile; //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\93Ç
\8d\9e
2038 // BBS
\83\81\83j
\83\85\81[
\82Ì
\8dX
\90V
2041 ShowBBSTree( BBSs[ 0 ] );
2043 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
2048 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
2049 FavoriteDM.WriteFavorite;
2051 FavoriteDM.ReadFavorite;
2057 //
\83{
\81[
\83h
\83c
\83\8a\81[
\90Ý
\92è
2058 procedure TGikoForm.SetBoardTreeNode(
2064 CategoryNode: TTreeNode;
2065 BoardNode: TTreeNode;
2066 Category: TCategory;
2069 //
\94Â
\83\8a\83X
\83g
\82Ì
\90Ý
\92è
2070 FActiveBBS := inBBS;
2071 TreeView.Items.BeginUpdate;
2072 TreeView.Items.Clear;
2074 if not inBBS.IsBoardFileRead then
2075 GikoSys.ReadBoardFile( inBBS );
2077 if SplashWindow <> nil then
2078 SplashWindow.ProgressBar.Max := inBBS.Count;
2082 Root := TreeView.Items.Add( nil, inBBS.Title );
2083 Root.ImageIndex := ITEM_ICON_2CH1;
2084 Root.SelectedIndex := ITEM_ICON_2CH2;
2086 for i := 0 to inBBS.Count - 1 do begin
2087 Category := TCategory(inBBS.Items[i]);
2088 CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
2089 CategoryNode.Data := Category;
2090 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
2091 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
2093 for j := 0 to Category.Count - 1 do begin
2094 Board := TBoard(Category.Items[j]);
2096 BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
2097 BoardNode.Data := Board;
2098 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
2099 if not Board.IsLogFile then begin
2100 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
2101 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
2103 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
2104 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
2105 for k := 0 to Board.Count - 1 do begin
2106 if Board.Items[ k ].IsLogFile then begin
2107 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
2108 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
2117 CategoryNode.Expanded := Category.NodeExpand;
2119 if SplashWindow <> nil then begin
2120 SplashWindow.ProgressBar.StepIt;
2121 Application.ProcessMessages;
2125 TreeView.Items.EndUpdate;
2129 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
2131 COLUMN: array[0..0] of string = ('
\83J
\83e
\83S
\83\8a\96¼');
2133 ListColumn: TListColumn;
2136 ListView.Items.BeginUpdate;
2138 Screen.Cursor := crHourGlass;
2140 ListView.Columns.Clear;
2141 for i := 0 to Length(COLUMN) - 1 do begin
2142 ListColumn := ListView.Columns.Add;
2143 ListColumn.Caption := COLUMN[i];
2144 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
2147 ListView.Items.Count := 0;
2148 ListView.Items.Clear;
2149 ListView.Items.Count := ABBS2ch.Count;
2151 // UpFolderAction.Enabled := False;
2152 // AllItemAction.Enabled := False;
2153 // LogItemAction.Enabled := False;
2154 // NewItemAction.Enabled := False;
2155 // SelectItemAction.Enabled := False;
2156 // ListDownloadToolButton.Enabled := False;
2157 // BoardReservToolButton.Enabled := False;
2158 // ListThreadDownloadToolButton.Enabled := False;
2160 ListNameLabel.Caption := ABBS2ch.Title;
2161 FolderImage.Picture := nil;
2162 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
2165 FSortOrder := False;
2166 ListViewColumnClick(nil, ListView.Column[0]);
2168 Result := ABBS2ch.Count;
2170 Screen.Cursor := crDefault;
2171 ListView.Items.EndUpdate;
2175 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
2177 COLUMN: array[0..2] of string = ('
\94Â
\96¼', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e');
2179 ListColumn: TListColumn;
2182 ListView.Items.BeginUpdate;
2184 Screen.Cursor := crHourGlass;
2186 ListView.Columns.Clear;
2187 for i := 0 to Length(COLUMN) - 1 do begin
2188 ListColumn := ListView.Columns.Add;
2189 ListColumn.Caption := COLUMN[i];
2190 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
2193 ListView.Items.Count := 0;
2194 ListView.Items.Clear;
2195 ListView.Items.Count := Category.Count;
2197 // UpFolderAction.Enabled := True;
2198 // AllItemAction.Enabled := False;
2199 // LogItemAction.Enabled := False;
2200 // NewItemAction.Enabled := False;
2201 // SelectItemAction.Enabled := False;
2202 // ListDownloadToolButton.Enabled := False;
2203 // BoardReservToolButton.Enabled := False;
2204 // ListThreadDownloadToolButton.Enabled := False;
2206 ListNameLabel.Caption := Category.Title;
2207 FolderImage.Picture := nil;
2208 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2211 FSortOrder := False;
2212 ListViewColumnClick(nil, ListView.Column[0]);
2214 Result := Category.Count;
2216 Screen.Cursor := crDefault;
2217 ListView.Items.EndUpdate;
2221 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2223 COLUMN: array[0..7] of string = ('
\83X
\83\8c\83b
\83h
\96¼', '
\83J
\83E
\83\93\83g', '
\8eæ
\93¾', '
\90V
\92\85',
2224 '
\96¢
\93Ç', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e', '
\83X
\83\8c\8dì
\90¬
\93ú
\8e\9e');
2225 COLUMN_ALIGNMENT: array[0..7] of TAlignment = (taLeftJustify, taRightJustify,
2226 taRightJustify, taRightJustify,
2227 taRightJustify, taLeftJustify,
2228 taLeftJustify, taLeftJustify);
2229 //No,
\83X
\83\8c\83b
\83h
\96¼,
\83J
\83E
\83\93\83g,
\8f\84\89ñ
\97\
\96ñ,
\8eæ
\93¾
\93ú
\8e\9e
2231 ListColumn: TListColumn;
2234 ListView.Items.BeginUpdate;
2236 Screen.Cursor := crHourGlass;
2238 //
\83`
\83\89\82Â
\82«
\96h
\8e~
\82Ì
\82½
\82ß
\81A
\95Ï
\8dX
\82³
\82ê
\82Ä
\82¢
\82é
\8fê
\8d\87\82Ì
\82Ý
2239 //
\81¦
\96¼
\8fÌ
\82Í
\88á
\82¤
\82ª
\83J
\83\89\83\80\90\94\82ª
\93¯
\82¶
\81A
\82Æ
\82¢
\82Á
\82½
\8fê
\8d\87\82É
\91Î
\8f\88\82Å
\82«
\82È
\82¢
\82Ì
\82Å
\92\8d\88Ó
2240 if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2242 ListView.Columns.Clear;
2243 for i := 0 to Length(COLUMN) - 1 do begin
2244 ListColumn := ListView.Columns.Add;
2245 ListColumn.Caption := COLUMN[i];
2246 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2247 ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2251 ListView.Items.Count := 0;
2252 ListView.Items.Clear;
2254 case GikoForm.ViewType of
2255 gvtAll: ListView.Items.Count := Board.Count;
2256 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2257 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2258 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2261 ListNameLabel.Caption := Board.Title;
2262 FolderImage.Picture := nil;
2263 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2266 FSortOrder := False;
2267 ListViewColumnClick(nil, ListView.Column[0]);
2269 Result := Board.Count;
2271 Screen.Cursor := crDefault;
2272 ListView.Items.EndUpdate;
2276 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2278 // FileName: string;
2279 // DateTime: TDateTime;
2282 Category: TCategory;
2284 ThreadItem: TThreadItem;
2286 ActivListObj : TObject;
2288 ActivListObj := ActiveList;
2289 if ActivListObj is TBBS then begin
2290 BBS := TBBS(ActivListObj);
2292 ListView.StateImages := nil;
2294 if BBS = nil then Exit;
2295 if BBS.Count <= 0 then Exit;
2296 if Item = nil then Exit;
2297 if Item.Index >= BBS.Count then Exit;
2298 if ListView.Items.Count = 0 then Exit;
2300 if not (BBS.Items[Item.index] is TCategory) then Exit;
2301 Category := TCategory(BBS.Items[Item.index]);
2303 if Category = nil then Exit;
2305 if ListNumberVisibleAction.Checked then
2306 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2308 Item.Caption := Category.Title;
2310 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2311 Item.Data := Category;
2312 end else if ActivListObj is TCategory then begin
2313 Category := TCategory(ActivListObj);
2315 ListView.StateImages := nil;
2317 if Category = nil then Exit;
2318 if Category.Count <= 0 then Exit;
2319 if Item = nil then Exit;
2320 if Item.Index >= Category.Count then Exit;
2321 if ListView.Items.Count = 0 then Exit;
2323 if not (Category.Items[Item.Index] is TBoard) then Exit;
2324 Board := TBoard(Category.Items[Item.Index]);
2326 if Board = nil then Exit;
2328 if ListNumberVisibleAction.Checked then
2329 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2331 Item.Caption := Board.Title;
2333 if Item.SubItems.Count <> 2 then begin
2334 Item.SubItems.Clear;
2335 Item.SubItems.Add('');
2336 Item.SubItems.Add('');
2339 Item.ImageIndex := ITEM_ICON_BOARD1;
2342 Item.SubItems[0] := Board.RoundName // '
\97\
\96ñ'
2344 Item.SubItems[0] := '';
2346 if Board.RoundDate = ZERO_DATE then begin
2347 Item.SubItems[1] := '';
2349 Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2351 end else if ActivListObj is TBoard then begin
2352 Board := TBoard(ActivListObj);
2354 if GikoSys.Setting.ListIconVisible then
2355 ListView.StateImages := StateIconImageList
2357 ListView.StateImages := nil;
2359 case GikoForm.ViewType of
2360 gvtAll: BoardCnt := Board.Count;
2361 gvtLog: BoardCnt := Board.GetLogThreadCount;
2362 gvtNew: BoardCnt := Board.GetNewThreadCount;
2363 gvtUser: BoardCnt := Board.GetUserThreadCount;
2368 // if Board = nil then Exit;
2369 if BoardCnt <= 0 then Exit;
2370 if Item = nil then Exit;
2371 if Item.Index > BoardCnt then Exit;
2372 if ListView.Items.Count = 0 then Exit;
2374 // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2377 case GikoForm.ViewType of
2378 gvtAll: if Item.Index >= Board.Count then Exit else
2379 ThreadItem := TThreadItem(Board.Items[Item.Index]);
2380 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2381 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2382 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2385 if ThreadItem = nil then Exit;
2387 // if ListNumberVisibleAction.Checked then
2388 // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2390 RepStr := ThreadItem.Title;
2391 RepStr := CustomStringReplace(RepStr, '<', '<' );
2392 RepStr := CustomStringReplace(RepStr, '>', '>' );
2393 RepStr := CustomStringReplace(RepStr, '"', '"' );
2394 RepStr := CustomStringReplace(RepStr, '&', '&' );
2395 //RepStr := StringReplace(RepStr, '
\81\97\81M', ',', [rfReplaceAll]);
2397 if Item.SubItems.Count <> 7 then begin
2398 Item.SubItems.Clear;
2399 Item.SubItems.Add('');
2400 Item.SubItems.Add('');
2401 Item.SubItems.Add('');
2402 Item.SubItems.Add('');
2403 Item.SubItems.Add('');
2404 Item.SubItems.Add('');
2405 Item.SubItems.Add('');
2408 if ListNumberVisibleAction.Checked then
2409 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2411 Item.Caption := RepStr;
2413 case ThreadItem.AgeSage of
2414 gasNone: Item.StateIndex := -1;
2415 gasNew: Item.StateIndex := 0;
2416 gasAge: Item.StateIndex := 1;
2417 gasSage: Item.StateIndex := 2;
2420 if ThreadItem.IsLogFile then begin
2421 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2422 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2423 Item.SubItems[1] := IntToStr(ThreadItem.Count);
2424 if ThreadItem.NewResCount = 0 then
2425 Item.SubItems[2] := ''
2427 Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2428 Item.SubItems[3] := '';
2429 if ThreadItem.Round then
2430 Item.SubItems[4] := ThreadItem.RoundName
2432 Item.SubItems[4] := '';
2433 if ThreadItem.RoundDate = ZERO_DATE then begin
2434 Item.SubItems[5] := '';
2436 Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2437 if ThreadItem.NewArrival then
2438 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2439 if ThreadItem.CreateDate = ZERO_DATE then begin
2440 Item.SubItems[6] := '';
2442 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2445 Item.ImageIndex := ITEM_ICON_THREAD1;
2446 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2447 Item.SubItems[1] := '';
2448 Item.SubItems[2] := '';
2449 Item.SubItems[3] := '';
2450 Item.SubItems[4] := '';
2451 Item.SubItems[5] := '';
2452 if not GikoSys.Setting.CreationTimeLogs then
2453 if ThreadItem.CreateDate = ZERO_DATE then
2454 Item.SubItems[6] := ''
2456 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2460 Item.Data := ThreadItem;
2464 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2465 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2466 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2467 var Index: Integer);
2473 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2479 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2480 EndIndex: Integer; OldState, NewState: TItemStates);
2485 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2493 threadItem : TThreadItem;
2495 Protocol, Host, Path, Document, Port, Bookmark: string;
2500 ActiveFileName: string;
2506 if not( TObject(Sender) is TWebBrowser )then
2510 if (TWebBrowser(Sender) <> nil) and (not TWebBrowser(Sender).Busy) and (Assigned(TWebBrowser(Sender).Document)) then begin
2511 if LowerCase(OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset) <> 'shift_jis' then begin
2512 OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset := 'shift_jis';
2519 if PreviewTimer.Enabled then
2520 PreviewTimer.Enabled := False;
2521 Application.CancelHint;
2522 if GetActiveContent <> nil then
2523 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2525 ActiveFileName := '';
2527 StatusBar.Panels[1].Text := Text;
2529 if FHint <> nil then begin
2530 FHint.ReleaseHandle;
2533 if FPreviewBrowser <> nil then
2534 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2536 if not GikoSys.Setting.UnActivePopup then
2537 if not GikoForm.Active then
2540 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2541 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2544 Ext := AnsiLowerCase(ExtractFileExt(Text));
2545 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2546 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2547 if FPreviewBrowser = nil then begin
2548 FPreviewBrowser := TPreviewBrowser.Create(Self);
2549 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2550 TOleControl(FPreviewBrowser).Parent := nil;
2552 FPreviewBrowser.Navigate(BLANK_HTML);//
\91O
\89ñ
\82Ì
\83v
\83\8c\83r
\83\85\81[
\89æ
\91\9c\8fÁ
\8b\8e\97p
2553 FPreviewURL := Text;
2554 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2555 PreviewTimer.Enabled := True;
2556 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2557 if Pos('mailto:', Text) = 1 then begin
2558 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2559 //
\83M
\83R
\83i
\83r
\83X
\83\8c \83p
\81[
\83g3
\82Ì466
\8e\81\82É
\8a´
\8eÓ
2561 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2562 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2563 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2564 if (Assigned(e)) then begin
2565 tmp2 := ZenToHan(e.Get_outerText);
2566 if (GikoSys.IsNumeric(tmp2)) then begin
2567 //
\82\93\82Í
\83\8c\83X
\94Ô
\8d\86\82Á
\82Û
\82¢
\82Á
\82·
\81B
2568 wkIntSt := StrToInt(tmp2);
2569 wkIntTo := StrToInt(tmp2);
2570 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2571 FHint.PopupType := gptThread;
2572 SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False);
2574 FHint.PopupType := gptRaw;
2579 threadItem := GetActiveContent;
2580 if Pos('about:blank..', Text) = 1 then begin
2581 if AnsiPos('http://jbbs.shitaraba.com/', threadItem.URL) <> 0 then begin
2582 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2583 Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo);
2584 if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then
2585 buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo)
2586 else if( PathRec.FSt <> 0 ) then
2587 buf := IntToStr(PathRec.FSt);
2588 end else if AnsiPos('machi.to/bbs/', threadItem.URL) <> 0 then begin
2589 URL := threaditem.URL;
2590 buf := Copy(Text,AnsiPos('&st=',Text),Length(Text)-AnsiPos('&st=',Text) + 1);
2592 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2593 buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text));
2599 PathRec := Gikosys.Parse2chURL2(URL);
2600 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2601 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
2603 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
2605 URL := GikoSys.GetBrowsableThreadURL( URL );
2606 wkIntSt := PathRec.FSt;
2607 wkIntTo := PathRec.FTo;
2609 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2612 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2614 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2616 end else if wkIntSt > wkIntTo then begin
2621 //if wkIntSt = 0 then
2623 //if wkINtTo = 0 then
2625 //if PathRec.FFirst then
2627 if PathRec.FStBegin then
2629 if PathRec.FToEnd then
2632 //ATitle := ActiveFileName <> PathRec.FKey;
2633 if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
2638 threadItem := BBSsFindThreadFromURL( URL );
2640 if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
2641 board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
2642 if board <> nil then begin
2643 if not board.IsThreadDatRead then
2644 GikoSys.ReadSubjectFile( board );
2645 threadItem := board.FindThreadFromFileName( PathRec.FKey + '.dat' );
2649 if threadItem <> nil then begin
2650 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2651 FHint.PopupType := gptThread;
2652 SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2658 // ShowTextPopup(s);
2659 if FHint.PopupType = gptRaw then begin
2660 if FHint.Caption <> '' then
2663 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2669 procedure TGikoForm.BrowserTitleChange(Sender: TObject;
2670 const Text: WideString);
2674 if (Text = BLANK_HTML) or (Text = GikoSys.GetHtmlTempFileName) then
2675 Title := CAPTION_NAME
2677 Title := CAPTION_NAME + ' - [' + Text + ']';
2679 //Application.Title := Title;
2682 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2685 //SysMenuApp: HMenu;
2687 FEnabledCloseButton := Enabled;
2688 SysMenu := GetSystemMenu(Handle, False);
2689 //SysMenuApp := GetSystemMenu(Application.Handle, False);
2691 if Enabled then begin
2692 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2693 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2695 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2696 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2699 DrawMenuBar(Handle);
2700 //DrawMenuBar(Application.Handle);
2703 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2704 var AllowChange: Boolean);
2706 if FTreeType = gtt2ch then
2710 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2711 Shift: TShiftState);
2713 if GetActiveList is TBoard then begin
2714 if Key = VK_BACK then begin
2715 // UpFolderButtonClick(Sender);
2716 end else if Key = VK_SPACE then begin
2717 ListDoubleClick(Shift);
2718 end else if Key = VK_RETURN then begin
2721 end else begin // TBBS, TCategory
2722 if Key = VK_BACK then begin
2723 // UpFolderButtonClick(Sender);
2724 end else if Key = VK_SPACE then begin
2726 end else if Key = VK_RETURN then begin
2727 ListDoubleClick(Shift);
2732 function TGikoForm.GetHttpState: Boolean;
2734 Result := FHttpState;
2737 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2738 Column: TListColumn);
2742 wkCategory: TCategory;
2745 if FSortIndex = Column.Index then
2746 FSortOrder := not FSortOrder
2748 FSortOrder := False;
2750 for i := 0 to ListView.Columns.Count - 1 do
2751 ListView.Column[i].ImageIndex := -1;
2753 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
2755 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
2757 Sort.SortNoFlag := ListNumberVisibleAction.Checked;
2759 //if TObject(TreeView.Selected.Data) is TBBS then begin
2760 if TObject( FActiveList ) is TBBS then begin
2761 //wkBBS := TBBS(TreeView.Selected.Data);
2762 wkBBS := TBBS( FActiveList );
2763 Sort.SortOrder := FSortOrder;
2764 Sort.SortIndex := Column.Index;
2765 wkBBS.Sort(CategorySortProc);
2767 //end else if TObject(TreeView.Selected.Data) is TCategory then begin
2768 end else if TObject( FActiveList ) is TCategory then begin
2769 //wkCategory := TCategory(TreeView.Selected.Data);
2770 wkCategory := TCategory( FActiveList );
2771 Sort.SortOrder := FSortOrder;
2772 Sort.SortIndex := Column.Index;
2773 wkCategory.CustomSort(BoardSortProc);
2775 //end else if TObject(TreeView.Selected.Data) is TBoard then begin
2776 end else if TObject( FActiveList ) is TBoard then begin
2777 //wkBoard := TBoard(TreeView.Selected.Data);
2778 wkBoard := TBoard( FActiveList );
2779 Sort.SortOrder := FSortOrder;
2780 Sort.SortIndex := Column.Index;
2781 wkBoard.CustomSort(ThreadItemSortProc);
2784 FSortIndex := Column.Index;
2787 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2788 Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean);
2792 DefaultDraw := True;
2794 DefaultDraw := False;
2795 if (cdsSelected in State) or (cdsHot in State) then begin
2796 Sender.Canvas.Brush.Color := clHighlight;
2797 Sender.Canvas.Font.Color := clHighlightText;
2799 Sender.Canvas.Brush.Color := clBtnFace;
2800 Sender.Canvas.Font.Color := clBtnText;
2802 ARect := Rect(Button.Left, Button.Top, Button.Left + Button.Width, Button.Top + Button.Height);
2803 Sender.Canvas.FillRect(ARect);
2804 DrawText(Sender.Canvas.Handle, PChar(Button.Caption), -1, ARect, DT_SINGLELINE or DT_VCENTER or DT_CENTER);
2807 function TGikoForm.GetTreeNode(Data: TObject): TTreeNode;
2812 Nodes := TreeView.Items;
2814 for i := 0 to Nodes.Count - 1 do begin
2815 if Nodes.Item[i].Data = Data then begin
2816 Result := Nodes.Item[i];
2823 procedure TGikoForm.BrowserBeforeNavigate2(Sender: TObject;
2824 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
2825 Headers: OleVariant; var Cancel: WordBool);
2830 kMenuName: string = 'menu:';
2833 if Pos(kMenuName, URL) <> 0 then begin
2834 sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
2836 if not GikoSys.IsNumeric(sNo) then Exit;
2840 KokoPopupMenu.Tag := StrToInt(sNo);
2841 KokoPopupMenu.Popup(p.x, p.y);
2842 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
2843 Cancel := not GikoSys.Setting.OpenMailer;
2848 procedure TGikoForm.ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
2849 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
2850 var DefaultDraw: Boolean);
2852 ThreadItem: TThreadItem;
2854 // TListView(Sender).Canvas.Font.Style := [];
2855 if TObject(Item.Data) is TThreadItem then begin
2856 ThreadItem := TThreadItem(Item.Data);
2857 if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
2858 ListView.Canvas.Brush.Color := FOddColor;
2860 ListView.Canvas.Brush.Color := FListViewBackGroundColor;
2862 // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
2863 if ThreadItem.UnRead then
2864 TListView(Sender).Canvas.Font.Style := [fsBold];
2868 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
2870 Application.ProcessMessages;
2871 if Application.Terminated then
2873 if PreviewTimer.Enabled then
2874 PreviewTimer.Enabled := False;
2875 //
\83t
\83H
\81[
\83J
\83X
\82ª
\91¼
\82Ì
\83A
\83v
\83\8a\82É
\95Ï
\82í
\82Á
\82½
\82Æ
\82«
\82É
\83q
\83\93\83g
\82ð
\8fÁ
\8b\8e
2876 if FHint <> nil then begin
2877 FHint.ReleaseHandle;
2882 if FPreviewBrowser <> nil then
2883 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2887 procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
2888 const ARect: TRect; var DefaultDraw: Boolean);
2892 IsBoardNode: Boolean;
2898 Category: TCategory;
2902 DefaultDraw := True;
2904 if FTreeType = gttHistory then Exit;
2906 TreeView.Canvas.Font.Color := clBlue;
2907 IsBoardNode := False;
2908 for i := 0 to TreeView.Items.Count - 1 do begin
2910 if not TreeView.Items[i].IsVisible then
2913 if TObject(TreeView.Items[i].Data) is TCategory then begin
2914 if TreeView.Items[i].Expanded then
2917 IsBoardNode := False;
2918 Category := TCategory(TreeView.Items[i].Data);
2919 for j := 0 to Category.Count - 1 do begin
2920 Board := Category.Items[j];
2921 if Board <> nil then begin
2922 if Board.UnRead > 0 then begin
2930 end else if TObject(TreeView.Items[i].Data) is TBoard then begin
2931 IsBoardNode := True;
2932 Board := TBoard(TreeView.Items[i].Data);
2933 Cnt := Board.UnRead;
2939 Bitmap := TBitmap.Create;
2941 Bitmap.Canvas.Font.Assign(TreeView.Canvas.Font);
2942 Bitmap.Canvas.Font.Style := [fsBold];
2943 NodeWidth := Bitmap.Canvas.TextWidth(TreeView.Items[i].Text);
2948 NodeRect := TreeView.Items[i].DisplayRect(True);
2951 CntText := '(' + IntToStr(Cnt) + ')'
2952 else if Cnt = 1 then
2956 TextWidth := TreeView.Canvas.TextWidth(CntText);
2958 TextRect := Rect(NodeRect.Left + NodeWidth + 8,
2960 NodeRect.Left + NodeWidth + TextWidth + 8,
2962 DrawText(TreeView.Canvas.Handle,
2966 DT_SINGLELINE or DT_VCENTER);
2968 TreeViewCustomDrawItem(nil, nil, [], DefaultDraw);
2971 procedure TGikoForm.TreeViewCustomDrawItem(Sender: TCustomTreeView;
2972 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
2975 Category: TCategory;
2978 DefaultDraw := True;
2980 if FTreeType = gttHistory then Exit;
2982 TreeView.Canvas.Font.Style := [];
2983 if Node <> nil then begin
2984 if TObject(Node.Data) is TCategory then begin
2985 Category := TCategory(Node.Data);
2986 for i := 0 to Category.Count - 1 do begin
2987 Board := Category.Items[i];
2988 if Board <> nil then begin
2989 if Board.UnRead > 0 then begin
2990 TreeView.Canvas.Font.Style := [fsBold];
2995 end else if TObject(Node.Data) is TBoard then begin
2996 Board := TBoard(Node.Data);
2997 if Board.UnRead > 0 then
2998 TreeView.Canvas.Font.Style := [fsBold];
3003 procedure TGikoForm.TreeViewExpanded(Sender: TObject; Node: TTreeNode);
3005 TreeView.Invalidate;
3007 if TObject(Node.Data) is TBBS then begin
3008 TBBS(Node.Data).NodeExpand := True;
3009 end else if TObject(Node.Data) is TCategory then begin
3010 TCategory(Node.Data).NodeExpand := True;
3011 end else if TObject(Node.Data) is TBoard then begin
3012 TBoard(Node.Data).NodeExpand := True;
3016 {procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
3018 TreeSplitter.Visible := PanelVisible;
3019 CabinetPanel.Visible := PanelVisible;
3020 CabinetToolButton.Down := PanelVisible;
3023 procedure TGikoForm.ListViewAllSelect;
3029 procedure TGikoForm.TreeViewDblClick(Sender: TObject);
3034 GetCursorPos(APoint);
3035 APoint := TreeView.ScreenToClient(APoint);
3036 HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
3037 if not (htOnLabel in HitTest) then Exit;
3039 TreeDoubleClick( TreeView.Selected );
3042 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
3044 AddMessageList(Msg, nil, Icon);
3047 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
3051 boardPlugIn : TBoardPlugIn;
3055 if Item.DownType = gdtBoard then
3056 ATitle := Item.Board.Title
3058 ATitle := Item.ThreadItem.Title;
3060 ATitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j';
3062 if Item.State in [gdsComplete, gdsDiffComplete] then begin
3064 if Item.DownType = gdtBoard then begin
3067 AddMessageList(ATitle + ' [
\83X
\83\8c\88ê
\97\97\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3068 if GetActiveList = Item.Board then begin
3070 SetActiveList(Item.Board);
3072 Item.Board.Modified := True;
3073 Item.Board.IsThreadDatRead := True;
3075 end else if Item.DownType = gdtThread then begin
3078 Item.ThreadItem.NewArrival := True;
3079 if (Item.ThreadItem.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin
3080 boardPlugIn := Item.ThreadItem.BoardPlugIn;
3081 Item.ThreadItem.Title := GikoSys.DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 )).FTitle;
3082 ATitle := Item.ThreadItem.Title;
3083 end else if ATitle = '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j' then begin
3084 ATitle := GikoSys.DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1)).FTitle;
3086 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
3087 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then
3088 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
3090 if GetActiveContent = Item.ThreadItem then
3091 InsertBrowserTab(Item.ThreadItem)
3092 else if (ListView.Selected <> nil ) and ( TObject(ListView.Selected.Data) is TThreadItem ) and ( Item.ThreadItem = TThreadItem(ListView.Selected.Data)) then
3093 InsertBrowserTab(Item.ThreadItem, True)
3095 InsertBrowserTab(Item.ThreadItem, False);
3097 if Item.State = gdsComplete then begin
3099 AddMessageList(ATitle + ' [
\83X
\83\8c\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3101 PlaySound('NewDiff');
3102 AddMessageList(ATitle + ' [
\83X
\83\8c\8d·
\95ª
\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3105 //
\8f\84\89ñ
\82 \82è
\82Ì
\8fê
\8d\87\81\95\82P
\82O
\82O
\82O
\92´
\82Í
\8f\84\89ñ
\8dí
\8f\9c
3106 if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin
3107 Item.ThreadItem.Round := False;
3108 Item.ThreadItem.RoundName := '';
3109 AddMessageList('
\81\9a1000
\94
\8c¾
\82ð
\92´
\82¦
\82½
\82Ì
\82Å
\8f\84\89ñ
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82µ
\82½ - [' + Item.ThreadItem.Title + ']', nil, gmiOK);
3115 end else if Item.State = gdsNotModify then begin
3117 { if (Item.DownType = gdtThread) and (AddHistory(Item.ThreadItem)) then begin
3118 //SetContent(Item.ThreadItem);
3119 InsertBrowserTab(Item.ThreadItem);
3121 AddMessageList(ATitle + ' [
\96¢
\8dX
\90V]', nil, gmiSAD);
3122 PlaySound('NoChange');
3123 Screen.Cursor := crDefault;
3124 end else if Item.State = gdsAbort then begin
3126 AddMessageList(ATitle + ' [
\92\86\92f]', nil, gmiSAD);
3127 end else if Item.State = gdsError then begin
3132 AddMessageList(ATitle + ' [
\83G
\83\89\81[(' + IntToStr(Item.ResponseCode) + s + ')]', nil, gmiNG);
3133 // if Item.ResponseCode = 302 then
3134 // AddMessageList('
\94Â
\82ª
\88Ú
\93]
\82µ
\82½
\82©
\82à
\82µ
\82ê
\82È
\82¢
\82Ì
\82Å
\94Â
\8dX
\90V
\82ð
\8ds
\82Á
\82Ä
\82
\82¾
\82³
\82¢
\81B', nil, gmiNG);
3140 if FWorkCount < 0 then FWorkCount := 0;
3141 if FWorkCount = 0 then begin
3143 Animate.Active := False;
3145 Screen.Cursor := crDefault;
3152 procedure TGikoForm.WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
3154 // SetProgressValue(Number, 0, AWorkCountMax);
3155 // ProgressBar.Visible := True;
3156 ProgressBar.Position := 0;
3157 ProgressBar.Max := AWorkCountMax;
3158 FDownloadTitle := AWorkTitle;
3159 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ð
\8aJ
\8en
\82µ
\82Ü
\82·';
3160 FDownloadMax := AWorkCountMax;
3163 procedure TGikoForm.WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
3165 ProgressBar.Position := 0;
3166 if FDownloadMax <> 0 then
3167 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ª
\8a®
\97¹
\82µ
\82Ü
\82µ
\82½';
3170 procedure TGikoForm.Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
3172 ProgressBar.Position := AWorkCount;
3173 // SetProgressValue(Number, AWorkCount);
3174 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86 (' + IntToStr(AWorkCount) + '/' + IntToStr(FDownloadMax) + ')';
3178 procedure TGikoForm.SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
3180 Component: TComponent;
3182 Component := FindComponent('ProgressBar' + IntToStr(Number + 1));
3183 if Component <> nil then begin
3184 if not (Component is TProgressBar) then Exit;
3186 TProgressBar(Component).Max := Max;
3187 TProgressBar(Component).Position := Value;
3192 procedure TGikoForm.AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
3194 ListItem: TListItem;
3196 MessageListView.Items.BeginUpdate;
3198 ListItem := MessageListView.Items.Add;
3199 ListItem.Caption := ACaption;
3200 ListItem.Data := AObject;
3201 ListItem.MakeVisible(False);
3203 gmiOK: ListItem.ImageIndex := 0;
3204 gmiSAD: ListItem.ImageIndex := 1;
3205 gmiNG: ListItem.ImageIndex := 2;
3206 gmiWhat: ListItem.ImageIndex := 3;
3209 MessageListView.Items.EndUpdate;
3213 {procedure TGikoForm.BrowserTabChange(Sender: TObject);
3216 ThreadItem: TThreadItem;
3218 ThreadItem := GetActiveContent;
3219 if ThreadItem <> nil then begin
3220 SetContent(ThreadItem);
3224 procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
3228 favItem : TFavoriteThreadItem;
3229 newBrowser : TBrowserRecord;
3232 if Threaditem = nil then Exit;
3234 if ThreadItem.IsLogFile then begin
3235 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\91S
\82Ä
\8aJ
\82
\82Æ
\82©
\82â
\82é
\82Æ
\81A
\8d¡
\8aJ
\82¢
\82Ä
\82é
\83X
\83\8c\82Ìbrowser
\82ð
\95t
\82¯
\91Ö
\82¦
\82é
\8b°
\82ê
\82ª
\82 \82é
3236 //
\8fí
\82É
\82S
\94Ô
\96Ú
\82ÉActive
\82Ì
\83u
\83\89\83E
\83U
\82ª
\97\88\82È
\82¢
\82æ
\82¤
\82É
\88Ú
\93®
\82³
\82¹
\82é
3237 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil) and
3238 (FActiveContent.FBrowser <> BrowserNullTab.Browser)then begin
3239 j := FBrowsers.IndexOf(FActiveContent.FBrowser);
3241 FBrowsers.Move(4, 0);
3243 favItem := TFavoriteThreadItem.Create(ThreadItem.URL, ThreadItem.Title );
3244 if not AddHistory( favItem ) then
3247 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
3248 if TObject(BrowserTab.Tabs.Objects[i]) is TBrowserRecord then begin
3249 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
3250 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = nil then begin
3251 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3252 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[4]) then begin
3253 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3254 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3255 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3256 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3261 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser := TWebBrowser(FBrowsers[4]);
3262 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
3263 FBrowsers.Move(4, 0);
3265 if ActiveTab then begin
3266 BrowserTab.TabIndex := i;
3267 BrowserTab.OnChange(nil);
3274 idx := BrowserTab.TabIndex;
3275 if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin
3276 newBrowser := TBrowserRecord.Create;
3277 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3278 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[4]) then begin
3279 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3280 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3281 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3282 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3287 newBrowser.Browser := TWebBrowser(FBrowsers[4]);
3288 FBrowsers.Move(4, 0);
3289 //newBrowser.Browser.Navigate(BLANK_HTML);
3290 newBrowser.thread := ThreadItem;
3291 newBrowser.Repaint := true;
3292 newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes;
3294 if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 0) then begin
3296 if FActiveContent = BrowserTab.Tabs.Objects[ 0 ] then
3297 FActiveContent := nil;
3298 BrowserTab.Tabs.Objects[ 0 ].Free;
3299 BrowserTab.Tabs.Objects[ 0 ] := newBrowser;
3300 BrowserTab.Tabs[ 0 ] := GikoSys.GetShortName(ThreadItem.Title, 20);
3302 DeleteTab( TBrowserRecord( BrowserTab.Tabs.Objects[ 0 ] ) );
3304 BrowserTab.Tabs.InsertObject(0, GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser);
3307 if ActiveTab then begin
3308 BrowserTab.TabIndex := 0;
3312 newBrowser := TBrowserRecord.Create;
3313 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3314 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[4]) then begin
3315 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3316 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3317 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3318 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3323 newBrowser.Browser := TWebBrowser(FBrowsers[4]);
3324 FBrowsers.Move(4, 0);
3325 //newBrowser.Browser.Navigate(BLANK_HTML);
3326 newBrowser.thread := ThreadItem;
3327 newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes;
3328 newBrowser.Repaint := true;
3330 if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 0) then begin
3332 if FActiveContent = BrowserTab.Tabs.Objects[ 0 ] then
3333 FActiveContent := nil;
3334 BrowserTab.Tabs.Objects[ 0 ].Free;
3335 BrowserTab.Tabs.Objects[ 0 ] := newBrowser;
3336 BrowserTab.Tabs[ 0 ] := GikoSys.GetShortName(ThreadItem.Title, 20);
3338 DeleteTab( TBrowserRecord( BrowserTab.Tabs.Objects[ 0 ] ) );
3340 i := BrowserTab.Tabs.AddObject(GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser);
3343 if ActiveTab then begin
3344 BrowserTab.TabIndex := i;
3347 if(ActiveTab) or (idx = -1) then begin
3348 BrowserTab.OnChange(nil);
3351 if BrowserNullTab = nil then begin
3352 BrowserNullTab := TBrowserRecord.Create;
3353 BrowserNullTab.Browser := Browser;
3355 BrowserNullTab.thread := ThreadItem;
3356 BrowserTab.TabIndex := -1;
3357 SetContent(BrowserNullTab);
3360 if GikoSys.Setting.URLDisplay then
3361 AddressComboBox.Text := ThreadItem.URL;
3365 procedure TGikoForm.SetContent(inThread : TBrowserRecord);
3370 // HtmlName: string;
3373 // OldCursor: TCursor;
3378 idx := BrowserTab.TabIndex;
3379 if (FActiveContent <> nil) and
3380 (FActiveContent.Thread <> inThread.Thread) and
3381 (Assigned(FActiveContent.Browser.Document)) then begin
3385 //Application.ProcessMessages;
3386 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document).Body).ScrollTop;
3387 //if FActiveContent.Browser <> BrowserNullTab.Browser then
3388 // TOleControl(FActiveContent.Browser).Visible := false;
3391 MsgBox(Handle, E.Message, 'SetContent[<-ScrollTop]', 0);
3396 if inThread = nil then
3398 else if inThread.Thread = nil then begin
3399 inThread.Browser.Navigate(BLANK_HTML);
3400 BrowserBoardNameLabel.Caption := '';
3401 ItemBoardImage.Picture := nil;
3402 BrowserNameLabel.Caption := '';
3403 ItemImage.Picture := nil;
3404 BrowserNullTab.Thread := nil;
3405 //TOleControl(BrowserNullTab.Browser).Visible := true;
3406 ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
3407 FActiveContent := nil;
3409 end else if inThread.Browser = nil then begin
3410 if FActiveContent.Browser = TWebBrowser(FBrowsers[4]) then
3411 FBrowsers.Move(4, 0);
3412 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
3413 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = TWebBrowser(FBrowsers[4]) then begin
3414 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser := nil;
3415 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent <> nil then begin
3416 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent.Free;
3417 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent := nil;
3422 inThread.Browser := TWebBrowser(FBrowsers[4]);
3423 FBrowsers.Move(4, 0);
3426 BBSID := inThread.FThread.ParentBoard.BBSID;
3427 FileName := inThread.FThread.FileName;
3429 if GetCapture = ListView.Handle then
3432 Screen.Cursor := crHourGlass;
3434 if inThread.FThread.UnRead then begin
3435 inThread.FThread.ParentBoard.UnRead := inThread.FThread.ParentBoard.UnRead - 1;
3436 if inThread.FThread.ParentBoard.UnRead < 0 then inThread.FThread.ParentBoard.UnRead := 0;
3439 LockWindowUpdate(Self.Handle);
3440 ShowWindow(inThread.FBrowser.Handle, SW_SHOW);
3441 LockWindowUpdate(0);
3442 if (not Assigned(inThread.Browser.Document)) then begin
3443 inThread.Browser.Navigate('about:blank');
3445 //if inThread.Browser <> BrowserNullTab.Browser then begin
3446 while (inThread.Browser.ReadyState <> READYSTATE_COMPLETE) and
3447 (inThread.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3448 Application.ProcessMessages;
3449 if idx <> BrowserTab.TabIndex then begin
3450 BrowserTab.OnChange(nil);
3456 if not inThread.FThread.IsLogFile then begin
3458 s := '<HTML><BODY><CENTER>
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Í
\8eæ
\93¾
\82µ
\82Ä
\82¢
\82Ü
\82¹
\82ñ</CENTER></BODY></HTML>';
3459 doc := Idispatch( olevariant(inThread.Browser.ControlInterface).Document) as IHTMLDocument2;
3461 doc.charset := 'Shift_JIS';
3467 //Thread.Repaint
\82Í
\81A
\83X
\83L
\83\93\93\99\82Ì
\90Ý
\92è
\82ð
\95Ï
\8dX
\82µ
\82½
\82Æ
\82«
\81AThread
\82ð
\83_
\83E
\83\93\83\8d\81[
\83h
\82µ
\82½
\82Æ
\82«
3468 //
\90V
\8bK
\82ÉThread
\82ð
\8aJ
\82¢
\82½
\82Æ
\82«
\82É
\90^
\82É
\82È
\82Á
\82Ä
\82¢
\82é
\81B
3469 if(inThread.Repaint) or (inThread.OnlyHundred <> GikoSys.OnlyAHundredRes)then begin
3470 //Thread.LastSize := ThreadItem.Size;
3471 inThread.Repaint := false;
3473 doc := Idispatch( olevariant(inThread.Browser.ControlInterface).Document) as IHTMLDocument2;
3474 GikoSys.CreateHTML2(doc, inThread.FThread, sTitle);
3475 //
\82È
\82º
\82©
\82±
\82±
\82Å
\96¾
\8e¦
\93I
\82ÉDocumentComplete
\82ð
\8cÄ
\82Î
\82È
\82¢
\82Æ
\82¤
\82Ü
\82
\82¢
\82©
\82È
\82¢
3476 inThread.FBrowser.OnDocumentComplete(inThread.FBrowser, inThread.FBrowser.Parent, url);
3477 inThread.OnlyHundred := GikoSys.OnlyAHundredRes;
3478 Application.ProcessMessages;
3479 //
\82±
\82±
\82ÅApplication.ProcessMessages
\82ð
\8cÄ
\82Ô
\82±
\82Æ
\82É
\82æ
\82Á
\82ÄWebBrowser
\82ð
\8dX
\90V
\82³
\82¹
\82é
\81B
3480 //
\91\8a\82µ
\82È
\82¢
\82Æ
\88ê
\89æ
\96Ê
\95ª
\82µ
\82©
\95`
\89æ
\82Å
\82«
\82Ä
\82È
\82¢
\82Ì
\82Å
\82»
\82ê
\88È
\8fã
\82Ì
\83X
\83N
\83\8d\81[
\83\8b\97Ê
\82ð
\8ew
\92è
\82µ
\82Ä
\82à
\96³
\8cø
\82É
\82È
\82é
3481 //
\81@by
\82à
\82¶
\82ã(2004/01/20)
3483 if inThread.FThread.UnRead then
3484 BrowserMovement('new', inThread)
3485 else if inThread.FThread.ScrollTop <> 0 then begin
3487 doc.Body.ScrollTop := inThread.FThread.ScrollTop;
3490 MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
3494 // Application.ProcessMessages;
3497 inThread.FThread.UnRead := False;
3500 if(FActiveContent <> nil) and (FActiveContent <> inThread) then begin
3501 if (FActiveContent.Browser <> BrowserNullTab.Browser) then
3502 ShowWindow(FActiveContent.Browser.Handle, SW_HIDE);
3504 FActiveContent := inThread;
3506 BrowserBoardNameLabel.Caption := inThread.FThread.ParentBoard.Title;
3507 ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
3508 BrowserNameLabel.Caption := inThread.FThread.Title;
3509 ItemImage.Picture := nil;
3510 if inThread.FThread.IsLogFile then
3511 if inThread.FThread.NewArrival then
3512 ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap)
3514 ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap)
3516 ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap);
3518 ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;
3519 BrowserNameLabel.Left := ItemImage.Left + 20;
3522 Screen.Cursor := crDefault;
3526 function TGikoForm.GetActiveContent: TThreadItem;
3528 if( FActiveContent <> nil) and (FActiveContent.Thread <> nil)then
3529 Result := FActiveContent.Thread
3534 procedure TGikoForm.SetActiveList(Obj: TObject);
3539 // if FActiveList <> Obj then begin
3542 if ListView.Selected <> nil then
3543 idx := ListView.Selected.Index
3546 ListView.Items.Count := 0;
3547 ListView.Items.Clear;
3548 ListView.Selected := nil;
3549 // ListView.Columns.Clear;
3551 Caption := CAPTION_NAME;
3552 //Application.Title := CAPTION_NAME;
3554 if Obj is TBBS then begin
3555 for i := 0 to ListView.Columns.Count - 1 do
3556 ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i];
3557 SetCategoryListItem(TBBS(Obj));
3558 end else if Obj is TCategory then begin
3559 for i := 0 to ListView.Columns.Count - 1 do
3560 ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i];
3561 SetBoardListItem(TCategory(Obj));
3562 end else if Obj is TBoard then begin
3563 SetThreadListItem(TBoard(Obj));
3566 if idx >= 0 then begin
3567 ListView.ItemIndex := idx;
3568 ListView.ItemFocused := ListView.Items.Item[ idx ];
3574 //
\81\9a\81\9a\83q
\83\8d\83\86\83L
\83\81\83\82
3575 //
\82»
\82Ì
\82¤
\82¿interface
\82ð
\8eg
\82¤
3576 function TGikoForm.GetActiveList: TObject;
3578 Result := FActiveList;
3581 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType);
3583 SetListViewType(AViewType, '', False);
3586 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
3590 if ActiveList is TBoard then begin
3591 Board := TBoard(ActiveList);
3593 Board.ParentCategory.ParenTBBS.SelectText := SelectText;
3594 Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
3595 // Board.SelectText := SelectText;
3596 // Board.KubetsuChk := KubetsuChk;
3597 ViewType := AViewType;
3598 SetActiveList(Board);
3599 SetThreadListItem(Board);
3603 procedure TGikoForm.ListViewCustomDraw(Sender: TCustomListView;
3604 const ARect: TRect; var DefaultDraw: Boolean);
3610 if ListView.Items.Count = 0 then begin
3611 DefaultDraw := True;
3613 ListView.Canvas.Brush.Color := ListView.Color;
3614 ListView.Canvas.FillRect(ARect);
3618 ListView.Canvas.Font.Color := clWindowText;
3619 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3622 ListView.Canvas.Font.Color := clBlue;
3623 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\83\8d\83O
\97L
\82è
\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3626 ListView.Canvas.Font.Color := clGreen;
3627 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\90V
\92\85\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3630 ListView.Canvas.Font.Color := clNavy;
3631 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\83^
\83C
\83g
\83\8b\82ª
\81u%s
\81v
\82ð
\8aÜ
\82Þ
\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3632 if GetActiveList is TBoard then
3633 s := Format(s, [TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText]);
3641 p := Point((ListView.ClientWidth div 2) - (ListView.Canvas.TextWidth(s) div 2),
3642 (ListView.ClientHeight div 2) - (ListView.Canvas.TextHeight(s) div 2));
3643 ListView.Canvas.TextOut(p.X, p.Y, s);
3645 DefaultDraw := True;
3649 procedure TGikoForm.DownloadList(Board: TBoard; ForceDownload: Boolean = False);
3651 Item: TDownloadItem;
3653 if not Board.IsThreadDatRead then
3654 GikoSys.ReadSubjectFile(Board);
3655 Item := TDownloadItem.Create;
3657 Item.Board := Board;
3658 Item.DownType := gdtBoard;
3659 Item.ForceDownload := ForceDownload;
3660 // AbortToolButton.Enabled := True;
3661 // Animate.Active := True;
3662 // FDownload.Add(Item);
3663 FControlThread.AddItem(Item);
3664 // Animate.Active := False;
3665 // AbortToolButton.Enabled := False;
3666 if FWorkCount = 0 then begin
3668 Animate.Active := True;
3671 Screen.Cursor := crAppStart;
3679 procedure TGikoForm.DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
3681 Item: TDownloadItem;
3683 Item := TDownloadItem.Create;
3685 Item.ThreadItem := ThreadItem;
3686 Item.DownType := gdtThread;
3687 Item.ForceDownload := ForceDownload;
3688 // AbortToolButton.Enabled := True;
3689 // Animate.Active := True;
3690 // FDownload.Add(Item);
3691 FControlThread.AddItem(Item);
3692 // Animate.Active := False;
3693 // AbortToolButton.Enabled := False;
3694 if FWorkCount = 0 then begin
3696 Animate.Active := True;
3699 Screen.Cursor := crAppStart;
3707 procedure TGikoForm.PlaySound(SoundEventName: string);
3711 FileName := GikoSys.Setting.FindSoundFileName(SoundEventName);
3712 if FileExists(FileName) then begin
3713 if not sndPlaySound(PChar(FileName), SND_ASYNC or SND_NOSTOP) then begin
3714 sndPlaySound(nil, SND_SYNC);
3715 Application.ProcessMessages;
3717 sndPlaySound(PChar(FileName), SND_ASYNC);
3722 function TGikoForm.AddHistory( favItem : TFavoriteThreadItem ): Boolean;
3725 Item: TFavoriteThreadItem;
3729 // if (GetActiveContent = ThreadItem) and
3730 // (ThreadItem.Count <= ThreadItem.Kokomade) then
3732 // if GetActiveContent = ThreadItem then
3736 if FTreeType = gttHistory then
3737 TreeView.Selected := nil;
3739 for i := 0 to FHistoryList.Count - 1 do begin
3740 if TObject(FHistoryList[i]) is TFavoriteThreadItem then begin
3741 Item := TFavoriteThreadItem(FHistoryList[i]);
3742 if Item.URL = favItem.URL then begin
3743 // SetContent(ThreadItem);
3744 FHistoryList.Move(i, 0);
3745 if FTreeType = gttHistory then
3746 if TreeView.Items.GetFirstNode <> TreeView.Items[ i ] then
3747 TreeView.Items[ i ].MoveTo( TreeView.Items.GetFirstNode, naInsert );
3754 if FHistoryList.Count > 0 then
3755 FHistoryList.Insert( 0, favItem )
3757 FHistoryList.Add( favItem );
3758 // SetContent(ThreadItem);
3760 if FTreeType = gttHistory then begin
3761 Node := TreeView.Items.Add( nil, favItem.Title );
3762 Node.MoveTo( TreeView.Items.GetFirstNode, naInsert );
3764 if favItem.NewArrival then begin
3765 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3766 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3768 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3769 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3772 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
3773 //
\81¦favItem.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
3774 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3775 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3776 Node.Data := favItem;
3780 procedure TGikoForm.DeleteHistory( threadItem: TThreadItem );
3784 for i := 0 to FHistoryList.Count - 1 do begin
3785 if threadItem.URL = TFavoriteThreadItem( FHistoryList.Items[i] ).URL then begin
3786 TFavoriteThreadItem( FHistoryList.Items[ i ] ).Free;
3787 FHistoryList.Delete(i);
3788 FHistoryList.Capacity := FHistoryList.Count;
3794 procedure TGikoForm.ClearHistory;
3798 //FHistoryList.Clear;
3801 for i := FHistoryList.Count - 1 downto 0 do begin
3802 if TObject(FHistoryList[ i ]) is TFavoriteThreadItem then
3803 TFavoriteThreadItem(FHistoryList[ i ]).Free
3804 else if TObject(FHistoryList[ i ]) is TFavoriteBoardItem then
3805 TFavoriteBoardItem(FHistoryList[ i ]).Free;
3807 //FHistoryList.Delete(i);
3813 FHistoryList.Capacity := FHistoryList.Count;
3817 procedure TGikoForm.SaveHistory;
3820 saveList : TstringList;
3823 saveList := TStringList.Create;
3826 FHistoryList.Capacity := FHistoryList.Count;
3827 saveList.Add('<?xml version="1.0" encoding="Shift_JIS" standalone="yes"?>');
3828 saveList.Add('<address>');
3829 bound := FHistoryList.Count - 1;
3830 for i := bound downto 0 do begin
3831 // title
\82Í
\8d¡
\82Ì
\82Æ
\82±
\82ë
\8eg
\82Á
\82Ä
\82¢
\82È
\82¢
3833 '<history url="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).URL ) + '"' +
3834 ' title="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).Title ) + '"/>');
3836 saveList.Add('</address>');
3837 saveList.SaveToFile( GikoSys.GetConfigDir + 'History.xml' );
3844 procedure TGikoForm.LoadHistory;
3848 XMLDoc : IXMLDocument;
3850 HistoryNode : IXMLNode;
3852 favItem : TFavoriteThreadItem;
3855 fileName := GikoSys.GetConfigDir + 'History.xml';
3857 if FileExists( fileName ) then begin
3859 XMLDoc := IXMLDocument.Create;
3860 //XMLDoc := LoadXMLDocument(FileName);
3861 LoadXMLDocument(FileName, XMLDoc);
3863 XMLNode := XMLDoc.DocumentElement;
3865 if XMLNode.NodeName = 'address' then begin
3866 bound := XMLNode.ChildNodes.Count - 1;
3867 for i := 0 to bound do begin
3868 HistoryNode := XMLNode.ChildNodes[i];
3869 if HistoryNode.NodeName = 'history' then begin
3870 //if FReadCount >= sl.Count then begin
3871 s := Trim(HistoryNode.Attributes['url']);
3872 if s <> '' then begin
3873 favItem := TFavoriteThreadItem.Create(
3874 s, HistoryNode.Attributes[ 'title' ] );
3875 if not AddHistory( favItem ) then
3891 procedure TGikoForm.ShowBBSTreeOld(
3899 FavoriteTreeView.Visible := False;
3900 FavoriteToolBar.Hide;
3901 TreeView.Visible := True;
3903 b := CabinetSelectPopupMenu.Items.Count - 1;
3904 for i := 0 to b do begin
3905 item := CabinetSelectPopupMenu.Items[ i ];
3906 if item is TBBSMenuItem then begin
3907 if TBBSMenuItem( item ).Data = inBBS then begin
3908 item.Checked := True;
3909 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
3910 CabinetMenu.Items[ i ].Checked := True;
3911 GikoSys.Setting.CabinetIndex := i;
3915 item.Checked := False;
3916 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
3917 CabinetMenu.Items[ i ].Checked := False;
3919 CabinetSelectToolButton.Caption := inBBS.Title;
3921 CabinetHistoryAction.Checked := False;
3922 CabinetFavoriteAction.Checked := False;
3924 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
3925 FTreeType := gtt2ch;
3926 HistoryToolBar.Hide;
3927 SetBoardTreeNode( inBBS );
3928 TreeView.Items.GetFirstNode.Expanded := True; //?c???[?g?b?v???????J??
3929 //?c???[??g?b?v?????I????
3930 if GetActiveList = nil then
3931 TreeView.Selected := TreeView.Items[0]
3933 for i := 0 to TreeView.Items.Count - 1 do begin
3934 if TreeView.Items[i].Data = GetActiveList then begin
3935 TreeView.Selected := TreeView.Items[i];
3939 TreeView.Selected := TreeView.Items[0]
3947 procedure TGikoForm.ShowBBSTree(
3956 FavoriteTreeView.Visible := False;
3957 FavoriteToolBar.Hide;
3958 TreeView.Visible := True;
3960 b := CabinetSelectPopupMenu.Items.Count - 1;
3961 for i := 0 to b do begin
3962 item := CabinetSelectPopupMenu.Items[ i ];
3963 if item is TBBSMenuItem then begin
3964 if TBBSMenuItem( item ).Data = inBBS then begin
3965 item.Checked := True;
3966 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3967 CabinetMenu.Items[ i ].Checked := True;
3968 GikoSys.Setting.CabinetIndex := i;
3972 item.Checked := False;
3973 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3974 CabinetMenu.Items[ i ].Checked := False;
3976 CabinetSelectToolButton.Caption := inBBS.Title;
3978 CabinetHistoryAction.Checked := False;
3979 CabinetFavoriteAction.Checked := False;
3981 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
3982 FTreeType := gtt2ch;
3983 HistoryToolBar.Hide;
3984 SetBoardTreeNode( inBBS );
3985 TreeView.Items.GetFirstNode.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
3986 //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
3987 if GetActiveList = nil then begin
3989 TreeClick( TreeView.Items[0] );
3993 for i := 0 to TreeView.Items.Count - 1 do begin
3994 if TreeView.Items[i].Data = GetActiveList then begin
3995 TreeClick( TreeView.Items[i] );
3999 TreeClick( TreeView.Items[0] );
4007 procedure TGikoForm.ShowHistoryTree;
4012 if CabinetPanel.Visible then begin
4013 if FTreeType = gttHistory then begin
4014 CabinetVisible( False );
4015 CabinetHistoryAction.Checked := False;
4017 CabinetHistoryAction.Checked := True;
4020 CabinetVisible( True );
4021 CabinetHistoryAction.Checked := True;
4024 // BBS...BBS, History, Favorite
4025 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 2;
4027 FavoriteTreeView.Visible := False;
4028 TreeView.Visible := True;
4030 CabinetBBSAction.Checked := False;
4031 CabinetFavoriteAction.Checked := False;
4033 if FTreeType <> gttHistory then begin
4034 b := CabinetSelectPopupMenu.Items.Count - 1;
4035 for i := 0 to b do begin
4036 item := CabinetSelectPopupMenu.Items[ i ];
4037 if item is TBBSMenuItem then begin
4038 item.Checked := False;
4039 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
4040 CabinetMenu.Items[ i ].Checked := False;
4044 FTreeType := gttHistory;
4045 HistoryToolBar.Show;
4046 FavoriteToolBar.Hide;
4048 CabinetSelectToolButton.Caption := '
\97\9a\97ð
\83\8a\83X
\83g';
4052 procedure TGikoForm.SetHistoryTreeNode;
4056 Item: TFavoriteThreadItem;
4058 TreeView.Items.BeginUpdate;
4060 TreeView.Items.Clear;
4061 for i := 0 to FHistoryList.Count - 1 do begin
4062 Item := TFavoriteThreadItem(FHistoryList[i]);
4063 Node := TreeView.Items.Add(nil, Item.Title);
4065 if Item.Item.NewArrival then begin
4066 Node.ImageIndex := ITEM_ICON_THREADNEW1;
4067 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
4069 Node.ImageIndex := ITEM_ICON_THREADLOG1;
4070 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
4073 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
4074 //
\81¦Item.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
4075 Node.ImageIndex := ITEM_ICON_THREADLOG1;
4076 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
4080 TreeView.Items.EndUpdate;
4084 procedure TGikoForm.SelectTreeNode(Item: TObject; CallEvent: Boolean);
4086 ChangeEvent: TTVChangedEvent;
4087 ChangingEvent: TTVChangingEvent;
4091 if Item is TCategory then
4092 bbs := TCategory( Item ).ParenTBBS
4093 else if Item is TBoard then
4094 bbs := TBoard( Item ).ParentCategory.ParenTBBS
4098 if (FTreeType = gtt2ch) and (FActiveBBS = bbs) then begin
4100 ChangingEvent := nil;
4102 if not CallEvent then begin
4103 ChangeEvent := TreeView.OnChange;
4104 ChangingEvent := TreeView.OnChanging;
4107 if not CallEvent then begin
4108 TreeView.OnChange := nil;
4109 TreeView.OnChanging := nil;
4111 //Application.ProcessMessages;
4112 for i := 0 to TreeView.Items.Count - 1 do begin
4113 if TreeView.Items[i].Data = Item then begin
4114 TreeView.Items[i].Selected := True;
4116 TreeClick(TreeView.Items[i]);
4120 //Application.ProcessMessages;
4122 if not CallEvent then begin
4123 TreeView.OnChange := ChangeEvent;
4124 TreeView.OnChanging := ChangingEvent;
4128 if GetActiveList is TBBS then begin
4129 for i := 0 to ListView.Columns.Count - 1 do
4130 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
4131 end else if GetActiveList is TCategory then begin
4132 for i := 0 to ListView.Columns.Count - 1 do
4133 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
4134 end else if GetActiveList is TBoard then begin
4135 for i := 0 to ListView.Columns.Count - 1 do
4136 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
4139 if (Item is TBBS) or (Item is TCategory) then begin
4140 ListView.Columns.Clear;
4141 SetActiveList( Item );
4142 end else if Item is TBoard then begin
4143 if not TBoard( Item ).IsThreadDatRead then begin
4144 Screen.Cursor := crHourGlass;
4146 if not TBoard( Item ).IsThreadDatRead then
4147 GikoSys.ReadSubjectFile(TBoard( Item ));
4149 Screen.Cursor := crDefault;
4152 SetActiveList( Item );
4155 if Item is TBoard then begin // not TCategory
4156 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4157 if GikoSys.Setting.ListWidthState = glsMax then begin
4158 BrowserMinAction.Execute;
4159 if GikoForm.Visible then
4163 if GikoSys.Setting.ListHeightState = glsMax then begin
4164 BrowserMinAction.Execute;
4165 if GikoForm.Visible then
4173 procedure TGikoForm.ListViewMouseDown(Sender: TObject;
4174 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
4176 listItem : TListItem;
4177 threadItem : TThreadItem;
4183 if not (GetActiveList is TBoard) then Exit;
4184 listItem := ListView.GetItemAt( X, Y );
4185 if listItem = nil then Exit;
4186 if not (TObject(listItem.Data) is TThreadItem) then Exit;
4188 threadItem := TThreadItem(ListItem.Data);
4189 InsertBrowserTab(threadItem, False);
4190 if threadItem.IsLogFile then
4191 ListView.UpdateItems(listItem.Index, listItem.Index);
4195 //
\82±
\82±
\82ÅDblClick
\8fE
\82í
\82È
\82¢
\82Æ
\81AClick
\83C
\83x
\83\93\83g
\82ª
\97D
\90æ
\82µ
\82Ä
\8bN
\82«
\82Ä
\82µ
\82Ü
\82¤
\82Ì
\82Å
4196 if (ssDouble in Shift) then
4197 ListDoubleClick(Shift)
4202 { if ssDouble in Shift then begin
4203 DoubleClickOccurred[Button] := True;
4205 DoubleClickOccurred[Button] := False;
4206 t := GetTickCount+GetDoubleClickTime;
4207 while GetTickCount < t do begin
4208 Application.ProcessMessages;
4209 if DoubleClickOccurred[Button] then
4214 if ssDouble in Shift then begin
4216 mbLeft: ListDoubleClick;
4229 procedure TGikoForm.ListClick;
4231 ListItem: TListItem;
4232 ThreadItem: TThreadItem;
4234 if ListView.SelCount <> 1 then Exit;
4235 ListItem := ListView.Selected;
4236 if ListItem = nil then Exit;
4237 if not (TObject(ListItem.Data) is TThreadItem) then Exit;
4239 ThreadItem := TThreadItem(ListItem.Data);
4240 if ThreadItem.IsLogFile then begin
4241 // if AddHistory(ThreadItem) then
4242 // SetContent(ThreadItem);
4243 InsertBrowserTab(ThreadItem);
4244 ListView.UpdateItems(ListItem.Index, ListItem.Index);
4246 // SetContent(ThreadItem);
4247 InsertBrowserTab(ThreadItem);
4250 if GikoSys.Setting.BrowserAutoMaximize = gbmClick then begin
4251 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4252 if GikoSys.Setting.ListWidthState = glsMin then begin
4253 BrowserMaxAndFocusAction.Execute;
4256 if GikoSys.Setting.ListHeightState = glsMin then begin
4257 BrowserMaxAndFocusAction.Execute;
4263 procedure TGikoForm.ListDoubleClick(Shift: TShiftState);
4265 ThreadItem: TThreadItem;
4268 shiftDown := (ssShift in Shift);
4270 if ListView.Selected = nil then Exit;
4272 if TObject(ListView.Selected.Data) is TCategory then begin
4273 SelectTreeNode(ListView.Selected.Data, True);
4274 // TreeView.Selected.Expanded := True;
4275 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4276 //TreeViewChange(nil, TreeView.Selected);
4277 end else if TObject(ListView.Selected.Data) is TBoard then begin
4278 SelectTreeNode(ListView.Selected.Data, True);
4279 // TreeView.Selected.Expanded := True;
4280 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4281 //TreeViewChange(nil, TreeView.Selected);
4282 end else if TObject(ListView.Selected.Data) is TThreadItem then begin
4283 //if TObject(ListView.Selected.Data) is TThreadItem then begin
4284 Application.ProcessMessages;
4285 ThreadItem := TThreadItem(ListView.Selected.Data);
4286 DownloadContent(ThreadItem, shiftDown);
4289 if GikoSys.Setting.BrowserAutoMaximize = gbmDoubleClick then begin
4290 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4291 if GikoSys.Setting.ListWidthState = glsMin then begin
4292 BrowserMaxAndFocusAction.Execute;
4295 if GikoSys.Setting.ListHeightState = glsMin then begin
4296 BrowserMaxAndFocusAction.Execute;
4301 procedure TGikoForm.BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord);
4306 activeBrower :TWebBrowser;
4308 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
4310 while (BrowserRecord.Browser.ReadyState <> READYSTATE_COMPLETE) and
4311 (BrowserRecord.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4312 Application.ProcessMessages;
4315 // Access Violation
\82ª
\8bN
\82«
\82é
\8e\96\82ª
\82 \82é
\82Ì
\82Å
\8d¡
\8cã
\97v
\83`
\83F
\83b
\83N
4316 if(BrowserRecord <> nil) and (BrowserRecord.FBrowser <> nil) then begin
4317 activeBrower := BrowserRecord.FBrowser;
4321 item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
4323 top := top + item.offsetTop;
4324 item := item.offsetParent;
4325 until AnsiCompareText(item.tagName, 'body' ) = 0;
4327 OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
4333 procedure TGikoForm.BrowserMovement(const AName: string);
4338 activeBrower :TWebBrowser;
4340 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
4342 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
4343 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4344 Application.ProcessMessages;
4347 // Access Violation
\82ª
\8bN
\82«
\82é
\8e\96\82ª
\82 \82é
\82Ì
\82Å
\8d¡
\8cã
\97v
\83`
\83F
\83b
\83N
4348 if(BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex >= 0) then begin
4349 activeBrower := FActiveContent.Browser;
4353 item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
4355 top := top + item.offsetTop;
4356 item := item.offsetParent;
4357 until AnsiCompareText(item.tagName, 'body' ) = 0;
4359 OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
4365 procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
4367 if TObject(Node.Data) is TBBS then begin
4368 TBBS(Node.Data).NodeExpand := False;
4369 end else if TObject(Node.Data) is TCategory then begin
4370 TCategory(Node.Data).NodeExpand := False;
4371 end else if TObject(Node.Data) is TBoard then begin
4372 TBoard(Node.Data).NodeExpand := False;
4376 procedure TGikoForm.MessageListViewResize(Sender: TObject);
4378 // MessageListView.Column[0].Width := MessageListView.ClientWidth - 16;
4381 procedure TGikoForm.SelectListItem(List: TList);
4383 // TmpTreeNode: TTreeNode;
4384 TmpListItem: TListItem;
4387 TmpListItem := ListView.Selected;
4388 while TmpListItem <> nil do begin
4389 List.Add(TmpListItem.Data);
4390 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
4395 procedure TGikoForm.ExitActionExecute(Sender: TObject);
4400 procedure TGikoForm.AllSelectActionExecute(Sender: TObject);
4405 procedure TGikoForm.StdToolBarVisibleActionExecute(Sender: TObject);
4407 CoolBand: TCoolBand;
4409 CoolBand := GetCoolBand(MainCoolBar, StdToolBar);
4410 if CoolBand = nil then
4412 GikoSys.Setting.StdToolBarVisible := StdToolBarVisibleAction.Checked;
4413 CoolBand.Visible := GikoSys.Setting.StdToolBarVisible;
4414 // StdToolBar.Visible := StdToolBarVisibleAction.Checked;
4415 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4417 //StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
4418 StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible;
4421 procedure TGikoForm.AddressBarVisibleActionExecute(Sender: TObject);
4423 CoolBand: TCoolBand;
4425 CoolBand := GetCoolBand(MainCoolBar, AddressToolBar);
4426 if CoolBand = nil then
4428 GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked;
4429 CoolBand.Visible := GikoSys.Setting.AddressBarVisible;
4430 //AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
4431 AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible;
4434 procedure TGikoForm.LinkBarVisibleActionExecute(Sender: TObject);
4436 CoolBand: TCoolBand;
4438 CoolBand := GetCoolBand(MainCoolBar, LinkToolBar);
4439 if CoolBand = nil then
4441 GikoSys.Setting.LinkBarVisible := LinkBarVisibleAction.Checked;
4442 CoolBand.Visible := GikoSys.Setting.LinkBarVisible;
4443 //LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
4444 LinkToolBarVisiblePMenu.Checked := GikoSys.Setting.LinkBarVisible;
4447 procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);
4449 CoolBand: TCoolBand;
4451 CoolBand := GetCoolBand(ListCoolBar, ListToolBar);
4452 if CoolBand = nil then
4454 CoolBand.Visible := ListToolBarVisibleAction.Checked;
4455 // ListToolBar.Visible := ListToolBarVisibleAction.Checked;
4456 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4457 GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;
4460 procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);
4462 CoolBand: TCoolBand;
4464 CoolBand := GetCoolBand(ListCoolBar, ListNameToolBar);
4465 if CoolBand = nil then
4467 CoolBand.Visible := ListNameBarVisibleAction.Checked;
4468 GikoSys.Setting.ListNameBarVisible := ListNameBarVisibleAction.Checked;
4471 procedure TGikoForm.BrowserToolBarVisibleActionExecute(Sender: TObject);
4473 CoolBand: TCoolBand;
4475 CoolBand := GetCoolBand(BrowserCoolBar, BrowserToolBar);
4476 if CoolBand = nil then
4478 CoolBand.Visible := BrowserToolBarVisibleAction.Checked;
4479 // BrowserToolBar.Visible := BrowserToolBarVisibleAction.Checked;
4480 GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;
4483 procedure TGikoForm.BrowserNameBarVisibleActionExecute(Sender: TObject);
4485 CoolBand: TCoolBand;
4487 CoolBand := GetCoolBand(BrowserCoolBar, BrowserNameToolBar);
4488 if CoolBand = nil then
4490 CoolBand.Visible := BrowserNameBarVisibleAction.Checked;
4491 GikoSys.Setting.BrowserNameBarVisible := BrowserNameBarVisibleAction.Checked;
4494 procedure TGikoForm.MsgBarVisibleActionExecute(Sender: TObject);
4496 MessageSplitter.Visible := MsgBarVisibleAction.Checked;
4497 MessagePanel.Top := MessageSplitter.Top + MessageSplitter.Height;
4498 MessageSplitter.Top := MessagePanel.Top + 1;
4499 MessagePanel.Visible := MsgBarVisibleAction.Checked;
4500 GikoSys.Setting.MessageBarVisible := MsgBarVisibleAction.Checked;
4503 procedure TGikoForm.StatusBarVisibleActionExecute(Sender: TObject);
4505 StatusBar.Visible := StatusBarVisibleAction.Checked;
4506 GikoSys.Setting.StatusBarVisible := StatusBarVisibleAction.Checked;
4509 procedure TGikoForm.IconStyleExecute(Sender: TObject);
4511 case ListView.ViewStyle of
4512 vsIcon: SmallIconAction.Execute;
4513 vsSmallIcon: ListIconAction.Execute;
4514 vsList: DetailIconAction.Execute;
4515 vsReport: LargeIconAction.Execute;
4519 procedure TGikoForm.LargeIconActionExecute(Sender: TObject);
4521 ListView.ViewStyle := vsIcon;
4522 LargeIconAction.Checked := True;
4525 procedure TGikoForm.SmallIconActionExecute(Sender: TObject);
4527 ListView.ViewStyle := vsSmallIcon;
4528 SmallIconAction.Checked := True;
4531 procedure TGikoForm.ListIconActionExecute(Sender: TObject);
4533 ListView.ViewStyle := vsList;
4534 ListIconAction.Checked := True;
4537 procedure TGikoForm.DetailIconActionExecute(Sender: TObject);
4539 ListView.ViewStyle := vsReport;
4540 DetailIconAction.Checked := True;
4543 procedure TGikoForm.SearchActionExecute(Sender: TObject);
4548 if FSearchDialog = nil then begin
4549 if (GikoForm.GetActiveList is TCategory) or (GikoForm.GetActiveList is TBoard) then
4550 chk := GikoForm.GetActiveList
4554 FSearchDialog := TSearchDialog.Create(Self, chk);
4555 FSearchDialog.SearchComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
4565 procedure TGikoForm.OptionActionExecute(Sender: TObject);
4569 Dlg := TOptionDialog.Create(Self);
4577 procedure TGikoForm.GikoNaviWebPageActionExecute(Sender: TObject);
4579 URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
4581 GikoSys.OpenBrowser(URL_GIKONAVI, gbtAuto);
4584 procedure TGikoForm.MonazillaWebPageActionExecute(Sender: TObject);
4586 URL_MONAZILLA: string = 'http://www.monazilla.org/';
4588 GikoSys.OpenBrowser(URL_MONAZILLA, gbtAuto);
4591 procedure TGikoForm.BBS2chWebPageActionExecute(Sender: TObject);
4593 URL_2ch: string = 'http://www.2ch.net/';
4595 GikoSys.OpenBrowser(URL_2ch, gbtAuto);
4598 procedure TGikoForm.GikoFolderOpenActionExecute(Sender: TObject);
4600 // GikoSys.OpenBrowser(GikoSys.GetAppDir, gbtIE);
4601 GikoSys.CreateProcess('explorer.exe', '/e,"' + GikoSys.GetAppDir + '"');
4604 procedure TGikoForm.AboutActionExecute(Sender: TObject);
4608 Dlg := TAboutDialog.Create(Self);
4616 procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject);
4621 procedure TGikoForm.CabinetVisible( isVisible : Boolean );
4623 TreeSplitter.Visible := isVisible;
4624 CabinetPanel.Visible := isVisible;
4625 CabinetVisibleAction.Checked := isVisible;
4628 procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject);
4631 gttHistory: CabinetHistoryAction.Execute;
4632 gttFavorite: CabinetFavoriteAction.Execute;
4634 CabinetBBSAction.Execute;
4638 procedure TGikoForm.AllItemActionExecute(Sender: TObject);
4641 if ViewType <> gvtAll then
4642 SetListViewType(gvtAll);
4643 AllItemAction.Checked := True;
4644 LogItemAction.Checked := False;
4645 NewItemAction.Checked := False;
4646 //SelectItemAction.Checked := False;
4647 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4649 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4650 if SelectComboBox.Parent <> nil then begin
4651 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4652 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4659 procedure TGikoForm.LogItemActionExecute(Sender: TObject);
4662 if ViewType <> gvtLog then
4663 SetListViewType(gvtLog);
4664 AllItemAction.Checked := False;
4665 LogItemAction.Checked := True;
4666 NewItemAction.Checked := False;
4667 //SelectItemAction.Checked := False;
4668 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4670 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4671 if SelectComboBox.Parent <> nil then begin
4672 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4673 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4680 procedure TGikoForm.NewItemActionExecute(Sender: TObject);
4684 if ViewType <> gvtNew then
4685 SetListViewType(gvtNew);
4686 AllItemAction.Checked := False;
4687 LogItemAction.Checked := False;
4688 NewItemAction.Checked := True;
4689 //SelectItemAction.Checked := False;
4690 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4692 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4693 if SelectComboBox.Parent <> nil then begin
4694 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4695 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4702 procedure TGikoForm.SelectItemActionExecute(Sender: TObject);
4705 Dlg: TListSelectDialog;
4708 if SelectComboBox.Parent <> nil then begin
4709 if SelectComboBox.Left + SelectComboBox.Width < ListToolBar.Width then begin
4710 // SelectComboBox
\82ª
\82 \82é
\8fê
\8d\87\82Í
\83t
\83H
\81[
\83J
\83X
\82ð
\88Ú
\82·
4711 SelectComboBox.SetFocus;
4718 if SelectComboBox.Text = SELECTCOMBOBOX_NAME then begin
4719 SelectComboBox.Text := '';
4720 SelectComboBox.Color := clWindow;
4723 AllItemAction.Checked := False;
4724 LogItemAction.Checked := False;
4725 NewItemAction.Checked := False;
4726 //SelectItemAction.Checked := True;
4728 Dlg := TListSelectDialog.Create(Self);
4730 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
4731 Dlg.SelectComboBox.Text := SelectComboBox.Text;
4733 if Dlg.ModalResult = mrCancel then begin
4734 if Length( SelectComboBox.Text ) = 0 then begin
4735 AllItemAction.Checked := True;
4736 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4737 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4740 if GetActiveList is TBoard then
4741 SetListViewType(gvtUser, TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText , Dlg.KubetsuCheckBox.Checked);
4743 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
4745 GikoSys.Setting.SelectTextList.Delete(idx);
4746 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
4747 while Dlg.SelectComboBox.Items.Count > 100 do begin
4748 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
4751 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
4752 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4753 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4755 SelectComboBox.Text := Dlg.SelectComboBox.Text;
4756 SelectComboBox.Color := clWindow;
4758 SetListViewType(gvtUser, Dlg.SelectComboBox.Text, Dlg.KubetsuCheckBox.Checked);
4765 procedure TGikoForm.ListNumberVisibleActionExecute(Sender: TObject);
4767 GikoSys.Setting.ListViewNo := ListNumberVisibleAction.Checked;
4771 procedure TGikoForm.UpFolderActionExecute(Sender: TObject);
4773 if GetActiveList is TBoard then begin
4774 // if FTreeType = gtt2ch then
4775 SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
4776 //SetActiveList(TBoard(GetActiveList).ParentCategory);
4777 end else if GetActiveList is TCategory then begin
4778 // if FTreeType = gtt2ch then
4779 SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);
4780 //SetActiveList(TCategory(GetActiveList).ParenTBBS);
4782 // if TreeView.Selected = nil then Exit;
4783 // if TreeView.Selected.Level = 0 then Exit;
4784 // TreeView.Selected.Parent.Selected := True;
4787 procedure TGikoForm.RoundActionExecute(Sender: TObject);
4791 Dlg := TRoundDialog.Create(Self);
4799 procedure TGikoForm.StopActionExecute(Sender: TObject);
4801 FControlThread.DownloadAbort;
4802 if FWorkCount <> 0 then FWorkCount := 0;
4804 Animate.Active := False;
4807 Screen.Cursor := crDefault;
4810 procedure TGikoForm.MsgBarCloseActionExecute(Sender: TObject);
4812 // MessagePanel.Visible := False;
4813 // MessageSplitter.Visible := False;
4814 // MsgBarVisibleAction.Checked := False;
4815 MsgBarVisibleAction.Execute;
4818 procedure TGikoForm.BrowserMaxActionExecute(Sender: TObject);
4820 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4821 case GikoSys.Setting.ListWidthState of
4823 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4824 ViewPanel.Width := FBrowserSizeWidth;
4825 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4826 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4827 GikoSys.Setting.ListWidthState := glsNormal;
4829 glsMin, glsNormal: begin
4830 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4831 if GikoSys.Setting.ListWidthState = glsNormal then
4832 FBrowserSizeWidth := ViewPanel.Width;
4833 ViewPanel.Width := 1;
4834 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4835 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4836 GikoSys.Setting.ListWidthState := glsMax;
4840 case GikoSys.Setting.ListHeightState of
4842 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4843 ViewPanel.Height := FBrowserSizeHeight;
4844 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4845 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4846 GikoSys.Setting.ListHeightState := glsNormal;
4848 glsMin, glsNormal: begin
4849 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4850 if GikoSys.Setting.ListHeightState = glsNormal then
4851 FBrowserSizeHeight := ViewPanel.Height;
4852 ViewPanel.Height := 1;
4853 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4854 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4855 GikoSys.Setting.ListHeightState := glsMax;
4859 // Mouse.CursorPos := BrowserSizeButton.ClientToScreen(Point(
4860 // System.Round(BrowserToolBar.ButtonWidth div 2),
4861 // System.Round(BrowserToolBar.ButtonHeight div 2)));
4862 BrowserTab.OnChange(nil);
4865 procedure TGikoForm.BrowserMinActionExecute(Sender: TObject);
4867 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4868 case GikoSys.Setting.ListWidthState of
4869 glsMax, glsNormal: begin
4870 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4871 if GikoSys.Setting.ListWidthState = glsNormal then
4872 FBrowserSizeWidth := ViewPanel.Width;
4873 ViewPanel.Width := ThreadMainPanel.Width - 80;
4874 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4875 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4876 GikoSys.Setting.ListWidthState := glsMin;
4879 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4880 ViewPanel.Width := FBrowserSizeWidth;
4881 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4882 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4883 GikoSys.Setting.ListWidthState := glsNormal;
4887 case GikoSys.Setting.ListHeightState of
4888 glsMax, glsNormal: begin
4889 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4890 if GikoSys.Setting.ListHeightState = glsNormal then
4891 FBrowserSizeHeight := ViewPanel.Height;
4892 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
4893 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4894 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4895 GikoSys.Setting.ListHeightState := glsMin;
4898 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4899 ViewPanel.Height := FBrowserSizeHeight;
4900 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4901 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4902 GikoSys.Setting.ListHeightState := glsNormal;
4908 procedure TGikoForm.ScrollTopActionExecute(Sender: TObject);
4910 BrowserMovement('top');
4913 procedure TGikoForm.ScrollLastActionExecute(Sender: TObject);
4915 BrowserMovement('bottom');
4918 procedure TGikoForm.ScrollNewActionExecute(Sender: TObject);
4920 BrowserMovement('new');
4923 procedure TGikoForm.ScrollKokoActionExecute(Sender: TObject);
4925 BrowserMovement('koko');
4928 procedure TGikoForm.EditorActionExecute(Sender: TObject);
4930 Editor: TEditorForm;
4934 Item := GetActiveContent;
4935 if Item = nil then Exit;
4937 if Item.Count >= 1000 then begin
4938 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Í
\83\8c\83X
\90\94\82ª
\82P
\82O
\82O
\82O
\82ð
\92´
\82¦
\82Ä
\82¢
\82é
\82Ì
\82Å
\8f\91\8d\9e\82Ý
\8fo
\97\88\82Ü
\82¹
\82ñ
\81B' + #13#10
4939 + '
\90V
\83X
\83\8c\83b
\83h
\82ð
\92T
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
4940 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin
4944 Editor := TEditorForm.Create(Self);
4945 Editor.SetThreadItem(Item);
4946 GikoSys.LoadEditorKeySetting(Editor.ActionList);
4948 Editor.BodyEdit.SetFocus;
4951 procedure TGikoForm.IEActionExecute(Sender: TObject);
4953 ShowThreadAction.Execute;
4956 procedure TGikoForm.ShowThreadActionExecute(Sender: TObject);
4958 ThreadItem: TThreadItem;
4960 ThreadItem := GetActiveContent;
4961 if ThreadItem = nil then Exit;
4962 GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
4965 procedure TGikoForm.ShowBoardActionExecute(Sender: TObject);
4967 ThreadItem: TThreadItem;
4969 ThreadItem := GetActiveContent;
4970 if ThreadItem = nil then Exit;
4971 GikoSys.OpenBrowser(ThreadItem.ParentBoard.URL, gbtAuto);
4974 //(Thread)URL
\82ð
\83R
\83s
\81[
4975 procedure TGikoForm.URLCopyActionExecute(Sender: TObject);
4980 if TObject(GetActiveContent) is TBoard then
4981 s := s + TBoard(GetActiveContent).URL + #13#10
4982 else if TObject(GetActiveContent) is TThreadItem then
4983 s := s + TThreadItem(GetActiveContent).URL + #13#10;
4985 Clipboard.AsText := s;
4988 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ð
\83R
\83s
\81[
4989 procedure TGikoForm.NameCopyActionExecute(Sender: TObject);
4994 if TObject(GetActiveContent) is TBoard then
4995 s := s + TBoard(GetActiveContent).Title + #13#10
4996 else if TObject(GetActiveContent) is TThreadItem then
4997 s := s + TThreadItem(GetActiveContent).Title + #13#10;
4999 Clipboard.AsText := s;
5002 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ÆURL
\82ð
\83R
\83s
\81[
5003 procedure TGikoForm.NameURLCopyActionExecute(Sender: TObject);
5008 if TObject(GetActiveContent) is TBoard then
5009 s := s + TBoard(GetActiveContent).Title + #13#10 + TBoard(GetActiveContent).URL + #13#10
5010 else if TObject(GetActiveContent) is TThreadItem then
5011 s := s + TThreadItem(GetActiveContent).Title + #13#10 + TThreadItem(GetActiveContent).URL + #13#10;
5013 Clipboard.AsText := s;
5016 procedure TGikoForm.ItemReloadActionExecute(Sender: TObject);
5018 ThreadItem: TThreadItem;
5021 ThreadItem := GetActiveContent;
5022 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5023 if ThreadItem <> nil then
5024 DownloadContent(ThreadItem, shiftDown);
5027 procedure TGikoForm.SelectListReloadActionExecute(Sender: TObject);
5034 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5035 if GetActiveList is TCategory then begin
5036 List := TList.Create;
5038 SelectListItem(List);
5039 if List.Count > 5 then begin
5040 msg := '5
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
5041 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
5042 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
5045 for i := 0 to List.Count - 1 do begin
5046 if TObject(List[i]) is TBoard then
5047 DownloadList(TBoard(List[i]), shiftDown);
5052 end else if GetActiveList is TBoard then begin
5053 DownloadList(TBoard(GetActiveList), shiftDown);
5057 procedure TGikoForm.SelectThreadReloadActionExecute(Sender: TObject);
5064 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5065 List := TList.Create;
5067 SelectListItem(List);
5068 if List.Count > 10 then begin
5069 msg := '10
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
5070 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
5071 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
5074 for i := 0 to List.Count - 1 do begin
5075 if TObject(List[i]) is TThreadItem then
5076 DownloadContent(TThreadItem(List[i]), shiftDown);
5083 procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);
5085 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
5086 SelectListReloadAction.Enabled := True
5087 else if GetActiveList is TBoard then
5088 SelectListReloadAction.Enabled := True
5090 SelectListReloadAction.Enabled := False;
5093 procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);
5095 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5096 SelectThreadReloadAction.Enabled := True
5098 SelectThreadReloadAction.Enabled := False;
5101 procedure TGikoForm.AllItemActionUpdate(Sender: TObject);
5103 AllItemAction.Enabled := (GetActiveList is TBoard);
5106 procedure TGikoForm.LogItemActionUpdate(Sender: TObject);
5108 LogItemAction.Enabled := (GetActiveList is TBoard);
5111 procedure TGikoForm.NewItemActionUpdate(Sender: TObject);
5113 NewItemAction.Enabled := (GetActiveList is TBoard);
5116 procedure TGikoForm.SelectItemActionUpdate(Sender: TObject);
5118 SelectItemAction.Enabled := (GetActiveList is TBoard);
5121 procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
5123 UpFolderAction.Enabled := not (GetActiveList is TBBS);
5126 procedure TGikoForm.ThreadEditorActionUpdate(Sender: TObject);
5128 ThreadEditorAction.Enabled := (GetActiveList is TBoard);
5131 procedure TGikoForm.FormResize(Sender: TObject);
5135 MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
5136 MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
5138 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5139 if GikoSys.Setting.ListWidthState = glsMin then begin
5140 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5141 ViewPanel.Width := ThreadMainPanel.Width - 80;
5144 if GikoSys.Setting.ListHeightState = glsMin then begin
5145 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5146 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
5150 if FIsMinimize = mtMinimized then begin
5151 if FActiveContent <> nil then begin
5152 Application.ProcessMessages;
5153 doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
5154 doc.Body.ScrollTop := FActiveContent.Thread.ScrollTop;
5155 FIsMinimize := mtNone;
5159 FIsIgnoreResize := True;
5160 PostMessage( Handle, USER_RESIZED, 0, 0 );
5163 procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject);
5165 ScrollTopAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5168 procedure TGikoForm.ScrollLastActionUpdate(Sender: TObject);
5170 ScrollLastAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5173 procedure TGikoForm.ScrollNewActionUpdate(Sender: TObject);
5175 ScrollNewAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5178 procedure TGikoForm.ScrollKokoActionUpdate(Sender: TObject);
5180 ScrollKokoAction.Enabled := (GetActiveContent <> nil)
5181 and (GetActiveContent.IsLogFile)
5182 and (GetActiveContent.Kokomade <> -1);
5186 procedure TGikoForm.EditorActionUpdate(Sender: TObject);
5188 EditorAction.Enabled := GetActiveContent <> nil;
5191 procedure TGikoForm.IEActionUpdate(Sender: TObject);
5193 IEAction.Enabled := GetActiveContent <> nil;
5196 procedure TGikoForm.ShowThreadActionUpdate(Sender: TObject);
5198 ShowThreadAction.Enabled := GetActiveContent <> nil;
5201 procedure TGikoForm.ShowBoardActionUpdate(Sender: TObject);
5203 ShowBoardAction.Enabled := GetActiveContent <> nil;
5206 procedure TGikoForm.ItemReloadActionUpdate(Sender: TObject);
5208 ItemReloadAction.Enabled := GetActiveContent <> nil;
5211 procedure TGikoForm.URLCopyActionUpdate(Sender: TObject);
5213 URLCopyAction.Enabled := GetActiveContent <> nil;
5216 procedure TGikoForm.NameCopyActionUpdate(Sender: TObject);
5218 NameCopyAction.Enabled := GetActiveContent <> nil;
5221 procedure TGikoForm.NameURLCopyActionUpdate(Sender: TObject);
5223 NameURLCopyAction.Enabled := GetActiveContent <> nil;
5226 procedure TGikoForm.BrowserTabCloseActionUpdate(Sender: TObject);
5228 BrowserTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 0);
5231 procedure TGikoForm.NotSelectTabCloseActionUpdate(Sender: TObject);
5233 NotSelectTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 1);
5236 procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
5238 AllTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 0);
5241 procedure TGikoForm.ActiveLogDeleteActionUpdate(Sender: TObject);
5243 ActiveLogDeleteAction.Enabled := GetActiveContent <> nil;
5246 procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
5248 DEL_MSG = '
\83\8d\83O
\83t
\83@
\83C
\83\8b\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
5249 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
5251 ThreadItem: TThreadItem;
5252 TmpListItem: TListItem;
5256 List := TList.Create;
5258 TmpListItem := ListView.Selected;
5259 while TmpListItem <> nil do begin
5260 if TObject(TmpListItem.Data) is TThreadItem then begin
5261 ThreadItem := TThreadItem(TmpListItem.Data);
5262 if ThreadItem.IsLogFile then
5263 List.Add(ThreadItem);
5265 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
5268 if GikoSys.Setting.DeleteMsg and (List.Count > 0) then begin
5269 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
5273 for i := 0 to List.Count - 1 do begin
5274 ThreadItem := TThreadItem(List[i]);
5275 DeleteHistory(ThreadItem);
5276 DeleteTab(ThreadItem);
5277 ThreadItem.DeleteLogFile;
5284 procedure TGikoForm.DeleteTab(BrowserRecord: TBrowserRecord);
5289 idx := BrowserTab.TabIndex;
5290 FTabHintIndex := -1;
5291 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5292 if TBrowserRecord(BrowserTab.Tabs.Objects[i]) = BrowserRecord then begin
5293 BrowserTab.Tabs.BeginUpdate;
5295 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5296 doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
5297 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
5300 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
5302 if( FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i]) ) then
5303 FActiveContent := nil;
5304 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5305 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
5307 FBrowsers.Move(j, 4);
5309 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5310 BrowserTab.Tabs.Delete(i);
5311 if idx > i then begin
5312 BrowserTab.TabIndex := idx - 1;
5314 if BrowserTab.Tabs.Count -1 >= idx then
5315 BrowserTab.TabIndex := idx
5317 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5319 if BrowserTab.Tabs.Count = 0 then begin
5320 BrowserNullTab.Thread := nil;
5322 if(BrowserTab.TabIndex <> -1) and
5323 ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
5324 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
5325 if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
5326 = TWebBrowser(FBrowsers[4]) )then
5328 TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser := nil;
5329 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
5330 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
5331 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
5336 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
5337 := TWebBrowser(FBrowsers[4]);
5338 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
5339 FBrowsers.Move(4, 0);
5341 BrowserTab.Tabs.EndUpdate;
5342 BrowserTab.OnChange(nil);
5347 procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
5352 idx := BrowserTab.TabIndex;
5353 FTabHintIndex := -1;
5354 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5355 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
5356 BrowserTab.Tabs.BeginUpdate;
5358 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5359 doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
5360 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
5363 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
5365 if(FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i])) then
5366 FActiveContent := nil;
5367 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5368 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
5370 FBrowsers.Move(j, 4);
5372 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5373 BrowserTab.Tabs.Delete(i);
5374 if idx > i then begin
5375 BrowserTab.TabIndex := idx - 1;
5377 if BrowserTab.Tabs.Count -1 >= idx then
5378 BrowserTab.TabIndex := idx
5380 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5382 if(BrowserTab.TabIndex <> -1) and
5383 ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
5384 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
5385 if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
5386 = TWebBrowser(FBrowsers[4]) )then
5388 TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser := nil;
5389 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
5390 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
5391 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
5396 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
5397 := TWebBrowser(FBrowsers[4]);
5398 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
5399 FBrowsers.Move(4, 0);
5402 BrowserTab.Tabs.EndUpdate;
5403 BrowserTab.OnChange(nil);
5409 procedure TGikoForm.KokomadeActionExecute(Sender: TObject);
5412 ThreadItem: TThreadItem;
5414 No := KokoPopupMenu.Tag;
5415 if No = 0 then Exit;
5416 ThreadItem := GetActiveContent;
5417 if ThreadItem = nil then Exit;
5418 ThreadItem.Kokomade := No;
5419 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
5420 FActiveContent.FRepaint := true;
5421 InsertBrowserTab(FActiveContent.Thread, true);
5422 Application.ProcessMessages;
5425 procedure TGikoForm.ZenbuActionExecute(Sender: TObject);
5427 ThreadItem: TThreadItem;
5429 ThreadItem := GetActiveContent;
5430 if ThreadItem = nil then Exit;
5431 ThreadItem.Kokomade := -1;
5432 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
5433 FActiveContent.FRepaint := true;
5434 InsertBrowserTab(FActiveContent.Thread, true);
5435 Application.ProcessMessages;
5438 function TGikoForm.Hook(var Message: TMessage): Boolean;
5447 procedure TGikoForm.KokoResActionExecute(Sender: TObject);
5449 Editor: TEditorForm;
5454 Number := KokoPopupMenu.Tag;
5455 if Number = 0 then Exit;
5456 Item := GetActiveContent;
5457 if Item = nil then Exit;
5459 if Item.Count >= 1000 then begin
5460 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Í
\83\8c\83X
\90\94\82ª
\82P
\82O
\82O
\82O
\82ð
\92´
\82¦
\82Ä
\82¢
\82é
\82Ì
\82Å
\8f\91\8d\9e\82Ý
\8fo
\97\88\82Ü
\82¹
\82ñ
\81B' + #13#10
5461 + '
\90V
\83X
\83\8c\83b
\83h
\82ð
\92T
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
5462 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin
5466 Editor := TEditorForm.Create(Self);
5467 Editor.SetThreadItem(Item);
5468 Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
5470 Editor.BodyEdit.SetFocus;
5473 procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
5475 ItemRoundPMenu.Visible := (GetActiveList is TBoard);
5476 ItemReservPMenu.Visible := (GetActiveList is TBoard);
5477 LPMSep01.Visible := (GetActiveList is TBoard);
5478 ListRoundPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5479 ListReservPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5480 LPMSep02.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5481 KidokuPMenu.Visible := (GetActiveList is TBoard);
5482 MidokuPMenu.Visible := (GetActiveList is TBoard);
5483 UrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5484 NameUrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5485 AllSelectPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5486 LPMSep05.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5487 DeletePMenu.Visible := (GetActiveList is TBoard);
5488 LPMSep06.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5490 BoardFavoriteAddMenu.Visible := (GetActiveList is TCategory);
5491 ThreadFavoriteAddMenu.Visible := (GetActiveList is TBoard);
5493 AddRoundNameMenu(ItemReservPMenu);
5494 AddRoundNameMenu(ListReservPMenu);
5497 procedure TGikoForm.BoardIEActionExecute(Sender: TObject);
5501 if GetActiveList is TBoard then begin
5502 URL := TBoard(GetActiveList).URL;
5503 GikoSys.OpenBrowser(URL, gbtAuto);
5507 procedure TGikoForm.SelectItemURLCopyActionExecute(Sender: TObject);
5514 List := TList.Create;
5516 SelectListItem(List);
5517 for i := 0 to List.Count - 1 do begin
5518 if TObject(List[i]) is TBoard then
5519 s := s + TBoard(List[i]).URL + #13#10
5520 else if TObject(List[i]) is TThreadItem then
5521 s := s + TThreadItem(List[i]).URL + #13#10;
5524 Clipboard.AsText := s;
5530 procedure TGikoForm.SelectItemNameCopyActionExecute(Sender: TObject);
5537 List := TList.Create;
5539 SelectListItem(List);
5540 for i := 0 to List.Count - 1 do begin
5541 if TObject(List[i]) is TBoard then
5542 s := s + TBoard(List[i]).Title + #13#10
5543 else if TObject(List[i]) is TThreadItem then
5544 s := s + TThreadItem(List[i]).Title + #13#10;
5547 Clipboard.AsText := s;
5553 procedure TGikoForm.SelectItemNameURLCopyActionExecute(Sender: TObject);
5560 List := TList.Create;
5562 SelectListItem(List);
5563 for i := 0 to List.Count - 1 do begin
5564 if TObject(List[i]) is TBoard then
5565 s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10
5566 else if TObject(List[i]) is TThreadItem then
5567 s := s + TThreadItem(List[i]).Title + #13#10 + TThreadItem(List[i]).URL + #13#10;
5570 Clipboard.AsText := s;
5576 procedure TGikoForm.BoardIEActionUpdate(Sender: TObject);
5578 if GetActiveList is TBoard then
5579 BoardIEAction.Enabled := True
5581 BoardIEAction.Enabled := False;
5584 procedure TGikoForm.SelectItemURLCopyActionUpdate(Sender: TObject);
5586 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5587 SelectItemURLCopyAction.Enabled := True
5589 SelectItemURLCopyAction.Enabled := False;
5592 procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
5594 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5595 SelectItemNameCopyAction.Enabled := True
5597 SelectItemNameCopyAction.Enabled := False;
5600 procedure TGikoForm.SelectItemNameURLCopyActionUpdate(Sender: TObject);
5602 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5603 SelectItemNameURLCopyAction.Enabled := True
5605 SelectItemNameURLCopyAction.Enabled := False;
5608 procedure TGikoForm.AllSelectActionUpdate(Sender: TObject);
5610 if ListView.SelCount > 0 then
5611 AllSelectAction.Enabled := True
5613 AllSelectAction.Enabled := False;
5616 procedure TGikoForm.LogDeleteActionUpdate(Sender: TObject);
5618 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5619 LogDeleteAction.Enabled := True
5621 LogDeleteAction.Enabled := False;
5624 procedure TGikoForm.BrowserTabCloseActionExecute(Sender: TObject);
5627 // ThreadItem: TThreadItem;
5629 idx := BrowserTab.TabIndex;
5630 if idx <> -1 then begin
5631 if BrowserTab.Tabs.Objects[idx] <> nil then begin
5632 //ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5633 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
5638 procedure TGikoForm.NotSelectTabCloseActionExecute(Sender: TObject);
5643 idx := BrowserTab.TabIndex;
5644 if idx = -1 then Exit;
5645 BrowserTab.Tabs.BeginUpdate;
5646 for i := BrowserTab.Tabs.Count - 1 downto BrowserTab.TabIndex + 1 do begin
5647 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5648 BrowserTab.Tabs.Delete(i);
5650 if idx > 0 then begin
5651 for i := BrowserTab.TabIndex - 1 downto 0 do begin
5652 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5653 BrowserTab.Tabs.Delete(i);
5656 BrowserTab.Tabs.EndUpdate;
5659 procedure TGikoForm.AllTabCloseActionExecute(Sender: TObject);
5663 if GikoSys.Setting.ShowDialogForAllTabClose then
5664 if(MessageDlg('
\91S
\82Ä
\82Ì
\83^
\83u
\82ð
\95Â
\82¶
\82Ä
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then
5667 FActiveContent := nil;
5668 BrowserNullTab.Thread := nil;
5669 BrowserTab.OnChange := nil;
5670 BrowserTab.Tabs.BeginUpdate;
5671 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
5672 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5674 BrowserTab.Tabs.Clear;
5675 BrowserTab.Tabs.EndUpdate;
5676 BrowserTab.OnChange := BrowserTabChange;
5677 SetContent(BrowserNullTab);
5680 procedure TGikoForm.TreeSelectBoradReloadExecute(Sender: TObject);
5683 TmpTreeNode: TTreeNode;
5685 TmpTreeNode := FClickNode;
5686 TreeView.Selected := FClickNode;
5689 if TObject(TmpTreeNode.Data) is TBoard then
5690 Board := TBoard(TmpTreeNode.Data)
5691 else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then
5692 Board := TFavoriteBoardItem(TmpTreeNode.Data).Item;
5694 if Board <> nil then
5695 DownloadList(Board);
5698 procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject);
5700 ThreadItem: TThreadItem;
5701 TmpTreeNode: TTreeNode;
5703 TmpTreeNode := FClickNode;
5704 TreeView.Selected := FClickNode;
5707 if TObject(TmpTreeNode.Data) is TThreadItem then
5708 ThreadItem := TThreadItem(TmpTreeNode.Data)
5709 else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then
5710 ThreadItem := TFavoriteThreadItem(TmpTreeNode.Data).Item;
5712 if ThreadItem <> nil then
5713 DownloadContent(ThreadItem);
5716 procedure TGikoForm.TreeSelectURLCopyExecute(Sender: TObject);
5718 TmpTreeNode: TTreeNode;
5721 TmpTreeNode := FClickNode;
5722 TreeView.Selected := FClickNode;
5723 if TObject(TmpTreeNode.Data) is TBoard then begin
5724 s := TBoard(TmpTreeNode.Data).URL + #13#10;
5725 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5726 s := TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5727 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5728 s := TThreadItem(TmpTreeNode.Data).URL + #13#10;
5729 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5730 s := TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5732 Clipboard.AsText := s;
5735 procedure TGikoForm.TreeSelectNameURLCopyExecute(Sender: TObject);
5737 TmpTreeNode: TTreeNode;
5740 TmpTreeNode := FClickNode;
5741 TreeView.Selected := FClickNode;
5742 if TObject(TmpTreeNode.Data) is TBoard then begin
5743 s := TBoard(TmpTreeNode.Data).Title + #13#10 + TBoard(TmpTreeNode.Data).URL + #13#10;
5744 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5745 s := TFavoriteBoardItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5746 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5747 s := TThreadItem(TmpTreeNode.Data).Title + #13#10 + TThreadItem(TmpTreeNode.Data).URL + #13#10;
5748 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5749 s := TFavoriteThreadItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5751 Clipboard.AsText := s;
5754 procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
5756 FClickNode := TreeView.Selected;
5757 if FClickNode = nil then begin
5758 TreeSelectThreadPupupMenu.Visible := False;
5759 TreeSelectBoardPupupMenu.Visible := False;
5760 TPMSep01.Visible := False;
5761 TreeSelectURLPupupMenu.Visible := False;
5762 TreeSelectNamePupupMenu.Visible := False;
5763 TreeSelectNameURLPupupMenu.Visible := False;
5764 TreeSelectFavoriteAddPupupMenu.Visible := False;
5765 TreeSelectLogDeleteSeparator.Visible := False;
5766 TreeSelectLogDeletePopupMenu.Visible := False;
5767 end else if TObject(FClickNode.Data) is TBoard then begin
5768 TreeSelectThreadPupupMenu.Visible := False;
5769 TreeSelectBoardPupupMenu.Visible := True;
5770 TPMSep01.Visible := True;
5771 TreeSelectURLPupupMenu.Visible := True;
5772 TreeSelectNamePupupMenu.Visible := True;
5773 TreeSelectNameURLPupupMenu.Visible := True;
5774 TreeSelectFavoriteAddPupupMenu.Visible := True;
5775 TreeSelectLogDeleteSeparator.Visible := False;
5776 TreeSelectLogDeletePopupMenu.Visible := False;
5777 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
5778 TreeSelectThreadPupupMenu.Visible := False;
5779 TreeSelectBoardPupupMenu.Visible := True;
5780 TPMSep01.Visible := True;
5781 TreeSelectURLPupupMenu.Visible := True;
5782 TreeSelectNamePupupMenu.Visible := True;
5783 TreeSelectNameURLPupupMenu.Visible := True;
5784 TreeSelectFavoriteAddPupupMenu.Visible := True;
5785 TreeSelectLogDeleteSeparator.Visible := False;
5786 TreeSelectLogDeletePopupMenu.Visible := False;
5787 end else if (TObject(FClickNode.Data) is TThreadItem) then begin
5788 TreeSelectThreadPupupMenu.Visible := True;
5789 TreeSelectBoardPupupMenu.Visible := False;
5790 TPMSep01.Visible := True;
5791 TreeSelectURLPupupMenu.Visible := True;
5792 TreeSelectNamePupupMenu.Visible := True;
5793 TreeSelectNameURLPupupMenu.Visible := True;
5794 TreeSelectFavoriteAddPupupMenu.Visible := True;
5795 TreeSelectLogDeleteSeparator.Visible := True;
5796 TreeSelectLogDeletePopupMenu.Visible := True;
5797 end else if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
5798 TreeSelectThreadPupupMenu.Visible := True;
5799 TreeSelectBoardPupupMenu.Visible := False;
5800 TPMSep01.Visible := True;
5801 TreeSelectURLPupupMenu.Visible := True;
5802 TreeSelectNamePupupMenu.Visible := True;
5803 TreeSelectNameURLPupupMenu.Visible := True;
5804 TreeSelectFavoriteAddPupupMenu.Visible := True;
5805 TreeSelectLogDeleteSeparator.Visible := True;
5806 TreeSelectLogDeletePopupMenu.Visible := True;
5807 end else if (TObject(FClickNode.Data) is TCategory) then begin
5808 TreeSelectThreadPupupMenu.Visible := False;
5809 TreeSelectBoardPupupMenu.Visible := False;
5810 TPMSep01.Visible := False;
5811 TreeSelectURLPupupMenu.Visible := False;
5812 TreeSelectNamePupupMenu.Visible := True;
5813 TreeSelectNameURLPupupMenu.Visible := False;
5814 TreeSelectFavoriteAddPupupMenu.Visible := False;
5815 TreeSelectLogDeleteSeparator.Visible := False;
5816 TreeSelectLogDeletePopupMenu.Visible := False;
5817 end else if FClickNode.IsFirstNode then begin
5818 TreeSelectThreadPupupMenu.Visible := False;
5819 TreeSelectBoardPupupMenu.Visible := False;
5820 TPMSep01.Visible := False;
5821 TreeSelectURLPupupMenu.Visible := False;
5822 TreeSelectNamePupupMenu.Visible := True;
5823 TreeSelectNameURLPupupMenu.Visible := False;
5824 TreeSelectFavoriteAddPupupMenu.Visible := False;
5825 TreeSelectLogDeleteSeparator.Visible := False;
5826 TreeSelectLogDeletePopupMenu.Visible := False;
5828 TreeSelectThreadPupupMenu.Visible := False;
5829 TreeSelectBoardPupupMenu.Visible := False;
5830 TPMSep01.Visible := False;
5831 TreeSelectURLPupupMenu.Visible := False;
5832 TreeSelectNamePupupMenu.Visible := False;
5833 TreeSelectNameURLPupupMenu.Visible := False;
5834 TreeSelectFavoriteAddPupupMenu.Visible := False;
5835 TreeSelectLogDeleteSeparator.Visible := False;
5836 TreeSelectLogDeletePopupMenu.Visible := False;
5840 procedure TGikoForm.BrowserNewWindow2(Sender: TObject;
5841 var ppDisp: IDispatch; var Cancel: WordBool);
5852 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
5853 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
5854 Html := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
5855 if(AnsiPos('>>', Text) = 1) or (AnsiPos('>', Text) = 1)
5856 or (AnsiPos('
\81\84\81\84', Text) = 1) or (AnsiPos('
\81\84', Text) = 1) then begin
5857 if GikoSys.Setting.ResAnchorJamp then begin
5858 Text := ZenToHan(Text);
5860 if(AnsiPos('>>', Text) = 1) then begin
5861 Text := Copy(Text, 3, Length(Text) - 2);
5863 Text := Copy(Text, 2, Length(Text) - 1);
5865 if AnsiPos('-', Text) <> 0 then begin
5866 wkIntSt := StrToIntDef(Copy(Text, 1, AnsiPos('-', Text) - 1), 0);
5867 Text := Copy(Text, AnsiPos('-', Text) + 1, Length(Text));
5868 wkIntTo := StrToIntDef(Text, 0);
5869 if wkIntTo < wkIntSt then
5872 wkIntSt := StrToIntDef(Text, 0);
5874 if wkIntSt <> 0 then
5875 BrowserMovement(IntToStr(wkIntSt));
5878 URL := GikoSys.GetHRefText(Html);
5879 URL := GikoSys.HTMLDecode(URL);
5880 //
\83A
\83h
\83\8c\83X
\83o
\81[
\82Ì
\97\9a\97ð
5881 if GikoSys.Setting.LinkAddAddressBar then begin
5882 idx := AddressComboBox.Items.IndexOf(URL);
5883 if idx = -1 then begin
5884 AddressComboBox.Items.Insert(0, URL);
5885 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
5886 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
5888 AddressComboBox.Items.Delete(idx);
5889 AddressComboBox.Items.Insert(0, URL);
5896 { ShiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5897 CtrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
5900 Memo1.Lines.Add('ShiftDown');
5902 Memo1.Lines.Add('CtrlDown');
5904 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
5905 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
5906 Url := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
5910 URL := GetHRefText(URL);
5912 ParseURI(URL, Protocol, Host, path, Document, Port, Bookmark);
5914 b := Parse2chURL(path, document, bbs, num);
5915 memo1.Lines.Add('bbs: ' + bbs);
5916 memo1.Lines.Add('key: ' + num);
5918 Memo1.Lines.Add('Parse2chURL: True')
5920 Memo1.Lines.Add('Parse2chURL: False');
5922 // AppPath := 'C:\Borland\Projects\Test\TestBrowser\TestBrowser.exe';
5927 procedure TGikoForm.ListSplitterCanResize(Sender: TObject;
5928 var NewSize: Integer; var Accept: Boolean);
5930 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5931 if ViewPanel.Width < 2 then begin
5932 ViewPanel.Width := 1;
5933 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5934 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5935 GikoSys.Setting.ListWidthState := glsMax;
5936 end else if ViewPanel.Width > (ThreadMainPanel.Width - 80) then begin
5937 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5938 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5939 GikoSys.Setting.ListWidthState := glsMin;
5941 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5942 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5943 GikoSys.Setting.ListWidthState := glsNormal;
5946 if ViewPanel.Height < 2 then begin
5947 ViewPanel.Height := 1;
5948 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5949 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5950 GikoSys.Setting.ListHeightState := glsMax;
5951 end else if ViewPanel.Height > (ThreadMainPanel.Height - BrowserCoolBar.Height - 7) then begin
5952 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5953 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5954 GikoSys.Setting.ListHeightState := glsMin;
5956 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5957 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5958 GikoSys.Setting.ListHeightState := glsNormal;
5963 procedure TGikoForm.ListSplitterMoved(Sender: TObject);
5965 if Mouse.Capture <> 0 then
5967 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5968 if (ViewPanel.Width > 1) and (ViewPanel.Width <= (ThreadMainPanel.Width - 80)) then
5969 FBrowserSizeWidth := ViewPanel.Width;
5971 if (ViewPanel.Height > 1) and (ViewPanel.Height <= (ThreadMainPanel.Height - BrowserCoolBar.Height)) then
5972 FBrowserSizeHeight := ViewPanel.Height;
5974 { if (Mouse.Capture = 0) and (ViewPanel.Height > 1) and (not ArrangeAction.Checked) then
5975 FBrowserSizeHeight := ViewPanel.Height
5976 else if (Mouse.Capture = 0) and (ViewPanel.Width > 1) and (ArrangeAction.Checked) then
5977 FBrowserSizeWidth := ViewPanel.Width;}
5980 procedure TGikoForm.BrowserTabChange(Sender: TObject);
5984 ThreadItem: TThreadItem;
5987 // if NewTab = -1 then
5988 // ThreadItem := nil;
5989 if not BrowserTab.Dragging then begin
5990 FTabHintIndex := -1;
5991 BrowserTab.Hint := '';
5992 idx := BrowserTab.TabIndex;
5993 if idx = -1 then begin
5994 BrowserNullTab.Thread := nil;
5995 SetContent(BrowserNullTab);
5997 end else if(BrowserTab.Tabs.Objects[idx] <> nil) and (BrowserTab.Tabs.Objects[idx] is TBrowserRecord) then begin
5998 if TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser <> nil then begin
5999 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser);
6001 FBrowsers.Move(j ,0);
6003 if( FActiveContent <> nil ) and (FActiveContent.Browser <> nil) and
6004 (FActiveContent.Browser <> BrowserNullTab.Browser) and
6005 (FActiveContent.Browser = TWebBrowser(FBrowsers[4])) then
6006 FBrowsers.Move(4, 0);
6008 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
6009 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[4]) then begin
6010 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser := nil;
6011 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
6012 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent <> nil then begin
6013 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent.Free;
6014 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent := nil;
6018 TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser := TWebBrowser(FBrowsers[4]);
6019 TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Repaint := true;
6020 FBrowsers.Move(4, 0);
6022 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Thread;
6023 TOleControl(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser).BringToFront;
6024 GikoSys.OnlyAHundredRes := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
6025 OnlyAHundredRes.Checked := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
6026 SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6028 if GikoSys.Setting.URLDisplay then
6029 AddressComboBox.Text := ThreadItem.URL;
6037 procedure TGikoForm.BrowserTabMouseDown(Sender: TObject;
6038 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
6044 if Button = mbMiddle then begin
6045 //
\83}
\83E
\83X
\92\86\83{
\83^
\83\93
6048 p := BrowserTab.ScreenToClient(p);
6049 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
6051 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6052 //end else if Button = mbRight then begin
6053 //PopupMenu
\82ÅBrowserTabPoupMenu
\82ð
\8ew
\92è
\82µ
\82Ä
\82¢
\82é
\82Ì
\82Å
\82±
\82±
\82Å
\82í
\82´
\82í
\82´
\8cÄ
\82Ñ
\8fo
\82·
\82Æ
\82Q
\8fd
\82É
\82È
\82é
6054 //OnContextPopup
\82Å
\82à
\82µ
\82àActive
\82ÈTab
\88È
\8aO
\82Å
\8cÄ
\82Ñ
\8fo
\82³
\82ê
\82½
\82çTab
\82ð
\90Ø
\82è
\91Ö
\82¦
\82é
\82æ
\82¤
\82É
\82µ
\82½
\81B
6055 { //
\83}
\83E
\83X
\89E
\83{
\83^
\83\93
6058 // GetCursorPos(p2);
6059 p := BrowserTab.ScreenToClient(p);
6060 // idx := BrowserTab.ItemAtPos(p);
6061 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
6062 if idx <> -1 then begin
6063 OldIndex := BrowserTab.TabIndex;
6064 BrowserTab.TabIndex := idx;
6065 if OldIndex <> idx then
6066 BrowserTab.OnChange(nil);
6067 BrowserTabPopupMenu.Tag := idx;
6068 BrowserTabPopupMenu.Popup(p2.X, p2.Y);
6071 end else if BUtton = mbLeft then begin
6072 FDragWFirst := true;
6073 FMouseDownPos.X := X;
6074 FMouseDownPos.Y := Y;
6079 procedure TGikoForm.SetBrowserTabState;
6082 CoolBand: TCoolBand;
6084 BrowserBottomPanel.AutoSize := False;
6085 if GikoSys.Setting.BrowserTabVisible then begin
6086 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
6087 BrowserTab.Style := tsTabs;
6088 if GikoSys.Setting.BrowserTabPosition = gtpTop then
6089 BrowserTab.TabPosition := tpTop
6091 BrowserTab.TabPosition := tpBottom;
6092 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
6093 BrowserTab.TabPosition := tpTop;
6094 BrowserTab.Style := tsButtons;
6096 BrowserTab.TabPosition := tpTop;
6097 BrowserTab.Style := tsFlatButtons
6100 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
6101 BrowserTab.Parent := BrowserTabToolBar;
6102 BrowserBottomPanel.Hide;
6103 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6104 if CoolBand <> nil then
6105 CoolBand.Visible := True;
6106 // BrowserTab.Parent := BrowserTopPanel;
6107 // BrowserTab.Parent := BrowserCoolBar;
6108 // BrowserTab.Top := 26;
6109 // BrowserTopPanel.Height := 44;
6112 BrowserTab.Parent := BrowserBottomPanel;
6113 BrowserTab.Top := 0;
6114 BrowserTab.Left := 0;
6115 BrowserBottomPanel.Show;
6116 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6117 if CoolBand <> nil then
6118 CoolBand.Visible := False;
6119 // BrowserTopPanel.Height := 26;
6123 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6124 if CoolBand <> nil then
6125 CoolBand.Visible := False;
6126 BrowserBottomPanel.Visible := False;
6127 // BrowserTab.Visible := False;
6128 // BrowserTopPanel.Height := 26;
6130 NotSelectTabCloseAction.Execute;
6134 procedure TGikoForm.BrowserTabDragOver(Sender, Source: TObject; X,
6135 Y: Integer; State: TDragState; var Accept: Boolean);
6139 idx := BrowserTab.IndexOfTabAt(X, Y);
6140 Accept := (Source = BrowserTab) and (BrowserTab.TabIndex <> idx);
6143 procedure TGikoForm.BrowserTabDragDrop(Sender, Source: TObject; X,
6148 idx := BrowserTab.IndexOfTabAt(X, Y);
6150 BrowserTab.Tabs.Move(BrowserTab.TabIndex, idx);
6153 procedure TGikoForm.BrowserTabMouseMove(Sender: TObject;
6154 Shift: TShiftState; X, Y: Integer);
6157 ThreadItem: TThreadItem;
6160 TabIdx := BrowserTab.IndexOfTabAt(x, y);
6162 if ( ssLeft in Shift ) and ( BrowserTab.Style = tsTabs ) then begin
6163 if FDragWFirst = false then begin
6164 FDragWFirst := true;
6166 BrowserTab.EndDrag(false);
6167 BrowserTab.BeginDrag(false, DandD_THRESHOLD);
6168 FDragWFirst := false;
6171 BrowserTab.EndDrag(false);
6172 FDragWFirst := false;
6175 if (FTabHintIndex <> TabIdx) and (TabIdx <> -1) then begin
6176 Application.CancelHint;
6177 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[TabIdx]).Thread;
6178 if ThreadItem.Title <> BrowserTab.Tabs[TabIdx] then begin
6179 BrowserTab.Hint := ThreadItem.Title;
6180 Application.ShowHint := True;
6182 BrowserTab.Hint := '';
6183 Application.ShowHint := True;
6185 FTabHintIndex := TabIdx;
6190 procedure TGikoForm.BrowserDocumentComplete(Sender: TObject;
6191 const pDisp: IDispatch; var URL: OleVariant);
6193 FDispHtmlDocument: DispHTMLDocument;
6194 BrowserRecord :TBrowserRecord;
6197 // AddMessageList('DocumentComplete', nil);
6198 if TObject(Sender) is TWebBrowser then begin
6199 if TWebBrowser(Sender) <> Browser then begin
6200 BrowserRecord := nil;
6201 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
6202 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(Sender) then begin
6203 BrowserRecord := TBrowserRecord(BrowserTab.Tabs.Objects[i]);
6207 if BrowserRecord <> nil then begin
6208 if BrowserRecord.FEvent <> nil then
6209 BrowserRecord.FEvent.Free;
6210 FDispHtmlDocument := Idispatch(OleVariant(BrowserRecord.Browser.ControlInterface).Document) as DispHTMLDocument;
6211 BrowserRecord.FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
6212 BrowserRecord.FEvent.OnContextMenu := OnDocumentContextMenu;
6213 BrowserRecord.FEvent.OnClick := WebBrowserClick; //
\92Ç
\89Á
\82µ
\82½OnClick
\83C
\83x
\83\93\83g
6216 FDispHtmlDocument := Idispatch(OleVariant(Browser.ControlInterface).Document) as DispHTMLDocument;
6217 if FEvent <> nil then
6219 FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
6220 FEvent.OnContextMenu := OnDocumentContextMenu;
6221 FEvent.OnClick := WebBrowserClick; //
\92Ç
\89Á
\82µ
\82½OnClick
\83C
\83x
\83\93\83g
6226 procedure TGikoForm.SelectReservActionUpdate(Sender: TObject);
6231 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then begin
6232 List := TList.Create;
6234 SelectListItem(List);
6235 for i := 0 to List.Count - 1 do begin
6236 if TObject(List[i]) is TThreadItem then begin
6237 if TThreadItem(List[i]).IsLogFile then begin
6238 SelectReservAction.Enabled := True;
6243 SelectReservAction.Enabled := False;
6247 end else if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
6248 SelectReservAction.Enabled := True
6250 SelectReservAction.Enabled := False;
6253 procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
6255 AddRoundNameMenu(RoundNamePopupMenu.Items);
6258 procedure TGikoForm.AddRoundNameMenu(MenuItem: TMenuItem);
6264 Item := TMenuItem.Create(Self);
6265 Item.Caption := '
\90V
\82µ
\82¢
\96¼
\91O
\82Å
\8f\84\89ñ
\97\
\96ñ(&N)...';
6266 Item.OnClick := SelectNewRoundNameExecute;
6268 Item := TMenuItem.Create(Self);
6269 Item.Caption := '
\8f\84\89ñ
\83\8a\83X
\83g
\82©
\82ç
\8dí
\8f\9c(&D)';
6270 Item.OnClick := SelectDeleteRoundExecute;
6272 Item := TMenuItem.Create(Self);
6273 Item.Caption := '-';
6275 for i := 0 to RoundList.RoundNameList.Count - 1 do begin
6276 Item := TMenuItem.Create(Self);
6277 Item.Caption := RoundList.RoundNameList[i];
6278 Item.OnClick := SetSelectRoundName;
6283 procedure TGikoForm.SelectNewRoundNameExecute(Sender: TObject);
6286 Dlg: TRoundNameDialog;
6289 Dlg := TRoundNameDialog.Create(Self);
6292 if Dlg.ModalResult <> mrCancel then begin
6293 s := Trim(Dlg.RoundNameEdit.Text);
6294 RoundList.RoundNameList.Add(s);
6295 SetSelectItemRound(True, s, TMenuItem(Sender).Parent.Name);
6302 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string);
6304 threadItem : TThreadItem;
6306 if ParentName <> 'dummy1' then begin
6307 SetSelectItemRound(RoundFlag, RoundName);
6309 threadItem := GetActiveContent;
6310 if threadItem <> nil then begin
6311 threadItem.RoundName := RoundName;
6312 threadItem.Round := RoundFlag;
6317 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
6322 List := TList.Create;
6324 SelectListItem(List);
6325 for i := 0 to List.Count - 1 do begin
6326 if TObject(List[i]) is TBoard then begin
6327 TBoard(List[i]).RoundName := RoundName;
6328 TBoard(List[i]).Round := RoundFlag;
6329 end else if TObject(List[i]) is TThreadItem then begin
6330 if TThreadItem(List[i]).IsLogFile then begin
6331 TThreadItem(List[i]).RoundName := RoundName;
6332 TThreadItem(List[i]).Round := RoundFlag;
6341 procedure TGikoForm.SelectDeleteRoundExecute(Sender: TObject);
6343 SetSelectItemRound(False, '', TMenuItem(Sender).Parent.Name);
6347 procedure TGikoForm.SelectReservActionExecute(Sender: TObject);
6349 //
\82±
\82Ì
\83R
\83\81\83\93\83g
\8dí
\8f\9c\82µ
\82Ä
\82Í
\91Ê
\96Ú
6352 procedure TGikoForm.SetSelectRoundName(Sender: TObject);
6354 MenuItem: TMenuItem;
6356 if Sender is TMenuItem then begin
6357 MenuItem := TMenuItem(Sender);
6358 SetSelectItemRound(True, StripHotKey(MenuItem.Caption), TMenuItem(Sender).Parent.Name);
6363 procedure TGikoForm.NewBoardActionExecute(Sender: TObject);
6365 Dlg: TNewBoardDialog;
6369 for i := 0 to Screen.CustomFormCount - 1 do begin
6370 if TObject(Screen.CustomForms[i]) is TEditorForm then begin
6371 Msg := '
\83\8c\83X
\83G
\83f
\83B
\83^
\82ð
\91S
\82Ä
\95Â
\82¶
\82Ä
\82
\82¾
\82³
\82¢';
6372 MsgBox(Handle, Msg, '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
6376 Dlg := TNewBoardDialog.Create(Self);
6384 procedure TGikoForm.LoginActionExecute(Sender: TObject);
6389 if GikoSys.Dolib.Connected then begin
6390 //
\83\8d\83O
\83A
\83E
\83g
6391 GikoSys.Dolib.Disconnect;
6392 LoginAction.Checked := False;
6393 AddMessageList('
\83\8d\83O
\83A
\83E
\83g
\82µ
\82Ü
\82µ
\82½', nil, gmiOK);
6394 LoginAction.Caption := '
\83\8d\83O
\83C
\83\93(&L)';
6396 TmpCursor := Screen.Cursor;
6397 Screen.Cursor := crHourGlass;
6399 //
\92Ê
\8fí
\83\8d\83O
\83C
\83\93
6400 if not GikoSys.Setting.ForcedLogin then begin
6401 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6402 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6403 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6404 if GikoSys.Setting.ReadProxy then begin
6405 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6406 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6408 GikoSys.Dolib.ProxyAddress := '';
6409 GikoSys.Dolib.ProxyPort := 0;
6411 if GikoSys.Dolib.Connect then begin
6412 LoginAction.Checked := True;
6413 AddMessageList('
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6414 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6415 LoginToolButton.Style := tbsCheck;
6417 // MsgBox(Handle, '
\83\8d\83O
\83C
\83\93\8fo
\97\88\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½', '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
6418 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6420 LoginAction.Checked := False;
6421 LoginToolButton.Down := False;
6422 LoginToolButton.Style := tbsButton;
6425 msg := '
\8b
\90§
\83\8d\83O
\83C
\83\93\83\82\81[
\83h
\82Å
\82Í
\81C
\83T
\81[
\83o
\82Ì
\8fØ
\96¾
\8f\91\82Ì
\97L
\8cø
\90«
\82ð
\83`
\83F
\83b
\83N
\82µ
\82Ü
\82¹
\82ñ
\81B' + #13#10
6426 + '
\8bU
\91\95\83T
\81[
\83o
\82Ì
\8fê
\8d\87\81A
\82 \82È
\82½
\82Ì
\83p
\83X
\83\8f\81[
\83h
\93\90\82Ü
\82ê
\82é
\89Â
\94\
\90«
\82ª
\82 \82è
\82Ü
\82·
\81B' + #13#10
6427 + '
\82±
\82Ì
\83\82\81[
\83h
\82Å
\83\8d\83O
\83C
\83\93\82ð
\8e\8e\82Ý
\82Ü
\82·
\82©
\81H' + #13#10;
6428 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) = IDYES then begin
6429 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6430 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6431 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6432 if GikoSys.Setting.ReadProxy then begin
6433 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6434 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6436 GikoSys.Dolib.ProxyAddress := '';
6437 GikoSys.Dolib.ProxyPort := 0;
6439 //SSL
\8fá
\8aQ
\97p
\8b
\90§
\83\8d\83O
\83C
\83\93
6440 GikoSys.Dolib.ForcedConnect;
6441 if GikoSys.Dolib.Connect then begin
6442 LoginAction.Checked := True;
6443 AddMessageList('
\8b
\90§
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6444 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6445 LoginToolButton.Style := tbsCheck;
6447 // MsgBox(Handle, '
\83\8d\83O
\83C
\83\93\8fo
\97\88\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½', '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
6448 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6450 LoginAction.Checked := False;
6451 LoginToolButton.Down := False;
6452 LoginToolButton.Style := tbsButton;
6455 LoginAction.Checked := False;
6456 LoginToolButton.Down := False;
6457 LoginToolButton.Style := tbsButton;
6461 Screen.Cursor := TmpCursor;
6466 procedure TGikoForm.KeySettingActionExecute(Sender: TObject);
6468 Dlg: TKeySettingForm;
6470 Dlg := TKeySettingForm.Create(Self);
6472 if Dlg.ShowModal = mrOk then
6473 GikoSys.SaveKeySetting(ActionList);
6474 GikoSys.SaveEditorKeySetting(Dlg.EditorForm.ActionList);
6480 procedure TGikoForm.ArrangeActionExecute(Sender: TObject);
6482 if ArrangeAction.Checked then begin
6484 ViewPanel.Align := alNone;
6485 ListSplitter.Align := alNone;
6486 ThreadPanel.Align := alNone;
6488 ViewPanel.Width := FBrowserSizeWidth;
6489 ViewPanel.Align := alLeft;
6491 ListSplitter.Width := 5;
6492 ListSplitter.Align := alLeft;
6494 ViewPanel.Left := -10;
6496 ThreadPanel.Align := alClient;
6498 GikoSys.Setting.ListOrientation := gloHorizontal;
6499 case GikoSys.Setting.ListWidthState of
6501 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6502 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6503 ViewPanel.Width := 1;
6506 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6507 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6510 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6511 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6512 ViewPanel.Width := ThreadMainPanel.Width - 80;
6517 ViewPanel.Align := alNone;
6518 ListSplitter.Align := alNone;
6519 ThreadPanel.Align := alNone;
6521 ViewPanel.Height := FBrowserSizeHeight;
6522 ViewPanel.Align := alTop;
6524 ListSplitter.Height := 5;
6525 ListSplitter.Align := alTop;
6527 ViewPanel.Top := -10;
6529 ThreadPanel.Align := alClient;
6530 GikoSys.Setting.ListOrientation := gloVertical;
6531 case GikoSys.Setting.ListHeightState of
6533 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6534 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6535 ViewPanel.Height := 1;
6538 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6539 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6542 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6543 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6544 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
6551 procedure TGikoForm.PaneInitActionExecute(Sender: TObject);
6553 CabinetPanel.Width := 150;
6554 MessagePanel.Height := 40;
6556 FBrowserSizeWidth := 200;
6557 FBrowserSizeHeight := 200;
6558 if ArrangeAction.Checked then begin
6559 ViewPanel.Width := FBrowserSizeWidth;
6561 ViewPanel.Height := FBrowserSizeHeight;
6563 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6564 if GikoSys.Setting.ListHeightState = glsMax then begin
6565 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6566 GikoSys.Setting.ListHeightState := glsNormal;
6569 if GikoSys.Setting.ListWidthState = glsMax then begin
6570 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6571 GikoSys.Setting.ListWidthState := glsNormal;
6576 procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
6578 DEL_MSG = '
\83\8d\83O
\83t
\83@
\83C
\83\8b\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
6579 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6582 ThreadItem: TThreadItem;
6584 idx := BrowserTab.TabIndex;
6585 if idx <> -1 then begin
6586 if BrowserTab.Tabs.Objects[idx] <> nil then begin
6587 if GikoSys.Setting.DeleteMsg then
6588 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
6590 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).FThread;
6591 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6592 ThreadItem.DeleteLogFile;
6593 if ThreadItem.ParentBoard = FActiveList then
6599 function TGikoForm.GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
6604 if CoolBar = nil then
6606 for i := 0 to CoolBar.Bands.Count - 1 do begin
6607 if CoolBar.Bands[i].Control = Control then begin
6608 Result := CoolBar.Bands[i];
6614 procedure TGikoForm.BrowserTabToolBarResize(Sender: TObject);
6616 if BrowserTab.Parent = BrowserTabToolBar then
6617 BrowserTab.Width := BrowserTabToolBar.Width;
6620 procedure TGikoForm.SelectTextClearActionExecute(Sender: TObject);
6622 GikoSys.Setting.SelectTextList.Clear;
6623 SelectComboBox.Items.Clear;
6624 SelectComboBox.Text := '';
6625 SetListViewType( gvtAll );
6628 procedure TGikoForm.NameTextClearActionExecute(Sender: TObject);
6632 GikoSys.Setting.NameList.Clear;
6633 for i := 0 to Screen.CustomFormCount - 1 do begin
6634 if TObject(Screen.CustomForms[i]) is TEditorForm then
6635 TEditorForm(Screen.CustomForms[i]).NameComboBox.Items.Clear;
6639 procedure TGikoForm.MailTextClearActionExecute(Sender: TObject);
6643 GikoSys.Setting.MailList.Clear;
6644 for i := 0 to Screen.CustomFormCount - 1 do begin
6645 if TObject(Screen.CustomForms[i]) is TEditorForm then
6646 TEditorForm(Screen.CustomForms[i]).MailComboBox.Items.Clear;
6650 procedure TGikoForm.LeftmostTabSelectActionExecute(Sender: TObject);
6652 if BrowserTab.Tabs.Count > 0 then begin
6653 BrowserTab.TabIndex := 0;
6654 BrowserTab.OnChange(nil);
6658 procedure TGikoForm.LeftTabSelectActionExecute(Sender: TObject);
6660 if BrowserTab.Tabs.Count > 0 then begin
6661 if BrowserTab.TabIndex = -1 then begin
6662 BrowserTab.TabIndex := 0;
6663 BrowserTab.OnChange(nil);
6664 end else if BrowserTab.TabIndex > 0 then begin
6665 BrowserTab.TabIndex := BrowserTab.TabIndex - 1;
6666 BrowserTab.OnChange(nil);
6671 procedure TGikoForm.RightTabSelectActionExecute(Sender: TObject);
6673 if BrowserTab.Tabs.Count > 0 then begin
6674 if BrowserTab.TabIndex = -1 then begin
6675 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6676 BrowserTab.OnChange(nil);
6677 end else if BrowserTab.TabIndex < (BrowserTab.Tabs.Count - 1) then begin
6678 BrowserTab.TabIndex := BrowserTab.TabIndex + 1;
6679 BrowserTab.OnChange(nil);
6684 procedure TGikoForm.RightmostTabSelectActionExecute(Sender: TObject);
6686 if BrowserTab.Tabs.Count > 0 then begin
6687 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6688 BrowserTab.OnChange(nil);
6692 procedure TGikoForm.LeftmostTabSelectActionUpdate(Sender: TObject);
6694 LeftmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6697 procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
6699 LeftTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6702 procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);
6704 RightTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6707 procedure TGikoForm.RightmostTabSelectActionUpdate(Sender: TObject);
6709 RightmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6712 procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
6717 procedure TGikoForm.SetMenuFont;
6719 // GikoSys.MenuFont(MenuToolBar.Font);
6720 // MenuToolBar.Buttons[0].AutoSize := False;
6721 // MenuToolBar.Buttons[0].AutoSize := True;
6722 // MenuToolBar.Font.Color := clMenuText;
6723 GikoSys.MenuFont(MainCoolBar.Font);
6724 MenuToolBar.Buttons[0].AutoSize := False;
6725 MenuToolBar.Buttons[0].AutoSize := True;
6726 MainCoolBar.AutoSize := False;
6727 MainCoolBar.AutoSize := True;
6729 GikoSys.MenuFont(ListCoolBar.Font);
6730 GikoSys.MenuFont(BrowserCoolBar.Font);
6731 // MenuToolBar.Font.Color := clMenuText;
6734 procedure TGikoForm.FavoriteMenuClick(Sender: TObject);
6740 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\92Ç
\89Á
6741 NewMenu := TMenuItem.Create(MainMenu);
6742 NewMenu.Action := FavoriteAddAction;
6743 FavoriteMenu.Add(NewMenu);
6744 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\90®
\97\9d
6745 NewMenu := TMenuItem.Create(FavoriteMenu);
6746 NewMenu.Action := FavoriteArrangeAction;
6747 FavoriteMenu.Add(NewMenu);
6748 //
\83Z
\83p
\83\8c\81[
\83^
6749 NewMenu := TMenuItem.Create(FavoriteMenu);
6750 NewMenu.Caption := '-';
6751 FavoriteMenu.Add(NewMenu);
6753 CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
6756 procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
6761 for i := 0 to Node.Count - 1 do begin
6762 NewMenu := TFavoriteMenuItem.Create(Self);
6763 NewMenu.AutoHotkeys := maAutomatic;
6764 NewMenu.Caption := CustomStringReplace(Node.Item[i].Text, '&', '&&');
6765 TFavoriteMenuItem(NewMenu).Data := Node.Item[i].Data;
6766 MenuItem.Add(NewMenu);
6768 if TObject(Node.Item[i].Data) is TFavoriteFolder then begin
6769 NewMenu.ImageIndex := TOOL_ICON_FAV_FOLDER;
6770 CreateFavMenu(Node.Item[i], NewMenu);
6771 end else if TObject(Node.Item[i].Data) is TFavoriteBoardItem then begin
6772 NewMenu.ImageIndex := TOOL_ICON_FAV_BOARD;
6773 NewMenu.OnClick := FavoriteClick;
6774 end else if TObject(Node.Item[i].Data) is TFavoriteThreadItem then begin
6775 NewMenu.ImageIndex := TOOL_ICON_FAV_THREAD;
6776 NewMenu.OnClick := FavoriteClick;
6781 procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
6783 Dlg : TFavoriteAddDialog;
6785 Items : ^TTreeNodes;
6790 Items := @(FavoriteTreeView.Items);
6791 if Item is TFavoriteBoardItem then
6792 Item := TFavoriteBoardItem( Item ).Item
6793 else if Item is TFavoriteThreadItem then
6794 Item := TFavoriteThreadItem( Item ).Item;
6795 if Item is TBoard then begin
6796 ItemURL := TBoard( Item ).URL;
6797 for i := Items^.Count - 1 downto 0 do begin
6798 Data := Items^.Item[ i ].Data;
6799 if TObject( Data ) is TFavoriteBoardItem then begin
6800 if ItemURL = TFavoriteThreadItem( Data ).URL then begin
6801 if Application.MessageBox( '
\8aù
\82É
\82¨
\8bC
\82É
\93ü
\82è
\82É
\93o
\98^
\82³
\82ê
\82Ä
\82¢
\82Ü
\82·
\81B
\82»
\82ê
\82Å
\82à
\92Ç
\89Á
\82µ
\82Ü
\82·
\82©
\81H', '
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\92Ç
\89Á', MB_YESNO ) = IDNO then
6807 Dlg := TFavoriteAddDialog.Create(Self);
6809 Dlg.SetBoard( TBoard( Item ) );
6814 end else if Item is TThreadItem then begin
6815 ItemURL := TThreadItem( Item ).URL;
6816 for i := Items^.Count - 1 downto 0 do begin
6817 Data := Items^.Item[ i ].Data;
6818 if TObject( Data ) is TFavoriteThreadItem then begin
6819 if ItemURL = TFavoriteThreadItem( Data ).URL then begin
6820 if Application.MessageBox( '
\8aù
\82É
\82¨
\8bC
\82É
\93ü
\82è
\82É
\93o
\98^
\82³
\82ê
\82Ä
\82¢
\82Ü
\82·
\81B
\82»
\82ê
\82Å
\82à
\92Ç
\89Á
\82µ
\82Ü
\82·
\82©
\81H', '
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\92Ç
\89Á', MB_YESNO ) = IDNO then
6826 Dlg := TFavoriteAddDialog.Create(Self);
6828 Dlg.SetThreadItem( TThreadItem( Item ) );
6838 procedure TGikoForm.FavoriteAddActionExecute(Sender: TObject);
6840 ShowFavoriteAddDialog(GetActiveContent);
6843 procedure TGikoForm.FavoriteClick(Sender: TObject);
6846 FavoriteClick( Sender, True );
6850 procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
6853 ThreadItem: TThreadItem;
6854 FavBoard: TFavoriteBoardItem;
6855 FavThread: TFavoriteThreadItem;
6859 if Sender is TFavoriteMenuItem then
6860 Item := TFavoriteMenuItem(Sender).Data
6861 else if Sender is TLinkToolButton then
6862 Item := TLinkToolButton(Sender).Data
6863 else if Sender is TTreeNode then
6864 Item := TTreeNode( Sender ).Data
6868 if TObject(Item) is TFavoriteBoardItem then begin
6869 FavBoard := TFavoriteBoardItem(Item);
6870 Board := FavBoard.Item;
6871 if Board <> nil then begin
6872 if (FTreeType = gtt2ch) and (FActiveBBS <> Board.ParentCategory.ParenTBBS) then
6873 ShowBBSTree( Board.ParentCategory.ParenTBBS );
6874 SelectTreeNode(Board, True);
6876 end else if TObject(Item) is TFavoriteThreadItem then begin
6877 FavThread := TFavoriteThreadItem(Item);
6878 ThreadItem := FavThread.Item;
6879 if ThreadItem = nil then
6882 InsertBrowserTab(ThreadItem, ActiveTab);
6884 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6885 if GikoSys.Setting.ListWidthState = glsMin then begin
6886 BrowserMaxAndFocusAction.Execute;
6889 if GikoSys.Setting.ListHeightState = glsMin then begin
6890 BrowserMaxAndFocusAction.Execute;
6896 procedure TGikoForm.FavoriteAddActionUpdate(Sender: TObject);
6898 FavoriteAddAction.Enabled := (GetActiveContent <> nil);
6901 procedure TGikoForm.BoardFavoriteAddActionExecute(Sender: TObject);
6903 if TObject(ListView.Selected.Data) is TBoard then
6904 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
6907 procedure TGikoForm.BoardFavoriteAddActionUpdate(Sender: TObject);
6909 BoardFavoriteAddAction.Enabled := (GetActiveList is TCategory) and (ListView.SelCount > 0);
6912 procedure TGikoForm.ThreadFavoriteAddActionExecute(Sender: TObject);
6914 if TObject(ListView.Selected.Data) is TThreadItem then
6915 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
6918 procedure TGikoForm.ThreadFavoriteAddActionUpdate(Sender: TObject);
6920 ThreadFavoriteAddAction.Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
6923 procedure TGikoForm.TreeSelectFavoriteAddActionExecute(Sender: TObject);
6925 ShowFavoriteAddDialog(TObject(FClickNode.Data));
6928 procedure TGikoForm.FavoriteArrangeActionExecute(Sender: TObject);
6930 Dlg: TFavoriteArrangeDialog;
6932 Dlg := TFavoriteArrangeDialog.Create(Self);
6938 PostMessage( Handle, USER_SETLINKBAR, 0, 0 );
6941 procedure TGikoForm.BBSMenuItemOnClick(
6946 if Sender is TBBSMenuItem then
6947 ShowBBSTree( TBBSMenuItem( Sender ).Data );
6951 procedure TGikoForm.MainCoolBarResize(Sender: TObject);
6953 TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
6956 procedure TGikoForm.MoveToActionExecute(Sender: TObject);
6961 URL := Trim(AddressComboBox.Text);
6964 idx := AddressComboBox.Items.IndexOf(URL);
6965 if idx = -1 then begin
6966 AddressComboBox.Items.Insert(0, URL);
6967 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
6968 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
6970 AddressComboBox.Items.Delete(idx);
6971 AddressComboBox.Items.Insert(0, URL);
6975 procedure TGikoForm.MoveToURL(URL: string);
6978 protocol, host, path, document, port, bookmark : string;
6979 BBSID, BBSKey: string;
6981 ThreadItem: TThreadItem;
6984 tmpThread : TThreadItem;
6985 // category : TCategory;
6986 // categoryNode : TTreeNode;
6987 // boardNode : TTreeNode;
6988 shiftDown : Boolean;
6992 GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark );
6993 GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey );
6996 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
6997 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
6998 if shiftDown then begin
6999 GikoSys.OpenBrowser(URL, gbtUserApp);
7001 end else if ctrlDown then begin
7002 GikoSys.OpenBrowser(URL, gbtIE);
7006 //=====
\83v
\83\89\83O
\83C
\83\93
7009 bi := High( BoardPlugIns );
7010 for i := Low( BoardPlugIns ) to bi do begin
7011 if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
7012 case BoardPlugIns[ i ].AcceptURL( URL ) of
7015 tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL );
7016 boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
7017 Board := BBSsFindBoardFromURL( boardURL );
7018 if Board = nil then begin
7019 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
7020 //GikoSys.OpenBrowser(URL, gbtUserApp);
7023 Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL );
7024 if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
7025 ShowBBSTree( BBSs[ 1 ] );
7028 if not Board.IsThreadDatRead then begin
7029 GikoSys.ReadSubjectFile( Board );
7034 ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
7035 if ThreadItem = nil then begin
7036 ThreadItem := tmpThread;
7037 Board.Insert( 0, ThreadItem );
7038 if ActiveList is TBoard then begin
7039 if TBoard(ActiveList) = Board then
7040 ListView.Items.Count := ListView.Items.Count + 1;
7042 InsertBrowserTab( ThreadItem );
7043 DownloadContent( ThreadItem );
7047 InsertBrowserTab( ThreadItem );
7048 if not ThreadItem.IsLogFile then begin
7049 DownloadContent( ThreadItem );
7059 Board := BBSsFindBoardFromURL( URL );
7060 if Board <> nil then begin
7061 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
7062 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7063 SelectTreeNode( Board, True );
7071 // exception
\82ª
\94
\90¶
\82µ
\82½
\8fê
\8d\87\82Í
\93à
\95\94\8f\88\97\9d\82É
\94C
\82¹
\82½
\82¢
\82Ì
\82Å
\82±
\82±
\82Å
\82Í
\89½
\82à
\82µ
\82È
\82¢
7075 if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
7076 boardURL := GikoSys.Get2chThreadURL2BoardURL( URL );
7077 Board := BBSsFindBoardFromURL( boardURL );
7079 Board := BBSsFindBoardFromBBSID( BBSID );
7081 if Board = nil then begin
7082 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
7083 //
\81@
\89ß
\8b\8e\83\8d\83O
\91q
\8cÉ
\82©
\82ç
\81A
\83_
\83E
\83\
\82µ
\82½
\83X
\83\8c\82ª
\94
\8c©
\82Å
\82«
\82È
\82¢
\82Ì
\82Å
\82±
\82±
\82Å
\92T
\82·
\82æ
\82¤
\82É
\82·
\82é (2004/01/22)
7084 Board := BBSs[ 0 ].FindBBSID( Copy(BBSID, 1 , Length(BBSID) - 1) );
7086 if Board = nil then begin
7087 GikoSys.OpenBrowser(URL, gbtUserApp);
7089 //Board := GikoSys.GetUnknownBoard( nil, boardURL );
7090 //if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
7091 // ShowBBSTree( BBSs[ 1 ] );
7093 if not Board.IsThreadDatRead then
7094 GikoSys.ReadSubjectFile(Board);
7095 URL := GikoSys.Get2chBrowsableThreadURL( URL );
7096 ThreadItem := Board.FindThreadFromURL( URL );
7097 //
\81@
\89ß
\8b\8e\83\8d\83O
\91q
\8cÉ
\82©
\82ç
\81A
\83_
\83E
\83\
\82µ
\82½
\83X
\83\8c\82ª
\94
\8c©
\82Å
\82«
\82È
\82¢
\82Ì
\82Å
\82±
\82±
\82Å
\92T
\82·
\82æ
\82¤
\82É
\82·
\82é (2004/01/22)
7098 if ThreadItem = nil then begin
7099 ThreadItem := Board.FindThreadFromFileName( BBSKey + '.dat' );
7102 if ThreadItem = nil then begin
7103 //shift ->
\90Ý
\92è
\83u
\83\89\83E
\83U
\81i
\96³
\82¯
\82ê
\82ÎIE
\81j
7105 {shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
7106 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
7108 GikoSys.OpenBrowser(URL, gbtUserApp)
7109 else if ctrlDown then
7110 GikoSys.OpenBrowser(URL, gbtIE)
7113 ThreadItem := TThreadItem.Create( nil, URL );
7114 ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
7115 if AnsiPos(Host, Board.URL) = 0 then
7116 ThreadItem.DownloadHost := Host
7118 ThreadItem.DownloadHost := '';
7119 Board.Insert(0, ThreadItem);
7120 if ActiveList is TBoard then begin
7121 if TBoard(ActiveList) = Board then
7122 ListView.Items.Count := ListView.Items.Count + 1;
7124 InsertBrowserTab(ThreadItem);
7125 DownloadContent(ThreadItem);
7128 if ThreadItem.IsLogFile then
7129 InsertBrowserTab(ThreadItem)
7131 if AnsiPos(Host, Board.URL) = 0 then
7132 ThreadItem.DownloadHost := Host
7134 ThreadItem.DownloadHost := '';
7135 InsertBrowserTab(ThreadItem);
7136 DownloadContent(ThreadItem);
7140 Board := BBSsFindBoardFromURL( URL );
7141 if Board = nil then begin
7142 GikoSys.OpenBrowser(URL, gbtAuto);
7144 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
7145 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7146 SelectTreeNode( Board, True );
7151 procedure TGikoForm.AddressToolBarResize(Sender: TObject);
7153 AddressComboBox.Width := AddressToolBar.Width - MoveToToolButton.Width - 10;
7154 CoolBarResized( Sender, MainCoolBar );
7157 procedure TGikoForm.AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
7158 Shift: TShiftState);
7160 if Key = VK_RETURN then
7161 MoveToAction.Execute;
7164 procedure TGikoForm.BrowserEnter(Sender: TObject);
7166 Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
7169 procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
7171 CDS:PCopyDataStruct;
7175 CDS := Message.CopyDataStruct;
7176 GetMem(PC, CDS^.cbData);
7178 lstrcpy(PC,CDS^.lpData);
7179 SetString(sURL, PC,lstrlen(PC));
7184 Message.Result := 1;
7187 procedure TGikoForm.WndProc(var Message: TMessage);
7192 if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
7195 if Message.WParam = SC_MINIMIZE then
7198 TreeClick( TreeView.Selected );
7212 procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
7214 hComboEdit: THandle;
7215 // KeyData: Integer;
7218 if AddressComboBox.Focused or SelectComboBox.Focused then begin
7219 if Msg.CharCode in [VK_BACK] then begin
7220 hComboEdit := GetFocus;
7221 if hComboEdit <> 0 then
7222 SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, Msg.KeyData);
7223 // SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, $000E0001);
7226 if Msg.CharCode in [VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PRIOR, VK_NEXT] then begin
7227 hComboEdit := GetFocus;
7228 if hComboEdit <> 0 then
7229 SendMessage(hComboEdit, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
7233 //
\83\81\83j
\83\85\81[
\82Ì
\83t
\83@
\83C
\83\8b(F)
\82Æ
\82©
\82ÅF
\82ð
\92P
\91Ì
\82Å
\89\9f\82µ
\82½
\82Æ
\82«
\82É
\91I
\91ð
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\8c»
\8fÛ
\82ð
\89ñ
\94ð
7234 KeyData := Msg.KeyData;
7235 if (KeyData and $20000000) = 0 then begin
7236 if Msg.CharCode in [Ord('F'), Ord('V'), Ord('B'), Ord('R'),
7237 Ord('A'), Ord('T'), Ord('H')] then begin
7238 if not ActionList.IsShortCut(Msg) then begin
7246 procedure TGikoForm.BrowserTabVisibleActionExecute(Sender: TObject);
7248 GikoSys.Setting.BrowserTabVisible := BrowserTabVisibleAction.Checked;
7252 procedure TGikoForm.BrowserTabTopActionExecute(Sender: TObject);
7254 BrowserTabBottomAction.Checked := False;
7255 BrowserTabTopAction.Checked := True;
7256 GikoSys.Setting.BrowserTabPosition := gtpTop;
7260 procedure TGikoForm.BrowserTabBottomActionExecute(Sender: TObject);
7262 BrowserTabTopAction.Checked := False;
7263 BrowserTabBottomAction.Checked := True;
7264 GikoSys.Setting.BrowserTabPosition := gtpBottom;
7268 procedure TGikoForm.BrowserTabTabStyleActionExecute(Sender: TObject);
7270 BrowserTabButtonStyleAction.Checked := False;
7271 BrowserTabFlatStyleAction.Checked := False;
7272 BrowserTabTabStyleAction.Checked := True;
7273 GikoSys.Setting.BrowserTabStyle := gtsTab;
7277 procedure TGikoForm.BrowserTabButtonStyleActionExecute(Sender: TObject);
7279 BrowserTabTabStyleAction.Checked := False;
7280 BrowserTabFlatStyleAction.Checked := False;
7281 BrowserTabButtonStyleAction.Checked := True;
7282 GikoSys.Setting.BrowserTabStyle := gtsButton;
7286 procedure TGikoForm.BrowserTabFlatStyleActionExecute(Sender: TObject);
7288 BrowserTabFlatStyleAction.Checked := True;
7289 BrowserTabTabStyleAction.Checked := False;
7290 BrowserTabButtonStyleAction.Checked := False;
7291 GikoSys.Setting.BrowserTabStyle := gtsFlat;
7295 procedure TGikoForm.PreviewTimerTimer(Sender: TObject);
7301 HtmlFileName: string;
7305 TargetFrameName: OleVariant;
7306 PostData: OleVariant;
7307 Headers: OleVariant;
7308 WindowHeight: Integer;
7309 WindowWidth: Integer;
7313 Protocol, Host, Path, Document, Port, Bookmark: string;
7315 PreviewTimer.Enabled := False;
7319 case GikoSys.Setting.PreviewSize of
7326 WindowHeight := 192;
7330 WindowHeight := 384;
7334 WindowHeight := 480;
7336 else begin //gpsMedium
7338 WindowHeight := 288;
7342 ARect := Rect(0, 0, WindowWidth, WindowHeight);
7344 case GikoSys.Setting.PopupPosition of
7345 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7346 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7347 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
7348 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
7349 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
7350 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
7351 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7352 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7353 gppLeftBottom: OffsetRect(ARect, p.x + 15, p.y + 15); //
\83M
\83R
\83i
\83r
\83X
\83\8c \83p
\81[
\83g
\82P
\82Ì453
\8e\81\82É
\8a´
\8eÓ
7356 html := '<html><head>'#13#10
7358 + 'function init() {'#13#10
7359 + ' if ((document.body.clientHeight >= Image1.height) && (document.body.clientWidth >= Image1.width)) {'#13#10
7361 + ' var dh, ih;'#13#10
7362 + ' dh = document.body.clientWidth / document.body.clientHeight;'#13#10
7363 + ' ih = Image1.width / Image1.height;'#13#10
7364 + ' if (document.body.clientWidth < document.body.clientHeight) {'#13#10
7365 + ' if (ih > dh)'#13#10
7366 + ' Image1.width = document.body.clientWidth;'#13#10
7368 + ' Image1.height = document.body.clientHeight;'#13#10
7370 + ' if (ih < dh)'#13#10
7371 + ' Image1.height = document.body.clientHeight;'#13#10
7373 + ' Image1.width = document.body.clientWidth;'#13#10
7376 + ' Message.style.display = "none";'#13#10
7380 + '<body topmargin="0" leftmargin="0" style="border-width: 1px; overflow:hidden; border-style: solid;" onLoad="init()">'#13#10
7381 + '<div align="center" id="Message">
\83v
\83\8c\83r
\83\85\81[
\8dì
\90¬
\92\86</div>'#13#10
7382 + '<div align="center"><img name="Image1" border="0" src="%ImageURL%"></div>'#13#10
7384 sl := TStringList.Create;
7387 HtmlFileName := GikoSys.GetAppDir + HTML_FILE_NAME;
7388 sl.Text := AnsiReplaceStr(html, '%ImageURL%', FPreviewURL);
7389 sl.SaveToFile(HtmlFileName);
7396 NavURL := HtmlFileName;
7398 TargetFrameName := '';
7401 GikoSys.ParseURI(FPreviewURL, Protocol, Host, Path, Document, Port, Bookmark);
7402 Referer := Protocol + '://' + Host;
7404 Referer := Referer + ':' + Port;
7405 Referer := Referer + Path;
7406 Headers := 'Referer: ' + Referer;
7408 FPreviewBrowser.Navigate(NavURL, Flags, TargetFrameName, PostData, Headers);
7410 if ARect.Top + WindowHeight > Screen.DesktopHeight then
7411 ARect.Top := Screen.DesktopHeight - WindowHeight;
7412 if ARect.Left + WindowWidth > Screen.DesktopWidth then
7413 ARect.Left := Screen.DesktopWidth - WindowWidth;
7414 if ARect.Left < Screen.DesktopLeft then ARect.Left := Screen.DesktopLeft;
7415 if ARect.Bottom < Screen.DesktopTop then ARect.Bottom := Screen.DesktopTop;
7417 SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
7418 ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
7420 // Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
7421 // SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
7425 procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
7427 if PreviewTimer.Enabled then
7428 PreviewTimer.Enabled := False;
7429 if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
7430 FHint.ReleaseHandle;
7433 if (FPreviewBrowser <> nil) and (IsWindowVisible(FPreviewBrowser.Handle)) then
7434 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
7435 Message.Result := 1;
7439 procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
7441 MsgBarCloseAction.Execute;
7444 function TGikoForm.OnDocumentContextMenu(Sender: TObject): WordBool;
7446 Doc: IHtmlDocument2;
7447 Range: IHTMLTxtRange;
7450 ThreadItem: TThreadItem;
7452 Doc := FactiveContent.FBrowser.Document as IHtmlDocument2;
7453 Range := Doc.selection.createRange as IHTMLTxtRange;
7454 s := CustomStringReplace(Range.text, '
\81@', ' ');//
\91S
\8ap
\8bó
\94\92\82ð
\94¼
\8ap
\8bó
\94\92\82É
7455 s := ZenToHan(Trim(s));
7456 if GikoSys.IsNumeric(s) then begin
7458 ThreadItem := GetActiveContent;
7459 if ThreadItem <> nil then begin
7461 FHint.PopupType := gptThread;
7462 SetResPopupText(ThreadItem, Num, Num, False, False);
7463 if FHint.ResCount <> 0 then
7473 procedure TGikoForm.SetResPopupText(threadItem: TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
7485 boardPlugIn : TBoardPlugIn;
7488 if StNum > ToNum then begin
7494 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
7495 if StNum + 10 < ToNum then
7496 ToNum := StNum + 10;
7498 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
7500 if ThreadItem <> nil then
7501 FHint.Title := ThreadItem.Title;
7503 if ThreadItem <> nil then begin
7504 if ThreadItem.IsBoardPlugInAvailable then begin
7505 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
7506 boardPlugIn := ThreadItem.BoardPlugIn;
7508 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
7509 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
7510 for i := StNum to ToNum do begin
7512 //
\82±
\82±
\82Å
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\82Ìdat
\82Ì
\8c`
\8e®
\82Å
\82P
\8ds
\93Ç
\82Ý
\8d\9e\82ß
\82ê
\82Î¥¥¥
\81B
\81«
\93Ç
\82ß
\82é
\82æ
\82¤
\82É
\82È
\82Á
\82½
7513 tmp := boardPlugIn.GetDat( DWORD( threadItem ), i );
7514 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7515 Res := GikoSys.DivideStrLine(tmp);
7516 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7517 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7519 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7522 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7523 Body := CustomStringReplace(Body, '<br>', #10,true);
7524 Body := CustomStringReplace(Body, '</a>', '',true);
7525 Body := GikoSys.DeleteLink(Body);
7526 Body := CustomStringReplace(Body, '<', '<');
7527 Body := CustomStringReplace(Body, '>', '>');
7528 Body := CustomStringReplace(Body, '"', '"');
7529 Body := CustomStringReplace(Body, '&', '&');
7530 Body := CustomStringReplace(Body, ' ', ' ');
7532 FHint.Add(Header, Body);
7533 //FHint.Title := '';
7537 for i := StNum to ToNum do begin
7539 FileName := ThreadItem.FilePath;
7540 tmp := GikoSys.ReadThreadFile(FileName, Line);
7541 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7542 Res := GikoSys.DivideStrLine(tmp);
7543 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7544 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7546 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7548 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7549 Body := CustomStringReplace(Body, '<br>', #10,true);
7550 Body := CustomStringReplace(Body, '</a>', '',true);
7551 Body := GikoSys.DeleteLink(Body);
7552 Body := CustomStringReplace(Body, '<', '<');
7553 Body := CustomStringReplace(Body, '>', '>');
7554 Body := CustomStringReplace(Body, '"', '"');
7555 Body := CustomStringReplace(Body, '&', '&');
7556 Body := CustomStringReplace(Body, ' ', ' ');
7557 FHint.Add(Header, Body);
7558 //FHint.Title := ''; //
\82½
\82Ô
\82ñ
\82±
\82ê
\82Í
\82¢
\82ç
\82È
\82¢
\82ñ
\82¾
\82¯
\82Ç
\82Ë
\81B
\82à
\82¶
\82ã
\82â
\82Á
\82Ï
\82è
\82¢
\82ç
\82È
\82©
\82Á
\82½
\81i2004/01/13
\81j
7567 procedure TGikoForm.ShowTextPopup;
7572 // if Trim(s) = '' then
7575 FHint.Font.Name := GikoSys.Setting.HintFontName;
7576 FHint.Font.Size := GikoSys.Setting.HintFontSize;
7577 FHint.Font.Color := GikoSys.Setting.HintFontColor;
7578 FHint.Color := GikoSys.Setting.HintBackColor;
7579 FHint.HeaderBold := GikoSys.Setting.ResPopupHeaderBold;
7581 if FHint.PopupType = gptRaw then
7582 ARect := FHint.CalcHintRect(Screen.Width, FHint.Caption, nil)
7584 ARect := FHint.CalcHintRect(Screen.Width, '', nil);
7585 case GikoSys.Setting.PopupPosition of
7586 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7587 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7588 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
7589 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
7590 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
7591 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
7592 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7593 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7594 gppLeftBottom: OffsetRect(ARect, p.x + 15, p.y + 15); //
\83M
\83R
\83i
\83r
\83X
\83\8c \83p
\81[
\83g
\82P
\82Ì453
\8e\81\82É
\8a´
\8eÓ
7596 //FHint.ActivateHint(ARect, s);
7597 if FHint.PopupType = gptRaw then
7598 FHint.ActivateHint(ARect, FHint.Caption)
7600 FHint.ActivateHint(ARect, '');
7602 FHint.ReleaseHandle;
7607 procedure TGikoForm.GikoHelpActionExecute(Sender: TObject);
7611 FileName := GikoSys.GetAppDir + 'batahlp.chm';
7612 if not FileExists(FileName) then begin
7615 '
\83w
\83\8b\83v
\82ª
\8c©
\82Â
\82©
\82è
\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½' + #13#10 +
7616 '
\83w
\83\8b\83v
\83t
\83@
\83C
\83\8b\82ð
\83M
\83R
\83i
\83r
\82Ì
\83t
\83H
\83\8b\83_
\82É
\92u
\82¢
\82Ä
\82
\82¾
\82³
\82¢' + #13#10 +
7617 '
\83w
\83\8b\83v
\82Í
\83M
\83R
\83i
\83r
\82Ì
\83T
\83C
\83g
\82É
\92u
\82¢
\82Ä
\82 \82è
\82Ü
\82·',
7622 ShellExecute(Handle, 'open', PChar(FileName), '', PChar(GikoSys.GetAppDir), SW_SHOW);
7625 procedure TGikoForm.ToolButton18Click(Sender: TObject);
7627 if FTreeType = gttHistory then begin
7630 TreeView.Items.Clear;
7634 procedure TGikoForm.KotehanActionExecute(Sender: TObject);
7636 Dlg: TKotehanDialog;
7638 Dlg := TKotehanDialog.Create(Self);
7646 procedure TGikoForm.SetLinkBar;
7650 ToolButton: TLinkToolButton;
7651 MenuItem: TMenuItem;
7652 oldIgnoreResize : Boolean;
7654 oldIgnoreResize := FIsIgnoreResize;
7655 FIsIgnoreResize := True;
7656 MainCoolBar.Bands.BeginUpdate;
7658 LinkBarPopupMenu.Items.Clear;
7659 for i := LinkToolBar.ButtonCount - 1 downto 0 do
7660 //LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
7661 LinkToolBar.Buttons[i].Free;
7662 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
7663 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
7664 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
7665 ToolButton := TLinkToolButton.Create(LinkToolBar);
7666 // ToolButton.Parent := LinkToolBar;
7667 if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteFolder then begin
7668 MenuItem := TMenuItem.Create(Self);
7669 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
7670 LinkBarPopupMenu.Items.Add(MenuItem);
7671 ToolButton.MenuItem := MenuItem;
7672 ToolButton.ImageIndex := TOOL_ICON_FAV_FOLDER;
7673 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
7674 ToolButton.ImageIndex := TOOL_ICON_FAV_BOARD;
7675 ToolButton.OnClick := FavoriteClick;
7676 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
7677 ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
7678 ToolButton.OnClick := FavoriteClick;
7680 ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
7681 ToolButton.Left := 10000;
7682 ToolButton.Data := FavoriteTreeView.Items[i].Item[j].Data;
7683 ToolButton.AutoSize := True;
7684 ToolButton.OnDragDrop := LinkToolButtonDragDrop;
7685 ToolButton.OnDragOver := FavoriteDragOver;
7686 ToolButton.OnMouseDown := LinkToolButtonOnMouseDown;
7687 ToolButton.OnMouseMove := LinkToolButtonOnMouseMove;
7688 ToolButton.OnMouseUp := LinkToolButtonOnMouseUp;
7689 ToolButton.OnStartDrag := LinkToolButtonStartDrag;
7690 //ToolButton.DragMode := dmAutomatic;
7691 ToolButton.DragMode := dmManual;
7692 ToolButton.PopupMenu := FavoriteTreePopupMenu;
7694 LinkToolBar.InsertControl(ToolButton);
7699 { if LinkToolBar.ButtonCount = 0 then begin
7700 ToolButton := TLinkToolButton.Create(LinkToolBar);
7701 ToolButton.Style := tbsButton;
7702 ToolButton.ImageIndex := -1;
7703 ToolButton.Caption := '';
7704 LinkToolBar.InsertControl(ToolButton);
7707 MainCoolBar.Bands.EndUpdate;
7708 LoadCoolBarSettings;
7709 FIsIgnoreResize := oldIgnoreResize;
7713 procedure TGikoForm.FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
7721 if Sender = FavoriteTreeView then begin
7722 Node := FavoriteTreeView.GetNodeAt(X, Y);
7727 bound := Node.DisplayRect( False );
7728 height := bound.Bottom - bound.Top;
7729 if (bound.Top + height / 2) <= Y then
7730 Node := FavoriteTreeView.GetNodeAt(X, Y + height);
7735 if Node.IsFirstNode then
7740 if FDropSpaceNode <> nil then
7741 if FDropSpaceNode.AbsoluteIndex = Node.AbsoluteIndex then
7744 if Change then begin
7745 if FDropSpaceNode <> nil then
7746 FDropSpaceNode.Free;
7748 FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil );
7749 FDropSpaceNode.MoveTo( Node, naInsert );
7750 FDropSpaceNode.ImageIndex := -1;
7751 FDropSpaceNode.SelectedIndex := -1;
7755 if Source = FavoriteTreeView then begin
7756 if FavoriteTreeView.Selected = FavoriteTreeView.Items.GetFirstNode then begin
7761 end else if Source = BrowserTab then
7763 else if Source = ListView then
7765 else if Source is TLinkToolButton then
7767 else if Source = TreeView then
7773 procedure TGikoForm.FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
7776 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
7779 procedure TGikoForm.LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
7781 // FDragging := true;
7784 procedure TGikoForm.LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
7786 SenderNode: TTreeNode;
7787 LinkToolButton: TLinkToolButton;
7790 LinkToolButton := TLinkToolButton( Sender );
7791 SenderNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data );
7793 FavoriteDragDrop( SenderNode, Source );
7797 procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7799 favButton : TLinkToolButton;
7800 favThreadItem : TFavoriteThreadItem;
7806 if Sender is TLinkToolButton then begin
7807 favButton := TLinkToolButton( Sender );
7808 if TObject( favButton.Data ) is TFavoriteThreadItem then begin
7809 favThreadItem := TFavoriteThreadItem( favButton.Data );
7810 if favThreadItem.Item <> nil then
7811 InsertBrowserTab( favThreadItem.Item, False );
7819 procedure TGikoForm.LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
7823 TToolButton( Sender ).DragMode := dmManual;
7824 if ssLeft in Shift then begin
7825 // TToolButton( Sender ).Down := true; //
\83\8a\83\93\83N
\83c
\81[
\83\8b\83o
\81[
\82Ì
\8b\93\93®
\95s
\90R
\82Ì
\8c´
\88ö
\82Ì
\82æ
\82¤
\82È
\82Ì
\82Å
\83R
\83\81\83\93\83g
\83A
\83E
\83g
\82µ
\82½(2003-dec-02)
7826 if FDragTime = 0 then begin
7827 FDragTime := GetTickCount();
7829 Now := GetTickCount();
7830 if (Now - FDragTime) > 500 then begin
7831 if FDragButton <> TToolButton( Sender ) then begin
7833 FDragButton := TToolButton( Sender );
7834 TToolButton(Sender).BeginDrag(false ,5);
7837 {$IF Defined(debug)}
7838 ShowMessage('Error');
7849 procedure TGikoForm.LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7854 function TGikoForm.GetWidthAllToolButton(ToolBar: TToolBar): Integer;
7859 for i := 0 to ToolBar.ButtonCount - 1 do
7860 Result := Result + ToolBar.Buttons[i].Width;
7863 procedure TGikoForm.MainCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7865 Control : TWinControl;
7868 Control := FindControl(BandInfo^.hwndChild);
7869 if Control = nil then
7872 for i := MainCoolBar.Bands.Count - 1 downto 0 do begin
7873 if MainCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
7874 idx := MainCoolBar.Bands[ i ].ID;
7878 Canvas.Font.Handle := GetStockObject( DEFAULT_GUI_FONT );
7879 if (Control = MenuToolBar) or (Control = StdToolBar) then begin
7880 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
7881 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7882 BandInfo^.cxMinChild := 0;
7883 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth;
7884 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7885 end else if Control = LinkToolBar then begin
7886 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
7887 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7888 BandInfo^.cxMinChild := 0;
7889 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83\8a\83\93\83N' );
7890 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7891 end else begin // AddressToolBar
7892 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
7893 BandInfo^.cxMinChild := 0;
7894 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83A
\83h
\83\8c\83X' );
7898 procedure TGikoForm.MainCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
7904 ChevronPopupMenu.Items.Clear;
7906 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
7907 if MainCoolBar.Bands[ i ].Visible then begin
7908 if Idx = Int64(RebarChevron^.uBand) then begin
7915 if (Idx >= 0) and (MainCoolBar.Bands.Count > Idx) then begin
7916 if MainCoolBar.Bands[Idx].Control = MenuToolbar then begin
7918 end else if MainCoolBar.Bands[Idx].Control = StdToolbar then begin
7919 ToolBarChevronMenu(StdToolBar);
7920 end else if MainCoolBar.Bands[Idx].Control = LinkToolbar then begin
7924 p := MainCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
7925 ChevronPopupMenu.Popup(p.x, p.y);
7929 procedure TGikoForm.MenuBarChevronMenu;
7930 procedure SetSubMenu(MenuItem: TMenuItem; PopupItem: TMenuItem);
7936 for i := 0 to MenuItem.Count - 1 do begin
7938 if MenuItem[i] is TFavoriteMenuItem then begin
7939 Item := TFavoriteMenuItem.Create(Self);
7940 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(MenuItem[i]).Data;
7942 Item := TMenuItem.Create(Self);
7943 Item.Caption := MenuItem[i].Caption;
7944 Item.Action := MenuItem[i].Action;
7945 Item.ImageIndex := MenuItem[i].ImageIndex;
7946 Item.OnClick := MenuItem[i].OnClick;
7947 PopupItem.Add(Item);
7948 if MenuItem[i].Count > 0 then
7949 SetSubMenu(MenuItem[i], Item);
7958 ChevronPopupMenu.Items.Clear;
7959 ChevronPopupMenu.Images := MainMenu.Images;
7960 bw := GetWidthAllToolButton(MenuToolBar);
7961 if MenuToolBar.Width < bw then begin
7963 for i := 0 to MenuToolBar.ButtonCount - 1 do begin
7964 w := w + MenuToolBar.Buttons[i].Width;
7965 if MenuToolBar.Width <= w then begin
7966 Item := TMenuItem.Create(Self);
7967 Item.Caption := MenuToolBar.Buttons[i].MenuItem.Caption;
7968 //Item.Action := MenuToolBar.Buttons[i].MenuItem.Action;
7969 ChevronPopupMenu.Items.Add(Item);
7970 SetSubMenu(MenuToolbar.Buttons[i].MenuItem, Item);
7976 procedure TGikoForm.ToolBarChevronMenu(ToolBar: TToolBar);
7977 procedure SetSubMenu(PopupMenu: TPopupMenu; PopupItem: TMenuItem);
7982 if Assigned(PopupMenu.OnPopup) then
7983 PopupMenu.OnPopup(nil);
7984 for i := 0 to PopupMenu.Items.Count - 1 do begin
7986 if PopupMenu.Items[i] is TFavoriteMenuItem then begin
7987 Item := TFavoriteMenuItem.Create(Self);
7988 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(PopupMenu.Items[i]).Data;
7990 Item := TMenuItem.Create(Self);
7991 Item.Caption := PopupMenu.Items[i].Caption;
7992 Item.Action := PopupMenu.Items[i].Action;
7993 Item.ImageIndex := PopupMenu.Items[i].ImageIndex;
7994 Item.OnClick := PopupMenu.Items[i].OnClick;
7995 PopupItem.Add(Item);
8004 ChevronPopupMenu.Items.Clear;
8005 ChevronPopupMenu.Images := ToolBar.HotImages;
8006 bw := GetWidthAllToolButton(ToolBar);
8007 if ToolBar.Width < bw then begin
8009 for i := 0 to ToolBar.ButtonCount - 1 do begin
8010 w := w + ToolBar.Buttons[i].Width;
8011 if ToolBar.Width <= w then begin
8012 Case ToolBar.Buttons[i].Tag of
8015 Item := TMenuItem.Create(Self);
8016 if ToolBar.Buttons[i].Style = tbsSeparator then
8019 Item.Caption := ToolBar.Buttons[i].Caption;
8020 Item.Action := ToolBar.Buttons[i].Action;
8021 //Item.Visible := True;
8023 ChevronPopupMenu.Items.Add(Item);
8024 if ToolBar.Buttons[i].DropdownMenu <> nil then begin
8026 Item.OnClick := nil;
8027 SetSubMenu(ToolBar.Buttons[i].DropdownMenu, Item);
8031 //
\8f«
\97\88\82Ì
\82½
\82ß
\82Ì
\97\
\96ñ
8038 procedure TGikoForm.LinkBarChevronMenu;
8043 Item: TFavoriteMenuItem;
8045 Button: TLinkToolButton;
8047 ChevronPopupMenu.Items.Clear;
8048 ChevronPopupMenu.Images := LinkToolBar.Images;
8049 bw := GetWidthAllToolButton(LinkToolBar);
8050 if LinkToolBar.Width < bw then begin
8052 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
8053 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
8054 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
8055 w := w + LinkToolBar.Buttons[j].Width;
8056 if LinkToolBar.Width <= w then begin
8057 if LinkToolBar.Buttons[j] is TLinkToolButton then begin
8058 Button := TLinkToolButton(LinkToolBar.Buttons[j]);
8059 Item := TFavoriteMenuItem.Create(Self);
8060 if TObject(Button.Data) is TFavoriteFolder then begin
8061 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], Item);
8062 end else if TObject(Button.Data) is TFavoriteBoardItem then begin
8063 Item.OnClick := FavoriteClick;
8064 end else if TObject(Button.Data) is TFavoriteThreadItem then begin
8065 Item.OnClick := FavoriteClick;
8067 Item.Data := Button.Data;
8068 Item.Caption := LinkToolBar.Buttons[j].Caption;
8069 Item.ImageIndex := LinkToolBar.Buttons[j].ImageIndex;
8070 ChevronPopupMenu.Items.Add(Item);
8080 procedure TGikoForm.ListCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8082 Control: TWinControl;
8085 Control := FindControl(BandInfo^.hwndChild);
8086 if Control = nil then
8089 for i := ListCoolBar.Bands.Count - 1 downto 0 do begin
8090 if ListCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8091 idx := ListCoolBar.Bands[ i ].ID;
8095 if Control = ListToolBar then begin
8096 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8097 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8098 BandInfo^.cxMinChild := 0;
8099 BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
8100 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8102 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8103 BandInfo^.cxMinChild := 0;
8104 BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
8108 procedure TGikoForm.ListCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8113 ChevronPopupMenu.Items.Clear;
8114 Idx := RebarChevron^.uBand;
8115 if (Idx >= 0) and (ListCoolBar.Bands.Count > Idx) then begin
8116 if ListCoolBar.Bands[Idx].Control = ListToolBar then begin
8117 ToolBarChevronMenu(ListToolBar);
8120 p := ListCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8121 ChevronPopupMenu.Popup(p.x, p.y);
8125 procedure TGikoForm.BrowserCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8127 Control: TWinControl;
8130 Control := FindControl(BandInfo^.hwndChild);
8131 if Control = nil then
8134 for i := BrowserCoolBar.Bands.Count - 1 downto 0 do begin
8135 if BrowserCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8136 idx := BrowserCoolBar.Bands[ i ].ID;
8140 if Control = BrowserToolBar then begin
8141 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8142 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8143 BandInfo^.cxMinChild := 0;
8144 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
8145 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8147 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8148 BandInfo^.cxMinChild := 0;
8149 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
8153 procedure TGikoForm.BrowserCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8158 ChevronPopupMenu.Items.Clear;
8159 Idx := RebarChevron^.uBand;
8160 if (Idx >= 0) and (BrowserCoolBar.Bands.Count > Idx) then begin
8161 if BrowserCoolBar.Bands[Idx].Control = BrowserToolBar then
8162 ToolBarChevronMenu(BrowserToolBar)
8165 p := BrowserCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8166 ChevronPopupMenu.Popup(p.x, p.y);
8170 procedure TGikoForm.ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
8172 if Column^.iImage = -1 then begin
8173 Column^.mask := Column^.mask or LVCF_FMT;
8175 Column^.mask := Column^.mask or LVCF_FMT or LVCF_IMAGE;
8176 Column^.fmt := Column^.fmt or LVCFMT_IMAGE or LVCFMT_BITMAP_ON_RIGHT;
8180 procedure TGikoForm.ThreadEditorActionExecute(Sender: TObject);
8182 Editor: TEditorForm;
8184 if not (GetActiveList is TBoard) then
8186 Editor := TEditorForm.Create(Self);
8187 Editor.SetBoard(TBoard(GetActiveList));
8189 Editor.BodyEdit.SetFocus;
8192 procedure TGikoForm.ToolBarSettingActionExecute(Sender: TObject);
8194 Dlg: TToolBarSettingDialog;
8196 //Component: TComponent;
8198 Dlg := TToolBarSettingDialog.Create(Self, ActionList);
8200 Dlg.AddToolBar(StdToolBar, gttStandard);
8201 Dlg.AddToolBar(ListToolBar, gttList);
8202 Dlg.AddToolBar(BrowserToolBar, gttBrowser);
8203 case FToolBarSettingSender of
8204 tssMain: Dlg.ToolBarIndex := 0;
8205 tssList: Dlg.ToolBarIndex := 1;
8206 tssBrowser: Dlg.ToolBarIndex := 2;
8209 if ToolBarSettingAction.ActionComponent.GetParentComponent is TPopupMenu then begin
8210 Component := TPopupMenu( ToolBarSettingAction.ActionComponent.GetParentComponent ).PopupComponent;
8212 if Component = MainCoolBar then
8213 Dlg.ToolBarComboBox.ItemIndex := 0
8214 else if Component = ListCoolBar then
8215 Dlg.ToolBarComboBox.ItemIndex := 1
8216 else if Component = BrowserCoolBar then
8217 Dlg.ToolBarComboBox.ItemIndex := 2;
8220 if Dlg.ShowModal = mrOK then begin
8223 //
\8dÅ
\93K
\95\9d\82ð
\8dÄ
\90Ý
\92è
\82·
\82é
\82½
\82ß
\82É
\93K
\93\96\82È
\83v
\83\8d\83p
\83e
\83B
\82ð
\82¢
\82¶
\82
\82é
8224 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
8225 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth + 1;
8226 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth - 1;
8228 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
8229 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth + 1;
8230 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth - 1;
8232 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
8233 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth + 1;
8234 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth - 1;
8236 SaveToolBarSetting(StdToolBar);
8237 SaveToolBarSetting(ListToolBar);
8238 for i := ListToolBar.ControlCount - 1 downto 0 do
8240 if ListToolBar.Controls[ i ].Action = SelectItemAction then
8242 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\82Ì
\97×
\82É
\83Z
\83p
\83\8c\81[
\83^
\82ª
\82 \82é
\8fê
\8d\87\82Í
\89B
\82·
8243 if (i + 1) < ListToolBar.ControlCount then
8244 if ListToolBar.Controls[ i + 1 ] is TToolButton then
8245 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
8246 ListToolBar.Controls[ i + 1 ].Visible := False;
8248 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
8249 ListToolBar.Controls[ i ].Visible := False;
8250 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
8251 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
8252 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
8253 SelectComboBox.Parent := ListToolBar;
8254 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
8255 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
8256 SelectComboBoxSplitter.Parent := ListToolBar;
8261 SaveToolBarSetting(BrowserToolBar);
8265 FToolBarSettingSender := tssNone;
8269 function TGikoForm.FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
8274 for i := bar.ButtonCount - 1 downto 0 do begin
8275 if bar.Buttons[ i ].Action = action then begin
8276 Result := bar.Buttons[ i ];
8285 procedure TGikoForm.SetToolBarPopup;
8288 aIEButton : TToolButton;
8289 aCabinetBBSButton : TToolButton;
8291 for i := 0 to StdToolBar.ButtonCount - 1 do begin
8293 for i := 0 to ListToolBar.ButtonCount - 1 do begin
8294 if ListToolBar.Buttons[i].Action = IconStyle then
8295 ListToolBar.Buttons[i].DropdownMenu := ListIconPopupMenu;
8296 if ListToolBar.Buttons[i].Action = SelectReservAction then
8297 ListToolBar.Buttons[i].DropdownMenu := RoundNamePopupMenu;
8299 aIEButton := FindToolBarButton( BrowserToolBar, IEAction );
8300 if aIEButton <> nil then
8301 aIEButton.DropdownMenu := BrowserPopupMenu;
8302 aCabinetBBSButton := FindToolBarButton( StdToolBar, CabinetBBSAction );
8303 if aCabinetBBSButton <> nil then
8304 aCabinetBBSButton.DropdownMenu := BBSSelectPopupMenu;
8307 procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState;
8308 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
8317 Wnd := WindowFromPoint(MousePos);
8319 if WheelDelta > 0 then
8324 if (Wnd = BrowserTab.Handle) or
8325 (Wnd = BrowserTab.Parent.Handle) then begin
8326 BrowserTab.ScrollTabs(Delta);
8327 end else if Wnd = ListView.Handle then begin
8328 if ListView.ViewStyle = vsList then
8329 ListView.Scroll( Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE, 0 )
8331 ListView.Scroll( 0, Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE );
8338 procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
8340 if Length( SelectComboBox.Text ) = 0 then
8342 AllItemAction.Checked := True;
8343 LogItemAction.Checked := False;
8344 NewItemAction.Checked := False;
8346 //
\83`
\83\89\82Â
\82
\82Æ
\8c\99\82¾
\82©
\82ç
\81A
\88ê
\89\9e\89\9f\82µ
\82Ä
\82 \82é
\82Æ
\82«
\82¾
\82¯
\8f\88\97\9d\82·
\82é
8347 if AllItemAction.Checked then
8348 AllItemAction.Checked := False;
8349 if LogItemAction.Checked then
8350 LogItemAction.Checked := False;
8351 if NewItemAction.Checked then
8352 NewItemaction.Checked := False;
8355 if Length( SelectComboBox.Text ) = 0 then
8356 SetListViewType( gvtAll )
8358 SetListViewType( gvtUser, SelectComboBox.Text, false);
8361 procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
8362 Shift: TShiftState);
8365 if Key = VK_Return then
8368 end else if Length( SelectComboBox.Text ) = 0 then
8370 AllItemAction.Checked := True;
8371 LogItemAction.Checked := False;
8372 NewItemAction.Checked := False;
8374 //
\83`
\83\89\82Â
\82
\82Æ
\8c\99\82¾
\82©
\82ç
\81A
\88ê
\89\9e\89\9f\82µ
\82Ä
\82 \82é
\82Æ
\82«
\82¾
\82¯
\8f\88\97\9d\82·
\82é
8375 if AllItemAction.Checked then
8376 AllItemAction.Checked := False;
8377 if LogItemAction.Checked then
8378 LogItemAction.Checked := False;
8379 if NewItemAction.Checked then
8380 NewItemaction.Checked := False;
8385 procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
8390 if Length( SelectComboBox.Text ) = 0 then
8392 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
8393 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
8398 //
\8di
\82è
\8d\9e\82Ý
\8c\9f\8dõ
\82Ì
\97\9a\97ð
\8dX
\90V
8399 procedure TGikoForm.ModifySelectList;
8406 if SelectComboBox.Parent = nil then
8409 if Length( SelectComboBox.Text ) > 0 then
8411 oldText := SelectComboBox.Text;
8412 idx := GikoSys.Setting.SelectTextList.IndexOf( oldText );
8414 GikoSys.Setting.SelectTextList.Delete( idx );
8415 idx := SelectComboBox.Items.IndexOf( oldText );
8417 SelectComboBox.Items.Delete( idx );
8418 GikoSys.Setting.SelectTextList.Insert( 0, oldText );
8419 SelectComboBox.Items.Insert( 0, oldText );
8420 SelectComboBox.Text := oldText;
8427 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\95Ò
\8fW
\82·
\82é
\82½
\82ß
\82É
\8aJ
\82
8428 procedure TGikoForm.NG1Click(Sender: TObject);
8430 GikoSys.FAbon.EditNGwords;
8432 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\8dÄ
\93Ç
\82Ý
\8d\9e\82Ý
\82·
\82é
8433 procedure TGikoForm.SelectResActionExecute(Sender: TObject);
8435 Dlg: TListSelectDialog;
8436 ThreadItem : TThreadItem;
8437 FilterList : TStringList;
8440 Dlg := TListSelectDialog.Create(Self);
8442 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
8443 Dlg.SelectComboBox.Text := FSelectResWord;
8445 if Dlg.ModalResult = mrOK then begin
8446 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
8447 //
\8bó
\93ü
\97Í
\82Å OK
\82Í
\91S
\83\8c\83X
\95\
\8e¦
\82Æ
\93¯
\88Ó
\8b`
8448 AllResAction.Execute;
8450 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
8451 AllResAction.Checked := False;
8452 SelectResAction.Checked := True;
8454 //
\8dÅ
\8cã
\82É
\90Ý
\92è
\82µ
\82½
\82à
\82Ì
\82ð
\8ao
\82¦
\82Ä
\82¨
\82
8455 FSelectResWord := Dlg.SelectComboBox.Text;
8457 //
\8c\9f\8dõ
\97\9a\97ð
\82Ì
\8dX
\90V
8458 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
8460 GikoSys.Setting.SelectTextList.Delete(idx);
8461 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
8462 while Dlg.SelectComboBox.Items.Count > 100 do begin
8463 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
8467 if SelectComboBox.Parent <> nil then
8468 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
8472 //
\83t
\83B
\83\8b\83^
\82Ì
\90Ý
\92è
8473 FilterList := TStringList.Create;
8475 GikoSys.FSelectResFilter.Reverse := True;
8476 FilterList.Delimiter := ' '; //
\8bæ
\90Ø
\82è
\8eq
\82ð
\94¼
\8ap
\83X
\83y
\81[
\83X
\82É
\90Ý
\92è
8477 FilterList.DelimitedText := Dlg.SelectComboBox.Text;
8479 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8484 //
\83X
\83\8c\83b
\83h
\82Ì
\8dÄ
\95`
\89æ
8485 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
8486 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8488 ThreadItem := GetActiveContent;
8489 if ThreadItem <> nil then
8490 InsertBrowserTab( ThreadItem, True );
8492 end else if Length( FSelectResWord ) > 0 then begin
8493 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
8494 AllResAction.Checked := False;
8495 SelectResAction.Checked := True;
8503 procedure TGikoForm.SelectResActionUpdate(Sender: TObject);
8505 SelectResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
8508 procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;
8509 Shift: TShiftState);
8513 //
\91S
\82Ä
\82Ì
\83\8c\83X
\82ð
\95\
\8e¦
8514 procedure TGikoForm.AllResActionExecute(Sender: TObject);
8516 ThreadItem : TThreadItem;
8517 FilterList : TStringList;
8520 if(FActiveContent <> nil) and (FActiveContent.FBrowser <> nil )
8521 and (FActiveContent.FBrowser.Busy) then Exit;
8523 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
8524 AllResAction.Checked := True;
8525 SelectResAction.Checked := False;
8527 if Length( FSelectResWord ) > 0 then begin
8528 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
8529 FilterList := TStringList.Create;
8531 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8532 GikoSys.FSelectResFilter.Reverse := False;
8537 FSelectResWord := '';
8539 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
8540 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
8541 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8543 ThreadItem := GetActiveContent;
8544 if ThreadItem <> nil then
8545 InsertBrowserTab( ThreadItem, True );
8549 procedure TGikoForm.AllResActionUpdate(Sender: TObject);
8551 AllResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
8554 procedure TGikoForm.ReloadClick(Sender: TObject);
8556 ThreadItem : TThreadItem;
8559 if GikoSys.FAbon.ReLoadFromNGwordFile =false then begin
8560 MsgBox(Handle, 'NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82Ì
\8dÄ
\93Ç
\82Ý
\8d\9e\82Ý
\82É
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½', '
\83G
\83\89\81[', MB_OK or MB_ICONEXCLAMATION);
8562 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8563 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8565 ThreadItem := GetActiveContent;
8566 if ThreadItem <> nil then
8567 InsertBrowserTab( ThreadItem, True );
8572 procedure TGikoForm.GoBackClick(Sender: TObject);
8574 ThreadItem : TThreadItem;
8578 if GikoSys.FAbon.GoForward =false then begin
8579 MsgBox(Handle, '
\88ê
\82Â
\91O
\82ÌNG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82É
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½', '
\83G
\83\89\81[', MB_OK or MB_ICONEXCLAMATION);
8581 s := GikoSys.FAbon.NGwordname;
8582 StatusBar.Panels.Items[2].Text := s;
8583 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8584 StatusBarResize(Sender);
8585 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8586 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8588 ThreadItem := GetActiveContent;
8589 if ThreadItem <> nil then
8590 InsertBrowserTab( ThreadItem, True );
8595 procedure TGikoForm.GoFowardClick(Sender: TObject);
8597 ThreadItem : TThreadItem;
8601 if GikoSys.FAbon.GoBack =false then begin
8602 MsgBox(Handle, '
\88ê
\82Â
\8cã
\82ë
\82ÌNG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82É
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½', '
\83G
\83\89\81[', MB_OK or MB_ICONEXCLAMATION);
8604 s := GikoSys.FAbon.NGwordname;
8605 StatusBar.Panels.Items[2].Text := s;
8606 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8607 StatusBarResize(Sender);
8608 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8609 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8611 ThreadItem := GetActiveContent;
8612 if ThreadItem <> nil then
8613 InsertBrowserTab( ThreadItem, True );
8618 procedure TGikoForm.SelectComboBoxSplitterMouseMove(Sender: TObject;
8619 Shift: TShiftState; X, Y: Integer);
8624 If (SelectComboBox.Parent <> nil) and (IsDraggingSelectComboBox) Then begin
8627 pos := SelectComboBoxSplitter.ClientToScreen( pos );
8628 w := SelectComboBox.Width + (pos.X - DraggingSelectComboBoxPosition.X);
8630 If w <= 50 Then Begin
8631 //
\8e\9f\82Ì
\88Ú
\93®
\82Ì
\8aî
\8f\80\82ª
\81u
\89ß
\82¬
\82Ä
\82µ
\82Ü
\82Á
\82½
\88Ê
\92u
\81v
\82Å
\82Í
\82È
\82
8632 //
\81u
\8e~
\82Ü
\82Á
\82½(50pixel)
\88Ê
\92u
\81v
\82É
\82È
\82é
\82æ
\82¤
\82É
8633 pos.X := pos.X + (50 - w);
8635 //
\8f¬
\82³
\82
\82È
\82è
\82·
\82¬
\82È
\82¢
\82æ
\82¤
\82É
8639 //
\83`
\83\89\82Â
\82«
\8cy
\8c¸
\82Ì
\88×
8640 If SelectComboBox.Width <> w Then Begin
8641 SelectComboBox.Width := w;
8642 GikoSys.Setting.SelectComboBoxWidth := w;
8643 DraggingSelectComboBoxPosition := pos;
8648 procedure TGikoForm.SelectComboBoxSplitterMouseDown(Sender: TObject;
8649 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8653 IsDraggingSelectComboBox := True;
8656 DraggingSelectComboBoxPosition := SelectComboBoxSplitter.ClientToScreen( pos );
8659 procedure TGikoForm.SelectComboBoxSplitterMouseUp(Sender: TObject;
8660 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8662 IsDraggingSelectComboBox := False;
8665 procedure TGikoForm.StatusBarResize(Sender: TObject);
8667 StatusBar.Panels[1].Width := StatusBar.Width -
8668 StatusBar.Panels[0].Width -
8669 StatusBar.Panels[2].Width;
8671 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\92Ê
\8fí
\81v
8672 procedure TGikoForm.IndividualAbon1Click(Sender: TObject);
8674 ThreadItem : TThreadItem;
8677 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,1);
8678 ThreadItem := GetActiveContent;
8679 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8680 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8682 if ThreadItem <> nil then
8683 InsertBrowserTab( ThreadItem, True );
8685 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\93§
\96¾
\81v
8686 procedure TGikoForm.IndividualAbon2Click(Sender: TObject);
8688 ThreadItem : TThreadItem;
8691 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,0);
8692 ThreadItem := GetActiveContent;
8693 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8694 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8695 if ThreadItem <> nil then
8696 InsertBrowserTab( ThreadItem, True );
8698 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c\81i
\81j
8699 procedure TGikoForm.AntiIndividualAbonClick(Sender: TObject);
8701 ThreadItem : TThreadItem;
8705 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
8706 GikoSys.FAbon.DeleteIndividualAbon(KokoPopupMenu.Tag);
8707 ThreadItem := GetActiveContent;
8708 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8709 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8710 if ThreadItem <> nil then
8711 InsertBrowserTab( ThreadItem, True );
8713 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
8714 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
8717 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c
8718 procedure TGikoForm.N42Click(Sender: TObject);
8720 IndividualForm :TIndividualAbonForm;
8721 ThreadItem : TThreadItem;
8725 IndividualForm := TIndividualAbonForm.Create(Self);
8727 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
8728 for i :=0 to GikoSys.FAbon.GetAbonResCount-1 do begin
8729 IndividualForm.ComboBox1.Items.Add(GikoSys.FAbon.GetAbonResString(i));
8731 if IndividualForm.ShowModal = mrOK then begin
8732 GikoSys.FAbon.DeleteIndividualAbon(IndividualForm.ResNumber);
8734 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8735 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8736 ThreadItem := GetActiveContent;
8737 if ThreadItem <> nil then
8738 InsertBrowserTab( ThreadItem, True );
8740 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
8741 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
8744 IndividualForm.Free;
8748 procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
8751 if (Length( SelectComboBox.Text ) = 0) or
8752 (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
8754 SelectComboBox.Text := '';
8755 SelectComboBox.Color := clWindow;
8760 procedure TGikoForm.N51Click(Sender: TObject);
8764 //
\94Â
\96¼
\8c\9f\8dõ
8765 procedure TGikoForm.TreeSelectSearchBoardNameExecute(Sender: TObject);
8769 CurItem : TTreeNode;
8772 if InputQuery('
\94Â
\96¼
\8c\9f\8dõ','
\94Â
\96¼
\82Ì
\93ü
\97Í',s) then begin
8775 if TreeView.Selected = nil then
8776 CurItem := TreeView.Items.GetFirstNode
8778 CurItem := TreeView.Selected.GetNext;
8779 if CurItem = nil then
8780 CurItem := TreeView.Items.GetFirstNode;
8782 while CurItem <> nil do begin
8783 if (CurItem.ImageIndex <> 2) and (VaguePos(s,CurItem.Text) <> 0) then begin
8786 CurItem := CurItem.GetNext;
8789 if CurItem = nil then begin
8790 msg := '
\90æ
\93ª
\82É
\96ß
\82è
\82Ü
\82·
\82©
\81H';
8791 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
8792 CurItem := TreeView.Items.GetFirstNode;
8796 TreeView.Select(CurItem);
8799 TreeView.Select(CurItem);
8801 msg := '
\8e\9f\82É
\8ds
\82«
\82Ü
\82·
\82©
\81H';
8802 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
8816 procedure TGikoForm.CabinetFavoriteActionExecute(Sender: TObject);
8822 if CabinetPanel.Visible then begin
8823 if FTreeType = gttFavorite then begin
8824 CabinetVisible( False );
8825 CabinetFavoriteAction.Checked := False;
8827 CabinetFavoriteAction.Checked := True;
8830 CabinetVisible( True );
8831 CabinetFavoriteAction.Checked := True;
8834 // BBS...BBS, History, Favorite
8835 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 1;
8837 b := CabinetSelectPopupMenu.Items.Count - 1;
8838 for i := 0 to b do begin
8839 item := CabinetSelectPopupMenu.Items[ i ];
8840 if item is TBBSMenuItem then begin
8841 item.Checked := False;
8842 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
8843 CabinetMenu.Items[ i ].Checked := False;
8847 //
\83L
\83\83\83r
\83l
\83b
\83g
\83c
\81[
\83\8b\83o
\81[
\8by
\82Ñ
\83L
\83\83\83r
\83l
\83b
\83g
\82Ì
\95\
\8e¦
\90Ø
\91Ö
8848 HistoryToolBar.Hide;
8849 FavoriteToolBar.Show;
8850 TreeView.Visible := False;
8851 FavoriteTreeView.Visible := True;
8853 CabinetSelectToolButton.Caption := '
\82¨
\8bC
\82É
\93ü
\82è';
8854 FTreeType := gttFavorite;
8856 //
\83\81\83j
\83\85\81[
\8by
\82Ñ
\83{
\83^
\83\93\82Ì
\83`
\83F
\83b
\83N
\82ð
\90Ý
\92è
8857 CabinetBBSAction.Checked := False;
8858 CabinetHistoryAction.Checked := False;
8860 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\83c
\83\8a\81[
\82ð
\93W
\8aJ
8861 FavoriteTreeView.Items.GetFirstNode.Expanded := True;
8865 procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
8868 if (SenderNode = nil) or (SourceNode = nil) or (SenderNode = SourceNode) then
8871 if TObject(SenderNode.Data) is TFavoriteFolder then
8872 SourceNode.MoveTo(SenderNode, naAddChild)
8874 SourceNode.MoveTo(SenderNode, naInsert);
8878 procedure TGikoForm.FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
8882 FavoBoardItem: TFavoriteBoardItem;
8883 FavoThreadItem: TFavoriteThreadItem;
8885 ThreadItem: TThreadItem;
8888 if (SenderNode = nil) or (Source = nil) then
8891 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
8892 FavNode := SenderNode.Parent
8894 FavNode := SenderNode;
8898 if Source is TBoard then begin
8899 Board := TBoard( Source );
8900 FavoBoardItem := TFavoriteBoardItem.CreateWithItem( Board );
8901 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, FavoBoardItem);
8902 Node.ImageIndex := 15;
8903 Node.SelectedIndex := 15;
8904 end else if Source is TFavoriteBoardItem then begin
8905 FavoBoardItem := TFavoriteBoardItem( Source );
8906 Board := FavoBoardItem.Item;
8907 if Board <> nil then
8908 if not Board.IsThreadDatRead then
8909 GikoSys.ReadSubjectFile(Board);
8910 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, Source);
8911 Node.ImageIndex := 15;
8912 Node.SelectedIndex := 15;
8913 end else if Source is TThreadItem then begin
8914 ThreadItem := TThreadItem( Source );
8915 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
8916 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
8917 Node.ImageIndex := 16;
8918 Node.SelectedIndex := 16;
8919 end else if Source is TBrowserRecord then begin
8920 ThreadItem := TBrowserRecord( Source ).FThread;
8921 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
8922 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
8923 Node.ImageIndex := 16;
8924 Node.SelectedIndex := 16;
8925 end else if Source is TFavoriteThreadItem then begin
8926 FavoThreadItem := TFavoriteThreadItem( Source );
8927 ThreadItem := FavoThreadItem.Item;
8928 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, Source);
8929 Node.ImageIndex := 16;
8930 Node.SelectedIndex := 16;
8933 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
8935 FavoriteMoveTo( SenderNode, Node );
8939 procedure TGikoForm.FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
8942 SourceNode: TTreeNode;
8943 LinkToolButton: TLinkToolButton;
8946 if SenderNode = nil then
8949 if not (TObject( SenderNode.Data ) is TFavoriteFolder) then
8950 if FDropSpaceNode <> nil then
8951 SenderNode := FDropSpaceNode;
8953 if Source = FavoriteTreeView then begin
8955 SourceNode := FavoriteTreeView.Selected;
8956 FavoriteMoveTo( SenderNode, SourceNode );
8958 end else if Source is TLinkToolButton then begin
8960 LinkToolButton := TLinkToolButton( Source );
8961 //ShowMessage(LinkToolButton.Text);
8962 SourceNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data );
8963 FavoriteMoveTo( SenderNode, SourceNode );
8965 end else if Source = BrowserTab then begin
8967 idx := BrowserTab.TabIndex;
8968 FavoriteAddTo( SenderNode, BrowserTab.Tabs.Objects[idx] );
8969 end else if Source = ListView then begin
8971 FavoriteAddTo( SenderNode, ListView.Selected.Data );
8973 end else if Source = TreeView then begin
8975 FavoriteAddTo( SenderNode, TreeView.Selected.Data );
8983 procedure TGikoForm.FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
8986 SenderNode: TTreeNode;
8989 SenderNode := FavoriteTreeView.GetNodeAt(X, Y);
8990 if SenderNode <> nil then begin
8991 FavoriteDragDrop( SenderNode, Source );
8994 if FDropSpaceNode <> nil then begin
8995 FDropSpaceNode.Free;
8996 FDropSpaceNode := nil;
9001 procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
9002 Node: TTreeNode; var S: String);
9005 FavoriteTreeView.ReadOnly := True;
9010 procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
9011 Shift: TShiftState);
9017 FClickNode := FavoriteTreeView.Selected;
9018 FavoriteTreeViewRenameActionExecute( Sender );
9022 FClickNode := FavoriteTreeView.Selected;
9023 FavoriteTreeViewDeleteActionExecute( Sender );
9027 FavoriteClick( FavoriteTreeView.Selected );
9028 FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
9031 FavoriteTreeViewDblClick( Sender );
9036 procedure TGikoForm.FavoriteTreePopupMenuPopup(Sender: TObject);
9039 LinkToolButton: TLinkToolButton;
9042 if FavoriteTreePopupMenu.PopupComponent = FavoriteTreeView then begin
9044 FClickNode := FavoriteTreeView.Selected;
9046 end else if FavoriteTreePopupMenu.PopupComponent is TLinkToolButton then begin
9048 LinkToolButton := TLinkToolButton( FavoriteTreePopupMenu.PopupComponent );
9049 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
9050 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
9051 FClickNode := FavoriteTreeView.Items[i];
9055 for i := 0 to FClickNode.Count - 1 do begin
9056 if FClickNode.Item[i].Data = LinkToolButton.Data then begin
9057 FClickNode := FClickNode.Item[i];
9064 if FClickNode = nil then begin
9065 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9066 FavoriteTreeDeletePopupMenu.Visible := False;
9067 FavoriteTreeRenamePopupMenu.Visible := False;
9068 FavoriteTreeNewFolderPopupMenu.Visible := False;
9069 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9070 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9071 FavoriteTreeURLCopyPopupMenu.Visible := False;
9072 FavoriteTreeNameCopyPopupMenu.Visible := False;
9073 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9074 FavoriteTreeReloadPopupMenu.Visible := False;
9075 FavoriteTreeLogDeletePopupMenu.Visible := False;
9076 end else if FClickNode.IsFirstNode then begin
9077 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9078 FavoriteTreeDeletePopupMenu.Visible := False;
9079 FavoriteTreeRenamePopupMenu.Visible := False;
9080 FavoriteTreeNewFolderPopupMenu.Visible := True;
9081 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9082 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9083 FavoriteTreeURLCopyPopupMenu.Visible := False;
9084 FavoriteTreeNameCopyPopupMenu.Visible := True;
9085 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9086 FavoriteTreeReloadPopupMenu.Visible := False;
9087 FavoriteTreeLogDeletePopupMenu.Visible := False;
9088 end else if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
9089 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9090 FavoriteTreeDeletePopupMenu.Visible := True;
9091 FavoriteTreeRenamePopupMenu.Visible := False;
9092 FavoriteTreeNewFolderPopupMenu.Visible := True;
9093 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9094 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9095 FavoriteTreeURLCopyPopupMenu.Visible := False;
9096 FavoriteTreeNameCopyPopupMenu.Visible := True;
9097 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9098 FavoriteTreeReloadPopupMenu.Visible := False;
9099 FavoriteTreeLogDeletePopupMenu.Visible := False;
9100 end else if TObject(FClickNode.Data) is TFavoriteFolder then begin
9101 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9102 FavoriteTreeDeletePopupMenu.Visible := True;
9103 FavoriteTreeRenamePopupMenu.Visible := True;
9104 FavoriteTreeNewFolderPopupMenu.Visible := True;
9105 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9106 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9107 FavoriteTreeURLCopyPopupMenu.Visible := False;
9108 FavoriteTreeNameCopyPopupMenu.Visible := True;
9109 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9110 FavoriteTreeReloadPopupMenu.Visible := False;
9111 FavoriteTreeLogDeletePopupMenu.Visible := False;
9112 end else if TObject(FClickNode.Data) is TFavoriteThreadItem then begin
9113 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9114 FavoriteTreeDeletePopupMenu.Visible := True;
9115 FavoriteTreeRenamePopupMenu.Visible := True;
9116 FavoriteTreeNewFolderPopupMenu.Visible := True;
9117 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
9118 //FavoriteTreeBrowseThreadPopupMenu.Visible := True;
9119 FavoriteTreeURLCopyPopupMenu.Visible := True;
9120 FavoriteTreeNameCopyPopupMenu.Visible := True;
9121 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
9122 FavoriteTreeReloadPopupMenu.Visible := True;
9123 FavoriteTreeLogDeletePopupMenu.Visible := True;
9124 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
9125 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9126 FavoriteTreeDeletePopupMenu.Visible := True;
9127 FavoriteTreeRenamePopupMenu.Visible := True;
9128 FavoriteTreeNewFolderPopupMenu.Visible := True;
9129 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
9130 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9131 FavoriteTreeURLCopyPopupMenu.Visible := True;
9132 FavoriteTreeNameCopyPopupMenu.Visible := True;
9133 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
9134 FavoriteTreeReloadPopupMenu.Visible := True;
9135 FavoriteTreeLogDeletePopupMenu.Visible := False;
9137 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9138 FavoriteTreeDeletePopupMenu.Visible := False;
9139 FavoriteTreeRenamePopupMenu.Visible := False;
9140 FavoriteTreeNewFolderPopupMenu.Visible := False;
9141 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9142 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9143 FavoriteTreeURLCopyPopupMenu.Visible := False;
9144 FavoriteTreeNameCopyPopupMenu.Visible := False;
9145 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9146 FavoriteTreeReloadPopupMenu.Visible := False;
9147 FavoriteTreeLogDeletePopupMenu.Visible := False;
9152 procedure TGikoForm.FavoriteTreeViewDeleteActionExecute(Sender: TObject);
9154 DEL_LINK_MSG = '
\81g
\83\8a\83\93\83N
\81h
\82Í
\83\8a\83\93\83N
\83o
\81[
\97p
\83t
\83H
\83\8b\83_
\82Å
\82·
\81B
\8dí
\8f\9c\82µ
\82Ä
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
9155 DEL_MSG = '
\81g^0
\81h
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
9156 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
9159 if FClickNode = nil then
9161 if FClickNode.IsFirstNode then
9163 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
9164 if MsgBox(Handle, DEL_LINK_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION) <> ID_YES then
9166 end else if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
9167 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONQUESTION) <> ID_YES then
9171 //FDeleteList.Add(FClickNode.Data);
9172 //SetDeleteItemList(FClickNode);
9180 procedure TGikoForm.FavoriteTreeViewRenameActionExecute(Sender: TObject);
9185 if FClickNode = nil then
9187 if FClickNode.IsFirstNode then
9189 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then
9191 FavoriteTreeView.ReadOnly := False;
9192 if (FTreeType = gttFavorite) and (CabinetPanel.Visible) then begin
9193 node := FClickNode.Parent;
9194 while node <> nil do begin
9195 node.Expanded := True;
9196 node := node.Parent;
9198 FClickNode.EditText;
9200 FClickNode.Text := InputBox( '
\96¼
\91O
\82Ì
\95Ï
\8dX', '
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\90V
\82µ
\82¢
\96¼
\91O
\82ð
\93ü
\97Í
\82µ
\82Ä
\82
\82¾
\82³
\82¢', FClickNode.Text );
9207 procedure TGikoForm.FavoriteTreeViewNewFolderActionExecute(
9210 NewFavFolder: TFavoriteFolder;
9214 if FClickNode = nil then
9218 if not (TObject(FClickNode.Data) is TFavoriteFolder) then begin
9219 FavoriteTreeView.Selected := FClickNode.Parent;
9220 FClickNode := FClickNode.Parent;
9223 NewFavFolder := TFavoriteFolder.Create;
9224 Node := FavoriteTreeView.Items.AddChildObject(FClickNode, '
\90V
\82µ
\82¢
\83t
\83H
\83\8b\83_', NewFavFolder);
9225 Node.ImageIndex := 14;
9226 Node.SelectedIndex := 14;
9227 // FClickNode.Selected.Expanded := True;
9228 FavoriteTreeView.Selected := Node;
9230 FavoriteTreeViewRenameAction.Execute;
9236 procedure TGikoForm.ToolButton19Click(Sender: TObject);
9239 FavoriteArrangeActionExecute( nil );
9243 procedure TGikoForm.FavoriteBrowseFolder( node: TTreeNode );
9248 if not (TObject(node.Data) is TFavoriteFolder) then
9251 for i := 0 to node.Count - 1 do
9253 if TObject(node.Item[i].Data) is TFavoriteFolder then
9254 FavoriteBrowseFolder( node.Item[i] )
9255 else if TObject(node.Item[i].Data) is TFavoriteThreadItem then
9256 FavoriteClick( node.Item[i], False );
9261 procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
9265 FavoriteBrowseFolder( FClickNode );
9266 //BrowserTab.OnChange(nil);
9270 procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
9273 FClickNode := FavoriteTreeView.Selected;
9274 FavoriteTreeViewReloadActionExecute( Sender );
9278 procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
9281 DEL_MSG = '
\83\8d\83O
\83t
\83@
\83C
\83\8b\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
9282 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
9284 ThreadItem: TThreadItem;
9285 FavThread: TFavoriteThreadItem;
9288 if FClickNode = nil then Exit;
9289 if not (TObject(FClickNode.Data) is TFavoriteThreadItem) then Exit;
9291 FavThread := TFavoriteThreadItem( FClickNode.Data );
9292 ThreadItem := FavThread.Item;
9295 if GikoSys.Setting.DeleteMsg then begin
9296 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
9300 DeleteHistory(ThreadItem);
9301 DeleteTab(ThreadItem);
9302 ThreadItem.DeleteLogFile;
9310 procedure TGikoForm.FavoriteTreeViewReloadActionExecute(Sender: TObject);
9312 ThreadItem: TThreadItem;
9313 FavThread: TFavoriteThreadItem;
9315 FavBoard: TFavoriteBoardItem;
9319 if FClickNode = nil then Exit;
9321 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
9323 if TObject( FClickNode.Data ) is TFavoriteThreadItem then begin
9324 FavThread := TFavoriteThreadItem( FClickNode.Data );
9325 ThreadItem := FavThread.Item;
9326 if ThreadItem <> nil then
9327 DownloadContent(ThreadItem, shiftDown);
9328 end else if TObject( FClickNode.Data ) is TFavoriteBoardItem then begin
9329 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9330 Board := FavBoard.Item;
9331 DownloadList(Board, shiftDown);
9336 procedure TGikoForm.FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
9338 FavThread : TFavoriteThreadItem;
9339 FavBoard : TFavoriteBoardItem;
9343 if FClickNode = nil then Exit;
9345 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9347 FavThread := TFavoriteThreadItem( FClickNode.Data );
9348 s := FavThread.URL + #13#10;
9350 Clipboard.AsText := s;
9352 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9354 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9355 s := FavBoard.URL + #13#10;
9357 Clipboard.AsText := s;
9363 procedure TGikoForm.FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
9365 ThreadItem: TThreadItem;
9366 FavThread: TFavoriteThreadItem;
9368 FavBoard: TFavoriteBoardItem;
9372 if FClickNode = nil then Exit;
9374 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9376 FavThread := TFavoriteThreadItem( FClickNode.Data );
9377 ThreadItem := FavThread.Item;
9380 s := ThreadItem.Title + #13#10;
9382 Clipboard.AsText := s;
9386 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9388 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9389 Board := FavBoard.Item;
9390 if Board <> nil then
9391 if not Board.IsThreadDatRead then
9392 GikoSys.ReadSubjectFile(Board);
9395 s := Board.Title + #13#10;
9397 Clipboard.AsText := s;
9405 procedure TGikoForm.FavoriteTreeViewNameURLCopyActionExecute(
9408 ThreadItem: TThreadItem;
9409 FavThread: TFavoriteThreadItem;
9411 FavBoard: TFavoriteBoardItem;
9415 if FClickNode = nil then Exit;
9417 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9419 FavThread := TFavoriteThreadItem( FClickNode.Data );
9420 ThreadItem := FavThread.Item;
9423 s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10;
9425 Clipboard.AsText := s;
9429 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9431 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9432 Board := FavBoard.Item;
9433 if Board <> nil then
9434 if not Board.IsThreadDatRead then
9435 GikoSys.ReadSubjectFile(Board);
9438 s := Board.URL + #13#10 + Board.Title + #13#10;
9440 Clipboard.AsText := s;
9448 function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
9454 for i := 0 to Node.Count - 1 do begin
9455 if Node.Item[i].Data = FindPointer then begin
9456 Result := Node.Item[i];
9458 end else if Node.Item[i].Count > 0 then begin
9459 Found := TreeNodeDataFind( Node.Item[i], FindPointer );
9460 if Found <> nil then begin
9471 procedure TGikoForm.LinkToolBarDragDrop(Sender, Source: TObject; X,
9475 SenderNode: TTreeNode;
9479 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
9480 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
9481 SenderNode := FavoriteTreeView.Items[i];
9486 FavoriteDragDrop( SenderNode, Source );
9490 procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
9491 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
9493 if FDragWFirst <> true then begin
9494 FDragWFirst := false;
9495 end else if (X = FMouseDownPos.X) and (Y = FMouseDownPos.Y) then begin
9496 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
9497 if GikoSys.Setting.ListWidthState = glsMin then begin
9498 BrowserMaxAndFocusAction.Execute;
9501 if GikoSys.Setting.ListHeightState = glsMin then begin
9502 BrowserMaxAndFocusAction.Execute;
9508 procedure TGikoForm.LinkToolBarDragOver(Sender, Source: TObject; X,
9509 Y: Integer; State: TDragState; var Accept: Boolean);
9512 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
9516 procedure TGikoForm.OnlyAHundredResExecute(Sender: TObject);
9518 if (FActiveContent <> nil) and (FActiveContent.FBrowser.Busy) then begin
9519 AHundredResButton.Down := not AHundredResButton.Down;
9522 GikoSys.OnlyAHundredRes := OnlyAHundredRes.Checked;
9523 if FActiveContent <> nil then begin
9524 SetContent(FActiveContent);
9528 procedure TGikoForm.FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
9532 if FDropSpaceNode <> nil then begin
9533 FDropSpaceNode.Free;
9534 FDropSpaceNode := nil;
9540 procedure TGikoForm.ListCoolBarContextPopup(Sender: TObject;
9541 MousePos: TPoint; var Handled: Boolean);
9544 FToolBarSettingSender := tssList;
9545 MousePos := ListCoolBar.ClientToScreen( MousePos );
9546 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9550 procedure TGikoForm.MainCoolBarContextPopup(Sender: TObject;
9551 MousePos: TPoint; var Handled: Boolean);
9554 FToolBarSettingSender := tssMain;
9555 MousePos := MainCoolBar.ClientToScreen( MousePos );
9556 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9560 procedure TGikoForm.BrowserCoolBarContextPopup(Sender: TObject;
9561 MousePos: TPoint; var Handled: Boolean);
9564 FToolBarSettingSender := tssBrowser;
9565 MousePos := BrowserCoolBar.ClientToScreen( MousePos );
9566 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9569 procedure TGikoForm.ExportFavoriteFileAccept(Sender: TObject);
9571 if FavoriteDM.SaveFavoriteFile( ExportFavoriteFile.Dialog.FileName ) Then begin
9572 ShowMessage('
\83t
\83@
\83C
\83\8b\82ð
\8fo
\97Í
\82µ
\82Ü
\82µ
\82½');
9574 ShowMessage('
\83t
\83@
\83C
\83\8b\82Ì
\8fo
\97Í
\82É
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½');
9577 procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
9579 if FListViewBackGroundColor <> value then begin
9580 FListViewBackGroundColor := value;
9581 ListView.Color := FListViewBackGroundColor;
9584 procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
9586 ExportFavoriteFile.Dialog.FileName := FavoriteDM.GetFavoriteFilePath;
9589 procedure TGikoForm.CabinetBBSActionExecute(Sender: TObject);
9592 if CabinetPanel.Visible then begin
9593 if FTreeType = gtt2ch then begin
9594 CabinetVisible( False );
9596 CabinetBBSAction.Checked := False;
9598 CabinetBBSAction.Checked := True;
9601 CabinetVisible( True );
9602 CabinetBBSAction.Checked := True;
9605 if FActiveBBS = nil then
9606 ShowBBSTree( BBSs[ 0 ] )
9608 ShowBBSTree( FActiveBBS );
9612 procedure TGikoForm.FavoriteTreeViewBrowseThreadActionExecute(
9615 threadItem : TThreadItem;
9618 if FClickNode = nil then Exit;
9620 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9622 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9623 if threadItem = nil then
9625 GikoSys.OpenBrowser( threadItem.URL, gbtAuto );
9631 procedure TGikoForm.FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
9633 threadItem : TThreadItem;
9637 if FClickNode = nil then Exit;
9639 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9641 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9642 if threadItem = nil then
9644 GikoSys.OpenBrowser( threadItem.ParentBoard.URL, gbtAuto );
9646 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9648 boardItem := TFavoriteBoardItem( FClickNode.Data ).Item;
9649 if boardItem = nil then
9651 GikoSys.OpenBrowser( boardItem.URL, gbtAuto );
9657 procedure TGikoForm.UpBoardActionExecute(Sender: TObject);
9660 SelectTreeNode( GetActiveContent.ParentBoard, True );
9664 procedure TGikoForm.UpBoardActionUpdate(Sender: TObject);
9667 UpBoardAction.Enabled := GetActiveContent <> nil;
9671 procedure TGikoForm.BrowserTabContextPopup(Sender: TObject;
9672 MousePos: TPoint; var Handled: Boolean);
9676 idx := BrowserTab.IndexOfTabAt(MousePos.X, MousePos.Y);
9677 if BrowserTab.TabIndex <> idx then begin
9678 BrowserTab.TabIndex := idx;
9679 BrowserTab.OnChange(nil);
9684 procedure TGikoForm.KoreCopyExecute(Sender: TObject);
9686 KonoresCopy(KokoPopupMenu.Tag, true);
9688 procedure TGikoForm.KonoresCopy(Number: Integer; ReplaceTag : Boolean);
9690 ThreadItem: TThreadItem;
9696 boardPlugIn : TBoardPlugIn;
9698 if Number = 0 then Exit;
9699 ThreadItem := GetActiveContent;
9701 if ThreadItem <> nil then begin
9702 if ThreadItem.IsBoardPlugInAvailable then begin
9703 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
9704 boardPlugIn := ThreadItem.BoardPlugIn;
9706 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
9707 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
9708 //
\82±
\82±
\82Å
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\82Ìdat
\82Ì
\8c`
\8e®
\82Å
\82P
\8ds
\93Ç
\82Ý
\8d\9e\82ß
\82ê
\82Î¥¥¥
\81B
9709 tmp := boardPlugIn.GetDat( DWORD( threadItem ), Number );
9711 FileName := ThreadItem.FilePath;
9712 tmp := GikoSys.ReadThreadFile(FileName, Number);
9714 if tmp <> '' then begin
9715 Res := GikoSys.DivideStrLine(tmp);
9717 Header := IntToStr(Number) + '
\81F' + Res.FName + '
\81F' + Res.FDateTime + #13#10;
9718 if ReplaceTag then begin
9719 Header := CustomStringReplace(Header, '</b>', '',true);
9720 Header := CustomStringReplace(Header, '<b>', '',true);
9723 //Body := CustomStringReplace(Res.FBody, '<br> ', #13#10,true);
9724 Body := CustomStringReplace(Res.FBody, '<br>', #13#10,true);
9725 Body := CustomStringReplace(Body, '<br>', #13#10,true);
9726 Body := CustomStringReplace(Body, '</a>', '',true);
9728 Body := GikoSys.DeleteLink(Body);
9729 if ReplaceTag then begin
9730 Body := CustomStringReplace(Body, '<', '<');
9731 Body := CustomStringReplace(Body, '>', '>');
9732 Body := CustomStringReplace(Body, '"', '"');
9733 Body := CustomStringReplace(Body, '&', '&');
9734 //Body := CustomStringReplace(Body, ' ', ' ');
9737 Header := Header + Body;
9739 Clipboard.SetTextBuf( PChar(Header) );
9745 procedure TGikoForm.BrowserTabPopupMenuPopup(Sender: TObject);
9747 AddRoundNameMenu(dummy1);
9750 procedure TGikoForm.FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
9752 FavoriteDM.URLReplace(oldURLs, newURLs);
9755 procedure TGikoForm.RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
9757 RoundList.URLReplace(oldURLs, newURLs);
9760 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82é
9761 procedure TGikoForm.OnMinimize;
9763 FIsMinimize := mtMinimizing;
9764 if FActiveContent <> nil then
9765 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
9766 PostMessage( Handle, USER_MINIMIZED, 0, 0 );
9769 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82½
9770 procedure TGikoForm.OnMinimized;
9772 FIsMinimize := mtMinimized;
9773 FIsIgnoreResize := False;
9776 procedure TGikoForm.CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
9781 affectedBand : TCoolBand;
9784 if (FOldFormWidth = Width) and not IsIconic( Handle ) and not FIsIgnoreResize then begin
9785 FIsIgnoreResize := True;
9786 PostMessage( Handle, USER_RESIZED, 0, 0 );
9787 if not (Sender is TToolBar) or (CoolBar = nil) then
9789 toolbar := TToolBar( Sender );
9791 //
\95Ï
\8dX
\82³
\82ê
\82½
\83N
\81[
\83\8b\83o
\81[
\82Ì
\92l
\82ð
\95Û
\91¶
9792 if CoolBar = MainCoolBar then begin
9793 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
9794 CoolSet.FCoolID := CoolBar.Bands[i].ID;
9795 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
9796 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
9797 GikoSys.Setting.MainCoolSet[i] := CoolSet;
9799 end else if CoolBar = ListCoolBar then begin
9800 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
9801 CoolSet.FCoolID := CoolBar.Bands[i].ID;
9802 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
9803 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
9804 GikoSys.Setting.ListCoolSet[i] := CoolSet;
9806 end else if CoolBar = BrowserCoolBar then begin
9807 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
9808 CoolSet.FCoolID := CoolBar.Bands[i].ID;
9809 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
9810 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
9811 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
9814 //
\95\9d\82Ì
\95Ï
\8dX
\82³
\82ê
\82½
\83o
\83\93\83h
\82ð
\8c©
\82Â
\82¯
\82é
9815 affectedBand := nil;
9816 for i := CoolBar.Bands.Count - 1 downto 0 do begin
9817 if CoolBar.Bands[ i ].Control.Handle = toolbar.Handle then begin
9818 band := CoolBar.Bands[ i ];
9819 if band.Break or (i = 0) then begin
9820 if i + 1 < CoolBar.Bands.Count then
9821 if not CoolBar.Bands[ i + 1 ].Break then
9822 affectedBand := CoolBar.Bands[ i + 1 ];
9825 affectedBand := CoolBar.Bands[ i - 1 ];
9830 //
\83h
\83\89\83b
\83O
\92\86\82Í band.Width
\82ª
\8dX
\90V
\82³
\82ê
\82È
\82¢
\82Ì
\82Å
\81A
\93à
\91¤
\82Ì
\83T
\83C
\83Y
\82©
\82ç
\82Ð
\82Ë
\82è
\8fo
\82·
9831 if CoolBar = MainCoolBar then begin
9832 coolSet := GikoSys.Setting.MainCoolSet[ band.ID ];
9833 coolSet.FCoolWidth := toolbar.Width + 25;
9834 GikoSys.Setting.MainCoolSet[ band.ID ] := coolSet;
9835 if affectedBand <> nil then begin
9836 coolSet := GikoSys.Setting.MainCoolSet[ affectedBand.ID ];
9837 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
9838 GikoSys.Setting.MainCoolSet[ affectedBand.ID ] := coolSet;
9840 end else if CoolBar = ListCoolBar then begin
9841 coolSet := GikoSys.Setting.ListCoolSet[ band.ID ];
9842 coolSet.FCoolWidth := toolbar.Width + 25;
9843 GikoSys.Setting.ListCoolSet[ band.ID ] := coolSet;
9844 if affectedBand <> nil then begin
9845 coolSet := GikoSys.Setting.ListCoolSet[ affectedBand.ID ];
9846 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
9847 GikoSys.Setting.ListCoolSet[ affectedBand.ID ] := coolSet;
9849 end else if CoolBar = BrowserCoolBar then begin
9850 coolSet := GikoSYs.Setting.BrowserCoolSet[ band.ID ];
9851 coolSet.FCoolWidth := toolbar.Width + 25;
9852 GikoSys.Setting.BrowserCoolSet[ band.ID ] := coolSet;
9853 if affectedBand <> nil then begin
9854 coolSet := GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ];
9855 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
9856 GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ] := coolSet;
9862 procedure TGikoForm.MenuToolBarResize(Sender: TObject);
9864 CoolBarResized( Sender, MainCoolBar );
9867 procedure TGikoForm.StdToolBarResize(Sender: TObject);
9869 CoolBarResized( Sender, MainCoolBar );
9872 procedure TGikoForm.LinkToolBarResize(Sender: TObject);
9874 CoolBarResized( Sender, MainCoolBar );
9877 procedure TGikoForm.ListNameToolBarResize(Sender: TObject);
9879 CoolBarResized( Sender, ListCoolBar );
9882 procedure TGikoForm.ListToolBarResize(Sender: TObject);
9884 CoolBarResized( Sender, ListCoolBar );
9887 procedure TGikoForm.BrowserNameToolBarResize(Sender: TObject);
9889 CoolBarResized( Sender, BrowserCoolBar );
9892 procedure TGikoForm.BrowserToolBarResize(Sender: TObject);
9894 CoolBarResized( Sender, BrowserCoolBar );
9897 procedure TGikoForm.BrowserTabResize(Sender: TObject);
9899 CoolBarResized( Sender, BrowserCoolBar );
9902 // *************************************************************************
9903 // ExternalBoardPlugInMain
9904 //
\83v
\83\89\83O
\83C
\83\93\83\81\83j
\83\85\81[
\82Ì
\8d\80\96Ú
\82ª
\8eÀ
\8ds
\82³
\82ê
\82½
9905 // *************************************************************************
9906 procedure TGikoForm.OnPlugInMenuItem( Sender : TObject );
9909 boardPlugIn : TBoardPlugIn;
9912 if not (Sender is TMenuItem) then
9915 item := TMenuItem( Sender );
9916 if not Assigned( Pointer( item.Tag ) ) then
9919 //
\83v
\83\89\83O
\83C
\83\93\82Ì
\83\81\83j
\83\85\81[
\83n
\83\93\83h
\83\89\82ð
\8cÄ
\82Ñ
\8fo
\82·
9920 boardPlugIn := TBoardPlugIn( item.Tag );
9921 boardPlugIn.PlugInMenu( item.Handle );
9924 // TreeView
\82ª
\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
9925 procedure TGikoForm.TreeClick( Node : TTreeNode );
9933 if FTreeType = gttHistory then begin
9935 if TObject( Node.Data ) is TFavoriteThreadItem then
9936 if GetActiveContent <> TFavoriteThreadItem( Node.Data ).Item then
9937 FavoriteClick( Node );
9941 if GetActiveList is TBBS then begin
9942 for i := 0 to ListView.Columns.Count - 1 do
9943 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
9944 end else if GetActiveList is TCategory then begin
9945 for i := 0 to ListView.Columns.Count - 1 do
9946 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
9947 end else if GetActiveList is TBoard then begin
9948 for i := 0 to ListView.Columns.Count - 1 do
9949 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
9952 if TObject(Node.Data) is TBBS then begin
9953 SetActiveList(Node.data);
9954 end else if TObject(Node.Data) is TCategory then begin
9955 SetActiveList(Node.data);
9956 end else if TObject(Node.Data) is TBoard then begin
9957 if not TBoard(Node.Data).IsThreadDatRead then begin
9958 Screen.Cursor := crHourGlass;
9960 if not TBoard(Node.Data).IsThreadDatRead then
9961 GikoSys.ReadSubjectFile(Node.Data);
9963 Screen.Cursor := crDefault;
9966 SetActiveList(Node.data);
9969 if TObject( Node.Data ) is TBoard then begin // not TCategory
9970 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
9971 if GikoSys.Setting.ListWidthState = glsMax then begin
9972 BrowserMinAction.Execute;
9973 if GikoForm.Visible then
9977 if GikoSys.Setting.ListHeightState = glsMax then begin
9978 BrowserMinAction.Execute;
9979 if GikoForm.Visible then
9987 // TreeView
\82ª
\83_
\83u
\83\8b\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
9988 procedure TGikoForm.TreeDoubleClick( Node : TTreeNode );
9991 ThreadItem : TThreadItem;
9992 shiftDown : Boolean;
9995 if Node = nil then Exit;
9997 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
9999 if FTreeType = gtt2ch then begin
10000 if not (TObject(Node.Data) is TBoard) then Exit;
10001 Board := TBoard(Node.Data);
10002 DownloadList(Board, shiftDown);
10003 end else if FTreeType = gttHistory then begin
10004 if not (TObject(Node.Data) is TFavoriteThreadItem) then Exit;
10005 ThreadItem := TFavoriteThreadItem(Node.Data).Item;
10006 DownloadContent(ThreadItem, shiftDown);
10011 procedure TGikoForm.TreeViewClick(Sender: TObject);
10013 TreeClick( TreeView.Selected );
10016 procedure TGikoForm.TreeViewKeyDown(Sender: TObject; var Key: Word;
10017 Shift: TShiftState);
10019 if Key = VK_BACK then begin
10020 // UpFolderButtonClick(Sender);
10021 end else if Key = VK_SPACE then begin
10022 TreeDoubleClick( TreeView.Selected );
10023 end else if Key = VK_RETURN then begin
10024 TreeClick( TreeView.Selected );
10025 TreeView.Selected.Expanded := not TreeView.Selected.Expanded;
10029 //
\83u
\83\89\83E
\83U
\82Ì
\83L
\81[
\83_
\83E
\83\93\83C
\83x
\83\93\83g //
\82È
\82ñ
\82©
\8eg
\82í
\82È
\82
\82Ä
\82à
\93®
\82¢
\82Ä
\82é
\8bC
\82ª
\82·
\82é
\81@by
\82à
\82¶
\82ã
10030 //
\83C
\83x
\83\93\83g
\82ð
\8eæ
\82è
\88µ
\82Á
\82½
\8fê
\8d\87\82Í True
\82ð
\95Ô
\82·
10031 function TGikoForm.BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
10033 iOIPAO : IOleInPlaceActiveObject;
10034 Dispatch : IDispatch;
10037 if Key = VK_BACK then begin
10038 UpBoardAction.Execute;
10040 {end else if Key in [VK_ESCAPE..VK_HELP] then begin
10041 //
\8f\
\8e\9a\81APage Up
\81APage Down
\93\99\82Í Browser
\82ª
\8f\9f\8eè
\82É
\8eó
\82¯
\8eæ
\82é
\82Ì
\82Å
\83C
\83x
\83\93\83g
\82ð
\83J
\83b
\83g
10044 end else if(Key in [VK_SPACE..VK_HELP]) and
10045 not(ssCtrl in State) and not(ssAlt in State) and not (ssShift in State) then begin
10048 //
\82»
\82ê
\88È
\8aO
\82Ì
\83C
\83x
\83\93\83g
\82Í Browser
\82É
\97¬
\82·
10049 if(FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10050 Dispatch := FActiveContent.Browser.Application;
10051 if Dispatch <> nil then begin
10052 Dispatch.QueryInterface( IOleInPlaceActiveObject, iOIPAO );
10053 if iOIPAO <> nil then
10054 iOIPAO.TranslateAccelerator( Msg );
10057 //
\83M
\83R
\83i
\83r
\82Å
\8eg
\82¤
\83V
\83\87\81[
\83g
\83J
\83b
\83g
\82Í
\8eó
\82¯
\8eæ
\82è
\82½
\82¢
\82Ì
\82Å
\83C
\83x
\83\93\83g
\82Í
\83J
\83b
\83g
\82µ
\82È
\82¢
10063 //
\83M
\83R
\83i
\83r
\82Ì
\83\81\83b
\83Z
\81[
\83W
\83\8b\81[
\83v
\82ð
\89¡
\8eæ
\82è
\82µ
\82Ü
\82·
10064 procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
10069 case Msg.message of
10071 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10072 if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
10074 Handled := BrowserKeyDown( Msg, key, KeyDataToShiftState( Msg.lParam ) );
10079 case Msg.wParam shr 16 of
10082 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10083 if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
10084 UpBoardAction.Execute;
10088 if not Handled then begin
10089 if IsDialogMessage( ListView.Handle, Msg ) then begin
10090 UpFolderAction.Execute;
10100 procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject;
10101 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
10103 favItem : TTreeNode;
10104 favThreadItem : TFavoriteThreadItem;
10110 FMouseDownPos.X := X;
10111 FMouseDownPos.Y := Y;
10115 favItem := FavoriteTreeView.GetNodeAt( X, Y );
10116 if favItem = nil then Exit;
10118 if TObject( favItem.Data ) is TFavoriteThreadItem then begin
10119 favThreadItem := TFavoriteThreadItem( favItem.Data );
10120 if favThreadItem.Item <> nil then
10121 InsertBrowserTab( favThreadItem.Item, False );
10128 procedure TGikoForm.MessagePanelResize(Sender: TObject);
10131 if FIsIgnoreResize then
10134 if GikoSys.Setting.ListOrientation = gloVertical then begin
10135 if GikoSys.Setting.ListHeightState = glsMin then begin
10136 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
10137 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
10143 procedure TGikoForm.OnResized;
10146 FOldFormWidth := Width;
10147 FIsIgnoreResize := False;
10151 procedure TGikoForm.TreeSelectNameCopyExecute(Sender: TObject);
10155 TreeView.Selected := FClickNode;
10156 s := FClickNode.Text;
10157 Clipboard.AsText := s;
10160 procedure TGikoForm.FavoriteTreeViewMouseUp(Sender: TObject;
10161 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
10164 if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold) and
10165 (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
10166 FavoriteClick( TObject( FavoriteTreeView.Selected ) );
10171 destructor TBrowserRecord.Destroy;
10175 if Self.FEvent <> nil then
10177 if Self.FBrowser <> nil then begin
10178 if Self.Thread <> nil then begin
10179 doc := Idispatch( olevariant(Self.FBrowser.ControlInterface).Document) as IHTMLDocument2;
10180 Self.Thread.ScrollTop := doc.Body.ScrollTop;
10182 //TOleControl(Self.FBrowser).Visible := false;
10183 ShowWindow(Self.FBrowser.Handle, SW_HIDE);
10188 procedure TGikoForm.OnlyAHundredResUpdate(Sender: TObject);
10190 OnlyAHundredRes.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
10193 function TGikoForm.WebBrowserClick(Sender: TObject): WordBool;
10196 if Sender <> nil then
10198 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then
10199 FActiveContent.FBrowser.SetFocus;
10204 procedure TGikoForm.SetFocusForBrowserActionExecute(Sender: TObject);
10206 FActiveContent.FBrowser.SetFocus;
10209 procedure TGikoForm.SetFocusForBrowserActionUpdate(Sender: TObject);
10211 if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
10212 (FActiveContent.Browser <> BrowserNullTab.Browser) then
10213 SetFocusForBrowserAction.Enabled := true
10215 SetFocusForBrowserAction.Enabled := false;
10218 procedure TGikoForm.SetFocusForThreadListActionExecute(Sender: TObject);
10220 if FActiveContent <> nil then
10221 WebBrowserClick(FActiveContent.Browser); //
\88ê
\89ñBrowser
\82É
\93\96\82Ä
\82È
\82¢
\82Æ
\93®
\82©
\82È
\82¢
\82Æ
\82«
\82ª
\82 \82é
10223 if( ListView.Items.Count > 0 ) and (ListView.ItemFocused = nil) then
10224 ListView.Items.Item[0].Selected := true; //
\91I
\91ð
\83A
\83C
\83e
\83\80\82ª
\96³
\82¢
\82Æ
\82«
\82Í
\90æ
\93ª
\82Ì
\82ð
\91I
\91ð
\82·
\82é
10227 procedure TGikoForm.SetFocusForCabinetActionExecute(Sender: TObject);
10229 if FActiveContent <> nil then
10230 WebBrowserClick(FActiveContent.Browser); //
\88ê
\89ñBrowser
\82É
\93\96\82Ä
\82È
\82¢
\82Æ
\93®
\82©
\82È
\82¢
\82Æ
\82«
\82ª
\82 \82é
10231 if TreeView.Visible then begin
10233 if(TreeView.Items.Count > 0) and ( TreeView.Selected = nil ) then
10234 TreeView.Items.Item[0].Selected := true;
10235 end else if FavoriteTreeView.Visible then begin
10236 FavoriteTreeView.SetFocus;
10237 if(FavoriteTreeView.Items.Count > 0) and (FavoriteTreeView.Selected = nil) then
10238 FavoriteTreeView.Items.Item[0].Selected := true;
10241 procedure TGikoForm.SetFocusForCabinetActionUpdate(Sender: TObject);
10243 SetFocusForCabinetAction.Enabled := CabinetPanel.Visible;
10246 //
\83u
\83\89\83E
\83U
\82ð
\8dÅ
\91å
\89»
\82µ
\82Ä
\83t
\83H
\81[
\83J
\83X
\82ð
\93\96\82Ä
\82é
\81B
10247 procedure TGikoForm.BrowserMaxAndFocusActionExecute(Sender: TObject);
10249 BrowserMaxAction.Execute;
10250 SetFocusForBrowserAction.Execute;
10253 procedure TGikoForm.BrowserMaxAndFocusActionUpdate(Sender: TObject);
10255 if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
10256 (FActiveContent.Browser <> BrowserNullTab.Browser) then
10257 BrowserMaxAndFocusAction.Enabled := true
10259 BrowserMaxAndFocusAction.Enabled := false;
10261 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\82ð
\8dÅ
\91å
\89»
\82µ
\82Ä
\83t
\83H
\81[
\83J
\83X
\82ð
\93\96\82Ä
\82é
10262 procedure TGikoForm.ThreadlistMaxAndFocusActionExecute(Sender: TObject);
10264 BrowserMinAction.Execute;
10265 SetFocusForThreadListAction.Execute;
10268 procedure TGikoForm.ListViewExit(Sender: TObject);
10274 procedure TGikoForm.ListViewSelectItem(Sender: TObject; Item: TListItem;
10275 Selected: Boolean);
10278 if not GikoSys.Setting.BrowserTabVisible then
10279 if Item <> nil then
10280 if TObject( Item.Data ) is TThreadItem then
10281 SelectTimer.Enabled := True;
10285 procedure TGikoForm.SelectTimerTimer(Sender: TObject);
10287 SelectTimer.Enabled := False;
10292 OleInitialize(nil);