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 procedure GetTabURLs(AStringList: TStringList; Result:Boolean);
1079 //
\83o
\83\93\83h
\95\9d\82ð
\8dÄ
\8cv
\8eZ
\81E
\8dÄ
\90Ý
\92è
\82·
\82é
1080 procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
1082 procedure CreateParams(var Params: TCreateParams); override;
1083 procedure WndProc(var Message: TMessage); override;
1084 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
1085 procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
1086 procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
1090 // FDownload: TDownload;
1091 FControlThread: TThreadControl;
1092 procedure MoveToURL(URL: string);
1093 procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
1094 procedure ReloadBBS;
1095 function GetHttpState: Boolean;
1096 procedure SetEnabledCloseButton(Enabled: Boolean);
1097 function GetTreeNode(Data: TObject): TTreeNode;
1098 procedure AppFormDeactivate(Sender: TObject);
1099 // procedure CabinetPanelVisible(PanelVisible: Boolean);
1100 procedure ListViewAllSelect;
1102 property ListStyle: TViewStyle read FListStyle write FListStyle;
1103 property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
1104 property ViewType: TGikoViewType read FViewType write FViewType;
1106 property NameCookie: string read FNameCookie write FNameCookie;
1107 property MailCookie: string read FMailCookie write FMailCookie;
1109 procedure SetContent(inThread: TBrowserRecord);
1110 function GetActiveContent: TThreadItem;
1111 function GetActiveList: TObject;
1113 property ActiveList: TObject read GetActiveList write SetActiveList;
1114 // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
1116 procedure SetListViewType(AViewType: TGikoViewType); overload;
1117 procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
1118 procedure DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
1119 procedure DownloadList(Board: TBoard; ForceDownload: Boolean = False);
1120 procedure PlaySound(SoundEventName: string);
1122 function AddHistory( FavItem: TFavoriteThreadItem ): Boolean;
1123 procedure DeleteHistory( threadItem: TThreadItem );
1124 procedure ClearHistory;
1125 procedure SaveHistory;
1126 procedure LoadHistory;
1127 procedure ShowBBSTree( inBBS : TBBS );
1128 procedure ShowBBSTreeOld( inBBS : TBBS );
1129 procedure ShowHistoryTree;
1130 procedure SetHistoryTreeNode;
1131 // procedure SelectTreeNode(Item: TObject);
1132 procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
1133 procedure SetBrowserTabState;
1134 // property Favorite: TFavorite read FFavorite write FFavorite;
1135 procedure SetToolBarPopup;
1136 procedure ShowFavoriteAddDialog( Item : TObject );
1137 procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
1138 procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
1139 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
1140 property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
1141 property OddColor : TColor read FOddColor write FOddColor;
1143 function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
1144 procedure OnPlugInMenuItem( Sender : TObject );
1145 procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
1148 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
1151 TFavoriteMenuItem = class(TMenuItem)
1155 property Data: Pointer read FData write FData;
1158 TBBSMenuItem = class(TMenuItem)
1162 property Data: Pointer read FData write FData;
1165 TLinkToolButton = class(TToolButton)
1169 property Data: Pointer read FData write FData;
1172 TBrowserRecord = class( TObject )
1174 FBrowser : TWebBrowser;
1175 FEvent: THTMLDocumentEventSink;//
\83u
\83\89\83E
\83U
\83h
\83L
\83\85\83\81\83\93\83g
\83C
\83x
\83\93\83g
1176 FThread : TThreadItem;
1177 FLastSize : Integer;
1179 // FOnlyHundred: Boolean;
1181 destructor Destroy; override;
1182 property Browser : TWebBrowser read FBrowser write FBrowser;
1183 property Thread : TThreadItem read FThread write FThread;
1184 property LastSize : Integer read FLastSize write FLastSize;
1185 property Repaint : Boolean read FRepaint write FRepaint;
1186 // property OnlyHundred : Boolean read FOnlyHundred write FOnlyHundred;
1190 GikoForm: TGikoForm;
1195 About, Option, Round, Splash, Sort, ListSelect,
1196 NewBoard, MojuUtils,Clipbrd;
1199 CAPTION_NAME: string = '
\83M
\83R
\83i
\83r';
1200 BLANK_HTML: string = 'about:blank';
1201 SELECTCOMBOBOX_NAME: string = ''; // '
\83X
\83\8c\83b
\83h
\8di
\8d\9e\8c\9f\8dõ';
1202 SELECTCOMBOBOX_COLOR: TColor = clWindow;
1204 DandD_THRESHOLD = 5; //D&D
\82Ìè
\87\92l
\81ipixcel)
1205 //
\83c
\83\8a\81[
\81E
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93
1206 ITEM_ICON_2CH1 = 0; //2ch
\83A
\83C
\83R
\83\93
1207 ITEM_ICON_2CH2 = 1; //2ch
\83A
\83C
\83R
\83\93
1208 ITEM_ICON_CATEGORY1 = 2; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1209 ITEM_ICON_CATEGORY2 = 3; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1210 ITEM_ICON_BOARD_NOSUBJECT = 3; //
\93Ç
\82Ý
\8d\9e\82Ü
\82ê
\82Ä
\82¢
\82È
\82¢
\94Â
\83A
\83C
\83R
\83\93
1211 ITEM_ICON_BOARD1 = 4; //
\94Â
\83A
\83C
\83R
\83\93
1212 ITEM_ICON_BOARD2 = 5; //
\94Â
\83A
\83C
\83R
\83\93
1213 ITEM_ICON_THREADLOG1 = 6; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1214 ITEM_ICON_THREADLOG2 = 7; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1215 ITEM_ICON_THREAD1 = 8; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1216 ITEM_ICON_THREAD2 = 9; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1217 ITEM_ICON_THREADNEW1 = 10; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1218 ITEM_ICON_THREADNEW2 = 11; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1219 ITEM_ICON_SORT1 = 12; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1220 ITEM_ICON_SORT2 = 13; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1221 ITEM_ICON_BOARD_LOG = 17; //
\83X
\83\8c\83\8d\83O
\82 \82è
\94Â
\83A
\83C
\83R
\83\93
1222 ITEM_ICON_BOARD_NEW = 18; //
\83X
\83\8c\90V
\92\85\94Â
\83A
\83C
\83R
\83\93
1224 //
\83c
\81[
\83\8b\83o
\81[
\83A
\83C
\83R
\83\93
1225 TOOL_ICON_HEIGHT_MAX = 16; //
\8d\82\82³
\8dÅ
\91å
\83A
\83C
\83R
\83\93
1226 TOOL_ICON_HEIGHT_MIN = 17; //
\8d\82\82³
\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1227 TOOL_ICON_HEIGHT_NORMAL = 18; //
\8d\82\82³
\95W
\8f\80\83A
\83C
\83R
\83\93
1228 TOOL_ICON_WIDTH_MAX = 19; //
\95\9d\8dÅ
\91å
\83A
\83C
\83R
\83\93
1229 TOOL_ICON_WIDTH_MIN = 20; //
\95\9d\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1230 TOOL_ICON_WIDTH_NORMAL = 21; //
\95\9d\95W
\8f\80\83A
\83C
\83R
\83\93
1232 TOOL_ICON_FAV_FOLDER = 30; //
\82¨
\8bC
\82É
\93ü
\82è
\83t
\83H
\83\8b\83_
\83A
\83C
\83R
\83\93
1233 TOOL_ICON_FAV_BOARD = 31; //
\82¨
\8bC
\82É
\93ü
\82è
\94Â
\83A
\83C
\83R
\83\93
1234 TOOL_ICON_FAV_THREAD = 32; //
\82¨
\8bC
\82É
\93ü
\82è
\83X
\83\8c\83A
\83C
\83R
\83\93
1236 HTML_FILE_NAME = 'temp_preview.html';
1238 WM_XBUTTONDOWN = $020B;
1239 WM_XBUTTONUP = $020C;
1240 WM_XBUTTONDBLCLK = $020D;
1243 USER_TREECLICK = WM_USER + 2000;
1244 USER_RESIZED = WM_USER + 2001;
1245 USER_MINIMIZED = WM_USER + 2002;
1246 USER_SETLINKBAR = WM_USER + 2003;
1247 SELECTTIME_INTERBAL = 110;
1249 BROWSER_COUNT = 5; //
\83u
\83\89\83E
\83U
\82Ì
\90\94
1252 procedure TGikoForm.CreateParams(var Params: TCreateParams);
1255 if FormStyle in [fsNormal, fsStayOnTop] then begin
1256 if BorderStyle in [bsSingle, bsSizeable] then begin
1257 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1258 Params.WndParent := 0;
1263 procedure TGikoForm.FormCreate(Sender: TObject);
1265 TVS_NOTOOLTIPS = $0080;
1271 wp: TWindowPlacement;
1273 newbrowser: TWebBrowser;
1277 Writeln('============================================================');
1278 Writeln('
\83M
\83R
\83i
\83r
\83f
\83o
\83b
\83O
\83R
\83\93\83\
\81[
\83\8b');
1280 Writeln('
\82±
\82Ì
\89æ
\96Ê
\82ð
\95Â
\82¶
\82È
\82¢
\82Å
\82
\82¾
\82³
\82¢
\81B');
1281 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¢');
1282 Writeln('============================================================');
1284 Application.OnDeactivate := AppFormDeactivate;
1285 Self.OnDeactivate := AppFormDeactivate;
1286 Application.HookMainWindow(Hook);
1287 Application.OnMessage := HandleAppMessage; //
\82È
\82ñ
\82©
\96³
\82
\82Ä
\82à
\91å
\8fä
\95v
\82É
\82È
\82Á
\82½
\81@by
\81@
\82à
\82¶
\82ã
1288 Self.DoubleBuffered := true;
1289 FTreeType := gttNone;
1291 FSearchDialog := nil;
1292 BrowserNullTab := TBrowserRecord.Create;
1293 BrowserNullTab.Browser := Browser;
1294 BrowserNullTab.Browser.Navigate(BLANK_HTML);
1295 FBrowsers := TList.Create;
1296 for i := 0 to BROWSER_COUNT -1 do begin
1297 FBrowsers.Add(TWebBrowser.Create(nil));
1298 newBrowser := FBrowsers[FBrowsers.Count - 1];
1299 TOleControl(newBrowser).Parent := BrowserPanel;
1300 newBrowser.Align := alNone;
1301 newBrowser.Left := 0;
1302 newBrowser.Top := 0;
1303 //newBrowser.DoubleBuffered := true;
1304 newBrowser.OnDocumentComplete := BrowserDocumentComplete;
1305 newBrowser.OnBeforeNavigate2 := BrowserBeforeNavigate2;
1306 newBrowser.OnEnter := BrowserEnter;
1307 newBrowser.OnNewWindow2 := BrowserNewWindow2;
1308 newBrowser.OnStatusTextChange := BrowserStatusTextChange;
1309 //newBrowser.OnTitleChange := BrowserTitleChange;
1310 newBrowser.Navigate(BLANK_HTML);
1311 ShowWindow(newBrowser.Handle, SW_HIDE);
1314 BrowserNullTab.Browser.BringToFront;
1315 ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
1317 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô
1318 FIsIgnoreResize := True;
1320 //
\8eè
\82Ì
\83J
\81[
\83\
\83\8b
1321 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1324 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1325 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1327 //
\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Æ)
1328 InitializeBoardPlugIns;
1330 EnabledCloseButton := True;
1333 //
\8f\84\89ñ
\83f
\81[
\83^
\93Ç
\82Ý
\8d\9e\82Ý
1334 RoundList := TRoundList.Create;
1335 RoundList.LoadRoundBoardFile;
1337 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\97ñ
\8b\93(ReadFavorite
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1338 GikoSys.ListBoardFile;
1340 RoundList.LoadRoundThreadFile;
1342 if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
1343 GikoSys.ListBoardFile;
1345 //
\83\81\83j
\83\85\81[
\82É
\92Ç
\89Á
1348 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g(LoadHistory
\82æ
\82è
\82à
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1349 FHistoryList := TList.Create;
1351 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1354 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
1355 // FFavorite := TFavorite.Create(FavoriteTreeView);
1356 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1357 FavoriteDM.ReadFavorite;
1359 //
\83\8a\83X
\83g
\83X
\83^
\83C
\83\8b
1360 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1362 //
\83\81\83C
\83\93\83N
\81[
\83\8b\83o
\81[
\88Ê
\92u
1363 // MainCoolBar.Top := 0;
1364 // MainCoolBar.Left := 0;
1366 //
\83A
\83j
\83\81\83p
\83l
\83\8b\88Ê
\92u
1367 AnimePanel.Top := 0;
1368 AnimePanel.Left := 0;
1370 //
\8ae
\8eí
\89Â
\8e\8b\8fó
\91Ô
\82È
\82Ç
\90Ý
\92è
1372 //
\83L
\83\83\83r
\83l
\83b
\83g
1373 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1375 //
\83\81\83b
\83Z
\81[
\83W
\83o
\81[
1376 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1377 MsgBarVisibleActionExecute(nil);
1378 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1380 //
\83X
\83e
\81[
\83^
\83X
\83o
\81[
1381 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1382 StatusBarVisibleActionExecute(nil);
1384 //
\83t
\83H
\83\93\83g
\81E
\90F
\90Ý
\92è
1385 TreeView.Items.BeginUpdate;
1386 FavoriteTreeView.Items.BeginUpdate;
1387 ListView.Items.BeginUpdate;
1389 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1390 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1391 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1392 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1394 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1395 FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1396 FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1397 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1399 ListView.Font.Name := GikoSys.Setting.ListFontName;
1400 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1401 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1402 //ListView.Color := GikoSys.Setting.ListBackColor;
1403 ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1404 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1405 FOddColor := GikoSys.Setting.OddColor;
1408 TreeView.Items.EndUpdate;
1409 FavoriteTreeView.Items.EndUpdate;
1410 ListView.Items.EndUpdate;
1412 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1413 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1415 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
1416 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1417 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1418 FDragWFirst := false;
1419 SetContent(BrowserNullTab); //
\83u
\83\89\83E
\83U
\82ð
\8bó
\94\92\95\
\8e¦
1420 // TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
1421 // TreeView.Selected := TreeView.Items[0]; //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
1424 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95\9c\8c³
1425 wp.length := sizeof(wp);
1426 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1427 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1428 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1429 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1430 wp.showCmd := SW_HIDE;
1431 SetWindowPlacement(Handle, @wp);
1433 // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1434 // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1435 if GikoSys.Setting.WindowMax then
1436 WindowState := wsMaximized;
1438 //
\83M
\83R
\83A
\83j
\83\81
1440 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1441 if FileExists(FileName) then
1442 Animate.FileName := FileName;
1450 //
\83X
\83\8c\91S
\95\94\95\
\8e¦
\83{
\83^
\83\93\82ð
\89\9f\82³
\82ê
\82½
\8fó
\91Ô
\82É
\82·
\82é
1451 AllItemAction.Checked := True;
1452 AllResAction.Checked := True;
1454 //TreeView
\82Ì
\8e×
\96\82\8fL
\82¢ToolTip
\82ð
\94ñ
\95\
\8e¦
1455 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1456 Style := Style or TVS_NOTOOLTIPS;
1457 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1459 //
\83c
\83\8a\81[
\82ð
\83\81\83C
\83\93\82¾
\82¯
\95\
\8e¦
\82É
\82µ
\82Ä
\8dÅ
\91å
\89»
1460 TreeView.Align := alClient;
1461 FavoriteTreeView.Align := alClient;
1462 FavoriteTreeView.Visible := False;
1464 //
\83u
\83\89\83E
\83U
\83T
\83C
\83Y
\95Ï
\8dX
\82Ì
\8f\89\8aú
\89»
1465 // FBrowserSizeFlag := False;
1466 // FBrowserSizeHeight := ViewPanel.Height;
1468 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1469 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1471 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1472 ArrangeAction.Execute;
1474 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1475 case GikoSys.Setting.ListWidthState of
1477 ViewPanel.Width := 1;
1478 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1479 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1482 ViewPanel.Width := GikoSys.Setting.ListWidth;
1483 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1484 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1487 ViewPanel.Width := GikoSys.Setting.ListWidth;
1488 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1489 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1493 case GikoSys.Setting.ListHeightState of
1495 ViewPanel.Height := 1;
1496 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1497 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1500 ViewPanel.Height := GikoSys.Setting.ListHeight;
1501 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1502 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1505 ViewPanel.Height := GikoSys.Setting.ListHeight;
1506 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1507 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1512 //
\83v
\83\8d\83O
\83\8c\83X
\83o
\81[
\82Ì
\8f\89\8aú
\89»
1513 // ProgressBar.Visible := False;
1514 ProgressBar.Parent := StatusBar;
1515 ProgressBar.Top := 2;
1516 ProgressBar.Left := 0;
1517 ProgressBar.Width := StatusBar.Panels[0].Width;
1518 ProgressBar.Height := StatusBar.Height - 2;
1519 ProgressBar.Position := 0;
1521 //
\83_
\83E
\83\93\83\8d\81[
\83h
\83I
\83u
\83W
\83F
\83N
\83g
1522 FControlThread := TThreadControl.Create(True);
1523 FControlThread.MaxThreadCount := 1;
1524 FControlThread.Resume;
1525 FControlThread.OnDownloadEnd := DownloadEnd;
1526 FControlThread.OnDownloadMsg := DownloadMsg;
1527 FControlThread.OnWork := Work;
1528 FControlThread.OnWorkBegin := WorkBegin;
1529 FControlThread.OnWorkEnd := WorkEnd;
1530 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1532 //
\8di
\8d\9e\8c\9f\8dõ
\97\9a\97ð
1533 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1535 //
\83u
\83\89\83E
\83U
\83^
\83u
\90Ý
\92è
1538 BrowserBoardNameLabel.Caption := '';
1539 BrowserNameLabel.Caption := '';
1542 FTabHintIndex := -1;
1544 //
\83\8a\83\93\83N
\83o
\81[
1547 //
\83\81\83j
\83\85\81[
\83t
\83H
\83\93\83g
1550 //
\83c
\81[
\83\8b\83o
\81[Wrapable
1551 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1552 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1554 KeepDefaultToolButton(StdToolBar, TmpToolBar);
1555 KeepDefaultToolButton(ListToolBar, TmpToolBar);
1556 KeepDefaultToolButton(BrowserToolBar, TmpToolBar);
1558 MakeDefaultINIFile();
1559 //
\83c
\81[
\83\8b\83{
\83^
\83\93\93Ç
\82Ý
\8d\9e\82Ý
1560 ReadToolBarSetting(ActionList, StdToolBar);
1561 ReadToolBarSetting(ActionList, ListToolBar);
1563 for i := ListToolBar.ControlCount - 1 downto 0 do
1565 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1567 //
\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·
1568 if (i + 1) < ListToolBar.ControlCount then
1569 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1570 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1571 ListToolBar.Controls[ i + 1 ].Visible := False;
1573 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
1574 ListToolBar.Controls[ i ].Visible := False;
1575 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
1576 SelectComboBox.Parent := ListToolBar;
1577 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1578 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1579 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
1580 SelectComboBoxSplitter.Parent := ListToolBar;
1581 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1588 ReadToolBarSetting(ActionList, BrowserToolBar);
1591 //
\83\8c\83X
\95\
\8e¦
\94Í
\88Í
1592 FResRangeMenuSelect := GikoSys.ResRange;
1593 case GikoSys.ResRange of
1596 AllResAction.Execute;
1600 SelectComboBox.Text := SelectComboBox.Items[ 1 ];
1601 SelectResAction.Checked := True;
1604 // ResRangeAction.Execute;
1605 case FResRangeMenuSelect of
1606 Ord( grrKoko ): OnlyKokoResAction.Checked := True;
1607 Ord( grrNew ): OnlyNewResAction.Checked := True;
1608 100: OnlyAHundredResAction.Checked := True;
1612 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\95\
\8e¦
\94Í
\88Í
1613 // ThreadRangeAction.Execute;
1614 case GikoSys.Setting.ThreadRange of
1617 AllItemAction.Checked := True;
1622 LogItemAction.Checked := True;
1627 NewItemAction.Checked := True;
1632 //
\83A
\83h
\83\8c\83X
\83o
\81[
1633 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1635 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³
\82ÍFormShow
\82É
\88Ú
\93®
\82µ
\82½
1637 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\82ª
\96³
\82¢
\8fê
\8d\87\82Í
\83\81\83b
\83Z
\81[
\83W
\95\
\8e¦
1638 if not FileExists(GikoSys.GetBoardFileName) then begin
1639 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
1640 + '
\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
1641 + '
\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';
1642 MsgBox(SplashWindow.Handle, msg, '
\83M
\83R
\83i
\83r', MB_OK or MB_ICONINFORMATION);
1643 NewBoardAction.Execute;
1646 //
\83L
\81[
\90Ý
\92è
\93Ç
\82Ý
\8d\9e\82Ý
1647 GikoSys.LoadKeySetting(ActionList);
1649 //
\8dÅ
\8fI
\8f\84\89ñ
\8e\9e\8aÔ
1650 // FLastRoundTime := 0;
1653 FHint := TResPopup.Create(Self);
1655 //
\8dÅ
\8cã
\82É
\91I
\91ð
\82³
\82ê
\82½
\83L
\83\83\83r
\83l
\83b
\83g
\82Ì
\95\9c\8c³
1656 CabinetVisible( False );
1657 if GikoSys.Setting.CabinetVisible then begin
1658 i := CabinetSelectPopupMenu.Items.Count - 1;
1659 if GikoSys.Setting.CabinetIndex = i - 1 then
1660 CabinetHistoryAction.Execute
1661 else if GikoSys.Setting.CabinetIndex = i then
1662 CabinetFavoriteAction.Execute
1664 if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1665 ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1666 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô 2
1667 FIsIgnoreResize := True;
1668 CabinetBBSAction.Execute;
1671 ShowBBSTreeOld( BBSs[ 0 ] );
1672 PostMessage( Handle, USER_TREECLICK, 0, 0 );
1675 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô 3
1676 FIsIgnoreResize := True;
1678 //
\83I
\81[
\83g
\83\8d\83O
\83C
\83\93
1679 if GikoSys.Setting.AutoLogin then
1680 LoginAction.Execute;
1682 //
\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
1683 for i := 1 to ParamCount do begin
1684 MoveToURL(ParamStr(i));
1689 s := GikoSys.FAbon.NGwordname;
1690 StatusBar.Panels[2].Text := s;
1691 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1692 StatusBarResize(Sender);
1694 dummy1.Caption := ItemReservPMenu.Caption;
1695 dummy1.Hint := ItemReservPMenu.Hint;
1697 //Samba24
\82Ì
\83t
\83@
\83C
\83\8b\83`
\83F
\83b
\83N
1698 GikoSys.SambaFileExists();
1700 //
\83^
\83u
\8e©
\93®
\93Ç
\82Ý
\8d\9e\82Ý (AV
\94
\90¶
\82Ì
\82½
\82ß
\88ê
\8e\9e\95\95\88ó)
1703 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82É
\95Û
\91¶
1704 procedure TGikoForm.SaveCoolBarSettings;
1710 if IsIconic( Handle ) or FIsIgnoreResize then
1713 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Main)
1714 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1715 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1716 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1717 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1718 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1720 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Board)
1721 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1722 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1723 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1724 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1725 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1727 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Browser)
1728 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1729 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1730 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1731 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1732 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1737 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82©
\82ç
\95\9c\8c³
1738 procedure TGikoForm.LoadCoolBarSettings;
1744 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Main)
1745 MainCoolBar.Bands.BeginUpdate;
1747 // for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1748 for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin
1749 CoolSet := GikoSys.Setting.MainCoolSet[i];
1750 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1751 FIsIgnoreResize := False;
1752 SaveCoolBarSettings;
1755 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1756 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1757 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1760 MainCoolBar.Bands.EndUpdate;
1763 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Board)
1764 ListCoolBar.Bands.BeginUpdate;
1766 // for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1767 for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin
1768 CoolSet := GikoSys.Setting.ListCoolSet[i];
1769 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1770 FIsIgnoreResize := False;
1771 SaveCoolBarSettings;
1774 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1775 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1776 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1779 ListCoolBar.Bands.EndUpdate;
1782 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Browser)
1783 BrowserCoolBar.Bands.BeginUpdate;
1785 // for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1786 for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
1787 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1788 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1789 FIsIgnoreResize := False;
1790 SaveCoolBarSettings;
1793 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1794 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1795 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1798 BrowserCoolBar.Bands.EndUpdate;
1806 procedure TGikoForm.FormShow(Sender: TObject);
1808 ShowWindow(Application.Handle, SW_HIDE);
1810 //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½
1811 //
\83c
\81[
\83\8b\83o
\81[
\95\
\8e¦
1812 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1813 StdToolBarVisibleActionExecute( nil );
1814 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1815 AddressBarVisibleActionExecute( nil );
1816 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1817 LinkBarVisibleActionExecute( nil );
1818 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1819 ListToolBarVisibleActionExecute( nil );
1820 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1821 ListNameBarVisibleActionExecute( nil );
1822 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1823 BrowserToolBarVisibleActionExecute( nil );
1824 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1825 BrowserNameBarVisibleActionExecute( nil );
1827 //
\83u
\83\89\83E
\83U
\83^
\83u
1828 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1829 BrowserTabVisibleActionExecute(nil);
1831 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1832 BrowserTabTopAction.Checked := True;
1833 BrowserTabTopActionExecute(nil);
1835 BrowserTabBottomAction.Checked := True;
1836 BrowserTabBottomActionExecute(nil);
1839 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1840 BrowserTabTabStyleAction.Checked := True;
1841 BrowserTabTabStyleActionExecute(nil);
1842 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1843 BrowserTabButtonStyleAction.Checked := True;
1844 BrowserTabButtonStyleActionExecute(nil);
1846 BrowserTabFlatStyleAction.Checked := True;
1847 BrowserTabFlatStyleActionExecute(nil);
1850 // CoolBar
\95\9c\8c³
1851 LoadCoolBarSettings;
1853 FIsIgnoreResize := False;
1856 //FormCrete
\82©
\82ç
\88Ú
\93®
\81B
1857 if GikoSys.Setting.TabAutoLoadSave then begin
1858 TabsOpenActionExecute(Sender);
1863 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1865 // if GikoForm.WindowState <> wsMinimized then
1866 // SaveCoolBarSettings;
1867 if ( GikoSys.Setting.ShowDialogForEnd ) and
1868 (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
1873 if GikoSys.Setting.TabAutoLoadSave then begin
1874 TabsSaveActionExecute(Sender);
1877 //Application.HookMainWindow(Hook);
1878 Application.UnhookMainWindow(Hook);
1879 Application.Terminate;
1882 procedure TGikoForm.FormDestroy(Sender: TObject);
1885 // CoolSet: TCoolSet;
1886 wp : TWindowPlacement;
1889 // Application.OnDeactivate := nil;
1890 // Self.OnDeactivate := nil;
1893 if GetActiveList is TBBS then begin
1894 for i := 0 to ListView.Columns.Count - 1 do
1895 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1896 end else if GetActiveList is TCategory then begin
1897 for i := 0 to ListView.Columns.Count - 1 do
1898 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1899 end else if GetActiveList is TBoard then begin
1900 for i := 0 to ListView.Columns.Count - 1 do
1901 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1906 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95Û
\91¶
1907 wp.length := sizeof(wp);
1908 GetWindowPlacement(Handle, @wp);
1909 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1910 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1911 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1912 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1913 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1915 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1916 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1917 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1918 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1919 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1920 if ArrangeAction.Checked then
1921 GikoSys.Setting.ListOrientation := gloVertical
1923 GikoSys.Setting.ListOrientation := gloHorizontal;
1924 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1929 //
\83\8c\83X
\95\
\8e¦
\94Í
\88Í
1930 if not GikoSys.Setting.ResRangeHold then
1931 GikoSys.Setting.ResRange := FResRangeMenuSelect;
1935 //
\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è
1936 //
\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¢
1938 //
\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
1940 if GikoForm.WindowState <> wsMinimized then
1941 SaveCoolBarSettings;
1944 GikoSys.Setting.WriteWindowSettingFile;
1945 GikoSys.Setting.WriteNameMailSettingFile;
1949 //
\82¨
\8bC
\82É
\93ü
\82è
\95Û
\91¶
1951 //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é
1952 FavoriteDM.WriteFavorite;
1958 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1959 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
1960 GikoSys.Setting.ShowDialogForAllTabClose := false;
1961 AllTabCloseAction.Execute;
1962 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
1966 LockWindowUpdate(Self.Handle);
1967 for i := FBrowsers.Count - 1 downto 0 do begin
1968 TWebBrowser(FBrowsers[i]).Free;
1971 FBrowsers.Capacity := 0;
1976 if BrowserNullTab <> nil then begin
1977 BrowserNullTab.Browser := nil; {*BrowserNullTab
\82ÌBrowser
\82Í
\90Ý
\8cv
\8e\9e\82É
\93\
\82è
\95t
\82¯
\82Ä
\82é
\93z
1978 *
\82È
\82Ì
\82Å
\82±
\82±
\82ÅFree
\82³
\82ê
\82é
\82Æ
\8d¢
\82é
\82Ì
\82Å
\82Í
\82¸
\82µ
\82Ä
\82µ
\82Ü
\82¤
\81B
1980 BrowserNullTab.Free;
1984 LockWindowUpdate(0);
1986 TreeView.Items.BeginUpdate;
1987 TreeView.Items.GetFirstNode.Free;
1988 TreeView.Items.Clear;
1989 TreeView.Items.EndUpdate;
1993 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\95Û
\91¶
1995 //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
1996 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
2000 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
\95Û
\91¶
2014 //
\8f\84\89ñ
\83\8a\83X
\83g
\95Û
\91¶&
\94j
\8aü
2016 RoundList.SaveRoundFile;
2030 FControlThread.Terminate;
2031 FControlThread.WaitFor;
2035 FControlThread.Free;
2038 // TBBS
\82Í
\95Û
\8e\9d\82µ
\82Ä
\82¢
\82é TCategory, TBoard, TThreadItem
\82·
\82×
\82Ä
\82ð
\8aJ
\95ú
\82·
\82é
2039 // 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Å
2040 // BoardPluteIns
\82Ì
\8aJ
\95ú
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ
2042 for i := Length( BBSs ) - 1 downto 0 do begin
2043 if BBSs[ i ] <> nil then
2051 for i := Length( BoardPlugIns ) - 1 downto 0 do begin
2052 if BoardPlugIns[ i ] <> nil then
2053 BoardPlugIns[ i ].Free;
2054 BoardPlugIns[ i ] := nil;
2060 if FEvent <> nil then
2064 if FHint <> nil then begin
2065 FHint.ReleaseHandle;
2070 if TPreviewBrowser <> nil then begin
2071 FPreviewBrowser.Free;
2072 FPreviewBrowser := nil;
2079 //
\83t
\83H
\81[
\83\80\83N
\83\8d\81[
\83Y
2080 procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
2083 //
\83L
\83\83\83r
\83l
\83b
\83g
\81~
\83{
\83^
\83\93\83N
\83\8a\83b
\83N
2084 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
2086 CabinetVisibleAction.Execute;
2087 // CabinetPanelVisible(false);
2090 //
\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
2091 procedure TGikoForm.SetBBSMenu;
2094 item : TBBSMenuItem;
2097 //
\83\81\83j
\83\85\81[
\82ð
\8dí
\8f\9c
2098 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
2100 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
2101 CabinetSelectPopupMenu.Items[ i ].Free;
2102 CabinetMenu.Items[ i ].Free;
2103 BBSSelectPopupMenu.Items[ i ].Free;
2109 //
\83\81\83j
\83\85\81[
\82ð
\90Ý
\92è
2110 for i := Length( BBSs ) - 1 downto 0 do begin
2112 item := TBBSMenuItem.Create( PopupMenu );
2113 item.Caption := BBSs[ i ].Title;
2114 item.Data := BBSs[ i ];
2115 item.OnClick := BBSMenuItemOnClick;
2116 CabinetSelectPopupMenu.Items.Insert( 0, item );
2117 item := TBBSMenuItem.Create( PopupMenu );
2118 item.Caption := BBSs[ i ].Title;
2119 item.Data := BBSs[ i ];
2120 item.OnClick := BBSMenuItemOnClick;
2121 CabinetMenu.Insert( 0, item );
2122 item := TBBSMenuItem.Create( PopupMenu );
2123 item.Caption := BBSs[ i ].Title;
2124 item.Data := BBSs[ i ];
2125 item.OnClick := BBSMenuItemOnClick;
2126 BBSSelectPopupMenu.Items.Insert( 0, Item );
2133 procedure TGikoForm.ReloadBBS;
2138 //
\83^
\83u
\83N
\83\8d\81[
\83Y
2139 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
2140 GikoSys.Setting.ShowDialogForAllTabClose := false;
2141 AllTabCloseAction.Execute;
2142 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
2144 SetContent(BrowserNullTab);
2145 //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
2146 TreeView.Items.Clear;
2150 for i := Length( BBSs ) - 1 downto 0 do begin
2151 if BBSs[ i ] <> nil then
2160 FTreeType := gttNone;
2162 GikoSys.ListBoardFile; //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\93Ç
\8d\9e
2164 // BBS
\83\81\83j
\83\85\81[
\82Ì
\8dX
\90V
2167 ShowBBSTree( BBSs[ 0 ] );
2169 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
2174 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
2175 FavoriteDM.WriteFavorite;
2177 FavoriteDM.ReadFavorite;
2183 //
\83{
\81[
\83h
\83c
\83\8a\81[
\90Ý
\92è
2184 procedure TGikoForm.SetBoardTreeNode(
2190 CategoryNode: TTreeNode;
2191 BoardNode: TTreeNode;
2192 Category: TCategory;
2195 //
\94Â
\83\8a\83X
\83g
\82Ì
\90Ý
\92è
2196 FActiveBBS := inBBS;
2197 TreeView.Items.BeginUpdate;
2198 TreeView.Items.Clear;
2200 if not inBBS.IsBoardFileRead then
2201 GikoSys.ReadBoardFile( inBBS );
2203 if SplashWindow <> nil then
2204 SplashWindow.ProgressBar.Max := inBBS.Count;
2208 //
\83L
\83\83\83r
\83l
\83b
\83g
\95\
\8e¦
\91O
\82É
\8dÄ
\83\
\81[
\83g
2209 if ( GikoSys.Setting.BBSSortIndex <> 0 ) or ( GikoSys.Setting.BBSSortOrder <> true ) then begin
2210 Sort.SortOrder := true;
2211 Sort.SortIndex := 0;
2212 Sort.SortNoFlag := true;
2213 inBBS.Sort(CategorySortProc);
2216 Root := TreeView.Items.Add( nil, inBBS.Title );
2217 Root.ImageIndex := ITEM_ICON_2CH1;
2218 Root.SelectedIndex := ITEM_ICON_2CH2;
2220 for i := 0 to inBBS.Count - 1 do begin
2221 Category := TCategory(inBBS.Items[i]);
2222 CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
2223 CategoryNode.Data := Category;
2224 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
2225 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
2227 //
\83L
\83\83\83r
\83l
\83b
\83g
\95\
\8e¦
\91O
\82É
\8dÄ
\83\
\81[
\83g
2228 if ( GikoSys.Setting.CategorySortIndex <> 0 ) or ( GikoSys.Setting.CategorySortOrder <> true ) then begin
2229 Sort.SortOrder := true;
2230 Sort.SortIndex := 0;
2231 Sort.SortNoFlag := true;
2232 Category.CustomSort(BoardSortProc);
2235 for j := 0 to Category.Count - 1 do begin
2236 Board := TBoard(Category.Items[j]);
2238 BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
2239 BoardNode.Data := Board;
2240 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
2241 if not Board.IsLogFile then begin
2242 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
2243 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
2245 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
2246 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
2247 for k := 0 to Board.Count - 1 do begin
2248 if Board.Items[ k ].IsLogFile then begin
2249 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
2250 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
2259 CategoryNode.Expanded := Category.NodeExpand;
2261 if SplashWindow <> nil then begin
2262 SplashWindow.ProgressBar.StepIt;
2263 Application.ProcessMessages;
2267 TreeView.Items.EndUpdate;
2271 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
2273 COLUMN: array[0..0] of string = ('
\83J
\83e
\83S
\83\8a\96¼');
2275 ListColumn: TListColumn;
2278 ListView.Items.BeginUpdate;
2280 Screen.Cursor := crHourGlass;
2282 ListView.Columns.Clear;
2283 for i := 0 to Length(COLUMN) - 1 do begin
2284 ListColumn := ListView.Columns.Add;
2285 ListColumn.Caption := COLUMN[i];
2286 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
2289 ListView.Items.Count := 0;
2290 ListView.Items.Clear;
2291 ListView.Items.Count := ABBS2ch.Count;
2293 // UpFolderAction.Enabled := False;
2294 // AllItemAction.Enabled := False;
2295 // LogItemAction.Enabled := False;
2296 // NewItemAction.Enabled := False;
2297 // SelectItemAction.Enabled := False;
2298 // ListDownloadToolButton.Enabled := False;
2299 // BoardReservToolButton.Enabled := False;
2300 // ListThreadDownloadToolButton.Enabled := False;
2302 ListNameLabel.Caption := ABBS2ch.Title;
2303 FolderImage.Picture := nil;
2304 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
2306 FSortIndex := GikoSys.Setting.BBSSortIndex;
2307 FSortOrder := GikoSys.Setting.BBSSortOrder;
2308 if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
2309 ListViewSort(nil, ListView.Column[FSortIndex]);
2311 Result := ABBS2ch.Count;
2313 Screen.Cursor := crDefault;
2314 ListView.Items.EndUpdate;
2318 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
2320 COLUMN: array[0..2] of string = ('
\94Â
\96¼', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e');
2322 ListColumn: TListColumn;
2325 ListView.Items.BeginUpdate;
2327 Screen.Cursor := crHourGlass;
2329 ListView.Columns.Clear;
2330 for i := 0 to Length(COLUMN) - 1 do begin
2331 ListColumn := ListView.Columns.Add;
2332 ListColumn.Caption := COLUMN[i];
2333 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
2336 ListView.Items.Count := 0;
2337 ListView.Items.Clear;
2338 ListView.Items.Count := Category.Count;
2340 // UpFolderAction.Enabled := True;
2341 // AllItemAction.Enabled := False;
2342 // LogItemAction.Enabled := False;
2343 // NewItemAction.Enabled := False;
2344 // SelectItemAction.Enabled := False;
2345 // ListDownloadToolButton.Enabled := False;
2346 // BoardReservToolButton.Enabled := False;
2347 // ListThreadDownloadToolButton.Enabled := False;
2349 ListNameLabel.Caption := Category.Title;
2350 FolderImage.Picture := nil;
2351 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2353 FSortIndex := GikoSys.Setting.CategorySortIndex;
2354 FSortOrder := GikoSys.Setting.CategorySortOrder;
2355 if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
2356 ListViewSort(nil, ListView.Column[FSortIndex]);
2358 Result := Category.Count;
2360 Screen.Cursor := crDefault;
2361 ListView.Items.EndUpdate;
2365 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2367 COLUMN: array[0..7] of string = ('
\83X
\83\8c\83b
\83h
\96¼', '
\83J
\83E
\83\93\83g', '
\8eæ
\93¾', '
\90V
\92\85',
2368 '
\96¢
\93Ç', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e', '
\83X
\83\8c\8dì
\90¬
\93ú
\8e\9e');
2369 COLUMN_NONACQUIREDCOUNT: string = '
\96¢
\8eæ
\93¾';
2370 COLUMN_ALIGNMENT: array[0..7] of TAlignment = (taLeftJustify, taRightJustify,
2371 taRightJustify, taRightJustify,
2372 taRightJustify, taLeftJustify,
2373 taLeftJustify, taLeftJustify);
2374 //No,
\83X
\83\8c\83b
\83h
\96¼,
\83J
\83E
\83\93\83g,
\8f\84\89ñ
\97\
\96ñ,
\8eæ
\93¾
\93ú
\8e\9e
2376 ListColumn: TListColumn;
2379 ListView.Items.BeginUpdate;
2381 Screen.Cursor := crHourGlass;
2383 //
\83`
\83\89\82Â
\82«
\96h
\8e~
\82Ì
\82½
\82ß
\81A
\95Ï
\8dX
\82³
\82ê
\82Ä
\82¢
\82é
\8fê
\8d\87\82Ì
\82Ý
2384 //
\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Ó
2385 if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2387 ListView.Columns.Clear;
2388 for i := 0 to Length(COLUMN) - 1 do begin
2389 ListColumn := ListView.Columns.Add;
2390 ListColumn.Caption := COLUMN[i];
2391 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2392 ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2395 if GikoSys.Setting.NonAcquiredCount then
2396 ListView.Columns[2].Caption := COLUMN_NONACQUIREDCOUNT
2398 ListView.Columns[2].Caption := COLUMN[2];
2400 ListView.Items.Count := 0;
2401 ListView.Items.Clear;
2403 case GikoForm.ViewType of
2404 gvtAll: ListView.Items.Count := Board.Count;
2405 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2406 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2407 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2410 ListNameLabel.Caption := Board.Title;
2411 FolderImage.Picture := nil;
2412 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2414 FSortIndex := GikoSys.Setting.BoardSortIndex;
2415 FSortOrder := GikoSys.Setting.BoardSortOrder;
2416 if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
2417 ListViewSort(nil, ListView.Column[FSortIndex]);
2419 Result := Board.Count;
2421 Screen.Cursor := crDefault;
2422 ListView.Items.EndUpdate;
2426 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2428 // FileName: string;
2429 // DateTime: TDateTime;
2432 Category: TCategory;
2434 ThreadItem: TThreadItem;
2436 ActivListObj : TObject;
2438 ActivListObj := ActiveList;
2439 if ActivListObj is TBBS then begin
2440 BBS := TBBS(ActivListObj);
2442 ListView.StateImages := nil;
2444 if BBS = nil then Exit;
2445 if BBS.Count <= 0 then Exit;
2446 if Item = nil then Exit;
2447 if Item.Index >= BBS.Count then Exit;
2448 if ListView.Items.Count = 0 then Exit;
2450 if not (BBS.Items[Item.index] is TCategory) then Exit;
2451 Category := TCategory(BBS.Items[Item.index]);
2453 if Category = nil then Exit;
2455 if ListNumberVisibleAction.Checked then
2456 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2458 Item.Caption := Category.Title;
2460 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2461 Item.Data := Category;
2462 end else if ActivListObj is TCategory then begin
2463 Category := TCategory(ActivListObj);
2465 ListView.StateImages := nil;
2467 if Category = nil then Exit;
2468 if Category.Count <= 0 then Exit;
2469 if Item = nil then Exit;
2470 if Item.Index >= Category.Count then Exit;
2471 if ListView.Items.Count = 0 then Exit;
2473 if not (Category.Items[Item.Index] is TBoard) then Exit;
2474 Board := TBoard(Category.Items[Item.Index]);
2476 if Board = nil then Exit;
2478 if ListNumberVisibleAction.Checked then
2479 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2481 Item.Caption := Board.Title;
2483 if Item.SubItems.Count <> 2 then begin
2484 Item.SubItems.Clear;
2485 Item.SubItems.Add('');
2486 Item.SubItems.Add('');
2489 Item.ImageIndex := ITEM_ICON_BOARD1;
2492 Item.SubItems[0] := Board.RoundName // '
\97\
\96ñ'
2494 Item.SubItems[0] := '';
2496 if Board.RoundDate = ZERO_DATE then begin
2497 Item.SubItems[1] := '';
2499 Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2501 end else if ActivListObj is TBoard then begin
2502 Board := TBoard(ActivListObj);
2504 if GikoSys.Setting.ListIconVisible then
2505 ListView.StateImages := StateIconImageList
2507 ListView.StateImages := nil;
2509 case GikoForm.ViewType of
2510 gvtAll: BoardCnt := Board.Count;
2511 gvtLog: BoardCnt := Board.GetLogThreadCount;
2512 gvtNew: BoardCnt := Board.GetNewThreadCount;
2513 gvtUser: BoardCnt := Board.GetUserThreadCount;
2518 // if Board = nil then Exit;
2519 if BoardCnt <= 0 then Exit;
2520 if Item = nil then Exit;
2521 if Item.Index > BoardCnt then Exit;
2522 if ListView.Items.Count = 0 then Exit;
2524 // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2527 case GikoForm.ViewType of
2528 gvtAll: if Item.Index >= Board.Count then Exit else
2529 ThreadItem := TThreadItem(Board.Items[Item.Index]);
2530 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2531 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2532 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2535 if ThreadItem = nil then Exit;
2537 // if ListNumberVisibleAction.Checked then
2538 // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2540 RepStr := ThreadItem.Title;
2541 RepStr := CustomStringReplace(RepStr, '<', '<' );
2542 RepStr := CustomStringReplace(RepStr, '>', '>' );
2543 RepStr := CustomStringReplace(RepStr, '"', '"' );
2544 RepStr := CustomStringReplace(RepStr, '&', '&' );
2545 //RepStr := StringReplace(RepStr, '
\81\97\81M', ',', [rfReplaceAll]);
2547 if Item.SubItems.Count <> 7 then begin
2548 Item.SubItems.Clear;
2549 Item.SubItems.Add('');
2550 Item.SubItems.Add('');
2551 Item.SubItems.Add('');
2552 Item.SubItems.Add('');
2553 Item.SubItems.Add('');
2554 Item.SubItems.Add('');
2555 Item.SubItems.Add('');
2558 if ListNumberVisibleAction.Checked then
2559 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2561 Item.Caption := RepStr;
2563 case ThreadItem.AgeSage of
2564 gasNone: Item.StateIndex := -1;
2565 gasNew: Item.StateIndex := 0;
2566 gasAge: Item.StateIndex := 1;
2567 gasSage: Item.StateIndex := 2;
2570 if ThreadItem.IsLogFile then begin
2571 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2572 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2573 if GikoSys.Setting.NonAcquiredCount then
2574 Item.SubItems[1] := IntToStr(ThreadItem.AllResCount - ThreadItem.Count)
2576 Item.SubItems[1] := IntToStr(ThreadItem.Count);
2577 if ThreadItem.NewResCount = 0 then
2578 Item.SubItems[2] := ''
2580 Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2581 Item.SubItems[3] := '';
2582 if ThreadItem.Round then
2583 Item.SubItems[4] := ThreadItem.RoundName
2585 Item.SubItems[4] := '';
2586 if ThreadItem.RoundDate = ZERO_DATE then begin
2587 Item.SubItems[5] := '';
2589 Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2590 if ThreadItem.NewArrival then
2591 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2592 if ThreadItem.CreateDate = ZERO_DATE then begin
2593 Item.SubItems[6] := '';
2595 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2598 Item.ImageIndex := ITEM_ICON_THREAD1;
2599 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2600 Item.SubItems[1] := '';
2601 Item.SubItems[2] := '';
2602 Item.SubItems[3] := '';
2603 Item.SubItems[4] := '';
2604 Item.SubItems[5] := '';
2605 if not GikoSys.Setting.CreationTimeLogs then
2606 if ThreadItem.CreateDate = ZERO_DATE then
2607 Item.SubItems[6] := ''
2609 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2613 Item.Data := ThreadItem;
2617 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2618 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2619 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2620 var Index: Integer);
2626 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2632 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2633 EndIndex: Integer; OldState, NewState: TItemStates);
2638 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2646 threadItem : TThreadItem;
2648 Protocol, Host, Path, Document, Port, Bookmark: string;
2653 ActiveFileName: string;
2659 if not( TObject(Sender) is TWebBrowser )then
2663 if (TWebBrowser(Sender) <> nil) and (not TWebBrowser(Sender).Busy) and (Assigned(TWebBrowser(Sender).Document)) then begin
2664 if LowerCase(OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset) <> 'shift_jis' then begin
2665 OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset := 'shift_jis';
2672 if PreviewTimer.Enabled then
2673 PreviewTimer.Enabled := False;
2674 Application.CancelHint;
2676 if GetActiveContent <> nil then
2677 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2679 ActiveFileName := '';
2681 FActiveContent := nil;
2685 StatusBar.Panels[1].Text := Text;
2687 if FHint <> nil then begin
2688 FHint.ReleaseHandle;
2691 if FPreviewBrowser <> nil then
2692 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2694 if not GikoSys.Setting.UnActivePopup then
2695 if not GikoForm.Active then
2698 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2699 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2702 Ext := AnsiLowerCase(ExtractFileExt(Text));
2703 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2704 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2705 if FPreviewBrowser = nil then begin
2706 FPreviewBrowser := TPreviewBrowser.Create(Self);
2707 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2708 TOleControl(FPreviewBrowser).Parent := nil;
2710 FPreviewBrowser.Navigate(BLANK_HTML);//
\91O
\89ñ
\82Ì
\83v
\83\8c\83r
\83\85\81[
\89æ
\91\9c\8fÁ
\8b\8e\97p
2711 FPreviewURL := Text;
2712 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2713 PreviewTimer.Enabled := True;
2714 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2715 if Pos('mailto:', Text) = 1 then begin
2716 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2717 //
\83M
\83R
\83i
\83r
\83X
\83\8c \83p
\81[
\83g3
\82Ì466
\8e\81\82É
\8a´
\8eÓ
2719 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2720 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2721 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2722 if (Assigned(e)) then begin
2723 tmp2 := ZenToHan(e.Get_outerText);
2724 if (GikoSys.IsNumeric(tmp2)) then begin
2725 //
\82\93\82Í
\83\8c\83X
\94Ô
\8d\86\82Á
\82Û
\82¢
\82Á
\82·
\81B
2726 wkIntSt := StrToInt(tmp2);
2727 wkIntTo := StrToInt(tmp2);
2728 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2729 FHint.PopupType := gptThread;
2730 SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False);
2732 FHint.PopupType := gptRaw;
2737 threadItem := GetActiveContent;
2738 if Pos('about:blank..', Text) = 1 then begin
2739 if AnsiPos('http://jbbs.shitaraba.com/', threadItem.URL) <> 0 then begin
2740 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2741 Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo);
2742 if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then
2743 buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo)
2744 else if( PathRec.FSt <> 0 ) then
2745 buf := IntToStr(PathRec.FSt);
2746 end else if AnsiPos('machi.to/bbs/', threadItem.URL) <> 0 then begin
2747 URL := threaditem.URL;
2748 buf := Copy(Text,AnsiPos('&st=',Text),Length(Text)-AnsiPos('&st=',Text) + 1);
2750 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2751 buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text));
2757 PathRec := Gikosys.Parse2chURL2(URL);
2758 if (PathRec.FNoParam) then begin
2762 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2763 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
2765 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
2767 URL := GikoSys.GetBrowsableThreadURL( URL );
2768 wkIntSt := PathRec.FSt;
2769 wkIntTo := PathRec.FTo;
2771 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2774 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2776 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2778 end else if wkIntSt > wkIntTo then begin
2783 //if wkIntSt = 0 then
2785 //if wkINtTo = 0 then
2787 //if PathRec.FFirst then
2789 if PathRec.FStBegin then
2791 if PathRec.FToEnd then
2794 //ATitle := ActiveFileName <> PathRec.FKey;
2795 if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
2800 threadItem := BBSsFindThreadFromURL( URL );
2802 if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
2803 board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
2804 if board <> nil then begin
2805 if not board.IsThreadDatRead then
2806 GikoSys.ReadSubjectFile( board );
2807 threadItem := board.FindThreadFromFileName( PathRec.FKey + '.dat' );
2811 if threadItem <> nil then begin
2812 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2813 FHint.PopupType := gptThread;
2814 SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2820 // ShowTextPopup(s);
2821 if FHint.PopupType = gptRaw then begin
2822 if FHint.Caption <> '' then
2825 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2831 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2834 //SysMenuApp: HMenu;
2836 FEnabledCloseButton := Enabled;
2837 SysMenu := GetSystemMenu(Handle, False);
2838 //SysMenuApp := GetSystemMenu(Application.Handle, False);
2840 if Enabled then begin
2841 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2842 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2844 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2845 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2848 DrawMenuBar(Handle);
2849 //DrawMenuBar(Application.Handle);
2852 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2853 var AllowChange: Boolean);
2855 //
\83\
\81[
\83g
\8f\87\82ð
\95Û
\91¶
\82·
\82é
\82æ
\82¤
\82É
\82µ
\82½
\82Ì
\82Å
\8dí
\8f\9c
2856 // if FTreeType = gtt2ch then
2857 // FSortIndex := -1;
2860 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2861 Shift: TShiftState);
2863 if GetActiveList is TBoard then begin
2864 if Key = VK_BACK then begin
2865 // UpFolderButtonClick(Sender);
2866 end else if Key = VK_SPACE then begin
2867 ListDoubleClick(Shift);
2868 end else if Key = VK_RETURN then begin
2871 end else begin // TBBS, TCategory
2872 if Key = VK_BACK then begin
2873 // UpFolderButtonClick(Sender);
2874 end else if Key = VK_SPACE then begin
2876 end else if Key = VK_RETURN then begin
2877 ListDoubleClick(Shift);
2882 function TGikoForm.GetHttpState: Boolean;
2884 Result := FHttpState;
2887 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2888 Column: TListColumn);
2892 wkCategory: TCategory;
2895 if FSortIndex = Column.Index then
2896 FSortOrder := not FSortOrder
2898 FSortOrder := False;
2899 ListViewSort(Sender, Column);
2902 procedure TGikoForm.ListViewSort(Sender: TObject; Column: TListColumn);
2906 wkCategory: TCategory;
2909 for i := 0 to ListView.Columns.Count - 1 do
2910 ListView.Column[i].ImageIndex := -1;
2912 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
2914 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
2916 Sort.SortNoFlag := ListNumberVisibleAction.Checked;
2918 //if TObject(TreeView.Selected.Data) is TBBS then begin
2919 if TObject( FActiveList ) is TBBS then begin
2920 //wkBBS := TBBS(TreeView.Selected.Data);
2921 wkBBS := TBBS( FActiveList );
2922 Sort.SortOrder := FSortOrder;
2923 Sort.SortIndex := Column.Index;
2924 GikoSys.Setting.BBSSortIndex := Column.Index;
2925 GikoSys.Setting.BBSSortOrder := FSortOrder;
2926 wkBBS.Sort(CategorySortProc);
2928 //end else if TObject(TreeView.Selected.Data) is TCategory then begin
2929 end else if TObject( FActiveList ) is TCategory then begin
2930 //wkCategory := TCategory(TreeView.Selected.Data);
2931 wkCategory := TCategory( FActiveList );
2932 Sort.SortOrder := FSortOrder;
2933 Sort.SortIndex := Column.Index;
2934 GikoSys.Setting.CategorySortIndex := Column.Index;
2935 GikoSys.Setting.CategorySortOrder := FSortOrder;
2936 wkCategory.CustomSort(BoardSortProc);
2938 //end else if TObject(TreeView.Selected.Data) is TBoard then begin
2939 end else if TObject( FActiveList ) is TBoard then begin
2940 //wkBoard := TBoard(TreeView.Selected.Data);
2941 wkBoard := TBoard( FActiveList );
2942 Sort.SortOrder := FSortOrder;
2943 Sort.SortIndex := Column.Index;
2944 Sort.SortNonAcquiredCountFlag := GikoSys.Setting.NonAcquiredCount;
2945 GikoSys.Setting.BoardSortIndex := Column.Index;
2946 GikoSys.Setting.BoardSortOrder := FSortOrder;
2947 wkBoard.CustomSort(ThreadItemSortProc);
2950 FSortIndex := Column.Index;
2953 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2954 Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean);
2958 DefaultDraw := True;
2960 DefaultDraw := False;
2961 if (cdsSelected in State) or (cdsHot in State) then begin
2962 Sender.Canvas.Brush.Color := clHighlight;
2963 Sender.Canvas.Font.Color := clHighlightText;
2965 Sender.Canvas.Brush.Color := clBtnFace;
2966 Sender.Canvas.Font.Color := clBtnText;
2968 ARect := Rect(Button.Left, Button.Top, Button.Left + Button.Width, Button.Top + Button.Height);
2969 Sender.Canvas.FillRect(ARect);
2970 DrawText(Sender.Canvas.Handle, PChar(Button.Caption), -1, ARect, DT_SINGLELINE or DT_VCENTER or DT_CENTER);
2973 function TGikoForm.GetTreeNode(Data: TObject): TTreeNode;
2978 Nodes := TreeView.Items;
2980 for i := 0 to Nodes.Count - 1 do begin
2981 if Nodes.Item[i].Data = Data then begin
2982 Result := Nodes.Item[i];
2989 procedure TGikoForm.BrowserBeforeNavigate2(Sender: TObject;
2990 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
2991 Headers: OleVariant; var Cancel: WordBool);
2996 kMenuName: string = 'menu:';
2999 if Pos(kMenuName, URL) <> 0 then begin
3000 sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
3002 if not GikoSys.IsNumeric(sNo) then Exit;
3006 KokoPopupMenu.Tag := StrToInt(sNo);
3007 KokoPopupMenu.Popup(p.x, p.y);
3008 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
3009 Cancel := not GikoSys.Setting.OpenMailer;
3014 procedure TGikoForm.ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
3015 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
3016 var DefaultDraw: Boolean);
3018 ThreadItem: TThreadItem;
3020 // TListView(Sender).Canvas.Font.Style := [];
3021 if TObject(Item.Data) is TThreadItem then begin
3022 ThreadItem := TThreadItem(Item.Data);
3023 if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
3024 ListView.Canvas.Brush.Color := FOddColor;
3026 ListView.Canvas.Brush.Color := FListViewBackGroundColor;
3028 // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
3029 if ThreadItem.UnRead then
3030 TListView(Sender).Canvas.Font.Style := [fsBold];
3034 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
3036 Application.ProcessMessages;
3037 if Application.Terminated then
3039 if PreviewTimer.Enabled then
3040 PreviewTimer.Enabled := False;
3041 //
\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
3042 if FHint <> nil then begin
3043 FHint.ReleaseHandle;
3048 if FPreviewBrowser <> nil then
3049 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
3053 procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
3054 const ARect: TRect; var DefaultDraw: Boolean);
3058 IsBoardNode: Boolean;
3064 Category: TCategory;
3068 DefaultDraw := True;
3070 if FTreeType = gttHistory then Exit;
3072 TreeView.Canvas.Font.Color := clBlue;
3073 IsBoardNode := False;
3074 for i := 0 to TreeView.Items.Count - 1 do begin
3076 if not TreeView.Items[i].IsVisible then
3079 if TObject(TreeView.Items[i].Data) is TCategory then begin
3080 if TreeView.Items[i].Expanded then
3083 IsBoardNode := False;
3084 Category := TCategory(TreeView.Items[i].Data);
3085 for j := 0 to Category.Count - 1 do begin
3086 Board := Category.Items[j];
3087 if Board <> nil then begin
3088 if Board.UnRead > 0 then begin
3096 end else if TObject(TreeView.Items[i].Data) is TBoard then begin
3097 IsBoardNode := True;
3098 Board := TBoard(TreeView.Items[i].Data);
3099 Cnt := Board.UnRead;
3105 Bitmap := TBitmap.Create;
3107 Bitmap.Canvas.Font.Assign(TreeView.Canvas.Font);
3108 Bitmap.Canvas.Font.Style := [fsBold];
3109 NodeWidth := Bitmap.Canvas.TextWidth(TreeView.Items[i].Text);
3114 NodeRect := TreeView.Items[i].DisplayRect(True);
3117 CntText := '(' + IntToStr(Cnt) + ')'
3118 else if Cnt = 1 then
3122 TextWidth := TreeView.Canvas.TextWidth(CntText);
3124 TextRect := Rect(NodeRect.Left + NodeWidth + 8,
3126 NodeRect.Left + NodeWidth + TextWidth + 8,
3128 DrawText(TreeView.Canvas.Handle,
3132 DT_SINGLELINE or DT_VCENTER);
3134 TreeViewCustomDrawItem(nil, nil, [], DefaultDraw);
3137 procedure TGikoForm.TreeViewCustomDrawItem(Sender: TCustomTreeView;
3138 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
3141 Category: TCategory;
3144 DefaultDraw := True;
3146 if FTreeType = gttHistory then Exit;
3148 TreeView.Canvas.Font.Style := [];
3149 if Node <> nil then begin
3150 if TObject(Node.Data) is TCategory then begin
3151 Category := TCategory(Node.Data);
3152 for i := 0 to Category.Count - 1 do begin
3153 Board := Category.Items[i];
3154 if Board <> nil then begin
3155 if Board.UnRead > 0 then begin
3156 TreeView.Canvas.Font.Style := [fsBold];
3161 end else if TObject(Node.Data) is TBoard then begin
3162 Board := TBoard(Node.Data);
3163 if Board.UnRead > 0 then
3164 TreeView.Canvas.Font.Style := [fsBold];
3169 procedure TGikoForm.TreeViewExpanded(Sender: TObject; Node: TTreeNode);
3171 TreeView.Invalidate;
3173 if TObject(Node.Data) is TBBS then begin
3174 TBBS(Node.Data).NodeExpand := True;
3175 end else if TObject(Node.Data) is TCategory then begin
3176 TCategory(Node.Data).NodeExpand := True;
3177 end else if TObject(Node.Data) is TBoard then begin
3178 TBoard(Node.Data).NodeExpand := True;
3182 {procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
3184 TreeSplitter.Visible := PanelVisible;
3185 CabinetPanel.Visible := PanelVisible;
3186 CabinetToolButton.Down := PanelVisible;
3189 procedure TGikoForm.ListViewAllSelect;
3195 procedure TGikoForm.TreeViewDblClick(Sender: TObject);
3200 GetCursorPos(APoint);
3201 APoint := TreeView.ScreenToClient(APoint);
3202 HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
3203 if not (htOnLabel in HitTest) then Exit;
3205 TreeDoubleClick( TreeView.Selected );
3208 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
3210 AddMessageList(Msg, nil, Icon);
3213 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
3217 boardPlugIn : TBoardPlugIn;
3221 if Item.DownType = gdtBoard then
3222 ATitle := Item.Board.Title
3224 ATitle := Item.ThreadItem.Title;
3226 ATitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j';
3228 if Item.State in [gdsComplete, gdsDiffComplete] then begin
3230 if Item.DownType = gdtBoard then begin
3233 AddMessageList(ATitle + ' [
\83X
\83\8c\88ê
\97\97\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3234 if GetActiveList = Item.Board then begin
3236 SetActiveList(Item.Board);
3238 Item.Board.Modified := True;
3239 Item.Board.IsThreadDatRead := True;
3241 end else if Item.DownType = gdtThread then begin
3244 Item.ThreadItem.NewArrival := True;
3245 if (Item.ThreadItem.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin
3246 boardPlugIn := Item.ThreadItem.BoardPlugIn;
3247 Item.ThreadItem.Title := GikoSys.DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 )).FTitle;
3248 ATitle := Item.ThreadItem.Title;
3249 end else if ATitle = '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j' then begin
3250 ATitle := GikoSys.DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1)).FTitle;
3252 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
3253 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then
3254 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
3256 if GikoSys.Setting.BrowserTabVisible then begin
3257 if GetActiveContent = Item.ThreadItem then
3258 InsertBrowserTab(Item.ThreadItem)
3259 else if (ListView.Selected <> nil ) and ( TObject(ListView.Selected.Data) is TThreadItem ) and ( Item.ThreadItem = TThreadItem(ListView.Selected.Data)) then
3260 InsertBrowserTab(Item.ThreadItem, True)
3262 InsertBrowserTab(Item.ThreadItem, False);
3264 if (GetActiveContent = Item.ThreadItem) or (FActiveContent = nil) or(FActiveContent.Browser = BrowserNullTab.Browser) then
3265 InsertBrowserTab(Item.ThreadItem);
3268 if Item.State = gdsComplete then begin
3270 AddMessageList(ATitle + ' [
\83X
\83\8c\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3272 PlaySound('NewDiff');
3273 AddMessageList(ATitle + ' [
\83X
\83\8c\8d·
\95ª
\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3276 //
\8f\84\89ñ
\82 \82è
\82Ì
\8fê
\8d\87\81\95\82P
\82O
\82O
\82O
\92´
\82Í
\8f\84\89ñ
\8dí
\8f\9c
3277 if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin
3278 Item.ThreadItem.Round := False;
3279 Item.ThreadItem.RoundName := '';
3280 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);
3286 end else if Item.State = gdsNotModify then begin
3288 { if (Item.DownType = gdtThread) and (AddHistory(Item.ThreadItem)) then begin
3289 //SetContent(Item.ThreadItem);
3290 InsertBrowserTab(Item.ThreadItem);
3292 AddMessageList(ATitle + ' [
\96¢
\8dX
\90V]', nil, gmiSAD);
3293 PlaySound('NoChange');
3294 Screen.Cursor := crDefault;
3295 end else if Item.State = gdsAbort then begin
3297 AddMessageList(ATitle + ' [
\92\86\92f]', nil, gmiSAD);
3298 end else if Item.State = gdsError then begin
3303 AddMessageList(ATitle + ' [
\83G
\83\89\81[(' + IntToStr(Item.ResponseCode) + s + ')]', nil, gmiNG);
3304 // if Item.ResponseCode = 302 then
3305 // 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);
3311 if FWorkCount < 0 then FWorkCount := 0;
3312 if FWorkCount = 0 then begin
3314 Animate.Active := False;
3316 Screen.Cursor := crDefault;
3323 procedure TGikoForm.WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
3325 // SetProgressValue(Number, 0, AWorkCountMax);
3326 // ProgressBar.Visible := True;
3327 ProgressBar.Position := 0;
3328 ProgressBar.Max := AWorkCountMax;
3329 FDownloadTitle := AWorkTitle;
3330 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ð
\8aJ
\8en
\82µ
\82Ü
\82·';
3331 FDownloadMax := AWorkCountMax;
3334 procedure TGikoForm.WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
3336 ProgressBar.Position := 0;
3337 if FDownloadMax <> 0 then
3338 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ª
\8a®
\97¹
\82µ
\82Ü
\82µ
\82½';
3341 procedure TGikoForm.Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
3343 ProgressBar.Position := AWorkCount;
3344 // SetProgressValue(Number, AWorkCount);
3345 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86 (' + IntToStr(AWorkCount) + '/' + IntToStr(FDownloadMax) + ')';
3349 procedure TGikoForm.SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
3351 Component: TComponent;
3353 Component := FindComponent('ProgressBar' + IntToStr(Number + 1));
3354 if Component <> nil then begin
3355 if not (Component is TProgressBar) then Exit;
3357 TProgressBar(Component).Max := Max;
3358 TProgressBar(Component).Position := Value;
3363 procedure TGikoForm.AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
3365 ListItem: TListItem;
3367 MessageListView.Items.BeginUpdate;
3369 ListItem := MessageListView.Items.Add;
3370 ListItem.Caption := ACaption;
3371 ListItem.Data := AObject;
3372 ListItem.MakeVisible(False);
3374 gmiOK: ListItem.ImageIndex := 0;
3375 gmiSAD: ListItem.ImageIndex := 1;
3376 gmiNG: ListItem.ImageIndex := 2;
3377 gmiWhat: ListItem.ImageIndex := 3;
3380 MessageListView.Items.EndUpdate;
3384 {procedure TGikoForm.BrowserTabChange(Sender: TObject);
3387 ThreadItem: TThreadItem;
3389 ThreadItem := GetActiveContent;
3390 if ThreadItem <> nil then begin
3391 SetContent(ThreadItem);
3395 procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
3399 favItem : TFavoriteThreadItem;
3400 newBrowser : TBrowserRecord;
3403 if Threaditem = nil then Exit;
3405 if ThreadItem.IsLogFile then begin
3406 //
\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é
3407 //
\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é
3408 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil) and
3409 (FActiveContent.FBrowser <> BrowserNullTab.Browser)then begin
3410 j := FBrowsers.IndexOf(FActiveContent.FBrowser);
3411 if j = BROWSER_COUNT - 1 then
3412 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3414 favItem := TFavoriteThreadItem.Create(ThreadItem.URL, ThreadItem.Title );
3415 if not AddHistory( favItem ) then
3418 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
3419 if TObject(BrowserTab.Tabs.Objects[i]) is TBrowserRecord then begin
3420 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
3421 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = nil then begin
3422 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3423 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
3424 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3425 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3426 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3427 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3432 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
3433 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
3434 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3436 if ActiveTab then begin
3437 BrowserTab.TabIndex := i;
3438 BrowserTab.OnChange(nil);
3445 idx := BrowserTab.TabIndex;
3446 if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin
3447 newBrowser := TBrowserRecord.Create;
3448 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3449 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
3450 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3451 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3452 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3453 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3458 newBrowser.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
3459 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3460 //newBrowser.Browser.Navigate(BLANK_HTML);
3461 newBrowser.thread := ThreadItem;
3462 newBrowser.Repaint := true;
3463 // newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes;
3465 BrowserTab.Tabs.InsertObject(0, GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser);
3466 if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 1) then begin
3467 DeleteTab( TBrowserRecord( BrowserTab.Tabs.Objects[ 1 ] ) );
3471 if ActiveTab then begin
3472 BrowserTab.TabIndex := 0;
3476 newBrowser := TBrowserRecord.Create;
3477 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3478 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
3479 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3480 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3481 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3482 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3487 newBrowser.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
3488 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3489 //newBrowser.Browser.Navigate(BLANK_HTML);
3490 newBrowser.thread := ThreadItem;
3491 // newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes;
3492 newBrowser.Repaint := true;
3494 i := BrowserTab.Tabs.AddObject(GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser);
3495 if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 1) then begin
3496 DeleteTab( TBrowserRecord( BrowserTab.Tabs.Objects[ 0 ] ) );
3500 if ActiveTab then begin
3501 if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 0) then
3502 BrowserTab.TabIndex := 0
3504 BrowserTab.TabIndex := i;
3507 if(ActiveTab) or (idx = -1) then begin
3508 BrowserTab.OnChange(nil);
3511 if BrowserNullTab = nil then begin
3512 BrowserNullTab := TBrowserRecord.Create;
3513 BrowserNullTab.Browser := Browser;
3515 BrowserNullTab.thread := ThreadItem;
3516 BrowserTab.TabIndex := -1;
3517 SetContent(BrowserNullTab);
3520 if GikoSys.Setting.URLDisplay then
3521 AddressComboBox.Text := ThreadItem.URL;
3525 procedure TGikoForm.SetContent(inThread : TBrowserRecord);
3530 // HtmlName: string;
3533 // OldCursor: TCursor;
3537 ThreadItem: TThreadItem;
3538 Thread: TBrowserRecord;
3539 ThreadTitle, ThreadPTitle: string;
3540 ThreadScrollTop: Integer;
3541 ThreadIsLog, ThreadUnRead, ThreadNewArraical: boolean;
3544 idx := BrowserTab.TabIndex;
3545 if (FActiveContent <> nil) and
3546 (FActiveContent.Thread <> Thread.Thread) and
3547 (Assigned(FActiveContent.Browser.Document)) then begin
3551 //Application.ProcessMessages;
3552 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document).Body).ScrollTop;
3553 //if FActiveContent.Browser <> BrowserNullTab.Browser then
3554 // TOleControl(FActiveContent.Browser).Visible := false;
3557 MsgBox(Handle, E.Message, 'SetContent[<-ScrollTop]', 0);
3562 if not (Assigned(Thread)) or (Thread.Thread = nil) then begin
3563 Thread.Browser.Navigate(BLANK_HTML);
3564 BrowserBoardNameLabel.Caption := '';
3565 ItemBoardImage.Picture := nil;
3566 BrowserNameLabel.Caption := '';
3567 ItemImage.Picture := nil;
3568 BrowserNullTab.Thread := nil;
3569 //TOleControl(BrowserNullTab.Browser).Visible := true;
3570 ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
3571 FActiveContent := nil;
3573 end else if Thread.Browser = nil then begin
3574 if FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then
3575 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3576 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
3577 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
3578 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser := nil;
3579 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent <> nil then begin
3580 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent.Free;
3581 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent := nil;
3586 Thread.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
3587 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3589 ThreadTitle := Thread.Thread.Title;
3590 ThreadPTitle := Thread.Thread.ParentBoard.Title;
3591 ThreadScrollTop := Thread.Thread.ScrollTop;
3592 ThreadIsLog := Thread.Thread.IsLogFile;
3593 ThreadItem := Thread.Thread;
3594 ThreadNewArraical := Thread.Thread.NewArrival;
3595 ThreadUnRead := Thread.Thread.UnRead;
3596 BBSID := ThreadItem.ParentBoard.BBSID;
3597 FileName := ThreadItem.FileName;
3599 if GetCapture = ListView.Handle then
3602 Screen.Cursor := crHourGlass;
3606 if ThreadItem.UnRead then begin
3607 ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
3608 if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0;
3611 // LockWindowUpdate(Self.Handle);
3612 if(FActiveContent <> nil) and (FActiveContent <> Thread) then begin
3613 if (FActiveContent.Browser <> BrowserNullTab.Browser) then
3614 ShowWindow(FActiveContent.Browser.Handle, SW_HIDE);
3616 ShowWindow(Thread.FBrowser.Handle, SW_SHOW);
3617 //LockWindowUpdate(0);
3618 if (not Assigned(Thread.Browser.Document)) then begin
3619 Thread.Browser.Navigate('about:blank');
3621 FActiveContent := Thread;
3622 while (Thread.Browser.ReadyState <> READYSTATE_COMPLETE) and
3623 (Thread.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3624 Application.ProcessMessages;
3625 if idx <> BrowserTab.TabIndex then begin
3629 if not ThreadIsLog then begin
3630 Self.Caption := CAPTION_NAME ;
3632 s := '<HTML><BODY><CENTER>
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Í
\8eæ
\93¾
\82µ
\82Ä
\82¢
\82Ü
\82¹
\82ñ</CENTER></BODY></HTML>';
3633 doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
3635 doc.charset := 'Shift_JIS';
3641 Self.Caption := CAPTION_NAME + ' - [' + ThreadTitle + ']';
3642 //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«
3643 //
\90V
\8bK
\82ÉThread
\82ð
\8aJ
\82¢
\82½
\82Æ
\82«
\82É
\90^
\82É
\82È
\82Á
\82Ä
\82¢
\82é
\81B
3644 // if(Thread.Repaint) or (Thread.OnlyHundred <> GikoSys.OnlyAHundredRes)then begin
3645 if Thread.Repaint then begin
3646 //Thread.LastSize := ThreadItem.Size;
3647 Thread.Repaint := false;
3649 Thread.Browser.OnStatusTextChange := nil;
3650 doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
3651 GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
3653 // if (Assigned(Thread.Browser)) and (Thread.Browser <> nil) then
3654 Thread.Browser.OnStatusTextChange := BrowserStatusTextChange;
3655 //
\82È
\82º
\82©
\82±
\82±
\82Å
\96¾
\8e¦
\93I
\82ÉDocumentComplete
\82ð
\8cÄ
\82Î
\82È
\82¢
\82Æ
\82¤
\82Ü
\82
\82¢
\82©
\82È
\82¢
3656 //
\92Ç
\8bL
\81@200406/19
3657 //Visible
\82Ì
\82Æ
\82«
\82µ
\82©DocumentComplete
\82Í
\8cÄ
\82Î
\82ê
\82È
\82¢
\82ç
\82µ
\82¢
3658 Thread.FBrowser.OnDocumentComplete(Thread.FBrowser, Thread.FBrowser.Parent, url);
3659 // Thread.OnlyHundred := GikoSys.OnlyAHundredRes;
3660 Application.ProcessMessages;
3661 //
\82±
\82±
\82ÅApplication.ProcessMessages
\82ð
\8cÄ
\82Ô
\82±
\82Æ
\82É
\82æ
\82Á
\82ÄWebBrowser
\82ð
\8dX
\90V
\82³
\82¹
\82é
\81B
3662 //
\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é
3663 //
\81@by
\82à
\82¶
\82ã(2004/01/20)
3665 //if (Assigned(Thread)) and (Assigned(ThreadItem))then begin
3666 if(Thread <> nil) and (ThreadItem <>nil) then begin
3667 if ThreadUnRead then
3668 BrowserMovement('new', Thread)
3669 else if ThreadScrollTop <> 0 then begin
3671 doc.Body.ScrollTop := ThreadScrollTop;
3674 MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
3679 FActiveContent := nil;
3684 FActiveContent := nil;
3689 // Application.ProcessMessages;
3692 ThreadItem.UnRead := False;
3695 if (Assigned(Thread)) and (Assigned(Thread.Thread)) and (Thread <> nil) and (ThreadItem <>nil) then begin
3696 //FActiveContent := Thread;
3698 BrowserBoardNameLabel.Caption := ThreadPTitle;
3699 ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
3700 BrowserNameLabel.Caption := ThreadTitle;
3701 ItemImage.Picture := nil;
3703 if ThreadNewArraical then
3704 ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap)
3706 ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap)
3708 ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap);
3710 ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;
3711 BrowserNameLabel.Left := ItemImage.Left + 20;
3713 FActiveContent := nil;
3716 Screen.Cursor := crDefault;
3720 function TGikoForm.GetActiveContent: TThreadItem;
3723 if( Assigned(FActiveContent) ) and (Assigned(FActiveContent.Thread))
3724 and (FActiveContent <> nil) and (FActiveContent.Thread <> nil) then
3725 Result := FActiveContent.Thread
3727 FActiveContent := nil;
3731 FActiveContent := nil;
3736 procedure TGikoForm.SetActiveList(Obj: TObject);
3741 // if FActiveList <> Obj then begin
3744 if ListView.Selected <> nil then
3745 idx := ListView.Selected.Index
3748 ListView.Items.Count := 0;
3749 ListView.Items.Clear;
3750 ListView.Selected := nil;
3751 // ListView.Columns.Clear;
3753 Self.Caption := CAPTION_NAME;
3754 //Application.Title := CAPTION_NAME;
3756 if Obj is TBBS then begin
3757 for i := 0 to ListView.Columns.Count - 1 do
3758 ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i];
3759 SetCategoryListItem(TBBS(Obj));
3760 end else if Obj is TCategory then begin
3761 for i := 0 to ListView.Columns.Count - 1 do
3762 ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i];
3763 SetBoardListItem(TCategory(Obj));
3764 end else if Obj is TBoard then begin
3765 SetThreadListItem(TBoard(Obj));
3768 if idx >= 0 then begin
3769 ListView.ItemIndex := idx;
3770 ListView.ItemFocused := ListView.Items.Item[ idx ];
3776 //
\81\9a\81\9a\83q
\83\8d\83\86\83L
\83\81\83\82
3777 //
\82»
\82Ì
\82¤
\82¿interface
\82ð
\8eg
\82¤
3778 function TGikoForm.GetActiveList: TObject;
3780 Result := FActiveList;
3783 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType);
3785 SetListViewType(AViewType, '', False);
3788 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
3792 if ActiveList is TBoard then begin
3793 Board := TBoard(ActiveList);
3795 Board.ParentCategory.ParenTBBS.SelectText := SelectText;
3796 Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
3797 // Board.SelectText := SelectText;
3798 // Board.KubetsuChk := KubetsuChk;
3799 ViewType := AViewType;
3800 SetActiveList(Board);
3801 SetThreadListItem(Board);
3805 procedure TGikoForm.ListViewCustomDraw(Sender: TCustomListView;
3806 const ARect: TRect; var DefaultDraw: Boolean);
3812 if ListView.Items.Count = 0 then begin
3813 DefaultDraw := True;
3815 ListView.Canvas.Brush.Color := ListView.Color;
3816 ListView.Canvas.FillRect(ARect);
3820 ListView.Canvas.Font.Color := clWindowText;
3821 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3824 ListView.Canvas.Font.Color := clBlue;
3825 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';
3828 ListView.Canvas.Font.Color := clGreen;
3829 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\90V
\92\85\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3832 ListView.Canvas.Font.Color := clNavy;
3833 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';
3834 if GetActiveList is TBoard then
3835 s := Format(s, [TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText]);
3843 p := Point((ListView.ClientWidth div 2) - (ListView.Canvas.TextWidth(s) div 2),
3844 (ListView.ClientHeight div 2) - (ListView.Canvas.TextHeight(s) div 2));
3845 ListView.Canvas.TextOut(p.X, p.Y, s);
3847 DefaultDraw := True;
3851 procedure TGikoForm.DownloadList(Board: TBoard; ForceDownload: Boolean = False);
3853 Item: TDownloadItem;
3855 if not Board.IsThreadDatRead then
3856 GikoSys.ReadSubjectFile(Board);
3857 Item := TDownloadItem.Create;
3859 Item.Board := Board;
3860 Item.DownType := gdtBoard;
3861 Item.ForceDownload := ForceDownload;
3862 // AbortToolButton.Enabled := True;
3863 // Animate.Active := True;
3864 // FDownload.Add(Item);
3865 FControlThread.AddItem(Item);
3866 // Animate.Active := False;
3867 // AbortToolButton.Enabled := False;
3868 if FWorkCount = 0 then begin
3870 Animate.Active := True;
3873 Screen.Cursor := crAppStart;
3881 procedure TGikoForm.DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
3883 Item: TDownloadItem;
3885 Item := TDownloadItem.Create;
3887 Item.ThreadItem := ThreadItem;
3888 Item.DownType := gdtThread;
3889 Item.ForceDownload := ForceDownload;
3890 // AbortToolButton.Enabled := True;
3891 // Animate.Active := True;
3892 // FDownload.Add(Item);
3893 FControlThread.AddItem(Item);
3894 // Animate.Active := False;
3895 // AbortToolButton.Enabled := False;
3896 if FWorkCount = 0 then begin
3898 Animate.Active := True;
3901 Screen.Cursor := crAppStart;
3909 procedure TGikoForm.PlaySound(SoundEventName: string);
3913 FileName := GikoSys.Setting.FindSoundFileName(SoundEventName);
3914 if FileExists(FileName) then begin
3915 if not sndPlaySound(PChar(FileName), SND_ASYNC or SND_NOSTOP) then begin
3916 sndPlaySound(nil, SND_SYNC);
3917 Application.ProcessMessages;
3919 sndPlaySound(PChar(FileName), SND_ASYNC);
3924 function TGikoForm.AddHistory( favItem : TFavoriteThreadItem ): Boolean;
3927 Item: TFavoriteThreadItem;
3931 // if (GetActiveContent = ThreadItem) and
3932 // (ThreadItem.Count <= ThreadItem.Kokomade) then
3934 // if GetActiveContent = ThreadItem then
3938 if FTreeType = gttHistory then
3939 TreeView.Selected := nil;
3941 for i := 0 to FHistoryList.Count - 1 do begin
3942 if TObject(FHistoryList[i]) is TFavoriteThreadItem then begin
3943 Item := TFavoriteThreadItem(FHistoryList[i]);
3944 if Item.URL = favItem.URL then begin
3945 // SetContent(ThreadItem);
3946 FHistoryList.Move(i, 0);
3947 if FTreeType = gttHistory then
3948 if TreeView.Items.GetFirstNode <> TreeView.Items[ i ] then
3949 TreeView.Items[ i ].MoveTo( TreeView.Items.GetFirstNode, naInsert );
3956 if FHistoryList.Count > 0 then
3957 FHistoryList.Insert( 0, favItem )
3959 FHistoryList.Add( favItem );
3960 // SetContent(ThreadItem);
3962 if FTreeType = gttHistory then begin
3963 Node := TreeView.Items.Add( nil, favItem.Title );
3964 Node.MoveTo( TreeView.Items.GetFirstNode, naInsert );
3966 if favItem.NewArrival then begin
3967 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3968 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3970 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3971 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3974 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
3975 //
\81¦favItem.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
3976 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3977 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3978 Node.Data := favItem;
3982 procedure TGikoForm.DeleteHistory( threadItem: TThreadItem );
3986 for i := 0 to FHistoryList.Count - 1 do begin
3987 if threadItem.URL = TFavoriteThreadItem( FHistoryList.Items[i] ).URL then begin
3988 TFavoriteThreadItem( FHistoryList.Items[ i ] ).Free;
3989 FHistoryList.Delete(i);
3990 FHistoryList.Capacity := FHistoryList.Count;
3996 procedure TGikoForm.ClearHistory;
4000 //FHistoryList.Clear;
4003 for i := FHistoryList.Count - 1 downto 0 do begin
4004 if TObject(FHistoryList[ i ]) is TFavoriteThreadItem then
4005 TFavoriteThreadItem(FHistoryList[ i ]).Free
4006 else if TObject(FHistoryList[ i ]) is TFavoriteBoardItem then
4007 TFavoriteBoardItem(FHistoryList[ i ]).Free;
4009 //FHistoryList.Delete(i);
4015 FHistoryList.Capacity := FHistoryList.Count;
4019 procedure TGikoForm.SaveHistory;
4022 saveList : TstringList;
4025 saveList := TStringList.Create;
4028 FHistoryList.Capacity := FHistoryList.Count;
4029 saveList.Add('<?xml version="1.0" encoding="Shift_JIS" standalone="yes"?>');
4030 saveList.Add('<address>');
4031 bound := FHistoryList.Count - 1;
4032 for i := bound downto 0 do begin
4033 // title
\82Í
\8d¡
\82Ì
\82Æ
\82±
\82ë
\8eg
\82Á
\82Ä
\82¢
\82È
\82¢
4035 '<history url="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).URL ) + '"' +
4036 ' title="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).Title ) + '"/>');
4038 saveList.Add('</address>');
4039 saveList.SaveToFile( GikoSys.GetConfigDir + 'History.xml' );
4046 procedure TGikoForm.LoadHistory;
4050 XMLDoc : IXMLDocument;
4052 HistoryNode : IXMLNode;
4054 favItem : TFavoriteThreadItem;
4057 fileName := GikoSys.GetConfigDir + 'History.xml';
4059 if FileExists( fileName ) then begin
4061 XMLDoc := IXMLDocument.Create;
4062 //XMLDoc := LoadXMLDocument(FileName);
4063 LoadXMLDocument(FileName, XMLDoc);
4065 XMLNode := XMLDoc.DocumentElement;
4067 if XMLNode.NodeName = 'address' then begin
4068 bound := XMLNode.ChildNodes.Count - 1;
4069 for i := 0 to bound do begin
4070 HistoryNode := XMLNode.ChildNodes[i];
4071 if HistoryNode.NodeName = 'history' then begin
4072 //if FReadCount >= sl.Count then begin
4073 s := Trim(HistoryNode.Attributes['url']);
4074 if s <> '' then begin
4075 favItem := TFavoriteThreadItem.Create(
4076 s, HistoryNode.Attributes[ 'title' ] );
4077 if not AddHistory( favItem ) then
4093 procedure TGikoForm.ShowBBSTreeOld(
4101 FavoriteTreeView.Visible := False;
4102 FavoriteToolBar.Hide;
4103 TreeView.Visible := True;
4105 b := CabinetSelectPopupMenu.Items.Count - 1;
4106 for i := 0 to b do begin
4107 item := CabinetSelectPopupMenu.Items[ i ];
4108 if item is TBBSMenuItem then begin
4109 if TBBSMenuItem( item ).Data = inBBS then begin
4110 item.Checked := True;
4111 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
4112 CabinetMenu.Items[ i ].Checked := True;
4113 GikoSys.Setting.CabinetIndex := i;
4117 item.Checked := False;
4118 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
4119 CabinetMenu.Items[ i ].Checked := False;
4121 CabinetSelectToolButton.Caption := inBBS.Title;
4123 CabinetHistoryAction.Checked := False;
4124 CabinetFavoriteAction.Checked := False;
4126 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
4127 FTreeType := gtt2ch;
4128 HistoryToolBar.Hide;
4129 SetBoardTreeNode( inBBS );
4130 TreeView.Items.GetFirstNode.Expanded := True; //?c???[?g?b?v???????J??
4131 //?c???[??g?b?v?????I????
4132 if GetActiveList = nil then
4133 TreeView.Selected := TreeView.Items[0]
4135 for i := 0 to TreeView.Items.Count - 1 do begin
4136 if TreeView.Items[i].Data = GetActiveList then begin
4137 TreeView.Selected := TreeView.Items[i];
4141 TreeView.Selected := TreeView.Items[0]
4149 procedure TGikoForm.ShowBBSTree(
4158 FavoriteTreeView.Visible := False;
4159 FavoriteToolBar.Hide;
4160 TreeView.Visible := True;
4162 b := CabinetSelectPopupMenu.Items.Count - 1;
4163 for i := 0 to b do begin
4164 item := CabinetSelectPopupMenu.Items[ i ];
4165 if item is TBBSMenuItem then begin
4166 if TBBSMenuItem( item ).Data = inBBS then begin
4167 item.Checked := True;
4168 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
4169 CabinetMenu.Items[ i ].Checked := True;
4170 GikoSys.Setting.CabinetIndex := i;
4174 item.Checked := False;
4175 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
4176 CabinetMenu.Items[ i ].Checked := False;
4178 CabinetSelectToolButton.Caption := inBBS.Title;
4180 CabinetHistoryAction.Checked := False;
4181 CabinetFavoriteAction.Checked := False;
4183 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
4184 FTreeType := gtt2ch;
4185 HistoryToolBar.Hide;
4186 SetBoardTreeNode( inBBS );
4187 TreeView.Items.GetFirstNode.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
4188 //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
4189 if GetActiveList = nil then begin
4191 TreeClick( TreeView.Items[0] );
4195 for i := 0 to TreeView.Items.Count - 1 do begin
4196 if TreeView.Items[i].Data = GetActiveList then begin
4197 TreeClick( TreeView.Items[i] );
4201 TreeClick( TreeView.Items[0] );
4209 procedure TGikoForm.ShowHistoryTree;
4214 if CabinetPanel.Visible then begin
4215 if FTreeType = gttHistory then begin
4216 CabinetVisible( False );
4217 CabinetHistoryAction.Checked := False;
4219 CabinetHistoryAction.Checked := True;
4222 CabinetVisible( True );
4223 CabinetHistoryAction.Checked := True;
4226 // BBS...BBS, History, Favorite
4227 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 2;
4229 FavoriteTreeView.Visible := False;
4230 TreeView.Visible := True;
4232 CabinetBBSAction.Checked := False;
4233 CabinetFavoriteAction.Checked := False;
4235 if FTreeType <> gttHistory then begin
4236 b := CabinetSelectPopupMenu.Items.Count - 1;
4237 for i := 0 to b do begin
4238 item := CabinetSelectPopupMenu.Items[ i ];
4239 if item is TBBSMenuItem then begin
4240 item.Checked := False;
4241 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
4242 CabinetMenu.Items[ i ].Checked := False;
4246 FTreeType := gttHistory;
4247 HistoryToolBar.Show;
4248 FavoriteToolBar.Hide;
4250 CabinetSelectToolButton.Caption := '
\97\9a\97ð
\83\8a\83X
\83g';
4254 procedure TGikoForm.SetHistoryTreeNode;
4258 Item: TFavoriteThreadItem;
4260 TreeView.Items.BeginUpdate;
4262 TreeView.Items.Clear;
4263 for i := 0 to FHistoryList.Count - 1 do begin
4264 Item := TFavoriteThreadItem(FHistoryList[i]);
4265 Node := TreeView.Items.Add(nil, Item.Title);
4267 if Item.Item.NewArrival then begin
4268 Node.ImageIndex := ITEM_ICON_THREADNEW1;
4269 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
4271 Node.ImageIndex := ITEM_ICON_THREADLOG1;
4272 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
4275 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
4276 //
\81¦Item.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
4277 Node.ImageIndex := ITEM_ICON_THREADLOG1;
4278 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
4282 TreeView.Items.EndUpdate;
4286 procedure TGikoForm.SelectTreeNode(Item: TObject; CallEvent: Boolean);
4288 ChangeEvent: TTVChangedEvent;
4289 ChangingEvent: TTVChangingEvent;
4293 if Item is TCategory then
4294 bbs := TCategory( Item ).ParenTBBS
4295 else if Item is TBoard then
4296 bbs := TBoard( Item ).ParentCategory.ParenTBBS
4300 if (FTreeType = gtt2ch) and (FActiveBBS = bbs) then begin
4302 ChangingEvent := nil;
4304 if not CallEvent then begin
4305 ChangeEvent := TreeView.OnChange;
4306 ChangingEvent := TreeView.OnChanging;
4309 if not CallEvent then begin
4310 TreeView.OnChange := nil;
4311 TreeView.OnChanging := nil;
4313 //Application.ProcessMessages;
4314 for i := 0 to TreeView.Items.Count - 1 do begin
4315 if TreeView.Items[i].Data = Item then begin
4316 TreeView.Items[i].Selected := True;
4318 TreeClick(TreeView.Items[i]);
4322 //Application.ProcessMessages;
4324 if not CallEvent then begin
4325 TreeView.OnChange := ChangeEvent;
4326 TreeView.OnChanging := ChangingEvent;
4330 if GetActiveList is TBBS then begin
4331 for i := 0 to ListView.Columns.Count - 1 do
4332 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
4333 end else if GetActiveList is TCategory then begin
4334 for i := 0 to ListView.Columns.Count - 1 do
4335 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
4336 end else if GetActiveList is TBoard then begin
4337 for i := 0 to ListView.Columns.Count - 1 do
4338 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
4341 if (Item is TBBS) or (Item is TCategory) then begin
4342 ListView.Columns.Clear;
4343 SetActiveList( Item );
4344 end else if Item is TBoard then begin
4345 if not TBoard( Item ).IsThreadDatRead then begin
4346 Screen.Cursor := crHourGlass;
4348 if not TBoard( Item ).IsThreadDatRead then
4349 GikoSys.ReadSubjectFile(TBoard( Item ));
4351 Screen.Cursor := crDefault;
4354 SetActiveList( Item );
4357 if Item is TBoard then begin // not TCategory
4358 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4359 if GikoSys.Setting.ListWidthState = glsMax then begin
4360 BrowserMinAction.Execute;
4361 if GikoForm.Visible then
4365 if GikoSys.Setting.ListHeightState = glsMax then begin
4366 BrowserMinAction.Execute;
4367 if GikoForm.Visible then
4375 procedure TGikoForm.ListViewMouseDown(Sender: TObject;
4376 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
4378 listItem : TListItem;
4379 threadItem : TThreadItem;
4385 if not (GetActiveList is TBoard) then Exit;
4386 listItem := ListView.GetItemAt( X, Y );
4387 if listItem = nil then Exit;
4388 if not (TObject(listItem.Data) is TThreadItem) then Exit;
4390 threadItem := TThreadItem(ListItem.Data);
4391 InsertBrowserTab(threadItem, False);
4392 if threadItem.IsLogFile then
4393 ListView.UpdateItems(listItem.Index, listItem.Index);
4397 //
\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Å
4398 if (ssDouble in Shift) then
4399 ListDoubleClick(Shift)
4404 { if ssDouble in Shift then begin
4405 DoubleClickOccurred[Button] := True;
4407 DoubleClickOccurred[Button] := False;
4408 t := GetTickCount+GetDoubleClickTime;
4409 while GetTickCount < t do begin
4410 Application.ProcessMessages;
4411 if DoubleClickOccurred[Button] then
4416 if ssDouble in Shift then begin
4418 mbLeft: ListDoubleClick;
4431 procedure TGikoForm.ListClick;
4433 ListItem: TListItem;
4434 ThreadItem: TThreadItem;
4436 if ListView.SelCount <> 1 then Exit;
4437 ListItem := ListView.Selected;
4438 if ListItem = nil then Exit;
4439 if not (TObject(ListItem.Data) is TThreadItem) then Exit;
4441 ThreadItem := TThreadItem(ListItem.Data);
4442 if ThreadItem.IsLogFile then begin
4443 // if AddHistory(ThreadItem) then
4444 // SetContent(ThreadItem);
4445 InsertBrowserTab(ThreadItem);
4446 ListView.UpdateItems(ListItem.Index, ListItem.Index);
4448 // SetContent(ThreadItem);
4449 InsertBrowserTab(ThreadItem);
4452 if GikoSys.Setting.BrowserAutoMaximize = gbmClick then begin
4453 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4454 if GikoSys.Setting.ListWidthState = glsMin then begin
4455 BrowserMaxAndFocusAction.Execute;
4458 if GikoSys.Setting.ListHeightState = glsMin then begin
4459 BrowserMaxAndFocusAction.Execute;
4465 procedure TGikoForm.ListDoubleClick(Shift: TShiftState);
4467 ThreadItem: TThreadItem;
4470 shiftDown := (ssShift in Shift);
4472 if ListView.Selected = nil then Exit;
4474 if TObject(ListView.Selected.Data) is TCategory then begin
4475 SelectTreeNode(ListView.Selected.Data, True);
4476 // TreeView.Selected.Expanded := True;
4477 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4478 //TreeViewChange(nil, TreeView.Selected);
4479 end else if TObject(ListView.Selected.Data) is TBoard 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 TThreadItem then begin
4485 //if TObject(ListView.Selected.Data) is TThreadItem then begin
4486 Application.ProcessMessages;
4487 ThreadItem := TThreadItem(ListView.Selected.Data);
4488 DownloadContent(ThreadItem, shiftDown);
4491 if GikoSys.Setting.BrowserAutoMaximize = gbmDoubleClick then begin
4492 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4493 if GikoSys.Setting.ListWidthState = glsMin then begin
4494 // BrowserMaxAndFocusAction.Execute;
4495 BrowserMaxAction.Execute;
4496 SetFocusForBrowserAction.Execute;
4499 if GikoSys.Setting.ListHeightState = glsMin then begin
4500 // BrowserMaxAndFocusAction.Execute;
4501 BrowserMaxAction.Execute;
4502 SetFocusForBrowserAction.Execute;
4508 procedure TGikoForm.BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord);
4513 activeBrower :TWebBrowser;
4515 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
4517 while (BrowserRecord.Browser.ReadyState <> READYSTATE_COMPLETE) and
4518 (BrowserRecord.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4519 Application.ProcessMessages;
4522 // Access Violation
\82ª
\8bN
\82«
\82é
\8e\96\82ª
\82 \82é
\82Ì
\82Å
\8d¡
\8cã
\97v
\83`
\83F
\83b
\83N
4523 if(BrowserRecord <> nil) and (BrowserRecord.FBrowser <> nil) then begin
4524 activeBrower := BrowserRecord.FBrowser;
4528 item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
4530 top := top + item.offsetTop;
4531 item := item.offsetParent;
4532 until AnsiCompareText(item.tagName, 'body' ) = 0;
4534 OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
4540 procedure TGikoForm.BrowserMovement(const AName: string);
4545 activeBrower :TWebBrowser;
4547 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
4549 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
4550 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4551 Application.ProcessMessages;
4554 // Access Violation
\82ª
\8bN
\82«
\82é
\8e\96\82ª
\82 \82é
\82Ì
\82Å
\8d¡
\8cã
\97v
\83`
\83F
\83b
\83N
4555 if(BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex >= 0) then begin
4556 activeBrower := FActiveContent.Browser;
4560 item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
4562 top := top + item.offsetTop;
4563 item := item.offsetParent;
4564 until AnsiCompareText(item.tagName, 'body' ) = 0;
4566 OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
4572 procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
4574 if TObject(Node.Data) is TBBS then begin
4575 TBBS(Node.Data).NodeExpand := False;
4576 end else if TObject(Node.Data) is TCategory then begin
4577 TCategory(Node.Data).NodeExpand := False;
4578 end else if TObject(Node.Data) is TBoard then begin
4579 TBoard(Node.Data).NodeExpand := False;
4583 procedure TGikoForm.MessageListViewResize(Sender: TObject);
4585 // MessageListView.Column[0].Width := MessageListView.ClientWidth - 16;
4588 procedure TGikoForm.SelectListItem(List: TList);
4590 // TmpTreeNode: TTreeNode;
4591 TmpListItem: TListItem;
4594 TmpListItem := ListView.Selected;
4595 while TmpListItem <> nil do begin
4596 List.Add(TmpListItem.Data);
4597 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
4602 procedure TGikoForm.ExitActionExecute(Sender: TObject);
4607 procedure TGikoForm.AllSelectActionExecute(Sender: TObject);
4612 procedure TGikoForm.StdToolBarVisibleActionExecute(Sender: TObject);
4614 CoolBand: TCoolBand;
4616 CoolBand := GetCoolBand(MainCoolBar, StdToolBar);
4617 if CoolBand = nil then
4619 GikoSys.Setting.StdToolBarVisible := StdToolBarVisibleAction.Checked;
4620 CoolBand.Visible := GikoSys.Setting.StdToolBarVisible;
4621 // StdToolBar.Visible := StdToolBarVisibleAction.Checked;
4622 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4624 //StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
4625 StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible;
4628 procedure TGikoForm.AddressBarVisibleActionExecute(Sender: TObject);
4630 CoolBand: TCoolBand;
4632 CoolBand := GetCoolBand(MainCoolBar, AddressToolBar);
4633 if CoolBand = nil then
4635 GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked;
4636 CoolBand.Visible := GikoSys.Setting.AddressBarVisible;
4637 //AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
4638 AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible;
4641 procedure TGikoForm.LinkBarVisibleActionExecute(Sender: TObject);
4643 CoolBand: TCoolBand;
4645 CoolBand := GetCoolBand(MainCoolBar, LinkToolBar);
4646 if CoolBand = nil then
4648 GikoSys.Setting.LinkBarVisible := LinkBarVisibleAction.Checked;
4649 CoolBand.Visible := GikoSys.Setting.LinkBarVisible;
4650 //LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
4651 LinkToolBarVisiblePMenu.Checked := GikoSys.Setting.LinkBarVisible;
4654 procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);
4656 CoolBand: TCoolBand;
4658 CoolBand := GetCoolBand(ListCoolBar, ListToolBar);
4659 if CoolBand = nil then
4661 CoolBand.Visible := ListToolBarVisibleAction.Checked;
4662 // ListToolBar.Visible := ListToolBarVisibleAction.Checked;
4663 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4664 GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;
4667 procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);
4669 CoolBand: TCoolBand;
4671 CoolBand := GetCoolBand(ListCoolBar, ListNameToolBar);
4672 if CoolBand = nil then
4674 CoolBand.Visible := ListNameBarVisibleAction.Checked;
4675 GikoSys.Setting.ListNameBarVisible := ListNameBarVisibleAction.Checked;
4678 procedure TGikoForm.BrowserToolBarVisibleActionExecute(Sender: TObject);
4680 CoolBand: TCoolBand;
4682 CoolBand := GetCoolBand(BrowserCoolBar, BrowserToolBar);
4683 if CoolBand = nil then
4685 CoolBand.Visible := BrowserToolBarVisibleAction.Checked;
4686 // BrowserToolBar.Visible := BrowserToolBarVisibleAction.Checked;
4687 GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;
4690 procedure TGikoForm.BrowserNameBarVisibleActionExecute(Sender: TObject);
4692 CoolBand: TCoolBand;
4694 CoolBand := GetCoolBand(BrowserCoolBar, BrowserNameToolBar);
4695 if CoolBand = nil then
4697 CoolBand.Visible := BrowserNameBarVisibleAction.Checked;
4698 GikoSys.Setting.BrowserNameBarVisible := BrowserNameBarVisibleAction.Checked;
4701 procedure TGikoForm.MsgBarVisibleActionExecute(Sender: TObject);
4703 MessageSplitter.Visible := MsgBarVisibleAction.Checked;
4704 MessagePanel.Top := MessageSplitter.Top + MessageSplitter.Height;
4705 MessageSplitter.Top := MessagePanel.Top + 1;
4706 MessagePanel.Visible := MsgBarVisibleAction.Checked;
4707 GikoSys.Setting.MessageBarVisible := MsgBarVisibleAction.Checked;
4710 procedure TGikoForm.StatusBarVisibleActionExecute(Sender: TObject);
4712 StatusBar.Visible := StatusBarVisibleAction.Checked;
4713 GikoSys.Setting.StatusBarVisible := StatusBarVisibleAction.Checked;
4716 procedure TGikoForm.IconStyleExecute(Sender: TObject);
4718 case ListView.ViewStyle of
4719 vsIcon: SmallIconAction.Execute;
4720 vsSmallIcon: ListIconAction.Execute;
4721 vsList: DetailIconAction.Execute;
4722 vsReport: LargeIconAction.Execute;
4726 procedure TGikoForm.LargeIconActionExecute(Sender: TObject);
4728 ListView.ViewStyle := vsIcon;
4729 LargeIconAction.Checked := True;
4732 procedure TGikoForm.SmallIconActionExecute(Sender: TObject);
4734 ListView.ViewStyle := vsSmallIcon;
4735 SmallIconAction.Checked := True;
4738 procedure TGikoForm.ListIconActionExecute(Sender: TObject);
4740 ListView.ViewStyle := vsList;
4741 ListIconAction.Checked := True;
4744 procedure TGikoForm.DetailIconActionExecute(Sender: TObject);
4746 ListView.ViewStyle := vsReport;
4747 DetailIconAction.Checked := True;
4750 procedure TGikoForm.SearchActionExecute(Sender: TObject);
4755 if FSearchDialog = nil then begin
4756 if (GikoForm.GetActiveList is TCategory) or (GikoForm.GetActiveList is TBoard) then
4757 chk := GikoForm.GetActiveList
4761 FSearchDialog := TSearchDialog.Create(Self, chk);
4762 FSearchDialog.SearchComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
4772 procedure TGikoForm.OptionActionExecute(Sender: TObject);
4776 Dlg := TOptionDialog.Create(Self);
4784 procedure TGikoForm.GikoNaviWebPageActionExecute(Sender: TObject);
4786 URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
4788 GikoSys.OpenBrowser(URL_GIKONAVI, gbtAuto);
4791 procedure TGikoForm.MonazillaWebPageActionExecute(Sender: TObject);
4793 URL_MONAZILLA: string = 'http://www.monazilla.org/';
4795 GikoSys.OpenBrowser(URL_MONAZILLA, gbtAuto);
4798 procedure TGikoForm.BBS2chWebPageActionExecute(Sender: TObject);
4800 URL_2ch: string = 'http://www.2ch.net/';
4802 GikoSys.OpenBrowser(URL_2ch, gbtAuto);
4805 procedure TGikoForm.GikoFolderOpenActionExecute(Sender: TObject);
4807 // GikoSys.OpenBrowser(GikoSys.GetAppDir, gbtIE);
4808 GikoSys.CreateProcess('explorer.exe', '/e,"' + GikoSys.GetAppDir + '"');
4811 procedure TGikoForm.AboutActionExecute(Sender: TObject);
4815 Dlg := TAboutDialog.Create(Self);
4823 procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject);
4828 procedure TGikoForm.CabinetVisible( isVisible : Boolean );
4830 TreeSplitter.Visible := isVisible;
4831 CabinetPanel.Visible := isVisible;
4832 CabinetVisibleAction.Checked := isVisible;
4835 procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject);
4838 gttHistory: CabinetHistoryAction.Execute;
4839 gttFavorite: CabinetFavoriteAction.Execute;
4841 CabinetBBSAction.Execute;
4845 procedure TGikoForm.AllItemActionExecute(Sender: TObject);
4848 if ViewType <> gvtAll then
4849 SetListViewType(gvtAll);
4850 GikoSys.Setting.ThreadRange := gtrAll;
4851 AllItemAction.Checked := True;
4852 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4854 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4855 if SelectComboBox.Parent <> nil then begin
4856 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4857 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4864 procedure TGikoForm.LogItemActionExecute(Sender: TObject);
4867 if ViewType <> gvtLog then
4868 SetListViewType(gvtLog);
4869 GikoSys.Setting.ThreadRange := gtrLog;
4870 LogItemAction.Checked := True;
4871 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4873 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4874 if SelectComboBox.Parent <> nil then begin
4875 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4876 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4883 procedure TGikoForm.NewItemActionExecute(Sender: TObject);
4887 if ViewType <> gvtNew then
4888 SetListViewType(gvtNew);
4889 GikoSys.Setting.ThreadRange := gtrNew;
4890 NewItemAction.Checked := True;
4891 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4893 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4894 if SelectComboBox.Parent <> nil then begin
4895 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4896 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4903 procedure TGikoForm.SelectItemActionExecute(Sender: TObject);
4906 Dlg: TListSelectDialog;
4909 if SelectComboBox.Parent <> nil then begin
4910 if SelectComboBox.Left + SelectComboBox.Width < ListToolBar.Width then begin
4911 // SelectComboBox
\82ª
\82 \82é
\8fê
\8d\87\82Í
\83t
\83H
\81[
\83J
\83X
\82ð
\88Ú
\82·
4912 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4913 if GikoSys.Setting.ListWidthState = glsMax then
4914 BrowserMinAction.Execute;
4916 if GikoSys.Setting.ListHeightState = glsMax then
4917 BrowserMinAction.Execute;
4919 SelectComboBox.SetFocus;
4926 if SelectComboBox.Text = SELECTCOMBOBOX_NAME then begin
4927 SelectComboBox.Text := '';
4928 SelectComboBox.Color := clWindow;
4931 AllItemAction.Checked := False;
4932 LogItemAction.Checked := False;
4933 NewItemAction.Checked := False;
4934 //SelectItemAction.Checked := True;
4936 Dlg := TListSelectDialog.Create(Self);
4938 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
4939 Dlg.SelectComboBox.Text := SelectComboBox.Text;
4941 if Dlg.ModalResult = mrCancel then begin
4942 if Length( SelectComboBox.Text ) = 0 then begin
4943 AllItemAction.Checked := True;
4944 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4945 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4948 if GetActiveList is TBoard then
4949 SetListViewType(gvtUser, TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText , Dlg.KubetsuCheckBox.Checked);
4951 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
4953 GikoSys.Setting.SelectTextList.Delete(idx);
4954 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
4955 while Dlg.SelectComboBox.Items.Count > 100 do begin
4956 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
4959 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
4960 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4961 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4963 SelectComboBox.Text := Dlg.SelectComboBox.Text;
4964 SelectComboBox.Color := clWindow;
4966 SetListViewType(gvtUser, Dlg.SelectComboBox.Text, Dlg.KubetsuCheckBox.Checked);
4973 procedure TGikoForm.ListNumberVisibleActionExecute(Sender: TObject);
4975 GikoSys.Setting.ListViewNo := ListNumberVisibleAction.Checked;
4979 procedure TGikoForm.UpFolderActionExecute(Sender: TObject);
4981 if GetActiveList is TBoard then begin
4982 // if FTreeType = gtt2ch then
4983 SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
4984 //SetActiveList(TBoard(GetActiveList).ParentCategory);
4985 end else if GetActiveList is TCategory then begin
4986 // if FTreeType = gtt2ch then
4987 SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);
4988 //SetActiveList(TCategory(GetActiveList).ParenTBBS);
4990 // if TreeView.Selected = nil then Exit;
4991 // if TreeView.Selected.Level = 0 then Exit;
4992 // TreeView.Selected.Parent.Selected := True;
4995 procedure TGikoForm.RoundActionExecute(Sender: TObject);
4999 Dlg := TRoundDialog.Create(Self);
5007 procedure TGikoForm.StopActionExecute(Sender: TObject);
5009 FControlThread.DownloadAbort;
5010 if FWorkCount <> 0 then FWorkCount := 0;
5012 Animate.Active := False;
5015 Screen.Cursor := crDefault;
5018 procedure TGikoForm.MsgBarCloseActionExecute(Sender: TObject);
5020 // MessagePanel.Visible := False;
5021 // MessageSplitter.Visible := False;
5022 // MsgBarVisibleAction.Checked := False;
5023 MsgBarVisibleAction.Execute;
5026 procedure TGikoForm.BrowserMaxActionExecute(Sender: TObject);
5028 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5029 case GikoSys.Setting.ListWidthState of
5031 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
5032 ViewPanel.Width := FBrowserSizeWidth;
5033 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5034 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5035 GikoSys.Setting.ListWidthState := glsNormal;
5037 glsMin, glsNormal: begin
5038 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
5039 if GikoSys.Setting.ListWidthState = glsNormal then
5040 FBrowserSizeWidth := ViewPanel.Width;
5041 ViewPanel.Width := 1;
5042 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5043 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5044 GikoSys.Setting.ListWidthState := glsMax;
5048 case GikoSys.Setting.ListHeightState of
5050 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
5051 ViewPanel.Height := FBrowserSizeHeight;
5052 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5053 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5054 GikoSys.Setting.ListHeightState := glsNormal;
5056 glsMin, glsNormal: begin
5057 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
5058 if GikoSys.Setting.ListHeightState = glsNormal then
5059 FBrowserSizeHeight := ViewPanel.Height;
5060 ViewPanel.Height := 1;
5061 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5062 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5063 GikoSys.Setting.ListHeightState := glsMax;
5067 // Mouse.CursorPos := BrowserSizeButton.ClientToScreen(Point(
5068 // System.Round(BrowserToolBar.ButtonWidth div 2),
5069 // System.Round(BrowserToolBar.ButtonHeight div 2)));
5070 //BrowserTab.OnChange(nil);
5073 procedure TGikoForm.BrowserMinActionExecute(Sender: TObject);
5076 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5077 case GikoSys.Setting.ListWidthState of
5078 glsMax, glsNormal: begin
5079 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5080 if GikoSys.Setting.ListWidthState = glsNormal then
5081 FBrowserSizeWidth := ViewPanel.Width;
5082 ViewPanel.Width := ThreadMainPanel.Width - 80;
5083 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5084 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5085 GikoSys.Setting.ListWidthState := glsMin;
5088 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
5089 ViewPanel.Width := FBrowserSizeWidth;
5090 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5091 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5092 GikoSys.Setting.ListWidthState := glsNormal;
5096 case GikoSys.Setting.ListHeightState of
5097 glsMax, glsNormal: begin
5098 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5099 if GikoSys.Setting.ListHeightState = glsNormal then
5100 FBrowserSizeHeight := ViewPanel.Height;
5101 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
5102 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5103 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5104 GikoSys.Setting.ListHeightState := glsMin;
5107 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
5108 ViewPanel.Height := FBrowserSizeHeight;
5109 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5110 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5111 GikoSys.Setting.ListHeightState := glsNormal;
5117 procedure TGikoForm.ScrollTopActionExecute(Sender: TObject);
5119 BrowserMovement('top');
5122 procedure TGikoForm.ScrollLastActionExecute(Sender: TObject);
5124 BrowserMovement('bottom');
5127 procedure TGikoForm.ScrollNewActionExecute(Sender: TObject);
5129 BrowserMovement('new');
5132 procedure TGikoForm.ScrollKokoActionExecute(Sender: TObject);
5134 BrowserMovement('koko');
5137 procedure TGikoForm.EditorActionExecute(Sender: TObject);
5139 Editor: TEditorForm;
5143 Item := GetActiveContent;
5144 if Item = nil then Exit;
5145 Editor := TEditorForm.Create(Self);
5146 Editor.SetThreadItem(Item);
5147 GikoSys.LoadEditorKeySetting(Editor.ActionList);
5149 Editor.BodyEdit.SetFocus;
5152 procedure TGikoForm.IEActionExecute(Sender: TObject);
5154 ShowThreadAction.Execute;
5157 procedure TGikoForm.ShowThreadActionExecute(Sender: TObject);
5159 ThreadItem: TThreadItem;
5161 ThreadItem := GetActiveContent;
5162 if ThreadItem = nil then Exit;
5163 GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
5166 procedure TGikoForm.ShowBoardActionExecute(Sender: TObject);
5168 ThreadItem: TThreadItem;
5170 ThreadItem := GetActiveContent;
5171 if ThreadItem = nil then Exit;
5172 GikoSys.OpenBrowser(ThreadItem.ParentBoard.URL, gbtAuto);
5175 //(Thread)URL
\82ð
\83R
\83s
\81[
5176 procedure TGikoForm.URLCopyActionExecute(Sender: TObject);
5181 if TObject(GetActiveContent) is TBoard then
5182 s := s + TBoard(GetActiveContent).URL + #13#10
5183 else if TObject(GetActiveContent) is TThreadItem then
5184 s := s + TThreadItem(GetActiveContent).URL + #13#10;
5186 Clipboard.AsText := s;
5189 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ð
\83R
\83s
\81[
5190 procedure TGikoForm.NameCopyActionExecute(Sender: TObject);
5195 if TObject(GetActiveContent) is TBoard then
5196 s := s + TBoard(GetActiveContent).Title + #13#10
5197 else if TObject(GetActiveContent) is TThreadItem then
5198 s := s + TThreadItem(GetActiveContent).Title + #13#10;
5200 Clipboard.AsText := s;
5203 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ÆURL
\82ð
\83R
\83s
\81[
5204 procedure TGikoForm.NameURLCopyActionExecute(Sender: TObject);
5209 if TObject(GetActiveContent) is TBoard then
5210 s := s + TBoard(GetActiveContent).Title + #13#10 + TBoard(GetActiveContent).URL + #13#10
5211 else if TObject(GetActiveContent) is TThreadItem then
5212 s := s + TThreadItem(GetActiveContent).Title + #13#10 + TThreadItem(GetActiveContent).URL + #13#10;
5214 Clipboard.AsText := s;
5217 procedure TGikoForm.ItemReloadActionExecute(Sender: TObject);
5219 ThreadItem: TThreadItem;
5222 ThreadItem := GetActiveContent;
5223 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5224 if ThreadItem <> nil then
5225 DownloadContent(ThreadItem, shiftDown);
5228 procedure TGikoForm.SelectListReloadActionExecute(Sender: TObject);
5235 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5236 if GetActiveList is TCategory then begin
5237 List := TList.Create;
5239 SelectListItem(List);
5240 if List.Count > 5 then begin
5241 msg := '5
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
5242 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
5243 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
5246 for i := 0 to List.Count - 1 do begin
5247 if TObject(List[i]) is TBoard then
5248 DownloadList(TBoard(List[i]), shiftDown);
5253 end else if GetActiveList is TBoard then begin
5254 DownloadList(TBoard(GetActiveList), shiftDown);
5258 procedure TGikoForm.SelectThreadReloadActionExecute(Sender: TObject);
5265 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5266 List := TList.Create;
5268 SelectListItem(List);
5269 if List.Count > 10 then begin
5270 msg := '10
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
5271 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
5272 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
5275 for i := 0 to List.Count - 1 do begin
5276 if TObject(List[i]) is TThreadItem then
5277 DownloadContent(TThreadItem(List[i]), shiftDown);
5284 procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);
5286 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
5287 SelectListReloadAction.Enabled := True
5288 else if GetActiveList is TBoard then
5289 SelectListReloadAction.Enabled := True
5291 SelectListReloadAction.Enabled := False;
5294 procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);
5296 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5297 SelectThreadReloadAction.Enabled := True
5299 SelectThreadReloadAction.Enabled := False;
5302 procedure TGikoForm.AllItemActionUpdate(Sender: TObject);
5304 AllItemAction.Enabled := (GetActiveList is TBoard);
5307 procedure TGikoForm.LogItemActionUpdate(Sender: TObject);
5309 LogItemAction.Enabled := (GetActiveList is TBoard);
5312 procedure TGikoForm.NewItemActionUpdate(Sender: TObject);
5314 NewItemAction.Enabled := (GetActiveList is TBoard);
5317 procedure TGikoForm.SelectItemActionUpdate(Sender: TObject);
5319 SelectItemAction.Enabled := (GetActiveList is TBoard);
5322 procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
5324 UpFolderAction.Enabled := not (GetActiveList is TBBS);
5327 procedure TGikoForm.ThreadEditorActionUpdate(Sender: TObject);
5329 ThreadEditorAction.Enabled := (GetActiveList is TBoard);
5332 procedure TGikoForm.FormResize(Sender: TObject);
5336 MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
5337 MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
5339 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5340 if GikoSys.Setting.ListWidthState = glsMin then begin
5341 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5342 ViewPanel.Width := ThreadMainPanel.Width - 80;
5345 if GikoSys.Setting.ListHeightState = glsMin then begin
5346 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5347 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
5351 if FIsMinimize = mtMinimized then begin
5352 if FActiveContent <> nil then begin
5353 //Application.ProcessMessages;
5354 doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
5355 doc.Body.ScrollTop := FActiveContent.Thread.ScrollTop;
5356 FIsMinimize := mtNone;
5360 FIsIgnoreResize := True;
5361 PostMessage( Handle, USER_RESIZED, 0, 0 );
5364 procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject);
5366 ScrollTopAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5369 procedure TGikoForm.ScrollLastActionUpdate(Sender: TObject);
5371 ScrollLastAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5374 procedure TGikoForm.ScrollNewActionUpdate(Sender: TObject);
5376 ScrollNewAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5379 procedure TGikoForm.ScrollKokoActionUpdate(Sender: TObject);
5381 ScrollKokoAction.Enabled := (GetActiveContent <> nil)
5382 and (GetActiveContent.IsLogFile)
5383 and (GetActiveContent.Kokomade <> -1);
5387 procedure TGikoForm.EditorActionUpdate(Sender: TObject);
5389 EditorAction.Enabled := GetActiveContent <> nil;
5392 procedure TGikoForm.IEActionUpdate(Sender: TObject);
5394 IEAction.Enabled := GetActiveContent <> nil;
5397 procedure TGikoForm.ShowThreadActionUpdate(Sender: TObject);
5399 ShowThreadAction.Enabled := GetActiveContent <> nil;
5402 procedure TGikoForm.ShowBoardActionUpdate(Sender: TObject);
5404 ShowBoardAction.Enabled := GetActiveContent <> nil;
5407 procedure TGikoForm.ItemReloadActionUpdate(Sender: TObject);
5409 ItemReloadAction.Enabled := GetActiveContent <> nil;
5412 procedure TGikoForm.URLCopyActionUpdate(Sender: TObject);
5414 URLCopyAction.Enabled := GetActiveContent <> nil;
5417 procedure TGikoForm.NameCopyActionUpdate(Sender: TObject);
5419 NameCopyAction.Enabled := GetActiveContent <> nil;
5422 procedure TGikoForm.NameURLCopyActionUpdate(Sender: TObject);
5424 NameURLCopyAction.Enabled := GetActiveContent <> nil;
5427 procedure TGikoForm.BrowserTabCloseActionUpdate(Sender: TObject);
5429 BrowserTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 0);
5432 procedure TGikoForm.NotSelectTabCloseActionUpdate(Sender: TObject);
5434 NotSelectTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 1);
5437 procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
5439 AllTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 0);
5442 procedure TGikoForm.ActiveLogDeleteActionUpdate(Sender: TObject);
5444 ActiveLogDeleteAction.Enabled := GetActiveContent <> nil;
5447 procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
5449 DEL_MSG = '
\81g^0
\81h
\82Ì
\83\8d\83O
\82ð
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
5450 DEL_SAME_MSG = '
\82±
\82ê
\82ç ^0
\8cÂ
\82Ì
\83X
\83\8c\83b
\83h
\82Ì
\83\8d\83O
\82ð
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
5451 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
5453 ThreadItem: TThreadItem;
5454 TmpListItem: TListItem;
5458 List := TList.Create;
5460 TmpListItem := ListView.Selected;
5461 while TmpListItem <> nil do begin
5462 if TObject(TmpListItem.Data) is TThreadItem then begin
5463 ThreadItem := TThreadItem(TmpListItem.Data);
5464 if ThreadItem.IsLogFile then
5465 List.Add(ThreadItem);
5467 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
5470 if GikoSys.Setting.DeleteMsg and (List.Count > 0) then begin
5471 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
5472 if List.Count = 1 then begin
5473 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
5476 if MsgBox(Handle, StringReplace( DEL_SAME_MSG, '^0', IntToStr( List.Count ), [rfReplaceAll] ), DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> IDYES then
5482 for i := 0 to List.Count - 1 do begin
5483 ThreadItem := TThreadItem(List[i]);
5484 DeleteHistory(ThreadItem);
5485 DeleteTab(ThreadItem);
5486 ThreadItem.DeleteLogFile;
5493 procedure TGikoForm.DeleteTab(BrowserRecord: TBrowserRecord);
5498 idx := BrowserTab.TabIndex;
5499 FTabHintIndex := -1;
5500 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5501 if TBrowserRecord(BrowserTab.Tabs.Objects[i]) = BrowserRecord then begin
5502 BrowserTab.Tabs.BeginUpdate;
5504 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5505 doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
5506 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
5509 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
5511 if( FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i]) ) then
5512 FActiveContent := nil;
5513 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5514 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
5516 FBrowsers.Move(j, BROWSER_COUNT - 1);
5518 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5519 BrowserTab.Tabs.Delete(i);
5520 if idx > i then begin
5521 BrowserTab.TabIndex := idx - 1;
5523 if BrowserTab.Tabs.Count -1 >= idx then
5524 BrowserTab.TabIndex := idx
5526 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5528 if BrowserTab.Tabs.Count = 0 then begin
5529 BrowserNullTab.Thread := nil;
5531 if(BrowserTab.TabIndex <> -1) and
5532 ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
5533 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
5534 if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
5535 = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
5537 TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser := nil;
5538 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
5539 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
5540 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
5545 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
5546 := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
5547 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
5548 FBrowsers.Move(BROWSER_COUNT - 1, 0);
5550 BrowserTab.Tabs.EndUpdate;
5551 if( FActiveContent = nil) then
5552 BrowserTab.OnChange(nil);
5557 procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
5562 idx := BrowserTab.TabIndex;
5563 FTabHintIndex := -1;
5564 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5565 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
5566 BrowserTab.Tabs.BeginUpdate;
5568 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5569 doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
5570 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
5574 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
5576 if(FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i])) then
5577 FActiveContent := nil;
5578 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5579 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
5581 FBrowsers.Move(j, BROWSER_COUNT - 1);
5583 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5584 BrowserTab.Tabs.Delete(i);
5585 if idx > i then begin
5586 BrowserTab.TabIndex := idx - 1;
5588 if BrowserTab.Tabs.Count -1 >= idx then
5589 BrowserTab.TabIndex := idx
5591 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5593 if(BrowserTab.TabIndex <> -1) and
5594 ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
5595 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
5596 if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
5597 = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
5599 TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser := nil;
5600 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
5601 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
5602 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
5607 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
5608 := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
5609 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
5610 FBrowsers.Move(BROWSER_COUNT - 1, 0);
5613 BrowserTab.Tabs.EndUpdate;
5614 if( FActiveContent = nil) then
5615 BrowserTab.OnChange(nil);
5621 procedure TGikoForm.KokomadeActionExecute(Sender: TObject);
5624 ThreadItem: TThreadItem;
5626 No := KokoPopupMenu.Tag;
5627 if No = 0 then Exit;
5628 ThreadItem := GetActiveContent;
5629 if ThreadItem = nil then Exit;
5630 ThreadItem.Kokomade := No;
5631 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
5632 FActiveContent.FRepaint := true;
5633 InsertBrowserTab(FActiveContent.Thread, true);
5634 Application.ProcessMessages;
5637 procedure TGikoForm.ZenbuActionExecute(Sender: TObject);
5639 ThreadItem: TThreadItem;
5641 ThreadItem := GetActiveContent;
5642 if ThreadItem = nil then Exit;
5643 ThreadItem.Kokomade := -1;
5644 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
5645 FActiveContent.FRepaint := true;
5646 InsertBrowserTab(FActiveContent.Thread, true);
5647 Application.ProcessMessages;
5650 function TGikoForm.Hook(var Message: TMessage): Boolean;
5659 procedure TGikoForm.KokoResActionExecute(Sender: TObject);
5661 Editor: TEditorForm;
5666 Number := KokoPopupMenu.Tag;
5667 if Number = 0 then Exit;
5668 Item := GetActiveContent;
5669 if Item = nil then Exit;
5671 Editor := TEditorForm.Create(Self);
5672 Editor.SetThreadItem(Item);
5673 Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
5675 Editor.BodyEdit.SetFocus;
5678 procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
5680 ItemRoundPMenu.Visible := (GetActiveList is TBoard);
5681 ItemReservPMenu.Visible := (GetActiveList is TBoard);
5682 LPMSep01.Visible := (GetActiveList is TBoard);
5683 ListRoundPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5684 ListReservPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5685 LPMSep02.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5686 KidokuPMenu.Visible := (GetActiveList is TBoard);
5687 MidokuPMenu.Visible := (GetActiveList is TBoard);
5688 UrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5689 NameUrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5690 AllSelectPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5691 LPMSep05.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5692 DeletePMenu.Visible := (GetActiveList is TBoard);
5693 LPMSep06.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5694 BoardFavoriteAddMenu.Visible := (GetActiveList is TCategory);
5695 ThreadFavoriteAddMenu.Visible := (GetActiveList is TBoard);
5697 AddRoundNameMenu(ItemReservPMenu);
5698 AddRoundNameMenu(ListReservPMenu);
5701 procedure TGikoForm.BoardIEActionExecute(Sender: TObject);
5705 if GetActiveList is TBoard then begin
5706 URL := TBoard(GetActiveList).URL;
5707 GikoSys.OpenBrowser(URL, gbtAuto);
5711 procedure TGikoForm.SelectItemURLCopyActionExecute(Sender: TObject);
5718 List := TList.Create;
5720 SelectListItem(List);
5721 for i := 0 to List.Count - 1 do begin
5722 if TObject(List[i]) is TBoard then
5723 s := s + TBoard(List[i]).URL + #13#10
5724 else if TObject(List[i]) is TThreadItem then
5725 s := s + TThreadItem(List[i]).URL + #13#10;
5728 Clipboard.AsText := s;
5734 procedure TGikoForm.SelectItemNameCopyActionExecute(Sender: TObject);
5741 List := TList.Create;
5743 SelectListItem(List);
5744 for i := 0 to List.Count - 1 do begin
5745 if TObject(List[i]) is TBoard then
5746 s := s + TBoard(List[i]).Title + #13#10
5747 else if TObject(List[i]) is TThreadItem then
5748 s := s + TThreadItem(List[i]).Title + #13#10;
5751 Clipboard.AsText := s;
5757 procedure TGikoForm.SelectItemNameURLCopyActionExecute(Sender: TObject);
5764 List := TList.Create;
5766 SelectListItem(List);
5767 for i := 0 to List.Count - 1 do begin
5768 if TObject(List[i]) is TBoard then
5769 s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10
5770 else if TObject(List[i]) is TThreadItem then
5771 s := s + TThreadItem(List[i]).Title + #13#10 + TThreadItem(List[i]).URL + #13#10;
5774 Clipboard.AsText := s;
5780 procedure TGikoForm.BoardIEActionUpdate(Sender: TObject);
5782 if GetActiveList is TBoard then
5783 BoardIEAction.Enabled := True
5785 BoardIEAction.Enabled := False;
5788 procedure TGikoForm.SelectItemURLCopyActionUpdate(Sender: TObject);
5790 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5791 SelectItemURLCopyAction.Enabled := True
5793 SelectItemURLCopyAction.Enabled := False;
5796 procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
5798 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5799 SelectItemNameCopyAction.Enabled := True
5801 SelectItemNameCopyAction.Enabled := False;
5804 procedure TGikoForm.SelectItemNameURLCopyActionUpdate(Sender: TObject);
5806 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5807 SelectItemNameURLCopyAction.Enabled := True
5809 SelectItemNameURLCopyAction.Enabled := False;
5812 procedure TGikoForm.AllSelectActionUpdate(Sender: TObject);
5814 if ListView.SelCount > 0 then
5815 AllSelectAction.Enabled := True
5817 AllSelectAction.Enabled := False;
5820 procedure TGikoForm.LogDeleteActionUpdate(Sender: TObject);
5822 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5823 LogDeleteAction.Enabled := True
5825 LogDeleteAction.Enabled := False;
5828 procedure TGikoForm.BrowserTabCloseActionExecute(Sender: TObject);
5831 // ThreadItem: TThreadItem;
5833 idx := BrowserTab.TabIndex;
5834 if idx <> -1 then begin
5835 if BrowserTab.Tabs.Objects[idx] <> nil then begin
5836 //ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5837 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
5842 procedure TGikoForm.NotSelectTabCloseActionExecute(Sender: TObject);
5847 idx := BrowserTab.TabIndex;
5848 if idx = -1 then Exit;
5849 BrowserTab.Tabs.BeginUpdate;
5850 for i := BrowserTab.Tabs.Count - 1 downto BrowserTab.TabIndex + 1 do begin
5851 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5852 BrowserTab.Tabs.Delete(i);
5854 if idx > 0 then begin
5855 for i := BrowserTab.TabIndex - 1 downto 0 do begin
5856 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5857 BrowserTab.Tabs.Delete(i);
5860 BrowserTab.Tabs.EndUpdate;
5863 procedure TGikoForm.AllTabCloseActionExecute(Sender: TObject);
5867 if GikoSys.Setting.ShowDialogForAllTabClose then
5868 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
5871 FActiveContent := nil;
5872 BrowserNullTab.Thread := nil;
5873 BrowserTab.OnChange := nil;
5874 BrowserTab.Tabs.BeginUpdate;
5875 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
5876 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5878 BrowserTab.Tabs.Clear;
5879 BrowserTab.Tabs.EndUpdate;
5880 BrowserTab.OnChange := BrowserTabChange;
5881 SetContent(BrowserNullTab);
5882 Self.Caption := CAPTION_NAME ;
5885 procedure TGikoForm.TreeSelectBoradReloadExecute(Sender: TObject);
5888 TmpTreeNode: TTreeNode;
5890 TmpTreeNode := FClickNode;
5891 TreeView.Selected := FClickNode;
5894 if TObject(TmpTreeNode.Data) is TBoard then
5895 Board := TBoard(TmpTreeNode.Data)
5896 else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then
5897 Board := TFavoriteBoardItem(TmpTreeNode.Data).Item;
5899 if Board <> nil then
5900 DownloadList(Board);
5903 procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject);
5905 ThreadItem: TThreadItem;
5906 TmpTreeNode: TTreeNode;
5908 TmpTreeNode := FClickNode;
5909 TreeView.Selected := FClickNode;
5912 if TObject(TmpTreeNode.Data) is TThreadItem then
5913 ThreadItem := TThreadItem(TmpTreeNode.Data)
5914 else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then
5915 ThreadItem := TFavoriteThreadItem(TmpTreeNode.Data).Item;
5917 if ThreadItem <> nil then
5918 DownloadContent(ThreadItem);
5921 procedure TGikoForm.TreeSelectURLCopyExecute(Sender: TObject);
5923 TmpTreeNode: TTreeNode;
5926 TmpTreeNode := FClickNode;
5927 TreeView.Selected := FClickNode;
5928 if TObject(TmpTreeNode.Data) is TBoard then begin
5929 s := TBoard(TmpTreeNode.Data).URL + #13#10;
5930 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5931 s := TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5932 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5933 s := TThreadItem(TmpTreeNode.Data).URL + #13#10;
5934 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5935 s := TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5937 Clipboard.AsText := s;
5940 procedure TGikoForm.TreeSelectNameURLCopyExecute(Sender: TObject);
5942 TmpTreeNode: TTreeNode;
5945 TmpTreeNode := FClickNode;
5946 TreeView.Selected := FClickNode;
5947 if TObject(TmpTreeNode.Data) is TBoard then begin
5948 s := TBoard(TmpTreeNode.Data).Title + #13#10 + TBoard(TmpTreeNode.Data).URL + #13#10;
5949 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5950 s := TFavoriteBoardItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5951 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5952 s := TThreadItem(TmpTreeNode.Data).Title + #13#10 + TThreadItem(TmpTreeNode.Data).URL + #13#10;
5953 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5954 s := TFavoriteThreadItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5956 Clipboard.AsText := s;
5959 procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
5961 FClickNode := TreeView.Selected;
5962 if FClickNode = nil then begin
5963 TreeSelectThreadPupupMenu.Visible := False;
5964 TreeSelectBoardPupupMenu.Visible := False;
5965 TPMSep01.Visible := False;
5966 TreeSelectURLPupupMenu.Visible := False;
5967 TreeSelectNamePupupMenu.Visible := False;
5968 TreeSelectNameURLPupupMenu.Visible := False;
5969 TreeSelectFavoriteAddPupupMenu.Visible := False;
5970 TreeSelectLogDeleteSeparator.Visible := False;
5971 TreeSelectLogDeletePopupMenu.Visible := False;
5972 end else if TObject(FClickNode.Data) is TBoard then begin
5973 TreeSelectThreadPupupMenu.Visible := False;
5974 TreeSelectBoardPupupMenu.Visible := True;
5975 TPMSep01.Visible := True;
5976 TreeSelectURLPupupMenu.Visible := True;
5977 TreeSelectNamePupupMenu.Visible := True;
5978 TreeSelectNameURLPupupMenu.Visible := True;
5979 TreeSelectFavoriteAddPupupMenu.Visible := True;
5980 TreeSelectLogDeleteSeparator.Visible := False;
5981 TreeSelectLogDeletePopupMenu.Visible := False;
5982 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
5983 TreeSelectThreadPupupMenu.Visible := False;
5984 TreeSelectBoardPupupMenu.Visible := True;
5985 TPMSep01.Visible := True;
5986 TreeSelectURLPupupMenu.Visible := True;
5987 TreeSelectNamePupupMenu.Visible := True;
5988 TreeSelectNameURLPupupMenu.Visible := True;
5989 TreeSelectFavoriteAddPupupMenu.Visible := True;
5990 TreeSelectLogDeleteSeparator.Visible := False;
5991 TreeSelectLogDeletePopupMenu.Visible := False;
5992 end else if (TObject(FClickNode.Data) is TThreadItem) then begin
5993 TreeSelectThreadPupupMenu.Visible := True;
5994 TreeSelectBoardPupupMenu.Visible := False;
5995 TPMSep01.Visible := True;
5996 TreeSelectURLPupupMenu.Visible := True;
5997 TreeSelectNamePupupMenu.Visible := True;
5998 TreeSelectNameURLPupupMenu.Visible := True;
5999 TreeSelectFavoriteAddPupupMenu.Visible := True;
6000 TreeSelectLogDeleteSeparator.Visible := True;
6001 TreeSelectLogDeletePopupMenu.Visible := True;
6002 end else if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
6003 TreeSelectThreadPupupMenu.Visible := True;
6004 TreeSelectBoardPupupMenu.Visible := False;
6005 TPMSep01.Visible := True;
6006 TreeSelectURLPupupMenu.Visible := True;
6007 TreeSelectNamePupupMenu.Visible := True;
6008 TreeSelectNameURLPupupMenu.Visible := True;
6009 TreeSelectFavoriteAddPupupMenu.Visible := True;
6010 TreeSelectLogDeleteSeparator.Visible := True;
6011 TreeSelectLogDeletePopupMenu.Visible := True;
6012 end else if (TObject(FClickNode.Data) is TCategory) then begin
6013 TreeSelectThreadPupupMenu.Visible := False;
6014 TreeSelectBoardPupupMenu.Visible := False;
6015 TPMSep01.Visible := False;
6016 TreeSelectURLPupupMenu.Visible := False;
6017 TreeSelectNamePupupMenu.Visible := True;
6018 TreeSelectNameURLPupupMenu.Visible := False;
6019 TreeSelectFavoriteAddPupupMenu.Visible := False;
6020 TreeSelectLogDeleteSeparator.Visible := False;
6021 TreeSelectLogDeletePopupMenu.Visible := False;
6022 end else if FClickNode.IsFirstNode then begin
6023 TreeSelectThreadPupupMenu.Visible := False;
6024 TreeSelectBoardPupupMenu.Visible := False;
6025 TPMSep01.Visible := False;
6026 TreeSelectURLPupupMenu.Visible := False;
6027 TreeSelectNamePupupMenu.Visible := True;
6028 TreeSelectNameURLPupupMenu.Visible := False;
6029 TreeSelectFavoriteAddPupupMenu.Visible := False;
6030 TreeSelectLogDeleteSeparator.Visible := False;
6031 TreeSelectLogDeletePopupMenu.Visible := False;
6033 TreeSelectThreadPupupMenu.Visible := False;
6034 TreeSelectBoardPupupMenu.Visible := False;
6035 TPMSep01.Visible := False;
6036 TreeSelectURLPupupMenu.Visible := False;
6037 TreeSelectNamePupupMenu.Visible := False;
6038 TreeSelectNameURLPupupMenu.Visible := False;
6039 TreeSelectFavoriteAddPupupMenu.Visible := False;
6040 TreeSelectLogDeleteSeparator.Visible := False;
6041 TreeSelectLogDeletePopupMenu.Visible := False;
6045 procedure TGikoForm.BrowserNewWindow2(Sender: TObject;
6046 var ppDisp: IDispatch; var Cancel: WordBool);
6057 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
6058 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
6059 Html := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
6060 if(AnsiPos('>>', Text) = 1) or (AnsiPos('>', Text) = 1)
6061 or (AnsiPos('
\81\84\81\84', Text) = 1) or (AnsiPos('
\81\84', Text) = 1) then begin
6062 if GikoSys.Setting.ResAnchorJamp then begin
6063 Text := ZenToHan(Text);
6065 if(AnsiPos('>>', Text) = 1) then begin
6066 Text := Copy(Text, 3, Length(Text) - 2);
6068 Text := Copy(Text, 2, Length(Text) - 1);
6070 if AnsiPos('-', Text) <> 0 then begin
6071 wkIntSt := StrToIntDef(Copy(Text, 1, AnsiPos('-', Text) - 1), 0);
6072 Text := Copy(Text, AnsiPos('-', Text) + 1, Length(Text));
6073 wkIntTo := StrToIntDef(Text, 0);
6074 if wkIntTo < wkIntSt then
6077 wkIntSt := StrToIntDef(Text, 0);
6079 if wkIntSt <> 0 then
6080 BrowserMovement(IntToStr(wkIntSt));
6083 URL := GikoSys.GetHRefText(Html);
6084 URL := GikoSys.HTMLDecode(URL);
6085 if( AnsiPos('http://', URL) = 1) or (AnsiPos('https://', URL) = 1) or
6086 ( AnsiPos('ftp://', URL) = 1) then begin
6087 //
\83A
\83h
\83\8c\83X
\83o
\81[
\82Ì
\97\9a\97ð
6088 if GikoSys.Setting.LinkAddAddressBar then begin
6089 idx := AddressComboBox.Items.IndexOf(URL);
6090 if idx = -1 then begin
6091 AddressComboBox.Items.Insert(0, URL);
6092 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
6093 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
6095 AddressComboBox.Items.Delete(idx);
6096 AddressComboBox.Items.Insert(0, URL);
6104 { ShiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
6105 CtrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
6108 Memo1.Lines.Add('ShiftDown');
6110 Memo1.Lines.Add('CtrlDown');
6112 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
6113 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
6114 Url := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
6118 URL := GetHRefText(URL);
6120 ParseURI(URL, Protocol, Host, path, Document, Port, Bookmark);
6122 b := Parse2chURL(path, document, bbs, num);
6123 memo1.Lines.Add('bbs: ' + bbs);
6124 memo1.Lines.Add('key: ' + num);
6126 Memo1.Lines.Add('Parse2chURL: True')
6128 Memo1.Lines.Add('Parse2chURL: False');
6130 // AppPath := 'C:\Borland\Projects\Test\TestBrowser\TestBrowser.exe';
6135 procedure TGikoForm.ListSplitterCanResize(Sender: TObject;
6136 var NewSize: Integer; var Accept: Boolean);
6138 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6139 if ViewPanel.Width < 2 then begin
6140 ViewPanel.Width := 1;
6141 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6142 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6143 GikoSys.Setting.ListWidthState := glsMax;
6144 end else if ViewPanel.Width > (ThreadMainPanel.Width - 80) then begin
6145 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6146 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6147 GikoSys.Setting.ListWidthState := glsMin;
6149 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6150 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6151 GikoSys.Setting.ListWidthState := glsNormal;
6154 if ViewPanel.Height < 2 then begin
6155 ViewPanel.Height := 1;
6156 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6157 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6158 GikoSys.Setting.ListHeightState := glsMax;
6159 end else if ViewPanel.Height > (ThreadMainPanel.Height - BrowserCoolBar.Height - 7) then begin
6160 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6161 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6162 GikoSys.Setting.ListHeightState := glsMin;
6164 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6165 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6166 GikoSys.Setting.ListHeightState := glsNormal;
6171 procedure TGikoForm.ListSplitterMoved(Sender: TObject);
6173 if Mouse.Capture <> 0 then
6175 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6176 if (ViewPanel.Width > 1) and (ViewPanel.Width <= (ThreadMainPanel.Width - 80)) then
6177 FBrowserSizeWidth := ViewPanel.Width;
6179 if (ViewPanel.Height > 1) and (ViewPanel.Height <= (ThreadMainPanel.Height - BrowserCoolBar.Height)) then
6180 FBrowserSizeHeight := ViewPanel.Height;
6182 { if (Mouse.Capture = 0) and (ViewPanel.Height > 1) and (not ArrangeAction.Checked) then
6183 FBrowserSizeHeight := ViewPanel.Height
6184 else if (Mouse.Capture = 0) and (ViewPanel.Width > 1) and (ArrangeAction.Checked) then
6185 FBrowserSizeWidth := ViewPanel.Width;}
6188 procedure TGikoForm.BrowserTabChange(Sender: TObject);
6194 // if NewTab = -1 then
6195 // ThreadItem := nil;
6196 if not BrowserTab.Dragging then begin
6197 FTabHintIndex := -1;
6198 BrowserTab.Hint := '';
6199 idx := BrowserTab.TabIndex;
6200 if idx = -1 then begin
6201 BrowserNullTab.Thread := nil;
6202 SetContent(BrowserNullTab);
6204 end else if(BrowserTab.Tabs.Objects[idx] <> nil) and (BrowserTab.Tabs.Objects[idx] is TBrowserRecord) then begin
6205 if TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser <> nil then begin
6206 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser);
6208 FBrowsers.Move(j ,0);
6210 if( FActiveContent <> nil ) and (FActiveContent.Browser <> nil) and
6211 (FActiveContent.Browser <> BrowserNullTab.Browser) and
6212 (FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1])) then
6213 FBrowsers.Move(BROWSER_COUNT - 1, 0);
6215 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
6216 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
6217 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser := nil;
6218 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
6219 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent <> nil then begin
6220 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent.Free;
6221 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent := nil;
6225 TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
6226 TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Repaint := true;
6227 FBrowsers.Move(BROWSER_COUNT - 1, 0);
6229 TOleControl(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser).BringToFront;
6230 // GikoSys.OnlyAHundredRes := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
6231 // OnlyAHundredRes.Checked := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
6232 SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6234 if (GikoSys.Setting.URLDisplay) and (GetActiveContent <> nil) then
6235 AddressComboBox.Text := GetActiveContent.URL;
6237 if ((TreeView.Visible) and (TreeView.Focused)) or ((FavoriteTreeView.Visible) and (FavoriteTreeView.Focused)) or
6238 (ListView.Focused) or (SelectComboBox.Focused) or (AddressComboBox.Focused)
6241 SetFocusForBrowserAction.Execute;
6250 procedure TGikoForm.BrowserTabMouseDown(Sender: TObject;
6251 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
6257 if Button = mbMiddle then begin
6258 //
\83}
\83E
\83X
\92\86\83{
\83^
\83\93
6261 p := BrowserTab.ScreenToClient(p);
6262 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
6264 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6265 //end else if Button = mbRight then begin
6266 //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é
6267 //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
6268 { //
\83}
\83E
\83X
\89E
\83{
\83^
\83\93
6271 // GetCursorPos(p2);
6272 p := BrowserTab.ScreenToClient(p);
6273 // idx := BrowserTab.ItemAtPos(p);
6274 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
6275 if idx <> -1 then begin
6276 OldIndex := BrowserTab.TabIndex;
6277 BrowserTab.TabIndex := idx;
6278 if OldIndex <> idx then
6279 BrowserTab.OnChange(nil);
6280 BrowserTabPopupMenu.Tag := idx;
6281 BrowserTabPopupMenu.Popup(p2.X, p2.Y);
6284 end else if BUtton = mbLeft then begin
6285 FDragWFirst := true;
6286 FMouseDownPos.X := X;
6287 FMouseDownPos.Y := Y;
6292 procedure TGikoForm.SetBrowserTabState;
6295 CoolBand: TCoolBand;
6297 BrowserBottomPanel.AutoSize := False;
6298 if GikoSys.Setting.BrowserTabVisible then begin
6299 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
6300 BrowserTab.Style := tsTabs;
6301 if GikoSys.Setting.BrowserTabPosition = gtpTop then
6302 BrowserTab.TabPosition := tpTop
6304 BrowserTab.TabPosition := tpBottom;
6305 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
6306 BrowserTab.TabPosition := tpTop;
6307 BrowserTab.Style := tsButtons;
6309 BrowserTab.TabPosition := tpTop;
6310 BrowserTab.Style := tsFlatButtons
6313 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
6314 BrowserTab.Parent := BrowserTabToolBar;
6315 BrowserBottomPanel.Hide;
6316 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6317 if CoolBand <> nil then
6318 CoolBand.Visible := True;
6319 // BrowserTab.Parent := BrowserTopPanel;
6320 // BrowserTab.Parent := BrowserCoolBar;
6321 // BrowserTab.Top := 26;
6322 // BrowserTopPanel.Height := 44;
6325 BrowserTab.Parent := BrowserBottomPanel;
6326 BrowserTab.Top := 0;
6327 BrowserTab.Left := 0;
6328 BrowserBottomPanel.Show;
6329 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6330 if CoolBand <> nil then
6331 CoolBand.Visible := False;
6332 // BrowserTopPanel.Height := 26;
6336 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6337 if CoolBand <> nil then
6338 CoolBand.Visible := False;
6339 BrowserBottomPanel.Visible := False;
6340 // BrowserTab.Visible := False;
6341 // BrowserTopPanel.Height := 26;
6342 AllTabCloseAction.Execute;
6346 procedure TGikoForm.BrowserTabDragOver(Sender, Source: TObject; X,
6347 Y: Integer; State: TDragState; var Accept: Boolean);
6351 idx := BrowserTab.IndexOfTabAt(X, Y);
6352 Accept := (Source = BrowserTab) and (BrowserTab.TabIndex <> idx);
6355 procedure TGikoForm.BrowserTabDragDrop(Sender, Source: TObject; X,
6360 idx := BrowserTab.IndexOfTabAt(X, Y);
6362 BrowserTab.Tabs.Move(BrowserTab.TabIndex, idx);
6365 procedure TGikoForm.BrowserTabMouseMove(Sender: TObject;
6366 Shift: TShiftState; X, Y: Integer);
6369 ThreadItem: TThreadItem;
6372 TabIdx := BrowserTab.IndexOfTabAt(x, y);
6374 if ( ssLeft in Shift ) and ( BrowserTab.Style = tsTabs ) then begin
6375 if FDragWFirst = false then begin
6376 FDragWFirst := true;
6378 BrowserTab.EndDrag(false);
6379 BrowserTab.BeginDrag(false, DandD_THRESHOLD);
6380 FDragWFirst := false;
6383 BrowserTab.EndDrag(false);
6384 FDragWFirst := false;
6387 if (FTabHintIndex <> TabIdx) and (TabIdx <> -1) then begin
6388 Application.CancelHint;
6389 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[TabIdx]).Thread;
6390 if ThreadItem.Title <> BrowserTab.Tabs[TabIdx] then begin
6391 BrowserTab.Hint := ThreadItem.Title;
6392 Application.ShowHint := True;
6394 BrowserTab.Hint := '';
6395 Application.ShowHint := True;
6397 FTabHintIndex := TabIdx;
6402 procedure TGikoForm.BrowserDocumentComplete(Sender: TObject;
6403 const pDisp: IDispatch; var URL: OleVariant);
6405 FDispHtmlDocument: DispHTMLDocument;
6406 BrowserRecord :TBrowserRecord;
6409 // AddMessageList('DocumentComplete', nil);
6410 if TObject(Sender) is TWebBrowser then begin
6411 if TWebBrowser(Sender) <> Browser then begin
6412 BrowserRecord := nil;
6413 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
6414 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(Sender) then begin
6415 BrowserRecord := TBrowserRecord(BrowserTab.Tabs.Objects[i]);
6419 if BrowserRecord <> nil then begin
6420 if BrowserRecord.FEvent <> nil then
6421 BrowserRecord.FEvent.Free;
6422 FDispHtmlDocument := Idispatch(OleVariant(BrowserRecord.Browser.ControlInterface).Document) as DispHTMLDocument;
6423 BrowserRecord.FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
6424 BrowserRecord.FEvent.OnContextMenu := OnDocumentContextMenu;
6425 BrowserRecord.FEvent.OnClick := WebBrowserClick; //
\92Ç
\89Á
\82µ
\82½OnClick
\83C
\83x
\83\93\83g
6428 if GetActiveContent <> nil then begin
6429 FDispHtmlDocument := Idispatch(OleVariant(Browser.ControlInterface).Document) as DispHTMLDocument;
6430 if FEvent <> nil then
6432 FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
6433 FEvent.OnContextMenu := OnDocumentContextMenu;
6434 FEvent.OnClick := WebBrowserClick; //
\92Ç
\89Á
\82µ
\82½OnClick
\83C
\83x
\83\93\83g
6440 procedure TGikoForm.SelectReservActionUpdate(Sender: TObject);
6445 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then begin
6446 List := TList.Create;
6448 SelectListItem(List);
6449 for i := 0 to List.Count - 1 do begin
6450 if TObject(List[i]) is TThreadItem then begin
6451 if TThreadItem(List[i]).IsLogFile then begin
6452 SelectReservAction.Enabled := True;
6457 SelectReservAction.Enabled := False;
6461 end else if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
6462 SelectReservAction.Enabled := True
6464 SelectReservAction.Enabled := False;
6467 procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
6469 AddRoundNameMenu(RoundNamePopupMenu.Items);
6472 procedure TGikoForm.AddRoundNameMenu(MenuItem: TMenuItem);
6478 Item := TMenuItem.Create(Self);
6479 Item.Caption := '
\90V
\82µ
\82¢
\96¼
\91O
\82Å
\8f\84\89ñ
\97\
\96ñ(&N)...';
6480 Item.OnClick := SelectNewRoundNameExecute;
6482 Item := TMenuItem.Create(Self);
6483 Item.Caption := '
\8f\84\89ñ
\83\8a\83X
\83g
\82©
\82ç
\8dí
\8f\9c(&D)';
6484 Item.OnClick := SelectDeleteRoundExecute;
6486 Item := TMenuItem.Create(Self);
6487 Item.Caption := '-';
6489 for i := 0 to RoundList.RoundNameList.Count - 1 do begin
6490 Item := TMenuItem.Create(Self);
6491 Item.Caption := RoundList.RoundNameList[i];
6492 Item.OnClick := SetSelectRoundName;
6497 procedure TGikoForm.SelectNewRoundNameExecute(Sender: TObject);
6500 Dlg: TRoundNameDialog;
6503 Dlg := TRoundNameDialog.Create(Self);
6506 if Dlg.ModalResult <> mrCancel then begin
6507 s := Trim(Dlg.RoundNameEdit.Text);
6508 RoundList.RoundNameList.Add(s);
6509 SetSelectItemRound(True, s, TMenuItem(Sender).Parent.Name);
6516 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string);
6518 threadItem : TThreadItem;
6520 if ParentName <> 'dummy1' then begin
6521 SetSelectItemRound(RoundFlag, RoundName);
6523 threadItem := GetActiveContent;
6524 if threadItem <> nil then begin
6525 threadItem.RoundName := RoundName;
6526 threadItem.Round := RoundFlag;
6531 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
6536 List := TList.Create;
6538 SelectListItem(List);
6539 for i := 0 to List.Count - 1 do begin
6540 if TObject(List[i]) is TBoard then begin
6541 TBoard(List[i]).RoundName := RoundName;
6542 TBoard(List[i]).Round := RoundFlag;
6543 end else if TObject(List[i]) is TThreadItem then begin
6544 if TThreadItem(List[i]).IsLogFile then begin
6545 TThreadItem(List[i]).RoundName := RoundName;
6546 TThreadItem(List[i]).Round := RoundFlag;
6555 procedure TGikoForm.SelectDeleteRoundExecute(Sender: TObject);
6557 SetSelectItemRound(False, '', TMenuItem(Sender).Parent.Name);
6561 procedure TGikoForm.SelectReservActionExecute(Sender: TObject);
6563 //
\82±
\82Ì
\83R
\83\81\83\93\83g
\8dí
\8f\9c\82µ
\82Ä
\82Í
\91Ê
\96Ú
6566 procedure TGikoForm.SetSelectRoundName(Sender: TObject);
6568 MenuItem: TMenuItem;
6570 if Sender is TMenuItem then begin
6571 MenuItem := TMenuItem(Sender);
6572 SetSelectItemRound(True, StripHotKey(MenuItem.Caption), TMenuItem(Sender).Parent.Name);
6577 procedure TGikoForm.NewBoardActionExecute(Sender: TObject);
6579 Dlg: TNewBoardDialog;
6583 for i := 0 to Screen.CustomFormCount - 1 do begin
6584 if TObject(Screen.CustomForms[i]) is TEditorForm then begin
6585 Msg := '
\83\8c\83X
\83G
\83f
\83B
\83^
\82ð
\91S
\82Ä
\95Â
\82¶
\82Ä
\82
\82¾
\82³
\82¢';
6586 MsgBox(Handle, Msg, '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
6590 Dlg := TNewBoardDialog.Create(Self);
6598 procedure TGikoForm.LoginActionExecute(Sender: TObject);
6603 if GikoSys.Dolib.Connected then begin
6604 //
\83\8d\83O
\83A
\83E
\83g
6605 GikoSys.Dolib.Disconnect;
6606 LoginAction.Checked := False;
6607 AddMessageList('
\83\8d\83O
\83A
\83E
\83g
\82µ
\82Ü
\82µ
\82½', nil, gmiOK);
6608 LoginAction.Caption := '
\83\8d\83O
\83C
\83\93(&L)';
6610 TmpCursor := Screen.Cursor;
6611 Screen.Cursor := crHourGlass;
6613 //
\92Ê
\8fí
\83\8d\83O
\83C
\83\93
6614 if not GikoSys.Setting.ForcedLogin then begin
6615 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6616 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6617 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6618 if GikoSys.Setting.ReadProxy then begin
6619 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6620 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6622 GikoSys.Dolib.ProxyAddress := '';
6623 GikoSys.Dolib.ProxyPort := 0;
6625 if GikoSys.Dolib.Connect then begin
6626 LoginAction.Checked := True;
6627 AddMessageList('
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6628 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6629 LoginToolButton.Style := tbsCheck;
6631 // 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);
6632 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6634 LoginAction.Checked := False;
6635 LoginToolButton.Down := False;
6636 LoginToolButton.Style := tbsButton;
6639 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
6640 + '
\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
6641 + '
\82±
\82Ì
\83\82\81[
\83h
\82Å
\83\8d\83O
\83C
\83\93\82ð
\8e\8e\82Ý
\82Ü
\82·
\82©
\81H' + #13#10;
6642 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) = IDYES then begin
6643 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6644 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6645 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6646 if GikoSys.Setting.ReadProxy then begin
6647 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6648 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6650 GikoSys.Dolib.ProxyAddress := '';
6651 GikoSys.Dolib.ProxyPort := 0;
6653 //SSL
\8fá
\8aQ
\97p
\8b
\90§
\83\8d\83O
\83C
\83\93
6654 GikoSys.Dolib.ForcedConnect;
6655 if GikoSys.Dolib.Connect then begin
6656 LoginAction.Checked := True;
6657 AddMessageList('
\8b
\90§
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6658 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6659 LoginToolButton.Style := tbsCheck;
6661 // 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);
6662 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6664 LoginAction.Checked := False;
6665 LoginToolButton.Down := False;
6666 LoginToolButton.Style := tbsButton;
6669 LoginAction.Checked := False;
6670 LoginToolButton.Down := False;
6671 LoginToolButton.Style := tbsButton;
6675 Screen.Cursor := TmpCursor;
6680 procedure TGikoForm.KeySettingActionExecute(Sender: TObject);
6682 Dlg: TKeySettingForm;
6684 Dlg := TKeySettingForm.Create(Self);
6686 if Dlg.ShowModal = mrOk then
6687 GikoSys.SaveKeySetting(ActionList);
6688 GikoSys.SaveEditorKeySetting(Dlg.EditorForm.ActionList);
6694 procedure TGikoForm.ArrangeActionExecute(Sender: TObject);
6696 if ArrangeAction.Checked then begin
6698 ViewPanel.Align := alNone;
6699 ListSplitter.Align := alNone;
6700 ThreadPanel.Align := alNone;
6702 ViewPanel.Width := FBrowserSizeWidth;
6703 ViewPanel.Align := alLeft;
6705 ListSplitter.Width := 5;
6706 ListSplitter.Align := alLeft;
6708 ViewPanel.Left := -10;
6710 ThreadPanel.Align := alClient;
6712 GikoSys.Setting.ListOrientation := gloHorizontal;
6713 case GikoSys.Setting.ListWidthState of
6715 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6716 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6717 ViewPanel.Width := 1;
6720 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6721 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6724 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6725 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6726 ViewPanel.Width := ThreadMainPanel.Width - 80;
6731 ViewPanel.Align := alNone;
6732 ListSplitter.Align := alNone;
6733 ThreadPanel.Align := alNone;
6735 ViewPanel.Height := FBrowserSizeHeight;
6736 ViewPanel.Align := alTop;
6738 ListSplitter.Height := 5;
6739 ListSplitter.Align := alTop;
6741 ViewPanel.Top := -10;
6743 ThreadPanel.Align := alClient;
6744 GikoSys.Setting.ListOrientation := gloVertical;
6745 case GikoSys.Setting.ListHeightState of
6747 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6748 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6749 ViewPanel.Height := 1;
6752 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6753 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6756 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6757 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6758 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
6765 procedure TGikoForm.PaneInitActionExecute(Sender: TObject);
6767 CabinetPanel.Width := 150;
6768 MessagePanel.Height := 40;
6770 FBrowserSizeWidth := 200;
6771 FBrowserSizeHeight := 200;
6772 if ArrangeAction.Checked then begin
6773 ViewPanel.Width := FBrowserSizeWidth;
6775 ViewPanel.Height := FBrowserSizeHeight;
6777 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6778 if GikoSys.Setting.ListHeightState = glsMax then begin
6779 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6780 GikoSys.Setting.ListHeightState := glsNormal;
6783 if GikoSys.Setting.ListWidthState = glsMax then begin
6784 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6785 GikoSys.Setting.ListWidthState := glsNormal;
6790 procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
6792 DEL_MSG = '
\81g^0
\81h
\82Ì
\83\8d\83O
\82ð
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
6793 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6796 ThreadItem: TThreadItem;
6798 idx := BrowserTab.TabIndex;
6799 if idx <> -1 then begin
6800 if BrowserTab.Tabs.Objects[idx] <> nil then begin
6801 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).FThread;
6802 if GikoSys.Setting.DeleteMsg then
6803 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
6804 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', ThreadItem.Title, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
6806 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6807 ThreadItem.DeleteLogFile;
6808 if ThreadItem.ParentBoard = FActiveList then
6814 function TGikoForm.GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
6819 if CoolBar = nil then
6821 for i := 0 to CoolBar.Bands.Count - 1 do begin
6822 if CoolBar.Bands[i].Control = Control then begin
6823 Result := CoolBar.Bands[i];
6829 procedure TGikoForm.BrowserTabToolBarResize(Sender: TObject);
6831 if BrowserTab.Parent = BrowserTabToolBar then
6832 BrowserTab.Width := BrowserTabToolBar.Width;
6835 procedure TGikoForm.SelectTextClearActionExecute(Sender: TObject);
6837 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';
6838 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6840 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
6841 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
6843 GikoSys.Setting.SelectTextList.Clear;
6844 SelectComboBox.Items.Clear;
6845 SelectComboBox.Text := '';
6846 SetListViewType( gvtAll );
6849 procedure TGikoForm.NameTextClearActionExecute(Sender: TObject);
6853 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';
6854 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6856 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
6857 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
6859 GikoSys.Setting.NameList.Clear;
6860 for i := 0 to Screen.CustomFormCount - 1 do begin
6861 if TObject(Screen.CustomForms[i]) is TEditorForm then
6862 TEditorForm(Screen.CustomForms[i]).NameComboBox.Items.Clear;
6866 procedure TGikoForm.MailTextClearActionExecute(Sender: TObject);
6870 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';
6871 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6873 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
6874 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
6876 GikoSys.Setting.MailList.Clear;
6877 for i := 0 to Screen.CustomFormCount - 1 do begin
6878 if TObject(Screen.CustomForms[i]) is TEditorForm then
6879 TEditorForm(Screen.CustomForms[i]).MailComboBox.Items.Clear;
6883 procedure TGikoForm.LeftmostTabSelectActionExecute(Sender: TObject);
6885 if BrowserTab.Tabs.Count > 0 then begin
6886 BrowserTab.TabIndex := 0;
6887 BrowserTab.OnChange(nil);
6891 procedure TGikoForm.LeftTabSelectActionExecute(Sender: TObject);
6893 if BrowserTab.Tabs.Count > 0 then begin
6894 if BrowserTab.TabIndex = -1 then begin
6895 BrowserTab.TabIndex := 0;
6896 BrowserTab.OnChange(nil);
6897 end else if BrowserTab.TabIndex > 0 then begin
6898 BrowserTab.TabIndex := BrowserTab.TabIndex - 1;
6899 BrowserTab.OnChange(nil);
6904 procedure TGikoForm.RightTabSelectActionExecute(Sender: TObject);
6906 if BrowserTab.Tabs.Count > 0 then begin
6907 if BrowserTab.TabIndex = -1 then begin
6908 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6909 BrowserTab.OnChange(nil);
6910 end else if BrowserTab.TabIndex < (BrowserTab.Tabs.Count - 1) then begin
6911 BrowserTab.TabIndex := BrowserTab.TabIndex + 1;
6912 BrowserTab.OnChange(nil);
6917 procedure TGikoForm.RightmostTabSelectActionExecute(Sender: TObject);
6919 if BrowserTab.Tabs.Count > 0 then begin
6920 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6921 BrowserTab.OnChange(nil);
6925 procedure TGikoForm.LeftmostTabSelectActionUpdate(Sender: TObject);
6927 LeftmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6930 procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
6932 LeftTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6935 procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);
6937 RightTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6940 procedure TGikoForm.RightmostTabSelectActionUpdate(Sender: TObject);
6942 RightmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6945 procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
6950 procedure TGikoForm.SetMenuFont;
6952 // GikoSys.MenuFont(MenuToolBar.Font);
6953 // MenuToolBar.Buttons[0].AutoSize := False;
6954 // MenuToolBar.Buttons[0].AutoSize := True;
6955 // MenuToolBar.Font.Color := clMenuText;
6956 GikoSys.MenuFont(MainCoolBar.Font);
6957 MenuToolBar.Buttons[0].AutoSize := False;
6958 MenuToolBar.Buttons[0].AutoSize := True;
6959 MainCoolBar.AutoSize := False;
6960 MainCoolBar.AutoSize := True;
6962 GikoSys.MenuFont(ListCoolBar.Font);
6963 GikoSys.MenuFont(BrowserCoolBar.Font);
6964 // MenuToolBar.Font.Color := clMenuText;
6967 procedure TGikoForm.FavoriteMenuClick(Sender: TObject);
6973 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\92Ç
\89Á
6974 NewMenu := TMenuItem.Create(MainMenu);
6975 NewMenu.Action := FavoriteAddAction;
6976 FavoriteMenu.Add(NewMenu);
6977 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\90®
\97\9d
6978 NewMenu := TMenuItem.Create(FavoriteMenu);
6979 NewMenu.Action := FavoriteArrangeAction;
6980 FavoriteMenu.Add(NewMenu);
6981 //
\83Z
\83p
\83\8c\81[
\83^
6982 NewMenu := TMenuItem.Create(FavoriteMenu);
6983 NewMenu.Caption := '-';
6984 FavoriteMenu.Add(NewMenu);
6986 CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
6989 procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
6994 for i := 0 to Node.Count - 1 do begin
6995 NewMenu := TFavoriteMenuItem.Create(Self);
6996 NewMenu.AutoHotkeys := maAutomatic;
6997 NewMenu.Caption := CustomStringReplace(Node.Item[i].Text, '&', '&&');
6998 TFavoriteMenuItem(NewMenu).Data := Node.Item[i].Data;
6999 MenuItem.Add(NewMenu);
7001 if TObject(Node.Item[i].Data) is TFavoriteFolder then begin
7002 NewMenu.ImageIndex := TOOL_ICON_FAV_FOLDER;
7003 CreateFavMenu(Node.Item[i], NewMenu);
7004 end else if TObject(Node.Item[i].Data) is TFavoriteBoardItem then begin
7005 NewMenu.ImageIndex := TOOL_ICON_FAV_BOARD;
7006 NewMenu.OnClick := FavoriteClick;
7007 end else if TObject(Node.Item[i].Data) is TFavoriteThreadItem then begin
7008 NewMenu.ImageIndex := TOOL_ICON_FAV_THREAD;
7009 NewMenu.OnClick := FavoriteClick;
7014 procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
7016 Dlg : TFavoriteAddDialog;
7022 if Item is TFavoriteBoardItem then
7023 Item := TFavoriteBoardItem( Item ).Item
7024 else if Item is TFavoriteThreadItem then
7025 Item := TFavoriteThreadItem( Item ).Item;
7027 Node := FavoriteTreeView.Items.GetFirstNode;
7028 if Item is TBoard then begin
7029 ItemURL := TBoard( Item ).URL;
7030 while Node <> nil do begin
7032 if TObject( Data ) is TFavoriteBoardItem then begin
7033 if ItemURL = TFavoriteBoardItem( Data ).URL then begin
7034 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
7039 Node := Node.GetNext;
7041 Dlg := TFavoriteAddDialog.Create(Self);
7043 Dlg.SetBoard( TBoard( Item ) );
7048 end else if Item is TThreadItem then begin
7049 ItemURL := TThreadItem( Item ).URL;
7050 while Node <> nil do begin
7052 if TObject( Data ) is TFavoriteThreadItem then begin
7053 if ItemURL = TFavoriteThreadItem( Data ).URL then begin
7054 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
7059 Node := Node.GetNext;
7061 Dlg := TFavoriteAddDialog.Create(Self);
7063 Dlg.SetThreadItem( TThreadItem( Item ) );
7073 procedure TGikoForm.FavoriteAddActionExecute(Sender: TObject);
7075 ShowFavoriteAddDialog(GetActiveContent);
7078 procedure TGikoForm.FavoriteClick(Sender: TObject);
7081 FavoriteClick( Sender, True );
7085 procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
7088 ThreadItem: TThreadItem;
7089 FavBoard: TFavoriteBoardItem;
7090 FavThread: TFavoriteThreadItem;
7094 if Sender is TFavoriteMenuItem then
7095 Item := TFavoriteMenuItem(Sender).Data
7096 else if Sender is TLinkToolButton then
7097 Item := TLinkToolButton(Sender).Data
7098 else if Sender is TTreeNode then
7099 Item := TTreeNode( Sender ).Data
7103 if TObject(Item) is TFavoriteBoardItem then begin
7104 FavBoard := TFavoriteBoardItem(Item);
7105 Board := FavBoard.Item;
7106 if Board <> nil then begin
7107 if (FTreeType = gtt2ch) and (FActiveBBS <> Board.ParentCategory.ParenTBBS) then
7108 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7109 SelectTreeNode(Board, True);
7111 end else if TObject(Item) is TFavoriteThreadItem then begin
7112 FavThread := TFavoriteThreadItem(Item);
7113 ThreadItem := FavThread.Item;
7114 if ThreadItem = nil then
7117 InsertBrowserTab(ThreadItem, ActiveTab);
7119 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
7120 if GikoSys.Setting.ListWidthState = glsMin then begin
7121 BrowserMaxAndFocusAction.Execute;
7124 if GikoSys.Setting.ListHeightState = glsMin then begin
7125 BrowserMaxAndFocusAction.Execute;
7131 procedure TGikoForm.FavoriteAddActionUpdate(Sender: TObject);
7133 FavoriteAddAction.Enabled := (GetActiveContent <> nil);
7136 procedure TGikoForm.BoardFavoriteAddActionExecute(Sender: TObject);
7138 if TObject(ListView.Selected.Data) is TBoard then
7139 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
7142 procedure TGikoForm.BoardFavoriteAddActionUpdate(Sender: TObject);
7144 BoardFavoriteAddAction.Enabled := (GetActiveList is TCategory) and (ListView.SelCount > 0);
7147 procedure TGikoForm.ThreadFavoriteAddActionExecute(Sender: TObject);
7149 if TObject(ListView.Selected.Data) is TThreadItem then
7150 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
7153 procedure TGikoForm.ThreadFavoriteAddActionUpdate(Sender: TObject);
7155 ThreadFavoriteAddAction.Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
7158 procedure TGikoForm.TreeSelectFavoriteAddActionExecute(Sender: TObject);
7160 ShowFavoriteAddDialog(TObject(FClickNode.Data));
7163 procedure TGikoForm.FavoriteArrangeActionExecute(Sender: TObject);
7165 Dlg: TFavoriteArrangeDialog;
7167 Dlg := TFavoriteArrangeDialog.Create(Self);
7173 PostMessage( Handle, USER_SETLINKBAR, 0, 0 );
7176 procedure TGikoForm.BBSMenuItemOnClick(
7181 if Sender is TBBSMenuItem then
7182 ShowBBSTree( TBBSMenuItem( Sender ).Data );
7186 procedure TGikoForm.MainCoolBarResize(Sender: TObject);
7188 TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
7191 procedure TGikoForm.MoveToActionExecute(Sender: TObject);
7196 URL := Trim(AddressComboBox.Text);
7199 idx := AddressComboBox.Items.IndexOf(URL);
7200 if idx = -1 then begin
7201 AddressComboBox.Items.Insert(0, URL);
7202 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
7203 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
7205 AddressComboBox.Items.Delete(idx);
7206 AddressComboBox.Items.Insert(0, URL);
7210 procedure TGikoForm.MoveToURL(URL: string);
7213 protocol, host, path, document, port, bookmark : string;
7214 URL2, protocol2, host2, path2, document2, port2, bookmark2 : string;
7216 BBSID, BBSKey: string;
7218 ThreadItem: TThreadItem;
7221 tmpThread : TThreadItem;
7222 // category : TCategory;
7223 // categoryNode : TTreeNode;
7224 // boardNode : TTreeNode;
7225 shiftDown : Boolean;
7229 GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark );
7230 GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey );
7233 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
7234 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
7235 if shiftDown then begin
7236 GikoSys.OpenBrowser(URL, gbtUserApp);
7238 end else if ctrlDown then begin
7239 GikoSys.OpenBrowser(URL, gbtIE);
7243 //=====
\83v
\83\89\83O
\83C
\83\93
7246 bi := High( BoardPlugIns );
7247 for i := Low( BoardPlugIns ) to bi do begin
7248 if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
7249 case BoardPlugIns[ i ].AcceptURL( URL ) of
7252 tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL );
7253 boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
7254 Board := BBSsFindBoardFromURL( boardURL );
7255 if Board = nil then begin
7256 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
7257 //GikoSys.OpenBrowser(URL, gbtUserApp);
7260 Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL );
7261 if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
7262 ShowBBSTree( BBSs[ 1 ] );
7265 if not Board.IsThreadDatRead then begin
7266 GikoSys.ReadSubjectFile( Board );
7271 ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
7272 if ThreadItem = nil then begin
7273 ThreadItem := tmpThread;
7274 Board.Insert( 0, ThreadItem );
7275 if ActiveList is TBoard then begin
7276 if TBoard(ActiveList) = Board then
7277 ListView.Items.Count := ListView.Items.Count + 1;
7279 InsertBrowserTab( ThreadItem );
7280 DownloadContent( ThreadItem );
7284 InsertBrowserTab( ThreadItem );
7285 if not ThreadItem.IsLogFile then begin
7286 DownloadContent( ThreadItem );
7296 Board := BBSsFindBoardFromURL( URL );
7297 if Board <> nil then begin
7298 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
7299 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7300 SelectTreeNode( Board, True );
7308 // 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¢
7312 if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
7313 boardURL := GikoSys.Get2chThreadURL2BoardURL( URL );
7314 Board := BBSsFindBoardFromURL( boardURL );
7316 Board := BBSsFindBoardFromBBSID( BBSID );
7318 if Board = nil then begin
7319 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
7320 //
\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)
7321 Board := BBSs[ 0 ].FindBBSID( Copy(BBSID, 1 , Length(BBSID) - 1) );
7323 if Board = nil then begin
7324 //
\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
7325 GikoSys.OpenBrowser(URL, gbtUserApp);
7328 //
\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é
7330 GikoSys.ParseURI(URL2 , protocol2, host2, path2, document2, port2, bookmark2 );
7331 tmp1 := Copy(host, AnsiPos('.', host) + 1, Length(host));
7332 tmp2 := Copy(host2, AnsiPos('.', host2) + 1, Length(host2));
7333 if (tmp1 <> tmp2) then begin
7334 GikoSys.OpenBrowser(URL, gbtUserApp);
7339 if not Board.IsThreadDatRead then
7340 GikoSys.ReadSubjectFile(Board);
7341 URL := GikoSys.Get2chBrowsableThreadURL( URL );
7342 ThreadItem := Board.FindThreadFromURL( URL );
7343 //
\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)
7344 if ThreadItem = nil then begin
7345 ThreadItem := Board.FindThreadFromFileName( BBSKey + '.dat' );
7348 if ThreadItem = nil then begin
7349 //shift ->
\90Ý
\92è
\83u
\83\89\83E
\83U
\81i
\96³
\82¯
\82ê
\82ÎIE
\81j
7351 {shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
7352 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
7354 GikoSys.OpenBrowser(URL, gbtUserApp)
7355 else if ctrlDown then
7356 GikoSys.OpenBrowser(URL, gbtIE)
7359 ThreadItem := TThreadItem.Create( nil, URL );
7360 ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
7361 if AnsiPos(Host, Board.URL) = 0 then
7362 ThreadItem.DownloadHost := Host
7364 ThreadItem.DownloadHost := '';
7365 Board.Insert(0, ThreadItem);
7366 if ActiveList is TBoard then begin
7367 if TBoard(ActiveList) = Board then
7368 ListView.Items.Count := ListView.Items.Count + 1;
7370 InsertBrowserTab(ThreadItem);
7371 DownloadContent(ThreadItem);
7374 if ThreadItem.IsLogFile then
7375 InsertBrowserTab(ThreadItem)
7377 if AnsiPos(Host, Board.URL) = 0 then
7378 ThreadItem.DownloadHost := Host
7380 ThreadItem.DownloadHost := '';
7381 InsertBrowserTab(ThreadItem);
7382 DownloadContent(ThreadItem);
7386 Board := BBSsFindBoardFromURL( URL );
7387 if Board = nil then begin
7388 GikoSys.OpenBrowser(URL, gbtAuto);
7390 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
7391 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7392 SelectTreeNode( Board, True );
7397 procedure TGikoForm.AddressToolBarResize(Sender: TObject);
7399 AddressComboBox.Width := AddressToolBar.Width - MoveToToolButton.Width - 10;
7400 CoolBarResized( Sender, MainCoolBar );
7403 procedure TGikoForm.AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
7404 Shift: TShiftState);
7406 if Key = VK_RETURN then
7407 MoveToAction.Execute;
7410 procedure TGikoForm.BrowserEnter(Sender: TObject);
7412 Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
7415 procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
7417 CDS:PCopyDataStruct;
7421 CDS := Message.CopyDataStruct;
7422 GetMem(PC, CDS^.cbData);
7424 lstrcpy(PC,CDS^.lpData);
7425 SetString(sURL, PC,lstrlen(PC));
7430 Message.Result := 1;
7433 procedure TGikoForm.WndProc(var Message: TMessage);
7438 if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
7441 if Message.WParam = SC_MINIMIZE then
7444 TreeClick( TreeView.Selected );
7458 procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
7460 hComboEdit: THandle;
7461 // KeyData: Integer;
7464 if AddressComboBox.Focused or SelectComboBox.Focused then begin
7465 if Msg.CharCode in [VK_BACK] then begin
7466 hComboEdit := GetFocus;
7467 if hComboEdit <> 0 then
7468 SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, Msg.KeyData);
7469 // SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, $000E0001);
7472 if Msg.CharCode in [VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PRIOR, VK_NEXT] then begin
7473 hComboEdit := GetFocus;
7474 if hComboEdit <> 0 then
7475 SendMessage(hComboEdit, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
7479 //
\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ð
7480 KeyData := Msg.KeyData;
7481 if (KeyData and $20000000) = 0 then begin
7482 if Msg.CharCode in [Ord('F'), Ord('V'), Ord('B'), Ord('R'),
7483 Ord('A'), Ord('T'), Ord('H')] then begin
7484 if not ActionList.IsShortCut(Msg) then begin
7492 procedure TGikoForm.BrowserTabVisibleActionExecute(Sender: TObject);
7494 GikoSys.Setting.BrowserTabVisible := BrowserTabVisibleAction.Checked;
7498 procedure TGikoForm.BrowserTabTopActionExecute(Sender: TObject);
7500 BrowserTabBottomAction.Checked := False;
7501 BrowserTabTopAction.Checked := True;
7502 GikoSys.Setting.BrowserTabPosition := gtpTop;
7506 procedure TGikoForm.BrowserTabBottomActionExecute(Sender: TObject);
7508 BrowserTabTopAction.Checked := False;
7509 BrowserTabBottomAction.Checked := True;
7510 GikoSys.Setting.BrowserTabPosition := gtpBottom;
7514 procedure TGikoForm.BrowserTabTabStyleActionExecute(Sender: TObject);
7516 BrowserTabButtonStyleAction.Checked := False;
7517 BrowserTabFlatStyleAction.Checked := False;
7518 BrowserTabTabStyleAction.Checked := True;
7519 GikoSys.Setting.BrowserTabStyle := gtsTab;
7523 procedure TGikoForm.BrowserTabButtonStyleActionExecute(Sender: TObject);
7525 BrowserTabTabStyleAction.Checked := False;
7526 BrowserTabFlatStyleAction.Checked := False;
7527 BrowserTabButtonStyleAction.Checked := True;
7528 GikoSys.Setting.BrowserTabStyle := gtsButton;
7532 procedure TGikoForm.BrowserTabFlatStyleActionExecute(Sender: TObject);
7534 BrowserTabFlatStyleAction.Checked := True;
7535 BrowserTabTabStyleAction.Checked := False;
7536 BrowserTabButtonStyleAction.Checked := False;
7537 GikoSys.Setting.BrowserTabStyle := gtsFlat;
7541 procedure TGikoForm.PreviewTimerTimer(Sender: TObject);
7547 HtmlFileName: string;
7551 TargetFrameName: OleVariant;
7552 PostData: OleVariant;
7553 Headers: OleVariant;
7554 WindowHeight: Integer;
7555 WindowWidth: Integer;
7559 Protocol, Host, Path, Document, Port, Bookmark: string;
7561 PreviewTimer.Enabled := False;
7565 case GikoSys.Setting.PreviewSize of
7572 WindowHeight := 192;
7576 WindowHeight := 384;
7580 WindowHeight := 480;
7582 else begin //gpsMedium
7584 WindowHeight := 288;
7588 ARect := Rect(0, 0, WindowWidth, WindowHeight);
7590 case GikoSys.Setting.PopupPosition of
7591 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7592 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7593 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
7594 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
7595 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
7596 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
7597 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7598 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7599 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Ó
7602 html := '<html><head>'#13#10
7604 + 'function init() {'#13#10
7605 + ' if ((document.body.clientHeight >= Image1.height) && (document.body.clientWidth >= Image1.width)) {'#13#10
7607 + ' var dh, ih;'#13#10
7608 + ' dh = document.body.clientWidth / document.body.clientHeight;'#13#10
7609 + ' ih = Image1.width / Image1.height;'#13#10
7610 + ' if (document.body.clientWidth < document.body.clientHeight) {'#13#10
7611 + ' if (ih > dh)'#13#10
7612 + ' Image1.width = document.body.clientWidth;'#13#10
7614 + ' Image1.height = document.body.clientHeight;'#13#10
7616 + ' if (ih < dh)'#13#10
7617 + ' Image1.height = document.body.clientHeight;'#13#10
7619 + ' Image1.width = document.body.clientWidth;'#13#10
7622 + ' Message.style.display = "none";'#13#10
7626 + '<body topmargin="0" leftmargin="0" style="border-width: 1px; overflow:hidden; border-style: solid;" onLoad="init()">'#13#10
7627 + '<div align="center" id="Message">
\83v
\83\8c\83r
\83\85\81[
\8dì
\90¬
\92\86</div>'#13#10
7628 + '<div align="center"><img name="Image1" border="0" src="%ImageURL%"></div>'#13#10
7630 sl := TStringList.Create;
7633 HtmlFileName := GikoSys.GetAppDir + HTML_FILE_NAME;
7634 sl.Text := AnsiReplaceStr(html, '%ImageURL%', FPreviewURL);
7635 sl.SaveToFile(HtmlFileName);
7642 NavURL := HtmlFileName;
7644 TargetFrameName := '';
7647 GikoSys.ParseURI(FPreviewURL, Protocol, Host, Path, Document, Port, Bookmark);
7648 Referer := Protocol + '://' + Host;
7650 Referer := Referer + ':' + Port;
7651 Referer := Referer + Path;
7652 Headers := 'Referer: ' + Referer;
7653 FPreviewBrowser.Navigate(NavURL, Flags, TargetFrameName, PostData, Headers);
7654 if ARect.Top + WindowHeight > Screen.DesktopHeight then
7655 ARect.Top := Screen.DesktopHeight - WindowHeight;
7656 if ARect.Left + WindowWidth > Screen.DesktopWidth then
7657 ARect.Left := Screen.DesktopWidth - WindowWidth;
7658 if ARect.Left < Screen.DesktopLeft then ARect.Left := Screen.DesktopLeft;
7659 if ARect.Bottom < Screen.DesktopTop then ARect.Bottom := Screen.DesktopTop;
7661 SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
7662 ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
7664 // Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
7665 // SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
7669 procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
7671 if PreviewTimer.Enabled then
7672 PreviewTimer.Enabled := False;
7673 if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
7674 FHint.ReleaseHandle;
7677 if (FPreviewBrowser <> nil) and (IsWindowVisible(FPreviewBrowser.Handle)) then
7678 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
7679 Message.Result := 1;
7683 procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
7685 MsgBarCloseAction.Execute;
7688 function TGikoForm.OnDocumentContextMenu(Sender: TObject): WordBool;
7690 Doc: IHtmlDocument2;
7691 Range: IHTMLTxtRange;
7694 ThreadItem: TThreadItem;
7697 Doc := FactiveContent.FBrowser.Document as IHtmlDocument2;
7698 if Assigned(Doc) then begin
7699 Range := Doc.selection.createRange as IHTMLTxtRange;
7700 s := CustomStringReplace(Range.text, '
\81@', ' ');//
\91S
\8ap
\8bó
\94\92\82ð
\94¼
\8ap
\8bó
\94\92\82É
7701 s := ZenToHan(Trim(s));
7702 if GikoSys.IsNumeric(s) then begin
7704 ThreadItem := GetActiveContent;
7705 if ThreadItem <> nil then begin
7707 FHint.PopupType := gptThread;
7708 SetResPopupText(ThreadItem, Num, Num, False, False);
7709 if FHint.ResCount <> 0 then
7720 procedure TGikoForm.SetResPopupText(threadItem: TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
7732 boardPlugIn : TBoardPlugIn;
7735 if StNum > ToNum then begin
7741 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
7742 if StNum + MAX_POPUP_RES < ToNum then
7743 ToNum := StNum + MAX_POPUP_RES;
7745 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
7747 if ThreadItem <> nil then
7748 FHint.Title := ThreadItem.Title;
7750 if ThreadItem <> nil then begin
7751 if ThreadItem.IsBoardPlugInAvailable then begin
7752 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
7753 boardPlugIn := ThreadItem.BoardPlugIn;
7755 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
7756 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
7757 for i := StNum to ToNum do begin
7759 //
\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½
7760 tmp := boardPlugIn.GetDat( DWORD( threadItem ), i );
7761 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7762 Res := GikoSys.DivideStrLine(tmp);
7763 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7764 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7766 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7769 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7770 Body := CustomStringReplace(Body, '<br>', #10,true);
7771 Body := CustomStringReplace(Body, '</a>', '',true);
7772 Body := GikoSys.DeleteLink(Body);
7773 Body := CustomStringReplace(Body, '<', '<');
7774 Body := CustomStringReplace(Body, '>', '>');
7775 Body := CustomStringReplace(Body, '"', '"');
7776 Body := CustomStringReplace(Body, '&', '&');
7777 Body := CustomStringReplace(Body, ' ', ' ');
7779 FHint.Add(Header, Body);
7780 //FHint.Title := '';
7784 for i := StNum to ToNum do begin
7786 FileName := ThreadItem.FilePath;
7787 tmp := GikoSys.ReadThreadFile(FileName, Line);
7788 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7789 Res := GikoSys.DivideStrLine(tmp);
7790 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7791 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7793 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7795 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7796 Body := CustomStringReplace(Body, '<br>', #10,true);
7797 Body := CustomStringReplace(Body, '</a>', '',true);
7798 Body := GikoSys.DeleteLink(Body);
7799 Body := CustomStringReplace(Body, '<', '<');
7800 Body := CustomStringReplace(Body, '>', '>');
7801 Body := CustomStringReplace(Body, '"', '"');
7802 Body := CustomStringReplace(Body, '&', '&');
7803 Body := CustomStringReplace(Body, ' ', ' ');
7804 FHint.Add(Header, Body);
7805 //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
7814 procedure TGikoForm.ShowTextPopup;
7819 // if Trim(s) = '' then
7822 FHint.Font.Name := GikoSys.Setting.HintFontName;
7823 FHint.Font.Size := GikoSys.Setting.HintFontSize;
7824 FHint.Font.Color := GikoSys.Setting.HintFontColor;
7825 FHint.Color := GikoSys.Setting.HintBackColor;
7826 FHint.HeaderBold := GikoSys.Setting.ResPopupHeaderBold;
7828 if FHint.PopupType = gptRaw then
7829 ARect := FHint.CalcHintRect(Screen.Width, FHint.Caption, nil)
7831 ARect := FHint.CalcHintRect(Screen.Width, '', nil);
7832 case GikoSys.Setting.PopupPosition of
7833 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7834 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7835 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
7836 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
7837 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
7838 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
7839 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7840 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7841 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Ó
7843 //FHint.ActivateHint(ARect, s);
7844 if FHint.PopupType = gptRaw then
7845 FHint.ActivateHint(ARect, FHint.Caption)
7847 FHint.ActivateHint(ARect, '');
7849 FHint.ReleaseHandle;
7854 procedure TGikoForm.GikoHelpActionExecute(Sender: TObject);
7858 FileName := GikoSys.GetAppDir + 'batahlp.chm';
7859 if not FileExists(FileName) then begin
7862 '
\83w
\83\8b\83v
\82ª
\8c©
\82Â
\82©
\82è
\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½' + #13#10 +
7863 '
\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 +
7864 '
\83w
\83\8b\83v
\82Í
\83M
\83R
\83i
\83r
\82Ì
\83T
\83C
\83g
\82É
\92u
\82¢
\82Ä
\82 \82è
\82Ü
\82·',
7869 ShellExecute(Handle, 'open', PChar(FileName), '', PChar(GikoSys.GetAppDir), SW_SHOW);
7872 procedure TGikoForm.ToolButton18Click(Sender: TObject);
7874 DEL_MSG = '
\97\9a\97ð
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
7875 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
7877 if FTreeType = gttHistory then begin
7878 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
7879 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
7883 TreeView.Items.Clear;
7887 procedure TGikoForm.KotehanActionExecute(Sender: TObject);
7889 Dlg: TKotehanDialog;
7891 Dlg := TKotehanDialog.Create(Self);
7899 procedure TGikoForm.SetLinkBar;
7903 ToolButton: TLinkToolButton;
7904 MenuItem: TMenuItem;
7905 oldIgnoreResize : Boolean;
7907 oldIgnoreResize := FIsIgnoreResize;
7908 FIsIgnoreResize := True;
7909 MainCoolBar.Bands.BeginUpdate;
7911 LinkBarPopupMenu.Items.Clear;
7912 for i := LinkToolBar.ButtonCount - 1 downto 0 do
7913 //LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
7914 LinkToolBar.Buttons[i].Free;
7915 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
7916 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
7917 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
7918 ToolButton := TLinkToolButton.Create(LinkToolBar);
7919 // ToolButton.Parent := LinkToolBar;
7920 if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteFolder then begin
7921 MenuItem := TMenuItem.Create(Self);
7922 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
7923 LinkBarPopupMenu.Items.Add(MenuItem);
7924 ToolButton.MenuItem := MenuItem;
7925 ToolButton.ImageIndex := TOOL_ICON_FAV_FOLDER;
7926 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
7927 ToolButton.ImageIndex := TOOL_ICON_FAV_BOARD;
7928 ToolButton.OnClick := FavoriteClick;
7929 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
7930 ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
7931 ToolButton.OnClick := FavoriteClick;
7933 ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
7934 ToolButton.Left := 10000;
7935 ToolButton.Data := FavoriteTreeView.Items[i].Item[j].Data;
7936 ToolButton.AutoSize := True;
7937 ToolButton.OnDragDrop := LinkToolButtonDragDrop;
7938 ToolButton.OnDragOver := FavoriteDragOver;
7939 ToolButton.OnMouseDown := LinkToolButtonOnMouseDown;
7940 ToolButton.OnMouseMove := LinkToolButtonOnMouseMove;
7941 ToolButton.OnMouseUp := LinkToolButtonOnMouseUp;
7942 ToolButton.OnStartDrag := LinkToolButtonStartDrag;
7943 //ToolButton.DragMode := dmAutomatic;
7944 ToolButton.DragMode := dmManual;
7945 ToolButton.PopupMenu := FavoriteTreePopupMenu;
7947 LinkToolBar.InsertControl(ToolButton);
7952 { if LinkToolBar.ButtonCount = 0 then begin
7953 ToolButton := TLinkToolButton.Create(LinkToolBar);
7954 ToolButton.Style := tbsButton;
7955 ToolButton.ImageIndex := -1;
7956 ToolButton.Caption := '';
7957 LinkToolBar.InsertControl(ToolButton);
7960 MainCoolBar.Bands.EndUpdate;
7961 LoadCoolBarSettings;
7962 FIsIgnoreResize := oldIgnoreResize;
7966 procedure TGikoForm.FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
7974 if Sender = FavoriteTreeView then begin
7975 Node := FavoriteTreeView.GetNodeAt(X, Y);
7980 bound := Node.DisplayRect( False );
7981 height := bound.Bottom - bound.Top;
7982 if (bound.Top + height / 2) <= Y then
7983 Node := FavoriteTreeView.GetNodeAt(X, Y + height);
7988 if Node.IsFirstNode then
7993 if FDropSpaceNode <> nil then
7994 if FDropSpaceNode.AbsoluteIndex = Node.AbsoluteIndex then
7997 if Change then begin
7998 if FDropSpaceNode <> nil then
7999 FDropSpaceNode.Free;
8001 FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil );
8002 FDropSpaceNode.MoveTo( Node, naInsert );
8003 FDropSpaceNode.ImageIndex := -1;
8004 FDropSpaceNode.SelectedIndex := -1;
8008 if Source = FavoriteTreeView then begin
8009 if FavoriteTreeView.Selected = FavoriteTreeView.Items.GetFirstNode then begin
8014 end else if Source = BrowserTab then
8016 else if Source = ListView then
8018 else if Source is TLinkToolButton then
8020 else if Source = TreeView then
8026 procedure TGikoForm.FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
8029 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
8032 procedure TGikoForm.LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
8034 // FDragging := true;
8037 procedure TGikoForm.LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
8039 SenderNode: TTreeNode;
8040 LinkToolButton: TLinkToolButton;
8043 LinkToolButton := TLinkToolButton( Sender );
8044 SenderNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data );
8046 FavoriteDragDrop( SenderNode, Source );
8050 procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8052 favButton : TLinkToolButton;
8053 favThreadItem : TFavoriteThreadItem;
8059 if Sender is TLinkToolButton then begin
8060 favButton := TLinkToolButton( Sender );
8061 if TObject( favButton.Data ) is TFavoriteThreadItem then begin
8062 favThreadItem := TFavoriteThreadItem( favButton.Data );
8063 if favThreadItem.Item <> nil then
8064 InsertBrowserTab( favThreadItem.Item, False );
8072 procedure TGikoForm.LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
8076 TToolButton( Sender ).DragMode := dmManual;
8077 if ssLeft in Shift then begin
8078 // 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)
8079 if FDragTime = 0 then begin
8080 FDragTime := GetTickCount();
8082 Now := GetTickCount();
8083 if (Now - FDragTime) > 500 then begin
8084 if FDragButton <> TToolButton( Sender ) then begin
8086 FDragButton := TToolButton( Sender );
8087 TToolButton(Sender).BeginDrag(false ,5);
8090 {$IF Defined(debug)}
8091 ShowMessage('Error');
8102 procedure TGikoForm.LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8107 function TGikoForm.GetWidthAllToolButton(ToolBar: TToolBar): Integer;
8112 for i := 0 to ToolBar.ButtonCount - 1 do
8113 if ToolBar.Buttons[i].Visible then
8114 Result := Result + ToolBar.Buttons[i].Width;
8117 procedure TGikoForm.MainCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8119 Control : TWinControl;
8122 Control := FindControl(BandInfo^.hwndChild);
8123 if Control = nil then
8126 for i := MainCoolBar.Bands.Count - 1 downto 0 do begin
8127 if MainCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8128 idx := MainCoolBar.Bands[ i ].ID;
8132 Canvas.Font.Handle := GetStockObject( DEFAULT_GUI_FONT );
8133 if (Control = MenuToolBar) or (Control = StdToolBar) then begin
8134 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8135 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8136 BandInfo^.cxMinChild := 0;
8137 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth;
8138 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8139 end else if Control = LinkToolBar then begin
8140 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8141 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8142 BandInfo^.cxMinChild := 0;
8143 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83\8a\83\93\83N' );
8144 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8145 end else begin // AddressToolBar
8146 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8147 BandInfo^.cxMinChild := 0;
8148 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83A
\83h
\83\8c\83X' );
8152 procedure TGikoForm.MainCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8158 ChevronPopupMenu.Items.Clear;
8160 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
8161 if MainCoolBar.Bands[ i ].Visible then begin
8162 if Idx = Int64(RebarChevron^.uBand) then begin
8169 if (Idx >= 0) and (MainCoolBar.Bands.Count > Idx) then begin
8170 if MainCoolBar.Bands[Idx].Control = MenuToolbar then begin
8172 end else if MainCoolBar.Bands[Idx].Control = StdToolbar then begin
8173 ToolBarChevronMenu(StdToolBar);
8174 end else if MainCoolBar.Bands[Idx].Control = LinkToolbar then begin
8178 p := MainCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8179 ChevronPopupMenu.Popup(p.x, p.y);
8183 procedure TGikoForm.MenuBarChevronMenu;
8184 procedure SetSubMenu(MenuItem: TMenuItem; PopupItem: TMenuItem);
8190 for i := 0 to MenuItem.Count - 1 do begin
8192 if MenuItem[i] is TFavoriteMenuItem then begin
8193 Item := TFavoriteMenuItem.Create(Self);
8194 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(MenuItem[i]).Data;
8196 Item := TMenuItem.Create(Self);
8197 Item.Caption := MenuItem[i].Caption;
8198 Item.Action := MenuItem[i].Action;
8199 Item.ImageIndex := MenuItem[i].ImageIndex;
8200 Item.OnClick := MenuItem[i].OnClick;
8201 PopupItem.Add(Item);
8202 if MenuItem[i].Count > 0 then
8203 SetSubMenu(MenuItem[i], Item);
8212 ChevronPopupMenu.Items.Clear;
8213 ChevronPopupMenu.Images := MainMenu.Images;
8214 bw := GetWidthAllToolButton(MenuToolBar);
8215 if MenuToolBar.Width < bw then begin
8217 for i := 0 to MenuToolBar.ButtonCount - 1 do begin
8218 w := w + MenuToolBar.Buttons[i].Width;
8219 if MenuToolBar.Width <= w then begin
8220 Item := TMenuItem.Create(Self);
8221 Item.Caption := MenuToolBar.Buttons[i].MenuItem.Caption;
8222 //Item.Action := MenuToolBar.Buttons[i].MenuItem.Action;
8223 ChevronPopupMenu.Items.Add(Item);
8224 SetSubMenu(MenuToolbar.Buttons[i].MenuItem, Item);
8230 procedure TGikoForm.ToolBarChevronMenu(ToolBar: TToolBar);
8231 procedure SetSubMenu(PopupMenu: TPopupMenu; PopupItem: TMenuItem);
8236 if Assigned(PopupMenu.OnPopup) then
8237 PopupMenu.OnPopup(nil);
8238 for i := 0 to PopupMenu.Items.Count - 1 do begin
8240 if PopupMenu.Items[i] is TFavoriteMenuItem then begin
8241 Item := TFavoriteMenuItem.Create(Self);
8242 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(PopupMenu.Items[i]).Data;
8244 Item := TMenuItem.Create(Self);
8245 Item.Caption := PopupMenu.Items[i].Caption;
8246 Item.Action := PopupMenu.Items[i].Action;
8247 Item.ImageIndex := PopupMenu.Items[i].ImageIndex;
8248 Item.OnClick := PopupMenu.Items[i].OnClick;
8249 PopupItem.Add(Item);
8258 ChevronPopupMenu.Items.Clear;
8259 ChevronPopupMenu.Images := ToolBar.HotImages;
8260 bw := GetWidthAllToolButton(ToolBar);
8261 if ToolBar.Width < bw then begin
8263 for i := 0 to ToolBar.ButtonCount - 1 do begin
8264 w := w + ToolBar.Buttons[i].Width;
8265 if ToolBar.Width <= w then begin
8266 Case ToolBar.Buttons[i].Tag of
8269 Item := TMenuItem.Create(Self);
8270 if ToolBar.Buttons[i].Style = tbsSeparator then
8273 Item.Caption := ToolBar.Buttons[i].Caption;
8274 Item.Action := ToolBar.Buttons[i].Action;
8275 //Item.Visible := True;
8277 ChevronPopupMenu.Items.Add(Item);
8278 if ToolBar.Buttons[i].DropdownMenu <> nil then begin
8280 Item.OnClick := nil;
8281 SetSubMenu(ToolBar.Buttons[i].DropdownMenu, Item);
8285 //
\8f«
\97\88\82Ì
\82½
\82ß
\82Ì
\97\
\96ñ
8292 procedure TGikoForm.LinkBarChevronMenu;
8297 Item: TFavoriteMenuItem;
8299 Button: TLinkToolButton;
8301 ChevronPopupMenu.Items.Clear;
8302 ChevronPopupMenu.Images := LinkToolBar.Images;
8303 bw := GetWidthAllToolButton(LinkToolBar);
8304 if LinkToolBar.Width < bw then begin
8306 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
8307 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
8308 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
8309 w := w + LinkToolBar.Buttons[j].Width;
8310 if LinkToolBar.Width <= w then begin
8311 if LinkToolBar.Buttons[j] is TLinkToolButton then begin
8312 Button := TLinkToolButton(LinkToolBar.Buttons[j]);
8313 Item := TFavoriteMenuItem.Create(Self);
8314 if TObject(Button.Data) is TFavoriteFolder then begin
8315 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], Item);
8316 end else if TObject(Button.Data) is TFavoriteBoardItem then begin
8317 Item.OnClick := FavoriteClick;
8318 end else if TObject(Button.Data) is TFavoriteThreadItem then begin
8319 Item.OnClick := FavoriteClick;
8321 Item.Data := Button.Data;
8322 Item.Caption := LinkToolBar.Buttons[j].Caption;
8323 Item.ImageIndex := LinkToolBar.Buttons[j].ImageIndex;
8324 ChevronPopupMenu.Items.Add(Item);
8335 \brief
\83o
\83\93\83h
\95\9d\82ð
\8dÄ
\8cv
\8eZ
\81E
\8dÄ
\90Ý
\92è
\82·
\82é
8336 \param bar
\83o
\83\93\83h
\82ª
\8f\8a\91®
\82·
\82é CoolBar
8337 \param band
\8dÄ
\8cv
\8eZ
\81E
\8dÄ
\90Ý
\92è
\82·
\82é
\83o
\83\93\83h
8339 \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É
8340 \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
8342 procedure TGikoForm.ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
8344 bandInfo : tagREBARBANDINFOA;
8345 pBandInfo : PReBarBandInfoA;
8352 pBandInfo := @bandInfo;
8353 ZeroMemory( pBandInfo, sizeof( bandInfo ) );
8354 bandInfo.cbSize := sizeof( bandInfo );
8355 bandInfo.hwndChild := h;
8356 bandInfo.cyMinChild := bar.Height;
8357 bar.OnBandInfo( nil, pBandInfo );
8358 // band
\82Ì
\83C
\83\93\83f
\83b
\83N
\83X
\82ð
\92T
\82·
8360 for i := bar.Bands.Count - 1 downto 0 do begin
8361 if bar.Bands[ i ].Control.Handle = h then begin
8367 lResult := SendMessage( bar.Handle, RB_SETBANDINFO, i, Integer( pBandInfo ) );
8371 procedure TGikoForm.ListCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8373 Control: TWinControl;
8376 Control := FindControl(BandInfo^.hwndChild);
8377 if Control = nil then
8380 for i := ListCoolBar.Bands.Count - 1 downto 0 do begin
8381 if ListCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8382 idx := ListCoolBar.Bands[ i ].ID;
8386 if Control = ListToolBar then begin
8387 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8388 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8389 BandInfo^.cxMinChild := 0;
8390 BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
8391 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8393 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8394 BandInfo^.cxMinChild := 0;
8395 BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
8399 procedure TGikoForm.ListCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8404 ChevronPopupMenu.Items.Clear;
8405 Idx := RebarChevron^.uBand;
8406 if (Idx >= 0) and (ListCoolBar.Bands.Count > Idx) then begin
8407 if ListCoolBar.Bands[Idx].Control = ListToolBar then begin
8408 ToolBarChevronMenu(ListToolBar);
8411 p := ListCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8412 ChevronPopupMenu.Popup(p.x, p.y);
8416 procedure TGikoForm.BrowserCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8418 Control: TWinControl;
8421 Control := FindControl(BandInfo^.hwndChild);
8422 if Control = nil then
8425 for i := BrowserCoolBar.Bands.Count - 1 downto 0 do begin
8426 if BrowserCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8427 idx := BrowserCoolBar.Bands[ i ].ID;
8431 if Control = BrowserToolBar then begin
8432 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8433 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8434 BandInfo^.cxMinChild := 0;
8435 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
8436 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8438 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8439 BandInfo^.cxMinChild := 0;
8440 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
8444 procedure TGikoForm.BrowserCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8449 ChevronPopupMenu.Items.Clear;
8450 Idx := RebarChevron^.uBand;
8451 if (Idx >= 0) and (BrowserCoolBar.Bands.Count > Idx) then begin
8452 if BrowserCoolBar.Bands[Idx].Control = BrowserToolBar then
8453 ToolBarChevronMenu(BrowserToolBar)
8456 p := BrowserCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8457 ChevronPopupMenu.Popup(p.x, p.y);
8461 procedure TGikoForm.ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
8463 if Column^.iImage = -1 then begin
8464 Column^.mask := Column^.mask or LVCF_FMT;
8466 Column^.mask := Column^.mask or LVCF_FMT or LVCF_IMAGE;
8467 Column^.fmt := Column^.fmt or LVCFMT_IMAGE or LVCFMT_BITMAP_ON_RIGHT;
8471 procedure TGikoForm.ThreadEditorActionExecute(Sender: TObject);
8473 Editor: TEditorForm;
8475 if not (GetActiveList is TBoard) then
8477 Editor := TEditorForm.Create(Self);
8478 Editor.SetBoard(TBoard(GetActiveList));
8480 Editor.BodyEdit.SetFocus;
8483 procedure TGikoForm.ToolBarSettingActionExecute(Sender: TObject);
8485 Dlg: TToolBarSettingDialog;
8487 //Component: TComponent;
8489 Dlg := TToolBarSettingDialog.Create(Self, ActionList);
8491 Dlg.AddToolBar(StdToolBar, gttStandard);
8492 Dlg.AddToolBar(ListToolBar, gttList);
8493 Dlg.AddToolBar(BrowserToolBar, gttBrowser);
8494 case FToolBarSettingSender of
8495 tssMain: Dlg.ToolBarIndex := 0;
8496 tssList: Dlg.ToolBarIndex := 1;
8497 tssBrowser: Dlg.ToolBarIndex := 2;
8500 if ToolBarSettingAction.ActionComponent.GetParentComponent is TPopupMenu then begin
8501 Component := TPopupMenu( ToolBarSettingAction.ActionComponent.GetParentComponent ).PopupComponent;
8503 if Component = MainCoolBar then
8504 Dlg.ToolBarComboBox.ItemIndex := 0
8505 else if Component = ListCoolBar then
8506 Dlg.ToolBarComboBox.ItemIndex := 1
8507 else if Component = BrowserCoolBar then
8508 Dlg.ToolBarComboBox.ItemIndex := 2;
8511 if Dlg.ShowModal = mrOK then begin
8514 //
\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é
8515 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
8516 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth + 1;
8517 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth - 1;
8519 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
8520 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth + 1;
8521 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth - 1;
8523 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
8524 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth + 1;
8525 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth - 1;
8527 SaveToolBarSetting(StdToolBar);
8528 SaveToolBarSetting(ListToolBar);
8529 for i := ListToolBar.ControlCount - 1 downto 0 do
8531 if ListToolBar.Controls[ i ].Action = SelectItemAction then
8533 //
\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·
8534 if (i + 1) < ListToolBar.ControlCount then
8535 if ListToolBar.Controls[ i + 1 ] is TToolButton then
8536 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
8537 ListToolBar.Controls[ i + 1 ].Visible := False;
8539 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
8540 ListToolBar.Controls[ i ].Visible := False;
8541 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
8542 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
8543 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
8544 SelectComboBox.Parent := ListToolBar;
8545 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
8546 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
8547 SelectComboBoxSplitter.Parent := ListToolBar;
8552 ResetBandInfo( ListCoolBar, ListToolBar );
8553 SaveToolBarSetting(BrowserToolBar);
8557 FToolBarSettingSender := tssNone;
8561 function TGikoForm.FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
8566 for i := bar.ButtonCount - 1 downto 0 do begin
8567 if bar.Buttons[ i ].Action = action then begin
8568 Result := bar.Buttons[ i ];
8577 procedure TGikoForm.SetToolBarPopup;
8580 aIEButton : TToolButton;
8581 aCabinetBBSButton : TToolButton;
8582 aResRangeButton : TToolButton;
8583 aThreadRangeButton: TToolButton;
8585 for i := 0 to StdToolBar.ButtonCount - 1 do begin
8587 for i := 0 to ListToolBar.ButtonCount - 1 do begin
8588 if ListToolBar.Buttons[i].Action = IconStyle then
8589 ListToolBar.Buttons[i].DropdownMenu := ListIconPopupMenu;
8590 if ListToolBar.Buttons[i].Action = SelectReservAction then
8591 ListToolBar.Buttons[i].DropdownMenu := RoundNamePopupMenu;
8593 aIEButton := FindToolBarButton( BrowserToolBar, IEAction );
8594 if aIEButton <> nil then
8595 aIEButton.DropdownMenu := BrowserPopupMenu;
8596 aCabinetBBSButton := FindToolBarButton( StdToolBar, CabinetBBSAction );
8597 if aCabinetBBSButton <> nil then
8598 aCabinetBBSButton.DropdownMenu := BBSSelectPopupMenu;
8599 aResRangeButton := FindToolBarButton( BrowserToolBar, ResRangeAction );
8600 if aResRangeButton <> nil then
8601 aResRangeButton.DropdownMenu := ResRangePopupMenu;
8602 aThreadRangeButton:= FindToolBarButton( ListToolBar, ThreadRangeAction );
8603 if aThreadRangeButton <> nil then
8604 aThreadRangeButton.DropdownMenu := ThreadRangePopupMenu;
8607 procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState;
8608 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
8617 Wnd := WindowFromPoint(MousePos);
8619 if WheelDelta > 0 then
8624 if (Wnd = BrowserTab.Handle) or
8625 (Wnd = BrowserTab.Parent.Handle) then begin
8626 BrowserTab.ScrollTabs(Delta);
8627 end else if Wnd = ListView.Handle then begin
8628 if ListView.ViewStyle = vsList then
8629 ListView.Scroll( Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE, 0 )
8631 ListView.Scroll( 0, Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE );
8638 procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
8640 if Length( SelectComboBox.Text ) = 0 then
8642 AllItemAction.Checked := True;
8643 LogItemAction.Checked := False;
8644 NewItemAction.Checked := False;
8646 //
\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é
8647 if AllItemAction.Checked then
8648 AllItemAction.Checked := False;
8649 if LogItemAction.Checked then
8650 LogItemAction.Checked := False;
8651 if NewItemAction.Checked then
8652 NewItemaction.Checked := False;
8655 if Length( SelectComboBox.Text ) = 0 then
8656 SetListViewType( gvtAll )
8658 SetListViewType( gvtUser, SelectComboBox.Text, false);
8661 procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
8662 Shift: TShiftState);
8665 if Key = VK_Return then
8668 end else if Length( SelectComboBox.Text ) = 0 then
8670 AllItemAction.Checked := True;
8671 LogItemAction.Checked := False;
8672 NewItemAction.Checked := False;
8674 //
\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é
8675 if AllItemAction.Checked then
8676 AllItemAction.Checked := False;
8677 if LogItemAction.Checked then
8678 LogItemAction.Checked := False;
8679 if NewItemAction.Checked then
8680 NewItemaction.Checked := False;
8685 procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
8690 if Length( SelectComboBox.Text ) = 0 then
8692 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
8693 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
8698 //
\8di
\82è
\8d\9e\82Ý
\8c\9f\8dõ
\82Ì
\97\9a\97ð
\8dX
\90V
8699 procedure TGikoForm.ModifySelectList;
8706 if SelectComboBox.Parent = nil then
8709 if Length( SelectComboBox.Text ) > 0 then
8711 oldText := SelectComboBox.Text;
8712 idx := GikoSys.Setting.SelectTextList.IndexOf( oldText );
8714 GikoSys.Setting.SelectTextList.Delete( idx );
8715 idx := SelectComboBox.Items.IndexOf( oldText );
8717 SelectComboBox.Items.Delete( idx );
8718 GikoSys.Setting.SelectTextList.Insert( 0, oldText );
8719 SelectComboBox.Items.Insert( 0, oldText );
8720 SelectComboBox.Text := oldText;
8728 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\8dÄ
\93Ç
\82Ý
\8d\9e\82Ý
\82·
\82é
8729 procedure TGikoForm.SelectResActionExecute(Sender: TObject);
8731 Dlg: TListSelectDialog;
8732 ThreadItem : TThreadItem;
8733 FilterList : TStringList;
8736 Dlg := TListSelectDialog.Create(Self);
8738 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
8739 Dlg.SelectComboBox.Text := FSelectResWord;
8741 if Dlg.ModalResult = mrOK then begin
8742 SelectResAction.Checked := True;
8743 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
8744 //
\8bó
\93ü
\97Í
\82Å OK
\82Í
\8di
\82è
\8d\9e\82Ý
\89ð
\8f\9c\82Æ
\93¯
\88Ó
\8b`
8745 ResRangeAction.Execute;
8747 GikoSys.ResRange := Ord( grrSelect );
8749 //
\8dÅ
\8cã
\82É
\90Ý
\92è
\82µ
\82½
\82à
\82Ì
\82ð
\8ao
\82¦
\82Ä
\82¨
\82
8750 FSelectResWord := Dlg.SelectComboBox.Text;
8752 //
\8c\9f\8dõ
\97\9a\97ð
\82Ì
\8dX
\90V
8753 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
8755 GikoSys.Setting.SelectTextList.Delete(idx);
8756 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
8757 while Dlg.SelectComboBox.Items.Count > 100 do begin
8758 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
8762 if SelectComboBox.Parent <> nil then
8763 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
8767 //
\83t
\83B
\83\8b\83^
\82Ì
\90Ý
\92è
8768 FilterList := TStringList.Create;
8770 GikoSys.FSelectResFilter.Reverse := True;
8771 FilterList.Delimiter := ' '; //
\8bæ
\90Ø
\82è
\8eq
\82ð
\94¼
\8ap
\83X
\83y
\81[
\83X
\82É
\90Ý
\92è
8772 FilterList.DelimitedText := Dlg.SelectComboBox.Text;
8774 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8779 //
\83X
\83\8c\83b
\83h
\82Ì
\8dÄ
\95`
\89æ
8780 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
8781 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8783 ThreadItem := GetActiveContent;
8784 if ThreadItem <> nil then
8785 InsertBrowserTab( ThreadItem, True );
8788 //
\83L
\83\83\83\93\83Z
\83\8b
8789 if GikoSys.ResRange <> Ord( grrSelect ) then
8790 ResRangeAction.Execute;
8798 procedure TGikoForm.SelectResActionUpdate(Sender: TObject);
8800 SelectResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
8803 procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;
8804 Shift: TShiftState);
8808 //
\91S
\82Ä
\82Ì
\83\8c\83X
\82ð
\95\
\8e¦
8809 procedure TGikoForm.AllResActionExecute(Sender: TObject);
8811 ThreadItem : TThreadItem;
8812 FilterList : TStringList;
8815 if(FActiveContent <> nil) and (FActiveContent.FBrowser <> nil )
8816 and (FActiveContent.FBrowser.Busy) then Exit;
8818 FResRangeMenuSelect := Ord( grrAll );
8819 AllResAction.Checked := True;
8821 if GikoSys.ResRange <> Ord( grrAll ) then begin
8822 GikoSys.ResRange := Ord( grrAll );
8824 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
8825 FilterList := TStringList.Create;
8827 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8828 GikoSys.FSelectResFilter.Reverse := False;
8833 FSelectResWord := '';
8835 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
8836 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
8837 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8839 ThreadItem := GetActiveContent;
8840 if ThreadItem <> nil then
8841 InsertBrowserTab( ThreadItem, True );
8845 procedure TGikoForm.AllResActionUpdate(Sender: TObject);
8847 AllResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
8850 procedure TGikoForm.ReloadClick(Sender: TObject);
8852 ThreadItem : TThreadItem;
8855 if GikoSys.FAbon.ReLoadFromNGwordFile =false then begin
8856 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);
8858 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8859 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8861 ThreadItem := GetActiveContent;
8862 if ThreadItem <> nil then
8863 InsertBrowserTab( ThreadItem, True );
8868 procedure TGikoForm.GoBackClick(Sender: TObject);
8870 ThreadItem : TThreadItem;
8874 if GikoSys.FAbon.GoForward =false then begin
8875 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);
8877 s := GikoSys.FAbon.NGwordname;
8878 StatusBar.Panels.Items[2].Text := s;
8879 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8880 StatusBarResize(Sender);
8881 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8882 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8884 ThreadItem := GetActiveContent;
8885 if ThreadItem <> nil then
8886 InsertBrowserTab( ThreadItem, True );
8891 procedure TGikoForm.GoFowardClick(Sender: TObject);
8893 ThreadItem : TThreadItem;
8897 if GikoSys.FAbon.GoBack =false then begin
8898 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);
8900 s := GikoSys.FAbon.NGwordname;
8901 StatusBar.Panels.Items[2].Text := s;
8902 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8903 StatusBarResize(Sender);
8904 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8905 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8907 ThreadItem := GetActiveContent;
8908 if ThreadItem <> nil then
8909 InsertBrowserTab( ThreadItem, True );
8914 procedure TGikoForm.SelectComboBoxSplitterMouseMove(Sender: TObject;
8915 Shift: TShiftState; X, Y: Integer);
8920 If (SelectComboBox.Parent <> nil) and (IsDraggingSelectComboBox) Then begin
8923 pos := SelectComboBoxSplitter.ClientToScreen( pos );
8924 w := SelectComboBox.Width + (pos.X - DraggingSelectComboBoxPosition.X);
8926 If w <= 50 Then Begin
8927 //
\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
8928 //
\81u
\8e~
\82Ü
\82Á
\82½(50pixel)
\88Ê
\92u
\81v
\82É
\82È
\82é
\82æ
\82¤
\82É
8929 pos.X := pos.X + (50 - w);
8931 //
\8f¬
\82³
\82
\82È
\82è
\82·
\82¬
\82È
\82¢
\82æ
\82¤
\82É
8935 //
\83`
\83\89\82Â
\82«
\8cy
\8c¸
\82Ì
\88×
8936 If SelectComboBox.Width <> w Then Begin
8937 SelectComboBox.Width := w;
8938 GikoSys.Setting.SelectComboBoxWidth := w;
8939 DraggingSelectComboBoxPosition := pos;
8941 //
\83V
\83F
\83u
\83\8d\83\93\88Ê
\92u
\82ª
\95Ï
\82í
\82é
\82Ì
\82Å BandInfo
\82Ì
\8dÄ
\90Ý
\92è
8942 ResetBandInfo( ListCoolBar, ListToolBar );
8947 procedure TGikoForm.SelectComboBoxSplitterMouseDown(Sender: TObject;
8948 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8952 IsDraggingSelectComboBox := True;
8955 DraggingSelectComboBoxPosition := SelectComboBoxSplitter.ClientToScreen( pos );
8958 procedure TGikoForm.SelectComboBoxSplitterMouseUp(Sender: TObject;
8959 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8961 IsDraggingSelectComboBox := False;
8964 procedure TGikoForm.StatusBarResize(Sender: TObject);
8966 StatusBar.Panels[1].Width := StatusBar.Width -
8967 StatusBar.Panels[0].Width -
8968 StatusBar.Panels[2].Width;
8970 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\92Ê
\8fí
\81v
8971 procedure TGikoForm.IndividualAbon1Click(Sender: TObject);
8973 ThreadItem : TThreadItem;
8976 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,1);
8977 ThreadItem := GetActiveContent;
8978 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8979 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8981 if ThreadItem <> nil then
8982 InsertBrowserTab( ThreadItem, True );
8984 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\93§
\96¾
\81v
8985 procedure TGikoForm.IndividualAbon2Click(Sender: TObject);
8987 ThreadItem : TThreadItem;
8990 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,0);
8991 ThreadItem := GetActiveContent;
8992 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8993 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8994 if ThreadItem <> nil then
8995 InsertBrowserTab( ThreadItem, True );
8997 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c\81i
\81j
8998 procedure TGikoForm.AntiIndividualAbonClick(Sender: TObject);
9000 ThreadItem : TThreadItem;
9004 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
9005 GikoSys.FAbon.DeleteIndividualAbon(KokoPopupMenu.Tag);
9006 ThreadItem := GetActiveContent;
9007 for i := BrowserTab.Tabs.Count - 1 downto 0 do
9008 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
9009 if ThreadItem <> nil then
9010 InsertBrowserTab( ThreadItem, True );
9012 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
9013 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
9016 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c
9017 procedure TGikoForm.N42Click(Sender: TObject);
9019 IndividualForm :TIndividualAbonForm;
9020 ThreadItem : TThreadItem;
9024 IndividualForm := TIndividualAbonForm.Create(Self);
9026 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
9027 for i :=0 to GikoSys.FAbon.GetAbonResCount-1 do begin
9028 IndividualForm.ComboBox1.Items.Add(GikoSys.FAbon.GetAbonResString(i));
9030 if IndividualForm.ShowModal = mrOK then begin
9031 GikoSys.FAbon.DeleteIndividualAbon(IndividualForm.ResNumber);
9033 for i := BrowserTab.Tabs.Count - 1 downto 0 do
9034 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
9035 ThreadItem := GetActiveContent;
9036 if ThreadItem <> nil then
9037 InsertBrowserTab( ThreadItem, True );
9039 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
9040 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
9043 IndividualForm.Free;
9047 procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
9050 if (Length( SelectComboBox.Text ) = 0) or
9051 (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
9053 SelectComboBox.Text := '';
9054 SelectComboBox.Color := clWindow;
9059 procedure TGikoForm.N51Click(Sender: TObject);
9063 //
\94Â
\96¼
\8c\9f\8dõ
9064 procedure TGikoForm.TreeSelectSearchBoardNameExecute(Sender: TObject);
9068 CurItem : TTreeNode;
9071 if InputQuery('
\94Â
\96¼
\8c\9f\8dõ','
\94Â
\96¼
\82Ì
\93ü
\97Í',s) then begin
9074 if TreeView.Selected = nil then
9075 CurItem := TreeView.Items.GetFirstNode
9077 CurItem := TreeView.Selected.GetNext;
9078 if CurItem = nil then
9079 CurItem := TreeView.Items.GetFirstNode;
9081 while CurItem <> nil do begin
9082 if (CurItem.ImageIndex <> 2) and (VaguePos(s,CurItem.Text) <> 0) then begin
9085 CurItem := CurItem.GetNext;
9088 if CurItem = nil then begin
9089 msg := '
\90æ
\93ª
\82É
\96ß
\82è
\82Ü
\82·
\82©
\81H';
9090 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
9091 CurItem := TreeView.Items.GetFirstNode;
9095 TreeView.Select(CurItem);
9098 TreeView.Select(CurItem);
9100 msg := '
\8e\9f\82É
\8ds
\82«
\82Ü
\82·
\82©
\81H';
9101 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
9115 procedure TGikoForm.CabinetFavoriteActionExecute(Sender: TObject);
9121 if CabinetPanel.Visible then begin
9122 if FTreeType = gttFavorite then begin
9123 CabinetVisible( False );
9124 CabinetFavoriteAction.Checked := False;
9126 CabinetFavoriteAction.Checked := True;
9129 CabinetVisible( True );
9130 CabinetFavoriteAction.Checked := True;
9133 // BBS...BBS, History, Favorite
9134 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 1;
9136 b := CabinetSelectPopupMenu.Items.Count - 1;
9137 for i := 0 to b do begin
9138 item := CabinetSelectPopupMenu.Items[ i ];
9139 if item is TBBSMenuItem then begin
9140 item.Checked := False;
9141 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
9142 CabinetMenu.Items[ i ].Checked := False;
9146 //
\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Ö
9147 HistoryToolBar.Hide;
9148 FavoriteToolBar.Show;
9149 TreeView.Visible := False;
9150 FavoriteTreeView.Visible := True;
9152 CabinetSelectToolButton.Caption := '
\82¨
\8bC
\82É
\93ü
\82è';
9153 FTreeType := gttFavorite;
9155 //
\83\81\83j
\83\85\81[
\8by
\82Ñ
\83{
\83^
\83\93\82Ì
\83`
\83F
\83b
\83N
\82ð
\90Ý
\92è
9156 CabinetBBSAction.Checked := False;
9157 CabinetHistoryAction.Checked := False;
9159 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\83c
\83\8a\81[
\82ð
\93W
\8aJ
9160 FavoriteTreeView.Items.GetFirstNode.Expanded := True;
9164 procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
9167 if (SenderNode = nil) or (SourceNode = nil) or (SenderNode = SourceNode) then
9170 if TObject(SenderNode.Data) is TFavoriteFolder then
9171 SourceNode.MoveTo(SenderNode, naAddChild)
9173 SourceNode.MoveTo(SenderNode, naInsert);
9177 procedure TGikoForm.FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
9181 FavoBoardItem: TFavoriteBoardItem;
9182 FavoThreadItem: TFavoriteThreadItem;
9184 ThreadItem: TThreadItem;
9187 if (SenderNode = nil) or (Source = nil) then
9190 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
9191 FavNode := SenderNode.Parent
9193 FavNode := SenderNode;
9197 if Source is TBoard then begin
9198 Board := TBoard( Source );
9199 FavoBoardItem := TFavoriteBoardItem.CreateWithItem( Board );
9200 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, FavoBoardItem);
9201 Node.ImageIndex := 15;
9202 Node.SelectedIndex := 15;
9203 end else if Source is TFavoriteBoardItem then begin
9204 FavoBoardItem := TFavoriteBoardItem( Source );
9205 Board := FavoBoardItem.Item;
9206 if Board <> nil then
9207 if not Board.IsThreadDatRead then
9208 GikoSys.ReadSubjectFile(Board);
9209 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, Source);
9210 Node.ImageIndex := 15;
9211 Node.SelectedIndex := 15;
9212 end else if Source is TThreadItem then begin
9213 ThreadItem := TThreadItem( Source );
9214 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
9215 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
9216 Node.ImageIndex := 16;
9217 Node.SelectedIndex := 16;
9218 end else if Source is TBrowserRecord then begin
9219 ThreadItem := TBrowserRecord( Source ).FThread;
9220 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
9221 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
9222 Node.ImageIndex := 16;
9223 Node.SelectedIndex := 16;
9224 end else if Source is TFavoriteThreadItem then begin
9225 FavoThreadItem := TFavoriteThreadItem( Source );
9226 ThreadItem := FavoThreadItem.Item;
9227 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, Source);
9228 Node.ImageIndex := 16;
9229 Node.SelectedIndex := 16;
9232 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
9234 FavoriteMoveTo( SenderNode, Node );
9238 procedure TGikoForm.FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
9241 SourceNode: TTreeNode;
9242 LinkToolButton: TLinkToolButton;
9245 if SenderNode = nil then
9248 if not (TObject( SenderNode.Data ) is TFavoriteFolder) then
9249 if FDropSpaceNode <> nil then
9250 SenderNode := FDropSpaceNode;
9252 if Source = FavoriteTreeView then begin
9254 SourceNode := FavoriteTreeView.Selected;
9255 FavoriteMoveTo( SenderNode, SourceNode );
9257 end else if Source is TLinkToolButton then begin
9259 LinkToolButton := TLinkToolButton( Source );
9260 //ShowMessage(LinkToolButton.Text);
9261 SourceNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data );
9262 FavoriteMoveTo( SenderNode, SourceNode );
9264 end else if Source = BrowserTab then begin
9266 idx := BrowserTab.TabIndex;
9267 FavoriteAddTo( SenderNode, BrowserTab.Tabs.Objects[idx] );
9268 end else if Source = ListView then begin
9270 FavoriteAddTo( SenderNode, ListView.Selected.Data );
9272 end else if Source = TreeView then begin
9274 FavoriteAddTo( SenderNode, TreeView.Selected.Data );
9282 procedure TGikoForm.FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
9285 SenderNode: TTreeNode;
9288 SenderNode := FavoriteTreeView.GetNodeAt(X, Y);
9289 if SenderNode <> nil then begin
9290 FavoriteDragDrop( SenderNode, Source );
9293 if FDropSpaceNode <> nil then begin
9294 FDropSpaceNode.Free;
9295 FDropSpaceNode := nil;
9300 procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
9301 Node: TTreeNode; var S: String);
9304 FavoriteTreeView.ReadOnly := True;
9309 procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
9310 Shift: TShiftState);
9316 FClickNode := FavoriteTreeView.Selected;
9317 FavoriteTreeViewRenameActionExecute( Sender );
9321 FClickNode := FavoriteTreeView.Selected;
9322 FavoriteTreeViewDeleteActionExecute( Sender );
9326 FavoriteClick( FavoriteTreeView.Selected );
9327 FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
9330 FavoriteTreeViewDblClick( Sender );
9335 procedure TGikoForm.FavoriteTreePopupMenuPopup(Sender: TObject);
9338 LinkToolButton: TLinkToolButton;
9341 if FavoriteTreePopupMenu.PopupComponent = FavoriteTreeView then begin
9343 FClickNode := FavoriteTreeView.Selected;
9345 end else if FavoriteTreePopupMenu.PopupComponent is TLinkToolButton then begin
9347 LinkToolButton := TLinkToolButton( FavoriteTreePopupMenu.PopupComponent );
9348 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
9349 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
9350 FClickNode := FavoriteTreeView.Items[i];
9354 for i := 0 to FClickNode.Count - 1 do begin
9355 if FClickNode.Item[i].Data = LinkToolButton.Data then begin
9356 FClickNode := FClickNode.Item[i];
9363 if FClickNode = nil then begin
9364 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9365 FavoriteTreeDeletePopupMenu.Visible := False;
9366 FavoriteTreeRenamePopupMenu.Visible := False;
9367 FavoriteTreeNewFolderPopupMenu.Visible := False;
9368 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9369 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9370 FavoriteTreeURLCopyPopupMenu.Visible := False;
9371 FavoriteTreeNameCopyPopupMenu.Visible := False;
9372 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9373 FavoriteTreeReloadPopupMenu.Visible := False;
9374 FavoriteTreeLogDeletePopupMenu.Visible := False;
9375 end else if FClickNode.IsFirstNode then begin
9376 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9377 FavoriteTreeDeletePopupMenu.Visible := False;
9378 FavoriteTreeRenamePopupMenu.Visible := False;
9379 FavoriteTreeNewFolderPopupMenu.Visible := True;
9380 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9381 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9382 FavoriteTreeURLCopyPopupMenu.Visible := False;
9383 FavoriteTreeNameCopyPopupMenu.Visible := True;
9384 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9385 FavoriteTreeReloadPopupMenu.Visible := False;
9386 FavoriteTreeLogDeletePopupMenu.Visible := False;
9387 end else if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
9388 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9389 FavoriteTreeDeletePopupMenu.Visible := True;
9390 FavoriteTreeRenamePopupMenu.Visible := False;
9391 FavoriteTreeNewFolderPopupMenu.Visible := True;
9392 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9393 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9394 FavoriteTreeURLCopyPopupMenu.Visible := False;
9395 FavoriteTreeNameCopyPopupMenu.Visible := True;
9396 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9397 FavoriteTreeReloadPopupMenu.Visible := False;
9398 FavoriteTreeLogDeletePopupMenu.Visible := False;
9399 end else if TObject(FClickNode.Data) is TFavoriteFolder then begin
9400 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9401 FavoriteTreeDeletePopupMenu.Visible := True;
9402 FavoriteTreeRenamePopupMenu.Visible := True;
9403 FavoriteTreeNewFolderPopupMenu.Visible := True;
9404 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9405 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9406 FavoriteTreeURLCopyPopupMenu.Visible := False;
9407 FavoriteTreeNameCopyPopupMenu.Visible := True;
9408 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9409 FavoriteTreeReloadPopupMenu.Visible := False;
9410 FavoriteTreeLogDeletePopupMenu.Visible := False;
9411 end else if TObject(FClickNode.Data) is TFavoriteThreadItem then begin
9412 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9413 FavoriteTreeDeletePopupMenu.Visible := True;
9414 FavoriteTreeRenamePopupMenu.Visible := True;
9415 FavoriteTreeNewFolderPopupMenu.Visible := True;
9416 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
9417 //FavoriteTreeBrowseThreadPopupMenu.Visible := True;
9418 FavoriteTreeURLCopyPopupMenu.Visible := True;
9419 FavoriteTreeNameCopyPopupMenu.Visible := True;
9420 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
9421 FavoriteTreeReloadPopupMenu.Visible := True;
9422 FavoriteTreeLogDeletePopupMenu.Visible := True;
9423 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
9424 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9425 FavoriteTreeDeletePopupMenu.Visible := True;
9426 FavoriteTreeRenamePopupMenu.Visible := True;
9427 FavoriteTreeNewFolderPopupMenu.Visible := True;
9428 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
9429 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9430 FavoriteTreeURLCopyPopupMenu.Visible := True;
9431 FavoriteTreeNameCopyPopupMenu.Visible := True;
9432 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
9433 FavoriteTreeReloadPopupMenu.Visible := True;
9434 FavoriteTreeLogDeletePopupMenu.Visible := False;
9436 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9437 FavoriteTreeDeletePopupMenu.Visible := False;
9438 FavoriteTreeRenamePopupMenu.Visible := False;
9439 FavoriteTreeNewFolderPopupMenu.Visible := False;
9440 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9441 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9442 FavoriteTreeURLCopyPopupMenu.Visible := False;
9443 FavoriteTreeNameCopyPopupMenu.Visible := False;
9444 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9445 FavoriteTreeReloadPopupMenu.Visible := False;
9446 FavoriteTreeLogDeletePopupMenu.Visible := False;
9451 procedure TGikoForm.FavoriteTreeViewDeleteActionExecute(Sender: TObject);
9453 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';
9454 DEL_MSG = '
\81g^0
\81h
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
9455 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
9458 if FClickNode = nil then
9460 if FClickNode.IsFirstNode then
9462 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
9463 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
9464 if MsgBox(Handle, DEL_LINK_MSG, DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
9467 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
9472 //FDeleteList.Add(FClickNode.Data);
9473 //SetDeleteItemList(FClickNode);
9481 procedure TGikoForm.FavoriteTreeViewRenameActionExecute(Sender: TObject);
9486 if FClickNode = nil then
9488 if FClickNode.IsFirstNode then
9490 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then
9492 FavoriteTreeView.ReadOnly := False;
9493 if (FTreeType = gttFavorite) and (CabinetPanel.Visible) then begin
9494 node := FClickNode.Parent;
9495 while node <> nil do begin
9496 node.Expanded := True;
9497 node := node.Parent;
9499 FClickNode.EditText;
9501 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 );
9508 procedure TGikoForm.FavoriteTreeViewNewFolderActionExecute(
9511 NewFavFolder: TFavoriteFolder;
9515 if FClickNode = nil then
9519 if not (TObject(FClickNode.Data) is TFavoriteFolder) then begin
9520 FavoriteTreeView.Selected := FClickNode.Parent;
9521 FClickNode := FClickNode.Parent;
9524 NewFavFolder := TFavoriteFolder.Create;
9525 Node := FavoriteTreeView.Items.AddChildObject(FClickNode, '
\90V
\82µ
\82¢
\83t
\83H
\83\8b\83_', NewFavFolder);
9526 Node.ImageIndex := 14;
9527 Node.SelectedIndex := 14;
9528 // FClickNode.Selected.Expanded := True;
9529 FavoriteTreeView.Selected := Node;
9531 FavoriteTreeViewRenameAction.Execute;
9537 procedure TGikoForm.ToolButton19Click(Sender: TObject);
9540 FavoriteArrangeActionExecute( nil );
9544 procedure TGikoForm.FavoriteBrowseFolder( node: TTreeNode );
9549 if not (TObject(node.Data) is TFavoriteFolder) then
9552 for i := 0 to node.Count - 1 do
9554 if TObject(node.Item[i].Data) is TFavoriteFolder then
9555 FavoriteBrowseFolder( node.Item[i] )
9556 else if TObject(node.Item[i].Data) is TFavoriteThreadItem then
9557 FavoriteClick( node.Item[i], False );
9562 procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
9566 FavoriteBrowseFolder( FClickNode );
9567 //BrowserTab.OnChange(nil);
9571 procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
9574 FClickNode := FavoriteTreeView.Selected;
9575 FavoriteTreeViewReloadActionExecute( Sender );
9579 procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
9582 DEL_MSG = '
\81g^0
\81h
\82Ì
\83\8d\83O
\82ð
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
9583 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
9585 ThreadItem: TThreadItem;
9586 FavThread: TFavoriteThreadItem;
9589 if FClickNode = nil then Exit;
9590 if not (TObject(FClickNode.Data) is TFavoriteThreadItem) then Exit;
9592 FavThread := TFavoriteThreadItem( FClickNode.Data );
9593 ThreadItem := FavThread.Item;
9596 if GikoSys.Setting.DeleteMsg then begin
9597 if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then
9598 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then
9602 DeleteHistory(ThreadItem);
9603 DeleteTab(ThreadItem);
9604 ThreadItem.DeleteLogFile;
9612 procedure TGikoForm.FavoriteTreeViewReloadActionExecute(Sender: TObject);
9614 ThreadItem: TThreadItem;
9615 FavThread: TFavoriteThreadItem;
9617 FavBoard: TFavoriteBoardItem;
9621 if FClickNode = nil then Exit;
9623 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
9625 if TObject( FClickNode.Data ) is TFavoriteThreadItem then begin
9626 FavThread := TFavoriteThreadItem( FClickNode.Data );
9627 ThreadItem := FavThread.Item;
9628 if ThreadItem <> nil then
9629 DownloadContent(ThreadItem, shiftDown);
9630 end else if TObject( FClickNode.Data ) is TFavoriteBoardItem then begin
9631 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9632 Board := FavBoard.Item;
9633 DownloadList(Board, shiftDown);
9638 procedure TGikoForm.FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
9640 FavThread : TFavoriteThreadItem;
9641 FavBoard : TFavoriteBoardItem;
9645 if FClickNode = nil then Exit;
9647 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9649 FavThread := TFavoriteThreadItem( FClickNode.Data );
9650 s := FavThread.URL + #13#10;
9652 Clipboard.AsText := s;
9654 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9656 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9657 s := FavBoard.URL + #13#10;
9659 Clipboard.AsText := s;
9665 procedure TGikoForm.FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
9667 ThreadItem: TThreadItem;
9668 FavThread: TFavoriteThreadItem;
9670 FavBoard: TFavoriteBoardItem;
9674 if FClickNode = nil then Exit;
9676 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9678 FavThread := TFavoriteThreadItem( FClickNode.Data );
9679 ThreadItem := FavThread.Item;
9682 s := ThreadItem.Title + #13#10;
9684 Clipboard.AsText := s;
9688 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9690 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9691 Board := FavBoard.Item;
9692 if Board <> nil then
9693 if not Board.IsThreadDatRead then
9694 GikoSys.ReadSubjectFile(Board);
9697 s := Board.Title + #13#10;
9699 Clipboard.AsText := s;
9707 procedure TGikoForm.FavoriteTreeViewNameURLCopyActionExecute(
9710 ThreadItem: TThreadItem;
9711 FavThread: TFavoriteThreadItem;
9713 FavBoard: TFavoriteBoardItem;
9717 if FClickNode = nil then Exit;
9719 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9721 FavThread := TFavoriteThreadItem( FClickNode.Data );
9722 ThreadItem := FavThread.Item;
9725 s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10;
9727 Clipboard.AsText := s;
9731 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9733 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9734 Board := FavBoard.Item;
9735 if Board <> nil then
9736 if not Board.IsThreadDatRead then
9737 GikoSys.ReadSubjectFile(Board);
9740 s := Board.URL + #13#10 + Board.Title + #13#10;
9742 Clipboard.AsText := s;
9750 function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
9756 for i := 0 to Node.Count - 1 do begin
9757 if Node.Item[i].Data = FindPointer then begin
9758 Result := Node.Item[i];
9760 end else if Node.Item[i].Count > 0 then begin
9761 Found := TreeNodeDataFind( Node.Item[i], FindPointer );
9762 if Found <> nil then begin
9773 procedure TGikoForm.LinkToolBarDragDrop(Sender, Source: TObject; X,
9777 SenderNode: TTreeNode;
9781 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
9782 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
9783 SenderNode := FavoriteTreeView.Items[i];
9788 FavoriteDragDrop( SenderNode, Source );
9792 procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
9793 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
9795 if FDragWFirst <> true then begin
9796 FDragWFirst := false;
9797 end else if (X = FMouseDownPos.X) and (Y = FMouseDownPos.Y) then begin
9798 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
9799 if GikoSys.Setting.ListWidthState = glsMin then begin
9800 BrowserMaxAndFocusAction.Execute;
9803 if GikoSys.Setting.ListHeightState = glsMin then begin
9804 BrowserMaxAndFocusAction.Execute;
9810 procedure TGikoForm.LinkToolBarDragOver(Sender, Source: TObject; X,
9811 Y: Integer; State: TDragState; var Accept: Boolean);
9814 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
9818 procedure TGikoForm.ResRangeActionExecute(Sender: TObject);
9820 case FResRangeMenuSelect of
9821 Ord( grrAll ): AllResAction.Execute;
9822 Ord( grrKoko ): OnlyKokoResAction.Execute;
9823 Ord( grrNew ): OnlyNewResAction.Execute;
9824 100: OnlyAHundredResAction.Execute;
9828 procedure TGikoForm.FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
9832 if FDropSpaceNode <> nil then begin
9833 FDropSpaceNode.Free;
9834 FDropSpaceNode := nil;
9840 procedure TGikoForm.ListCoolBarContextPopup(Sender: TObject;
9841 MousePos: TPoint; var Handled: Boolean);
9844 FToolBarSettingSender := tssList;
9845 MousePos := ListCoolBar.ClientToScreen( MousePos );
9846 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9850 procedure TGikoForm.MainCoolBarContextPopup(Sender: TObject;
9851 MousePos: TPoint; var Handled: Boolean);
9854 FToolBarSettingSender := tssMain;
9855 MousePos := MainCoolBar.ClientToScreen( MousePos );
9856 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9860 procedure TGikoForm.BrowserCoolBarContextPopup(Sender: TObject;
9861 MousePos: TPoint; var Handled: Boolean);
9864 FToolBarSettingSender := tssBrowser;
9865 MousePos := BrowserCoolBar.ClientToScreen( MousePos );
9866 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9869 procedure TGikoForm.ExportFavoriteFileAccept(Sender: TObject);
9872 if FavoriteDM.SaveFavoriteFile( ExportFavoriteFile.Dialog.FileName ) Then begin
9873 ShowMessage('
\83t
\83@
\83C
\83\8b\82ð
\8fo
\97Í
\82µ
\82Ü
\82µ
\82½');
9875 ShowMessage('
\83t
\83@
\83C
\83\8b\82Ì
\8fo
\97Í
\82É
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½');
9878 procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
9880 if FListViewBackGroundColor <> value then begin
9881 FListViewBackGroundColor := value;
9882 ListView.Color := FListViewBackGroundColor;
9885 procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
9887 ExportFavoriteFile.Dialog.FileName := FavoriteDM.GetFavoriteFilePath;
9890 procedure TGikoForm.CabinetBBSActionExecute(Sender: TObject);
9893 if CabinetPanel.Visible then begin
9894 if FTreeType = gtt2ch then begin
9895 CabinetVisible( False );
9897 CabinetBBSAction.Checked := False;
9899 CabinetBBSAction.Checked := True;
9902 CabinetVisible( True );
9903 CabinetBBSAction.Checked := True;
9906 if FActiveBBS = nil then
9907 ShowBBSTree( BBSs[ 0 ] )
9909 ShowBBSTree( FActiveBBS );
9913 procedure TGikoForm.FavoriteTreeViewBrowseThreadActionExecute(
9916 threadItem : TThreadItem;
9919 if FClickNode = nil then Exit;
9921 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9923 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9924 if threadItem = nil then
9926 GikoSys.OpenBrowser( threadItem.URL, gbtAuto );
9932 procedure TGikoForm.FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
9934 threadItem : TThreadItem;
9938 if FClickNode = nil then Exit;
9940 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9942 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9943 if threadItem = nil then
9945 GikoSys.OpenBrowser( threadItem.ParentBoard.URL, gbtAuto );
9947 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9949 boardItem := TFavoriteBoardItem( FClickNode.Data ).Item;
9950 if boardItem = nil then
9952 GikoSys.OpenBrowser( boardItem.URL, gbtAuto );
9958 procedure TGikoForm.UpBoardActionExecute(Sender: TObject);
9961 SelectTreeNode( GetActiveContent.ParentBoard, True );
9965 procedure TGikoForm.UpBoardActionUpdate(Sender: TObject);
9968 UpBoardAction.Enabled := GetActiveContent <> nil;
9972 procedure TGikoForm.BrowserTabContextPopup(Sender: TObject;
9973 MousePos: TPoint; var Handled: Boolean);
9977 idx := BrowserTab.IndexOfTabAt(MousePos.X, MousePos.Y);
9978 if BrowserTab.TabIndex <> idx then begin
9979 BrowserTab.TabIndex := idx;
9980 BrowserTab.OnChange(nil);
9985 procedure TGikoForm.KoreCopyExecute(Sender: TObject);
9987 KonoresCopy(KokoPopupMenu.Tag, true);
9989 procedure TGikoForm.KonoresCopy(Number: Integer; ReplaceTag : Boolean);
9991 ThreadItem: TThreadItem;
9997 boardPlugIn : TBoardPlugIn;
9999 if Number = 0 then Exit;
10000 ThreadItem := GetActiveContent;
10002 if ThreadItem <> nil then begin
10003 if ThreadItem.IsBoardPlugInAvailable then begin
10004 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
10005 boardPlugIn := ThreadItem.BoardPlugIn;
10007 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
10008 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
10009 //
\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
10010 tmp := boardPlugIn.GetDat( DWORD( threadItem ), Number );
10012 FileName := ThreadItem.FilePath;
10013 tmp := GikoSys.ReadThreadFile(FileName, Number);
10015 if tmp <> '' then begin
10016 Res := GikoSys.DivideStrLine(tmp);
10018 Header := IntToStr(Number) + '
\81F' + Res.FName + '
\81F' + Res.FDateTime + #13#10;
10019 if ReplaceTag then begin
10020 Header := CustomStringReplace(Header, '</b>', '',true);
10021 Header := CustomStringReplace(Header, '<b>', '',true);
10023 if ThreadItem.IsBoardPlugInAvailable then begin
10024 Body := CustomStringReplace(Res.FBody, '<br>', #13#10,true);
10025 Body := CustomStringReplace(Body, '<br>', #13#10,true);
10027 Body := CustomStringReplace(Res.FBody, ' <br> ', #13#10,true);
10028 Body := CustomStringReplace(Body, ' <br>', #13#10,true);
10029 Body := CustomStringReplace(Body, '<br> ', #13#10,true);
10030 Body := CustomStringReplace(Body, '<br>', #13#10,true);
10033 Body := CustomStringReplace(Body, '</a>', '',true);
10035 Body := GikoSys.DeleteLink(Body);
10036 if ReplaceTag then begin
10037 Body := CustomStringReplace(Body, '<', '<');
10038 Body := CustomStringReplace(Body, '>', '>');
10039 Body := CustomStringReplace(Body, '"', '"');
10040 Body := CustomStringReplace(Body, '&', '&');
10041 //Body := CustomStringReplace(Body, ' ', ' ');
10044 Header := Header + Body;
10046 Clipboard.SetTextBuf( PChar(Header) );
10052 procedure TGikoForm.BrowserTabPopupMenuPopup(Sender: TObject);
10054 AddRoundNameMenu(dummy1);
10057 procedure TGikoForm.FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
10059 FavoriteDM.URLReplace(oldURLs, newURLs);
10062 procedure TGikoForm.RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
10064 RoundList.URLReplace(oldURLs, newURLs);
10067 procedure TGikoForm.TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
10069 //RoundList.URLReplace(oldURLs, newURLs);
10072 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82é
10073 procedure TGikoForm.OnMinimize;
10075 FIsMinimize := mtMinimizing;
10076 if FActiveContent <> nil then
10077 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
10078 PostMessage( Handle, USER_MINIMIZED, 0, 0 );
10081 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82½
10082 procedure TGikoForm.OnMinimized;
10084 FIsMinimize := mtMinimized;
10085 FIsIgnoreResize := False;
10088 procedure TGikoForm.CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
10090 coolSet : TCoolSet;
10091 toolbar : TToolBar;
10093 affectedBand : TCoolBand;
10096 if (FOldFormWidth = Width) and not IsIconic( Handle ) and not FIsIgnoreResize then begin
10097 FIsIgnoreResize := True;
10098 PostMessage( Handle, USER_RESIZED, 0, 0 );
10099 if not (Sender is TToolBar) or (CoolBar = nil) then
10101 toolbar := TToolBar( Sender );
10103 //
\95Ï
\8dX
\82³
\82ê
\82½
\83N
\81[
\83\8b\83o
\81[
\82Ì
\92l
\82ð
\95Û
\91¶
10104 if CoolBar = MainCoolBar then begin
10105 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
10106 CoolSet.FCoolID := CoolBar.Bands[i].ID;
10107 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
10108 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
10109 GikoSys.Setting.MainCoolSet[i] := CoolSet;
10111 end else if CoolBar = ListCoolBar then begin
10112 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
10113 CoolSet.FCoolID := CoolBar.Bands[i].ID;
10114 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
10115 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
10116 GikoSys.Setting.ListCoolSet[i] := CoolSet;
10118 end else if CoolBar = BrowserCoolBar then begin
10119 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
10120 CoolSet.FCoolID := CoolBar.Bands[i].ID;
10121 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
10122 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
10123 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
10126 //
\95\9d\82Ì
\95Ï
\8dX
\82³
\82ê
\82½
\83o
\83\93\83h
\82ð
\8c©
\82Â
\82¯
\82é
10127 affectedBand := nil;
10128 for i := CoolBar.Bands.Count - 1 downto 0 do begin
10129 if CoolBar.Bands[ i ].Control.Handle = toolbar.Handle then begin
10130 band := CoolBar.Bands[ i ];
10131 if band.Break or (i = 0) then begin
10132 if i + 1 < CoolBar.Bands.Count then
10133 if not CoolBar.Bands[ i + 1 ].Break then
10134 affectedBand := CoolBar.Bands[ i + 1 ];
10137 affectedBand := CoolBar.Bands[ i - 1 ];
10142 //
\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·
10143 if CoolBar = MainCoolBar then begin
10144 coolSet := GikoSys.Setting.MainCoolSet[ band.ID ];
10145 coolSet.FCoolWidth := toolbar.Width + 25;
10146 GikoSys.Setting.MainCoolSet[ band.ID ] := coolSet;
10147 if affectedBand <> nil then begin
10148 coolSet := GikoSys.Setting.MainCoolSet[ affectedBand.ID ];
10149 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
10150 GikoSys.Setting.MainCoolSet[ affectedBand.ID ] := coolSet;
10152 end else if CoolBar = ListCoolBar then begin
10153 coolSet := GikoSys.Setting.ListCoolSet[ band.ID ];
10154 coolSet.FCoolWidth := toolbar.Width + 25;
10155 GikoSys.Setting.ListCoolSet[ band.ID ] := coolSet;
10156 if affectedBand <> nil then begin
10157 coolSet := GikoSys.Setting.ListCoolSet[ affectedBand.ID ];
10158 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
10159 GikoSys.Setting.ListCoolSet[ affectedBand.ID ] := coolSet;
10161 end else if CoolBar = BrowserCoolBar then begin
10162 coolSet := GikoSYs.Setting.BrowserCoolSet[ band.ID ];
10163 coolSet.FCoolWidth := toolbar.Width + 25;
10164 GikoSys.Setting.BrowserCoolSet[ band.ID ] := coolSet;
10165 if affectedBand <> nil then begin
10166 coolSet := GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ];
10167 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
10168 GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ] := coolSet;
10174 procedure TGikoForm.MenuToolBarResize(Sender: TObject);
10176 CoolBarResized( Sender, MainCoolBar );
10179 procedure TGikoForm.StdToolBarResize(Sender: TObject);
10181 CoolBarResized( Sender, MainCoolBar );
10184 procedure TGikoForm.LinkToolBarResize(Sender: TObject);
10186 CoolBarResized( Sender, MainCoolBar );
10189 procedure TGikoForm.ListNameToolBarResize(Sender: TObject);
10191 CoolBarResized( Sender, ListCoolBar );
10194 procedure TGikoForm.ListToolBarResize(Sender: TObject);
10196 CoolBarResized( Sender, ListCoolBar );
10199 procedure TGikoForm.BrowserNameToolBarResize(Sender: TObject);
10201 CoolBarResized( Sender, BrowserCoolBar );
10204 procedure TGikoForm.BrowserToolBarResize(Sender: TObject);
10206 CoolBarResized( Sender, BrowserCoolBar );
10209 procedure TGikoForm.BrowserTabResize(Sender: TObject);
10211 CoolBarResized( Sender, BrowserCoolBar );
10214 // *************************************************************************
10215 // ExternalBoardPlugInMain
10216 //
\83v
\83\89\83O
\83C
\83\93\83\81\83j
\83\85\81[
\82Ì
\8d\80\96Ú
\82ª
\8eÀ
\8ds
\82³
\82ê
\82½
10217 // *************************************************************************
10218 procedure TGikoForm.OnPlugInMenuItem( Sender : TObject );
10221 boardPlugIn : TBoardPlugIn;
10224 if not (Sender is TMenuItem) then
10227 item := TMenuItem( Sender );
10228 if not Assigned( Pointer( item.Tag ) ) then
10231 //
\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·
10232 boardPlugIn := TBoardPlugIn( item.Tag );
10233 boardPlugIn.PlugInMenu( item.Handle );
10236 // TreeView
\82ª
\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
10237 procedure TGikoForm.TreeClick( Node : TTreeNode );
10245 if FTreeType = gttHistory then begin
10246 if Node <> nil then
10247 if TObject( Node.Data ) is TFavoriteThreadItem then
10248 if GetActiveContent <> TFavoriteThreadItem( Node.Data ).Item then
10249 FavoriteClick( Node );
10253 if GetActiveList is TBBS then begin
10254 for i := 0 to ListView.Columns.Count - 1 do
10255 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
10256 end else if GetActiveList is TCategory then begin
10257 for i := 0 to ListView.Columns.Count - 1 do
10258 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
10259 end else if GetActiveList is TBoard then begin
10260 for i := 0 to ListView.Columns.Count - 1 do
10261 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
10264 if TObject(Node.Data) is TBBS then begin
10265 SetActiveList(Node.data);
10266 end else if TObject(Node.Data) is TCategory then begin
10267 SetActiveList(Node.data);
10268 end else if TObject(Node.Data) is TBoard then begin
10269 if not TBoard(Node.Data).IsThreadDatRead then begin
10270 Screen.Cursor := crHourGlass;
10272 if not TBoard(Node.Data).IsThreadDatRead then
10273 GikoSys.ReadSubjectFile(Node.Data);
10275 Screen.Cursor := crDefault;
10278 SetActiveList(Node.data);
10281 if TObject( Node.Data ) is TBoard then begin // not TCategory
10282 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
10283 if GikoSys.Setting.ListWidthState = glsMax then begin
10284 BrowserMinAction.Execute;
10285 if GikoForm.Visible then
10289 if GikoSys.Setting.ListHeightState = glsMax then begin
10290 BrowserMinAction.Execute;
10291 if GikoForm.Visible then
10299 // TreeView
\82ª
\83_
\83u
\83\8b\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
10300 procedure TGikoForm.TreeDoubleClick( Node : TTreeNode );
10303 ThreadItem : TThreadItem;
10304 shiftDown : Boolean;
10307 if Node = nil then Exit;
10309 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
10311 if FTreeType = gtt2ch then begin
10312 if not (TObject(Node.Data) is TBoard) then Exit;
10313 Board := TBoard(Node.Data);
10314 DownloadList(Board, shiftDown);
10315 end else if FTreeType = gttHistory then begin
10316 if not (TObject(Node.Data) is TFavoriteThreadItem) then Exit;
10317 ThreadItem := TFavoriteThreadItem(Node.Data).Item;
10318 DownloadContent(ThreadItem, shiftDown);
10323 procedure TGikoForm.TreeViewClick(Sender: TObject);
10325 TreeClick( TreeView.Selected );
10328 procedure TGikoForm.TreeViewKeyDown(Sender: TObject; var Key: Word;
10329 Shift: TShiftState);
10331 if Key = VK_BACK then begin
10332 // UpFolderButtonClick(Sender);
10333 end else if Key = VK_SPACE then begin
10334 TreeDoubleClick( TreeView.Selected );
10335 end else if Key = VK_RETURN then begin
10336 TreeClick( TreeView.Selected );
10337 TreeView.Selected.Expanded := not TreeView.Selected.Expanded;
10341 //
\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ã
10342 //
\83C
\83x
\83\93\83g
\82ð
\8eæ
\82è
\88µ
\82Á
\82½
\8fê
\8d\87\82Í True
\82ð
\95Ô
\82·
10343 function TGikoForm.BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
10345 iOIPAO : IOleInPlaceActiveObject;
10346 Dispatch : IDispatch;
10349 if Key = VK_BACK then begin
10350 UpBoardAction.Execute;
10352 {end else if Key in [VK_ESCAPE..VK_HELP] then begin
10353 //
\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
10356 end else if(Key in [VK_SPACE..VK_HELP]) and
10357 not(ssCtrl in State) and not(ssAlt in State) and not (ssShift in State) then begin
10360 //
\82»
\82ê
\88È
\8aO
\82Ì
\83C
\83x
\83\93\83g
\82Í Browser
\82É
\97¬
\82·
10361 if(FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10362 Dispatch := FActiveContent.Browser.Application;
10363 if Dispatch <> nil then begin
10364 Dispatch.QueryInterface( IOleInPlaceActiveObject, iOIPAO );
10365 if iOIPAO <> nil then
10366 iOIPAO.TranslateAccelerator( Msg );
10369 //
\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¢
10375 //
\83M
\83R
\83i
\83r
\82Ì
\83\81\83b
\83Z
\81[
\83W
\83\8b\81[
\83v
\82ð
\89¡
\8eæ
\82è
\82µ
\82Ü
\82·
10376 procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
10381 case Msg.message of
10383 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10384 if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
10386 Handled := BrowserKeyDown( Msg, key, KeyDataToShiftState( Msg.lParam ) );
10391 case Msg.wParam shr 16 of
10394 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10395 if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
10396 UpBoardAction.Execute;
10400 if not Handled then begin
10401 if IsDialogMessage( ListView.Handle, Msg ) then begin
10402 UpFolderAction.Execute;
10412 procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject;
10413 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
10415 favItem : TTreeNode;
10416 favThreadItem : TFavoriteThreadItem;
10422 FMouseDownPos.X := X;
10423 FMouseDownPos.Y := Y;
10427 favItem := FavoriteTreeView.GetNodeAt( X, Y );
10428 if favItem = nil then Exit;
10430 if TObject( favItem.Data ) is TFavoriteThreadItem then begin
10431 favThreadItem := TFavoriteThreadItem( favItem.Data );
10432 if favThreadItem.Item <> nil then
10433 InsertBrowserTab( favThreadItem.Item, False );
10440 procedure TGikoForm.MessagePanelResize(Sender: TObject);
10443 if FIsIgnoreResize then
10446 if GikoSys.Setting.ListOrientation = gloVertical then begin
10447 if GikoSys.Setting.ListHeightState = glsMin then begin
10448 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
10449 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
10455 procedure TGikoForm.OnResized;
10458 FOldFormWidth := Width;
10459 FIsIgnoreResize := False;
10463 procedure TGikoForm.TreeSelectNameCopyExecute(Sender: TObject);
10467 TreeView.Selected := FClickNode;
10468 s := FClickNode.Text;
10469 Clipboard.AsText := s;
10472 procedure TGikoForm.FavoriteTreeViewMouseUp(Sender: TObject;
10473 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
10476 if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold) and
10477 (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
10478 FavoriteClick( TObject( FavoriteTreeView.Selected ) );
10483 destructor TBrowserRecord.Destroy;
10487 if Self.FEvent <> nil then
10489 if Self.FBrowser <> nil then begin
10490 if Self.Thread <> nil then begin
10491 doc := Idispatch( olevariant(Self.FBrowser.ControlInterface).Document) as IHTMLDocument2;
10492 Self.Thread.ScrollTop := doc.Body.ScrollTop;
10494 //TOleControl(Self.FBrowser).Visible := false;
10495 ShowWindow(Self.FBrowser.Handle, SW_HIDE);
10500 procedure TGikoForm.ResRangeActionUpdate(Sender: TObject);
10502 ResRangeAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
10505 function TGikoForm.WebBrowserClick(Sender: TObject): WordBool;
10509 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then
10510 FActiveContent.FBrowser.SetFocus;
10515 procedure TGikoForm.SetFocusForBrowserActionExecute(Sender: TObject);
10517 FActiveContent.FBrowser.SetFocus;
10520 procedure TGikoForm.SetFocusForBrowserActionUpdate(Sender: TObject);
10522 if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
10523 (FActiveContent.Browser <> BrowserNullTab.Browser) then
10524 SetFocusForBrowserAction.Enabled := true
10526 SetFocusForBrowserAction.Enabled := false;
10529 procedure TGikoForm.SetFocusForThreadListActionExecute(Sender: TObject);
10533 if FActiveContent <> nil then
10534 WebBrowserClick(FActiveContent.Browser); //
\88ê
\89ñBrowser
\82É
\93\96\82Ä
\82È
\82¢
\82Æ
\93®
\82©
\82È
\82¢
\82Æ
\82«
\82ª
\82 \82é
10536 if( ListView.Items.Count > 0 ) and (ListView.ItemFocused = nil) then
10537 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é
10539 ListView.Scroll(-ListView.ClientWidth, -ListView.ClientHeight);
10540 rct := ListView.ItemFocused.DisplayRect(drBounds);
10541 ListView.Scroll(0, 2 * rct.Top - rct.Bottom);
10542 if ListView.ViewStyle <> vsReport then begin
10543 ListView.Scroll(rct.Left, 0);
10548 procedure TGikoForm.SetFocusForCabinetActionExecute(Sender: TObject);
10550 if FActiveContent <> nil then
10551 WebBrowserClick(FActiveContent.Browser); //
\88ê
\89ñBrowser
\82É
\93\96\82Ä
\82È
\82¢
\82Æ
\93®
\82©
\82È
\82¢
\82Æ
\82«
\82ª
\82 \82é
10552 if TreeView.Visible then begin
10554 if(TreeView.Items.Count > 0) and ( TreeView.Selected = nil ) then
10555 TreeView.Items.Item[0].Selected := true;
10556 end else if FavoriteTreeView.Visible then begin
10557 FavoriteTreeView.SetFocus;
10558 if(FavoriteTreeView.Items.Count > 0) and (FavoriteTreeView.Selected = nil) then
10559 FavoriteTreeView.Items.Item[0].Selected := true;
10562 procedure TGikoForm.SetFocusForCabinetActionUpdate(Sender: TObject);
10564 SetFocusForCabinetAction.Enabled := CabinetPanel.Visible;
10567 //
\83u
\83\89\83E
\83U
\82ð
\8dÅ
\91å
\89»
\82µ
\82Ä
\83t
\83H
\81[
\83J
\83X
\82ð
\93\96\82Ä
\82é
\81B
10568 procedure TGikoForm.BrowserMaxAndFocusActionExecute(Sender: TObject);
10570 BrowserMaxAction.Execute;
10571 SetFocusForBrowserAction.Execute;
10574 procedure TGikoForm.BrowserMaxAndFocusActionUpdate(Sender: TObject);
10576 if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
10577 (FActiveContent.Browser <> BrowserNullTab.Browser) then
10578 BrowserMaxAndFocusAction.Enabled := true
10580 BrowserMaxAndFocusAction.Enabled := false;
10582 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\82ð
\8dÅ
\91å
\89»
\82µ
\82Ä
\83t
\83H
\81[
\83J
\83X
\82ð
\93\96\82Ä
\82é
10583 procedure TGikoForm.ThreadlistMaxAndFocusActionExecute(Sender: TObject);
10585 BrowserMinAction.Execute;
10586 SetFocusForThreadListAction.Execute;
10589 procedure TGikoForm.ListViewExit(Sender: TObject);
10595 procedure TGikoForm.ListViewSelectItem(Sender: TObject; Item: TListItem;
10596 Selected: Boolean);
10599 if not (GikoSys.Setting.BrowserTabVisible) and (Item <> nil) then
10600 if (TObject( Item.Data ) is TThreadItem) then begin
10601 SelectTimer.Interval := GikoSys.Setting.SelectInterval;
10603 SelectTimer.Interval := 0
10605 SelectTimer.Interval := 0;
10609 procedure TGikoForm.SelectTimerTimer(Sender: TObject);
10611 if not (ListView.Selected = nil) then
10612 if( FActiveContent = nil) or
10613 (GetActiveContent <> TThreadItem(ListView.Selected.Data) ) then begin
10614 SelectTimer.Interval := 0;
10619 procedure TGikoForm.SelectItemSaveForDatExecute(Sender: TObject);
10624 List := TList.Create;
10626 Screen.Cursor := crHourGlass;
10627 SelectListItem(List);
10628 if ((GikoSys.Setting.ListOrientation = gloVertical) and
10629 (GikoSys.Setting.ListHeightState = glsMax)) or
10630 ((GikoSys.Setting.ListOrientation = gloHorizontal) and
10631 (GikoSys.Setting.ListWidthState = glsMax)) then
10632 ShowMessage('
\83X
\83\8c\83b
\83h
\88ê
\97\97\82ð
\95\
\8e¦
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10633 else if(List.Count = 0) then
10634 ShowMessage('
\83X
\83\8c\83b
\83h
\82ð
\91I
\91ð
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10636 FileSaveAs1.Dialog.Title := '
\91I
\91ð
\83X
\83\8c\83b
\83h
\82ðdat
\82Ì
\82Ü
\82Ü
\95Û
\91¶';
10637 FileSaveAs1.Dialog.Filter := 'DAT
\83t
\83@
\83C
\83\8b(*.dat)|*.dat';
10638 for i := 0 to List.Count - 1 do begin
10639 if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin
10640 FileSaveAs1.Dialog.FileName := TThreadItem(List[i]).FileName;
10641 if FileSaveAs1.Execute then begin
10642 //
\82È
\82º
\82©
\83L
\83\83\83\93\83Z
\83\8b\82Å
\82à
\82±
\82Á
\82¿
\82É
\93ü
\82Á
\82Ä
\82
\82é
10643 if ExtractFilePath(FileSaveAs1.Dialog.FileName) <> '' then begin
10644 CopyFile(PChar(TThreadItem(List[i]).FilePath),
10645 PChar(FileSaveAs1.Dialog.FileName), true);
10652 Screen.Cursor := crDefault;
10658 procedure TGikoForm.SelectItemSaveForHTMLExecute(Sender: TObject);
10665 List := TList.Create;
10667 Screen.Cursor := crHourGlass;
10668 SelectListItem(List);
10669 if ((GikoSys.Setting.ListOrientation = gloVertical) and
10670 (GikoSys.Setting.ListHeightState = glsMax)) or
10671 ((GikoSys.Setting.ListOrientation = gloHorizontal) and
10672 (GikoSys.Setting.ListWidthState = glsMax)) then
10673 ShowMessage('
\83X
\83\8c\83b
\83h
\88ê
\97\97\82ð
\95\
\8e¦
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10674 else if(List.Count = 0) then
10675 ShowMessage('
\83X
\83\8c\83b
\83h
\82ð
\91I
\91ð
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10677 FileSaveAs1.Dialog.Title := '
\91I
\91ð
\83X
\83\8c\83b
\83h
\82ðHTML
\89»
\82µ
\82Ä
\95Û
\91¶';
10678 FileSaveAs1.Dialog.Filter := 'HTML
\83t
\83@
\83C
\83\8b(*.html)|*.html';
10679 for i := 0 to List.Count - 1 do begin
10680 if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin
10681 FileSaveAs1.Dialog.FileName := TThreadItem(List[i]).Title + '.html';
10682 if FileSaveAs1.Execute then begin
10683 //
\82È
\82º
\82©
\83L
\83\83\83\93\83Z
\83\8b\82Å
\82à
\82±
\82Á
\82¿
\82É
\93ü
\82Á
\82Ä
\82
\82é
10684 if ExtractFilePath(FileSaveAs1.Dialog.FileName) <> '' then begin
10685 html := TStringList.Create;
10686 title := TThreadItem(List[i]).Title;
10688 GikoSys.CreateHTML3(html, TThreadItem(List[i]), title);
10689 html.SaveToFile(FileSaveAs1.Dialog.FileName);
10690 SkinorCSSFilesCopy(ExtractFilePath(FileSaveAs1.Dialog.FileName));
10700 Screen.Cursor := crDefault;
10704 procedure TGikoForm.SkinorCSSFilesCopy(path: string);
10706 tmp, tmpD, tmpF: string;
10709 files: TStringList;
10712 if GikoSys.Setting.UseSkin then begin
10713 current := ExtractFilePath(GikoSys.GetSkinDir);
10714 tmp := GikoSys.Setting.CSSFileName;
10715 end else if GikoSys.Setting.UseCSS then begin
10716 current := ExtractFilePath(GikoSys.GetStyleSheetDir);
10717 tmp := ExtractFilePath(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName);
10719 dirs := TStringList.Create;
10722 if tmp <> current then begin
10723 GikoSys.GetDirectoryList(current, '*.*', dirs, true);
10724 for i := 0 to dirs.Count - 1 do begin
10725 files := TStringList.Create;
10727 gikoSys.GetFileList(dirs[i], '*.*', files, true);
10728 tmpD := CustomStringReplace(dirs[i], GikoSys.GetConfigDir, path);
10729 if (AnsiPos(dirs[i], tmp) <> 0) and not (DirectoryExists(tmpD)) then
10730 ForceDirectories(tmpD);
10732 if(dirs[i] = tmp) and (dirs[i] <> current) then begin
10733 for j := 0 to files.Count - 1 do begin
10734 tmpF := CustomStringReplace(files[j], GikoSys.GetConfigDir, path);
10735 if not FileExists(tmpF) then begin
10736 CopyFile(PChar(files[j]), PChar(tmpF),True);
10745 tmpD := CustomStringReplace(dirs[0], GikoSys.GetConfigDir, path);
10746 if not DirectoryExists(tmpD) then
10747 ForceDirectories(tmpD);
10748 tmpF := CustomStringReplace(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName
10749 , GikoSys.GetConfigDir, path);
10750 if not FileExists(tmpF) then begin
10751 CopyFile(PChar(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName)
10752 , PChar(tmpF), True);
10761 procedure TGikoForm.KidokuActionExecute(Sender: TObject);
10766 List := TList.Create;
10768 SelectListItem(List);
10769 for i := 0 to List.Count - 1 do begin
10770 if TObject(List[i]) is TThreadItem then begin
10771 TThreadItem(List[i]).UnRead := false;
10772 TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;
10775 if TreeView.Visible then
10782 procedure TGikoForm.MidokuActionExecute(Sender: TObject);
10787 List := TList.Create;
10789 SelectListItem(List);
10790 for i := 0 to List.Count - 1 do begin
10791 if TObject(List[i]) is TThreadItem then begin
10792 TThreadItem(List[i]).UnRead := true;
10793 TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;
10796 if TreeView.Visible then
10803 procedure TGikoForm.BrowserPanelCanResize(Sender: TObject; var NewWidth,
10804 NewHeight: Integer; var Resize: Boolean);
10808 for i := 0 to BROWSER_COUNT - 1 do
10809 SetWindowPos(TWebBrowser(FBrowsers[i]).Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER);
10811 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10812 SetWindowPos(FActiveContent.Browser.Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER);
10816 procedure TGikoForm.LogFolderOpenActionExecute(Sender: TObject);
10820 if ((GikoSys.Setting.ListOrientation = gloVertical) and
10821 (GikoSys.Setting.ListHeightState = glsMax)) or
10822 ((GikoSys.Setting.ListOrientation = gloHorizontal) and
10823 (GikoSys.Setting.ListWidthState = glsMax)) then begin
10824 if(GetActiveContent <> nil) then begin
10825 GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(GetActiveContent.FilePath) + '"');
10827 end else if GetActiveList is TCategory then begin
10828 List := TList.Create;
10830 SelectListItem(List);
10831 GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(TBoard(List[0]).FilePath) + '"');
10835 end else if GetActiveList is TBoard then begin
10836 GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(TBoard(GetActiveList).FilePath) + '"');
10841 procedure TGikoForm.LogFolderOpenActionUpdate(Sender: TObject);
10843 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
10844 LogFolderOpenAction.Enabled := True
10845 else if GetActiveList is TBoard then
10846 LogFolderOpenAction.Enabled := True
10848 LogFolderOpenAction.Enabled := False;
10851 procedure TGikoForm.GetTabURLs(AStringList: TStringList; Result:Boolean);
10853 rec : TBrowserRecord;
10854 i, bound : Integer;
10856 bound := BrowserTab.Tabs.Count -1;
10857 if bound = -1 then begin
10859 Exit; //for
\82É
\94ò
\82Î
\82È
\82¢
\82Å
\91\80\8dì
\82ð
\94²
\82¯
\82é
10862 for i := 0 to bound do begin
10863 rec := TBrowserRecord( BrowserTab.Tabs.Objects[ i ] );
10864 if( rec <> nil) and (rec.Thread <> nil) then
10865 AStringList.Add( rec.Thread.URL );
10870 procedure TGikoForm.TabsSaveActionExecute(Sender: TObject);
10872 SaveStringList: TStringList;
10875 SaveStringList := TStringList.Create;
10877 GetTabURLs(SaveStringList, Result);
10878 if not Result then begin
10879 ShowMessage('
\95Û
\91¶
\82·
\82é
\83^
\83u
\82ª
\82 \82è
\82Ü
\82¹
\82ñ');
10881 SaveStringList.SaveToFile(ExtractFilePath(Application.ExeName) + 'tab.sav');
10883 SaveStringList.Free
10887 procedure TGikoForm.TabsOpenActionExecute(Sender: TObject);
10889 i, bound : Integer;
10890 item : TThreadItem;
10891 URLs : TStringList;
10892 GikoTab: TGikoTabAppend;
10895 fileName := ExtractFilePath(Application.ExeName) + 'tab.sav';
10896 URLs := TStringList.Create();
10899 if FileExists(fileName) then
10900 URLs.LoadFromFile(fileName);
10903 ShowMessage('
\83^
\83u
\83t
\83@
\83C
\83\8b\82ª
\8aJ
\82¯
\82Ü
\82¹
\82ñ');
10905 bound := URLs.Count - 1;
10906 if bound = -1 then begin
10907 ShowMessage('
\95\
\8e¦
\82·
\82é
\83^
\83u
\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B');
10911 GikoTab := GikoSys.Setting.BrowserTabAppend;
10912 GikoSys.Setting.BrowserTabAppend := gtpLast;//TGikoTabAppend(1);
10913 for i := 0 to URLs.Count - 1 do begin
10914 item := BBSsFindThreadFromURL( URLs[ i ] );
10915 if item <> nil then
10916 InsertBrowserTab( item, false );
10919 GikoSys.Setting.BrowserTabAppend := GikoTab;
10924 procedure TGikoForm.FileTabSaveClick(Sender: TObject);
10926 SaveStringList: TStringList;
10928 SaveTabList := TStringList.Create;
10929 SaveTabList := GetTabURLs;
10930 if TabSaveDialog.Execute then begin
10931 SaveTabList.SaveToFile(TabSaveDialog.FileName);
10935 procedure TGikoForm.TabsSaveToFileActionExecute(Sender: TObject);
10937 SaveTabList: TStringList;
10940 SaveTabList := TStringList.Create;
10942 GetTabURLs(SaveTabList, Result);
10943 // if TabSaveDialog.Execute then begin
10944 // SaveTabList.SaveToFile(TabSaveDialog.FileName);
10951 procedure TGikoForm.TabsOpenFromFileActionExecute(Sender: TObject);
10954 item : TThreadItem;
10955 URLs : TStringList;
10956 GikoTab: TGikoTabAppend;
10958 URLs := TStringList.Create();
10961 // if TabOpenDialog.Execute then begin
10962 // URLs.LoadFromFile(TabOpenDialog.FileName);
10965 on EFOpenError do ShowMessage('
\83^
\83u
\83t
\83@
\83C
\83\8b\82ª
\8aJ
\82¯
\82Ü
\82¹
\82ñ');
10967 GikoTab := GikoSys.Setting.BrowserTabAppend;
10968 GikoSys.Setting.BrowserTabAppend := gtpLast;//TGikoTabAppend(1);
10969 for i := 0 to URLs.Count - 1 do begin
10970 item := BBSsFindThreadFromURL( URLs[ i ] );
10971 if item <> nil then
10972 InsertBrowserTab( item, false );
10975 GikoSys.Setting.BrowserTabAppend := GikoTab;
10980 procedure TGikoForm.OnlyAHundredResActionExecute(Sender: TObject);
10982 ThreadItem : TThreadItem;
10983 FilterList : TStringList;
10986 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
10987 and (FActiveContent.FBrowser.Busy) then Exit;
10989 FResRangeMenuSelect := 100;
10990 OnlyAHundredResAction.Checked := True;
10992 if GikoSys.ResRange <> 100 then begin
10993 GikoSys.ResRange := 100;
10995 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
10996 FilterList := TStringList.Create;
10998 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
10999 GikoSys.FSelectResFilter.Reverse := False;
11001 FilterList.Destroy;
11004 FSelectResWord := '';
11006 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
11007 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
11008 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
11010 ThreadItem := GetActiveContent;
11011 if ThreadItem <> nil then
11012 InsertBrowserTab( ThreadItem, True );
11016 procedure TGikoForm.OnlyKokoResActionExecute(Sender: TObject);
11018 ThreadItem : TThreadItem;
11019 FilterList : TStringList;
11022 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
11023 and (FActiveContent.FBrowser.Busy) then Exit;
11025 FResRangeMenuSelect := Ord( grrKoko );
11026 OnlyKokoResAction.Checked := True;
11028 if GikoSys.ResRange <> Ord( grrKoko ) then begin
11029 GikoSys.ResRange := Ord( grrKoko );
11031 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
11032 FilterList := TStringList.Create;
11034 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
11035 GikoSys.FSelectResFilter.Reverse := False;
11037 FilterList.Destroy;
11040 FSelectResWord := '';
11042 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
11043 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
11044 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
11046 ThreadItem := GetActiveContent;
11047 if ThreadItem <> nil then
11048 InsertBrowserTab( ThreadItem, True );
11052 procedure TGikoForm.OnlyNewResActionExecute(Sender: TObject);
11054 ThreadItem : TThreadItem;
11055 FilterList : TStringList;
11058 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil)
11059 and (FActiveContent.FBrowser.Busy) then Exit;
11061 FResRangeMenuSelect := Ord( grrNew );
11062 OnlyNewResAction.Checked := True;
11064 if GikoSys.ResRange <> Ord( grrNew ) then begin
11065 GikoSys.ResRange := Ord( grrNew );
11067 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
11068 FilterList := TStringList.Create;
11070 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
11071 GikoSys.FSelectResFilter.Reverse := False;
11073 FilterList.Destroy;
11076 FSelectResWord := '';
11078 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
11079 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
11080 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
11082 ThreadItem := GetActiveContent;
11083 if ThreadItem <> nil then
11084 InsertBrowserTab( ThreadItem, True );
11088 procedure TGikoForm.BrowsBoradHeadActionExecute(Sender: TObject);
11090 RefURL, URL : string;
11094 if GetActiveList is TCategory then begin
11095 List := TList.Create;
11097 SelectListItem(List);
11098 RefURL := TBoard(List[0]).URL;
11102 end else if GetActiveList is TBoard then begin
11103 RefURL := TBoard(GetActiveList).URL
11105 if RefURL <> '' then begin
11106 if RefURL[Length(RefURL)] <> '/' then
11107 URL := RefURL + '/' + 'head.txt'
11109 URL := RefURL + 'head.txt';
11113 ShowMessage('
\94Â
\82ð
\93Á
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½
\81B');
11118 procedure TGikoForm.BrowsBoradHeadActionUpdate(Sender: TObject);
11120 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
11121 BrowsBoradHeadAction.Enabled := True
11122 else if GetActiveList is TBoard then
11123 BrowsBoradHeadAction.Enabled := True
11125 BrowsBoradHeadAction.Enabled := False;
11128 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\95Ò
\8fW
\82·
\82é
\82½
\82ß
\82É
\8aJ
\82
11129 procedure TGikoForm.EditNGActionExecute(Sender: TObject);
11131 GikoSys.FAbon.EditNGwords;
11134 procedure TGikoForm.ThreadRangeActionUpdate(Sender: TObject);
11136 ThreadRangeAction.Enabled := (GetActiveList is TBoard);
11139 procedure TGikoForm.ThreadRangeActionExecute(Sender: TObject);
11141 case GikoSys.Setting.ThreadRange of
11142 gtrAll: AllItemAction.Execute;
11143 gtrLog: LogItemAction.Execute;
11144 gtrNew: NewItemAction.Execute;
11148 procedure TGikoForm.TabAutoSaveActionExecute(Sender: TObject);
11150 SaveStringList: TStringList;
11153 SaveStringList := TStringList.Create;
11155 GetTabURLs(SaveStringList, Result);
11157 SaveStringList.SaveToFile(ExtractFilePath(Application.ExeName) + 'tab.sav');
11159 SaveStringList.Free
11163 procedure TGikoForm.TabAutoLoadActionExecute(Sender: TObject);
11168 GikoTab: TGikoTabAppend;
11171 fileName := ExtractFilePath(Application.ExeName) + 'tab.sav';
11172 URLs := TStringList.Create();
11175 if FileExists(fileName) then
11176 URLs.LoadFromFile(fileName);
11179 ShowMessage('
\83^
\83u
\83t
\83@
\83C
\83\8b\82ª
\8aJ
\82¯
\82Ü
\82¹
\82ñ');
11181 bound := URLs.Count - 1;
11183 GikoTab := GikoSys.Setting.BrowserTabAppend;
11184 GikoSys.Setting.BrowserTabAppend := gtpLast;//TGikoTabAppend(1);
11185 for i := 0 to URLs.Count - 1 do begin
11186 item := BBSsFindThreadFromURL( URLs[ i ] );
11187 if item <> nil then
11188 InsertBrowserTab( item, false );
11191 GikoSys.Setting.BrowserTabAppend := GikoTab;
11197 OleInitialize(nil);