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,IdTCPConnection, IdBaseComponent,
28 TGikoTreeType = (gttNone, gtt2ch, gttHistory, gttFavorite);
29 TToolBarSettingSenderType = (tssNone, tssMain, tssList, tssBrowser);
30 TMinimizeType = (mtNone, mtMinimizing, mtMinimized);
32 TBrowserRecord = class;
34 TGikoForm = class(TForm)
35 StatusBar: TStatusBar;
38 TreeSplitter: TSplitter;
41 ThreadMainPanel: TPanel;
42 ListSplitter: TSplitter;
44 ListView: TGikoListView;
48 MessageHideButton: TSpeedButton;
49 MessageListView: TListView;
50 MessageSplitter: TSplitter;
52 SpeedButton1: TSpeedButton;
54 CabinetSelectToolButton: TToolButton;
55 HistoryToolBar: TToolBar;
56 ToolButton15: TToolButton;
57 ToolButton18: TToolButton;
58 ItemIcon16: TImageList;
59 ItemIcon32: TImageList;
60 HotToobarImageList: TImageList;
61 ToobarImageList: TImageList;
62 ItemImageList: TImageList;
63 ActionList: TActionList;
64 LogDeleteAction: TAction;
65 KidokuAction: TAction;
66 StdToolBarVisibleAction: TAction;
67 SearchAction: TAction;
68 GikoNaviWebPageAction: TAction;
71 MsgBarVisibleAction: TAction;
72 StatusBarVisibleAction: TAction;
73 LargeIconAction: TAction;
74 SmallIconAction: TAction;
75 ListIconAction: TAction;
76 DetailIconAction: TAction;
77 CabinetBBSAction: TAction;
78 CabinetHistoryAction: TAction;
79 CabinetVisibleAction: TAction;
80 MidokuAction: TAction;
81 AllSelectAction: TAction;
82 UpFolderAction: TAction;
83 ListNumberVisibleAction: TAction;
84 AllItemAction: TAction;
85 LogItemAction: TAction;
86 NewItemAction: TAction;
87 SelectItemAction: TAction;
88 ShowThreadAction: TAction;
92 DeleteMenu: TMenuItem;
94 KidokuMenu: TMenuItem;
95 MidokuMenu: TMenuItem;
96 AllSelectMenu: TMenuItem;
98 StdToolBarMenu: TMenuItem;
99 CabinetMenu: TMenuItem;
102 CabinetVisibleMenu: TMenuItem;
103 MessageMenu: TMenuItem;
104 StatusBarMenu: TMenuItem;
106 LargeIconMenu: TMenuItem;
107 SmallIconMenu: TMenuItem;
109 DetailMenu: TMenuItem;
112 RoundMenu: TMenuItem;
114 OptionMenu: TMenuItem;
118 AboutMenu: TMenuItem;
120 BrowserPopupMenu: TPopupMenu;
121 ShowThreadMenu: TMenuItem;
122 ShowBoardMenu: TMenuItem;
123 ShowBoardAction: TAction;
124 ListIconPopupMenu: TPopupMenu;
125 LargeIconPMenu: TMenuItem;
126 SmallIconPMenu: TMenuItem;
127 ListPMenu: TMenuItem;
128 DetailPMenu: TMenuItem;
129 CabinetCloseAction: TAction;
130 ClosePopupMenu: TPopupMenu;
131 CloseMenu: TMenuItem;
132 OptionAction: TAction;
142 RoundAction: TAction;
143 ListPopupMenu: TPopupMenu;
144 ListRoundPMenu: TMenuItem;
145 ListReservPMenu: TMenuItem;
147 ItemRoundPMenu: TMenuItem;
149 KidokuPMenu: TMenuItem;
150 MidokuPMenu: TMenuItem;
151 AllSelectPMenu: TMenuItem;
152 UrlCopyPMenu: TMenuItem;
154 DeletePMenu: TMenuItem;
156 ViewPMenu: TMenuItem;
157 LargeIconLPMenu: TMenuItem;
158 SmallIconLPMenu: TMenuItem;
159 ListLPMenu: TMenuItem;
160 DetailLPMenu: TMenuItem;
164 URLCopyAction: TAction;
168 MsgBarCloseAction: TAction;
169 ScrollTopAction: TAction;
170 ScrollLastAction: TAction;
171 ScrollNewAction: TAction;
172 ScrollKokoAction: TAction;
173 EditorAction: TAction;
175 ItemReloadAction: TAction;
176 BrowserMaxAction: TAction;
188 SelectListReloadAction: TAction;
189 SelectThreadReloadAction: TAction;
190 KokoPopupMenu: TPopupMenu;
191 KokomadePMenu: TMenuItem;
193 MenuItem1: TMenuItem;
194 MenuItem2: TMenuItem;
195 BrowserTabCloseAction: TAction;
196 BrowserTabPopupMenu: TPopupMenu;
198 KokomadeAction: TAction;
199 ZenbuAction: TAction;
200 KokoResAction: TAction;
201 SelectItemURLCopyAction: TAction;
202 SelectReservAction: TAction;
203 NotSelectTabCloseAction: TAction;
207 TreePopupMenu: TPopupMenu;
208 TreeSelectThreadPupupMenu: TMenuItem;
209 TreeSelectBoardPupupMenu: TMenuItem;
211 TreeSelectURLPupupMenu: TMenuItem;
212 TreeSelectBoradReload: TAction;
213 TreeSelectThreadReload: TAction;
214 TreeSelectURLCopy: TAction;
215 ListToolBarVisibleAction: TAction;
216 BrowserToolBarVisibleAction: TAction;
220 BrowserBottomPanel: TGikoPanel;
221 CabinetSelectPopupMenu: TPopupMenu;
223 ItemReservPMenu: TMenuItem;
224 RoundNamePopupMenu: TPopupMenu;
225 SelectNewRoundName: TAction;
226 SelectDeleteRound: TAction;
227 NewBoardAction: TAction;
230 LoginAction: TAction;
232 KeySettingAction: TAction;
234 AllTabCloseAction: TAction;
242 MessageImageList: TImageList;
243 ProgressBar: TProgressBar;
244 ArrangeAction: TAction;
246 NameURLCopyAction: TAction;
247 SelectItemNameURLCopyAction: TAction;
248 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;
455 EditNGAction: TAction;
456 ReloadAction: TAction;
457 GoFowardAction: TAction;
458 GoBackAction: TAction;
459 SelectComboBoxSplitter: TImage;
460 IndividualAbon1: TMenuItem;
462 IndividualAbon2: TMenuItem;
464 CancellIndividualAbon: TAction;
465 AntiIndividualAbon: TMenuItem;
470 SearchBoardName: TMenuItem;
471 TreeSelectLogDeleteSeparator: TMenuItem;
472 TreeSelectSearchBoardName: TAction;
473 CabinetFavoriteAction: TAction;
476 FavoriteTreePopupMenu: TPopupMenu;
477 FavoriteTreeViewRenameAction: TAction;
478 FavoriteTreeRenamePopupMenu: TMenuItem;
479 FavoriteTreeViewNewFolderAction: TAction;
480 FavoriteTreeNewFolderPopupMenu: TMenuItem;
482 FavoriteTreeViewDeleteAction: TAction;
483 FavoriteTreeDeletePopupMenu: TMenuItem;
484 FavoriteToolBar: TToolBar;
485 ToolButton17: TToolButton;
486 ToolButton19: TToolButton;
487 FavoriteTreeViewBrowseFolderAction: TAction;
488 FavoriteTreeBrowseFolderPopupMenu: TMenuItem;
490 FavoriteTreeReloadPopupMenu: TMenuItem;
492 FavoriteTreeURLCopyPopupMenu: TMenuItem;
493 FavoriteTreeNameCopyPopupMenu: TMenuItem;
494 FavoriteTreeLogDeletePopupMenu: TMenuItem;
496 FavoriteTreeNameURLCopyPopupMenu: TMenuItem;
497 FavoriteTreeViewReloadAction: TAction;
498 FavoriteTreeViewURLCopyAction: TAction;
499 FavoriteTreeViewNameCopyAction: TAction;
500 FavoriteTreeViewNameURLCopyAction: TAction;
501 FavoriteTreeViewLogDeleteAction: TAction;
502 ResRangeAction: TAction;
503 ToolButton20: TToolButton;
504 ResRangeButton: TToolButton;
506 ExportFavoriteFileAction1: TMenuItem;
507 ExportFavoriteFile: TFileSaveAs;
508 ToolButton21: TToolButton;
509 CabinetBBSToolButton: TToolButton;
510 ToolButton23: TToolButton;
511 ToolButton24: TToolButton;
514 FavoriteTreeViewBrowseBoardAction: TAction;
515 FavoriteTreeViewBrowseThreadAction: TAction;
516 UpBoardAction: TAction;
526 TreeSelectLogDeletePopupMenu: TMenuItem;
528 BBSSelectPopupMenu: TPopupMenu;
529 PlugInMenu: TMenuItem;
530 TmpToolBar: TToolBar;
531 TreeSelectNameCopy: TAction;
532 TreeSelectNamePupupMenu: TMenuItem;
533 BrowserPanel: TPanel;
534 SetFocusForBrowserAction: TAction;
535 SetFocusForThreadListAction: TAction;
536 SetFocusForCabinetAction: TAction;
538 ThreadlistMaxAndFocusAction: TAction;
539 BrowserMaxAndFocusAction: TAction;
540 UpBoardButton: TToolButton;
542 SelectThreadSave: TMenuItem;
543 SelectItemSaveForHTML: TAction;
544 FileSaveAs1: TFileSaveAs;
548 SelectItemSaveForDat: TAction;
549 LogFolderOpenAction: TAction;
550 OpenLogFolder: TMenuItem;
551 Browser: TWebBrowser;
554 TabsSaveAction: TAction;
555 TabsOpenAction: TAction;
556 ResRangePopupMenu: TPopupMenu;
560 OnlyAHundredResAction: TAction;
561 OnlyNewResAction: TAction;
562 OnlyKokoResAction: TAction;
564 BrowsBoradHeadAction: TAction;
565 BrowsBoradHeadAction1: TMenuItem;
566 ThreadRangeAction: TAction;
567 ThreadRangePopupMenu: TPopupMenu;
575 ThreadRangeButton: TToolButton;
576 TabAutoSaveAction: TAction;
577 TabAutoLoadAction: TAction;
578 procedure FormCreate(Sender: TObject);
579 procedure FormDestroy(Sender: TObject);
580 procedure CabinetPanelHide(Sender: TObject);
581 procedure FormClose(Sender: TObject; var Action: TCloseAction);
582 procedure ListViewData(Sender: TObject; Item: TListItem);
583 procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
584 const FindString: String; const FindPosition: TPoint;
585 FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
586 Wrap: Boolean; var Index: Integer);
587 procedure ListViewDataHint(Sender: TObject; StartIndex,
589 procedure ListViewDataStateChange(Sender: TObject; StartIndex,
590 EndIndex: Integer; OldState, NewState: TItemStates);
591 procedure BrowserStatusTextChange(Sender: TObject;
592 const Text: WideString);
593 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
594 procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
595 var AllowChange: Boolean);
596 procedure ListViewKeyDown(Sender: TObject; var Key: Word;
598 procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
599 procedure ListViewSort(Sender: TObject; Column: TListColumn);
600 procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
601 Button: TToolButton; State: TCustomDrawState;
602 var DefaultDraw: Boolean);
603 procedure BrowserBeforeNavigate2(Sender: TObject;
604 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
605 Headers: OleVariant; var Cancel: WordBool);
606 procedure ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
607 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
608 var DefaultDraw: Boolean);
609 procedure TreeViewCustomDraw(Sender: TCustomTreeView;
610 const ARect: TRect; var DefaultDraw: Boolean);
611 procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
612 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
613 procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
614 procedure TreeViewDblClick(Sender: TObject);
615 procedure ListViewCustomDraw(Sender: TCustomListView;
616 const ARect: TRect; var DefaultDraw: Boolean);
617 procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
618 Shift: TShiftState; X, Y: Integer);
619 procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
620 procedure MessageListViewResize(Sender: TObject);
621 procedure ExitActionExecute(Sender: TObject);
622 procedure AllSelectActionExecute(Sender: TObject);
623 procedure StdToolBarVisibleActionExecute(Sender: TObject);
624 procedure MsgBarVisibleActionExecute(Sender: TObject);
625 procedure StatusBarVisibleActionExecute(Sender: TObject);
626 procedure LargeIconActionExecute(Sender: TObject);
627 procedure SmallIconActionExecute(Sender: TObject);
628 procedure ListIconActionExecute(Sender: TObject);
629 procedure DetailIconActionExecute(Sender: TObject);
630 procedure SearchActionExecute(Sender: TObject);
631 procedure OptionActionExecute(Sender: TObject);
632 procedure GikoNaviWebPageActionExecute(Sender: TObject);
633 procedure AboutActionExecute(Sender: TObject);
634 procedure CabinetHistoryActionExecute(Sender: TObject);
635 procedure CabinetVisible( isVisible : Boolean );
636 procedure CabinetVisibleActionExecute(Sender: TObject);
637 procedure AllItemActionExecute(Sender: TObject);
638 procedure LogItemActionExecute(Sender: TObject);
639 procedure NewItemActionExecute(Sender: TObject);
640 procedure SelectItemActionExecute(Sender: TObject);
641 procedure ListNumberVisibleActionExecute(Sender: TObject);
642 procedure UpFolderActionExecute(Sender: TObject);
643 procedure IconStyleExecute(Sender: TObject);
644 procedure RoundActionExecute(Sender: TObject);
645 procedure StopActionExecute(Sender: TObject);
646 procedure MsgBarCloseActionExecute(Sender: TObject);
647 procedure BrowserMaxActionExecute(Sender: TObject);
648 procedure ScrollTopActionExecute(Sender: TObject);
649 procedure ScrollLastActionExecute(Sender: TObject);
650 procedure ScrollNewActionExecute(Sender: TObject);
651 procedure ScrollKokoActionExecute(Sender: TObject);
652 procedure EditorActionExecute(Sender: TObject);
653 procedure IEActionExecute(Sender: TObject);
654 procedure ShowThreadActionExecute(Sender: TObject);
655 procedure ShowBoardActionExecute(Sender: TObject);
656 procedure URLCopyActionExecute(Sender: TObject);
657 procedure ItemReloadActionExecute(Sender: TObject);
658 procedure SelectListReloadActionExecute(Sender: TObject);
659 procedure SelectThreadReloadActionExecute(Sender: TObject);
660 procedure SelectListReloadActionUpdate(Sender: TObject);
661 procedure AllItemActionUpdate(Sender: TObject);
662 procedure LogItemActionUpdate(Sender: TObject);
663 procedure NewItemActionUpdate(Sender: TObject);
664 procedure SelectItemActionUpdate(Sender: TObject);
665 procedure UpFolderActionUpdate(Sender: TObject);
666 procedure FormResize(Sender: TObject);
667 procedure ScrollTopActionUpdate(Sender: TObject);
668 procedure ScrollLastActionUpdate(Sender: TObject);
669 procedure ScrollNewActionUpdate(Sender: TObject);
670 procedure ScrollKokoActionUpdate(Sender: TObject);
671 procedure EditorActionUpdate(Sender: TObject);
672 procedure IEActionUpdate(Sender: TObject);
673 procedure ShowThreadActionUpdate(Sender: TObject);
674 procedure ShowBoardActionUpdate(Sender: TObject);
675 procedure SelectThreadReloadActionUpdate(Sender: TObject);
676 procedure ItemReloadActionUpdate(Sender: TObject);
677 procedure LogDeleteActionExecute(Sender: TObject);
678 procedure KokomadeActionExecute(Sender: TObject);
679 procedure ZenbuActionExecute(Sender: TObject);
680 procedure KokoResActionExecute(Sender: TObject);
681 procedure ListPopupMenuPopup(Sender: TObject);
682 procedure SelectItemURLCopyActionExecute(Sender: TObject);
683 procedure SelectItemURLCopyActionUpdate(Sender: TObject);
684 procedure AllSelectActionUpdate(Sender: TObject);
685 procedure LogDeleteActionUpdate(Sender: TObject);
686 procedure BrowserTabCloseActionExecute(Sender: TObject);
687 procedure NotSelectTabCloseActionExecute(Sender: TObject);
688 procedure TreeSelectBoradReloadExecute(Sender: TObject);
689 procedure TreeSelectThreadReloadExecute(Sender: TObject);
690 procedure TreeSelectURLCopyExecute(Sender: TObject);
691 procedure TreePopupMenuPopup(Sender: TObject);
692 procedure ListToolBarVisibleActionExecute(Sender: TObject);
693 procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
694 procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
695 var Cancel: WordBool);
696 procedure ListSplitterCanResize(Sender: TObject; var NewSize: Integer;
697 var Accept: Boolean);
698 procedure ListSplitterMoved(Sender: TObject);
699 procedure BrowserTabChange(Sender: TObject);
700 procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
701 Shift: TShiftState; X, Y: Integer);
702 procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
703 State: TDragState; var Accept: Boolean);
704 procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
705 procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
707 procedure BrowserDocumentComplete(Sender: TObject;
708 const pDisp: IDispatch; var URL: OleVariant);
709 procedure SelectReservActionUpdate(Sender: TObject);
710 procedure RoundNamePopupMenuPopup(Sender: TObject);
711 procedure SelectNewRoundNameExecute(Sender: TObject);
712 procedure SelectDeleteRoundExecute(Sender: TObject);
713 procedure SelectReservActionExecute(Sender: TObject);
714 procedure NewBoardActionExecute(Sender: TObject);
715 procedure LoginActionExecute(Sender: TObject);
716 procedure KeySettingActionExecute(Sender: TObject);
717 procedure AllTabCloseActionExecute(Sender: TObject);
718 procedure ArrangeActionExecute(Sender: TObject);
719 procedure NameURLCopyActionExecute(Sender: TObject);
720 procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
721 procedure URLCopyActionUpdate(Sender: TObject);
722 procedure NameURLCopyActionUpdate(Sender: TObject);
723 procedure BrowserTabCloseActionUpdate(Sender: TObject);
724 procedure NotSelectTabCloseActionUpdate(Sender: TObject);
725 procedure AllTabCloseActionUpdate(Sender: TObject);
726 procedure SelectItemNameURLCopyActionUpdate(Sender: TObject);
727 procedure ActiveLogDeleteActionExecute(Sender: TObject);
728 procedure ActiveLogDeleteActionUpdate(Sender: TObject);
729 procedure ListNameBarVisibleActionExecute(Sender: TObject);
730 procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
731 procedure TreeSelectNameURLCopyExecute(Sender: TObject);
732 procedure PaneInitActionExecute(Sender: TObject);
733 procedure FormShow(Sender: TObject);
734 procedure BrowserTabToolBarResize(Sender: TObject);
735 procedure BrowserMinActionExecute(Sender: TObject);
736 procedure SelectTextClearActionExecute(Sender: TObject);
737 procedure NameTextClearActionExecute(Sender: TObject);
738 procedure MailTextClearActionExecute(Sender: TObject);
739 procedure LeftmostTabSelectActionExecute(Sender: TObject);
740 procedure LeftTabSelectActionExecute(Sender: TObject);
741 procedure RightTabSelectActionExecute(Sender: TObject);
742 procedure RightmostTabSelectActionExecute(Sender: TObject);
743 procedure LeftmostTabSelectActionUpdate(Sender: TObject);
744 procedure LeftTabSelectActionUpdate(Sender: TObject);
745 procedure RightTabSelectActionUpdate(Sender: TObject);
746 procedure RightmostTabSelectActionUpdate(Sender: TObject);
747 procedure FavoriteMenuClick(Sender: TObject);
748 procedure FavoriteAddActionExecute(Sender: TObject);
749 procedure FavoriteAddActionUpdate(Sender: TObject);
750 procedure BoardFavoriteAddActionExecute(Sender: TObject);
751 procedure BoardFavoriteAddActionUpdate(Sender: TObject);
752 procedure ThreadFavoriteAddActionExecute(Sender: TObject);
753 procedure ThreadFavoriteAddActionUpdate(Sender: TObject);
754 procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
755 procedure FavoriteArrangeActionExecute(Sender: TObject);
756 procedure MainCoolBarResize(Sender: TObject);
757 procedure MoveToActionExecute(Sender: TObject);
758 procedure AddressToolBarResize(Sender: TObject);
759 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
761 procedure AddressBarVisibleActionExecute(Sender: TObject);
762 procedure BrowserEnter(Sender: TObject);
763 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
764 procedure BrowserTabVisibleActionExecute(Sender: TObject);
765 procedure BrowserTabTopActionExecute(Sender: TObject);
766 procedure BrowserTabBottomActionExecute(Sender: TObject);
767 procedure BrowserTabTabStyleActionExecute(Sender: TObject);
768 procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
769 procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
770 procedure PreviewTimerTimer(Sender: TObject);
771 procedure MessageHideButtonClick(Sender: TObject);
772 procedure MonazillaWebPageActionExecute(Sender: TObject);
773 procedure GikoHelpActionExecute(Sender: TObject);
774 procedure ToolButton18Click(Sender: TObject);
775 procedure KotehanActionExecute(Sender: TObject);
776 procedure LinkBarVisibleActionExecute(Sender: TObject);
777 procedure BBS2chWebPageActionExecute(Sender: TObject);
778 procedure GikoFolderOpenActionExecute(Sender: TObject);
779 procedure MainCoolBarBandInfo(Sender: TObject;
780 var BandInfo: PReBarBandInfoA);
781 procedure MainCoolBarChevronClick(Sender: TObject;
782 RebarChevron: PNMRebarChevron);
783 procedure ListCoolBarBandInfo(Sender: TObject;
784 var BandInfo: PReBarBandInfoA);
785 procedure ListCoolBarChevronClick(Sender: TObject;
786 RebarChevron: PNMRebarChevron);
787 procedure BrowserCoolBarBandInfo(Sender: TObject;
788 var BandInfo: PReBarBandInfoA);
789 procedure BrowserCoolBarChevronClick(Sender: TObject;
790 RebarChevron: PNMRebarChevron);
791 procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
792 procedure ThreadEditorActionExecute(Sender: TObject);
793 procedure ThreadEditorActionUpdate(Sender: TObject);
794 procedure ToolBarSettingActionExecute(Sender: TObject);
795 procedure NameCopyActionExecute(Sender: TObject);
796 procedure BoardIEActionExecute(Sender: TObject);
797 procedure SelectItemNameCopyActionExecute(Sender: TObject);
798 procedure SelectItemNameCopyActionUpdate(Sender: TObject);
799 procedure BoardIEActionUpdate(Sender: TObject);
800 procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
801 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
802 procedure NameCopyActionUpdate(Sender: TObject);
803 procedure SelectComboBoxChange(Sender: TObject);
804 procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
806 procedure SelectComboBoxExit(Sender: TObject);
807 procedure SelectResActionExecute(Sender: TObject);
808 procedure SelectResActionUpdate(Sender: TObject);
809 procedure FormKeyUp(Sender: TObject; var Key: Word;
811 procedure AllResActionExecute(Sender: TObject);
812 procedure AllResActionUpdate(Sender: TObject);
813 procedure ReloadClick(Sender: TObject);
814 procedure GoBackClick(Sender: TObject);
815 procedure GoFowardClick(Sender: TObject);
816 procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
817 Shift: TShiftState; X, Y: Integer);
818 procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
819 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
820 procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
821 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
822 procedure StatusBarResize(Sender: TObject);
823 procedure IndividualAbon1Click(Sender: TObject);
824 procedure IndividualAbon2Click(Sender: TObject);
825 procedure N42Click(Sender: TObject);
826 procedure SelectComboBoxEnter(Sender: TObject);
827 procedure AntiIndividualAbonClick(Sender: TObject);
828 procedure N51Click(Sender: TObject);
829 procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
830 procedure CabinetFavoriteActionExecute(Sender: TObject);
831 procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
833 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
834 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
836 procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
838 procedure FavoriteTreePopupMenuPopup(Sender: TObject);
839 procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
840 procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
841 procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
842 procedure ToolButton19Click(Sender: TObject);
843 procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject);
844 procedure FavoriteTreeViewDblClick(Sender: TObject);
845 procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject);
846 procedure FavoriteTreeViewReloadActionExecute(Sender: TObject);
847 procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
848 procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
849 procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject);
850 procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
851 procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
852 Shift: TShiftState; X, Y: Integer);
853 procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
854 State: TDragState; var Accept: Boolean);
855 procedure ResRangeActionExecute(Sender: TObject);
856 procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
858 procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
859 var Handled: Boolean);
860 procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
861 var Handled: Boolean);
862 procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
863 var Handled: Boolean);
864 procedure ExportFavoriteFileAccept(Sender: TObject);
865 procedure ExportFavoriteFileBeforeExecute(Sender: TObject);
866 procedure CabinetBBSActionExecute(Sender: TObject);
867 procedure FavoriteTreeViewBrowseThreadActionExecute(Sender: TObject);
868 procedure FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
869 procedure UpBoardActionExecute(Sender: TObject);
870 procedure UpBoardActionUpdate(Sender: TObject);
871 procedure BrowserTabContextPopup(Sender: TObject; MousePos: TPoint;
872 var Handled: Boolean);
873 procedure KoreCopyExecute(Sender: TObject);
874 procedure BrowserTabPopupMenuPopup(Sender: TObject);
875 procedure MenuToolBarResize(Sender: TObject);
876 procedure StdToolBarResize(Sender: TObject);
877 procedure LinkToolBarResize(Sender: TObject);
878 procedure ListNameToolBarResize(Sender: TObject);
879 procedure ListToolBarResize(Sender: TObject);
880 procedure BrowserNameToolBarResize(Sender: TObject);
881 procedure BrowserToolBarResize(Sender: TObject);
882 procedure BrowserTabResize(Sender: TObject);
883 procedure TreeViewClick(Sender: TObject);
884 procedure TreeViewKeyDown(Sender: TObject; var Key: Word;
886 procedure FavoriteTreeViewMouseDown(Sender: TObject;
887 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
888 procedure MessagePanelResize(Sender: TObject);
890 procedure TreeSelectNameCopyExecute(Sender: TObject);
891 procedure FavoriteTreeViewMouseUp(Sender: TObject;
892 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
893 procedure ResRangeActionUpdate(Sender: TObject);
894 procedure SetFocusForBrowserActionExecute(Sender: TObject);
895 procedure SetFocusForBrowserActionUpdate(Sender: TObject);
896 procedure SetFocusForThreadListActionExecute(Sender: TObject);
897 procedure SetFocusForCabinetActionExecute(Sender: TObject);
898 procedure BrowserMaxAndFocusActionExecute(Sender: TObject);
899 procedure BrowserMaxAndFocusActionUpdate(Sender: TObject);
900 procedure ThreadlistMaxAndFocusActionExecute(Sender: TObject);
901 procedure ListViewExit(Sender: TObject);
902 procedure SetFocusForCabinetActionUpdate(Sender: TObject);
903 procedure ListViewSelectItem(Sender: TObject; Item: TListItem;
905 procedure SelectTimerTimer(Sender: TObject);
906 procedure SelectItemSaveForHTMLExecute(Sender: TObject);
907 procedure KidokuActionExecute(Sender: TObject);
908 procedure MidokuActionExecute(Sender: TObject);
909 procedure SelectItemSaveForDatExecute(Sender: TObject);
910 procedure BrowserPanelCanResize(Sender: TObject; var NewWidth,
911 NewHeight: Integer; var Resize: Boolean);
912 procedure LogFolderOpenActionExecute(Sender: TObject);
913 procedure LogFolderOpenActionUpdate(Sender: TObject);
914 procedure TabsSaveActionExecute(Sender: TObject);
915 procedure TabsOpenActionExecute(Sender: TObject);
916 procedure TabsSaveToFileActionExecute(Sender: TObject);
917 procedure TabsOpenFromFileActionExecute(Sender: TObject);
918 procedure OnlyAHundredResActionExecute(Sender: TObject);
919 procedure OnlyKokoResActionExecute(Sender: TObject);
920 procedure OnlyNewResActionExecute(Sender: TObject);
921 procedure BrowsBoradHeadActionExecute(Sender: TObject);
922 procedure BrowsBoradHeadActionUpdate(Sender: TObject);
923 procedure EditNGActionExecute(Sender: TObject);
924 procedure ThreadRangeActionUpdate(Sender: TObject);
925 procedure ThreadRangeActionExecute(Sender: TObject);
926 procedure TabAutoSaveActionExecute(Sender: TObject);
927 procedure TabAutoLoadActionExecute(Sender: TObject);
930 //RoundList : TRoundList;
934 FEnabledCloseButton: Boolean;
935 // ThreadCreate: TThreadCreate;
937 FClickNode: TTreeNode;
940 FPreviewBrowser: TPreviewBrowser;
943 FBrowserSizeHeight: Integer;
944 FBrowserSizeWidth: Integer;
946 // FFavorite: TFavorite;
947 FTabHintIndex: Integer;
948 FListStyle: TViewStyle; //
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93\83X
\83^
\83C
\83\8b
949 FItemNoVisible: Boolean; //
\83\8a\83X
\83g
\94Ô
\8d\86\95\
\8e¦
\83t
\83\89\83O
950 FViewType: TGikoViewType; //
\83\8a\83X
\83g
\83A
\83C
\83e
\83\80\95\
\8e¦
\83^
\83C
\83v
951 FActiveList: TObject;
952 FActiveContent: TBrowserRecord; //
954 FHistoryList: TList; //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
955 FTreeType: TGikoTreeType;
959 // FLastRoundTime: TDateTime;
960 BrowserNullTab: TBrowserRecord;
961 // DoubleClickOccurred: array [TMouseButton] of Boolean;
962 FDownloadTitle: string; //
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86\82Ì
\83^
\83C
\83g
\83\8b\96¼
963 FDownloadMax: Integer; //
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86\82Ì
\8dÅ
\91å
\83T
\83C
\83Y
964 FEvent: THTMLDocumentEventSink;//
\83u
\83\89\83E
\83U
\83h
\83L
\83\85\83\81\83\93\83g
\83C
\83x
\83\93\83g
966 // Fkeynum : Integer; //
\83L
\81[
\83{
\81[
\83h
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\97p
968 IsDraggingSelectComboBox : Boolean;
969 DraggingSelectComboBoxPosition : TPoint;
971 FSearchDialog: TSearchDialog;
973 FDropSpaceNode: TTreeNode;
975 FDragTime : Cardinal; //
\83\8a\83\93\83N
\82ÌD&D
\97p
976 FDragButton : TToolButton; //
\83\8a\83\93\83N
\82ÌD&D
\97p
\82ÉDrag
\82µ
\82Ä
\82éButton
\95Û
\91¶
977 FDragWFirst : Boolean; //WebTab
\82ÌD&D
\97p
979 FListViewBackGroundColor : TColor; //ListView
\82ÌBackGroundColor
980 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¦
981 FOddColor : TColor; //
\82»
\82Ì
\90F
983 FSelectResWord : string; //
\83\8c\83X
\8di
\8d\9e\83\8f\81[
\83h
984 FIsIgnoreResize : Boolean; //
\83\8a\83T
\83C
\83Y
\83C
\83x
\83\93\83g
\82ð
\96³
\8e\8b\82·
\82é
\82©
\82Ç
\82¤
\82©
985 FIsMinimize : TMinimizeType; //
\8dÅ
\8f¬
\89»
\82µ
\82Ä
\82¢
\82é
\8dÅ
\92\86\82©
986 FOldFormWidth : Integer; //
\92¼
\91O
\82Ì
\83E
\83B
\83\93\83h
\83E
\82Ì
\95\9d
987 FToolBarSettingSender : TToolBarSettingSenderType; //
\83c
\81[
\83\8b\83o
\81[
\90Ý
\92è
\82ð
\83N
\83\8a\83b
\83N
\82µ
\82½
\83N
\81[
\83\8b\83o
\81[
988 FMouseDownPos : TPoint; //
\83u
\83\89\83E
\83U
\83^
\83u
\82Å
\83}
\83E
\83X
\82ð
\89\9f\82µ
\82½
\82Æ
\82«
\82Ì
\8dÀ
\95W
990 FResRangeMenuSelect : Longint; ///< ResRangeButton
\82Å
\91I
\91ð
\82³
\82ê
\82Ä
\82¢
\82é
\8d\80\96Ú (
\83t
\83H
\81[
\83}
\83b
\83g
\82Í ResRange
\8cÝ
\8a·)
991 procedure SetBoardTreeNode( inBBS : TBBS );
992 function SetCategoryListItem(ABBS2ch: TBBS): Integer;
993 function SetBoardListItem(Category: TCategory): Integer;
994 function SetThreadListItem(Board: TBoard): Integer;
995 // function GetRoundName(index: integer): string;
997 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
998 procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
999 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
1000 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
1001 procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
1003 procedure SetActiveList(Obj: TObject);
1004 procedure ListClick;
1005 procedure ListDoubleClick(Shift: TShiftState);
1006 procedure BrowserMovement(const AName: string); overload;
1007 procedure BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord); overload;
1008 procedure SelectListItem(List: TList);
1009 // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
1010 procedure DeleteTab(ThreadItem: TThreadItem); overload;
1011 procedure DeleteTab(BrowserRecord: TBrowserRecord); overload;
1012 function Hook(var Message: TMessage): Boolean;
1013 procedure AddRoundNameMenu(MenuItem: TMenuItem);
1014 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload;
1015 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
1016 procedure SetSelectRoundName(Sender: TObject);
1017 function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
1019 procedure SetMenuFont;
1020 // procedure CreateFavMenu(Folder: TFavoriteFolder);
1021 procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
1022 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
1023 procedure FavoriteClick(Sender: TObject); overload;
1024 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
1025 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
1026 function OnDocumentContextMenu(Sender: TObject): WordBool;
1027 // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
1028 procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
1029 procedure ShowTextPopup;
1030 //procedure ShowTextPopup(HintData: THintData);
1031 // procedure SetStdToolBar;
1032 // function GetAction(ActionName: string): TContainedAction;
1033 procedure SetLinkBar;
1034 function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
1035 procedure MenuBarChevronMenu;
1036 procedure LinkBarChevronMenu;
1037 procedure ToolBarChevronMenu(ToolBar: TToolBar);
1038 procedure ModifySelectList;
1039 procedure FavoriteBrowseFolder( node: TTreeNode );
1040 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
1041 procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
1042 procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
1043 procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
1044 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
1045 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
1046 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
1047 procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
1048 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
1050 procedure SetListViewBackGroundColor(value: TColor);
1051 procedure BBSMenuItemOnClick( Sender : TObject );
1053 procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
1054 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82É
\95Û
\91¶
1055 procedure SaveCoolBarSettings;
1056 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82©
\82ç
\95\9c\8c³
1057 procedure LoadCoolBarSettings;
1058 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82é
1059 procedure OnMinimize;
1060 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82½
1061 procedure OnMinimized;
1062 // CoolBar
\82ª
\83T
\83C
\83Y
\95Ï
\8dX
\82³
\82ê
\82½
1063 procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
1064 // TreeView
\82ª
\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
1065 procedure TreeClick( Node : TTreeNode );
1066 // TreeView
\82ª
\83_
\83u
\83\8b\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
1067 procedure TreeDoubleClick( Node : TTreeNode );
1068 //
\83M
\83R
\83i
\83r
\82Ì
\83\81\83b
\83Z
\81[
\83W
\83\8b\81[
\83v
\82ð
\89¡
\8eæ
\82è
\82µ
\82Ü
\82·
1069 procedure HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
1070 //
\83u
\83\89\83E
\83U
\82Ì
\83L
\81[
\83_
\83E
\83\93\83C
\83x
\83\93\83g
1071 //
\83C
\83x
\83\93\83g
\82ð
\8eæ
\82è
\88µ
\82Á
\82½
\8fê
\8d\87\82Í True
\82ð
\95Ô
\82·
1072 function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
1073 //
\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
1074 procedure SetBBSMenu;
1075 function WebBrowserClick(Sender: TObject): WordBool;
1076 procedure SkinorCSSFilesCopy(path: string);
1078 function GetTabURLs(AStringList: TStringList) : Boolean;
1080 function SaveTabURLs : Boolean;
1081 //
\83^
\83u
\93Ç
\82Ý
\8fo
\82µ
1082 function LoadTabURLs : Boolean;
1083 //
\83o
\83\93\83h
\95\9d\82ð
\8dÄ
\8cv
\8eZ
\81E
\8dÄ
\90Ý
\92è
\82·
\82é
1084 procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
1086 procedure CreateParams(var Params: TCreateParams); override;
1087 procedure WndProc(var Message: TMessage); override;
1088 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
1089 procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
1090 procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
1094 // FDownload: TDownload;
1095 FControlThread: TThreadControl;
1096 procedure MoveToURL(URL: string);
1097 procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
1098 procedure ReloadBBS;
1099 function GetHttpState: Boolean;
1100 procedure SetEnabledCloseButton(Enabled: Boolean);
1101 function GetTreeNode(Data: TObject): TTreeNode;
1102 procedure AppFormDeactivate(Sender: TObject);
1103 // procedure CabinetPanelVisible(PanelVisible: Boolean);
1104 procedure ListViewAllSelect;
1106 property ListStyle: TViewStyle read FListStyle write FListStyle;
1107 property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
1108 property ViewType: TGikoViewType read FViewType write FViewType;
1110 property NameCookie: string read FNameCookie write FNameCookie;
1111 property MailCookie: string read FMailCookie write FMailCookie;
1113 procedure SetContent(inThread: TBrowserRecord);
1114 function GetActiveContent: TThreadItem;
1115 function GetActiveList: TObject;
1117 property ActiveList: TObject read GetActiveList write SetActiveList;
1118 // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
1120 procedure SetListViewType(AViewType: TGikoViewType); overload;
1121 procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
1122 procedure DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
1123 procedure DownloadList(Board: TBoard; ForceDownload: Boolean = False);
1124 procedure PlaySound(SoundEventName: string);
1126 function AddHistory( FavItem: TFavoriteThreadItem ): Boolean;
1127 procedure DeleteHistory( threadItem: TThreadItem );
1128 procedure ClearHistory;
1129 procedure SaveHistory;
1130 procedure LoadHistory;
1131 procedure ShowBBSTree( inBBS : TBBS );
1132 procedure ShowBBSTreeOld( inBBS : TBBS );
1133 procedure ShowHistoryTree;
1134 procedure SetHistoryTreeNode;
1135 // procedure SelectTreeNode(Item: TObject);
1136 procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
1137 procedure SetBrowserTabState;
1138 // property Favorite: TFavorite read FFavorite write FFavorite;
1139 procedure SetToolBarPopup;
1140 procedure ShowFavoriteAddDialog( Item : TObject );
1141 procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
1142 procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
1143 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
1144 property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
1145 property OddColor : TColor read FOddColor write FOddColor;
1147 function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
1148 procedure OnPlugInMenuItem( Sender : TObject );
1149 procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
1152 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
1155 TFavoriteMenuItem = class(TMenuItem)
1159 property Data: Pointer read FData write FData;
1162 TBBSMenuItem = class(TMenuItem)
1166 property Data: Pointer read FData write FData;
1169 TLinkToolButton = class(TToolButton)
1173 property Data: Pointer read FData write FData;
1176 TBrowserRecord = class( TObject )
1178 FBrowser : TWebBrowser;
1179 FEvent: THTMLDocumentEventSink;//
\83u
\83\89\83E
\83U
\83h
\83L
\83\85\83\81\83\93\83g
\83C
\83x
\83\93\83g
1180 FThread : TThreadItem;
1181 FLastSize : Integer;
1183 // FOnlyHundred: Boolean;
1185 destructor Destroy; override;
1186 property Browser : TWebBrowser read FBrowser write FBrowser;
1187 property Thread : TThreadItem read FThread write FThread;
1188 property LastSize : Integer read FLastSize write FLastSize;
1189 property Repaint : Boolean read FRepaint write FRepaint;
1190 // property OnlyHundred : Boolean read FOnlyHundred write FOnlyHundred;
1194 GikoForm: TGikoForm;
1199 About, Option, Round, Splash, Sort, ListSelect,
1200 NewBoard, MojuUtils,Clipbrd;
1203 CAPTION_NAME: string = '
\83M
\83R
\83i
\83r';
1204 BLANK_HTML: string = 'about:blank';
1205 SELECTCOMBOBOX_NAME: string = ''; // '
\83X
\83\8c\83b
\83h
\8di
\8d\9e\8c\9f\8dõ';
1206 SELECTCOMBOBOX_COLOR: TColor = clWindow;
1208 DandD_THRESHOLD = 5; //D&D
\82Ìè
\87\92l
\81ipixcel)
1209 //
\83c
\83\8a\81[
\81E
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93
1210 ITEM_ICON_2CH1 = 0; //2ch
\83A
\83C
\83R
\83\93
1211 ITEM_ICON_2CH2 = 1; //2ch
\83A
\83C
\83R
\83\93
1212 ITEM_ICON_CATEGORY1 = 2; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1213 ITEM_ICON_CATEGORY2 = 3; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1214 ITEM_ICON_BOARD_NOSUBJECT = 3; //
\93Ç
\82Ý
\8d\9e\82Ü
\82ê
\82Ä
\82¢
\82È
\82¢
\94Â
\83A
\83C
\83R
\83\93
1215 ITEM_ICON_BOARD1 = 4; //
\94Â
\83A
\83C
\83R
\83\93
1216 ITEM_ICON_BOARD2 = 5; //
\94Â
\83A
\83C
\83R
\83\93
1217 ITEM_ICON_THREADLOG1 = 6; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1218 ITEM_ICON_THREADLOG2 = 7; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1219 ITEM_ICON_THREAD1 = 8; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1220 ITEM_ICON_THREAD2 = 9; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1221 ITEM_ICON_THREADNEW1 = 10; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1222 ITEM_ICON_THREADNEW2 = 11; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1223 ITEM_ICON_SORT1 = 12; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1224 ITEM_ICON_SORT2 = 13; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1225 ITEM_ICON_BOARD_LOG = 17; //
\83X
\83\8c\83\8d\83O
\82 \82è
\94Â
\83A
\83C
\83R
\83\93
1226 ITEM_ICON_BOARD_NEW = 18; //
\83X
\83\8c\90V
\92\85\94Â
\83A
\83C
\83R
\83\93
1228 //
\83c
\81[
\83\8b\83o
\81[
\83A
\83C
\83R
\83\93
1229 TOOL_ICON_HEIGHT_MAX = 16; //
\8d\82\82³
\8dÅ
\91å
\83A
\83C
\83R
\83\93
1230 TOOL_ICON_HEIGHT_MIN = 17; //
\8d\82\82³
\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1231 TOOL_ICON_HEIGHT_NORMAL = 18; //
\8d\82\82³
\95W
\8f\80\83A
\83C
\83R
\83\93
1232 TOOL_ICON_WIDTH_MAX = 19; //
\95\9d\8dÅ
\91å
\83A
\83C
\83R
\83\93
1233 TOOL_ICON_WIDTH_MIN = 20; //
\95\9d\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1234 TOOL_ICON_WIDTH_NORMAL = 21; //
\95\9d\95W
\8f\80\83A
\83C
\83R
\83\93
1236 TOOL_ICON_FAV_FOLDER = 30; //
\82¨
\8bC
\82É
\93ü
\82è
\83t
\83H
\83\8b\83_
\83A
\83C
\83R
\83\93
1237 TOOL_ICON_FAV_BOARD = 31; //
\82¨
\8bC
\82É
\93ü
\82è
\94Â
\83A
\83C
\83R
\83\93
1238 TOOL_ICON_FAV_THREAD = 32; //
\82¨
\8bC
\82É
\93ü
\82è
\83X
\83\8c\83A
\83C
\83R
\83\93
1240 HTML_FILE_NAME = 'temp_preview.html';
1242 WM_XBUTTONDOWN = $020B;
1243 WM_XBUTTONUP = $020C;
1244 WM_XBUTTONDBLCLK = $020D;
1247 USER_TREECLICK = WM_USER + 2000;
1248 USER_RESIZED = WM_USER + 2001;
1249 USER_MINIMIZED = WM_USER + 2002;
1250 USER_SETLINKBAR = WM_USER + 2003;
1251 SELECTTIME_INTERBAL = 110;
1253 BROWSER_COUNT = 5; //
\83u
\83\89\83E
\83U
\82Ì
\90\94
1256 procedure TGikoForm.CreateParams(var Params: TCreateParams);
1259 if FormStyle in [fsNormal, fsStayOnTop] then begin
1260 if BorderStyle in [bsSingle, bsSizeable] then begin
1261 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1262 Params.WndParent := 0;
1267 procedure TGikoForm.FormCreate(Sender: TObject);
1269 TVS_NOTOOLTIPS = $0080;
1275 wp: TWindowPlacement;
1277 newbrowser: TWebBrowser;
1281 Writeln('============================================================');
1282 Writeln('
\83M
\83R
\83i
\83r
\83f
\83o
\83b
\83O
\83R
\83\93\83\
\81[
\83\8b');
1284 Writeln('
\82±
\82Ì
\89æ
\96Ê
\82ð
\95Â
\82¶
\82È
\82¢
\82Å
\82
\82¾
\82³
\82¢
\81B');
1285 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¢');
1286 Writeln('============================================================');
1288 Application.OnDeactivate := AppFormDeactivate;
1289 Self.OnDeactivate := AppFormDeactivate;
1290 Application.HookMainWindow(Hook);
1291 Application.OnMessage := HandleAppMessage; //
\82È
\82ñ
\82©
\96³
\82
\82Ä
\82à
\91å
\8fä
\95v
\82É
\82È
\82Á
\82½
\81@by
\81@
\82à
\82¶
\82ã
1292 Self.DoubleBuffered := true;
1293 FTreeType := gttNone;
1295 FSearchDialog := nil;
1296 BrowserNullTab := TBrowserRecord.Create;
1297 BrowserNullTab.Browser := Browser;
1298 BrowserNullTab.Browser.Navigate(BLANK_HTML);
1299 FBrowsers := TList.Create;
1300 for i := 0 to BROWSER_COUNT -1 do begin
1301 FBrowsers.Add(TWebBrowser.Create(nil));
1302 newBrowser := FBrowsers[FBrowsers.Count - 1];
1303 TOleControl(newBrowser).Parent := BrowserPanel;
1304 newBrowser.Align := alNone;
1305 newBrowser.Left := 0;
1306 newBrowser.Top := 0;
1307 //newBrowser.DoubleBuffered := true;
1308 newBrowser.OnDocumentComplete := BrowserDocumentComplete;
1309 newBrowser.OnBeforeNavigate2 := BrowserBeforeNavigate2;
1310 newBrowser.OnEnter := BrowserEnter;
1311 newBrowser.OnNewWindow2 := BrowserNewWindow2;
1312 newBrowser.OnStatusTextChange := BrowserStatusTextChange;
1313 //newBrowser.OnTitleChange := BrowserTitleChange;
1314 newBrowser.Navigate(BLANK_HTML);
1315 ShowWindow(newBrowser.Handle, SW_HIDE);
1318 BrowserNullTab.Browser.BringToFront;
1319 ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
1321 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô
1322 FIsIgnoreResize := True;
1324 //
\8eè
\82Ì
\83J
\81[
\83\
\83\8b
1325 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1328 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1329 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1331 //
\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Æ)
1332 InitializeBoardPlugIns;
1334 EnabledCloseButton := True;
1337 //
\8f\84\89ñ
\83f
\81[
\83^
\93Ç
\82Ý
\8d\9e\82Ý
1338 RoundList := TRoundList.Create;
1339 RoundList.LoadRoundBoardFile;
1341 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\97ñ
\8b\93(ReadFavorite
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1342 GikoSys.ListBoardFile;
1344 RoundList.LoadRoundThreadFile;
1346 if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
1347 GikoSys.ListBoardFile;
1349 //
\83\81\83j
\83\85\81[
\82É
\92Ç
\89Á
1352 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g(LoadHistory
\82æ
\82è
\82à
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1353 FHistoryList := TList.Create;
1355 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1358 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
1359 // FFavorite := TFavorite.Create(FavoriteTreeView);
1360 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1361 FavoriteDM.ReadFavorite;
1363 //
\83\8a\83X
\83g
\83X
\83^
\83C
\83\8b
1364 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1366 //
\83\81\83C
\83\93\83N
\81[
\83\8b\83o
\81[
\88Ê
\92u
1367 // MainCoolBar.Top := 0;
1368 // MainCoolBar.Left := 0;
1370 //
\83A
\83j
\83\81\83p
\83l
\83\8b\88Ê
\92u
1371 AnimePanel.Top := 0;
1372 AnimePanel.Left := 0;
1374 //
\8ae
\8eí
\89Â
\8e\8b\8fó
\91Ô
\82È
\82Ç
\90Ý
\92è
1376 //
\83L
\83\83\83r
\83l
\83b
\83g
1377 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1379 //
\83\81\83b
\83Z
\81[
\83W
\83o
\81[
1380 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1381 MsgBarVisibleActionExecute(nil);
1382 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1384 //
\83X
\83e
\81[
\83^
\83X
\83o
\81[
1385 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1386 StatusBarVisibleActionExecute(nil);
1388 //
\83t
\83H
\83\93\83g
\81E
\90F
\90Ý
\92è
1389 TreeView.Items.BeginUpdate;
1390 FavoriteTreeView.Items.BeginUpdate;
1391 ListView.Items.BeginUpdate;
1393 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1394 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1395 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1396 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1398 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1399 FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1400 FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1401 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1403 ListView.Font.Name := GikoSys.Setting.ListFontName;
1404 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1405 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1406 //ListView.Color := GikoSys.Setting.ListBackColor;
1407 ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1408 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1409 FOddColor := GikoSys.Setting.OddColor;
1412 TreeView.Items.EndUpdate;
1413 FavoriteTreeView.Items.EndUpdate;
1414 ListView.Items.EndUpdate;
1416 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1417 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1419 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
1420 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1421 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1422 FDragWFirst := false;
1423 SetContent(BrowserNullTab); //
\83u
\83\89\83E
\83U
\82ð
\8bó
\94\92\95\
\8e¦
1424 // TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
1425 // TreeView.Selected := TreeView.Items[0]; //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
1428 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95\9c\8c³
1429 wp.length := sizeof(wp);
1430 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1431 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1432 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1433 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1434 wp.showCmd := SW_HIDE;
1435 SetWindowPlacement(Handle, @wp);
1437 // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1438 // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1439 if GikoSys.Setting.WindowMax then
1440 WindowState := wsMaximized;
1442 //
\83M
\83R
\83A
\83j
\83\81
1444 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1445 if FileExists(FileName) then
1446 Animate.FileName := FileName;
1454 //
\83X
\83\8c\91S
\95\94\95\
\8e¦
\83{
\83^
\83\93\82ð
\89\9f\82³
\82ê
\82½
\8fó
\91Ô
\82É
\82·
\82é
1455 AllItemAction.Checked := True;
1456 AllResAction.Checked := True;
1458 //TreeView
\82Ì
\8e×
\96\82\8fL
\82¢ToolTip
\82ð
\94ñ
\95\
\8e¦
1459 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1460 Style := Style or TVS_NOTOOLTIPS;
1461 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1463 //
\83c
\83\8a\81[
\82ð
\83\81\83C
\83\93\82¾
\82¯
\95\
\8e¦
\82É
\82µ
\82Ä
\8dÅ
\91å
\89»
1464 TreeView.Align := alClient;
1465 FavoriteTreeView.Align := alClient;
1466 FavoriteTreeView.Visible := False;
1468 //
\83u
\83\89\83E
\83U
\83T
\83C
\83Y
\95Ï
\8dX
\82Ì
\8f\89\8aú
\89»
1469 // FBrowserSizeFlag := False;
1470 // FBrowserSizeHeight := ViewPanel.Height;
1472 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1473 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1475 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1476 ArrangeAction.Execute;
1478 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1479 case GikoSys.Setting.ListWidthState of
1481 ViewPanel.Width := 1;
1482 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1483 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1486 ViewPanel.Width := GikoSys.Setting.ListWidth;
1487 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1488 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1491 ViewPanel.Width := GikoSys.Setting.ListWidth;
1492 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1493 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1497 case GikoSys.Setting.ListHeightState of
1499 ViewPanel.Height := 1;
1500 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1501 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1504 ViewPanel.Height := GikoSys.Setting.ListHeight;
1505 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1506 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1509 ViewPanel.Height := GikoSys.Setting.ListHeight;
1510 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1511 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1516 //
\83v
\83\8d\83O
\83\8c\83X
\83o
\81[
\82Ì
\8f\89\8aú
\89»
1517 // ProgressBar.Visible := False;
1518 ProgressBar.Parent := StatusBar;
1519 ProgressBar.Top := 2;
1520 ProgressBar.Left := 0;
1521 ProgressBar.Width := StatusBar.Panels[0].Width;
1522 ProgressBar.Height := StatusBar.Height - 2;
1523 ProgressBar.Position := 0;
1525 //
\83_
\83E
\83\93\83\8d\81[
\83h
\83I
\83u
\83W
\83F
\83N
\83g
1526 FControlThread := TThreadControl.Create(True);
1527 FControlThread.MaxThreadCount := 1;
1528 FControlThread.Resume;
1529 FControlThread.OnDownloadEnd := DownloadEnd;
1530 FControlThread.OnDownloadMsg := DownloadMsg;
1531 FControlThread.OnWork := Work;
1532 FControlThread.OnWorkBegin := WorkBegin;
1533 FControlThread.OnWorkEnd := WorkEnd;
1534 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1536 //
\8di
\8d\9e\8c\9f\8dõ
\97\9a\97ð
1537 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1539 //
\83u
\83\89\83E
\83U
\83^
\83u
\90Ý
\92è
1542 BrowserBoardNameLabel.Caption := '';
1543 BrowserNameLabel.Caption := '';
1546 FTabHintIndex := -1;
1548 //
\83\8a\83\93\83N
\83o
\81[
1551 //
\83\81\83j
\83\85\81[
\83t
\83H
\83\93\83g
1554 //
\83c
\81[
\83\8b\83o
\81[Wrapable
1555 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1556 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1558 KeepDefaultToolButton(StdToolBar, TmpToolBar);
1559 KeepDefaultToolButton(ListToolBar, TmpToolBar);
1560 KeepDefaultToolButton(BrowserToolBar, TmpToolBar);
1562 MakeDefaultINIFile();
1563 //
\83c
\81[
\83\8b\83{
\83^
\83\93\93Ç
\82Ý
\8d\9e\82Ý
1564 ReadToolBarSetting(ActionList, StdToolBar);
1565 ReadToolBarSetting(ActionList, ListToolBar);
1567 for i := ListToolBar.ControlCount - 1 downto 0 do
1569 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1571 //
\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·
1572 if (i + 1) < ListToolBar.ControlCount then
1573 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1574 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1575 ListToolBar.Controls[ i + 1 ].Visible := False;
1577 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
1578 ListToolBar.Controls[ i ].Visible := False;
1579 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
1580 SelectComboBox.Parent := ListToolBar;
1581 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1582 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1583 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
1584 SelectComboBoxSplitter.Parent := ListToolBar;
1585 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1592 ReadToolBarSetting(ActionList, BrowserToolBar);
1595 //
\83\8c\83X
\95\
\8e¦
\94Í
\88Í
1596 FResRangeMenuSelect := GikoSys.ResRange;
1597 case GikoSys.ResRange of
1600 AllResAction.Execute;
1604 SelectComboBox.Text := SelectComboBox.Items[ 1 ];
1605 SelectResAction.Checked := True;
1608 // ResRangeAction.Execute;
1609 case FResRangeMenuSelect of
1610 Ord( grrKoko ): OnlyKokoResAction.Checked := True;
1611 Ord( grrNew ): OnlyNewResAction.Checked := True;
1612 100: OnlyAHundredResAction.Checked := True;
1616 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\95\
\8e¦
\94Í
\88Í
1617 // ThreadRangeAction.Execute;
1618 case GikoSys.Setting.ThreadRange of
1621 AllItemAction.Checked := True;
1626 LogItemAction.Checked := True;
1631 NewItemAction.Checked := True;
1636 //
\83A
\83h
\83\8c\83X
\83o
\81[
1637 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1639 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³
\82ÍFormShow
\82É
\88Ú
\93®
\82µ
\82½
1641 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\82ª
\96³
\82¢
\8fê
\8d\87\82Í
\83\81\83b
\83Z
\81[
\83W
\95\
\8e¦
1642 if not FileExists(GikoSys.GetBoardFileName) then begin
1643 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
1644 + '
\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
1645 + '
\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';
1646 MsgBox(SplashWindow.Handle, msg, '
\83M
\83R
\83i
\83r', MB_OK or MB_ICONINFORMATION);
1647 NewBoardAction.Execute;
1650 //
\83L
\81[
\90Ý
\92è
\93Ç
\82Ý
\8d\9e\82Ý
1651 GikoSys.LoadKeySetting(ActionList);
1653 //
\8dÅ
\8fI
\8f\84\89ñ
\8e\9e\8aÔ
1654 // FLastRoundTime := 0;
1657 FHint := TResPopup.Create(Self);
1659 //
\8dÅ
\8cã
\82É
\91I
\91ð
\82³
\82ê
\82½
\83L
\83\83\83r
\83l
\83b
\83g
\82Ì
\95\9c\8c³
1660 CabinetVisible( False );
1661 if GikoSys.Setting.CabinetVisible then begin
1662 i := CabinetSelectPopupMenu.Items.Count - 1;
1663 if GikoSys.Setting.CabinetIndex = i - 1 then
1664 CabinetHistoryAction.Execute
1665 else if GikoSys.Setting.CabinetIndex = i then
1666 CabinetFavoriteAction.Execute
1668 if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1669 ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1670 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô 2
1671 FIsIgnoreResize := True;
1672 CabinetBBSAction.Execute;
1675 ShowBBSTreeOld( BBSs[ 0 ] );
1676 PostMessage( Handle, USER_TREECLICK, 0, 0 );
1679 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô 3
1680 FIsIgnoreResize := True;
1682 //
\83I
\81[
\83g
\83\8d\83O
\83C
\83\93
1683 if GikoSys.Setting.AutoLogin then
1684 LoginAction.Execute;
1686 //
\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
1687 for i := 1 to ParamCount do begin
1688 MoveToURL(ParamStr(i));
1693 s := GikoSys.FAbon.NGwordname;
1694 StatusBar.Panels[2].Text := s;
1695 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1696 StatusBarResize(Sender);
1698 dummy1.Caption := ItemReservPMenu.Caption;
1699 dummy1.Hint := ItemReservPMenu.Hint;
1701 //Samba24
\82Ì
\83t
\83@
\83C
\83\8b\83`
\83F
\83b
\83N
1702 GikoSys.SambaFileExists();
1704 //
\83^
\83u
\8e©
\93®
\93Ç
\82Ý
\8d\9e\82Ý (AV
\94
\90¶
\82Ì
\82½
\82ß
\88ê
\8e\9e\95\95\88ó)
1707 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82É
\95Û
\91¶
1708 procedure TGikoForm.SaveCoolBarSettings;
1714 if IsIconic( Handle ) or FIsIgnoreResize then
1717 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Main)
1718 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1719 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1720 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1721 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1722 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1724 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Board)
1725 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1726 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1727 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1728 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1729 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1731 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Browser)
1732 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1733 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1734 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1735 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1736 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1741 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82©
\82ç
\95\9c\8c³
1742 procedure TGikoForm.LoadCoolBarSettings;
1748 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Main)
1749 MainCoolBar.Bands.BeginUpdate;
1751 // for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1752 for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin
1753 CoolSet := GikoSys.Setting.MainCoolSet[i];
1754 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1755 FIsIgnoreResize := False;
1756 SaveCoolBarSettings;
1759 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1760 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1761 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1764 MainCoolBar.Bands.EndUpdate;
1767 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Board)
1768 ListCoolBar.Bands.BeginUpdate;
1770 // for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1771 for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin
1772 CoolSet := GikoSys.Setting.ListCoolSet[i];
1773 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1774 FIsIgnoreResize := False;
1775 SaveCoolBarSettings;
1778 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1779 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1780 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1783 ListCoolBar.Bands.EndUpdate;
1786 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Browser)
1787 BrowserCoolBar.Bands.BeginUpdate;
1789 // for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1790 for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
1791 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1792 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1793 FIsIgnoreResize := False;
1794 SaveCoolBarSettings;
1797 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1798 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1799 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1802 BrowserCoolBar.Bands.EndUpdate;
1810 procedure TGikoForm.FormShow(Sender: TObject);
1812 ShowWindow(Application.Handle, SW_HIDE);
1814 //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½
1815 //
\83c
\81[
\83\8b\83o
\81[
\95\
\8e¦
1816 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1817 StdToolBarVisibleActionExecute( nil );
1818 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1819 AddressBarVisibleActionExecute( nil );
1820 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1821 LinkBarVisibleActionExecute( nil );
1822 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1823 ListToolBarVisibleActionExecute( nil );
1824 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1825 ListNameBarVisibleActionExecute( nil );
1826 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1827 BrowserToolBarVisibleActionExecute( nil );
1828 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1829 BrowserNameBarVisibleActionExecute( nil );
1831 //
\83u
\83\89\83E
\83U
\83^
\83u
1832 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1833 BrowserTabVisibleActionExecute(nil);
1835 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1836 BrowserTabTopAction.Checked := True;
1837 BrowserTabTopActionExecute(nil);
1839 BrowserTabBottomAction.Checked := True;
1840 BrowserTabBottomActionExecute(nil);
1843 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1844 BrowserTabTabStyleAction.Checked := True;
1845 BrowserTabTabStyleActionExecute(nil);
1846 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1847 BrowserTabButtonStyleAction.Checked := True;
1848 BrowserTabButtonStyleActionExecute(nil);
1850 BrowserTabFlatStyleAction.Checked := True;
1851 BrowserTabFlatStyleActionExecute(nil);
1854 // CoolBar
\95\9c\8c³
1855 LoadCoolBarSettings;
1857 FIsIgnoreResize := False;
1860 //FormCrete
\82©
\82ç
\88Ú
\93®
\81B
1861 if GikoSys.Setting.TabAutoLoadSave then begin
1862 TabAutoLoadAction.Execute;
1867 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1869 // if GikoForm.WindowState <> wsMinimized then
1870 // SaveCoolBarSettings;
1871 if ( GikoSys.Setting.ShowDialogForEnd ) and
1872 (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
1877 if GikoSys.Setting.TabAutoLoadSave then begin
1878 TabAutoSaveAction.Execute;
1881 //Application.HookMainWindow(Hook);
1882 Application.UnhookMainWindow(Hook);
1883 Application.Terminate;
1886 procedure TGikoForm.FormDestroy(Sender: TObject);
1889 // CoolSet: TCoolSet;
1890 wp : TWindowPlacement;
1893 // Application.OnDeactivate := nil;
1894 // Self.OnDeactivate := nil;
1897 if GetActiveList is TBBS then begin
1898 for i := 0 to ListView.Columns.Count - 1 do
1899 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1900 end else if GetActiveList is TCategory then begin
1901 for i := 0 to ListView.Columns.Count - 1 do
1902 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1903 end else if GetActiveList is TBoard then begin
1904 for i := 0 to ListView.Columns.Count - 1 do
1905 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1910 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95Û
\91¶
1911 wp.length := sizeof(wp);
1912 GetWindowPlacement(Handle, @wp);
1913 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1914 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1915 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1916 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1917 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1919 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1920 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1921 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1922 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1923 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1924 if ArrangeAction.Checked then
1925 GikoSys.Setting.ListOrientation := gloVertical
1927 GikoSys.Setting.ListOrientation := gloHorizontal;
1928 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1933 //
\83\8c\83X
\95\
\8e¦
\94Í
\88Í
1934 if not GikoSys.Setting.ResRangeHold then
1935 GikoSys.Setting.ResRange := FResRangeMenuSelect;
1939 //
\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è
1940 //
\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¢
1942 //
\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
1944 if GikoForm.WindowState <> wsMinimized then
1945 SaveCoolBarSettings;
1948 GikoSys.Setting.WriteWindowSettingFile;
1949 GikoSys.Setting.WriteNameMailSettingFile;
1953 //
\82¨
\8bC
\82É
\93ü
\82è
\95Û
\91¶
1955 //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é
1956 FavoriteDM.WriteFavorite;
1962 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1963 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
1964 GikoSys.Setting.ShowDialogForAllTabClose := false;
1965 AllTabCloseAction.Execute;
1966 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
1970 LockWindowUpdate(Self.Handle);
1971 for i := FBrowsers.Count - 1 downto 0 do begin
1972 TWebBrowser(FBrowsers[i]).Free;
1975 FBrowsers.Capacity := 0;
1980 if BrowserNullTab <> nil then begin
1981 BrowserNullTab.Browser := nil; {*BrowserNullTab
\82ÌBrowser
\82Í
\90Ý
\8cv
\8e\9e\82É
\93\
\82è
\95t
\82¯
\82Ä
\82é
\93z
1982 *
\82È
\82Ì
\82Å
\82±
\82±
\82ÅFree
\82³
\82ê
\82é
\82Æ
\8d¢
\82é
\82Ì
\82Å
\82Í
\82¸
\82µ
\82Ä
\82µ
\82Ü
\82¤
\81B
1984 BrowserNullTab.Free;
1988 LockWindowUpdate(0);
1990 TreeView.Items.BeginUpdate;
1991 TreeView.Items.GetFirstNode.Free;
1992 TreeView.Items.Clear;
1993 TreeView.Items.EndUpdate;
1997 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\95Û
\91¶
1999 //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
2000 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
2004 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
\95Û
\91¶
2018 //
\8f\84\89ñ
\83\8a\83X
\83g
\95Û
\91¶&
\94j
\8aü
2020 RoundList.SaveRoundFile;
2034 FControlThread.Terminate;
2035 FControlThread.WaitFor;
2039 FControlThread.Free;
2042 // TBBS
\82Í
\95Û
\8e\9d\82µ
\82Ä
\82¢
\82é TCategory, TBoard, TThreadItem
\82·
\82×
\82Ä
\82ð
\8aJ
\95ú
\82·
\82é
2043 // 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Å
2044 // BoardPluteIns
\82Ì
\8aJ
\95ú
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ
2046 for i := Length( BBSs ) - 1 downto 0 do begin
2047 if BBSs[ i ] <> nil then
2055 for i := Length( BoardPlugIns ) - 1 downto 0 do begin
2056 if BoardPlugIns[ i ] <> nil then
2057 BoardPlugIns[ i ].Free;
2058 BoardPlugIns[ i ] := nil;
2064 if FEvent <> nil then
2068 if FHint <> nil then begin
2069 FHint.ReleaseHandle;
2074 if TPreviewBrowser <> nil then begin
2075 FPreviewBrowser.Free;
2076 FPreviewBrowser := nil;
2083 //
\83t
\83H
\81[
\83\80\83N
\83\8d\81[
\83Y
2084 procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
2087 //
\83L
\83\83\83r
\83l
\83b
\83g
\81~
\83{
\83^
\83\93\83N
\83\8a\83b
\83N
2088 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
2090 CabinetVisibleAction.Execute;
2091 // CabinetPanelVisible(false);
2094 //
\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
2095 procedure TGikoForm.SetBBSMenu;
2098 item : TBBSMenuItem;
2101 //
\83\81\83j
\83\85\81[
\82ð
\8dí
\8f\9c
2102 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
2104 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
2105 CabinetSelectPopupMenu.Items[ i ].Free;
2106 CabinetMenu.Items[ i ].Free;
2107 BBSSelectPopupMenu.Items[ i ].Free;
2113 //
\83\81\83j
\83\85\81[
\82ð
\90Ý
\92è
2114 for i := Length( BBSs ) - 1 downto 0 do begin
2116 item := TBBSMenuItem.Create( PopupMenu );
2117 item.Caption := BBSs[ i ].Title;
2118 item.Data := BBSs[ i ];
2119 item.OnClick := BBSMenuItemOnClick;
2120 CabinetSelectPopupMenu.Items.Insert( 0, item );
2121 item := TBBSMenuItem.Create( PopupMenu );
2122 item.Caption := BBSs[ i ].Title;
2123 item.Data := BBSs[ i ];
2124 item.OnClick := BBSMenuItemOnClick;
2125 CabinetMenu.Insert( 0, item );
2126 item := TBBSMenuItem.Create( PopupMenu );
2127 item.Caption := BBSs[ i ].Title;
2128 item.Data := BBSs[ i ];
2129 item.OnClick := BBSMenuItemOnClick;
2130 BBSSelectPopupMenu.Items.Insert( 0, Item );
2137 procedure TGikoForm.ReloadBBS;
2142 //
\83^
\83u
\83N
\83\8d\81[
\83Y
2143 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
2144 GikoSys.Setting.ShowDialogForAllTabClose := false;
2145 AllTabCloseAction.Execute;
2146 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
2148 SetContent(BrowserNullTab);
2149 //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
2150 TreeView.Items.Clear;
2154 for i := Length( BBSs ) - 1 downto 0 do begin
2155 if BBSs[ i ] <> nil then
2164 FTreeType := gttNone;
2166 GikoSys.ListBoardFile; //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\93Ç
\8d\9e
2168 // BBS
\83\81\83j
\83\85\81[
\82Ì
\8dX
\90V
2171 ShowBBSTree( BBSs[ 0 ] );
2173 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
2178 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
2179 FavoriteDM.WriteFavorite;
2181 FavoriteDM.ReadFavorite;
2187 //
\83{
\81[
\83h
\83c
\83\8a\81[
\90Ý
\92è
2188 procedure TGikoForm.SetBoardTreeNode(
2194 CategoryNode: TTreeNode;
2195 BoardNode: TTreeNode;
2196 Category: TCategory;
2199 //
\94Â
\83\8a\83X
\83g
\82Ì
\90Ý
\92è
2200 FActiveBBS := inBBS;
2201 TreeView.Items.BeginUpdate;
2202 TreeView.Items.Clear;
2204 if not inBBS.IsBoardFileRead then
2205 GikoSys.ReadBoardFile( inBBS );
2207 if SplashWindow <> nil then
2208 SplashWindow.ProgressBar.Max := inBBS.Count;
2212 //
\83L
\83\83\83r
\83l
\83b
\83g
\95\
\8e¦
\91O
\82É
\8dÄ
\83\
\81[
\83g
2213 if ( GikoSys.Setting.BBSSortIndex <> 0 ) or ( GikoSys.Setting.BBSSortOrder <> true ) then begin
2214 Sort.SortOrder := true;
2215 Sort.SortIndex := 0;
2216 Sort.SortNoFlag := true;
2217 inBBS.Sort(CategorySortProc);
2220 Root := TreeView.Items.Add( nil, inBBS.Title );
2221 Root.ImageIndex := ITEM_ICON_2CH1;
2222 Root.SelectedIndex := ITEM_ICON_2CH2;
2224 for i := 0 to inBBS.Count - 1 do begin
2225 Category := TCategory(inBBS.Items[i]);
2226 CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
2227 CategoryNode.Data := Category;
2228 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
2229 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
2231 //
\83L
\83\83\83r
\83l
\83b
\83g
\95\
\8e¦
\91O
\82É
\8dÄ
\83\
\81[
\83g
2232 if ( GikoSys.Setting.CategorySortIndex <> 0 ) or ( GikoSys.Setting.CategorySortOrder <> true ) then begin
2233 Sort.SortOrder := true;
2234 Sort.SortIndex := 0;
2235 Sort.SortNoFlag := true;
2236 Category.CustomSort(BoardSortProc);
2239 for j := 0 to Category.Count - 1 do begin
2240 Board := TBoard(Category.Items[j]);
2242 BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
2243 BoardNode.Data := Board;
2244 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
2245 if not Board.IsLogFile then begin
2246 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
2247 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
2249 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
2250 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
2251 for k := 0 to Board.Count - 1 do begin
2252 if Board.Items[ k ].IsLogFile then begin
2253 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
2254 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
2263 CategoryNode.Expanded := Category.NodeExpand;
2265 if SplashWindow <> nil then begin
2266 SplashWindow.ProgressBar.StepIt;
2267 Application.ProcessMessages;
2271 TreeView.Items.EndUpdate;
2275 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
2277 COLUMN: array[0..0] of string = ('
\83J
\83e
\83S
\83\8a\96¼');
2279 ListColumn: TListColumn;
2282 ListView.Items.BeginUpdate;
2284 Screen.Cursor := crHourGlass;
2286 ListView.Columns.Clear;
2287 for i := 0 to Length(COLUMN) - 1 do begin
2288 ListColumn := ListView.Columns.Add;
2289 ListColumn.Caption := COLUMN[i];
2290 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
2293 ListView.Items.Count := 0;
2294 ListView.Items.Clear;
2295 ListView.Items.Count := ABBS2ch.Count;
2297 // UpFolderAction.Enabled := False;
2298 // AllItemAction.Enabled := False;
2299 // LogItemAction.Enabled := False;
2300 // NewItemAction.Enabled := False;
2301 // SelectItemAction.Enabled := False;
2302 // ListDownloadToolButton.Enabled := False;
2303 // BoardReservToolButton.Enabled := False;
2304 // ListThreadDownloadToolButton.Enabled := False;
2306 ListNameLabel.Caption := ABBS2ch.Title;
2307 FolderImage.Picture := nil;
2308 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
2310 FSortIndex := GikoSys.Setting.BBSSortIndex;
2311 FSortOrder := GikoSys.Setting.BBSSortOrder;
2312 if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
2313 ListViewSort(nil, ListView.Column[FSortIndex]);
2315 Result := ABBS2ch.Count;
2317 Screen.Cursor := crDefault;
2318 ListView.Items.EndUpdate;
2322 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
2324 COLUMN: array[0..2] of string = ('
\94Â
\96¼', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e');
2326 ListColumn: TListColumn;
2329 ListView.Items.BeginUpdate;
2331 Screen.Cursor := crHourGlass;
2333 ListView.Columns.Clear;
2334 for i := 0 to Length(COLUMN) - 1 do begin
2335 ListColumn := ListView.Columns.Add;
2336 ListColumn.Caption := COLUMN[i];
2337 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
2340 ListView.Items.Count := 0;
2341 ListView.Items.Clear;
2342 ListView.Items.Count := Category.Count;
2344 // UpFolderAction.Enabled := True;
2345 // AllItemAction.Enabled := False;
2346 // LogItemAction.Enabled := False;
2347 // NewItemAction.Enabled := False;
2348 // SelectItemAction.Enabled := False;
2349 // ListDownloadToolButton.Enabled := False;
2350 // BoardReservToolButton.Enabled := False;
2351 // ListThreadDownloadToolButton.Enabled := False;
2353 ListNameLabel.Caption := Category.Title;
2354 FolderImage.Picture := nil;
2355 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2357 FSortIndex := GikoSys.Setting.CategorySortIndex;
2358 FSortOrder := GikoSys.Setting.CategorySortOrder;
2359 if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
2360 ListViewSort(nil, ListView.Column[FSortIndex]);
2362 Result := Category.Count;
2364 Screen.Cursor := crDefault;
2365 ListView.Items.EndUpdate;
2369 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2371 COLUMN: array[0..7] of string = ('
\83X
\83\8c\83b
\83h
\96¼', '
\83J
\83E
\83\93\83g', '
\8eæ
\93¾', '
\90V
\92\85',
2372 '
\96¢
\93Ç', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e', '
\83X
\83\8c\8dì
\90¬
\93ú
\8e\9e');
2373 COLUMN_NONACQUIREDCOUNT: string = '
\96¢
\8eæ
\93¾';
2374 COLUMN_ALIGNMENT: array[0..7] of TAlignment = (taLeftJustify, taRightJustify,
2375 taRightJustify, taRightJustify,
2376 taRightJustify, taLeftJustify,
2377 taLeftJustify, taLeftJustify);
2378 //No,
\83X
\83\8c\83b
\83h
\96¼,
\83J
\83E
\83\93\83g,
\8f\84\89ñ
\97\
\96ñ,
\8eæ
\93¾
\93ú
\8e\9e
2380 ListColumn: TListColumn;
2383 ListView.Items.BeginUpdate;
2385 Screen.Cursor := crHourGlass;
2387 //
\83`
\83\89\82Â
\82«
\96h
\8e~
\82Ì
\82½
\82ß
\81A
\95Ï
\8dX
\82³
\82ê
\82Ä
\82¢
\82é
\8fê
\8d\87\82Ì
\82Ý
2388 //
\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Ó
2389 if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2391 ListView.Columns.Clear;
2392 for i := 0 to Length(COLUMN) - 1 do begin
2393 ListColumn := ListView.Columns.Add;
2394 ListColumn.Caption := COLUMN[i];
2395 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2396 ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2399 if GikoSys.Setting.NonAcquiredCount then
2400 ListView.Columns[2].Caption := COLUMN_NONACQUIREDCOUNT
2402 ListView.Columns[2].Caption := COLUMN[2];
2404 ListView.Items.Count := 0;
2405 ListView.Items.Clear;
2407 case GikoForm.ViewType of
2408 gvtAll: ListView.Items.Count := Board.Count;
2409 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2410 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2411 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2414 ListNameLabel.Caption := Board.Title;
2415 FolderImage.Picture := nil;
2416 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2418 FSortIndex := GikoSys.Setting.BoardSortIndex;
2419 FSortOrder := GikoSys.Setting.BoardSortOrder;
2420 if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
2421 ListViewSort(nil, ListView.Column[FSortIndex]);
2423 Result := Board.Count;
2425 Screen.Cursor := crDefault;
2426 ListView.Items.EndUpdate;
2430 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2432 // FileName: string;
2433 // DateTime: TDateTime;
2436 Category: TCategory;
2438 ThreadItem: TThreadItem;
2440 ActivListObj : TObject;
2442 ActivListObj := ActiveList;
2443 if ActivListObj is TBBS then begin
2444 BBS := TBBS(ActivListObj);
2446 ListView.StateImages := nil;
2448 if BBS = nil then Exit;
2449 if BBS.Count <= 0 then Exit;
2450 if Item = nil then Exit;
2451 if Item.Index >= BBS.Count then Exit;
2452 if ListView.Items.Count = 0 then Exit;
2454 if not (BBS.Items[Item.index] is TCategory) then Exit;
2455 Category := TCategory(BBS.Items[Item.index]);
2457 if Category = nil then Exit;
2459 if ListNumberVisibleAction.Checked then
2460 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2462 Item.Caption := Category.Title;
2464 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2465 Item.Data := Category;
2466 end else if ActivListObj is TCategory then begin
2467 Category := TCategory(ActivListObj);
2469 ListView.StateImages := nil;
2471 if Category = nil then Exit;
2472 if Category.Count <= 0 then Exit;
2473 if Item = nil then Exit;
2474 if Item.Index >= Category.Count then Exit;
2475 if ListView.Items.Count = 0 then Exit;
2477 if not (Category.Items[Item.Index] is TBoard) then Exit;
2478 Board := TBoard(Category.Items[Item.Index]);
2480 if Board = nil then Exit;
2482 if ListNumberVisibleAction.Checked then
2483 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2485 Item.Caption := Board.Title;
2487 if Item.SubItems.Count <> 2 then begin
2488 Item.SubItems.Clear;
2489 Item.SubItems.Add('');
2490 Item.SubItems.Add('');
2493 Item.ImageIndex := ITEM_ICON_BOARD1;
2496 Item.SubItems[0] := Board.RoundName // '
\97\
\96ñ'
2498 Item.SubItems[0] := '';
2500 if Board.RoundDate = ZERO_DATE then begin
2501 Item.SubItems[1] := '';
2503 Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2505 end else if ActivListObj is TBoard then begin
2506 Board := TBoard(ActivListObj);
2508 if GikoSys.Setting.ListIconVisible then
2509 ListView.StateImages := StateIconImageList
2511 ListView.StateImages := nil;
2513 case GikoForm.ViewType of
2514 gvtAll: BoardCnt := Board.Count;
2515 gvtLog: BoardCnt := Board.GetLogThreadCount;
2516 gvtNew: BoardCnt := Board.GetNewThreadCount;
2517 gvtUser: BoardCnt := Board.GetUserThreadCount;
2522 // if Board = nil then Exit;
2523 if BoardCnt <= 0 then Exit;
2524 if Item = nil then Exit;
2525 if Item.Index > BoardCnt then Exit;
2526 if ListView.Items.Count = 0 then Exit;
2528 // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2531 case GikoForm.ViewType of
2532 gvtAll: if Item.Index >= Board.Count then Exit else
2533 ThreadItem := TThreadItem(Board.Items[Item.Index]);
2534 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2535 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2536 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2539 if ThreadItem = nil then Exit;
2541 // if ListNumberVisibleAction.Checked then
2542 // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2544 RepStr := ThreadItem.Title;
2545 RepStr := CustomStringReplace(RepStr, '<', '<' );
2546 RepStr := CustomStringReplace(RepStr, '>', '>' );
2547 RepStr := CustomStringReplace(RepStr, '"', '"' );
2548 RepStr := CustomStringReplace(RepStr, '&', '&' );
2549 //RepStr := StringReplace(RepStr, '
\81\97\81M', ',', [rfReplaceAll]);
2551 if Item.SubItems.Count <> 7 then begin
2552 Item.SubItems.Clear;
2553 Item.SubItems.Add('');
2554 Item.SubItems.Add('');
2555 Item.SubItems.Add('');
2556 Item.SubItems.Add('');
2557 Item.SubItems.Add('');
2558 Item.SubItems.Add('');
2559 Item.SubItems.Add('');
2562 if ListNumberVisibleAction.Checked then
2563 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2565 Item.Caption := RepStr;
2567 case ThreadItem.AgeSage of
2568 gasNone: Item.StateIndex := -1;
2569 gasNew: Item.StateIndex := 0;
2570 gasAge: Item.StateIndex := 1;
2571 gasSage: Item.StateIndex := 2;
2574 if ThreadItem.IsLogFile then begin
2575 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2576 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2577 if GikoSys.Setting.NonAcquiredCount then
2578 Item.SubItems[1] := IntToStr(ThreadItem.AllResCount - ThreadItem.Count)
2580 Item.SubItems[1] := IntToStr(ThreadItem.Count);
2581 if ThreadItem.NewResCount = 0 then
2582 Item.SubItems[2] := ''
2584 Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2585 Item.SubItems[3] := '';
2586 if ThreadItem.Round then
2587 Item.SubItems[4] := ThreadItem.RoundName
2589 Item.SubItems[4] := '';
2590 if ThreadItem.RoundDate = ZERO_DATE then begin
2591 Item.SubItems[5] := '';
2593 Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2594 if ThreadItem.NewArrival then
2595 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2596 if ThreadItem.CreateDate = ZERO_DATE then begin
2597 Item.SubItems[6] := '';
2599 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2602 Item.ImageIndex := ITEM_ICON_THREAD1;
2603 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2604 Item.SubItems[1] := '';
2605 Item.SubItems[2] := '';
2606 Item.SubItems[3] := '';
2607 Item.SubItems[4] := '';
2608 Item.SubItems[5] := '';
2609 if not GikoSys.Setting.CreationTimeLogs then
2610 if ThreadItem.CreateDate = ZERO_DATE then
2611 Item.SubItems[6] := ''
2613 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2617 Item.Data := ThreadItem;
2621 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2622 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2623 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2624 var Index: Integer);
2630 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2636 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2637 EndIndex: Integer; OldState, NewState: TItemStates);
2642 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2650 threadItem : TThreadItem;
2652 Protocol, Host, Path, Document, Port, Bookmark: string;
2657 ActiveFileName: string;
2663 if not( TObject(Sender) is TWebBrowser )then
2667 if (TWebBrowser(Sender) <> nil) and (not TWebBrowser(Sender).Busy) and (Assigned(TWebBrowser(Sender).Document)) then begin
2668 if LowerCase(OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset) <> 'shift_jis' then begin
2669 OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset := 'shift_jis';
2676 if PreviewTimer.Enabled then
2677 PreviewTimer.Enabled := False;
2678 Application.CancelHint;
2680 if GetActiveContent <> nil then
2681 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2683 ActiveFileName := '';
2685 FActiveContent := nil;
2689 StatusBar.Panels[1].Text := Text;
2691 if FHint <> nil then begin
2692 FHint.ReleaseHandle;
2695 if FPreviewBrowser <> nil then
2696 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2698 if not GikoSys.Setting.UnActivePopup then
2699 if not GikoForm.Active then
2702 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2703 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2706 Ext := AnsiLowerCase(ExtractFileExt(Text));
2707 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2708 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2709 if FPreviewBrowser = nil then begin
2710 FPreviewBrowser := TPreviewBrowser.Create(Self);
2711 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2712 TOleControl(FPreviewBrowser).Parent := nil;
2714 FPreviewBrowser.Navigate(BLANK_HTML);//
\91O
\89ñ
\82Ì
\83v
\83\8c\83r
\83\85\81[
\89æ
\91\9c\8fÁ
\8b\8e\97p
2715 FPreviewURL := Text;
2716 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2717 PreviewTimer.Enabled := True;
2718 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2719 if Pos('mailto:', Text) = 1 then begin
2720 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2721 //
\83M
\83R
\83i
\83r
\83X
\83\8c \83p
\81[
\83g3
\82Ì466
\8e\81\82É
\8a´
\8eÓ
2723 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2724 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2725 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2726 if (Assigned(e)) then begin
2727 tmp2 := ZenToHan(e.Get_outerText);
2728 if (GikoSys.IsNumeric(tmp2)) then begin
2729 //
\82\93\82Í
\83\8c\83X
\94Ô
\8d\86\82Á
\82Û
\82¢
\82Á
\82·
\81B
2730 wkIntSt := StrToInt(tmp2);
2731 wkIntTo := StrToInt(tmp2);
2732 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2733 FHint.PopupType := gptThread;
2734 SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False);
2736 FHint.PopupType := gptRaw;
2741 threadItem := GetActiveContent;
2742 if Pos('about:blank..', Text) = 1 then begin
2743 if (AnsiPos('http://jbbs.livedoor.com/', threadItem.URL) <> 0) then begin
2744 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2745 Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo);
2746 if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then
2747 buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo)
2748 else if( PathRec.FSt <> 0 ) then
2749 buf := IntToStr(PathRec.FSt);
2750 end else if AnsiPos('machi.to/bbs/', threadItem.URL) <> 0 then begin
2751 URL := threaditem.URL;
2752 buf := Copy(Text,AnsiPos('&st=',Text),Length(Text)-AnsiPos('&st=',Text) + 1);
2754 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2755 buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text));
2761 PathRec := Gikosys.Parse2chURL2(URL);
2762 if (PathRec.FNoParam) then begin
2766 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2767 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
2769 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
2771 URL := GikoSys.GetBrowsableThreadURL( URL );
2772 wkIntSt := PathRec.FSt;
2773 wkIntTo := PathRec.FTo;
2775 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2778 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2780 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2782 end else if wkIntSt > wkIntTo then begin
2787 //if wkIntSt = 0 then
2789 //if wkINtTo = 0 then
2791 //if PathRec.FFirst then
2793 if PathRec.FStBegin then
2795 if PathRec.FToEnd then
2798 //ATitle := ActiveFileName <> PathRec.FKey;
2799 if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
2804 threadItem := BBSsFindThreadFromURL( URL );
2806 if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
2807 board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
2808 if board <> nil then begin
2809 if not board.IsThreadDatRead then
2810 GikoSys.ReadSubjectFile( board );
2811 threadItem := board.FindThreadFromFileName( PathRec.FKey + '.dat' );
2815 if threadItem <> nil then begin
2816 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2817 FHint.PopupType := gptThread;
2818 SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2824 // ShowTextPopup(s);
2825 if FHint.PopupType = gptRaw then begin
2826 if FHint.Caption <> '' then
2829 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2835 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2838 //SysMenuApp: HMenu;
2840 FEnabledCloseButton := Enabled;
2841 SysMenu := GetSystemMenu(Handle, False);
2842 //SysMenuApp := GetSystemMenu(Application.Handle, False);
2844 if Enabled then begin
2845 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2846 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2848 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2849 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2852 DrawMenuBar(Handle);
2853 //DrawMenuBar(Application.Handle);
2856 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2857 var AllowChange: Boolean);
2859 //
\83\
\81[
\83g
\8f\87\82ð
\95Û
\91¶
\82·
\82é
\82æ
\82¤
\82É
\82µ
\82½
\82Ì
\82Å
\8dí
\8f\9c
2860 // if FTreeType = gtt2ch then
2861 // FSortIndex := -1;
2864 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2865 Shift: TShiftState);
2867 if GetActiveList is TBoard then begin
2868 if Key = VK_BACK then begin
2869 // UpFolderButtonClick(Sender);
2870 end else if Key = VK_SPACE then begin
2871 ListDoubleClick(Shift);
2872 end else if Key = VK_RETURN then begin
2875 end else begin // TBBS, TCategory
2876 if Key = VK_BACK then begin
2877 // UpFolderButtonClick(Sender);
2878 end else if Key = VK_SPACE then begin
2880 end else if Key = VK_RETURN then begin
2881 ListDoubleClick(Shift);
2886 function TGikoForm.GetHttpState: Boolean;
2888 Result := FHttpState;
2891 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2892 Column: TListColumn);
2894 if FSortIndex = Column.Index then
2895 FSortOrder := not FSortOrder
2897 FSortOrder := False;
2898 ListViewSort(Sender, Column);
2901 procedure TGikoForm.ListViewSort(Sender: TObject; Column: TListColumn);
2905 wkCategory: TCategory;
2908 for i := 0 to ListView.Columns.Count - 1 do
2909 ListView.Column[i].ImageIndex := -1;
2911 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
2913 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
2915 Sort.SortNoFlag := ListNumberVisibleAction.Checked;
2917 //if TObject(TreeView.Selected.Data) is TBBS then begin
2918 if TObject( FActiveList ) is TBBS then begin
2919 //wkBBS := TBBS(TreeView.Selected.Data);
2920 wkBBS := TBBS( FActiveList );
2921 Sort.SortOrder := FSortOrder;
2922 Sort.SortIndex := Column.Index;
2923 GikoSys.Setting.BBSSortIndex := Column.Index;
2924 GikoSys.Setting.BBSSortOrder := FSortOrder;
2925 wkBBS.Sort(CategorySortProc);
2927 //end else if TObject(TreeView.Selected.Data) is TCategory then begin
2928 end else if TObject( FActiveList ) is TCategory then begin
2929 //wkCategory := TCategory(TreeView.Selected.Data);
2930 wkCategory := TCategory( FActiveList );
2931 Sort.SortOrder := FSortOrder;
2932 Sort.SortIndex := Column.Index;
2933 GikoSys.Setting.CategorySortIndex := Column.Index;
2934 GikoSys.Setting.CategorySortOrder := FSortOrder;
2935 wkCategory.CustomSort(BoardSortProc);
2937 //end else if TObject(TreeView.Selected.Data) is TBoard then begin
2938 end else if TObject( FActiveList ) is TBoard then begin
2939 //wkBoard := TBoard(TreeView.Selected.Data);
2940 wkBoard := TBoard( FActiveList );
2941 Sort.SortOrder := FSortOrder;
2942 Sort.SortIndex := Column.Index;
2943 Sort.SortNonAcquiredCountFlag := GikoSys.Setting.NonAcquiredCount;
2944 GikoSys.Setting.BoardSortIndex := Column.Index;
2945 GikoSys.Setting.BoardSortOrder := FSortOrder;
2946 wkBoard.CustomSort(ThreadItemSortProc);
2949 FSortIndex := Column.Index;
2952 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2953 Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean);
2957 DefaultDraw := True;
2959 DefaultDraw := False;
2960 if (cdsSelected in State) or (cdsHot in State) then begin
2961 Sender.Canvas.Brush.Color := clHighlight;
2962 Sender.Canvas.Font.Color := clHighlightText;
2964 Sender.Canvas.Brush.Color := clBtnFace;
2965 Sender.Canvas.Font.Color := clBtnText;
2967 ARect := Rect(Button.Left, Button.Top, Button.Left + Button.Width, Button.Top + Button.Height);
2968 Sender.Canvas.FillRect(ARect);
2969 DrawText(Sender.Canvas.Handle, PChar(Button.Caption), -1, ARect, DT_SINGLELINE or DT_VCENTER or DT_CENTER);
2972 function TGikoForm.GetTreeNode(Data: TObject): TTreeNode;
2977 Nodes := TreeView.Items;
2979 for i := 0 to Nodes.Count - 1 do begin
2980 if Nodes.Item[i].Data = Data then begin
2981 Result := Nodes.Item[i];
2988 procedure TGikoForm.BrowserBeforeNavigate2(Sender: TObject;
2989 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
2990 Headers: OleVariant; var Cancel: WordBool);
2995 kMenuName: string = 'menu:';
2998 if Pos(kMenuName, URL) <> 0 then begin
2999 sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
3001 if not GikoSys.IsNumeric(sNo) then Exit;
3005 KokoPopupMenu.Tag := StrToInt(sNo);
3006 KokoPopupMenu.Popup(p.x, p.y);
3007 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
3008 Cancel := not GikoSys.Setting.OpenMailer;
3013 procedure TGikoForm.ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
3014 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
3015 var DefaultDraw: Boolean);
3017 ThreadItem: TThreadItem;
3019 // TListView(Sender).Canvas.Font.Style := [];
3020 if TObject(Item.Data) is TThreadItem then begin
3021 ThreadItem := TThreadItem(Item.Data);
3022 if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
3023 ListView.Canvas.Brush.Color := FOddColor;
3025 ListView.Canvas.Brush.Color := FListViewBackGroundColor;
3027 // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
3028 if ThreadItem.UnRead then
3029 TListView(Sender).Canvas.Font.Style := [fsBold];
3033 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
3035 Application.ProcessMessages;
3036 if Application.Terminated then
3038 if PreviewTimer.Enabled then
3039 PreviewTimer.Enabled := False;
3040 //
\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
3041 if FHint <> nil then begin
3042 FHint.ReleaseHandle;
3047 if FPreviewBrowser <> nil then
3048 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
3052 procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
3053 const ARect: TRect; var DefaultDraw: Boolean);
3057 IsBoardNode: Boolean;
3063 Category: TCategory;
3067 DefaultDraw := True;
3069 if FTreeType = gttHistory then Exit;
3071 TreeView.Canvas.Font.Color := clBlue;
3072 IsBoardNode := False;
3073 for i := 0 to TreeView.Items.Count - 1 do begin
3075 if not TreeView.Items[i].IsVisible then
3078 if TObject(TreeView.Items[i].Data) is TCategory then begin
3079 if TreeView.Items[i].Expanded then
3082 IsBoardNode := False;
3083 Category := TCategory(TreeView.Items[i].Data);
3084 for j := 0 to Category.Count - 1 do begin
3085 Board := Category.Items[j];
3086 if Board <> nil then begin
3087 if Board.UnRead > 0 then begin
3095 end else if TObject(TreeView.Items[i].Data) is TBoard then begin
3096 IsBoardNode := True;
3097 Board := TBoard(TreeView.Items[i].Data);
3098 Cnt := Board.UnRead;
3104 Bitmap := TBitmap.Create;
3106 Bitmap.Canvas.Font.Assign(TreeView.Canvas.Font);
3107 Bitmap.Canvas.Font.Style := [fsBold];
3108 NodeWidth := Bitmap.Canvas.TextWidth(TreeView.Items[i].Text);
3113 NodeRect := TreeView.Items[i].DisplayRect(True);
3116 CntText := '(' + IntToStr(Cnt) + ')'
3117 else if Cnt = 1 then
3121 TextWidth := TreeView.Canvas.TextWidth(CntText);
3123 TextRect := Rect(NodeRect.Left + NodeWidth + 8,
3125 NodeRect.Left + NodeWidth + TextWidth + 8,
3127 DrawText(TreeView.Canvas.Handle,
3131 DT_SINGLELINE or DT_VCENTER);
3133 TreeViewCustomDrawItem(nil, nil, [], DefaultDraw);
3136 procedure TGikoForm.TreeViewCustomDrawItem(Sender: TCustomTreeView;
3137 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
3140 Category: TCategory;
3143 DefaultDraw := True;
3145 if FTreeType = gttHistory then Exit;
3147 TreeView.Canvas.Font.Style := [];
3148 if Node <> nil then begin
3149 if TObject(Node.Data) is TCategory then begin
3150 Category := TCategory(Node.Data);
3151 for i := 0 to Category.Count - 1 do begin
3152 Board := Category.Items[i];
3153 if Board <> nil then begin
3154 if Board.UnRead > 0 then begin
3155 TreeView.Canvas.Font.Style := [fsBold];
3160 end else if TObject(Node.Data) is TBoard then begin
3161 Board := TBoard(Node.Data);
3162 if Board.UnRead > 0 then
3163 TreeView.Canvas.Font.Style := [fsBold];
3168 procedure TGikoForm.TreeViewExpanded(Sender: TObject; Node: TTreeNode);
3170 TreeView.Invalidate;
3172 if TObject(Node.Data) is TBBS then begin
3173 TBBS(Node.Data).NodeExpand := True;
3174 end else if TObject(Node.Data) is TCategory then begin
3175 TCategory(Node.Data).NodeExpand := True;
3176 end else if TObject(Node.Data) is TBoard then begin
3177 TBoard(Node.Data).NodeExpand := True;
3181 {procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
3183 TreeSplitter.Visible := PanelVisible;
3184 CabinetPanel.Visible := PanelVisible;
3185 CabinetToolButton.Down := PanelVisible;
3188 procedure TGikoForm.ListViewAllSelect;
3194 procedure TGikoForm.TreeViewDblClick(Sender: TObject);
3199 GetCursorPos(APoint);
3200 APoint := TreeView.ScreenToClient(APoint);
3201 HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
3202 if not (htOnLabel in HitTest) then Exit;
3204 TreeDoubleClick( TreeView.Selected );
3207 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
3209 AddMessageList(Msg, nil, Icon);
3212 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
3216 boardPlugIn : TBoardPlugIn;
3220 if Item.DownType = gdtBoard then
3221 ATitle := Item.Board.Title
3223 ATitle := Item.ThreadItem.Title;
3225 ATitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j';
3227 if Item.State in [gdsComplete, gdsDiffComplete] then begin
3229 if Item.DownType = gdtBoard then begin
3232 AddMessageList(ATitle + ' [
\83X
\83\8c\88ê
\97\97\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3233 if GetActiveList = Item.Board then begin
3235 SetActiveList(Item.Board);
3237 Item.Board.Modified := True;
3238 Item.Board.IsThreadDatRead := True;
3240 end else if Item.DownType = gdtThread then begin
3243 Item.ThreadItem.NewArrival := True;
3244 if (Item.ThreadItem.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin
3245 boardPlugIn := Item.ThreadItem.BoardPlugIn;
3246 Item.ThreadItem.Title := GikoSys.DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 )).FTitle;
3247 ATitle := Item.ThreadItem.Title;
3248 end else if ATitle = '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j' then begin
3249 ATitle := GikoSys.DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1)).FTitle;
3251 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
3252 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then
3253 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
3255 if GikoSys.Setting.BrowserTabVisible then begin
3256 if GetActiveContent = Item.ThreadItem then
3257 InsertBrowserTab(Item.ThreadItem)
3258 else if (ListView.Selected <> nil ) and ( TObject(ListView.Selected.Data) is TThreadItem ) and ( Item.ThreadItem = TThreadItem(ListView.Selected.Data)) then
3259 InsertBrowserTab(Item.ThreadItem, True)
3261 InsertBrowserTab(Item.ThreadItem, False);
3263 if (GetActiveContent = Item.ThreadItem) or (FActiveContent = nil) or(FActiveContent.Browser = BrowserNullTab.Browser) then
3264 InsertBrowserTab(Item.ThreadItem);
3267 if Item.State = gdsComplete then begin
3269 AddMessageList(ATitle + ' [
\83X
\83\8c\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3271 PlaySound('NewDiff');
3272 AddMessageList(ATitle + ' [
\83X
\83\8c\8d·
\95ª
\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3275 //
\8f\84\89ñ
\82 \82è
\82Ì
\8fê
\8d\87\81\95\82P
\82O
\82O
\82O
\92´
\82Í
\8f\84\89ñ
\8dí
\8f\9c
3276 if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin
3277 Item.ThreadItem.Round := False;
3278 Item.ThreadItem.RoundName := '';
3279 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);
3285 end else if Item.State = gdsNotModify then begin
3287 { if (Item.DownType = gdtThread) and (AddHistory(Item.ThreadItem)) then begin
3288 //SetContent(Item.ThreadItem);
3289 InsertBrowserTab(Item.ThreadItem);
3291 AddMessageList(ATitle + ' [
\96¢
\8dX
\90V]', nil, gmiSAD);
3292 PlaySound('NoChange');
3293 Screen.Cursor := crDefault;
3294 end else if Item.State = gdsAbort then begin
3296 AddMessageList(ATitle + ' [
\92\86\92f]', nil, gmiSAD);
3297 end else if Item.State = gdsError then begin
3302 AddMessageList(ATitle + ' [
\83G
\83\89\81[(' + IntToStr(Item.ResponseCode) + s + ')]', nil, gmiNG);
3303 // if Item.ResponseCode = 302 then
3304 // 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);
3310 if FWorkCount < 0 then FWorkCount := 0;
3311 if FWorkCount = 0 then begin
3313 Animate.Active := False;
3315 Screen.Cursor := crDefault;
3322 procedure TGikoForm.WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
3324 // SetProgressValue(Number, 0, AWorkCountMax);
3325 // ProgressBar.Visible := True;
3326 ProgressBar.Position := 0;
3327 ProgressBar.Max := AWorkCountMax;
3328 FDownloadTitle := AWorkTitle;
3329 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ð
\8aJ
\8en
\82µ
\82Ü
\82·';
3330 FDownloadMax := AWorkCountMax;
3333 procedure TGikoForm.WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
3335 ProgressBar.Position := 0;
3336 if FDownloadMax <> 0 then
3337 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ª
\8a®
\97¹
\82µ
\82Ü
\82µ
\82½';
3340 procedure TGikoForm.Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
3342 ProgressBar.Position := AWorkCount;
3343 // SetProgressValue(Number, AWorkCount);
3344 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86 (' + IntToStr(AWorkCount) + '/' + IntToStr(FDownloadMax) + ')';
3348 procedure TGikoForm.SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
3350 Component: TComponent;
3352 Component := FindComponent('ProgressBar' + IntToStr(Number + 1));
3353 if Component <> nil then begin
3354 if not (Component is TProgressBar) then Exit;
3356 TProgressBar(Component).Max := Max;
3357 TProgressBar(Component).Position := Value;
3362 procedure TGikoForm.AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
3364 ListItem: TListItem;
3366 MessageListView.Items.BeginUpdate;
3368 ListItem := MessageListView.Items.Add;
3369 ListItem.Caption := ACaption;
3370 ListItem.Data := AObject;
3371 ListItem.MakeVisible(False);
3373 gmiOK: ListItem.ImageIndex := 0;
3374 gmiSAD: ListItem.ImageIndex := 1;
3375 gmiNG: ListItem.ImageIndex := 2;
3376 gmiWhat: ListItem.ImageIndex := 3;
3379 MessageListView.Items.EndUpdate;
3383 {procedure TGikoForm.BrowserTabChange(Sender: TObject);
3386 ThreadItem: TThreadItem;
3388 ThreadItem := GetActiveContent;
3389 if ThreadItem <> nil then begin
3390 SetContent(ThreadItem);
3394 procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
3398 favItem : TFavoriteThreadItem;
3399 newBrowser : TBrowserRecord;
3402 if Threaditem = nil then Exit;
3404 if ThreadItem.IsLogFile then begin
3405 //
\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é
3406 //
\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é
3407 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil) and
3408 (FActiveContent.FBrowser <> BrowserNullTab.Browser)then begin
3409 j := FBrowsers.IndexOf(FActiveContent.FBrowser);
3410 if j = BROWSER_COUNT - 1 then
3411 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3413 favItem := TFavoriteThreadItem.Create(ThreadItem.URL, ThreadItem.Title );
3414 if not AddHistory( favItem ) then
3417 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
3418 if TObject(BrowserTab.Tabs.Objects[i]) is TBrowserRecord then begin
3419 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
3420 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = nil then begin
3421 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3422 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
3423 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3424 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3425 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3426 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3431 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
3432 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
3433 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3435 if ActiveTab then begin
3436 BrowserTab.TabIndex := i;
3437 BrowserTab.OnChange(nil);
3444 idx := BrowserTab.TabIndex;
3445 if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin
3446 newBrowser := TBrowserRecord.Create;
3447 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3448 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
3449 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3450 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3451 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3452 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3457 newBrowser.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
3458 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3459 //newBrowser.Browser.Navigate(BLANK_HTML);
3460 newBrowser.thread := ThreadItem;
3461 newBrowser.Repaint := true;
3462 // newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes;
3464 BrowserTab.Tabs.InsertObject(0, GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser);
3465 if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 1) then begin
3466 DeleteTab( TBrowserRecord( BrowserTab.Tabs.Objects[ 1 ] ) );
3470 if ActiveTab then begin
3471 BrowserTab.TabIndex := 0;
3475 newBrowser := TBrowserRecord.Create;
3476 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3477 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
3478 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3479 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3480 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3481 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3486 newBrowser.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
3487 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3488 //newBrowser.Browser.Navigate(BLANK_HTML);
3489 newBrowser.thread := ThreadItem;
3490 // newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes;
3491 newBrowser.Repaint := true;
3493 i := BrowserTab.Tabs.AddObject(GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser);
3494 if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 1) then begin
3495 DeleteTab( TBrowserRecord( BrowserTab.Tabs.Objects[ 0 ] ) );
3499 if ActiveTab then begin
3500 if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 0) then
3501 BrowserTab.TabIndex := 0
3503 BrowserTab.TabIndex := i;
3506 if(ActiveTab) or (idx = -1) then begin
3507 BrowserTab.OnChange(nil);
3510 if BrowserNullTab = nil then begin
3511 BrowserNullTab := TBrowserRecord.Create;
3512 BrowserNullTab.Browser := Browser;
3514 BrowserNullTab.thread := ThreadItem;
3515 BrowserTab.TabIndex := -1;
3516 SetContent(BrowserNullTab);
3519 if GikoSys.Setting.URLDisplay then
3520 AddressComboBox.Text := ThreadItem.URL;
3524 procedure TGikoForm.SetContent(inThread : TBrowserRecord);
3529 // HtmlName: string;
3532 // OldCursor: TCursor;
3536 ThreadItem: TThreadItem;
3537 Thread: TBrowserRecord;
3538 ThreadTitle, ThreadPTitle: string;
3539 ThreadScrollTop: Integer;
3540 ThreadIsLog, ThreadUnRead, ThreadNewArraical: boolean;
3543 idx := BrowserTab.TabIndex;
3544 if (FActiveContent <> nil) and
3545 (FActiveContent.Thread <> Thread.Thread) and
3546 (Assigned(FActiveContent.Browser.Document)) then begin
3550 //Application.ProcessMessages;
3551 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document).Body).ScrollTop;
3552 //if FActiveContent.Browser <> BrowserNullTab.Browser then
3553 // TOleControl(FActiveContent.Browser).Visible := false;
3556 MsgBox(Handle, E.Message, 'SetContent[<-ScrollTop]', 0);
3561 if not (Assigned(Thread)) or (Thread.Thread = nil) then begin
3562 Thread.Browser.Navigate(BLANK_HTML);
3563 BrowserBoardNameLabel.Caption := '';
3564 ItemBoardImage.Picture := nil;
3565 BrowserNameLabel.Caption := '';
3566 ItemImage.Picture := nil;
3567 BrowserNullTab.Thread := nil;
3568 //TOleControl(BrowserNullTab.Browser).Visible := true;
3569 ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
3570 FActiveContent := nil;
3572 end else if Thread.Browser = nil then begin
3573 if FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then
3574 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3575 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
3576 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
3577 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser := nil;
3578 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent <> nil then begin
3579 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent.Free;
3580 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent := nil;
3585 Thread.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
3586 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3588 ThreadTitle := Thread.Thread.Title;
3589 ThreadPTitle := Thread.Thread.ParentBoard.Title;
3590 ThreadScrollTop := Thread.Thread.ScrollTop;
3591 ThreadIsLog := Thread.Thread.IsLogFile;
3592 ThreadItem := Thread.Thread;
3593 ThreadNewArraical := Thread.Thread.NewArrival;
3594 ThreadUnRead := Thread.Thread.UnRead;
3595 BBSID := ThreadItem.ParentBoard.BBSID;
3596 FileName := ThreadItem.FileName;
3598 if GetCapture = ListView.Handle then
3601 Screen.Cursor := crHourGlass;
3605 if ThreadItem.UnRead then begin
3606 ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
3607 if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0;
3610 { if(FActiveContent <> nil) and (FActiveContent <> Thread) then begin
3611 if (FActiveContent.Browser <> BrowserNullTab.Browser) then
3612 ShowWindow(FActiveContent.Browser.Handle, SW_HIDE);
3615 ShowWindow(Thread.FBrowser.Handle, SW_SHOW);
3616 if (not Assigned(Thread.Browser.Document)) then begin
3617 Thread.Browser.Navigate('about:blank');
3619 FActiveContent := Thread;
3620 while (Thread.Browser.ReadyState <> READYSTATE_COMPLETE) and
3621 (Thread.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3622 Application.ProcessMessages;
3623 if idx <> BrowserTab.TabIndex then begin
3627 if not ThreadIsLog then begin
3628 Self.Caption := CAPTION_NAME ;
3630 s := '<HTML><BODY><CENTER>
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Í
\8eæ
\93¾
\82µ
\82Ä
\82¢
\82Ü
\82¹
\82ñ</CENTER></BODY></HTML>';
3631 doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
3633 doc.charset := 'Shift_JIS';
3639 Self.Caption := CAPTION_NAME + ' - [' + ThreadTitle + ']';
3640 //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«
3641 //
\90V
\8bK
\82ÉThread
\82ð
\8aJ
\82¢
\82½
\82Æ
\82«
\82É
\90^
\82É
\82È
\82Á
\82Ä
\82¢
\82é
\81B
3642 // if(Thread.Repaint) or (Thread.OnlyHundred <> GikoSys.OnlyAHundredRes)then begin
3643 if Thread.Repaint then begin
3644 //Thread.LastSize := ThreadItem.Size;
3645 Thread.Repaint := false;
3647 Thread.Browser.OnStatusTextChange := nil;
3648 doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
3649 GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
3651 // if (Assigned(Thread.Browser)) and (Thread.Browser <> nil) then
3652 Thread.Browser.OnStatusTextChange := BrowserStatusTextChange;
3653 //
\82È
\82º
\82©
\82±
\82±
\82Å
\96¾
\8e¦
\93I
\82ÉDocumentComplete
\82ð
\8cÄ
\82Î
\82È
\82¢
\82Æ
\82¤
\82Ü
\82
\82¢
\82©
\82È
\82¢
3654 //
\92Ç
\8bL
\81@200406/19
3655 //Visible
\82Ì
\82Æ
\82«
\82µ
\82©DocumentComplete
\82Í
\8cÄ
\82Î
\82ê
\82È
\82¢
\82ç
\82µ
\82¢
3656 Thread.FBrowser.OnDocumentComplete(Thread.FBrowser, Thread.FBrowser.Parent, url);
3657 // Thread.OnlyHundred := GikoSys.OnlyAHundredRes;
3658 Application.ProcessMessages;
3659 //
\82±
\82±
\82ÅApplication.ProcessMessages
\82ð
\8cÄ
\82Ô
\82±
\82Æ
\82É
\82æ
\82Á
\82ÄWebBrowser
\82ð
\8dX
\90V
\82³
\82¹
\82é
\81B
3660 //
\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é
3661 //
\81@by
\82à
\82¶
\82ã(2004/01/20)
3663 //if (Assigned(Thread)) and (Assigned(ThreadItem))then begin
3664 if(Thread <> nil) and (ThreadItem <>nil) then begin
3665 if ThreadUnRead then
3666 BrowserMovement('new', Thread)
3667 else if ThreadScrollTop <> 0 then begin
3669 doc.Body.ScrollTop := ThreadScrollTop;
3672 MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
3677 FActiveContent := nil;
3682 FActiveContent := nil;
3687 // Application.ProcessMessages;
3690 ThreadItem.UnRead := False;
3693 if (Assigned(Thread)) and (Assigned(Thread.Thread)) and (Thread <> nil) and (ThreadItem <>nil) then begin
3694 //FActiveContent := Thread;
3696 BrowserBoardNameLabel.Caption := ThreadPTitle;
3697 ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
3698 BrowserNameLabel.Caption := ThreadTitle;
3699 ItemImage.Picture := nil;
3701 if ThreadNewArraical then
3702 ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap)
3704 ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap)
3706 ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap);
3708 ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;
3709 BrowserNameLabel.Left := ItemImage.Left + 20;
3711 FActiveContent := nil;
3714 Screen.Cursor := crDefault;
3718 function TGikoForm.GetActiveContent: TThreadItem;
3721 if( Assigned(FActiveContent) ) and (Assigned(FActiveContent.Thread))
3722 and (FActiveContent <> nil) and (FActiveContent.Thread <> nil) then
3723 Result := FActiveContent.Thread
3725 FActiveContent := nil;
3729 FActiveContent := nil;
3734 procedure TGikoForm.SetActiveList(Obj: TObject);
3739 // if FActiveList <> Obj then begin
3742 if ListView.Selected <> nil then
3743 idx := ListView.Selected.Index
3746 ListView.Items.Count := 0;
3747 ListView.Items.Clear;
3748 ListView.Selected := nil;
3749 // ListView.Columns.Clear;
3751 Self.Caption := CAPTION_NAME;
3752 //Application.Title := CAPTION_NAME;
3754 if Obj is TBBS then begin
3755 for i := 0 to ListView.Columns.Count - 1 do
3756 ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i];
3757 SetCategoryListItem(TBBS(Obj));
3758 end else if Obj is TCategory then begin
3759 for i := 0 to ListView.Columns.Count - 1 do
3760 ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i];
3761 SetBoardListItem(TCategory(Obj));
3762 end else if Obj is TBoard then begin
3763 SetThreadListItem(TBoard(Obj));
3766 if idx >= 0 then begin
3767 ListView.ItemIndex := idx;
3768 ListView.ItemFocused := ListView.Items.Item[ idx ];
3774 //
\81\9a\81\9a\83q
\83\8d\83\86\83L
\83\81\83\82
3775 //
\82»
\82Ì
\82¤
\82¿interface
\82ð
\8eg
\82¤
3776 function TGikoForm.GetActiveList: TObject;
3778 Result := FActiveList;
3781 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType);
3783 SetListViewType(AViewType, '', False);
3786 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
3790 if ActiveList is TBoard then begin
3791 Board := TBoard(ActiveList);
3793 Board.ParentCategory.ParenTBBS.SelectText := SelectText;
3794 Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
3795 // Board.SelectText := SelectText;
3796 // Board.KubetsuChk := KubetsuChk;
3797 ViewType := AViewType;
3798 SetActiveList(Board);
3799 SetThreadListItem(Board);
3803 procedure TGikoForm.ListViewCustomDraw(Sender: TCustomListView;
3804 const ARect: TRect; var DefaultDraw: Boolean);
3810 if ListView.Items.Count = 0 then begin
3811 DefaultDraw := True;
3813 ListView.Canvas.Brush.Color := ListView.Color;
3814 ListView.Canvas.FillRect(ARect);
3818 ListView.Canvas.Font.Color := clWindowText;
3819 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3822 ListView.Canvas.Font.Color := clBlue;
3823 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';
3826 ListView.Canvas.Font.Color := clGreen;
3827 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\90V
\92\85\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3830 ListView.Canvas.Font.Color := clNavy;
3831 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';
3832 if GetActiveList is TBoard then
3833 s := Format(s, [TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText]);
3841 p := Point((ListView.ClientWidth div 2) - (ListView.Canvas.TextWidth(s) div 2),
3842 (ListView.ClientHeight div 2) - (ListView.Canvas.TextHeight(s) div 2));
3843 ListView.Canvas.TextOut(p.X, p.Y, s);
3845 DefaultDraw := True;
3849 procedure TGikoForm.DownloadList(Board: TBoard; ForceDownload: Boolean = False);
3851 Item: TDownloadItem;
3853 if not Board.IsThreadDatRead then
3854 GikoSys.ReadSubjectFile(Board);
3855 Item := TDownloadItem.Create;
3857 Item.Board := Board;
3858 Item.DownType := gdtBoard;
3859 Item.ForceDownload := ForceDownload;
3860 // AbortToolButton.Enabled := True;
3861 // Animate.Active := True;
3862 // FDownload.Add(Item);
3863 FControlThread.AddItem(Item);
3864 // Animate.Active := False;
3865 // AbortToolButton.Enabled := False;
3866 if FWorkCount = 0 then begin
3868 Animate.Active := True;
3871 Screen.Cursor := crAppStart;
3879 procedure TGikoForm.DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
3881 Item: TDownloadItem;
3883 Item := TDownloadItem.Create;
3885 Item.ThreadItem := ThreadItem;
3886 Item.DownType := gdtThread;
3887 Item.ForceDownload := ForceDownload;
3888 // AbortToolButton.Enabled := True;
3889 // Animate.Active := True;
3890 // FDownload.Add(Item);
3891 FControlThread.AddItem(Item);
3892 // Animate.Active := False;
3893 // AbortToolButton.Enabled := False;
3894 if FWorkCount = 0 then begin
3896 Animate.Active := True;
3899 Screen.Cursor := crAppStart;
3907 procedure TGikoForm.PlaySound(SoundEventName: string);
3911 FileName := GikoSys.Setting.FindSoundFileName(SoundEventName);
3912 if FileExists(FileName) then begin
3913 if not sndPlaySound(PChar(FileName), SND_ASYNC or SND_NOSTOP) then begin
3914 sndPlaySound(nil, SND_SYNC);
3915 Application.ProcessMessages;
3917 sndPlaySound(PChar(FileName), SND_ASYNC);
3922 function TGikoForm.AddHistory( favItem : TFavoriteThreadItem ): Boolean;
3925 Item: TFavoriteThreadItem;
3929 // if (GetActiveContent = ThreadItem) and
3930 // (ThreadItem.Count <= ThreadItem.Kokomade) then
3932 // if GetActiveContent = ThreadItem then
3936 if FTreeType = gttHistory then
3937 TreeView.Selected := nil;
3939 for i := 0 to FHistoryList.Count - 1 do begin
3940 if TObject(FHistoryList[i]) is TFavoriteThreadItem then begin
3941 Item := TFavoriteThreadItem(FHistoryList[i]);
3942 if Item.URL = favItem.URL then begin
3943 // SetContent(ThreadItem);
3944 FHistoryList.Move(i, 0);
3945 if FTreeType = gttHistory then
3946 if TreeView.Items.GetFirstNode <> TreeView.Items[ i ] then
3947 TreeView.Items[ i ].MoveTo( TreeView.Items.GetFirstNode, naInsert );
3954 if FHistoryList.Count > 0 then
3955 FHistoryList.Insert( 0, favItem )
3957 FHistoryList.Add( favItem );
3958 // SetContent(ThreadItem);
3960 if FTreeType = gttHistory then begin
3961 Node := TreeView.Items.Add( nil, favItem.Title );
3962 Node.MoveTo( TreeView.Items.GetFirstNode, naInsert );
3964 if favItem.NewArrival then begin
3965 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3966 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3968 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3969 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3972 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
3973 //
\81¦favItem.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
3974 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3975 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3976 Node.Data := favItem;
3980 procedure TGikoForm.DeleteHistory( threadItem: TThreadItem );
3984 for i := 0 to FHistoryList.Count - 1 do begin
3985 if threadItem.URL = TFavoriteThreadItem( FHistoryList.Items[i] ).URL then begin
3986 TFavoriteThreadItem( FHistoryList.Items[ i ] ).Free;
3987 FHistoryList.Delete(i);
3988 FHistoryList.Capacity := FHistoryList.Count;
3994 procedure TGikoForm.ClearHistory;
3998 //FHistoryList.Clear;
4001 for i := FHistoryList.Count - 1 downto 0 do begin
4002 if TObject(FHistoryList[ i ]) is TFavoriteThreadItem then
4003 TFavoriteThreadItem(FHistoryList[ i ]).Free
4004 else if TObject(FHistoryList[ i ]) is TFavoriteBoardItem then
4005 TFavoriteBoardItem(FHistoryList[ i ]).Free;
4007 //FHistoryList.Delete(i);
4013 FHistoryList.Capacity := FHistoryList.Count;
4017 procedure TGikoForm.SaveHistory;
4020 saveList : TstringList;
4023 saveList := TStringList.Create;
4026 FHistoryList.Capacity := FHistoryList.Count;
4027 saveList.Add('<?xml version="1.0" encoding="Shift_JIS" standalone="yes"?>');
4028 saveList.Add('<address>');
4029 bound := FHistoryList.Count - 1;
4030 for i := bound downto 0 do begin
4031 // title
\82Í
\8d¡
\82Ì
\82Æ
\82±
\82ë
\8eg
\82Á
\82Ä
\82¢
\82È
\82¢
4033 '<history url="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).URL ) + '"' +
4034 ' title="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).Title ) + '"/>');
4036 saveList.Add('</address>');
4037 saveList.SaveToFile( GikoSys.GetConfigDir + 'History.xml' );
4044 procedure TGikoForm.LoadHistory;
4048 XMLDoc : IXMLDocument;
4050 HistoryNode : IXMLNode;
4052 favItem : TFavoriteThreadItem;
4055 fileName := GikoSys.GetConfigDir + 'History.xml';
4057 if FileExists( fileName ) then begin
4059 XMLDoc := IXMLDocument.Create;
4060 //XMLDoc := LoadXMLDocument(FileName);
4061 LoadXMLDocument(FileName, XMLDoc);
4063 XMLNode := XMLDoc.DocumentElement;
4065 if XMLNode.NodeName = 'address' then begin
4066 bound := XMLNode.ChildNodes.Count - 1;
4067 for i := 0 to bound do begin
4068 HistoryNode := XMLNode.ChildNodes[i];
4069 if HistoryNode.NodeName = 'history' then begin
4070 //if FReadCount >= sl.Count then begin
4071 s := Trim(HistoryNode.Attributes['url']);
4072 if s <> '' then begin
4073 favItem := TFavoriteThreadItem.Create(
4074 s, HistoryNode.Attributes[ 'title' ] );
4075 if not AddHistory( favItem ) then
4091 procedure TGikoForm.ShowBBSTreeOld(
4099 FavoriteTreeView.Visible := False;
4100 FavoriteToolBar.Hide;
4101 TreeView.Visible := True;
4103 b := CabinetSelectPopupMenu.Items.Count - 1;
4104 for i := 0 to b do begin
4105 item := CabinetSelectPopupMenu.Items[ i ];
4106 if item is TBBSMenuItem then begin
4107 if TBBSMenuItem( item ).Data = inBBS then begin
4108 item.Checked := True;
4109 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
4110 CabinetMenu.Items[ i ].Checked := True;
4111 GikoSys.Setting.CabinetIndex := i;
4115 item.Checked := False;
4116 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
4117 CabinetMenu.Items[ i ].Checked := False;
4119 CabinetSelectToolButton.Caption := inBBS.Title;
4121 CabinetHistoryAction.Checked := False;
4122 CabinetFavoriteAction.Checked := False;
4124 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
4125 FTreeType := gtt2ch;
4126 HistoryToolBar.Hide;
4127 SetBoardTreeNode( inBBS );
4128 TreeView.Items.GetFirstNode.Expanded := True; //?c???[?g?b?v???????J??
4129 //?c???[??g?b?v?????I????
4130 if GetActiveList = nil then
4131 TreeView.Selected := TreeView.Items[0]
4133 for i := 0 to TreeView.Items.Count - 1 do begin
4134 if TreeView.Items[i].Data = GetActiveList then begin
4135 TreeView.Selected := TreeView.Items[i];
4139 TreeView.Selected := TreeView.Items[0]
4147 procedure TGikoForm.ShowBBSTree(
4156 FavoriteTreeView.Visible := False;
4157 FavoriteToolBar.Hide;
4158 TreeView.Visible := True;
4160 b := CabinetSelectPopupMenu.Items.Count - 1;
4161 for i := 0 to b do begin
4162 item := CabinetSelectPopupMenu.Items[ i ];
4163 if item is TBBSMenuItem then begin
4164 if TBBSMenuItem( item ).Data = inBBS then begin
4165 item.Checked := True;
4166 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
4167 CabinetMenu.Items[ i ].Checked := True;
4168 GikoSys.Setting.CabinetIndex := i;
4172 item.Checked := False;
4173 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
4174 CabinetMenu.Items[ i ].Checked := False;
4176 CabinetSelectToolButton.Caption := inBBS.Title;
4178 CabinetHistoryAction.Checked := False;
4179 CabinetFavoriteAction.Checked := False;
4181 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
4182 FTreeType := gtt2ch;
4183 HistoryToolBar.Hide;
4184 SetBoardTreeNode( inBBS );
4185 TreeView.Items.GetFirstNode.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
4186 //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
4187 if GetActiveList = nil then begin
4189 TreeClick( TreeView.Items[0] );
4193 for i := 0 to TreeView.Items.Count - 1 do begin
4194 if TreeView.Items[i].Data = GetActiveList then begin
4195 TreeClick( TreeView.Items[i] );
4199 TreeClick( TreeView.Items[0] );
4207 procedure TGikoForm.ShowHistoryTree;
4212 if CabinetPanel.Visible then begin
4213 if FTreeType = gttHistory then begin
4214 CabinetVisible( False );
4215 CabinetHistoryAction.Checked := False;
4217 CabinetHistoryAction.Checked := True;
4220 CabinetVisible( True );
4221 CabinetHistoryAction.Checked := True;
4224 // BBS...BBS, History, Favorite
4225 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 2;
4227 FavoriteTreeView.Visible := False;
4228 TreeView.Visible := True;
4230 CabinetBBSAction.Checked := False;
4231 CabinetFavoriteAction.Checked := False;
4233 if FTreeType <> gttHistory then begin
4234 b := CabinetSelectPopupMenu.Items.Count - 1;
4235 for i := 0 to b do begin
4236 item := CabinetSelectPopupMenu.Items[ i ];
4237 if item is TBBSMenuItem then begin
4238 item.Checked := False;
4239 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
4240 CabinetMenu.Items[ i ].Checked := False;
4244 FTreeType := gttHistory;
4245 HistoryToolBar.Show;
4246 FavoriteToolBar.Hide;
4248 CabinetSelectToolButton.Caption := '
\97\9a\97ð
\83\8a\83X
\83g';
4252 procedure TGikoForm.SetHistoryTreeNode;
4256 Item: TFavoriteThreadItem;
4258 TreeView.Items.BeginUpdate;
4260 TreeView.Items.Clear;
4261 for i := 0 to FHistoryList.Count - 1 do begin
4262 Item := TFavoriteThreadItem(FHistoryList[i]);
4263 Node := TreeView.Items.Add(nil, Item.Title);
4265 if Item.Item.NewArrival then begin
4266 Node.ImageIndex := ITEM_ICON_THREADNEW1;
4267 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
4269 Node.ImageIndex := ITEM_ICON_THREADLOG1;
4270 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
4273 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
4274 //
\81¦Item.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
4275 Node.ImageIndex := ITEM_ICON_THREADLOG1;
4276 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
4280 TreeView.Items.EndUpdate;
4284 procedure TGikoForm.SelectTreeNode(Item: TObject; CallEvent: Boolean);
4286 ChangeEvent: TTVChangedEvent;
4287 ChangingEvent: TTVChangingEvent;
4291 if Item is TCategory then
4292 bbs := TCategory( Item ).ParenTBBS
4293 else if Item is TBoard then
4294 bbs := TBoard( Item ).ParentCategory.ParenTBBS
4298 if (FTreeType = gtt2ch) and (FActiveBBS = bbs) then begin
4299 if Item <> FActiveList then begin
4301 ChangingEvent := nil;
4303 if not CallEvent then begin
4304 ChangeEvent := TreeView.OnChange;
4305 ChangingEvent := TreeView.OnChanging;
4308 if not CallEvent then begin
4309 TreeView.OnChange := nil;
4310 TreeView.OnChanging := nil;
4312 //Application.ProcessMessages;
4313 for i := 0 to TreeView.Items.Count - 1 do begin
4314 if TreeView.Items[i].Data = Item then begin
4315 TreeView.Items[i].Selected := True;
4317 TreeClick(TreeView.Items[i]);
4321 //Application.ProcessMessages;
4323 if not CallEvent then begin
4324 TreeView.OnChange := ChangeEvent;
4325 TreeView.OnChanging := ChangingEvent;
4330 if Item <> FActiveList then begin
4331 if GetActiveList is TBBS then begin
4332 for i := 0 to ListView.Columns.Count - 1 do
4333 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
4334 end else if GetActiveList is TCategory then begin
4335 for i := 0 to ListView.Columns.Count - 1 do
4336 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
4337 end else if GetActiveList is TBoard then begin
4338 for i := 0 to ListView.Columns.Count - 1 do
4339 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
4342 if (Item is TBBS) or (Item is TCategory) then begin
4343 ListView.Columns.Clear;
4344 SetActiveList( Item );
4345 end else if Item is TBoard then begin
4346 if not TBoard( Item ).IsThreadDatRead then begin
4347 Screen.Cursor := crHourGlass;
4349 if not TBoard( Item ).IsThreadDatRead then
4350 GikoSys.ReadSubjectFile(TBoard( Item ));
4352 Screen.Cursor := crDefault;
4355 SetActiveList( Item );
4359 if Item is TBoard then begin // not TCategory
4360 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4361 if GikoSys.Setting.ListWidthState = glsMax then begin
4362 BrowserMinAction.Execute;
4363 if GikoForm.Visible then
4367 if GikoSys.Setting.ListHeightState = glsMax then begin
4368 BrowserMinAction.Execute;
4369 if GikoForm.Visible then
4377 procedure TGikoForm.ListViewMouseDown(Sender: TObject;
4378 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
4380 listItem : TListItem;
4381 threadItem : TThreadItem;
4387 if not (GetActiveList is TBoard) then Exit;
4388 listItem := ListView.GetItemAt( X, Y );
4389 if listItem = nil then Exit;
4390 if not (TObject(listItem.Data) is TThreadItem) then Exit;
4392 threadItem := TThreadItem(ListItem.Data);
4393 InsertBrowserTab(threadItem, False);
4394 if threadItem.IsLogFile then
4395 ListView.UpdateItems(listItem.Index, listItem.Index);
4399 //
\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Å
4400 if (ssDouble in Shift) then
4401 ListDoubleClick(Shift)
4406 { if ssDouble in Shift then begin
4407 DoubleClickOccurred[Button] := True;
4409 DoubleClickOccurred[Button] := False;
4410 t := GetTickCount+GetDoubleClickTime;
4411 while GetTickCount < t do begin
4412 Application.ProcessMessages;
4413 if DoubleClickOccurred[Button] then
4418 if ssDouble in Shift then begin
4420 mbLeft: ListDoubleClick;
4433 procedure TGikoForm.ListClick;
4435 ListItem: TListItem;
4436 ThreadItem: TThreadItem;
4438 if ListView.SelCount <> 1 then Exit;
4439 ListItem := ListView.Selected;
4440 if ListItem = nil then Exit;
4441 if not (TObject(ListItem.Data) is TThreadItem) then Exit;
4443 ThreadItem := TThreadItem(ListItem.Data);
4444 if ThreadItem.IsLogFile then begin
4445 // if AddHistory(ThreadItem) then
4446 // SetContent(ThreadItem);
4447 InsertBrowserTab(ThreadItem);
4448 ListView.UpdateItems(ListItem.Index, ListItem.Index);
4450 // SetContent(ThreadItem);
4451 InsertBrowserTab(ThreadItem);
4454 if GikoSys.Setting.BrowserAutoMaximize = gbmClick then begin
4455 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4456 if GikoSys.Setting.ListWidthState = glsMin then begin
4457 BrowserMaxAndFocusAction.Execute;
4460 if GikoSys.Setting.ListHeightState = glsMin then begin
4461 BrowserMaxAndFocusAction.Execute;
4467 procedure TGikoForm.ListDoubleClick(Shift: TShiftState);
4469 ThreadItem: TThreadItem;
4472 shiftDown := (ssShift in Shift);
4474 if ListView.Selected = nil then Exit;
4476 if TObject(ListView.Selected.Data) is TCategory then begin
4477 SelectTreeNode(ListView.Selected.Data, True);
4478 // TreeView.Selected.Expanded := True;
4479 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4480 //TreeViewChange(nil, TreeView.Selected);
4481 end else if TObject(ListView.Selected.Data) is TBoard then begin
4482 SelectTreeNode(ListView.Selected.Data, True);
4483 // TreeView.Selected.Expanded := True;
4484 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4485 //TreeViewChange(nil, TreeView.Selected);
4486 end else if TObject(ListView.Selected.Data) is TThreadItem then begin
4487 //if TObject(ListView.Selected.Data) is TThreadItem then begin
4488 Application.ProcessMessages;
4489 ThreadItem := TThreadItem(ListView.Selected.Data);
4490 DownloadContent(ThreadItem, shiftDown);
4493 if GikoSys.Setting.BrowserAutoMaximize = gbmDoubleClick then begin
4494 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4495 if GikoSys.Setting.ListWidthState = glsMin then begin
4496 // BrowserMaxAndFocusAction.Execute;
4497 BrowserMaxAction.Execute;
4498 SetFocusForBrowserAction.Execute;
4501 if GikoSys.Setting.ListHeightState = glsMin then begin
4502 // BrowserMaxAndFocusAction.Execute;
4503 BrowserMaxAction.Execute;
4504 SetFocusForBrowserAction.Execute;
4510 procedure TGikoForm.BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord);
4515 activeBrower :TWebBrowser;
4517 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
4519 while (BrowserRecord.Browser.ReadyState <> READYSTATE_COMPLETE) and
4520 (BrowserRecord.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4521 Application.ProcessMessages;
4524 // Access Violation
\82ª
\8bN
\82«
\82é
\8e\96\82ª
\82 \82é
\82Ì
\82Å
\8d¡
\8cã
\97v
\83`
\83F
\83b
\83N
4525 if(BrowserRecord <> nil) and (BrowserRecord.FBrowser <> nil) then begin
4526 activeBrower := BrowserRecord.FBrowser;
4530 item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
4532 top := top + item.offsetTop;
4533 item := item.offsetParent;
4534 until AnsiCompareText(item.tagName, 'body' ) = 0;
4536 OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
4542 procedure TGikoForm.BrowserMovement(const AName: string);
4547 activeBrower :TWebBrowser;
4549 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
4551 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
4552 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4553 Application.ProcessMessages;
4556 // Access Violation
\82ª
\8bN
\82«
\82é
\8e\96\82ª
\82 \82é
\82Ì
\82Å
\8d¡
\8cã
\97v
\83`
\83F
\83b
\83N
4557 if(BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex >= 0) then begin
4558 activeBrower := FActiveContent.Browser;
4562 item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
4564 top := top + item.offsetTop;
4565 item := item.offsetParent;
4566 until AnsiCompareText(item.tagName, 'body' ) = 0;
4568 OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
4574 procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
4576 if TObject(Node.Data) is TBBS then begin
4577 TBBS(Node.Data).NodeExpand := False;
4578 end else if TObject(Node.Data) is TCategory then begin
4579 TCategory(Node.Data).NodeExpand := False;
4580 end else if TObject(Node.Data) is TBoard then begin
4581 TBoard(Node.Data).NodeExpand := False;
4585 procedure TGikoForm.MessageListViewResize(Sender: TObject);
4587 // MessageListView.Column[0].Width := MessageListView.ClientWidth - 16;
4590 procedure TGikoForm.SelectListItem(List: TList);
4592 // TmpTreeNode: TTreeNode;
4593 TmpListItem: TListItem;
4596 TmpListItem := ListView.Selected;
4597 while TmpListItem <> nil do begin
4598 List.Add(TmpListItem.Data);
4599 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
4604 procedure TGikoForm.ExitActionExecute(Sender: TObject);
4609 procedure TGikoForm.AllSelectActionExecute(Sender: TObject);
4614 procedure TGikoForm.StdToolBarVisibleActionExecute(Sender: TObject);
4616 CoolBand: TCoolBand;
4618 CoolBand := GetCoolBand(MainCoolBar, StdToolBar);
4619 if CoolBand = nil then
4621 GikoSys.Setting.StdToolBarVisible := StdToolBarVisibleAction.Checked;
4622 CoolBand.Visible := GikoSys.Setting.StdToolBarVisible;
4623 // StdToolBar.Visible := StdToolBarVisibleAction.Checked;
4624 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4626 //StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
4627 StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible;
4630 procedure TGikoForm.AddressBarVisibleActionExecute(Sender: TObject);
4632 CoolBand: TCoolBand;
4634 CoolBand := GetCoolBand(MainCoolBar, AddressToolBar);
4635 if CoolBand = nil then
4637 GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked;
4638 CoolBand.Visible := GikoSys.Setting.AddressBarVisible;
4639 //AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
4640 AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible;
4643 procedure TGikoForm.LinkBarVisibleActionExecute(Sender: TObject);
4645 CoolBand: TCoolBand;
4647 CoolBand := GetCoolBand(MainCoolBar, LinkToolBar);
4648 if CoolBand = nil then
4650 GikoSys.Setting.LinkBarVisible := LinkBarVisibleAction.Checked;
4651 CoolBand.Visible := GikoSys.Setting.LinkBarVisible;
4652 //LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
4653 LinkToolBarVisiblePMenu.Checked := GikoSys.Setting.LinkBarVisible;
4656 procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);
4658 CoolBand: TCoolBand;
4660 CoolBand := GetCoolBand(ListCoolBar, ListToolBar);
4661 if CoolBand = nil then
4663 CoolBand.Visible := ListToolBarVisibleAction.Checked;
4664 // ListToolBar.Visible := ListToolBarVisibleAction.Checked;
4665 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4666 GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;
4669 procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);
4671 CoolBand: TCoolBand;
4673 CoolBand := GetCoolBand(ListCoolBar, ListNameToolBar);
4674 if CoolBand = nil then
4676 CoolBand.Visible := ListNameBarVisibleAction.Checked;
4677 GikoSys.Setting.ListNameBarVisible := ListNameBarVisibleAction.Checked;
4680 procedure TGikoForm.BrowserToolBarVisibleActionExecute(Sender: TObject);
4682 CoolBand: TCoolBand;
4684 CoolBand := GetCoolBand(BrowserCoolBar, BrowserToolBar);
4685 if CoolBand = nil then
4687 CoolBand.Visible := BrowserToolBarVisibleAction.Checked;
4688 // BrowserToolBar.Visible := BrowserToolBarVisibleAction.Checked;
4689 GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;
4692 procedure TGikoForm.BrowserNameBarVisibleActionExecute(Sender: TObject);
4694 CoolBand: TCoolBand;
4696 CoolBand := GetCoolBand(BrowserCoolBar, BrowserNameToolBar);
4697 if CoolBand = nil then
4699 CoolBand.Visible := BrowserNameBarVisibleAction.Checked;
4700 GikoSys.Setting.BrowserNameBarVisible := BrowserNameBarVisibleAction.Checked;
4703 procedure TGikoForm.MsgBarVisibleActionExecute(Sender: TObject);
4705 MessageSplitter.Visible := MsgBarVisibleAction.Checked;
4706 MessagePanel.Top := MessageSplitter.Top + MessageSplitter.Height;
4707 MessageSplitter.Top := MessagePanel.Top + 1;
4708 MessagePanel.Visible := MsgBarVisibleAction.Checked;
4709 GikoSys.Setting.MessageBarVisible := MsgBarVisibleAction.Checked;
4712 procedure TGikoForm.StatusBarVisibleActionExecute(Sender: TObject);
4714 StatusBar.Visible := StatusBarVisibleAction.Checked;
4715 GikoSys.Setting.StatusBarVisible := StatusBarVisibleAction.Checked;
4718 procedure TGikoForm.IconStyleExecute(Sender: TObject);
4720 case ListView.ViewStyle of
4721 vsIcon: SmallIconAction.Execute;
4722 vsSmallIcon: ListIconAction.Execute;
4723 vsList: DetailIconAction.Execute;
4724 vsReport: LargeIconAction.Execute;
4728 procedure TGikoForm.LargeIconActionExecute(Sender: TObject);
4730 ListView.ViewStyle := vsIcon;
4731 LargeIconAction.Checked := True;
4734 procedure TGikoForm.SmallIconActionExecute(Sender: TObject);
4736 ListView.ViewStyle := vsSmallIcon;
4737 SmallIconAction.Checked := True;
4740 procedure TGikoForm.ListIconActionExecute(Sender: TObject);
4742 ListView.ViewStyle := vsList;
4743 ListIconAction.Checked := True;
4746 procedure TGikoForm.DetailIconActionExecute(Sender: TObject);
4748 ListView.ViewStyle := vsReport;
4749 DetailIconAction.Checked := True;
4752 procedure TGikoForm.SearchActionExecute(Sender: TObject);
4757 if FSearchDialog = nil then begin
4758 if (GikoForm.GetActiveList is TCategory) or (GikoForm.GetActiveList is TBoard) then
4759 chk := GikoForm.GetActiveList
4763 FSearchDialog := TSearchDialog.Create(Self, chk);
4764 FSearchDialog.SearchComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
4774 procedure TGikoForm.OptionActionExecute(Sender: TObject);
4778 Dlg := TOptionDialog.Create(Self);
4786 procedure TGikoForm.GikoNaviWebPageActionExecute(Sender: TObject);
4788 URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
4790 GikoSys.OpenBrowser(URL_GIKONAVI, gbtAuto);
4793 procedure TGikoForm.MonazillaWebPageActionExecute(Sender: TObject);
4795 URL_MONAZILLA: string = 'http://www.monazilla.org/';
4797 GikoSys.OpenBrowser(URL_MONAZILLA, gbtAuto);
4800 procedure TGikoForm.BBS2chWebPageActionExecute(Sender: TObject);
4802 URL_2ch: string = 'http://www.2ch.net/';
4804 GikoSys.OpenBrowser(URL_2ch, gbtAuto);
4807 procedure TGikoForm.GikoFolderOpenActionExecute(Sender: TObject);
4809 // GikoSys.OpenBrowser(GikoSys.GetAppDir, gbtIE);
4810 GikoSys.CreateProcess('explorer.exe', '/e,"' + GikoSys.GetAppDir + '"');
4813 procedure TGikoForm.AboutActionExecute(Sender: TObject);
4817 Dlg := TAboutDialog.Create(Self);
4825 procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject);
4830 procedure TGikoForm.CabinetVisible( isVisible : Boolean );
4832 TreeSplitter.Visible := isVisible;
4833 CabinetPanel.Visible := isVisible;
4834 CabinetVisibleAction.Checked := isVisible;
4837 procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject);
4840 gttHistory: CabinetHistoryAction.Execute;
4841 gttFavorite: CabinetFavoriteAction.Execute;
4843 CabinetBBSAction.Execute;
4847 procedure TGikoForm.AllItemActionExecute(Sender: TObject);
4850 if ViewType <> gvtAll then
4851 SetListViewType(gvtAll);
4852 GikoSys.Setting.ThreadRange := gtrAll;
4853 AllItemAction.Checked := True;
4854 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4856 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4857 if SelectComboBox.Parent <> nil then begin
4858 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4859 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4866 procedure TGikoForm.LogItemActionExecute(Sender: TObject);
4869 if ViewType <> gvtLog then
4870 SetListViewType(gvtLog);
4871 GikoSys.Setting.ThreadRange := gtrLog;
4872 LogItemAction.Checked := True;
4873 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4875 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4876 if SelectComboBox.Parent <> nil then begin
4877 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4878 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4885 procedure TGikoForm.NewItemActionExecute(Sender: TObject);
4889 if ViewType <> gvtNew then
4890 SetListViewType(gvtNew);
4891 GikoSys.Setting.ThreadRange := gtrNew;
4892 NewItemAction.Checked := True;
4893 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4895 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4896 if SelectComboBox.Parent <> nil then begin
4897 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4898 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4905 procedure TGikoForm.SelectItemActionExecute(Sender: TObject);
4908 Dlg: TListSelectDialog;
4911 if SelectComboBox.Parent <> nil then begin
4912 if SelectComboBox.Left + SelectComboBox.Width < ListToolBar.Width then begin
4913 // SelectComboBox
\82ª
\82 \82é
\8fê
\8d\87\82Í
\83t
\83H
\81[
\83J
\83X
\82ð
\88Ú
\82·
4914 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4915 if GikoSys.Setting.ListWidthState = glsMax then
4916 BrowserMinAction.Execute;
4918 if GikoSys.Setting.ListHeightState = glsMax then
4919 BrowserMinAction.Execute;
4921 SelectComboBox.SetFocus;
4928 if SelectComboBox.Text = SELECTCOMBOBOX_NAME then begin
4929 SelectComboBox.Text := '';
4930 SelectComboBox.Color := clWindow;
4933 AllItemAction.Checked := False;
4934 LogItemAction.Checked := False;
4935 NewItemAction.Checked := False;
4936 //SelectItemAction.Checked := True;
4938 Dlg := TListSelectDialog.Create(Self);
4940 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
4941 Dlg.SelectComboBox.Text := SelectComboBox.Text;
4943 if Dlg.ModalResult = mrCancel then begin
4944 if Length( SelectComboBox.Text ) = 0 then begin
4945 AllItemAction.Checked := True;
4946 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4947 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4950 if GetActiveList is TBoard then
4951 SetListViewType(gvtUser, TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText , Dlg.KubetsuCheckBox.Checked);
4953 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
4955 GikoSys.Setting.SelectTextList.Delete(idx);
4956 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
4957 while Dlg.SelectComboBox.Items.Count > 100 do begin
4958 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
4961 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
4962 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4963 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4965 SelectComboBox.Text := Dlg.SelectComboBox.Text;
4966 SelectComboBox.Color := clWindow;
4968 SetListViewType(gvtUser, Dlg.SelectComboBox.Text, Dlg.KubetsuCheckBox.Checked);
4975 procedure TGikoForm.ListNumberVisibleActionExecute(Sender: TObject);
4977 GikoSys.Setting.ListViewNo := ListNumberVisibleAction.Checked;
4981 procedure TGikoForm.UpFolderActionExecute(Sender: TObject);
4983 if GetActiveList is TBoard then begin
4984 // if FTreeType = gtt2ch then
4985 SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
4986 //SetActiveList(TBoard(GetActiveList).ParentCategory);
4987 end else if GetActiveList is TCategory then begin
4988 // if FTreeType = gtt2ch then
4989 SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);
4990 //SetActiveList(TCategory(GetActiveList).ParenTBBS);
4992 // if TreeView.Selected = nil then Exit;
4993 // if TreeView.Selected.Level = 0 then Exit;
4994 // TreeView.Selected.Parent.Selected := True;
4997 procedure TGikoForm.RoundActionExecute(Sender: TObject);
5001 Dlg := TRoundDialog.Create(Self);
5009 procedure TGikoForm.StopActionExecute(Sender: TObject);
5011 FControlThread.DownloadAbort;
5012 if FWorkCount <> 0 then FWorkCount := 0;
5014 Animate.Active := False;
5017 Screen.Cursor := crDefault;
5020 procedure TGikoForm.MsgBarCloseActionExecute(Sender: TObject);
5022 // MessagePanel.Visible := False;
5023 // MessageSplitter.Visible := False;
5024 // MsgBarVisibleAction.Checked := False;
5025 MsgBarVisibleAction.Execute;
5028 procedure TGikoForm.BrowserMaxActionExecute(Sender: TObject);
5030 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5031 case GikoSys.Setting.ListWidthState of
5033 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
5034 if FActiveContent <> nil then
5035 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //
\95`
\89æ
\92â
\8e~
5036 ViewPanel.Width := FBrowserSizeWidth;
5037 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5038 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5039 GikoSys.Setting.ListWidthState := glsNormal;
5040 if FActiveContent <> nil then
5041 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //
\95`
\89æ
5043 glsMin, glsNormal: begin
5044 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
5045 if FActiveContent <> nil then
5046 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //
\95`
\89æ
\92â
\8e~
5047 if GikoSys.Setting.ListWidthState = glsNormal then
5048 FBrowserSizeWidth := ViewPanel.Width;
5049 if FActiveContent <> nil then
5050 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //
\95`
\89æ
5051 ViewPanel.Width := 1;
5052 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5053 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5054 GikoSys.Setting.ListWidthState := glsMax;
5058 case GikoSys.Setting.ListHeightState of
5060 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
5061 if FActiveContent <> nil then
5062 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //
\95`
\89æ
\92â
\8e~
5063 ViewPanel.Height := FBrowserSizeHeight;
5064 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5065 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5066 GikoSys.Setting.ListHeightState := glsNormal;
5067 if FActiveContent <> nil then
5068 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //
\95`
\89æ
5070 glsMin, glsNormal: begin
5071 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
5072 if FActiveContent <> nil then
5073 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //
\95`
\89æ
\92â
\8e~
5074 if GikoSys.Setting.ListHeightState = glsNormal then
5075 FBrowserSizeHeight := ViewPanel.Height;
5076 if FActiveContent <> nil then
5077 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //
\95`
\89æ
5078 ViewPanel.Height := 1;
5079 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5080 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5081 GikoSys.Setting.ListHeightState := glsMax;
5085 // Mouse.CursorPos := BrowserSizeButton.ClientToScreen(Point(
5086 // System.Round(BrowserToolBar.ButtonWidth div 2),
5087 // System.Round(BrowserToolBar.ButtonHeight div 2)));
5088 //BrowserTab.OnChange(nil);
5091 procedure TGikoForm.BrowserMinActionExecute(Sender: TObject);
5094 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5095 case GikoSys.Setting.ListWidthState of
5096 glsMax, glsNormal: begin
5097 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5098 if FActiveContent <> nil then
5099 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //
\95`
\89æ
\92â
\8e~
5100 if GikoSys.Setting.ListWidthState = glsNormal then
5101 FBrowserSizeWidth := ViewPanel.Width;
5102 if FActiveContent <> nil then
5103 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //
\95`
\89æ
5104 ViewPanel.Width := ThreadMainPanel.Width - 80;
5105 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5106 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5107 GikoSys.Setting.ListWidthState := glsMin;
5110 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
5111 if FActiveContent <> nil then
5112 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //
\95`
\89æ
\92â
\8e~
5113 ViewPanel.Width := FBrowserSizeWidth;
5114 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5115 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5116 GikoSys.Setting.ListWidthState := glsNormal;
5117 if FActiveContent <> nil then
5118 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //
\95`
\89æ
5122 case GikoSys.Setting.ListHeightState of
5123 glsMax, glsNormal: begin
5124 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5125 if FActiveContent <> nil then
5126 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //
\95`
\89æ
\92â
\8e~
5127 if GikoSys.Setting.ListHeightState = glsNormal then
5128 FBrowserSizeHeight := ViewPanel.Height;
5129 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
5130 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5131 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5132 GikoSys.Setting.ListHeightState := glsMin;
5133 if FActiveContent <> nil then
5134 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //
\95`
\89æ
5137 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
5138 if FActiveContent <> nil then
5139 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //
\95`
\89æ
\92â
\8e~
5140 ViewPanel.Height := FBrowserSizeHeight;
5141 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5142 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5143 GikoSys.Setting.ListHeightState := glsNormal;
5144 if FActiveContent <> nil then
5145 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //
\95`
\89æ
5151 procedure TGikoForm.ScrollTopActionExecute(Sender: TObject);
5153 BrowserMovement('top');
5156 procedure TGikoForm.ScrollLastActionExecute(Sender: TObject);
5158 BrowserMovement('bottom');
5161 procedure TGikoForm.ScrollNewActionExecute(Sender: TObject);
5163 BrowserMovement('new');
5166 procedure TGikoForm.ScrollKokoActionExecute(Sender: TObject);
5168 BrowserMovement('koko');
5171 procedure TGikoForm.EditorActionExecute(Sender: TObject);
5173 Editor: TEditorForm;
5176 Item := GetActiveContent;
5177 if Item = nil then Exit;
5178 Editor := TEditorForm.Create(Self);
5179 Editor.SetThreadItem(Item);
5180 GikoSys.LoadEditorKeySetting(Editor.ActionList);
5182 Editor.BodyEdit.SetFocus;
5185 procedure TGikoForm.IEActionExecute(Sender: TObject);
5187 ShowThreadAction.Execute;
5190 procedure TGikoForm.ShowThreadActionExecute(Sender: TObject);
5192 ThreadItem: TThreadItem;
5194 ThreadItem := GetActiveContent;
5195 if ThreadItem = nil then Exit;
5196 GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
5199 procedure TGikoForm.ShowBoardActionExecute(Sender: TObject);
5201 ThreadItem: TThreadItem;
5203 ThreadItem := GetActiveContent;
5204 if ThreadItem = nil then Exit;
5205 GikoSys.OpenBrowser(ThreadItem.ParentBoard.URL, gbtAuto);
5208 //(Thread)URL
\82ð
\83R
\83s
\81[
5209 procedure TGikoForm.URLCopyActionExecute(Sender: TObject);
5214 if TObject(GetActiveContent) is TBoard then
5215 s := s + TBoard(GetActiveContent).URL + #13#10
5216 else if TObject(GetActiveContent) is TThreadItem then
5217 s := s + TThreadItem(GetActiveContent).URL + #13#10;
5219 Clipboard.AsText := s;
5222 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ð
\83R
\83s
\81[
5223 procedure TGikoForm.NameCopyActionExecute(Sender: TObject);
5228 if TObject(GetActiveContent) is TBoard then
5229 s := s + TBoard(GetActiveContent).Title + #13#10
5230 else if TObject(GetActiveContent) is TThreadItem then
5231 s := s + TThreadItem(GetActiveContent).Title + #13#10;
5233 Clipboard.AsText := s;
5236 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ÆURL
\82ð
\83R
\83s
\81[
5237 procedure TGikoForm.NameURLCopyActionExecute(Sender: TObject);
5242 if TObject(GetActiveContent) is TBoard then
5243 s := s + TBoard(GetActiveContent).Title + #13#10 + TBoard(GetActiveContent).URL + #13#10
5244 else if TObject(GetActiveContent) is TThreadItem then
5245 s := s + TThreadItem(GetActiveContent).Title + #13#10 + TThreadItem(GetActiveContent).URL + #13#10;
5247 Clipboard.AsText := s;
5250 procedure TGikoForm.ItemReloadActionExecute(Sender: TObject);
5252 ThreadItem: TThreadItem;
5255 ThreadItem := GetActiveContent;
5256 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5257 if ThreadItem <> nil then
5258 DownloadContent(ThreadItem, shiftDown);
5261 procedure TGikoForm.SelectListReloadActionExecute(Sender: TObject);
5268 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5269 if GetActiveList is TCategory then begin
5270 List := TList.Create;
5272 SelectListItem(List);
5273 if List.Count > 5 then begin
5274 msg := '5
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
5275 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
5276 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
5279 for i := 0 to List.Count - 1 do begin
5280 if TObject(List[i]) is TBoard then
5281 DownloadList(TBoard(List[i]), shiftDown);
5286 end else if GetActiveList is TBoard then begin
5287 DownloadList(TBoard(GetActiveList), shiftDown);
5291 procedure TGikoForm.SelectThreadReloadActionExecute(Sender: TObject);
5298 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5299 List := TList.Create;
5301 SelectListItem(List);
5302 if List.Count > 10 then begin
5303 msg := '10
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
5304 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
5305 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
5308 for i := 0 to List.Count - 1 do begin
5309 if TObject(List[i]) is TThreadItem then
5310 DownloadContent(TThreadItem(List[i]), shiftDown);
5317 procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);
5319 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
5320 SelectListReloadAction.Enabled := True
5321 else if GetActiveList is TBoard then
5322 SelectListReloadAction.Enabled := True
5324 SelectListReloadAction.Enabled := False;
5327 procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);
5329 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5330 SelectThreadReloadAction.Enabled := True
5332 SelectThreadReloadAction.Enabled := False;
5335 procedure TGikoForm.AllItemActionUpdate(Sender: TObject);
5337 AllItemAction.Enabled := (GetActiveList is TBoard);
5340 procedure TGikoForm.LogItemActionUpdate(Sender: TObject);
5342 LogItemAction.Enabled := (GetActiveList is TBoard);
5345 procedure TGikoForm.NewItemActionUpdate(Sender: TObject);
5347 NewItemAction.Enabled := (GetActiveList is TBoard);
5350 procedure TGikoForm.SelectItemActionUpdate(Sender: TObject);
5352 SelectItemAction.Enabled := (GetActiveList is TBoard);
5355 procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
5357 UpFolderAction.Enabled := not (GetActiveList is TBBS);
5360 procedure TGikoForm.ThreadEditorActionUpdate(Sender: TObject);
5362 ThreadEditorAction.Enabled := (GetActiveList is TBoard);
5365 procedure TGikoForm.FormResize(Sender: TObject);
5371 MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
5372 MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
5374 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5375 if GikoSys.Setting.ListWidthState = glsMin then begin
5376 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5377 ViewPanel.Width := ThreadMainPanel.Width - 80;
5380 if GikoSys.Setting.ListHeightState = glsMin then begin
5381 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5382 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
5386 if FIsMinimize = mtMinimized then begin
5387 if FActiveContent <> nil then begin
5388 //Application.ProcessMessages;
5389 doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
5390 doc.Body.ScrollTop := FActiveContent.Thread.ScrollTop;
5391 FIsMinimize := mtNone;
5396 FIsIgnoreResize := True;
5397 PostMessage( Handle, USER_RESIZED, 0, 0 );
5402 procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject);
5404 ScrollTopAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5407 procedure TGikoForm.ScrollLastActionUpdate(Sender: TObject);
5409 ScrollLastAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5412 procedure TGikoForm.ScrollNewActionUpdate(Sender: TObject);
5414 ScrollNewAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5417 procedure TGikoForm.ScrollKokoActionUpdate(Sender: TObject);
5419 ScrollKokoAction.Enabled := (GetActiveContent <> nil)
5420 and (GetActiveContent.IsLogFile)
5421 and (GetActiveContent.Kokomade <> -1);
5425 procedure TGikoForm.EditorActionUpdate(Sender: TObject);
5427 EditorAction.Enabled := GetActiveContent <> nil;
5430 procedure TGikoForm.IEActionUpdate(Sender: TObject);
5432 IEAction.Enabled := GetActiveContent <> nil;
5435 procedure TGikoForm.ShowThreadActionUpdate(Sender: TObject);
5437 ShowThreadAction.Enabled := GetActiveContent <> nil;
5440 procedure TGikoForm.ShowBoardActionUpdate(Sender: TObject);
5442 ShowBoardAction.Enabled := GetActiveContent <> nil;
5445 procedure TGikoForm.ItemReloadActionUpdate(Sender: TObject);
5447 ItemReloadAction.Enabled := GetActiveContent <> nil;
5450 procedure TGikoForm.URLCopyActionUpdate(Sender: TObject);
5452 URLCopyAction.Enabled := GetActiveContent <> nil;
5455 procedure TGikoForm.NameCopyActionUpdate(Sender: TObject);
5457 NameCopyAction.Enabled := GetActiveContent <> nil;
5460 procedure TGikoForm.NameURLCopyActionUpdate(Sender: TObject);
5462 NameURLCopyAction.Enabled := GetActiveContent <> nil;
5465 procedure TGikoForm.BrowserTabCloseActionUpdate(Sender: TObject);
5467 BrowserTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 0);
5470 procedure TGikoForm.NotSelectTabCloseActionUpdate(Sender: TObject);
5472 NotSelectTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 1);
5475 procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
5477 AllTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 0);
5480 procedure TGikoForm.ActiveLogDeleteActionUpdate(Sender: TObject);
5482 ActiveLogDeleteAction.Enabled := GetActiveContent <> nil;
5485 procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
5487 DEL_MSG = '
\81g^0
\81h
\82Ì
\83\8d\83O
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
5488 DEL_SAME_MSG = '
\82±
\82ê
\82ç ^0
\8cÂ
\82Ì
\83X
\83\8c\83b
\83h
\82Ì
\83\8d\83O
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
5489 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
5491 ThreadItem: TThreadItem;
5492 TmpListItem: TListItem;
5496 List := TList.Create;
5498 TmpListItem := ListView.Selected;
5499 while TmpListItem <> nil do begin
5500 if TObject(TmpListItem.Data) is TThreadItem then begin
5501 ThreadItem := TThreadItem(TmpListItem.Data);
5502 if ThreadItem.IsLogFile then
5503 List.Add(ThreadItem);
5505 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
5508 if GikoSys.Setting.DeleteMsg and (List.Count > 0) then begin
5509 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
5510 if List.Count = 1 then begin
5511 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', TThreadItem( List[ 0 ] ).Title, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
5514 if MsgBox(Handle, StringReplace( DEL_SAME_MSG, '^0', IntToStr( List.Count ), [rfReplaceAll] ), DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> IDYES then
5520 for i := 0 to List.Count - 1 do begin
5521 ThreadItem := TThreadItem(List[i]);
5522 DeleteHistory(ThreadItem);
5523 DeleteTab(ThreadItem);
5524 ThreadItem.DeleteLogFile;
5531 procedure TGikoForm.DeleteTab(BrowserRecord: TBrowserRecord);
5536 idx := BrowserTab.TabIndex;
5537 FTabHintIndex := -1;
5538 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5539 if TBrowserRecord(BrowserTab.Tabs.Objects[i]) = BrowserRecord then begin
5540 BrowserTab.Tabs.BeginUpdate;
5542 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5543 doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
5544 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
5547 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
5549 if( FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i]) ) then
5550 FActiveContent := nil;
5551 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5552 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
5554 FBrowsers.Move(j, BROWSER_COUNT - 1);
5556 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5557 BrowserTab.Tabs.Delete(i);
5558 if idx > i then begin
5559 BrowserTab.TabIndex := idx - 1;
5561 if BrowserTab.Tabs.Count -1 >= idx then
5562 BrowserTab.TabIndex := idx
5564 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5566 if BrowserTab.Tabs.Count = 0 then begin
5567 BrowserNullTab.Thread := nil;
5569 if(BrowserTab.TabIndex <> -1) and
5570 ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
5571 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
5572 if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
5573 = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
5575 TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser := nil;
5576 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
5577 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
5578 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
5583 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
5584 := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
5585 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
5586 FBrowsers.Move(BROWSER_COUNT - 1, 0);
5588 BrowserTab.Tabs.EndUpdate;
5589 if( FActiveContent = nil) then
5590 BrowserTab.OnChange(nil);
5595 procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
5600 idx := BrowserTab.TabIndex;
5601 FTabHintIndex := -1;
5602 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5603 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
5604 BrowserTab.Tabs.BeginUpdate;
5606 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5607 doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
5608 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
5612 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
5614 if(FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i])) then
5615 FActiveContent := nil;
5616 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5617 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
5619 FBrowsers.Move(j, BROWSER_COUNT - 1);
5621 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5622 BrowserTab.Tabs.Delete(i);
5623 if idx > i then begin
5624 BrowserTab.TabIndex := idx - 1;
5626 if BrowserTab.Tabs.Count -1 >= idx then
5627 BrowserTab.TabIndex := idx
5629 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5631 if(BrowserTab.TabIndex <> -1) and
5632 ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
5633 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
5634 if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
5635 = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
5637 TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser := nil;
5638 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
5639 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
5640 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
5645 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
5646 := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
5647 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
5648 FBrowsers.Move(BROWSER_COUNT - 1, 0);
5651 BrowserTab.Tabs.EndUpdate;
5652 if( FActiveContent = nil) then
5653 BrowserTab.OnChange(nil);
5659 procedure TGikoForm.KokomadeActionExecute(Sender: TObject);
5662 ThreadItem: TThreadItem;
5664 No := KokoPopupMenu.Tag;
5665 if No = 0 then Exit;
5666 ThreadItem := GetActiveContent;
5667 if ThreadItem = nil then Exit;
5668 ThreadItem.Kokomade := No;
5669 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
5670 FActiveContent.FRepaint := true;
5671 InsertBrowserTab(FActiveContent.Thread, true);
5672 Application.ProcessMessages;
5675 procedure TGikoForm.ZenbuActionExecute(Sender: TObject);
5677 ThreadItem: TThreadItem;
5679 ThreadItem := GetActiveContent;
5680 if ThreadItem = nil then Exit;
5681 ThreadItem.Kokomade := -1;
5682 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
5683 FActiveContent.FRepaint := true;
5684 InsertBrowserTab(FActiveContent.Thread, true);
5685 Application.ProcessMessages;
5688 function TGikoForm.Hook(var Message: TMessage): Boolean;
5697 procedure TGikoForm.KokoResActionExecute(Sender: TObject);
5699 Editor: TEditorForm;
5703 Number := KokoPopupMenu.Tag;
5704 if Number = 0 then Exit;
5705 Item := GetActiveContent;
5706 if Item = nil then Exit;
5708 Editor := TEditorForm.Create(Self);
5709 Editor.SetThreadItem(Item);
5710 Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
5712 Editor.BodyEdit.SetFocus;
5715 procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
5717 ItemRoundPMenu.Visible := (GetActiveList is TBoard);
5718 ItemReservPMenu.Visible := (GetActiveList is TBoard);
5719 LPMSep01.Visible := (GetActiveList is TBoard);
5720 ListRoundPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5721 ListReservPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5722 LPMSep02.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5723 KidokuPMenu.Visible := (GetActiveList is TBoard);
5724 MidokuPMenu.Visible := (GetActiveList is TBoard);
5725 UrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5726 NameUrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5727 AllSelectPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5728 LPMSep05.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5729 DeletePMenu.Visible := (GetActiveList is TBoard);
5730 LPMSep06.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5731 BoardFavoriteAddMenu.Visible := (GetActiveList is TCategory);
5732 ThreadFavoriteAddMenu.Visible := (GetActiveList is TBoard);
5734 AddRoundNameMenu(ItemReservPMenu);
5735 AddRoundNameMenu(ListReservPMenu);
5738 procedure TGikoForm.BoardIEActionExecute(Sender: TObject);
5742 if GetActiveList is TBoard then begin
5743 URL := TBoard(GetActiveList).URL;
5744 GikoSys.OpenBrowser(URL, gbtAuto);
5748 procedure TGikoForm.SelectItemURLCopyActionExecute(Sender: TObject);
5755 List := TList.Create;
5757 SelectListItem(List);
5758 for i := 0 to List.Count - 1 do begin
5759 if TObject(List[i]) is TBoard then
5760 s := s + TBoard(List[i]).URL + #13#10
5761 else if TObject(List[i]) is TThreadItem then
5762 s := s + TThreadItem(List[i]).URL + #13#10;
5765 Clipboard.AsText := s;
5771 procedure TGikoForm.SelectItemNameCopyActionExecute(Sender: TObject);
5778 List := TList.Create;
5780 SelectListItem(List);
5781 for i := 0 to List.Count - 1 do begin
5782 if TObject(List[i]) is TBoard then
5783 s := s + TBoard(List[i]).Title + #13#10
5784 else if TObject(List[i]) is TThreadItem then
5785 s := s + TThreadItem(List[i]).Title + #13#10;
5788 Clipboard.AsText := s;
5794 procedure TGikoForm.SelectItemNameURLCopyActionExecute(Sender: TObject);
5801 List := TList.Create;
5803 SelectListItem(List);
5804 for i := 0 to List.Count - 1 do begin
5805 if TObject(List[i]) is TBoard then
5806 s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10
5807 else if TObject(List[i]) is TThreadItem then
5808 s := s + TThreadItem(List[i]).Title + #13#10 + TThreadItem(List[i]).URL + #13#10;
5811 Clipboard.AsText := s;
5817 procedure TGikoForm.BoardIEActionUpdate(Sender: TObject);
5819 if GetActiveList is TBoard then
5820 BoardIEAction.Enabled := True
5822 BoardIEAction.Enabled := False;
5825 procedure TGikoForm.SelectItemURLCopyActionUpdate(Sender: TObject);
5827 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5828 SelectItemURLCopyAction.Enabled := True
5830 SelectItemURLCopyAction.Enabled := False;
5833 procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
5835 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5836 SelectItemNameCopyAction.Enabled := True
5838 SelectItemNameCopyAction.Enabled := False;
5841 procedure TGikoForm.SelectItemNameURLCopyActionUpdate(Sender: TObject);
5843 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5844 SelectItemNameURLCopyAction.Enabled := True
5846 SelectItemNameURLCopyAction.Enabled := False;
5849 procedure TGikoForm.AllSelectActionUpdate(Sender: TObject);
5851 if ListView.SelCount > 0 then
5852 AllSelectAction.Enabled := True
5854 AllSelectAction.Enabled := False;
5857 procedure TGikoForm.LogDeleteActionUpdate(Sender: TObject);
5859 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5860 LogDeleteAction.Enabled := True
5862 LogDeleteAction.Enabled := False;
5865 procedure TGikoForm.BrowserTabCloseActionExecute(Sender: TObject);
5868 // ThreadItem: TThreadItem;
5870 idx := BrowserTab.TabIndex;
5871 if idx <> -1 then begin
5872 if BrowserTab.Tabs.Objects[idx] <> nil then begin
5873 //ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5874 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
5879 procedure TGikoForm.NotSelectTabCloseActionExecute(Sender: TObject);
5884 idx := BrowserTab.TabIndex;
5885 if idx = -1 then Exit;
5886 BrowserTab.Tabs.BeginUpdate;
5887 for i := BrowserTab.Tabs.Count - 1 downto BrowserTab.TabIndex + 1 do begin
5888 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5889 BrowserTab.Tabs.Delete(i);
5891 if idx > 0 then begin
5892 for i := BrowserTab.TabIndex - 1 downto 0 do begin
5893 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5894 BrowserTab.Tabs.Delete(i);
5897 BrowserTab.Tabs.EndUpdate;
5900 procedure TGikoForm.AllTabCloseActionExecute(Sender: TObject);
5904 if GikoSys.Setting.ShowDialogForAllTabClose then
5905 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
5908 FActiveContent := nil;
5909 BrowserNullTab.Thread := nil;
5910 BrowserTab.OnChange := nil;
5911 BrowserTab.Tabs.BeginUpdate;
5912 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
5913 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5915 BrowserTab.Tabs.Clear;
5916 BrowserTab.Tabs.EndUpdate;
5917 BrowserTab.OnChange := BrowserTabChange;
5918 SetContent(BrowserNullTab);
5919 Self.Caption := CAPTION_NAME ;
5922 procedure TGikoForm.TreeSelectBoradReloadExecute(Sender: TObject);
5925 TmpTreeNode: TTreeNode;
5927 TmpTreeNode := FClickNode;
5928 TreeView.Selected := FClickNode;
5931 if TObject(TmpTreeNode.Data) is TBoard then
5932 Board := TBoard(TmpTreeNode.Data)
5933 else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then
5934 Board := TFavoriteBoardItem(TmpTreeNode.Data).Item;
5936 if Board <> nil then
5937 DownloadList(Board);
5940 procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject);
5942 ThreadItem: TThreadItem;
5943 TmpTreeNode: TTreeNode;
5945 TmpTreeNode := FClickNode;
5946 TreeView.Selected := FClickNode;
5949 if TObject(TmpTreeNode.Data) is TThreadItem then
5950 ThreadItem := TThreadItem(TmpTreeNode.Data)
5951 else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then
5952 ThreadItem := TFavoriteThreadItem(TmpTreeNode.Data).Item;
5954 if ThreadItem <> nil then
5955 DownloadContent(ThreadItem);
5958 procedure TGikoForm.TreeSelectURLCopyExecute(Sender: TObject);
5960 TmpTreeNode: TTreeNode;
5963 TmpTreeNode := FClickNode;
5964 TreeView.Selected := FClickNode;
5965 if TObject(TmpTreeNode.Data) is TBoard then begin
5966 s := TBoard(TmpTreeNode.Data).URL + #13#10;
5967 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5968 s := TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5969 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5970 s := TThreadItem(TmpTreeNode.Data).URL + #13#10;
5971 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5972 s := TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5974 Clipboard.AsText := s;
5977 procedure TGikoForm.TreeSelectNameURLCopyExecute(Sender: TObject);
5979 TmpTreeNode: TTreeNode;
5982 TmpTreeNode := FClickNode;
5983 TreeView.Selected := FClickNode;
5984 if TObject(TmpTreeNode.Data) is TBoard then begin
5985 s := TBoard(TmpTreeNode.Data).Title + #13#10 + TBoard(TmpTreeNode.Data).URL + #13#10;
5986 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5987 s := TFavoriteBoardItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5988 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5989 s := TThreadItem(TmpTreeNode.Data).Title + #13#10 + TThreadItem(TmpTreeNode.Data).URL + #13#10;
5990 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5991 s := TFavoriteThreadItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5993 Clipboard.AsText := s;
5996 procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
5998 FClickNode := TreeView.Selected;
5999 if FClickNode = nil then begin
6000 TreeSelectThreadPupupMenu.Visible := False;
6001 TreeSelectBoardPupupMenu.Visible := False;
6002 TPMSep01.Visible := False;
6003 TreeSelectURLPupupMenu.Visible := False;
6004 TreeSelectNamePupupMenu.Visible := False;
6005 TreeSelectNameURLPupupMenu.Visible := False;
6006 TreeSelectFavoriteAddPupupMenu.Visible := False;
6007 TreeSelectLogDeleteSeparator.Visible := False;
6008 TreeSelectLogDeletePopupMenu.Visible := False;
6009 end else if TObject(FClickNode.Data) is TBoard then begin
6010 TreeSelectThreadPupupMenu.Visible := False;
6011 TreeSelectBoardPupupMenu.Visible := True;
6012 TPMSep01.Visible := True;
6013 TreeSelectURLPupupMenu.Visible := True;
6014 TreeSelectNamePupupMenu.Visible := True;
6015 TreeSelectNameURLPupupMenu.Visible := True;
6016 TreeSelectFavoriteAddPupupMenu.Visible := True;
6017 TreeSelectLogDeleteSeparator.Visible := False;
6018 TreeSelectLogDeletePopupMenu.Visible := False;
6019 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
6020 TreeSelectThreadPupupMenu.Visible := False;
6021 TreeSelectBoardPupupMenu.Visible := True;
6022 TPMSep01.Visible := True;
6023 TreeSelectURLPupupMenu.Visible := True;
6024 TreeSelectNamePupupMenu.Visible := True;
6025 TreeSelectNameURLPupupMenu.Visible := True;
6026 TreeSelectFavoriteAddPupupMenu.Visible := True;
6027 TreeSelectLogDeleteSeparator.Visible := False;
6028 TreeSelectLogDeletePopupMenu.Visible := False;
6029 end else if (TObject(FClickNode.Data) is TThreadItem) then begin
6030 TreeSelectThreadPupupMenu.Visible := True;
6031 TreeSelectBoardPupupMenu.Visible := False;
6032 TPMSep01.Visible := True;
6033 TreeSelectURLPupupMenu.Visible := True;
6034 TreeSelectNamePupupMenu.Visible := True;
6035 TreeSelectNameURLPupupMenu.Visible := True;
6036 TreeSelectFavoriteAddPupupMenu.Visible := True;
6037 TreeSelectLogDeleteSeparator.Visible := True;
6038 TreeSelectLogDeletePopupMenu.Visible := True;
6039 end else if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
6040 TreeSelectThreadPupupMenu.Visible := True;
6041 TreeSelectBoardPupupMenu.Visible := False;
6042 TPMSep01.Visible := True;
6043 TreeSelectURLPupupMenu.Visible := True;
6044 TreeSelectNamePupupMenu.Visible := True;
6045 TreeSelectNameURLPupupMenu.Visible := True;
6046 TreeSelectFavoriteAddPupupMenu.Visible := True;
6047 TreeSelectLogDeleteSeparator.Visible := True;
6048 TreeSelectLogDeletePopupMenu.Visible := True;
6049 end else if (TObject(FClickNode.Data) is TCategory) then begin
6050 TreeSelectThreadPupupMenu.Visible := False;
6051 TreeSelectBoardPupupMenu.Visible := False;
6052 TPMSep01.Visible := False;
6053 TreeSelectURLPupupMenu.Visible := False;
6054 TreeSelectNamePupupMenu.Visible := True;
6055 TreeSelectNameURLPupupMenu.Visible := False;
6056 TreeSelectFavoriteAddPupupMenu.Visible := False;
6057 TreeSelectLogDeleteSeparator.Visible := False;
6058 TreeSelectLogDeletePopupMenu.Visible := False;
6059 end else if FClickNode.IsFirstNode then begin
6060 TreeSelectThreadPupupMenu.Visible := False;
6061 TreeSelectBoardPupupMenu.Visible := False;
6062 TPMSep01.Visible := False;
6063 TreeSelectURLPupupMenu.Visible := False;
6064 TreeSelectNamePupupMenu.Visible := True;
6065 TreeSelectNameURLPupupMenu.Visible := False;
6066 TreeSelectFavoriteAddPupupMenu.Visible := False;
6067 TreeSelectLogDeleteSeparator.Visible := False;
6068 TreeSelectLogDeletePopupMenu.Visible := False;
6070 TreeSelectThreadPupupMenu.Visible := False;
6071 TreeSelectBoardPupupMenu.Visible := False;
6072 TPMSep01.Visible := False;
6073 TreeSelectURLPupupMenu.Visible := False;
6074 TreeSelectNamePupupMenu.Visible := False;
6075 TreeSelectNameURLPupupMenu.Visible := False;
6076 TreeSelectFavoriteAddPupupMenu.Visible := False;
6077 TreeSelectLogDeleteSeparator.Visible := False;
6078 TreeSelectLogDeletePopupMenu.Visible := False;
6082 procedure TGikoForm.BrowserNewWindow2(Sender: TObject;
6083 var ppDisp: IDispatch; var Cancel: WordBool);
6094 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
6095 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
6096 Html := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
6097 if(AnsiPos('>>', Text) = 1) or (AnsiPos('>', Text) = 1)
6098 or (AnsiPos('
\81\84\81\84', Text) = 1) or (AnsiPos('
\81\84', Text) = 1) then begin
6099 if GikoSys.Setting.ResAnchorJamp then begin
6100 Text := ZenToHan(Text);
6102 if(AnsiPos('>>', Text) = 1) then begin
6103 Text := Copy(Text, 3, Length(Text) - 2);
6105 Text := Copy(Text, 2, Length(Text) - 1);
6107 if AnsiPos('-', Text) <> 0 then begin
6108 wkIntSt := StrToIntDef(Copy(Text, 1, AnsiPos('-', Text) - 1), 0);
6109 Text := Copy(Text, AnsiPos('-', Text) + 1, Length(Text));
6110 wkIntTo := StrToIntDef(Text, 0);
6111 if wkIntTo < wkIntSt then
6114 wkIntSt := StrToIntDef(Text, 0);
6116 if wkIntSt <> 0 then
6117 BrowserMovement(IntToStr(wkIntSt));
6120 URL := GikoSys.GetHRefText(Html);
6121 URL := GikoSys.HTMLDecode(URL);
6122 if( AnsiPos('http://', URL) = 1) or (AnsiPos('https://', URL) = 1) or
6123 ( AnsiPos('ftp://', URL) = 1) then begin
6124 //
\83A
\83h
\83\8c\83X
\83o
\81[
\82Ì
\97\9a\97ð
6125 if GikoSys.Setting.LinkAddAddressBar then begin
6126 idx := AddressComboBox.Items.IndexOf(URL);
6127 if idx = -1 then begin
6128 AddressComboBox.Items.Insert(0, URL);
6129 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
6130 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
6132 AddressComboBox.Items.Delete(idx);
6133 AddressComboBox.Items.Insert(0, URL);
6141 { ShiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
6142 CtrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
6145 Memo1.Lines.Add('ShiftDown');
6147 Memo1.Lines.Add('CtrlDown');
6149 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
6150 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
6151 Url := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
6155 URL := GetHRefText(URL);
6157 ParseURI(URL, Protocol, Host, path, Document, Port, Bookmark);
6159 b := Parse2chURL(path, document, bbs, num);
6160 memo1.Lines.Add('bbs: ' + bbs);
6161 memo1.Lines.Add('key: ' + num);
6163 Memo1.Lines.Add('Parse2chURL: True')
6165 Memo1.Lines.Add('Parse2chURL: False');
6167 // AppPath := 'C:\Borland\Projects\Test\TestBrowser\TestBrowser.exe';
6172 procedure TGikoForm.ListSplitterCanResize(Sender: TObject;
6173 var NewSize: Integer; var Accept: Boolean);
6175 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6176 if ViewPanel.Width < 2 then begin
6177 ViewPanel.Width := 1;
6178 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6179 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6180 GikoSys.Setting.ListWidthState := glsMax;
6181 end else if ViewPanel.Width > (ThreadMainPanel.Width - 80) then begin
6182 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6183 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6184 GikoSys.Setting.ListWidthState := glsMin;
6186 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6187 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6188 GikoSys.Setting.ListWidthState := glsNormal;
6191 if ViewPanel.Height < 2 then begin
6192 ViewPanel.Height := 1;
6193 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6194 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6195 GikoSys.Setting.ListHeightState := glsMax;
6196 end else if ViewPanel.Height > (ThreadMainPanel.Height - BrowserCoolBar.Height - 7) then begin
6197 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6198 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6199 GikoSys.Setting.ListHeightState := glsMin;
6201 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6202 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6203 GikoSys.Setting.ListHeightState := glsNormal;
6208 procedure TGikoForm.ListSplitterMoved(Sender: TObject);
6210 if Mouse.Capture <> 0 then
6212 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6213 if (ViewPanel.Width > 1) and (ViewPanel.Width <= (ThreadMainPanel.Width - 80)) then
6214 FBrowserSizeWidth := ViewPanel.Width;
6216 if (ViewPanel.Height > 1) and (ViewPanel.Height <= (ThreadMainPanel.Height - BrowserCoolBar.Height)) then
6217 FBrowserSizeHeight := ViewPanel.Height;
6219 { if (Mouse.Capture = 0) and (ViewPanel.Height > 1) and (not ArrangeAction.Checked) then
6220 FBrowserSizeHeight := ViewPanel.Height
6221 else if (Mouse.Capture = 0) and (ViewPanel.Width > 1) and (ArrangeAction.Checked) then
6222 FBrowserSizeWidth := ViewPanel.Width;}
6225 procedure TGikoForm.BrowserTabChange(Sender: TObject);
6231 // if NewTab = -1 then
6232 // ThreadItem := nil;
6233 if not BrowserTab.Dragging then begin
6234 FTabHintIndex := -1;
6235 BrowserTab.Hint := '';
6236 idx := BrowserTab.TabIndex;
6237 if idx = -1 then begin
6238 BrowserNullTab.Thread := nil;
6239 SetContent(BrowserNullTab);
6241 end else if(BrowserTab.Tabs.Objects[idx] <> nil) and (BrowserTab.Tabs.Objects[idx] is TBrowserRecord) then begin
6242 if TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser <> nil then begin
6243 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser);
6245 FBrowsers.Move(j ,0);
6247 if( FActiveContent <> nil ) and (FActiveContent.Browser <> nil) and
6248 (FActiveContent.Browser <> BrowserNullTab.Browser) and
6249 (FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1])) then
6250 FBrowsers.Move(BROWSER_COUNT - 1, 0);
6252 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
6253 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
6254 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser := nil;
6255 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
6256 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent <> nil then begin
6257 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent.Free;
6258 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent := nil;
6262 TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
6263 TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Repaint := true;
6264 FBrowsers.Move(BROWSER_COUNT - 1, 0);
6266 TOleControl(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser).BringToFront;
6267 // GikoSys.OnlyAHundredRes := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
6268 // OnlyAHundredRes.Checked := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
6269 SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6271 if (GikoSys.Setting.URLDisplay) and (GetActiveContent <> nil) then
6272 AddressComboBox.Text := GetActiveContent.URL;
6274 if ((TreeView.Visible) and (TreeView.Focused)) or ((FavoriteTreeView.Visible) and (FavoriteTreeView.Focused)) or
6275 (ListView.Focused) or (SelectComboBox.Focused) or (AddressComboBox.Focused)
6278 SetFocusForBrowserAction.Execute;
6287 procedure TGikoForm.BrowserTabMouseDown(Sender: TObject;
6288 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
6294 if Button = mbMiddle then begin
6295 //
\83}
\83E
\83X
\92\86\83{
\83^
\83\93
6298 p := BrowserTab.ScreenToClient(p);
6299 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
6301 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6302 //end else if Button = mbRight then begin
6303 //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é
6304 //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
6305 { //
\83}
\83E
\83X
\89E
\83{
\83^
\83\93
6308 // GetCursorPos(p2);
6309 p := BrowserTab.ScreenToClient(p);
6310 // idx := BrowserTab.ItemAtPos(p);
6311 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
6312 if idx <> -1 then begin
6313 OldIndex := BrowserTab.TabIndex;
6314 BrowserTab.TabIndex := idx;
6315 if OldIndex <> idx then
6316 BrowserTab.OnChange(nil);
6317 BrowserTabPopupMenu.Tag := idx;
6318 BrowserTabPopupMenu.Popup(p2.X, p2.Y);
6321 end else if BUtton = mbLeft then begin
6322 FDragWFirst := true;
6323 FMouseDownPos.X := X;
6324 FMouseDownPos.Y := Y;
6329 procedure TGikoForm.SetBrowserTabState;
6332 CoolBand: TCoolBand;
6334 BrowserBottomPanel.AutoSize := False;
6335 if GikoSys.Setting.BrowserTabVisible then begin
6336 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
6337 BrowserTab.Style := tsTabs;
6338 if GikoSys.Setting.BrowserTabPosition = gtpTop then
6339 BrowserTab.TabPosition := tpTop
6341 BrowserTab.TabPosition := tpBottom;
6342 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
6343 BrowserTab.TabPosition := tpTop;
6344 BrowserTab.Style := tsButtons;
6346 BrowserTab.TabPosition := tpTop;
6347 BrowserTab.Style := tsFlatButtons
6350 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
6351 BrowserTab.Parent := BrowserTabToolBar;
6352 BrowserBottomPanel.Hide;
6353 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6354 if CoolBand <> nil then
6355 CoolBand.Visible := True;
6356 // BrowserTab.Parent := BrowserTopPanel;
6357 // BrowserTab.Parent := BrowserCoolBar;
6358 // BrowserTab.Top := 26;
6359 // BrowserTopPanel.Height := 44;
6362 BrowserTab.Parent := BrowserBottomPanel;
6363 BrowserTab.Top := 0;
6364 BrowserTab.Left := 0;
6365 BrowserBottomPanel.Show;
6366 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6367 if CoolBand <> nil then
6368 CoolBand.Visible := False;
6369 // BrowserTopPanel.Height := 26;
6373 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6374 if CoolBand <> nil then
6375 CoolBand.Visible := False;
6376 BrowserBottomPanel.Visible := False;
6377 // BrowserTab.Visible := False;
6378 // BrowserTopPanel.Height := 26;
6379 AllTabCloseAction.Execute;
6383 procedure TGikoForm.BrowserTabDragOver(Sender, Source: TObject; X,
6384 Y: Integer; State: TDragState; var Accept: Boolean);
6388 idx := BrowserTab.IndexOfTabAt(X, Y);
6389 Accept := (Source = BrowserTab) and (BrowserTab.TabIndex <> idx);
6392 procedure TGikoForm.BrowserTabDragDrop(Sender, Source: TObject; X,
6397 idx := BrowserTab.IndexOfTabAt(X, Y);
6399 BrowserTab.Tabs.Move(BrowserTab.TabIndex, idx);
6402 procedure TGikoForm.BrowserTabMouseMove(Sender: TObject;
6403 Shift: TShiftState; X, Y: Integer);
6406 ThreadItem: TThreadItem;
6409 TabIdx := BrowserTab.IndexOfTabAt(x, y);
6411 if ( ssLeft in Shift ) and ( BrowserTab.Style = tsTabs ) then begin
6412 if FDragWFirst = false then begin
6413 FDragWFirst := true;
6415 BrowserTab.EndDrag(false);
6416 BrowserTab.BeginDrag(false, DandD_THRESHOLD);
6417 FDragWFirst := false;
6420 BrowserTab.EndDrag(false);
6421 FDragWFirst := false;
6424 if (FTabHintIndex <> TabIdx) and (TabIdx <> -1) then begin
6425 Application.CancelHint;
6426 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[TabIdx]).Thread;
6427 if ThreadItem.Title <> BrowserTab.Tabs[TabIdx] then begin
6428 BrowserTab.Hint := ThreadItem.Title;
6429 Application.ShowHint := True;
6431 BrowserTab.Hint := '';
6432 Application.ShowHint := True;
6434 FTabHintIndex := TabIdx;
6439 procedure TGikoForm.BrowserDocumentComplete(Sender: TObject;
6440 const pDisp: IDispatch; var URL: OleVariant);
6442 FDispHtmlDocument: DispHTMLDocument;
6443 BrowserRecord :TBrowserRecord;
6446 // AddMessageList('DocumentComplete', nil);
6447 if TObject(Sender) is TWebBrowser then begin
6448 if TWebBrowser(Sender) <> Browser then begin
6449 BrowserRecord := nil;
6450 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
6451 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(Sender) then begin
6452 BrowserRecord := TBrowserRecord(BrowserTab.Tabs.Objects[i]);
6456 if BrowserRecord <> nil then begin
6457 if BrowserRecord.FEvent <> nil then
6458 BrowserRecord.FEvent.Free;
6459 FDispHtmlDocument := Idispatch(OleVariant(BrowserRecord.Browser.ControlInterface).Document) as DispHTMLDocument;
6460 BrowserRecord.FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
6461 BrowserRecord.FEvent.OnContextMenu := OnDocumentContextMenu;
6462 BrowserRecord.FEvent.OnClick := WebBrowserClick; //
\92Ç
\89Á
\82µ
\82½OnClick
\83C
\83x
\83\93\83g
6465 if GetActiveContent <> nil then begin
6466 FDispHtmlDocument := Idispatch(OleVariant(Browser.ControlInterface).Document) as DispHTMLDocument;
6467 if FEvent <> nil then
6469 FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
6470 FEvent.OnContextMenu := OnDocumentContextMenu;
6471 FEvent.OnClick := WebBrowserClick; //
\92Ç
\89Á
\82µ
\82½OnClick
\83C
\83x
\83\93\83g
6477 procedure TGikoForm.SelectReservActionUpdate(Sender: TObject);
6482 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then begin
6483 List := TList.Create;
6485 SelectListItem(List);
6486 for i := 0 to List.Count - 1 do begin
6487 if TObject(List[i]) is TThreadItem then begin
6488 if TThreadItem(List[i]).IsLogFile then begin
6489 SelectReservAction.Enabled := True;
6494 SelectReservAction.Enabled := False;
6498 end else if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
6499 SelectReservAction.Enabled := True
6501 SelectReservAction.Enabled := False;
6504 procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
6506 AddRoundNameMenu(RoundNamePopupMenu.Items);
6509 procedure TGikoForm.AddRoundNameMenu(MenuItem: TMenuItem);
6515 Item := TMenuItem.Create(Self);
6516 Item.Caption := '
\90V
\82µ
\82¢
\96¼
\91O
\82Å
\8f\84\89ñ
\97\
\96ñ(&N)...';
6517 Item.OnClick := SelectNewRoundNameExecute;
6519 Item := TMenuItem.Create(Self);
6520 Item.Caption := '
\8f\84\89ñ
\83\8a\83X
\83g
\82©
\82ç
\8dí
\8f\9c(&D)';
6521 Item.OnClick := SelectDeleteRoundExecute;
6523 Item := TMenuItem.Create(Self);
6524 Item.Caption := '-';
6526 for i := 0 to RoundList.RoundNameList.Count - 1 do begin
6527 Item := TMenuItem.Create(Self);
6528 Item.Caption := RoundList.RoundNameList[i];
6529 Item.OnClick := SetSelectRoundName;
6534 procedure TGikoForm.SelectNewRoundNameExecute(Sender: TObject);
6537 Dlg: TRoundNameDialog;
6540 Dlg := TRoundNameDialog.Create(Self);
6543 if Dlg.ModalResult <> mrCancel then begin
6544 s := Trim(Dlg.RoundNameEdit.Text);
6545 RoundList.RoundNameList.Add(s);
6546 SetSelectItemRound(True, s, TMenuItem(Sender).Parent.Name);
6553 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string);
6555 threadItem : TThreadItem;
6557 if ParentName <> 'dummy1' then begin
6558 SetSelectItemRound(RoundFlag, RoundName);
6560 threadItem := GetActiveContent;
6561 if threadItem <> nil then begin
6562 threadItem.RoundName := RoundName;
6563 threadItem.Round := RoundFlag;
6568 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
6573 List := TList.Create;
6575 SelectListItem(List);
6576 for i := 0 to List.Count - 1 do begin
6577 if TObject(List[i]) is TBoard then begin
6578 TBoard(List[i]).RoundName := RoundName;
6579 TBoard(List[i]).Round := RoundFlag;
6580 end else if TObject(List[i]) is TThreadItem then begin
6581 if TThreadItem(List[i]).IsLogFile then begin
6582 TThreadItem(List[i]).RoundName := RoundName;
6583 TThreadItem(List[i]).Round := RoundFlag;
6592 procedure TGikoForm.SelectDeleteRoundExecute(Sender: TObject);
6594 SetSelectItemRound(False, '', TMenuItem(Sender).Parent.Name);
6598 procedure TGikoForm.SelectReservActionExecute(Sender: TObject);
6600 //
\82±
\82Ì
\83R
\83\81\83\93\83g
\8dí
\8f\9c\82µ
\82Ä
\82Í
\91Ê
\96Ú
6603 procedure TGikoForm.SetSelectRoundName(Sender: TObject);
6605 MenuItem: TMenuItem;
6607 if Sender is TMenuItem then begin
6608 MenuItem := TMenuItem(Sender);
6609 SetSelectItemRound(True, StripHotKey(MenuItem.Caption), TMenuItem(Sender).Parent.Name);
6614 procedure TGikoForm.NewBoardActionExecute(Sender: TObject);
6616 Dlg: TNewBoardDialog;
6620 for i := 0 to Screen.CustomFormCount - 1 do begin
6621 if TObject(Screen.CustomForms[i]) is TEditorForm then begin
6622 Msg := '
\83\8c\83X
\83G
\83f
\83B
\83^
\82ð
\91S
\82Ä
\95Â
\82¶
\82Ä
\82
\82¾
\82³
\82¢';
6623 MsgBox(Handle, Msg, '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
6627 Dlg := TNewBoardDialog.Create(Self);
6635 procedure TGikoForm.LoginActionExecute(Sender: TObject);
6640 if GikoSys.Dolib.Connected then begin
6641 //
\83\8d\83O
\83A
\83E
\83g
6642 GikoSys.Dolib.Disconnect;
6643 LoginAction.Checked := False;
6644 AddMessageList('
\83\8d\83O
\83A
\83E
\83g
\82µ
\82Ü
\82µ
\82½', nil, gmiOK);
6645 LoginAction.Caption := '
\83\8d\83O
\83C
\83\93(&L)';
6647 TmpCursor := Screen.Cursor;
6648 Screen.Cursor := crHourGlass;
6650 //
\92Ê
\8fí
\83\8d\83O
\83C
\83\93
6651 if not GikoSys.Setting.ForcedLogin then begin
6652 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6653 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6654 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6655 if GikoSys.Setting.ReadProxy then begin
6656 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6657 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6659 GikoSys.Dolib.ProxyAddress := '';
6660 GikoSys.Dolib.ProxyPort := 0;
6662 if GikoSys.Dolib.Connect then begin
6663 LoginAction.Checked := True;
6664 AddMessageList('
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6665 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6666 LoginToolButton.Style := tbsCheck;
6668 // 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);
6669 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6671 LoginAction.Checked := False;
6672 LoginToolButton.Down := False;
6673 LoginToolButton.Style := tbsButton;
6676 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
6677 + '
\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
6678 + '
\82±
\82Ì
\83\82\81[
\83h
\82Å
\83\8d\83O
\83C
\83\93\82ð
\8e\8e\82Ý
\82Ü
\82·
\82©
\81H' + #13#10;
6679 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) = IDYES then begin
6680 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6681 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6682 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6683 if GikoSys.Setting.ReadProxy then begin
6684 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6685 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6687 GikoSys.Dolib.ProxyAddress := '';
6688 GikoSys.Dolib.ProxyPort := 0;
6690 //SSL
\8fá
\8aQ
\97p
\8b
\90§
\83\8d\83O
\83C
\83\93
6691 GikoSys.Dolib.ForcedConnect;
6692 if GikoSys.Dolib.Connect then begin
6693 LoginAction.Checked := True;
6694 AddMessageList('
\8b
\90§
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6695 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6696 LoginToolButton.Style := tbsCheck;
6698 // 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);
6699 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6701 LoginAction.Checked := False;
6702 LoginToolButton.Down := False;
6703 LoginToolButton.Style := tbsButton;
6706 LoginAction.Checked := False;
6707 LoginToolButton.Down := False;
6708 LoginToolButton.Style := tbsButton;
6712 Screen.Cursor := TmpCursor;
6717 procedure TGikoForm.KeySettingActionExecute(Sender: TObject);
6719 Dlg: TKeySettingForm;
6721 Dlg := TKeySettingForm.Create(Self);
6723 if Dlg.ShowModal = mrOk then
6724 GikoSys.SaveKeySetting(ActionList);
6725 GikoSys.SaveEditorKeySetting(Dlg.EditorForm.ActionList);
6731 procedure TGikoForm.ArrangeActionExecute(Sender: TObject);
6733 if ArrangeAction.Checked then begin
6735 ViewPanel.Align := alNone;
6736 ListSplitter.Align := alNone;
6737 ThreadPanel.Align := alNone;
6739 ViewPanel.Width := FBrowserSizeWidth;
6740 ViewPanel.Align := alLeft;
6742 ListSplitter.Width := 5;
6743 ListSplitter.Align := alLeft;
6745 ViewPanel.Left := -10;
6747 ThreadPanel.Align := alClient;
6749 GikoSys.Setting.ListOrientation := gloHorizontal;
6750 case GikoSys.Setting.ListWidthState of
6752 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6753 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6754 ViewPanel.Width := 1;
6757 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6758 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6761 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6762 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6763 ViewPanel.Width := ThreadMainPanel.Width - 80;
6768 ViewPanel.Align := alNone;
6769 ListSplitter.Align := alNone;
6770 ThreadPanel.Align := alNone;
6772 ViewPanel.Height := FBrowserSizeHeight;
6773 ViewPanel.Align := alTop;
6775 ListSplitter.Height := 5;
6776 ListSplitter.Align := alTop;
6778 ViewPanel.Top := -10;
6780 ThreadPanel.Align := alClient;
6781 GikoSys.Setting.ListOrientation := gloVertical;
6782 case GikoSys.Setting.ListHeightState of
6784 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6785 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6786 ViewPanel.Height := 1;
6789 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6790 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6793 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6794 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6795 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
6802 procedure TGikoForm.PaneInitActionExecute(Sender: TObject);
6804 CabinetPanel.Width := 150;
6805 MessagePanel.Height := 40;
6807 FBrowserSizeWidth := 200;
6808 FBrowserSizeHeight := 200;
6809 if ArrangeAction.Checked then begin
6810 ViewPanel.Width := FBrowserSizeWidth;
6812 ViewPanel.Height := FBrowserSizeHeight;
6814 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6815 if GikoSys.Setting.ListHeightState = glsMax then begin
6816 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6817 GikoSys.Setting.ListHeightState := glsNormal;
6820 if GikoSys.Setting.ListWidthState = glsMax then begin
6821 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6822 GikoSys.Setting.ListWidthState := glsNormal;
6827 procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
6829 DEL_MSG = '
\81g^0
\81h
\82Ì
\83\8d\83O
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
6830 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6833 ThreadItem: TThreadItem;
6835 idx := BrowserTab.TabIndex;
6836 if idx <> -1 then begin
6837 if BrowserTab.Tabs.Objects[idx] <> nil then begin
6838 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).FThread;
6839 if GikoSys.Setting.DeleteMsg then
6840 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
6841 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', ThreadItem.Title, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
6843 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6844 ThreadItem.DeleteLogFile;
6845 if ThreadItem.ParentBoard = FActiveList then
6851 function TGikoForm.GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
6856 if CoolBar = nil then
6858 for i := 0 to CoolBar.Bands.Count - 1 do begin
6859 if CoolBar.Bands[i].Control = Control then begin
6860 Result := CoolBar.Bands[i];
6866 procedure TGikoForm.BrowserTabToolBarResize(Sender: TObject);
6868 if BrowserTab.Parent = BrowserTabToolBar then
6869 BrowserTab.Width := BrowserTabToolBar.Width;
6872 procedure TGikoForm.SelectTextClearActionExecute(Sender: TObject);
6874 DEL_MSG = '
\8di
\8d\9e\82Ý
\97\9a\97ð
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
6875 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6877 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
6878 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
6880 GikoSys.Setting.SelectTextList.Clear;
6881 SelectComboBox.Items.Clear;
6882 SelectComboBox.Text := '';
6883 SetListViewType( gvtAll );
6886 procedure TGikoForm.NameTextClearActionExecute(Sender: TObject);
6890 DEL_MSG = '
\83\8c\83X
\83G
\83f
\83B
\83^
\96¼
\91O
\97\9a\97ð
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
6891 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6893 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
6894 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
6896 GikoSys.Setting.NameList.Clear;
6897 for i := 0 to Screen.CustomFormCount - 1 do begin
6898 if TObject(Screen.CustomForms[i]) is TEditorForm then
6899 TEditorForm(Screen.CustomForms[i]).NameComboBox.Items.Clear;
6903 procedure TGikoForm.MailTextClearActionExecute(Sender: TObject);
6907 DEL_MSG = '
\83\8c\83X
\83G
\83f
\83B
\83^
\83\81\81[
\83\8b\97\9a\97ð
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
6908 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6910 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
6911 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
6913 GikoSys.Setting.MailList.Clear;
6914 for i := 0 to Screen.CustomFormCount - 1 do begin
6915 if TObject(Screen.CustomForms[i]) is TEditorForm then
6916 TEditorForm(Screen.CustomForms[i]).MailComboBox.Items.Clear;
6920 procedure TGikoForm.LeftmostTabSelectActionExecute(Sender: TObject);
6922 if BrowserTab.Tabs.Count > 0 then begin
6923 BrowserTab.TabIndex := 0;
6924 BrowserTab.OnChange(nil);
6928 procedure TGikoForm.LeftTabSelectActionExecute(Sender: TObject);
6930 if BrowserTab.Tabs.Count > 0 then begin
6931 if BrowserTab.TabIndex = -1 then begin
6932 BrowserTab.TabIndex := 0;
6933 BrowserTab.OnChange(nil);
6934 end else if BrowserTab.TabIndex > 0 then begin
6935 BrowserTab.TabIndex := BrowserTab.TabIndex - 1;
6936 BrowserTab.OnChange(nil);
6941 procedure TGikoForm.RightTabSelectActionExecute(Sender: TObject);
6943 if BrowserTab.Tabs.Count > 0 then begin
6944 if BrowserTab.TabIndex = -1 then begin
6945 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6946 BrowserTab.OnChange(nil);
6947 end else if BrowserTab.TabIndex < (BrowserTab.Tabs.Count - 1) then begin
6948 BrowserTab.TabIndex := BrowserTab.TabIndex + 1;
6949 BrowserTab.OnChange(nil);
6954 procedure TGikoForm.RightmostTabSelectActionExecute(Sender: TObject);
6956 if BrowserTab.Tabs.Count > 0 then begin
6957 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6958 BrowserTab.OnChange(nil);
6962 procedure TGikoForm.LeftmostTabSelectActionUpdate(Sender: TObject);
6964 LeftmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6967 procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
6969 LeftTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6972 procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);
6974 RightTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6977 procedure TGikoForm.RightmostTabSelectActionUpdate(Sender: TObject);
6979 RightmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6982 procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
6987 procedure TGikoForm.SetMenuFont;
6989 // GikoSys.MenuFont(MenuToolBar.Font);
6990 // MenuToolBar.Buttons[0].AutoSize := False;
6991 // MenuToolBar.Buttons[0].AutoSize := True;
6992 // MenuToolBar.Font.Color := clMenuText;
6993 GikoSys.MenuFont(MainCoolBar.Font);
6994 MenuToolBar.Buttons[0].AutoSize := False;
6995 MenuToolBar.Buttons[0].AutoSize := True;
6996 MainCoolBar.AutoSize := False;
6997 MainCoolBar.AutoSize := True;
6999 GikoSys.MenuFont(ListCoolBar.Font);
7000 GikoSys.MenuFont(BrowserCoolBar.Font);
7001 // MenuToolBar.Font.Color := clMenuText;
7004 procedure TGikoForm.FavoriteMenuClick(Sender: TObject);
7010 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\92Ç
\89Á
7011 NewMenu := TMenuItem.Create(MainMenu);
7012 NewMenu.Action := FavoriteAddAction;
7013 FavoriteMenu.Add(NewMenu);
7014 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\90®
\97\9d
7015 NewMenu := TMenuItem.Create(FavoriteMenu);
7016 NewMenu.Action := FavoriteArrangeAction;
7017 FavoriteMenu.Add(NewMenu);
7018 //
\83Z
\83p
\83\8c\81[
\83^
7019 NewMenu := TMenuItem.Create(FavoriteMenu);
7020 NewMenu.Caption := '-';
7021 FavoriteMenu.Add(NewMenu);
7023 CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
7026 procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
7031 for i := 0 to Node.Count - 1 do begin
7032 NewMenu := TFavoriteMenuItem.Create(Self);
7033 NewMenu.AutoHotkeys := maAutomatic;
7034 NewMenu.Caption := CustomStringReplace(Node.Item[i].Text, '&', '&&');
7035 TFavoriteMenuItem(NewMenu).Data := Node.Item[i].Data;
7036 MenuItem.Add(NewMenu);
7038 if TObject(Node.Item[i].Data) is TFavoriteFolder then begin
7039 NewMenu.ImageIndex := TOOL_ICON_FAV_FOLDER;
7040 CreateFavMenu(Node.Item[i], NewMenu);
7041 end else if TObject(Node.Item[i].Data) is TFavoriteBoardItem then begin
7042 NewMenu.ImageIndex := TOOL_ICON_FAV_BOARD;
7043 NewMenu.OnClick := FavoriteClick;
7044 end else if TObject(Node.Item[i].Data) is TFavoriteThreadItem then begin
7045 NewMenu.ImageIndex := TOOL_ICON_FAV_THREAD;
7046 NewMenu.OnClick := FavoriteClick;
7051 procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
7053 Dlg : TFavoriteAddDialog;
7059 if Item is TFavoriteBoardItem then
7060 Item := TFavoriteBoardItem( Item ).Item
7061 else if Item is TFavoriteThreadItem then
7062 Item := TFavoriteThreadItem( Item ).Item;
7064 Node := FavoriteTreeView.Items.GetFirstNode;
7065 if Item is TBoard then begin
7066 ItemURL := TBoard( Item ).URL;
7067 while Node <> nil do begin
7069 if TObject( Data ) is TFavoriteBoardItem then begin
7070 if ItemURL = TFavoriteBoardItem( Data ).URL then begin
7071 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
7076 Node := Node.GetNext;
7078 Dlg := TFavoriteAddDialog.Create(Self);
7080 Dlg.SetBoard( TBoard( Item ) );
7085 end else if Item is TThreadItem then begin
7086 ItemURL := TThreadItem( Item ).URL;
7087 while Node <> nil do begin
7089 if TObject( Data ) is TFavoriteThreadItem then begin
7090 if ItemURL = TFavoriteThreadItem( Data ).URL then begin
7091 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
7096 Node := Node.GetNext;
7098 Dlg := TFavoriteAddDialog.Create(Self);
7100 Dlg.SetThreadItem( TThreadItem( Item ) );
7110 procedure TGikoForm.FavoriteAddActionExecute(Sender: TObject);
7112 ShowFavoriteAddDialog(GetActiveContent);
7115 procedure TGikoForm.FavoriteClick(Sender: TObject);
7118 FavoriteClick( Sender, True );
7122 procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
7125 ThreadItem: TThreadItem;
7126 FavBoard: TFavoriteBoardItem;
7127 FavThread: TFavoriteThreadItem;
7131 if Sender is TFavoriteMenuItem then
7132 Item := TFavoriteMenuItem(Sender).Data
7133 else if Sender is TLinkToolButton then
7134 Item := TLinkToolButton(Sender).Data
7135 else if Sender is TTreeNode then
7136 Item := TTreeNode( Sender ).Data
7140 if TObject(Item) is TFavoriteBoardItem then begin
7141 FavBoard := TFavoriteBoardItem(Item);
7142 Board := FavBoard.Item;
7143 if Board <> nil then begin
7144 if (FTreeType = gtt2ch) and (FActiveBBS <> Board.ParentCategory.ParenTBBS) then
7145 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7146 SelectTreeNode(Board, True);
7148 end else if TObject(Item) is TFavoriteThreadItem then begin
7149 FavThread := TFavoriteThreadItem(Item);
7150 ThreadItem := FavThread.Item;
7151 if ThreadItem = nil then
7154 InsertBrowserTab(ThreadItem, ActiveTab);
7156 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
7157 if GikoSys.Setting.ListWidthState = glsMin then begin
7158 BrowserMaxAndFocusAction.Execute;
7161 if GikoSys.Setting.ListHeightState = glsMin then begin
7162 BrowserMaxAndFocusAction.Execute;
7168 procedure TGikoForm.FavoriteAddActionUpdate(Sender: TObject);
7170 FavoriteAddAction.Enabled := (GetActiveContent <> nil);
7173 procedure TGikoForm.BoardFavoriteAddActionExecute(Sender: TObject);
7175 if TObject(ListView.Selected.Data) is TBoard then
7176 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
7179 procedure TGikoForm.BoardFavoriteAddActionUpdate(Sender: TObject);
7181 BoardFavoriteAddAction.Enabled := (GetActiveList is TCategory) and (ListView.SelCount > 0);
7184 procedure TGikoForm.ThreadFavoriteAddActionExecute(Sender: TObject);
7186 if TObject(ListView.Selected.Data) is TThreadItem then
7187 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
7190 procedure TGikoForm.ThreadFavoriteAddActionUpdate(Sender: TObject);
7192 ThreadFavoriteAddAction.Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
7195 procedure TGikoForm.TreeSelectFavoriteAddActionExecute(Sender: TObject);
7197 ShowFavoriteAddDialog(TObject(FClickNode.Data));
7200 procedure TGikoForm.FavoriteArrangeActionExecute(Sender: TObject);
7202 Dlg: TFavoriteArrangeDialog;
7204 Dlg := TFavoriteArrangeDialog.Create(Self);
7210 PostMessage( Handle, USER_SETLINKBAR, 0, 0 );
7213 procedure TGikoForm.BBSMenuItemOnClick(
7218 if Sender is TBBSMenuItem then
7219 ShowBBSTree( TBBSMenuItem( Sender ).Data );
7223 procedure TGikoForm.MainCoolBarResize(Sender: TObject);
7225 TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
7228 procedure TGikoForm.MoveToActionExecute(Sender: TObject);
7233 URL := Trim(AddressComboBox.Text);
7236 idx := AddressComboBox.Items.IndexOf(URL);
7237 if idx = -1 then begin
7238 AddressComboBox.Items.Insert(0, URL);
7239 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
7240 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
7242 AddressComboBox.Items.Delete(idx);
7243 AddressComboBox.Items.Insert(0, URL);
7247 procedure TGikoForm.MoveToURL(URL: string);
7250 protocol, host, path, document, port, bookmark : string;
7251 URL2, protocol2, host2, path2, document2, port2, bookmark2 : string;
7253 BBSID, BBSKey: string;
7254 tmpBoard, Board: TBoard;
7255 ThreadItem: TThreadItem;
7258 tmpThread : TThreadItem;
7259 // category : TCategory;
7260 // categoryNode : TTreeNode;
7261 // boardNode : TTreeNode;
7262 shiftDown : Boolean;
7266 GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark );
7267 GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey );
7270 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
7271 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
7272 if shiftDown then begin
7273 GikoSys.OpenBrowser(URL, gbtUserApp);
7275 end else if ctrlDown then begin
7276 GikoSys.OpenBrowser(URL, gbtIE);
7280 //=====
\83v
\83\89\83O
\83C
\83\93
7283 bi := High( BoardPlugIns );
7284 for i := Low( BoardPlugIns ) to bi do begin
7285 if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
7286 case BoardPlugIns[ i ].AcceptURL( URL ) of
7289 tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL );
7290 boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
7291 Board := BBSsFindBoardFromURL( boardURL );
7292 if Board = nil then begin
7293 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
7294 //GikoSys.OpenBrowser(URL, gbtUserApp);
7297 Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL );
7298 if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
7299 ShowBBSTree( BBSs[ 1 ] );
7302 if not Board.IsThreadDatRead then begin
7303 GikoSys.ReadSubjectFile( Board );
7308 ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
7309 if ThreadItem = nil then begin
7310 ThreadItem := tmpThread;
7311 Board.Insert( 0, ThreadItem );
7312 if ActiveList is TBoard then begin
7313 if TBoard(ActiveList) = Board then
7314 ListView.Items.Count := ListView.Items.Count + 1;
7316 InsertBrowserTab( ThreadItem );
7317 DownloadContent( ThreadItem );
7321 InsertBrowserTab( ThreadItem );
7322 if not ThreadItem.IsLogFile then begin
7323 DownloadContent( ThreadItem );
7333 tmpBoard := TBoard.Create(BoardPlugIns[ i ], URL);
7334 Board := BBSsFindBoardFromURL( tmpBoard.URL );
7336 if Board <> nil then begin
7337 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
7338 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7339 SelectTreeNode( Board, True );
7347 // 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¢
7351 if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
7352 boardURL := GikoSys.Get2chThreadURL2BoardURL( URL );
7353 Board := BBSsFindBoardFromURL( boardURL );
7355 Board := BBSsFindBoardFromBBSID( BBSID );
7357 if Board = nil then begin
7358 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
7359 //
\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)
7360 Board := BBSs[ 0 ].FindBBSID( Copy(BBSID, 1 , Length(BBSID) - 1) );
7362 if Board = nil then begin
7363 //
\93ü
\82é
\82×
\82«
\94Â
\82ª
\8c©
\82Â
\82©
\82ç
\82È
\82©
\82Á
\82½
\82Ì
\82Å
\81A
\95\81\92Ê
\82Ì
\83u
\83\89\83E
\83U
\82Å
\8aJ
\82
7364 GikoSys.OpenBrowser(URL, gbtUserApp);
7367 //
\8aO
\95\94\82Ì
\94Â
\82È
\82Ì
\82É2ch
\82ÌURL
\82É
\82³
\82ê
\82Ä
\82µ
\82Ü
\82Á
\82½
\93z
\82ð
\82±
\82±
\82Å
\8am
\94F
\82·
\82é
7369 GikoSys.ParseURI(URL2 , protocol2, host2, path2, document2, port2, bookmark2 );
7370 tmp1 := Copy(host, AnsiPos('.', host) + 1, Length(host));
7371 tmp2 := Copy(host2, AnsiPos('.', host2) + 1, Length(host2));
7372 if ( not GikoSys.Is2chHost(tmp1)) and (tmp1 <> tmp2) then begin
7373 GikoSys.OpenBrowser(URL, gbtUserApp);
7378 if not Board.IsThreadDatRead then
7379 GikoSys.ReadSubjectFile(Board);
7380 URL := GikoSys.Get2chBrowsableThreadURL( URL );
7381 ThreadItem := Board.FindThreadFromURL( URL );
7382 //
\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)
7383 if ThreadItem = nil then begin
7384 ThreadItem := Board.FindThreadFromFileName( BBSKey + '.dat' );
7387 if ThreadItem = nil then begin
7388 //shift ->
\90Ý
\92è
\83u
\83\89\83E
\83U
\81i
\96³
\82¯
\82ê
\82ÎIE
\81j
7390 {shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
7391 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
7393 GikoSys.OpenBrowser(URL, gbtUserApp)
7394 else if ctrlDown then
7395 GikoSys.OpenBrowser(URL, gbtIE)
7398 ThreadItem := TThreadItem.Create( nil, URL );
7399 ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
7400 if AnsiPos(Host, Board.URL) = 0 then
7401 ThreadItem.DownloadHost := Host
7403 ThreadItem.DownloadHost := '';
7404 Board.Insert(0, ThreadItem);
7405 if ActiveList is TBoard then begin
7406 if TBoard(ActiveList) = Board then
7407 ListView.Items.Count := ListView.Items.Count + 1;
7409 InsertBrowserTab(ThreadItem);
7410 DownloadContent(ThreadItem);
7413 if ThreadItem.IsLogFile then
7414 InsertBrowserTab(ThreadItem)
7416 if AnsiPos(Host, Board.URL) = 0 then
7417 ThreadItem.DownloadHost := Host
7419 ThreadItem.DownloadHost := '';
7420 InsertBrowserTab(ThreadItem);
7421 DownloadContent(ThreadItem);
7425 Board := BBSsFindBoardFromURL( URL );
7426 if Board = nil then begin
7427 GikoSys.OpenBrowser(URL, gbtAuto);
7429 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
7430 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7431 SelectTreeNode( Board, True );
7436 procedure TGikoForm.AddressToolBarResize(Sender: TObject);
7438 AddressComboBox.Width := AddressToolBar.Width - MoveToToolButton.Width - 10;
7439 CoolBarResized( Sender, MainCoolBar );
7442 procedure TGikoForm.AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
7443 Shift: TShiftState);
7445 if Key = VK_RETURN then
7446 MoveToAction.Execute;
7449 procedure TGikoForm.BrowserEnter(Sender: TObject);
7451 Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
7454 procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
7456 CDS:PCopyDataStruct;
7460 CDS := Message.CopyDataStruct;
7461 GetMem(PC, CDS^.cbData);
7463 lstrcpy(PC,CDS^.lpData);
7464 SetString(sURL, PC,lstrlen(PC));
7469 Message.Result := 1;
7472 procedure TGikoForm.WndProc(var Message: TMessage);
7477 if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
7480 if Message.WParam = SC_MINIMIZE then
7483 TreeClick( TreeView.Selected );
7497 procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
7499 hComboEdit: THandle;
7500 // KeyData: Integer;
7503 if AddressComboBox.Focused or SelectComboBox.Focused then begin
7504 if Msg.CharCode in [VK_BACK] then begin
7505 hComboEdit := GetFocus;
7506 if hComboEdit <> 0 then
7507 SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, Msg.KeyData);
7508 // SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, $000E0001);
7511 if Msg.CharCode in [VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PRIOR, VK_NEXT] then begin
7512 hComboEdit := GetFocus;
7513 if hComboEdit <> 0 then
7514 SendMessage(hComboEdit, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
7518 //
\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ð
7519 KeyData := Msg.KeyData;
7520 if (KeyData and $20000000) = 0 then begin
7521 if Msg.CharCode in [Ord('F'), Ord('V'), Ord('B'), Ord('R'),
7522 Ord('A'), Ord('T'), Ord('H')] then begin
7523 if not ActionList.IsShortCut(Msg) then begin
7531 procedure TGikoForm.BrowserTabVisibleActionExecute(Sender: TObject);
7533 GikoSys.Setting.BrowserTabVisible := BrowserTabVisibleAction.Checked;
7537 procedure TGikoForm.BrowserTabTopActionExecute(Sender: TObject);
7539 BrowserTabBottomAction.Checked := False;
7540 BrowserTabTopAction.Checked := True;
7541 GikoSys.Setting.BrowserTabPosition := gtpTop;
7545 procedure TGikoForm.BrowserTabBottomActionExecute(Sender: TObject);
7547 BrowserTabTopAction.Checked := False;
7548 BrowserTabBottomAction.Checked := True;
7549 GikoSys.Setting.BrowserTabPosition := gtpBottom;
7553 procedure TGikoForm.BrowserTabTabStyleActionExecute(Sender: TObject);
7555 BrowserTabButtonStyleAction.Checked := False;
7556 BrowserTabFlatStyleAction.Checked := False;
7557 BrowserTabTabStyleAction.Checked := True;
7558 GikoSys.Setting.BrowserTabStyle := gtsTab;
7562 procedure TGikoForm.BrowserTabButtonStyleActionExecute(Sender: TObject);
7564 BrowserTabTabStyleAction.Checked := False;
7565 BrowserTabFlatStyleAction.Checked := False;
7566 BrowserTabButtonStyleAction.Checked := True;
7567 GikoSys.Setting.BrowserTabStyle := gtsButton;
7571 procedure TGikoForm.BrowserTabFlatStyleActionExecute(Sender: TObject);
7573 BrowserTabFlatStyleAction.Checked := True;
7574 BrowserTabTabStyleAction.Checked := False;
7575 BrowserTabButtonStyleAction.Checked := False;
7576 GikoSys.Setting.BrowserTabStyle := gtsFlat;
7580 procedure TGikoForm.PreviewTimerTimer(Sender: TObject);
7586 HtmlFileName: string;
7590 TargetFrameName: OleVariant;
7591 PostData: OleVariant;
7592 Headers: OleVariant;
7593 WindowHeight: Integer;
7594 WindowWidth: Integer;
7598 Protocol, Host, Path, Document, Port, Bookmark: string;
7600 PreviewTimer.Enabled := False;
7604 case GikoSys.Setting.PreviewSize of
7611 WindowHeight := 192;
7615 WindowHeight := 384;
7619 WindowHeight := 480;
7621 else begin //gpsMedium
7623 WindowHeight := 288;
7627 ARect := Rect(0, 0, WindowWidth, WindowHeight);
7629 case GikoSys.Setting.PopupPosition of
7630 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7631 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7632 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
7633 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
7634 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
7635 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
7636 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7637 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7638 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Ó
7641 html := '<html><head>'#13#10
7643 + 'function init() {'#13#10
7644 + ' if ((document.body.clientHeight >= Image1.height) && (document.body.clientWidth >= Image1.width)) {'#13#10
7646 + ' var dh, ih;'#13#10
7647 + ' dh = document.body.clientWidth / document.body.clientHeight;'#13#10
7648 + ' ih = Image1.width / Image1.height;'#13#10
7649 + ' if (document.body.clientWidth < document.body.clientHeight) {'#13#10
7650 + ' if (ih > dh)'#13#10
7651 + ' Image1.width = document.body.clientWidth;'#13#10
7653 + ' Image1.height = document.body.clientHeight;'#13#10
7655 + ' if (ih < dh)'#13#10
7656 + ' Image1.height = document.body.clientHeight;'#13#10
7658 + ' Image1.width = document.body.clientWidth;'#13#10
7661 + ' Message.style.display = "none";'#13#10
7665 + '<body topmargin="0" leftmargin="0" style="border-width: 1px; overflow:hidden; border-style: solid;" onLoad="init()">'#13#10
7666 + '<div align="center" id="Message">
\83v
\83\8c\83r
\83\85\81[
\8dì
\90¬
\92\86</div>'#13#10
7667 + '<div align="center"><img name="Image1" border="0" src="%ImageURL%"></div>'#13#10
7669 sl := TStringList.Create;
7672 HtmlFileName := GikoSys.GetAppDir + HTML_FILE_NAME;
7673 sl.Text := AnsiReplaceStr(html, '%ImageURL%', FPreviewURL);
7674 sl.SaveToFile(HtmlFileName);
7681 NavURL := HtmlFileName;
7683 TargetFrameName := '';
7686 GikoSys.ParseURI(FPreviewURL, Protocol, Host, Path, Document, Port, Bookmark);
7687 Referer := Protocol + '://' + Host;
7689 Referer := Referer + ':' + Port;
7690 Referer := Referer + Path;
7691 Headers := 'Referer: ' + Referer;
7692 FPreviewBrowser.Navigate(NavURL, Flags, TargetFrameName, PostData, Headers);
7693 if ARect.Top + WindowHeight > Screen.DesktopHeight then
7694 ARect.Top := Screen.DesktopHeight - WindowHeight;
7695 if ARect.Left + WindowWidth > Screen.DesktopWidth then
7696 ARect.Left := Screen.DesktopWidth - WindowWidth;
7697 if ARect.Left < Screen.DesktopLeft then ARect.Left := Screen.DesktopLeft;
7698 if ARect.Bottom < Screen.DesktopTop then ARect.Bottom := Screen.DesktopTop;
7700 SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
7701 ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
7703 // Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
7704 // SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
7708 procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
7710 if PreviewTimer.Enabled then
7711 PreviewTimer.Enabled := False;
7712 if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
7713 FHint.ReleaseHandle;
7716 if (FPreviewBrowser <> nil) and (IsWindowVisible(FPreviewBrowser.Handle)) then
7717 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
7718 Message.Result := 1;
7722 procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
7724 MsgBarCloseAction.Execute;
7727 function TGikoForm.OnDocumentContextMenu(Sender: TObject): WordBool;
7729 Doc: IHtmlDocument2;
7730 Range: IHTMLTxtRange;
7733 ThreadItem: TThreadItem;
7736 Doc := FactiveContent.FBrowser.Document as IHtmlDocument2;
7737 if Assigned(Doc) then begin
7738 Range := Doc.selection.createRange as IHTMLTxtRange;
7739 s := CustomStringReplace(Range.text, '
\81@', ' ');//
\91S
\8ap
\8bó
\94\92\82ð
\94¼
\8ap
\8bó
\94\92\82É
7740 s := ZenToHan(Trim(s));
7741 if GikoSys.IsNumeric(s) then begin
7743 ThreadItem := GetActiveContent;
7744 if ThreadItem <> nil then begin
7746 FHint.PopupType := gptThread;
7747 SetResPopupText(ThreadItem, Num, Num, False, False);
7748 if FHint.ResCount <> 0 then
7759 procedure TGikoForm.SetResPopupText(threadItem: TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
7771 boardPlugIn : TBoardPlugIn;
7774 if StNum > ToNum then begin
7780 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
7781 if StNum + MAX_POPUP_RES < ToNum then
7782 ToNum := StNum + MAX_POPUP_RES;
7784 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
7786 if ThreadItem <> nil then
7787 FHint.Title := ThreadItem.Title;
7789 if ThreadItem <> nil then begin
7790 if ThreadItem.IsBoardPlugInAvailable then begin
7791 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
7792 boardPlugIn := ThreadItem.BoardPlugIn;
7794 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
7795 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
7796 for i := StNum to ToNum do begin
7798 //
\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½
7799 tmp := boardPlugIn.GetDat( DWORD( threadItem ), i );
7800 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7801 Res := GikoSys.DivideStrLine(tmp);
7802 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7803 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7805 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7808 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7809 Body := CustomStringReplace(Body, '<br>', #10,true);
7810 Body := CustomStringReplace(Body, '</a>', '',true);
7811 Body := GikoSys.DeleteLink(Body);
7812 Body := CustomStringReplace(Body, '<', '<');
7813 Body := CustomStringReplace(Body, '>', '>');
7814 Body := CustomStringReplace(Body, '"', '"');
7815 Body := CustomStringReplace(Body, '&', '&');
7816 Body := CustomStringReplace(Body, ' ', ' ');
7818 FHint.Add(Header, Body);
7819 //FHint.Title := '';
7823 for i := StNum to ToNum do begin
7825 FileName := ThreadItem.FilePath;
7826 tmp := GikoSys.ReadThreadFile(FileName, Line);
7827 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7828 Res := GikoSys.DivideStrLine(tmp);
7829 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7830 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7832 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7834 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7835 Body := CustomStringReplace(Body, '<br>', #10,true);
7836 Body := CustomStringReplace(Body, '</a>', '',true);
7837 Body := GikoSys.DeleteLink(Body);
7838 Body := CustomStringReplace(Body, '<', '<');
7839 Body := CustomStringReplace(Body, '>', '>');
7840 Body := CustomStringReplace(Body, '"', '"');
7841 Body := CustomStringReplace(Body, '&', '&');
7842 Body := CustomStringReplace(Body, ' ', ' ');
7843 FHint.Add(Header, Body);
7844 //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
7853 procedure TGikoForm.ShowTextPopup;
7858 // if Trim(s) = '' then
7861 FHint.Font.Name := GikoSys.Setting.HintFontName;
7862 FHint.Font.Size := GikoSys.Setting.HintFontSize;
7863 FHint.Font.Color := GikoSys.Setting.HintFontColor;
7864 FHint.Color := GikoSys.Setting.HintBackColor;
7865 FHint.HeaderBold := GikoSys.Setting.ResPopupHeaderBold;
7867 if FHint.PopupType = gptRaw then
7868 ARect := FHint.CalcHintRect(Screen.Width, FHint.Caption, nil)
7870 ARect := FHint.CalcHintRect(Screen.Width, '', nil);
7871 case GikoSys.Setting.PopupPosition of
7872 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7873 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7874 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
7875 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
7876 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
7877 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
7878 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7879 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7880 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Ó
7882 //FHint.ActivateHint(ARect, s);
7883 if FHint.PopupType = gptRaw then
7884 FHint.ActivateHint(ARect, FHint.Caption)
7886 FHint.ActivateHint(ARect, '');
7888 FHint.ReleaseHandle;
7893 procedure TGikoForm.GikoHelpActionExecute(Sender: TObject);
7897 FileName := GikoSys.GetAppDir + 'batahlp.chm';
7898 if not FileExists(FileName) then begin
7901 '
\83w
\83\8b\83v
\82ª
\8c©
\82Â
\82©
\82è
\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½' + #13#10 +
7902 '
\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 +
7903 '
\83w
\83\8b\83v
\82Í
\83M
\83R
\83i
\83r
\82Ì
\83T
\83C
\83g
\82É
\92u
\82¢
\82Ä
\82 \82è
\82Ü
\82·',
7908 ShellExecute(Handle, 'open', PChar(FileName), '', PChar(GikoSys.GetAppDir), SW_SHOW);
7911 procedure TGikoForm.ToolButton18Click(Sender: TObject);
7913 DEL_MSG = '
\97\9a\97ð
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
7914 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
7916 if FTreeType = gttHistory then begin
7917 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
7918 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
7922 TreeView.Items.Clear;
7926 procedure TGikoForm.KotehanActionExecute(Sender: TObject);
7928 Dlg: TKotehanDialog;
7930 Dlg := TKotehanDialog.Create(Self);
7938 procedure TGikoForm.SetLinkBar;
7942 ToolButton: TLinkToolButton;
7943 MenuItem: TMenuItem;
7944 oldIgnoreResize : Boolean;
7946 oldIgnoreResize := FIsIgnoreResize;
7947 FIsIgnoreResize := True;
7948 MainCoolBar.Bands.BeginUpdate;
7950 LinkBarPopupMenu.Items.Clear;
7951 for i := LinkToolBar.ButtonCount - 1 downto 0 do
7952 //LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
7953 LinkToolBar.Buttons[i].Free;
7954 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
7955 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
7956 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
7957 ToolButton := TLinkToolButton.Create(LinkToolBar);
7958 // ToolButton.Parent := LinkToolBar;
7959 if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteFolder then begin
7960 MenuItem := TMenuItem.Create(Self);
7961 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
7962 LinkBarPopupMenu.Items.Add(MenuItem);
7963 ToolButton.MenuItem := MenuItem;
7964 ToolButton.ImageIndex := TOOL_ICON_FAV_FOLDER;
7965 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
7966 ToolButton.ImageIndex := TOOL_ICON_FAV_BOARD;
7967 ToolButton.OnClick := FavoriteClick;
7968 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
7969 ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
7970 ToolButton.OnClick := FavoriteClick;
7972 ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
7973 ToolButton.Left := 10000;
7974 ToolButton.Data := FavoriteTreeView.Items[i].Item[j].Data;
7975 ToolButton.AutoSize := True;
7976 ToolButton.OnDragDrop := LinkToolButtonDragDrop;
7977 ToolButton.OnDragOver := FavoriteDragOver;
7978 ToolButton.OnMouseDown := LinkToolButtonOnMouseDown;
7979 ToolButton.OnMouseMove := LinkToolButtonOnMouseMove;
7980 ToolButton.OnMouseUp := LinkToolButtonOnMouseUp;
7981 ToolButton.OnStartDrag := LinkToolButtonStartDrag;
7982 //ToolButton.DragMode := dmAutomatic;
7983 ToolButton.DragMode := dmManual;
7984 ToolButton.PopupMenu := FavoriteTreePopupMenu;
7986 LinkToolBar.InsertControl(ToolButton);
7991 { if LinkToolBar.ButtonCount = 0 then begin
7992 ToolButton := TLinkToolButton.Create(LinkToolBar);
7993 ToolButton.Style := tbsButton;
7994 ToolButton.ImageIndex := -1;
7995 ToolButton.Caption := '';
7996 LinkToolBar.InsertControl(ToolButton);
7999 MainCoolBar.Bands.EndUpdate;
8000 LoadCoolBarSettings;
8001 FIsIgnoreResize := oldIgnoreResize;
8005 procedure TGikoForm.FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
8013 if Sender = FavoriteTreeView then begin
8014 Node := FavoriteTreeView.GetNodeAt(X, Y);
8019 bound := Node.DisplayRect( False );
8020 height := bound.Bottom - bound.Top;
8021 if (bound.Top + height / 2) <= Y then
8022 Node := FavoriteTreeView.GetNodeAt(X, Y + height);
8027 if Node.IsFirstNode then
8032 if FDropSpaceNode <> nil then
8033 if FDropSpaceNode.AbsoluteIndex = Node.AbsoluteIndex then
8036 if Change then begin
8037 if FDropSpaceNode <> nil then
8038 FDropSpaceNode.Free;
8040 FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil );
8041 FDropSpaceNode.MoveTo( Node, naInsert );
8042 FDropSpaceNode.ImageIndex := -1;
8043 FDropSpaceNode.SelectedIndex := -1;
8047 if Source = FavoriteTreeView then begin
8048 if FavoriteTreeView.Selected = FavoriteTreeView.Items.GetFirstNode then begin
8053 end else if Source = BrowserTab then
8055 else if Source = ListView then
8057 else if Source is TLinkToolButton then
8059 else if Source = TreeView then
8065 procedure TGikoForm.FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
8068 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
8071 procedure TGikoForm.LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
8073 // FDragging := true;
8076 procedure TGikoForm.LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
8078 SenderNode: TTreeNode;
8079 LinkToolButton: TLinkToolButton;
8082 LinkToolButton := TLinkToolButton( Sender );
8083 SenderNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data );
8085 FavoriteDragDrop( SenderNode, Source );
8089 procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8091 favButton : TLinkToolButton;
8092 favThreadItem : TFavoriteThreadItem;
8098 if Sender is TLinkToolButton then begin
8099 favButton := TLinkToolButton( Sender );
8100 if TObject( favButton.Data ) is TFavoriteThreadItem then begin
8101 favThreadItem := TFavoriteThreadItem( favButton.Data );
8102 if favThreadItem.Item <> nil then
8103 InsertBrowserTab( favThreadItem.Item, False );
8111 procedure TGikoForm.LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
8115 TToolButton( Sender ).DragMode := dmManual;
8116 if ssLeft in Shift then begin
8117 // 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)
8118 if FDragTime = 0 then begin
8119 FDragTime := GetTickCount();
8121 Now := GetTickCount();
8122 if (Now - FDragTime) > 500 then begin
8123 if FDragButton <> TToolButton( Sender ) then begin
8125 FDragButton := TToolButton( Sender );
8126 TToolButton(Sender).BeginDrag(false ,5);
8129 {$IF Defined(debug)}
8130 ShowMessage('Error');
8141 procedure TGikoForm.LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8146 function TGikoForm.GetWidthAllToolButton(ToolBar: TToolBar): Integer;
8151 for i := 0 to ToolBar.ButtonCount - 1 do
8152 if ToolBar.Buttons[i].Visible then
8153 Result := Result + ToolBar.Buttons[i].Width;
8156 procedure TGikoForm.MainCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8158 Control : TWinControl;
8161 Control := FindControl(BandInfo^.hwndChild);
8162 if Control = nil then
8165 for i := MainCoolBar.Bands.Count - 1 downto 0 do begin
8166 if MainCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8167 idx := MainCoolBar.Bands[ i ].ID;
8171 Canvas.Font.Handle := GetStockObject( DEFAULT_GUI_FONT );
8172 if (Control = MenuToolBar) or (Control = StdToolBar) then begin
8173 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8174 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8175 BandInfo^.cxMinChild := 0;
8176 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth;
8177 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8178 end else if Control = LinkToolBar then begin
8179 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8180 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8181 BandInfo^.cxMinChild := 0;
8182 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83\8a\83\93\83N' );
8183 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8184 end else begin // AddressToolBar
8185 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8186 BandInfo^.cxMinChild := 0;
8187 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83A
\83h
\83\8c\83X' );
8191 procedure TGikoForm.MainCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8197 ChevronPopupMenu.Items.Clear;
8199 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
8200 if MainCoolBar.Bands[ i ].Visible then begin
8201 if Idx = Int64(RebarChevron^.uBand) then begin
8208 if (Idx >= 0) and (MainCoolBar.Bands.Count > Idx) then begin
8209 if MainCoolBar.Bands[Idx].Control = MenuToolbar then begin
8211 end else if MainCoolBar.Bands[Idx].Control = StdToolbar then begin
8212 ToolBarChevronMenu(StdToolBar);
8213 end else if MainCoolBar.Bands[Idx].Control = LinkToolbar then begin
8217 p := MainCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8218 ChevronPopupMenu.Popup(p.x, p.y);
8222 procedure TGikoForm.MenuBarChevronMenu;
8223 procedure SetSubMenu(MenuItem: TMenuItem; PopupItem: TMenuItem);
8229 for i := 0 to MenuItem.Count - 1 do begin
8231 if MenuItem[i] is TFavoriteMenuItem then begin
8232 Item := TFavoriteMenuItem.Create(Self);
8233 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(MenuItem[i]).Data;
8235 Item := TMenuItem.Create(Self);
8236 Item.Caption := MenuItem[i].Caption;
8237 Item.Action := MenuItem[i].Action;
8238 Item.ImageIndex := MenuItem[i].ImageIndex;
8239 Item.OnClick := MenuItem[i].OnClick;
8240 PopupItem.Add(Item);
8241 if MenuItem[i].Count > 0 then
8242 SetSubMenu(MenuItem[i], Item);
8251 ChevronPopupMenu.Items.Clear;
8252 ChevronPopupMenu.Images := MainMenu.Images;
8253 bw := GetWidthAllToolButton(MenuToolBar);
8254 if MenuToolBar.Width < bw then begin
8256 for i := 0 to MenuToolBar.ButtonCount - 1 do begin
8257 w := w + MenuToolBar.Buttons[i].Width;
8258 if MenuToolBar.Width <= w then begin
8259 Item := TMenuItem.Create(Self);
8260 Item.Caption := MenuToolBar.Buttons[i].MenuItem.Caption;
8261 //Item.Action := MenuToolBar.Buttons[i].MenuItem.Action;
8262 ChevronPopupMenu.Items.Add(Item);
8263 SetSubMenu(MenuToolbar.Buttons[i].MenuItem, Item);
8269 procedure TGikoForm.ToolBarChevronMenu(ToolBar: TToolBar);
8270 procedure SetSubMenu(PopupMenu: TPopupMenu; PopupItem: TMenuItem);
8275 if Assigned(PopupMenu.OnPopup) then
8276 PopupMenu.OnPopup(nil);
8277 for i := 0 to PopupMenu.Items.Count - 1 do begin
8279 if PopupMenu.Items[i] is TFavoriteMenuItem then begin
8280 Item := TFavoriteMenuItem.Create(Self);
8281 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(PopupMenu.Items[i]).Data;
8283 Item := TMenuItem.Create(Self);
8284 Item.Caption := PopupMenu.Items[i].Caption;
8285 Item.Action := PopupMenu.Items[i].Action;
8286 Item.ImageIndex := PopupMenu.Items[i].ImageIndex;
8287 Item.OnClick := PopupMenu.Items[i].OnClick;
8288 PopupItem.Add(Item);
8297 ChevronPopupMenu.Items.Clear;
8298 ChevronPopupMenu.Images := ToolBar.HotImages;
8299 bw := GetWidthAllToolButton(ToolBar);
8300 if ToolBar.Width < bw then begin
8302 for i := 0 to ToolBar.ButtonCount - 1 do begin
8303 w := w + ToolBar.Buttons[i].Width;
8304 if ToolBar.Width <= w then begin
8305 Case ToolBar.Buttons[i].Tag of
8308 Item := TMenuItem.Create(Self);
8309 if ToolBar.Buttons[i].Style = tbsSeparator then
8312 Item.Caption := ToolBar.Buttons[i].Caption;
8313 Item.Action := ToolBar.Buttons[i].Action;
8314 //Item.Visible := True;
8316 ChevronPopupMenu.Items.Add(Item);
8317 if ToolBar.Buttons[i].DropdownMenu <> nil then begin
8319 Item.OnClick := nil;
8320 SetSubMenu(ToolBar.Buttons[i].DropdownMenu, Item);
8324 //
\8f«
\97\88\82Ì
\82½
\82ß
\82Ì
\97\
\96ñ
8331 procedure TGikoForm.LinkBarChevronMenu;
8336 Item: TFavoriteMenuItem;
8338 Button: TLinkToolButton;
8340 ChevronPopupMenu.Items.Clear;
8341 ChevronPopupMenu.Images := LinkToolBar.Images;
8342 bw := GetWidthAllToolButton(LinkToolBar);
8343 if LinkToolBar.Width < bw then begin
8345 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
8346 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
8347 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
8348 w := w + LinkToolBar.Buttons[j].Width;
8349 if LinkToolBar.Width <= w then begin
8350 if LinkToolBar.Buttons[j] is TLinkToolButton then begin
8351 Button := TLinkToolButton(LinkToolBar.Buttons[j]);
8352 Item := TFavoriteMenuItem.Create(Self);
8353 if TObject(Button.Data) is TFavoriteFolder then begin
8354 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], Item);
8355 end else if TObject(Button.Data) is TFavoriteBoardItem then begin
8356 Item.OnClick := FavoriteClick;
8357 end else if TObject(Button.Data) is TFavoriteThreadItem then begin
8358 Item.OnClick := FavoriteClick;
8360 Item.Data := Button.Data;
8361 Item.Caption := LinkToolBar.Buttons[j].Caption;
8362 Item.ImageIndex := LinkToolBar.Buttons[j].ImageIndex;
8363 ChevronPopupMenu.Items.Add(Item);
8374 \brief
\83o
\83\93\83h
\95\9d\82ð
\8dÄ
\8cv
\8eZ
\81E
\8dÄ
\90Ý
\92è
\82·
\82é
8375 \param bar
\83o
\83\93\83h
\82ª
\8f\8a\91®
\82·
\82é CoolBar
8376 \param band
\8dÄ
\8cv
\8eZ
\81E
\8dÄ
\90Ý
\92è
\82·
\82é
\83o
\83\93\83h
8378 \93Æ
\8e©
\82É
\83o
\83\93\83h
\82É
\94z
\92u
\82³
\82ê
\82Ä
\82¢
\82é
\83R
\83\93\83g
\83\8d\81[
\83\8b\82Ì
\83T
\83C
\83Y
\82ð
\95Ï
\8dX
\82µ
\82½
\8fê
\8d\87\82É
8379 \83V
\83F
\83u
\83\8d\83\93\82Ì
\95\
\8e¦
\88Ê
\92u
\82ð
\8dÄ
\90Ý
\92è
\82·
\82é
\82½
\82ß
\82É
\8eg
\97p
\82µ
\82Ü
\82·
\81B
8381 procedure TGikoForm.ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
8383 bandInfo : tagREBARBANDINFOA;
8384 pBandInfo : PReBarBandInfoA;
8391 pBandInfo := @bandInfo;
8392 ZeroMemory( pBandInfo, sizeof( bandInfo ) );
8393 bandInfo.cbSize := sizeof( bandInfo );
8394 bandInfo.hwndChild := h;
8395 bandInfo.cyMinChild := bar.Height;
8396 bar.OnBandInfo( nil, pBandInfo );
8397 // band
\82Ì
\83C
\83\93\83f
\83b
\83N
\83X
\82ð
\92T
\82·
8399 for i := bar.Bands.Count - 1 downto 0 do begin
8400 if bar.Bands[ i ].Control.Handle = h then begin
8406 lResult := SendMessage( bar.Handle, RB_SETBANDINFO, i, Integer( pBandInfo ) );
8410 procedure TGikoForm.ListCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8412 Control: TWinControl;
8415 Control := FindControl(BandInfo^.hwndChild);
8416 if Control = nil then
8419 for i := ListCoolBar.Bands.Count - 1 downto 0 do begin
8420 if ListCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8421 idx := ListCoolBar.Bands[ i ].ID;
8425 if Control = ListToolBar then begin
8426 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8427 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8428 BandInfo^.cxMinChild := 0;
8429 BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
8430 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8432 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8433 BandInfo^.cxMinChild := 0;
8434 BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
8438 procedure TGikoForm.ListCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8443 ChevronPopupMenu.Items.Clear;
8444 Idx := RebarChevron^.uBand;
8445 if (Idx >= 0) and (ListCoolBar.Bands.Count > Idx) then begin
8446 if ListCoolBar.Bands[Idx].Control = ListToolBar then begin
8447 ToolBarChevronMenu(ListToolBar);
8450 p := ListCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8451 ChevronPopupMenu.Popup(p.x, p.y);
8455 procedure TGikoForm.BrowserCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8457 Control: TWinControl;
8460 Control := FindControl(BandInfo^.hwndChild);
8461 if Control = nil then
8464 for i := BrowserCoolBar.Bands.Count - 1 downto 0 do begin
8465 if BrowserCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8466 idx := BrowserCoolBar.Bands[ i ].ID;
8470 if Control = BrowserToolBar then begin
8471 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8472 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8473 BandInfo^.cxMinChild := 0;
8474 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
8475 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8477 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8478 BandInfo^.cxMinChild := 0;
8479 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
8483 procedure TGikoForm.BrowserCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8488 ChevronPopupMenu.Items.Clear;
8489 Idx := RebarChevron^.uBand;
8490 if (Idx >= 0) and (BrowserCoolBar.Bands.Count > Idx) then begin
8491 if BrowserCoolBar.Bands[Idx].Control = BrowserToolBar then
8492 ToolBarChevronMenu(BrowserToolBar)
8495 p := BrowserCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8496 ChevronPopupMenu.Popup(p.x, p.y);
8500 procedure TGikoForm.ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
8502 if Column^.iImage = -1 then begin
8503 Column^.mask := Column^.mask or LVCF_FMT;
8505 Column^.mask := Column^.mask or LVCF_FMT or LVCF_IMAGE;
8506 Column^.fmt := Column^.fmt or LVCFMT_IMAGE or LVCFMT_BITMAP_ON_RIGHT;
8510 procedure TGikoForm.ThreadEditorActionExecute(Sender: TObject);
8512 Editor: TEditorForm;
8514 if not (GetActiveList is TBoard) then
8516 Editor := TEditorForm.Create(Self);
8517 Editor.SetBoard(TBoard(GetActiveList));
8519 Editor.BodyEdit.SetFocus;
8522 procedure TGikoForm.ToolBarSettingActionExecute(Sender: TObject);
8524 Dlg: TToolBarSettingDialog;
8526 //Component: TComponent;
8528 Dlg := TToolBarSettingDialog.Create(Self, ActionList);
8530 Dlg.AddToolBar(StdToolBar, gttStandard);
8531 Dlg.AddToolBar(ListToolBar, gttList);
8532 Dlg.AddToolBar(BrowserToolBar, gttBrowser);
8533 case FToolBarSettingSender of
8534 tssMain: Dlg.ToolBarIndex := 0;
8535 tssList: Dlg.ToolBarIndex := 1;
8536 tssBrowser: Dlg.ToolBarIndex := 2;
8539 if ToolBarSettingAction.ActionComponent.GetParentComponent is TPopupMenu then begin
8540 Component := TPopupMenu( ToolBarSettingAction.ActionComponent.GetParentComponent ).PopupComponent;
8542 if Component = MainCoolBar then
8543 Dlg.ToolBarComboBox.ItemIndex := 0
8544 else if Component = ListCoolBar then
8545 Dlg.ToolBarComboBox.ItemIndex := 1
8546 else if Component = BrowserCoolBar then
8547 Dlg.ToolBarComboBox.ItemIndex := 2;
8550 if Dlg.ShowModal = mrOK then begin
8553 //
\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é
8554 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
8555 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth + 1;
8556 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth - 1;
8558 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
8559 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth + 1;
8560 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth - 1;
8562 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
8563 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth + 1;
8564 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth - 1;
8566 SaveToolBarSetting(StdToolBar);
8567 SaveToolBarSetting(ListToolBar);
8568 for i := ListToolBar.ControlCount - 1 downto 0 do
8570 if ListToolBar.Controls[ i ].Action = SelectItemAction then
8572 //
\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·
8573 if (i + 1) < ListToolBar.ControlCount then
8574 if ListToolBar.Controls[ i + 1 ] is TToolButton then
8575 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
8576 ListToolBar.Controls[ i + 1 ].Visible := False;
8578 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
8579 ListToolBar.Controls[ i ].Visible := False;
8580 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
8581 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
8582 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
8583 SelectComboBox.Parent := ListToolBar;
8584 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
8585 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
8586 SelectComboBoxSplitter.Parent := ListToolBar;
8591 ResetBandInfo( ListCoolBar, ListToolBar );
8592 SaveToolBarSetting(BrowserToolBar);
8596 FToolBarSettingSender := tssNone;
8600 function TGikoForm.FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
8605 for i := bar.ButtonCount - 1 downto 0 do begin
8606 if bar.Buttons[ i ].Action = action then begin
8607 Result := bar.Buttons[ i ];
8616 procedure TGikoForm.SetToolBarPopup;
8619 aIEButton : TToolButton;
8620 aCabinetBBSButton : TToolButton;
8621 aResRangeButton : TToolButton;
8622 aThreadRangeButton: TToolButton;
8624 for i := 0 to StdToolBar.ButtonCount - 1 do begin
8626 for i := 0 to ListToolBar.ButtonCount - 1 do begin
8627 if ListToolBar.Buttons[i].Action = IconStyle then
8628 ListToolBar.Buttons[i].DropdownMenu := ListIconPopupMenu;
8629 if ListToolBar.Buttons[i].Action = SelectReservAction then
8630 ListToolBar.Buttons[i].DropdownMenu := RoundNamePopupMenu;
8632 aIEButton := FindToolBarButton( BrowserToolBar, IEAction );
8633 if aIEButton <> nil then
8634 aIEButton.DropdownMenu := BrowserPopupMenu;
8635 aCabinetBBSButton := FindToolBarButton( StdToolBar, CabinetBBSAction );
8636 if aCabinetBBSButton <> nil then
8637 aCabinetBBSButton.DropdownMenu := BBSSelectPopupMenu;
8638 aResRangeButton := FindToolBarButton( BrowserToolBar, ResRangeAction );
8639 if aResRangeButton <> nil then
8640 aResRangeButton.DropdownMenu := ResRangePopupMenu;
8641 aThreadRangeButton:= FindToolBarButton( ListToolBar, ThreadRangeAction );
8642 if aThreadRangeButton <> nil then
8643 aThreadRangeButton.DropdownMenu := ThreadRangePopupMenu;
8646 procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState;
8647 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
8656 Wnd := WindowFromPoint(MousePos);
8658 if WheelDelta > 0 then
8663 if (Wnd = BrowserTab.Handle) or
8664 (Wnd = BrowserTab.Parent.Handle) then begin
8665 BrowserTab.ScrollTabs(Delta);
8666 end else if Wnd = ListView.Handle then begin
8667 if ListView.ViewStyle = vsList then
8668 ListView.Scroll( Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE, 0 )
8670 ListView.Scroll( 0, Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE );
8677 procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
8679 if Length( SelectComboBox.Text ) = 0 then
8681 AllItemAction.Checked := True;
8682 LogItemAction.Checked := False;
8683 NewItemAction.Checked := False;
8685 //
\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é
8686 if AllItemAction.Checked then
8687 AllItemAction.Checked := False;
8688 if LogItemAction.Checked then
8689 LogItemAction.Checked := False;
8690 if NewItemAction.Checked then
8691 NewItemaction.Checked := False;
8694 if Length( SelectComboBox.Text ) = 0 then
8695 SetListViewType( gvtAll )
8697 SetListViewType( gvtUser, SelectComboBox.Text, false);
8700 procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
8701 Shift: TShiftState);
8704 if Key = VK_Return then
8707 end else if Length( SelectComboBox.Text ) = 0 then
8709 AllItemAction.Checked := True;
8710 LogItemAction.Checked := False;
8711 NewItemAction.Checked := False;
8713 //
\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é
8714 if AllItemAction.Checked then
8715 AllItemAction.Checked := False;
8716 if LogItemAction.Checked then
8717 LogItemAction.Checked := False;
8718 if NewItemAction.Checked then
8719 NewItemaction.Checked := False;
8724 procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
8729 if Length( SelectComboBox.Text ) = 0 then
8731 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
8732 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
8737 //
\8di
\82è
\8d\9e\82Ý
\8c\9f\8dõ
\82Ì
\97\9a\97ð
\8dX
\90V
8738 procedure TGikoForm.ModifySelectList;
8745 if SelectComboBox.Parent = nil then
8748 if Length( SelectComboBox.Text ) > 0 then
8750 oldText := SelectComboBox.Text;
8751 idx := GikoSys.Setting.SelectTextList.IndexOf( oldText );
8753 GikoSys.Setting.SelectTextList.Delete( idx );
8754 idx := SelectComboBox.Items.IndexOf( oldText );
8756 SelectComboBox.Items.Delete( idx );
8757 GikoSys.Setting.SelectTextList.Insert( 0, oldText );
8758 SelectComboBox.Items.Insert( 0, oldText );
8759 SelectComboBox.Text := oldText;
8767 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\8dÄ
\93Ç
\82Ý
\8d\9e\82Ý
\82·
\82é
8768 procedure TGikoForm.SelectResActionExecute(Sender: TObject);
8770 Dlg: TListSelectDialog;
8771 ThreadItem : TThreadItem;
8772 FilterList : TStringList;
8775 Dlg := TListSelectDialog.Create(Self);
8777 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
8778 Dlg.SelectComboBox.Text := FSelectResWord;
8780 if Dlg.ModalResult = mrOK then begin
8781 SelectResAction.Checked := True;
8782 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
8783 //
\8bó
\93ü
\97Í
\82Å OK
\82Í
\8di
\82è
\8d\9e\82Ý
\89ð
\8f\9c\82Æ
\93¯
\88Ó
\8b`
8784 ResRangeAction.Execute;
8786 GikoSys.ResRange := Ord( grrSelect );
8788 //
\8dÅ
\8cã
\82É
\90Ý
\92è
\82µ
\82½
\82à
\82Ì
\82ð
\8ao
\82¦
\82Ä
\82¨
\82
8789 FSelectResWord := Dlg.SelectComboBox.Text;
8791 //
\8c\9f\8dõ
\97\9a\97ð
\82Ì
\8dX
\90V
8792 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
8794 GikoSys.Setting.SelectTextList.Delete(idx);
8795 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
8796 while Dlg.SelectComboBox.Items.Count > 100 do begin
8797 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
8801 if SelectComboBox.Parent <> nil then
8802 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
8806 //
\83t
\83B
\83\8b\83^
\82Ì
\90Ý
\92è
8807 FilterList := TStringList.Create;
8809 GikoSys.FSelectResFilter.Reverse := True;
8810 FilterList.Delimiter := ' '; //
\8bæ
\90Ø
\82è
\8eq
\82ð
\94¼
\8ap
\83X
\83y
\81[
\83X
\82É
\90Ý
\92è
8811 FilterList.DelimitedText := Dlg.SelectComboBox.Text;
8813 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8818 //
\83X
\83\8c\83b
\83h
\82Ì
\8dÄ
\95`
\89æ
8819 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
8820 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8822 ThreadItem := GetActiveContent;
8823 if ThreadItem <> nil then
8824 InsertBrowserTab( ThreadItem, True );
8827 //
\83L
\83\83\83\93\83Z
\83\8b
8828 if GikoSys.ResRange <> Ord( grrSelect ) then
8829 ResRangeAction.Execute;
8837 procedure TGikoForm.SelectResActionUpdate(Sender: TObject);
8839 SelectResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
8842 procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;
8843 Shift: TShiftState);
8847 //
\91S
\82Ä
\82Ì
\83\8c\83X
\82ð
\95\
\8e¦
8848 procedure TGikoForm.AllResActionExecute(Sender: TObject);
8850 ThreadItem : TThreadItem;
8851 FilterList : TStringList;
8854 if(FActiveContent <> nil) and (FActiveContent.FBrowser <> nil )
8855 and (FActiveContent.FBrowser.Busy) then Exit;
8857 FResRangeMenuSelect := Ord( grrAll );
8858 AllResAction.Checked := True;
8860 if GikoSys.ResRange <> Ord( grrAll ) then begin
8861 GikoSys.ResRange := Ord( grrAll );
8863 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
8864 FilterList := TStringList.Create;
8866 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8867 GikoSys.FSelectResFilter.Reverse := False;
8872 FSelectResWord := '';
8874 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
8875 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
8876 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8878 ThreadItem := GetActiveContent;
8879 if ThreadItem <> nil then
8880 InsertBrowserTab( ThreadItem, True );
8884 procedure TGikoForm.AllResActionUpdate(Sender: TObject);
8886 AllResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
8889 procedure TGikoForm.ReloadClick(Sender: TObject);
8891 ThreadItem : TThreadItem;
8894 if GikoSys.FAbon.ReLoadFromNGwordFile =false then begin
8895 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);
8897 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8898 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8900 ThreadItem := GetActiveContent;
8901 if ThreadItem <> nil then
8902 InsertBrowserTab( ThreadItem, True );
8907 procedure TGikoForm.GoBackClick(Sender: TObject);
8909 ThreadItem : TThreadItem;
8913 if GikoSys.FAbon.GoForward =false then begin
8914 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);
8916 s := GikoSys.FAbon.NGwordname;
8917 StatusBar.Panels.Items[2].Text := s;
8918 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8919 StatusBarResize(Sender);
8920 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8921 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8923 ThreadItem := GetActiveContent;
8924 if ThreadItem <> nil then
8925 InsertBrowserTab( ThreadItem, True );
8930 procedure TGikoForm.GoFowardClick(Sender: TObject);
8932 ThreadItem : TThreadItem;
8936 if GikoSys.FAbon.GoBack =false then begin
8937 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);
8939 s := GikoSys.FAbon.NGwordname;
8940 StatusBar.Panels.Items[2].Text := s;
8941 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8942 StatusBarResize(Sender);
8943 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8944 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8946 ThreadItem := GetActiveContent;
8947 if ThreadItem <> nil then
8948 InsertBrowserTab( ThreadItem, True );
8953 procedure TGikoForm.SelectComboBoxSplitterMouseMove(Sender: TObject;
8954 Shift: TShiftState; X, Y: Integer);
8959 If (SelectComboBox.Parent <> nil) and (IsDraggingSelectComboBox) Then begin
8962 pos := SelectComboBoxSplitter.ClientToScreen( pos );
8963 w := SelectComboBox.Width + (pos.X - DraggingSelectComboBoxPosition.X);
8965 If w <= 50 Then Begin
8966 //
\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
8967 //
\81u
\8e~
\82Ü
\82Á
\82½(50pixel)
\88Ê
\92u
\81v
\82É
\82È
\82é
\82æ
\82¤
\82É
8968 pos.X := pos.X + (50 - w);
8970 //
\8f¬
\82³
\82
\82È
\82è
\82·
\82¬
\82È
\82¢
\82æ
\82¤
\82É
8974 //
\83`
\83\89\82Â
\82«
\8cy
\8c¸
\82Ì
\88×
8975 If SelectComboBox.Width <> w Then Begin
8976 SelectComboBox.Width := w;
8977 GikoSys.Setting.SelectComboBoxWidth := w;
8978 DraggingSelectComboBoxPosition := pos;
8980 //
\83V
\83F
\83u
\83\8d\83\93\88Ê
\92u
\82ª
\95Ï
\82í
\82é
\82Ì
\82Å BandInfo
\82Ì
\8dÄ
\90Ý
\92è
8981 ResetBandInfo( ListCoolBar, ListToolBar );
8986 procedure TGikoForm.SelectComboBoxSplitterMouseDown(Sender: TObject;
8987 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8991 IsDraggingSelectComboBox := True;
8994 DraggingSelectComboBoxPosition := SelectComboBoxSplitter.ClientToScreen( pos );
8997 procedure TGikoForm.SelectComboBoxSplitterMouseUp(Sender: TObject;
8998 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
9000 IsDraggingSelectComboBox := False;
9003 procedure TGikoForm.StatusBarResize(Sender: TObject);
9005 StatusBar.Panels[1].Width := StatusBar.Width -
9006 StatusBar.Panels[0].Width -
9007 StatusBar.Panels[2].Width;
9009 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\92Ê
\8fí
\81v
9010 procedure TGikoForm.IndividualAbon1Click(Sender: TObject);
9012 ThreadItem : TThreadItem;
9015 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,1);
9016 ThreadItem := GetActiveContent;
9017 for i := BrowserTab.Tabs.Count - 1 downto 0 do
9018 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
9020 if ThreadItem <> nil then
9021 InsertBrowserTab( ThreadItem, True );
9023 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\93§
\96¾
\81v
9024 procedure TGikoForm.IndividualAbon2Click(Sender: TObject);
9026 ThreadItem : TThreadItem;
9029 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,0);
9030 ThreadItem := GetActiveContent;
9031 for i := BrowserTab.Tabs.Count - 1 downto 0 do
9032 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
9033 if ThreadItem <> nil then
9034 InsertBrowserTab( ThreadItem, True );
9036 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c\81i
\81j
9037 procedure TGikoForm.AntiIndividualAbonClick(Sender: TObject);
9039 ThreadItem : TThreadItem;
9043 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
9044 GikoSys.FAbon.DeleteIndividualAbon(KokoPopupMenu.Tag);
9045 ThreadItem := GetActiveContent;
9046 for i := BrowserTab.Tabs.Count - 1 downto 0 do
9047 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
9048 if ThreadItem <> nil then
9049 InsertBrowserTab( ThreadItem, True );
9051 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
9052 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
9055 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c
9056 procedure TGikoForm.N42Click(Sender: TObject);
9058 IndividualForm :TIndividualAbonForm;
9059 ThreadItem : TThreadItem;
9063 IndividualForm := TIndividualAbonForm.Create(Self);
9065 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
9066 for i :=0 to GikoSys.FAbon.GetAbonResCount-1 do begin
9067 IndividualForm.ComboBox1.Items.Add(GikoSys.FAbon.GetAbonResString(i));
9069 if IndividualForm.ShowModal = mrOK then begin
9070 GikoSys.FAbon.DeleteIndividualAbon(IndividualForm.ResNumber);
9072 for i := BrowserTab.Tabs.Count - 1 downto 0 do
9073 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
9074 ThreadItem := GetActiveContent;
9075 if ThreadItem <> nil then
9076 InsertBrowserTab( ThreadItem, True );
9078 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
9079 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
9082 IndividualForm.Free;
9086 procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
9089 if (Length( SelectComboBox.Text ) = 0) or
9090 (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
9092 SelectComboBox.Text := '';
9093 SelectComboBox.Color := clWindow;
9098 procedure TGikoForm.N51Click(Sender: TObject);
9102 //
\94Â
\96¼
\8c\9f\8dõ
9103 procedure TGikoForm.TreeSelectSearchBoardNameExecute(Sender: TObject);
9107 CurItem : TTreeNode;
9110 if InputQuery('
\94Â
\96¼
\8c\9f\8dõ','
\94Â
\96¼
\82Ì
\93ü
\97Í',s) then begin
9113 if TreeView.Selected = nil then
9114 CurItem := TreeView.Items.GetFirstNode
9116 CurItem := TreeView.Selected.GetNext;
9117 if CurItem = nil then
9118 CurItem := TreeView.Items.GetFirstNode;
9120 while CurItem <> nil do begin
9121 if (CurItem.ImageIndex <> 2) and (VaguePos(s,CurItem.Text) <> 0) then begin
9124 CurItem := CurItem.GetNext;
9127 if CurItem = nil then begin
9128 msg := '
\90æ
\93ª
\82É
\96ß
\82è
\82Ü
\82·
\82©
\81H';
9129 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
9130 CurItem := TreeView.Items.GetFirstNode;
9134 TreeView.Select(CurItem);
9137 TreeView.Select(CurItem);
9139 msg := '
\8e\9f\82É
\8ds
\82«
\82Ü
\82·
\82©
\81H';
9140 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
9154 procedure TGikoForm.CabinetFavoriteActionExecute(Sender: TObject);
9160 if CabinetPanel.Visible then begin
9161 if FTreeType = gttFavorite then begin
9162 CabinetVisible( False );
9163 CabinetFavoriteAction.Checked := False;
9165 CabinetFavoriteAction.Checked := True;
9168 CabinetVisible( True );
9169 CabinetFavoriteAction.Checked := True;
9172 // BBS...BBS, History, Favorite
9173 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 1;
9175 b := CabinetSelectPopupMenu.Items.Count - 1;
9176 for i := 0 to b do begin
9177 item := CabinetSelectPopupMenu.Items[ i ];
9178 if item is TBBSMenuItem then begin
9179 item.Checked := False;
9180 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
9181 CabinetMenu.Items[ i ].Checked := False;
9185 //
\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Ö
9186 HistoryToolBar.Hide;
9187 FavoriteToolBar.Show;
9188 TreeView.Visible := False;
9189 FavoriteTreeView.Visible := True;
9191 CabinetSelectToolButton.Caption := '
\82¨
\8bC
\82É
\93ü
\82è';
9192 FTreeType := gttFavorite;
9194 //
\83\81\83j
\83\85\81[
\8by
\82Ñ
\83{
\83^
\83\93\82Ì
\83`
\83F
\83b
\83N
\82ð
\90Ý
\92è
9195 CabinetBBSAction.Checked := False;
9196 CabinetHistoryAction.Checked := False;
9198 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\83c
\83\8a\81[
\82ð
\93W
\8aJ
9199 FavoriteTreeView.Items.GetFirstNode.Expanded := True;
9203 procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
9206 if (SenderNode = nil) or (SourceNode = nil) or (SenderNode = SourceNode) then
9209 if TObject(SenderNode.Data) is TFavoriteFolder then
9210 SourceNode.MoveTo(SenderNode, naAddChild)
9212 SourceNode.MoveTo(SenderNode, naInsert);
9216 procedure TGikoForm.FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
9220 FavoBoardItem: TFavoriteBoardItem;
9221 FavoThreadItem: TFavoriteThreadItem;
9223 ThreadItem: TThreadItem;
9226 if (SenderNode = nil) or (Source = nil) then
9229 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
9230 FavNode := SenderNode.Parent
9232 FavNode := SenderNode;
9236 if Source is TBoard then begin
9237 Board := TBoard( Source );
9238 FavoBoardItem := TFavoriteBoardItem.CreateWithItem( Board );
9239 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, FavoBoardItem);
9240 Node.ImageIndex := 15;
9241 Node.SelectedIndex := 15;
9242 end else if Source is TFavoriteBoardItem then begin
9243 FavoBoardItem := TFavoriteBoardItem( Source );
9244 Board := FavoBoardItem.Item;
9245 if Board <> nil then
9246 if not Board.IsThreadDatRead then
9247 GikoSys.ReadSubjectFile(Board);
9248 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, Source);
9249 Node.ImageIndex := 15;
9250 Node.SelectedIndex := 15;
9251 end else if Source is TThreadItem then begin
9252 ThreadItem := TThreadItem( Source );
9253 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
9254 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
9255 Node.ImageIndex := 16;
9256 Node.SelectedIndex := 16;
9257 end else if Source is TBrowserRecord then begin
9258 ThreadItem := TBrowserRecord( Source ).FThread;
9259 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
9260 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
9261 Node.ImageIndex := 16;
9262 Node.SelectedIndex := 16;
9263 end else if Source is TFavoriteThreadItem then begin
9264 FavoThreadItem := TFavoriteThreadItem( Source );
9265 ThreadItem := FavoThreadItem.Item;
9266 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, Source);
9267 Node.ImageIndex := 16;
9268 Node.SelectedIndex := 16;
9271 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
9273 FavoriteMoveTo( SenderNode, Node );
9277 procedure TGikoForm.FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
9280 SourceNode: TTreeNode;
9281 LinkToolButton: TLinkToolButton;
9284 if SenderNode = nil then
9287 if not (TObject( SenderNode.Data ) is TFavoriteFolder) then
9288 if FDropSpaceNode <> nil then
9289 SenderNode := FDropSpaceNode;
9291 if Source = FavoriteTreeView then begin
9293 SourceNode := FavoriteTreeView.Selected;
9294 FavoriteMoveTo( SenderNode, SourceNode );
9296 end else if Source is TLinkToolButton then begin
9298 LinkToolButton := TLinkToolButton( Source );
9299 //ShowMessage(LinkToolButton.Text);
9300 SourceNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data );
9301 FavoriteMoveTo( SenderNode, SourceNode );
9303 end else if Source = BrowserTab then begin
9305 idx := BrowserTab.TabIndex;
9306 FavoriteAddTo( SenderNode, BrowserTab.Tabs.Objects[idx] );
9307 end else if Source = ListView then begin
9309 FavoriteAddTo( SenderNode, ListView.Selected.Data );
9311 end else if Source = TreeView then begin
9313 FavoriteAddTo( SenderNode, TreeView.Selected.Data );
9321 procedure TGikoForm.FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
9324 SenderNode: TTreeNode;
9327 SenderNode := FavoriteTreeView.GetNodeAt(X, Y);
9328 if SenderNode <> nil then begin
9329 FavoriteDragDrop( SenderNode, Source );
9332 if FDropSpaceNode <> nil then begin
9333 FDropSpaceNode.Free;
9334 FDropSpaceNode := nil;
9339 procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
9340 Node: TTreeNode; var S: String);
9343 FavoriteTreeView.ReadOnly := True;
9348 procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
9349 Shift: TShiftState);
9355 FClickNode := FavoriteTreeView.Selected;
9356 FavoriteTreeViewRenameActionExecute( Sender );
9360 FClickNode := FavoriteTreeView.Selected;
9361 FavoriteTreeViewDeleteActionExecute( Sender );
9365 FavoriteClick( FavoriteTreeView.Selected );
9366 FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
9369 FavoriteTreeViewDblClick( Sender );
9374 procedure TGikoForm.FavoriteTreePopupMenuPopup(Sender: TObject);
9377 LinkToolButton: TLinkToolButton;
9380 if FavoriteTreePopupMenu.PopupComponent = FavoriteTreeView then begin
9382 FClickNode := FavoriteTreeView.Selected;
9384 end else if FavoriteTreePopupMenu.PopupComponent is TLinkToolButton then begin
9386 LinkToolButton := TLinkToolButton( FavoriteTreePopupMenu.PopupComponent );
9387 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
9388 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
9389 FClickNode := FavoriteTreeView.Items[i];
9393 for i := 0 to FClickNode.Count - 1 do begin
9394 if FClickNode.Item[i].Data = LinkToolButton.Data then begin
9395 FClickNode := FClickNode.Item[i];
9402 if FClickNode = nil then begin
9403 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9404 FavoriteTreeDeletePopupMenu.Visible := False;
9405 FavoriteTreeRenamePopupMenu.Visible := False;
9406 FavoriteTreeNewFolderPopupMenu.Visible := False;
9407 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9408 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9409 FavoriteTreeURLCopyPopupMenu.Visible := False;
9410 FavoriteTreeNameCopyPopupMenu.Visible := False;
9411 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9412 FavoriteTreeReloadPopupMenu.Visible := False;
9413 FavoriteTreeLogDeletePopupMenu.Visible := False;
9414 end else if FClickNode.IsFirstNode then begin
9415 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9416 FavoriteTreeDeletePopupMenu.Visible := False;
9417 FavoriteTreeRenamePopupMenu.Visible := False;
9418 FavoriteTreeNewFolderPopupMenu.Visible := True;
9419 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9420 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9421 FavoriteTreeURLCopyPopupMenu.Visible := False;
9422 FavoriteTreeNameCopyPopupMenu.Visible := True;
9423 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9424 FavoriteTreeReloadPopupMenu.Visible := False;
9425 FavoriteTreeLogDeletePopupMenu.Visible := False;
9426 end else if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
9427 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9428 FavoriteTreeDeletePopupMenu.Visible := True;
9429 FavoriteTreeRenamePopupMenu.Visible := False;
9430 FavoriteTreeNewFolderPopupMenu.Visible := True;
9431 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9432 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9433 FavoriteTreeURLCopyPopupMenu.Visible := False;
9434 FavoriteTreeNameCopyPopupMenu.Visible := True;
9435 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9436 FavoriteTreeReloadPopupMenu.Visible := False;
9437 FavoriteTreeLogDeletePopupMenu.Visible := False;
9438 end else if TObject(FClickNode.Data) is TFavoriteFolder then begin
9439 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9440 FavoriteTreeDeletePopupMenu.Visible := True;
9441 FavoriteTreeRenamePopupMenu.Visible := True;
9442 FavoriteTreeNewFolderPopupMenu.Visible := True;
9443 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9444 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9445 FavoriteTreeURLCopyPopupMenu.Visible := False;
9446 FavoriteTreeNameCopyPopupMenu.Visible := True;
9447 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9448 FavoriteTreeReloadPopupMenu.Visible := False;
9449 FavoriteTreeLogDeletePopupMenu.Visible := False;
9450 end else if TObject(FClickNode.Data) is TFavoriteThreadItem then begin
9451 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9452 FavoriteTreeDeletePopupMenu.Visible := True;
9453 FavoriteTreeRenamePopupMenu.Visible := True;
9454 FavoriteTreeNewFolderPopupMenu.Visible := True;
9455 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
9456 //FavoriteTreeBrowseThreadPopupMenu.Visible := True;
9457 FavoriteTreeURLCopyPopupMenu.Visible := True;
9458 FavoriteTreeNameCopyPopupMenu.Visible := True;
9459 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
9460 FavoriteTreeReloadPopupMenu.Visible := True;
9461 FavoriteTreeLogDeletePopupMenu.Visible := True;
9462 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
9463 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9464 FavoriteTreeDeletePopupMenu.Visible := True;
9465 FavoriteTreeRenamePopupMenu.Visible := True;
9466 FavoriteTreeNewFolderPopupMenu.Visible := True;
9467 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
9468 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9469 FavoriteTreeURLCopyPopupMenu.Visible := True;
9470 FavoriteTreeNameCopyPopupMenu.Visible := True;
9471 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
9472 FavoriteTreeReloadPopupMenu.Visible := True;
9473 FavoriteTreeLogDeletePopupMenu.Visible := False;
9475 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9476 FavoriteTreeDeletePopupMenu.Visible := False;
9477 FavoriteTreeRenamePopupMenu.Visible := False;
9478 FavoriteTreeNewFolderPopupMenu.Visible := False;
9479 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9480 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9481 FavoriteTreeURLCopyPopupMenu.Visible := False;
9482 FavoriteTreeNameCopyPopupMenu.Visible := False;
9483 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9484 FavoriteTreeReloadPopupMenu.Visible := False;
9485 FavoriteTreeLogDeletePopupMenu.Visible := False;
9490 procedure TGikoForm.FavoriteTreeViewDeleteActionExecute(Sender: TObject);
9492 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';
9493 DEL_MSG = '
\81g^0
\81h
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
9494 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
9497 if FClickNode = nil then
9499 if FClickNode.IsFirstNode then
9501 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
9502 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
9503 if MsgBox(Handle, DEL_LINK_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
9506 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
9511 //FDeleteList.Add(FClickNode.Data);
9512 //SetDeleteItemList(FClickNode);
9520 procedure TGikoForm.FavoriteTreeViewRenameActionExecute(Sender: TObject);
9525 if FClickNode = nil then
9527 if FClickNode.IsFirstNode then
9529 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then
9531 FavoriteTreeView.ReadOnly := False;
9532 if (FTreeType = gttFavorite) and (CabinetPanel.Visible) then begin
9533 node := FClickNode.Parent;
9534 while node <> nil do begin
9535 node.Expanded := True;
9536 node := node.Parent;
9538 FClickNode.EditText;
9540 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 );
9547 procedure TGikoForm.FavoriteTreeViewNewFolderActionExecute(
9550 NewFavFolder: TFavoriteFolder;
9554 if FClickNode = nil then
9558 if not (TObject(FClickNode.Data) is TFavoriteFolder) then begin
9559 FavoriteTreeView.Selected := FClickNode.Parent;
9560 FClickNode := FClickNode.Parent;
9563 NewFavFolder := TFavoriteFolder.Create;
9564 Node := FavoriteTreeView.Items.AddChildObject(FClickNode, '
\90V
\82µ
\82¢
\83t
\83H
\83\8b\83_', NewFavFolder);
9565 Node.ImageIndex := 14;
9566 Node.SelectedIndex := 14;
9567 // FClickNode.Selected.Expanded := True;
9568 FavoriteTreeView.Selected := Node;
9570 FavoriteTreeViewRenameAction.Execute;
9576 procedure TGikoForm.ToolButton19Click(Sender: TObject);
9579 FavoriteArrangeActionExecute( nil );
9583 procedure TGikoForm.FavoriteBrowseFolder( node: TTreeNode );
9588 if not (TObject(node.Data) is TFavoriteFolder) then
9591 for i := 0 to node.Count - 1 do
9593 if TObject(node.Item[i].Data) is TFavoriteFolder then
9594 FavoriteBrowseFolder( node.Item[i] )
9595 else if TObject(node.Item[i].Data) is TFavoriteThreadItem then
9596 FavoriteClick( node.Item[i], False );
9601 procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
9605 FavoriteBrowseFolder( FClickNode );
9606 //BrowserTab.OnChange(nil);
9610 procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
9613 FClickNode := FavoriteTreeView.Selected;
9614 FavoriteTreeViewReloadActionExecute( Sender );
9618 procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
9621 DEL_MSG = '
\81g^0
\81h
\82Ì
\83\8d\83O
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
9622 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
9624 ThreadItem: TThreadItem;
9625 FavThread: TFavoriteThreadItem;
9628 if FClickNode = nil then Exit;
9629 if not (TObject(FClickNode.Data) is TFavoriteThreadItem) then Exit;
9631 FavThread := TFavoriteThreadItem( FClickNode.Data );
9632 ThreadItem := FavThread.Item;
9635 if GikoSys.Setting.DeleteMsg then begin
9636 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
9637 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
9641 DeleteHistory(ThreadItem);
9642 DeleteTab(ThreadItem);
9643 ThreadItem.DeleteLogFile;
9651 procedure TGikoForm.FavoriteTreeViewReloadActionExecute(Sender: TObject);
9653 ThreadItem: TThreadItem;
9654 FavThread: TFavoriteThreadItem;
9656 FavBoard: TFavoriteBoardItem;
9660 if FClickNode = nil then Exit;
9662 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
9664 if TObject( FClickNode.Data ) is TFavoriteThreadItem then begin
9665 FavThread := TFavoriteThreadItem( FClickNode.Data );
9666 ThreadItem := FavThread.Item;
9667 if ThreadItem <> nil then
9668 DownloadContent(ThreadItem, shiftDown);
9669 end else if TObject( FClickNode.Data ) is TFavoriteBoardItem then begin
9670 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9671 Board := FavBoard.Item;
9672 DownloadList(Board, shiftDown);
9677 procedure TGikoForm.FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
9679 FavThread : TFavoriteThreadItem;
9680 FavBoard : TFavoriteBoardItem;
9684 if FClickNode = nil then Exit;
9686 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9688 FavThread := TFavoriteThreadItem( FClickNode.Data );
9689 s := FavThread.URL + #13#10;
9691 Clipboard.AsText := s;
9693 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9695 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9696 s := FavBoard.URL + #13#10;
9698 Clipboard.AsText := s;
9704 procedure TGikoForm.FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
9706 ThreadItem: TThreadItem;
9707 FavThread: TFavoriteThreadItem;
9709 FavBoard: TFavoriteBoardItem;
9713 if FClickNode = nil then Exit;
9715 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9717 FavThread := TFavoriteThreadItem( FClickNode.Data );
9718 ThreadItem := FavThread.Item;
9721 s := ThreadItem.Title + #13#10;
9723 Clipboard.AsText := s;
9727 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9729 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9730 Board := FavBoard.Item;
9731 if Board <> nil then
9732 if not Board.IsThreadDatRead then
9733 GikoSys.ReadSubjectFile(Board);
9736 s := Board.Title + #13#10;
9738 Clipboard.AsText := s;
9746 procedure TGikoForm.FavoriteTreeViewNameURLCopyActionExecute(
9749 ThreadItem: TThreadItem;
9750 FavThread: TFavoriteThreadItem;
9752 FavBoard: TFavoriteBoardItem;
9756 if FClickNode = nil then Exit;
9758 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9760 FavThread := TFavoriteThreadItem( FClickNode.Data );
9761 ThreadItem := FavThread.Item;
9764 s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10;
9766 Clipboard.AsText := s;
9770 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9772 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9773 Board := FavBoard.Item;
9774 if Board <> nil then
9775 if not Board.IsThreadDatRead then
9776 GikoSys.ReadSubjectFile(Board);
9779 s := Board.URL + #13#10 + Board.Title + #13#10;
9781 Clipboard.AsText := s;
9789 function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
9795 for i := 0 to Node.Count - 1 do begin
9796 if Node.Item[i].Data = FindPointer then begin
9797 Result := Node.Item[i];
9799 end else if Node.Item[i].Count > 0 then begin
9800 Found := TreeNodeDataFind( Node.Item[i], FindPointer );
9801 if Found <> nil then begin
9812 procedure TGikoForm.LinkToolBarDragDrop(Sender, Source: TObject; X,
9816 SenderNode: TTreeNode;
9820 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
9821 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
9822 SenderNode := FavoriteTreeView.Items[i];
9827 FavoriteDragDrop( SenderNode, Source );
9831 procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
9832 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
9834 if FDragWFirst <> true then begin
9835 FDragWFirst := false;
9836 end else if (X = FMouseDownPos.X) and (Y = FMouseDownPos.Y) then begin
9837 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
9838 if GikoSys.Setting.ListWidthState = glsMin then begin
9839 BrowserMaxAndFocusAction.Execute;
9842 if GikoSys.Setting.ListHeightState = glsMin then begin
9843 BrowserMaxAndFocusAction.Execute;
9849 procedure TGikoForm.LinkToolBarDragOver(Sender, Source: TObject; X,
9850 Y: Integer; State: TDragState; var Accept: Boolean);
9853 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
9857 procedure TGikoForm.ResRangeActionExecute(Sender: TObject);
9859 case FResRangeMenuSelect of
9860 Ord( grrAll ): AllResAction.Execute;
9861 Ord( grrKoko ): OnlyKokoResAction.Execute;
9862 Ord( grrNew ): OnlyNewResAction.Execute;
9863 100: OnlyAHundredResAction.Execute;
9867 procedure TGikoForm.FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
9871 if FDropSpaceNode <> nil then begin
9872 FDropSpaceNode.Free;
9873 FDropSpaceNode := nil;
9879 procedure TGikoForm.ListCoolBarContextPopup(Sender: TObject;
9880 MousePos: TPoint; var Handled: Boolean);
9883 FToolBarSettingSender := tssList;
9884 MousePos := ListCoolBar.ClientToScreen( MousePos );
9885 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9889 procedure TGikoForm.MainCoolBarContextPopup(Sender: TObject;
9890 MousePos: TPoint; var Handled: Boolean);
9893 FToolBarSettingSender := tssMain;
9894 MousePos := MainCoolBar.ClientToScreen( MousePos );
9895 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9899 procedure TGikoForm.BrowserCoolBarContextPopup(Sender: TObject;
9900 MousePos: TPoint; var Handled: Boolean);
9903 FToolBarSettingSender := tssBrowser;
9904 MousePos := BrowserCoolBar.ClientToScreen( MousePos );
9905 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9908 procedure TGikoForm.ExportFavoriteFileAccept(Sender: TObject);
9911 if FavoriteDM.SaveFavoriteFile( ExportFavoriteFile.Dialog.FileName ) Then begin
9912 ShowMessage('
\83t
\83@
\83C
\83\8b\82ð
\8fo
\97Í
\82µ
\82Ü
\82µ
\82½');
9914 ShowMessage('
\83t
\83@
\83C
\83\8b\82Ì
\8fo
\97Í
\82É
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½');
9917 procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
9919 if FListViewBackGroundColor <> value then begin
9920 FListViewBackGroundColor := value;
9921 ListView.Color := FListViewBackGroundColor;
9924 procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
9926 ExportFavoriteFile.Dialog.FileName := FavoriteDM.GetFavoriteFilePath;
9929 procedure TGikoForm.CabinetBBSActionExecute(Sender: TObject);
9932 if CabinetPanel.Visible then begin
9933 if FTreeType = gtt2ch then begin
9934 CabinetVisible( False );
9936 CabinetBBSAction.Checked := False;
9938 CabinetBBSAction.Checked := True;
9941 CabinetVisible( True );
9942 CabinetBBSAction.Checked := True;
9945 if FActiveBBS = nil then
9946 ShowBBSTree( BBSs[ 0 ] )
9948 ShowBBSTree( FActiveBBS );
9952 procedure TGikoForm.FavoriteTreeViewBrowseThreadActionExecute(
9955 threadItem : TThreadItem;
9958 if FClickNode = nil then Exit;
9960 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9962 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9963 if threadItem = nil then
9965 GikoSys.OpenBrowser( threadItem.URL, gbtAuto );
9971 procedure TGikoForm.FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
9973 threadItem : TThreadItem;
9977 if FClickNode = nil then Exit;
9979 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9981 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9982 if threadItem = nil then
9984 GikoSys.OpenBrowser( threadItem.ParentBoard.URL, gbtAuto );
9986 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9988 boardItem := TFavoriteBoardItem( FClickNode.Data ).Item;
9989 if boardItem = nil then
9991 GikoSys.OpenBrowser( boardItem.URL, gbtAuto );
9997 procedure TGikoForm.UpBoardActionExecute(Sender: TObject);
10000 SelectTreeNode( GetActiveContent.ParentBoard, True );
10004 procedure TGikoForm.UpBoardActionUpdate(Sender: TObject);
10007 UpBoardAction.Enabled := GetActiveContent <> nil;
10011 procedure TGikoForm.BrowserTabContextPopup(Sender: TObject;
10012 MousePos: TPoint; var Handled: Boolean);
10016 idx := BrowserTab.IndexOfTabAt(MousePos.X, MousePos.Y);
10017 if BrowserTab.TabIndex <> idx then begin
10018 BrowserTab.TabIndex := idx;
10019 BrowserTab.OnChange(nil);
10024 procedure TGikoForm.KoreCopyExecute(Sender: TObject);
10026 KonoresCopy(KokoPopupMenu.Tag, true);
10028 procedure TGikoForm.KonoresCopy(Number: Integer; ReplaceTag : Boolean);
10030 ThreadItem: TThreadItem;
10036 boardPlugIn : TBoardPlugIn;
10038 if Number = 0 then Exit;
10039 ThreadItem := GetActiveContent;
10041 if ThreadItem <> nil then begin
10042 if ThreadItem.IsBoardPlugInAvailable then begin
10043 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
10044 boardPlugIn := ThreadItem.BoardPlugIn;
10046 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
10047 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
10048 //
\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
10049 tmp := boardPlugIn.GetDat( DWORD( threadItem ), Number );
10051 FileName := ThreadItem.FilePath;
10052 tmp := GikoSys.ReadThreadFile(FileName, Number);
10054 if tmp <> '' then begin
10055 Res := GikoSys.DivideStrLine(tmp);
10057 Header := IntToStr(Number) + '
\81F' + Res.FName + '
\81F' + Res.FDateTime + #13#10;
10058 if ReplaceTag then begin
10059 Header := CustomStringReplace(Header, '</b>', '',true);
10060 Header := CustomStringReplace(Header, '<b>', '',true);
10062 if ThreadItem.IsBoardPlugInAvailable then begin
10063 Body := CustomStringReplace(Res.FBody, '<br>', #13#10,true);
10064 Body := CustomStringReplace(Body, '<br>', #13#10,true);
10066 Body := CustomStringReplace(Res.FBody, ' <br> ', #13#10,true);
10067 Body := CustomStringReplace(Body, ' <br>', #13#10,true);
10068 Body := CustomStringReplace(Body, '<br> ', #13#10,true);
10069 Body := CustomStringReplace(Body, '<br>', #13#10,true);
10072 Body := CustomStringReplace(Body, '</a>', '',true);
10074 Body := GikoSys.DeleteLink(Body);
10075 if ReplaceTag then begin
10076 Body := CustomStringReplace(Body, '<', '<');
10077 Body := CustomStringReplace(Body, '>', '>');
10078 Body := CustomStringReplace(Body, '"', '"');
10079 Body := CustomStringReplace(Body, '&', '&');
10080 //Body := CustomStringReplace(Body, ' ', ' ');
10083 Header := Header + Body;
10085 Clipboard.SetTextBuf( PChar(Header) );
10091 procedure TGikoForm.BrowserTabPopupMenuPopup(Sender: TObject);
10093 AddRoundNameMenu(dummy1);
10096 procedure TGikoForm.FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
10098 FavoriteDM.URLReplace(oldURLs, newURLs);
10101 procedure TGikoForm.RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
10103 RoundList.URLReplace(oldURLs, newURLs);
10106 procedure TGikoForm.TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
10110 tempString: string;
10113 oldBoardName: string;
10115 newBoardName: string;
10116 TabList: TStringList;
10118 TabList := TStringList.Create;
10119 if oldURLs.Count <> newURLs.Count then
10121 //
\82±
\82±
\82©
\82ç
\81ABoard
\82ÌURL
\82Ì
\95Ï
\8dX
10122 for j :=0 to oldURLs.Count - 1 do begin
10123 for i :=0 to TabList.Count - 1 do begin
10124 if TabList.Text = oldURLs[j] then
10125 TabList.Text := newURLs[j];
10128 //
\82±
\82±
\82Ü
\82Å
\81ABoard
\82ÌURL
\82Ì
\95Ï
\8dX
10130 //
\82±
\82±
\82©
\82ç
\81AThread
\82ÌURL
\82Ì
\95Ï
\8dX
10131 //
\96Ê
\93|
\82¾
\82¯
\82Çthread
\82Í
\82»
\82ê
\82¼
\82êURL
\82ð
\83`
\83\83\83b
\83N
\82µ
\82È
\82ª
\82ç
\82â
\82Á
\82Ä
\82©
\82È
\82«
\82á
\82¢
\82¯
\82È
\82¢
\81B
10132 for i := 0 to oldURLs.Count - 1 do begin
10133 tmpURL := Copy(oldURLs[i], 1, Length(oldURLs[i]) -1);
10134 oldHost := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) );
10135 oldBoardName := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/';
10136 tmpURL := Copy(newURLs[i], 1, Length(newURLs[i]) -1);
10137 newHost := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) );
10138 newBoardName := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/';
10140 for j := 0 to TabList.Count - 1 do begin
10141 tempString := TabList.Text;
10142 if ( AnsiPos(oldBoardName, tempString) <> 0 ) and ( AnsiPos(oldHost, tempString ) <> 0 ) then begin
10143 tempString := StringReplace(tempString, oldHost, newHost,[]);
10144 TabList.Text := tempString;
10148 //
\82±
\82±
\82Ü
\82Å
\81AThread
\82ÌURL
\82Ì
\95Ï
\8dX
10152 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82é
10153 procedure TGikoForm.OnMinimize;
10155 FIsMinimize := mtMinimizing;
10156 if FActiveContent <> nil then
10157 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
10158 PostMessage( Handle, USER_MINIMIZED, 0, 0 );
10161 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82½
10162 procedure TGikoForm.OnMinimized;
10164 FIsMinimize := mtMinimized;
10165 FIsIgnoreResize := False;
10168 procedure TGikoForm.CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
10170 coolSet : TCoolSet;
10171 toolbar : TToolBar;
10173 affectedBand : TCoolBand;
10176 if (FOldFormWidth = Width) and not IsIconic( Handle ) and not FIsIgnoreResize then begin
10177 FIsIgnoreResize := True;
10178 PostMessage( Handle, USER_RESIZED, 0, 0 );
10179 if not (Sender is TToolBar) or (CoolBar = nil) then
10181 toolbar := TToolBar( Sender );
10183 //
\95Ï
\8dX
\82³
\82ê
\82½
\83N
\81[
\83\8b\83o
\81[
\82Ì
\92l
\82ð
\95Û
\91¶
10184 if CoolBar = MainCoolBar then begin
10185 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
10186 CoolSet.FCoolID := CoolBar.Bands[i].ID;
10187 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
10188 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
10189 GikoSys.Setting.MainCoolSet[i] := CoolSet;
10191 end else if CoolBar = ListCoolBar then begin
10192 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
10193 CoolSet.FCoolID := CoolBar.Bands[i].ID;
10194 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
10195 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
10196 GikoSys.Setting.ListCoolSet[i] := CoolSet;
10198 end else if CoolBar = BrowserCoolBar then begin
10199 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
10200 CoolSet.FCoolID := CoolBar.Bands[i].ID;
10201 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
10202 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
10203 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
10206 //
\95\9d\82Ì
\95Ï
\8dX
\82³
\82ê
\82½
\83o
\83\93\83h
\82ð
\8c©
\82Â
\82¯
\82é
10207 affectedBand := nil;
10208 for i := CoolBar.Bands.Count - 1 downto 0 do begin
10209 if CoolBar.Bands[ i ].Control.Handle = toolbar.Handle then begin
10210 band := CoolBar.Bands[ i ];
10211 if band.Break or (i = 0) then begin
10212 if i + 1 < CoolBar.Bands.Count then
10213 if not CoolBar.Bands[ i + 1 ].Break then
10214 affectedBand := CoolBar.Bands[ i + 1 ];
10217 affectedBand := CoolBar.Bands[ i - 1 ];
10222 //
\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·
10223 if CoolBar = MainCoolBar then begin
10224 coolSet := GikoSys.Setting.MainCoolSet[ band.ID ];
10225 coolSet.FCoolWidth := toolbar.Width + 25;
10226 GikoSys.Setting.MainCoolSet[ band.ID ] := coolSet;
10227 if affectedBand <> nil then begin
10228 coolSet := GikoSys.Setting.MainCoolSet[ affectedBand.ID ];
10229 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
10230 GikoSys.Setting.MainCoolSet[ affectedBand.ID ] := coolSet;
10232 end else if CoolBar = ListCoolBar then begin
10233 coolSet := GikoSys.Setting.ListCoolSet[ band.ID ];
10234 coolSet.FCoolWidth := toolbar.Width + 25;
10235 GikoSys.Setting.ListCoolSet[ band.ID ] := coolSet;
10236 if affectedBand <> nil then begin
10237 coolSet := GikoSys.Setting.ListCoolSet[ affectedBand.ID ];
10238 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
10239 GikoSys.Setting.ListCoolSet[ affectedBand.ID ] := coolSet;
10241 end else if CoolBar = BrowserCoolBar then begin
10242 coolSet := GikoSYs.Setting.BrowserCoolSet[ band.ID ];
10243 coolSet.FCoolWidth := toolbar.Width + 25;
10244 GikoSys.Setting.BrowserCoolSet[ band.ID ] := coolSet;
10245 if affectedBand <> nil then begin
10246 coolSet := GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ];
10247 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
10248 GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ] := coolSet;
10254 procedure TGikoForm.MenuToolBarResize(Sender: TObject);
10256 CoolBarResized( Sender, MainCoolBar );
10259 procedure TGikoForm.StdToolBarResize(Sender: TObject);
10261 CoolBarResized( Sender, MainCoolBar );
10264 procedure TGikoForm.LinkToolBarResize(Sender: TObject);
10266 CoolBarResized( Sender, MainCoolBar );
10269 procedure TGikoForm.ListNameToolBarResize(Sender: TObject);
10271 CoolBarResized( Sender, ListCoolBar );
10274 procedure TGikoForm.ListToolBarResize(Sender: TObject);
10276 CoolBarResized( Sender, ListCoolBar );
10279 procedure TGikoForm.BrowserNameToolBarResize(Sender: TObject);
10281 CoolBarResized( Sender, BrowserCoolBar );
10284 procedure TGikoForm.BrowserToolBarResize(Sender: TObject);
10286 CoolBarResized( Sender, BrowserCoolBar );
10289 procedure TGikoForm.BrowserTabResize(Sender: TObject);
10291 CoolBarResized( Sender, BrowserCoolBar );
10294 // *************************************************************************
10295 // ExternalBoardPlugInMain
10296 //
\83v
\83\89\83O
\83C
\83\93\83\81\83j
\83\85\81[
\82Ì
\8d\80\96Ú
\82ª
\8eÀ
\8ds
\82³
\82ê
\82½
10297 // *************************************************************************
10298 procedure TGikoForm.OnPlugInMenuItem( Sender : TObject );
10301 boardPlugIn : TBoardPlugIn;
10304 if not (Sender is TMenuItem) then
10307 item := TMenuItem( Sender );
10308 if not Assigned( Pointer( item.Tag ) ) then
10311 //
\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·
10312 boardPlugIn := TBoardPlugIn( item.Tag );
10313 boardPlugIn.PlugInMenu( item.Handle );
10316 // TreeView
\82ª
\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
10317 procedure TGikoForm.TreeClick( Node : TTreeNode );
10325 if FTreeType = gttHistory then begin
10326 if Node <> nil then
10327 if TObject( Node.Data ) is TFavoriteThreadItem then
10328 if GetActiveContent <> TFavoriteThreadItem( Node.Data ).Item then
10329 FavoriteClick( Node );
10333 if GetActiveList is TBBS then begin
10334 for i := 0 to ListView.Columns.Count - 1 do
10335 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
10336 end else if GetActiveList is TCategory then begin
10337 for i := 0 to ListView.Columns.Count - 1 do
10338 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
10339 end else if GetActiveList is TBoard then begin
10340 for i := 0 to ListView.Columns.Count - 1 do
10341 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
10344 if TObject(Node.Data) is TBBS then begin
10345 SetActiveList(Node.data);
10346 end else if TObject(Node.Data) is TCategory then begin
10347 SetActiveList(Node.data);
10348 end else if TObject(Node.Data) is TBoard then begin
10349 if not TBoard(Node.Data).IsThreadDatRead then begin
10350 Screen.Cursor := crHourGlass;
10352 if not TBoard(Node.Data).IsThreadDatRead then
10353 GikoSys.ReadSubjectFile(Node.Data);
10355 Screen.Cursor := crDefault;
10358 SetActiveList(Node.data);
10361 if TObject( Node.Data ) is TBoard then begin // not TCategory
10362 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
10363 if GikoSys.Setting.ListWidthState = glsMax then begin
10364 BrowserMinAction.Execute;
10365 if GikoForm.Visible then
10369 if GikoSys.Setting.ListHeightState = glsMax then begin
10370 BrowserMinAction.Execute;
10371 if GikoForm.Visible then
10379 // TreeView
\82ª
\83_
\83u
\83\8b\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
10380 procedure TGikoForm.TreeDoubleClick( Node : TTreeNode );
10383 ThreadItem : TThreadItem;
10384 shiftDown : Boolean;
10387 if Node = nil then Exit;
10389 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
10391 if FTreeType = gtt2ch then begin
10392 if not (TObject(Node.Data) is TBoard) then Exit;
10393 Board := TBoard(Node.Data);
10394 DownloadList(Board, shiftDown);
10395 end else if FTreeType = gttHistory then begin
10396 if not (TObject(Node.Data) is TFavoriteThreadItem) then Exit;
10397 ThreadItem := TFavoriteThreadItem(Node.Data).Item;
10398 DownloadContent(ThreadItem, shiftDown);
10403 procedure TGikoForm.TreeViewClick(Sender: TObject);
10405 TreeClick( TreeView.Selected );
10408 procedure TGikoForm.TreeViewKeyDown(Sender: TObject; var Key: Word;
10409 Shift: TShiftState);
10411 if Key = VK_BACK then begin
10412 // UpFolderButtonClick(Sender);
10413 end else if Key = VK_SPACE then begin
10414 TreeDoubleClick( TreeView.Selected );
10415 end else if Key = VK_RETURN then begin
10416 TreeClick( TreeView.Selected );
10417 TreeView.Selected.Expanded := not TreeView.Selected.Expanded;
10421 //
\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ã
10422 //
\83C
\83x
\83\93\83g
\82ð
\8eæ
\82è
\88µ
\82Á
\82½
\8fê
\8d\87\82Í True
\82ð
\95Ô
\82·
10423 function TGikoForm.BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
10425 iOIPAO : IOleInPlaceActiveObject;
10426 Dispatch : IDispatch;
10429 if Key = VK_BACK then begin
10430 UpBoardAction.Execute;
10432 {end else if Key in [VK_ESCAPE..VK_HELP] then begin
10433 //
\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
10436 end else if(Key in [VK_SPACE..VK_HELP]) and
10437 not(ssCtrl in State) and not(ssAlt in State) and not (ssShift in State) then begin
10440 //
\82»
\82ê
\88È
\8aO
\82Ì
\83C
\83x
\83\93\83g
\82Í Browser
\82É
\97¬
\82·
10441 if(FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10442 Dispatch := FActiveContent.Browser.Application;
10443 if Dispatch <> nil then begin
10444 Dispatch.QueryInterface( IOleInPlaceActiveObject, iOIPAO );
10445 if iOIPAO <> nil then
10446 iOIPAO.TranslateAccelerator( Msg );
10449 //
\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¢
10455 //
\83M
\83R
\83i
\83r
\82Ì
\83\81\83b
\83Z
\81[
\83W
\83\8b\81[
\83v
\82ð
\89¡
\8eæ
\82è
\82µ
\82Ü
\82·
10456 procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
10461 case Msg.message of
10463 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10464 if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
10466 Handled := BrowserKeyDown( Msg, key, KeyDataToShiftState( Msg.lParam ) );
10471 case Msg.wParam shr 16 of
10474 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10475 if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
10476 UpBoardAction.Execute;
10480 if not Handled then begin
10481 if IsDialogMessage( ListView.Handle, Msg ) then begin
10482 UpFolderAction.Execute;
10492 procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject;
10493 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
10495 favItem : TTreeNode;
10496 favThreadItem : TFavoriteThreadItem;
10502 FMouseDownPos.X := X;
10503 FMouseDownPos.Y := Y;
10507 favItem := FavoriteTreeView.GetNodeAt( X, Y );
10508 if favItem = nil then Exit;
10510 if TObject( favItem.Data ) is TFavoriteThreadItem then begin
10511 favThreadItem := TFavoriteThreadItem( favItem.Data );
10512 if favThreadItem.Item <> nil then
10513 InsertBrowserTab( favThreadItem.Item, False );
10520 procedure TGikoForm.MessagePanelResize(Sender: TObject);
10523 if FIsIgnoreResize then
10526 if GikoSys.Setting.ListOrientation = gloVertical then begin
10527 if GikoSys.Setting.ListHeightState = glsMin then begin
10528 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
10529 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
10535 procedure TGikoForm.OnResized;
10538 FOldFormWidth := Width;
10539 FIsIgnoreResize := False;
10543 procedure TGikoForm.TreeSelectNameCopyExecute(Sender: TObject);
10547 TreeView.Selected := FClickNode;
10548 s := FClickNode.Text;
10549 Clipboard.AsText := s;
10552 procedure TGikoForm.FavoriteTreeViewMouseUp(Sender: TObject;
10553 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
10556 if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold) and
10557 (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
10558 FavoriteClick( TObject( FavoriteTreeView.Selected ) );
10563 destructor TBrowserRecord.Destroy;
10567 if Self.FEvent <> nil then
10569 if Self.FBrowser <> nil then begin
10570 if Self.Thread <> nil then begin
10571 //
\83^
\83u
\82Ì
\95\9c\8c³
\82Å
\95\9c\8c³
\82³
\82ê
\82½
\83X
\83\8c\82Í
\81A
\95`
\89æ
\82³
\82ê
\82Ä
\82¢
\82È
\82¢
\82Æ
\82«
\82ª
\82 \82é
\82Ì
\82Å
10572 //
\82»
\82Ì
\82Æ
\82«
\82Ì
\83X
\83N
\83\8d\81[
\83\8b\97Ê
\82ð
\95Û
\91¶
\82µ
\82Ä
\82µ
\82Ü
\82¤
\82Æ
\83g
\83b
\83v
\82É
\96ß
\82Á
\82Ä
\82µ
\82Ü
\82¤
\81B
10573 if Self.FBrowser.OleObject.Document.documentElement.innerText <> '' then begin
10574 doc := Idispatch( olevariant(Self.FBrowser.ControlInterface).Document) as IHTMLDocument2;
10575 Self.Thread.ScrollTop := doc.Body.ScrollTop;
10578 //TOleControl(Self.FBrowser).Visible := false;
10579 ShowWindow(Self.FBrowser.Handle, SW_HIDE);
10584 procedure TGikoForm.ResRangeActionUpdate(Sender: TObject);
10586 ResRangeAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
10589 function TGikoForm.WebBrowserClick(Sender: TObject): WordBool;
10593 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then
10594 FActiveContent.FBrowser.SetFocus;
10599 procedure TGikoForm.SetFocusForBrowserActionExecute(Sender: TObject);
10601 FActiveContent.FBrowser.SetFocus;
10604 procedure TGikoForm.SetFocusForBrowserActionUpdate(Sender: TObject);
10606 if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
10607 (FActiveContent.Browser <> BrowserNullTab.Browser) then
10608 SetFocusForBrowserAction.Enabled := true
10610 SetFocusForBrowserAction.Enabled := false;
10613 procedure TGikoForm.SetFocusForThreadListActionExecute(Sender: TObject);
10617 if FActiveContent <> nil then
10618 WebBrowserClick(FActiveContent.Browser); //
\88ê
\89ñBrowser
\82É
\93\96\82Ä
\82È
\82¢
\82Æ
\93®
\82©
\82È
\82¢
\82Æ
\82«
\82ª
\82 \82é
10620 if( ListView.Items.Count > 0 ) and (ListView.ItemFocused = nil) then
10621 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é
10622 else if ListView.Items.Count > 0 then begin
10623 ListView.Scroll(-ListView.ClientWidth, -ListView.ClientHeight);
10624 rct := ListView.ItemFocused.DisplayRect(drBounds);
10625 ListView.Scroll(0, 2 * rct.Top - rct.Bottom);
10626 if ListView.ViewStyle <> vsReport then begin
10627 ListView.Scroll(rct.Left, 0);
10632 procedure TGikoForm.SetFocusForCabinetActionExecute(Sender: TObject);
10634 if FActiveContent <> nil then
10635 WebBrowserClick(FActiveContent.Browser); //
\88ê
\89ñBrowser
\82É
\93\96\82Ä
\82È
\82¢
\82Æ
\93®
\82©
\82È
\82¢
\82Æ
\82«
\82ª
\82 \82é
10636 if TreeView.Visible then begin
10638 if(TreeView.Items.Count > 0) and ( TreeView.Selected = nil ) then
10639 TreeView.Items.Item[0].Selected := true;
10640 end else if FavoriteTreeView.Visible then begin
10641 FavoriteTreeView.SetFocus;
10642 if(FavoriteTreeView.Items.Count > 0) and (FavoriteTreeView.Selected = nil) then
10643 FavoriteTreeView.Items.Item[0].Selected := true;
10646 procedure TGikoForm.SetFocusForCabinetActionUpdate(Sender: TObject);
10648 SetFocusForCabinetAction.Enabled := CabinetPanel.Visible;
10651 //
\83u
\83\89\83E
\83U
\82ð
\8dÅ
\91å
\89»
\82µ
\82Ä
\83t
\83H
\81[
\83J
\83X
\82ð
\93\96\82Ä
\82é
\81B
10652 procedure TGikoForm.BrowserMaxAndFocusActionExecute(Sender: TObject);
10654 BrowserMaxAction.Execute;
10655 SetFocusForBrowserAction.Execute;
10658 procedure TGikoForm.BrowserMaxAndFocusActionUpdate(Sender: TObject);
10660 if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
10661 (FActiveContent.Browser <> BrowserNullTab.Browser) then
10662 BrowserMaxAndFocusAction.Enabled := true
10664 BrowserMaxAndFocusAction.Enabled := false;
10666 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\82ð
\8dÅ
\91å
\89»
\82µ
\82Ä
\83t
\83H
\81[
\83J
\83X
\82ð
\93\96\82Ä
\82é
10667 procedure TGikoForm.ThreadlistMaxAndFocusActionExecute(Sender: TObject);
10669 BrowserMinAction.Execute;
10670 SetFocusForThreadListAction.Execute;
10673 procedure TGikoForm.ListViewExit(Sender: TObject);
10679 procedure TGikoForm.ListViewSelectItem(Sender: TObject; Item: TListItem;
10680 Selected: Boolean);
10683 if not (GikoSys.Setting.BrowserTabVisible) and (Item <> nil) then
10684 if (TObject( Item.Data ) is TThreadItem) then begin
10685 SelectTimer.Interval := GikoSys.Setting.SelectInterval;
10687 SelectTimer.Interval := 0
10689 SelectTimer.Interval := 0;
10693 procedure TGikoForm.SelectTimerTimer(Sender: TObject);
10695 if not (ListView.Selected = nil) then
10696 if( FActiveContent = nil) or
10697 (GetActiveContent <> TThreadItem(ListView.Selected.Data) ) then begin
10698 SelectTimer.Interval := 0;
10703 procedure TGikoForm.SelectItemSaveForDatExecute(Sender: TObject);
10708 List := TList.Create;
10710 Screen.Cursor := crHourGlass;
10711 SelectListItem(List);
10712 if ((GikoSys.Setting.ListOrientation = gloVertical) and
10713 (GikoSys.Setting.ListHeightState = glsMax)) or
10714 ((GikoSys.Setting.ListOrientation = gloHorizontal) and
10715 (GikoSys.Setting.ListWidthState = glsMax)) then
10716 ShowMessage('
\83X
\83\8c\83b
\83h
\88ê
\97\97\82ð
\95\
\8e¦
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10717 else if(List.Count = 0) then
10718 ShowMessage('
\83X
\83\8c\83b
\83h
\82ð
\91I
\91ð
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10720 FileSaveAs1.Dialog.Title := '
\91I
\91ð
\83X
\83\8c\83b
\83h
\82ðdat
\82Ì
\82Ü
\82Ü
\95Û
\91¶';
10721 FileSaveAs1.Dialog.Filter := 'DAT
\83t
\83@
\83C
\83\8b(*.dat)|*.dat';
10722 for i := 0 to List.Count - 1 do begin
10723 if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin
10724 FileSaveAs1.Dialog.FileName := TThreadItem(List[i]).FileName;
10725 if FileSaveAs1.Execute then begin
10726 //
\82È
\82º
\82©
\83L
\83\83\83\93\83Z
\83\8b\82Å
\82à
\82±
\82Á
\82¿
\82É
\93ü
\82Á
\82Ä
\82
\82é
10727 if ExtractFilePath(FileSaveAs1.Dialog.FileName) <> '' then begin
10728 CopyFile(PChar(TThreadItem(List[i]).FilePath),
10729 PChar(FileSaveAs1.Dialog.FileName), true);
10736 Screen.Cursor := crDefault;
10742 procedure TGikoForm.SelectItemSaveForHTMLExecute(Sender: TObject);
10749 List := TList.Create;
10751 Screen.Cursor := crHourGlass;
10752 SelectListItem(List);
10753 if ((GikoSys.Setting.ListOrientation = gloVertical) and
10754 (GikoSys.Setting.ListHeightState = glsMax)) or
10755 ((GikoSys.Setting.ListOrientation = gloHorizontal) and
10756 (GikoSys.Setting.ListWidthState = glsMax)) then
10757 ShowMessage('
\83X
\83\8c\83b
\83h
\88ê
\97\97\82ð
\95\
\8e¦
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10758 else if(List.Count = 0) then
10759 ShowMessage('
\83X
\83\8c\83b
\83h
\82ð
\91I
\91ð
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10761 FileSaveAs1.Dialog.Title := '
\91I
\91ð
\83X
\83\8c\83b
\83h
\82ðHTML
\89»
\82µ
\82Ä
\95Û
\91¶';
10762 FileSaveAs1.Dialog.Filter := 'HTML
\83t
\83@
\83C
\83\8b(*.html)|*.html';
10763 for i := 0 to List.Count - 1 do begin
10764 if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin
10765 FileSaveAs1.Dialog.FileName := TThreadItem(List[i]).Title + '.html';
10766 if FileSaveAs1.Execute then begin
10767 //
\82È
\82º
\82©
\83L
\83\83\83\93\83Z
\83\8b\82Å
\82à
\82±
\82Á
\82¿
\82É
\93ü
\82Á
\82Ä
\82
\82é
10768 if ExtractFilePath(FileSaveAs1.Dialog.FileName) <> '' then begin
10769 html := TStringList.Create;
10770 title := TThreadItem(List[i]).Title;
10772 GikoSys.CreateHTML3(html, TThreadItem(List[i]), title);
10773 html.SaveToFile(FileSaveAs1.Dialog.FileName);
10774 SkinorCSSFilesCopy(ExtractFilePath(FileSaveAs1.Dialog.FileName));
10784 Screen.Cursor := crDefault;
10788 procedure TGikoForm.SkinorCSSFilesCopy(path: string);
10790 tmp, tmpD, tmpF: string;
10793 files: TStringList;
10796 if GikoSys.Setting.UseSkin then begin
10797 current := ExtractFilePath(GikoSys.GetSkinDir);
10798 tmp := GikoSys.Setting.CSSFileName;
10799 end else if GikoSys.Setting.UseCSS then begin
10800 current := ExtractFilePath(GikoSys.GetStyleSheetDir);
10801 tmp := ExtractFilePath(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName);
10803 dirs := TStringList.Create;
10806 if tmp <> current then begin
10807 GikoSys.GetDirectoryList(current, '*.*', dirs, true);
10808 for i := 0 to dirs.Count - 1 do begin
10809 files := TStringList.Create;
10811 gikoSys.GetFileList(dirs[i], '*.*', files, true);
10812 tmpD := CustomStringReplace(dirs[i], GikoSys.GetConfigDir, path);
10813 if (AnsiPos(dirs[i], tmp) <> 0) and not (DirectoryExists(tmpD)) then
10814 ForceDirectories(tmpD);
10816 if(dirs[i] = tmp) and (dirs[i] <> current) then begin
10817 for j := 0 to files.Count - 1 do begin
10818 tmpF := CustomStringReplace(files[j], GikoSys.GetConfigDir, path);
10819 if not FileExists(tmpF) then begin
10820 CopyFile(PChar(files[j]), PChar(tmpF),True);
10829 tmpD := CustomStringReplace(dirs[0], GikoSys.GetConfigDir, path);
10830 if not DirectoryExists(tmpD) then
10831 ForceDirectories(tmpD);
10832 tmpF := CustomStringReplace(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName
10833 , GikoSys.GetConfigDir, path);
10834 if not FileExists(tmpF) then begin
10835 CopyFile(PChar(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName)
10836 , PChar(tmpF), True);
10845 procedure TGikoForm.KidokuActionExecute(Sender: TObject);
10850 List := TList.Create;
10852 SelectListItem(List);
10853 for i := 0 to List.Count - 1 do begin
10854 if TObject(List[i]) is TThreadItem then begin
10855 TThreadItem(List[i]).UnRead := false;
10856 TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;
10859 if TreeView.Visible then
10866 procedure TGikoForm.MidokuActionExecute(Sender: TObject);
10871 List := TList.Create;
10873 SelectListItem(List);
10874 for i := 0 to List.Count - 1 do begin
10875 if TObject(List[i]) is TThreadItem then begin
10876 TThreadItem(List[i]).UnRead := true;
10877 TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;
10880 if TreeView.Visible then
10887 procedure TGikoForm.BrowserPanelCanResize(Sender: TObject; var NewWidth,
10888 NewHeight: Integer; var Resize: Boolean);
10892 for i := 0 to BROWSER_COUNT - 1 do
10893 SetWindowPos(TWebBrowser(FBrowsers[i]).Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER);
10895 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10896 SetWindowPos(FActiveContent.Browser.Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER);
10900 procedure TGikoForm.LogFolderOpenActionExecute(Sender: TObject);
10904 if ((GikoSys.Setting.ListOrientation = gloVertical) and
10905 (GikoSys.Setting.ListHeightState = glsMax)) or
10906 ((GikoSys.Setting.ListOrientation = gloHorizontal) and
10907 (GikoSys.Setting.ListWidthState = glsMax)) then begin
10908 if(GetActiveContent <> nil) then begin
10909 GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(GetActiveContent.FilePath) + '"');
10911 end else if GetActiveList is TCategory then begin
10912 List := TList.Create;
10914 SelectListItem(List);
10915 GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(TBoard(List[0]).FilePath) + '"');
10919 end else if GetActiveList is TBoard then begin
10920 GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(TBoard(GetActiveList).FilePath) + '"');
10925 procedure TGikoForm.LogFolderOpenActionUpdate(Sender: TObject);
10927 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
10928 LogFolderOpenAction.Enabled := True
10929 else if GetActiveList is TBoard then
10930 LogFolderOpenAction.Enabled := True
10932 LogFolderOpenAction.Enabled := False;
10935 function TGikoForm.GetTabURLs(AStringList: TStringList) : Boolean;
10937 rec : TBrowserRecord;
10938 i, bound : Integer;
10940 bound := BrowserTab.Tabs.Count -1;
10941 if bound = -1 then begin
10943 Exit; //for
\82É
\94ò
\82Î
\82È
\82¢
\82Å
\91\80\8dì
\82ð
\94²
\82¯
\82é
10946 for i := 0 to bound do begin
10947 rec := TBrowserRecord( BrowserTab.Tabs.Objects[ i ] );
10948 if( rec <> nil) and (rec.Thread <> nil) then
10949 AStringList.Add( rec.Thread.URL );
10954 procedure TGikoForm.TabsSaveActionExecute(Sender: TObject);
10956 if not SaveTabURLs then begin
10957 ShowMessage('
\95Û
\91¶
\82·
\82é
\83^
\83u
\82ª
\82 \82è
\82Ü
\82¹
\82ñ');
10961 function TGikoForm.SaveTabURLs : Boolean;
10963 SaveStringList: TStringList;
10965 SaveStringList := TStringList.Create;
10967 Result := GetTabURLs(SaveStringList);
10968 SaveStringList.SaveToFile(ExtractFilePath(Application.ExeName) + 'tab.sav');
10970 SaveStringList.Free
10974 procedure TGikoForm.TabsOpenActionExecute(Sender: TObject);
10976 if not LoadTabURLs then begin
10977 ShowMessage('
\95\
\8e¦
\82·
\82é
\83^
\83u
\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B');
10981 procedure TGikoForm.FileTabSaveClick(Sender: TObject);
10983 SaveStringList: TStringList;
10985 SaveTabList := TStringList.Create;
10986 SaveTabList := GetTabURLs;
10987 if TabSaveDialog.Execute then begin
10988 SaveTabList.SaveToFile(TabSaveDialog.FileName);
10993 function TGikoForm.LoadTabURLs : Boolean;
10995 i, bound : Integer;
10996 item : TThreadItem;
10997 URLs : TStringList;
10998 GikoTab : TGikoTabAppend;
11001 fileName := ExtractFilePath(Application.ExeName) + 'tab.sav';
11002 URLs := TStringList.Create();
11003 GikoTab := GikoSys.Setting.BrowserTabAppend;
11006 if FileExists(fileName) then
11007 URLs.LoadFromFile(fileName);
11010 ShowMessage('
\83^
\83u
\83t
\83@
\83C
\83\8b\82ª
\8aJ
\82¯
\82Ü
\82¹
\82ñ');
11012 bound := URLs.Count - 1;
11013 if bound = -1 then begin
11019 GikoSys.Setting.BrowserTabAppend := gtpLast;//TGikoTabAppend(1);
11020 for i := 0 to URLs.Count - 1 do begin
11021 item := BBSsFindThreadFromURL( URLs[ i ] );
11022 if item <> nil then
11023 InsertBrowserTab( item, false );
11026 GikoSys.Setting.BrowserTabAppend := GikoTab;
11032 procedure TGikoForm.TabsSaveToFileActionExecute(Sender: TObject);
11034 SaveTabList: TStringList;
11037 SaveTabList := TStringList.Create;
11039 Result := GetTabURLs(SaveTabList);
11040 // if TabSaveDialog.Execute then begin
11041 // SaveTabList.SaveToFile(TabSaveDialog.FileName);
11048 procedure TGikoForm.TabsOpenFromFileActionExecute(Sender: TObject);
11051 item : TThreadItem;
11052 URLs : TStringList;
11053 GikoTab: TGikoTabAppend;
11055 URLs := TStringList.Create();
11056 GikoTab := GikoSys.Setting.BrowserTabAppend;
11059 // if TabOpenDialog.Execute then begin
11060 // URLs.LoadFromFile(TabOpenDialog.FileName);
11063 on EFOpenError do ShowMessage('
\83^
\83u
\83t
\83@
\83C
\83\8b\82ª
\8aJ
\82¯
\82Ü
\82¹
\82ñ');
11066 GikoSys.Setting.BrowserTabAppend := gtpLast;//TGikoTabAppend(1);
11067 for i := 0 to URLs.Count - 1 do begin
11068 item := BBSsFindThreadFromURL( URLs[ i ] );
11069 if item <> nil then
11070 InsertBrowserTab( item, false );
11073 GikoSys.Setting.BrowserTabAppend := GikoTab;
11078 procedure TGikoForm.OnlyAHundredResActionExecute(Sender: TObject);
11080 ThreadItem : TThreadItem;
11081 FilterList : TStringList;
11084 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
11085 and (FActiveContent.FBrowser.Busy) then Exit;
11087 FResRangeMenuSelect := 100;
11088 OnlyAHundredResAction.Checked := True;
11090 if GikoSys.ResRange <> 100 then begin
11091 GikoSys.ResRange := 100;
11093 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
11094 FilterList := TStringList.Create;
11096 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
11097 GikoSys.FSelectResFilter.Reverse := False;
11099 FilterList.Destroy;
11102 FSelectResWord := '';
11104 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
11105 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
11106 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
11108 ThreadItem := GetActiveContent;
11109 if ThreadItem <> nil then
11110 InsertBrowserTab( ThreadItem, True );
11114 procedure TGikoForm.OnlyKokoResActionExecute(Sender: TObject);
11116 ThreadItem : TThreadItem;
11117 FilterList : TStringList;
11120 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
11121 and (FActiveContent.FBrowser.Busy) then Exit;
11123 FResRangeMenuSelect := Ord( grrKoko );
11124 OnlyKokoResAction.Checked := True;
11126 if GikoSys.ResRange <> Ord( grrKoko ) then begin
11127 GikoSys.ResRange := Ord( grrKoko );
11129 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
11130 FilterList := TStringList.Create;
11132 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
11133 GikoSys.FSelectResFilter.Reverse := False;
11135 FilterList.Destroy;
11138 FSelectResWord := '';
11140 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
11141 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
11142 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
11144 ThreadItem := GetActiveContent;
11145 if ThreadItem <> nil then
11146 InsertBrowserTab( ThreadItem, True );
11150 procedure TGikoForm.OnlyNewResActionExecute(Sender: TObject);
11152 ThreadItem : TThreadItem;
11153 FilterList : TStringList;
11156 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
11157 and (FActiveContent.FBrowser.Busy) then Exit;
11159 FResRangeMenuSelect := Ord( grrNew );
11160 OnlyNewResAction.Checked := True;
11162 if GikoSys.ResRange <> Ord( grrNew ) then begin
11163 GikoSys.ResRange := Ord( grrNew );
11165 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
11166 FilterList := TStringList.Create;
11168 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
11169 GikoSys.FSelectResFilter.Reverse := False;
11171 FilterList.Destroy;
11174 FSelectResWord := '';
11176 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
11177 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
11178 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
11180 ThreadItem := GetActiveContent;
11181 if ThreadItem <> nil then
11182 InsertBrowserTab( ThreadItem, True );
11186 procedure TGikoForm.BrowsBoradHeadActionExecute(Sender: TObject);
11188 RefURL, URL : string;
11192 if GetActiveList is TCategory then begin
11193 List := TList.Create;
11195 SelectListItem(List);
11196 RefURL := TBoard(List[0]).URL;
11200 end else if GetActiveList is TBoard then begin
11201 RefURL := TBoard(GetActiveList).URL
11203 if RefURL <> '' then begin
11204 if RefURL[Length(RefURL)] <> '/' then
11205 URL := RefURL + '/' + 'head.txt'
11207 URL := RefURL + 'head.txt';
11211 ShowMessage('
\94Â
\82ð
\93Á
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½
\81B');
11216 procedure TGikoForm.BrowsBoradHeadActionUpdate(Sender: TObject);
11218 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
11219 BrowsBoradHeadAction.Enabled := True
11220 else if GetActiveList is TBoard then
11221 BrowsBoradHeadAction.Enabled := True
11223 BrowsBoradHeadAction.Enabled := False;
11226 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\95Ò
\8fW
\82·
\82é
\82½
\82ß
\82É
\8aJ
\82
11227 procedure TGikoForm.EditNGActionExecute(Sender: TObject);
11229 GikoSys.FAbon.EditNGwords;
11232 procedure TGikoForm.ThreadRangeActionUpdate(Sender: TObject);
11234 ThreadRangeAction.Enabled := (GetActiveList is TBoard);
11237 procedure TGikoForm.ThreadRangeActionExecute(Sender: TObject);
11239 case GikoSys.Setting.ThreadRange of
11240 gtrAll: AllItemAction.Execute;
11241 gtrLog: LogItemAction.Execute;
11242 gtrNew: NewItemAction.Execute;
11246 procedure TGikoForm.TabAutoSaveActionExecute(Sender: TObject);
11251 procedure TGikoForm.TabAutoLoadActionExecute(Sender: TObject);
11257 OleInitialize(nil);