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 // LockWindowUpdate(Self.Handle);
3611 if(FActiveContent <> nil) and (FActiveContent <> Thread) then begin
3612 if (FActiveContent.Browser <> BrowserNullTab.Browser) then
3613 ShowWindow(FActiveContent.Browser.Handle, SW_HIDE);
3615 ShowWindow(Thread.FBrowser.Handle, SW_SHOW);
3616 //LockWindowUpdate(0);
3617 if (not Assigned(Thread.Browser.Document)) then begin
3618 Thread.Browser.Navigate('about:blank');
3620 FActiveContent := Thread;
3621 while (Thread.Browser.ReadyState <> READYSTATE_COMPLETE) and
3622 (Thread.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3623 Application.ProcessMessages;
3624 if idx <> BrowserTab.TabIndex then begin
3628 if not ThreadIsLog then begin
3629 Self.Caption := CAPTION_NAME ;
3631 s := '<HTML><BODY><CENTER>
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Í
\8eæ
\93¾
\82µ
\82Ä
\82¢
\82Ü
\82¹
\82ñ</CENTER></BODY></HTML>';
3632 doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
3634 doc.charset := 'Shift_JIS';
3640 Self.Caption := CAPTION_NAME + ' - [' + ThreadTitle + ']';
3641 //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«
3642 //
\90V
\8bK
\82ÉThread
\82ð
\8aJ
\82¢
\82½
\82Æ
\82«
\82É
\90^
\82É
\82È
\82Á
\82Ä
\82¢
\82é
\81B
3643 // if(Thread.Repaint) or (Thread.OnlyHundred <> GikoSys.OnlyAHundredRes)then begin
3644 if Thread.Repaint then begin
3645 //Thread.LastSize := ThreadItem.Size;
3646 Thread.Repaint := false;
3648 Thread.Browser.OnStatusTextChange := nil;
3649 doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
3650 GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
3652 // if (Assigned(Thread.Browser)) and (Thread.Browser <> nil) then
3653 Thread.Browser.OnStatusTextChange := BrowserStatusTextChange;
3654 //
\82È
\82º
\82©
\82±
\82±
\82Å
\96¾
\8e¦
\93I
\82ÉDocumentComplete
\82ð
\8cÄ
\82Î
\82È
\82¢
\82Æ
\82¤
\82Ü
\82
\82¢
\82©
\82È
\82¢
3655 //
\92Ç
\8bL
\81@200406/19
3656 //Visible
\82Ì
\82Æ
\82«
\82µ
\82©DocumentComplete
\82Í
\8cÄ
\82Î
\82ê
\82È
\82¢
\82ç
\82µ
\82¢
3657 Thread.FBrowser.OnDocumentComplete(Thread.FBrowser, Thread.FBrowser.Parent, url);
3658 // Thread.OnlyHundred := GikoSys.OnlyAHundredRes;
3659 Application.ProcessMessages;
3660 //
\82±
\82±
\82ÅApplication.ProcessMessages
\82ð
\8cÄ
\82Ô
\82±
\82Æ
\82É
\82æ
\82Á
\82ÄWebBrowser
\82ð
\8dX
\90V
\82³
\82¹
\82é
\81B
3661 //
\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é
3662 //
\81@by
\82à
\82¶
\82ã(2004/01/20)
3664 //if (Assigned(Thread)) and (Assigned(ThreadItem))then begin
3665 if(Thread <> nil) and (ThreadItem <>nil) then begin
3666 if ThreadUnRead then
3667 BrowserMovement('new', Thread)
3668 else if ThreadScrollTop <> 0 then begin
3670 doc.Body.ScrollTop := ThreadScrollTop;
3673 MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
3678 FActiveContent := nil;
3683 FActiveContent := nil;
3688 // Application.ProcessMessages;
3691 ThreadItem.UnRead := False;
3694 if (Assigned(Thread)) and (Assigned(Thread.Thread)) and (Thread <> nil) and (ThreadItem <>nil) then begin
3695 //FActiveContent := Thread;
3697 BrowserBoardNameLabel.Caption := ThreadPTitle;
3698 ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
3699 BrowserNameLabel.Caption := ThreadTitle;
3700 ItemImage.Picture := nil;
3702 if ThreadNewArraical then
3703 ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap)
3705 ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap)
3707 ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap);
3709 ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;
3710 BrowserNameLabel.Left := ItemImage.Left + 20;
3712 FActiveContent := nil;
3715 Screen.Cursor := crDefault;
3719 function TGikoForm.GetActiveContent: TThreadItem;
3722 if( Assigned(FActiveContent) ) and (Assigned(FActiveContent.Thread))
3723 and (FActiveContent <> nil) and (FActiveContent.Thread <> nil) then
3724 Result := FActiveContent.Thread
3726 FActiveContent := nil;
3730 FActiveContent := nil;
3735 procedure TGikoForm.SetActiveList(Obj: TObject);
3740 // if FActiveList <> Obj then begin
3743 if ListView.Selected <> nil then
3744 idx := ListView.Selected.Index
3747 ListView.Items.Count := 0;
3748 ListView.Items.Clear;
3749 ListView.Selected := nil;
3750 // ListView.Columns.Clear;
3752 Self.Caption := CAPTION_NAME;
3753 //Application.Title := CAPTION_NAME;
3755 if Obj is TBBS then begin
3756 for i := 0 to ListView.Columns.Count - 1 do
3757 ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i];
3758 SetCategoryListItem(TBBS(Obj));
3759 end else if Obj is TCategory then begin
3760 for i := 0 to ListView.Columns.Count - 1 do
3761 ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i];
3762 SetBoardListItem(TCategory(Obj));
3763 end else if Obj is TBoard then begin
3764 SetThreadListItem(TBoard(Obj));
3767 if idx >= 0 then begin
3768 ListView.ItemIndex := idx;
3769 ListView.ItemFocused := ListView.Items.Item[ idx ];
3775 //
\81\9a\81\9a\83q
\83\8d\83\86\83L
\83\81\83\82
3776 //
\82»
\82Ì
\82¤
\82¿interface
\82ð
\8eg
\82¤
3777 function TGikoForm.GetActiveList: TObject;
3779 Result := FActiveList;
3782 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType);
3784 SetListViewType(AViewType, '', False);
3787 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
3791 if ActiveList is TBoard then begin
3792 Board := TBoard(ActiveList);
3794 Board.ParentCategory.ParenTBBS.SelectText := SelectText;
3795 Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
3796 // Board.SelectText := SelectText;
3797 // Board.KubetsuChk := KubetsuChk;
3798 ViewType := AViewType;
3799 SetActiveList(Board);
3800 SetThreadListItem(Board);
3804 procedure TGikoForm.ListViewCustomDraw(Sender: TCustomListView;
3805 const ARect: TRect; var DefaultDraw: Boolean);
3811 if ListView.Items.Count = 0 then begin
3812 DefaultDraw := True;
3814 ListView.Canvas.Brush.Color := ListView.Color;
3815 ListView.Canvas.FillRect(ARect);
3819 ListView.Canvas.Font.Color := clWindowText;
3820 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3823 ListView.Canvas.Font.Color := clBlue;
3824 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';
3827 ListView.Canvas.Font.Color := clGreen;
3828 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\90V
\92\85\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3831 ListView.Canvas.Font.Color := clNavy;
3832 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';
3833 if GetActiveList is TBoard then
3834 s := Format(s, [TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText]);
3842 p := Point((ListView.ClientWidth div 2) - (ListView.Canvas.TextWidth(s) div 2),
3843 (ListView.ClientHeight div 2) - (ListView.Canvas.TextHeight(s) div 2));
3844 ListView.Canvas.TextOut(p.X, p.Y, s);
3846 DefaultDraw := True;
3850 procedure TGikoForm.DownloadList(Board: TBoard; ForceDownload: Boolean = False);
3852 Item: TDownloadItem;
3854 if not Board.IsThreadDatRead then
3855 GikoSys.ReadSubjectFile(Board);
3856 Item := TDownloadItem.Create;
3858 Item.Board := Board;
3859 Item.DownType := gdtBoard;
3860 Item.ForceDownload := ForceDownload;
3861 // AbortToolButton.Enabled := True;
3862 // Animate.Active := True;
3863 // FDownload.Add(Item);
3864 FControlThread.AddItem(Item);
3865 // Animate.Active := False;
3866 // AbortToolButton.Enabled := False;
3867 if FWorkCount = 0 then begin
3869 Animate.Active := True;
3872 Screen.Cursor := crAppStart;
3880 procedure TGikoForm.DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
3882 Item: TDownloadItem;
3884 Item := TDownloadItem.Create;
3886 Item.ThreadItem := ThreadItem;
3887 Item.DownType := gdtThread;
3888 Item.ForceDownload := ForceDownload;
3889 // AbortToolButton.Enabled := True;
3890 // Animate.Active := True;
3891 // FDownload.Add(Item);
3892 FControlThread.AddItem(Item);
3893 // Animate.Active := False;
3894 // AbortToolButton.Enabled := False;
3895 if FWorkCount = 0 then begin
3897 Animate.Active := True;
3900 Screen.Cursor := crAppStart;
3908 procedure TGikoForm.PlaySound(SoundEventName: string);
3912 FileName := GikoSys.Setting.FindSoundFileName(SoundEventName);
3913 if FileExists(FileName) then begin
3914 if not sndPlaySound(PChar(FileName), SND_ASYNC or SND_NOSTOP) then begin
3915 sndPlaySound(nil, SND_SYNC);
3916 Application.ProcessMessages;
3918 sndPlaySound(PChar(FileName), SND_ASYNC);
3923 function TGikoForm.AddHistory( favItem : TFavoriteThreadItem ): Boolean;
3926 Item: TFavoriteThreadItem;
3930 // if (GetActiveContent = ThreadItem) and
3931 // (ThreadItem.Count <= ThreadItem.Kokomade) then
3933 // if GetActiveContent = ThreadItem then
3937 if FTreeType = gttHistory then
3938 TreeView.Selected := nil;
3940 for i := 0 to FHistoryList.Count - 1 do begin
3941 if TObject(FHistoryList[i]) is TFavoriteThreadItem then begin
3942 Item := TFavoriteThreadItem(FHistoryList[i]);
3943 if Item.URL = favItem.URL then begin
3944 // SetContent(ThreadItem);
3945 FHistoryList.Move(i, 0);
3946 if FTreeType = gttHistory then
3947 if TreeView.Items.GetFirstNode <> TreeView.Items[ i ] then
3948 TreeView.Items[ i ].MoveTo( TreeView.Items.GetFirstNode, naInsert );
3955 if FHistoryList.Count > 0 then
3956 FHistoryList.Insert( 0, favItem )
3958 FHistoryList.Add( favItem );
3959 // SetContent(ThreadItem);
3961 if FTreeType = gttHistory then begin
3962 Node := TreeView.Items.Add( nil, favItem.Title );
3963 Node.MoveTo( TreeView.Items.GetFirstNode, naInsert );
3965 if favItem.NewArrival then begin
3966 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3967 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3969 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3970 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3973 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
3974 //
\81¦favItem.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
3975 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3976 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3977 Node.Data := favItem;
3981 procedure TGikoForm.DeleteHistory( threadItem: TThreadItem );
3985 for i := 0 to FHistoryList.Count - 1 do begin
3986 if threadItem.URL = TFavoriteThreadItem( FHistoryList.Items[i] ).URL then begin
3987 TFavoriteThreadItem( FHistoryList.Items[ i ] ).Free;
3988 FHistoryList.Delete(i);
3989 FHistoryList.Capacity := FHistoryList.Count;
3995 procedure TGikoForm.ClearHistory;
3999 //FHistoryList.Clear;
4002 for i := FHistoryList.Count - 1 downto 0 do begin
4003 if TObject(FHistoryList[ i ]) is TFavoriteThreadItem then
4004 TFavoriteThreadItem(FHistoryList[ i ]).Free
4005 else if TObject(FHistoryList[ i ]) is TFavoriteBoardItem then
4006 TFavoriteBoardItem(FHistoryList[ i ]).Free;
4008 //FHistoryList.Delete(i);
4014 FHistoryList.Capacity := FHistoryList.Count;
4018 procedure TGikoForm.SaveHistory;
4021 saveList : TstringList;
4024 saveList := TStringList.Create;
4027 FHistoryList.Capacity := FHistoryList.Count;
4028 saveList.Add('<?xml version="1.0" encoding="Shift_JIS" standalone="yes"?>');
4029 saveList.Add('<address>');
4030 bound := FHistoryList.Count - 1;
4031 for i := bound downto 0 do begin
4032 // title
\82Í
\8d¡
\82Ì
\82Æ
\82±
\82ë
\8eg
\82Á
\82Ä
\82¢
\82È
\82¢
4034 '<history url="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).URL ) + '"' +
4035 ' title="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).Title ) + '"/>');
4037 saveList.Add('</address>');
4038 saveList.SaveToFile( GikoSys.GetConfigDir + 'History.xml' );
4045 procedure TGikoForm.LoadHistory;
4049 XMLDoc : IXMLDocument;
4051 HistoryNode : IXMLNode;
4053 favItem : TFavoriteThreadItem;
4056 fileName := GikoSys.GetConfigDir + 'History.xml';
4058 if FileExists( fileName ) then begin
4060 XMLDoc := IXMLDocument.Create;
4061 //XMLDoc := LoadXMLDocument(FileName);
4062 LoadXMLDocument(FileName, XMLDoc);
4064 XMLNode := XMLDoc.DocumentElement;
4066 if XMLNode.NodeName = 'address' then begin
4067 bound := XMLNode.ChildNodes.Count - 1;
4068 for i := 0 to bound do begin
4069 HistoryNode := XMLNode.ChildNodes[i];
4070 if HistoryNode.NodeName = 'history' then begin
4071 //if FReadCount >= sl.Count then begin
4072 s := Trim(HistoryNode.Attributes['url']);
4073 if s <> '' then begin
4074 favItem := TFavoriteThreadItem.Create(
4075 s, HistoryNode.Attributes[ 'title' ] );
4076 if not AddHistory( favItem ) then
4092 procedure TGikoForm.ShowBBSTreeOld(
4100 FavoriteTreeView.Visible := False;
4101 FavoriteToolBar.Hide;
4102 TreeView.Visible := True;
4104 b := CabinetSelectPopupMenu.Items.Count - 1;
4105 for i := 0 to b do begin
4106 item := CabinetSelectPopupMenu.Items[ i ];
4107 if item is TBBSMenuItem then begin
4108 if TBBSMenuItem( item ).Data = inBBS then begin
4109 item.Checked := True;
4110 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
4111 CabinetMenu.Items[ i ].Checked := True;
4112 GikoSys.Setting.CabinetIndex := i;
4116 item.Checked := False;
4117 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
4118 CabinetMenu.Items[ i ].Checked := False;
4120 CabinetSelectToolButton.Caption := inBBS.Title;
4122 CabinetHistoryAction.Checked := False;
4123 CabinetFavoriteAction.Checked := False;
4125 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
4126 FTreeType := gtt2ch;
4127 HistoryToolBar.Hide;
4128 SetBoardTreeNode( inBBS );
4129 TreeView.Items.GetFirstNode.Expanded := True; //?c???[?g?b?v???????J??
4130 //?c???[??g?b?v?????I????
4131 if GetActiveList = nil then
4132 TreeView.Selected := TreeView.Items[0]
4134 for i := 0 to TreeView.Items.Count - 1 do begin
4135 if TreeView.Items[i].Data = GetActiveList then begin
4136 TreeView.Selected := TreeView.Items[i];
4140 TreeView.Selected := TreeView.Items[0]
4148 procedure TGikoForm.ShowBBSTree(
4157 FavoriteTreeView.Visible := False;
4158 FavoriteToolBar.Hide;
4159 TreeView.Visible := True;
4161 b := CabinetSelectPopupMenu.Items.Count - 1;
4162 for i := 0 to b do begin
4163 item := CabinetSelectPopupMenu.Items[ i ];
4164 if item is TBBSMenuItem then begin
4165 if TBBSMenuItem( item ).Data = inBBS then begin
4166 item.Checked := True;
4167 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
4168 CabinetMenu.Items[ i ].Checked := True;
4169 GikoSys.Setting.CabinetIndex := i;
4173 item.Checked := False;
4174 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
4175 CabinetMenu.Items[ i ].Checked := False;
4177 CabinetSelectToolButton.Caption := inBBS.Title;
4179 CabinetHistoryAction.Checked := False;
4180 CabinetFavoriteAction.Checked := False;
4182 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
4183 FTreeType := gtt2ch;
4184 HistoryToolBar.Hide;
4185 SetBoardTreeNode( inBBS );
4186 TreeView.Items.GetFirstNode.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
4187 //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
4188 if GetActiveList = nil then begin
4190 TreeClick( TreeView.Items[0] );
4194 for i := 0 to TreeView.Items.Count - 1 do begin
4195 if TreeView.Items[i].Data = GetActiveList then begin
4196 TreeClick( TreeView.Items[i] );
4200 TreeClick( TreeView.Items[0] );
4208 procedure TGikoForm.ShowHistoryTree;
4213 if CabinetPanel.Visible then begin
4214 if FTreeType = gttHistory then begin
4215 CabinetVisible( False );
4216 CabinetHistoryAction.Checked := False;
4218 CabinetHistoryAction.Checked := True;
4221 CabinetVisible( True );
4222 CabinetHistoryAction.Checked := True;
4225 // BBS...BBS, History, Favorite
4226 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 2;
4228 FavoriteTreeView.Visible := False;
4229 TreeView.Visible := True;
4231 CabinetBBSAction.Checked := False;
4232 CabinetFavoriteAction.Checked := False;
4234 if FTreeType <> gttHistory then begin
4235 b := CabinetSelectPopupMenu.Items.Count - 1;
4236 for i := 0 to b do begin
4237 item := CabinetSelectPopupMenu.Items[ i ];
4238 if item is TBBSMenuItem then begin
4239 item.Checked := False;
4240 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
4241 CabinetMenu.Items[ i ].Checked := False;
4245 FTreeType := gttHistory;
4246 HistoryToolBar.Show;
4247 FavoriteToolBar.Hide;
4249 CabinetSelectToolButton.Caption := '
\97\9a\97ð
\83\8a\83X
\83g';
4253 procedure TGikoForm.SetHistoryTreeNode;
4257 Item: TFavoriteThreadItem;
4259 TreeView.Items.BeginUpdate;
4261 TreeView.Items.Clear;
4262 for i := 0 to FHistoryList.Count - 1 do begin
4263 Item := TFavoriteThreadItem(FHistoryList[i]);
4264 Node := TreeView.Items.Add(nil, Item.Title);
4266 if Item.Item.NewArrival then begin
4267 Node.ImageIndex := ITEM_ICON_THREADNEW1;
4268 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
4270 Node.ImageIndex := ITEM_ICON_THREADLOG1;
4271 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
4274 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
4275 //
\81¦Item.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
4276 Node.ImageIndex := ITEM_ICON_THREADLOG1;
4277 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
4281 TreeView.Items.EndUpdate;
4285 procedure TGikoForm.SelectTreeNode(Item: TObject; CallEvent: Boolean);
4287 ChangeEvent: TTVChangedEvent;
4288 ChangingEvent: TTVChangingEvent;
4292 if Item is TCategory then
4293 bbs := TCategory( Item ).ParenTBBS
4294 else if Item is TBoard then
4295 bbs := TBoard( Item ).ParentCategory.ParenTBBS
4299 if (FTreeType = gtt2ch) and (FActiveBBS = bbs) 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;
4329 if GetActiveList is TBBS then begin
4330 for i := 0 to ListView.Columns.Count - 1 do
4331 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
4332 end else if GetActiveList is TCategory then begin
4333 for i := 0 to ListView.Columns.Count - 1 do
4334 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
4335 end else if GetActiveList is TBoard then begin
4336 for i := 0 to ListView.Columns.Count - 1 do
4337 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
4340 if (Item is TBBS) or (Item is TCategory) then begin
4341 ListView.Columns.Clear;
4342 SetActiveList( Item );
4343 end else if Item is TBoard then begin
4344 if not TBoard( Item ).IsThreadDatRead then begin
4345 Screen.Cursor := crHourGlass;
4347 if not TBoard( Item ).IsThreadDatRead then
4348 GikoSys.ReadSubjectFile(TBoard( Item ));
4350 Screen.Cursor := crDefault;
4353 SetActiveList( Item );
4356 if Item is TBoard then begin // not TCategory
4357 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4358 if GikoSys.Setting.ListWidthState = glsMax then begin
4359 BrowserMinAction.Execute;
4360 if GikoForm.Visible then
4364 if GikoSys.Setting.ListHeightState = glsMax then begin
4365 BrowserMinAction.Execute;
4366 if GikoForm.Visible then
4374 procedure TGikoForm.ListViewMouseDown(Sender: TObject;
4375 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
4377 listItem : TListItem;
4378 threadItem : TThreadItem;
4384 if not (GetActiveList is TBoard) then Exit;
4385 listItem := ListView.GetItemAt( X, Y );
4386 if listItem = nil then Exit;
4387 if not (TObject(listItem.Data) is TThreadItem) then Exit;
4389 threadItem := TThreadItem(ListItem.Data);
4390 InsertBrowserTab(threadItem, False);
4391 if threadItem.IsLogFile then
4392 ListView.UpdateItems(listItem.Index, listItem.Index);
4396 //
\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Å
4397 if (ssDouble in Shift) then
4398 ListDoubleClick(Shift)
4403 { if ssDouble in Shift then begin
4404 DoubleClickOccurred[Button] := True;
4406 DoubleClickOccurred[Button] := False;
4407 t := GetTickCount+GetDoubleClickTime;
4408 while GetTickCount < t do begin
4409 Application.ProcessMessages;
4410 if DoubleClickOccurred[Button] then
4415 if ssDouble in Shift then begin
4417 mbLeft: ListDoubleClick;
4430 procedure TGikoForm.ListClick;
4432 ListItem: TListItem;
4433 ThreadItem: TThreadItem;
4435 if ListView.SelCount <> 1 then Exit;
4436 ListItem := ListView.Selected;
4437 if ListItem = nil then Exit;
4438 if not (TObject(ListItem.Data) is TThreadItem) then Exit;
4440 ThreadItem := TThreadItem(ListItem.Data);
4441 if ThreadItem.IsLogFile then begin
4442 // if AddHistory(ThreadItem) then
4443 // SetContent(ThreadItem);
4444 InsertBrowserTab(ThreadItem);
4445 ListView.UpdateItems(ListItem.Index, ListItem.Index);
4447 // SetContent(ThreadItem);
4448 InsertBrowserTab(ThreadItem);
4451 if GikoSys.Setting.BrowserAutoMaximize = gbmClick then begin
4452 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4453 if GikoSys.Setting.ListWidthState = glsMin then begin
4454 BrowserMaxAndFocusAction.Execute;
4457 if GikoSys.Setting.ListHeightState = glsMin then begin
4458 BrowserMaxAndFocusAction.Execute;
4464 procedure TGikoForm.ListDoubleClick(Shift: TShiftState);
4466 ThreadItem: TThreadItem;
4469 shiftDown := (ssShift in Shift);
4471 if ListView.Selected = nil then Exit;
4473 if TObject(ListView.Selected.Data) is TCategory then begin
4474 SelectTreeNode(ListView.Selected.Data, True);
4475 // TreeView.Selected.Expanded := True;
4476 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4477 //TreeViewChange(nil, TreeView.Selected);
4478 end else if TObject(ListView.Selected.Data) is TBoard then begin
4479 SelectTreeNode(ListView.Selected.Data, True);
4480 // TreeView.Selected.Expanded := True;
4481 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4482 //TreeViewChange(nil, TreeView.Selected);
4483 end else if TObject(ListView.Selected.Data) is TThreadItem then begin
4484 //if TObject(ListView.Selected.Data) is TThreadItem then begin
4485 Application.ProcessMessages;
4486 ThreadItem := TThreadItem(ListView.Selected.Data);
4487 DownloadContent(ThreadItem, shiftDown);
4490 if GikoSys.Setting.BrowserAutoMaximize = gbmDoubleClick then begin
4491 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4492 if GikoSys.Setting.ListWidthState = glsMin then begin
4493 // BrowserMaxAndFocusAction.Execute;
4494 BrowserMaxAction.Execute;
4495 SetFocusForBrowserAction.Execute;
4498 if GikoSys.Setting.ListHeightState = glsMin then begin
4499 // BrowserMaxAndFocusAction.Execute;
4500 BrowserMaxAction.Execute;
4501 SetFocusForBrowserAction.Execute;
4507 procedure TGikoForm.BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord);
4512 activeBrower :TWebBrowser;
4514 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
4516 while (BrowserRecord.Browser.ReadyState <> READYSTATE_COMPLETE) and
4517 (BrowserRecord.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4518 Application.ProcessMessages;
4521 // Access Violation
\82ª
\8bN
\82«
\82é
\8e\96\82ª
\82 \82é
\82Ì
\82Å
\8d¡
\8cã
\97v
\83`
\83F
\83b
\83N
4522 if(BrowserRecord <> nil) and (BrowserRecord.FBrowser <> nil) then begin
4523 activeBrower := BrowserRecord.FBrowser;
4527 item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
4529 top := top + item.offsetTop;
4530 item := item.offsetParent;
4531 until AnsiCompareText(item.tagName, 'body' ) = 0;
4533 OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
4539 procedure TGikoForm.BrowserMovement(const AName: string);
4544 activeBrower :TWebBrowser;
4546 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
4548 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
4549 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4550 Application.ProcessMessages;
4553 // Access Violation
\82ª
\8bN
\82«
\82é
\8e\96\82ª
\82 \82é
\82Ì
\82Å
\8d¡
\8cã
\97v
\83`
\83F
\83b
\83N
4554 if(BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex >= 0) then begin
4555 activeBrower := FActiveContent.Browser;
4559 item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
4561 top := top + item.offsetTop;
4562 item := item.offsetParent;
4563 until AnsiCompareText(item.tagName, 'body' ) = 0;
4565 OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
4571 procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
4573 if TObject(Node.Data) is TBBS then begin
4574 TBBS(Node.Data).NodeExpand := False;
4575 end else if TObject(Node.Data) is TCategory then begin
4576 TCategory(Node.Data).NodeExpand := False;
4577 end else if TObject(Node.Data) is TBoard then begin
4578 TBoard(Node.Data).NodeExpand := False;
4582 procedure TGikoForm.MessageListViewResize(Sender: TObject);
4584 // MessageListView.Column[0].Width := MessageListView.ClientWidth - 16;
4587 procedure TGikoForm.SelectListItem(List: TList);
4589 // TmpTreeNode: TTreeNode;
4590 TmpListItem: TListItem;
4593 TmpListItem := ListView.Selected;
4594 while TmpListItem <> nil do begin
4595 List.Add(TmpListItem.Data);
4596 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
4601 procedure TGikoForm.ExitActionExecute(Sender: TObject);
4606 procedure TGikoForm.AllSelectActionExecute(Sender: TObject);
4611 procedure TGikoForm.StdToolBarVisibleActionExecute(Sender: TObject);
4613 CoolBand: TCoolBand;
4615 CoolBand := GetCoolBand(MainCoolBar, StdToolBar);
4616 if CoolBand = nil then
4618 GikoSys.Setting.StdToolBarVisible := StdToolBarVisibleAction.Checked;
4619 CoolBand.Visible := GikoSys.Setting.StdToolBarVisible;
4620 // StdToolBar.Visible := StdToolBarVisibleAction.Checked;
4621 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4623 //StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
4624 StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible;
4627 procedure TGikoForm.AddressBarVisibleActionExecute(Sender: TObject);
4629 CoolBand: TCoolBand;
4631 CoolBand := GetCoolBand(MainCoolBar, AddressToolBar);
4632 if CoolBand = nil then
4634 GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked;
4635 CoolBand.Visible := GikoSys.Setting.AddressBarVisible;
4636 //AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
4637 AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible;
4640 procedure TGikoForm.LinkBarVisibleActionExecute(Sender: TObject);
4642 CoolBand: TCoolBand;
4644 CoolBand := GetCoolBand(MainCoolBar, LinkToolBar);
4645 if CoolBand = nil then
4647 GikoSys.Setting.LinkBarVisible := LinkBarVisibleAction.Checked;
4648 CoolBand.Visible := GikoSys.Setting.LinkBarVisible;
4649 //LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
4650 LinkToolBarVisiblePMenu.Checked := GikoSys.Setting.LinkBarVisible;
4653 procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);
4655 CoolBand: TCoolBand;
4657 CoolBand := GetCoolBand(ListCoolBar, ListToolBar);
4658 if CoolBand = nil then
4660 CoolBand.Visible := ListToolBarVisibleAction.Checked;
4661 // ListToolBar.Visible := ListToolBarVisibleAction.Checked;
4662 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4663 GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;
4666 procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);
4668 CoolBand: TCoolBand;
4670 CoolBand := GetCoolBand(ListCoolBar, ListNameToolBar);
4671 if CoolBand = nil then
4673 CoolBand.Visible := ListNameBarVisibleAction.Checked;
4674 GikoSys.Setting.ListNameBarVisible := ListNameBarVisibleAction.Checked;
4677 procedure TGikoForm.BrowserToolBarVisibleActionExecute(Sender: TObject);
4679 CoolBand: TCoolBand;
4681 CoolBand := GetCoolBand(BrowserCoolBar, BrowserToolBar);
4682 if CoolBand = nil then
4684 CoolBand.Visible := BrowserToolBarVisibleAction.Checked;
4685 // BrowserToolBar.Visible := BrowserToolBarVisibleAction.Checked;
4686 GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;
4689 procedure TGikoForm.BrowserNameBarVisibleActionExecute(Sender: TObject);
4691 CoolBand: TCoolBand;
4693 CoolBand := GetCoolBand(BrowserCoolBar, BrowserNameToolBar);
4694 if CoolBand = nil then
4696 CoolBand.Visible := BrowserNameBarVisibleAction.Checked;
4697 GikoSys.Setting.BrowserNameBarVisible := BrowserNameBarVisibleAction.Checked;
4700 procedure TGikoForm.MsgBarVisibleActionExecute(Sender: TObject);
4702 MessageSplitter.Visible := MsgBarVisibleAction.Checked;
4703 MessagePanel.Top := MessageSplitter.Top + MessageSplitter.Height;
4704 MessageSplitter.Top := MessagePanel.Top + 1;
4705 MessagePanel.Visible := MsgBarVisibleAction.Checked;
4706 GikoSys.Setting.MessageBarVisible := MsgBarVisibleAction.Checked;
4709 procedure TGikoForm.StatusBarVisibleActionExecute(Sender: TObject);
4711 StatusBar.Visible := StatusBarVisibleAction.Checked;
4712 GikoSys.Setting.StatusBarVisible := StatusBarVisibleAction.Checked;
4715 procedure TGikoForm.IconStyleExecute(Sender: TObject);
4717 case ListView.ViewStyle of
4718 vsIcon: SmallIconAction.Execute;
4719 vsSmallIcon: ListIconAction.Execute;
4720 vsList: DetailIconAction.Execute;
4721 vsReport: LargeIconAction.Execute;
4725 procedure TGikoForm.LargeIconActionExecute(Sender: TObject);
4727 ListView.ViewStyle := vsIcon;
4728 LargeIconAction.Checked := True;
4731 procedure TGikoForm.SmallIconActionExecute(Sender: TObject);
4733 ListView.ViewStyle := vsSmallIcon;
4734 SmallIconAction.Checked := True;
4737 procedure TGikoForm.ListIconActionExecute(Sender: TObject);
4739 ListView.ViewStyle := vsList;
4740 ListIconAction.Checked := True;
4743 procedure TGikoForm.DetailIconActionExecute(Sender: TObject);
4745 ListView.ViewStyle := vsReport;
4746 DetailIconAction.Checked := True;
4749 procedure TGikoForm.SearchActionExecute(Sender: TObject);
4754 if FSearchDialog = nil then begin
4755 if (GikoForm.GetActiveList is TCategory) or (GikoForm.GetActiveList is TBoard) then
4756 chk := GikoForm.GetActiveList
4760 FSearchDialog := TSearchDialog.Create(Self, chk);
4761 FSearchDialog.SearchComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
4771 procedure TGikoForm.OptionActionExecute(Sender: TObject);
4775 Dlg := TOptionDialog.Create(Self);
4783 procedure TGikoForm.GikoNaviWebPageActionExecute(Sender: TObject);
4785 URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
4787 GikoSys.OpenBrowser(URL_GIKONAVI, gbtAuto);
4790 procedure TGikoForm.MonazillaWebPageActionExecute(Sender: TObject);
4792 URL_MONAZILLA: string = 'http://www.monazilla.org/';
4794 GikoSys.OpenBrowser(URL_MONAZILLA, gbtAuto);
4797 procedure TGikoForm.BBS2chWebPageActionExecute(Sender: TObject);
4799 URL_2ch: string = 'http://www.2ch.net/';
4801 GikoSys.OpenBrowser(URL_2ch, gbtAuto);
4804 procedure TGikoForm.GikoFolderOpenActionExecute(Sender: TObject);
4806 // GikoSys.OpenBrowser(GikoSys.GetAppDir, gbtIE);
4807 GikoSys.CreateProcess('explorer.exe', '/e,"' + GikoSys.GetAppDir + '"');
4810 procedure TGikoForm.AboutActionExecute(Sender: TObject);
4814 Dlg := TAboutDialog.Create(Self);
4822 procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject);
4827 procedure TGikoForm.CabinetVisible( isVisible : Boolean );
4829 TreeSplitter.Visible := isVisible;
4830 CabinetPanel.Visible := isVisible;
4831 CabinetVisibleAction.Checked := isVisible;
4834 procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject);
4837 gttHistory: CabinetHistoryAction.Execute;
4838 gttFavorite: CabinetFavoriteAction.Execute;
4840 CabinetBBSAction.Execute;
4844 procedure TGikoForm.AllItemActionExecute(Sender: TObject);
4847 if ViewType <> gvtAll then
4848 SetListViewType(gvtAll);
4849 GikoSys.Setting.ThreadRange := gtrAll;
4850 AllItemAction.Checked := True;
4851 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4853 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4854 if SelectComboBox.Parent <> nil then begin
4855 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4856 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4863 procedure TGikoForm.LogItemActionExecute(Sender: TObject);
4866 if ViewType <> gvtLog then
4867 SetListViewType(gvtLog);
4868 GikoSys.Setting.ThreadRange := gtrLog;
4869 LogItemAction.Checked := True;
4870 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4872 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4873 if SelectComboBox.Parent <> nil then begin
4874 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4875 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4882 procedure TGikoForm.NewItemActionExecute(Sender: TObject);
4886 if ViewType <> gvtNew then
4887 SetListViewType(gvtNew);
4888 GikoSys.Setting.ThreadRange := gtrNew;
4889 NewItemAction.Checked := True;
4890 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4892 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4893 if SelectComboBox.Parent <> nil then begin
4894 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4895 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4902 procedure TGikoForm.SelectItemActionExecute(Sender: TObject);
4905 Dlg: TListSelectDialog;
4908 if SelectComboBox.Parent <> nil then begin
4909 if SelectComboBox.Left + SelectComboBox.Width < ListToolBar.Width then begin
4910 // SelectComboBox
\82ª
\82 \82é
\8fê
\8d\87\82Í
\83t
\83H
\81[
\83J
\83X
\82ð
\88Ú
\82·
4911 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4912 if GikoSys.Setting.ListWidthState = glsMax then
4913 BrowserMinAction.Execute;
4915 if GikoSys.Setting.ListHeightState = glsMax then
4916 BrowserMinAction.Execute;
4918 SelectComboBox.SetFocus;
4925 if SelectComboBox.Text = SELECTCOMBOBOX_NAME then begin
4926 SelectComboBox.Text := '';
4927 SelectComboBox.Color := clWindow;
4930 AllItemAction.Checked := False;
4931 LogItemAction.Checked := False;
4932 NewItemAction.Checked := False;
4933 //SelectItemAction.Checked := True;
4935 Dlg := TListSelectDialog.Create(Self);
4937 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
4938 Dlg.SelectComboBox.Text := SelectComboBox.Text;
4940 if Dlg.ModalResult = mrCancel then begin
4941 if Length( SelectComboBox.Text ) = 0 then begin
4942 AllItemAction.Checked := True;
4943 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4944 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4947 if GetActiveList is TBoard then
4948 SetListViewType(gvtUser, TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText , Dlg.KubetsuCheckBox.Checked);
4950 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
4952 GikoSys.Setting.SelectTextList.Delete(idx);
4953 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
4954 while Dlg.SelectComboBox.Items.Count > 100 do begin
4955 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
4958 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
4959 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4960 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4962 SelectComboBox.Text := Dlg.SelectComboBox.Text;
4963 SelectComboBox.Color := clWindow;
4965 SetListViewType(gvtUser, Dlg.SelectComboBox.Text, Dlg.KubetsuCheckBox.Checked);
4972 procedure TGikoForm.ListNumberVisibleActionExecute(Sender: TObject);
4974 GikoSys.Setting.ListViewNo := ListNumberVisibleAction.Checked;
4978 procedure TGikoForm.UpFolderActionExecute(Sender: TObject);
4980 if GetActiveList is TBoard then begin
4981 // if FTreeType = gtt2ch then
4982 SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
4983 //SetActiveList(TBoard(GetActiveList).ParentCategory);
4984 end else if GetActiveList is TCategory then begin
4985 // if FTreeType = gtt2ch then
4986 SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);
4987 //SetActiveList(TCategory(GetActiveList).ParenTBBS);
4989 // if TreeView.Selected = nil then Exit;
4990 // if TreeView.Selected.Level = 0 then Exit;
4991 // TreeView.Selected.Parent.Selected := True;
4994 procedure TGikoForm.RoundActionExecute(Sender: TObject);
4998 Dlg := TRoundDialog.Create(Self);
5006 procedure TGikoForm.StopActionExecute(Sender: TObject);
5008 FControlThread.DownloadAbort;
5009 if FWorkCount <> 0 then FWorkCount := 0;
5011 Animate.Active := False;
5014 Screen.Cursor := crDefault;
5017 procedure TGikoForm.MsgBarCloseActionExecute(Sender: TObject);
5019 // MessagePanel.Visible := False;
5020 // MessageSplitter.Visible := False;
5021 // MsgBarVisibleAction.Checked := False;
5022 MsgBarVisibleAction.Execute;
5025 procedure TGikoForm.BrowserMaxActionExecute(Sender: TObject);
5027 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5028 case GikoSys.Setting.ListWidthState of
5030 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
5031 ViewPanel.Width := FBrowserSizeWidth;
5032 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5033 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5034 GikoSys.Setting.ListWidthState := glsNormal;
5036 glsMin, glsNormal: begin
5037 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
5038 if GikoSys.Setting.ListWidthState = glsNormal then
5039 FBrowserSizeWidth := ViewPanel.Width;
5040 ViewPanel.Width := 1;
5041 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5042 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5043 GikoSys.Setting.ListWidthState := glsMax;
5047 case GikoSys.Setting.ListHeightState of
5049 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
5050 ViewPanel.Height := FBrowserSizeHeight;
5051 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5052 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5053 GikoSys.Setting.ListHeightState := glsNormal;
5055 glsMin, glsNormal: begin
5056 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
5057 if GikoSys.Setting.ListHeightState = glsNormal then
5058 FBrowserSizeHeight := ViewPanel.Height;
5059 ViewPanel.Height := 1;
5060 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5061 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5062 GikoSys.Setting.ListHeightState := glsMax;
5066 // Mouse.CursorPos := BrowserSizeButton.ClientToScreen(Point(
5067 // System.Round(BrowserToolBar.ButtonWidth div 2),
5068 // System.Round(BrowserToolBar.ButtonHeight div 2)));
5069 //BrowserTab.OnChange(nil);
5072 procedure TGikoForm.BrowserMinActionExecute(Sender: TObject);
5075 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5076 case GikoSys.Setting.ListWidthState of
5077 glsMax, glsNormal: begin
5078 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5079 if GikoSys.Setting.ListWidthState = glsNormal then
5080 FBrowserSizeWidth := ViewPanel.Width;
5081 ViewPanel.Width := ThreadMainPanel.Width - 80;
5082 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5083 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5084 GikoSys.Setting.ListWidthState := glsMin;
5087 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
5088 ViewPanel.Width := FBrowserSizeWidth;
5089 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5090 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5091 GikoSys.Setting.ListWidthState := glsNormal;
5095 case GikoSys.Setting.ListHeightState of
5096 glsMax, glsNormal: begin
5097 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5098 if GikoSys.Setting.ListHeightState = glsNormal then
5099 FBrowserSizeHeight := ViewPanel.Height;
5100 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
5101 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5102 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5103 GikoSys.Setting.ListHeightState := glsMin;
5106 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
5107 ViewPanel.Height := FBrowserSizeHeight;
5108 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5109 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5110 GikoSys.Setting.ListHeightState := glsNormal;
5116 procedure TGikoForm.ScrollTopActionExecute(Sender: TObject);
5118 BrowserMovement('top');
5121 procedure TGikoForm.ScrollLastActionExecute(Sender: TObject);
5123 BrowserMovement('bottom');
5126 procedure TGikoForm.ScrollNewActionExecute(Sender: TObject);
5128 BrowserMovement('new');
5131 procedure TGikoForm.ScrollKokoActionExecute(Sender: TObject);
5133 BrowserMovement('koko');
5136 procedure TGikoForm.EditorActionExecute(Sender: TObject);
5138 Editor: TEditorForm;
5141 Item := GetActiveContent;
5142 if Item = nil then Exit;
5143 Editor := TEditorForm.Create(Self);
5144 Editor.SetThreadItem(Item);
5145 GikoSys.LoadEditorKeySetting(Editor.ActionList);
5147 Editor.BodyEdit.SetFocus;
5150 procedure TGikoForm.IEActionExecute(Sender: TObject);
5152 ShowThreadAction.Execute;
5155 procedure TGikoForm.ShowThreadActionExecute(Sender: TObject);
5157 ThreadItem: TThreadItem;
5159 ThreadItem := GetActiveContent;
5160 if ThreadItem = nil then Exit;
5161 GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
5164 procedure TGikoForm.ShowBoardActionExecute(Sender: TObject);
5166 ThreadItem: TThreadItem;
5168 ThreadItem := GetActiveContent;
5169 if ThreadItem = nil then Exit;
5170 GikoSys.OpenBrowser(ThreadItem.ParentBoard.URL, gbtAuto);
5173 //(Thread)URL
\82ð
\83R
\83s
\81[
5174 procedure TGikoForm.URLCopyActionExecute(Sender: TObject);
5179 if TObject(GetActiveContent) is TBoard then
5180 s := s + TBoard(GetActiveContent).URL + #13#10
5181 else if TObject(GetActiveContent) is TThreadItem then
5182 s := s + TThreadItem(GetActiveContent).URL + #13#10;
5184 Clipboard.AsText := s;
5187 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ð
\83R
\83s
\81[
5188 procedure TGikoForm.NameCopyActionExecute(Sender: TObject);
5193 if TObject(GetActiveContent) is TBoard then
5194 s := s + TBoard(GetActiveContent).Title + #13#10
5195 else if TObject(GetActiveContent) is TThreadItem then
5196 s := s + TThreadItem(GetActiveContent).Title + #13#10;
5198 Clipboard.AsText := s;
5201 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ÆURL
\82ð
\83R
\83s
\81[
5202 procedure TGikoForm.NameURLCopyActionExecute(Sender: TObject);
5207 if TObject(GetActiveContent) is TBoard then
5208 s := s + TBoard(GetActiveContent).Title + #13#10 + TBoard(GetActiveContent).URL + #13#10
5209 else if TObject(GetActiveContent) is TThreadItem then
5210 s := s + TThreadItem(GetActiveContent).Title + #13#10 + TThreadItem(GetActiveContent).URL + #13#10;
5212 Clipboard.AsText := s;
5215 procedure TGikoForm.ItemReloadActionExecute(Sender: TObject);
5217 ThreadItem: TThreadItem;
5220 ThreadItem := GetActiveContent;
5221 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5222 if ThreadItem <> nil then
5223 DownloadContent(ThreadItem, shiftDown);
5226 procedure TGikoForm.SelectListReloadActionExecute(Sender: TObject);
5233 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5234 if GetActiveList is TCategory then begin
5235 List := TList.Create;
5237 SelectListItem(List);
5238 if List.Count > 5 then begin
5239 msg := '5
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
5240 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
5241 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
5244 for i := 0 to List.Count - 1 do begin
5245 if TObject(List[i]) is TBoard then
5246 DownloadList(TBoard(List[i]), shiftDown);
5251 end else if GetActiveList is TBoard then begin
5252 DownloadList(TBoard(GetActiveList), shiftDown);
5256 procedure TGikoForm.SelectThreadReloadActionExecute(Sender: TObject);
5263 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5264 List := TList.Create;
5266 SelectListItem(List);
5267 if List.Count > 10 then begin
5268 msg := '10
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
5269 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
5270 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
5273 for i := 0 to List.Count - 1 do begin
5274 if TObject(List[i]) is TThreadItem then
5275 DownloadContent(TThreadItem(List[i]), shiftDown);
5282 procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);
5284 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
5285 SelectListReloadAction.Enabled := True
5286 else if GetActiveList is TBoard then
5287 SelectListReloadAction.Enabled := True
5289 SelectListReloadAction.Enabled := False;
5292 procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);
5294 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5295 SelectThreadReloadAction.Enabled := True
5297 SelectThreadReloadAction.Enabled := False;
5300 procedure TGikoForm.AllItemActionUpdate(Sender: TObject);
5302 AllItemAction.Enabled := (GetActiveList is TBoard);
5305 procedure TGikoForm.LogItemActionUpdate(Sender: TObject);
5307 LogItemAction.Enabled := (GetActiveList is TBoard);
5310 procedure TGikoForm.NewItemActionUpdate(Sender: TObject);
5312 NewItemAction.Enabled := (GetActiveList is TBoard);
5315 procedure TGikoForm.SelectItemActionUpdate(Sender: TObject);
5317 SelectItemAction.Enabled := (GetActiveList is TBoard);
5320 procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
5322 UpFolderAction.Enabled := not (GetActiveList is TBBS);
5325 procedure TGikoForm.ThreadEditorActionUpdate(Sender: TObject);
5327 ThreadEditorAction.Enabled := (GetActiveList is TBoard);
5330 procedure TGikoForm.FormResize(Sender: TObject);
5334 MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
5335 MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
5337 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5338 if GikoSys.Setting.ListWidthState = glsMin then begin
5339 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5340 ViewPanel.Width := ThreadMainPanel.Width - 80;
5343 if GikoSys.Setting.ListHeightState = glsMin then begin
5344 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5345 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
5349 if FIsMinimize = mtMinimized then begin
5350 if FActiveContent <> nil then begin
5351 //Application.ProcessMessages;
5352 doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
5353 doc.Body.ScrollTop := FActiveContent.Thread.ScrollTop;
5354 FIsMinimize := mtNone;
5358 FIsIgnoreResize := True;
5359 PostMessage( Handle, USER_RESIZED, 0, 0 );
5362 procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject);
5364 ScrollTopAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5367 procedure TGikoForm.ScrollLastActionUpdate(Sender: TObject);
5369 ScrollLastAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5372 procedure TGikoForm.ScrollNewActionUpdate(Sender: TObject);
5374 ScrollNewAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5377 procedure TGikoForm.ScrollKokoActionUpdate(Sender: TObject);
5379 ScrollKokoAction.Enabled := (GetActiveContent <> nil)
5380 and (GetActiveContent.IsLogFile)
5381 and (GetActiveContent.Kokomade <> -1);
5385 procedure TGikoForm.EditorActionUpdate(Sender: TObject);
5387 EditorAction.Enabled := GetActiveContent <> nil;
5390 procedure TGikoForm.IEActionUpdate(Sender: TObject);
5392 IEAction.Enabled := GetActiveContent <> nil;
5395 procedure TGikoForm.ShowThreadActionUpdate(Sender: TObject);
5397 ShowThreadAction.Enabled := GetActiveContent <> nil;
5400 procedure TGikoForm.ShowBoardActionUpdate(Sender: TObject);
5402 ShowBoardAction.Enabled := GetActiveContent <> nil;
5405 procedure TGikoForm.ItemReloadActionUpdate(Sender: TObject);
5407 ItemReloadAction.Enabled := GetActiveContent <> nil;
5410 procedure TGikoForm.URLCopyActionUpdate(Sender: TObject);
5412 URLCopyAction.Enabled := GetActiveContent <> nil;
5415 procedure TGikoForm.NameCopyActionUpdate(Sender: TObject);
5417 NameCopyAction.Enabled := GetActiveContent <> nil;
5420 procedure TGikoForm.NameURLCopyActionUpdate(Sender: TObject);
5422 NameURLCopyAction.Enabled := GetActiveContent <> nil;
5425 procedure TGikoForm.BrowserTabCloseActionUpdate(Sender: TObject);
5427 BrowserTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 0);
5430 procedure TGikoForm.NotSelectTabCloseActionUpdate(Sender: TObject);
5432 NotSelectTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 1);
5435 procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
5437 AllTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 0);
5440 procedure TGikoForm.ActiveLogDeleteActionUpdate(Sender: TObject);
5442 ActiveLogDeleteAction.Enabled := GetActiveContent <> nil;
5445 procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
5447 DEL_MSG = '
\81g^0
\81h
\82Ì
\83\8d\83O
\82ð
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
5448 DEL_SAME_MSG = '
\82±
\82ê
\82ç ^0
\8cÂ
\82Ì
\83X
\83\8c\83b
\83h
\82Ì
\83\8d\83O
\82ð
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
5449 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
5451 ThreadItem: TThreadItem;
5452 TmpListItem: TListItem;
5456 List := TList.Create;
5458 TmpListItem := ListView.Selected;
5459 while TmpListItem <> nil do begin
5460 if TObject(TmpListItem.Data) is TThreadItem then begin
5461 ThreadItem := TThreadItem(TmpListItem.Data);
5462 if ThreadItem.IsLogFile then
5463 List.Add(ThreadItem);
5465 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
5468 if GikoSys.Setting.DeleteMsg and (List.Count > 0) then begin
5469 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
5470 if List.Count = 1 then begin
5471 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
5474 if MsgBox(Handle, StringReplace( DEL_SAME_MSG, '^0', IntToStr( List.Count ), [rfReplaceAll] ), DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> IDYES then
5480 for i := 0 to List.Count - 1 do begin
5481 ThreadItem := TThreadItem(List[i]);
5482 DeleteHistory(ThreadItem);
5483 DeleteTab(ThreadItem);
5484 ThreadItem.DeleteLogFile;
5491 procedure TGikoForm.DeleteTab(BrowserRecord: TBrowserRecord);
5496 idx := BrowserTab.TabIndex;
5497 FTabHintIndex := -1;
5498 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5499 if TBrowserRecord(BrowserTab.Tabs.Objects[i]) = BrowserRecord then begin
5500 BrowserTab.Tabs.BeginUpdate;
5502 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5503 doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
5504 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
5507 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
5509 if( FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i]) ) then
5510 FActiveContent := nil;
5511 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5512 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
5514 FBrowsers.Move(j, BROWSER_COUNT - 1);
5516 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5517 BrowserTab.Tabs.Delete(i);
5518 if idx > i then begin
5519 BrowserTab.TabIndex := idx - 1;
5521 if BrowserTab.Tabs.Count -1 >= idx then
5522 BrowserTab.TabIndex := idx
5524 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5526 if BrowserTab.Tabs.Count = 0 then begin
5527 BrowserNullTab.Thread := nil;
5529 if(BrowserTab.TabIndex <> -1) and
5530 ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
5531 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
5532 if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
5533 = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
5535 TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser := nil;
5536 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
5537 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
5538 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
5543 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
5544 := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
5545 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
5546 FBrowsers.Move(BROWSER_COUNT - 1, 0);
5548 BrowserTab.Tabs.EndUpdate;
5549 if( FActiveContent = nil) then
5550 BrowserTab.OnChange(nil);
5555 procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
5560 idx := BrowserTab.TabIndex;
5561 FTabHintIndex := -1;
5562 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5563 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
5564 BrowserTab.Tabs.BeginUpdate;
5566 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5567 doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
5568 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
5572 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
5574 if(FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i])) then
5575 FActiveContent := nil;
5576 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5577 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
5579 FBrowsers.Move(j, BROWSER_COUNT - 1);
5581 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5582 BrowserTab.Tabs.Delete(i);
5583 if idx > i then begin
5584 BrowserTab.TabIndex := idx - 1;
5586 if BrowserTab.Tabs.Count -1 >= idx then
5587 BrowserTab.TabIndex := idx
5589 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5591 if(BrowserTab.TabIndex <> -1) and
5592 ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
5593 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
5594 if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
5595 = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
5597 TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser := nil;
5598 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
5599 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
5600 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
5605 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
5606 := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
5607 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
5608 FBrowsers.Move(BROWSER_COUNT - 1, 0);
5611 BrowserTab.Tabs.EndUpdate;
5612 if( FActiveContent = nil) then
5613 BrowserTab.OnChange(nil);
5619 procedure TGikoForm.KokomadeActionExecute(Sender: TObject);
5622 ThreadItem: TThreadItem;
5624 No := KokoPopupMenu.Tag;
5625 if No = 0 then Exit;
5626 ThreadItem := GetActiveContent;
5627 if ThreadItem = nil then Exit;
5628 ThreadItem.Kokomade := No;
5629 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
5630 FActiveContent.FRepaint := true;
5631 InsertBrowserTab(FActiveContent.Thread, true);
5632 Application.ProcessMessages;
5635 procedure TGikoForm.ZenbuActionExecute(Sender: TObject);
5637 ThreadItem: TThreadItem;
5639 ThreadItem := GetActiveContent;
5640 if ThreadItem = nil then Exit;
5641 ThreadItem.Kokomade := -1;
5642 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
5643 FActiveContent.FRepaint := true;
5644 InsertBrowserTab(FActiveContent.Thread, true);
5645 Application.ProcessMessages;
5648 function TGikoForm.Hook(var Message: TMessage): Boolean;
5657 procedure TGikoForm.KokoResActionExecute(Sender: TObject);
5659 Editor: TEditorForm;
5663 Number := KokoPopupMenu.Tag;
5664 if Number = 0 then Exit;
5665 Item := GetActiveContent;
5666 if Item = nil then Exit;
5668 Editor := TEditorForm.Create(Self);
5669 Editor.SetThreadItem(Item);
5670 Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
5672 Editor.BodyEdit.SetFocus;
5675 procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
5677 ItemRoundPMenu.Visible := (GetActiveList is TBoard);
5678 ItemReservPMenu.Visible := (GetActiveList is TBoard);
5679 LPMSep01.Visible := (GetActiveList is TBoard);
5680 ListRoundPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5681 ListReservPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5682 LPMSep02.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5683 KidokuPMenu.Visible := (GetActiveList is TBoard);
5684 MidokuPMenu.Visible := (GetActiveList is TBoard);
5685 UrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5686 NameUrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5687 AllSelectPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5688 LPMSep05.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5689 DeletePMenu.Visible := (GetActiveList is TBoard);
5690 LPMSep06.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5691 BoardFavoriteAddMenu.Visible := (GetActiveList is TCategory);
5692 ThreadFavoriteAddMenu.Visible := (GetActiveList is TBoard);
5694 AddRoundNameMenu(ItemReservPMenu);
5695 AddRoundNameMenu(ListReservPMenu);
5698 procedure TGikoForm.BoardIEActionExecute(Sender: TObject);
5702 if GetActiveList is TBoard then begin
5703 URL := TBoard(GetActiveList).URL;
5704 GikoSys.OpenBrowser(URL, gbtAuto);
5708 procedure TGikoForm.SelectItemURLCopyActionExecute(Sender: TObject);
5715 List := TList.Create;
5717 SelectListItem(List);
5718 for i := 0 to List.Count - 1 do begin
5719 if TObject(List[i]) is TBoard then
5720 s := s + TBoard(List[i]).URL + #13#10
5721 else if TObject(List[i]) is TThreadItem then
5722 s := s + TThreadItem(List[i]).URL + #13#10;
5725 Clipboard.AsText := s;
5731 procedure TGikoForm.SelectItemNameCopyActionExecute(Sender: TObject);
5738 List := TList.Create;
5740 SelectListItem(List);
5741 for i := 0 to List.Count - 1 do begin
5742 if TObject(List[i]) is TBoard then
5743 s := s + TBoard(List[i]).Title + #13#10
5744 else if TObject(List[i]) is TThreadItem then
5745 s := s + TThreadItem(List[i]).Title + #13#10;
5748 Clipboard.AsText := s;
5754 procedure TGikoForm.SelectItemNameURLCopyActionExecute(Sender: TObject);
5761 List := TList.Create;
5763 SelectListItem(List);
5764 for i := 0 to List.Count - 1 do begin
5765 if TObject(List[i]) is TBoard then
5766 s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10
5767 else if TObject(List[i]) is TThreadItem then
5768 s := s + TThreadItem(List[i]).Title + #13#10 + TThreadItem(List[i]).URL + #13#10;
5771 Clipboard.AsText := s;
5777 procedure TGikoForm.BoardIEActionUpdate(Sender: TObject);
5779 if GetActiveList is TBoard then
5780 BoardIEAction.Enabled := True
5782 BoardIEAction.Enabled := False;
5785 procedure TGikoForm.SelectItemURLCopyActionUpdate(Sender: TObject);
5787 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5788 SelectItemURLCopyAction.Enabled := True
5790 SelectItemURLCopyAction.Enabled := False;
5793 procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
5795 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5796 SelectItemNameCopyAction.Enabled := True
5798 SelectItemNameCopyAction.Enabled := False;
5801 procedure TGikoForm.SelectItemNameURLCopyActionUpdate(Sender: TObject);
5803 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5804 SelectItemNameURLCopyAction.Enabled := True
5806 SelectItemNameURLCopyAction.Enabled := False;
5809 procedure TGikoForm.AllSelectActionUpdate(Sender: TObject);
5811 if ListView.SelCount > 0 then
5812 AllSelectAction.Enabled := True
5814 AllSelectAction.Enabled := False;
5817 procedure TGikoForm.LogDeleteActionUpdate(Sender: TObject);
5819 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5820 LogDeleteAction.Enabled := True
5822 LogDeleteAction.Enabled := False;
5825 procedure TGikoForm.BrowserTabCloseActionExecute(Sender: TObject);
5828 // ThreadItem: TThreadItem;
5830 idx := BrowserTab.TabIndex;
5831 if idx <> -1 then begin
5832 if BrowserTab.Tabs.Objects[idx] <> nil then begin
5833 //ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5834 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
5839 procedure TGikoForm.NotSelectTabCloseActionExecute(Sender: TObject);
5844 idx := BrowserTab.TabIndex;
5845 if idx = -1 then Exit;
5846 BrowserTab.Tabs.BeginUpdate;
5847 for i := BrowserTab.Tabs.Count - 1 downto BrowserTab.TabIndex + 1 do begin
5848 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5849 BrowserTab.Tabs.Delete(i);
5851 if idx > 0 then begin
5852 for i := BrowserTab.TabIndex - 1 downto 0 do begin
5853 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5854 BrowserTab.Tabs.Delete(i);
5857 BrowserTab.Tabs.EndUpdate;
5860 procedure TGikoForm.AllTabCloseActionExecute(Sender: TObject);
5864 if GikoSys.Setting.ShowDialogForAllTabClose then
5865 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
5868 FActiveContent := nil;
5869 BrowserNullTab.Thread := nil;
5870 BrowserTab.OnChange := nil;
5871 BrowserTab.Tabs.BeginUpdate;
5872 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
5873 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5875 BrowserTab.Tabs.Clear;
5876 BrowserTab.Tabs.EndUpdate;
5877 BrowserTab.OnChange := BrowserTabChange;
5878 SetContent(BrowserNullTab);
5879 Self.Caption := CAPTION_NAME ;
5882 procedure TGikoForm.TreeSelectBoradReloadExecute(Sender: TObject);
5885 TmpTreeNode: TTreeNode;
5887 TmpTreeNode := FClickNode;
5888 TreeView.Selected := FClickNode;
5891 if TObject(TmpTreeNode.Data) is TBoard then
5892 Board := TBoard(TmpTreeNode.Data)
5893 else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then
5894 Board := TFavoriteBoardItem(TmpTreeNode.Data).Item;
5896 if Board <> nil then
5897 DownloadList(Board);
5900 procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject);
5902 ThreadItem: TThreadItem;
5903 TmpTreeNode: TTreeNode;
5905 TmpTreeNode := FClickNode;
5906 TreeView.Selected := FClickNode;
5909 if TObject(TmpTreeNode.Data) is TThreadItem then
5910 ThreadItem := TThreadItem(TmpTreeNode.Data)
5911 else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then
5912 ThreadItem := TFavoriteThreadItem(TmpTreeNode.Data).Item;
5914 if ThreadItem <> nil then
5915 DownloadContent(ThreadItem);
5918 procedure TGikoForm.TreeSelectURLCopyExecute(Sender: TObject);
5920 TmpTreeNode: TTreeNode;
5923 TmpTreeNode := FClickNode;
5924 TreeView.Selected := FClickNode;
5925 if TObject(TmpTreeNode.Data) is TBoard then begin
5926 s := TBoard(TmpTreeNode.Data).URL + #13#10;
5927 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5928 s := TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5929 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5930 s := TThreadItem(TmpTreeNode.Data).URL + #13#10;
5931 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5932 s := TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5934 Clipboard.AsText := s;
5937 procedure TGikoForm.TreeSelectNameURLCopyExecute(Sender: TObject);
5939 TmpTreeNode: TTreeNode;
5942 TmpTreeNode := FClickNode;
5943 TreeView.Selected := FClickNode;
5944 if TObject(TmpTreeNode.Data) is TBoard then begin
5945 s := TBoard(TmpTreeNode.Data).Title + #13#10 + TBoard(TmpTreeNode.Data).URL + #13#10;
5946 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5947 s := TFavoriteBoardItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5948 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5949 s := TThreadItem(TmpTreeNode.Data).Title + #13#10 + TThreadItem(TmpTreeNode.Data).URL + #13#10;
5950 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5951 s := TFavoriteThreadItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5953 Clipboard.AsText := s;
5956 procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
5958 FClickNode := TreeView.Selected;
5959 if FClickNode = nil then begin
5960 TreeSelectThreadPupupMenu.Visible := False;
5961 TreeSelectBoardPupupMenu.Visible := False;
5962 TPMSep01.Visible := False;
5963 TreeSelectURLPupupMenu.Visible := False;
5964 TreeSelectNamePupupMenu.Visible := False;
5965 TreeSelectNameURLPupupMenu.Visible := False;
5966 TreeSelectFavoriteAddPupupMenu.Visible := False;
5967 TreeSelectLogDeleteSeparator.Visible := False;
5968 TreeSelectLogDeletePopupMenu.Visible := False;
5969 end else if TObject(FClickNode.Data) is TBoard then begin
5970 TreeSelectThreadPupupMenu.Visible := False;
5971 TreeSelectBoardPupupMenu.Visible := True;
5972 TPMSep01.Visible := True;
5973 TreeSelectURLPupupMenu.Visible := True;
5974 TreeSelectNamePupupMenu.Visible := True;
5975 TreeSelectNameURLPupupMenu.Visible := True;
5976 TreeSelectFavoriteAddPupupMenu.Visible := True;
5977 TreeSelectLogDeleteSeparator.Visible := False;
5978 TreeSelectLogDeletePopupMenu.Visible := False;
5979 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
5980 TreeSelectThreadPupupMenu.Visible := False;
5981 TreeSelectBoardPupupMenu.Visible := True;
5982 TPMSep01.Visible := True;
5983 TreeSelectURLPupupMenu.Visible := True;
5984 TreeSelectNamePupupMenu.Visible := True;
5985 TreeSelectNameURLPupupMenu.Visible := True;
5986 TreeSelectFavoriteAddPupupMenu.Visible := True;
5987 TreeSelectLogDeleteSeparator.Visible := False;
5988 TreeSelectLogDeletePopupMenu.Visible := False;
5989 end else if (TObject(FClickNode.Data) is TThreadItem) then begin
5990 TreeSelectThreadPupupMenu.Visible := True;
5991 TreeSelectBoardPupupMenu.Visible := False;
5992 TPMSep01.Visible := True;
5993 TreeSelectURLPupupMenu.Visible := True;
5994 TreeSelectNamePupupMenu.Visible := True;
5995 TreeSelectNameURLPupupMenu.Visible := True;
5996 TreeSelectFavoriteAddPupupMenu.Visible := True;
5997 TreeSelectLogDeleteSeparator.Visible := True;
5998 TreeSelectLogDeletePopupMenu.Visible := True;
5999 end else if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
6000 TreeSelectThreadPupupMenu.Visible := True;
6001 TreeSelectBoardPupupMenu.Visible := False;
6002 TPMSep01.Visible := True;
6003 TreeSelectURLPupupMenu.Visible := True;
6004 TreeSelectNamePupupMenu.Visible := True;
6005 TreeSelectNameURLPupupMenu.Visible := True;
6006 TreeSelectFavoriteAddPupupMenu.Visible := True;
6007 TreeSelectLogDeleteSeparator.Visible := True;
6008 TreeSelectLogDeletePopupMenu.Visible := True;
6009 end else if (TObject(FClickNode.Data) is TCategory) then begin
6010 TreeSelectThreadPupupMenu.Visible := False;
6011 TreeSelectBoardPupupMenu.Visible := False;
6012 TPMSep01.Visible := False;
6013 TreeSelectURLPupupMenu.Visible := False;
6014 TreeSelectNamePupupMenu.Visible := True;
6015 TreeSelectNameURLPupupMenu.Visible := False;
6016 TreeSelectFavoriteAddPupupMenu.Visible := False;
6017 TreeSelectLogDeleteSeparator.Visible := False;
6018 TreeSelectLogDeletePopupMenu.Visible := False;
6019 end else if FClickNode.IsFirstNode then begin
6020 TreeSelectThreadPupupMenu.Visible := False;
6021 TreeSelectBoardPupupMenu.Visible := False;
6022 TPMSep01.Visible := False;
6023 TreeSelectURLPupupMenu.Visible := False;
6024 TreeSelectNamePupupMenu.Visible := True;
6025 TreeSelectNameURLPupupMenu.Visible := False;
6026 TreeSelectFavoriteAddPupupMenu.Visible := False;
6027 TreeSelectLogDeleteSeparator.Visible := False;
6028 TreeSelectLogDeletePopupMenu.Visible := False;
6030 TreeSelectThreadPupupMenu.Visible := False;
6031 TreeSelectBoardPupupMenu.Visible := False;
6032 TPMSep01.Visible := False;
6033 TreeSelectURLPupupMenu.Visible := False;
6034 TreeSelectNamePupupMenu.Visible := False;
6035 TreeSelectNameURLPupupMenu.Visible := False;
6036 TreeSelectFavoriteAddPupupMenu.Visible := False;
6037 TreeSelectLogDeleteSeparator.Visible := False;
6038 TreeSelectLogDeletePopupMenu.Visible := False;
6042 procedure TGikoForm.BrowserNewWindow2(Sender: TObject;
6043 var ppDisp: IDispatch; var Cancel: WordBool);
6054 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
6055 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
6056 Html := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
6057 if(AnsiPos('>>', Text) = 1) or (AnsiPos('>', Text) = 1)
6058 or (AnsiPos('
\81\84\81\84', Text) = 1) or (AnsiPos('
\81\84', Text) = 1) then begin
6059 if GikoSys.Setting.ResAnchorJamp then begin
6060 Text := ZenToHan(Text);
6062 if(AnsiPos('>>', Text) = 1) then begin
6063 Text := Copy(Text, 3, Length(Text) - 2);
6065 Text := Copy(Text, 2, Length(Text) - 1);
6067 if AnsiPos('-', Text) <> 0 then begin
6068 wkIntSt := StrToIntDef(Copy(Text, 1, AnsiPos('-', Text) - 1), 0);
6069 Text := Copy(Text, AnsiPos('-', Text) + 1, Length(Text));
6070 wkIntTo := StrToIntDef(Text, 0);
6071 if wkIntTo < wkIntSt then
6074 wkIntSt := StrToIntDef(Text, 0);
6076 if wkIntSt <> 0 then
6077 BrowserMovement(IntToStr(wkIntSt));
6080 URL := GikoSys.GetHRefText(Html);
6081 URL := GikoSys.HTMLDecode(URL);
6082 if( AnsiPos('http://', URL) = 1) or (AnsiPos('https://', URL) = 1) or
6083 ( AnsiPos('ftp://', URL) = 1) then begin
6084 //
\83A
\83h
\83\8c\83X
\83o
\81[
\82Ì
\97\9a\97ð
6085 if GikoSys.Setting.LinkAddAddressBar then begin
6086 idx := AddressComboBox.Items.IndexOf(URL);
6087 if idx = -1 then begin
6088 AddressComboBox.Items.Insert(0, URL);
6089 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
6090 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
6092 AddressComboBox.Items.Delete(idx);
6093 AddressComboBox.Items.Insert(0, URL);
6101 { ShiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
6102 CtrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
6105 Memo1.Lines.Add('ShiftDown');
6107 Memo1.Lines.Add('CtrlDown');
6109 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
6110 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
6111 Url := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
6115 URL := GetHRefText(URL);
6117 ParseURI(URL, Protocol, Host, path, Document, Port, Bookmark);
6119 b := Parse2chURL(path, document, bbs, num);
6120 memo1.Lines.Add('bbs: ' + bbs);
6121 memo1.Lines.Add('key: ' + num);
6123 Memo1.Lines.Add('Parse2chURL: True')
6125 Memo1.Lines.Add('Parse2chURL: False');
6127 // AppPath := 'C:\Borland\Projects\Test\TestBrowser\TestBrowser.exe';
6132 procedure TGikoForm.ListSplitterCanResize(Sender: TObject;
6133 var NewSize: Integer; var Accept: Boolean);
6135 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6136 if ViewPanel.Width < 2 then begin
6137 ViewPanel.Width := 1;
6138 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6139 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6140 GikoSys.Setting.ListWidthState := glsMax;
6141 end else if ViewPanel.Width > (ThreadMainPanel.Width - 80) then begin
6142 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6143 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6144 GikoSys.Setting.ListWidthState := glsMin;
6146 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6147 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6148 GikoSys.Setting.ListWidthState := glsNormal;
6151 if ViewPanel.Height < 2 then begin
6152 ViewPanel.Height := 1;
6153 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6154 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6155 GikoSys.Setting.ListHeightState := glsMax;
6156 end else if ViewPanel.Height > (ThreadMainPanel.Height - BrowserCoolBar.Height - 7) then begin
6157 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6158 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6159 GikoSys.Setting.ListHeightState := glsMin;
6161 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6162 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6163 GikoSys.Setting.ListHeightState := glsNormal;
6168 procedure TGikoForm.ListSplitterMoved(Sender: TObject);
6170 if Mouse.Capture <> 0 then
6172 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6173 if (ViewPanel.Width > 1) and (ViewPanel.Width <= (ThreadMainPanel.Width - 80)) then
6174 FBrowserSizeWidth := ViewPanel.Width;
6176 if (ViewPanel.Height > 1) and (ViewPanel.Height <= (ThreadMainPanel.Height - BrowserCoolBar.Height)) then
6177 FBrowserSizeHeight := ViewPanel.Height;
6179 { if (Mouse.Capture = 0) and (ViewPanel.Height > 1) and (not ArrangeAction.Checked) then
6180 FBrowserSizeHeight := ViewPanel.Height
6181 else if (Mouse.Capture = 0) and (ViewPanel.Width > 1) and (ArrangeAction.Checked) then
6182 FBrowserSizeWidth := ViewPanel.Width;}
6185 procedure TGikoForm.BrowserTabChange(Sender: TObject);
6191 // if NewTab = -1 then
6192 // ThreadItem := nil;
6193 if not BrowserTab.Dragging then begin
6194 FTabHintIndex := -1;
6195 BrowserTab.Hint := '';
6196 idx := BrowserTab.TabIndex;
6197 if idx = -1 then begin
6198 BrowserNullTab.Thread := nil;
6199 SetContent(BrowserNullTab);
6201 end else if(BrowserTab.Tabs.Objects[idx] <> nil) and (BrowserTab.Tabs.Objects[idx] is TBrowserRecord) then begin
6202 if TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser <> nil then begin
6203 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser);
6205 FBrowsers.Move(j ,0);
6207 if( FActiveContent <> nil ) and (FActiveContent.Browser <> nil) and
6208 (FActiveContent.Browser <> BrowserNullTab.Browser) and
6209 (FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1])) then
6210 FBrowsers.Move(BROWSER_COUNT - 1, 0);
6212 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
6213 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
6214 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser := nil;
6215 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
6216 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent <> nil then begin
6217 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent.Free;
6218 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent := nil;
6222 TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
6223 TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Repaint := true;
6224 FBrowsers.Move(BROWSER_COUNT - 1, 0);
6226 TOleControl(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser).BringToFront;
6227 // GikoSys.OnlyAHundredRes := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
6228 // OnlyAHundredRes.Checked := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
6229 SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6231 if (GikoSys.Setting.URLDisplay) and (GetActiveContent <> nil) then
6232 AddressComboBox.Text := GetActiveContent.URL;
6234 if ((TreeView.Visible) and (TreeView.Focused)) or ((FavoriteTreeView.Visible) and (FavoriteTreeView.Focused)) or
6235 (ListView.Focused) or (SelectComboBox.Focused) or (AddressComboBox.Focused)
6238 SetFocusForBrowserAction.Execute;
6247 procedure TGikoForm.BrowserTabMouseDown(Sender: TObject;
6248 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
6254 if Button = mbMiddle then begin
6255 //
\83}
\83E
\83X
\92\86\83{
\83^
\83\93
6258 p := BrowserTab.ScreenToClient(p);
6259 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
6261 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6262 //end else if Button = mbRight then begin
6263 //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é
6264 //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
6265 { //
\83}
\83E
\83X
\89E
\83{
\83^
\83\93
6268 // GetCursorPos(p2);
6269 p := BrowserTab.ScreenToClient(p);
6270 // idx := BrowserTab.ItemAtPos(p);
6271 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
6272 if idx <> -1 then begin
6273 OldIndex := BrowserTab.TabIndex;
6274 BrowserTab.TabIndex := idx;
6275 if OldIndex <> idx then
6276 BrowserTab.OnChange(nil);
6277 BrowserTabPopupMenu.Tag := idx;
6278 BrowserTabPopupMenu.Popup(p2.X, p2.Y);
6281 end else if BUtton = mbLeft then begin
6282 FDragWFirst := true;
6283 FMouseDownPos.X := X;
6284 FMouseDownPos.Y := Y;
6289 procedure TGikoForm.SetBrowserTabState;
6292 CoolBand: TCoolBand;
6294 BrowserBottomPanel.AutoSize := False;
6295 if GikoSys.Setting.BrowserTabVisible then begin
6296 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
6297 BrowserTab.Style := tsTabs;
6298 if GikoSys.Setting.BrowserTabPosition = gtpTop then
6299 BrowserTab.TabPosition := tpTop
6301 BrowserTab.TabPosition := tpBottom;
6302 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
6303 BrowserTab.TabPosition := tpTop;
6304 BrowserTab.Style := tsButtons;
6306 BrowserTab.TabPosition := tpTop;
6307 BrowserTab.Style := tsFlatButtons
6310 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
6311 BrowserTab.Parent := BrowserTabToolBar;
6312 BrowserBottomPanel.Hide;
6313 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6314 if CoolBand <> nil then
6315 CoolBand.Visible := True;
6316 // BrowserTab.Parent := BrowserTopPanel;
6317 // BrowserTab.Parent := BrowserCoolBar;
6318 // BrowserTab.Top := 26;
6319 // BrowserTopPanel.Height := 44;
6322 BrowserTab.Parent := BrowserBottomPanel;
6323 BrowserTab.Top := 0;
6324 BrowserTab.Left := 0;
6325 BrowserBottomPanel.Show;
6326 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6327 if CoolBand <> nil then
6328 CoolBand.Visible := False;
6329 // BrowserTopPanel.Height := 26;
6333 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6334 if CoolBand <> nil then
6335 CoolBand.Visible := False;
6336 BrowserBottomPanel.Visible := False;
6337 // BrowserTab.Visible := False;
6338 // BrowserTopPanel.Height := 26;
6339 AllTabCloseAction.Execute;
6343 procedure TGikoForm.BrowserTabDragOver(Sender, Source: TObject; X,
6344 Y: Integer; State: TDragState; var Accept: Boolean);
6348 idx := BrowserTab.IndexOfTabAt(X, Y);
6349 Accept := (Source = BrowserTab) and (BrowserTab.TabIndex <> idx);
6352 procedure TGikoForm.BrowserTabDragDrop(Sender, Source: TObject; X,
6357 idx := BrowserTab.IndexOfTabAt(X, Y);
6359 BrowserTab.Tabs.Move(BrowserTab.TabIndex, idx);
6362 procedure TGikoForm.BrowserTabMouseMove(Sender: TObject;
6363 Shift: TShiftState; X, Y: Integer);
6366 ThreadItem: TThreadItem;
6369 TabIdx := BrowserTab.IndexOfTabAt(x, y);
6371 if ( ssLeft in Shift ) and ( BrowserTab.Style = tsTabs ) then begin
6372 if FDragWFirst = false then begin
6373 FDragWFirst := true;
6375 BrowserTab.EndDrag(false);
6376 BrowserTab.BeginDrag(false, DandD_THRESHOLD);
6377 FDragWFirst := false;
6380 BrowserTab.EndDrag(false);
6381 FDragWFirst := false;
6384 if (FTabHintIndex <> TabIdx) and (TabIdx <> -1) then begin
6385 Application.CancelHint;
6386 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[TabIdx]).Thread;
6387 if ThreadItem.Title <> BrowserTab.Tabs[TabIdx] then begin
6388 BrowserTab.Hint := ThreadItem.Title;
6389 Application.ShowHint := True;
6391 BrowserTab.Hint := '';
6392 Application.ShowHint := True;
6394 FTabHintIndex := TabIdx;
6399 procedure TGikoForm.BrowserDocumentComplete(Sender: TObject;
6400 const pDisp: IDispatch; var URL: OleVariant);
6402 FDispHtmlDocument: DispHTMLDocument;
6403 BrowserRecord :TBrowserRecord;
6406 // AddMessageList('DocumentComplete', nil);
6407 if TObject(Sender) is TWebBrowser then begin
6408 if TWebBrowser(Sender) <> Browser then begin
6409 BrowserRecord := nil;
6410 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
6411 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(Sender) then begin
6412 BrowserRecord := TBrowserRecord(BrowserTab.Tabs.Objects[i]);
6416 if BrowserRecord <> nil then begin
6417 if BrowserRecord.FEvent <> nil then
6418 BrowserRecord.FEvent.Free;
6419 FDispHtmlDocument := Idispatch(OleVariant(BrowserRecord.Browser.ControlInterface).Document) as DispHTMLDocument;
6420 BrowserRecord.FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
6421 BrowserRecord.FEvent.OnContextMenu := OnDocumentContextMenu;
6422 BrowserRecord.FEvent.OnClick := WebBrowserClick; //
\92Ç
\89Á
\82µ
\82½OnClick
\83C
\83x
\83\93\83g
6425 if GetActiveContent <> nil then begin
6426 FDispHtmlDocument := Idispatch(OleVariant(Browser.ControlInterface).Document) as DispHTMLDocument;
6427 if FEvent <> nil then
6429 FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
6430 FEvent.OnContextMenu := OnDocumentContextMenu;
6431 FEvent.OnClick := WebBrowserClick; //
\92Ç
\89Á
\82µ
\82½OnClick
\83C
\83x
\83\93\83g
6437 procedure TGikoForm.SelectReservActionUpdate(Sender: TObject);
6442 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then begin
6443 List := TList.Create;
6445 SelectListItem(List);
6446 for i := 0 to List.Count - 1 do begin
6447 if TObject(List[i]) is TThreadItem then begin
6448 if TThreadItem(List[i]).IsLogFile then begin
6449 SelectReservAction.Enabled := True;
6454 SelectReservAction.Enabled := False;
6458 end else if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
6459 SelectReservAction.Enabled := True
6461 SelectReservAction.Enabled := False;
6464 procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
6466 AddRoundNameMenu(RoundNamePopupMenu.Items);
6469 procedure TGikoForm.AddRoundNameMenu(MenuItem: TMenuItem);
6475 Item := TMenuItem.Create(Self);
6476 Item.Caption := '
\90V
\82µ
\82¢
\96¼
\91O
\82Å
\8f\84\89ñ
\97\
\96ñ(&N)...';
6477 Item.OnClick := SelectNewRoundNameExecute;
6479 Item := TMenuItem.Create(Self);
6480 Item.Caption := '
\8f\84\89ñ
\83\8a\83X
\83g
\82©
\82ç
\8dí
\8f\9c(&D)';
6481 Item.OnClick := SelectDeleteRoundExecute;
6483 Item := TMenuItem.Create(Self);
6484 Item.Caption := '-';
6486 for i := 0 to RoundList.RoundNameList.Count - 1 do begin
6487 Item := TMenuItem.Create(Self);
6488 Item.Caption := RoundList.RoundNameList[i];
6489 Item.OnClick := SetSelectRoundName;
6494 procedure TGikoForm.SelectNewRoundNameExecute(Sender: TObject);
6497 Dlg: TRoundNameDialog;
6500 Dlg := TRoundNameDialog.Create(Self);
6503 if Dlg.ModalResult <> mrCancel then begin
6504 s := Trim(Dlg.RoundNameEdit.Text);
6505 RoundList.RoundNameList.Add(s);
6506 SetSelectItemRound(True, s, TMenuItem(Sender).Parent.Name);
6513 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string);
6515 threadItem : TThreadItem;
6517 if ParentName <> 'dummy1' then begin
6518 SetSelectItemRound(RoundFlag, RoundName);
6520 threadItem := GetActiveContent;
6521 if threadItem <> nil then begin
6522 threadItem.RoundName := RoundName;
6523 threadItem.Round := RoundFlag;
6528 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
6533 List := TList.Create;
6535 SelectListItem(List);
6536 for i := 0 to List.Count - 1 do begin
6537 if TObject(List[i]) is TBoard then begin
6538 TBoard(List[i]).RoundName := RoundName;
6539 TBoard(List[i]).Round := RoundFlag;
6540 end else if TObject(List[i]) is TThreadItem then begin
6541 if TThreadItem(List[i]).IsLogFile then begin
6542 TThreadItem(List[i]).RoundName := RoundName;
6543 TThreadItem(List[i]).Round := RoundFlag;
6552 procedure TGikoForm.SelectDeleteRoundExecute(Sender: TObject);
6554 SetSelectItemRound(False, '', TMenuItem(Sender).Parent.Name);
6558 procedure TGikoForm.SelectReservActionExecute(Sender: TObject);
6560 //
\82±
\82Ì
\83R
\83\81\83\93\83g
\8dí
\8f\9c\82µ
\82Ä
\82Í
\91Ê
\96Ú
6563 procedure TGikoForm.SetSelectRoundName(Sender: TObject);
6565 MenuItem: TMenuItem;
6567 if Sender is TMenuItem then begin
6568 MenuItem := TMenuItem(Sender);
6569 SetSelectItemRound(True, StripHotKey(MenuItem.Caption), TMenuItem(Sender).Parent.Name);
6574 procedure TGikoForm.NewBoardActionExecute(Sender: TObject);
6576 Dlg: TNewBoardDialog;
6580 for i := 0 to Screen.CustomFormCount - 1 do begin
6581 if TObject(Screen.CustomForms[i]) is TEditorForm then begin
6582 Msg := '
\83\8c\83X
\83G
\83f
\83B
\83^
\82ð
\91S
\82Ä
\95Â
\82¶
\82Ä
\82
\82¾
\82³
\82¢';
6583 MsgBox(Handle, Msg, '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
6587 Dlg := TNewBoardDialog.Create(Self);
6595 procedure TGikoForm.LoginActionExecute(Sender: TObject);
6600 if GikoSys.Dolib.Connected then begin
6601 //
\83\8d\83O
\83A
\83E
\83g
6602 GikoSys.Dolib.Disconnect;
6603 LoginAction.Checked := False;
6604 AddMessageList('
\83\8d\83O
\83A
\83E
\83g
\82µ
\82Ü
\82µ
\82½', nil, gmiOK);
6605 LoginAction.Caption := '
\83\8d\83O
\83C
\83\93(&L)';
6607 TmpCursor := Screen.Cursor;
6608 Screen.Cursor := crHourGlass;
6610 //
\92Ê
\8fí
\83\8d\83O
\83C
\83\93
6611 if not GikoSys.Setting.ForcedLogin then begin
6612 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6613 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6614 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6615 if GikoSys.Setting.ReadProxy then begin
6616 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6617 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6619 GikoSys.Dolib.ProxyAddress := '';
6620 GikoSys.Dolib.ProxyPort := 0;
6622 if GikoSys.Dolib.Connect then begin
6623 LoginAction.Checked := True;
6624 AddMessageList('
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6625 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6626 LoginToolButton.Style := tbsCheck;
6628 // 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);
6629 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6631 LoginAction.Checked := False;
6632 LoginToolButton.Down := False;
6633 LoginToolButton.Style := tbsButton;
6636 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
6637 + '
\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
6638 + '
\82±
\82Ì
\83\82\81[
\83h
\82Å
\83\8d\83O
\83C
\83\93\82ð
\8e\8e\82Ý
\82Ü
\82·
\82©
\81H' + #13#10;
6639 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) = IDYES then begin
6640 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6641 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6642 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6643 if GikoSys.Setting.ReadProxy then begin
6644 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6645 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6647 GikoSys.Dolib.ProxyAddress := '';
6648 GikoSys.Dolib.ProxyPort := 0;
6650 //SSL
\8fá
\8aQ
\97p
\8b
\90§
\83\8d\83O
\83C
\83\93
6651 GikoSys.Dolib.ForcedConnect;
6652 if GikoSys.Dolib.Connect then begin
6653 LoginAction.Checked := True;
6654 AddMessageList('
\8b
\90§
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6655 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6656 LoginToolButton.Style := tbsCheck;
6658 // 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);
6659 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6661 LoginAction.Checked := False;
6662 LoginToolButton.Down := False;
6663 LoginToolButton.Style := tbsButton;
6666 LoginAction.Checked := False;
6667 LoginToolButton.Down := False;
6668 LoginToolButton.Style := tbsButton;
6672 Screen.Cursor := TmpCursor;
6677 procedure TGikoForm.KeySettingActionExecute(Sender: TObject);
6679 Dlg: TKeySettingForm;
6681 Dlg := TKeySettingForm.Create(Self);
6683 if Dlg.ShowModal = mrOk then
6684 GikoSys.SaveKeySetting(ActionList);
6685 GikoSys.SaveEditorKeySetting(Dlg.EditorForm.ActionList);
6691 procedure TGikoForm.ArrangeActionExecute(Sender: TObject);
6693 if ArrangeAction.Checked then begin
6695 ViewPanel.Align := alNone;
6696 ListSplitter.Align := alNone;
6697 ThreadPanel.Align := alNone;
6699 ViewPanel.Width := FBrowserSizeWidth;
6700 ViewPanel.Align := alLeft;
6702 ListSplitter.Width := 5;
6703 ListSplitter.Align := alLeft;
6705 ViewPanel.Left := -10;
6707 ThreadPanel.Align := alClient;
6709 GikoSys.Setting.ListOrientation := gloHorizontal;
6710 case GikoSys.Setting.ListWidthState of
6712 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6713 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6714 ViewPanel.Width := 1;
6717 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6718 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6721 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6722 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6723 ViewPanel.Width := ThreadMainPanel.Width - 80;
6728 ViewPanel.Align := alNone;
6729 ListSplitter.Align := alNone;
6730 ThreadPanel.Align := alNone;
6732 ViewPanel.Height := FBrowserSizeHeight;
6733 ViewPanel.Align := alTop;
6735 ListSplitter.Height := 5;
6736 ListSplitter.Align := alTop;
6738 ViewPanel.Top := -10;
6740 ThreadPanel.Align := alClient;
6741 GikoSys.Setting.ListOrientation := gloVertical;
6742 case GikoSys.Setting.ListHeightState of
6744 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6745 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6746 ViewPanel.Height := 1;
6749 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6750 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6753 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6754 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6755 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
6762 procedure TGikoForm.PaneInitActionExecute(Sender: TObject);
6764 CabinetPanel.Width := 150;
6765 MessagePanel.Height := 40;
6767 FBrowserSizeWidth := 200;
6768 FBrowserSizeHeight := 200;
6769 if ArrangeAction.Checked then begin
6770 ViewPanel.Width := FBrowserSizeWidth;
6772 ViewPanel.Height := FBrowserSizeHeight;
6774 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6775 if GikoSys.Setting.ListHeightState = glsMax then begin
6776 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6777 GikoSys.Setting.ListHeightState := glsNormal;
6780 if GikoSys.Setting.ListWidthState = glsMax then begin
6781 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6782 GikoSys.Setting.ListWidthState := glsNormal;
6787 procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
6789 DEL_MSG = '
\81g^0
\81h
\82Ì
\83\8d\83O
\82ð
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
6790 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6793 ThreadItem: TThreadItem;
6795 idx := BrowserTab.TabIndex;
6796 if idx <> -1 then begin
6797 if BrowserTab.Tabs.Objects[idx] <> nil then begin
6798 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).FThread;
6799 if GikoSys.Setting.DeleteMsg then
6800 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
6801 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', ThreadItem.Title, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
6803 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6804 ThreadItem.DeleteLogFile;
6805 if ThreadItem.ParentBoard = FActiveList then
6811 function TGikoForm.GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
6816 if CoolBar = nil then
6818 for i := 0 to CoolBar.Bands.Count - 1 do begin
6819 if CoolBar.Bands[i].Control = Control then begin
6820 Result := CoolBar.Bands[i];
6826 procedure TGikoForm.BrowserTabToolBarResize(Sender: TObject);
6828 if BrowserTab.Parent = BrowserTabToolBar then
6829 BrowserTab.Width := BrowserTabToolBar.Width;
6832 procedure TGikoForm.SelectTextClearActionExecute(Sender: TObject);
6834 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';
6835 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6837 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
6838 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
6840 GikoSys.Setting.SelectTextList.Clear;
6841 SelectComboBox.Items.Clear;
6842 SelectComboBox.Text := '';
6843 SetListViewType( gvtAll );
6846 procedure TGikoForm.NameTextClearActionExecute(Sender: TObject);
6850 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';
6851 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6853 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
6854 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
6856 GikoSys.Setting.NameList.Clear;
6857 for i := 0 to Screen.CustomFormCount - 1 do begin
6858 if TObject(Screen.CustomForms[i]) is TEditorForm then
6859 TEditorForm(Screen.CustomForms[i]).NameComboBox.Items.Clear;
6863 procedure TGikoForm.MailTextClearActionExecute(Sender: TObject);
6867 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';
6868 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6870 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
6871 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
6873 GikoSys.Setting.MailList.Clear;
6874 for i := 0 to Screen.CustomFormCount - 1 do begin
6875 if TObject(Screen.CustomForms[i]) is TEditorForm then
6876 TEditorForm(Screen.CustomForms[i]).MailComboBox.Items.Clear;
6880 procedure TGikoForm.LeftmostTabSelectActionExecute(Sender: TObject);
6882 if BrowserTab.Tabs.Count > 0 then begin
6883 BrowserTab.TabIndex := 0;
6884 BrowserTab.OnChange(nil);
6888 procedure TGikoForm.LeftTabSelectActionExecute(Sender: TObject);
6890 if BrowserTab.Tabs.Count > 0 then begin
6891 if BrowserTab.TabIndex = -1 then begin
6892 BrowserTab.TabIndex := 0;
6893 BrowserTab.OnChange(nil);
6894 end else if BrowserTab.TabIndex > 0 then begin
6895 BrowserTab.TabIndex := BrowserTab.TabIndex - 1;
6896 BrowserTab.OnChange(nil);
6901 procedure TGikoForm.RightTabSelectActionExecute(Sender: TObject);
6903 if BrowserTab.Tabs.Count > 0 then begin
6904 if BrowserTab.TabIndex = -1 then begin
6905 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6906 BrowserTab.OnChange(nil);
6907 end else if BrowserTab.TabIndex < (BrowserTab.Tabs.Count - 1) then begin
6908 BrowserTab.TabIndex := BrowserTab.TabIndex + 1;
6909 BrowserTab.OnChange(nil);
6914 procedure TGikoForm.RightmostTabSelectActionExecute(Sender: TObject);
6916 if BrowserTab.Tabs.Count > 0 then begin
6917 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6918 BrowserTab.OnChange(nil);
6922 procedure TGikoForm.LeftmostTabSelectActionUpdate(Sender: TObject);
6924 LeftmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6927 procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
6929 LeftTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6932 procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);
6934 RightTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6937 procedure TGikoForm.RightmostTabSelectActionUpdate(Sender: TObject);
6939 RightmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6942 procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
6947 procedure TGikoForm.SetMenuFont;
6949 // GikoSys.MenuFont(MenuToolBar.Font);
6950 // MenuToolBar.Buttons[0].AutoSize := False;
6951 // MenuToolBar.Buttons[0].AutoSize := True;
6952 // MenuToolBar.Font.Color := clMenuText;
6953 GikoSys.MenuFont(MainCoolBar.Font);
6954 MenuToolBar.Buttons[0].AutoSize := False;
6955 MenuToolBar.Buttons[0].AutoSize := True;
6956 MainCoolBar.AutoSize := False;
6957 MainCoolBar.AutoSize := True;
6959 GikoSys.MenuFont(ListCoolBar.Font);
6960 GikoSys.MenuFont(BrowserCoolBar.Font);
6961 // MenuToolBar.Font.Color := clMenuText;
6964 procedure TGikoForm.FavoriteMenuClick(Sender: TObject);
6970 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\92Ç
\89Á
6971 NewMenu := TMenuItem.Create(MainMenu);
6972 NewMenu.Action := FavoriteAddAction;
6973 FavoriteMenu.Add(NewMenu);
6974 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\90®
\97\9d
6975 NewMenu := TMenuItem.Create(FavoriteMenu);
6976 NewMenu.Action := FavoriteArrangeAction;
6977 FavoriteMenu.Add(NewMenu);
6978 //
\83Z
\83p
\83\8c\81[
\83^
6979 NewMenu := TMenuItem.Create(FavoriteMenu);
6980 NewMenu.Caption := '-';
6981 FavoriteMenu.Add(NewMenu);
6983 CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
6986 procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
6991 for i := 0 to Node.Count - 1 do begin
6992 NewMenu := TFavoriteMenuItem.Create(Self);
6993 NewMenu.AutoHotkeys := maAutomatic;
6994 NewMenu.Caption := CustomStringReplace(Node.Item[i].Text, '&', '&&');
6995 TFavoriteMenuItem(NewMenu).Data := Node.Item[i].Data;
6996 MenuItem.Add(NewMenu);
6998 if TObject(Node.Item[i].Data) is TFavoriteFolder then begin
6999 NewMenu.ImageIndex := TOOL_ICON_FAV_FOLDER;
7000 CreateFavMenu(Node.Item[i], NewMenu);
7001 end else if TObject(Node.Item[i].Data) is TFavoriteBoardItem then begin
7002 NewMenu.ImageIndex := TOOL_ICON_FAV_BOARD;
7003 NewMenu.OnClick := FavoriteClick;
7004 end else if TObject(Node.Item[i].Data) is TFavoriteThreadItem then begin
7005 NewMenu.ImageIndex := TOOL_ICON_FAV_THREAD;
7006 NewMenu.OnClick := FavoriteClick;
7011 procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
7013 Dlg : TFavoriteAddDialog;
7019 if Item is TFavoriteBoardItem then
7020 Item := TFavoriteBoardItem( Item ).Item
7021 else if Item is TFavoriteThreadItem then
7022 Item := TFavoriteThreadItem( Item ).Item;
7024 Node := FavoriteTreeView.Items.GetFirstNode;
7025 if Item is TBoard then begin
7026 ItemURL := TBoard( Item ).URL;
7027 while Node <> nil do begin
7029 if TObject( Data ) is TFavoriteBoardItem then begin
7030 if ItemURL = TFavoriteBoardItem( Data ).URL then begin
7031 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
7036 Node := Node.GetNext;
7038 Dlg := TFavoriteAddDialog.Create(Self);
7040 Dlg.SetBoard( TBoard( Item ) );
7045 end else if Item is TThreadItem then begin
7046 ItemURL := TThreadItem( Item ).URL;
7047 while Node <> nil do begin
7049 if TObject( Data ) is TFavoriteThreadItem then begin
7050 if ItemURL = TFavoriteThreadItem( Data ).URL then begin
7051 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
7056 Node := Node.GetNext;
7058 Dlg := TFavoriteAddDialog.Create(Self);
7060 Dlg.SetThreadItem( TThreadItem( Item ) );
7070 procedure TGikoForm.FavoriteAddActionExecute(Sender: TObject);
7072 ShowFavoriteAddDialog(GetActiveContent);
7075 procedure TGikoForm.FavoriteClick(Sender: TObject);
7078 FavoriteClick( Sender, True );
7082 procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
7085 ThreadItem: TThreadItem;
7086 FavBoard: TFavoriteBoardItem;
7087 FavThread: TFavoriteThreadItem;
7091 if Sender is TFavoriteMenuItem then
7092 Item := TFavoriteMenuItem(Sender).Data
7093 else if Sender is TLinkToolButton then
7094 Item := TLinkToolButton(Sender).Data
7095 else if Sender is TTreeNode then
7096 Item := TTreeNode( Sender ).Data
7100 if TObject(Item) is TFavoriteBoardItem then begin
7101 FavBoard := TFavoriteBoardItem(Item);
7102 Board := FavBoard.Item;
7103 if Board <> nil then begin
7104 if (FTreeType = gtt2ch) and (FActiveBBS <> Board.ParentCategory.ParenTBBS) then
7105 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7106 SelectTreeNode(Board, True);
7108 end else if TObject(Item) is TFavoriteThreadItem then begin
7109 FavThread := TFavoriteThreadItem(Item);
7110 ThreadItem := FavThread.Item;
7111 if ThreadItem = nil then
7114 InsertBrowserTab(ThreadItem, ActiveTab);
7116 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
7117 if GikoSys.Setting.ListWidthState = glsMin then begin
7118 BrowserMaxAndFocusAction.Execute;
7121 if GikoSys.Setting.ListHeightState = glsMin then begin
7122 BrowserMaxAndFocusAction.Execute;
7128 procedure TGikoForm.FavoriteAddActionUpdate(Sender: TObject);
7130 FavoriteAddAction.Enabled := (GetActiveContent <> nil);
7133 procedure TGikoForm.BoardFavoriteAddActionExecute(Sender: TObject);
7135 if TObject(ListView.Selected.Data) is TBoard then
7136 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
7139 procedure TGikoForm.BoardFavoriteAddActionUpdate(Sender: TObject);
7141 BoardFavoriteAddAction.Enabled := (GetActiveList is TCategory) and (ListView.SelCount > 0);
7144 procedure TGikoForm.ThreadFavoriteAddActionExecute(Sender: TObject);
7146 if TObject(ListView.Selected.Data) is TThreadItem then
7147 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
7150 procedure TGikoForm.ThreadFavoriteAddActionUpdate(Sender: TObject);
7152 ThreadFavoriteAddAction.Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
7155 procedure TGikoForm.TreeSelectFavoriteAddActionExecute(Sender: TObject);
7157 ShowFavoriteAddDialog(TObject(FClickNode.Data));
7160 procedure TGikoForm.FavoriteArrangeActionExecute(Sender: TObject);
7162 Dlg: TFavoriteArrangeDialog;
7164 Dlg := TFavoriteArrangeDialog.Create(Self);
7170 PostMessage( Handle, USER_SETLINKBAR, 0, 0 );
7173 procedure TGikoForm.BBSMenuItemOnClick(
7178 if Sender is TBBSMenuItem then
7179 ShowBBSTree( TBBSMenuItem( Sender ).Data );
7183 procedure TGikoForm.MainCoolBarResize(Sender: TObject);
7185 TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
7188 procedure TGikoForm.MoveToActionExecute(Sender: TObject);
7193 URL := Trim(AddressComboBox.Text);
7196 idx := AddressComboBox.Items.IndexOf(URL);
7197 if idx = -1 then begin
7198 AddressComboBox.Items.Insert(0, URL);
7199 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
7200 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
7202 AddressComboBox.Items.Delete(idx);
7203 AddressComboBox.Items.Insert(0, URL);
7207 procedure TGikoForm.MoveToURL(URL: string);
7210 protocol, host, path, document, port, bookmark : string;
7211 URL2, protocol2, host2, path2, document2, port2, bookmark2 : string;
7213 BBSID, BBSKey: string;
7215 ThreadItem: TThreadItem;
7218 tmpThread : TThreadItem;
7219 // category : TCategory;
7220 // categoryNode : TTreeNode;
7221 // boardNode : TTreeNode;
7222 shiftDown : Boolean;
7226 GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark );
7227 GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey );
7230 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
7231 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
7232 if shiftDown then begin
7233 GikoSys.OpenBrowser(URL, gbtUserApp);
7235 end else if ctrlDown then begin
7236 GikoSys.OpenBrowser(URL, gbtIE);
7240 //=====
\83v
\83\89\83O
\83C
\83\93
7243 bi := High( BoardPlugIns );
7244 for i := Low( BoardPlugIns ) to bi do begin
7245 if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
7246 case BoardPlugIns[ i ].AcceptURL( URL ) of
7249 tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL );
7250 boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
7251 Board := BBSsFindBoardFromURL( boardURL );
7252 if Board = nil then begin
7253 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
7254 //GikoSys.OpenBrowser(URL, gbtUserApp);
7257 Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL );
7258 if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
7259 ShowBBSTree( BBSs[ 1 ] );
7262 if not Board.IsThreadDatRead then begin
7263 GikoSys.ReadSubjectFile( Board );
7268 ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
7269 if ThreadItem = nil then begin
7270 ThreadItem := tmpThread;
7271 Board.Insert( 0, ThreadItem );
7272 if ActiveList is TBoard then begin
7273 if TBoard(ActiveList) = Board then
7274 ListView.Items.Count := ListView.Items.Count + 1;
7276 InsertBrowserTab( ThreadItem );
7277 DownloadContent( ThreadItem );
7281 InsertBrowserTab( ThreadItem );
7282 if not ThreadItem.IsLogFile then begin
7283 DownloadContent( ThreadItem );
7293 Board := BBSsFindBoardFromURL( URL );
7294 if Board <> nil then begin
7295 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
7296 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7297 SelectTreeNode( Board, True );
7305 // 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¢
7309 if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
7310 boardURL := GikoSys.Get2chThreadURL2BoardURL( URL );
7311 Board := BBSsFindBoardFromURL( boardURL );
7313 Board := BBSsFindBoardFromBBSID( BBSID );
7315 if Board = nil then begin
7316 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
7317 //
\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)
7318 Board := BBSs[ 0 ].FindBBSID( Copy(BBSID, 1 , Length(BBSID) - 1) );
7320 if Board = nil then begin
7321 //
\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
7322 GikoSys.OpenBrowser(URL, gbtUserApp);
7325 //
\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é
7327 GikoSys.ParseURI(URL2 , protocol2, host2, path2, document2, port2, bookmark2 );
7328 tmp1 := Copy(host, AnsiPos('.', host) + 1, Length(host));
7329 tmp2 := Copy(host2, AnsiPos('.', host2) + 1, Length(host2));
7330 if (tmp1 <> tmp2) then begin
7331 GikoSys.OpenBrowser(URL, gbtUserApp);
7336 if not Board.IsThreadDatRead then
7337 GikoSys.ReadSubjectFile(Board);
7338 URL := GikoSys.Get2chBrowsableThreadURL( URL );
7339 ThreadItem := Board.FindThreadFromURL( URL );
7340 //
\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)
7341 if ThreadItem = nil then begin
7342 ThreadItem := Board.FindThreadFromFileName( BBSKey + '.dat' );
7345 if ThreadItem = nil then begin
7346 //shift ->
\90Ý
\92è
\83u
\83\89\83E
\83U
\81i
\96³
\82¯
\82ê
\82ÎIE
\81j
7348 {shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
7349 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
7351 GikoSys.OpenBrowser(URL, gbtUserApp)
7352 else if ctrlDown then
7353 GikoSys.OpenBrowser(URL, gbtIE)
7356 ThreadItem := TThreadItem.Create( nil, URL );
7357 ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
7358 if AnsiPos(Host, Board.URL) = 0 then
7359 ThreadItem.DownloadHost := Host
7361 ThreadItem.DownloadHost := '';
7362 Board.Insert(0, ThreadItem);
7363 if ActiveList is TBoard then begin
7364 if TBoard(ActiveList) = Board then
7365 ListView.Items.Count := ListView.Items.Count + 1;
7367 InsertBrowserTab(ThreadItem);
7368 DownloadContent(ThreadItem);
7371 if ThreadItem.IsLogFile then
7372 InsertBrowserTab(ThreadItem)
7374 if AnsiPos(Host, Board.URL) = 0 then
7375 ThreadItem.DownloadHost := Host
7377 ThreadItem.DownloadHost := '';
7378 InsertBrowserTab(ThreadItem);
7379 DownloadContent(ThreadItem);
7383 Board := BBSsFindBoardFromURL( URL );
7384 if Board = nil then begin
7385 GikoSys.OpenBrowser(URL, gbtAuto);
7387 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
7388 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7389 SelectTreeNode( Board, True );
7394 procedure TGikoForm.AddressToolBarResize(Sender: TObject);
7396 AddressComboBox.Width := AddressToolBar.Width - MoveToToolButton.Width - 10;
7397 CoolBarResized( Sender, MainCoolBar );
7400 procedure TGikoForm.AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
7401 Shift: TShiftState);
7403 if Key = VK_RETURN then
7404 MoveToAction.Execute;
7407 procedure TGikoForm.BrowserEnter(Sender: TObject);
7409 Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
7412 procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
7414 CDS:PCopyDataStruct;
7418 CDS := Message.CopyDataStruct;
7419 GetMem(PC, CDS^.cbData);
7421 lstrcpy(PC,CDS^.lpData);
7422 SetString(sURL, PC,lstrlen(PC));
7427 Message.Result := 1;
7430 procedure TGikoForm.WndProc(var Message: TMessage);
7435 if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
7438 if Message.WParam = SC_MINIMIZE then
7441 TreeClick( TreeView.Selected );
7455 procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
7457 hComboEdit: THandle;
7458 // KeyData: Integer;
7461 if AddressComboBox.Focused or SelectComboBox.Focused then begin
7462 if Msg.CharCode in [VK_BACK] then begin
7463 hComboEdit := GetFocus;
7464 if hComboEdit <> 0 then
7465 SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, Msg.KeyData);
7466 // SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, $000E0001);
7469 if Msg.CharCode in [VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PRIOR, VK_NEXT] then begin
7470 hComboEdit := GetFocus;
7471 if hComboEdit <> 0 then
7472 SendMessage(hComboEdit, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
7476 //
\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ð
7477 KeyData := Msg.KeyData;
7478 if (KeyData and $20000000) = 0 then begin
7479 if Msg.CharCode in [Ord('F'), Ord('V'), Ord('B'), Ord('R'),
7480 Ord('A'), Ord('T'), Ord('H')] then begin
7481 if not ActionList.IsShortCut(Msg) then begin
7489 procedure TGikoForm.BrowserTabVisibleActionExecute(Sender: TObject);
7491 GikoSys.Setting.BrowserTabVisible := BrowserTabVisibleAction.Checked;
7495 procedure TGikoForm.BrowserTabTopActionExecute(Sender: TObject);
7497 BrowserTabBottomAction.Checked := False;
7498 BrowserTabTopAction.Checked := True;
7499 GikoSys.Setting.BrowserTabPosition := gtpTop;
7503 procedure TGikoForm.BrowserTabBottomActionExecute(Sender: TObject);
7505 BrowserTabTopAction.Checked := False;
7506 BrowserTabBottomAction.Checked := True;
7507 GikoSys.Setting.BrowserTabPosition := gtpBottom;
7511 procedure TGikoForm.BrowserTabTabStyleActionExecute(Sender: TObject);
7513 BrowserTabButtonStyleAction.Checked := False;
7514 BrowserTabFlatStyleAction.Checked := False;
7515 BrowserTabTabStyleAction.Checked := True;
7516 GikoSys.Setting.BrowserTabStyle := gtsTab;
7520 procedure TGikoForm.BrowserTabButtonStyleActionExecute(Sender: TObject);
7522 BrowserTabTabStyleAction.Checked := False;
7523 BrowserTabFlatStyleAction.Checked := False;
7524 BrowserTabButtonStyleAction.Checked := True;
7525 GikoSys.Setting.BrowserTabStyle := gtsButton;
7529 procedure TGikoForm.BrowserTabFlatStyleActionExecute(Sender: TObject);
7531 BrowserTabFlatStyleAction.Checked := True;
7532 BrowserTabTabStyleAction.Checked := False;
7533 BrowserTabButtonStyleAction.Checked := False;
7534 GikoSys.Setting.BrowserTabStyle := gtsFlat;
7538 procedure TGikoForm.PreviewTimerTimer(Sender: TObject);
7544 HtmlFileName: string;
7548 TargetFrameName: OleVariant;
7549 PostData: OleVariant;
7550 Headers: OleVariant;
7551 WindowHeight: Integer;
7552 WindowWidth: Integer;
7556 Protocol, Host, Path, Document, Port, Bookmark: string;
7558 PreviewTimer.Enabled := False;
7562 case GikoSys.Setting.PreviewSize of
7569 WindowHeight := 192;
7573 WindowHeight := 384;
7577 WindowHeight := 480;
7579 else begin //gpsMedium
7581 WindowHeight := 288;
7585 ARect := Rect(0, 0, WindowWidth, WindowHeight);
7587 case GikoSys.Setting.PopupPosition of
7588 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7589 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7590 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
7591 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
7592 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
7593 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
7594 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7595 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7596 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Ó
7599 html := '<html><head>'#13#10
7601 + 'function init() {'#13#10
7602 + ' if ((document.body.clientHeight >= Image1.height) && (document.body.clientWidth >= Image1.width)) {'#13#10
7604 + ' var dh, ih;'#13#10
7605 + ' dh = document.body.clientWidth / document.body.clientHeight;'#13#10
7606 + ' ih = Image1.width / Image1.height;'#13#10
7607 + ' if (document.body.clientWidth < document.body.clientHeight) {'#13#10
7608 + ' if (ih > dh)'#13#10
7609 + ' Image1.width = document.body.clientWidth;'#13#10
7611 + ' Image1.height = document.body.clientHeight;'#13#10
7613 + ' if (ih < dh)'#13#10
7614 + ' Image1.height = document.body.clientHeight;'#13#10
7616 + ' Image1.width = document.body.clientWidth;'#13#10
7619 + ' Message.style.display = "none";'#13#10
7623 + '<body topmargin="0" leftmargin="0" style="border-width: 1px; overflow:hidden; border-style: solid;" onLoad="init()">'#13#10
7624 + '<div align="center" id="Message">
\83v
\83\8c\83r
\83\85\81[
\8dì
\90¬
\92\86</div>'#13#10
7625 + '<div align="center"><img name="Image1" border="0" src="%ImageURL%"></div>'#13#10
7627 sl := TStringList.Create;
7630 HtmlFileName := GikoSys.GetAppDir + HTML_FILE_NAME;
7631 sl.Text := AnsiReplaceStr(html, '%ImageURL%', FPreviewURL);
7632 sl.SaveToFile(HtmlFileName);
7639 NavURL := HtmlFileName;
7641 TargetFrameName := '';
7644 GikoSys.ParseURI(FPreviewURL, Protocol, Host, Path, Document, Port, Bookmark);
7645 Referer := Protocol + '://' + Host;
7647 Referer := Referer + ':' + Port;
7648 Referer := Referer + Path;
7649 Headers := 'Referer: ' + Referer;
7650 FPreviewBrowser.Navigate(NavURL, Flags, TargetFrameName, PostData, Headers);
7651 if ARect.Top + WindowHeight > Screen.DesktopHeight then
7652 ARect.Top := Screen.DesktopHeight - WindowHeight;
7653 if ARect.Left + WindowWidth > Screen.DesktopWidth then
7654 ARect.Left := Screen.DesktopWidth - WindowWidth;
7655 if ARect.Left < Screen.DesktopLeft then ARect.Left := Screen.DesktopLeft;
7656 if ARect.Bottom < Screen.DesktopTop then ARect.Bottom := Screen.DesktopTop;
7658 SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
7659 ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
7661 // Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
7662 // SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
7666 procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
7668 if PreviewTimer.Enabled then
7669 PreviewTimer.Enabled := False;
7670 if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
7671 FHint.ReleaseHandle;
7674 if (FPreviewBrowser <> nil) and (IsWindowVisible(FPreviewBrowser.Handle)) then
7675 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
7676 Message.Result := 1;
7680 procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
7682 MsgBarCloseAction.Execute;
7685 function TGikoForm.OnDocumentContextMenu(Sender: TObject): WordBool;
7687 Doc: IHtmlDocument2;
7688 Range: IHTMLTxtRange;
7691 ThreadItem: TThreadItem;
7694 Doc := FactiveContent.FBrowser.Document as IHtmlDocument2;
7695 if Assigned(Doc) then begin
7696 Range := Doc.selection.createRange as IHTMLTxtRange;
7697 s := CustomStringReplace(Range.text, '
\81@', ' ');//
\91S
\8ap
\8bó
\94\92\82ð
\94¼
\8ap
\8bó
\94\92\82É
7698 s := ZenToHan(Trim(s));
7699 if GikoSys.IsNumeric(s) then begin
7701 ThreadItem := GetActiveContent;
7702 if ThreadItem <> nil then begin
7704 FHint.PopupType := gptThread;
7705 SetResPopupText(ThreadItem, Num, Num, False, False);
7706 if FHint.ResCount <> 0 then
7717 procedure TGikoForm.SetResPopupText(threadItem: TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
7729 boardPlugIn : TBoardPlugIn;
7732 if StNum > ToNum then begin
7738 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
7739 if StNum + MAX_POPUP_RES < ToNum then
7740 ToNum := StNum + MAX_POPUP_RES;
7742 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
7744 if ThreadItem <> nil then
7745 FHint.Title := ThreadItem.Title;
7747 if ThreadItem <> nil then begin
7748 if ThreadItem.IsBoardPlugInAvailable then begin
7749 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
7750 boardPlugIn := ThreadItem.BoardPlugIn;
7752 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
7753 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
7754 for i := StNum to ToNum do begin
7756 //
\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½
7757 tmp := boardPlugIn.GetDat( DWORD( threadItem ), i );
7758 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7759 Res := GikoSys.DivideStrLine(tmp);
7760 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7761 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7763 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7766 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7767 Body := CustomStringReplace(Body, '<br>', #10,true);
7768 Body := CustomStringReplace(Body, '</a>', '',true);
7769 Body := GikoSys.DeleteLink(Body);
7770 Body := CustomStringReplace(Body, '<', '<');
7771 Body := CustomStringReplace(Body, '>', '>');
7772 Body := CustomStringReplace(Body, '"', '"');
7773 Body := CustomStringReplace(Body, '&', '&');
7774 Body := CustomStringReplace(Body, ' ', ' ');
7776 FHint.Add(Header, Body);
7777 //FHint.Title := '';
7781 for i := StNum to ToNum do begin
7783 FileName := ThreadItem.FilePath;
7784 tmp := GikoSys.ReadThreadFile(FileName, Line);
7785 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7786 Res := GikoSys.DivideStrLine(tmp);
7787 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7788 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7790 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7792 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7793 Body := CustomStringReplace(Body, '<br>', #10,true);
7794 Body := CustomStringReplace(Body, '</a>', '',true);
7795 Body := GikoSys.DeleteLink(Body);
7796 Body := CustomStringReplace(Body, '<', '<');
7797 Body := CustomStringReplace(Body, '>', '>');
7798 Body := CustomStringReplace(Body, '"', '"');
7799 Body := CustomStringReplace(Body, '&', '&');
7800 Body := CustomStringReplace(Body, ' ', ' ');
7801 FHint.Add(Header, Body);
7802 //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
7811 procedure TGikoForm.ShowTextPopup;
7816 // if Trim(s) = '' then
7819 FHint.Font.Name := GikoSys.Setting.HintFontName;
7820 FHint.Font.Size := GikoSys.Setting.HintFontSize;
7821 FHint.Font.Color := GikoSys.Setting.HintFontColor;
7822 FHint.Color := GikoSys.Setting.HintBackColor;
7823 FHint.HeaderBold := GikoSys.Setting.ResPopupHeaderBold;
7825 if FHint.PopupType = gptRaw then
7826 ARect := FHint.CalcHintRect(Screen.Width, FHint.Caption, nil)
7828 ARect := FHint.CalcHintRect(Screen.Width, '', nil);
7829 case GikoSys.Setting.PopupPosition of
7830 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7831 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7832 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
7833 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
7834 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
7835 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
7836 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7837 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7838 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Ó
7840 //FHint.ActivateHint(ARect, s);
7841 if FHint.PopupType = gptRaw then
7842 FHint.ActivateHint(ARect, FHint.Caption)
7844 FHint.ActivateHint(ARect, '');
7846 FHint.ReleaseHandle;
7851 procedure TGikoForm.GikoHelpActionExecute(Sender: TObject);
7855 FileName := GikoSys.GetAppDir + 'batahlp.chm';
7856 if not FileExists(FileName) then begin
7859 '
\83w
\83\8b\83v
\82ª
\8c©
\82Â
\82©
\82è
\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½' + #13#10 +
7860 '
\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 +
7861 '
\83w
\83\8b\83v
\82Í
\83M
\83R
\83i
\83r
\82Ì
\83T
\83C
\83g
\82É
\92u
\82¢
\82Ä
\82 \82è
\82Ü
\82·',
7866 ShellExecute(Handle, 'open', PChar(FileName), '', PChar(GikoSys.GetAppDir), SW_SHOW);
7869 procedure TGikoForm.ToolButton18Click(Sender: TObject);
7871 DEL_MSG = '
\97\9a\97ð
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
7872 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
7874 if FTreeType = gttHistory then begin
7875 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
7876 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
7880 TreeView.Items.Clear;
7884 procedure TGikoForm.KotehanActionExecute(Sender: TObject);
7886 Dlg: TKotehanDialog;
7888 Dlg := TKotehanDialog.Create(Self);
7896 procedure TGikoForm.SetLinkBar;
7900 ToolButton: TLinkToolButton;
7901 MenuItem: TMenuItem;
7902 oldIgnoreResize : Boolean;
7904 oldIgnoreResize := FIsIgnoreResize;
7905 FIsIgnoreResize := True;
7906 MainCoolBar.Bands.BeginUpdate;
7908 LinkBarPopupMenu.Items.Clear;
7909 for i := LinkToolBar.ButtonCount - 1 downto 0 do
7910 //LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
7911 LinkToolBar.Buttons[i].Free;
7912 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
7913 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
7914 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
7915 ToolButton := TLinkToolButton.Create(LinkToolBar);
7916 // ToolButton.Parent := LinkToolBar;
7917 if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteFolder then begin
7918 MenuItem := TMenuItem.Create(Self);
7919 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
7920 LinkBarPopupMenu.Items.Add(MenuItem);
7921 ToolButton.MenuItem := MenuItem;
7922 ToolButton.ImageIndex := TOOL_ICON_FAV_FOLDER;
7923 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
7924 ToolButton.ImageIndex := TOOL_ICON_FAV_BOARD;
7925 ToolButton.OnClick := FavoriteClick;
7926 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
7927 ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
7928 ToolButton.OnClick := FavoriteClick;
7930 ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
7931 ToolButton.Left := 10000;
7932 ToolButton.Data := FavoriteTreeView.Items[i].Item[j].Data;
7933 ToolButton.AutoSize := True;
7934 ToolButton.OnDragDrop := LinkToolButtonDragDrop;
7935 ToolButton.OnDragOver := FavoriteDragOver;
7936 ToolButton.OnMouseDown := LinkToolButtonOnMouseDown;
7937 ToolButton.OnMouseMove := LinkToolButtonOnMouseMove;
7938 ToolButton.OnMouseUp := LinkToolButtonOnMouseUp;
7939 ToolButton.OnStartDrag := LinkToolButtonStartDrag;
7940 //ToolButton.DragMode := dmAutomatic;
7941 ToolButton.DragMode := dmManual;
7942 ToolButton.PopupMenu := FavoriteTreePopupMenu;
7944 LinkToolBar.InsertControl(ToolButton);
7949 { if LinkToolBar.ButtonCount = 0 then begin
7950 ToolButton := TLinkToolButton.Create(LinkToolBar);
7951 ToolButton.Style := tbsButton;
7952 ToolButton.ImageIndex := -1;
7953 ToolButton.Caption := '';
7954 LinkToolBar.InsertControl(ToolButton);
7957 MainCoolBar.Bands.EndUpdate;
7958 LoadCoolBarSettings;
7959 FIsIgnoreResize := oldIgnoreResize;
7963 procedure TGikoForm.FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
7971 if Sender = FavoriteTreeView then begin
7972 Node := FavoriteTreeView.GetNodeAt(X, Y);
7977 bound := Node.DisplayRect( False );
7978 height := bound.Bottom - bound.Top;
7979 if (bound.Top + height / 2) <= Y then
7980 Node := FavoriteTreeView.GetNodeAt(X, Y + height);
7985 if Node.IsFirstNode then
7990 if FDropSpaceNode <> nil then
7991 if FDropSpaceNode.AbsoluteIndex = Node.AbsoluteIndex then
7994 if Change then begin
7995 if FDropSpaceNode <> nil then
7996 FDropSpaceNode.Free;
7998 FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil );
7999 FDropSpaceNode.MoveTo( Node, naInsert );
8000 FDropSpaceNode.ImageIndex := -1;
8001 FDropSpaceNode.SelectedIndex := -1;
8005 if Source = FavoriteTreeView then begin
8006 if FavoriteTreeView.Selected = FavoriteTreeView.Items.GetFirstNode then begin
8011 end else if Source = BrowserTab then
8013 else if Source = ListView then
8015 else if Source is TLinkToolButton then
8017 else if Source = TreeView then
8023 procedure TGikoForm.FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
8026 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
8029 procedure TGikoForm.LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
8031 // FDragging := true;
8034 procedure TGikoForm.LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
8036 SenderNode: TTreeNode;
8037 LinkToolButton: TLinkToolButton;
8040 LinkToolButton := TLinkToolButton( Sender );
8041 SenderNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data );
8043 FavoriteDragDrop( SenderNode, Source );
8047 procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8049 favButton : TLinkToolButton;
8050 favThreadItem : TFavoriteThreadItem;
8056 if Sender is TLinkToolButton then begin
8057 favButton := TLinkToolButton( Sender );
8058 if TObject( favButton.Data ) is TFavoriteThreadItem then begin
8059 favThreadItem := TFavoriteThreadItem( favButton.Data );
8060 if favThreadItem.Item <> nil then
8061 InsertBrowserTab( favThreadItem.Item, False );
8069 procedure TGikoForm.LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
8073 TToolButton( Sender ).DragMode := dmManual;
8074 if ssLeft in Shift then begin
8075 // 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)
8076 if FDragTime = 0 then begin
8077 FDragTime := GetTickCount();
8079 Now := GetTickCount();
8080 if (Now - FDragTime) > 500 then begin
8081 if FDragButton <> TToolButton( Sender ) then begin
8083 FDragButton := TToolButton( Sender );
8084 TToolButton(Sender).BeginDrag(false ,5);
8087 {$IF Defined(debug)}
8088 ShowMessage('Error');
8099 procedure TGikoForm.LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8104 function TGikoForm.GetWidthAllToolButton(ToolBar: TToolBar): Integer;
8109 for i := 0 to ToolBar.ButtonCount - 1 do
8110 if ToolBar.Buttons[i].Visible then
8111 Result := Result + ToolBar.Buttons[i].Width;
8114 procedure TGikoForm.MainCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8116 Control : TWinControl;
8119 Control := FindControl(BandInfo^.hwndChild);
8120 if Control = nil then
8123 for i := MainCoolBar.Bands.Count - 1 downto 0 do begin
8124 if MainCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8125 idx := MainCoolBar.Bands[ i ].ID;
8129 Canvas.Font.Handle := GetStockObject( DEFAULT_GUI_FONT );
8130 if (Control = MenuToolBar) or (Control = StdToolBar) then begin
8131 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8132 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8133 BandInfo^.cxMinChild := 0;
8134 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth;
8135 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8136 end else if Control = LinkToolBar then begin
8137 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8138 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8139 BandInfo^.cxMinChild := 0;
8140 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83\8a\83\93\83N' );
8141 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8142 end else begin // AddressToolBar
8143 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8144 BandInfo^.cxMinChild := 0;
8145 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83A
\83h
\83\8c\83X' );
8149 procedure TGikoForm.MainCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8155 ChevronPopupMenu.Items.Clear;
8157 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
8158 if MainCoolBar.Bands[ i ].Visible then begin
8159 if Idx = Int64(RebarChevron^.uBand) then begin
8166 if (Idx >= 0) and (MainCoolBar.Bands.Count > Idx) then begin
8167 if MainCoolBar.Bands[Idx].Control = MenuToolbar then begin
8169 end else if MainCoolBar.Bands[Idx].Control = StdToolbar then begin
8170 ToolBarChevronMenu(StdToolBar);
8171 end else if MainCoolBar.Bands[Idx].Control = LinkToolbar then begin
8175 p := MainCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8176 ChevronPopupMenu.Popup(p.x, p.y);
8180 procedure TGikoForm.MenuBarChevronMenu;
8181 procedure SetSubMenu(MenuItem: TMenuItem; PopupItem: TMenuItem);
8187 for i := 0 to MenuItem.Count - 1 do begin
8189 if MenuItem[i] is TFavoriteMenuItem then begin
8190 Item := TFavoriteMenuItem.Create(Self);
8191 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(MenuItem[i]).Data;
8193 Item := TMenuItem.Create(Self);
8194 Item.Caption := MenuItem[i].Caption;
8195 Item.Action := MenuItem[i].Action;
8196 Item.ImageIndex := MenuItem[i].ImageIndex;
8197 Item.OnClick := MenuItem[i].OnClick;
8198 PopupItem.Add(Item);
8199 if MenuItem[i].Count > 0 then
8200 SetSubMenu(MenuItem[i], Item);
8209 ChevronPopupMenu.Items.Clear;
8210 ChevronPopupMenu.Images := MainMenu.Images;
8211 bw := GetWidthAllToolButton(MenuToolBar);
8212 if MenuToolBar.Width < bw then begin
8214 for i := 0 to MenuToolBar.ButtonCount - 1 do begin
8215 w := w + MenuToolBar.Buttons[i].Width;
8216 if MenuToolBar.Width <= w then begin
8217 Item := TMenuItem.Create(Self);
8218 Item.Caption := MenuToolBar.Buttons[i].MenuItem.Caption;
8219 //Item.Action := MenuToolBar.Buttons[i].MenuItem.Action;
8220 ChevronPopupMenu.Items.Add(Item);
8221 SetSubMenu(MenuToolbar.Buttons[i].MenuItem, Item);
8227 procedure TGikoForm.ToolBarChevronMenu(ToolBar: TToolBar);
8228 procedure SetSubMenu(PopupMenu: TPopupMenu; PopupItem: TMenuItem);
8233 if Assigned(PopupMenu.OnPopup) then
8234 PopupMenu.OnPopup(nil);
8235 for i := 0 to PopupMenu.Items.Count - 1 do begin
8237 if PopupMenu.Items[i] is TFavoriteMenuItem then begin
8238 Item := TFavoriteMenuItem.Create(Self);
8239 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(PopupMenu.Items[i]).Data;
8241 Item := TMenuItem.Create(Self);
8242 Item.Caption := PopupMenu.Items[i].Caption;
8243 Item.Action := PopupMenu.Items[i].Action;
8244 Item.ImageIndex := PopupMenu.Items[i].ImageIndex;
8245 Item.OnClick := PopupMenu.Items[i].OnClick;
8246 PopupItem.Add(Item);
8255 ChevronPopupMenu.Items.Clear;
8256 ChevronPopupMenu.Images := ToolBar.HotImages;
8257 bw := GetWidthAllToolButton(ToolBar);
8258 if ToolBar.Width < bw then begin
8260 for i := 0 to ToolBar.ButtonCount - 1 do begin
8261 w := w + ToolBar.Buttons[i].Width;
8262 if ToolBar.Width <= w then begin
8263 Case ToolBar.Buttons[i].Tag of
8266 Item := TMenuItem.Create(Self);
8267 if ToolBar.Buttons[i].Style = tbsSeparator then
8270 Item.Caption := ToolBar.Buttons[i].Caption;
8271 Item.Action := ToolBar.Buttons[i].Action;
8272 //Item.Visible := True;
8274 ChevronPopupMenu.Items.Add(Item);
8275 if ToolBar.Buttons[i].DropdownMenu <> nil then begin
8277 Item.OnClick := nil;
8278 SetSubMenu(ToolBar.Buttons[i].DropdownMenu, Item);
8282 //
\8f«
\97\88\82Ì
\82½
\82ß
\82Ì
\97\
\96ñ
8289 procedure TGikoForm.LinkBarChevronMenu;
8294 Item: TFavoriteMenuItem;
8296 Button: TLinkToolButton;
8298 ChevronPopupMenu.Items.Clear;
8299 ChevronPopupMenu.Images := LinkToolBar.Images;
8300 bw := GetWidthAllToolButton(LinkToolBar);
8301 if LinkToolBar.Width < bw then begin
8303 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
8304 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
8305 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
8306 w := w + LinkToolBar.Buttons[j].Width;
8307 if LinkToolBar.Width <= w then begin
8308 if LinkToolBar.Buttons[j] is TLinkToolButton then begin
8309 Button := TLinkToolButton(LinkToolBar.Buttons[j]);
8310 Item := TFavoriteMenuItem.Create(Self);
8311 if TObject(Button.Data) is TFavoriteFolder then begin
8312 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], Item);
8313 end else if TObject(Button.Data) is TFavoriteBoardItem then begin
8314 Item.OnClick := FavoriteClick;
8315 end else if TObject(Button.Data) is TFavoriteThreadItem then begin
8316 Item.OnClick := FavoriteClick;
8318 Item.Data := Button.Data;
8319 Item.Caption := LinkToolBar.Buttons[j].Caption;
8320 Item.ImageIndex := LinkToolBar.Buttons[j].ImageIndex;
8321 ChevronPopupMenu.Items.Add(Item);
8332 \brief
\83o
\83\93\83h
\95\9d\82ð
\8dÄ
\8cv
\8eZ
\81E
\8dÄ
\90Ý
\92è
\82·
\82é
8333 \param bar
\83o
\83\93\83h
\82ª
\8f\8a\91®
\82·
\82é CoolBar
8334 \param band
\8dÄ
\8cv
\8eZ
\81E
\8dÄ
\90Ý
\92è
\82·
\82é
\83o
\83\93\83h
8336 \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É
8337 \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
8339 procedure TGikoForm.ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
8341 bandInfo : tagREBARBANDINFOA;
8342 pBandInfo : PReBarBandInfoA;
8349 pBandInfo := @bandInfo;
8350 ZeroMemory( pBandInfo, sizeof( bandInfo ) );
8351 bandInfo.cbSize := sizeof( bandInfo );
8352 bandInfo.hwndChild := h;
8353 bandInfo.cyMinChild := bar.Height;
8354 bar.OnBandInfo( nil, pBandInfo );
8355 // band
\82Ì
\83C
\83\93\83f
\83b
\83N
\83X
\82ð
\92T
\82·
8357 for i := bar.Bands.Count - 1 downto 0 do begin
8358 if bar.Bands[ i ].Control.Handle = h then begin
8364 lResult := SendMessage( bar.Handle, RB_SETBANDINFO, i, Integer( pBandInfo ) );
8368 procedure TGikoForm.ListCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8370 Control: TWinControl;
8373 Control := FindControl(BandInfo^.hwndChild);
8374 if Control = nil then
8377 for i := ListCoolBar.Bands.Count - 1 downto 0 do begin
8378 if ListCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8379 idx := ListCoolBar.Bands[ i ].ID;
8383 if Control = ListToolBar then begin
8384 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8385 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8386 BandInfo^.cxMinChild := 0;
8387 BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
8388 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8390 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8391 BandInfo^.cxMinChild := 0;
8392 BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
8396 procedure TGikoForm.ListCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8401 ChevronPopupMenu.Items.Clear;
8402 Idx := RebarChevron^.uBand;
8403 if (Idx >= 0) and (ListCoolBar.Bands.Count > Idx) then begin
8404 if ListCoolBar.Bands[Idx].Control = ListToolBar then begin
8405 ToolBarChevronMenu(ListToolBar);
8408 p := ListCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8409 ChevronPopupMenu.Popup(p.x, p.y);
8413 procedure TGikoForm.BrowserCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8415 Control: TWinControl;
8418 Control := FindControl(BandInfo^.hwndChild);
8419 if Control = nil then
8422 for i := BrowserCoolBar.Bands.Count - 1 downto 0 do begin
8423 if BrowserCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8424 idx := BrowserCoolBar.Bands[ i ].ID;
8428 if Control = BrowserToolBar then begin
8429 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8430 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8431 BandInfo^.cxMinChild := 0;
8432 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
8433 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8435 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8436 BandInfo^.cxMinChild := 0;
8437 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
8441 procedure TGikoForm.BrowserCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8446 ChevronPopupMenu.Items.Clear;
8447 Idx := RebarChevron^.uBand;
8448 if (Idx >= 0) and (BrowserCoolBar.Bands.Count > Idx) then begin
8449 if BrowserCoolBar.Bands[Idx].Control = BrowserToolBar then
8450 ToolBarChevronMenu(BrowserToolBar)
8453 p := BrowserCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8454 ChevronPopupMenu.Popup(p.x, p.y);
8458 procedure TGikoForm.ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
8460 if Column^.iImage = -1 then begin
8461 Column^.mask := Column^.mask or LVCF_FMT;
8463 Column^.mask := Column^.mask or LVCF_FMT or LVCF_IMAGE;
8464 Column^.fmt := Column^.fmt or LVCFMT_IMAGE or LVCFMT_BITMAP_ON_RIGHT;
8468 procedure TGikoForm.ThreadEditorActionExecute(Sender: TObject);
8470 Editor: TEditorForm;
8472 if not (GetActiveList is TBoard) then
8474 Editor := TEditorForm.Create(Self);
8475 Editor.SetBoard(TBoard(GetActiveList));
8477 Editor.BodyEdit.SetFocus;
8480 procedure TGikoForm.ToolBarSettingActionExecute(Sender: TObject);
8482 Dlg: TToolBarSettingDialog;
8484 //Component: TComponent;
8486 Dlg := TToolBarSettingDialog.Create(Self, ActionList);
8488 Dlg.AddToolBar(StdToolBar, gttStandard);
8489 Dlg.AddToolBar(ListToolBar, gttList);
8490 Dlg.AddToolBar(BrowserToolBar, gttBrowser);
8491 case FToolBarSettingSender of
8492 tssMain: Dlg.ToolBarIndex := 0;
8493 tssList: Dlg.ToolBarIndex := 1;
8494 tssBrowser: Dlg.ToolBarIndex := 2;
8497 if ToolBarSettingAction.ActionComponent.GetParentComponent is TPopupMenu then begin
8498 Component := TPopupMenu( ToolBarSettingAction.ActionComponent.GetParentComponent ).PopupComponent;
8500 if Component = MainCoolBar then
8501 Dlg.ToolBarComboBox.ItemIndex := 0
8502 else if Component = ListCoolBar then
8503 Dlg.ToolBarComboBox.ItemIndex := 1
8504 else if Component = BrowserCoolBar then
8505 Dlg.ToolBarComboBox.ItemIndex := 2;
8508 if Dlg.ShowModal = mrOK then begin
8511 //
\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é
8512 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
8513 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth + 1;
8514 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth - 1;
8516 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
8517 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth + 1;
8518 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth - 1;
8520 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
8521 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth + 1;
8522 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth - 1;
8524 SaveToolBarSetting(StdToolBar);
8525 SaveToolBarSetting(ListToolBar);
8526 for i := ListToolBar.ControlCount - 1 downto 0 do
8528 if ListToolBar.Controls[ i ].Action = SelectItemAction then
8530 //
\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·
8531 if (i + 1) < ListToolBar.ControlCount then
8532 if ListToolBar.Controls[ i + 1 ] is TToolButton then
8533 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
8534 ListToolBar.Controls[ i + 1 ].Visible := False;
8536 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
8537 ListToolBar.Controls[ i ].Visible := False;
8538 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
8539 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
8540 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
8541 SelectComboBox.Parent := ListToolBar;
8542 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
8543 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
8544 SelectComboBoxSplitter.Parent := ListToolBar;
8549 ResetBandInfo( ListCoolBar, ListToolBar );
8550 SaveToolBarSetting(BrowserToolBar);
8554 FToolBarSettingSender := tssNone;
8558 function TGikoForm.FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
8563 for i := bar.ButtonCount - 1 downto 0 do begin
8564 if bar.Buttons[ i ].Action = action then begin
8565 Result := bar.Buttons[ i ];
8574 procedure TGikoForm.SetToolBarPopup;
8577 aIEButton : TToolButton;
8578 aCabinetBBSButton : TToolButton;
8579 aResRangeButton : TToolButton;
8580 aThreadRangeButton: TToolButton;
8582 for i := 0 to StdToolBar.ButtonCount - 1 do begin
8584 for i := 0 to ListToolBar.ButtonCount - 1 do begin
8585 if ListToolBar.Buttons[i].Action = IconStyle then
8586 ListToolBar.Buttons[i].DropdownMenu := ListIconPopupMenu;
8587 if ListToolBar.Buttons[i].Action = SelectReservAction then
8588 ListToolBar.Buttons[i].DropdownMenu := RoundNamePopupMenu;
8590 aIEButton := FindToolBarButton( BrowserToolBar, IEAction );
8591 if aIEButton <> nil then
8592 aIEButton.DropdownMenu := BrowserPopupMenu;
8593 aCabinetBBSButton := FindToolBarButton( StdToolBar, CabinetBBSAction );
8594 if aCabinetBBSButton <> nil then
8595 aCabinetBBSButton.DropdownMenu := BBSSelectPopupMenu;
8596 aResRangeButton := FindToolBarButton( BrowserToolBar, ResRangeAction );
8597 if aResRangeButton <> nil then
8598 aResRangeButton.DropdownMenu := ResRangePopupMenu;
8599 aThreadRangeButton:= FindToolBarButton( ListToolBar, ThreadRangeAction );
8600 if aThreadRangeButton <> nil then
8601 aThreadRangeButton.DropdownMenu := ThreadRangePopupMenu;
8604 procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState;
8605 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
8614 Wnd := WindowFromPoint(MousePos);
8616 if WheelDelta > 0 then
8621 if (Wnd = BrowserTab.Handle) or
8622 (Wnd = BrowserTab.Parent.Handle) then begin
8623 BrowserTab.ScrollTabs(Delta);
8624 end else if Wnd = ListView.Handle then begin
8625 if ListView.ViewStyle = vsList then
8626 ListView.Scroll( Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE, 0 )
8628 ListView.Scroll( 0, Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE );
8635 procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
8637 if Length( SelectComboBox.Text ) = 0 then
8639 AllItemAction.Checked := True;
8640 LogItemAction.Checked := False;
8641 NewItemAction.Checked := False;
8643 //
\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é
8644 if AllItemAction.Checked then
8645 AllItemAction.Checked := False;
8646 if LogItemAction.Checked then
8647 LogItemAction.Checked := False;
8648 if NewItemAction.Checked then
8649 NewItemaction.Checked := False;
8652 if Length( SelectComboBox.Text ) = 0 then
8653 SetListViewType( gvtAll )
8655 SetListViewType( gvtUser, SelectComboBox.Text, false);
8658 procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
8659 Shift: TShiftState);
8662 if Key = VK_Return then
8665 end else if Length( SelectComboBox.Text ) = 0 then
8667 AllItemAction.Checked := True;
8668 LogItemAction.Checked := False;
8669 NewItemAction.Checked := False;
8671 //
\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é
8672 if AllItemAction.Checked then
8673 AllItemAction.Checked := False;
8674 if LogItemAction.Checked then
8675 LogItemAction.Checked := False;
8676 if NewItemAction.Checked then
8677 NewItemaction.Checked := False;
8682 procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
8687 if Length( SelectComboBox.Text ) = 0 then
8689 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
8690 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
8695 //
\8di
\82è
\8d\9e\82Ý
\8c\9f\8dõ
\82Ì
\97\9a\97ð
\8dX
\90V
8696 procedure TGikoForm.ModifySelectList;
8703 if SelectComboBox.Parent = nil then
8706 if Length( SelectComboBox.Text ) > 0 then
8708 oldText := SelectComboBox.Text;
8709 idx := GikoSys.Setting.SelectTextList.IndexOf( oldText );
8711 GikoSys.Setting.SelectTextList.Delete( idx );
8712 idx := SelectComboBox.Items.IndexOf( oldText );
8714 SelectComboBox.Items.Delete( idx );
8715 GikoSys.Setting.SelectTextList.Insert( 0, oldText );
8716 SelectComboBox.Items.Insert( 0, oldText );
8717 SelectComboBox.Text := oldText;
8725 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\8dÄ
\93Ç
\82Ý
\8d\9e\82Ý
\82·
\82é
8726 procedure TGikoForm.SelectResActionExecute(Sender: TObject);
8728 Dlg: TListSelectDialog;
8729 ThreadItem : TThreadItem;
8730 FilterList : TStringList;
8733 Dlg := TListSelectDialog.Create(Self);
8735 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
8736 Dlg.SelectComboBox.Text := FSelectResWord;
8738 if Dlg.ModalResult = mrOK then begin
8739 SelectResAction.Checked := True;
8740 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
8741 //
\8bó
\93ü
\97Í
\82Å OK
\82Í
\8di
\82è
\8d\9e\82Ý
\89ð
\8f\9c\82Æ
\93¯
\88Ó
\8b`
8742 ResRangeAction.Execute;
8744 GikoSys.ResRange := Ord( grrSelect );
8746 //
\8dÅ
\8cã
\82É
\90Ý
\92è
\82µ
\82½
\82à
\82Ì
\82ð
\8ao
\82¦
\82Ä
\82¨
\82
8747 FSelectResWord := Dlg.SelectComboBox.Text;
8749 //
\8c\9f\8dõ
\97\9a\97ð
\82Ì
\8dX
\90V
8750 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
8752 GikoSys.Setting.SelectTextList.Delete(idx);
8753 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
8754 while Dlg.SelectComboBox.Items.Count > 100 do begin
8755 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
8759 if SelectComboBox.Parent <> nil then
8760 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
8764 //
\83t
\83B
\83\8b\83^
\82Ì
\90Ý
\92è
8765 FilterList := TStringList.Create;
8767 GikoSys.FSelectResFilter.Reverse := True;
8768 FilterList.Delimiter := ' '; //
\8bæ
\90Ø
\82è
\8eq
\82ð
\94¼
\8ap
\83X
\83y
\81[
\83X
\82É
\90Ý
\92è
8769 FilterList.DelimitedText := Dlg.SelectComboBox.Text;
8771 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8776 //
\83X
\83\8c\83b
\83h
\82Ì
\8dÄ
\95`
\89æ
8777 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
8778 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8780 ThreadItem := GetActiveContent;
8781 if ThreadItem <> nil then
8782 InsertBrowserTab( ThreadItem, True );
8785 //
\83L
\83\83\83\93\83Z
\83\8b
8786 if GikoSys.ResRange <> Ord( grrSelect ) then
8787 ResRangeAction.Execute;
8795 procedure TGikoForm.SelectResActionUpdate(Sender: TObject);
8797 SelectResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
8800 procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;
8801 Shift: TShiftState);
8805 //
\91S
\82Ä
\82Ì
\83\8c\83X
\82ð
\95\
\8e¦
8806 procedure TGikoForm.AllResActionExecute(Sender: TObject);
8808 ThreadItem : TThreadItem;
8809 FilterList : TStringList;
8812 if(FActiveContent <> nil) and (FActiveContent.FBrowser <> nil )
8813 and (FActiveContent.FBrowser.Busy) then Exit;
8815 FResRangeMenuSelect := Ord( grrAll );
8816 AllResAction.Checked := True;
8818 if GikoSys.ResRange <> Ord( grrAll ) then begin
8819 GikoSys.ResRange := Ord( grrAll );
8821 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
8822 FilterList := TStringList.Create;
8824 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8825 GikoSys.FSelectResFilter.Reverse := False;
8830 FSelectResWord := '';
8832 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
8833 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
8834 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8836 ThreadItem := GetActiveContent;
8837 if ThreadItem <> nil then
8838 InsertBrowserTab( ThreadItem, True );
8842 procedure TGikoForm.AllResActionUpdate(Sender: TObject);
8844 AllResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
8847 procedure TGikoForm.ReloadClick(Sender: TObject);
8849 ThreadItem : TThreadItem;
8852 if GikoSys.FAbon.ReLoadFromNGwordFile =false then begin
8853 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);
8855 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8856 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8858 ThreadItem := GetActiveContent;
8859 if ThreadItem <> nil then
8860 InsertBrowserTab( ThreadItem, True );
8865 procedure TGikoForm.GoBackClick(Sender: TObject);
8867 ThreadItem : TThreadItem;
8871 if GikoSys.FAbon.GoForward =false then begin
8872 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);
8874 s := GikoSys.FAbon.NGwordname;
8875 StatusBar.Panels.Items[2].Text := s;
8876 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8877 StatusBarResize(Sender);
8878 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8879 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8881 ThreadItem := GetActiveContent;
8882 if ThreadItem <> nil then
8883 InsertBrowserTab( ThreadItem, True );
8888 procedure TGikoForm.GoFowardClick(Sender: TObject);
8890 ThreadItem : TThreadItem;
8894 if GikoSys.FAbon.GoBack =false then begin
8895 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);
8897 s := GikoSys.FAbon.NGwordname;
8898 StatusBar.Panels.Items[2].Text := s;
8899 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8900 StatusBarResize(Sender);
8901 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8902 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8904 ThreadItem := GetActiveContent;
8905 if ThreadItem <> nil then
8906 InsertBrowserTab( ThreadItem, True );
8911 procedure TGikoForm.SelectComboBoxSplitterMouseMove(Sender: TObject;
8912 Shift: TShiftState; X, Y: Integer);
8917 If (SelectComboBox.Parent <> nil) and (IsDraggingSelectComboBox) Then begin
8920 pos := SelectComboBoxSplitter.ClientToScreen( pos );
8921 w := SelectComboBox.Width + (pos.X - DraggingSelectComboBoxPosition.X);
8923 If w <= 50 Then Begin
8924 //
\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
8925 //
\81u
\8e~
\82Ü
\82Á
\82½(50pixel)
\88Ê
\92u
\81v
\82É
\82È
\82é
\82æ
\82¤
\82É
8926 pos.X := pos.X + (50 - w);
8928 //
\8f¬
\82³
\82
\82È
\82è
\82·
\82¬
\82È
\82¢
\82æ
\82¤
\82É
8932 //
\83`
\83\89\82Â
\82«
\8cy
\8c¸
\82Ì
\88×
8933 If SelectComboBox.Width <> w Then Begin
8934 SelectComboBox.Width := w;
8935 GikoSys.Setting.SelectComboBoxWidth := w;
8936 DraggingSelectComboBoxPosition := pos;
8938 //
\83V
\83F
\83u
\83\8d\83\93\88Ê
\92u
\82ª
\95Ï
\82í
\82é
\82Ì
\82Å BandInfo
\82Ì
\8dÄ
\90Ý
\92è
8939 ResetBandInfo( ListCoolBar, ListToolBar );
8944 procedure TGikoForm.SelectComboBoxSplitterMouseDown(Sender: TObject;
8945 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8949 IsDraggingSelectComboBox := True;
8952 DraggingSelectComboBoxPosition := SelectComboBoxSplitter.ClientToScreen( pos );
8955 procedure TGikoForm.SelectComboBoxSplitterMouseUp(Sender: TObject;
8956 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8958 IsDraggingSelectComboBox := False;
8961 procedure TGikoForm.StatusBarResize(Sender: TObject);
8963 StatusBar.Panels[1].Width := StatusBar.Width -
8964 StatusBar.Panels[0].Width -
8965 StatusBar.Panels[2].Width;
8967 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\92Ê
\8fí
\81v
8968 procedure TGikoForm.IndividualAbon1Click(Sender: TObject);
8970 ThreadItem : TThreadItem;
8973 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,1);
8974 ThreadItem := GetActiveContent;
8975 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8976 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8978 if ThreadItem <> nil then
8979 InsertBrowserTab( ThreadItem, True );
8981 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\93§
\96¾
\81v
8982 procedure TGikoForm.IndividualAbon2Click(Sender: TObject);
8984 ThreadItem : TThreadItem;
8987 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,0);
8988 ThreadItem := GetActiveContent;
8989 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8990 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8991 if ThreadItem <> nil then
8992 InsertBrowserTab( ThreadItem, True );
8994 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c\81i
\81j
8995 procedure TGikoForm.AntiIndividualAbonClick(Sender: TObject);
8997 ThreadItem : TThreadItem;
9001 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
9002 GikoSys.FAbon.DeleteIndividualAbon(KokoPopupMenu.Tag);
9003 ThreadItem := GetActiveContent;
9004 for i := BrowserTab.Tabs.Count - 1 downto 0 do
9005 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
9006 if ThreadItem <> nil then
9007 InsertBrowserTab( ThreadItem, True );
9009 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
9010 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
9013 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c
9014 procedure TGikoForm.N42Click(Sender: TObject);
9016 IndividualForm :TIndividualAbonForm;
9017 ThreadItem : TThreadItem;
9021 IndividualForm := TIndividualAbonForm.Create(Self);
9023 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
9024 for i :=0 to GikoSys.FAbon.GetAbonResCount-1 do begin
9025 IndividualForm.ComboBox1.Items.Add(GikoSys.FAbon.GetAbonResString(i));
9027 if IndividualForm.ShowModal = mrOK then begin
9028 GikoSys.FAbon.DeleteIndividualAbon(IndividualForm.ResNumber);
9030 for i := BrowserTab.Tabs.Count - 1 downto 0 do
9031 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
9032 ThreadItem := GetActiveContent;
9033 if ThreadItem <> nil then
9034 InsertBrowserTab( ThreadItem, True );
9036 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
9037 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
9040 IndividualForm.Free;
9044 procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
9047 if (Length( SelectComboBox.Text ) = 0) or
9048 (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
9050 SelectComboBox.Text := '';
9051 SelectComboBox.Color := clWindow;
9056 procedure TGikoForm.N51Click(Sender: TObject);
9060 //
\94Â
\96¼
\8c\9f\8dõ
9061 procedure TGikoForm.TreeSelectSearchBoardNameExecute(Sender: TObject);
9065 CurItem : TTreeNode;
9068 if InputQuery('
\94Â
\96¼
\8c\9f\8dõ','
\94Â
\96¼
\82Ì
\93ü
\97Í',s) then begin
9071 if TreeView.Selected = nil then
9072 CurItem := TreeView.Items.GetFirstNode
9074 CurItem := TreeView.Selected.GetNext;
9075 if CurItem = nil then
9076 CurItem := TreeView.Items.GetFirstNode;
9078 while CurItem <> nil do begin
9079 if (CurItem.ImageIndex <> 2) and (VaguePos(s,CurItem.Text) <> 0) then begin
9082 CurItem := CurItem.GetNext;
9085 if CurItem = nil then begin
9086 msg := '
\90æ
\93ª
\82É
\96ß
\82è
\82Ü
\82·
\82©
\81H';
9087 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
9088 CurItem := TreeView.Items.GetFirstNode;
9092 TreeView.Select(CurItem);
9095 TreeView.Select(CurItem);
9097 msg := '
\8e\9f\82É
\8ds
\82«
\82Ü
\82·
\82©
\81H';
9098 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
9112 procedure TGikoForm.CabinetFavoriteActionExecute(Sender: TObject);
9118 if CabinetPanel.Visible then begin
9119 if FTreeType = gttFavorite then begin
9120 CabinetVisible( False );
9121 CabinetFavoriteAction.Checked := False;
9123 CabinetFavoriteAction.Checked := True;
9126 CabinetVisible( True );
9127 CabinetFavoriteAction.Checked := True;
9130 // BBS...BBS, History, Favorite
9131 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 1;
9133 b := CabinetSelectPopupMenu.Items.Count - 1;
9134 for i := 0 to b do begin
9135 item := CabinetSelectPopupMenu.Items[ i ];
9136 if item is TBBSMenuItem then begin
9137 item.Checked := False;
9138 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
9139 CabinetMenu.Items[ i ].Checked := False;
9143 //
\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Ö
9144 HistoryToolBar.Hide;
9145 FavoriteToolBar.Show;
9146 TreeView.Visible := False;
9147 FavoriteTreeView.Visible := True;
9149 CabinetSelectToolButton.Caption := '
\82¨
\8bC
\82É
\93ü
\82è';
9150 FTreeType := gttFavorite;
9152 //
\83\81\83j
\83\85\81[
\8by
\82Ñ
\83{
\83^
\83\93\82Ì
\83`
\83F
\83b
\83N
\82ð
\90Ý
\92è
9153 CabinetBBSAction.Checked := False;
9154 CabinetHistoryAction.Checked := False;
9156 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\83c
\83\8a\81[
\82ð
\93W
\8aJ
9157 FavoriteTreeView.Items.GetFirstNode.Expanded := True;
9161 procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
9164 if (SenderNode = nil) or (SourceNode = nil) or (SenderNode = SourceNode) then
9167 if TObject(SenderNode.Data) is TFavoriteFolder then
9168 SourceNode.MoveTo(SenderNode, naAddChild)
9170 SourceNode.MoveTo(SenderNode, naInsert);
9174 procedure TGikoForm.FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
9178 FavoBoardItem: TFavoriteBoardItem;
9179 FavoThreadItem: TFavoriteThreadItem;
9181 ThreadItem: TThreadItem;
9184 if (SenderNode = nil) or (Source = nil) then
9187 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
9188 FavNode := SenderNode.Parent
9190 FavNode := SenderNode;
9194 if Source is TBoard then begin
9195 Board := TBoard( Source );
9196 FavoBoardItem := TFavoriteBoardItem.CreateWithItem( Board );
9197 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, FavoBoardItem);
9198 Node.ImageIndex := 15;
9199 Node.SelectedIndex := 15;
9200 end else if Source is TFavoriteBoardItem then begin
9201 FavoBoardItem := TFavoriteBoardItem( Source );
9202 Board := FavoBoardItem.Item;
9203 if Board <> nil then
9204 if not Board.IsThreadDatRead then
9205 GikoSys.ReadSubjectFile(Board);
9206 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, Source);
9207 Node.ImageIndex := 15;
9208 Node.SelectedIndex := 15;
9209 end else if Source is TThreadItem then begin
9210 ThreadItem := TThreadItem( Source );
9211 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
9212 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
9213 Node.ImageIndex := 16;
9214 Node.SelectedIndex := 16;
9215 end else if Source is TBrowserRecord then begin
9216 ThreadItem := TBrowserRecord( Source ).FThread;
9217 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
9218 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
9219 Node.ImageIndex := 16;
9220 Node.SelectedIndex := 16;
9221 end else if Source is TFavoriteThreadItem then begin
9222 FavoThreadItem := TFavoriteThreadItem( Source );
9223 ThreadItem := FavoThreadItem.Item;
9224 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, Source);
9225 Node.ImageIndex := 16;
9226 Node.SelectedIndex := 16;
9229 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
9231 FavoriteMoveTo( SenderNode, Node );
9235 procedure TGikoForm.FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
9238 SourceNode: TTreeNode;
9239 LinkToolButton: TLinkToolButton;
9242 if SenderNode = nil then
9245 if not (TObject( SenderNode.Data ) is TFavoriteFolder) then
9246 if FDropSpaceNode <> nil then
9247 SenderNode := FDropSpaceNode;
9249 if Source = FavoriteTreeView then begin
9251 SourceNode := FavoriteTreeView.Selected;
9252 FavoriteMoveTo( SenderNode, SourceNode );
9254 end else if Source is TLinkToolButton then begin
9256 LinkToolButton := TLinkToolButton( Source );
9257 //ShowMessage(LinkToolButton.Text);
9258 SourceNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data );
9259 FavoriteMoveTo( SenderNode, SourceNode );
9261 end else if Source = BrowserTab then begin
9263 idx := BrowserTab.TabIndex;
9264 FavoriteAddTo( SenderNode, BrowserTab.Tabs.Objects[idx] );
9265 end else if Source = ListView then begin
9267 FavoriteAddTo( SenderNode, ListView.Selected.Data );
9269 end else if Source = TreeView then begin
9271 FavoriteAddTo( SenderNode, TreeView.Selected.Data );
9279 procedure TGikoForm.FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
9282 SenderNode: TTreeNode;
9285 SenderNode := FavoriteTreeView.GetNodeAt(X, Y);
9286 if SenderNode <> nil then begin
9287 FavoriteDragDrop( SenderNode, Source );
9290 if FDropSpaceNode <> nil then begin
9291 FDropSpaceNode.Free;
9292 FDropSpaceNode := nil;
9297 procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
9298 Node: TTreeNode; var S: String);
9301 FavoriteTreeView.ReadOnly := True;
9306 procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
9307 Shift: TShiftState);
9313 FClickNode := FavoriteTreeView.Selected;
9314 FavoriteTreeViewRenameActionExecute( Sender );
9318 FClickNode := FavoriteTreeView.Selected;
9319 FavoriteTreeViewDeleteActionExecute( Sender );
9323 FavoriteClick( FavoriteTreeView.Selected );
9324 FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
9327 FavoriteTreeViewDblClick( Sender );
9332 procedure TGikoForm.FavoriteTreePopupMenuPopup(Sender: TObject);
9335 LinkToolButton: TLinkToolButton;
9338 if FavoriteTreePopupMenu.PopupComponent = FavoriteTreeView then begin
9340 FClickNode := FavoriteTreeView.Selected;
9342 end else if FavoriteTreePopupMenu.PopupComponent is TLinkToolButton then begin
9344 LinkToolButton := TLinkToolButton( FavoriteTreePopupMenu.PopupComponent );
9345 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
9346 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
9347 FClickNode := FavoriteTreeView.Items[i];
9351 for i := 0 to FClickNode.Count - 1 do begin
9352 if FClickNode.Item[i].Data = LinkToolButton.Data then begin
9353 FClickNode := FClickNode.Item[i];
9360 if FClickNode = nil then begin
9361 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9362 FavoriteTreeDeletePopupMenu.Visible := False;
9363 FavoriteTreeRenamePopupMenu.Visible := False;
9364 FavoriteTreeNewFolderPopupMenu.Visible := False;
9365 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9366 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9367 FavoriteTreeURLCopyPopupMenu.Visible := False;
9368 FavoriteTreeNameCopyPopupMenu.Visible := False;
9369 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9370 FavoriteTreeReloadPopupMenu.Visible := False;
9371 FavoriteTreeLogDeletePopupMenu.Visible := False;
9372 end else if FClickNode.IsFirstNode then begin
9373 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9374 FavoriteTreeDeletePopupMenu.Visible := False;
9375 FavoriteTreeRenamePopupMenu.Visible := False;
9376 FavoriteTreeNewFolderPopupMenu.Visible := True;
9377 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9378 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9379 FavoriteTreeURLCopyPopupMenu.Visible := False;
9380 FavoriteTreeNameCopyPopupMenu.Visible := True;
9381 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9382 FavoriteTreeReloadPopupMenu.Visible := False;
9383 FavoriteTreeLogDeletePopupMenu.Visible := False;
9384 end else if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
9385 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9386 FavoriteTreeDeletePopupMenu.Visible := True;
9387 FavoriteTreeRenamePopupMenu.Visible := False;
9388 FavoriteTreeNewFolderPopupMenu.Visible := True;
9389 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9390 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9391 FavoriteTreeURLCopyPopupMenu.Visible := False;
9392 FavoriteTreeNameCopyPopupMenu.Visible := True;
9393 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9394 FavoriteTreeReloadPopupMenu.Visible := False;
9395 FavoriteTreeLogDeletePopupMenu.Visible := False;
9396 end else if TObject(FClickNode.Data) is TFavoriteFolder then begin
9397 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9398 FavoriteTreeDeletePopupMenu.Visible := True;
9399 FavoriteTreeRenamePopupMenu.Visible := True;
9400 FavoriteTreeNewFolderPopupMenu.Visible := True;
9401 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9402 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9403 FavoriteTreeURLCopyPopupMenu.Visible := False;
9404 FavoriteTreeNameCopyPopupMenu.Visible := True;
9405 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9406 FavoriteTreeReloadPopupMenu.Visible := False;
9407 FavoriteTreeLogDeletePopupMenu.Visible := False;
9408 end else if TObject(FClickNode.Data) is TFavoriteThreadItem then begin
9409 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9410 FavoriteTreeDeletePopupMenu.Visible := True;
9411 FavoriteTreeRenamePopupMenu.Visible := True;
9412 FavoriteTreeNewFolderPopupMenu.Visible := True;
9413 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
9414 //FavoriteTreeBrowseThreadPopupMenu.Visible := True;
9415 FavoriteTreeURLCopyPopupMenu.Visible := True;
9416 FavoriteTreeNameCopyPopupMenu.Visible := True;
9417 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
9418 FavoriteTreeReloadPopupMenu.Visible := True;
9419 FavoriteTreeLogDeletePopupMenu.Visible := True;
9420 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
9421 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9422 FavoriteTreeDeletePopupMenu.Visible := True;
9423 FavoriteTreeRenamePopupMenu.Visible := True;
9424 FavoriteTreeNewFolderPopupMenu.Visible := True;
9425 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
9426 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9427 FavoriteTreeURLCopyPopupMenu.Visible := True;
9428 FavoriteTreeNameCopyPopupMenu.Visible := True;
9429 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
9430 FavoriteTreeReloadPopupMenu.Visible := True;
9431 FavoriteTreeLogDeletePopupMenu.Visible := False;
9433 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9434 FavoriteTreeDeletePopupMenu.Visible := False;
9435 FavoriteTreeRenamePopupMenu.Visible := False;
9436 FavoriteTreeNewFolderPopupMenu.Visible := False;
9437 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9438 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9439 FavoriteTreeURLCopyPopupMenu.Visible := False;
9440 FavoriteTreeNameCopyPopupMenu.Visible := False;
9441 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9442 FavoriteTreeReloadPopupMenu.Visible := False;
9443 FavoriteTreeLogDeletePopupMenu.Visible := False;
9448 procedure TGikoForm.FavoriteTreeViewDeleteActionExecute(Sender: TObject);
9450 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';
9451 DEL_MSG = '
\81g^0
\81h
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
9452 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
9455 if FClickNode = nil then
9457 if FClickNode.IsFirstNode then
9459 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
9460 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
9461 if MsgBox(Handle, DEL_LINK_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
9464 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
9469 //FDeleteList.Add(FClickNode.Data);
9470 //SetDeleteItemList(FClickNode);
9478 procedure TGikoForm.FavoriteTreeViewRenameActionExecute(Sender: TObject);
9483 if FClickNode = nil then
9485 if FClickNode.IsFirstNode then
9487 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then
9489 FavoriteTreeView.ReadOnly := False;
9490 if (FTreeType = gttFavorite) and (CabinetPanel.Visible) then begin
9491 node := FClickNode.Parent;
9492 while node <> nil do begin
9493 node.Expanded := True;
9494 node := node.Parent;
9496 FClickNode.EditText;
9498 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 );
9505 procedure TGikoForm.FavoriteTreeViewNewFolderActionExecute(
9508 NewFavFolder: TFavoriteFolder;
9512 if FClickNode = nil then
9516 if not (TObject(FClickNode.Data) is TFavoriteFolder) then begin
9517 FavoriteTreeView.Selected := FClickNode.Parent;
9518 FClickNode := FClickNode.Parent;
9521 NewFavFolder := TFavoriteFolder.Create;
9522 Node := FavoriteTreeView.Items.AddChildObject(FClickNode, '
\90V
\82µ
\82¢
\83t
\83H
\83\8b\83_', NewFavFolder);
9523 Node.ImageIndex := 14;
9524 Node.SelectedIndex := 14;
9525 // FClickNode.Selected.Expanded := True;
9526 FavoriteTreeView.Selected := Node;
9528 FavoriteTreeViewRenameAction.Execute;
9534 procedure TGikoForm.ToolButton19Click(Sender: TObject);
9537 FavoriteArrangeActionExecute( nil );
9541 procedure TGikoForm.FavoriteBrowseFolder( node: TTreeNode );
9546 if not (TObject(node.Data) is TFavoriteFolder) then
9549 for i := 0 to node.Count - 1 do
9551 if TObject(node.Item[i].Data) is TFavoriteFolder then
9552 FavoriteBrowseFolder( node.Item[i] )
9553 else if TObject(node.Item[i].Data) is TFavoriteThreadItem then
9554 FavoriteClick( node.Item[i], False );
9559 procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
9563 FavoriteBrowseFolder( FClickNode );
9564 //BrowserTab.OnChange(nil);
9568 procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
9571 FClickNode := FavoriteTreeView.Selected;
9572 FavoriteTreeViewReloadActionExecute( Sender );
9576 procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
9579 DEL_MSG = '
\81g^0
\81h
\82Ì
\83\8d\83O
\82ð
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
9580 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
9582 ThreadItem: TThreadItem;
9583 FavThread: TFavoriteThreadItem;
9586 if FClickNode = nil then Exit;
9587 if not (TObject(FClickNode.Data) is TFavoriteThreadItem) then Exit;
9589 FavThread := TFavoriteThreadItem( FClickNode.Data );
9590 ThreadItem := FavThread.Item;
9593 if GikoSys.Setting.DeleteMsg then begin
9594 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
9595 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
9599 DeleteHistory(ThreadItem);
9600 DeleteTab(ThreadItem);
9601 ThreadItem.DeleteLogFile;
9609 procedure TGikoForm.FavoriteTreeViewReloadActionExecute(Sender: TObject);
9611 ThreadItem: TThreadItem;
9612 FavThread: TFavoriteThreadItem;
9614 FavBoard: TFavoriteBoardItem;
9618 if FClickNode = nil then Exit;
9620 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
9622 if TObject( FClickNode.Data ) is TFavoriteThreadItem then begin
9623 FavThread := TFavoriteThreadItem( FClickNode.Data );
9624 ThreadItem := FavThread.Item;
9625 if ThreadItem <> nil then
9626 DownloadContent(ThreadItem, shiftDown);
9627 end else if TObject( FClickNode.Data ) is TFavoriteBoardItem then begin
9628 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9629 Board := FavBoard.Item;
9630 DownloadList(Board, shiftDown);
9635 procedure TGikoForm.FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
9637 FavThread : TFavoriteThreadItem;
9638 FavBoard : TFavoriteBoardItem;
9642 if FClickNode = nil then Exit;
9644 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9646 FavThread := TFavoriteThreadItem( FClickNode.Data );
9647 s := FavThread.URL + #13#10;
9649 Clipboard.AsText := s;
9651 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9653 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9654 s := FavBoard.URL + #13#10;
9656 Clipboard.AsText := s;
9662 procedure TGikoForm.FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
9664 ThreadItem: TThreadItem;
9665 FavThread: TFavoriteThreadItem;
9667 FavBoard: TFavoriteBoardItem;
9671 if FClickNode = nil then Exit;
9673 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9675 FavThread := TFavoriteThreadItem( FClickNode.Data );
9676 ThreadItem := FavThread.Item;
9679 s := ThreadItem.Title + #13#10;
9681 Clipboard.AsText := s;
9685 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9687 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9688 Board := FavBoard.Item;
9689 if Board <> nil then
9690 if not Board.IsThreadDatRead then
9691 GikoSys.ReadSubjectFile(Board);
9694 s := Board.Title + #13#10;
9696 Clipboard.AsText := s;
9704 procedure TGikoForm.FavoriteTreeViewNameURLCopyActionExecute(
9707 ThreadItem: TThreadItem;
9708 FavThread: TFavoriteThreadItem;
9710 FavBoard: TFavoriteBoardItem;
9714 if FClickNode = nil then Exit;
9716 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9718 FavThread := TFavoriteThreadItem( FClickNode.Data );
9719 ThreadItem := FavThread.Item;
9722 s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10;
9724 Clipboard.AsText := s;
9728 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9730 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9731 Board := FavBoard.Item;
9732 if Board <> nil then
9733 if not Board.IsThreadDatRead then
9734 GikoSys.ReadSubjectFile(Board);
9737 s := Board.URL + #13#10 + Board.Title + #13#10;
9739 Clipboard.AsText := s;
9747 function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
9753 for i := 0 to Node.Count - 1 do begin
9754 if Node.Item[i].Data = FindPointer then begin
9755 Result := Node.Item[i];
9757 end else if Node.Item[i].Count > 0 then begin
9758 Found := TreeNodeDataFind( Node.Item[i], FindPointer );
9759 if Found <> nil then begin
9770 procedure TGikoForm.LinkToolBarDragDrop(Sender, Source: TObject; X,
9774 SenderNode: TTreeNode;
9778 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
9779 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
9780 SenderNode := FavoriteTreeView.Items[i];
9785 FavoriteDragDrop( SenderNode, Source );
9789 procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
9790 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
9792 if FDragWFirst <> true then begin
9793 FDragWFirst := false;
9794 end else if (X = FMouseDownPos.X) and (Y = FMouseDownPos.Y) then begin
9795 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
9796 if GikoSys.Setting.ListWidthState = glsMin then begin
9797 BrowserMaxAndFocusAction.Execute;
9800 if GikoSys.Setting.ListHeightState = glsMin then begin
9801 BrowserMaxAndFocusAction.Execute;
9807 procedure TGikoForm.LinkToolBarDragOver(Sender, Source: TObject; X,
9808 Y: Integer; State: TDragState; var Accept: Boolean);
9811 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
9815 procedure TGikoForm.ResRangeActionExecute(Sender: TObject);
9817 case FResRangeMenuSelect of
9818 Ord( grrAll ): AllResAction.Execute;
9819 Ord( grrKoko ): OnlyKokoResAction.Execute;
9820 Ord( grrNew ): OnlyNewResAction.Execute;
9821 100: OnlyAHundredResAction.Execute;
9825 procedure TGikoForm.FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
9829 if FDropSpaceNode <> nil then begin
9830 FDropSpaceNode.Free;
9831 FDropSpaceNode := nil;
9837 procedure TGikoForm.ListCoolBarContextPopup(Sender: TObject;
9838 MousePos: TPoint; var Handled: Boolean);
9841 FToolBarSettingSender := tssList;
9842 MousePos := ListCoolBar.ClientToScreen( MousePos );
9843 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9847 procedure TGikoForm.MainCoolBarContextPopup(Sender: TObject;
9848 MousePos: TPoint; var Handled: Boolean);
9851 FToolBarSettingSender := tssMain;
9852 MousePos := MainCoolBar.ClientToScreen( MousePos );
9853 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9857 procedure TGikoForm.BrowserCoolBarContextPopup(Sender: TObject;
9858 MousePos: TPoint; var Handled: Boolean);
9861 FToolBarSettingSender := tssBrowser;
9862 MousePos := BrowserCoolBar.ClientToScreen( MousePos );
9863 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9866 procedure TGikoForm.ExportFavoriteFileAccept(Sender: TObject);
9869 if FavoriteDM.SaveFavoriteFile( ExportFavoriteFile.Dialog.FileName ) Then begin
9870 ShowMessage('
\83t
\83@
\83C
\83\8b\82ð
\8fo
\97Í
\82µ
\82Ü
\82µ
\82½');
9872 ShowMessage('
\83t
\83@
\83C
\83\8b\82Ì
\8fo
\97Í
\82É
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½');
9875 procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
9877 if FListViewBackGroundColor <> value then begin
9878 FListViewBackGroundColor := value;
9879 ListView.Color := FListViewBackGroundColor;
9882 procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
9884 ExportFavoriteFile.Dialog.FileName := FavoriteDM.GetFavoriteFilePath;
9887 procedure TGikoForm.CabinetBBSActionExecute(Sender: TObject);
9890 if CabinetPanel.Visible then begin
9891 if FTreeType = gtt2ch then begin
9892 CabinetVisible( False );
9894 CabinetBBSAction.Checked := False;
9896 CabinetBBSAction.Checked := True;
9899 CabinetVisible( True );
9900 CabinetBBSAction.Checked := True;
9903 if FActiveBBS = nil then
9904 ShowBBSTree( BBSs[ 0 ] )
9906 ShowBBSTree( FActiveBBS );
9910 procedure TGikoForm.FavoriteTreeViewBrowseThreadActionExecute(
9913 threadItem : TThreadItem;
9916 if FClickNode = nil then Exit;
9918 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9920 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9921 if threadItem = nil then
9923 GikoSys.OpenBrowser( threadItem.URL, gbtAuto );
9929 procedure TGikoForm.FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
9931 threadItem : TThreadItem;
9935 if FClickNode = nil then Exit;
9937 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9939 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9940 if threadItem = nil then
9942 GikoSys.OpenBrowser( threadItem.ParentBoard.URL, gbtAuto );
9944 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9946 boardItem := TFavoriteBoardItem( FClickNode.Data ).Item;
9947 if boardItem = nil then
9949 GikoSys.OpenBrowser( boardItem.URL, gbtAuto );
9955 procedure TGikoForm.UpBoardActionExecute(Sender: TObject);
9958 SelectTreeNode( GetActiveContent.ParentBoard, True );
9962 procedure TGikoForm.UpBoardActionUpdate(Sender: TObject);
9965 UpBoardAction.Enabled := GetActiveContent <> nil;
9969 procedure TGikoForm.BrowserTabContextPopup(Sender: TObject;
9970 MousePos: TPoint; var Handled: Boolean);
9974 idx := BrowserTab.IndexOfTabAt(MousePos.X, MousePos.Y);
9975 if BrowserTab.TabIndex <> idx then begin
9976 BrowserTab.TabIndex := idx;
9977 BrowserTab.OnChange(nil);
9982 procedure TGikoForm.KoreCopyExecute(Sender: TObject);
9984 KonoresCopy(KokoPopupMenu.Tag, true);
9986 procedure TGikoForm.KonoresCopy(Number: Integer; ReplaceTag : Boolean);
9988 ThreadItem: TThreadItem;
9994 boardPlugIn : TBoardPlugIn;
9996 if Number = 0 then Exit;
9997 ThreadItem := GetActiveContent;
9999 if ThreadItem <> nil then begin
10000 if ThreadItem.IsBoardPlugInAvailable then begin
10001 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
10002 boardPlugIn := ThreadItem.BoardPlugIn;
10004 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
10005 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
10006 //
\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
10007 tmp := boardPlugIn.GetDat( DWORD( threadItem ), Number );
10009 FileName := ThreadItem.FilePath;
10010 tmp := GikoSys.ReadThreadFile(FileName, Number);
10012 if tmp <> '' then begin
10013 Res := GikoSys.DivideStrLine(tmp);
10015 Header := IntToStr(Number) + '
\81F' + Res.FName + '
\81F' + Res.FDateTime + #13#10;
10016 if ReplaceTag then begin
10017 Header := CustomStringReplace(Header, '</b>', '',true);
10018 Header := CustomStringReplace(Header, '<b>', '',true);
10020 if ThreadItem.IsBoardPlugInAvailable then begin
10021 Body := CustomStringReplace(Res.FBody, '<br>', #13#10,true);
10022 Body := CustomStringReplace(Body, '<br>', #13#10,true);
10024 Body := CustomStringReplace(Res.FBody, ' <br> ', #13#10,true);
10025 Body := CustomStringReplace(Body, ' <br>', #13#10,true);
10026 Body := CustomStringReplace(Body, '<br> ', #13#10,true);
10027 Body := CustomStringReplace(Body, '<br>', #13#10,true);
10030 Body := CustomStringReplace(Body, '</a>', '',true);
10032 Body := GikoSys.DeleteLink(Body);
10033 if ReplaceTag then begin
10034 Body := CustomStringReplace(Body, '<', '<');
10035 Body := CustomStringReplace(Body, '>', '>');
10036 Body := CustomStringReplace(Body, '"', '"');
10037 Body := CustomStringReplace(Body, '&', '&');
10038 //Body := CustomStringReplace(Body, ' ', ' ');
10041 Header := Header + Body;
10043 Clipboard.SetTextBuf( PChar(Header) );
10049 procedure TGikoForm.BrowserTabPopupMenuPopup(Sender: TObject);
10051 AddRoundNameMenu(dummy1);
10054 procedure TGikoForm.FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
10056 FavoriteDM.URLReplace(oldURLs, newURLs);
10059 procedure TGikoForm.RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
10061 RoundList.URLReplace(oldURLs, newURLs);
10064 procedure TGikoForm.TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
10068 tempString: string;
10071 oldBoardName: string;
10073 newBoardName: string;
10074 TabList: TStringList;
10076 TabList := TStringList.Create;
10077 if oldURLs.Count <> newURLs.Count then
10079 //
\82±
\82±
\82©
\82ç
\81ABoard
\82ÌURL
\82Ì
\95Ï
\8dX
10080 for j :=0 to oldURLs.Count - 1 do begin
10081 for i :=0 to TabList.Count - 1 do begin
10082 if TabList.Text = oldURLs[j] then
10083 TabList.Text := newURLs[j];
10086 //
\82±
\82±
\82Ü
\82Å
\81ABoard
\82ÌURL
\82Ì
\95Ï
\8dX
10088 //
\82±
\82±
\82©
\82ç
\81AThread
\82ÌURL
\82Ì
\95Ï
\8dX
10089 //
\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
10090 for i := 0 to oldURLs.Count - 1 do begin
10091 tmpURL := Copy(oldURLs[i], 1, Length(oldURLs[i]) -1);
10092 oldHost := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) );
10093 oldBoardName := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/';
10094 tmpURL := Copy(newURLs[i], 1, Length(newURLs[i]) -1);
10095 newHost := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) );
10096 newBoardName := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/';
10098 for j := 0 to TabList.Count - 1 do begin
10099 tempString := TabList.Text;
10100 if ( AnsiPos(oldBoardName, tempString) <> 0 ) and ( AnsiPos(oldHost, tempString ) <> 0 ) then begin
10101 tempString := StringReplace(tempString, oldHost, newHost,[]);
10102 TabList.Text := tempString;
10106 //
\82±
\82±
\82Ü
\82Å
\81AThread
\82ÌURL
\82Ì
\95Ï
\8dX
10110 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82é
10111 procedure TGikoForm.OnMinimize;
10113 FIsMinimize := mtMinimizing;
10114 if FActiveContent <> nil then
10115 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
10116 PostMessage( Handle, USER_MINIMIZED, 0, 0 );
10119 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82½
10120 procedure TGikoForm.OnMinimized;
10122 FIsMinimize := mtMinimized;
10123 FIsIgnoreResize := False;
10126 procedure TGikoForm.CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
10128 coolSet : TCoolSet;
10129 toolbar : TToolBar;
10131 affectedBand : TCoolBand;
10134 if (FOldFormWidth = Width) and not IsIconic( Handle ) and not FIsIgnoreResize then begin
10135 FIsIgnoreResize := True;
10136 PostMessage( Handle, USER_RESIZED, 0, 0 );
10137 if not (Sender is TToolBar) or (CoolBar = nil) then
10139 toolbar := TToolBar( Sender );
10141 //
\95Ï
\8dX
\82³
\82ê
\82½
\83N
\81[
\83\8b\83o
\81[
\82Ì
\92l
\82ð
\95Û
\91¶
10142 if CoolBar = MainCoolBar then begin
10143 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
10144 CoolSet.FCoolID := CoolBar.Bands[i].ID;
10145 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
10146 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
10147 GikoSys.Setting.MainCoolSet[i] := CoolSet;
10149 end else if CoolBar = ListCoolBar then begin
10150 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
10151 CoolSet.FCoolID := CoolBar.Bands[i].ID;
10152 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
10153 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
10154 GikoSys.Setting.ListCoolSet[i] := CoolSet;
10156 end else if CoolBar = BrowserCoolBar then begin
10157 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
10158 CoolSet.FCoolID := CoolBar.Bands[i].ID;
10159 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
10160 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
10161 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
10164 //
\95\9d\82Ì
\95Ï
\8dX
\82³
\82ê
\82½
\83o
\83\93\83h
\82ð
\8c©
\82Â
\82¯
\82é
10165 affectedBand := nil;
10166 for i := CoolBar.Bands.Count - 1 downto 0 do begin
10167 if CoolBar.Bands[ i ].Control.Handle = toolbar.Handle then begin
10168 band := CoolBar.Bands[ i ];
10169 if band.Break or (i = 0) then begin
10170 if i + 1 < CoolBar.Bands.Count then
10171 if not CoolBar.Bands[ i + 1 ].Break then
10172 affectedBand := CoolBar.Bands[ i + 1 ];
10175 affectedBand := CoolBar.Bands[ i - 1 ];
10180 //
\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·
10181 if CoolBar = MainCoolBar then begin
10182 coolSet := GikoSys.Setting.MainCoolSet[ band.ID ];
10183 coolSet.FCoolWidth := toolbar.Width + 25;
10184 GikoSys.Setting.MainCoolSet[ band.ID ] := coolSet;
10185 if affectedBand <> nil then begin
10186 coolSet := GikoSys.Setting.MainCoolSet[ affectedBand.ID ];
10187 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
10188 GikoSys.Setting.MainCoolSet[ affectedBand.ID ] := coolSet;
10190 end else if CoolBar = ListCoolBar then begin
10191 coolSet := GikoSys.Setting.ListCoolSet[ band.ID ];
10192 coolSet.FCoolWidth := toolbar.Width + 25;
10193 GikoSys.Setting.ListCoolSet[ band.ID ] := coolSet;
10194 if affectedBand <> nil then begin
10195 coolSet := GikoSys.Setting.ListCoolSet[ affectedBand.ID ];
10196 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
10197 GikoSys.Setting.ListCoolSet[ affectedBand.ID ] := coolSet;
10199 end else if CoolBar = BrowserCoolBar then begin
10200 coolSet := GikoSYs.Setting.BrowserCoolSet[ band.ID ];
10201 coolSet.FCoolWidth := toolbar.Width + 25;
10202 GikoSys.Setting.BrowserCoolSet[ band.ID ] := coolSet;
10203 if affectedBand <> nil then begin
10204 coolSet := GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ];
10205 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
10206 GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ] := coolSet;
10212 procedure TGikoForm.MenuToolBarResize(Sender: TObject);
10214 CoolBarResized( Sender, MainCoolBar );
10217 procedure TGikoForm.StdToolBarResize(Sender: TObject);
10219 CoolBarResized( Sender, MainCoolBar );
10222 procedure TGikoForm.LinkToolBarResize(Sender: TObject);
10224 CoolBarResized( Sender, MainCoolBar );
10227 procedure TGikoForm.ListNameToolBarResize(Sender: TObject);
10229 CoolBarResized( Sender, ListCoolBar );
10232 procedure TGikoForm.ListToolBarResize(Sender: TObject);
10234 CoolBarResized( Sender, ListCoolBar );
10237 procedure TGikoForm.BrowserNameToolBarResize(Sender: TObject);
10239 CoolBarResized( Sender, BrowserCoolBar );
10242 procedure TGikoForm.BrowserToolBarResize(Sender: TObject);
10244 CoolBarResized( Sender, BrowserCoolBar );
10247 procedure TGikoForm.BrowserTabResize(Sender: TObject);
10249 CoolBarResized( Sender, BrowserCoolBar );
10252 // *************************************************************************
10253 // ExternalBoardPlugInMain
10254 //
\83v
\83\89\83O
\83C
\83\93\83\81\83j
\83\85\81[
\82Ì
\8d\80\96Ú
\82ª
\8eÀ
\8ds
\82³
\82ê
\82½
10255 // *************************************************************************
10256 procedure TGikoForm.OnPlugInMenuItem( Sender : TObject );
10259 boardPlugIn : TBoardPlugIn;
10262 if not (Sender is TMenuItem) then
10265 item := TMenuItem( Sender );
10266 if not Assigned( Pointer( item.Tag ) ) then
10269 //
\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·
10270 boardPlugIn := TBoardPlugIn( item.Tag );
10271 boardPlugIn.PlugInMenu( item.Handle );
10274 // TreeView
\82ª
\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
10275 procedure TGikoForm.TreeClick( Node : TTreeNode );
10283 if FTreeType = gttHistory then begin
10284 if Node <> nil then
10285 if TObject( Node.Data ) is TFavoriteThreadItem then
10286 if GetActiveContent <> TFavoriteThreadItem( Node.Data ).Item then
10287 FavoriteClick( Node );
10291 if GetActiveList is TBBS then begin
10292 for i := 0 to ListView.Columns.Count - 1 do
10293 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
10294 end else if GetActiveList is TCategory then begin
10295 for i := 0 to ListView.Columns.Count - 1 do
10296 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
10297 end else if GetActiveList is TBoard then begin
10298 for i := 0 to ListView.Columns.Count - 1 do
10299 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
10302 if TObject(Node.Data) is TBBS then begin
10303 SetActiveList(Node.data);
10304 end else if TObject(Node.Data) is TCategory then begin
10305 SetActiveList(Node.data);
10306 end else if TObject(Node.Data) is TBoard then begin
10307 if not TBoard(Node.Data).IsThreadDatRead then begin
10308 Screen.Cursor := crHourGlass;
10310 if not TBoard(Node.Data).IsThreadDatRead then
10311 GikoSys.ReadSubjectFile(Node.Data);
10313 Screen.Cursor := crDefault;
10316 SetActiveList(Node.data);
10319 if TObject( Node.Data ) is TBoard then begin // not TCategory
10320 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
10321 if GikoSys.Setting.ListWidthState = glsMax then begin
10322 BrowserMinAction.Execute;
10323 if GikoForm.Visible then
10327 if GikoSys.Setting.ListHeightState = glsMax then begin
10328 BrowserMinAction.Execute;
10329 if GikoForm.Visible then
10337 // TreeView
\82ª
\83_
\83u
\83\8b\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
10338 procedure TGikoForm.TreeDoubleClick( Node : TTreeNode );
10341 ThreadItem : TThreadItem;
10342 shiftDown : Boolean;
10345 if Node = nil then Exit;
10347 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
10349 if FTreeType = gtt2ch then begin
10350 if not (TObject(Node.Data) is TBoard) then Exit;
10351 Board := TBoard(Node.Data);
10352 DownloadList(Board, shiftDown);
10353 end else if FTreeType = gttHistory then begin
10354 if not (TObject(Node.Data) is TFavoriteThreadItem) then Exit;
10355 ThreadItem := TFavoriteThreadItem(Node.Data).Item;
10356 DownloadContent(ThreadItem, shiftDown);
10361 procedure TGikoForm.TreeViewClick(Sender: TObject);
10363 TreeClick( TreeView.Selected );
10366 procedure TGikoForm.TreeViewKeyDown(Sender: TObject; var Key: Word;
10367 Shift: TShiftState);
10369 if Key = VK_BACK then begin
10370 // UpFolderButtonClick(Sender);
10371 end else if Key = VK_SPACE then begin
10372 TreeDoubleClick( TreeView.Selected );
10373 end else if Key = VK_RETURN then begin
10374 TreeClick( TreeView.Selected );
10375 TreeView.Selected.Expanded := not TreeView.Selected.Expanded;
10379 //
\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ã
10380 //
\83C
\83x
\83\93\83g
\82ð
\8eæ
\82è
\88µ
\82Á
\82½
\8fê
\8d\87\82Í True
\82ð
\95Ô
\82·
10381 function TGikoForm.BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
10383 iOIPAO : IOleInPlaceActiveObject;
10384 Dispatch : IDispatch;
10387 if Key = VK_BACK then begin
10388 UpBoardAction.Execute;
10390 {end else if Key in [VK_ESCAPE..VK_HELP] then begin
10391 //
\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
10394 end else if(Key in [VK_SPACE..VK_HELP]) and
10395 not(ssCtrl in State) and not(ssAlt in State) and not (ssShift in State) then begin
10398 //
\82»
\82ê
\88È
\8aO
\82Ì
\83C
\83x
\83\93\83g
\82Í Browser
\82É
\97¬
\82·
10399 if(FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10400 Dispatch := FActiveContent.Browser.Application;
10401 if Dispatch <> nil then begin
10402 Dispatch.QueryInterface( IOleInPlaceActiveObject, iOIPAO );
10403 if iOIPAO <> nil then
10404 iOIPAO.TranslateAccelerator( Msg );
10407 //
\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¢
10413 //
\83M
\83R
\83i
\83r
\82Ì
\83\81\83b
\83Z
\81[
\83W
\83\8b\81[
\83v
\82ð
\89¡
\8eæ
\82è
\82µ
\82Ü
\82·
10414 procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
10419 case Msg.message of
10421 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10422 if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
10424 Handled := BrowserKeyDown( Msg, key, KeyDataToShiftState( Msg.lParam ) );
10429 case Msg.wParam shr 16 of
10432 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10433 if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
10434 UpBoardAction.Execute;
10438 if not Handled then begin
10439 if IsDialogMessage( ListView.Handle, Msg ) then begin
10440 UpFolderAction.Execute;
10450 procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject;
10451 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
10453 favItem : TTreeNode;
10454 favThreadItem : TFavoriteThreadItem;
10460 FMouseDownPos.X := X;
10461 FMouseDownPos.Y := Y;
10465 favItem := FavoriteTreeView.GetNodeAt( X, Y );
10466 if favItem = nil then Exit;
10468 if TObject( favItem.Data ) is TFavoriteThreadItem then begin
10469 favThreadItem := TFavoriteThreadItem( favItem.Data );
10470 if favThreadItem.Item <> nil then
10471 InsertBrowserTab( favThreadItem.Item, False );
10478 procedure TGikoForm.MessagePanelResize(Sender: TObject);
10481 if FIsIgnoreResize then
10484 if GikoSys.Setting.ListOrientation = gloVertical then begin
10485 if GikoSys.Setting.ListHeightState = glsMin then begin
10486 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
10487 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
10493 procedure TGikoForm.OnResized;
10496 FOldFormWidth := Width;
10497 FIsIgnoreResize := False;
10501 procedure TGikoForm.TreeSelectNameCopyExecute(Sender: TObject);
10505 TreeView.Selected := FClickNode;
10506 s := FClickNode.Text;
10507 Clipboard.AsText := s;
10510 procedure TGikoForm.FavoriteTreeViewMouseUp(Sender: TObject;
10511 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
10514 if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold) and
10515 (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
10516 FavoriteClick( TObject( FavoriteTreeView.Selected ) );
10521 destructor TBrowserRecord.Destroy;
10525 if Self.FEvent <> nil then
10527 if Self.FBrowser <> nil then begin
10528 if Self.Thread <> nil then begin
10529 //
\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Å
10530 //
\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
10531 if Self.FBrowser.OleObject.Document.documentElement.innerText <> '' then begin
10532 doc := Idispatch( olevariant(Self.FBrowser.ControlInterface).Document) as IHTMLDocument2;
10533 Self.Thread.ScrollTop := doc.Body.ScrollTop;
10536 //TOleControl(Self.FBrowser).Visible := false;
10537 ShowWindow(Self.FBrowser.Handle, SW_HIDE);
10542 procedure TGikoForm.ResRangeActionUpdate(Sender: TObject);
10544 ResRangeAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
10547 function TGikoForm.WebBrowserClick(Sender: TObject): WordBool;
10551 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then
10552 FActiveContent.FBrowser.SetFocus;
10557 procedure TGikoForm.SetFocusForBrowserActionExecute(Sender: TObject);
10559 FActiveContent.FBrowser.SetFocus;
10562 procedure TGikoForm.SetFocusForBrowserActionUpdate(Sender: TObject);
10564 if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
10565 (FActiveContent.Browser <> BrowserNullTab.Browser) then
10566 SetFocusForBrowserAction.Enabled := true
10568 SetFocusForBrowserAction.Enabled := false;
10571 procedure TGikoForm.SetFocusForThreadListActionExecute(Sender: TObject);
10575 if FActiveContent <> nil then
10576 WebBrowserClick(FActiveContent.Browser); //
\88ê
\89ñBrowser
\82É
\93\96\82Ä
\82È
\82¢
\82Æ
\93®
\82©
\82È
\82¢
\82Æ
\82«
\82ª
\82 \82é
10578 if( ListView.Items.Count > 0 ) and (ListView.ItemFocused = nil) then
10579 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é
10580 else if ListView.Items.Count > 0 then begin
10581 ListView.Scroll(-ListView.ClientWidth, -ListView.ClientHeight);
10582 rct := ListView.ItemFocused.DisplayRect(drBounds);
10583 ListView.Scroll(0, 2 * rct.Top - rct.Bottom);
10584 if ListView.ViewStyle <> vsReport then begin
10585 ListView.Scroll(rct.Left, 0);
10590 procedure TGikoForm.SetFocusForCabinetActionExecute(Sender: TObject);
10592 if FActiveContent <> nil then
10593 WebBrowserClick(FActiveContent.Browser); //
\88ê
\89ñBrowser
\82É
\93\96\82Ä
\82È
\82¢
\82Æ
\93®
\82©
\82È
\82¢
\82Æ
\82«
\82ª
\82 \82é
10594 if TreeView.Visible then begin
10596 if(TreeView.Items.Count > 0) and ( TreeView.Selected = nil ) then
10597 TreeView.Items.Item[0].Selected := true;
10598 end else if FavoriteTreeView.Visible then begin
10599 FavoriteTreeView.SetFocus;
10600 if(FavoriteTreeView.Items.Count > 0) and (FavoriteTreeView.Selected = nil) then
10601 FavoriteTreeView.Items.Item[0].Selected := true;
10604 procedure TGikoForm.SetFocusForCabinetActionUpdate(Sender: TObject);
10606 SetFocusForCabinetAction.Enabled := CabinetPanel.Visible;
10609 //
\83u
\83\89\83E
\83U
\82ð
\8dÅ
\91å
\89»
\82µ
\82Ä
\83t
\83H
\81[
\83J
\83X
\82ð
\93\96\82Ä
\82é
\81B
10610 procedure TGikoForm.BrowserMaxAndFocusActionExecute(Sender: TObject);
10612 BrowserMaxAction.Execute;
10613 SetFocusForBrowserAction.Execute;
10616 procedure TGikoForm.BrowserMaxAndFocusActionUpdate(Sender: TObject);
10618 if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
10619 (FActiveContent.Browser <> BrowserNullTab.Browser) then
10620 BrowserMaxAndFocusAction.Enabled := true
10622 BrowserMaxAndFocusAction.Enabled := false;
10624 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\82ð
\8dÅ
\91å
\89»
\82µ
\82Ä
\83t
\83H
\81[
\83J
\83X
\82ð
\93\96\82Ä
\82é
10625 procedure TGikoForm.ThreadlistMaxAndFocusActionExecute(Sender: TObject);
10627 BrowserMinAction.Execute;
10628 SetFocusForThreadListAction.Execute;
10631 procedure TGikoForm.ListViewExit(Sender: TObject);
10637 procedure TGikoForm.ListViewSelectItem(Sender: TObject; Item: TListItem;
10638 Selected: Boolean);
10641 if not (GikoSys.Setting.BrowserTabVisible) and (Item <> nil) then
10642 if (TObject( Item.Data ) is TThreadItem) then begin
10643 SelectTimer.Interval := GikoSys.Setting.SelectInterval;
10645 SelectTimer.Interval := 0
10647 SelectTimer.Interval := 0;
10651 procedure TGikoForm.SelectTimerTimer(Sender: TObject);
10653 if not (ListView.Selected = nil) then
10654 if( FActiveContent = nil) or
10655 (GetActiveContent <> TThreadItem(ListView.Selected.Data) ) then begin
10656 SelectTimer.Interval := 0;
10661 procedure TGikoForm.SelectItemSaveForDatExecute(Sender: TObject);
10666 List := TList.Create;
10668 Screen.Cursor := crHourGlass;
10669 SelectListItem(List);
10670 if ((GikoSys.Setting.ListOrientation = gloVertical) and
10671 (GikoSys.Setting.ListHeightState = glsMax)) or
10672 ((GikoSys.Setting.ListOrientation = gloHorizontal) and
10673 (GikoSys.Setting.ListWidthState = glsMax)) then
10674 ShowMessage('
\83X
\83\8c\83b
\83h
\88ê
\97\97\82ð
\95\
\8e¦
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10675 else if(List.Count = 0) then
10676 ShowMessage('
\83X
\83\8c\83b
\83h
\82ð
\91I
\91ð
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10678 FileSaveAs1.Dialog.Title := '
\91I
\91ð
\83X
\83\8c\83b
\83h
\82ðdat
\82Ì
\82Ü
\82Ü
\95Û
\91¶';
10679 FileSaveAs1.Dialog.Filter := 'DAT
\83t
\83@
\83C
\83\8b(*.dat)|*.dat';
10680 for i := 0 to List.Count - 1 do begin
10681 if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin
10682 FileSaveAs1.Dialog.FileName := TThreadItem(List[i]).FileName;
10683 if FileSaveAs1.Execute then begin
10684 //
\82È
\82º
\82©
\83L
\83\83\83\93\83Z
\83\8b\82Å
\82à
\82±
\82Á
\82¿
\82É
\93ü
\82Á
\82Ä
\82
\82é
10685 if ExtractFilePath(FileSaveAs1.Dialog.FileName) <> '' then begin
10686 CopyFile(PChar(TThreadItem(List[i]).FilePath),
10687 PChar(FileSaveAs1.Dialog.FileName), true);
10694 Screen.Cursor := crDefault;
10700 procedure TGikoForm.SelectItemSaveForHTMLExecute(Sender: TObject);
10707 List := TList.Create;
10709 Screen.Cursor := crHourGlass;
10710 SelectListItem(List);
10711 if ((GikoSys.Setting.ListOrientation = gloVertical) and
10712 (GikoSys.Setting.ListHeightState = glsMax)) or
10713 ((GikoSys.Setting.ListOrientation = gloHorizontal) and
10714 (GikoSys.Setting.ListWidthState = glsMax)) then
10715 ShowMessage('
\83X
\83\8c\83b
\83h
\88ê
\97\97\82ð
\95\
\8e¦
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10716 else if(List.Count = 0) then
10717 ShowMessage('
\83X
\83\8c\83b
\83h
\82ð
\91I
\91ð
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10719 FileSaveAs1.Dialog.Title := '
\91I
\91ð
\83X
\83\8c\83b
\83h
\82ðHTML
\89»
\82µ
\82Ä
\95Û
\91¶';
10720 FileSaveAs1.Dialog.Filter := 'HTML
\83t
\83@
\83C
\83\8b(*.html)|*.html';
10721 for i := 0 to List.Count - 1 do begin
10722 if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin
10723 FileSaveAs1.Dialog.FileName := TThreadItem(List[i]).Title + '.html';
10724 if FileSaveAs1.Execute then begin
10725 //
\82È
\82º
\82©
\83L
\83\83\83\93\83Z
\83\8b\82Å
\82à
\82±
\82Á
\82¿
\82É
\93ü
\82Á
\82Ä
\82
\82é
10726 if ExtractFilePath(FileSaveAs1.Dialog.FileName) <> '' then begin
10727 html := TStringList.Create;
10728 title := TThreadItem(List[i]).Title;
10730 GikoSys.CreateHTML3(html, TThreadItem(List[i]), title);
10731 html.SaveToFile(FileSaveAs1.Dialog.FileName);
10732 SkinorCSSFilesCopy(ExtractFilePath(FileSaveAs1.Dialog.FileName));
10742 Screen.Cursor := crDefault;
10746 procedure TGikoForm.SkinorCSSFilesCopy(path: string);
10748 tmp, tmpD, tmpF: string;
10751 files: TStringList;
10754 if GikoSys.Setting.UseSkin then begin
10755 current := ExtractFilePath(GikoSys.GetSkinDir);
10756 tmp := GikoSys.Setting.CSSFileName;
10757 end else if GikoSys.Setting.UseCSS then begin
10758 current := ExtractFilePath(GikoSys.GetStyleSheetDir);
10759 tmp := ExtractFilePath(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName);
10761 dirs := TStringList.Create;
10764 if tmp <> current then begin
10765 GikoSys.GetDirectoryList(current, '*.*', dirs, true);
10766 for i := 0 to dirs.Count - 1 do begin
10767 files := TStringList.Create;
10769 gikoSys.GetFileList(dirs[i], '*.*', files, true);
10770 tmpD := CustomStringReplace(dirs[i], GikoSys.GetConfigDir, path);
10771 if (AnsiPos(dirs[i], tmp) <> 0) and not (DirectoryExists(tmpD)) then
10772 ForceDirectories(tmpD);
10774 if(dirs[i] = tmp) and (dirs[i] <> current) then begin
10775 for j := 0 to files.Count - 1 do begin
10776 tmpF := CustomStringReplace(files[j], GikoSys.GetConfigDir, path);
10777 if not FileExists(tmpF) then begin
10778 CopyFile(PChar(files[j]), PChar(tmpF),True);
10787 tmpD := CustomStringReplace(dirs[0], GikoSys.GetConfigDir, path);
10788 if not DirectoryExists(tmpD) then
10789 ForceDirectories(tmpD);
10790 tmpF := CustomStringReplace(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName
10791 , GikoSys.GetConfigDir, path);
10792 if not FileExists(tmpF) then begin
10793 CopyFile(PChar(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName)
10794 , PChar(tmpF), True);
10803 procedure TGikoForm.KidokuActionExecute(Sender: TObject);
10808 List := TList.Create;
10810 SelectListItem(List);
10811 for i := 0 to List.Count - 1 do begin
10812 if TObject(List[i]) is TThreadItem then begin
10813 TThreadItem(List[i]).UnRead := false;
10814 TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;
10817 if TreeView.Visible then
10824 procedure TGikoForm.MidokuActionExecute(Sender: TObject);
10829 List := TList.Create;
10831 SelectListItem(List);
10832 for i := 0 to List.Count - 1 do begin
10833 if TObject(List[i]) is TThreadItem then begin
10834 TThreadItem(List[i]).UnRead := true;
10835 TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;
10838 if TreeView.Visible then
10845 procedure TGikoForm.BrowserPanelCanResize(Sender: TObject; var NewWidth,
10846 NewHeight: Integer; var Resize: Boolean);
10850 for i := 0 to BROWSER_COUNT - 1 do
10851 SetWindowPos(TWebBrowser(FBrowsers[i]).Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER);
10853 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10854 SetWindowPos(FActiveContent.Browser.Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER);
10858 procedure TGikoForm.LogFolderOpenActionExecute(Sender: TObject);
10862 if ((GikoSys.Setting.ListOrientation = gloVertical) and
10863 (GikoSys.Setting.ListHeightState = glsMax)) or
10864 ((GikoSys.Setting.ListOrientation = gloHorizontal) and
10865 (GikoSys.Setting.ListWidthState = glsMax)) then begin
10866 if(GetActiveContent <> nil) then begin
10867 GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(GetActiveContent.FilePath) + '"');
10869 end else if GetActiveList is TCategory then begin
10870 List := TList.Create;
10872 SelectListItem(List);
10873 GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(TBoard(List[0]).FilePath) + '"');
10877 end else if GetActiveList is TBoard then begin
10878 GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(TBoard(GetActiveList).FilePath) + '"');
10883 procedure TGikoForm.LogFolderOpenActionUpdate(Sender: TObject);
10885 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
10886 LogFolderOpenAction.Enabled := True
10887 else if GetActiveList is TBoard then
10888 LogFolderOpenAction.Enabled := True
10890 LogFolderOpenAction.Enabled := False;
10893 function TGikoForm.GetTabURLs(AStringList: TStringList) : Boolean;
10895 rec : TBrowserRecord;
10896 i, bound : Integer;
10898 bound := BrowserTab.Tabs.Count -1;
10899 if bound = -1 then begin
10901 Exit; //for
\82É
\94ò
\82Î
\82È
\82¢
\82Å
\91\80\8dì
\82ð
\94²
\82¯
\82é
10904 for i := 0 to bound do begin
10905 rec := TBrowserRecord( BrowserTab.Tabs.Objects[ i ] );
10906 if( rec <> nil) and (rec.Thread <> nil) then
10907 AStringList.Add( rec.Thread.URL );
10912 procedure TGikoForm.TabsSaveActionExecute(Sender: TObject);
10914 if not SaveTabURLs then begin
10915 ShowMessage('
\95Û
\91¶
\82·
\82é
\83^
\83u
\82ª
\82 \82è
\82Ü
\82¹
\82ñ');
10919 function TGikoForm.SaveTabURLs : Boolean;
10921 SaveStringList: TStringList;
10923 SaveStringList := TStringList.Create;
10925 Result := GetTabURLs(SaveStringList);
10926 SaveStringList.SaveToFile(ExtractFilePath(Application.ExeName) + 'tab.sav');
10928 SaveStringList.Free
10932 procedure TGikoForm.TabsOpenActionExecute(Sender: TObject);
10934 if not LoadTabURLs then begin
10935 ShowMessage('
\95\
\8e¦
\82·
\82é
\83^
\83u
\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B');
10939 procedure TGikoForm.FileTabSaveClick(Sender: TObject);
10941 SaveStringList: TStringList;
10943 SaveTabList := TStringList.Create;
10944 SaveTabList := GetTabURLs;
10945 if TabSaveDialog.Execute then begin
10946 SaveTabList.SaveToFile(TabSaveDialog.FileName);
10951 function TGikoForm.LoadTabURLs : Boolean;
10953 i, bound : Integer;
10954 item : TThreadItem;
10955 URLs : TStringList;
10956 GikoTab : TGikoTabAppend;
10959 fileName := ExtractFilePath(Application.ExeName) + 'tab.sav';
10960 URLs := TStringList.Create();
10961 GikoTab := GikoSys.Setting.BrowserTabAppend;
10964 if FileExists(fileName) then
10965 URLs.LoadFromFile(fileName);
10968 ShowMessage('
\83^
\83u
\83t
\83@
\83C
\83\8b\82ª
\8aJ
\82¯
\82Ü
\82¹
\82ñ');
10970 bound := URLs.Count - 1;
10971 if bound = -1 then begin
10977 GikoSys.Setting.BrowserTabAppend := gtpLast;//TGikoTabAppend(1);
10978 for i := 0 to URLs.Count - 1 do begin
10979 item := BBSsFindThreadFromURL( URLs[ i ] );
10980 if item <> nil then
10981 InsertBrowserTab( item, false );
10984 GikoSys.Setting.BrowserTabAppend := GikoTab;
10990 procedure TGikoForm.TabsSaveToFileActionExecute(Sender: TObject);
10992 SaveTabList: TStringList;
10995 SaveTabList := TStringList.Create;
10997 Result := GetTabURLs(SaveTabList);
10998 // if TabSaveDialog.Execute then begin
10999 // SaveTabList.SaveToFile(TabSaveDialog.FileName);
11006 procedure TGikoForm.TabsOpenFromFileActionExecute(Sender: TObject);
11009 item : TThreadItem;
11010 URLs : TStringList;
11011 GikoTab: TGikoTabAppend;
11013 URLs := TStringList.Create();
11014 GikoTab := GikoSys.Setting.BrowserTabAppend;
11017 // if TabOpenDialog.Execute then begin
11018 // URLs.LoadFromFile(TabOpenDialog.FileName);
11021 on EFOpenError do ShowMessage('
\83^
\83u
\83t
\83@
\83C
\83\8b\82ª
\8aJ
\82¯
\82Ü
\82¹
\82ñ');
11024 GikoSys.Setting.BrowserTabAppend := gtpLast;//TGikoTabAppend(1);
11025 for i := 0 to URLs.Count - 1 do begin
11026 item := BBSsFindThreadFromURL( URLs[ i ] );
11027 if item <> nil then
11028 InsertBrowserTab( item, false );
11031 GikoSys.Setting.BrowserTabAppend := GikoTab;
11036 procedure TGikoForm.OnlyAHundredResActionExecute(Sender: TObject);
11038 ThreadItem : TThreadItem;
11039 FilterList : TStringList;
11042 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
11043 and (FActiveContent.FBrowser.Busy) then Exit;
11045 FResRangeMenuSelect := 100;
11046 OnlyAHundredResAction.Checked := True;
11048 if GikoSys.ResRange <> 100 then begin
11049 GikoSys.ResRange := 100;
11051 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
11052 FilterList := TStringList.Create;
11054 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
11055 GikoSys.FSelectResFilter.Reverse := False;
11057 FilterList.Destroy;
11060 FSelectResWord := '';
11062 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
11063 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
11064 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
11066 ThreadItem := GetActiveContent;
11067 if ThreadItem <> nil then
11068 InsertBrowserTab( ThreadItem, True );
11072 procedure TGikoForm.OnlyKokoResActionExecute(Sender: TObject);
11074 ThreadItem : TThreadItem;
11075 FilterList : TStringList;
11078 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
11079 and (FActiveContent.FBrowser.Busy) then Exit;
11081 FResRangeMenuSelect := Ord( grrKoko );
11082 OnlyKokoResAction.Checked := True;
11084 if GikoSys.ResRange <> Ord( grrKoko ) then begin
11085 GikoSys.ResRange := Ord( grrKoko );
11087 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
11088 FilterList := TStringList.Create;
11090 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
11091 GikoSys.FSelectResFilter.Reverse := False;
11093 FilterList.Destroy;
11096 FSelectResWord := '';
11098 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
11099 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
11100 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
11102 ThreadItem := GetActiveContent;
11103 if ThreadItem <> nil then
11104 InsertBrowserTab( ThreadItem, True );
11108 procedure TGikoForm.OnlyNewResActionExecute(Sender: TObject);
11110 ThreadItem : TThreadItem;
11111 FilterList : TStringList;
11114 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
11115 and (FActiveContent.FBrowser.Busy) then Exit;
11117 FResRangeMenuSelect := Ord( grrNew );
11118 OnlyNewResAction.Checked := True;
11120 if GikoSys.ResRange <> Ord( grrNew ) then begin
11121 GikoSys.ResRange := Ord( grrNew );
11123 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
11124 FilterList := TStringList.Create;
11126 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
11127 GikoSys.FSelectResFilter.Reverse := False;
11129 FilterList.Destroy;
11132 FSelectResWord := '';
11134 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
11135 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
11136 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
11138 ThreadItem := GetActiveContent;
11139 if ThreadItem <> nil then
11140 InsertBrowserTab( ThreadItem, True );
11144 procedure TGikoForm.BrowsBoradHeadActionExecute(Sender: TObject);
11146 RefURL, URL : string;
11150 if GetActiveList is TCategory then begin
11151 List := TList.Create;
11153 SelectListItem(List);
11154 RefURL := TBoard(List[0]).URL;
11158 end else if GetActiveList is TBoard then begin
11159 RefURL := TBoard(GetActiveList).URL
11161 if RefURL <> '' then begin
11162 if RefURL[Length(RefURL)] <> '/' then
11163 URL := RefURL + '/' + 'head.txt'
11165 URL := RefURL + 'head.txt';
11169 ShowMessage('
\94Â
\82ð
\93Á
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½
\81B');
11174 procedure TGikoForm.BrowsBoradHeadActionUpdate(Sender: TObject);
11176 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
11177 BrowsBoradHeadAction.Enabled := True
11178 else if GetActiveList is TBoard then
11179 BrowsBoradHeadAction.Enabled := True
11181 BrowsBoradHeadAction.Enabled := False;
11184 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\95Ò
\8fW
\82·
\82é
\82½
\82ß
\82É
\8aJ
\82
11185 procedure TGikoForm.EditNGActionExecute(Sender: TObject);
11187 GikoSys.FAbon.EditNGwords;
11190 procedure TGikoForm.ThreadRangeActionUpdate(Sender: TObject);
11192 ThreadRangeAction.Enabled := (GetActiveList is TBoard);
11195 procedure TGikoForm.ThreadRangeActionExecute(Sender: TObject);
11197 case GikoSys.Setting.ThreadRange of
11198 gtrAll: AllItemAction.Execute;
11199 gtrLog: LogItemAction.Execute;
11200 gtrNew: NewItemAction.Execute;
11204 procedure TGikoForm.TabAutoSaveActionExecute(Sender: TObject);
11209 procedure TGikoForm.TabAutoLoadActionExecute(Sender: TObject);
11215 OleInitialize(nil);