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 // ListView
\82Ì
\83w
\83b
\83_
\83h
\83\89\83b
\83O
1855 ListView.LVMInstallHeaderDrag;
1857 // CoolBar
\95\9c\8c³
1858 LoadCoolBarSettings;
1860 FIsIgnoreResize := False;
1863 //FormCrete
\82©
\82ç
\88Ú
\93®
\81B
1864 if GikoSys.Setting.TabAutoLoadSave then begin
1865 TabAutoLoadAction.Execute;
1870 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1872 // if GikoForm.WindowState <> wsMinimized then
1873 // SaveCoolBarSettings;
1874 if ( GikoSys.Setting.ShowDialogForEnd ) and
1875 (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
1880 if GikoSys.Setting.TabAutoLoadSave then begin
1881 TabAutoSaveAction.Execute;
1884 //Application.HookMainWindow(Hook);
1885 Application.UnhookMainWindow(Hook);
1886 Application.Terminate;
1889 procedure TGikoForm.FormDestroy(Sender: TObject);
1892 // CoolSet: TCoolSet;
1893 wp : TWindowPlacement;
1896 // Application.OnDeactivate := nil;
1897 // Self.OnDeactivate := nil;
1900 if GetActiveList is TBBS then begin
1901 for i := 0 to ListView.Columns.Count - 1 do
1902 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1903 end else if GetActiveList is TCategory then begin
1904 for i := 0 to ListView.Columns.Count - 1 do
1905 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1906 end else if GetActiveList is TBoard then begin
1907 for i := 0 to ListView.Columns.Count - 1 do
1908 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1913 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95Û
\91¶
1914 wp.length := sizeof(wp);
1915 GetWindowPlacement(Handle, @wp);
1916 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1917 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1918 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1919 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1920 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1922 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1923 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1924 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1925 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1926 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1927 if ArrangeAction.Checked then
1928 GikoSys.Setting.ListOrientation := gloVertical
1930 GikoSys.Setting.ListOrientation := gloHorizontal;
1931 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1936 //
\83\8c\83X
\95\
\8e¦
\94Í
\88Í
1937 if not GikoSys.Setting.ResRangeHold then
1938 GikoSys.Setting.ResRange := FResRangeMenuSelect;
1942 //
\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è
1943 //
\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¢
1945 //
\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
1947 if GikoForm.WindowState <> wsMinimized then
1948 SaveCoolBarSettings;
1951 GikoSys.Setting.WriteWindowSettingFile;
1952 GikoSys.Setting.WriteNameMailSettingFile;
1956 //
\82¨
\8bC
\82É
\93ü
\82è
\95Û
\91¶
1958 //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é
1959 FavoriteDM.WriteFavorite;
1965 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1966 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
1967 GikoSys.Setting.ShowDialogForAllTabClose := false;
1968 AllTabCloseAction.Execute;
1969 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
1973 LockWindowUpdate(Self.Handle);
1974 for i := FBrowsers.Count - 1 downto 0 do begin
1975 TWebBrowser(FBrowsers[i]).Free;
1978 FBrowsers.Capacity := 0;
1983 if BrowserNullTab <> nil then begin
1984 BrowserNullTab.Browser := nil; {*BrowserNullTab
\82ÌBrowser
\82Í
\90Ý
\8cv
\8e\9e\82É
\93\
\82è
\95t
\82¯
\82Ä
\82é
\93z
1985 *
\82È
\82Ì
\82Å
\82±
\82±
\82ÅFree
\82³
\82ê
\82é
\82Æ
\8d¢
\82é
\82Ì
\82Å
\82Í
\82¸
\82µ
\82Ä
\82µ
\82Ü
\82¤
\81B
1987 BrowserNullTab.Free;
1991 LockWindowUpdate(0);
1993 TreeView.Items.BeginUpdate;
1994 TreeView.Items.GetFirstNode.Free;
1995 TreeView.Items.Clear;
1996 TreeView.Items.EndUpdate;
2000 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\95Û
\91¶
2002 //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
2003 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
2007 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
\95Û
\91¶
2021 //
\8f\84\89ñ
\83\8a\83X
\83g
\95Û
\91¶&
\94j
\8aü
2023 RoundList.SaveRoundFile;
2037 FControlThread.Terminate;
2038 FControlThread.WaitFor;
2042 FControlThread.Free;
2045 // TBBS
\82Í
\95Û
\8e\9d\82µ
\82Ä
\82¢
\82é TCategory, TBoard, TThreadItem
\82·
\82×
\82Ä
\82ð
\8aJ
\95ú
\82·
\82é
2046 // 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Å
2047 // BoardPluteIns
\82Ì
\8aJ
\95ú
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ
2049 for i := Length( BBSs ) - 1 downto 0 do begin
2050 if BBSs[ i ] <> nil then
2058 for i := Length( BoardPlugIns ) - 1 downto 0 do begin
2059 if BoardPlugIns[ i ] <> nil then
2060 BoardPlugIns[ i ].Free;
2061 BoardPlugIns[ i ] := nil;
2067 if FEvent <> nil then
2071 if FHint <> nil then begin
2072 FHint.ReleaseHandle;
2077 if TPreviewBrowser <> nil then begin
2078 FPreviewBrowser.Free;
2079 FPreviewBrowser := nil;
2086 //
\83t
\83H
\81[
\83\80\83N
\83\8d\81[
\83Y
2087 procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
2090 //
\83L
\83\83\83r
\83l
\83b
\83g
\81~
\83{
\83^
\83\93\83N
\83\8a\83b
\83N
2091 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
2093 CabinetVisibleAction.Execute;
2094 // CabinetPanelVisible(false);
2097 //
\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
2098 procedure TGikoForm.SetBBSMenu;
2101 item : TBBSMenuItem;
2104 //
\83\81\83j
\83\85\81[
\82ð
\8dí
\8f\9c
2105 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
2107 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
2108 CabinetSelectPopupMenu.Items[ i ].Free;
2109 CabinetMenu.Items[ i ].Free;
2110 BBSSelectPopupMenu.Items[ i ].Free;
2116 //
\83\81\83j
\83\85\81[
\82ð
\90Ý
\92è
2117 for i := Length( BBSs ) - 1 downto 0 do begin
2119 item := TBBSMenuItem.Create( PopupMenu );
2120 item.Caption := BBSs[ i ].Title;
2121 item.Data := BBSs[ i ];
2122 item.OnClick := BBSMenuItemOnClick;
2123 CabinetSelectPopupMenu.Items.Insert( 0, item );
2124 item := TBBSMenuItem.Create( PopupMenu );
2125 item.Caption := BBSs[ i ].Title;
2126 item.Data := BBSs[ i ];
2127 item.OnClick := BBSMenuItemOnClick;
2128 CabinetMenu.Insert( 0, item );
2129 item := TBBSMenuItem.Create( PopupMenu );
2130 item.Caption := BBSs[ i ].Title;
2131 item.Data := BBSs[ i ];
2132 item.OnClick := BBSMenuItemOnClick;
2133 BBSSelectPopupMenu.Items.Insert( 0, Item );
2140 procedure TGikoForm.ReloadBBS;
2145 //
\83^
\83u
\83N
\83\8d\81[
\83Y
2146 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
2147 GikoSys.Setting.ShowDialogForAllTabClose := false;
2148 AllTabCloseAction.Execute;
2149 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
2151 SetContent(BrowserNullTab);
2152 //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
2153 TreeView.Items.Clear;
2157 for i := Length( BBSs ) - 1 downto 0 do begin
2158 if BBSs[ i ] <> nil then
2167 FTreeType := gttNone;
2169 GikoSys.ListBoardFile; //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\93Ç
\8d\9e
2171 // BBS
\83\81\83j
\83\85\81[
\82Ì
\8dX
\90V
2174 ShowBBSTree( BBSs[ 0 ] );
2176 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
2181 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
2182 FavoriteDM.WriteFavorite;
2184 FavoriteDM.ReadFavorite;
2190 //
\83{
\81[
\83h
\83c
\83\8a\81[
\90Ý
\92è
2191 procedure TGikoForm.SetBoardTreeNode(
2197 CategoryNode: TTreeNode;
2198 BoardNode: TTreeNode;
2199 Category: TCategory;
2202 //
\94Â
\83\8a\83X
\83g
\82Ì
\90Ý
\92è
2203 FActiveBBS := inBBS;
2204 TreeView.Items.BeginUpdate;
2205 TreeView.Items.Clear;
2207 if not inBBS.IsBoardFileRead then
2208 GikoSys.ReadBoardFile( inBBS );
2210 if SplashWindow <> nil then
2211 SplashWindow.ProgressBar.Max := inBBS.Count;
2215 //
\83L
\83\83\83r
\83l
\83b
\83g
\95\
\8e¦
\91O
\82É
\8dÄ
\83\
\81[
\83g
2216 if ( GikoSys.Setting.BBSSortIndex <> 0 ) or ( GikoSys.Setting.BBSSortOrder <> true ) then begin
2217 Sort.SortOrder := true;
2218 Sort.SortIndex := 0;
2219 Sort.SortNoFlag := true;
2220 inBBS.Sort(CategorySortProc);
2223 Root := TreeView.Items.Add( nil, inBBS.Title );
2224 Root.ImageIndex := ITEM_ICON_2CH1;
2225 Root.SelectedIndex := ITEM_ICON_2CH2;
2227 for i := 0 to inBBS.Count - 1 do begin
2228 Category := TCategory(inBBS.Items[i]);
2229 CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
2230 CategoryNode.Data := Category;
2231 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
2232 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
2234 //
\83L
\83\83\83r
\83l
\83b
\83g
\95\
\8e¦
\91O
\82É
\8dÄ
\83\
\81[
\83g
2235 if ( GikoSys.Setting.CategorySortIndex <> 0 ) or ( GikoSys.Setting.CategorySortOrder <> true ) then begin
2236 Sort.SortOrder := true;
2237 Sort.SortIndex := 0;
2238 Sort.SortNoFlag := true;
2239 Category.CustomSort(BoardSortProc);
2242 for j := 0 to Category.Count - 1 do begin
2243 Board := TBoard(Category.Items[j]);
2245 BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
2246 BoardNode.Data := Board;
2247 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
2248 if not Board.IsLogFile then begin
2249 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
2250 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
2252 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
2253 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
2254 for k := 0 to Board.Count - 1 do begin
2255 if Board.Items[ k ].IsLogFile then begin
2256 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
2257 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
2266 CategoryNode.Expanded := Category.NodeExpand;
2268 if SplashWindow <> nil then begin
2269 SplashWindow.ProgressBar.StepIt;
2270 Application.ProcessMessages;
2274 TreeView.Items.EndUpdate;
2278 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
2280 COLUMN: array[0..0] of string = ('
\83J
\83e
\83S
\83\8a\96¼');
2282 ListColumn: TListColumn;
2285 ListView.Items.BeginUpdate;
2287 Screen.Cursor := crHourGlass;
2289 ListView.Columns.Clear;
2290 for i := 0 to Length(COLUMN) - 1 do begin
2291 ListColumn := ListView.Columns.Add;
2292 ListColumn.Caption := COLUMN[i];
2293 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
2296 ListView.Items.Count := 0;
2297 ListView.Items.Clear;
2298 ListView.Items.Count := ABBS2ch.Count;
2300 // UpFolderAction.Enabled := False;
2301 // AllItemAction.Enabled := False;
2302 // LogItemAction.Enabled := False;
2303 // NewItemAction.Enabled := False;
2304 // SelectItemAction.Enabled := False;
2305 // ListDownloadToolButton.Enabled := False;
2306 // BoardReservToolButton.Enabled := False;
2307 // ListThreadDownloadToolButton.Enabled := False;
2309 ListNameLabel.Caption := ABBS2ch.Title;
2310 FolderImage.Picture := nil;
2311 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
2313 FSortIndex := GikoSys.Setting.BBSSortIndex;
2314 FSortOrder := GikoSys.Setting.BBSSortOrder;
2315 if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
2316 ListViewSort(nil, ListView.Column[FSortIndex]);
2318 Result := ABBS2ch.Count;
2320 Screen.Cursor := crDefault;
2321 ListView.Items.EndUpdate;
2325 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
2327 COLUMN: array[0..2] of string = ('
\94Â
\96¼', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e');
2329 ListColumn: TListColumn;
2332 ListView.Items.BeginUpdate;
2334 Screen.Cursor := crHourGlass;
2336 ListView.Columns.Clear;
2337 for i := 0 to Length(COLUMN) - 1 do begin
2338 ListColumn := ListView.Columns.Add;
2339 ListColumn.Caption := COLUMN[i];
2340 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
2343 ListView.Items.Count := 0;
2344 ListView.Items.Clear;
2345 ListView.Items.Count := Category.Count;
2347 // UpFolderAction.Enabled := True;
2348 // AllItemAction.Enabled := False;
2349 // LogItemAction.Enabled := False;
2350 // NewItemAction.Enabled := False;
2351 // SelectItemAction.Enabled := False;
2352 // ListDownloadToolButton.Enabled := False;
2353 // BoardReservToolButton.Enabled := False;
2354 // ListThreadDownloadToolButton.Enabled := False;
2356 ListNameLabel.Caption := Category.Title;
2357 FolderImage.Picture := nil;
2358 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2360 FSortIndex := GikoSys.Setting.CategorySortIndex;
2361 FSortOrder := GikoSys.Setting.CategorySortOrder;
2362 if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
2363 ListViewSort(nil, ListView.Column[FSortIndex]);
2365 Result := Category.Count;
2367 Screen.Cursor := crDefault;
2368 ListView.Items.EndUpdate;
2372 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2374 COLUMN: array[0..7] of string = ('
\83X
\83\8c\83b
\83h
\96¼', '
\83J
\83E
\83\93\83g', '
\8eæ
\93¾', '
\90V
\92\85',
2375 '
\96¢
\93Ç', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e', '
\83X
\83\8c\8dì
\90¬
\93ú
\8e\9e');
2376 COLUMN_NONACQUIREDCOUNT: string = '
\96¢
\8eæ
\93¾';
2377 COLUMN_ALIGNMENT: array[0..7] of TAlignment = (taLeftJustify, taRightJustify,
2378 taRightJustify, taRightJustify,
2379 taRightJustify, taLeftJustify,
2380 taLeftJustify, taLeftJustify);
2381 //No,
\83X
\83\8c\83b
\83h
\96¼,
\83J
\83E
\83\93\83g,
\8f\84\89ñ
\97\
\96ñ,
\8eæ
\93¾
\93ú
\8e\9e
2383 ListColumn: TListColumn;
2386 ListView.Items.BeginUpdate;
2388 Screen.Cursor := crHourGlass;
2390 //
\83`
\83\89\82Â
\82«
\96h
\8e~
\82Ì
\82½
\82ß
\81A
\95Ï
\8dX
\82³
\82ê
\82Ä
\82¢
\82é
\8fê
\8d\87\82Ì
\82Ý
2391 //
\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Ó
2392 if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2394 ListView.Columns.Clear;
2395 for i := 0 to Length(COLUMN) - 1 do begin
2396 ListColumn := ListView.Columns.Add;
2397 ListColumn.Caption := COLUMN[i];
2398 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2399 ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2402 if GikoSys.Setting.NonAcquiredCount then
2403 ListView.Columns[2].Caption := COLUMN_NONACQUIREDCOUNT
2405 ListView.Columns[2].Caption := COLUMN[2];
2407 ListView.Items.Count := 0;
2408 ListView.Items.Clear;
2410 case GikoForm.ViewType of
2411 gvtAll: ListView.Items.Count := Board.Count;
2412 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2413 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2414 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2417 ListNameLabel.Caption := Board.Title;
2418 FolderImage.Picture := nil;
2419 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2421 FSortIndex := GikoSys.Setting.BoardSortIndex;
2422 FSortOrder := GikoSys.Setting.BoardSortOrder;
2423 if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
2424 ListViewSort(nil, ListView.Column[FSortIndex]);
2426 Result := Board.Count;
2428 Screen.Cursor := crDefault;
2429 ListView.Items.EndUpdate;
2433 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2435 // FileName: string;
2436 // DateTime: TDateTime;
2439 Category: TCategory;
2441 ThreadItem: TThreadItem;
2443 ActivListObj : TObject;
2445 ActivListObj := ActiveList;
2446 if ActivListObj is TBBS then begin
2447 BBS := TBBS(ActivListObj);
2449 ListView.StateImages := nil;
2451 if BBS = nil then Exit;
2452 if BBS.Count <= 0 then Exit;
2453 if Item = nil then Exit;
2454 if Item.Index >= BBS.Count then Exit;
2455 if ListView.Items.Count = 0 then Exit;
2457 if not (BBS.Items[Item.index] is TCategory) then Exit;
2458 Category := TCategory(BBS.Items[Item.index]);
2460 if Category = nil then Exit;
2462 if ListNumberVisibleAction.Checked then
2463 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2465 Item.Caption := Category.Title;
2467 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2468 Item.Data := Category;
2469 end else if ActivListObj is TCategory then begin
2470 Category := TCategory(ActivListObj);
2472 ListView.StateImages := nil;
2474 if Category = nil then Exit;
2475 if Category.Count <= 0 then Exit;
2476 if Item = nil then Exit;
2477 if Item.Index >= Category.Count then Exit;
2478 if ListView.Items.Count = 0 then Exit;
2480 if not (Category.Items[Item.Index] is TBoard) then Exit;
2481 Board := TBoard(Category.Items[Item.Index]);
2483 if Board = nil then Exit;
2485 if ListNumberVisibleAction.Checked then
2486 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2488 Item.Caption := Board.Title;
2490 if Item.SubItems.Count <> 2 then begin
2491 Item.SubItems.Clear;
2492 Item.SubItems.Add('');
2493 Item.SubItems.Add('');
2496 Item.ImageIndex := ITEM_ICON_BOARD1;
2499 Item.SubItems[0] := Board.RoundName // '
\97\
\96ñ'
2501 Item.SubItems[0] := '';
2503 if Board.RoundDate = ZERO_DATE then begin
2504 Item.SubItems[1] := '';
2506 Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2508 end else if ActivListObj is TBoard then begin
2509 Board := TBoard(ActivListObj);
2511 if GikoSys.Setting.ListIconVisible then
2512 ListView.StateImages := StateIconImageList
2514 ListView.StateImages := nil;
2516 case GikoForm.ViewType of
2517 gvtAll: BoardCnt := Board.Count;
2518 gvtLog: BoardCnt := Board.GetLogThreadCount;
2519 gvtNew: BoardCnt := Board.GetNewThreadCount;
2520 gvtUser: BoardCnt := Board.GetUserThreadCount;
2525 // if Board = nil then Exit;
2526 if BoardCnt <= 0 then Exit;
2527 if Item = nil then Exit;
2528 if Item.Index > BoardCnt then Exit;
2529 if ListView.Items.Count = 0 then Exit;
2531 // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2534 case GikoForm.ViewType of
2535 gvtAll: if Item.Index >= Board.Count then Exit else
2536 ThreadItem := TThreadItem(Board.Items[Item.Index]);
2537 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2538 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2539 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2542 if ThreadItem = nil then Exit;
2544 // if ListNumberVisibleAction.Checked then
2545 // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2547 RepStr := ThreadItem.Title;
2548 RepStr := CustomStringReplace(RepStr, '<', '<' );
2549 RepStr := CustomStringReplace(RepStr, '>', '>' );
2550 RepStr := CustomStringReplace(RepStr, '"', '"' );
2551 RepStr := CustomStringReplace(RepStr, '&', '&' );
2552 //RepStr := StringReplace(RepStr, '
\81\97\81M', ',', [rfReplaceAll]);
2554 if Item.SubItems.Count <> 7 then begin
2555 Item.SubItems.Clear;
2556 Item.SubItems.Add('');
2557 Item.SubItems.Add('');
2558 Item.SubItems.Add('');
2559 Item.SubItems.Add('');
2560 Item.SubItems.Add('');
2561 Item.SubItems.Add('');
2562 Item.SubItems.Add('');
2565 if ListNumberVisibleAction.Checked then
2566 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2568 Item.Caption := RepStr;
2570 case ThreadItem.AgeSage of
2571 gasNone: Item.StateIndex := -1;
2572 gasNew: Item.StateIndex := 0;
2573 gasAge: Item.StateIndex := 1;
2574 gasSage: Item.StateIndex := 2;
2577 if ThreadItem.IsLogFile then begin
2578 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2579 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2580 if GikoSys.Setting.NonAcquiredCount then
2581 Item.SubItems[1] := IntToStr(ThreadItem.AllResCount - ThreadItem.Count)
2583 Item.SubItems[1] := IntToStr(ThreadItem.Count);
2584 if ThreadItem.NewResCount = 0 then
2585 Item.SubItems[2] := ''
2587 Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2588 Item.SubItems[3] := '';
2589 if ThreadItem.Round then
2590 Item.SubItems[4] := ThreadItem.RoundName
2592 Item.SubItems[4] := '';
2593 if ThreadItem.RoundDate = ZERO_DATE then begin
2594 Item.SubItems[5] := '';
2596 Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2597 if ThreadItem.NewArrival then
2598 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2599 if ThreadItem.CreateDate = ZERO_DATE then begin
2600 Item.SubItems[6] := '';
2602 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2605 Item.ImageIndex := ITEM_ICON_THREAD1;
2606 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2607 Item.SubItems[1] := '';
2608 Item.SubItems[2] := '';
2609 Item.SubItems[3] := '';
2610 Item.SubItems[4] := '';
2611 Item.SubItems[5] := '';
2612 if not GikoSys.Setting.CreationTimeLogs then
2613 if ThreadItem.CreateDate = ZERO_DATE then
2614 Item.SubItems[6] := ''
2616 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2620 Item.Data := ThreadItem;
2624 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2625 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2626 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2627 var Index: Integer);
2633 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2639 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2640 EndIndex: Integer; OldState, NewState: TItemStates);
2645 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2653 threadItem : TThreadItem;
2655 Protocol, Host, Path, Document, Port, Bookmark: string;
2660 ActiveFileName: string;
2666 if not( TObject(Sender) is TWebBrowser )then
2670 if (TWebBrowser(Sender) <> nil) and (not TWebBrowser(Sender).Busy) and (Assigned(TWebBrowser(Sender).Document)) then begin
2671 if LowerCase(OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset) <> 'shift_jis' then begin
2672 OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset := 'shift_jis';
2679 if PreviewTimer.Enabled then
2680 PreviewTimer.Enabled := False;
2681 Application.CancelHint;
2683 if GetActiveContent <> nil then
2684 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2686 ActiveFileName := '';
2688 FActiveContent := nil;
2692 StatusBar.Panels[1].Text := Text;
2694 if FHint <> nil then begin
2695 FHint.ReleaseHandle;
2698 if FPreviewBrowser <> nil then
2699 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2701 if not GikoSys.Setting.UnActivePopup then
2702 if not GikoForm.Active then
2705 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2706 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2709 Ext := AnsiLowerCase(ExtractFileExt(Text));
2710 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2711 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2712 if FPreviewBrowser = nil then begin
2713 FPreviewBrowser := TPreviewBrowser.Create(Self);
2714 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2715 TOleControl(FPreviewBrowser).Parent := nil;
2717 FPreviewBrowser.Navigate(BLANK_HTML);//
\91O
\89ñ
\82Ì
\83v
\83\8c\83r
\83\85\81[
\89æ
\91\9c\8fÁ
\8b\8e\97p
2718 FPreviewURL := Text;
2719 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2720 PreviewTimer.Enabled := True;
2721 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2722 if Pos('mailto:', Text) = 1 then begin
2723 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2724 //
\83M
\83R
\83i
\83r
\83X
\83\8c \83p
\81[
\83g3
\82Ì466
\8e\81\82É
\8a´
\8eÓ
2726 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2727 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2728 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2729 if (Assigned(e)) then begin
2730 tmp2 := ZenToHan(e.Get_outerText);
2731 if (GikoSys.IsNumeric(tmp2)) then begin
2732 //
\82\93\82Í
\83\8c\83X
\94Ô
\8d\86\82Á
\82Û
\82¢
\82Á
\82·
\81B
2733 wkIntSt := StrToInt(tmp2);
2734 wkIntTo := StrToInt(tmp2);
2735 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2736 FHint.PopupType := gptThread;
2737 SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False);
2739 FHint.PopupType := gptRaw;
2744 threadItem := GetActiveContent;
2745 if Pos('about:blank..', Text) = 1 then begin
2746 if (AnsiPos('http://jbbs.livedoor.com/', threadItem.URL) <> 0) then begin
2747 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2748 Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo);
2749 if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then
2750 buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo)
2751 else if( PathRec.FSt <> 0 ) then
2752 buf := IntToStr(PathRec.FSt);
2753 end else if AnsiPos('machi.to/bbs/', threadItem.URL) <> 0 then begin
2754 URL := threaditem.URL;
2755 buf := Copy(Text,AnsiPos('&st=',Text),Length(Text)-AnsiPos('&st=',Text) + 1);
2757 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2758 buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text));
2764 PathRec := Gikosys.Parse2chURL2(URL);
2765 if (PathRec.FNoParam) then begin
2769 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2770 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
2772 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
2774 URL := GikoSys.GetBrowsableThreadURL( URL );
2775 wkIntSt := PathRec.FSt;
2776 wkIntTo := PathRec.FTo;
2778 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2781 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2783 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2785 end else if wkIntSt > wkIntTo then begin
2790 //if wkIntSt = 0 then
2792 //if wkINtTo = 0 then
2794 //if PathRec.FFirst then
2796 if PathRec.FStBegin then
2798 if PathRec.FToEnd then
2801 //ATitle := ActiveFileName <> PathRec.FKey;
2802 if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
2807 threadItem := BBSsFindThreadFromURL( URL );
2809 if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
2810 board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
2811 if board <> nil then begin
2812 if not board.IsThreadDatRead then
2813 GikoSys.ReadSubjectFile( board );
2814 threadItem := board.FindThreadFromFileName( PathRec.FKey + '.dat' );
2818 if threadItem <> nil then begin
2819 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2820 FHint.PopupType := gptThread;
2821 SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2827 // ShowTextPopup(s);
2828 if FHint.PopupType = gptRaw then begin
2829 if FHint.Caption <> '' then
2832 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2838 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2841 //SysMenuApp: HMenu;
2843 FEnabledCloseButton := Enabled;
2844 SysMenu := GetSystemMenu(Handle, False);
2845 //SysMenuApp := GetSystemMenu(Application.Handle, False);
2847 if Enabled then begin
2848 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2849 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2851 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2852 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2855 DrawMenuBar(Handle);
2856 //DrawMenuBar(Application.Handle);
2859 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2860 var AllowChange: Boolean);
2862 //
\83\
\81[
\83g
\8f\87\82ð
\95Û
\91¶
\82·
\82é
\82æ
\82¤
\82É
\82µ
\82½
\82Ì
\82Å
\8dí
\8f\9c
2863 // if FTreeType = gtt2ch then
2864 // FSortIndex := -1;
2867 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2868 Shift: TShiftState);
2870 if GetActiveList is TBoard then begin
2871 if Key = VK_BACK then begin
2872 // UpFolderButtonClick(Sender);
2873 end else if Key = VK_SPACE then begin
2874 ListDoubleClick(Shift);
2875 end else if Key = VK_RETURN then begin
2878 end else begin // TBBS, TCategory
2879 if Key = VK_BACK then begin
2880 // UpFolderButtonClick(Sender);
2881 end else if Key = VK_SPACE then begin
2883 end else if Key = VK_RETURN then begin
2884 ListDoubleClick(Shift);
2889 function TGikoForm.GetHttpState: Boolean;
2891 Result := FHttpState;
2894 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2895 Column: TListColumn);
2897 if FSortIndex = Column.Index then
2898 FSortOrder := not FSortOrder
2900 FSortOrder := False;
2901 ListViewSort(Sender, Column);
2904 procedure TGikoForm.ListViewSort(Sender: TObject; Column: TListColumn);
2908 wkCategory: TCategory;
2911 for i := 0 to ListView.Columns.Count - 1 do
2912 ListView.Column[i].ImageIndex := -1;
2914 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
2916 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
2918 Sort.SortNoFlag := ListNumberVisibleAction.Checked;
2920 //if TObject(TreeView.Selected.Data) is TBBS then begin
2921 if TObject( FActiveList ) is TBBS then begin
2922 //wkBBS := TBBS(TreeView.Selected.Data);
2923 wkBBS := TBBS( FActiveList );
2924 Sort.SortOrder := FSortOrder;
2925 Sort.SortIndex := Column.Index;
2926 GikoSys.Setting.BBSSortIndex := Column.Index;
2927 GikoSys.Setting.BBSSortOrder := FSortOrder;
2928 wkBBS.Sort(CategorySortProc);
2930 //end else if TObject(TreeView.Selected.Data) is TCategory then begin
2931 end else if TObject( FActiveList ) is TCategory then begin
2932 //wkCategory := TCategory(TreeView.Selected.Data);
2933 wkCategory := TCategory( FActiveList );
2934 Sort.SortOrder := FSortOrder;
2935 Sort.SortIndex := Column.Index;
2936 GikoSys.Setting.CategorySortIndex := Column.Index;
2937 GikoSys.Setting.CategorySortOrder := FSortOrder;
2938 wkCategory.CustomSort(BoardSortProc);
2940 //end else if TObject(TreeView.Selected.Data) is TBoard then begin
2941 end else if TObject( FActiveList ) is TBoard then begin
2942 //wkBoard := TBoard(TreeView.Selected.Data);
2943 wkBoard := TBoard( FActiveList );
2944 Sort.SortOrder := FSortOrder;
2945 Sort.SortIndex := Column.Index;
2946 Sort.SortNonAcquiredCountFlag := GikoSys.Setting.NonAcquiredCount;
2947 GikoSys.Setting.BoardSortIndex := Column.Index;
2948 GikoSys.Setting.BoardSortOrder := FSortOrder;
2949 wkBoard.CustomSort(ThreadItemSortProc);
2952 FSortIndex := Column.Index;
2955 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2956 Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean);
2960 DefaultDraw := True;
2962 DefaultDraw := False;
2963 if (cdsSelected in State) or (cdsHot in State) then begin
2964 Sender.Canvas.Brush.Color := clHighlight;
2965 Sender.Canvas.Font.Color := clHighlightText;
2967 Sender.Canvas.Brush.Color := clBtnFace;
2968 Sender.Canvas.Font.Color := clBtnText;
2970 ARect := Rect(Button.Left, Button.Top, Button.Left + Button.Width, Button.Top + Button.Height);
2971 Sender.Canvas.FillRect(ARect);
2972 DrawText(Sender.Canvas.Handle, PChar(Button.Caption), -1, ARect, DT_SINGLELINE or DT_VCENTER or DT_CENTER);
2975 function TGikoForm.GetTreeNode(Data: TObject): TTreeNode;
2980 Nodes := TreeView.Items;
2982 for i := 0 to Nodes.Count - 1 do begin
2983 if Nodes.Item[i].Data = Data then begin
2984 Result := Nodes.Item[i];
2991 procedure TGikoForm.BrowserBeforeNavigate2(Sender: TObject;
2992 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
2993 Headers: OleVariant; var Cancel: WordBool);
2998 kMenuName: string = 'menu:';
3001 if Pos(kMenuName, URL) <> 0 then begin
3002 sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
3004 if not GikoSys.IsNumeric(sNo) then Exit;
3008 KokoPopupMenu.Tag := StrToInt(sNo);
3009 KokoPopupMenu.Popup(p.x, p.y);
3010 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
3011 Cancel := not GikoSys.Setting.OpenMailer;
3016 procedure TGikoForm.ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
3017 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
3018 var DefaultDraw: Boolean);
3020 ThreadItem: TThreadItem;
3022 // TListView(Sender).Canvas.Font.Style := [];
3023 if TObject(Item.Data) is TThreadItem then begin
3024 ThreadItem := TThreadItem(Item.Data);
3025 if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
3026 ListView.Canvas.Brush.Color := FOddColor;
3028 ListView.Canvas.Brush.Color := FListViewBackGroundColor;
3030 // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
3031 if ThreadItem.UnRead then
3032 TListView(Sender).Canvas.Font.Style := [fsBold];
3036 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
3038 Application.ProcessMessages;
3039 if Application.Terminated then
3041 if PreviewTimer.Enabled then
3042 PreviewTimer.Enabled := False;
3043 //
\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
3044 if FHint <> nil then begin
3045 FHint.ReleaseHandle;
3050 if FPreviewBrowser <> nil then
3051 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
3055 procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
3056 const ARect: TRect; var DefaultDraw: Boolean);
3060 IsBoardNode: Boolean;
3066 Category: TCategory;
3070 DefaultDraw := True;
3072 if FTreeType = gttHistory then Exit;
3074 TreeView.Canvas.Font.Color := clBlue;
3075 IsBoardNode := False;
3076 for i := 0 to TreeView.Items.Count - 1 do begin
3078 if not TreeView.Items[i].IsVisible then
3081 if TObject(TreeView.Items[i].Data) is TCategory then begin
3082 if TreeView.Items[i].Expanded then
3085 IsBoardNode := False;
3086 Category := TCategory(TreeView.Items[i].Data);
3087 for j := 0 to Category.Count - 1 do begin
3088 Board := Category.Items[j];
3089 if Board <> nil then begin
3090 if Board.UnRead > 0 then begin
3098 end else if TObject(TreeView.Items[i].Data) is TBoard then begin
3099 IsBoardNode := True;
3100 Board := TBoard(TreeView.Items[i].Data);
3101 Cnt := Board.UnRead;
3107 Bitmap := TBitmap.Create;
3109 Bitmap.Canvas.Font.Assign(TreeView.Canvas.Font);
3110 Bitmap.Canvas.Font.Style := [fsBold];
3111 NodeWidth := Bitmap.Canvas.TextWidth(TreeView.Items[i].Text);
3116 NodeRect := TreeView.Items[i].DisplayRect(True);
3119 CntText := '(' + IntToStr(Cnt) + ')'
3120 else if Cnt = 1 then
3124 TextWidth := TreeView.Canvas.TextWidth(CntText);
3126 TextRect := Rect(NodeRect.Left + NodeWidth + 8,
3128 NodeRect.Left + NodeWidth + TextWidth + 8,
3130 DrawText(TreeView.Canvas.Handle,
3134 DT_SINGLELINE or DT_VCENTER);
3136 TreeViewCustomDrawItem(nil, nil, [], DefaultDraw);
3139 procedure TGikoForm.TreeViewCustomDrawItem(Sender: TCustomTreeView;
3140 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
3143 Category: TCategory;
3146 DefaultDraw := True;
3148 if FTreeType = gttHistory then Exit;
3150 TreeView.Canvas.Font.Style := [];
3151 if Node <> nil then begin
3152 if TObject(Node.Data) is TCategory then begin
3153 Category := TCategory(Node.Data);
3154 for i := 0 to Category.Count - 1 do begin
3155 Board := Category.Items[i];
3156 if Board <> nil then begin
3157 if Board.UnRead > 0 then begin
3158 TreeView.Canvas.Font.Style := [fsBold];
3163 end else if TObject(Node.Data) is TBoard then begin
3164 Board := TBoard(Node.Data);
3165 if Board.UnRead > 0 then
3166 TreeView.Canvas.Font.Style := [fsBold];
3171 procedure TGikoForm.TreeViewExpanded(Sender: TObject; Node: TTreeNode);
3173 TreeView.Invalidate;
3175 if TObject(Node.Data) is TBBS then begin
3176 TBBS(Node.Data).NodeExpand := True;
3177 end else if TObject(Node.Data) is TCategory then begin
3178 TCategory(Node.Data).NodeExpand := True;
3179 end else if TObject(Node.Data) is TBoard then begin
3180 TBoard(Node.Data).NodeExpand := True;
3184 {procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
3186 TreeSplitter.Visible := PanelVisible;
3187 CabinetPanel.Visible := PanelVisible;
3188 CabinetToolButton.Down := PanelVisible;
3191 procedure TGikoForm.ListViewAllSelect;
3197 procedure TGikoForm.TreeViewDblClick(Sender: TObject);
3202 GetCursorPos(APoint);
3203 APoint := TreeView.ScreenToClient(APoint);
3204 HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
3205 if not (htOnLabel in HitTest) then Exit;
3207 TreeDoubleClick( TreeView.Selected );
3210 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
3212 AddMessageList(Msg, nil, Icon);
3215 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
3219 boardPlugIn : TBoardPlugIn;
3223 if Item.DownType = gdtBoard then
3224 ATitle := Item.Board.Title
3226 ATitle := Item.ThreadItem.Title;
3228 ATitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j';
3230 if Item.State in [gdsComplete, gdsDiffComplete] then begin
3232 if Item.DownType = gdtBoard then begin
3235 AddMessageList(ATitle + ' [
\83X
\83\8c\88ê
\97\97\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3236 if GetActiveList = Item.Board then begin
3238 SetActiveList(Item.Board);
3240 Item.Board.Modified := True;
3241 Item.Board.IsThreadDatRead := True;
3243 end else if Item.DownType = gdtThread then begin
3246 Item.ThreadItem.NewArrival := True;
3247 if (Item.ThreadItem.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin
3248 boardPlugIn := Item.ThreadItem.BoardPlugIn;
3249 Item.ThreadItem.Title := GikoSys.DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 )).FTitle;
3250 ATitle := Item.ThreadItem.Title;
3251 end else if ATitle = '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j' then begin
3252 ATitle := GikoSys.DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1)).FTitle;
3254 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
3255 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then
3256 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
3258 if GikoSys.Setting.BrowserTabVisible then begin
3259 if GetActiveContent = Item.ThreadItem then
3260 InsertBrowserTab(Item.ThreadItem)
3261 else if (ListView.Selected <> nil ) and ( TObject(ListView.Selected.Data) is TThreadItem ) and ( Item.ThreadItem = TThreadItem(ListView.Selected.Data)) then
3262 InsertBrowserTab(Item.ThreadItem, True)
3264 InsertBrowserTab(Item.ThreadItem, False);
3266 if (GetActiveContent = Item.ThreadItem) or (FActiveContent = nil) or(FActiveContent.Browser = BrowserNullTab.Browser) then
3267 InsertBrowserTab(Item.ThreadItem);
3270 if Item.State = gdsComplete then begin
3272 AddMessageList(ATitle + ' [
\83X
\83\8c\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3274 PlaySound('NewDiff');
3275 AddMessageList(ATitle + ' [
\83X
\83\8c\8d·
\95ª
\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3278 //
\8f\84\89ñ
\82 \82è
\82Ì
\8fê
\8d\87\81\95\82P
\82O
\82O
\82O
\92´
\82Í
\8f\84\89ñ
\8dí
\8f\9c
3279 if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin
3280 Item.ThreadItem.Round := False;
3281 Item.ThreadItem.RoundName := '';
3282 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);
3288 end else if Item.State = gdsNotModify then begin
3290 { if (Item.DownType = gdtThread) and (AddHistory(Item.ThreadItem)) then begin
3291 //SetContent(Item.ThreadItem);
3292 InsertBrowserTab(Item.ThreadItem);
3294 AddMessageList(ATitle + ' [
\96¢
\8dX
\90V]', nil, gmiSAD);
3295 PlaySound('NoChange');
3296 Screen.Cursor := crDefault;
3297 end else if Item.State = gdsAbort then begin
3299 AddMessageList(ATitle + ' [
\92\86\92f]', nil, gmiSAD);
3300 end else if Item.State = gdsError then begin
3305 AddMessageList(ATitle + ' [
\83G
\83\89\81[(' + IntToStr(Item.ResponseCode) + s + ')]', nil, gmiNG);
3306 // if Item.ResponseCode = 302 then
3307 // 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);
3313 if FWorkCount < 0 then FWorkCount := 0;
3314 if FWorkCount = 0 then begin
3316 Animate.Active := False;
3318 Screen.Cursor := crDefault;
3325 procedure TGikoForm.WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
3327 // SetProgressValue(Number, 0, AWorkCountMax);
3328 // ProgressBar.Visible := True;
3329 ProgressBar.Position := 0;
3330 ProgressBar.Max := AWorkCountMax;
3331 FDownloadTitle := AWorkTitle;
3332 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ð
\8aJ
\8en
\82µ
\82Ü
\82·';
3333 FDownloadMax := AWorkCountMax;
3336 procedure TGikoForm.WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
3338 ProgressBar.Position := 0;
3339 if FDownloadMax <> 0 then
3340 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ª
\8a®
\97¹
\82µ
\82Ü
\82µ
\82½';
3343 procedure TGikoForm.Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
3345 ProgressBar.Position := AWorkCount;
3346 // SetProgressValue(Number, AWorkCount);
3347 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86 (' + IntToStr(AWorkCount) + '/' + IntToStr(FDownloadMax) + ')';
3351 procedure TGikoForm.SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
3353 Component: TComponent;
3355 Component := FindComponent('ProgressBar' + IntToStr(Number + 1));
3356 if Component <> nil then begin
3357 if not (Component is TProgressBar) then Exit;
3359 TProgressBar(Component).Max := Max;
3360 TProgressBar(Component).Position := Value;
3365 procedure TGikoForm.AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
3367 ListItem: TListItem;
3369 MessageListView.Items.BeginUpdate;
3371 ListItem := MessageListView.Items.Add;
3372 ListItem.Caption := ACaption;
3373 ListItem.Data := AObject;
3374 ListItem.MakeVisible(False);
3376 gmiOK: ListItem.ImageIndex := 0;
3377 gmiSAD: ListItem.ImageIndex := 1;
3378 gmiNG: ListItem.ImageIndex := 2;
3379 gmiWhat: ListItem.ImageIndex := 3;
3382 MessageListView.Items.EndUpdate;
3386 {procedure TGikoForm.BrowserTabChange(Sender: TObject);
3389 ThreadItem: TThreadItem;
3391 ThreadItem := GetActiveContent;
3392 if ThreadItem <> nil then begin
3393 SetContent(ThreadItem);
3397 procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
3401 favItem : TFavoriteThreadItem;
3402 newBrowser : TBrowserRecord;
3405 if Threaditem = nil then Exit;
3407 if ThreadItem.IsLogFile then begin
3408 //
\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é
3409 //
\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é
3410 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil) and
3411 (FActiveContent.FBrowser <> BrowserNullTab.Browser)then begin
3412 j := FBrowsers.IndexOf(FActiveContent.FBrowser);
3413 if j = BROWSER_COUNT - 1 then
3414 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3416 favItem := TFavoriteThreadItem.Create(ThreadItem.URL, ThreadItem.Title );
3417 if not AddHistory( favItem ) then
3420 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
3421 if TObject(BrowserTab.Tabs.Objects[i]) is TBrowserRecord then begin
3422 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
3423 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = nil then begin
3424 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3425 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
3426 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3427 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3428 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3429 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3434 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
3435 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
3436 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3438 if ActiveTab then begin
3439 BrowserTab.TabIndex := i;
3440 BrowserTab.OnChange(nil);
3447 idx := BrowserTab.TabIndex;
3448 if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin
3449 newBrowser := TBrowserRecord.Create;
3450 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3451 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
3452 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3453 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3454 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3455 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3460 newBrowser.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
3461 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3462 //newBrowser.Browser.Navigate(BLANK_HTML);
3463 newBrowser.thread := ThreadItem;
3464 newBrowser.Repaint := true;
3465 // newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes;
3467 BrowserTab.Tabs.InsertObject(0, GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser);
3468 if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 1) then begin
3469 DeleteTab( TBrowserRecord( BrowserTab.Tabs.Objects[ 1 ] ) );
3473 if ActiveTab then begin
3474 BrowserTab.TabIndex := 0;
3478 newBrowser := TBrowserRecord.Create;
3479 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3480 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
3481 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3482 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3483 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3484 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3489 newBrowser.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
3490 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3491 //newBrowser.Browser.Navigate(BLANK_HTML);
3492 newBrowser.thread := ThreadItem;
3493 // newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes;
3494 newBrowser.Repaint := true;
3496 i := BrowserTab.Tabs.AddObject(GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser);
3497 if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 1) then begin
3498 DeleteTab( TBrowserRecord( BrowserTab.Tabs.Objects[ 0 ] ) );
3502 if ActiveTab then begin
3503 if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 0) then
3504 BrowserTab.TabIndex := 0
3506 BrowserTab.TabIndex := i;
3509 if(ActiveTab) or (idx = -1) then begin
3510 BrowserTab.OnChange(nil);
3513 if BrowserNullTab = nil then begin
3514 BrowserNullTab := TBrowserRecord.Create;
3515 BrowserNullTab.Browser := Browser;
3517 BrowserNullTab.thread := ThreadItem;
3518 BrowserTab.TabIndex := -1;
3519 SetContent(BrowserNullTab);
3522 if GikoSys.Setting.URLDisplay then
3523 AddressComboBox.Text := ThreadItem.URL;
3527 procedure TGikoForm.SetContent(inThread : TBrowserRecord);
3532 // HtmlName: string;
3535 // OldCursor: TCursor;
3539 ThreadItem: TThreadItem;
3540 Thread: TBrowserRecord;
3541 ThreadTitle, ThreadPTitle: string;
3542 ThreadScrollTop: Integer;
3543 ThreadIsLog, ThreadUnRead, ThreadNewArraical: boolean;
3546 idx := BrowserTab.TabIndex;
3547 if (FActiveContent <> nil) and
3548 (FActiveContent.Thread <> Thread.Thread) and
3549 (Assigned(FActiveContent.Browser.Document)) then begin
3553 //Application.ProcessMessages;
3554 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document).Body).ScrollTop;
3555 //if FActiveContent.Browser <> BrowserNullTab.Browser then
3556 // TOleControl(FActiveContent.Browser).Visible := false;
3559 MsgBox(Handle, E.Message, 'SetContent[<-ScrollTop]', 0);
3564 if not (Assigned(Thread)) or (Thread.Thread = nil) then begin
3565 Thread.Browser.Navigate(BLANK_HTML);
3566 BrowserBoardNameLabel.Caption := '';
3567 ItemBoardImage.Picture := nil;
3568 BrowserNameLabel.Caption := '';
3569 ItemImage.Picture := nil;
3570 BrowserNullTab.Thread := nil;
3571 //TOleControl(BrowserNullTab.Browser).Visible := true;
3572 ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
3573 FActiveContent := nil;
3575 end else if Thread.Browser = nil then begin
3576 if FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then
3577 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3578 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
3579 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
3580 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser := nil;
3581 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent <> nil then begin
3582 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent.Free;
3583 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent := nil;
3588 Thread.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
3589 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3591 ThreadTitle := Thread.Thread.Title;
3592 ThreadPTitle := Thread.Thread.ParentBoard.Title;
3593 ThreadScrollTop := Thread.Thread.ScrollTop;
3594 ThreadIsLog := Thread.Thread.IsLogFile;
3595 ThreadItem := Thread.Thread;
3596 ThreadNewArraical := Thread.Thread.NewArrival;
3597 ThreadUnRead := Thread.Thread.UnRead;
3598 BBSID := ThreadItem.ParentBoard.BBSID;
3599 FileName := ThreadItem.FileName;
3601 if GetCapture = ListView.Handle then
3604 Screen.Cursor := crHourGlass;
3608 if ThreadItem.UnRead then begin
3609 ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
3610 if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0;
3613 { if(FActiveContent <> nil) and (FActiveContent <> Thread) then begin
3614 if (FActiveContent.Browser <> BrowserNullTab.Browser) then
3615 ShowWindow(FActiveContent.Browser.Handle, SW_HIDE);
3618 ShowWindow(Thread.FBrowser.Handle, SW_SHOW);
3619 if (not Assigned(Thread.Browser.Document)) then begin
3620 Thread.Browser.Navigate('about:blank');
3622 FActiveContent := Thread;
3623 while (Thread.Browser.ReadyState <> READYSTATE_COMPLETE) and
3624 (Thread.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3625 Application.ProcessMessages;
3626 if idx <> BrowserTab.TabIndex then begin
3630 if not ThreadIsLog then begin
3631 Self.Caption := CAPTION_NAME ;
3633 s := '<HTML><BODY><CENTER>
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Í
\8eæ
\93¾
\82µ
\82Ä
\82¢
\82Ü
\82¹
\82ñ</CENTER></BODY></HTML>';
3634 doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
3636 doc.charset := 'Shift_JIS';
3642 Self.Caption := CAPTION_NAME + ' - [' + ThreadTitle + ']';
3643 //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«
3644 //
\90V
\8bK
\82ÉThread
\82ð
\8aJ
\82¢
\82½
\82Æ
\82«
\82É
\90^
\82É
\82È
\82Á
\82Ä
\82¢
\82é
\81B
3645 // if(Thread.Repaint) or (Thread.OnlyHundred <> GikoSys.OnlyAHundredRes)then begin
3646 if Thread.Repaint then begin
3647 //Thread.LastSize := ThreadItem.Size;
3648 Thread.Repaint := false;
3650 Thread.Browser.OnStatusTextChange := nil;
3651 doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
3652 GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
3654 // if (Assigned(Thread.Browser)) and (Thread.Browser <> nil) then
3655 Thread.Browser.OnStatusTextChange := BrowserStatusTextChange;
3656 //
\82È
\82º
\82©
\82±
\82±
\82Å
\96¾
\8e¦
\93I
\82ÉDocumentComplete
\82ð
\8cÄ
\82Î
\82È
\82¢
\82Æ
\82¤
\82Ü
\82
\82¢
\82©
\82È
\82¢
3657 //
\92Ç
\8bL
\81@200406/19
3658 //Visible
\82Ì
\82Æ
\82«
\82µ
\82©DocumentComplete
\82Í
\8cÄ
\82Î
\82ê
\82È
\82¢
\82ç
\82µ
\82¢
3659 Thread.FBrowser.OnDocumentComplete(Thread.FBrowser, Thread.FBrowser.Parent, url);
3660 // Thread.OnlyHundred := GikoSys.OnlyAHundredRes;
3661 Application.ProcessMessages;
3662 //
\82±
\82±
\82ÅApplication.ProcessMessages
\82ð
\8cÄ
\82Ô
\82±
\82Æ
\82É
\82æ
\82Á
\82ÄWebBrowser
\82ð
\8dX
\90V
\82³
\82¹
\82é
\81B
3663 //
\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é
3664 //
\81@by
\82à
\82¶
\82ã(2004/01/20)
3666 //if (Assigned(Thread)) and (Assigned(ThreadItem))then begin
3667 if(Thread <> nil) and (ThreadItem <>nil) then begin
3668 if ThreadUnRead then
3669 BrowserMovement('new', Thread)
3670 else if ThreadScrollTop <> 0 then begin
3672 doc.Body.ScrollTop := ThreadScrollTop;
3675 MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
3680 FActiveContent := nil;
3685 FActiveContent := nil;
3690 // Application.ProcessMessages;
3693 ThreadItem.UnRead := False;
3696 if (Assigned(Thread)) and (Assigned(Thread.Thread)) and (Thread <> nil) and (ThreadItem <>nil) then begin
3697 //FActiveContent := Thread;
3699 BrowserBoardNameLabel.Caption := ThreadPTitle;
3700 ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
3701 BrowserNameLabel.Caption := ThreadTitle;
3702 ItemImage.Picture := nil;
3704 if ThreadNewArraical then
3705 ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap)
3707 ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap)
3709 ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap);
3711 ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;
3712 BrowserNameLabel.Left := ItemImage.Left + 20;
3714 FActiveContent := nil;
3717 Screen.Cursor := crDefault;
3721 function TGikoForm.GetActiveContent: TThreadItem;
3724 if( Assigned(FActiveContent) ) and (Assigned(FActiveContent.Thread))
3725 and (FActiveContent <> nil) and (FActiveContent.Thread <> nil) then
3726 Result := FActiveContent.Thread
3728 FActiveContent := nil;
3732 FActiveContent := nil;
3737 procedure TGikoForm.SetActiveList(Obj: TObject);
3742 // if FActiveList <> Obj then begin
3745 if ListView.Selected <> nil then
3746 idx := ListView.Selected.Index
3749 ListView.Items.Count := 0;
3750 ListView.Items.Clear;
3751 ListView.Selected := nil;
3752 // ListView.Columns.Clear;
3754 Self.Caption := CAPTION_NAME;
3755 //Application.Title := CAPTION_NAME;
3757 if Obj is TBBS then begin
3758 for i := 0 to ListView.Columns.Count - 1 do
3759 ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i];
3760 SetCategoryListItem(TBBS(Obj));
3761 end else if Obj is TCategory then begin
3762 for i := 0 to ListView.Columns.Count - 1 do
3763 ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i];
3764 SetBoardListItem(TCategory(Obj));
3765 end else if Obj is TBoard then begin
3766 SetThreadListItem(TBoard(Obj));
3769 if idx >= 0 then begin
3770 ListView.ItemIndex := idx;
3771 ListView.ItemFocused := ListView.Items.Item[ idx ];
3777 //
\81\9a\81\9a\83q
\83\8d\83\86\83L
\83\81\83\82
3778 //
\82»
\82Ì
\82¤
\82¿interface
\82ð
\8eg
\82¤
3779 function TGikoForm.GetActiveList: TObject;
3781 Result := FActiveList;
3784 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType);
3786 SetListViewType(AViewType, '', False);
3789 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
3793 if ActiveList is TBoard then begin
3794 Board := TBoard(ActiveList);
3796 Board.ParentCategory.ParenTBBS.SelectText := SelectText;
3797 Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
3798 // Board.SelectText := SelectText;
3799 // Board.KubetsuChk := KubetsuChk;
3800 ViewType := AViewType;
3801 SetActiveList(Board);
3802 SetThreadListItem(Board);
3806 procedure TGikoForm.ListViewCustomDraw(Sender: TCustomListView;
3807 const ARect: TRect; var DefaultDraw: Boolean);
3813 if ListView.Items.Count = 0 then begin
3814 DefaultDraw := True;
3816 ListView.Canvas.Brush.Color := ListView.Color;
3817 ListView.Canvas.FillRect(ARect);
3821 ListView.Canvas.Font.Color := clWindowText;
3822 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3825 ListView.Canvas.Font.Color := clBlue;
3826 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';
3829 ListView.Canvas.Font.Color := clGreen;
3830 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\90V
\92\85\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3833 ListView.Canvas.Font.Color := clNavy;
3834 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';
3835 if GetActiveList is TBoard then
3836 s := Format(s, [TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText]);
3844 p := Point((ListView.ClientWidth div 2) - (ListView.Canvas.TextWidth(s) div 2),
3845 (ListView.ClientHeight div 2) - (ListView.Canvas.TextHeight(s) div 2));
3846 ListView.Canvas.TextOut(p.X, p.Y, s);
3848 DefaultDraw := True;
3852 procedure TGikoForm.DownloadList(Board: TBoard; ForceDownload: Boolean = False);
3854 Item: TDownloadItem;
3856 if not Board.IsThreadDatRead then
3857 GikoSys.ReadSubjectFile(Board);
3858 Item := TDownloadItem.Create;
3860 Item.Board := Board;
3861 Item.DownType := gdtBoard;
3862 Item.ForceDownload := ForceDownload;
3863 // AbortToolButton.Enabled := True;
3864 // Animate.Active := True;
3865 // FDownload.Add(Item);
3866 FControlThread.AddItem(Item);
3867 // Animate.Active := False;
3868 // AbortToolButton.Enabled := False;
3869 if FWorkCount = 0 then begin
3871 Animate.Active := True;
3874 Screen.Cursor := crAppStart;
3882 procedure TGikoForm.DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
3884 Item: TDownloadItem;
3886 Item := TDownloadItem.Create;
3888 Item.ThreadItem := ThreadItem;
3889 Item.DownType := gdtThread;
3890 Item.ForceDownload := ForceDownload;
3891 // AbortToolButton.Enabled := True;
3892 // Animate.Active := True;
3893 // FDownload.Add(Item);
3894 FControlThread.AddItem(Item);
3895 // Animate.Active := False;
3896 // AbortToolButton.Enabled := False;
3897 if FWorkCount = 0 then begin
3899 Animate.Active := True;
3902 Screen.Cursor := crAppStart;
3910 procedure TGikoForm.PlaySound(SoundEventName: string);
3914 FileName := GikoSys.Setting.FindSoundFileName(SoundEventName);
3915 if FileExists(FileName) then begin
3916 if not sndPlaySound(PChar(FileName), SND_ASYNC or SND_NOSTOP) then begin
3917 sndPlaySound(nil, SND_SYNC);
3918 Application.ProcessMessages;
3920 sndPlaySound(PChar(FileName), SND_ASYNC);
3925 function TGikoForm.AddHistory( favItem : TFavoriteThreadItem ): Boolean;
3928 Item: TFavoriteThreadItem;
3932 // if (GetActiveContent = ThreadItem) and
3933 // (ThreadItem.Count <= ThreadItem.Kokomade) then
3935 // if GetActiveContent = ThreadItem then
3939 if FTreeType = gttHistory then
3940 TreeView.Selected := nil;
3942 for i := 0 to FHistoryList.Count - 1 do begin
3943 if TObject(FHistoryList[i]) is TFavoriteThreadItem then begin
3944 Item := TFavoriteThreadItem(FHistoryList[i]);
3945 if Item.URL = favItem.URL then begin
3946 // SetContent(ThreadItem);
3947 FHistoryList.Move(i, 0);
3948 if FTreeType = gttHistory then
3949 if TreeView.Items.GetFirstNode <> TreeView.Items[ i ] then
3950 TreeView.Items[ i ].MoveTo( TreeView.Items.GetFirstNode, naInsert );
3957 if FHistoryList.Count > 0 then
3958 FHistoryList.Insert( 0, favItem )
3960 FHistoryList.Add( favItem );
3961 // SetContent(ThreadItem);
3963 if FTreeType = gttHistory then begin
3964 Node := TreeView.Items.Add( nil, favItem.Title );
3965 Node.MoveTo( TreeView.Items.GetFirstNode, naInsert );
3967 if favItem.NewArrival then begin
3968 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3969 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3971 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3972 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3975 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
3976 //
\81¦favItem.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
3977 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3978 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3979 Node.Data := favItem;
3983 procedure TGikoForm.DeleteHistory( threadItem: TThreadItem );
3987 for i := 0 to FHistoryList.Count - 1 do begin
3988 if threadItem.URL = TFavoriteThreadItem( FHistoryList.Items[i] ).URL then begin
3989 TFavoriteThreadItem( FHistoryList.Items[ i ] ).Free;
3990 FHistoryList.Delete(i);
3991 FHistoryList.Capacity := FHistoryList.Count;
3997 procedure TGikoForm.ClearHistory;
4001 //FHistoryList.Clear;
4004 for i := FHistoryList.Count - 1 downto 0 do begin
4005 if TObject(FHistoryList[ i ]) is TFavoriteThreadItem then
4006 TFavoriteThreadItem(FHistoryList[ i ]).Free
4007 else if TObject(FHistoryList[ i ]) is TFavoriteBoardItem then
4008 TFavoriteBoardItem(FHistoryList[ i ]).Free;
4010 //FHistoryList.Delete(i);
4016 FHistoryList.Capacity := FHistoryList.Count;
4020 procedure TGikoForm.SaveHistory;
4023 saveList : TstringList;
4026 saveList := TStringList.Create;
4029 FHistoryList.Capacity := FHistoryList.Count;
4030 saveList.Add('<?xml version="1.0" encoding="Shift_JIS" standalone="yes"?>');
4031 saveList.Add('<address>');
4032 bound := FHistoryList.Count - 1;
4033 for i := bound downto 0 do begin
4034 // title
\82Í
\8d¡
\82Ì
\82Æ
\82±
\82ë
\8eg
\82Á
\82Ä
\82¢
\82È
\82¢
4036 '<history url="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).URL ) + '"' +
4037 ' title="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).Title ) + '"/>');
4039 saveList.Add('</address>');
4040 saveList.SaveToFile( GikoSys.GetConfigDir + 'History.xml' );
4047 procedure TGikoForm.LoadHistory;
4051 XMLDoc : IXMLDocument;
4053 HistoryNode : IXMLNode;
4055 favItem : TFavoriteThreadItem;
4058 fileName := GikoSys.GetConfigDir + 'History.xml';
4060 if FileExists( fileName ) then begin
4062 XMLDoc := IXMLDocument.Create;
4063 //XMLDoc := LoadXMLDocument(FileName);
4064 LoadXMLDocument(FileName, XMLDoc);
4066 XMLNode := XMLDoc.DocumentElement;
4068 if XMLNode.NodeName = 'address' then begin
4069 bound := XMLNode.ChildNodes.Count - 1;
4070 for i := 0 to bound do begin
4071 HistoryNode := XMLNode.ChildNodes[i];
4072 if HistoryNode.NodeName = 'history' then begin
4073 //if FReadCount >= sl.Count then begin
4074 s := Trim(HistoryNode.Attributes['url']);
4075 if s <> '' then begin
4076 favItem := TFavoriteThreadItem.Create(
4077 s, HistoryNode.Attributes[ 'title' ] );
4078 if not AddHistory( favItem ) then
4094 procedure TGikoForm.ShowBBSTreeOld(
4102 FavoriteTreeView.Visible := False;
4103 FavoriteToolBar.Hide;
4104 TreeView.Visible := True;
4106 b := CabinetSelectPopupMenu.Items.Count - 1;
4107 for i := 0 to b do begin
4108 item := CabinetSelectPopupMenu.Items[ i ];
4109 if item is TBBSMenuItem then begin
4110 if TBBSMenuItem( item ).Data = inBBS then begin
4111 item.Checked := True;
4112 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
4113 CabinetMenu.Items[ i ].Checked := True;
4114 GikoSys.Setting.CabinetIndex := i;
4118 item.Checked := False;
4119 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
4120 CabinetMenu.Items[ i ].Checked := False;
4122 CabinetSelectToolButton.Caption := inBBS.Title;
4124 CabinetHistoryAction.Checked := False;
4125 CabinetFavoriteAction.Checked := False;
4127 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
4128 FTreeType := gtt2ch;
4129 HistoryToolBar.Hide;
4130 SetBoardTreeNode( inBBS );
4131 TreeView.Items.GetFirstNode.Expanded := True; //?c???[?g?b?v???????J??
4132 //?c???[??g?b?v?????I????
4133 if GetActiveList = nil then
4134 TreeView.Selected := TreeView.Items[0]
4136 for i := 0 to TreeView.Items.Count - 1 do begin
4137 if TreeView.Items[i].Data = GetActiveList then begin
4138 TreeView.Selected := TreeView.Items[i];
4142 TreeView.Selected := TreeView.Items[0]
4150 procedure TGikoForm.ShowBBSTree(
4159 FavoriteTreeView.Visible := False;
4160 FavoriteToolBar.Hide;
4161 TreeView.Visible := True;
4163 b := CabinetSelectPopupMenu.Items.Count - 1;
4164 for i := 0 to b do begin
4165 item := CabinetSelectPopupMenu.Items[ i ];
4166 if item is TBBSMenuItem then begin
4167 if TBBSMenuItem( item ).Data = inBBS then begin
4168 item.Checked := True;
4169 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
4170 CabinetMenu.Items[ i ].Checked := True;
4171 GikoSys.Setting.CabinetIndex := i;
4175 item.Checked := False;
4176 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
4177 CabinetMenu.Items[ i ].Checked := False;
4179 CabinetSelectToolButton.Caption := inBBS.Title;
4181 CabinetHistoryAction.Checked := False;
4182 CabinetFavoriteAction.Checked := False;
4184 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
4185 FTreeType := gtt2ch;
4186 HistoryToolBar.Hide;
4187 SetBoardTreeNode( inBBS );
4188 TreeView.Items.GetFirstNode.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
4189 //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
4190 if GetActiveList = nil then begin
4192 TreeClick( TreeView.Items[0] );
4196 for i := 0 to TreeView.Items.Count - 1 do begin
4197 if TreeView.Items[i].Data = GetActiveList then begin
4198 TreeClick( TreeView.Items[i] );
4202 TreeClick( TreeView.Items[0] );
4210 procedure TGikoForm.ShowHistoryTree;
4215 if CabinetPanel.Visible then begin
4216 if FTreeType = gttHistory then begin
4217 CabinetVisible( False );
4218 CabinetHistoryAction.Checked := False;
4220 CabinetHistoryAction.Checked := True;
4223 CabinetVisible( True );
4224 CabinetHistoryAction.Checked := True;
4227 // BBS...BBS, History, Favorite
4228 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 2;
4230 FavoriteTreeView.Visible := False;
4231 TreeView.Visible := True;
4233 CabinetBBSAction.Checked := False;
4234 CabinetFavoriteAction.Checked := False;
4236 if FTreeType <> gttHistory then begin
4237 b := CabinetSelectPopupMenu.Items.Count - 1;
4238 for i := 0 to b do begin
4239 item := CabinetSelectPopupMenu.Items[ i ];
4240 if item is TBBSMenuItem then begin
4241 item.Checked := False;
4242 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
4243 CabinetMenu.Items[ i ].Checked := False;
4247 FTreeType := gttHistory;
4248 HistoryToolBar.Show;
4249 FavoriteToolBar.Hide;
4251 CabinetSelectToolButton.Caption := '
\97\9a\97ð
\83\8a\83X
\83g';
4255 procedure TGikoForm.SetHistoryTreeNode;
4259 Item: TFavoriteThreadItem;
4261 TreeView.Items.BeginUpdate;
4263 TreeView.Items.Clear;
4264 for i := 0 to FHistoryList.Count - 1 do begin
4265 Item := TFavoriteThreadItem(FHistoryList[i]);
4266 Node := TreeView.Items.Add(nil, Item.Title);
4268 if Item.Item.NewArrival then begin
4269 Node.ImageIndex := ITEM_ICON_THREADNEW1;
4270 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
4272 Node.ImageIndex := ITEM_ICON_THREADLOG1;
4273 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
4276 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
4277 //
\81¦Item.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
4278 Node.ImageIndex := ITEM_ICON_THREADLOG1;
4279 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
4283 TreeView.Items.EndUpdate;
4287 procedure TGikoForm.SelectTreeNode(Item: TObject; CallEvent: Boolean);
4289 ChangeEvent: TTVChangedEvent;
4290 ChangingEvent: TTVChangingEvent;
4294 if Item is TCategory then
4295 bbs := TCategory( Item ).ParenTBBS
4296 else if Item is TBoard then
4297 bbs := TBoard( Item ).ParentCategory.ParenTBBS
4301 if (FTreeType = gtt2ch) and (FActiveBBS = bbs) then begin
4302 if Item <> FActiveList then begin
4304 ChangingEvent := nil;
4306 if not CallEvent then begin
4307 ChangeEvent := TreeView.OnChange;
4308 ChangingEvent := TreeView.OnChanging;
4311 if not CallEvent then begin
4312 TreeView.OnChange := nil;
4313 TreeView.OnChanging := nil;
4315 //Application.ProcessMessages;
4316 for i := 0 to TreeView.Items.Count - 1 do begin
4317 if TreeView.Items[i].Data = Item then begin
4318 TreeView.Items[i].Selected := True;
4320 TreeClick(TreeView.Items[i]);
4324 //Application.ProcessMessages;
4326 if not CallEvent then begin
4327 TreeView.OnChange := ChangeEvent;
4328 TreeView.OnChanging := ChangingEvent;
4333 if Item <> FActiveList then begin
4334 if GetActiveList is TBBS then begin
4335 for i := 0 to ListView.Columns.Count - 1 do
4336 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
4337 end else if GetActiveList is TCategory then begin
4338 for i := 0 to ListView.Columns.Count - 1 do
4339 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
4340 end else if GetActiveList is TBoard then begin
4341 for i := 0 to ListView.Columns.Count - 1 do
4342 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
4345 if (Item is TBBS) or (Item is TCategory) then begin
4346 ListView.Columns.Clear;
4347 SetActiveList( Item );
4348 end else if Item is TBoard then begin
4349 if not TBoard( Item ).IsThreadDatRead then begin
4350 Screen.Cursor := crHourGlass;
4352 if not TBoard( Item ).IsThreadDatRead then
4353 GikoSys.ReadSubjectFile(TBoard( Item ));
4355 Screen.Cursor := crDefault;
4358 SetActiveList( Item );
4362 if Item is TBoard then begin // not TCategory
4363 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4364 if GikoSys.Setting.ListWidthState = glsMax then begin
4365 BrowserMinAction.Execute;
4366 if GikoForm.Visible then
4370 if GikoSys.Setting.ListHeightState = glsMax then begin
4371 BrowserMinAction.Execute;
4372 if GikoForm.Visible then
4380 procedure TGikoForm.ListViewMouseDown(Sender: TObject;
4381 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
4383 listItem : TListItem;
4384 threadItem : TThreadItem;
4390 if not (GetActiveList is TBoard) then Exit;
4391 listItem := ListView.GetItemAt( X, Y );
4392 if listItem = nil then Exit;
4393 if not (TObject(listItem.Data) is TThreadItem) then Exit;
4395 threadItem := TThreadItem(ListItem.Data);
4396 InsertBrowserTab(threadItem, False);
4397 if threadItem.IsLogFile then
4398 ListView.UpdateItems(listItem.Index, listItem.Index);
4402 //
\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Å
4403 if (ssDouble in Shift) then
4404 ListDoubleClick(Shift)
4409 { if ssDouble in Shift then begin
4410 DoubleClickOccurred[Button] := True;
4412 DoubleClickOccurred[Button] := False;
4413 t := GetTickCount+GetDoubleClickTime;
4414 while GetTickCount < t do begin
4415 Application.ProcessMessages;
4416 if DoubleClickOccurred[Button] then
4421 if ssDouble in Shift then begin
4423 mbLeft: ListDoubleClick;
4436 procedure TGikoForm.ListClick;
4438 ListItem: TListItem;
4439 ThreadItem: TThreadItem;
4441 if ListView.SelCount <> 1 then Exit;
4442 ListItem := ListView.Selected;
4443 if ListItem = nil then Exit;
4444 if not (TObject(ListItem.Data) is TThreadItem) then Exit;
4446 ThreadItem := TThreadItem(ListItem.Data);
4447 if ThreadItem.IsLogFile then begin
4448 // if AddHistory(ThreadItem) then
4449 // SetContent(ThreadItem);
4450 InsertBrowserTab(ThreadItem);
4451 ListView.UpdateItems(ListItem.Index, ListItem.Index);
4453 // SetContent(ThreadItem);
4454 InsertBrowserTab(ThreadItem);
4457 if GikoSys.Setting.BrowserAutoMaximize = gbmClick then begin
4458 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4459 if GikoSys.Setting.ListWidthState = glsMin then begin
4460 BrowserMaxAndFocusAction.Execute;
4463 if GikoSys.Setting.ListHeightState = glsMin then begin
4464 BrowserMaxAndFocusAction.Execute;
4470 procedure TGikoForm.ListDoubleClick(Shift: TShiftState);
4472 ThreadItem: TThreadItem;
4475 shiftDown := (ssShift in Shift);
4477 if ListView.Selected = nil then Exit;
4479 if TObject(ListView.Selected.Data) is TCategory then begin
4480 SelectTreeNode(ListView.Selected.Data, True);
4481 // TreeView.Selected.Expanded := True;
4482 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4483 //TreeViewChange(nil, TreeView.Selected);
4484 end else if TObject(ListView.Selected.Data) is TBoard then begin
4485 SelectTreeNode(ListView.Selected.Data, True);
4486 // TreeView.Selected.Expanded := True;
4487 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4488 //TreeViewChange(nil, TreeView.Selected);
4489 end else if TObject(ListView.Selected.Data) is TThreadItem then begin
4490 //if TObject(ListView.Selected.Data) is TThreadItem then begin
4491 Application.ProcessMessages;
4492 ThreadItem := TThreadItem(ListView.Selected.Data);
4493 DownloadContent(ThreadItem, shiftDown);
4496 if GikoSys.Setting.BrowserAutoMaximize = gbmDoubleClick then begin
4497 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4498 if GikoSys.Setting.ListWidthState = glsMin then begin
4499 // BrowserMaxAndFocusAction.Execute;
4500 BrowserMaxAction.Execute;
4501 SetFocusForBrowserAction.Execute;
4504 if GikoSys.Setting.ListHeightState = glsMin then begin
4505 // BrowserMaxAndFocusAction.Execute;
4506 BrowserMaxAction.Execute;
4507 SetFocusForBrowserAction.Execute;
4513 procedure TGikoForm.BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord);
4518 activeBrower :TWebBrowser;
4520 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
4522 while (BrowserRecord.Browser.ReadyState <> READYSTATE_COMPLETE) and
4523 (BrowserRecord.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4524 Application.ProcessMessages;
4527 // Access Violation
\82ª
\8bN
\82«
\82é
\8e\96\82ª
\82 \82é
\82Ì
\82Å
\8d¡
\8cã
\97v
\83`
\83F
\83b
\83N
4528 if(BrowserRecord <> nil) and (BrowserRecord.FBrowser <> nil) then begin
4529 activeBrower := BrowserRecord.FBrowser;
4533 item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
4535 top := top + item.offsetTop;
4536 item := item.offsetParent;
4537 until AnsiCompareText(item.tagName, 'body' ) = 0;
4539 OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
4545 procedure TGikoForm.BrowserMovement(const AName: string);
4550 activeBrower :TWebBrowser;
4552 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
4554 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
4555 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4556 Application.ProcessMessages;
4559 // Access Violation
\82ª
\8bN
\82«
\82é
\8e\96\82ª
\82 \82é
\82Ì
\82Å
\8d¡
\8cã
\97v
\83`
\83F
\83b
\83N
4560 if(BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex >= 0) then begin
4561 activeBrower := FActiveContent.Browser;
4565 item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
4567 top := top + item.offsetTop;
4568 item := item.offsetParent;
4569 until AnsiCompareText(item.tagName, 'body' ) = 0;
4571 OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
4577 procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
4579 if TObject(Node.Data) is TBBS then begin
4580 TBBS(Node.Data).NodeExpand := False;
4581 end else if TObject(Node.Data) is TCategory then begin
4582 TCategory(Node.Data).NodeExpand := False;
4583 end else if TObject(Node.Data) is TBoard then begin
4584 TBoard(Node.Data).NodeExpand := False;
4588 procedure TGikoForm.MessageListViewResize(Sender: TObject);
4590 // MessageListView.Column[0].Width := MessageListView.ClientWidth - 16;
4593 procedure TGikoForm.SelectListItem(List: TList);
4595 // TmpTreeNode: TTreeNode;
4596 TmpListItem: TListItem;
4599 TmpListItem := ListView.Selected;
4600 while TmpListItem <> nil do begin
4601 List.Add(TmpListItem.Data);
4602 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
4607 procedure TGikoForm.ExitActionExecute(Sender: TObject);
4612 procedure TGikoForm.AllSelectActionExecute(Sender: TObject);
4617 procedure TGikoForm.StdToolBarVisibleActionExecute(Sender: TObject);
4619 CoolBand: TCoolBand;
4621 CoolBand := GetCoolBand(MainCoolBar, StdToolBar);
4622 if CoolBand = nil then
4624 GikoSys.Setting.StdToolBarVisible := StdToolBarVisibleAction.Checked;
4625 CoolBand.Visible := GikoSys.Setting.StdToolBarVisible;
4626 // StdToolBar.Visible := StdToolBarVisibleAction.Checked;
4627 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4629 //StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
4630 StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible;
4633 procedure TGikoForm.AddressBarVisibleActionExecute(Sender: TObject);
4635 CoolBand: TCoolBand;
4637 CoolBand := GetCoolBand(MainCoolBar, AddressToolBar);
4638 if CoolBand = nil then
4640 GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked;
4641 CoolBand.Visible := GikoSys.Setting.AddressBarVisible;
4642 //AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
4643 AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible;
4646 procedure TGikoForm.LinkBarVisibleActionExecute(Sender: TObject);
4648 CoolBand: TCoolBand;
4650 CoolBand := GetCoolBand(MainCoolBar, LinkToolBar);
4651 if CoolBand = nil then
4653 GikoSys.Setting.LinkBarVisible := LinkBarVisibleAction.Checked;
4654 CoolBand.Visible := GikoSys.Setting.LinkBarVisible;
4655 //LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
4656 LinkToolBarVisiblePMenu.Checked := GikoSys.Setting.LinkBarVisible;
4659 procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);
4661 CoolBand: TCoolBand;
4663 CoolBand := GetCoolBand(ListCoolBar, ListToolBar);
4664 if CoolBand = nil then
4666 CoolBand.Visible := ListToolBarVisibleAction.Checked;
4667 // ListToolBar.Visible := ListToolBarVisibleAction.Checked;
4668 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4669 GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;
4672 procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);
4674 CoolBand: TCoolBand;
4676 CoolBand := GetCoolBand(ListCoolBar, ListNameToolBar);
4677 if CoolBand = nil then
4679 CoolBand.Visible := ListNameBarVisibleAction.Checked;
4680 GikoSys.Setting.ListNameBarVisible := ListNameBarVisibleAction.Checked;
4683 procedure TGikoForm.BrowserToolBarVisibleActionExecute(Sender: TObject);
4685 CoolBand: TCoolBand;
4687 CoolBand := GetCoolBand(BrowserCoolBar, BrowserToolBar);
4688 if CoolBand = nil then
4690 CoolBand.Visible := BrowserToolBarVisibleAction.Checked;
4691 // BrowserToolBar.Visible := BrowserToolBarVisibleAction.Checked;
4692 GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;
4695 procedure TGikoForm.BrowserNameBarVisibleActionExecute(Sender: TObject);
4697 CoolBand: TCoolBand;
4699 CoolBand := GetCoolBand(BrowserCoolBar, BrowserNameToolBar);
4700 if CoolBand = nil then
4702 CoolBand.Visible := BrowserNameBarVisibleAction.Checked;
4703 GikoSys.Setting.BrowserNameBarVisible := BrowserNameBarVisibleAction.Checked;
4706 procedure TGikoForm.MsgBarVisibleActionExecute(Sender: TObject);
4708 MessageSplitter.Visible := MsgBarVisibleAction.Checked;
4709 MessagePanel.Top := MessageSplitter.Top + MessageSplitter.Height;
4710 MessageSplitter.Top := MessagePanel.Top + 1;
4711 MessagePanel.Visible := MsgBarVisibleAction.Checked;
4712 GikoSys.Setting.MessageBarVisible := MsgBarVisibleAction.Checked;
4715 procedure TGikoForm.StatusBarVisibleActionExecute(Sender: TObject);
4717 StatusBar.Visible := StatusBarVisibleAction.Checked;
4718 GikoSys.Setting.StatusBarVisible := StatusBarVisibleAction.Checked;
4721 procedure TGikoForm.IconStyleExecute(Sender: TObject);
4723 case ListView.ViewStyle of
4724 vsIcon: SmallIconAction.Execute;
4725 vsSmallIcon: ListIconAction.Execute;
4726 vsList: DetailIconAction.Execute;
4727 vsReport: LargeIconAction.Execute;
4731 procedure TGikoForm.LargeIconActionExecute(Sender: TObject);
4733 ListView.ViewStyle := vsIcon;
4734 LargeIconAction.Checked := True;
4737 procedure TGikoForm.SmallIconActionExecute(Sender: TObject);
4739 ListView.ViewStyle := vsSmallIcon;
4740 SmallIconAction.Checked := True;
4743 procedure TGikoForm.ListIconActionExecute(Sender: TObject);
4745 ListView.ViewStyle := vsList;
4746 ListIconAction.Checked := True;
4749 procedure TGikoForm.DetailIconActionExecute(Sender: TObject);
4751 ListView.ViewStyle := vsReport;
4752 DetailIconAction.Checked := True;
4755 procedure TGikoForm.SearchActionExecute(Sender: TObject);
4760 if FSearchDialog = nil then begin
4761 if (GikoForm.GetActiveList is TCategory) or (GikoForm.GetActiveList is TBoard) then
4762 chk := GikoForm.GetActiveList
4766 FSearchDialog := TSearchDialog.Create(Self, chk);
4767 FSearchDialog.SearchComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
4777 procedure TGikoForm.OptionActionExecute(Sender: TObject);
4781 Dlg := TOptionDialog.Create(Self);
4789 procedure TGikoForm.GikoNaviWebPageActionExecute(Sender: TObject);
4791 URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
4793 GikoSys.OpenBrowser(URL_GIKONAVI, gbtAuto);
4796 procedure TGikoForm.MonazillaWebPageActionExecute(Sender: TObject);
4798 URL_MONAZILLA: string = 'http://www.monazilla.org/';
4800 GikoSys.OpenBrowser(URL_MONAZILLA, gbtAuto);
4803 procedure TGikoForm.BBS2chWebPageActionExecute(Sender: TObject);
4805 URL_2ch: string = 'http://www.2ch.net/';
4807 GikoSys.OpenBrowser(URL_2ch, gbtAuto);
4810 procedure TGikoForm.GikoFolderOpenActionExecute(Sender: TObject);
4812 // GikoSys.OpenBrowser(GikoSys.GetAppDir, gbtIE);
4813 GikoSys.CreateProcess('explorer.exe', '/e,"' + GikoSys.GetAppDir + '"');
4816 procedure TGikoForm.AboutActionExecute(Sender: TObject);
4820 Dlg := TAboutDialog.Create(Self);
4828 procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject);
4833 procedure TGikoForm.CabinetVisible( isVisible : Boolean );
4835 TreeSplitter.Visible := isVisible;
4836 CabinetPanel.Visible := isVisible;
4837 CabinetVisibleAction.Checked := isVisible;
4840 procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject);
4843 gttHistory: CabinetHistoryAction.Execute;
4844 gttFavorite: CabinetFavoriteAction.Execute;
4846 CabinetBBSAction.Execute;
4850 procedure TGikoForm.AllItemActionExecute(Sender: TObject);
4853 if ViewType <> gvtAll then
4854 SetListViewType(gvtAll);
4855 GikoSys.Setting.ThreadRange := gtrAll;
4856 AllItemAction.Checked := True;
4857 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4859 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4860 if SelectComboBox.Parent <> nil then begin
4861 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4862 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4869 procedure TGikoForm.LogItemActionExecute(Sender: TObject);
4872 if ViewType <> gvtLog then
4873 SetListViewType(gvtLog);
4874 GikoSys.Setting.ThreadRange := gtrLog;
4875 LogItemAction.Checked := True;
4876 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4878 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4879 if SelectComboBox.Parent <> nil then begin
4880 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4881 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4888 procedure TGikoForm.NewItemActionExecute(Sender: TObject);
4892 if ViewType <> gvtNew then
4893 SetListViewType(gvtNew);
4894 GikoSys.Setting.ThreadRange := gtrNew;
4895 NewItemAction.Checked := True;
4896 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4898 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4899 if SelectComboBox.Parent <> nil then begin
4900 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4901 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4908 procedure TGikoForm.SelectItemActionExecute(Sender: TObject);
4911 Dlg: TListSelectDialog;
4914 if SelectComboBox.Parent <> nil then begin
4915 if SelectComboBox.Left + SelectComboBox.Width < ListToolBar.Width then begin
4916 // SelectComboBox
\82ª
\82 \82é
\8fê
\8d\87\82Í
\83t
\83H
\81[
\83J
\83X
\82ð
\88Ú
\82·
4917 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4918 if GikoSys.Setting.ListWidthState = glsMax then
4919 BrowserMinAction.Execute;
4921 if GikoSys.Setting.ListHeightState = glsMax then
4922 BrowserMinAction.Execute;
4924 SelectComboBox.SetFocus;
4931 if SelectComboBox.Text = SELECTCOMBOBOX_NAME then begin
4932 SelectComboBox.Text := '';
4933 SelectComboBox.Color := clWindow;
4936 AllItemAction.Checked := False;
4937 LogItemAction.Checked := False;
4938 NewItemAction.Checked := False;
4939 //SelectItemAction.Checked := True;
4941 Dlg := TListSelectDialog.Create(Self);
4943 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
4944 Dlg.SelectComboBox.Text := SelectComboBox.Text;
4946 if Dlg.ModalResult = mrCancel then begin
4947 if Length( SelectComboBox.Text ) = 0 then begin
4948 AllItemAction.Checked := True;
4949 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4950 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4953 if GetActiveList is TBoard then
4954 SetListViewType(gvtUser, TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText , Dlg.KubetsuCheckBox.Checked);
4956 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
4958 GikoSys.Setting.SelectTextList.Delete(idx);
4959 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
4960 while Dlg.SelectComboBox.Items.Count > 100 do begin
4961 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
4964 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
4965 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4966 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4968 SelectComboBox.Text := Dlg.SelectComboBox.Text;
4969 SelectComboBox.Color := clWindow;
4971 SetListViewType(gvtUser, Dlg.SelectComboBox.Text, Dlg.KubetsuCheckBox.Checked);
4978 procedure TGikoForm.ListNumberVisibleActionExecute(Sender: TObject);
4980 GikoSys.Setting.ListViewNo := ListNumberVisibleAction.Checked;
4984 procedure TGikoForm.UpFolderActionExecute(Sender: TObject);
4986 if GetActiveList is TBoard then begin
4987 // if FTreeType = gtt2ch then
4988 SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
4989 //SetActiveList(TBoard(GetActiveList).ParentCategory);
4990 end else if GetActiveList is TCategory then begin
4991 // if FTreeType = gtt2ch then
4992 SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);
4993 //SetActiveList(TCategory(GetActiveList).ParenTBBS);
4995 // if TreeView.Selected = nil then Exit;
4996 // if TreeView.Selected.Level = 0 then Exit;
4997 // TreeView.Selected.Parent.Selected := True;
5000 procedure TGikoForm.RoundActionExecute(Sender: TObject);
5004 Dlg := TRoundDialog.Create(Self);
5012 procedure TGikoForm.StopActionExecute(Sender: TObject);
5014 FControlThread.DownloadAbort;
5015 if FWorkCount <> 0 then FWorkCount := 0;
5017 Animate.Active := False;
5020 Screen.Cursor := crDefault;
5023 procedure TGikoForm.MsgBarCloseActionExecute(Sender: TObject);
5025 // MessagePanel.Visible := False;
5026 // MessageSplitter.Visible := False;
5027 // MsgBarVisibleAction.Checked := False;
5028 MsgBarVisibleAction.Execute;
5031 procedure TGikoForm.BrowserMaxActionExecute(Sender: TObject);
5033 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5034 case GikoSys.Setting.ListWidthState of
5036 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
5037 if FActiveContent <> nil then
5038 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //
\95`
\89æ
\92â
\8e~
5039 ViewPanel.Width := FBrowserSizeWidth;
5040 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5041 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5042 GikoSys.Setting.ListWidthState := glsNormal;
5043 if FActiveContent <> nil then
5044 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //
\95`
\89æ
5046 glsMin, glsNormal: begin
5047 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
5048 if FActiveContent <> nil then
5049 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //
\95`
\89æ
\92â
\8e~
5050 if GikoSys.Setting.ListWidthState = glsNormal then
5051 FBrowserSizeWidth := ViewPanel.Width;
5052 if FActiveContent <> nil then
5053 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //
\95`
\89æ
5054 ViewPanel.Width := 1;
5055 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5056 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5057 GikoSys.Setting.ListWidthState := glsMax;
5061 case GikoSys.Setting.ListHeightState of
5063 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
5064 if FActiveContent <> nil then
5065 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //
\95`
\89æ
\92â
\8e~
5066 ViewPanel.Height := FBrowserSizeHeight;
5067 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5068 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5069 GikoSys.Setting.ListHeightState := glsNormal;
5070 if FActiveContent <> nil then
5071 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //
\95`
\89æ
5073 glsMin, glsNormal: begin
5074 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
5075 if FActiveContent <> nil then
5076 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //
\95`
\89æ
\92â
\8e~
5077 if GikoSys.Setting.ListHeightState = glsNormal then
5078 FBrowserSizeHeight := ViewPanel.Height;
5079 if FActiveContent <> nil then
5080 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //
\95`
\89æ
5081 ViewPanel.Height := 1;
5082 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5083 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5084 GikoSys.Setting.ListHeightState := glsMax;
5088 // Mouse.CursorPos := BrowserSizeButton.ClientToScreen(Point(
5089 // System.Round(BrowserToolBar.ButtonWidth div 2),
5090 // System.Round(BrowserToolBar.ButtonHeight div 2)));
5091 //BrowserTab.OnChange(nil);
5094 procedure TGikoForm.BrowserMinActionExecute(Sender: TObject);
5097 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5098 case GikoSys.Setting.ListWidthState of
5099 glsMax, glsNormal: begin
5100 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5101 if FActiveContent <> nil then
5102 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //
\95`
\89æ
\92â
\8e~
5103 if GikoSys.Setting.ListWidthState = glsNormal then
5104 FBrowserSizeWidth := ViewPanel.Width;
5105 if FActiveContent <> nil then
5106 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //
\95`
\89æ
5107 ViewPanel.Width := ThreadMainPanel.Width - 80;
5108 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5109 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5110 GikoSys.Setting.ListWidthState := glsMin;
5113 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
5114 if FActiveContent <> nil then
5115 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //
\95`
\89æ
\92â
\8e~
5116 ViewPanel.Width := FBrowserSizeWidth;
5117 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5118 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5119 GikoSys.Setting.ListWidthState := glsNormal;
5120 if FActiveContent <> nil then
5121 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //
\95`
\89æ
5125 case GikoSys.Setting.ListHeightState of
5126 glsMax, glsNormal: begin
5127 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5128 if FActiveContent <> nil then
5129 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //
\95`
\89æ
\92â
\8e~
5130 if GikoSys.Setting.ListHeightState = glsNormal then
5131 FBrowserSizeHeight := ViewPanel.Height;
5132 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
5133 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5134 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5135 GikoSys.Setting.ListHeightState := glsMin;
5136 if FActiveContent <> nil then
5137 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //
\95`
\89æ
5140 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
5141 if FActiveContent <> nil then
5142 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //
\95`
\89æ
\92â
\8e~
5143 ViewPanel.Height := FBrowserSizeHeight;
5144 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5145 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5146 GikoSys.Setting.ListHeightState := glsNormal;
5147 if FActiveContent <> nil then
5148 SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //
\95`
\89æ
5154 procedure TGikoForm.ScrollTopActionExecute(Sender: TObject);
5156 BrowserMovement('top');
5159 procedure TGikoForm.ScrollLastActionExecute(Sender: TObject);
5161 BrowserMovement('bottom');
5164 procedure TGikoForm.ScrollNewActionExecute(Sender: TObject);
5166 BrowserMovement('new');
5169 procedure TGikoForm.ScrollKokoActionExecute(Sender: TObject);
5171 BrowserMovement('koko');
5174 procedure TGikoForm.EditorActionExecute(Sender: TObject);
5176 Editor: TEditorForm;
5179 Item := GetActiveContent;
5180 if Item = nil then Exit;
5181 Editor := TEditorForm.Create(Self);
5182 Editor.SetThreadItem(Item);
5183 GikoSys.LoadEditorKeySetting(Editor.ActionList);
5185 Editor.BodyEdit.SetFocus;
5188 procedure TGikoForm.IEActionExecute(Sender: TObject);
5190 ShowThreadAction.Execute;
5193 procedure TGikoForm.ShowThreadActionExecute(Sender: TObject);
5195 ThreadItem: TThreadItem;
5197 ThreadItem := GetActiveContent;
5198 if ThreadItem = nil then Exit;
5199 GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
5202 procedure TGikoForm.ShowBoardActionExecute(Sender: TObject);
5204 ThreadItem: TThreadItem;
5206 ThreadItem := GetActiveContent;
5207 if ThreadItem = nil then Exit;
5208 GikoSys.OpenBrowser(ThreadItem.ParentBoard.URL, gbtAuto);
5211 //(Thread)URL
\82ð
\83R
\83s
\81[
5212 procedure TGikoForm.URLCopyActionExecute(Sender: TObject);
5217 if TObject(GetActiveContent) is TBoard then
5218 s := s + TBoard(GetActiveContent).URL + #13#10
5219 else if TObject(GetActiveContent) is TThreadItem then
5220 s := s + TThreadItem(GetActiveContent).URL + #13#10;
5222 Clipboard.AsText := s;
5225 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ð
\83R
\83s
\81[
5226 procedure TGikoForm.NameCopyActionExecute(Sender: TObject);
5231 if TObject(GetActiveContent) is TBoard then
5232 s := s + TBoard(GetActiveContent).Title + #13#10
5233 else if TObject(GetActiveContent) is TThreadItem then
5234 s := s + TThreadItem(GetActiveContent).Title + #13#10;
5236 Clipboard.AsText := s;
5239 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ÆURL
\82ð
\83R
\83s
\81[
5240 procedure TGikoForm.NameURLCopyActionExecute(Sender: TObject);
5245 if TObject(GetActiveContent) is TBoard then
5246 s := s + TBoard(GetActiveContent).Title + #13#10 + TBoard(GetActiveContent).URL + #13#10
5247 else if TObject(GetActiveContent) is TThreadItem then
5248 s := s + TThreadItem(GetActiveContent).Title + #13#10 + TThreadItem(GetActiveContent).URL + #13#10;
5250 Clipboard.AsText := s;
5253 procedure TGikoForm.ItemReloadActionExecute(Sender: TObject);
5255 ThreadItem: TThreadItem;
5258 ThreadItem := GetActiveContent;
5259 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5260 if ThreadItem <> nil then
5261 DownloadContent(ThreadItem, shiftDown);
5264 procedure TGikoForm.SelectListReloadActionExecute(Sender: TObject);
5271 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5272 if GetActiveList is TCategory then begin
5273 List := TList.Create;
5275 SelectListItem(List);
5276 if List.Count > 5 then begin
5277 msg := '5
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
5278 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
5279 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
5282 for i := 0 to List.Count - 1 do begin
5283 if TObject(List[i]) is TBoard then
5284 DownloadList(TBoard(List[i]), shiftDown);
5289 end else if GetActiveList is TBoard then begin
5290 DownloadList(TBoard(GetActiveList), shiftDown);
5294 procedure TGikoForm.SelectThreadReloadActionExecute(Sender: TObject);
5301 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5302 List := TList.Create;
5304 SelectListItem(List);
5305 if List.Count > 10 then begin
5306 msg := '10
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
5307 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
5308 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
5311 for i := 0 to List.Count - 1 do begin
5312 if TObject(List[i]) is TThreadItem then
5313 DownloadContent(TThreadItem(List[i]), shiftDown);
5320 procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);
5322 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
5323 SelectListReloadAction.Enabled := True
5324 else if GetActiveList is TBoard then
5325 SelectListReloadAction.Enabled := True
5327 SelectListReloadAction.Enabled := False;
5330 procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);
5332 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5333 SelectThreadReloadAction.Enabled := True
5335 SelectThreadReloadAction.Enabled := False;
5338 procedure TGikoForm.AllItemActionUpdate(Sender: TObject);
5340 AllItemAction.Enabled := (GetActiveList is TBoard);
5343 procedure TGikoForm.LogItemActionUpdate(Sender: TObject);
5345 LogItemAction.Enabled := (GetActiveList is TBoard);
5348 procedure TGikoForm.NewItemActionUpdate(Sender: TObject);
5350 NewItemAction.Enabled := (GetActiveList is TBoard);
5353 procedure TGikoForm.SelectItemActionUpdate(Sender: TObject);
5355 SelectItemAction.Enabled := (GetActiveList is TBoard);
5358 procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
5360 UpFolderAction.Enabled := not (GetActiveList is TBBS);
5363 procedure TGikoForm.ThreadEditorActionUpdate(Sender: TObject);
5365 ThreadEditorAction.Enabled := (GetActiveList is TBoard);
5368 procedure TGikoForm.FormResize(Sender: TObject);
5374 MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
5375 MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
5377 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5378 if GikoSys.Setting.ListWidthState = glsMin then begin
5379 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5380 ViewPanel.Width := ThreadMainPanel.Width - 80;
5383 if GikoSys.Setting.ListHeightState = glsMin then begin
5384 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5385 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
5389 if FIsMinimize = mtMinimized then begin
5390 if FActiveContent <> nil then begin
5391 //Application.ProcessMessages;
5392 doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
5393 doc.Body.ScrollTop := FActiveContent.Thread.ScrollTop;
5394 FIsMinimize := mtNone;
5399 FIsIgnoreResize := True;
5400 PostMessage( Handle, USER_RESIZED, 0, 0 );
5405 procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject);
5407 ScrollTopAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5410 procedure TGikoForm.ScrollLastActionUpdate(Sender: TObject);
5412 ScrollLastAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5415 procedure TGikoForm.ScrollNewActionUpdate(Sender: TObject);
5417 ScrollNewAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5420 procedure TGikoForm.ScrollKokoActionUpdate(Sender: TObject);
5422 ScrollKokoAction.Enabled := (GetActiveContent <> nil)
5423 and (GetActiveContent.IsLogFile)
5424 and (GetActiveContent.Kokomade <> -1);
5428 procedure TGikoForm.EditorActionUpdate(Sender: TObject);
5430 EditorAction.Enabled := GetActiveContent <> nil;
5433 procedure TGikoForm.IEActionUpdate(Sender: TObject);
5435 IEAction.Enabled := GetActiveContent <> nil;
5438 procedure TGikoForm.ShowThreadActionUpdate(Sender: TObject);
5440 ShowThreadAction.Enabled := GetActiveContent <> nil;
5443 procedure TGikoForm.ShowBoardActionUpdate(Sender: TObject);
5445 ShowBoardAction.Enabled := GetActiveContent <> nil;
5448 procedure TGikoForm.ItemReloadActionUpdate(Sender: TObject);
5450 ItemReloadAction.Enabled := GetActiveContent <> nil;
5453 procedure TGikoForm.URLCopyActionUpdate(Sender: TObject);
5455 URLCopyAction.Enabled := GetActiveContent <> nil;
5458 procedure TGikoForm.NameCopyActionUpdate(Sender: TObject);
5460 NameCopyAction.Enabled := GetActiveContent <> nil;
5463 procedure TGikoForm.NameURLCopyActionUpdate(Sender: TObject);
5465 NameURLCopyAction.Enabled := GetActiveContent <> nil;
5468 procedure TGikoForm.BrowserTabCloseActionUpdate(Sender: TObject);
5470 BrowserTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 0);
5473 procedure TGikoForm.NotSelectTabCloseActionUpdate(Sender: TObject);
5475 NotSelectTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 1);
5478 procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
5480 AllTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 0);
5483 procedure TGikoForm.ActiveLogDeleteActionUpdate(Sender: TObject);
5485 ActiveLogDeleteAction.Enabled := GetActiveContent <> nil;
5488 procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
5490 DEL_MSG = '
\81g^0
\81h
\82Ì
\83\8d\83O
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
5491 DEL_SAME_MSG = '
\82±
\82ê
\82ç ^0
\8cÂ
\82Ì
\83X
\83\8c\83b
\83h
\82Ì
\83\8d\83O
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
5492 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
5494 ThreadItem: TThreadItem;
5495 TmpListItem: TListItem;
5499 List := TList.Create;
5501 TmpListItem := ListView.Selected;
5502 while TmpListItem <> nil do begin
5503 if TObject(TmpListItem.Data) is TThreadItem then begin
5504 ThreadItem := TThreadItem(TmpListItem.Data);
5505 if ThreadItem.IsLogFile then
5506 List.Add(ThreadItem);
5508 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
5511 if GikoSys.Setting.DeleteMsg and (List.Count > 0) then begin
5512 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
5513 if List.Count = 1 then begin
5514 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
5517 if MsgBox(Handle, StringReplace( DEL_SAME_MSG, '^0', IntToStr( List.Count ), [rfReplaceAll] ), DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> IDYES then
5523 for i := 0 to List.Count - 1 do begin
5524 ThreadItem := TThreadItem(List[i]);
5525 DeleteHistory(ThreadItem);
5526 DeleteTab(ThreadItem);
5527 ThreadItem.DeleteLogFile;
5534 procedure TGikoForm.DeleteTab(BrowserRecord: TBrowserRecord);
5539 idx := BrowserTab.TabIndex;
5540 FTabHintIndex := -1;
5541 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5542 if TBrowserRecord(BrowserTab.Tabs.Objects[i]) = BrowserRecord then begin
5543 BrowserTab.Tabs.BeginUpdate;
5545 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5546 doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
5547 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
5550 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
5552 if( FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i]) ) then
5553 FActiveContent := nil;
5554 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5555 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
5557 FBrowsers.Move(j, BROWSER_COUNT - 1);
5559 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5560 BrowserTab.Tabs.Delete(i);
5561 if idx > i then begin
5562 BrowserTab.TabIndex := idx - 1;
5564 if BrowserTab.Tabs.Count -1 >= idx then
5565 BrowserTab.TabIndex := idx
5567 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5569 if BrowserTab.Tabs.Count = 0 then begin
5570 BrowserNullTab.Thread := nil;
5572 if(BrowserTab.TabIndex <> -1) and
5573 ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
5574 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
5575 if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
5576 = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
5578 TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser := nil;
5579 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
5580 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
5581 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
5586 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
5587 := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
5588 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
5589 FBrowsers.Move(BROWSER_COUNT - 1, 0);
5591 BrowserTab.Tabs.EndUpdate;
5592 if( FActiveContent = nil) then
5593 BrowserTab.OnChange(nil);
5598 procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
5603 idx := BrowserTab.TabIndex;
5604 FTabHintIndex := -1;
5605 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5606 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
5607 BrowserTab.Tabs.BeginUpdate;
5609 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5610 doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
5611 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
5615 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
5617 if(FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i])) then
5618 FActiveContent := nil;
5619 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5620 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
5622 FBrowsers.Move(j, BROWSER_COUNT - 1);
5624 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5625 BrowserTab.Tabs.Delete(i);
5626 if idx > i then begin
5627 BrowserTab.TabIndex := idx - 1;
5629 if BrowserTab.Tabs.Count -1 >= idx then
5630 BrowserTab.TabIndex := idx
5632 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5634 if(BrowserTab.TabIndex <> -1) and
5635 ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
5636 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
5637 if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
5638 = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
5640 TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser := nil;
5641 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
5642 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
5643 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
5648 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
5649 := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
5650 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
5651 FBrowsers.Move(BROWSER_COUNT - 1, 0);
5654 BrowserTab.Tabs.EndUpdate;
5655 if( FActiveContent = nil) then
5656 BrowserTab.OnChange(nil);
5662 procedure TGikoForm.KokomadeActionExecute(Sender: TObject);
5665 ThreadItem: TThreadItem;
5667 No := KokoPopupMenu.Tag;
5668 if No = 0 then Exit;
5669 ThreadItem := GetActiveContent;
5670 if ThreadItem = nil then Exit;
5671 ThreadItem.Kokomade := No;
5672 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
5673 FActiveContent.FRepaint := true;
5674 InsertBrowserTab(FActiveContent.Thread, true);
5675 Application.ProcessMessages;
5678 procedure TGikoForm.ZenbuActionExecute(Sender: TObject);
5680 ThreadItem: TThreadItem;
5682 ThreadItem := GetActiveContent;
5683 if ThreadItem = nil then Exit;
5684 ThreadItem.Kokomade := -1;
5685 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
5686 FActiveContent.FRepaint := true;
5687 InsertBrowserTab(FActiveContent.Thread, true);
5688 Application.ProcessMessages;
5691 function TGikoForm.Hook(var Message: TMessage): Boolean;
5700 procedure TGikoForm.KokoResActionExecute(Sender: TObject);
5702 Editor: TEditorForm;
5706 Number := KokoPopupMenu.Tag;
5707 if Number = 0 then Exit;
5708 Item := GetActiveContent;
5709 if Item = nil then Exit;
5711 Editor := TEditorForm.Create(Self);
5712 Editor.SetThreadItem(Item);
5713 Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
5715 Editor.BodyEdit.SetFocus;
5718 procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
5720 ItemRoundPMenu.Visible := (GetActiveList is TBoard);
5721 ItemReservPMenu.Visible := (GetActiveList is TBoard);
5722 LPMSep01.Visible := (GetActiveList is TBoard);
5723 ListRoundPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5724 ListReservPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5725 LPMSep02.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5726 KidokuPMenu.Visible := (GetActiveList is TBoard);
5727 MidokuPMenu.Visible := (GetActiveList is TBoard);
5728 UrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5729 NameUrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5730 AllSelectPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5731 LPMSep05.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5732 DeletePMenu.Visible := (GetActiveList is TBoard);
5733 LPMSep06.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5734 BoardFavoriteAddMenu.Visible := (GetActiveList is TCategory);
5735 ThreadFavoriteAddMenu.Visible := (GetActiveList is TBoard);
5737 AddRoundNameMenu(ItemReservPMenu);
5738 AddRoundNameMenu(ListReservPMenu);
5741 procedure TGikoForm.BoardIEActionExecute(Sender: TObject);
5745 if GetActiveList is TBoard then begin
5746 URL := TBoard(GetActiveList).URL;
5747 GikoSys.OpenBrowser(URL, gbtAuto);
5751 procedure TGikoForm.SelectItemURLCopyActionExecute(Sender: TObject);
5758 List := TList.Create;
5760 SelectListItem(List);
5761 for i := 0 to List.Count - 1 do begin
5762 if TObject(List[i]) is TBoard then
5763 s := s + TBoard(List[i]).URL + #13#10
5764 else if TObject(List[i]) is TThreadItem then
5765 s := s + TThreadItem(List[i]).URL + #13#10;
5768 Clipboard.AsText := s;
5774 procedure TGikoForm.SelectItemNameCopyActionExecute(Sender: TObject);
5781 List := TList.Create;
5783 SelectListItem(List);
5784 for i := 0 to List.Count - 1 do begin
5785 if TObject(List[i]) is TBoard then
5786 s := s + TBoard(List[i]).Title + #13#10
5787 else if TObject(List[i]) is TThreadItem then
5788 s := s + TThreadItem(List[i]).Title + #13#10;
5791 Clipboard.AsText := s;
5797 procedure TGikoForm.SelectItemNameURLCopyActionExecute(Sender: TObject);
5804 List := TList.Create;
5806 SelectListItem(List);
5807 for i := 0 to List.Count - 1 do begin
5808 if TObject(List[i]) is TBoard then
5809 s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10
5810 else if TObject(List[i]) is TThreadItem then
5811 s := s + TThreadItem(List[i]).Title + #13#10 + TThreadItem(List[i]).URL + #13#10;
5814 Clipboard.AsText := s;
5820 procedure TGikoForm.BoardIEActionUpdate(Sender: TObject);
5822 if GetActiveList is TBoard then
5823 BoardIEAction.Enabled := True
5825 BoardIEAction.Enabled := False;
5828 procedure TGikoForm.SelectItemURLCopyActionUpdate(Sender: TObject);
5830 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5831 SelectItemURLCopyAction.Enabled := True
5833 SelectItemURLCopyAction.Enabled := False;
5836 procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
5838 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5839 SelectItemNameCopyAction.Enabled := True
5841 SelectItemNameCopyAction.Enabled := False;
5844 procedure TGikoForm.SelectItemNameURLCopyActionUpdate(Sender: TObject);
5846 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5847 SelectItemNameURLCopyAction.Enabled := True
5849 SelectItemNameURLCopyAction.Enabled := False;
5852 procedure TGikoForm.AllSelectActionUpdate(Sender: TObject);
5854 if ListView.SelCount > 0 then
5855 AllSelectAction.Enabled := True
5857 AllSelectAction.Enabled := False;
5860 procedure TGikoForm.LogDeleteActionUpdate(Sender: TObject);
5862 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5863 LogDeleteAction.Enabled := True
5865 LogDeleteAction.Enabled := False;
5868 procedure TGikoForm.BrowserTabCloseActionExecute(Sender: TObject);
5871 // ThreadItem: TThreadItem;
5873 idx := BrowserTab.TabIndex;
5874 if idx <> -1 then begin
5875 if BrowserTab.Tabs.Objects[idx] <> nil then begin
5876 //ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5877 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
5882 procedure TGikoForm.NotSelectTabCloseActionExecute(Sender: TObject);
5887 idx := BrowserTab.TabIndex;
5888 if idx = -1 then Exit;
5889 BrowserTab.Tabs.BeginUpdate;
5890 for i := BrowserTab.Tabs.Count - 1 downto BrowserTab.TabIndex + 1 do begin
5891 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5892 BrowserTab.Tabs.Delete(i);
5894 if idx > 0 then begin
5895 for i := BrowserTab.TabIndex - 1 downto 0 do begin
5896 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5897 BrowserTab.Tabs.Delete(i);
5900 BrowserTab.Tabs.EndUpdate;
5903 procedure TGikoForm.AllTabCloseActionExecute(Sender: TObject);
5907 if GikoSys.Setting.ShowDialogForAllTabClose then
5908 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
5911 FActiveContent := nil;
5912 BrowserNullTab.Thread := nil;
5913 BrowserTab.OnChange := nil;
5914 BrowserTab.Tabs.BeginUpdate;
5915 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
5916 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5918 BrowserTab.Tabs.Clear;
5919 BrowserTab.Tabs.EndUpdate;
5920 BrowserTab.OnChange := BrowserTabChange;
5921 SetContent(BrowserNullTab);
5922 Self.Caption := CAPTION_NAME ;
5925 procedure TGikoForm.TreeSelectBoradReloadExecute(Sender: TObject);
5928 TmpTreeNode: TTreeNode;
5930 TmpTreeNode := FClickNode;
5931 TreeView.Selected := FClickNode;
5934 if TObject(TmpTreeNode.Data) is TBoard then
5935 Board := TBoard(TmpTreeNode.Data)
5936 else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then
5937 Board := TFavoriteBoardItem(TmpTreeNode.Data).Item;
5939 if Board <> nil then
5940 DownloadList(Board);
5943 procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject);
5945 ThreadItem: TThreadItem;
5946 TmpTreeNode: TTreeNode;
5948 TmpTreeNode := FClickNode;
5949 TreeView.Selected := FClickNode;
5952 if TObject(TmpTreeNode.Data) is TThreadItem then
5953 ThreadItem := TThreadItem(TmpTreeNode.Data)
5954 else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then
5955 ThreadItem := TFavoriteThreadItem(TmpTreeNode.Data).Item;
5957 if ThreadItem <> nil then
5958 DownloadContent(ThreadItem);
5961 procedure TGikoForm.TreeSelectURLCopyExecute(Sender: TObject);
5963 TmpTreeNode: TTreeNode;
5966 TmpTreeNode := FClickNode;
5967 TreeView.Selected := FClickNode;
5968 if TObject(TmpTreeNode.Data) is TBoard then begin
5969 s := TBoard(TmpTreeNode.Data).URL + #13#10;
5970 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5971 s := TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5972 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5973 s := TThreadItem(TmpTreeNode.Data).URL + #13#10;
5974 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5975 s := TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5977 Clipboard.AsText := s;
5980 procedure TGikoForm.TreeSelectNameURLCopyExecute(Sender: TObject);
5982 TmpTreeNode: TTreeNode;
5985 TmpTreeNode := FClickNode;
5986 TreeView.Selected := FClickNode;
5987 if TObject(TmpTreeNode.Data) is TBoard then begin
5988 s := TBoard(TmpTreeNode.Data).Title + #13#10 + TBoard(TmpTreeNode.Data).URL + #13#10;
5989 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5990 s := TFavoriteBoardItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5991 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5992 s := TThreadItem(TmpTreeNode.Data).Title + #13#10 + TThreadItem(TmpTreeNode.Data).URL + #13#10;
5993 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5994 s := TFavoriteThreadItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5996 Clipboard.AsText := s;
5999 procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
6001 FClickNode := TreeView.Selected;
6002 if FClickNode = nil then begin
6003 TreeSelectThreadPupupMenu.Visible := False;
6004 TreeSelectBoardPupupMenu.Visible := False;
6005 TPMSep01.Visible := False;
6006 TreeSelectURLPupupMenu.Visible := False;
6007 TreeSelectNamePupupMenu.Visible := False;
6008 TreeSelectNameURLPupupMenu.Visible := False;
6009 TreeSelectFavoriteAddPupupMenu.Visible := False;
6010 TreeSelectLogDeleteSeparator.Visible := False;
6011 TreeSelectLogDeletePopupMenu.Visible := False;
6012 end else if TObject(FClickNode.Data) is TBoard then begin
6013 TreeSelectThreadPupupMenu.Visible := False;
6014 TreeSelectBoardPupupMenu.Visible := True;
6015 TPMSep01.Visible := True;
6016 TreeSelectURLPupupMenu.Visible := True;
6017 TreeSelectNamePupupMenu.Visible := True;
6018 TreeSelectNameURLPupupMenu.Visible := True;
6019 TreeSelectFavoriteAddPupupMenu.Visible := True;
6020 TreeSelectLogDeleteSeparator.Visible := False;
6021 TreeSelectLogDeletePopupMenu.Visible := False;
6022 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
6023 TreeSelectThreadPupupMenu.Visible := False;
6024 TreeSelectBoardPupupMenu.Visible := True;
6025 TPMSep01.Visible := True;
6026 TreeSelectURLPupupMenu.Visible := True;
6027 TreeSelectNamePupupMenu.Visible := True;
6028 TreeSelectNameURLPupupMenu.Visible := True;
6029 TreeSelectFavoriteAddPupupMenu.Visible := True;
6030 TreeSelectLogDeleteSeparator.Visible := False;
6031 TreeSelectLogDeletePopupMenu.Visible := False;
6032 end else if (TObject(FClickNode.Data) is TThreadItem) then begin
6033 TreeSelectThreadPupupMenu.Visible := True;
6034 TreeSelectBoardPupupMenu.Visible := False;
6035 TPMSep01.Visible := True;
6036 TreeSelectURLPupupMenu.Visible := True;
6037 TreeSelectNamePupupMenu.Visible := True;
6038 TreeSelectNameURLPupupMenu.Visible := True;
6039 TreeSelectFavoriteAddPupupMenu.Visible := True;
6040 TreeSelectLogDeleteSeparator.Visible := True;
6041 TreeSelectLogDeletePopupMenu.Visible := True;
6042 end else if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
6043 TreeSelectThreadPupupMenu.Visible := True;
6044 TreeSelectBoardPupupMenu.Visible := False;
6045 TPMSep01.Visible := True;
6046 TreeSelectURLPupupMenu.Visible := True;
6047 TreeSelectNamePupupMenu.Visible := True;
6048 TreeSelectNameURLPupupMenu.Visible := True;
6049 TreeSelectFavoriteAddPupupMenu.Visible := True;
6050 TreeSelectLogDeleteSeparator.Visible := True;
6051 TreeSelectLogDeletePopupMenu.Visible := True;
6052 end else if (TObject(FClickNode.Data) is TCategory) then begin
6053 TreeSelectThreadPupupMenu.Visible := False;
6054 TreeSelectBoardPupupMenu.Visible := False;
6055 TPMSep01.Visible := False;
6056 TreeSelectURLPupupMenu.Visible := False;
6057 TreeSelectNamePupupMenu.Visible := True;
6058 TreeSelectNameURLPupupMenu.Visible := False;
6059 TreeSelectFavoriteAddPupupMenu.Visible := False;
6060 TreeSelectLogDeleteSeparator.Visible := False;
6061 TreeSelectLogDeletePopupMenu.Visible := False;
6062 end else if FClickNode.IsFirstNode then begin
6063 TreeSelectThreadPupupMenu.Visible := False;
6064 TreeSelectBoardPupupMenu.Visible := False;
6065 TPMSep01.Visible := False;
6066 TreeSelectURLPupupMenu.Visible := False;
6067 TreeSelectNamePupupMenu.Visible := True;
6068 TreeSelectNameURLPupupMenu.Visible := False;
6069 TreeSelectFavoriteAddPupupMenu.Visible := False;
6070 TreeSelectLogDeleteSeparator.Visible := False;
6071 TreeSelectLogDeletePopupMenu.Visible := False;
6073 TreeSelectThreadPupupMenu.Visible := False;
6074 TreeSelectBoardPupupMenu.Visible := False;
6075 TPMSep01.Visible := False;
6076 TreeSelectURLPupupMenu.Visible := False;
6077 TreeSelectNamePupupMenu.Visible := False;
6078 TreeSelectNameURLPupupMenu.Visible := False;
6079 TreeSelectFavoriteAddPupupMenu.Visible := False;
6080 TreeSelectLogDeleteSeparator.Visible := False;
6081 TreeSelectLogDeletePopupMenu.Visible := False;
6085 procedure TGikoForm.BrowserNewWindow2(Sender: TObject;
6086 var ppDisp: IDispatch; var Cancel: WordBool);
6097 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
6098 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
6099 Html := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
6100 if(AnsiPos('>>', Text) = 1) or (AnsiPos('>', Text) = 1)
6101 or (AnsiPos('
\81\84\81\84', Text) = 1) or (AnsiPos('
\81\84', Text) = 1) then begin
6102 if GikoSys.Setting.ResAnchorJamp then begin
6103 Text := ZenToHan(Text);
6105 if(AnsiPos('>>', Text) = 1) then begin
6106 Text := Copy(Text, 3, Length(Text) - 2);
6108 Text := Copy(Text, 2, Length(Text) - 1);
6110 if AnsiPos('-', Text) <> 0 then begin
6111 wkIntSt := StrToIntDef(Copy(Text, 1, AnsiPos('-', Text) - 1), 0);
6112 Text := Copy(Text, AnsiPos('-', Text) + 1, Length(Text));
6113 wkIntTo := StrToIntDef(Text, 0);
6114 if wkIntTo < wkIntSt then
6117 wkIntSt := StrToIntDef(Text, 0);
6119 if wkIntSt <> 0 then
6120 BrowserMovement(IntToStr(wkIntSt));
6123 URL := GikoSys.GetHRefText(Html);
6124 URL := GikoSys.HTMLDecode(URL);
6125 if( AnsiPos('http://', URL) = 1) or (AnsiPos('https://', URL) = 1) or
6126 ( AnsiPos('ftp://', URL) = 1) then begin
6127 //
\83A
\83h
\83\8c\83X
\83o
\81[
\82Ì
\97\9a\97ð
6128 if GikoSys.Setting.LinkAddAddressBar then begin
6129 idx := AddressComboBox.Items.IndexOf(URL);
6130 if idx = -1 then begin
6131 AddressComboBox.Items.Insert(0, URL);
6132 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
6133 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
6135 AddressComboBox.Items.Delete(idx);
6136 AddressComboBox.Items.Insert(0, URL);
6144 { ShiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
6145 CtrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
6148 Memo1.Lines.Add('ShiftDown');
6150 Memo1.Lines.Add('CtrlDown');
6152 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
6153 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
6154 Url := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
6158 URL := GetHRefText(URL);
6160 ParseURI(URL, Protocol, Host, path, Document, Port, Bookmark);
6162 b := Parse2chURL(path, document, bbs, num);
6163 memo1.Lines.Add('bbs: ' + bbs);
6164 memo1.Lines.Add('key: ' + num);
6166 Memo1.Lines.Add('Parse2chURL: True')
6168 Memo1.Lines.Add('Parse2chURL: False');
6170 // AppPath := 'C:\Borland\Projects\Test\TestBrowser\TestBrowser.exe';
6175 procedure TGikoForm.ListSplitterCanResize(Sender: TObject;
6176 var NewSize: Integer; var Accept: Boolean);
6178 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6179 if ViewPanel.Width < 2 then begin
6180 ViewPanel.Width := 1;
6181 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6182 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6183 GikoSys.Setting.ListWidthState := glsMax;
6184 end else if ViewPanel.Width > (ThreadMainPanel.Width - 80) then begin
6185 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6186 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6187 GikoSys.Setting.ListWidthState := glsMin;
6189 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6190 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6191 GikoSys.Setting.ListWidthState := glsNormal;
6194 if ViewPanel.Height < 2 then begin
6195 ViewPanel.Height := 1;
6196 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6197 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6198 GikoSys.Setting.ListHeightState := glsMax;
6199 end else if ViewPanel.Height > (ThreadMainPanel.Height - BrowserCoolBar.Height - 7) then begin
6200 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6201 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6202 GikoSys.Setting.ListHeightState := glsMin;
6204 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6205 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6206 GikoSys.Setting.ListHeightState := glsNormal;
6211 procedure TGikoForm.ListSplitterMoved(Sender: TObject);
6213 if Mouse.Capture <> 0 then
6215 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6216 if (ViewPanel.Width > 1) and (ViewPanel.Width <= (ThreadMainPanel.Width - 80)) then
6217 FBrowserSizeWidth := ViewPanel.Width;
6219 if (ViewPanel.Height > 1) and (ViewPanel.Height <= (ThreadMainPanel.Height - BrowserCoolBar.Height)) then
6220 FBrowserSizeHeight := ViewPanel.Height;
6222 { if (Mouse.Capture = 0) and (ViewPanel.Height > 1) and (not ArrangeAction.Checked) then
6223 FBrowserSizeHeight := ViewPanel.Height
6224 else if (Mouse.Capture = 0) and (ViewPanel.Width > 1) and (ArrangeAction.Checked) then
6225 FBrowserSizeWidth := ViewPanel.Width;}
6228 procedure TGikoForm.BrowserTabChange(Sender: TObject);
6234 // if NewTab = -1 then
6235 // ThreadItem := nil;
6236 if not BrowserTab.Dragging then begin
6237 FTabHintIndex := -1;
6238 BrowserTab.Hint := '';
6239 idx := BrowserTab.TabIndex;
6240 if idx = -1 then begin
6241 BrowserNullTab.Thread := nil;
6242 SetContent(BrowserNullTab);
6244 end else if(BrowserTab.Tabs.Objects[idx] <> nil) and (BrowserTab.Tabs.Objects[idx] is TBrowserRecord) then begin
6245 if TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser <> nil then begin
6246 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser);
6248 FBrowsers.Move(j ,0);
6250 if( FActiveContent <> nil ) and (FActiveContent.Browser <> nil) and
6251 (FActiveContent.Browser <> BrowserNullTab.Browser) and
6252 (FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1])) then
6253 FBrowsers.Move(BROWSER_COUNT - 1, 0);
6255 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
6256 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
6257 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser := nil;
6258 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
6259 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent <> nil then begin
6260 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent.Free;
6261 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent := nil;
6265 TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
6266 TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Repaint := true;
6267 FBrowsers.Move(BROWSER_COUNT - 1, 0);
6269 TOleControl(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser).BringToFront;
6270 // GikoSys.OnlyAHundredRes := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
6271 // OnlyAHundredRes.Checked := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
6272 SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6274 if (GikoSys.Setting.URLDisplay) and (GetActiveContent <> nil) then
6275 AddressComboBox.Text := GetActiveContent.URL;
6277 if ((TreeView.Visible) and (TreeView.Focused)) or ((FavoriteTreeView.Visible) and (FavoriteTreeView.Focused)) or
6278 (ListView.Focused) or (SelectComboBox.Focused) or (AddressComboBox.Focused)
6281 SetFocusForBrowserAction.Execute;
6290 procedure TGikoForm.BrowserTabMouseDown(Sender: TObject;
6291 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
6297 if Button = mbMiddle then begin
6298 //
\83}
\83E
\83X
\92\86\83{
\83^
\83\93
6301 p := BrowserTab.ScreenToClient(p);
6302 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
6304 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6305 //end else if Button = mbRight then begin
6306 //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é
6307 //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
6308 { //
\83}
\83E
\83X
\89E
\83{
\83^
\83\93
6311 // GetCursorPos(p2);
6312 p := BrowserTab.ScreenToClient(p);
6313 // idx := BrowserTab.ItemAtPos(p);
6314 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
6315 if idx <> -1 then begin
6316 OldIndex := BrowserTab.TabIndex;
6317 BrowserTab.TabIndex := idx;
6318 if OldIndex <> idx then
6319 BrowserTab.OnChange(nil);
6320 BrowserTabPopupMenu.Tag := idx;
6321 BrowserTabPopupMenu.Popup(p2.X, p2.Y);
6324 end else if BUtton = mbLeft then begin
6325 FDragWFirst := true;
6326 FMouseDownPos.X := X;
6327 FMouseDownPos.Y := Y;
6332 procedure TGikoForm.SetBrowserTabState;
6335 CoolBand: TCoolBand;
6337 BrowserBottomPanel.AutoSize := False;
6338 if GikoSys.Setting.BrowserTabVisible then begin
6339 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
6340 BrowserTab.Style := tsTabs;
6341 if GikoSys.Setting.BrowserTabPosition = gtpTop then
6342 BrowserTab.TabPosition := tpTop
6344 BrowserTab.TabPosition := tpBottom;
6345 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
6346 BrowserTab.TabPosition := tpTop;
6347 BrowserTab.Style := tsButtons;
6349 BrowserTab.TabPosition := tpTop;
6350 BrowserTab.Style := tsFlatButtons
6353 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
6354 BrowserTab.Parent := BrowserTabToolBar;
6355 BrowserBottomPanel.Hide;
6356 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6357 if CoolBand <> nil then
6358 CoolBand.Visible := True;
6359 // BrowserTab.Parent := BrowserTopPanel;
6360 // BrowserTab.Parent := BrowserCoolBar;
6361 // BrowserTab.Top := 26;
6362 // BrowserTopPanel.Height := 44;
6365 BrowserTab.Parent := BrowserBottomPanel;
6366 BrowserTab.Top := 0;
6367 BrowserTab.Left := 0;
6368 BrowserBottomPanel.Show;
6369 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6370 if CoolBand <> nil then
6371 CoolBand.Visible := False;
6372 // BrowserTopPanel.Height := 26;
6376 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6377 if CoolBand <> nil then
6378 CoolBand.Visible := False;
6379 BrowserBottomPanel.Visible := False;
6380 // BrowserTab.Visible := False;
6381 // BrowserTopPanel.Height := 26;
6382 AllTabCloseAction.Execute;
6386 procedure TGikoForm.BrowserTabDragOver(Sender, Source: TObject; X,
6387 Y: Integer; State: TDragState; var Accept: Boolean);
6391 idx := BrowserTab.IndexOfTabAt(X, Y);
6392 Accept := (Source = BrowserTab) and (BrowserTab.TabIndex <> idx);
6395 procedure TGikoForm.BrowserTabDragDrop(Sender, Source: TObject; X,
6400 idx := BrowserTab.IndexOfTabAt(X, Y);
6402 BrowserTab.Tabs.Move(BrowserTab.TabIndex, idx);
6405 procedure TGikoForm.BrowserTabMouseMove(Sender: TObject;
6406 Shift: TShiftState; X, Y: Integer);
6409 ThreadItem: TThreadItem;
6412 TabIdx := BrowserTab.IndexOfTabAt(x, y);
6414 if ( ssLeft in Shift ) and ( BrowserTab.Style = tsTabs ) then begin
6415 if FDragWFirst = false then begin
6416 FDragWFirst := true;
6418 BrowserTab.EndDrag(false);
6419 BrowserTab.BeginDrag(false, DandD_THRESHOLD);
6420 FDragWFirst := false;
6423 BrowserTab.EndDrag(false);
6424 FDragWFirst := false;
6427 if (FTabHintIndex <> TabIdx) and (TabIdx <> -1) then begin
6428 Application.CancelHint;
6429 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[TabIdx]).Thread;
6430 if ThreadItem.Title <> BrowserTab.Tabs[TabIdx] then begin
6431 BrowserTab.Hint := ThreadItem.Title;
6432 Application.ShowHint := True;
6434 BrowserTab.Hint := '';
6435 Application.ShowHint := True;
6437 FTabHintIndex := TabIdx;
6442 procedure TGikoForm.BrowserDocumentComplete(Sender: TObject;
6443 const pDisp: IDispatch; var URL: OleVariant);
6445 FDispHtmlDocument: DispHTMLDocument;
6446 BrowserRecord :TBrowserRecord;
6449 // AddMessageList('DocumentComplete', nil);
6450 if TObject(Sender) is TWebBrowser then begin
6451 if TWebBrowser(Sender) <> Browser then begin
6452 BrowserRecord := nil;
6453 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
6454 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(Sender) then begin
6455 BrowserRecord := TBrowserRecord(BrowserTab.Tabs.Objects[i]);
6459 if BrowserRecord <> nil then begin
6460 if BrowserRecord.FEvent <> nil then
6461 BrowserRecord.FEvent.Free;
6462 FDispHtmlDocument := Idispatch(OleVariant(BrowserRecord.Browser.ControlInterface).Document) as DispHTMLDocument;
6463 BrowserRecord.FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
6464 BrowserRecord.FEvent.OnContextMenu := OnDocumentContextMenu;
6465 BrowserRecord.FEvent.OnClick := WebBrowserClick; //
\92Ç
\89Á
\82µ
\82½OnClick
\83C
\83x
\83\93\83g
6468 if GetActiveContent <> nil then begin
6469 FDispHtmlDocument := Idispatch(OleVariant(Browser.ControlInterface).Document) as DispHTMLDocument;
6470 if FEvent <> nil then
6472 FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
6473 FEvent.OnContextMenu := OnDocumentContextMenu;
6474 FEvent.OnClick := WebBrowserClick; //
\92Ç
\89Á
\82µ
\82½OnClick
\83C
\83x
\83\93\83g
6480 procedure TGikoForm.SelectReservActionUpdate(Sender: TObject);
6485 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then begin
6486 List := TList.Create;
6488 SelectListItem(List);
6489 for i := 0 to List.Count - 1 do begin
6490 if TObject(List[i]) is TThreadItem then begin
6491 if TThreadItem(List[i]).IsLogFile then begin
6492 SelectReservAction.Enabled := True;
6497 SelectReservAction.Enabled := False;
6501 end else if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
6502 SelectReservAction.Enabled := True
6504 SelectReservAction.Enabled := False;
6507 procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
6509 AddRoundNameMenu(RoundNamePopupMenu.Items);
6512 procedure TGikoForm.AddRoundNameMenu(MenuItem: TMenuItem);
6518 Item := TMenuItem.Create(Self);
6519 Item.Caption := '
\90V
\82µ
\82¢
\96¼
\91O
\82Å
\8f\84\89ñ
\97\
\96ñ(&N)...';
6520 Item.OnClick := SelectNewRoundNameExecute;
6522 Item := TMenuItem.Create(Self);
6523 Item.Caption := '
\8f\84\89ñ
\83\8a\83X
\83g
\82©
\82ç
\8dí
\8f\9c(&D)';
6524 Item.OnClick := SelectDeleteRoundExecute;
6526 Item := TMenuItem.Create(Self);
6527 Item.Caption := '-';
6529 for i := 0 to RoundList.RoundNameList.Count - 1 do begin
6530 Item := TMenuItem.Create(Self);
6531 Item.Caption := RoundList.RoundNameList[i];
6532 Item.OnClick := SetSelectRoundName;
6537 procedure TGikoForm.SelectNewRoundNameExecute(Sender: TObject);
6540 Dlg: TRoundNameDialog;
6543 Dlg := TRoundNameDialog.Create(Self);
6546 if Dlg.ModalResult <> mrCancel then begin
6547 s := Trim(Dlg.RoundNameEdit.Text);
6548 RoundList.RoundNameList.Add(s);
6549 SetSelectItemRound(True, s, TMenuItem(Sender).Parent.Name);
6556 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string);
6558 threadItem : TThreadItem;
6560 if ParentName <> 'dummy1' then begin
6561 SetSelectItemRound(RoundFlag, RoundName);
6563 threadItem := GetActiveContent;
6564 if threadItem <> nil then begin
6565 threadItem.RoundName := RoundName;
6566 threadItem.Round := RoundFlag;
6571 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
6576 List := TList.Create;
6578 SelectListItem(List);
6579 for i := 0 to List.Count - 1 do begin
6580 if TObject(List[i]) is TBoard then begin
6581 TBoard(List[i]).RoundName := RoundName;
6582 TBoard(List[i]).Round := RoundFlag;
6583 end else if TObject(List[i]) is TThreadItem then begin
6584 if TThreadItem(List[i]).IsLogFile then begin
6585 TThreadItem(List[i]).RoundName := RoundName;
6586 TThreadItem(List[i]).Round := RoundFlag;
6595 procedure TGikoForm.SelectDeleteRoundExecute(Sender: TObject);
6597 SetSelectItemRound(False, '', TMenuItem(Sender).Parent.Name);
6601 procedure TGikoForm.SelectReservActionExecute(Sender: TObject);
6603 //
\82±
\82Ì
\83R
\83\81\83\93\83g
\8dí
\8f\9c\82µ
\82Ä
\82Í
\91Ê
\96Ú
6606 procedure TGikoForm.SetSelectRoundName(Sender: TObject);
6608 MenuItem: TMenuItem;
6610 if Sender is TMenuItem then begin
6611 MenuItem := TMenuItem(Sender);
6612 SetSelectItemRound(True, StripHotKey(MenuItem.Caption), TMenuItem(Sender).Parent.Name);
6617 procedure TGikoForm.NewBoardActionExecute(Sender: TObject);
6619 Dlg: TNewBoardDialog;
6623 for i := 0 to Screen.CustomFormCount - 1 do begin
6624 if TObject(Screen.CustomForms[i]) is TEditorForm then begin
6625 Msg := '
\83\8c\83X
\83G
\83f
\83B
\83^
\82ð
\91S
\82Ä
\95Â
\82¶
\82Ä
\82
\82¾
\82³
\82¢';
6626 MsgBox(Handle, Msg, '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
6630 Dlg := TNewBoardDialog.Create(Self);
6638 procedure TGikoForm.LoginActionExecute(Sender: TObject);
6643 if GikoSys.Dolib.Connected then begin
6644 //
\83\8d\83O
\83A
\83E
\83g
6645 GikoSys.Dolib.Disconnect;
6646 LoginAction.Checked := False;
6647 AddMessageList('
\83\8d\83O
\83A
\83E
\83g
\82µ
\82Ü
\82µ
\82½', nil, gmiOK);
6648 LoginAction.Caption := '
\83\8d\83O
\83C
\83\93(&L)';
6650 TmpCursor := Screen.Cursor;
6651 Screen.Cursor := crHourGlass;
6653 //
\92Ê
\8fí
\83\8d\83O
\83C
\83\93
6654 if not GikoSys.Setting.ForcedLogin then begin
6655 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6656 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6657 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6658 if GikoSys.Setting.ReadProxy then begin
6659 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6660 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6662 GikoSys.Dolib.ProxyAddress := '';
6663 GikoSys.Dolib.ProxyPort := 0;
6665 if GikoSys.Dolib.Connect then begin
6666 LoginAction.Checked := True;
6667 AddMessageList('
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6668 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6669 LoginToolButton.Style := tbsCheck;
6671 // 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);
6672 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6674 LoginAction.Checked := False;
6675 LoginToolButton.Down := False;
6676 LoginToolButton.Style := tbsButton;
6679 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
6680 + '
\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
6681 + '
\82±
\82Ì
\83\82\81[
\83h
\82Å
\83\8d\83O
\83C
\83\93\82ð
\8e\8e\82Ý
\82Ü
\82·
\82©
\81H' + #13#10;
6682 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) = IDYES then begin
6683 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6684 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6685 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6686 if GikoSys.Setting.ReadProxy then begin
6687 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6688 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6690 GikoSys.Dolib.ProxyAddress := '';
6691 GikoSys.Dolib.ProxyPort := 0;
6693 //SSL
\8fá
\8aQ
\97p
\8b
\90§
\83\8d\83O
\83C
\83\93
6694 GikoSys.Dolib.ForcedConnect;
6695 if GikoSys.Dolib.Connect then begin
6696 LoginAction.Checked := True;
6697 AddMessageList('
\8b
\90§
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6698 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6699 LoginToolButton.Style := tbsCheck;
6701 // 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);
6702 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6704 LoginAction.Checked := False;
6705 LoginToolButton.Down := False;
6706 LoginToolButton.Style := tbsButton;
6709 LoginAction.Checked := False;
6710 LoginToolButton.Down := False;
6711 LoginToolButton.Style := tbsButton;
6715 Screen.Cursor := TmpCursor;
6720 procedure TGikoForm.KeySettingActionExecute(Sender: TObject);
6722 Dlg: TKeySettingForm;
6724 Dlg := TKeySettingForm.Create(Self);
6726 if Dlg.ShowModal = mrOk then
6727 GikoSys.SaveKeySetting(ActionList);
6728 GikoSys.SaveEditorKeySetting(Dlg.EditorForm.ActionList);
6734 procedure TGikoForm.ArrangeActionExecute(Sender: TObject);
6736 if ArrangeAction.Checked then begin
6738 ViewPanel.Align := alNone;
6739 ListSplitter.Align := alNone;
6740 ThreadPanel.Align := alNone;
6742 ViewPanel.Width := FBrowserSizeWidth;
6743 ViewPanel.Align := alLeft;
6745 ListSplitter.Width := 5;
6746 ListSplitter.Align := alLeft;
6748 ViewPanel.Left := -10;
6750 ThreadPanel.Align := alClient;
6752 GikoSys.Setting.ListOrientation := gloHorizontal;
6753 case GikoSys.Setting.ListWidthState of
6755 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6756 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6757 ViewPanel.Width := 1;
6760 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6761 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6764 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6765 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6766 ViewPanel.Width := ThreadMainPanel.Width - 80;
6771 ViewPanel.Align := alNone;
6772 ListSplitter.Align := alNone;
6773 ThreadPanel.Align := alNone;
6775 ViewPanel.Height := FBrowserSizeHeight;
6776 ViewPanel.Align := alTop;
6778 ListSplitter.Height := 5;
6779 ListSplitter.Align := alTop;
6781 ViewPanel.Top := -10;
6783 ThreadPanel.Align := alClient;
6784 GikoSys.Setting.ListOrientation := gloVertical;
6785 case GikoSys.Setting.ListHeightState of
6787 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6788 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6789 ViewPanel.Height := 1;
6792 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6793 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6796 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6797 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6798 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
6805 procedure TGikoForm.PaneInitActionExecute(Sender: TObject);
6807 CabinetPanel.Width := 150;
6808 MessagePanel.Height := 40;
6810 FBrowserSizeWidth := 200;
6811 FBrowserSizeHeight := 200;
6812 if ArrangeAction.Checked then begin
6813 ViewPanel.Width := FBrowserSizeWidth;
6815 ViewPanel.Height := FBrowserSizeHeight;
6817 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6818 if GikoSys.Setting.ListHeightState = glsMax then begin
6819 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6820 GikoSys.Setting.ListHeightState := glsNormal;
6823 if GikoSys.Setting.ListWidthState = glsMax then begin
6824 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6825 GikoSys.Setting.ListWidthState := glsNormal;
6830 procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
6832 DEL_MSG = '
\81g^0
\81h
\82Ì
\83\8d\83O
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
6833 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6836 ThreadItem: TThreadItem;
6838 idx := BrowserTab.TabIndex;
6839 if idx <> -1 then begin
6840 if BrowserTab.Tabs.Objects[idx] <> nil then begin
6841 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).FThread;
6842 if GikoSys.Setting.DeleteMsg then
6843 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
6844 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', ThreadItem.Title, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
6846 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6847 ThreadItem.DeleteLogFile;
6848 if ThreadItem.ParentBoard = FActiveList then
6854 function TGikoForm.GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
6859 if CoolBar = nil then
6861 for i := 0 to CoolBar.Bands.Count - 1 do begin
6862 if CoolBar.Bands[i].Control = Control then begin
6863 Result := CoolBar.Bands[i];
6869 procedure TGikoForm.BrowserTabToolBarResize(Sender: TObject);
6871 if BrowserTab.Parent = BrowserTabToolBar then
6872 BrowserTab.Width := BrowserTabToolBar.Width;
6875 procedure TGikoForm.SelectTextClearActionExecute(Sender: TObject);
6877 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';
6878 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6880 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
6881 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
6883 GikoSys.Setting.SelectTextList.Clear;
6884 SelectComboBox.Items.Clear;
6885 SelectComboBox.Text := '';
6886 SetListViewType( gvtAll );
6889 procedure TGikoForm.NameTextClearActionExecute(Sender: TObject);
6893 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';
6894 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6896 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
6897 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
6899 GikoSys.Setting.NameList.Clear;
6900 for i := 0 to Screen.CustomFormCount - 1 do begin
6901 if TObject(Screen.CustomForms[i]) is TEditorForm then
6902 TEditorForm(Screen.CustomForms[i]).NameComboBox.Items.Clear;
6906 procedure TGikoForm.MailTextClearActionExecute(Sender: TObject);
6910 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';
6911 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6913 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
6914 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
6916 GikoSys.Setting.MailList.Clear;
6917 for i := 0 to Screen.CustomFormCount - 1 do begin
6918 if TObject(Screen.CustomForms[i]) is TEditorForm then
6919 TEditorForm(Screen.CustomForms[i]).MailComboBox.Items.Clear;
6923 procedure TGikoForm.LeftmostTabSelectActionExecute(Sender: TObject);
6925 if BrowserTab.Tabs.Count > 0 then begin
6926 BrowserTab.TabIndex := 0;
6927 BrowserTab.OnChange(nil);
6931 procedure TGikoForm.LeftTabSelectActionExecute(Sender: TObject);
6933 if BrowserTab.Tabs.Count > 0 then begin
6934 if BrowserTab.TabIndex = -1 then begin
6935 BrowserTab.TabIndex := 0;
6936 BrowserTab.OnChange(nil);
6937 end else if BrowserTab.TabIndex > 0 then begin
6938 BrowserTab.TabIndex := BrowserTab.TabIndex - 1;
6939 BrowserTab.OnChange(nil);
6944 procedure TGikoForm.RightTabSelectActionExecute(Sender: TObject);
6946 if BrowserTab.Tabs.Count > 0 then begin
6947 if BrowserTab.TabIndex = -1 then begin
6948 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6949 BrowserTab.OnChange(nil);
6950 end else if BrowserTab.TabIndex < (BrowserTab.Tabs.Count - 1) then begin
6951 BrowserTab.TabIndex := BrowserTab.TabIndex + 1;
6952 BrowserTab.OnChange(nil);
6957 procedure TGikoForm.RightmostTabSelectActionExecute(Sender: TObject);
6959 if BrowserTab.Tabs.Count > 0 then begin
6960 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6961 BrowserTab.OnChange(nil);
6965 procedure TGikoForm.LeftmostTabSelectActionUpdate(Sender: TObject);
6967 LeftmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6970 procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
6972 LeftTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6975 procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);
6977 RightTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6980 procedure TGikoForm.RightmostTabSelectActionUpdate(Sender: TObject);
6982 RightmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6985 procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
6990 procedure TGikoForm.SetMenuFont;
6992 // GikoSys.MenuFont(MenuToolBar.Font);
6993 // MenuToolBar.Buttons[0].AutoSize := False;
6994 // MenuToolBar.Buttons[0].AutoSize := True;
6995 // MenuToolBar.Font.Color := clMenuText;
6996 GikoSys.MenuFont(MainCoolBar.Font);
6997 MenuToolBar.Buttons[0].AutoSize := False;
6998 MenuToolBar.Buttons[0].AutoSize := True;
6999 MainCoolBar.AutoSize := False;
7000 MainCoolBar.AutoSize := True;
7002 GikoSys.MenuFont(ListCoolBar.Font);
7003 GikoSys.MenuFont(BrowserCoolBar.Font);
7004 // MenuToolBar.Font.Color := clMenuText;
7007 procedure TGikoForm.FavoriteMenuClick(Sender: TObject);
7013 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\92Ç
\89Á
7014 NewMenu := TMenuItem.Create(MainMenu);
7015 NewMenu.Action := FavoriteAddAction;
7016 FavoriteMenu.Add(NewMenu);
7017 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\90®
\97\9d
7018 NewMenu := TMenuItem.Create(FavoriteMenu);
7019 NewMenu.Action := FavoriteArrangeAction;
7020 FavoriteMenu.Add(NewMenu);
7021 //
\83Z
\83p
\83\8c\81[
\83^
7022 NewMenu := TMenuItem.Create(FavoriteMenu);
7023 NewMenu.Caption := '-';
7024 FavoriteMenu.Add(NewMenu);
7026 CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
7029 procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
7034 for i := 0 to Node.Count - 1 do begin
7035 NewMenu := TFavoriteMenuItem.Create(Self);
7036 NewMenu.AutoHotkeys := maAutomatic;
7037 NewMenu.Caption := CustomStringReplace(Node.Item[i].Text, '&', '&&');
7038 TFavoriteMenuItem(NewMenu).Data := Node.Item[i].Data;
7039 MenuItem.Add(NewMenu);
7041 if TObject(Node.Item[i].Data) is TFavoriteFolder then begin
7042 NewMenu.ImageIndex := TOOL_ICON_FAV_FOLDER;
7043 CreateFavMenu(Node.Item[i], NewMenu);
7044 end else if TObject(Node.Item[i].Data) is TFavoriteBoardItem then begin
7045 NewMenu.ImageIndex := TOOL_ICON_FAV_BOARD;
7046 NewMenu.OnClick := FavoriteClick;
7047 end else if TObject(Node.Item[i].Data) is TFavoriteThreadItem then begin
7048 NewMenu.ImageIndex := TOOL_ICON_FAV_THREAD;
7049 NewMenu.OnClick := FavoriteClick;
7054 procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
7056 Dlg : TFavoriteAddDialog;
7062 if Item is TFavoriteBoardItem then
7063 Item := TFavoriteBoardItem( Item ).Item
7064 else if Item is TFavoriteThreadItem then
7065 Item := TFavoriteThreadItem( Item ).Item;
7067 Node := FavoriteTreeView.Items.GetFirstNode;
7068 if Item is TBoard then begin
7069 ItemURL := TBoard( Item ).URL;
7070 while Node <> nil do begin
7072 if TObject( Data ) is TFavoriteBoardItem then begin
7073 if ItemURL = TFavoriteBoardItem( Data ).URL then begin
7074 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
7079 Node := Node.GetNext;
7081 Dlg := TFavoriteAddDialog.Create(Self);
7083 Dlg.SetBoard( TBoard( Item ) );
7088 end else if Item is TThreadItem then begin
7089 ItemURL := TThreadItem( Item ).URL;
7090 while Node <> nil do begin
7092 if TObject( Data ) is TFavoriteThreadItem then begin
7093 if ItemURL = TFavoriteThreadItem( Data ).URL then begin
7094 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
7099 Node := Node.GetNext;
7101 Dlg := TFavoriteAddDialog.Create(Self);
7103 Dlg.SetThreadItem( TThreadItem( Item ) );
7113 procedure TGikoForm.FavoriteAddActionExecute(Sender: TObject);
7115 ShowFavoriteAddDialog(GetActiveContent);
7118 procedure TGikoForm.FavoriteClick(Sender: TObject);
7121 FavoriteClick( Sender, True );
7125 procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
7128 ThreadItem: TThreadItem;
7129 FavBoard: TFavoriteBoardItem;
7130 FavThread: TFavoriteThreadItem;
7134 if Sender is TFavoriteMenuItem then
7135 Item := TFavoriteMenuItem(Sender).Data
7136 else if Sender is TLinkToolButton then
7137 Item := TLinkToolButton(Sender).Data
7138 else if Sender is TTreeNode then
7139 Item := TTreeNode( Sender ).Data
7143 if TObject(Item) is TFavoriteBoardItem then begin
7144 FavBoard := TFavoriteBoardItem(Item);
7145 Board := FavBoard.Item;
7146 if Board <> nil then begin
7147 if (FTreeType = gtt2ch) and (FActiveBBS <> Board.ParentCategory.ParenTBBS) then
7148 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7149 SelectTreeNode(Board, True);
7151 end else if TObject(Item) is TFavoriteThreadItem then begin
7152 FavThread := TFavoriteThreadItem(Item);
7153 ThreadItem := FavThread.Item;
7154 if ThreadItem = nil then
7157 InsertBrowserTab(ThreadItem, ActiveTab);
7159 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
7160 if GikoSys.Setting.ListWidthState = glsMin then begin
7161 BrowserMaxAndFocusAction.Execute;
7164 if GikoSys.Setting.ListHeightState = glsMin then begin
7165 BrowserMaxAndFocusAction.Execute;
7171 procedure TGikoForm.FavoriteAddActionUpdate(Sender: TObject);
7173 FavoriteAddAction.Enabled := (GetActiveContent <> nil);
7176 procedure TGikoForm.BoardFavoriteAddActionExecute(Sender: TObject);
7178 if TObject(ListView.Selected.Data) is TBoard then
7179 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
7182 procedure TGikoForm.BoardFavoriteAddActionUpdate(Sender: TObject);
7184 BoardFavoriteAddAction.Enabled := (GetActiveList is TCategory) and (ListView.SelCount > 0);
7187 procedure TGikoForm.ThreadFavoriteAddActionExecute(Sender: TObject);
7189 if TObject(ListView.Selected.Data) is TThreadItem then
7190 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
7193 procedure TGikoForm.ThreadFavoriteAddActionUpdate(Sender: TObject);
7195 ThreadFavoriteAddAction.Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
7198 procedure TGikoForm.TreeSelectFavoriteAddActionExecute(Sender: TObject);
7200 ShowFavoriteAddDialog(TObject(FClickNode.Data));
7203 procedure TGikoForm.FavoriteArrangeActionExecute(Sender: TObject);
7205 Dlg: TFavoriteArrangeDialog;
7207 Dlg := TFavoriteArrangeDialog.Create(Self);
7213 PostMessage( Handle, USER_SETLINKBAR, 0, 0 );
7216 procedure TGikoForm.BBSMenuItemOnClick(
7221 if Sender is TBBSMenuItem then
7222 ShowBBSTree( TBBSMenuItem( Sender ).Data );
7226 procedure TGikoForm.MainCoolBarResize(Sender: TObject);
7228 TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
7231 procedure TGikoForm.MoveToActionExecute(Sender: TObject);
7236 URL := Trim(AddressComboBox.Text);
7239 idx := AddressComboBox.Items.IndexOf(URL);
7240 if idx = -1 then begin
7241 AddressComboBox.Items.Insert(0, URL);
7242 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
7243 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
7245 AddressComboBox.Items.Delete(idx);
7246 AddressComboBox.Items.Insert(0, URL);
7250 procedure TGikoForm.MoveToURL(URL: string);
7253 protocol, host, path, document, port, bookmark : string;
7254 URL2, protocol2, host2, path2, document2, port2, bookmark2 : string;
7256 BBSID, BBSKey: string;
7257 tmpBoard, Board: TBoard;
7258 ThreadItem: TThreadItem;
7261 tmpThread : TThreadItem;
7262 // category : TCategory;
7263 // categoryNode : TTreeNode;
7264 // boardNode : TTreeNode;
7265 shiftDown : Boolean;
7269 GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark );
7270 GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey );
7273 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
7274 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
7275 if shiftDown then begin
7276 GikoSys.OpenBrowser(URL, gbtUserApp);
7278 end else if ctrlDown then begin
7279 GikoSys.OpenBrowser(URL, gbtIE);
7283 //=====
\83v
\83\89\83O
\83C
\83\93
7286 bi := High( BoardPlugIns );
7287 for i := Low( BoardPlugIns ) to bi do begin
7288 if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
7289 case BoardPlugIns[ i ].AcceptURL( URL ) of
7292 tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL );
7293 boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
7294 Board := BBSsFindBoardFromURL( boardURL );
7295 if Board = nil then begin
7296 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
7297 //GikoSys.OpenBrowser(URL, gbtUserApp);
7300 Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL );
7301 if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
7302 ShowBBSTree( BBSs[ 1 ] );
7305 if not Board.IsThreadDatRead then begin
7306 GikoSys.ReadSubjectFile( Board );
7311 ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
7312 if ThreadItem = nil then begin
7313 ThreadItem := tmpThread;
7314 Board.Insert( 0, ThreadItem );
7315 if ActiveList is TBoard then begin
7316 if TBoard(ActiveList) = Board then
7317 ListView.Items.Count := ListView.Items.Count + 1;
7319 InsertBrowserTab( ThreadItem );
7320 DownloadContent( ThreadItem );
7324 InsertBrowserTab( ThreadItem );
7325 if not ThreadItem.IsLogFile then begin
7326 DownloadContent( ThreadItem );
7336 tmpBoard := TBoard.Create(BoardPlugIns[ i ], URL);
7337 Board := BBSsFindBoardFromURL( tmpBoard.URL );
7339 if Board <> nil then begin
7340 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
7341 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7342 SelectTreeNode( Board, True );
7350 // 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¢
7354 if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
7355 boardURL := GikoSys.Get2chThreadURL2BoardURL( URL );
7356 Board := BBSsFindBoardFromURL( boardURL );
7358 Board := BBSsFindBoardFromBBSID( BBSID );
7360 if Board = nil then begin
7361 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
7362 //
\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)
7363 Board := BBSs[ 0 ].FindBBSID( Copy(BBSID, 1 , Length(BBSID) - 1) );
7365 if Board = nil then begin
7366 //
\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
7367 GikoSys.OpenBrowser(URL, gbtUserApp);
7370 //
\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é
7372 GikoSys.ParseURI(URL2 , protocol2, host2, path2, document2, port2, bookmark2 );
7373 tmp1 := Copy(host, AnsiPos('.', host) + 1, Length(host));
7374 tmp2 := Copy(host2, AnsiPos('.', host2) + 1, Length(host2));
7375 if ( not GikoSys.Is2chHost(tmp1)) and (tmp1 <> tmp2) then begin
7376 GikoSys.OpenBrowser(URL, gbtUserApp);
7381 if not Board.IsThreadDatRead then
7382 GikoSys.ReadSubjectFile(Board);
7383 URL := GikoSys.Get2chBrowsableThreadURL( URL );
7384 ThreadItem := Board.FindThreadFromURL( URL );
7385 //
\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)
7386 if ThreadItem = nil then begin
7387 ThreadItem := Board.FindThreadFromFileName( BBSKey + '.dat' );
7390 if ThreadItem = nil then begin
7391 //shift ->
\90Ý
\92è
\83u
\83\89\83E
\83U
\81i
\96³
\82¯
\82ê
\82ÎIE
\81j
7393 {shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
7394 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
7396 GikoSys.OpenBrowser(URL, gbtUserApp)
7397 else if ctrlDown then
7398 GikoSys.OpenBrowser(URL, gbtIE)
7401 ThreadItem := TThreadItem.Create( nil, URL );
7402 ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
7403 if AnsiPos(Host, Board.URL) = 0 then
7404 ThreadItem.DownloadHost := Host
7406 ThreadItem.DownloadHost := '';
7407 Board.Insert(0, ThreadItem);
7408 if ActiveList is TBoard then begin
7409 if TBoard(ActiveList) = Board then
7410 ListView.Items.Count := ListView.Items.Count + 1;
7412 InsertBrowserTab(ThreadItem);
7413 DownloadContent(ThreadItem);
7416 if ThreadItem.IsLogFile then
7417 InsertBrowserTab(ThreadItem)
7419 if AnsiPos(Host, Board.URL) = 0 then
7420 ThreadItem.DownloadHost := Host
7422 ThreadItem.DownloadHost := '';
7423 InsertBrowserTab(ThreadItem);
7424 DownloadContent(ThreadItem);
7428 Board := BBSsFindBoardFromURL( URL );
7429 if Board = nil then begin
7430 GikoSys.OpenBrowser(URL, gbtAuto);
7432 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
7433 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7434 SelectTreeNode( Board, True );
7439 procedure TGikoForm.AddressToolBarResize(Sender: TObject);
7441 AddressComboBox.Width := AddressToolBar.Width - MoveToToolButton.Width - 10;
7442 CoolBarResized( Sender, MainCoolBar );
7445 procedure TGikoForm.AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
7446 Shift: TShiftState);
7448 if Key = VK_RETURN then
7449 MoveToAction.Execute;
7452 procedure TGikoForm.BrowserEnter(Sender: TObject);
7454 Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
7457 procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
7459 CDS:PCopyDataStruct;
7463 CDS := Message.CopyDataStruct;
7464 GetMem(PC, CDS^.cbData);
7466 lstrcpy(PC,CDS^.lpData);
7467 SetString(sURL, PC,lstrlen(PC));
7472 Message.Result := 1;
7475 procedure TGikoForm.WndProc(var Message: TMessage);
7480 if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
7483 if Message.WParam = SC_MINIMIZE then
7486 TreeClick( TreeView.Selected );
7500 procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
7502 hComboEdit: THandle;
7503 // KeyData: Integer;
7506 if AddressComboBox.Focused or SelectComboBox.Focused then begin
7507 if Msg.CharCode in [VK_BACK] then begin
7508 hComboEdit := GetFocus;
7509 if hComboEdit <> 0 then
7510 SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, Msg.KeyData);
7511 // SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, $000E0001);
7514 if Msg.CharCode in [VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PRIOR, VK_NEXT] then begin
7515 hComboEdit := GetFocus;
7516 if hComboEdit <> 0 then
7517 SendMessage(hComboEdit, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
7521 //
\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ð
7522 KeyData := Msg.KeyData;
7523 if (KeyData and $20000000) = 0 then begin
7524 if Msg.CharCode in [Ord('F'), Ord('V'), Ord('B'), Ord('R'),
7525 Ord('A'), Ord('T'), Ord('H')] then begin
7526 if not ActionList.IsShortCut(Msg) then begin
7534 procedure TGikoForm.BrowserTabVisibleActionExecute(Sender: TObject);
7536 GikoSys.Setting.BrowserTabVisible := BrowserTabVisibleAction.Checked;
7540 procedure TGikoForm.BrowserTabTopActionExecute(Sender: TObject);
7542 BrowserTabBottomAction.Checked := False;
7543 BrowserTabTopAction.Checked := True;
7544 GikoSys.Setting.BrowserTabPosition := gtpTop;
7548 procedure TGikoForm.BrowserTabBottomActionExecute(Sender: TObject);
7550 BrowserTabTopAction.Checked := False;
7551 BrowserTabBottomAction.Checked := True;
7552 GikoSys.Setting.BrowserTabPosition := gtpBottom;
7556 procedure TGikoForm.BrowserTabTabStyleActionExecute(Sender: TObject);
7558 BrowserTabButtonStyleAction.Checked := False;
7559 BrowserTabFlatStyleAction.Checked := False;
7560 BrowserTabTabStyleAction.Checked := True;
7561 GikoSys.Setting.BrowserTabStyle := gtsTab;
7565 procedure TGikoForm.BrowserTabButtonStyleActionExecute(Sender: TObject);
7567 BrowserTabTabStyleAction.Checked := False;
7568 BrowserTabFlatStyleAction.Checked := False;
7569 BrowserTabButtonStyleAction.Checked := True;
7570 GikoSys.Setting.BrowserTabStyle := gtsButton;
7574 procedure TGikoForm.BrowserTabFlatStyleActionExecute(Sender: TObject);
7576 BrowserTabFlatStyleAction.Checked := True;
7577 BrowserTabTabStyleAction.Checked := False;
7578 BrowserTabButtonStyleAction.Checked := False;
7579 GikoSys.Setting.BrowserTabStyle := gtsFlat;
7583 procedure TGikoForm.PreviewTimerTimer(Sender: TObject);
7589 HtmlFileName: string;
7593 TargetFrameName: OleVariant;
7594 PostData: OleVariant;
7595 Headers: OleVariant;
7596 WindowHeight: Integer;
7597 WindowWidth: Integer;
7601 Protocol, Host, Path, Document, Port, Bookmark: string;
7603 PreviewTimer.Enabled := False;
7607 case GikoSys.Setting.PreviewSize of
7614 WindowHeight := 192;
7618 WindowHeight := 384;
7622 WindowHeight := 480;
7624 else begin //gpsMedium
7626 WindowHeight := 288;
7630 ARect := Rect(0, 0, WindowWidth, WindowHeight);
7632 case GikoSys.Setting.PopupPosition of
7633 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7634 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7635 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
7636 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
7637 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
7638 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
7639 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7640 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7641 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Ó
7644 html := '<html><head>'#13#10
7646 + 'function init() {'#13#10
7647 + ' if ((document.body.clientHeight >= Image1.height) && (document.body.clientWidth >= Image1.width)) {'#13#10
7649 + ' var dh, ih;'#13#10
7650 + ' dh = document.body.clientWidth / document.body.clientHeight;'#13#10
7651 + ' ih = Image1.width / Image1.height;'#13#10
7652 + ' if (document.body.clientWidth < document.body.clientHeight) {'#13#10
7653 + ' if (ih > dh)'#13#10
7654 + ' Image1.width = document.body.clientWidth;'#13#10
7656 + ' Image1.height = document.body.clientHeight;'#13#10
7658 + ' if (ih < dh)'#13#10
7659 + ' Image1.height = document.body.clientHeight;'#13#10
7661 + ' Image1.width = document.body.clientWidth;'#13#10
7664 + ' Message.style.display = "none";'#13#10
7668 + '<body topmargin="0" leftmargin="0" style="border-width: 1px; overflow:hidden; border-style: solid;" onLoad="init()">'#13#10
7669 + '<div align="center" id="Message">
\83v
\83\8c\83r
\83\85\81[
\8dì
\90¬
\92\86</div>'#13#10
7670 + '<div align="center"><img name="Image1" border="0" src="%ImageURL%"></div>'#13#10
7672 sl := TStringList.Create;
7675 HtmlFileName := GikoSys.GetAppDir + HTML_FILE_NAME;
7676 sl.Text := AnsiReplaceStr(html, '%ImageURL%', FPreviewURL);
7677 sl.SaveToFile(HtmlFileName);
7684 NavURL := HtmlFileName;
7686 TargetFrameName := '';
7689 GikoSys.ParseURI(FPreviewURL, Protocol, Host, Path, Document, Port, Bookmark);
7690 Referer := Protocol + '://' + Host;
7692 Referer := Referer + ':' + Port;
7693 Referer := Referer + Path;
7694 Headers := 'Referer: ' + Referer;
7695 FPreviewBrowser.Navigate(NavURL, Flags, TargetFrameName, PostData, Headers);
7696 if ARect.Top + WindowHeight > Screen.DesktopHeight then
7697 ARect.Top := Screen.DesktopHeight - WindowHeight;
7698 if ARect.Left + WindowWidth > Screen.DesktopWidth then
7699 ARect.Left := Screen.DesktopWidth - WindowWidth;
7700 if ARect.Left < Screen.DesktopLeft then ARect.Left := Screen.DesktopLeft;
7701 if ARect.Bottom < Screen.DesktopTop then ARect.Bottom := Screen.DesktopTop;
7703 SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
7704 ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
7706 // Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
7707 // SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
7711 procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
7713 if PreviewTimer.Enabled then
7714 PreviewTimer.Enabled := False;
7715 if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
7716 FHint.ReleaseHandle;
7719 if (FPreviewBrowser <> nil) and (IsWindowVisible(FPreviewBrowser.Handle)) then
7720 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
7721 Message.Result := 1;
7725 procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
7727 MsgBarCloseAction.Execute;
7730 function TGikoForm.OnDocumentContextMenu(Sender: TObject): WordBool;
7732 Doc: IHtmlDocument2;
7733 Range: IHTMLTxtRange;
7736 ThreadItem: TThreadItem;
7739 Doc := FactiveContent.FBrowser.Document as IHtmlDocument2;
7740 if Assigned(Doc) then begin
7741 Range := Doc.selection.createRange as IHTMLTxtRange;
7742 s := CustomStringReplace(Range.text, '
\81@', ' ');//
\91S
\8ap
\8bó
\94\92\82ð
\94¼
\8ap
\8bó
\94\92\82É
7743 s := ZenToHan(Trim(s));
7744 if GikoSys.IsNumeric(s) then begin
7746 ThreadItem := GetActiveContent;
7747 if ThreadItem <> nil then begin
7749 FHint.PopupType := gptThread;
7750 SetResPopupText(ThreadItem, Num, Num, False, False);
7751 if FHint.ResCount <> 0 then
7762 procedure TGikoForm.SetResPopupText(threadItem: TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
7774 boardPlugIn : TBoardPlugIn;
7777 if StNum > ToNum then begin
7783 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
7784 if StNum + MAX_POPUP_RES < ToNum then
7785 ToNum := StNum + MAX_POPUP_RES;
7787 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
7789 if ThreadItem <> nil then
7790 FHint.Title := ThreadItem.Title;
7792 if ThreadItem <> nil then begin
7793 if ThreadItem.IsBoardPlugInAvailable then begin
7794 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
7795 boardPlugIn := ThreadItem.BoardPlugIn;
7797 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
7798 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
7799 for i := StNum to ToNum do begin
7801 //
\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½
7802 tmp := boardPlugIn.GetDat( DWORD( threadItem ), i );
7803 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7804 Res := GikoSys.DivideStrLine(tmp);
7805 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7806 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7808 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7811 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7812 Body := CustomStringReplace(Body, '<br>', #10,true);
7813 Body := CustomStringReplace(Body, '</a>', '',true);
7814 Body := GikoSys.DeleteLink(Body);
7815 Body := CustomStringReplace(Body, '<', '<');
7816 Body := CustomStringReplace(Body, '>', '>');
7817 Body := CustomStringReplace(Body, '"', '"');
7818 Body := CustomStringReplace(Body, '&', '&');
7819 Body := CustomStringReplace(Body, ' ', ' ');
7821 FHint.Add(Header, Body);
7822 //FHint.Title := '';
7826 for i := StNum to ToNum do begin
7828 FileName := ThreadItem.FilePath;
7829 tmp := GikoSys.ReadThreadFile(FileName, Line);
7830 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7831 Res := GikoSys.DivideStrLine(tmp);
7832 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7833 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7835 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7837 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7838 Body := CustomStringReplace(Body, '<br>', #10,true);
7839 Body := CustomStringReplace(Body, '</a>', '',true);
7840 Body := GikoSys.DeleteLink(Body);
7841 Body := CustomStringReplace(Body, '<', '<');
7842 Body := CustomStringReplace(Body, '>', '>');
7843 Body := CustomStringReplace(Body, '"', '"');
7844 Body := CustomStringReplace(Body, '&', '&');
7845 Body := CustomStringReplace(Body, ' ', ' ');
7846 FHint.Add(Header, Body);
7847 //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
7856 procedure TGikoForm.ShowTextPopup;
7861 // if Trim(s) = '' then
7864 FHint.Font.Name := GikoSys.Setting.HintFontName;
7865 FHint.Font.Size := GikoSys.Setting.HintFontSize;
7866 FHint.Font.Color := GikoSys.Setting.HintFontColor;
7867 FHint.Color := GikoSys.Setting.HintBackColor;
7868 FHint.HeaderBold := GikoSys.Setting.ResPopupHeaderBold;
7870 if FHint.PopupType = gptRaw then
7871 ARect := FHint.CalcHintRect(Screen.Width, FHint.Caption, nil)
7873 ARect := FHint.CalcHintRect(Screen.Width, '', nil);
7874 case GikoSys.Setting.PopupPosition of
7875 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7876 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7877 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
7878 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
7879 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
7880 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
7881 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7882 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7883 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Ó
7885 //FHint.ActivateHint(ARect, s);
7886 if FHint.PopupType = gptRaw then
7887 FHint.ActivateHint(ARect, FHint.Caption)
7889 FHint.ActivateHint(ARect, '');
7891 FHint.ReleaseHandle;
7896 procedure TGikoForm.GikoHelpActionExecute(Sender: TObject);
7900 FileName := GikoSys.GetAppDir + 'batahlp.chm';
7901 if not FileExists(FileName) then begin
7904 '
\83w
\83\8b\83v
\82ª
\8c©
\82Â
\82©
\82è
\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½' + #13#10 +
7905 '
\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 +
7906 '
\83w
\83\8b\83v
\82Í
\83M
\83R
\83i
\83r
\82Ì
\83T
\83C
\83g
\82É
\92u
\82¢
\82Ä
\82 \82è
\82Ü
\82·',
7911 ShellExecute(Handle, 'open', PChar(FileName), '', PChar(GikoSys.GetAppDir), SW_SHOW);
7914 procedure TGikoForm.ToolButton18Click(Sender: TObject);
7916 DEL_MSG = '
\97\9a\97ð
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
7917 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
7919 if FTreeType = gttHistory then begin
7920 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
7921 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
7925 TreeView.Items.Clear;
7929 procedure TGikoForm.KotehanActionExecute(Sender: TObject);
7931 Dlg: TKotehanDialog;
7933 Dlg := TKotehanDialog.Create(Self);
7941 procedure TGikoForm.SetLinkBar;
7945 ToolButton: TLinkToolButton;
7946 MenuItem: TMenuItem;
7947 oldIgnoreResize : Boolean;
7949 oldIgnoreResize := FIsIgnoreResize;
7950 FIsIgnoreResize := True;
7951 MainCoolBar.Bands.BeginUpdate;
7953 LinkBarPopupMenu.Items.Clear;
7954 for i := LinkToolBar.ButtonCount - 1 downto 0 do
7955 //LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
7956 LinkToolBar.Buttons[i].Free;
7957 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
7958 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
7959 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
7960 ToolButton := TLinkToolButton.Create(LinkToolBar);
7961 // ToolButton.Parent := LinkToolBar;
7962 if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteFolder then begin
7963 MenuItem := TMenuItem.Create(Self);
7964 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
7965 LinkBarPopupMenu.Items.Add(MenuItem);
7966 ToolButton.MenuItem := MenuItem;
7967 ToolButton.ImageIndex := TOOL_ICON_FAV_FOLDER;
7968 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
7969 ToolButton.ImageIndex := TOOL_ICON_FAV_BOARD;
7970 ToolButton.OnClick := FavoriteClick;
7971 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
7972 ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
7973 ToolButton.OnClick := FavoriteClick;
7975 ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
7976 ToolButton.Left := 10000;
7977 ToolButton.Data := FavoriteTreeView.Items[i].Item[j].Data;
7978 ToolButton.AutoSize := True;
7979 ToolButton.OnDragDrop := LinkToolButtonDragDrop;
7980 ToolButton.OnDragOver := FavoriteDragOver;
7981 ToolButton.OnMouseDown := LinkToolButtonOnMouseDown;
7982 ToolButton.OnMouseMove := LinkToolButtonOnMouseMove;
7983 ToolButton.OnMouseUp := LinkToolButtonOnMouseUp;
7984 ToolButton.OnStartDrag := LinkToolButtonStartDrag;
7985 //ToolButton.DragMode := dmAutomatic;
7986 ToolButton.DragMode := dmManual;
7987 ToolButton.PopupMenu := FavoriteTreePopupMenu;
7989 LinkToolBar.InsertControl(ToolButton);
7994 { if LinkToolBar.ButtonCount = 0 then begin
7995 ToolButton := TLinkToolButton.Create(LinkToolBar);
7996 ToolButton.Style := tbsButton;
7997 ToolButton.ImageIndex := -1;
7998 ToolButton.Caption := '';
7999 LinkToolBar.InsertControl(ToolButton);
8002 MainCoolBar.Bands.EndUpdate;
8003 LoadCoolBarSettings;
8004 FIsIgnoreResize := oldIgnoreResize;
8008 procedure TGikoForm.FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
8016 if Sender = FavoriteTreeView then begin
8017 Node := FavoriteTreeView.GetNodeAt(X, Y);
8022 bound := Node.DisplayRect( False );
8023 height := bound.Bottom - bound.Top;
8024 if (bound.Top + height / 2) <= Y then
8025 Node := FavoriteTreeView.GetNodeAt(X, Y + height);
8030 if Node.IsFirstNode then
8035 if FDropSpaceNode <> nil then
8036 if FDropSpaceNode.AbsoluteIndex = Node.AbsoluteIndex then
8039 if Change then begin
8040 if FDropSpaceNode <> nil then
8041 FDropSpaceNode.Free;
8043 FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil );
8044 FDropSpaceNode.MoveTo( Node, naInsert );
8045 FDropSpaceNode.ImageIndex := -1;
8046 FDropSpaceNode.SelectedIndex := -1;
8050 if Source = FavoriteTreeView then begin
8051 if FavoriteTreeView.Selected = FavoriteTreeView.Items.GetFirstNode then begin
8056 end else if Source = BrowserTab then
8058 else if Source = ListView then
8060 else if Source is TLinkToolButton then
8062 else if Source = TreeView then
8068 procedure TGikoForm.FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
8071 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
8074 procedure TGikoForm.LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
8076 // FDragging := true;
8079 procedure TGikoForm.LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
8081 SenderNode: TTreeNode;
8082 LinkToolButton: TLinkToolButton;
8085 LinkToolButton := TLinkToolButton( Sender );
8086 SenderNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data );
8088 FavoriteDragDrop( SenderNode, Source );
8092 procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8094 favButton : TLinkToolButton;
8095 favThreadItem : TFavoriteThreadItem;
8101 if Sender is TLinkToolButton then begin
8102 favButton := TLinkToolButton( Sender );
8103 if TObject( favButton.Data ) is TFavoriteThreadItem then begin
8104 favThreadItem := TFavoriteThreadItem( favButton.Data );
8105 if favThreadItem.Item <> nil then
8106 InsertBrowserTab( favThreadItem.Item, False );
8114 procedure TGikoForm.LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
8118 TToolButton( Sender ).DragMode := dmManual;
8119 if ssLeft in Shift then begin
8120 // 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)
8121 if FDragTime = 0 then begin
8122 FDragTime := GetTickCount();
8124 Now := GetTickCount();
8125 if (Now - FDragTime) > 500 then begin
8126 if FDragButton <> TToolButton( Sender ) then begin
8128 FDragButton := TToolButton( Sender );
8129 TToolButton(Sender).BeginDrag(false ,5);
8132 {$IF Defined(debug)}
8133 ShowMessage('Error');
8144 procedure TGikoForm.LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8149 function TGikoForm.GetWidthAllToolButton(ToolBar: TToolBar): Integer;
8154 for i := 0 to ToolBar.ButtonCount - 1 do
8155 if ToolBar.Buttons[i].Visible then
8156 Result := Result + ToolBar.Buttons[i].Width;
8159 procedure TGikoForm.MainCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8161 Control : TWinControl;
8164 Control := FindControl(BandInfo^.hwndChild);
8165 if Control = nil then
8168 for i := MainCoolBar.Bands.Count - 1 downto 0 do begin
8169 if MainCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8170 idx := MainCoolBar.Bands[ i ].ID;
8174 Canvas.Font.Handle := GetStockObject( DEFAULT_GUI_FONT );
8175 if (Control = MenuToolBar) or (Control = StdToolBar) then begin
8176 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8177 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8178 BandInfo^.cxMinChild := 0;
8179 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth;
8180 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8181 end else if Control = LinkToolBar then begin
8182 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8183 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8184 BandInfo^.cxMinChild := 0;
8185 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83\8a\83\93\83N' );
8186 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8187 end else begin // AddressToolBar
8188 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8189 BandInfo^.cxMinChild := 0;
8190 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83A
\83h
\83\8c\83X' );
8194 procedure TGikoForm.MainCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8200 ChevronPopupMenu.Items.Clear;
8202 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
8203 if MainCoolBar.Bands[ i ].Visible then begin
8204 if Idx = Int64(RebarChevron^.uBand) then begin
8211 if (Idx >= 0) and (MainCoolBar.Bands.Count > Idx) then begin
8212 if MainCoolBar.Bands[Idx].Control = MenuToolbar then begin
8214 end else if MainCoolBar.Bands[Idx].Control = StdToolbar then begin
8215 ToolBarChevronMenu(StdToolBar);
8216 end else if MainCoolBar.Bands[Idx].Control = LinkToolbar then begin
8220 p := MainCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8221 ChevronPopupMenu.Popup(p.x, p.y);
8225 procedure TGikoForm.MenuBarChevronMenu;
8226 procedure SetSubMenu(MenuItem: TMenuItem; PopupItem: TMenuItem);
8232 for i := 0 to MenuItem.Count - 1 do begin
8234 if MenuItem[i] is TFavoriteMenuItem then begin
8235 Item := TFavoriteMenuItem.Create(Self);
8236 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(MenuItem[i]).Data;
8238 Item := TMenuItem.Create(Self);
8239 Item.Caption := MenuItem[i].Caption;
8240 Item.Action := MenuItem[i].Action;
8241 Item.ImageIndex := MenuItem[i].ImageIndex;
8242 Item.OnClick := MenuItem[i].OnClick;
8243 PopupItem.Add(Item);
8244 if MenuItem[i].Count > 0 then
8245 SetSubMenu(MenuItem[i], Item);
8254 ChevronPopupMenu.Items.Clear;
8255 ChevronPopupMenu.Images := MainMenu.Images;
8256 bw := GetWidthAllToolButton(MenuToolBar);
8257 if MenuToolBar.Width < bw then begin
8259 for i := 0 to MenuToolBar.ButtonCount - 1 do begin
8260 w := w + MenuToolBar.Buttons[i].Width;
8261 if MenuToolBar.Width <= w then begin
8262 Item := TMenuItem.Create(Self);
8263 Item.Caption := MenuToolBar.Buttons[i].MenuItem.Caption;
8264 //Item.Action := MenuToolBar.Buttons[i].MenuItem.Action;
8265 ChevronPopupMenu.Items.Add(Item);
8266 SetSubMenu(MenuToolbar.Buttons[i].MenuItem, Item);
8272 procedure TGikoForm.ToolBarChevronMenu(ToolBar: TToolBar);
8273 procedure SetSubMenu(PopupMenu: TPopupMenu; PopupItem: TMenuItem);
8278 if Assigned(PopupMenu.OnPopup) then
8279 PopupMenu.OnPopup(nil);
8280 for i := 0 to PopupMenu.Items.Count - 1 do begin
8282 if PopupMenu.Items[i] is TFavoriteMenuItem then begin
8283 Item := TFavoriteMenuItem.Create(Self);
8284 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(PopupMenu.Items[i]).Data;
8286 Item := TMenuItem.Create(Self);
8287 Item.Caption := PopupMenu.Items[i].Caption;
8288 Item.Action := PopupMenu.Items[i].Action;
8289 Item.ImageIndex := PopupMenu.Items[i].ImageIndex;
8290 Item.OnClick := PopupMenu.Items[i].OnClick;
8291 PopupItem.Add(Item);
8300 ChevronPopupMenu.Items.Clear;
8301 ChevronPopupMenu.Images := ToolBar.HotImages;
8302 bw := GetWidthAllToolButton(ToolBar);
8303 if ToolBar.Width < bw then begin
8305 for i := 0 to ToolBar.ButtonCount - 1 do begin
8306 w := w + ToolBar.Buttons[i].Width;
8307 if ToolBar.Width <= w then begin
8308 Case ToolBar.Buttons[i].Tag of
8311 Item := TMenuItem.Create(Self);
8312 if ToolBar.Buttons[i].Style = tbsSeparator then
8315 Item.Caption := ToolBar.Buttons[i].Caption;
8316 Item.Action := ToolBar.Buttons[i].Action;
8317 //Item.Visible := True;
8319 ChevronPopupMenu.Items.Add(Item);
8320 if ToolBar.Buttons[i].DropdownMenu <> nil then begin
8322 Item.OnClick := nil;
8323 SetSubMenu(ToolBar.Buttons[i].DropdownMenu, Item);
8327 //
\8f«
\97\88\82Ì
\82½
\82ß
\82Ì
\97\
\96ñ
8334 procedure TGikoForm.LinkBarChevronMenu;
8339 Item: TFavoriteMenuItem;
8341 Button: TLinkToolButton;
8343 ChevronPopupMenu.Items.Clear;
8344 ChevronPopupMenu.Images := LinkToolBar.Images;
8345 bw := GetWidthAllToolButton(LinkToolBar);
8346 if LinkToolBar.Width < bw then begin
8348 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
8349 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
8350 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
8351 w := w + LinkToolBar.Buttons[j].Width;
8352 if LinkToolBar.Width <= w then begin
8353 if LinkToolBar.Buttons[j] is TLinkToolButton then begin
8354 Button := TLinkToolButton(LinkToolBar.Buttons[j]);
8355 Item := TFavoriteMenuItem.Create(Self);
8356 if TObject(Button.Data) is TFavoriteFolder then begin
8357 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], Item);
8358 end else if TObject(Button.Data) is TFavoriteBoardItem then begin
8359 Item.OnClick := FavoriteClick;
8360 end else if TObject(Button.Data) is TFavoriteThreadItem then begin
8361 Item.OnClick := FavoriteClick;
8363 Item.Data := Button.Data;
8364 Item.Caption := LinkToolBar.Buttons[j].Caption;
8365 Item.ImageIndex := LinkToolBar.Buttons[j].ImageIndex;
8366 ChevronPopupMenu.Items.Add(Item);
8377 \brief
\83o
\83\93\83h
\95\9d\82ð
\8dÄ
\8cv
\8eZ
\81E
\8dÄ
\90Ý
\92è
\82·
\82é
8378 \param bar
\83o
\83\93\83h
\82ª
\8f\8a\91®
\82·
\82é CoolBar
8379 \param band
\8dÄ
\8cv
\8eZ
\81E
\8dÄ
\90Ý
\92è
\82·
\82é
\83o
\83\93\83h
8381 \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É
8382 \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
8384 procedure TGikoForm.ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
8386 bandInfo : tagREBARBANDINFOA;
8387 pBandInfo : PReBarBandInfoA;
8394 pBandInfo := @bandInfo;
8395 ZeroMemory( pBandInfo, sizeof( bandInfo ) );
8396 bandInfo.cbSize := sizeof( bandInfo );
8397 bandInfo.hwndChild := h;
8398 bandInfo.cyMinChild := bar.Height;
8399 bar.OnBandInfo( nil, pBandInfo );
8400 // band
\82Ì
\83C
\83\93\83f
\83b
\83N
\83X
\82ð
\92T
\82·
8402 for i := bar.Bands.Count - 1 downto 0 do begin
8403 if bar.Bands[ i ].Control.Handle = h then begin
8409 lResult := SendMessage( bar.Handle, RB_SETBANDINFO, i, Integer( pBandInfo ) );
8413 procedure TGikoForm.ListCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8415 Control: TWinControl;
8418 Control := FindControl(BandInfo^.hwndChild);
8419 if Control = nil then
8422 for i := ListCoolBar.Bands.Count - 1 downto 0 do begin
8423 if ListCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8424 idx := ListCoolBar.Bands[ i ].ID;
8428 if Control = ListToolBar 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.ListCoolSet[ 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.ListCoolSet[ idx ].FCoolWidth;
8441 procedure TGikoForm.ListCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8446 ChevronPopupMenu.Items.Clear;
8447 Idx := RebarChevron^.uBand;
8448 if (Idx >= 0) and (ListCoolBar.Bands.Count > Idx) then begin
8449 if ListCoolBar.Bands[Idx].Control = ListToolBar then begin
8450 ToolBarChevronMenu(ListToolBar);
8453 p := ListCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8454 ChevronPopupMenu.Popup(p.x, p.y);
8458 procedure TGikoForm.BrowserCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8460 Control: TWinControl;
8463 Control := FindControl(BandInfo^.hwndChild);
8464 if Control = nil then
8467 for i := BrowserCoolBar.Bands.Count - 1 downto 0 do begin
8468 if BrowserCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8469 idx := BrowserCoolBar.Bands[ i ].ID;
8473 if Control = BrowserToolBar then begin
8474 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8475 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8476 BandInfo^.cxMinChild := 0;
8477 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
8478 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8480 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8481 BandInfo^.cxMinChild := 0;
8482 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
8486 procedure TGikoForm.BrowserCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8491 ChevronPopupMenu.Items.Clear;
8492 Idx := RebarChevron^.uBand;
8493 if (Idx >= 0) and (BrowserCoolBar.Bands.Count > Idx) then begin
8494 if BrowserCoolBar.Bands[Idx].Control = BrowserToolBar then
8495 ToolBarChevronMenu(BrowserToolBar)
8498 p := BrowserCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8499 ChevronPopupMenu.Popup(p.x, p.y);
8503 procedure TGikoForm.ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
8505 if Column^.iImage = -1 then begin
8506 Column^.mask := Column^.mask or LVCF_FMT;
8508 Column^.mask := Column^.mask or LVCF_FMT or LVCF_IMAGE;
8509 Column^.fmt := Column^.fmt or LVCFMT_IMAGE or LVCFMT_BITMAP_ON_RIGHT;
8513 procedure TGikoForm.ThreadEditorActionExecute(Sender: TObject);
8515 Editor: TEditorForm;
8517 if not (GetActiveList is TBoard) then
8519 Editor := TEditorForm.Create(Self);
8520 Editor.SetBoard(TBoard(GetActiveList));
8522 Editor.BodyEdit.SetFocus;
8525 procedure TGikoForm.ToolBarSettingActionExecute(Sender: TObject);
8527 Dlg: TToolBarSettingDialog;
8529 //Component: TComponent;
8531 Dlg := TToolBarSettingDialog.Create(Self, ActionList);
8533 Dlg.AddToolBar(StdToolBar, gttStandard);
8534 Dlg.AddToolBar(ListToolBar, gttList);
8535 Dlg.AddToolBar(BrowserToolBar, gttBrowser);
8536 case FToolBarSettingSender of
8537 tssMain: Dlg.ToolBarIndex := 0;
8538 tssList: Dlg.ToolBarIndex := 1;
8539 tssBrowser: Dlg.ToolBarIndex := 2;
8542 if ToolBarSettingAction.ActionComponent.GetParentComponent is TPopupMenu then begin
8543 Component := TPopupMenu( ToolBarSettingAction.ActionComponent.GetParentComponent ).PopupComponent;
8545 if Component = MainCoolBar then
8546 Dlg.ToolBarComboBox.ItemIndex := 0
8547 else if Component = ListCoolBar then
8548 Dlg.ToolBarComboBox.ItemIndex := 1
8549 else if Component = BrowserCoolBar then
8550 Dlg.ToolBarComboBox.ItemIndex := 2;
8553 if Dlg.ShowModal = mrOK then begin
8556 //
\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é
8557 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
8558 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth + 1;
8559 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth - 1;
8561 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
8562 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth + 1;
8563 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth - 1;
8565 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
8566 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth + 1;
8567 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth - 1;
8569 SaveToolBarSetting(StdToolBar);
8570 SaveToolBarSetting(ListToolBar);
8571 for i := ListToolBar.ControlCount - 1 downto 0 do
8573 if ListToolBar.Controls[ i ].Action = SelectItemAction then
8575 //
\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·
8576 if (i + 1) < ListToolBar.ControlCount then
8577 if ListToolBar.Controls[ i + 1 ] is TToolButton then
8578 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
8579 ListToolBar.Controls[ i + 1 ].Visible := False;
8581 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
8582 ListToolBar.Controls[ i ].Visible := False;
8583 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
8584 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
8585 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
8586 SelectComboBox.Parent := ListToolBar;
8587 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
8588 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
8589 SelectComboBoxSplitter.Parent := ListToolBar;
8594 ResetBandInfo( ListCoolBar, ListToolBar );
8595 SaveToolBarSetting(BrowserToolBar);
8599 FToolBarSettingSender := tssNone;
8603 function TGikoForm.FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
8608 for i := bar.ButtonCount - 1 downto 0 do begin
8609 if bar.Buttons[ i ].Action = action then begin
8610 Result := bar.Buttons[ i ];
8619 procedure TGikoForm.SetToolBarPopup;
8622 aIEButton : TToolButton;
8623 aCabinetBBSButton : TToolButton;
8624 aResRangeButton : TToolButton;
8625 aThreadRangeButton: TToolButton;
8627 for i := 0 to StdToolBar.ButtonCount - 1 do begin
8629 for i := 0 to ListToolBar.ButtonCount - 1 do begin
8630 if ListToolBar.Buttons[i].Action = IconStyle then
8631 ListToolBar.Buttons[i].DropdownMenu := ListIconPopupMenu;
8632 if ListToolBar.Buttons[i].Action = SelectReservAction then
8633 ListToolBar.Buttons[i].DropdownMenu := RoundNamePopupMenu;
8635 aIEButton := FindToolBarButton( BrowserToolBar, IEAction );
8636 if aIEButton <> nil then
8637 aIEButton.DropdownMenu := BrowserPopupMenu;
8638 aCabinetBBSButton := FindToolBarButton( StdToolBar, CabinetBBSAction );
8639 if aCabinetBBSButton <> nil then
8640 aCabinetBBSButton.DropdownMenu := BBSSelectPopupMenu;
8641 aResRangeButton := FindToolBarButton( BrowserToolBar, ResRangeAction );
8642 if aResRangeButton <> nil then
8643 aResRangeButton.DropdownMenu := ResRangePopupMenu;
8644 aThreadRangeButton:= FindToolBarButton( ListToolBar, ThreadRangeAction );
8645 if aThreadRangeButton <> nil then
8646 aThreadRangeButton.DropdownMenu := ThreadRangePopupMenu;
8649 procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState;
8650 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
8659 Wnd := WindowFromPoint(MousePos);
8661 if WheelDelta > 0 then
8666 if (Wnd = BrowserTab.Handle) or
8667 (Wnd = BrowserTab.Parent.Handle) then begin
8668 BrowserTab.ScrollTabs(Delta);
8669 end else if Wnd = ListView.Handle then begin
8670 if ListView.ViewStyle = vsList then
8671 ListView.Scroll( Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE, 0 )
8673 ListView.Scroll( 0, Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE );
8680 procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
8682 if Length( SelectComboBox.Text ) = 0 then
8684 AllItemAction.Checked := True;
8685 LogItemAction.Checked := False;
8686 NewItemAction.Checked := False;
8688 //
\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é
8689 if AllItemAction.Checked then
8690 AllItemAction.Checked := False;
8691 if LogItemAction.Checked then
8692 LogItemAction.Checked := False;
8693 if NewItemAction.Checked then
8694 NewItemaction.Checked := False;
8697 if Length( SelectComboBox.Text ) = 0 then
8698 SetListViewType( gvtAll )
8700 SetListViewType( gvtUser, SelectComboBox.Text, false);
8703 procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
8704 Shift: TShiftState);
8707 if Key = VK_Return then
8710 end else if Length( SelectComboBox.Text ) = 0 then
8712 AllItemAction.Checked := True;
8713 LogItemAction.Checked := False;
8714 NewItemAction.Checked := False;
8716 //
\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é
8717 if AllItemAction.Checked then
8718 AllItemAction.Checked := False;
8719 if LogItemAction.Checked then
8720 LogItemAction.Checked := False;
8721 if NewItemAction.Checked then
8722 NewItemaction.Checked := False;
8727 procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
8732 if Length( SelectComboBox.Text ) = 0 then
8734 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
8735 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
8740 //
\8di
\82è
\8d\9e\82Ý
\8c\9f\8dõ
\82Ì
\97\9a\97ð
\8dX
\90V
8741 procedure TGikoForm.ModifySelectList;
8748 if SelectComboBox.Parent = nil then
8751 if Length( SelectComboBox.Text ) > 0 then
8753 oldText := SelectComboBox.Text;
8754 idx := GikoSys.Setting.SelectTextList.IndexOf( oldText );
8756 GikoSys.Setting.SelectTextList.Delete( idx );
8757 idx := SelectComboBox.Items.IndexOf( oldText );
8759 SelectComboBox.Items.Delete( idx );
8760 GikoSys.Setting.SelectTextList.Insert( 0, oldText );
8761 SelectComboBox.Items.Insert( 0, oldText );
8762 SelectComboBox.Text := oldText;
8770 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\8dÄ
\93Ç
\82Ý
\8d\9e\82Ý
\82·
\82é
8771 procedure TGikoForm.SelectResActionExecute(Sender: TObject);
8773 Dlg: TListSelectDialog;
8774 ThreadItem : TThreadItem;
8775 FilterList : TStringList;
8778 Dlg := TListSelectDialog.Create(Self);
8780 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
8781 Dlg.SelectComboBox.Text := FSelectResWord;
8783 if Dlg.ModalResult = mrOK then begin
8784 SelectResAction.Checked := True;
8785 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
8786 //
\8bó
\93ü
\97Í
\82Å OK
\82Í
\8di
\82è
\8d\9e\82Ý
\89ð
\8f\9c\82Æ
\93¯
\88Ó
\8b`
8787 ResRangeAction.Execute;
8789 GikoSys.ResRange := Ord( grrSelect );
8791 //
\8dÅ
\8cã
\82É
\90Ý
\92è
\82µ
\82½
\82à
\82Ì
\82ð
\8ao
\82¦
\82Ä
\82¨
\82
8792 FSelectResWord := Dlg.SelectComboBox.Text;
8794 //
\8c\9f\8dõ
\97\9a\97ð
\82Ì
\8dX
\90V
8795 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
8797 GikoSys.Setting.SelectTextList.Delete(idx);
8798 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
8799 while Dlg.SelectComboBox.Items.Count > 100 do begin
8800 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
8804 if SelectComboBox.Parent <> nil then
8805 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
8809 //
\83t
\83B
\83\8b\83^
\82Ì
\90Ý
\92è
8810 FilterList := TStringList.Create;
8812 GikoSys.FSelectResFilter.Reverse := True;
8813 FilterList.Delimiter := ' '; //
\8bæ
\90Ø
\82è
\8eq
\82ð
\94¼
\8ap
\83X
\83y
\81[
\83X
\82É
\90Ý
\92è
8814 FilterList.DelimitedText := Dlg.SelectComboBox.Text;
8816 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8821 //
\83X
\83\8c\83b
\83h
\82Ì
\8dÄ
\95`
\89æ
8822 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
8823 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8825 ThreadItem := GetActiveContent;
8826 if ThreadItem <> nil then
8827 InsertBrowserTab( ThreadItem, True );
8830 //
\83L
\83\83\83\93\83Z
\83\8b
8831 if GikoSys.ResRange <> Ord( grrSelect ) then
8832 ResRangeAction.Execute;
8840 procedure TGikoForm.SelectResActionUpdate(Sender: TObject);
8842 SelectResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
8845 procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;
8846 Shift: TShiftState);
8850 //
\91S
\82Ä
\82Ì
\83\8c\83X
\82ð
\95\
\8e¦
8851 procedure TGikoForm.AllResActionExecute(Sender: TObject);
8853 ThreadItem : TThreadItem;
8854 FilterList : TStringList;
8857 if(FActiveContent <> nil) and (FActiveContent.FBrowser <> nil )
8858 and (FActiveContent.FBrowser.Busy) then Exit;
8860 FResRangeMenuSelect := Ord( grrAll );
8861 AllResAction.Checked := True;
8863 if GikoSys.ResRange <> Ord( grrAll ) then begin
8864 GikoSys.ResRange := Ord( grrAll );
8866 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
8867 FilterList := TStringList.Create;
8869 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8870 GikoSys.FSelectResFilter.Reverse := False;
8875 FSelectResWord := '';
8877 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
8878 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
8879 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8881 ThreadItem := GetActiveContent;
8882 if ThreadItem <> nil then
8883 InsertBrowserTab( ThreadItem, True );
8887 procedure TGikoForm.AllResActionUpdate(Sender: TObject);
8889 AllResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
8892 procedure TGikoForm.ReloadClick(Sender: TObject);
8894 ThreadItem : TThreadItem;
8897 if GikoSys.FAbon.ReLoadFromNGwordFile =false then begin
8898 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);
8900 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8901 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8903 ThreadItem := GetActiveContent;
8904 if ThreadItem <> nil then
8905 InsertBrowserTab( ThreadItem, True );
8910 procedure TGikoForm.GoBackClick(Sender: TObject);
8912 ThreadItem : TThreadItem;
8916 if GikoSys.FAbon.GoForward =false then begin
8917 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);
8919 s := GikoSys.FAbon.NGwordname;
8920 StatusBar.Panels.Items[2].Text := s;
8921 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8922 StatusBarResize(Sender);
8923 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8924 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8926 ThreadItem := GetActiveContent;
8927 if ThreadItem <> nil then
8928 InsertBrowserTab( ThreadItem, True );
8933 procedure TGikoForm.GoFowardClick(Sender: TObject);
8935 ThreadItem : TThreadItem;
8939 if GikoSys.FAbon.GoBack =false then begin
8940 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);
8942 s := GikoSys.FAbon.NGwordname;
8943 StatusBar.Panels.Items[2].Text := s;
8944 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8945 StatusBarResize(Sender);
8946 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8947 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8949 ThreadItem := GetActiveContent;
8950 if ThreadItem <> nil then
8951 InsertBrowserTab( ThreadItem, True );
8956 procedure TGikoForm.SelectComboBoxSplitterMouseMove(Sender: TObject;
8957 Shift: TShiftState; X, Y: Integer);
8962 If (SelectComboBox.Parent <> nil) and (IsDraggingSelectComboBox) Then begin
8965 pos := SelectComboBoxSplitter.ClientToScreen( pos );
8966 w := SelectComboBox.Width + (pos.X - DraggingSelectComboBoxPosition.X);
8968 If w <= 50 Then Begin
8969 //
\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
8970 //
\81u
\8e~
\82Ü
\82Á
\82½(50pixel)
\88Ê
\92u
\81v
\82É
\82È
\82é
\82æ
\82¤
\82É
8971 pos.X := pos.X + (50 - w);
8973 //
\8f¬
\82³
\82
\82È
\82è
\82·
\82¬
\82È
\82¢
\82æ
\82¤
\82É
8977 //
\83`
\83\89\82Â
\82«
\8cy
\8c¸
\82Ì
\88×
8978 If SelectComboBox.Width <> w Then Begin
8979 SelectComboBox.Width := w;
8980 GikoSys.Setting.SelectComboBoxWidth := w;
8981 DraggingSelectComboBoxPosition := pos;
8983 //
\83V
\83F
\83u
\83\8d\83\93\88Ê
\92u
\82ª
\95Ï
\82í
\82é
\82Ì
\82Å BandInfo
\82Ì
\8dÄ
\90Ý
\92è
8984 ResetBandInfo( ListCoolBar, ListToolBar );
8989 procedure TGikoForm.SelectComboBoxSplitterMouseDown(Sender: TObject;
8990 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8994 IsDraggingSelectComboBox := True;
8997 DraggingSelectComboBoxPosition := SelectComboBoxSplitter.ClientToScreen( pos );
9000 procedure TGikoForm.SelectComboBoxSplitterMouseUp(Sender: TObject;
9001 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
9003 IsDraggingSelectComboBox := False;
9006 procedure TGikoForm.StatusBarResize(Sender: TObject);
9008 StatusBar.Panels[1].Width := StatusBar.Width -
9009 StatusBar.Panels[0].Width -
9010 StatusBar.Panels[2].Width;
9012 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\92Ê
\8fí
\81v
9013 procedure TGikoForm.IndividualAbon1Click(Sender: TObject);
9015 ThreadItem : TThreadItem;
9018 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,1);
9019 ThreadItem := GetActiveContent;
9020 for i := BrowserTab.Tabs.Count - 1 downto 0 do
9021 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
9023 if ThreadItem <> nil then
9024 InsertBrowserTab( ThreadItem, True );
9026 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\93§
\96¾
\81v
9027 procedure TGikoForm.IndividualAbon2Click(Sender: TObject);
9029 ThreadItem : TThreadItem;
9032 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,0);
9033 ThreadItem := GetActiveContent;
9034 for i := BrowserTab.Tabs.Count - 1 downto 0 do
9035 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
9036 if ThreadItem <> nil then
9037 InsertBrowserTab( ThreadItem, True );
9039 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c\81i
\81j
9040 procedure TGikoForm.AntiIndividualAbonClick(Sender: TObject);
9042 ThreadItem : TThreadItem;
9046 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
9047 GikoSys.FAbon.DeleteIndividualAbon(KokoPopupMenu.Tag);
9048 ThreadItem := GetActiveContent;
9049 for i := BrowserTab.Tabs.Count - 1 downto 0 do
9050 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
9051 if ThreadItem <> nil then
9052 InsertBrowserTab( ThreadItem, True );
9054 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
9055 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
9058 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c
9059 procedure TGikoForm.N42Click(Sender: TObject);
9061 IndividualForm :TIndividualAbonForm;
9062 ThreadItem : TThreadItem;
9066 IndividualForm := TIndividualAbonForm.Create(Self);
9068 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
9069 for i :=0 to GikoSys.FAbon.GetAbonResCount-1 do begin
9070 IndividualForm.ComboBox1.Items.Add(GikoSys.FAbon.GetAbonResString(i));
9072 if IndividualForm.ShowModal = mrOK then begin
9073 GikoSys.FAbon.DeleteIndividualAbon(IndividualForm.ResNumber);
9075 for i := BrowserTab.Tabs.Count - 1 downto 0 do
9076 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
9077 ThreadItem := GetActiveContent;
9078 if ThreadItem <> nil then
9079 InsertBrowserTab( ThreadItem, True );
9081 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
9082 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
9085 IndividualForm.Free;
9089 procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
9092 if (Length( SelectComboBox.Text ) = 0) or
9093 (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
9095 SelectComboBox.Text := '';
9096 SelectComboBox.Color := clWindow;
9101 procedure TGikoForm.N51Click(Sender: TObject);
9105 //
\94Â
\96¼
\8c\9f\8dõ
9106 procedure TGikoForm.TreeSelectSearchBoardNameExecute(Sender: TObject);
9110 CurItem : TTreeNode;
9113 if InputQuery('
\94Â
\96¼
\8c\9f\8dõ','
\94Â
\96¼
\82Ì
\93ü
\97Í',s) then begin
9116 if TreeView.Selected = nil then
9117 CurItem := TreeView.Items.GetFirstNode
9119 CurItem := TreeView.Selected.GetNext;
9120 if CurItem = nil then
9121 CurItem := TreeView.Items.GetFirstNode;
9123 while CurItem <> nil do begin
9124 if (CurItem.ImageIndex <> 2) and (VaguePos(s,CurItem.Text) <> 0) then begin
9127 CurItem := CurItem.GetNext;
9130 if CurItem = nil then begin
9131 msg := '
\90æ
\93ª
\82É
\96ß
\82è
\82Ü
\82·
\82©
\81H';
9132 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
9133 CurItem := TreeView.Items.GetFirstNode;
9137 TreeView.Select(CurItem);
9140 TreeView.Select(CurItem);
9142 msg := '
\8e\9f\82É
\8ds
\82«
\82Ü
\82·
\82©
\81H';
9143 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
9157 procedure TGikoForm.CabinetFavoriteActionExecute(Sender: TObject);
9163 if CabinetPanel.Visible then begin
9164 if FTreeType = gttFavorite then begin
9165 CabinetVisible( False );
9166 CabinetFavoriteAction.Checked := False;
9168 CabinetFavoriteAction.Checked := True;
9171 CabinetVisible( True );
9172 CabinetFavoriteAction.Checked := True;
9175 // BBS...BBS, History, Favorite
9176 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 1;
9178 b := CabinetSelectPopupMenu.Items.Count - 1;
9179 for i := 0 to b do begin
9180 item := CabinetSelectPopupMenu.Items[ i ];
9181 if item is TBBSMenuItem then begin
9182 item.Checked := False;
9183 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
9184 CabinetMenu.Items[ i ].Checked := False;
9188 //
\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Ö
9189 HistoryToolBar.Hide;
9190 FavoriteToolBar.Show;
9191 TreeView.Visible := False;
9192 FavoriteTreeView.Visible := True;
9194 CabinetSelectToolButton.Caption := '
\82¨
\8bC
\82É
\93ü
\82è';
9195 FTreeType := gttFavorite;
9197 //
\83\81\83j
\83\85\81[
\8by
\82Ñ
\83{
\83^
\83\93\82Ì
\83`
\83F
\83b
\83N
\82ð
\90Ý
\92è
9198 CabinetBBSAction.Checked := False;
9199 CabinetHistoryAction.Checked := False;
9201 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\83c
\83\8a\81[
\82ð
\93W
\8aJ
9202 FavoriteTreeView.Items.GetFirstNode.Expanded := True;
9206 procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
9209 if (SenderNode = nil) or (SourceNode = nil) or (SenderNode = SourceNode) then
9212 if TObject(SenderNode.Data) is TFavoriteFolder then
9213 SourceNode.MoveTo(SenderNode, naAddChild)
9215 SourceNode.MoveTo(SenderNode, naInsert);
9219 procedure TGikoForm.FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
9223 FavoBoardItem: TFavoriteBoardItem;
9224 FavoThreadItem: TFavoriteThreadItem;
9226 ThreadItem: TThreadItem;
9229 if (SenderNode = nil) or (Source = nil) then
9232 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
9233 FavNode := SenderNode.Parent
9235 FavNode := SenderNode;
9239 if Source is TBoard then begin
9240 Board := TBoard( Source );
9241 FavoBoardItem := TFavoriteBoardItem.CreateWithItem( Board );
9242 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, FavoBoardItem);
9243 Node.ImageIndex := 15;
9244 Node.SelectedIndex := 15;
9245 end else if Source is TFavoriteBoardItem then begin
9246 FavoBoardItem := TFavoriteBoardItem( Source );
9247 Board := FavoBoardItem.Item;
9248 if Board <> nil then
9249 if not Board.IsThreadDatRead then
9250 GikoSys.ReadSubjectFile(Board);
9251 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, Source);
9252 Node.ImageIndex := 15;
9253 Node.SelectedIndex := 15;
9254 end else if Source is TThreadItem then begin
9255 ThreadItem := TThreadItem( Source );
9256 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
9257 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
9258 Node.ImageIndex := 16;
9259 Node.SelectedIndex := 16;
9260 end else if Source is TBrowserRecord then begin
9261 ThreadItem := TBrowserRecord( Source ).FThread;
9262 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
9263 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
9264 Node.ImageIndex := 16;
9265 Node.SelectedIndex := 16;
9266 end else if Source is TFavoriteThreadItem then begin
9267 FavoThreadItem := TFavoriteThreadItem( Source );
9268 ThreadItem := FavoThreadItem.Item;
9269 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, Source);
9270 Node.ImageIndex := 16;
9271 Node.SelectedIndex := 16;
9274 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
9276 FavoriteMoveTo( SenderNode, Node );
9280 procedure TGikoForm.FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
9283 SourceNode: TTreeNode;
9284 LinkToolButton: TLinkToolButton;
9287 if SenderNode = nil then
9290 if not (TObject( SenderNode.Data ) is TFavoriteFolder) then
9291 if FDropSpaceNode <> nil then
9292 SenderNode := FDropSpaceNode;
9294 if Source = FavoriteTreeView then begin
9296 SourceNode := FavoriteTreeView.Selected;
9297 FavoriteMoveTo( SenderNode, SourceNode );
9299 end else if Source is TLinkToolButton then begin
9301 LinkToolButton := TLinkToolButton( Source );
9302 //ShowMessage(LinkToolButton.Text);
9303 SourceNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data );
9304 FavoriteMoveTo( SenderNode, SourceNode );
9306 end else if Source = BrowserTab then begin
9308 idx := BrowserTab.TabIndex;
9309 FavoriteAddTo( SenderNode, BrowserTab.Tabs.Objects[idx] );
9310 end else if Source = ListView then begin
9312 FavoriteAddTo( SenderNode, ListView.Selected.Data );
9314 end else if Source = TreeView then begin
9316 FavoriteAddTo( SenderNode, TreeView.Selected.Data );
9324 procedure TGikoForm.FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
9327 SenderNode: TTreeNode;
9330 SenderNode := FavoriteTreeView.GetNodeAt(X, Y);
9331 if SenderNode <> nil then begin
9332 FavoriteDragDrop( SenderNode, Source );
9335 if FDropSpaceNode <> nil then begin
9336 FDropSpaceNode.Free;
9337 FDropSpaceNode := nil;
9342 procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
9343 Node: TTreeNode; var S: String);
9346 FavoriteTreeView.ReadOnly := True;
9351 procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
9352 Shift: TShiftState);
9358 FClickNode := FavoriteTreeView.Selected;
9359 FavoriteTreeViewRenameActionExecute( Sender );
9363 FClickNode := FavoriteTreeView.Selected;
9364 FavoriteTreeViewDeleteActionExecute( Sender );
9368 FavoriteClick( FavoriteTreeView.Selected );
9369 FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
9372 FavoriteTreeViewDblClick( Sender );
9377 procedure TGikoForm.FavoriteTreePopupMenuPopup(Sender: TObject);
9380 LinkToolButton: TLinkToolButton;
9383 if FavoriteTreePopupMenu.PopupComponent = FavoriteTreeView then begin
9385 FClickNode := FavoriteTreeView.Selected;
9387 end else if FavoriteTreePopupMenu.PopupComponent is TLinkToolButton then begin
9389 LinkToolButton := TLinkToolButton( FavoriteTreePopupMenu.PopupComponent );
9390 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
9391 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
9392 FClickNode := FavoriteTreeView.Items[i];
9396 for i := 0 to FClickNode.Count - 1 do begin
9397 if FClickNode.Item[i].Data = LinkToolButton.Data then begin
9398 FClickNode := FClickNode.Item[i];
9405 if FClickNode = nil then begin
9406 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9407 FavoriteTreeDeletePopupMenu.Visible := False;
9408 FavoriteTreeRenamePopupMenu.Visible := False;
9409 FavoriteTreeNewFolderPopupMenu.Visible := False;
9410 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9411 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9412 FavoriteTreeURLCopyPopupMenu.Visible := False;
9413 FavoriteTreeNameCopyPopupMenu.Visible := False;
9414 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9415 FavoriteTreeReloadPopupMenu.Visible := False;
9416 FavoriteTreeLogDeletePopupMenu.Visible := False;
9417 end else if FClickNode.IsFirstNode then begin
9418 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9419 FavoriteTreeDeletePopupMenu.Visible := False;
9420 FavoriteTreeRenamePopupMenu.Visible := False;
9421 FavoriteTreeNewFolderPopupMenu.Visible := True;
9422 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9423 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9424 FavoriteTreeURLCopyPopupMenu.Visible := False;
9425 FavoriteTreeNameCopyPopupMenu.Visible := True;
9426 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9427 FavoriteTreeReloadPopupMenu.Visible := False;
9428 FavoriteTreeLogDeletePopupMenu.Visible := False;
9429 end else if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
9430 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9431 FavoriteTreeDeletePopupMenu.Visible := True;
9432 FavoriteTreeRenamePopupMenu.Visible := False;
9433 FavoriteTreeNewFolderPopupMenu.Visible := True;
9434 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9435 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9436 FavoriteTreeURLCopyPopupMenu.Visible := False;
9437 FavoriteTreeNameCopyPopupMenu.Visible := True;
9438 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9439 FavoriteTreeReloadPopupMenu.Visible := False;
9440 FavoriteTreeLogDeletePopupMenu.Visible := False;
9441 end else if TObject(FClickNode.Data) is TFavoriteFolder then begin
9442 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9443 FavoriteTreeDeletePopupMenu.Visible := True;
9444 FavoriteTreeRenamePopupMenu.Visible := True;
9445 FavoriteTreeNewFolderPopupMenu.Visible := True;
9446 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9447 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9448 FavoriteTreeURLCopyPopupMenu.Visible := False;
9449 FavoriteTreeNameCopyPopupMenu.Visible := True;
9450 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9451 FavoriteTreeReloadPopupMenu.Visible := False;
9452 FavoriteTreeLogDeletePopupMenu.Visible := False;
9453 end else if TObject(FClickNode.Data) is TFavoriteThreadItem then begin
9454 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9455 FavoriteTreeDeletePopupMenu.Visible := True;
9456 FavoriteTreeRenamePopupMenu.Visible := True;
9457 FavoriteTreeNewFolderPopupMenu.Visible := True;
9458 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
9459 //FavoriteTreeBrowseThreadPopupMenu.Visible := True;
9460 FavoriteTreeURLCopyPopupMenu.Visible := True;
9461 FavoriteTreeNameCopyPopupMenu.Visible := True;
9462 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
9463 FavoriteTreeReloadPopupMenu.Visible := True;
9464 FavoriteTreeLogDeletePopupMenu.Visible := True;
9465 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
9466 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9467 FavoriteTreeDeletePopupMenu.Visible := True;
9468 FavoriteTreeRenamePopupMenu.Visible := True;
9469 FavoriteTreeNewFolderPopupMenu.Visible := True;
9470 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
9471 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9472 FavoriteTreeURLCopyPopupMenu.Visible := True;
9473 FavoriteTreeNameCopyPopupMenu.Visible := True;
9474 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
9475 FavoriteTreeReloadPopupMenu.Visible := True;
9476 FavoriteTreeLogDeletePopupMenu.Visible := False;
9478 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9479 FavoriteTreeDeletePopupMenu.Visible := False;
9480 FavoriteTreeRenamePopupMenu.Visible := False;
9481 FavoriteTreeNewFolderPopupMenu.Visible := False;
9482 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9483 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9484 FavoriteTreeURLCopyPopupMenu.Visible := False;
9485 FavoriteTreeNameCopyPopupMenu.Visible := False;
9486 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9487 FavoriteTreeReloadPopupMenu.Visible := False;
9488 FavoriteTreeLogDeletePopupMenu.Visible := False;
9493 procedure TGikoForm.FavoriteTreeViewDeleteActionExecute(Sender: TObject);
9495 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';
9496 DEL_MSG = '
\81g^0
\81h
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
9497 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
9500 if FClickNode = nil then
9502 if FClickNode.IsFirstNode then
9504 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
9505 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
9506 if MsgBox(Handle, DEL_LINK_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
9509 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
9514 //FDeleteList.Add(FClickNode.Data);
9515 //SetDeleteItemList(FClickNode);
9523 procedure TGikoForm.FavoriteTreeViewRenameActionExecute(Sender: TObject);
9528 if FClickNode = nil then
9530 if FClickNode.IsFirstNode then
9532 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then
9534 FavoriteTreeView.ReadOnly := False;
9535 if (FTreeType = gttFavorite) and (CabinetPanel.Visible) then begin
9536 node := FClickNode.Parent;
9537 while node <> nil do begin
9538 node.Expanded := True;
9539 node := node.Parent;
9541 FClickNode.EditText;
9543 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 );
9550 procedure TGikoForm.FavoriteTreeViewNewFolderActionExecute(
9553 NewFavFolder: TFavoriteFolder;
9557 if FClickNode = nil then
9561 if not (TObject(FClickNode.Data) is TFavoriteFolder) then begin
9562 FavoriteTreeView.Selected := FClickNode.Parent;
9563 FClickNode := FClickNode.Parent;
9566 NewFavFolder := TFavoriteFolder.Create;
9567 Node := FavoriteTreeView.Items.AddChildObject(FClickNode, '
\90V
\82µ
\82¢
\83t
\83H
\83\8b\83_', NewFavFolder);
9568 Node.ImageIndex := 14;
9569 Node.SelectedIndex := 14;
9570 // FClickNode.Selected.Expanded := True;
9571 FavoriteTreeView.Selected := Node;
9573 FavoriteTreeViewRenameAction.Execute;
9579 procedure TGikoForm.ToolButton19Click(Sender: TObject);
9582 FavoriteArrangeActionExecute( nil );
9586 procedure TGikoForm.FavoriteBrowseFolder( node: TTreeNode );
9591 if not (TObject(node.Data) is TFavoriteFolder) then
9594 for i := 0 to node.Count - 1 do
9596 if TObject(node.Item[i].Data) is TFavoriteFolder then
9597 FavoriteBrowseFolder( node.Item[i] )
9598 else if TObject(node.Item[i].Data) is TFavoriteThreadItem then
9599 FavoriteClick( node.Item[i], False );
9604 procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
9608 FavoriteBrowseFolder( FClickNode );
9609 //BrowserTab.OnChange(nil);
9613 procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
9616 FClickNode := FavoriteTreeView.Selected;
9617 FavoriteTreeViewReloadActionExecute( Sender );
9621 procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
9624 DEL_MSG = '
\81g^0
\81h
\82Ì
\83\8d\83O
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
9625 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
9627 ThreadItem: TThreadItem;
9628 FavThread: TFavoriteThreadItem;
9631 if FClickNode = nil then Exit;
9632 if not (TObject(FClickNode.Data) is TFavoriteThreadItem) then Exit;
9634 FavThread := TFavoriteThreadItem( FClickNode.Data );
9635 ThreadItem := FavThread.Item;
9638 if GikoSys.Setting.DeleteMsg then begin
9639 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
9640 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
9644 DeleteHistory(ThreadItem);
9645 DeleteTab(ThreadItem);
9646 ThreadItem.DeleteLogFile;
9654 procedure TGikoForm.FavoriteTreeViewReloadActionExecute(Sender: TObject);
9656 ThreadItem: TThreadItem;
9657 FavThread: TFavoriteThreadItem;
9659 FavBoard: TFavoriteBoardItem;
9663 if FClickNode = nil then Exit;
9665 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
9667 if TObject( FClickNode.Data ) is TFavoriteThreadItem then begin
9668 FavThread := TFavoriteThreadItem( FClickNode.Data );
9669 ThreadItem := FavThread.Item;
9670 if ThreadItem <> nil then
9671 DownloadContent(ThreadItem, shiftDown);
9672 end else if TObject( FClickNode.Data ) is TFavoriteBoardItem then begin
9673 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9674 Board := FavBoard.Item;
9675 DownloadList(Board, shiftDown);
9680 procedure TGikoForm.FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
9682 FavThread : TFavoriteThreadItem;
9683 FavBoard : TFavoriteBoardItem;
9687 if FClickNode = nil then Exit;
9689 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9691 FavThread := TFavoriteThreadItem( FClickNode.Data );
9692 s := FavThread.URL + #13#10;
9694 Clipboard.AsText := s;
9696 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9698 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9699 s := FavBoard.URL + #13#10;
9701 Clipboard.AsText := s;
9707 procedure TGikoForm.FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
9709 ThreadItem: TThreadItem;
9710 FavThread: TFavoriteThreadItem;
9712 FavBoard: TFavoriteBoardItem;
9716 if FClickNode = nil then Exit;
9718 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9720 FavThread := TFavoriteThreadItem( FClickNode.Data );
9721 ThreadItem := FavThread.Item;
9724 s := ThreadItem.Title + #13#10;
9726 Clipboard.AsText := s;
9730 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9732 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9733 Board := FavBoard.Item;
9734 if Board <> nil then
9735 if not Board.IsThreadDatRead then
9736 GikoSys.ReadSubjectFile(Board);
9739 s := Board.Title + #13#10;
9741 Clipboard.AsText := s;
9749 procedure TGikoForm.FavoriteTreeViewNameURLCopyActionExecute(
9752 ThreadItem: TThreadItem;
9753 FavThread: TFavoriteThreadItem;
9755 FavBoard: TFavoriteBoardItem;
9759 if FClickNode = nil then Exit;
9761 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9763 FavThread := TFavoriteThreadItem( FClickNode.Data );
9764 ThreadItem := FavThread.Item;
9767 s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10;
9769 Clipboard.AsText := s;
9773 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9775 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9776 Board := FavBoard.Item;
9777 if Board <> nil then
9778 if not Board.IsThreadDatRead then
9779 GikoSys.ReadSubjectFile(Board);
9782 s := Board.URL + #13#10 + Board.Title + #13#10;
9784 Clipboard.AsText := s;
9792 function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
9798 for i := 0 to Node.Count - 1 do begin
9799 if Node.Item[i].Data = FindPointer then begin
9800 Result := Node.Item[i];
9802 end else if Node.Item[i].Count > 0 then begin
9803 Found := TreeNodeDataFind( Node.Item[i], FindPointer );
9804 if Found <> nil then begin
9815 procedure TGikoForm.LinkToolBarDragDrop(Sender, Source: TObject; X,
9819 SenderNode: TTreeNode;
9823 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
9824 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
9825 SenderNode := FavoriteTreeView.Items[i];
9830 FavoriteDragDrop( SenderNode, Source );
9834 procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
9835 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
9837 if FDragWFirst <> true then begin
9838 FDragWFirst := false;
9839 end else if (X = FMouseDownPos.X) and (Y = FMouseDownPos.Y) then begin
9840 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
9841 if GikoSys.Setting.ListWidthState = glsMin then begin
9842 BrowserMaxAndFocusAction.Execute;
9845 if GikoSys.Setting.ListHeightState = glsMin then begin
9846 BrowserMaxAndFocusAction.Execute;
9852 procedure TGikoForm.LinkToolBarDragOver(Sender, Source: TObject; X,
9853 Y: Integer; State: TDragState; var Accept: Boolean);
9856 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
9860 procedure TGikoForm.ResRangeActionExecute(Sender: TObject);
9862 case FResRangeMenuSelect of
9863 Ord( grrAll ): AllResAction.Execute;
9864 Ord( grrKoko ): OnlyKokoResAction.Execute;
9865 Ord( grrNew ): OnlyNewResAction.Execute;
9866 100: OnlyAHundredResAction.Execute;
9870 procedure TGikoForm.FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
9874 if FDropSpaceNode <> nil then begin
9875 FDropSpaceNode.Free;
9876 FDropSpaceNode := nil;
9882 procedure TGikoForm.ListCoolBarContextPopup(Sender: TObject;
9883 MousePos: TPoint; var Handled: Boolean);
9886 FToolBarSettingSender := tssList;
9887 MousePos := ListCoolBar.ClientToScreen( MousePos );
9888 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9892 procedure TGikoForm.MainCoolBarContextPopup(Sender: TObject;
9893 MousePos: TPoint; var Handled: Boolean);
9896 FToolBarSettingSender := tssMain;
9897 MousePos := MainCoolBar.ClientToScreen( MousePos );
9898 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9902 procedure TGikoForm.BrowserCoolBarContextPopup(Sender: TObject;
9903 MousePos: TPoint; var Handled: Boolean);
9906 FToolBarSettingSender := tssBrowser;
9907 MousePos := BrowserCoolBar.ClientToScreen( MousePos );
9908 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9911 procedure TGikoForm.ExportFavoriteFileAccept(Sender: TObject);
9914 if FavoriteDM.SaveFavoriteFile( ExportFavoriteFile.Dialog.FileName ) Then begin
9915 ShowMessage('
\83t
\83@
\83C
\83\8b\82ð
\8fo
\97Í
\82µ
\82Ü
\82µ
\82½');
9917 ShowMessage('
\83t
\83@
\83C
\83\8b\82Ì
\8fo
\97Í
\82É
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½');
9920 procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
9922 if FListViewBackGroundColor <> value then begin
9923 FListViewBackGroundColor := value;
9924 ListView.Color := FListViewBackGroundColor;
9927 procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
9929 ExportFavoriteFile.Dialog.FileName := FavoriteDM.GetFavoriteFilePath;
9932 procedure TGikoForm.CabinetBBSActionExecute(Sender: TObject);
9935 if CabinetPanel.Visible then begin
9936 if FTreeType = gtt2ch then begin
9937 CabinetVisible( False );
9939 CabinetBBSAction.Checked := False;
9941 CabinetBBSAction.Checked := True;
9944 CabinetVisible( True );
9945 CabinetBBSAction.Checked := True;
9948 if FActiveBBS = nil then
9949 ShowBBSTree( BBSs[ 0 ] )
9951 ShowBBSTree( FActiveBBS );
9955 procedure TGikoForm.FavoriteTreeViewBrowseThreadActionExecute(
9958 threadItem : TThreadItem;
9961 if FClickNode = nil then Exit;
9963 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9965 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9966 if threadItem = nil then
9968 GikoSys.OpenBrowser( threadItem.URL, gbtAuto );
9974 procedure TGikoForm.FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
9976 threadItem : TThreadItem;
9980 if FClickNode = nil then Exit;
9982 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9984 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9985 if threadItem = nil then
9987 GikoSys.OpenBrowser( threadItem.ParentBoard.URL, gbtAuto );
9989 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9991 boardItem := TFavoriteBoardItem( FClickNode.Data ).Item;
9992 if boardItem = nil then
9994 GikoSys.OpenBrowser( boardItem.URL, gbtAuto );
10000 procedure TGikoForm.UpBoardActionExecute(Sender: TObject);
10003 SelectTreeNode( GetActiveContent.ParentBoard, True );
10007 procedure TGikoForm.UpBoardActionUpdate(Sender: TObject);
10010 UpBoardAction.Enabled := GetActiveContent <> nil;
10014 procedure TGikoForm.BrowserTabContextPopup(Sender: TObject;
10015 MousePos: TPoint; var Handled: Boolean);
10019 idx := BrowserTab.IndexOfTabAt(MousePos.X, MousePos.Y);
10020 if BrowserTab.TabIndex <> idx then begin
10021 BrowserTab.TabIndex := idx;
10022 BrowserTab.OnChange(nil);
10027 procedure TGikoForm.KoreCopyExecute(Sender: TObject);
10029 KonoresCopy(KokoPopupMenu.Tag, true);
10031 procedure TGikoForm.KonoresCopy(Number: Integer; ReplaceTag : Boolean);
10033 ThreadItem: TThreadItem;
10039 boardPlugIn : TBoardPlugIn;
10041 if Number = 0 then Exit;
10042 ThreadItem := GetActiveContent;
10044 if ThreadItem <> nil then begin
10045 if ThreadItem.IsBoardPlugInAvailable then begin
10046 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
10047 boardPlugIn := ThreadItem.BoardPlugIn;
10049 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
10050 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
10051 //
\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
10052 tmp := boardPlugIn.GetDat( DWORD( threadItem ), Number );
10054 FileName := ThreadItem.FilePath;
10055 tmp := GikoSys.ReadThreadFile(FileName, Number);
10057 if tmp <> '' then begin
10058 Res := GikoSys.DivideStrLine(tmp);
10060 Header := IntToStr(Number) + '
\81F' + Res.FName + '
\81F' + Res.FDateTime + #13#10;
10061 if ReplaceTag then begin
10062 Header := CustomStringReplace(Header, '</b>', '',true);
10063 Header := CustomStringReplace(Header, '<b>', '',true);
10065 if ThreadItem.IsBoardPlugInAvailable then begin
10066 Body := CustomStringReplace(Res.FBody, '<br>', #13#10,true);
10067 Body := CustomStringReplace(Body, '<br>', #13#10,true);
10069 Body := CustomStringReplace(Res.FBody, ' <br> ', #13#10,true);
10070 Body := CustomStringReplace(Body, ' <br>', #13#10,true);
10071 Body := CustomStringReplace(Body, '<br> ', #13#10,true);
10072 Body := CustomStringReplace(Body, '<br>', #13#10,true);
10075 Body := CustomStringReplace(Body, '</a>', '',true);
10077 Body := GikoSys.DeleteLink(Body);
10078 if ReplaceTag then begin
10079 Body := CustomStringReplace(Body, '<', '<');
10080 Body := CustomStringReplace(Body, '>', '>');
10081 Body := CustomStringReplace(Body, '"', '"');
10082 Body := CustomStringReplace(Body, '&', '&');
10083 //Body := CustomStringReplace(Body, ' ', ' ');
10086 Header := Header + Body;
10088 Clipboard.SetTextBuf( PChar(Header) );
10094 procedure TGikoForm.BrowserTabPopupMenuPopup(Sender: TObject);
10096 AddRoundNameMenu(dummy1);
10099 procedure TGikoForm.FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
10101 FavoriteDM.URLReplace(oldURLs, newURLs);
10104 procedure TGikoForm.RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
10106 RoundList.URLReplace(oldURLs, newURLs);
10109 procedure TGikoForm.TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
10113 tempString: string;
10116 oldBoardName: string;
10118 newBoardName: string;
10119 TabList: TStringList;
10121 TabList := TStringList.Create;
10122 if oldURLs.Count <> newURLs.Count then
10124 //
\82±
\82±
\82©
\82ç
\81ABoard
\82ÌURL
\82Ì
\95Ï
\8dX
10125 for j :=0 to oldURLs.Count - 1 do begin
10126 for i :=0 to TabList.Count - 1 do begin
10127 if TabList.Text = oldURLs[j] then
10128 TabList.Text := newURLs[j];
10131 //
\82±
\82±
\82Ü
\82Å
\81ABoard
\82ÌURL
\82Ì
\95Ï
\8dX
10133 //
\82±
\82±
\82©
\82ç
\81AThread
\82ÌURL
\82Ì
\95Ï
\8dX
10134 //
\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
10135 for i := 0 to oldURLs.Count - 1 do begin
10136 tmpURL := Copy(oldURLs[i], 1, Length(oldURLs[i]) -1);
10137 oldHost := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) );
10138 oldBoardName := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/';
10139 tmpURL := Copy(newURLs[i], 1, Length(newURLs[i]) -1);
10140 newHost := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) );
10141 newBoardName := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/';
10143 for j := 0 to TabList.Count - 1 do begin
10144 tempString := TabList.Text;
10145 if ( AnsiPos(oldBoardName, tempString) <> 0 ) and ( AnsiPos(oldHost, tempString ) <> 0 ) then begin
10146 tempString := StringReplace(tempString, oldHost, newHost,[]);
10147 TabList.Text := tempString;
10151 //
\82±
\82±
\82Ü
\82Å
\81AThread
\82ÌURL
\82Ì
\95Ï
\8dX
10155 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82é
10156 procedure TGikoForm.OnMinimize;
10158 FIsMinimize := mtMinimizing;
10159 if FActiveContent <> nil then
10160 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
10161 PostMessage( Handle, USER_MINIMIZED, 0, 0 );
10164 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82½
10165 procedure TGikoForm.OnMinimized;
10167 FIsMinimize := mtMinimized;
10168 FIsIgnoreResize := False;
10171 procedure TGikoForm.CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
10173 coolSet : TCoolSet;
10174 toolbar : TToolBar;
10176 affectedBand : TCoolBand;
10179 if (FOldFormWidth = Width) and not IsIconic( Handle ) and not FIsIgnoreResize then begin
10180 FIsIgnoreResize := True;
10181 PostMessage( Handle, USER_RESIZED, 0, 0 );
10182 if not (Sender is TToolBar) or (CoolBar = nil) then
10184 toolbar := TToolBar( Sender );
10186 //
\95Ï
\8dX
\82³
\82ê
\82½
\83N
\81[
\83\8b\83o
\81[
\82Ì
\92l
\82ð
\95Û
\91¶
10187 if CoolBar = MainCoolBar then begin
10188 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
10189 CoolSet.FCoolID := CoolBar.Bands[i].ID;
10190 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
10191 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
10192 GikoSys.Setting.MainCoolSet[i] := CoolSet;
10194 end else if CoolBar = ListCoolBar then begin
10195 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
10196 CoolSet.FCoolID := CoolBar.Bands[i].ID;
10197 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
10198 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
10199 GikoSys.Setting.ListCoolSet[i] := CoolSet;
10201 end else if CoolBar = BrowserCoolBar then begin
10202 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
10203 CoolSet.FCoolID := CoolBar.Bands[i].ID;
10204 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
10205 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
10206 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
10209 //
\95\9d\82Ì
\95Ï
\8dX
\82³
\82ê
\82½
\83o
\83\93\83h
\82ð
\8c©
\82Â
\82¯
\82é
10210 affectedBand := nil;
10211 for i := CoolBar.Bands.Count - 1 downto 0 do begin
10212 if CoolBar.Bands[ i ].Control.Handle = toolbar.Handle then begin
10213 band := CoolBar.Bands[ i ];
10214 if band.Break or (i = 0) then begin
10215 if i + 1 < CoolBar.Bands.Count then
10216 if not CoolBar.Bands[ i + 1 ].Break then
10217 affectedBand := CoolBar.Bands[ i + 1 ];
10220 affectedBand := CoolBar.Bands[ i - 1 ];
10225 //
\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·
10226 if CoolBar = MainCoolBar then begin
10227 coolSet := GikoSys.Setting.MainCoolSet[ band.ID ];
10228 coolSet.FCoolWidth := toolbar.Width + 25;
10229 GikoSys.Setting.MainCoolSet[ band.ID ] := coolSet;
10230 if affectedBand <> nil then begin
10231 coolSet := GikoSys.Setting.MainCoolSet[ affectedBand.ID ];
10232 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
10233 GikoSys.Setting.MainCoolSet[ affectedBand.ID ] := coolSet;
10235 end else if CoolBar = ListCoolBar then begin
10236 coolSet := GikoSys.Setting.ListCoolSet[ band.ID ];
10237 coolSet.FCoolWidth := toolbar.Width + 25;
10238 GikoSys.Setting.ListCoolSet[ band.ID ] := coolSet;
10239 if affectedBand <> nil then begin
10240 coolSet := GikoSys.Setting.ListCoolSet[ affectedBand.ID ];
10241 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
10242 GikoSys.Setting.ListCoolSet[ affectedBand.ID ] := coolSet;
10244 end else if CoolBar = BrowserCoolBar then begin
10245 coolSet := GikoSYs.Setting.BrowserCoolSet[ band.ID ];
10246 coolSet.FCoolWidth := toolbar.Width + 25;
10247 GikoSys.Setting.BrowserCoolSet[ band.ID ] := coolSet;
10248 if affectedBand <> nil then begin
10249 coolSet := GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ];
10250 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
10251 GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ] := coolSet;
10257 procedure TGikoForm.MenuToolBarResize(Sender: TObject);
10259 CoolBarResized( Sender, MainCoolBar );
10262 procedure TGikoForm.StdToolBarResize(Sender: TObject);
10264 CoolBarResized( Sender, MainCoolBar );
10267 procedure TGikoForm.LinkToolBarResize(Sender: TObject);
10269 CoolBarResized( Sender, MainCoolBar );
10272 procedure TGikoForm.ListNameToolBarResize(Sender: TObject);
10274 CoolBarResized( Sender, ListCoolBar );
10277 procedure TGikoForm.ListToolBarResize(Sender: TObject);
10279 CoolBarResized( Sender, ListCoolBar );
10282 procedure TGikoForm.BrowserNameToolBarResize(Sender: TObject);
10284 CoolBarResized( Sender, BrowserCoolBar );
10287 procedure TGikoForm.BrowserToolBarResize(Sender: TObject);
10289 CoolBarResized( Sender, BrowserCoolBar );
10292 procedure TGikoForm.BrowserTabResize(Sender: TObject);
10294 CoolBarResized( Sender, BrowserCoolBar );
10297 // *************************************************************************
10298 // ExternalBoardPlugInMain
10299 //
\83v
\83\89\83O
\83C
\83\93\83\81\83j
\83\85\81[
\82Ì
\8d\80\96Ú
\82ª
\8eÀ
\8ds
\82³
\82ê
\82½
10300 // *************************************************************************
10301 procedure TGikoForm.OnPlugInMenuItem( Sender : TObject );
10304 boardPlugIn : TBoardPlugIn;
10307 if not (Sender is TMenuItem) then
10310 item := TMenuItem( Sender );
10311 if not Assigned( Pointer( item.Tag ) ) then
10314 //
\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·
10315 boardPlugIn := TBoardPlugIn( item.Tag );
10316 boardPlugIn.PlugInMenu( item.Handle );
10319 // TreeView
\82ª
\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
10320 procedure TGikoForm.TreeClick( Node : TTreeNode );
10328 if FTreeType = gttHistory then begin
10329 if Node <> nil then
10330 if TObject( Node.Data ) is TFavoriteThreadItem then
10331 if GetActiveContent <> TFavoriteThreadItem( Node.Data ).Item then
10332 FavoriteClick( Node );
10336 if GetActiveList is TBBS then begin
10337 for i := 0 to ListView.Columns.Count - 1 do
10338 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
10339 end else if GetActiveList is TCategory then begin
10340 for i := 0 to ListView.Columns.Count - 1 do
10341 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
10342 end else if GetActiveList is TBoard then begin
10343 for i := 0 to ListView.Columns.Count - 1 do
10344 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
10347 if TObject(Node.Data) is TBBS then begin
10348 SetActiveList(Node.data);
10349 end else if TObject(Node.Data) is TCategory then begin
10350 SetActiveList(Node.data);
10351 end else if TObject(Node.Data) is TBoard then begin
10352 if not TBoard(Node.Data).IsThreadDatRead then begin
10353 Screen.Cursor := crHourGlass;
10355 if not TBoard(Node.Data).IsThreadDatRead then
10356 GikoSys.ReadSubjectFile(Node.Data);
10358 Screen.Cursor := crDefault;
10361 SetActiveList(Node.data);
10364 if TObject( Node.Data ) is TBoard then begin // not TCategory
10365 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
10366 if GikoSys.Setting.ListWidthState = glsMax then begin
10367 BrowserMinAction.Execute;
10368 if GikoForm.Visible then
10372 if GikoSys.Setting.ListHeightState = glsMax then begin
10373 BrowserMinAction.Execute;
10374 if GikoForm.Visible then
10382 // TreeView
\82ª
\83_
\83u
\83\8b\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
10383 procedure TGikoForm.TreeDoubleClick( Node : TTreeNode );
10386 ThreadItem : TThreadItem;
10387 shiftDown : Boolean;
10390 if Node = nil then Exit;
10392 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
10394 if FTreeType = gtt2ch then begin
10395 if not (TObject(Node.Data) is TBoard) then Exit;
10396 Board := TBoard(Node.Data);
10397 DownloadList(Board, shiftDown);
10398 end else if FTreeType = gttHistory then begin
10399 if not (TObject(Node.Data) is TFavoriteThreadItem) then Exit;
10400 ThreadItem := TFavoriteThreadItem(Node.Data).Item;
10401 DownloadContent(ThreadItem, shiftDown);
10406 procedure TGikoForm.TreeViewClick(Sender: TObject);
10408 TreeClick( TreeView.Selected );
10411 procedure TGikoForm.TreeViewKeyDown(Sender: TObject; var Key: Word;
10412 Shift: TShiftState);
10414 if Key = VK_BACK then begin
10415 // UpFolderButtonClick(Sender);
10416 end else if Key = VK_SPACE then begin
10417 TreeDoubleClick( TreeView.Selected );
10418 end else if Key = VK_RETURN then begin
10419 TreeClick( TreeView.Selected );
10420 TreeView.Selected.Expanded := not TreeView.Selected.Expanded;
10424 //
\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ã
10425 //
\83C
\83x
\83\93\83g
\82ð
\8eæ
\82è
\88µ
\82Á
\82½
\8fê
\8d\87\82Í True
\82ð
\95Ô
\82·
10426 function TGikoForm.BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
10428 iOIPAO : IOleInPlaceActiveObject;
10429 Dispatch : IDispatch;
10432 if Key = VK_BACK then begin
10433 UpBoardAction.Execute;
10435 {end else if Key in [VK_ESCAPE..VK_HELP] then begin
10436 //
\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
10439 end else if(Key in [VK_SPACE..VK_HELP]) and
10440 not(ssCtrl in State) and not(ssAlt in State) and not (ssShift in State) then begin
10443 //
\82»
\82ê
\88È
\8aO
\82Ì
\83C
\83x
\83\93\83g
\82Í Browser
\82É
\97¬
\82·
10444 if(FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10445 Dispatch := FActiveContent.Browser.Application;
10446 if Dispatch <> nil then begin
10447 Dispatch.QueryInterface( IOleInPlaceActiveObject, iOIPAO );
10448 if iOIPAO <> nil then
10449 iOIPAO.TranslateAccelerator( Msg );
10452 //
\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¢
10458 //
\83M
\83R
\83i
\83r
\82Ì
\83\81\83b
\83Z
\81[
\83W
\83\8b\81[
\83v
\82ð
\89¡
\8eæ
\82è
\82µ
\82Ü
\82·
10459 procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
10464 case Msg.message of
10466 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10467 if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
10469 Handled := BrowserKeyDown( Msg, key, KeyDataToShiftState( Msg.lParam ) );
10474 case Msg.wParam shr 16 of
10477 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10478 if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
10479 UpBoardAction.Execute;
10483 if not Handled then begin
10484 if IsDialogMessage( ListView.Handle, Msg ) then begin
10485 UpFolderAction.Execute;
10495 procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject;
10496 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
10498 favItem : TTreeNode;
10499 favThreadItem : TFavoriteThreadItem;
10505 FMouseDownPos.X := X;
10506 FMouseDownPos.Y := Y;
10510 favItem := FavoriteTreeView.GetNodeAt( X, Y );
10511 if favItem = nil then Exit;
10513 if TObject( favItem.Data ) is TFavoriteThreadItem then begin
10514 favThreadItem := TFavoriteThreadItem( favItem.Data );
10515 if favThreadItem.Item <> nil then
10516 InsertBrowserTab( favThreadItem.Item, False );
10523 procedure TGikoForm.MessagePanelResize(Sender: TObject);
10526 if FIsIgnoreResize then
10529 if GikoSys.Setting.ListOrientation = gloVertical then begin
10530 if GikoSys.Setting.ListHeightState = glsMin then begin
10531 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
10532 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
10538 procedure TGikoForm.OnResized;
10541 FOldFormWidth := Width;
10542 FIsIgnoreResize := False;
10546 procedure TGikoForm.TreeSelectNameCopyExecute(Sender: TObject);
10550 TreeView.Selected := FClickNode;
10551 s := FClickNode.Text;
10552 Clipboard.AsText := s;
10555 procedure TGikoForm.FavoriteTreeViewMouseUp(Sender: TObject;
10556 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
10559 if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold) and
10560 (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
10561 FavoriteClick( TObject( FavoriteTreeView.Selected ) );
10566 destructor TBrowserRecord.Destroy;
10570 if Self.FEvent <> nil then
10572 if Self.FBrowser <> nil then begin
10573 if Self.Thread <> nil then begin
10574 //
\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Å
10575 //
\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
10576 if Self.FBrowser.OleObject.Document.documentElement.innerText <> '' then begin
10577 doc := Idispatch( olevariant(Self.FBrowser.ControlInterface).Document) as IHTMLDocument2;
10578 Self.Thread.ScrollTop := doc.Body.ScrollTop;
10581 //TOleControl(Self.FBrowser).Visible := false;
10582 ShowWindow(Self.FBrowser.Handle, SW_HIDE);
10587 procedure TGikoForm.ResRangeActionUpdate(Sender: TObject);
10589 ResRangeAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
10592 function TGikoForm.WebBrowserClick(Sender: TObject): WordBool;
10596 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then
10597 FActiveContent.FBrowser.SetFocus;
10602 procedure TGikoForm.SetFocusForBrowserActionExecute(Sender: TObject);
10604 FActiveContent.FBrowser.SetFocus;
10607 procedure TGikoForm.SetFocusForBrowserActionUpdate(Sender: TObject);
10609 if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
10610 (FActiveContent.Browser <> BrowserNullTab.Browser) then
10611 SetFocusForBrowserAction.Enabled := true
10613 SetFocusForBrowserAction.Enabled := false;
10616 procedure TGikoForm.SetFocusForThreadListActionExecute(Sender: TObject);
10620 if FActiveContent <> nil then
10621 WebBrowserClick(FActiveContent.Browser); //
\88ê
\89ñBrowser
\82É
\93\96\82Ä
\82È
\82¢
\82Æ
\93®
\82©
\82È
\82¢
\82Æ
\82«
\82ª
\82 \82é
10623 if( ListView.Items.Count > 0 ) and (ListView.ItemFocused = nil) then
10624 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é
10625 else if ListView.Items.Count > 0 then begin
10626 ListView.Scroll(-ListView.ClientWidth, -ListView.ClientHeight);
10627 rct := ListView.ItemFocused.DisplayRect(drBounds);
10628 ListView.Scroll(0, 2 * rct.Top - rct.Bottom);
10629 if ListView.ViewStyle <> vsReport then begin
10630 ListView.Scroll(rct.Left, 0);
10635 procedure TGikoForm.SetFocusForCabinetActionExecute(Sender: TObject);
10637 if FActiveContent <> nil then
10638 WebBrowserClick(FActiveContent.Browser); //
\88ê
\89ñBrowser
\82É
\93\96\82Ä
\82È
\82¢
\82Æ
\93®
\82©
\82È
\82¢
\82Æ
\82«
\82ª
\82 \82é
10639 if TreeView.Visible then begin
10641 if(TreeView.Items.Count > 0) and ( TreeView.Selected = nil ) then
10642 TreeView.Items.Item[0].Selected := true;
10643 end else if FavoriteTreeView.Visible then begin
10644 FavoriteTreeView.SetFocus;
10645 if(FavoriteTreeView.Items.Count > 0) and (FavoriteTreeView.Selected = nil) then
10646 FavoriteTreeView.Items.Item[0].Selected := true;
10649 procedure TGikoForm.SetFocusForCabinetActionUpdate(Sender: TObject);
10651 SetFocusForCabinetAction.Enabled := CabinetPanel.Visible;
10654 //
\83u
\83\89\83E
\83U
\82ð
\8dÅ
\91å
\89»
\82µ
\82Ä
\83t
\83H
\81[
\83J
\83X
\82ð
\93\96\82Ä
\82é
\81B
10655 procedure TGikoForm.BrowserMaxAndFocusActionExecute(Sender: TObject);
10657 BrowserMaxAction.Execute;
10658 SetFocusForBrowserAction.Execute;
10661 procedure TGikoForm.BrowserMaxAndFocusActionUpdate(Sender: TObject);
10663 if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
10664 (FActiveContent.Browser <> BrowserNullTab.Browser) then
10665 BrowserMaxAndFocusAction.Enabled := true
10667 BrowserMaxAndFocusAction.Enabled := false;
10669 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\82ð
\8dÅ
\91å
\89»
\82µ
\82Ä
\83t
\83H
\81[
\83J
\83X
\82ð
\93\96\82Ä
\82é
10670 procedure TGikoForm.ThreadlistMaxAndFocusActionExecute(Sender: TObject);
10672 BrowserMinAction.Execute;
10673 SetFocusForThreadListAction.Execute;
10676 procedure TGikoForm.ListViewExit(Sender: TObject);
10682 procedure TGikoForm.ListViewSelectItem(Sender: TObject; Item: TListItem;
10683 Selected: Boolean);
10686 if not (GikoSys.Setting.BrowserTabVisible) and (Item <> nil) then
10687 if (TObject( Item.Data ) is TThreadItem) then begin
10688 SelectTimer.Interval := GikoSys.Setting.SelectInterval;
10690 SelectTimer.Interval := 0
10692 SelectTimer.Interval := 0;
10696 procedure TGikoForm.SelectTimerTimer(Sender: TObject);
10698 if not (ListView.Selected = nil) then
10699 if( FActiveContent = nil) or
10700 (GetActiveContent <> TThreadItem(ListView.Selected.Data) ) then begin
10701 SelectTimer.Interval := 0;
10706 procedure TGikoForm.SelectItemSaveForDatExecute(Sender: TObject);
10711 List := TList.Create;
10713 Screen.Cursor := crHourGlass;
10714 SelectListItem(List);
10715 if ((GikoSys.Setting.ListOrientation = gloVertical) and
10716 (GikoSys.Setting.ListHeightState = glsMax)) or
10717 ((GikoSys.Setting.ListOrientation = gloHorizontal) and
10718 (GikoSys.Setting.ListWidthState = glsMax)) then
10719 ShowMessage('
\83X
\83\8c\83b
\83h
\88ê
\97\97\82ð
\95\
\8e¦
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10720 else if(List.Count = 0) then
10721 ShowMessage('
\83X
\83\8c\83b
\83h
\82ð
\91I
\91ð
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10723 FileSaveAs1.Dialog.Title := '
\91I
\91ð
\83X
\83\8c\83b
\83h
\82ðdat
\82Ì
\82Ü
\82Ü
\95Û
\91¶';
10724 FileSaveAs1.Dialog.Filter := 'DAT
\83t
\83@
\83C
\83\8b(*.dat)|*.dat';
10725 for i := 0 to List.Count - 1 do begin
10726 if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin
10727 FileSaveAs1.Dialog.FileName := TThreadItem(List[i]).FileName;
10728 if FileSaveAs1.Execute then begin
10729 //
\82È
\82º
\82©
\83L
\83\83\83\93\83Z
\83\8b\82Å
\82à
\82±
\82Á
\82¿
\82É
\93ü
\82Á
\82Ä
\82
\82é
10730 if ExtractFilePath(FileSaveAs1.Dialog.FileName) <> '' then begin
10731 CopyFile(PChar(TThreadItem(List[i]).FilePath),
10732 PChar(FileSaveAs1.Dialog.FileName), true);
10739 Screen.Cursor := crDefault;
10745 procedure TGikoForm.SelectItemSaveForHTMLExecute(Sender: TObject);
10752 List := TList.Create;
10754 Screen.Cursor := crHourGlass;
10755 SelectListItem(List);
10756 if ((GikoSys.Setting.ListOrientation = gloVertical) and
10757 (GikoSys.Setting.ListHeightState = glsMax)) or
10758 ((GikoSys.Setting.ListOrientation = gloHorizontal) and
10759 (GikoSys.Setting.ListWidthState = glsMax)) then
10760 ShowMessage('
\83X
\83\8c\83b
\83h
\88ê
\97\97\82ð
\95\
\8e¦
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10761 else if(List.Count = 0) then
10762 ShowMessage('
\83X
\83\8c\83b
\83h
\82ð
\91I
\91ð
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10764 FileSaveAs1.Dialog.Title := '
\91I
\91ð
\83X
\83\8c\83b
\83h
\82ðHTML
\89»
\82µ
\82Ä
\95Û
\91¶';
10765 FileSaveAs1.Dialog.Filter := 'HTML
\83t
\83@
\83C
\83\8b(*.html)|*.html';
10766 for i := 0 to List.Count - 1 do begin
10767 if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin
10768 FileSaveAs1.Dialog.FileName := TThreadItem(List[i]).Title + '.html';
10769 if FileSaveAs1.Execute then begin
10770 //
\82È
\82º
\82©
\83L
\83\83\83\93\83Z
\83\8b\82Å
\82à
\82±
\82Á
\82¿
\82É
\93ü
\82Á
\82Ä
\82
\82é
10771 if ExtractFilePath(FileSaveAs1.Dialog.FileName) <> '' then begin
10772 html := TStringList.Create;
10773 title := TThreadItem(List[i]).Title;
10775 GikoSys.CreateHTML3(html, TThreadItem(List[i]), title);
10776 html.SaveToFile(FileSaveAs1.Dialog.FileName);
10777 SkinorCSSFilesCopy(ExtractFilePath(FileSaveAs1.Dialog.FileName));
10787 Screen.Cursor := crDefault;
10791 procedure TGikoForm.SkinorCSSFilesCopy(path: string);
10793 tmp, tmpD, tmpF: string;
10796 files: TStringList;
10799 if GikoSys.Setting.UseSkin then begin
10800 current := ExtractFilePath(GikoSys.GetSkinDir);
10801 tmp := GikoSys.Setting.CSSFileName;
10802 end else if GikoSys.Setting.UseCSS then begin
10803 current := ExtractFilePath(GikoSys.GetStyleSheetDir);
10804 tmp := ExtractFilePath(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName);
10806 dirs := TStringList.Create;
10809 if tmp <> current then begin
10810 GikoSys.GetDirectoryList(current, '*.*', dirs, true);
10811 for i := 0 to dirs.Count - 1 do begin
10812 files := TStringList.Create;
10814 gikoSys.GetFileList(dirs[i], '*.*', files, true);
10815 tmpD := CustomStringReplace(dirs[i], GikoSys.GetConfigDir, path);
10816 if (AnsiPos(dirs[i], tmp) <> 0) and not (DirectoryExists(tmpD)) then
10817 ForceDirectories(tmpD);
10819 if(dirs[i] = tmp) and (dirs[i] <> current) then begin
10820 for j := 0 to files.Count - 1 do begin
10821 tmpF := CustomStringReplace(files[j], GikoSys.GetConfigDir, path);
10822 if not FileExists(tmpF) then begin
10823 CopyFile(PChar(files[j]), PChar(tmpF),True);
10832 tmpD := CustomStringReplace(dirs[0], GikoSys.GetConfigDir, path);
10833 if not DirectoryExists(tmpD) then
10834 ForceDirectories(tmpD);
10835 tmpF := CustomStringReplace(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName
10836 , GikoSys.GetConfigDir, path);
10837 if not FileExists(tmpF) then begin
10838 CopyFile(PChar(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName)
10839 , PChar(tmpF), True);
10848 procedure TGikoForm.KidokuActionExecute(Sender: TObject);
10853 List := TList.Create;
10855 SelectListItem(List);
10856 for i := 0 to List.Count - 1 do begin
10857 if TObject(List[i]) is TThreadItem then begin
10858 TThreadItem(List[i]).UnRead := false;
10859 TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;
10862 if TreeView.Visible then
10869 procedure TGikoForm.MidokuActionExecute(Sender: TObject);
10874 List := TList.Create;
10876 SelectListItem(List);
10877 for i := 0 to List.Count - 1 do begin
10878 if TObject(List[i]) is TThreadItem then begin
10879 TThreadItem(List[i]).UnRead := true;
10880 TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;
10883 if TreeView.Visible then
10890 procedure TGikoForm.BrowserPanelCanResize(Sender: TObject; var NewWidth,
10891 NewHeight: Integer; var Resize: Boolean);
10895 for i := 0 to BROWSER_COUNT - 1 do
10896 SetWindowPos(TWebBrowser(FBrowsers[i]).Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER);
10898 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10899 SetWindowPos(FActiveContent.Browser.Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER);
10903 procedure TGikoForm.LogFolderOpenActionExecute(Sender: TObject);
10907 if ((GikoSys.Setting.ListOrientation = gloVertical) and
10908 (GikoSys.Setting.ListHeightState = glsMax)) or
10909 ((GikoSys.Setting.ListOrientation = gloHorizontal) and
10910 (GikoSys.Setting.ListWidthState = glsMax)) then begin
10911 if(GetActiveContent <> nil) then begin
10912 GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(GetActiveContent.FilePath) + '"');
10914 end else if GetActiveList is TCategory then begin
10915 List := TList.Create;
10917 SelectListItem(List);
10918 GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(TBoard(List[0]).FilePath) + '"');
10922 end else if GetActiveList is TBoard then begin
10923 GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(TBoard(GetActiveList).FilePath) + '"');
10928 procedure TGikoForm.LogFolderOpenActionUpdate(Sender: TObject);
10930 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
10931 LogFolderOpenAction.Enabled := True
10932 else if GetActiveList is TBoard then
10933 LogFolderOpenAction.Enabled := True
10935 LogFolderOpenAction.Enabled := False;
10938 function TGikoForm.GetTabURLs(AStringList: TStringList) : Boolean;
10940 rec : TBrowserRecord;
10941 i, bound : Integer;
10943 bound := BrowserTab.Tabs.Count -1;
10944 if bound = -1 then begin
10946 Exit; //for
\82É
\94ò
\82Î
\82È
\82¢
\82Å
\91\80\8dì
\82ð
\94²
\82¯
\82é
10949 for i := 0 to bound do begin
10950 rec := TBrowserRecord( BrowserTab.Tabs.Objects[ i ] );
10951 if( rec <> nil) and (rec.Thread <> nil) then
10952 AStringList.Add( rec.Thread.URL );
10957 procedure TGikoForm.TabsSaveActionExecute(Sender: TObject);
10959 if not SaveTabURLs then begin
10960 ShowMessage('
\95Û
\91¶
\82·
\82é
\83^
\83u
\82ª
\82 \82è
\82Ü
\82¹
\82ñ');
10964 function TGikoForm.SaveTabURLs : Boolean;
10966 SaveStringList: TStringList;
10968 SaveStringList := TStringList.Create;
10970 Result := GetTabURLs(SaveStringList);
10971 SaveStringList.SaveToFile(ExtractFilePath(Application.ExeName) + 'tab.sav');
10973 SaveStringList.Free
10977 procedure TGikoForm.TabsOpenActionExecute(Sender: TObject);
10979 if not LoadTabURLs then begin
10980 ShowMessage('
\95\
\8e¦
\82·
\82é
\83^
\83u
\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B');
10984 procedure TGikoForm.FileTabSaveClick(Sender: TObject);
10986 SaveStringList: TStringList;
10988 SaveTabList := TStringList.Create;
10989 SaveTabList := GetTabURLs;
10990 if TabSaveDialog.Execute then begin
10991 SaveTabList.SaveToFile(TabSaveDialog.FileName);
10996 function TGikoForm.LoadTabURLs : Boolean;
10998 i, bound : Integer;
10999 item : TThreadItem;
11000 URLs : TStringList;
11001 GikoTab : TGikoTabAppend;
11004 fileName := ExtractFilePath(Application.ExeName) + 'tab.sav';
11005 URLs := TStringList.Create();
11006 GikoTab := GikoSys.Setting.BrowserTabAppend;
11009 if FileExists(fileName) then
11010 URLs.LoadFromFile(fileName);
11013 ShowMessage('
\83^
\83u
\83t
\83@
\83C
\83\8b\82ª
\8aJ
\82¯
\82Ü
\82¹
\82ñ');
11015 bound := URLs.Count - 1;
11016 if bound = -1 then begin
11022 GikoSys.Setting.BrowserTabAppend := gtpLast;//TGikoTabAppend(1);
11023 for i := 0 to URLs.Count - 1 do begin
11024 item := BBSsFindThreadFromURL( URLs[ i ] );
11025 if item <> nil then
11026 InsertBrowserTab( item, false );
11029 GikoSys.Setting.BrowserTabAppend := GikoTab;
11035 procedure TGikoForm.TabsSaveToFileActionExecute(Sender: TObject);
11037 SaveTabList: TStringList;
11040 SaveTabList := TStringList.Create;
11042 Result := GetTabURLs(SaveTabList);
11043 // if TabSaveDialog.Execute then begin
11044 // SaveTabList.SaveToFile(TabSaveDialog.FileName);
11051 procedure TGikoForm.TabsOpenFromFileActionExecute(Sender: TObject);
11054 item : TThreadItem;
11055 URLs : TStringList;
11056 GikoTab: TGikoTabAppend;
11058 URLs := TStringList.Create();
11059 GikoTab := GikoSys.Setting.BrowserTabAppend;
11062 // if TabOpenDialog.Execute then begin
11063 // URLs.LoadFromFile(TabOpenDialog.FileName);
11066 on EFOpenError do ShowMessage('
\83^
\83u
\83t
\83@
\83C
\83\8b\82ª
\8aJ
\82¯
\82Ü
\82¹
\82ñ');
11069 GikoSys.Setting.BrowserTabAppend := gtpLast;//TGikoTabAppend(1);
11070 for i := 0 to URLs.Count - 1 do begin
11071 item := BBSsFindThreadFromURL( URLs[ i ] );
11072 if item <> nil then
11073 InsertBrowserTab( item, false );
11076 GikoSys.Setting.BrowserTabAppend := GikoTab;
11081 procedure TGikoForm.OnlyAHundredResActionExecute(Sender: TObject);
11083 ThreadItem : TThreadItem;
11084 FilterList : TStringList;
11087 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
11088 and (FActiveContent.FBrowser.Busy) then Exit;
11090 FResRangeMenuSelect := 100;
11091 OnlyAHundredResAction.Checked := True;
11093 if GikoSys.ResRange <> 100 then begin
11094 GikoSys.ResRange := 100;
11096 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
11097 FilterList := TStringList.Create;
11099 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
11100 GikoSys.FSelectResFilter.Reverse := False;
11102 FilterList.Destroy;
11105 FSelectResWord := '';
11107 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
11108 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
11109 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
11111 ThreadItem := GetActiveContent;
11112 if ThreadItem <> nil then
11113 InsertBrowserTab( ThreadItem, True );
11117 procedure TGikoForm.OnlyKokoResActionExecute(Sender: TObject);
11119 ThreadItem : TThreadItem;
11120 FilterList : TStringList;
11123 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
11124 and (FActiveContent.FBrowser.Busy) then Exit;
11126 FResRangeMenuSelect := Ord( grrKoko );
11127 OnlyKokoResAction.Checked := True;
11129 if GikoSys.ResRange <> Ord( grrKoko ) then begin
11130 GikoSys.ResRange := Ord( grrKoko );
11132 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
11133 FilterList := TStringList.Create;
11135 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
11136 GikoSys.FSelectResFilter.Reverse := False;
11138 FilterList.Destroy;
11141 FSelectResWord := '';
11143 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
11144 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
11145 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
11147 ThreadItem := GetActiveContent;
11148 if ThreadItem <> nil then
11149 InsertBrowserTab( ThreadItem, True );
11153 procedure TGikoForm.OnlyNewResActionExecute(Sender: TObject);
11155 ThreadItem : TThreadItem;
11156 FilterList : TStringList;
11159 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
11160 and (FActiveContent.FBrowser.Busy) then Exit;
11162 FResRangeMenuSelect := Ord( grrNew );
11163 OnlyNewResAction.Checked := True;
11165 if GikoSys.ResRange <> Ord( grrNew ) then begin
11166 GikoSys.ResRange := Ord( grrNew );
11168 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
11169 FilterList := TStringList.Create;
11171 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
11172 GikoSys.FSelectResFilter.Reverse := False;
11174 FilterList.Destroy;
11177 FSelectResWord := '';
11179 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
11180 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
11181 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
11183 ThreadItem := GetActiveContent;
11184 if ThreadItem <> nil then
11185 InsertBrowserTab( ThreadItem, True );
11189 procedure TGikoForm.BrowsBoradHeadActionExecute(Sender: TObject);
11191 RefURL, URL : string;
11195 if GetActiveList is TCategory then begin
11196 List := TList.Create;
11198 SelectListItem(List);
11199 RefURL := TBoard(List[0]).URL;
11203 end else if GetActiveList is TBoard then begin
11204 RefURL := TBoard(GetActiveList).URL
11206 if RefURL <> '' then begin
11207 if RefURL[Length(RefURL)] <> '/' then
11208 URL := RefURL + '/' + 'head.txt'
11210 URL := RefURL + 'head.txt';
11214 ShowMessage('
\94Â
\82ð
\93Á
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½
\81B');
11219 procedure TGikoForm.BrowsBoradHeadActionUpdate(Sender: TObject);
11221 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
11222 BrowsBoradHeadAction.Enabled := True
11223 else if GetActiveList is TBoard then
11224 BrowsBoradHeadAction.Enabled := True
11226 BrowsBoradHeadAction.Enabled := False;
11229 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\95Ò
\8fW
\82·
\82é
\82½
\82ß
\82É
\8aJ
\82
11230 procedure TGikoForm.EditNGActionExecute(Sender: TObject);
11232 GikoSys.FAbon.EditNGwords;
11235 procedure TGikoForm.ThreadRangeActionUpdate(Sender: TObject);
11237 ThreadRangeAction.Enabled := (GetActiveList is TBoard);
11240 procedure TGikoForm.ThreadRangeActionExecute(Sender: TObject);
11242 case GikoSys.Setting.ThreadRange of
11243 gtrAll: AllItemAction.Execute;
11244 gtrLog: LogItemAction.Execute;
11245 gtrNew: NewItemAction.Execute;
11249 procedure TGikoForm.TabAutoSaveActionExecute(Sender: TObject);
11254 procedure TGikoForm.TabAutoLoadActionExecute(Sender: TObject);
11260 OleInitialize(nil);