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;
449 AllResToolButton: TToolButton;
457 ReloadAction: TAction;
458 GoFowardAction: TAction;
459 GoBackAction: TAction;
460 SelectComboBoxSplitter: TImage;
461 IndividualAbon1: TMenuItem;
463 IndividualAbon2: TMenuItem;
465 CancellIndividualAbon: TAction;
466 AntiIndividualAbon: TMenuItem;
471 SearchBoardName: TMenuItem;
472 TreeSelectLogDeleteSeparator: TMenuItem;
473 TreeSelectSearchBoardName: TAction;
474 CabinetFavoriteAction: TAction;
477 FavoriteTreePopupMenu: TPopupMenu;
478 FavoriteTreeViewRenameAction: TAction;
479 FavoriteTreeRenamePopupMenu: TMenuItem;
480 FavoriteTreeViewNewFolderAction: TAction;
481 FavoriteTreeNewFolderPopupMenu: TMenuItem;
483 FavoriteTreeViewDeleteAction: TAction;
484 FavoriteTreeDeletePopupMenu: TMenuItem;
485 FavoriteToolBar: TToolBar;
486 ToolButton17: TToolButton;
487 ToolButton19: TToolButton;
488 FavoriteTreeViewBrowseFolderAction: TAction;
489 FavoriteTreeBrowseFolderPopupMenu: TMenuItem;
491 FavoriteTreeReloadPopupMenu: TMenuItem;
493 FavoriteTreeURLCopyPopupMenu: TMenuItem;
494 FavoriteTreeNameCopyPopupMenu: TMenuItem;
495 FavoriteTreeLogDeletePopupMenu: TMenuItem;
497 FavoriteTreeNameURLCopyPopupMenu: TMenuItem;
498 FavoriteTreeViewReloadAction: TAction;
499 FavoriteTreeViewURLCopyAction: TAction;
500 FavoriteTreeViewNameCopyAction: TAction;
501 FavoriteTreeViewNameURLCopyAction: TAction;
502 FavoriteTreeViewLogDeleteAction: TAction;
503 OnlyAHundredRes: TAction;
504 ToolButton20: TToolButton;
505 AHundredResButton: TToolButton;
507 ExportFavoriteFileAction1: TMenuItem;
508 ExportFavoriteFile: TFileSaveAs;
509 ToolButton21: TToolButton;
510 CabinetBBSToolButton: TToolButton;
511 ToolButton23: TToolButton;
512 ToolButton24: TToolButton;
515 FavoriteTreeViewBrowseBoardAction: TAction;
516 FavoriteTreeViewBrowseThreadAction: TAction;
517 UpBoardAction: TAction;
527 TreeSelectLogDeletePopupMenu: TMenuItem;
529 BBSSelectPopupMenu: TPopupMenu;
530 PlugInMenu: TMenuItem;
531 TmpToolBar: TToolBar;
532 TreeSelectNameCopy: TAction;
533 TreeSelectNamePupupMenu: TMenuItem;
534 BrowserPanel: TPanel;
535 SetFocusForBrowserAction: TAction;
536 SetFocusForThreadListAction: TAction;
537 SetFocusForCabinetAction: TAction;
539 ThreadlistMaxAndFocusAction: TAction;
540 BrowserMaxAndFocusAction: TAction;
541 UpBoardButton: TToolButton;
543 SelectThreadSave: TMenuItem;
544 SelectItemSaveForHTML: TAction;
545 FileSaveAs1: TFileSaveAs;
549 SelectItemSaveForDat: TAction;
550 LogFolderOpenAction: TAction;
551 OpenLogFolder: TMenuItem;
552 Browser: TWebBrowser;
553 LocalRuleView: TToolButton;
556 TabsSaveAction: TAction;
557 TabsOpenAction: TAction;
558 procedure FormCreate(Sender: TObject);
559 procedure FormDestroy(Sender: TObject);
560 procedure CabinetPanelHide(Sender: TObject);
561 procedure FormClose(Sender: TObject; var Action: TCloseAction);
562 procedure ListViewData(Sender: TObject; Item: TListItem);
563 procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
564 const FindString: String; const FindPosition: TPoint;
565 FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
566 Wrap: Boolean; var Index: Integer);
567 procedure ListViewDataHint(Sender: TObject; StartIndex,
569 procedure ListViewDataStateChange(Sender: TObject; StartIndex,
570 EndIndex: Integer; OldState, NewState: TItemStates);
571 procedure BrowserStatusTextChange(Sender: TObject;
572 const Text: WideString);
573 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
574 procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
575 var AllowChange: Boolean);
576 procedure ListViewKeyDown(Sender: TObject; var Key: Word;
578 procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
579 procedure ListViewSort(Sender: TObject; Column: TListColumn);
580 procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
581 Button: TToolButton; State: TCustomDrawState;
582 var DefaultDraw: Boolean);
583 procedure BrowserBeforeNavigate2(Sender: TObject;
584 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
585 Headers: OleVariant; var Cancel: WordBool);
586 procedure ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
587 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
588 var DefaultDraw: Boolean);
589 procedure TreeViewCustomDraw(Sender: TCustomTreeView;
590 const ARect: TRect; var DefaultDraw: Boolean);
591 procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
592 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
593 procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
594 procedure TreeViewDblClick(Sender: TObject);
595 procedure ListViewCustomDraw(Sender: TCustomListView;
596 const ARect: TRect; var DefaultDraw: Boolean);
597 procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
598 Shift: TShiftState; X, Y: Integer);
599 procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
600 procedure MessageListViewResize(Sender: TObject);
601 procedure ExitActionExecute(Sender: TObject);
602 procedure AllSelectActionExecute(Sender: TObject);
603 procedure StdToolBarVisibleActionExecute(Sender: TObject);
604 procedure MsgBarVisibleActionExecute(Sender: TObject);
605 procedure StatusBarVisibleActionExecute(Sender: TObject);
606 procedure LargeIconActionExecute(Sender: TObject);
607 procedure SmallIconActionExecute(Sender: TObject);
608 procedure ListIconActionExecute(Sender: TObject);
609 procedure DetailIconActionExecute(Sender: TObject);
610 procedure SearchActionExecute(Sender: TObject);
611 procedure OptionActionExecute(Sender: TObject);
612 procedure GikoNaviWebPageActionExecute(Sender: TObject);
613 procedure AboutActionExecute(Sender: TObject);
614 procedure CabinetHistoryActionExecute(Sender: TObject);
615 procedure CabinetVisible( isVisible : Boolean );
616 procedure CabinetVisibleActionExecute(Sender: TObject);
617 procedure AllItemActionExecute(Sender: TObject);
618 procedure LogItemActionExecute(Sender: TObject);
619 procedure NewItemActionExecute(Sender: TObject);
620 procedure SelectItemActionExecute(Sender: TObject);
621 procedure ListNumberVisibleActionExecute(Sender: TObject);
622 procedure UpFolderActionExecute(Sender: TObject);
623 procedure IconStyleExecute(Sender: TObject);
624 procedure RoundActionExecute(Sender: TObject);
625 procedure StopActionExecute(Sender: TObject);
626 procedure MsgBarCloseActionExecute(Sender: TObject);
627 procedure BrowserMaxActionExecute(Sender: TObject);
628 procedure ScrollTopActionExecute(Sender: TObject);
629 procedure ScrollLastActionExecute(Sender: TObject);
630 procedure ScrollNewActionExecute(Sender: TObject);
631 procedure ScrollKokoActionExecute(Sender: TObject);
632 procedure EditorActionExecute(Sender: TObject);
633 procedure IEActionExecute(Sender: TObject);
634 procedure ShowThreadActionExecute(Sender: TObject);
635 procedure ShowBoardActionExecute(Sender: TObject);
636 procedure URLCopyActionExecute(Sender: TObject);
637 procedure ItemReloadActionExecute(Sender: TObject);
638 procedure SelectListReloadActionExecute(Sender: TObject);
639 procedure SelectThreadReloadActionExecute(Sender: TObject);
640 procedure SelectListReloadActionUpdate(Sender: TObject);
641 procedure AllItemActionUpdate(Sender: TObject);
642 procedure LogItemActionUpdate(Sender: TObject);
643 procedure NewItemActionUpdate(Sender: TObject);
644 procedure SelectItemActionUpdate(Sender: TObject);
645 procedure UpFolderActionUpdate(Sender: TObject);
646 procedure FormResize(Sender: TObject);
647 procedure ScrollTopActionUpdate(Sender: TObject);
648 procedure ScrollLastActionUpdate(Sender: TObject);
649 procedure ScrollNewActionUpdate(Sender: TObject);
650 procedure ScrollKokoActionUpdate(Sender: TObject);
651 procedure EditorActionUpdate(Sender: TObject);
652 procedure IEActionUpdate(Sender: TObject);
653 procedure ShowThreadActionUpdate(Sender: TObject);
654 procedure ShowBoardActionUpdate(Sender: TObject);
655 procedure SelectThreadReloadActionUpdate(Sender: TObject);
656 procedure ItemReloadActionUpdate(Sender: TObject);
657 procedure LogDeleteActionExecute(Sender: TObject);
658 procedure KokomadeActionExecute(Sender: TObject);
659 procedure ZenbuActionExecute(Sender: TObject);
660 procedure KokoResActionExecute(Sender: TObject);
661 procedure ListPopupMenuPopup(Sender: TObject);
662 procedure SelectItemURLCopyActionExecute(Sender: TObject);
663 procedure SelectItemURLCopyActionUpdate(Sender: TObject);
664 procedure AllSelectActionUpdate(Sender: TObject);
665 procedure LogDeleteActionUpdate(Sender: TObject);
666 procedure BrowserTabCloseActionExecute(Sender: TObject);
667 procedure NotSelectTabCloseActionExecute(Sender: TObject);
668 procedure TreeSelectBoradReloadExecute(Sender: TObject);
669 procedure TreeSelectThreadReloadExecute(Sender: TObject);
670 procedure TreeSelectURLCopyExecute(Sender: TObject);
671 procedure TreePopupMenuPopup(Sender: TObject);
672 procedure ListToolBarVisibleActionExecute(Sender: TObject);
673 procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
674 procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
675 var Cancel: WordBool);
676 procedure ListSplitterCanResize(Sender: TObject; var NewSize: Integer;
677 var Accept: Boolean);
678 procedure ListSplitterMoved(Sender: TObject);
679 procedure BrowserTabChange(Sender: TObject);
680 procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
681 Shift: TShiftState; X, Y: Integer);
682 procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
683 State: TDragState; var Accept: Boolean);
684 procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
685 procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
687 procedure BrowserDocumentComplete(Sender: TObject;
688 const pDisp: IDispatch; var URL: OleVariant);
689 procedure SelectReservActionUpdate(Sender: TObject);
690 procedure RoundNamePopupMenuPopup(Sender: TObject);
691 procedure SelectNewRoundNameExecute(Sender: TObject);
692 procedure SelectDeleteRoundExecute(Sender: TObject);
693 procedure SelectReservActionExecute(Sender: TObject);
694 procedure NewBoardActionExecute(Sender: TObject);
695 procedure LoginActionExecute(Sender: TObject);
696 procedure KeySettingActionExecute(Sender: TObject);
697 procedure AllTabCloseActionExecute(Sender: TObject);
698 procedure ArrangeActionExecute(Sender: TObject);
699 procedure NameURLCopyActionExecute(Sender: TObject);
700 procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
701 procedure URLCopyActionUpdate(Sender: TObject);
702 procedure NameURLCopyActionUpdate(Sender: TObject);
703 procedure BrowserTabCloseActionUpdate(Sender: TObject);
704 procedure NotSelectTabCloseActionUpdate(Sender: TObject);
705 procedure AllTabCloseActionUpdate(Sender: TObject);
706 procedure SelectItemNameURLCopyActionUpdate(Sender: TObject);
707 procedure ActiveLogDeleteActionExecute(Sender: TObject);
708 procedure ActiveLogDeleteActionUpdate(Sender: TObject);
709 procedure ListNameBarVisibleActionExecute(Sender: TObject);
710 procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
711 procedure TreeSelectNameURLCopyExecute(Sender: TObject);
712 procedure PaneInitActionExecute(Sender: TObject);
713 procedure FormShow(Sender: TObject);
714 procedure BrowserTabToolBarResize(Sender: TObject);
715 procedure BrowserMinActionExecute(Sender: TObject);
716 procedure SelectTextClearActionExecute(Sender: TObject);
717 procedure NameTextClearActionExecute(Sender: TObject);
718 procedure MailTextClearActionExecute(Sender: TObject);
719 procedure LeftmostTabSelectActionExecute(Sender: TObject);
720 procedure LeftTabSelectActionExecute(Sender: TObject);
721 procedure RightTabSelectActionExecute(Sender: TObject);
722 procedure RightmostTabSelectActionExecute(Sender: TObject);
723 procedure LeftmostTabSelectActionUpdate(Sender: TObject);
724 procedure LeftTabSelectActionUpdate(Sender: TObject);
725 procedure RightTabSelectActionUpdate(Sender: TObject);
726 procedure RightmostTabSelectActionUpdate(Sender: TObject);
727 procedure FavoriteMenuClick(Sender: TObject);
728 procedure FavoriteAddActionExecute(Sender: TObject);
729 procedure FavoriteAddActionUpdate(Sender: TObject);
730 procedure BoardFavoriteAddActionExecute(Sender: TObject);
731 procedure BoardFavoriteAddActionUpdate(Sender: TObject);
732 procedure ThreadFavoriteAddActionExecute(Sender: TObject);
733 procedure ThreadFavoriteAddActionUpdate(Sender: TObject);
734 procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
735 procedure FavoriteArrangeActionExecute(Sender: TObject);
736 procedure MainCoolBarResize(Sender: TObject);
737 procedure MoveToActionExecute(Sender: TObject);
738 procedure AddressToolBarResize(Sender: TObject);
739 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
741 procedure AddressBarVisibleActionExecute(Sender: TObject);
742 procedure BrowserEnter(Sender: TObject);
743 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
744 procedure BrowserTabVisibleActionExecute(Sender: TObject);
745 procedure BrowserTabTopActionExecute(Sender: TObject);
746 procedure BrowserTabBottomActionExecute(Sender: TObject);
747 procedure BrowserTabTabStyleActionExecute(Sender: TObject);
748 procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
749 procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
750 procedure PreviewTimerTimer(Sender: TObject);
751 procedure MessageHideButtonClick(Sender: TObject);
752 procedure MonazillaWebPageActionExecute(Sender: TObject);
753 procedure GikoHelpActionExecute(Sender: TObject);
754 procedure ToolButton18Click(Sender: TObject);
755 procedure KotehanActionExecute(Sender: TObject);
756 procedure LinkBarVisibleActionExecute(Sender: TObject);
757 procedure BBS2chWebPageActionExecute(Sender: TObject);
758 procedure GikoFolderOpenActionExecute(Sender: TObject);
759 procedure MainCoolBarBandInfo(Sender: TObject;
760 var BandInfo: PReBarBandInfoA);
761 procedure MainCoolBarChevronClick(Sender: TObject;
762 RebarChevron: PNMRebarChevron);
763 procedure ListCoolBarBandInfo(Sender: TObject;
764 var BandInfo: PReBarBandInfoA);
765 procedure ListCoolBarChevronClick(Sender: TObject;
766 RebarChevron: PNMRebarChevron);
767 procedure BrowserCoolBarBandInfo(Sender: TObject;
768 var BandInfo: PReBarBandInfoA);
769 procedure BrowserCoolBarChevronClick(Sender: TObject;
770 RebarChevron: PNMRebarChevron);
771 procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
772 procedure ThreadEditorActionExecute(Sender: TObject);
773 procedure ThreadEditorActionUpdate(Sender: TObject);
774 procedure ToolBarSettingActionExecute(Sender: TObject);
775 procedure NameCopyActionExecute(Sender: TObject);
776 procedure BoardIEActionExecute(Sender: TObject);
777 procedure SelectItemNameCopyActionExecute(Sender: TObject);
778 procedure SelectItemNameCopyActionUpdate(Sender: TObject);
779 procedure BoardIEActionUpdate(Sender: TObject);
780 procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
781 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
782 procedure NameCopyActionUpdate(Sender: TObject);
783 procedure SelectComboBoxChange(Sender: TObject);
784 procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
786 procedure SelectComboBoxExit(Sender: TObject);
787 procedure NG1Click(Sender: TObject);
788 procedure SelectResActionExecute(Sender: TObject);
789 procedure SelectResActionUpdate(Sender: TObject);
790 procedure FormKeyUp(Sender: TObject; var Key: Word;
792 procedure AllResActionExecute(Sender: TObject);
793 procedure AllResActionUpdate(Sender: TObject);
794 procedure ReloadClick(Sender: TObject);
795 procedure GoBackClick(Sender: TObject);
796 procedure GoFowardClick(Sender: TObject);
797 procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
798 Shift: TShiftState; X, Y: Integer);
799 procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
800 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
801 procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
802 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
803 procedure StatusBarResize(Sender: TObject);
804 procedure IndividualAbon1Click(Sender: TObject);
805 procedure IndividualAbon2Click(Sender: TObject);
806 procedure N42Click(Sender: TObject);
807 procedure SelectComboBoxEnter(Sender: TObject);
808 procedure AntiIndividualAbonClick(Sender: TObject);
809 procedure N51Click(Sender: TObject);
810 procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
811 procedure CabinetFavoriteActionExecute(Sender: TObject);
812 procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
814 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
815 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
817 procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
819 procedure FavoriteTreePopupMenuPopup(Sender: TObject);
820 procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
821 procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
822 procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
823 procedure ToolButton19Click(Sender: TObject);
824 procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject);
825 procedure FavoriteTreeViewDblClick(Sender: TObject);
826 procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject);
827 procedure FavoriteTreeViewReloadActionExecute(Sender: TObject);
828 procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
829 procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
830 procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject);
831 procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
832 procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
833 Shift: TShiftState; X, Y: Integer);
834 procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
835 State: TDragState; var Accept: Boolean);
836 procedure OnlyAHundredResExecute(Sender: TObject);
837 procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
839 procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
840 var Handled: Boolean);
841 procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
842 var Handled: Boolean);
843 procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
844 var Handled: Boolean);
845 procedure ExportFavoriteFileAccept(Sender: TObject);
846 procedure ExportFavoriteFileBeforeExecute(Sender: TObject);
847 procedure CabinetBBSActionExecute(Sender: TObject);
848 procedure FavoriteTreeViewBrowseThreadActionExecute(Sender: TObject);
849 procedure FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
850 procedure UpBoardActionExecute(Sender: TObject);
851 procedure UpBoardActionUpdate(Sender: TObject);
852 procedure BrowserTabContextPopup(Sender: TObject; MousePos: TPoint;
853 var Handled: Boolean);
854 procedure KoreCopyExecute(Sender: TObject);
855 procedure BrowserTabPopupMenuPopup(Sender: TObject);
856 procedure MenuToolBarResize(Sender: TObject);
857 procedure StdToolBarResize(Sender: TObject);
858 procedure LinkToolBarResize(Sender: TObject);
859 procedure ListNameToolBarResize(Sender: TObject);
860 procedure ListToolBarResize(Sender: TObject);
861 procedure BrowserNameToolBarResize(Sender: TObject);
862 procedure BrowserToolBarResize(Sender: TObject);
863 procedure BrowserTabResize(Sender: TObject);
864 procedure TreeViewClick(Sender: TObject);
865 procedure TreeViewKeyDown(Sender: TObject; var Key: Word;
867 procedure FavoriteTreeViewMouseDown(Sender: TObject;
868 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
869 procedure MessagePanelResize(Sender: TObject);
871 procedure TreeSelectNameCopyExecute(Sender: TObject);
872 procedure FavoriteTreeViewMouseUp(Sender: TObject;
873 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
874 procedure OnlyAHundredResUpdate(Sender: TObject);
875 procedure SetFocusForBrowserActionExecute(Sender: TObject);
876 procedure SetFocusForBrowserActionUpdate(Sender: TObject);
877 procedure SetFocusForThreadListActionExecute(Sender: TObject);
878 procedure SetFocusForCabinetActionExecute(Sender: TObject);
879 procedure BrowserMaxAndFocusActionExecute(Sender: TObject);
880 procedure BrowserMaxAndFocusActionUpdate(Sender: TObject);
881 procedure ThreadlistMaxAndFocusActionExecute(Sender: TObject);
882 procedure ListViewExit(Sender: TObject);
883 procedure SetFocusForCabinetActionUpdate(Sender: TObject);
884 procedure ListViewSelectItem(Sender: TObject; Item: TListItem;
886 procedure SelectTimerTimer(Sender: TObject);
887 procedure SelectItemSaveForHTMLExecute(Sender: TObject);
888 procedure KidokuActionExecute(Sender: TObject);
889 procedure MidokuActionExecute(Sender: TObject);
890 procedure SelectItemSaveForDatExecute(Sender: TObject);
891 procedure BrowserPanelCanResize(Sender: TObject; var NewWidth,
892 NewHeight: Integer; var Resize: Boolean);
893 procedure LogFolderOpenActionExecute(Sender: TObject);
894 procedure LogFolderOpenActionUpdate(Sender: TObject);
895 procedure TabsSaveActionExecute(Sender: TObject);
896 procedure TabsOpenActionExecute(Sender: TObject);
897 procedure TabsSaveToFileActionExecute(Sender: TObject);
898 procedure TabsOpenFromFileActionExecute(Sender: TObject);
901 //RoundList : TRoundList;
905 FEnabledCloseButton: Boolean;
906 // ThreadCreate: TThreadCreate;
908 FClickNode: TTreeNode;
911 FPreviewBrowser: TPreviewBrowser;
914 FBrowserSizeHeight: Integer;
915 FBrowserSizeWidth: Integer;
917 // FFavorite: TFavorite;
918 FTabHintIndex: Integer;
919 FListStyle: TViewStyle; //
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93\83X
\83^
\83C
\83\8b
920 FItemNoVisible: Boolean; //
\83\8a\83X
\83g
\94Ô
\8d\86\95\
\8e¦
\83t
\83\89\83O
921 FViewType: TGikoViewType; //
\83\8a\83X
\83g
\83A
\83C
\83e
\83\80\95\
\8e¦
\83^
\83C
\83v
922 FActiveList: TObject;
923 FActiveContent: TBrowserRecord; //
925 FHistoryList: TList; //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
926 FTreeType: TGikoTreeType;
930 // FLastRoundTime: TDateTime;
931 BrowserNullTab: TBrowserRecord;
932 // DoubleClickOccurred: array [TMouseButton] of Boolean;
933 FDownloadTitle: string; //
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86\82Ì
\83^
\83C
\83g
\83\8b\96¼
934 FDownloadMax: Integer; //
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86\82Ì
\8dÅ
\91å
\83T
\83C
\83Y
935 FEvent: THTMLDocumentEventSink;//
\83u
\83\89\83E
\83U
\83h
\83L
\83\85\83\81\83\93\83g
\83C
\83x
\83\93\83g
937 // Fkeynum : Integer; //
\83L
\81[
\83{
\81[
\83h
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\97p
939 IsDraggingSelectComboBox : Boolean;
940 DraggingSelectComboBoxPosition : TPoint;
942 FSearchDialog: TSearchDialog;
944 FDropSpaceNode: TTreeNode;
946 FDragTime : Cardinal; //
\83\8a\83\93\83N
\82ÌD&D
\97p
947 FDragButton : TToolButton; //
\83\8a\83\93\83N
\82ÌD&D
\97p
\82ÉDrag
\82µ
\82Ä
\82éButton
\95Û
\91¶
948 FDragWFirst : Boolean; //WebTab
\82ÌD&D
\97p
950 FListViewBackGroundColor : TColor; //ListView
\82ÌBackGroundColor
951 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¦
952 FOddColor : TColor; //
\82»
\82Ì
\90F
954 FSelectResWord : string; //
\83\8c\83X
\8di
\8d\9e\83\8f\81[
\83h
955 FIsIgnoreResize : Boolean; //
\83\8a\83T
\83C
\83Y
\83C
\83x
\83\93\83g
\82ð
\96³
\8e\8b\82·
\82é
\82©
\82Ç
\82¤
\82©
956 FIsMinimize : TMinimizeType; //
\8dÅ
\8f¬
\89»
\82µ
\82Ä
\82¢
\82é
\8dÅ
\92\86\82©
957 FOldFormWidth : Integer; //
\92¼
\91O
\82Ì
\83E
\83B
\83\93\83h
\83E
\82Ì
\95\9d
958 FToolBarSettingSender : TToolBarSettingSenderType; //
\83c
\81[
\83\8b\83o
\81[
\90Ý
\92è
\82ð
\83N
\83\8a\83b
\83N
\82µ
\82½
\83N
\81[
\83\8b\83o
\81[
959 FMouseDownPos : TPoint; //
\83u
\83\89\83E
\83U
\83^
\83u
\82Å
\83}
\83E
\83X
\82ð
\89\9f\82µ
\82½
\82Æ
\82«
\82Ì
\8dÀ
\95W
961 procedure SetBoardTreeNode( inBBS : TBBS );
962 function SetCategoryListItem(ABBS2ch: TBBS): Integer;
963 function SetBoardListItem(Category: TCategory): Integer;
964 function SetThreadListItem(Board: TBoard): Integer;
965 // function GetRoundName(index: integer): string;
967 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
968 procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
969 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
970 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
971 procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
973 procedure SetActiveList(Obj: TObject);
975 procedure ListDoubleClick(Shift: TShiftState);
976 procedure BrowserMovement(const AName: string); overload;
977 procedure BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord); overload;
978 procedure SelectListItem(List: TList);
979 // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
980 procedure DeleteTab(ThreadItem: TThreadItem); overload;
981 procedure DeleteTab(BrowserRecord: TBrowserRecord); overload;
982 function Hook(var Message: TMessage): Boolean;
983 procedure AddRoundNameMenu(MenuItem: TMenuItem);
984 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload;
985 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
986 procedure SetSelectRoundName(Sender: TObject);
987 function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
989 procedure SetMenuFont;
990 // procedure CreateFavMenu(Folder: TFavoriteFolder);
991 procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
992 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
993 procedure FavoriteClick(Sender: TObject); overload;
994 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
995 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
996 function OnDocumentContextMenu(Sender: TObject): WordBool;
997 // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
998 procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
999 procedure ShowTextPopup;
1000 //procedure ShowTextPopup(HintData: THintData);
1001 // procedure SetStdToolBar;
1002 // function GetAction(ActionName: string): TContainedAction;
1003 procedure SetLinkBar;
1004 function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
1005 procedure MenuBarChevronMenu;
1006 procedure LinkBarChevronMenu;
1007 procedure ToolBarChevronMenu(ToolBar: TToolBar);
1008 procedure ModifySelectList;
1009 procedure FavoriteBrowseFolder( node: TTreeNode );
1010 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
1011 procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
1012 procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
1013 procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
1014 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
1015 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
1016 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
1017 procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
1018 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
1020 procedure SetListViewBackGroundColor(value: TColor);
1021 procedure BBSMenuItemOnClick( Sender : TObject );
1023 procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
1024 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82É
\95Û
\91¶
1025 procedure SaveCoolBarSettings;
1026 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82©
\82ç
\95\9c\8c³
1027 procedure LoadCoolBarSettings;
1028 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82é
1029 procedure OnMinimize;
1030 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82½
1031 procedure OnMinimized;
1032 // CoolBar
\82ª
\83T
\83C
\83Y
\95Ï
\8dX
\82³
\82ê
\82½
1033 procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
1034 // TreeView
\82ª
\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
1035 procedure TreeClick( Node : TTreeNode );
1036 // TreeView
\82ª
\83_
\83u
\83\8b\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
1037 procedure TreeDoubleClick( Node : TTreeNode );
1038 //
\83M
\83R
\83i
\83r
\82Ì
\83\81\83b
\83Z
\81[
\83W
\83\8b\81[
\83v
\82ð
\89¡
\8eæ
\82è
\82µ
\82Ü
\82·
1039 procedure HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
1040 //
\83u
\83\89\83E
\83U
\82Ì
\83L
\81[
\83_
\83E
\83\93\83C
\83x
\83\93\83g
1041 //
\83C
\83x
\83\93\83g
\82ð
\8eæ
\82è
\88µ
\82Á
\82½
\8fê
\8d\87\82Í True
\82ð
\95Ô
\82·
1042 function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
1043 //
\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
1044 procedure SetBBSMenu;
1045 function WebBrowserClick(Sender: TObject): WordBool;
1046 procedure SkinorCSSFilesCopy(path: string);
1048 procedure GetTabURLs(AStringList: TStringList; Result:Boolean);
1049 //
\83o
\83\93\83h
\95\9d\82ð
\8dÄ
\8cv
\8eZ
\81E
\8dÄ
\90Ý
\92è
\82·
\82é
1050 procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
1052 procedure CreateParams(var Params: TCreateParams); override;
1053 procedure WndProc(var Message: TMessage); override;
1054 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
1055 procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
1056 procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
1060 // FDownload: TDownload;
1061 FControlThread: TThreadControl;
1062 procedure MoveToURL(URL: string);
1063 procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
1064 procedure ReloadBBS;
1065 function GetHttpState: Boolean;
1066 procedure SetEnabledCloseButton(Enabled: Boolean);
1067 function GetTreeNode(Data: TObject): TTreeNode;
1068 procedure AppFormDeactivate(Sender: TObject);
1069 // procedure CabinetPanelVisible(PanelVisible: Boolean);
1070 procedure ListViewAllSelect;
1072 property ListStyle: TViewStyle read FListStyle write FListStyle;
1073 property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
1074 property ViewType: TGikoViewType read FViewType write FViewType;
1076 property NameCookie: string read FNameCookie write FNameCookie;
1077 property MailCookie: string read FMailCookie write FMailCookie;
1079 procedure SetContent(inThread: TBrowserRecord);
1080 function GetActiveContent: TThreadItem;
1081 function GetActiveList: TObject;
1083 property ActiveList: TObject read GetActiveList write SetActiveList;
1084 // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
1086 procedure SetListViewType(AViewType: TGikoViewType); overload;
1087 procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
1088 procedure DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
1089 procedure DownloadList(Board: TBoard; ForceDownload: Boolean = False);
1090 procedure PlaySound(SoundEventName: string);
1092 function AddHistory( FavItem: TFavoriteThreadItem ): Boolean;
1093 procedure DeleteHistory( threadItem: TThreadItem );
1094 procedure ClearHistory;
1095 procedure SaveHistory;
1096 procedure LoadHistory;
1097 procedure ShowBBSTree( inBBS : TBBS );
1098 procedure ShowBBSTreeOld( inBBS : TBBS );
1099 procedure ShowHistoryTree;
1100 procedure SetHistoryTreeNode;
1101 // procedure SelectTreeNode(Item: TObject);
1102 procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
1103 procedure SetBrowserTabState;
1104 // property Favorite: TFavorite read FFavorite write FFavorite;
1105 procedure SetToolBarPopup;
1106 procedure ShowFavoriteAddDialog( Item : TObject );
1107 procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
1108 procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
1109 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
1110 property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
1111 property OddColor : TColor read FOddColor write FOddColor;
1113 function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
1114 procedure OnPlugInMenuItem( Sender : TObject );
1117 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
1120 TFavoriteMenuItem = class(TMenuItem)
1124 property Data: Pointer read FData write FData;
1127 TBBSMenuItem = class(TMenuItem)
1131 property Data: Pointer read FData write FData;
1134 TLinkToolButton = class(TToolButton)
1138 property Data: Pointer read FData write FData;
1141 TBrowserRecord = class( TObject )
1143 FBrowser : TWebBrowser;
1144 FEvent: THTMLDocumentEventSink;//
\83u
\83\89\83E
\83U
\83h
\83L
\83\85\83\81\83\93\83g
\83C
\83x
\83\93\83g
1145 FThread : TThreadItem;
1146 FLastSize : Integer;
1148 FOnlyHundred: Boolean;
1150 destructor Destroy; override;
1151 property Browser : TWebBrowser read FBrowser write FBrowser;
1152 property Thread : TThreadItem read FThread write FThread;
1153 property LastSize : Integer read FLastSize write FLastSize;
1154 property Repaint : Boolean read FRepaint write FRepaint;
1155 property OnlyHundred : Boolean read FOnlyHundred write FOnlyHundred;
1159 GikoForm: TGikoForm;
1164 About, Option, Round, Splash, Sort, ListSelect,
1165 NewBoard, MojuUtils,Clipbrd;
1168 CAPTION_NAME: string = '
\83M
\83R
\83i
\83r';
1169 BLANK_HTML: string = 'about:blank';
1170 SELECTCOMBOBOX_NAME: string = ''; // '
\83X
\83\8c\83b
\83h
\8di
\8d\9e\8c\9f\8dõ';
1171 SELECTCOMBOBOX_COLOR: TColor = clWindow;
1173 DandD_THRESHOLD = 5; //D&D
\82Ìè
\87\92l
\81ipixcel)
1174 //
\83c
\83\8a\81[
\81E
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93
1175 ITEM_ICON_2CH1 = 0; //2ch
\83A
\83C
\83R
\83\93
1176 ITEM_ICON_2CH2 = 1; //2ch
\83A
\83C
\83R
\83\93
1177 ITEM_ICON_CATEGORY1 = 2; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1178 ITEM_ICON_CATEGORY2 = 3; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1179 ITEM_ICON_BOARD_NOSUBJECT = 3; //
\93Ç
\82Ý
\8d\9e\82Ü
\82ê
\82Ä
\82¢
\82È
\82¢
\94Â
\83A
\83C
\83R
\83\93
1180 ITEM_ICON_BOARD1 = 4; //
\94Â
\83A
\83C
\83R
\83\93
1181 ITEM_ICON_BOARD2 = 5; //
\94Â
\83A
\83C
\83R
\83\93
1182 ITEM_ICON_THREADLOG1 = 6; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1183 ITEM_ICON_THREADLOG2 = 7; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1184 ITEM_ICON_THREAD1 = 8; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1185 ITEM_ICON_THREAD2 = 9; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1186 ITEM_ICON_THREADNEW1 = 10; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1187 ITEM_ICON_THREADNEW2 = 11; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1188 ITEM_ICON_SORT1 = 12; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1189 ITEM_ICON_SORT2 = 13; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1190 ITEM_ICON_BOARD_LOG = 17; //
\83X
\83\8c\83\8d\83O
\82 \82è
\94Â
\83A
\83C
\83R
\83\93
1191 ITEM_ICON_BOARD_NEW = 18; //
\83X
\83\8c\90V
\92\85\94Â
\83A
\83C
\83R
\83\93
1193 //
\83c
\81[
\83\8b\83o
\81[
\83A
\83C
\83R
\83\93
1194 TOOL_ICON_HEIGHT_MAX = 16; //
\8d\82\82³
\8dÅ
\91å
\83A
\83C
\83R
\83\93
1195 TOOL_ICON_HEIGHT_MIN = 17; //
\8d\82\82³
\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1196 TOOL_ICON_HEIGHT_NORMAL = 18; //
\8d\82\82³
\95W
\8f\80\83A
\83C
\83R
\83\93
1197 TOOL_ICON_WIDTH_MAX = 19; //
\95\9d\8dÅ
\91å
\83A
\83C
\83R
\83\93
1198 TOOL_ICON_WIDTH_MIN = 20; //
\95\9d\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1199 TOOL_ICON_WIDTH_NORMAL = 21; //
\95\9d\95W
\8f\80\83A
\83C
\83R
\83\93
1201 TOOL_ICON_FAV_FOLDER = 30; //
\82¨
\8bC
\82É
\93ü
\82è
\83t
\83H
\83\8b\83_
\83A
\83C
\83R
\83\93
1202 TOOL_ICON_FAV_BOARD = 31; //
\82¨
\8bC
\82É
\93ü
\82è
\94Â
\83A
\83C
\83R
\83\93
1203 TOOL_ICON_FAV_THREAD = 32; //
\82¨
\8bC
\82É
\93ü
\82è
\83X
\83\8c\83A
\83C
\83R
\83\93
1205 HTML_FILE_NAME = 'temp_preview.html';
1207 WM_XBUTTONDOWN = $020B;
1208 WM_XBUTTONUP = $020C;
1209 WM_XBUTTONDBLCLK = $020D;
1212 USER_TREECLICK = WM_USER + 2000;
1213 USER_RESIZED = WM_USER + 2001;
1214 USER_MINIMIZED = WM_USER + 2002;
1215 USER_SETLINKBAR = WM_USER + 2003;
1216 SELECTTIME_INTERBAL = 110;
1218 BROWSER_COUNT = 5; //
\83u
\83\89\83E
\83U
\82Ì
\90\94
1221 procedure TGikoForm.CreateParams(var Params: TCreateParams);
1224 if FormStyle in [fsNormal, fsStayOnTop] then begin
1225 if BorderStyle in [bsSingle, bsSizeable] then begin
1226 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1227 Params.WndParent := 0;
1232 procedure TGikoForm.FormCreate(Sender: TObject);
1234 TVS_NOTOOLTIPS = $0080;
1240 wp: TWindowPlacement;
1242 newbrowser: TWebBrowser;
1246 Writeln('============================================================');
1247 Writeln('
\83M
\83R
\83i
\83r
\83f
\83o
\83b
\83O
\83R
\83\93\83\
\81[
\83\8b');
1249 Writeln('
\82±
\82Ì
\89æ
\96Ê
\82ð
\95Â
\82¶
\82È
\82¢
\82Å
\82
\82¾
\82³
\82¢
\81B');
1250 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¢');
1251 Writeln('============================================================');
1253 Application.OnDeactivate := AppFormDeactivate;
1254 Self.OnDeactivate := AppFormDeactivate;
1255 Application.HookMainWindow(Hook);
1256 Application.OnMessage := HandleAppMessage; //
\82È
\82ñ
\82©
\96³
\82
\82Ä
\82à
\91å
\8fä
\95v
\82É
\82È
\82Á
\82½
\81@by
\81@
\82à
\82¶
\82ã
1257 Self.DoubleBuffered := true;
1258 FTreeType := gttNone;
1260 FSearchDialog := nil;
1261 BrowserNullTab := TBrowserRecord.Create;
1262 BrowserNullTab.Browser := Browser;
1263 BrowserNullTab.Browser.Navigate(BLANK_HTML);
1264 FBrowsers := TList.Create;
1265 for i := 0 to BROWSER_COUNT -1 do begin
1266 FBrowsers.Add(TWebBrowser.Create(nil));
1267 newBrowser := FBrowsers[FBrowsers.Count - 1];
1268 TOleControl(newBrowser).Parent := BrowserPanel;
1269 newBrowser.Align := alNone;
1270 newBrowser.Left := 0;
1271 newBrowser.Top := 0;
1272 //newBrowser.DoubleBuffered := true;
1273 newBrowser.OnDocumentComplete := BrowserDocumentComplete;
1274 newBrowser.OnBeforeNavigate2 := BrowserBeforeNavigate2;
1275 newBrowser.OnEnter := BrowserEnter;
1276 newBrowser.OnNewWindow2 := BrowserNewWindow2;
1277 newBrowser.OnStatusTextChange := BrowserStatusTextChange;
1278 //newBrowser.OnTitleChange := BrowserTitleChange;
1279 newBrowser.Navigate(BLANK_HTML);
1280 ShowWindow(newBrowser.Handle, SW_HIDE);
1283 BrowserNullTab.Browser.BringToFront;
1284 ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
1286 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô
1287 FIsIgnoreResize := True;
1289 //
\8eè
\82Ì
\83J
\81[
\83\
\83\8b
1290 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1293 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1294 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1296 //
\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Æ)
1297 InitializeBoardPlugIns;
1299 EnabledCloseButton := True;
1302 //
\8f\84\89ñ
\83f
\81[
\83^
\93Ç
\82Ý
\8d\9e\82Ý
1303 RoundList := TRoundList.Create;
1304 RoundList.LoadRoundBoardFile;
1306 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\97ñ
\8b\93(ReadFavorite
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1307 GikoSys.ListBoardFile;
1309 RoundList.LoadRoundThreadFile;
1311 if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
1312 GikoSys.ListBoardFile;
1314 //
\83\81\83j
\83\85\81[
\82É
\92Ç
\89Á
1317 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g(LoadHistory
\82æ
\82è
\82à
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1318 FHistoryList := TList.Create;
1320 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1323 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
1324 // FFavorite := TFavorite.Create(FavoriteTreeView);
1325 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1326 FavoriteDM.ReadFavorite;
1328 //
\83\8a\83X
\83g
\83X
\83^
\83C
\83\8b
1329 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1331 //
\83\81\83C
\83\93\83N
\81[
\83\8b\83o
\81[
\88Ê
\92u
1332 // MainCoolBar.Top := 0;
1333 // MainCoolBar.Left := 0;
1335 //
\83A
\83j
\83\81\83p
\83l
\83\8b\88Ê
\92u
1336 AnimePanel.Top := 0;
1337 AnimePanel.Left := 0;
1339 //
\8ae
\8eí
\89Â
\8e\8b\8fó
\91Ô
\82È
\82Ç
\90Ý
\92è
1341 //
\83L
\83\83\83r
\83l
\83b
\83g
1342 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1344 //
\83\81\83b
\83Z
\81[
\83W
\83o
\81[
1345 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1346 MsgBarVisibleActionExecute(nil);
1347 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1349 //
\83X
\83e
\81[
\83^
\83X
\83o
\81[
1350 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1351 StatusBarVisibleActionExecute(nil);
1353 //
\83t
\83H
\83\93\83g
\81E
\90F
\90Ý
\92è
1354 TreeView.Items.BeginUpdate;
1355 FavoriteTreeView.Items.BeginUpdate;
1356 ListView.Items.BeginUpdate;
1358 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1359 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1360 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1361 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1363 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1364 FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1365 FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1366 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1368 ListView.Font.Name := GikoSys.Setting.ListFontName;
1369 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1370 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1371 //ListView.Color := GikoSys.Setting.ListBackColor;
1372 ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1373 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1374 FOddColor := GikoSys.Setting.OddColor;
1377 TreeView.Items.EndUpdate;
1378 FavoriteTreeView.Items.EndUpdate;
1379 ListView.Items.EndUpdate;
1381 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1382 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1384 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
1385 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1386 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1387 FDragWFirst := false;
1388 SetContent(BrowserNullTab); //
\83u
\83\89\83E
\83U
\82ð
\8bó
\94\92\95\
\8e¦
1389 // TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
1390 // TreeView.Selected := TreeView.Items[0]; //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
1393 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95\9c\8c³
1394 wp.length := sizeof(wp);
1395 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1396 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1397 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1398 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1399 wp.showCmd := SW_HIDE;
1400 SetWindowPlacement(Handle, @wp);
1402 // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1403 // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1404 if GikoSys.Setting.WindowMax then
1405 WindowState := wsMaximized;
1407 //
\83M
\83R
\83A
\83j
\83\81
1409 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1410 if FileExists(FileName) then
1411 Animate.FileName := FileName;
1419 //
\83X
\83\8c\91S
\95\94\95\
\8e¦
\83{
\83^
\83\93\82ð
\89\9f\82³
\82ê
\82½
\8fó
\91Ô
\82É
\82·
\82é
1420 AllItemAction.Checked := True;
1421 AllResAction.Checked := True;
1423 //TreeView
\82Ì
\8e×
\96\82\8fL
\82¢ToolTip
\82ð
\94ñ
\95\
\8e¦
1424 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1425 Style := Style or TVS_NOTOOLTIPS;
1426 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1428 //
\83c
\83\8a\81[
\82ð
\83\81\83C
\83\93\82¾
\82¯
\95\
\8e¦
\82É
\82µ
\82Ä
\8dÅ
\91å
\89»
1429 TreeView.Align := alClient;
1430 FavoriteTreeView.Align := alClient;
1431 FavoriteTreeView.Visible := False;
1433 //
\83u
\83\89\83E
\83U
\83T
\83C
\83Y
\95Ï
\8dX
\82Ì
\8f\89\8aú
\89»
1434 // FBrowserSizeFlag := False;
1435 // FBrowserSizeHeight := ViewPanel.Height;
1437 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1438 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1440 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1441 ArrangeAction.Execute;
1443 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1444 case GikoSys.Setting.ListWidthState of
1446 ViewPanel.Width := 1;
1447 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1448 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1451 ViewPanel.Width := GikoSys.Setting.ListWidth;
1452 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1453 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1456 ViewPanel.Width := GikoSys.Setting.ListWidth;
1457 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1458 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1462 case GikoSys.Setting.ListHeightState of
1464 ViewPanel.Height := 1;
1465 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1466 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1469 ViewPanel.Height := GikoSys.Setting.ListHeight;
1470 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1471 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1474 ViewPanel.Height := GikoSys.Setting.ListHeight;
1475 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1476 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1481 //
\83v
\83\8d\83O
\83\8c\83X
\83o
\81[
\82Ì
\8f\89\8aú
\89»
1482 // ProgressBar.Visible := False;
1483 ProgressBar.Parent := StatusBar;
1484 ProgressBar.Top := 2;
1485 ProgressBar.Left := 0;
1486 ProgressBar.Width := StatusBar.Panels[0].Width;
1487 ProgressBar.Height := StatusBar.Height - 2;
1488 ProgressBar.Position := 0;
1490 //
\83_
\83E
\83\93\83\8d\81[
\83h
\83I
\83u
\83W
\83F
\83N
\83g
1491 FControlThread := TThreadControl.Create(True);
1492 FControlThread.MaxThreadCount := 1;
1493 FControlThread.Resume;
1494 FControlThread.OnDownloadEnd := DownloadEnd;
1495 FControlThread.OnDownloadMsg := DownloadMsg;
1496 FControlThread.OnWork := Work;
1497 FControlThread.OnWorkBegin := WorkBegin;
1498 FControlThread.OnWorkEnd := WorkEnd;
1499 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1501 //
\8di
\8d\9e\8c\9f\8dõ
\97\9a\97ð
1502 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1504 //
\83u
\83\89\83E
\83U
\83^
\83u
\90Ý
\92è
1507 BrowserBoardNameLabel.Caption := '';
1508 BrowserNameLabel.Caption := '';
1511 FTabHintIndex := -1;
1513 //
\83\8a\83\93\83N
\83o
\81[
1516 //
\83\81\83j
\83\85\81[
\83t
\83H
\83\93\83g
1519 //
\83c
\81[
\83\8b\83o
\81[Wrapable
1520 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1521 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1523 KeepDefaultToolButton(StdToolBar, TmpToolBar);
1524 KeepDefaultToolButton(ListToolBar, TmpToolBar);
1525 KeepDefaultToolButton(BrowserToolBar, TmpToolBar);
1527 MakeDefaultINIFile();
1528 //
\83c
\81[
\83\8b\83{
\83^
\83\93\93Ç
\82Ý
\8d\9e\82Ý
1529 ReadToolBarSetting(ActionList, StdToolBar);
1530 ReadToolBarSetting(ActionList, ListToolBar);
1532 for i := ListToolBar.ControlCount - 1 downto 0 do
1534 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1536 //
\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·
1537 if (i + 1) < ListToolBar.ControlCount then
1538 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1539 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1540 ListToolBar.Controls[ i + 1 ].Visible := False;
1542 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
1543 ListToolBar.Controls[ i ].Visible := False;
1544 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
1545 SelectComboBox.Parent := ListToolBar;
1546 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1547 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1548 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
1549 SelectComboBoxSplitter.Parent := ListToolBar;
1550 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1557 ReadToolBarSetting(ActionList, BrowserToolBar);
1559 OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes;
1560 //
\83A
\83h
\83\8c\83X
\83o
\81[
1561 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1563 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³
\82ÍFormShow
\82É
\88Ú
\93®
\82µ
\82½
1565 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\82ª
\96³
\82¢
\8fê
\8d\87\82Í
\83\81\83b
\83Z
\81[
\83W
\95\
\8e¦
1566 if not FileExists(GikoSys.GetBoardFileName) then begin
1567 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
1568 + '
\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
1569 + '
\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';
1570 MsgBox(SplashWindow.Handle, msg, '
\83M
\83R
\83i
\83r', MB_OK or MB_ICONINFORMATION);
1571 NewBoardAction.Execute;
1574 //
\83L
\81[
\90Ý
\92è
\93Ç
\82Ý
\8d\9e\82Ý
1575 GikoSys.LoadKeySetting(ActionList);
1577 //
\8dÅ
\8fI
\8f\84\89ñ
\8e\9e\8aÔ
1578 // FLastRoundTime := 0;
1581 FHint := TResPopup.Create(Self);
1583 //
\8dÅ
\8cã
\82É
\91I
\91ð
\82³
\82ê
\82½
\83L
\83\83\83r
\83l
\83b
\83g
\82Ì
\95\9c\8c³
1584 CabinetVisible( False );
1585 if GikoSys.Setting.CabinetVisible then begin
1586 i := CabinetSelectPopupMenu.Items.Count - 1;
1587 if GikoSys.Setting.CabinetIndex = i - 1 then
1588 CabinetHistoryAction.Execute
1589 else if GikoSys.Setting.CabinetIndex = i then
1590 CabinetFavoriteAction.Execute
1592 if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1593 ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1594 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô 2
1595 FIsIgnoreResize := True;
1596 CabinetBBSAction.Execute;
1599 ShowBBSTreeOld( BBSs[ 0 ] );
1600 PostMessage( Handle, USER_TREECLICK, 0, 0 );
1603 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô 3
1604 FIsIgnoreResize := True;
1606 //
\83I
\81[
\83g
\83\8d\83O
\83C
\83\93
1607 if GikoSys.Setting.AutoLogin then
1608 LoginAction.Execute;
1610 //
\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
1611 for i := 1 to ParamCount do begin
1612 MoveToURL(ParamStr(i));
1617 s := GikoSys.FAbon.NGwordname;
1618 StatusBar.Panels[2].Text := s;
1619 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1620 StatusBarResize(Sender);
1622 dummy1.Caption := ItemReservPMenu.Caption;
1623 dummy1.Hint := ItemReservPMenu.Hint;
1625 //Samba24
\82Ì
\83t
\83@
\83C
\83\8b\83`
\83F
\83b
\83N
1626 GikoSys.SambaFileExists();
1628 //
\83^
\83u
\8e©
\93®
\93Ç
\82Ý
\8d\9e\82Ý
1629 if OptionDialog.TabAutoLoad.Checked then begin
1630 TabsSaveActionExecute(Sender);
1635 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82É
\95Û
\91¶
1636 procedure TGikoForm.SaveCoolBarSettings;
1642 if IsIconic( Handle ) or FIsIgnoreResize then
1645 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Main)
1646 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1647 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1648 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1649 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1650 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1652 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Board)
1653 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1654 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1655 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1656 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1657 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1659 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Browser)
1660 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1661 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1662 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1663 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1664 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1669 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82©
\82ç
\95\9c\8c³
1670 procedure TGikoForm.LoadCoolBarSettings;
1676 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Main)
1677 MainCoolBar.Bands.BeginUpdate;
1679 // for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1680 for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin
1681 CoolSet := GikoSys.Setting.MainCoolSet[i];
1682 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1683 FIsIgnoreResize := False;
1684 SaveCoolBarSettings;
1687 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1688 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1689 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1692 MainCoolBar.Bands.EndUpdate;
1695 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Board)
1696 ListCoolBar.Bands.BeginUpdate;
1698 // for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1699 for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin
1700 CoolSet := GikoSys.Setting.ListCoolSet[i];
1701 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1702 FIsIgnoreResize := False;
1703 SaveCoolBarSettings;
1706 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1707 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1708 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1711 ListCoolBar.Bands.EndUpdate;
1714 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Browser)
1715 BrowserCoolBar.Bands.BeginUpdate;
1717 // for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1718 for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
1719 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1720 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1721 FIsIgnoreResize := False;
1722 SaveCoolBarSettings;
1725 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1726 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1727 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1730 BrowserCoolBar.Bands.EndUpdate;
1738 procedure TGikoForm.FormShow(Sender: TObject);
1740 ShowWindow(Application.Handle, SW_HIDE);
1742 //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½
1743 //
\83c
\81[
\83\8b\83o
\81[
\95\
\8e¦
1744 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1745 StdToolBarVisibleActionExecute( nil );
1746 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1747 AddressBarVisibleActionExecute( nil );
1748 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1749 LinkBarVisibleActionExecute( nil );
1750 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1751 ListToolBarVisibleActionExecute( nil );
1752 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1753 ListNameBarVisibleActionExecute( nil );
1754 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1755 BrowserToolBarVisibleActionExecute( nil );
1756 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1757 BrowserNameBarVisibleActionExecute( nil );
1759 //
\83u
\83\89\83E
\83U
\83^
\83u
1760 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1761 BrowserTabVisibleActionExecute(nil);
1763 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1764 BrowserTabTopAction.Checked := True;
1765 BrowserTabTopActionExecute(nil);
1767 BrowserTabBottomAction.Checked := True;
1768 BrowserTabBottomActionExecute(nil);
1771 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1772 BrowserTabTabStyleAction.Checked := True;
1773 BrowserTabTabStyleActionExecute(nil);
1774 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1775 BrowserTabButtonStyleAction.Checked := True;
1776 BrowserTabButtonStyleActionExecute(nil);
1778 BrowserTabFlatStyleAction.Checked := True;
1779 BrowserTabFlatStyleActionExecute(nil);
1782 // CoolBar
\95\9c\8c³
1783 LoadCoolBarSettings;
1785 FIsIgnoreResize := False;
1788 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1790 // if GikoForm.WindowState <> wsMinimized then
1791 // SaveCoolBarSettings;
1792 if ( GikoSys.Setting.ShowDialogForEnd ) and
1793 (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
1799 //Application.HookMainWindow(Hook);
1800 Application.UnhookMainWindow(Hook);
1801 Application.Terminate;
1803 if OptionDialog.TabAutoSave.Checked then begin
1804 TabsOpenActionExecute(Sender);
1809 procedure TGikoForm.FormDestroy(Sender: TObject);
1812 // CoolSet: TCoolSet;
1813 wp: TWindowPlacement;
1816 // Application.OnDeactivate := nil;
1817 // Self.OnDeactivate := nil;
1820 if GetActiveList is TBBS then begin
1821 for i := 0 to ListView.Columns.Count - 1 do
1822 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1823 end else if GetActiveList is TCategory then begin
1824 for i := 0 to ListView.Columns.Count - 1 do
1825 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1826 end else if GetActiveList is TBoard then begin
1827 for i := 0 to ListView.Columns.Count - 1 do
1828 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1833 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95Û
\91¶
1834 wp.length := sizeof(wp);
1835 GetWindowPlacement(Handle, @wp);
1836 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1837 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1838 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1839 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1840 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1842 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1843 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1844 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1845 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1846 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1847 if ArrangeAction.Checked then
1848 GikoSys.Setting.ListOrientation := gloVertical
1850 GikoSys.Setting.ListOrientation := gloHorizontal;
1851 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1854 //
\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è
1855 //
\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¢
1857 //
\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
1859 if GikoForm.WindowState <> wsMinimized then
1860 SaveCoolBarSettings;
1863 GikoSys.Setting.WriteWindowSettingFile;
1864 GikoSys.Setting.WriteNameMailSettingFile;
1868 //
\82¨
\8bC
\82É
\93ü
\82è
\95Û
\91¶
1870 //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é
1871 FavoriteDM.WriteFavorite;
1877 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1878 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
1879 GikoSys.Setting.ShowDialogForAllTabClose := false;
1880 AllTabCloseAction.Execute;
1881 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
1885 LockWindowUpdate(Self.Handle);
1886 for i := FBrowsers.Count - 1 downto 0 do begin
1887 TWebBrowser(FBrowsers[i]).Free;
1890 FBrowsers.Capacity := 0;
1895 if BrowserNullTab <> nil then begin
1896 BrowserNullTab.Browser := nil; {*BrowserNullTab
\82ÌBrowser
\82Í
\90Ý
\8cv
\8e\9e\82É
\93\
\82è
\95t
\82¯
\82Ä
\82é
\93z
1897 *
\82È
\82Ì
\82Å
\82±
\82±
\82ÅFree
\82³
\82ê
\82é
\82Æ
\8d¢
\82é
\82Ì
\82Å
\82Í
\82¸
\82µ
\82Ä
\82µ
\82Ü
\82¤
\81B
1899 BrowserNullTab.Free;
1903 LockWindowUpdate(0);
1905 TreeView.Items.BeginUpdate;
1906 for i := TreeView.Items.Count - 1 downto 0 do begin
1907 TreeView.Items[i].Free;
1909 TreeView.Items.Clear;
1910 TreeView.Items.EndUpdate;
1914 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\95Û
\91¶
1916 //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
1917 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1921 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
\95Û
\91¶
1935 //
\8f\84\89ñ
\83\8a\83X
\83g
\95Û
\91¶&
\94j
\8aü
1937 RoundList.SaveRoundFile;
1951 FControlThread.Terminate;
1952 FControlThread.WaitFor;
1956 FControlThread.Free;
1959 // TBBS
\82Í
\95Û
\8e\9d\82µ
\82Ä
\82¢
\82é TCategory, TBoard, TThreadItem
\82·
\82×
\82Ä
\82ð
\8aJ
\95ú
\82·
\82é
1960 // 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Å
1961 // BoardPluteIns
\82Ì
\8aJ
\95ú
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ
1963 for i := Length( BBSs ) - 1 downto 0 do begin
1964 if BBSs[ i ] <> nil then
1972 for i := Length( BoardPlugIns ) - 1 downto 0 do begin
1973 if BoardPlugIns[ i ] <> nil then
1974 BoardPlugIns[ i ].Free;
1975 BoardPlugIns[ i ] := nil;
1981 if FEvent <> nil then
1985 if FHint <> nil then begin
1986 FHint.ReleaseHandle;
1991 if TPreviewBrowser <> nil then begin
1992 FPreviewBrowser.Free;
1993 FPreviewBrowser := nil;
2000 //
\83t
\83H
\81[
\83\80\83N
\83\8d\81[
\83Y
2001 procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
2004 //
\83L
\83\83\83r
\83l
\83b
\83g
\81~
\83{
\83^
\83\93\83N
\83\8a\83b
\83N
2005 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
2007 CabinetVisibleAction.Execute;
2008 // CabinetPanelVisible(false);
2011 //
\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
2012 procedure TGikoForm.SetBBSMenu;
2015 item : TBBSMenuItem;
2018 //
\83\81\83j
\83\85\81[
\82ð
\8dí
\8f\9c
2019 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
2021 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
2022 CabinetSelectPopupMenu.Items[ i ].Free;
2023 CabinetMenu.Items[ i ].Free;
2024 BBSSelectPopupMenu.Items[ i ].Free;
2030 //
\83\81\83j
\83\85\81[
\82ð
\90Ý
\92è
2031 for i := Length( BBSs ) - 1 downto 0 do begin
2033 item := TBBSMenuItem.Create( PopupMenu );
2034 item.Caption := BBSs[ i ].Title;
2035 item.Data := BBSs[ i ];
2036 item.OnClick := BBSMenuItemOnClick;
2037 CabinetSelectPopupMenu.Items.Insert( 0, item );
2038 item := TBBSMenuItem.Create( PopupMenu );
2039 item.Caption := BBSs[ i ].Title;
2040 item.Data := BBSs[ i ];
2041 item.OnClick := BBSMenuItemOnClick;
2042 CabinetMenu.Insert( 0, item );
2043 item := TBBSMenuItem.Create( PopupMenu );
2044 item.Caption := BBSs[ i ].Title;
2045 item.Data := BBSs[ i ];
2046 item.OnClick := BBSMenuItemOnClick;
2047 BBSSelectPopupMenu.Items.Insert( 0, Item );
2054 procedure TGikoForm.ReloadBBS;
2059 //
\83^
\83u
\83N
\83\8d\81[
\83Y
2060 tmpBool := GikoSys.Setting.ShowDialogForAllTabClose;
2061 GikoSys.Setting.ShowDialogForAllTabClose := false;
2062 AllTabCloseAction.Execute;
2063 GikoSys.Setting.ShowDialogForAllTabClose := tmpBool;
2065 SetContent(BrowserNullTab);
2066 //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
2067 TreeView.Items.Clear;
2071 for i := Length( BBSs ) - 1 downto 0 do begin
2072 if BBSs[ i ] <> nil then
2081 FTreeType := gttNone;
2083 GikoSys.ListBoardFile; //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\93Ç
\8d\9e
2085 // BBS
\83\81\83j
\83\85\81[
\82Ì
\8dX
\90V
2088 ShowBBSTree( BBSs[ 0 ] );
2090 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
2095 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
2096 FavoriteDM.WriteFavorite;
2098 FavoriteDM.ReadFavorite;
2104 //
\83{
\81[
\83h
\83c
\83\8a\81[
\90Ý
\92è
2105 procedure TGikoForm.SetBoardTreeNode(
2111 CategoryNode: TTreeNode;
2112 BoardNode: TTreeNode;
2113 Category: TCategory;
2116 //
\94Â
\83\8a\83X
\83g
\82Ì
\90Ý
\92è
2117 FActiveBBS := inBBS;
2118 TreeView.Items.BeginUpdate;
2119 TreeView.Items.Clear;
2121 if not inBBS.IsBoardFileRead then
2122 GikoSys.ReadBoardFile( inBBS );
2124 if SplashWindow <> nil then
2125 SplashWindow.ProgressBar.Max := inBBS.Count;
2129 Root := TreeView.Items.Add( nil, inBBS.Title );
2130 Root.ImageIndex := ITEM_ICON_2CH1;
2131 Root.SelectedIndex := ITEM_ICON_2CH2;
2133 for i := 0 to inBBS.Count - 1 do begin
2134 Category := TCategory(inBBS.Items[i]);
2135 CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
2136 CategoryNode.Data := Category;
2137 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
2138 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
2140 for j := 0 to Category.Count - 1 do begin
2141 Board := TBoard(Category.Items[j]);
2143 BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
2144 BoardNode.Data := Board;
2145 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
2146 if not Board.IsLogFile then begin
2147 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
2148 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
2150 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
2151 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
2152 for k := 0 to Board.Count - 1 do begin
2153 if Board.Items[ k ].IsLogFile then begin
2154 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
2155 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
2164 CategoryNode.Expanded := Category.NodeExpand;
2166 if SplashWindow <> nil then begin
2167 SplashWindow.ProgressBar.StepIt;
2168 Application.ProcessMessages;
2172 TreeView.Items.EndUpdate;
2176 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
2178 COLUMN: array[0..0] of string = ('
\83J
\83e
\83S
\83\8a\96¼');
2180 ListColumn: TListColumn;
2183 ListView.Items.BeginUpdate;
2185 Screen.Cursor := crHourGlass;
2187 ListView.Columns.Clear;
2188 for i := 0 to Length(COLUMN) - 1 do begin
2189 ListColumn := ListView.Columns.Add;
2190 ListColumn.Caption := COLUMN[i];
2191 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
2194 ListView.Items.Count := 0;
2195 ListView.Items.Clear;
2196 ListView.Items.Count := ABBS2ch.Count;
2198 // UpFolderAction.Enabled := False;
2199 // AllItemAction.Enabled := False;
2200 // LogItemAction.Enabled := False;
2201 // NewItemAction.Enabled := False;
2202 // SelectItemAction.Enabled := False;
2203 // ListDownloadToolButton.Enabled := False;
2204 // BoardReservToolButton.Enabled := False;
2205 // ListThreadDownloadToolButton.Enabled := False;
2207 ListNameLabel.Caption := ABBS2ch.Title;
2208 FolderImage.Picture := nil;
2209 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
2211 FSortIndex := GikoSys.Setting.BBSSortIndex;
2212 FSortOrder := GikoSys.Setting.BBSSortOrder;
2213 if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
2214 ListViewSort(nil, ListView.Column[FSortIndex]);
2216 Result := ABBS2ch.Count;
2218 Screen.Cursor := crDefault;
2219 ListView.Items.EndUpdate;
2223 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
2225 COLUMN: array[0..2] of string = ('
\94Â
\96¼', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e');
2227 ListColumn: TListColumn;
2230 ListView.Items.BeginUpdate;
2232 Screen.Cursor := crHourGlass;
2234 ListView.Columns.Clear;
2235 for i := 0 to Length(COLUMN) - 1 do begin
2236 ListColumn := ListView.Columns.Add;
2237 ListColumn.Caption := COLUMN[i];
2238 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
2241 ListView.Items.Count := 0;
2242 ListView.Items.Clear;
2243 ListView.Items.Count := Category.Count;
2245 // UpFolderAction.Enabled := True;
2246 // AllItemAction.Enabled := False;
2247 // LogItemAction.Enabled := False;
2248 // NewItemAction.Enabled := False;
2249 // SelectItemAction.Enabled := False;
2250 // ListDownloadToolButton.Enabled := False;
2251 // BoardReservToolButton.Enabled := False;
2252 // ListThreadDownloadToolButton.Enabled := False;
2254 ListNameLabel.Caption := Category.Title;
2255 FolderImage.Picture := nil;
2256 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2258 FSortIndex := GikoSys.Setting.CategorySortIndex;
2259 FSortOrder := GikoSys.Setting.CategorySortOrder;
2260 if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
2261 ListViewSort(nil, ListView.Column[FSortIndex]);
2263 Result := Category.Count;
2265 Screen.Cursor := crDefault;
2266 ListView.Items.EndUpdate;
2270 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2272 COLUMN: array[0..7] of string = ('
\83X
\83\8c\83b
\83h
\96¼', '
\83J
\83E
\83\93\83g', '
\8eæ
\93¾', '
\90V
\92\85',
2273 '
\96¢
\93Ç', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e', '
\83X
\83\8c\8dì
\90¬
\93ú
\8e\9e');
2274 COLUMN_NONACQUIREDCOUNT: string = '
\96¢
\8eæ
\93¾';
2275 COLUMN_ALIGNMENT: array[0..7] of TAlignment = (taLeftJustify, taRightJustify,
2276 taRightJustify, taRightJustify,
2277 taRightJustify, taLeftJustify,
2278 taLeftJustify, taLeftJustify);
2279 //No,
\83X
\83\8c\83b
\83h
\96¼,
\83J
\83E
\83\93\83g,
\8f\84\89ñ
\97\
\96ñ,
\8eæ
\93¾
\93ú
\8e\9e
2281 ListColumn: TListColumn;
2284 ListView.Items.BeginUpdate;
2286 Screen.Cursor := crHourGlass;
2288 //
\83`
\83\89\82Â
\82«
\96h
\8e~
\82Ì
\82½
\82ß
\81A
\95Ï
\8dX
\82³
\82ê
\82Ä
\82¢
\82é
\8fê
\8d\87\82Ì
\82Ý
2289 //
\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Ó
2290 if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2292 ListView.Columns.Clear;
2293 for i := 0 to Length(COLUMN) - 1 do begin
2294 ListColumn := ListView.Columns.Add;
2295 ListColumn.Caption := COLUMN[i];
2296 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2297 ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2300 if GikoSys.Setting.NonAcquiredCount then
2302 ListView.Columns[2].Caption := COLUMN_NONACQUIREDCOUNT;
2305 ListView.Items.Count := 0;
2306 ListView.Items.Clear;
2308 case GikoForm.ViewType of
2309 gvtAll: ListView.Items.Count := Board.Count;
2310 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2311 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2312 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2315 ListNameLabel.Caption := Board.Title;
2316 FolderImage.Picture := nil;
2317 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2319 FSortIndex := GikoSys.Setting.BoardSortIndex;
2320 FSortOrder := GikoSys.Setting.BoardSortOrder;
2321 if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
2322 ListViewSort(nil, ListView.Column[FSortIndex]);
2324 Result := Board.Count;
2326 Screen.Cursor := crDefault;
2327 ListView.Items.EndUpdate;
2331 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2333 // FileName: string;
2334 // DateTime: TDateTime;
2337 Category: TCategory;
2339 ThreadItem: TThreadItem;
2341 ActivListObj : TObject;
2343 ActivListObj := ActiveList;
2344 if ActivListObj is TBBS then begin
2345 BBS := TBBS(ActivListObj);
2347 ListView.StateImages := nil;
2349 if BBS = nil then Exit;
2350 if BBS.Count <= 0 then Exit;
2351 if Item = nil then Exit;
2352 if Item.Index >= BBS.Count then Exit;
2353 if ListView.Items.Count = 0 then Exit;
2355 if not (BBS.Items[Item.index] is TCategory) then Exit;
2356 Category := TCategory(BBS.Items[Item.index]);
2358 if Category = nil then Exit;
2360 if ListNumberVisibleAction.Checked then
2361 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2363 Item.Caption := Category.Title;
2365 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2366 Item.Data := Category;
2367 end else if ActivListObj is TCategory then begin
2368 Category := TCategory(ActivListObj);
2370 ListView.StateImages := nil;
2372 if Category = nil then Exit;
2373 if Category.Count <= 0 then Exit;
2374 if Item = nil then Exit;
2375 if Item.Index >= Category.Count then Exit;
2376 if ListView.Items.Count = 0 then Exit;
2378 if not (Category.Items[Item.Index] is TBoard) then Exit;
2379 Board := TBoard(Category.Items[Item.Index]);
2381 if Board = nil then Exit;
2383 if ListNumberVisibleAction.Checked then
2384 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2386 Item.Caption := Board.Title;
2388 if Item.SubItems.Count <> 2 then begin
2389 Item.SubItems.Clear;
2390 Item.SubItems.Add('');
2391 Item.SubItems.Add('');
2394 Item.ImageIndex := ITEM_ICON_BOARD1;
2397 Item.SubItems[0] := Board.RoundName // '
\97\
\96ñ'
2399 Item.SubItems[0] := '';
2401 if Board.RoundDate = ZERO_DATE then begin
2402 Item.SubItems[1] := '';
2404 Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2406 end else if ActivListObj is TBoard then begin
2407 Board := TBoard(ActivListObj);
2409 if GikoSys.Setting.ListIconVisible then
2410 ListView.StateImages := StateIconImageList
2412 ListView.StateImages := nil;
2414 case GikoForm.ViewType of
2415 gvtAll: BoardCnt := Board.Count;
2416 gvtLog: BoardCnt := Board.GetLogThreadCount;
2417 gvtNew: BoardCnt := Board.GetNewThreadCount;
2418 gvtUser: BoardCnt := Board.GetUserThreadCount;
2423 // if Board = nil then Exit;
2424 if BoardCnt <= 0 then Exit;
2425 if Item = nil then Exit;
2426 if Item.Index > BoardCnt then Exit;
2427 if ListView.Items.Count = 0 then Exit;
2429 // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2432 case GikoForm.ViewType of
2433 gvtAll: if Item.Index >= Board.Count then Exit else
2434 ThreadItem := TThreadItem(Board.Items[Item.Index]);
2435 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2436 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2437 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2440 if ThreadItem = nil then Exit;
2442 // if ListNumberVisibleAction.Checked then
2443 // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2445 RepStr := ThreadItem.Title;
2446 RepStr := CustomStringReplace(RepStr, '<', '<' );
2447 RepStr := CustomStringReplace(RepStr, '>', '>' );
2448 RepStr := CustomStringReplace(RepStr, '"', '"' );
2449 RepStr := CustomStringReplace(RepStr, '&', '&' );
2450 //RepStr := StringReplace(RepStr, '
\81\97\81M', ',', [rfReplaceAll]);
2452 if Item.SubItems.Count <> 7 then begin
2453 Item.SubItems.Clear;
2454 Item.SubItems.Add('');
2455 Item.SubItems.Add('');
2456 Item.SubItems.Add('');
2457 Item.SubItems.Add('');
2458 Item.SubItems.Add('');
2459 Item.SubItems.Add('');
2460 Item.SubItems.Add('');
2463 if ListNumberVisibleAction.Checked then
2464 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2466 Item.Caption := RepStr;
2468 case ThreadItem.AgeSage of
2469 gasNone: Item.StateIndex := -1;
2470 gasNew: Item.StateIndex := 0;
2471 gasAge: Item.StateIndex := 1;
2472 gasSage: Item.StateIndex := 2;
2475 if ThreadItem.IsLogFile then begin
2476 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2477 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2478 if GikoSys.Setting.NonAcquiredCount then
2479 Item.SubItems[1] := IntToStr(ThreadItem.AllResCount - ThreadItem.Count)
2481 Item.SubItems[1] := IntToStr(ThreadItem.Count);
2482 if ThreadItem.NewResCount = 0 then
2483 Item.SubItems[2] := ''
2485 Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2486 Item.SubItems[3] := '';
2487 if ThreadItem.Round then
2488 Item.SubItems[4] := ThreadItem.RoundName
2490 Item.SubItems[4] := '';
2491 if ThreadItem.RoundDate = ZERO_DATE then begin
2492 Item.SubItems[5] := '';
2494 Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2495 if ThreadItem.NewArrival then
2496 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2497 if ThreadItem.CreateDate = ZERO_DATE then begin
2498 Item.SubItems[6] := '';
2500 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2503 Item.ImageIndex := ITEM_ICON_THREAD1;
2504 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2505 Item.SubItems[1] := '';
2506 Item.SubItems[2] := '';
2507 Item.SubItems[3] := '';
2508 Item.SubItems[4] := '';
2509 Item.SubItems[5] := '';
2510 if not GikoSys.Setting.CreationTimeLogs then
2511 if ThreadItem.CreateDate = ZERO_DATE then
2512 Item.SubItems[6] := ''
2514 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2518 Item.Data := ThreadItem;
2522 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2523 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2524 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2525 var Index: Integer);
2531 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2537 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2538 EndIndex: Integer; OldState, NewState: TItemStates);
2543 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2551 threadItem : TThreadItem;
2553 Protocol, Host, Path, Document, Port, Bookmark: string;
2558 ActiveFileName: string;
2564 if not( TObject(Sender) is TWebBrowser )then
2568 if (TWebBrowser(Sender) <> nil) and (not TWebBrowser(Sender).Busy) and (Assigned(TWebBrowser(Sender).Document)) then begin
2569 if LowerCase(OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset) <> 'shift_jis' then begin
2570 OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset := 'shift_jis';
2577 if PreviewTimer.Enabled then
2578 PreviewTimer.Enabled := False;
2579 Application.CancelHint;
2581 if GetActiveContent <> nil then
2582 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2584 ActiveFileName := '';
2586 FActiveContent := nil;
2590 StatusBar.Panels[1].Text := Text;
2592 if FHint <> nil then begin
2593 FHint.ReleaseHandle;
2596 if FPreviewBrowser <> nil then
2597 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2599 if not GikoSys.Setting.UnActivePopup then
2600 if not GikoForm.Active then
2603 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2604 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2607 Ext := AnsiLowerCase(ExtractFileExt(Text));
2608 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2609 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2610 if FPreviewBrowser = nil then begin
2611 FPreviewBrowser := TPreviewBrowser.Create(Self);
2612 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2613 TOleControl(FPreviewBrowser).Parent := nil;
2615 FPreviewBrowser.Navigate(BLANK_HTML);//
\91O
\89ñ
\82Ì
\83v
\83\8c\83r
\83\85\81[
\89æ
\91\9c\8fÁ
\8b\8e\97p
2616 FPreviewURL := Text;
2617 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2618 PreviewTimer.Enabled := True;
2619 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2620 if Pos('mailto:', Text) = 1 then begin
2621 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2622 //
\83M
\83R
\83i
\83r
\83X
\83\8c \83p
\81[
\83g3
\82Ì466
\8e\81\82É
\8a´
\8eÓ
2624 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2625 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2626 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2627 if (Assigned(e)) then begin
2628 tmp2 := ZenToHan(e.Get_outerText);
2629 if (GikoSys.IsNumeric(tmp2)) then begin
2630 //
\82\93\82Í
\83\8c\83X
\94Ô
\8d\86\82Á
\82Û
\82¢
\82Á
\82·
\81B
2631 wkIntSt := StrToInt(tmp2);
2632 wkIntTo := StrToInt(tmp2);
2633 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2634 FHint.PopupType := gptThread;
2635 SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False);
2637 FHint.PopupType := gptRaw;
2642 threadItem := GetActiveContent;
2643 if Pos('about:blank..', Text) = 1 then begin
2644 if AnsiPos('http://jbbs.shitaraba.com/', threadItem.URL) <> 0 then begin
2645 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2646 Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo);
2647 if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then
2648 buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo)
2649 else if( PathRec.FSt <> 0 ) then
2650 buf := IntToStr(PathRec.FSt);
2651 end else if AnsiPos('machi.to/bbs/', threadItem.URL) <> 0 then begin
2652 URL := threaditem.URL;
2653 buf := Copy(Text,AnsiPos('&st=',Text),Length(Text)-AnsiPos('&st=',Text) + 1);
2655 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2656 buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text));
2662 PathRec := Gikosys.Parse2chURL2(URL);
2663 if (PathRec.FNoParam) then begin
2667 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2668 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
2670 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
2672 URL := GikoSys.GetBrowsableThreadURL( URL );
2673 wkIntSt := PathRec.FSt;
2674 wkIntTo := PathRec.FTo;
2676 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2679 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2681 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2683 end else if wkIntSt > wkIntTo then begin
2688 //if wkIntSt = 0 then
2690 //if wkINtTo = 0 then
2692 //if PathRec.FFirst then
2694 if PathRec.FStBegin then
2696 if PathRec.FToEnd then
2699 //ATitle := ActiveFileName <> PathRec.FKey;
2700 if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
2705 threadItem := BBSsFindThreadFromURL( URL );
2707 if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
2708 board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
2709 if board <> nil then begin
2710 if not board.IsThreadDatRead then
2711 GikoSys.ReadSubjectFile( board );
2712 threadItem := board.FindThreadFromFileName( PathRec.FKey + '.dat' );
2716 if threadItem <> nil then begin
2717 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2718 FHint.PopupType := gptThread;
2719 SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2725 // ShowTextPopup(s);
2726 if FHint.PopupType = gptRaw then begin
2727 if FHint.Caption <> '' then
2730 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2736 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2739 //SysMenuApp: HMenu;
2741 FEnabledCloseButton := Enabled;
2742 SysMenu := GetSystemMenu(Handle, False);
2743 //SysMenuApp := GetSystemMenu(Application.Handle, False);
2745 if Enabled then begin
2746 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2747 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2749 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2750 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2753 DrawMenuBar(Handle);
2754 //DrawMenuBar(Application.Handle);
2757 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2758 var AllowChange: Boolean);
2760 //
\83\
\81[
\83g
\8f\87\82ð
\95Û
\91¶
\82·
\82é
\82æ
\82¤
\82É
\82µ
\82½
\82Ì
\82Å
\8dí
\8f\9c
2761 // if FTreeType = gtt2ch then
2762 // FSortIndex := -1;
2765 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2766 Shift: TShiftState);
2768 if GetActiveList is TBoard then begin
2769 if Key = VK_BACK then begin
2770 // UpFolderButtonClick(Sender);
2771 end else if Key = VK_SPACE then begin
2772 ListDoubleClick(Shift);
2773 end else if Key = VK_RETURN then begin
2776 end else begin // TBBS, TCategory
2777 if Key = VK_BACK then begin
2778 // UpFolderButtonClick(Sender);
2779 end else if Key = VK_SPACE then begin
2781 end else if Key = VK_RETURN then begin
2782 ListDoubleClick(Shift);
2787 function TGikoForm.GetHttpState: Boolean;
2789 Result := FHttpState;
2792 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2793 Column: TListColumn);
2797 wkCategory: TCategory;
2800 if FSortIndex = Column.Index then
2801 FSortOrder := not FSortOrder
2803 FSortOrder := False;
2804 ListViewSort(Sender, Column);
2807 procedure TGikoForm.ListViewSort(Sender: TObject; Column: TListColumn);
2811 wkCategory: TCategory;
2814 for i := 0 to ListView.Columns.Count - 1 do
2815 ListView.Column[i].ImageIndex := -1;
2817 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
2819 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
2821 Sort.SortNoFlag := ListNumberVisibleAction.Checked;
2823 //if TObject(TreeView.Selected.Data) is TBBS then begin
2824 if TObject( FActiveList ) is TBBS then begin
2825 //wkBBS := TBBS(TreeView.Selected.Data);
2826 wkBBS := TBBS( FActiveList );
2827 Sort.SortOrder := FSortOrder;
2828 Sort.SortIndex := Column.Index;
2829 GikoSys.Setting.BBSSortIndex := Column.Index;
2830 GikoSys.Setting.BBSSortOrder := FSortOrder;
2831 wkBBS.Sort(CategorySortProc);
2833 //end else if TObject(TreeView.Selected.Data) is TCategory then begin
2834 end else if TObject( FActiveList ) is TCategory then begin
2835 //wkCategory := TCategory(TreeView.Selected.Data);
2836 wkCategory := TCategory( FActiveList );
2837 Sort.SortOrder := FSortOrder;
2838 Sort.SortIndex := Column.Index;
2839 GikoSys.Setting.CategorySortIndex := Column.Index;
2840 GikoSys.Setting.CategorySortOrder := FSortOrder;
2841 wkCategory.CustomSort(BoardSortProc);
2843 //end else if TObject(TreeView.Selected.Data) is TBoard then begin
2844 end else if TObject( FActiveList ) is TBoard then begin
2845 //wkBoard := TBoard(TreeView.Selected.Data);
2846 wkBoard := TBoard( FActiveList );
2847 Sort.SortOrder := FSortOrder;
2848 Sort.SortIndex := Column.Index;
2849 Sort.SortNonAcquiredCountFlag := GikoSys.Setting.NonAcquiredCount;
2850 GikoSys.Setting.BoardSortIndex := Column.Index;
2851 GikoSys.Setting.BoardSortOrder := FSortOrder;
2852 wkBoard.CustomSort(ThreadItemSortProc);
2855 FSortIndex := Column.Index;
2858 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2859 Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean);
2863 DefaultDraw := True;
2865 DefaultDraw := False;
2866 if (cdsSelected in State) or (cdsHot in State) then begin
2867 Sender.Canvas.Brush.Color := clHighlight;
2868 Sender.Canvas.Font.Color := clHighlightText;
2870 Sender.Canvas.Brush.Color := clBtnFace;
2871 Sender.Canvas.Font.Color := clBtnText;
2873 ARect := Rect(Button.Left, Button.Top, Button.Left + Button.Width, Button.Top + Button.Height);
2874 Sender.Canvas.FillRect(ARect);
2875 DrawText(Sender.Canvas.Handle, PChar(Button.Caption), -1, ARect, DT_SINGLELINE or DT_VCENTER or DT_CENTER);
2878 function TGikoForm.GetTreeNode(Data: TObject): TTreeNode;
2883 Nodes := TreeView.Items;
2885 for i := 0 to Nodes.Count - 1 do begin
2886 if Nodes.Item[i].Data = Data then begin
2887 Result := Nodes.Item[i];
2894 procedure TGikoForm.BrowserBeforeNavigate2(Sender: TObject;
2895 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
2896 Headers: OleVariant; var Cancel: WordBool);
2901 kMenuName: string = 'menu:';
2904 if Pos(kMenuName, URL) <> 0 then begin
2905 sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
2907 if not GikoSys.IsNumeric(sNo) then Exit;
2911 KokoPopupMenu.Tag := StrToInt(sNo);
2912 KokoPopupMenu.Popup(p.x, p.y);
2913 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
2914 Cancel := not GikoSys.Setting.OpenMailer;
2919 procedure TGikoForm.ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
2920 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
2921 var DefaultDraw: Boolean);
2923 ThreadItem: TThreadItem;
2925 // TListView(Sender).Canvas.Font.Style := [];
2926 if TObject(Item.Data) is TThreadItem then begin
2927 ThreadItem := TThreadItem(Item.Data);
2928 if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
2929 ListView.Canvas.Brush.Color := FOddColor;
2931 ListView.Canvas.Brush.Color := FListViewBackGroundColor;
2933 // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
2934 if ThreadItem.UnRead then
2935 TListView(Sender).Canvas.Font.Style := [fsBold];
2939 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
2941 Application.ProcessMessages;
2942 if Application.Terminated then
2944 if PreviewTimer.Enabled then
2945 PreviewTimer.Enabled := False;
2946 //
\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
2947 if FHint <> nil then begin
2948 FHint.ReleaseHandle;
2953 if FPreviewBrowser <> nil then
2954 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2958 procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
2959 const ARect: TRect; var DefaultDraw: Boolean);
2963 IsBoardNode: Boolean;
2969 Category: TCategory;
2973 DefaultDraw := True;
2975 if FTreeType = gttHistory then Exit;
2977 TreeView.Canvas.Font.Color := clBlue;
2978 IsBoardNode := False;
2979 for i := 0 to TreeView.Items.Count - 1 do begin
2981 if not TreeView.Items[i].IsVisible then
2984 if TObject(TreeView.Items[i].Data) is TCategory then begin
2985 if TreeView.Items[i].Expanded then
2988 IsBoardNode := False;
2989 Category := TCategory(TreeView.Items[i].Data);
2990 for j := 0 to Category.Count - 1 do begin
2991 Board := Category.Items[j];
2992 if Board <> nil then begin
2993 if Board.UnRead > 0 then begin
3001 end else if TObject(TreeView.Items[i].Data) is TBoard then begin
3002 IsBoardNode := True;
3003 Board := TBoard(TreeView.Items[i].Data);
3004 Cnt := Board.UnRead;
3010 Bitmap := TBitmap.Create;
3012 Bitmap.Canvas.Font.Assign(TreeView.Canvas.Font);
3013 Bitmap.Canvas.Font.Style := [fsBold];
3014 NodeWidth := Bitmap.Canvas.TextWidth(TreeView.Items[i].Text);
3019 NodeRect := TreeView.Items[i].DisplayRect(True);
3022 CntText := '(' + IntToStr(Cnt) + ')'
3023 else if Cnt = 1 then
3027 TextWidth := TreeView.Canvas.TextWidth(CntText);
3029 TextRect := Rect(NodeRect.Left + NodeWidth + 8,
3031 NodeRect.Left + NodeWidth + TextWidth + 8,
3033 DrawText(TreeView.Canvas.Handle,
3037 DT_SINGLELINE or DT_VCENTER);
3039 TreeViewCustomDrawItem(nil, nil, [], DefaultDraw);
3042 procedure TGikoForm.TreeViewCustomDrawItem(Sender: TCustomTreeView;
3043 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
3046 Category: TCategory;
3049 DefaultDraw := True;
3051 if FTreeType = gttHistory then Exit;
3053 TreeView.Canvas.Font.Style := [];
3054 if Node <> nil then begin
3055 if TObject(Node.Data) is TCategory then begin
3056 Category := TCategory(Node.Data);
3057 for i := 0 to Category.Count - 1 do begin
3058 Board := Category.Items[i];
3059 if Board <> nil then begin
3060 if Board.UnRead > 0 then begin
3061 TreeView.Canvas.Font.Style := [fsBold];
3066 end else if TObject(Node.Data) is TBoard then begin
3067 Board := TBoard(Node.Data);
3068 if Board.UnRead > 0 then
3069 TreeView.Canvas.Font.Style := [fsBold];
3074 procedure TGikoForm.TreeViewExpanded(Sender: TObject; Node: TTreeNode);
3076 TreeView.Invalidate;
3078 if TObject(Node.Data) is TBBS then begin
3079 TBBS(Node.Data).NodeExpand := True;
3080 end else if TObject(Node.Data) is TCategory then begin
3081 TCategory(Node.Data).NodeExpand := True;
3082 end else if TObject(Node.Data) is TBoard then begin
3083 TBoard(Node.Data).NodeExpand := True;
3087 {procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
3089 TreeSplitter.Visible := PanelVisible;
3090 CabinetPanel.Visible := PanelVisible;
3091 CabinetToolButton.Down := PanelVisible;
3094 procedure TGikoForm.ListViewAllSelect;
3100 procedure TGikoForm.TreeViewDblClick(Sender: TObject);
3105 GetCursorPos(APoint);
3106 APoint := TreeView.ScreenToClient(APoint);
3107 HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
3108 if not (htOnLabel in HitTest) then Exit;
3110 TreeDoubleClick( TreeView.Selected );
3113 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
3115 AddMessageList(Msg, nil, Icon);
3118 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
3122 boardPlugIn : TBoardPlugIn;
3126 if Item.DownType = gdtBoard then
3127 ATitle := Item.Board.Title
3129 ATitle := Item.ThreadItem.Title;
3131 ATitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j';
3133 if Item.State in [gdsComplete, gdsDiffComplete] then begin
3135 if Item.DownType = gdtBoard then begin
3138 AddMessageList(ATitle + ' [
\83X
\83\8c\88ê
\97\97\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3139 if GetActiveList = Item.Board then begin
3141 SetActiveList(Item.Board);
3143 Item.Board.Modified := True;
3144 Item.Board.IsThreadDatRead := True;
3146 end else if Item.DownType = gdtThread then begin
3149 Item.ThreadItem.NewArrival := True;
3150 if (Item.ThreadItem.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin
3151 boardPlugIn := Item.ThreadItem.BoardPlugIn;
3152 Item.ThreadItem.Title := GikoSys.DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 )).FTitle;
3153 ATitle := Item.ThreadItem.Title;
3154 end else if ATitle = '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j' then begin
3155 ATitle := GikoSys.DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1)).FTitle;
3157 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
3158 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then
3159 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
3161 if GikoSys.Setting.BrowserTabVisible then begin
3162 if GetActiveContent = Item.ThreadItem then
3163 InsertBrowserTab(Item.ThreadItem)
3164 else if (ListView.Selected <> nil ) and ( TObject(ListView.Selected.Data) is TThreadItem ) and ( Item.ThreadItem = TThreadItem(ListView.Selected.Data)) then
3165 InsertBrowserTab(Item.ThreadItem, True)
3167 InsertBrowserTab(Item.ThreadItem, False);
3169 if (GetActiveContent = Item.ThreadItem) or (FActiveContent = nil) or(FActiveContent.Browser = BrowserNullTab.Browser) then
3170 InsertBrowserTab(Item.ThreadItem);
3173 if Item.State = gdsComplete then begin
3175 AddMessageList(ATitle + ' [
\83X
\83\8c\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3177 PlaySound('NewDiff');
3178 AddMessageList(ATitle + ' [
\83X
\83\8c\8d·
\95ª
\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3181 //
\8f\84\89ñ
\82 \82è
\82Ì
\8fê
\8d\87\81\95\82P
\82O
\82O
\82O
\92´
\82Í
\8f\84\89ñ
\8dí
\8f\9c
3182 if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin
3183 Item.ThreadItem.Round := False;
3184 Item.ThreadItem.RoundName := '';
3185 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);
3191 end else if Item.State = gdsNotModify then begin
3193 { if (Item.DownType = gdtThread) and (AddHistory(Item.ThreadItem)) then begin
3194 //SetContent(Item.ThreadItem);
3195 InsertBrowserTab(Item.ThreadItem);
3197 AddMessageList(ATitle + ' [
\96¢
\8dX
\90V]', nil, gmiSAD);
3198 PlaySound('NoChange');
3199 Screen.Cursor := crDefault;
3200 end else if Item.State = gdsAbort then begin
3202 AddMessageList(ATitle + ' [
\92\86\92f]', nil, gmiSAD);
3203 end else if Item.State = gdsError then begin
3208 AddMessageList(ATitle + ' [
\83G
\83\89\81[(' + IntToStr(Item.ResponseCode) + s + ')]', nil, gmiNG);
3209 // if Item.ResponseCode = 302 then
3210 // 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);
3216 if FWorkCount < 0 then FWorkCount := 0;
3217 if FWorkCount = 0 then begin
3219 Animate.Active := False;
3221 Screen.Cursor := crDefault;
3228 procedure TGikoForm.WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
3230 // SetProgressValue(Number, 0, AWorkCountMax);
3231 // ProgressBar.Visible := True;
3232 ProgressBar.Position := 0;
3233 ProgressBar.Max := AWorkCountMax;
3234 FDownloadTitle := AWorkTitle;
3235 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ð
\8aJ
\8en
\82µ
\82Ü
\82·';
3236 FDownloadMax := AWorkCountMax;
3239 procedure TGikoForm.WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
3241 ProgressBar.Position := 0;
3242 if FDownloadMax <> 0 then
3243 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ª
\8a®
\97¹
\82µ
\82Ü
\82µ
\82½';
3246 procedure TGikoForm.Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
3248 ProgressBar.Position := AWorkCount;
3249 // SetProgressValue(Number, AWorkCount);
3250 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86 (' + IntToStr(AWorkCount) + '/' + IntToStr(FDownloadMax) + ')';
3254 procedure TGikoForm.SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
3256 Component: TComponent;
3258 Component := FindComponent('ProgressBar' + IntToStr(Number + 1));
3259 if Component <> nil then begin
3260 if not (Component is TProgressBar) then Exit;
3262 TProgressBar(Component).Max := Max;
3263 TProgressBar(Component).Position := Value;
3268 procedure TGikoForm.AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
3270 ListItem: TListItem;
3272 MessageListView.Items.BeginUpdate;
3274 ListItem := MessageListView.Items.Add;
3275 ListItem.Caption := ACaption;
3276 ListItem.Data := AObject;
3277 ListItem.MakeVisible(False);
3279 gmiOK: ListItem.ImageIndex := 0;
3280 gmiSAD: ListItem.ImageIndex := 1;
3281 gmiNG: ListItem.ImageIndex := 2;
3282 gmiWhat: ListItem.ImageIndex := 3;
3285 MessageListView.Items.EndUpdate;
3289 {procedure TGikoForm.BrowserTabChange(Sender: TObject);
3292 ThreadItem: TThreadItem;
3294 ThreadItem := GetActiveContent;
3295 if ThreadItem <> nil then begin
3296 SetContent(ThreadItem);
3300 procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
3304 favItem : TFavoriteThreadItem;
3305 newBrowser : TBrowserRecord;
3308 if Threaditem = nil then Exit;
3310 if ThreadItem.IsLogFile then begin
3311 //
\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é
3312 //
\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é
3313 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil) and
3314 (FActiveContent.FBrowser <> BrowserNullTab.Browser)then begin
3315 j := FBrowsers.IndexOf(FActiveContent.FBrowser);
3316 if j = BROWSER_COUNT - 1 then
3317 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3319 favItem := TFavoriteThreadItem.Create(ThreadItem.URL, ThreadItem.Title );
3320 if not AddHistory( favItem ) then
3323 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
3324 if TObject(BrowserTab.Tabs.Objects[i]) is TBrowserRecord then begin
3325 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
3326 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = nil then begin
3327 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3328 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
3329 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3330 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3331 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3332 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3337 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
3338 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
3339 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3341 if ActiveTab then begin
3342 BrowserTab.TabIndex := i;
3343 BrowserTab.OnChange(nil);
3350 idx := BrowserTab.TabIndex;
3351 if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin
3352 newBrowser := TBrowserRecord.Create;
3353 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3354 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
3355 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3356 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3357 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3358 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3363 newBrowser.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
3364 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3365 //newBrowser.Browser.Navigate(BLANK_HTML);
3366 newBrowser.thread := ThreadItem;
3367 newBrowser.Repaint := true;
3368 newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes;
3370 BrowserTab.Tabs.InsertObject(0, GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser);
3371 if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 1) then begin
3372 DeleteTab( TBrowserRecord( BrowserTab.Tabs.Objects[ 1 ] ) );
3376 if ActiveTab then begin
3377 BrowserTab.TabIndex := 0;
3381 newBrowser := TBrowserRecord.Create;
3382 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3383 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
3384 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3385 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3386 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3387 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3392 newBrowser.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
3393 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3394 //newBrowser.Browser.Navigate(BLANK_HTML);
3395 newBrowser.thread := ThreadItem;
3396 newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes;
3397 newBrowser.Repaint := true;
3399 i := BrowserTab.Tabs.AddObject(GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser);
3400 if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 1) then begin
3401 DeleteTab( TBrowserRecord( BrowserTab.Tabs.Objects[ 0 ] ) );
3405 if ActiveTab then begin
3406 if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 0) then
3407 BrowserTab.TabIndex := 0
3409 BrowserTab.TabIndex := i;
3412 if(ActiveTab) or (idx = -1) then begin
3413 BrowserTab.OnChange(nil);
3416 if BrowserNullTab = nil then begin
3417 BrowserNullTab := TBrowserRecord.Create;
3418 BrowserNullTab.Browser := Browser;
3420 BrowserNullTab.thread := ThreadItem;
3421 BrowserTab.TabIndex := -1;
3422 SetContent(BrowserNullTab);
3425 if GikoSys.Setting.URLDisplay then
3426 AddressComboBox.Text := ThreadItem.URL;
3430 procedure TGikoForm.SetContent(inThread : TBrowserRecord);
3435 // HtmlName: string;
3438 // OldCursor: TCursor;
3442 ThreadItem: TThreadItem;
3443 Thread: TBrowserRecord;
3444 ThreadTitle, ThreadPTitle: string;
3445 ThreadScrollTop: Integer;
3446 ThreadIsLog, ThreadUnRead, ThreadNewArraical: boolean;
3449 idx := BrowserTab.TabIndex;
3450 if (FActiveContent <> nil) and
3451 (FActiveContent.Thread <> Thread.Thread) and
3452 (Assigned(FActiveContent.Browser.Document)) then begin
3456 //Application.ProcessMessages;
3457 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document).Body).ScrollTop;
3458 //if FActiveContent.Browser <> BrowserNullTab.Browser then
3459 // TOleControl(FActiveContent.Browser).Visible := false;
3462 MsgBox(Handle, E.Message, 'SetContent[<-ScrollTop]', 0);
3467 if not (Assigned(Thread)) or (Thread.Thread = nil) then begin
3468 Thread.Browser.Navigate(BLANK_HTML);
3469 BrowserBoardNameLabel.Caption := '';
3470 ItemBoardImage.Picture := nil;
3471 BrowserNameLabel.Caption := '';
3472 ItemImage.Picture := nil;
3473 BrowserNullTab.Thread := nil;
3474 //TOleControl(BrowserNullTab.Browser).Visible := true;
3475 ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
3476 FActiveContent := nil;
3478 end else if Thread.Browser = nil then begin
3479 if FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then
3480 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3481 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
3482 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
3483 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser := nil;
3484 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent <> nil then begin
3485 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent.Free;
3486 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent := nil;
3491 Thread.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
3492 FBrowsers.Move(BROWSER_COUNT - 1, 0);
3494 ThreadTitle := Thread.Thread.Title;
3495 ThreadPTitle := Thread.Thread.ParentBoard.Title;
3496 ThreadScrollTop := Thread.Thread.ScrollTop;
3497 ThreadIsLog := Thread.Thread.IsLogFile;
3498 ThreadItem := Thread.Thread;
3499 ThreadNewArraical := Thread.Thread.NewArrival;
3500 ThreadUnRead := Thread.Thread.UnRead;
3501 BBSID := ThreadItem.ParentBoard.BBSID;
3502 FileName := ThreadItem.FileName;
3504 if GetCapture = ListView.Handle then
3507 Screen.Cursor := crHourGlass;
3511 if ThreadItem.UnRead then begin
3512 ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
3513 if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0;
3516 // LockWindowUpdate(Self.Handle);
3517 if(FActiveContent <> nil) and (FActiveContent <> Thread) then begin
3518 if (FActiveContent.Browser <> BrowserNullTab.Browser) then
3519 ShowWindow(FActiveContent.Browser.Handle, SW_HIDE);
3521 ShowWindow(Thread.FBrowser.Handle, SW_SHOW);
3522 //LockWindowUpdate(0);
3523 if (not Assigned(Thread.Browser.Document)) then begin
3524 Thread.Browser.Navigate('about:blank');
3526 FActiveContent := Thread;
3527 while (Thread.Browser.ReadyState <> READYSTATE_COMPLETE) and
3528 (Thread.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3529 Application.ProcessMessages;
3530 if idx <> BrowserTab.TabIndex then begin
3534 if not ThreadIsLog then begin
3535 Self.Caption := CAPTION_NAME ;
3537 s := '<HTML><BODY><CENTER>
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Í
\8eæ
\93¾
\82µ
\82Ä
\82¢
\82Ü
\82¹
\82ñ</CENTER></BODY></HTML>';
3538 doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
3540 doc.charset := 'Shift_JIS';
3546 Self.Caption := CAPTION_NAME + ' - [' + ThreadTitle + ']';
3547 //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«
3548 //
\90V
\8bK
\82ÉThread
\82ð
\8aJ
\82¢
\82½
\82Æ
\82«
\82É
\90^
\82É
\82È
\82Á
\82Ä
\82¢
\82é
\81B
3549 if(Thread.Repaint) or (Thread.OnlyHundred <> GikoSys.OnlyAHundredRes)then begin
3550 //Thread.LastSize := ThreadItem.Size;
3551 Thread.Repaint := false;
3553 Thread.Browser.OnStatusTextChange := nil;
3554 doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
3555 GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
3557 // if (Assigned(Thread.Browser)) and (Thread.Browser <> nil) then
3558 Thread.Browser.OnStatusTextChange := BrowserStatusTextChange;
3559 //
\82È
\82º
\82©
\82±
\82±
\82Å
\96¾
\8e¦
\93I
\82ÉDocumentComplete
\82ð
\8cÄ
\82Î
\82È
\82¢
\82Æ
\82¤
\82Ü
\82
\82¢
\82©
\82È
\82¢
3560 //
\92Ç
\8bL
\81@200406/19
3561 //Visible
\82Ì
\82Æ
\82«
\82µ
\82©DocumentComplete
\82Í
\8cÄ
\82Î
\82ê
\82È
\82¢
\82ç
\82µ
\82¢
3562 Thread.FBrowser.OnDocumentComplete(Thread.FBrowser, Thread.FBrowser.Parent, url);
3563 Thread.OnlyHundred := GikoSys.OnlyAHundredRes;
3564 Application.ProcessMessages;
3565 //
\82±
\82±
\82ÅApplication.ProcessMessages
\82ð
\8cÄ
\82Ô
\82±
\82Æ
\82É
\82æ
\82Á
\82ÄWebBrowser
\82ð
\8dX
\90V
\82³
\82¹
\82é
\81B
3566 //
\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é
3567 //
\81@by
\82à
\82¶
\82ã(2004/01/20)
3569 //if (Assigned(Thread)) and (Assigned(ThreadItem))then begin
3570 if(Thread <> nil) and (ThreadItem <>nil) then begin
3571 if ThreadUnRead then
3572 BrowserMovement('new', Thread)
3573 else if ThreadScrollTop <> 0 then begin
3575 doc.Body.ScrollTop := ThreadScrollTop;
3578 MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
3583 FActiveContent := nil;
3588 FActiveContent := nil;
3593 // Application.ProcessMessages;
3596 ThreadItem.UnRead := False;
3599 if (Assigned(Thread)) and (Assigned(Thread.Thread)) and (Thread <> nil) and (ThreadItem <>nil) then begin
3600 //FActiveContent := Thread;
3602 BrowserBoardNameLabel.Caption := ThreadPTitle;
3603 ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
3604 BrowserNameLabel.Caption := ThreadTitle;
3605 ItemImage.Picture := nil;
3607 if ThreadNewArraical then
3608 ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap)
3610 ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap)
3612 ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap);
3614 ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;
3615 BrowserNameLabel.Left := ItemImage.Left + 20;
3617 FActiveContent := nil;
3620 Screen.Cursor := crDefault;
3624 function TGikoForm.GetActiveContent: TThreadItem;
3627 if( Assigned(FActiveContent) ) and (Assigned(FActiveContent.Thread))
3628 and (FActiveContent <> nil) and (FActiveContent.Thread <> nil) then
3629 Result := FActiveContent.Thread
3631 FActiveContent := nil;
3635 FActiveContent := nil;
3640 procedure TGikoForm.SetActiveList(Obj: TObject);
3645 // if FActiveList <> Obj then begin
3648 if ListView.Selected <> nil then
3649 idx := ListView.Selected.Index
3652 ListView.Items.Count := 0;
3653 ListView.Items.Clear;
3654 ListView.Selected := nil;
3655 // ListView.Columns.Clear;
3657 Self.Caption := CAPTION_NAME;
3658 //Application.Title := CAPTION_NAME;
3660 if Obj is TBBS then begin
3661 for i := 0 to ListView.Columns.Count - 1 do
3662 ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i];
3663 SetCategoryListItem(TBBS(Obj));
3664 end else if Obj is TCategory then begin
3665 for i := 0 to ListView.Columns.Count - 1 do
3666 ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i];
3667 SetBoardListItem(TCategory(Obj));
3668 end else if Obj is TBoard then begin
3669 SetThreadListItem(TBoard(Obj));
3672 if idx >= 0 then begin
3673 ListView.ItemIndex := idx;
3674 ListView.ItemFocused := ListView.Items.Item[ idx ];
3680 //
\81\9a\81\9a\83q
\83\8d\83\86\83L
\83\81\83\82
3681 //
\82»
\82Ì
\82¤
\82¿interface
\82ð
\8eg
\82¤
3682 function TGikoForm.GetActiveList: TObject;
3684 Result := FActiveList;
3687 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType);
3689 SetListViewType(AViewType, '', False);
3692 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
3696 if ActiveList is TBoard then begin
3697 Board := TBoard(ActiveList);
3699 Board.ParentCategory.ParenTBBS.SelectText := SelectText;
3700 Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
3701 // Board.SelectText := SelectText;
3702 // Board.KubetsuChk := KubetsuChk;
3703 ViewType := AViewType;
3704 SetActiveList(Board);
3705 SetThreadListItem(Board);
3709 procedure TGikoForm.ListViewCustomDraw(Sender: TCustomListView;
3710 const ARect: TRect; var DefaultDraw: Boolean);
3716 if ListView.Items.Count = 0 then begin
3717 DefaultDraw := True;
3719 ListView.Canvas.Brush.Color := ListView.Color;
3720 ListView.Canvas.FillRect(ARect);
3724 ListView.Canvas.Font.Color := clWindowText;
3725 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3728 ListView.Canvas.Font.Color := clBlue;
3729 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';
3732 ListView.Canvas.Font.Color := clGreen;
3733 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\90V
\92\85\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3736 ListView.Canvas.Font.Color := clNavy;
3737 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';
3738 if GetActiveList is TBoard then
3739 s := Format(s, [TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText]);
3747 p := Point((ListView.ClientWidth div 2) - (ListView.Canvas.TextWidth(s) div 2),
3748 (ListView.ClientHeight div 2) - (ListView.Canvas.TextHeight(s) div 2));
3749 ListView.Canvas.TextOut(p.X, p.Y, s);
3751 DefaultDraw := True;
3755 procedure TGikoForm.DownloadList(Board: TBoard; ForceDownload: Boolean = False);
3757 Item: TDownloadItem;
3759 if not Board.IsThreadDatRead then
3760 GikoSys.ReadSubjectFile(Board);
3761 Item := TDownloadItem.Create;
3763 Item.Board := Board;
3764 Item.DownType := gdtBoard;
3765 Item.ForceDownload := ForceDownload;
3766 // AbortToolButton.Enabled := True;
3767 // Animate.Active := True;
3768 // FDownload.Add(Item);
3769 FControlThread.AddItem(Item);
3770 // Animate.Active := False;
3771 // AbortToolButton.Enabled := False;
3772 if FWorkCount = 0 then begin
3774 Animate.Active := True;
3777 Screen.Cursor := crAppStart;
3785 procedure TGikoForm.DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
3787 Item: TDownloadItem;
3789 Item := TDownloadItem.Create;
3791 Item.ThreadItem := ThreadItem;
3792 Item.DownType := gdtThread;
3793 Item.ForceDownload := ForceDownload;
3794 // AbortToolButton.Enabled := True;
3795 // Animate.Active := True;
3796 // FDownload.Add(Item);
3797 FControlThread.AddItem(Item);
3798 // Animate.Active := False;
3799 // AbortToolButton.Enabled := False;
3800 if FWorkCount = 0 then begin
3802 Animate.Active := True;
3805 Screen.Cursor := crAppStart;
3813 procedure TGikoForm.PlaySound(SoundEventName: string);
3817 FileName := GikoSys.Setting.FindSoundFileName(SoundEventName);
3818 if FileExists(FileName) then begin
3819 if not sndPlaySound(PChar(FileName), SND_ASYNC or SND_NOSTOP) then begin
3820 sndPlaySound(nil, SND_SYNC);
3821 Application.ProcessMessages;
3823 sndPlaySound(PChar(FileName), SND_ASYNC);
3828 function TGikoForm.AddHistory( favItem : TFavoriteThreadItem ): Boolean;
3831 Item: TFavoriteThreadItem;
3835 // if (GetActiveContent = ThreadItem) and
3836 // (ThreadItem.Count <= ThreadItem.Kokomade) then
3838 // if GetActiveContent = ThreadItem then
3842 if FTreeType = gttHistory then
3843 TreeView.Selected := nil;
3845 for i := 0 to FHistoryList.Count - 1 do begin
3846 if TObject(FHistoryList[i]) is TFavoriteThreadItem then begin
3847 Item := TFavoriteThreadItem(FHistoryList[i]);
3848 if Item.URL = favItem.URL then begin
3849 // SetContent(ThreadItem);
3850 FHistoryList.Move(i, 0);
3851 if FTreeType = gttHistory then
3852 if TreeView.Items.GetFirstNode <> TreeView.Items[ i ] then
3853 TreeView.Items[ i ].MoveTo( TreeView.Items.GetFirstNode, naInsert );
3860 if FHistoryList.Count > 0 then
3861 FHistoryList.Insert( 0, favItem )
3863 FHistoryList.Add( favItem );
3864 // SetContent(ThreadItem);
3866 if FTreeType = gttHistory then begin
3867 Node := TreeView.Items.Add( nil, favItem.Title );
3868 Node.MoveTo( TreeView.Items.GetFirstNode, naInsert );
3870 if favItem.NewArrival then begin
3871 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3872 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3874 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3875 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3878 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
3879 //
\81¦favItem.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
3880 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3881 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3882 Node.Data := favItem;
3886 procedure TGikoForm.DeleteHistory( threadItem: TThreadItem );
3890 for i := 0 to FHistoryList.Count - 1 do begin
3891 if threadItem.URL = TFavoriteThreadItem( FHistoryList.Items[i] ).URL then begin
3892 TFavoriteThreadItem( FHistoryList.Items[ i ] ).Free;
3893 FHistoryList.Delete(i);
3894 FHistoryList.Capacity := FHistoryList.Count;
3900 procedure TGikoForm.ClearHistory;
3904 //FHistoryList.Clear;
3907 for i := FHistoryList.Count - 1 downto 0 do begin
3908 if TObject(FHistoryList[ i ]) is TFavoriteThreadItem then
3909 TFavoriteThreadItem(FHistoryList[ i ]).Free
3910 else if TObject(FHistoryList[ i ]) is TFavoriteBoardItem then
3911 TFavoriteBoardItem(FHistoryList[ i ]).Free;
3913 //FHistoryList.Delete(i);
3919 FHistoryList.Capacity := FHistoryList.Count;
3923 procedure TGikoForm.SaveHistory;
3926 saveList : TstringList;
3929 saveList := TStringList.Create;
3932 FHistoryList.Capacity := FHistoryList.Count;
3933 saveList.Add('<?xml version="1.0" encoding="Shift_JIS" standalone="yes"?>');
3934 saveList.Add('<address>');
3935 bound := FHistoryList.Count - 1;
3936 for i := bound downto 0 do begin
3937 // title
\82Í
\8d¡
\82Ì
\82Æ
\82±
\82ë
\8eg
\82Á
\82Ä
\82¢
\82È
\82¢
3939 '<history url="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).URL ) + '"' +
3940 ' title="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).Title ) + '"/>');
3942 saveList.Add('</address>');
3943 saveList.SaveToFile( GikoSys.GetConfigDir + 'History.xml' );
3950 procedure TGikoForm.LoadHistory;
3954 XMLDoc : IXMLDocument;
3956 HistoryNode : IXMLNode;
3958 favItem : TFavoriteThreadItem;
3961 fileName := GikoSys.GetConfigDir + 'History.xml';
3963 if FileExists( fileName ) then begin
3965 XMLDoc := IXMLDocument.Create;
3966 //XMLDoc := LoadXMLDocument(FileName);
3967 LoadXMLDocument(FileName, XMLDoc);
3969 XMLNode := XMLDoc.DocumentElement;
3971 if XMLNode.NodeName = 'address' then begin
3972 bound := XMLNode.ChildNodes.Count - 1;
3973 for i := 0 to bound do begin
3974 HistoryNode := XMLNode.ChildNodes[i];
3975 if HistoryNode.NodeName = 'history' then begin
3976 //if FReadCount >= sl.Count then begin
3977 s := Trim(HistoryNode.Attributes['url']);
3978 if s <> '' then begin
3979 favItem := TFavoriteThreadItem.Create(
3980 s, HistoryNode.Attributes[ 'title' ] );
3981 if not AddHistory( favItem ) then
3997 procedure TGikoForm.ShowBBSTreeOld(
4005 FavoriteTreeView.Visible := False;
4006 FavoriteToolBar.Hide;
4007 TreeView.Visible := True;
4009 b := CabinetSelectPopupMenu.Items.Count - 1;
4010 for i := 0 to b do begin
4011 item := CabinetSelectPopupMenu.Items[ i ];
4012 if item is TBBSMenuItem then begin
4013 if TBBSMenuItem( item ).Data = inBBS then begin
4014 item.Checked := True;
4015 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
4016 CabinetMenu.Items[ i ].Checked := True;
4017 GikoSys.Setting.CabinetIndex := i;
4021 item.Checked := False;
4022 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
4023 CabinetMenu.Items[ i ].Checked := False;
4025 CabinetSelectToolButton.Caption := inBBS.Title;
4027 CabinetHistoryAction.Checked := False;
4028 CabinetFavoriteAction.Checked := False;
4030 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
4031 FTreeType := gtt2ch;
4032 HistoryToolBar.Hide;
4033 SetBoardTreeNode( inBBS );
4034 TreeView.Items.GetFirstNode.Expanded := True; //?c???[?g?b?v???????J??
4035 //?c???[??g?b?v?????I????
4036 if GetActiveList = nil then
4037 TreeView.Selected := TreeView.Items[0]
4039 for i := 0 to TreeView.Items.Count - 1 do begin
4040 if TreeView.Items[i].Data = GetActiveList then begin
4041 TreeView.Selected := TreeView.Items[i];
4045 TreeView.Selected := TreeView.Items[0]
4053 procedure TGikoForm.ShowBBSTree(
4062 FavoriteTreeView.Visible := False;
4063 FavoriteToolBar.Hide;
4064 TreeView.Visible := True;
4066 b := CabinetSelectPopupMenu.Items.Count - 1;
4067 for i := 0 to b do begin
4068 item := CabinetSelectPopupMenu.Items[ i ];
4069 if item is TBBSMenuItem then begin
4070 if TBBSMenuItem( item ).Data = inBBS then begin
4071 item.Checked := True;
4072 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
4073 CabinetMenu.Items[ i ].Checked := True;
4074 GikoSys.Setting.CabinetIndex := i;
4078 item.Checked := False;
4079 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
4080 CabinetMenu.Items[ i ].Checked := False;
4082 CabinetSelectToolButton.Caption := inBBS.Title;
4084 CabinetHistoryAction.Checked := False;
4085 CabinetFavoriteAction.Checked := False;
4087 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
4088 FTreeType := gtt2ch;
4089 HistoryToolBar.Hide;
4090 SetBoardTreeNode( inBBS );
4091 TreeView.Items.GetFirstNode.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
4092 //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
4093 if GetActiveList = nil then begin
4095 TreeClick( TreeView.Items[0] );
4099 for i := 0 to TreeView.Items.Count - 1 do begin
4100 if TreeView.Items[i].Data = GetActiveList then begin
4101 TreeClick( TreeView.Items[i] );
4105 TreeClick( TreeView.Items[0] );
4113 procedure TGikoForm.ShowHistoryTree;
4118 if CabinetPanel.Visible then begin
4119 if FTreeType = gttHistory then begin
4120 CabinetVisible( False );
4121 CabinetHistoryAction.Checked := False;
4123 CabinetHistoryAction.Checked := True;
4126 CabinetVisible( True );
4127 CabinetHistoryAction.Checked := True;
4130 // BBS...BBS, History, Favorite
4131 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 2;
4133 FavoriteTreeView.Visible := False;
4134 TreeView.Visible := True;
4136 CabinetBBSAction.Checked := False;
4137 CabinetFavoriteAction.Checked := False;
4139 if FTreeType <> gttHistory then begin
4140 b := CabinetSelectPopupMenu.Items.Count - 1;
4141 for i := 0 to b do begin
4142 item := CabinetSelectPopupMenu.Items[ i ];
4143 if item is TBBSMenuItem then begin
4144 item.Checked := False;
4145 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
4146 CabinetMenu.Items[ i ].Checked := False;
4150 FTreeType := gttHistory;
4151 HistoryToolBar.Show;
4152 FavoriteToolBar.Hide;
4154 CabinetSelectToolButton.Caption := '
\97\9a\97ð
\83\8a\83X
\83g';
4158 procedure TGikoForm.SetHistoryTreeNode;
4162 Item: TFavoriteThreadItem;
4164 TreeView.Items.BeginUpdate;
4166 TreeView.Items.Clear;
4167 for i := 0 to FHistoryList.Count - 1 do begin
4168 Item := TFavoriteThreadItem(FHistoryList[i]);
4169 Node := TreeView.Items.Add(nil, Item.Title);
4171 if Item.Item.NewArrival then begin
4172 Node.ImageIndex := ITEM_ICON_THREADNEW1;
4173 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
4175 Node.ImageIndex := ITEM_ICON_THREADLOG1;
4176 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
4179 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
4180 //
\81¦Item.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
4181 Node.ImageIndex := ITEM_ICON_THREADLOG1;
4182 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
4186 TreeView.Items.EndUpdate;
4190 procedure TGikoForm.SelectTreeNode(Item: TObject; CallEvent: Boolean);
4192 ChangeEvent: TTVChangedEvent;
4193 ChangingEvent: TTVChangingEvent;
4197 if Item is TCategory then
4198 bbs := TCategory( Item ).ParenTBBS
4199 else if Item is TBoard then
4200 bbs := TBoard( Item ).ParentCategory.ParenTBBS
4204 if (FTreeType = gtt2ch) and (FActiveBBS = bbs) then begin
4206 ChangingEvent := nil;
4208 if not CallEvent then begin
4209 ChangeEvent := TreeView.OnChange;
4210 ChangingEvent := TreeView.OnChanging;
4213 if not CallEvent then begin
4214 TreeView.OnChange := nil;
4215 TreeView.OnChanging := nil;
4217 //Application.ProcessMessages;
4218 for i := 0 to TreeView.Items.Count - 1 do begin
4219 if TreeView.Items[i].Data = Item then begin
4220 TreeView.Items[i].Selected := True;
4222 TreeClick(TreeView.Items[i]);
4226 //Application.ProcessMessages;
4228 if not CallEvent then begin
4229 TreeView.OnChange := ChangeEvent;
4230 TreeView.OnChanging := ChangingEvent;
4234 if GetActiveList is TBBS then begin
4235 for i := 0 to ListView.Columns.Count - 1 do
4236 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
4237 end else if GetActiveList is TCategory then begin
4238 for i := 0 to ListView.Columns.Count - 1 do
4239 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
4240 end else if GetActiveList is TBoard then begin
4241 for i := 0 to ListView.Columns.Count - 1 do
4242 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
4245 if (Item is TBBS) or (Item is TCategory) then begin
4246 ListView.Columns.Clear;
4247 SetActiveList( Item );
4248 end else if Item is TBoard then begin
4249 if not TBoard( Item ).IsThreadDatRead then begin
4250 Screen.Cursor := crHourGlass;
4252 if not TBoard( Item ).IsThreadDatRead then
4253 GikoSys.ReadSubjectFile(TBoard( Item ));
4255 Screen.Cursor := crDefault;
4258 SetActiveList( Item );
4261 if Item is TBoard then begin // not TCategory
4262 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4263 if GikoSys.Setting.ListWidthState = glsMax then begin
4264 BrowserMinAction.Execute;
4265 if GikoForm.Visible then
4269 if GikoSys.Setting.ListHeightState = glsMax then begin
4270 BrowserMinAction.Execute;
4271 if GikoForm.Visible then
4279 procedure TGikoForm.ListViewMouseDown(Sender: TObject;
4280 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
4282 listItem : TListItem;
4283 threadItem : TThreadItem;
4289 if not (GetActiveList is TBoard) then Exit;
4290 listItem := ListView.GetItemAt( X, Y );
4291 if listItem = nil then Exit;
4292 if not (TObject(listItem.Data) is TThreadItem) then Exit;
4294 threadItem := TThreadItem(ListItem.Data);
4295 InsertBrowserTab(threadItem, False);
4296 if threadItem.IsLogFile then
4297 ListView.UpdateItems(listItem.Index, listItem.Index);
4301 //
\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Å
4302 if (ssDouble in Shift) then
4303 ListDoubleClick(Shift)
4308 { if ssDouble in Shift then begin
4309 DoubleClickOccurred[Button] := True;
4311 DoubleClickOccurred[Button] := False;
4312 t := GetTickCount+GetDoubleClickTime;
4313 while GetTickCount < t do begin
4314 Application.ProcessMessages;
4315 if DoubleClickOccurred[Button] then
4320 if ssDouble in Shift then begin
4322 mbLeft: ListDoubleClick;
4335 procedure TGikoForm.ListClick;
4337 ListItem: TListItem;
4338 ThreadItem: TThreadItem;
4340 if ListView.SelCount <> 1 then Exit;
4341 ListItem := ListView.Selected;
4342 if ListItem = nil then Exit;
4343 if not (TObject(ListItem.Data) is TThreadItem) then Exit;
4345 ThreadItem := TThreadItem(ListItem.Data);
4346 if ThreadItem.IsLogFile then begin
4347 // if AddHistory(ThreadItem) then
4348 // SetContent(ThreadItem);
4349 InsertBrowserTab(ThreadItem);
4350 ListView.UpdateItems(ListItem.Index, ListItem.Index);
4352 // SetContent(ThreadItem);
4353 InsertBrowserTab(ThreadItem);
4356 if GikoSys.Setting.BrowserAutoMaximize = gbmClick then begin
4357 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4358 if GikoSys.Setting.ListWidthState = glsMin then begin
4359 BrowserMaxAndFocusAction.Execute;
4362 if GikoSys.Setting.ListHeightState = glsMin then begin
4363 BrowserMaxAndFocusAction.Execute;
4369 procedure TGikoForm.ListDoubleClick(Shift: TShiftState);
4371 ThreadItem: TThreadItem;
4374 shiftDown := (ssShift in Shift);
4376 if ListView.Selected = nil then Exit;
4378 if TObject(ListView.Selected.Data) is TCategory then begin
4379 SelectTreeNode(ListView.Selected.Data, True);
4380 // TreeView.Selected.Expanded := True;
4381 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4382 //TreeViewChange(nil, TreeView.Selected);
4383 end else if TObject(ListView.Selected.Data) is TBoard then begin
4384 SelectTreeNode(ListView.Selected.Data, True);
4385 // TreeView.Selected.Expanded := True;
4386 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4387 //TreeViewChange(nil, TreeView.Selected);
4388 end else if TObject(ListView.Selected.Data) is TThreadItem then begin
4389 //if TObject(ListView.Selected.Data) is TThreadItem then begin
4390 Application.ProcessMessages;
4391 ThreadItem := TThreadItem(ListView.Selected.Data);
4392 DownloadContent(ThreadItem, shiftDown);
4395 if GikoSys.Setting.BrowserAutoMaximize = gbmDoubleClick then begin
4396 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4397 if GikoSys.Setting.ListWidthState = glsMin then begin
4398 // BrowserMaxAndFocusAction.Execute;
4399 BrowserMaxAction.Execute;
4400 SetFocusForBrowserAction.Execute;
4403 if GikoSys.Setting.ListHeightState = glsMin then begin
4404 // BrowserMaxAndFocusAction.Execute;
4405 BrowserMaxAction.Execute;
4406 SetFocusForBrowserAction.Execute;
4412 procedure TGikoForm.BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord);
4417 activeBrower :TWebBrowser;
4419 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
4421 while (BrowserRecord.Browser.ReadyState <> READYSTATE_COMPLETE) and
4422 (BrowserRecord.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4423 Application.ProcessMessages;
4426 // Access Violation
\82ª
\8bN
\82«
\82é
\8e\96\82ª
\82 \82é
\82Ì
\82Å
\8d¡
\8cã
\97v
\83`
\83F
\83b
\83N
4427 if(BrowserRecord <> nil) and (BrowserRecord.FBrowser <> nil) then begin
4428 activeBrower := BrowserRecord.FBrowser;
4432 item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
4434 top := top + item.offsetTop;
4435 item := item.offsetParent;
4436 until AnsiCompareText(item.tagName, 'body' ) = 0;
4438 OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
4444 procedure TGikoForm.BrowserMovement(const AName: string);
4449 activeBrower :TWebBrowser;
4451 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
4453 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
4454 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4455 Application.ProcessMessages;
4458 // Access Violation
\82ª
\8bN
\82«
\82é
\8e\96\82ª
\82 \82é
\82Ì
\82Å
\8d¡
\8cã
\97v
\83`
\83F
\83b
\83N
4459 if(BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex >= 0) then begin
4460 activeBrower := FActiveContent.Browser;
4464 item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
4466 top := top + item.offsetTop;
4467 item := item.offsetParent;
4468 until AnsiCompareText(item.tagName, 'body' ) = 0;
4470 OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
4476 procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
4478 if TObject(Node.Data) is TBBS then begin
4479 TBBS(Node.Data).NodeExpand := False;
4480 end else if TObject(Node.Data) is TCategory then begin
4481 TCategory(Node.Data).NodeExpand := False;
4482 end else if TObject(Node.Data) is TBoard then begin
4483 TBoard(Node.Data).NodeExpand := False;
4487 procedure TGikoForm.MessageListViewResize(Sender: TObject);
4489 // MessageListView.Column[0].Width := MessageListView.ClientWidth - 16;
4492 procedure TGikoForm.SelectListItem(List: TList);
4494 // TmpTreeNode: TTreeNode;
4495 TmpListItem: TListItem;
4498 TmpListItem := ListView.Selected;
4499 while TmpListItem <> nil do begin
4500 List.Add(TmpListItem.Data);
4501 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
4506 procedure TGikoForm.ExitActionExecute(Sender: TObject);
4511 procedure TGikoForm.AllSelectActionExecute(Sender: TObject);
4516 procedure TGikoForm.StdToolBarVisibleActionExecute(Sender: TObject);
4518 CoolBand: TCoolBand;
4520 CoolBand := GetCoolBand(MainCoolBar, StdToolBar);
4521 if CoolBand = nil then
4523 GikoSys.Setting.StdToolBarVisible := StdToolBarVisibleAction.Checked;
4524 CoolBand.Visible := GikoSys.Setting.StdToolBarVisible;
4525 // StdToolBar.Visible := StdToolBarVisibleAction.Checked;
4526 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4528 //StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
4529 StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible;
4532 procedure TGikoForm.AddressBarVisibleActionExecute(Sender: TObject);
4534 CoolBand: TCoolBand;
4536 CoolBand := GetCoolBand(MainCoolBar, AddressToolBar);
4537 if CoolBand = nil then
4539 GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked;
4540 CoolBand.Visible := GikoSys.Setting.AddressBarVisible;
4541 //AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
4542 AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible;
4545 procedure TGikoForm.LinkBarVisibleActionExecute(Sender: TObject);
4547 CoolBand: TCoolBand;
4549 CoolBand := GetCoolBand(MainCoolBar, LinkToolBar);
4550 if CoolBand = nil then
4552 GikoSys.Setting.LinkBarVisible := LinkBarVisibleAction.Checked;
4553 CoolBand.Visible := GikoSys.Setting.LinkBarVisible;
4554 //LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
4555 LinkToolBarVisiblePMenu.Checked := GikoSys.Setting.LinkBarVisible;
4558 procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);
4560 CoolBand: TCoolBand;
4562 CoolBand := GetCoolBand(ListCoolBar, ListToolBar);
4563 if CoolBand = nil then
4565 CoolBand.Visible := ListToolBarVisibleAction.Checked;
4566 // ListToolBar.Visible := ListToolBarVisibleAction.Checked;
4567 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4568 GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;
4571 procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);
4573 CoolBand: TCoolBand;
4575 CoolBand := GetCoolBand(ListCoolBar, ListNameToolBar);
4576 if CoolBand = nil then
4578 CoolBand.Visible := ListNameBarVisibleAction.Checked;
4579 GikoSys.Setting.ListNameBarVisible := ListNameBarVisibleAction.Checked;
4582 procedure TGikoForm.BrowserToolBarVisibleActionExecute(Sender: TObject);
4584 CoolBand: TCoolBand;
4586 CoolBand := GetCoolBand(BrowserCoolBar, BrowserToolBar);
4587 if CoolBand = nil then
4589 CoolBand.Visible := BrowserToolBarVisibleAction.Checked;
4590 // BrowserToolBar.Visible := BrowserToolBarVisibleAction.Checked;
4591 GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;
4594 procedure TGikoForm.BrowserNameBarVisibleActionExecute(Sender: TObject);
4596 CoolBand: TCoolBand;
4598 CoolBand := GetCoolBand(BrowserCoolBar, BrowserNameToolBar);
4599 if CoolBand = nil then
4601 CoolBand.Visible := BrowserNameBarVisibleAction.Checked;
4602 GikoSys.Setting.BrowserNameBarVisible := BrowserNameBarVisibleAction.Checked;
4605 procedure TGikoForm.MsgBarVisibleActionExecute(Sender: TObject);
4607 MessageSplitter.Visible := MsgBarVisibleAction.Checked;
4608 MessagePanel.Top := MessageSplitter.Top + MessageSplitter.Height;
4609 MessageSplitter.Top := MessagePanel.Top + 1;
4610 MessagePanel.Visible := MsgBarVisibleAction.Checked;
4611 GikoSys.Setting.MessageBarVisible := MsgBarVisibleAction.Checked;
4614 procedure TGikoForm.StatusBarVisibleActionExecute(Sender: TObject);
4616 StatusBar.Visible := StatusBarVisibleAction.Checked;
4617 GikoSys.Setting.StatusBarVisible := StatusBarVisibleAction.Checked;
4620 procedure TGikoForm.IconStyleExecute(Sender: TObject);
4622 case ListView.ViewStyle of
4623 vsIcon: SmallIconAction.Execute;
4624 vsSmallIcon: ListIconAction.Execute;
4625 vsList: DetailIconAction.Execute;
4626 vsReport: LargeIconAction.Execute;
4630 procedure TGikoForm.LargeIconActionExecute(Sender: TObject);
4632 ListView.ViewStyle := vsIcon;
4633 LargeIconAction.Checked := True;
4636 procedure TGikoForm.SmallIconActionExecute(Sender: TObject);
4638 ListView.ViewStyle := vsSmallIcon;
4639 SmallIconAction.Checked := True;
4642 procedure TGikoForm.ListIconActionExecute(Sender: TObject);
4644 ListView.ViewStyle := vsList;
4645 ListIconAction.Checked := True;
4648 procedure TGikoForm.DetailIconActionExecute(Sender: TObject);
4650 ListView.ViewStyle := vsReport;
4651 DetailIconAction.Checked := True;
4654 procedure TGikoForm.SearchActionExecute(Sender: TObject);
4659 if FSearchDialog = nil then begin
4660 if (GikoForm.GetActiveList is TCategory) or (GikoForm.GetActiveList is TBoard) then
4661 chk := GikoForm.GetActiveList
4665 FSearchDialog := TSearchDialog.Create(Self, chk);
4666 FSearchDialog.SearchComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
4676 procedure TGikoForm.OptionActionExecute(Sender: TObject);
4680 Dlg := TOptionDialog.Create(Self);
4688 procedure TGikoForm.GikoNaviWebPageActionExecute(Sender: TObject);
4690 URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
4692 GikoSys.OpenBrowser(URL_GIKONAVI, gbtAuto);
4695 procedure TGikoForm.MonazillaWebPageActionExecute(Sender: TObject);
4697 URL_MONAZILLA: string = 'http://www.monazilla.org/';
4699 GikoSys.OpenBrowser(URL_MONAZILLA, gbtAuto);
4702 procedure TGikoForm.BBS2chWebPageActionExecute(Sender: TObject);
4704 URL_2ch: string = 'http://www.2ch.net/';
4706 GikoSys.OpenBrowser(URL_2ch, gbtAuto);
4709 procedure TGikoForm.GikoFolderOpenActionExecute(Sender: TObject);
4711 // GikoSys.OpenBrowser(GikoSys.GetAppDir, gbtIE);
4712 GikoSys.CreateProcess('explorer.exe', '/e,"' + GikoSys.GetAppDir + '"');
4715 procedure TGikoForm.AboutActionExecute(Sender: TObject);
4719 Dlg := TAboutDialog.Create(Self);
4727 procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject);
4732 procedure TGikoForm.CabinetVisible( isVisible : Boolean );
4734 TreeSplitter.Visible := isVisible;
4735 CabinetPanel.Visible := isVisible;
4736 CabinetVisibleAction.Checked := isVisible;
4739 procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject);
4742 gttHistory: CabinetHistoryAction.Execute;
4743 gttFavorite: CabinetFavoriteAction.Execute;
4745 CabinetBBSAction.Execute;
4749 procedure TGikoForm.AllItemActionExecute(Sender: TObject);
4752 if ViewType <> gvtAll then
4753 SetListViewType(gvtAll);
4754 AllItemAction.Checked := True;
4755 LogItemAction.Checked := False;
4756 NewItemAction.Checked := False;
4757 //SelectItemAction.Checked := False;
4758 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4760 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4761 if SelectComboBox.Parent <> nil then begin
4762 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4763 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4770 procedure TGikoForm.LogItemActionExecute(Sender: TObject);
4773 if ViewType <> gvtLog then
4774 SetListViewType(gvtLog);
4775 AllItemAction.Checked := False;
4776 LogItemAction.Checked := True;
4777 NewItemAction.Checked := False;
4778 //SelectItemAction.Checked := False;
4779 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4781 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4782 if SelectComboBox.Parent <> nil then begin
4783 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4784 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4791 procedure TGikoForm.NewItemActionExecute(Sender: TObject);
4795 if ViewType <> gvtNew then
4796 SetListViewType(gvtNew);
4797 AllItemAction.Checked := False;
4798 LogItemAction.Checked := False;
4799 NewItemAction.Checked := True;
4800 //SelectItemAction.Checked := False;
4801 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4803 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4804 if SelectComboBox.Parent <> nil then begin
4805 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4806 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4813 procedure TGikoForm.SelectItemActionExecute(Sender: TObject);
4816 Dlg: TListSelectDialog;
4819 if SelectComboBox.Parent <> nil then begin
4820 if SelectComboBox.Left + SelectComboBox.Width < ListToolBar.Width then begin
4821 // SelectComboBox
\82ª
\82 \82é
\8fê
\8d\87\82Í
\83t
\83H
\81[
\83J
\83X
\82ð
\88Ú
\82·
4822 SelectComboBox.SetFocus;
4829 if SelectComboBox.Text = SELECTCOMBOBOX_NAME then begin
4830 SelectComboBox.Text := '';
4831 SelectComboBox.Color := clWindow;
4834 AllItemAction.Checked := False;
4835 LogItemAction.Checked := False;
4836 NewItemAction.Checked := False;
4837 //SelectItemAction.Checked := True;
4839 Dlg := TListSelectDialog.Create(Self);
4841 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
4842 Dlg.SelectComboBox.Text := SelectComboBox.Text;
4844 if Dlg.ModalResult = mrCancel then begin
4845 if Length( SelectComboBox.Text ) = 0 then begin
4846 AllItemAction.Checked := True;
4847 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4848 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4851 if GetActiveList is TBoard then
4852 SetListViewType(gvtUser, TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText , Dlg.KubetsuCheckBox.Checked);
4854 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
4856 GikoSys.Setting.SelectTextList.Delete(idx);
4857 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
4858 while Dlg.SelectComboBox.Items.Count > 100 do begin
4859 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
4862 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
4863 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4864 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4866 SelectComboBox.Text := Dlg.SelectComboBox.Text;
4867 SelectComboBox.Color := clWindow;
4869 SetListViewType(gvtUser, Dlg.SelectComboBox.Text, Dlg.KubetsuCheckBox.Checked);
4876 procedure TGikoForm.ListNumberVisibleActionExecute(Sender: TObject);
4878 GikoSys.Setting.ListViewNo := ListNumberVisibleAction.Checked;
4882 procedure TGikoForm.UpFolderActionExecute(Sender: TObject);
4884 if GetActiveList is TBoard then begin
4885 // if FTreeType = gtt2ch then
4886 SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
4887 //SetActiveList(TBoard(GetActiveList).ParentCategory);
4888 end else if GetActiveList is TCategory then begin
4889 // if FTreeType = gtt2ch then
4890 SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);
4891 //SetActiveList(TCategory(GetActiveList).ParenTBBS);
4893 // if TreeView.Selected = nil then Exit;
4894 // if TreeView.Selected.Level = 0 then Exit;
4895 // TreeView.Selected.Parent.Selected := True;
4898 procedure TGikoForm.RoundActionExecute(Sender: TObject);
4902 Dlg := TRoundDialog.Create(Self);
4910 procedure TGikoForm.StopActionExecute(Sender: TObject);
4912 FControlThread.DownloadAbort;
4913 if FWorkCount <> 0 then FWorkCount := 0;
4915 Animate.Active := False;
4918 Screen.Cursor := crDefault;
4921 procedure TGikoForm.MsgBarCloseActionExecute(Sender: TObject);
4923 // MessagePanel.Visible := False;
4924 // MessageSplitter.Visible := False;
4925 // MsgBarVisibleAction.Checked := False;
4926 MsgBarVisibleAction.Execute;
4929 procedure TGikoForm.BrowserMaxActionExecute(Sender: TObject);
4931 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4932 case GikoSys.Setting.ListWidthState of
4934 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4935 ViewPanel.Width := FBrowserSizeWidth;
4936 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4937 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4938 GikoSys.Setting.ListWidthState := glsNormal;
4940 glsMin, glsNormal: begin
4941 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4942 if GikoSys.Setting.ListWidthState = glsNormal then
4943 FBrowserSizeWidth := ViewPanel.Width;
4944 ViewPanel.Width := 1;
4945 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4946 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4947 GikoSys.Setting.ListWidthState := glsMax;
4951 case GikoSys.Setting.ListHeightState of
4953 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4954 ViewPanel.Height := FBrowserSizeHeight;
4955 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4956 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4957 GikoSys.Setting.ListHeightState := glsNormal;
4959 glsMin, glsNormal: begin
4960 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4961 if GikoSys.Setting.ListHeightState = glsNormal then
4962 FBrowserSizeHeight := ViewPanel.Height;
4963 ViewPanel.Height := 1;
4964 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4965 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4966 GikoSys.Setting.ListHeightState := glsMax;
4970 // Mouse.CursorPos := BrowserSizeButton.ClientToScreen(Point(
4971 // System.Round(BrowserToolBar.ButtonWidth div 2),
4972 // System.Round(BrowserToolBar.ButtonHeight div 2)));
4973 //BrowserTab.OnChange(nil);
4976 procedure TGikoForm.BrowserMinActionExecute(Sender: TObject);
4979 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4980 case GikoSys.Setting.ListWidthState of
4981 glsMax, glsNormal: begin
4982 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4983 if GikoSys.Setting.ListWidthState = glsNormal then
4984 FBrowserSizeWidth := ViewPanel.Width;
4985 ViewPanel.Width := ThreadMainPanel.Width - 80;
4986 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4987 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4988 GikoSys.Setting.ListWidthState := glsMin;
4991 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4992 ViewPanel.Width := FBrowserSizeWidth;
4993 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4994 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4995 GikoSys.Setting.ListWidthState := glsNormal;
4999 case GikoSys.Setting.ListHeightState of
5000 glsMax, glsNormal: begin
5001 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5002 if GikoSys.Setting.ListHeightState = glsNormal then
5003 FBrowserSizeHeight := ViewPanel.Height;
5004 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
5005 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5006 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5007 GikoSys.Setting.ListHeightState := glsMin;
5010 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
5011 ViewPanel.Height := FBrowserSizeHeight;
5012 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5013 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5014 GikoSys.Setting.ListHeightState := glsNormal;
5020 procedure TGikoForm.ScrollTopActionExecute(Sender: TObject);
5022 BrowserMovement('top');
5025 procedure TGikoForm.ScrollLastActionExecute(Sender: TObject);
5027 BrowserMovement('bottom');
5030 procedure TGikoForm.ScrollNewActionExecute(Sender: TObject);
5032 BrowserMovement('new');
5035 procedure TGikoForm.ScrollKokoActionExecute(Sender: TObject);
5037 BrowserMovement('koko');
5040 procedure TGikoForm.EditorActionExecute(Sender: TObject);
5042 Editor: TEditorForm;
5046 Item := GetActiveContent;
5047 if Item = nil then Exit;
5048 Editor := TEditorForm.Create(Self);
5049 Editor.SetThreadItem(Item);
5050 GikoSys.LoadEditorKeySetting(Editor.ActionList);
5052 Editor.BodyEdit.SetFocus;
5055 procedure TGikoForm.IEActionExecute(Sender: TObject);
5057 ShowThreadAction.Execute;
5060 procedure TGikoForm.ShowThreadActionExecute(Sender: TObject);
5062 ThreadItem: TThreadItem;
5064 ThreadItem := GetActiveContent;
5065 if ThreadItem = nil then Exit;
5066 GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
5069 procedure TGikoForm.ShowBoardActionExecute(Sender: TObject);
5071 ThreadItem: TThreadItem;
5073 ThreadItem := GetActiveContent;
5074 if ThreadItem = nil then Exit;
5075 GikoSys.OpenBrowser(ThreadItem.ParentBoard.URL, gbtAuto);
5078 //(Thread)URL
\82ð
\83R
\83s
\81[
5079 procedure TGikoForm.URLCopyActionExecute(Sender: TObject);
5084 if TObject(GetActiveContent) is TBoard then
5085 s := s + TBoard(GetActiveContent).URL + #13#10
5086 else if TObject(GetActiveContent) is TThreadItem then
5087 s := s + TThreadItem(GetActiveContent).URL + #13#10;
5089 Clipboard.AsText := s;
5092 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ð
\83R
\83s
\81[
5093 procedure TGikoForm.NameCopyActionExecute(Sender: TObject);
5098 if TObject(GetActiveContent) is TBoard then
5099 s := s + TBoard(GetActiveContent).Title + #13#10
5100 else if TObject(GetActiveContent) is TThreadItem then
5101 s := s + TThreadItem(GetActiveContent).Title + #13#10;
5103 Clipboard.AsText := s;
5106 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ÆURL
\82ð
\83R
\83s
\81[
5107 procedure TGikoForm.NameURLCopyActionExecute(Sender: TObject);
5112 if TObject(GetActiveContent) is TBoard then
5113 s := s + TBoard(GetActiveContent).Title + #13#10 + TBoard(GetActiveContent).URL + #13#10
5114 else if TObject(GetActiveContent) is TThreadItem then
5115 s := s + TThreadItem(GetActiveContent).Title + #13#10 + TThreadItem(GetActiveContent).URL + #13#10;
5117 Clipboard.AsText := s;
5120 procedure TGikoForm.ItemReloadActionExecute(Sender: TObject);
5122 ThreadItem: TThreadItem;
5125 ThreadItem := GetActiveContent;
5126 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5127 if ThreadItem <> nil then
5128 DownloadContent(ThreadItem, shiftDown);
5131 procedure TGikoForm.SelectListReloadActionExecute(Sender: TObject);
5138 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5139 if GetActiveList is TCategory then begin
5140 List := TList.Create;
5142 SelectListItem(List);
5143 if List.Count > 5 then begin
5144 msg := '5
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
5145 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
5146 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
5149 for i := 0 to List.Count - 1 do begin
5150 if TObject(List[i]) is TBoard then
5151 DownloadList(TBoard(List[i]), shiftDown);
5156 end else if GetActiveList is TBoard then begin
5157 DownloadList(TBoard(GetActiveList), shiftDown);
5161 procedure TGikoForm.SelectThreadReloadActionExecute(Sender: TObject);
5168 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5169 List := TList.Create;
5171 SelectListItem(List);
5172 if List.Count > 10 then begin
5173 msg := '10
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
5174 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
5175 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
5178 for i := 0 to List.Count - 1 do begin
5179 if TObject(List[i]) is TThreadItem then
5180 DownloadContent(TThreadItem(List[i]), shiftDown);
5187 procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);
5189 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
5190 SelectListReloadAction.Enabled := True
5191 else if GetActiveList is TBoard then
5192 SelectListReloadAction.Enabled := True
5194 SelectListReloadAction.Enabled := False;
5197 procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);
5199 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5200 SelectThreadReloadAction.Enabled := True
5202 SelectThreadReloadAction.Enabled := False;
5205 procedure TGikoForm.AllItemActionUpdate(Sender: TObject);
5207 AllItemAction.Enabled := (GetActiveList is TBoard);
5210 procedure TGikoForm.LogItemActionUpdate(Sender: TObject);
5212 LogItemAction.Enabled := (GetActiveList is TBoard);
5215 procedure TGikoForm.NewItemActionUpdate(Sender: TObject);
5217 NewItemAction.Enabled := (GetActiveList is TBoard);
5220 procedure TGikoForm.SelectItemActionUpdate(Sender: TObject);
5222 SelectItemAction.Enabled := (GetActiveList is TBoard);
5225 procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
5227 UpFolderAction.Enabled := not (GetActiveList is TBBS);
5230 procedure TGikoForm.ThreadEditorActionUpdate(Sender: TObject);
5232 ThreadEditorAction.Enabled := (GetActiveList is TBoard);
5235 procedure TGikoForm.FormResize(Sender: TObject);
5239 MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
5240 MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
5242 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5243 if GikoSys.Setting.ListWidthState = glsMin then begin
5244 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5245 ViewPanel.Width := ThreadMainPanel.Width - 80;
5248 if GikoSys.Setting.ListHeightState = glsMin then begin
5249 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5250 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
5254 if FIsMinimize = mtMinimized then begin
5255 if FActiveContent <> nil then begin
5256 //Application.ProcessMessages;
5257 doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
5258 doc.Body.ScrollTop := FActiveContent.Thread.ScrollTop;
5259 FIsMinimize := mtNone;
5263 FIsIgnoreResize := True;
5264 PostMessage( Handle, USER_RESIZED, 0, 0 );
5267 procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject);
5269 ScrollTopAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5272 procedure TGikoForm.ScrollLastActionUpdate(Sender: TObject);
5274 ScrollLastAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5277 procedure TGikoForm.ScrollNewActionUpdate(Sender: TObject);
5279 ScrollNewAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5282 procedure TGikoForm.ScrollKokoActionUpdate(Sender: TObject);
5284 ScrollKokoAction.Enabled := (GetActiveContent <> nil)
5285 and (GetActiveContent.IsLogFile)
5286 and (GetActiveContent.Kokomade <> -1);
5290 procedure TGikoForm.EditorActionUpdate(Sender: TObject);
5292 EditorAction.Enabled := GetActiveContent <> nil;
5295 procedure TGikoForm.IEActionUpdate(Sender: TObject);
5297 IEAction.Enabled := GetActiveContent <> nil;
5300 procedure TGikoForm.ShowThreadActionUpdate(Sender: TObject);
5302 ShowThreadAction.Enabled := GetActiveContent <> nil;
5305 procedure TGikoForm.ShowBoardActionUpdate(Sender: TObject);
5307 ShowBoardAction.Enabled := GetActiveContent <> nil;
5310 procedure TGikoForm.ItemReloadActionUpdate(Sender: TObject);
5312 ItemReloadAction.Enabled := GetActiveContent <> nil;
5315 procedure TGikoForm.URLCopyActionUpdate(Sender: TObject);
5317 URLCopyAction.Enabled := GetActiveContent <> nil;
5320 procedure TGikoForm.NameCopyActionUpdate(Sender: TObject);
5322 NameCopyAction.Enabled := GetActiveContent <> nil;
5325 procedure TGikoForm.NameURLCopyActionUpdate(Sender: TObject);
5327 NameURLCopyAction.Enabled := GetActiveContent <> nil;
5330 procedure TGikoForm.BrowserTabCloseActionUpdate(Sender: TObject);
5332 BrowserTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 0);
5335 procedure TGikoForm.NotSelectTabCloseActionUpdate(Sender: TObject);
5337 NotSelectTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 1);
5340 procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
5342 AllTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 0);
5345 procedure TGikoForm.ActiveLogDeleteActionUpdate(Sender: TObject);
5347 ActiveLogDeleteAction.Enabled := GetActiveContent <> nil;
5350 procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
5352 DEL_MSG = '
\83\8d\83O
\83t
\83@
\83C
\83\8b\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
5353 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
5355 ThreadItem: TThreadItem;
5356 TmpListItem: TListItem;
5360 List := TList.Create;
5362 TmpListItem := ListView.Selected;
5363 while TmpListItem <> nil do begin
5364 if TObject(TmpListItem.Data) is TThreadItem then begin
5365 ThreadItem := TThreadItem(TmpListItem.Data);
5366 if ThreadItem.IsLogFile then
5367 List.Add(ThreadItem);
5369 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
5372 if GikoSys.Setting.DeleteMsg and (List.Count > 0) then begin
5373 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
5377 for i := 0 to List.Count - 1 do begin
5378 ThreadItem := TThreadItem(List[i]);
5379 DeleteHistory(ThreadItem);
5380 DeleteTab(ThreadItem);
5381 ThreadItem.DeleteLogFile;
5388 procedure TGikoForm.DeleteTab(BrowserRecord: TBrowserRecord);
5393 idx := BrowserTab.TabIndex;
5394 FTabHintIndex := -1;
5395 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5396 if TBrowserRecord(BrowserTab.Tabs.Objects[i]) = BrowserRecord then begin
5397 BrowserTab.Tabs.BeginUpdate;
5399 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5400 doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
5401 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
5404 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
5406 if( FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i]) ) then
5407 FActiveContent := nil;
5408 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5409 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
5411 FBrowsers.Move(j, BROWSER_COUNT - 1);
5413 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5414 BrowserTab.Tabs.Delete(i);
5415 if idx > i then begin
5416 BrowserTab.TabIndex := idx - 1;
5418 if BrowserTab.Tabs.Count -1 >= idx then
5419 BrowserTab.TabIndex := idx
5421 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5423 if BrowserTab.Tabs.Count = 0 then begin
5424 BrowserNullTab.Thread := nil;
5426 if(BrowserTab.TabIndex <> -1) and
5427 ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
5428 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
5429 if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
5430 = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
5432 TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser := nil;
5433 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
5434 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
5435 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
5440 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
5441 := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
5442 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
5443 FBrowsers.Move(BROWSER_COUNT - 1, 0);
5445 BrowserTab.Tabs.EndUpdate;
5446 if( FActiveContent = nil) then
5447 BrowserTab.OnChange(nil);
5452 procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
5457 idx := BrowserTab.TabIndex;
5458 FTabHintIndex := -1;
5459 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5460 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
5461 BrowserTab.Tabs.BeginUpdate;
5463 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5464 doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
5465 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
5469 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
5471 if(FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i])) then
5472 FActiveContent := nil;
5473 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5474 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
5476 FBrowsers.Move(j, BROWSER_COUNT - 1);
5478 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5479 BrowserTab.Tabs.Delete(i);
5480 if idx > i then begin
5481 BrowserTab.TabIndex := idx - 1;
5483 if BrowserTab.Tabs.Count -1 >= idx then
5484 BrowserTab.TabIndex := idx
5486 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5488 if(BrowserTab.TabIndex <> -1) and
5489 ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
5490 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
5491 if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
5492 = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) )then
5494 TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser := nil;
5495 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
5496 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
5497 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
5502 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
5503 := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
5504 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
5505 FBrowsers.Move(BROWSER_COUNT - 1, 0);
5508 BrowserTab.Tabs.EndUpdate;
5509 if( FActiveContent = nil) then
5510 BrowserTab.OnChange(nil);
5516 procedure TGikoForm.KokomadeActionExecute(Sender: TObject);
5519 ThreadItem: TThreadItem;
5521 No := KokoPopupMenu.Tag;
5522 if No = 0 then Exit;
5523 ThreadItem := GetActiveContent;
5524 if ThreadItem = nil then Exit;
5525 ThreadItem.Kokomade := No;
5526 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
5527 FActiveContent.FRepaint := true;
5528 InsertBrowserTab(FActiveContent.Thread, true);
5529 Application.ProcessMessages;
5532 procedure TGikoForm.ZenbuActionExecute(Sender: TObject);
5534 ThreadItem: TThreadItem;
5536 ThreadItem := GetActiveContent;
5537 if ThreadItem = nil then Exit;
5538 ThreadItem.Kokomade := -1;
5539 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
5540 FActiveContent.FRepaint := true;
5541 InsertBrowserTab(FActiveContent.Thread, true);
5542 Application.ProcessMessages;
5545 function TGikoForm.Hook(var Message: TMessage): Boolean;
5554 procedure TGikoForm.KokoResActionExecute(Sender: TObject);
5556 Editor: TEditorForm;
5561 Number := KokoPopupMenu.Tag;
5562 if Number = 0 then Exit;
5563 Item := GetActiveContent;
5564 if Item = nil then Exit;
5566 Editor := TEditorForm.Create(Self);
5567 Editor.SetThreadItem(Item);
5568 Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
5570 Editor.BodyEdit.SetFocus;
5573 procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
5575 ItemRoundPMenu.Visible := (GetActiveList is TBoard);
5576 ItemReservPMenu.Visible := (GetActiveList is TBoard);
5577 LPMSep01.Visible := (GetActiveList is TBoard);
5578 ListRoundPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5579 ListReservPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5580 LPMSep02.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5581 KidokuPMenu.Visible := (GetActiveList is TBoard);
5582 MidokuPMenu.Visible := (GetActiveList is TBoard);
5583 UrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5584 NameUrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5585 AllSelectPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5586 LPMSep05.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5587 DeletePMenu.Visible := (GetActiveList is TBoard);
5588 LPMSep06.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5589 BoardFavoriteAddMenu.Visible := (GetActiveList is TCategory);
5590 ThreadFavoriteAddMenu.Visible := (GetActiveList is TBoard);
5592 AddRoundNameMenu(ItemReservPMenu);
5593 AddRoundNameMenu(ListReservPMenu);
5596 procedure TGikoForm.BoardIEActionExecute(Sender: TObject);
5600 if GetActiveList is TBoard then begin
5601 URL := TBoard(GetActiveList).URL;
5602 GikoSys.OpenBrowser(URL, gbtAuto);
5606 procedure TGikoForm.SelectItemURLCopyActionExecute(Sender: TObject);
5613 List := TList.Create;
5615 SelectListItem(List);
5616 for i := 0 to List.Count - 1 do begin
5617 if TObject(List[i]) is TBoard then
5618 s := s + TBoard(List[i]).URL + #13#10
5619 else if TObject(List[i]) is TThreadItem then
5620 s := s + TThreadItem(List[i]).URL + #13#10;
5623 Clipboard.AsText := s;
5629 procedure TGikoForm.SelectItemNameCopyActionExecute(Sender: TObject);
5636 List := TList.Create;
5638 SelectListItem(List);
5639 for i := 0 to List.Count - 1 do begin
5640 if TObject(List[i]) is TBoard then
5641 s := s + TBoard(List[i]).Title + #13#10
5642 else if TObject(List[i]) is TThreadItem then
5643 s := s + TThreadItem(List[i]).Title + #13#10;
5646 Clipboard.AsText := s;
5652 procedure TGikoForm.SelectItemNameURLCopyActionExecute(Sender: TObject);
5659 List := TList.Create;
5661 SelectListItem(List);
5662 for i := 0 to List.Count - 1 do begin
5663 if TObject(List[i]) is TBoard then
5664 s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10
5665 else if TObject(List[i]) is TThreadItem then
5666 s := s + TThreadItem(List[i]).Title + #13#10 + TThreadItem(List[i]).URL + #13#10;
5669 Clipboard.AsText := s;
5675 procedure TGikoForm.BoardIEActionUpdate(Sender: TObject);
5677 if GetActiveList is TBoard then
5678 BoardIEAction.Enabled := True
5680 BoardIEAction.Enabled := False;
5683 procedure TGikoForm.SelectItemURLCopyActionUpdate(Sender: TObject);
5685 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5686 SelectItemURLCopyAction.Enabled := True
5688 SelectItemURLCopyAction.Enabled := False;
5691 procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
5693 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5694 SelectItemNameCopyAction.Enabled := True
5696 SelectItemNameCopyAction.Enabled := False;
5699 procedure TGikoForm.SelectItemNameURLCopyActionUpdate(Sender: TObject);
5701 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5702 SelectItemNameURLCopyAction.Enabled := True
5704 SelectItemNameURLCopyAction.Enabled := False;
5707 procedure TGikoForm.AllSelectActionUpdate(Sender: TObject);
5709 if ListView.SelCount > 0 then
5710 AllSelectAction.Enabled := True
5712 AllSelectAction.Enabled := False;
5715 procedure TGikoForm.LogDeleteActionUpdate(Sender: TObject);
5717 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5718 LogDeleteAction.Enabled := True
5720 LogDeleteAction.Enabled := False;
5723 procedure TGikoForm.BrowserTabCloseActionExecute(Sender: TObject);
5726 // ThreadItem: TThreadItem;
5728 idx := BrowserTab.TabIndex;
5729 if idx <> -1 then begin
5730 if BrowserTab.Tabs.Objects[idx] <> nil then begin
5731 //ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5732 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
5737 procedure TGikoForm.NotSelectTabCloseActionExecute(Sender: TObject);
5742 idx := BrowserTab.TabIndex;
5743 if idx = -1 then Exit;
5744 BrowserTab.Tabs.BeginUpdate;
5745 for i := BrowserTab.Tabs.Count - 1 downto BrowserTab.TabIndex + 1 do begin
5746 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5747 BrowserTab.Tabs.Delete(i);
5749 if idx > 0 then begin
5750 for i := BrowserTab.TabIndex - 1 downto 0 do begin
5751 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5752 BrowserTab.Tabs.Delete(i);
5755 BrowserTab.Tabs.EndUpdate;
5758 procedure TGikoForm.AllTabCloseActionExecute(Sender: TObject);
5762 if GikoSys.Setting.ShowDialogForAllTabClose then
5763 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
5766 FActiveContent := nil;
5767 BrowserNullTab.Thread := nil;
5768 BrowserTab.OnChange := nil;
5769 BrowserTab.Tabs.BeginUpdate;
5770 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
5771 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5773 BrowserTab.Tabs.Clear;
5774 BrowserTab.Tabs.EndUpdate;
5775 BrowserTab.OnChange := BrowserTabChange;
5776 SetContent(BrowserNullTab);
5777 Self.Caption := CAPTION_NAME ;
5780 procedure TGikoForm.TreeSelectBoradReloadExecute(Sender: TObject);
5783 TmpTreeNode: TTreeNode;
5785 TmpTreeNode := FClickNode;
5786 TreeView.Selected := FClickNode;
5789 if TObject(TmpTreeNode.Data) is TBoard then
5790 Board := TBoard(TmpTreeNode.Data)
5791 else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then
5792 Board := TFavoriteBoardItem(TmpTreeNode.Data).Item;
5794 if Board <> nil then
5795 DownloadList(Board);
5798 procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject);
5800 ThreadItem: TThreadItem;
5801 TmpTreeNode: TTreeNode;
5803 TmpTreeNode := FClickNode;
5804 TreeView.Selected := FClickNode;
5807 if TObject(TmpTreeNode.Data) is TThreadItem then
5808 ThreadItem := TThreadItem(TmpTreeNode.Data)
5809 else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then
5810 ThreadItem := TFavoriteThreadItem(TmpTreeNode.Data).Item;
5812 if ThreadItem <> nil then
5813 DownloadContent(ThreadItem);
5816 procedure TGikoForm.TreeSelectURLCopyExecute(Sender: TObject);
5818 TmpTreeNode: TTreeNode;
5821 TmpTreeNode := FClickNode;
5822 TreeView.Selected := FClickNode;
5823 if TObject(TmpTreeNode.Data) is TBoard then begin
5824 s := TBoard(TmpTreeNode.Data).URL + #13#10;
5825 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5826 s := TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5827 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5828 s := TThreadItem(TmpTreeNode.Data).URL + #13#10;
5829 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5830 s := TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5832 Clipboard.AsText := s;
5835 procedure TGikoForm.TreeSelectNameURLCopyExecute(Sender: TObject);
5837 TmpTreeNode: TTreeNode;
5840 TmpTreeNode := FClickNode;
5841 TreeView.Selected := FClickNode;
5842 if TObject(TmpTreeNode.Data) is TBoard then begin
5843 s := TBoard(TmpTreeNode.Data).Title + #13#10 + TBoard(TmpTreeNode.Data).URL + #13#10;
5844 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5845 s := TFavoriteBoardItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5846 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5847 s := TThreadItem(TmpTreeNode.Data).Title + #13#10 + TThreadItem(TmpTreeNode.Data).URL + #13#10;
5848 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5849 s := TFavoriteThreadItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5851 Clipboard.AsText := s;
5854 procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
5856 FClickNode := TreeView.Selected;
5857 if FClickNode = nil then begin
5858 TreeSelectThreadPupupMenu.Visible := False;
5859 TreeSelectBoardPupupMenu.Visible := False;
5860 TPMSep01.Visible := False;
5861 TreeSelectURLPupupMenu.Visible := False;
5862 TreeSelectNamePupupMenu.Visible := False;
5863 TreeSelectNameURLPupupMenu.Visible := False;
5864 TreeSelectFavoriteAddPupupMenu.Visible := False;
5865 TreeSelectLogDeleteSeparator.Visible := False;
5866 TreeSelectLogDeletePopupMenu.Visible := False;
5867 end else if TObject(FClickNode.Data) is TBoard then begin
5868 TreeSelectThreadPupupMenu.Visible := False;
5869 TreeSelectBoardPupupMenu.Visible := True;
5870 TPMSep01.Visible := True;
5871 TreeSelectURLPupupMenu.Visible := True;
5872 TreeSelectNamePupupMenu.Visible := True;
5873 TreeSelectNameURLPupupMenu.Visible := True;
5874 TreeSelectFavoriteAddPupupMenu.Visible := True;
5875 TreeSelectLogDeleteSeparator.Visible := False;
5876 TreeSelectLogDeletePopupMenu.Visible := False;
5877 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
5878 TreeSelectThreadPupupMenu.Visible := False;
5879 TreeSelectBoardPupupMenu.Visible := True;
5880 TPMSep01.Visible := True;
5881 TreeSelectURLPupupMenu.Visible := True;
5882 TreeSelectNamePupupMenu.Visible := True;
5883 TreeSelectNameURLPupupMenu.Visible := True;
5884 TreeSelectFavoriteAddPupupMenu.Visible := True;
5885 TreeSelectLogDeleteSeparator.Visible := False;
5886 TreeSelectLogDeletePopupMenu.Visible := False;
5887 end else if (TObject(FClickNode.Data) is TThreadItem) then begin
5888 TreeSelectThreadPupupMenu.Visible := True;
5889 TreeSelectBoardPupupMenu.Visible := False;
5890 TPMSep01.Visible := True;
5891 TreeSelectURLPupupMenu.Visible := True;
5892 TreeSelectNamePupupMenu.Visible := True;
5893 TreeSelectNameURLPupupMenu.Visible := True;
5894 TreeSelectFavoriteAddPupupMenu.Visible := True;
5895 TreeSelectLogDeleteSeparator.Visible := True;
5896 TreeSelectLogDeletePopupMenu.Visible := True;
5897 end else if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
5898 TreeSelectThreadPupupMenu.Visible := True;
5899 TreeSelectBoardPupupMenu.Visible := False;
5900 TPMSep01.Visible := True;
5901 TreeSelectURLPupupMenu.Visible := True;
5902 TreeSelectNamePupupMenu.Visible := True;
5903 TreeSelectNameURLPupupMenu.Visible := True;
5904 TreeSelectFavoriteAddPupupMenu.Visible := True;
5905 TreeSelectLogDeleteSeparator.Visible := True;
5906 TreeSelectLogDeletePopupMenu.Visible := True;
5907 end else if (TObject(FClickNode.Data) is TCategory) then begin
5908 TreeSelectThreadPupupMenu.Visible := False;
5909 TreeSelectBoardPupupMenu.Visible := False;
5910 TPMSep01.Visible := False;
5911 TreeSelectURLPupupMenu.Visible := False;
5912 TreeSelectNamePupupMenu.Visible := True;
5913 TreeSelectNameURLPupupMenu.Visible := False;
5914 TreeSelectFavoriteAddPupupMenu.Visible := False;
5915 TreeSelectLogDeleteSeparator.Visible := False;
5916 TreeSelectLogDeletePopupMenu.Visible := False;
5917 end else if FClickNode.IsFirstNode then begin
5918 TreeSelectThreadPupupMenu.Visible := False;
5919 TreeSelectBoardPupupMenu.Visible := False;
5920 TPMSep01.Visible := False;
5921 TreeSelectURLPupupMenu.Visible := False;
5922 TreeSelectNamePupupMenu.Visible := True;
5923 TreeSelectNameURLPupupMenu.Visible := False;
5924 TreeSelectFavoriteAddPupupMenu.Visible := False;
5925 TreeSelectLogDeleteSeparator.Visible := False;
5926 TreeSelectLogDeletePopupMenu.Visible := False;
5928 TreeSelectThreadPupupMenu.Visible := False;
5929 TreeSelectBoardPupupMenu.Visible := False;
5930 TPMSep01.Visible := False;
5931 TreeSelectURLPupupMenu.Visible := False;
5932 TreeSelectNamePupupMenu.Visible := False;
5933 TreeSelectNameURLPupupMenu.Visible := False;
5934 TreeSelectFavoriteAddPupupMenu.Visible := False;
5935 TreeSelectLogDeleteSeparator.Visible := False;
5936 TreeSelectLogDeletePopupMenu.Visible := False;
5940 procedure TGikoForm.BrowserNewWindow2(Sender: TObject;
5941 var ppDisp: IDispatch; var Cancel: WordBool);
5952 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
5953 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
5954 Html := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
5955 if(AnsiPos('>>', Text) = 1) or (AnsiPos('>', Text) = 1)
5956 or (AnsiPos('
\81\84\81\84', Text) = 1) or (AnsiPos('
\81\84', Text) = 1) then begin
5957 if GikoSys.Setting.ResAnchorJamp then begin
5958 Text := ZenToHan(Text);
5960 if(AnsiPos('>>', Text) = 1) then begin
5961 Text := Copy(Text, 3, Length(Text) - 2);
5963 Text := Copy(Text, 2, Length(Text) - 1);
5965 if AnsiPos('-', Text) <> 0 then begin
5966 wkIntSt := StrToIntDef(Copy(Text, 1, AnsiPos('-', Text) - 1), 0);
5967 Text := Copy(Text, AnsiPos('-', Text) + 1, Length(Text));
5968 wkIntTo := StrToIntDef(Text, 0);
5969 if wkIntTo < wkIntSt then
5972 wkIntSt := StrToIntDef(Text, 0);
5974 if wkIntSt <> 0 then
5975 BrowserMovement(IntToStr(wkIntSt));
5978 URL := GikoSys.GetHRefText(Html);
5979 URL := GikoSys.HTMLDecode(URL);
5980 if( AnsiPos('http://', URL) = 1) or (AnsiPos('https://', URL) = 1) or
5981 ( AnsiPos('ftp://', URL) = 1) then begin
5982 //
\83A
\83h
\83\8c\83X
\83o
\81[
\82Ì
\97\9a\97ð
5983 if GikoSys.Setting.LinkAddAddressBar then begin
5984 idx := AddressComboBox.Items.IndexOf(URL);
5985 if idx = -1 then begin
5986 AddressComboBox.Items.Insert(0, URL);
5987 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
5988 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
5990 AddressComboBox.Items.Delete(idx);
5991 AddressComboBox.Items.Insert(0, URL);
5999 { ShiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
6000 CtrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
6003 Memo1.Lines.Add('ShiftDown');
6005 Memo1.Lines.Add('CtrlDown');
6007 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
6008 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
6009 Url := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
6013 URL := GetHRefText(URL);
6015 ParseURI(URL, Protocol, Host, path, Document, Port, Bookmark);
6017 b := Parse2chURL(path, document, bbs, num);
6018 memo1.Lines.Add('bbs: ' + bbs);
6019 memo1.Lines.Add('key: ' + num);
6021 Memo1.Lines.Add('Parse2chURL: True')
6023 Memo1.Lines.Add('Parse2chURL: False');
6025 // AppPath := 'C:\Borland\Projects\Test\TestBrowser\TestBrowser.exe';
6030 procedure TGikoForm.ListSplitterCanResize(Sender: TObject;
6031 var NewSize: Integer; var Accept: Boolean);
6033 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6034 if ViewPanel.Width < 2 then begin
6035 ViewPanel.Width := 1;
6036 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6037 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6038 GikoSys.Setting.ListWidthState := glsMax;
6039 end else if ViewPanel.Width > (ThreadMainPanel.Width - 80) then begin
6040 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6041 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6042 GikoSys.Setting.ListWidthState := glsMin;
6044 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6045 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6046 GikoSys.Setting.ListWidthState := glsNormal;
6049 if ViewPanel.Height < 2 then begin
6050 ViewPanel.Height := 1;
6051 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6052 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6053 GikoSys.Setting.ListHeightState := glsMax;
6054 end else if ViewPanel.Height > (ThreadMainPanel.Height - BrowserCoolBar.Height - 7) then begin
6055 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6056 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6057 GikoSys.Setting.ListHeightState := glsMin;
6059 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6060 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6061 GikoSys.Setting.ListHeightState := glsNormal;
6066 procedure TGikoForm.ListSplitterMoved(Sender: TObject);
6068 if Mouse.Capture <> 0 then
6070 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6071 if (ViewPanel.Width > 1) and (ViewPanel.Width <= (ThreadMainPanel.Width - 80)) then
6072 FBrowserSizeWidth := ViewPanel.Width;
6074 if (ViewPanel.Height > 1) and (ViewPanel.Height <= (ThreadMainPanel.Height - BrowserCoolBar.Height)) then
6075 FBrowserSizeHeight := ViewPanel.Height;
6077 { if (Mouse.Capture = 0) and (ViewPanel.Height > 1) and (not ArrangeAction.Checked) then
6078 FBrowserSizeHeight := ViewPanel.Height
6079 else if (Mouse.Capture = 0) and (ViewPanel.Width > 1) and (ArrangeAction.Checked) then
6080 FBrowserSizeWidth := ViewPanel.Width;}
6083 procedure TGikoForm.BrowserTabChange(Sender: TObject);
6089 // if NewTab = -1 then
6090 // ThreadItem := nil;
6091 if not BrowserTab.Dragging then begin
6092 FTabHintIndex := -1;
6093 BrowserTab.Hint := '';
6094 idx := BrowserTab.TabIndex;
6095 if idx = -1 then begin
6096 BrowserNullTab.Thread := nil;
6097 SetContent(BrowserNullTab);
6099 end else if(BrowserTab.Tabs.Objects[idx] <> nil) and (BrowserTab.Tabs.Objects[idx] is TBrowserRecord) then begin
6100 if TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser <> nil then begin
6101 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser);
6103 FBrowsers.Move(j ,0);
6105 if( FActiveContent <> nil ) and (FActiveContent.Browser <> nil) and
6106 (FActiveContent.Browser <> BrowserNullTab.Browser) and
6107 (FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1])) then
6108 FBrowsers.Move(BROWSER_COUNT - 1, 0);
6110 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
6111 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
6112 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser := nil;
6113 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
6114 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent <> nil then begin
6115 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent.Free;
6116 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent := nil;
6120 TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
6121 TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Repaint := true;
6122 FBrowsers.Move(BROWSER_COUNT - 1, 0);
6124 TOleControl(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser).BringToFront;
6125 GikoSys.OnlyAHundredRes := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
6126 OnlyAHundredRes.Checked := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
6127 SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6129 if (GikoSys.Setting.URLDisplay) and (GetActiveContent <> nil) then
6130 AddressComboBox.Text := GetActiveContent.URL;
6132 if ((TreeView.Visible) and (TreeView.Focused)) or ((FavoriteTreeView.Visible) and (FavoriteTreeView.Focused)) or
6133 (ListView.Focused) or (SelectComboBox.Focused) or (AddressComboBox.Focused)
6136 SetFocusForBrowserAction.Execute;
6145 procedure TGikoForm.BrowserTabMouseDown(Sender: TObject;
6146 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
6152 if Button = mbMiddle then begin
6153 //
\83}
\83E
\83X
\92\86\83{
\83^
\83\93
6156 p := BrowserTab.ScreenToClient(p);
6157 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
6159 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6160 //end else if Button = mbRight then begin
6161 //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é
6162 //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
6163 { //
\83}
\83E
\83X
\89E
\83{
\83^
\83\93
6166 // GetCursorPos(p2);
6167 p := BrowserTab.ScreenToClient(p);
6168 // idx := BrowserTab.ItemAtPos(p);
6169 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
6170 if idx <> -1 then begin
6171 OldIndex := BrowserTab.TabIndex;
6172 BrowserTab.TabIndex := idx;
6173 if OldIndex <> idx then
6174 BrowserTab.OnChange(nil);
6175 BrowserTabPopupMenu.Tag := idx;
6176 BrowserTabPopupMenu.Popup(p2.X, p2.Y);
6179 end else if BUtton = mbLeft then begin
6180 FDragWFirst := true;
6181 FMouseDownPos.X := X;
6182 FMouseDownPos.Y := Y;
6187 procedure TGikoForm.SetBrowserTabState;
6190 CoolBand: TCoolBand;
6192 BrowserBottomPanel.AutoSize := False;
6193 if GikoSys.Setting.BrowserTabVisible then begin
6194 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
6195 BrowserTab.Style := tsTabs;
6196 if GikoSys.Setting.BrowserTabPosition = gtpTop then
6197 BrowserTab.TabPosition := tpTop
6199 BrowserTab.TabPosition := tpBottom;
6200 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
6201 BrowserTab.TabPosition := tpTop;
6202 BrowserTab.Style := tsButtons;
6204 BrowserTab.TabPosition := tpTop;
6205 BrowserTab.Style := tsFlatButtons
6208 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
6209 BrowserTab.Parent := BrowserTabToolBar;
6210 BrowserBottomPanel.Hide;
6211 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6212 if CoolBand <> nil then
6213 CoolBand.Visible := True;
6214 // BrowserTab.Parent := BrowserTopPanel;
6215 // BrowserTab.Parent := BrowserCoolBar;
6216 // BrowserTab.Top := 26;
6217 // BrowserTopPanel.Height := 44;
6220 BrowserTab.Parent := BrowserBottomPanel;
6221 BrowserTab.Top := 0;
6222 BrowserTab.Left := 0;
6223 BrowserBottomPanel.Show;
6224 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6225 if CoolBand <> nil then
6226 CoolBand.Visible := False;
6227 // BrowserTopPanel.Height := 26;
6231 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6232 if CoolBand <> nil then
6233 CoolBand.Visible := False;
6234 BrowserBottomPanel.Visible := False;
6235 // BrowserTab.Visible := False;
6236 // BrowserTopPanel.Height := 26;
6237 AllTabCloseAction.Execute;
6241 procedure TGikoForm.BrowserTabDragOver(Sender, Source: TObject; X,
6242 Y: Integer; State: TDragState; var Accept: Boolean);
6246 idx := BrowserTab.IndexOfTabAt(X, Y);
6247 Accept := (Source = BrowserTab) and (BrowserTab.TabIndex <> idx);
6250 procedure TGikoForm.BrowserTabDragDrop(Sender, Source: TObject; X,
6255 idx := BrowserTab.IndexOfTabAt(X, Y);
6257 BrowserTab.Tabs.Move(BrowserTab.TabIndex, idx);
6260 procedure TGikoForm.BrowserTabMouseMove(Sender: TObject;
6261 Shift: TShiftState; X, Y: Integer);
6264 ThreadItem: TThreadItem;
6267 TabIdx := BrowserTab.IndexOfTabAt(x, y);
6269 if ( ssLeft in Shift ) and ( BrowserTab.Style = tsTabs ) then begin
6270 if FDragWFirst = false then begin
6271 FDragWFirst := true;
6273 BrowserTab.EndDrag(false);
6274 BrowserTab.BeginDrag(false, DandD_THRESHOLD);
6275 FDragWFirst := false;
6278 BrowserTab.EndDrag(false);
6279 FDragWFirst := false;
6282 if (FTabHintIndex <> TabIdx) and (TabIdx <> -1) then begin
6283 Application.CancelHint;
6284 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[TabIdx]).Thread;
6285 if ThreadItem.Title <> BrowserTab.Tabs[TabIdx] then begin
6286 BrowserTab.Hint := ThreadItem.Title;
6287 Application.ShowHint := True;
6289 BrowserTab.Hint := '';
6290 Application.ShowHint := True;
6292 FTabHintIndex := TabIdx;
6297 procedure TGikoForm.BrowserDocumentComplete(Sender: TObject;
6298 const pDisp: IDispatch; var URL: OleVariant);
6300 FDispHtmlDocument: DispHTMLDocument;
6301 BrowserRecord :TBrowserRecord;
6304 // AddMessageList('DocumentComplete', nil);
6305 if TObject(Sender) is TWebBrowser then begin
6306 if TWebBrowser(Sender) <> Browser then begin
6307 BrowserRecord := nil;
6308 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
6309 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(Sender) then begin
6310 BrowserRecord := TBrowserRecord(BrowserTab.Tabs.Objects[i]);
6314 if BrowserRecord <> nil then begin
6315 if BrowserRecord.FEvent <> nil then
6316 BrowserRecord.FEvent.Free;
6317 FDispHtmlDocument := Idispatch(OleVariant(BrowserRecord.Browser.ControlInterface).Document) as DispHTMLDocument;
6318 BrowserRecord.FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
6319 BrowserRecord.FEvent.OnContextMenu := OnDocumentContextMenu;
6320 BrowserRecord.FEvent.OnClick := WebBrowserClick; //
\92Ç
\89Á
\82µ
\82½OnClick
\83C
\83x
\83\93\83g
6323 if GetActiveContent <> nil then begin
6324 FDispHtmlDocument := Idispatch(OleVariant(Browser.ControlInterface).Document) as DispHTMLDocument;
6325 if FEvent <> nil then
6327 FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
6328 FEvent.OnContextMenu := OnDocumentContextMenu;
6329 FEvent.OnClick := WebBrowserClick; //
\92Ç
\89Á
\82µ
\82½OnClick
\83C
\83x
\83\93\83g
6335 procedure TGikoForm.SelectReservActionUpdate(Sender: TObject);
6340 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then begin
6341 List := TList.Create;
6343 SelectListItem(List);
6344 for i := 0 to List.Count - 1 do begin
6345 if TObject(List[i]) is TThreadItem then begin
6346 if TThreadItem(List[i]).IsLogFile then begin
6347 SelectReservAction.Enabled := True;
6352 SelectReservAction.Enabled := False;
6356 end else if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
6357 SelectReservAction.Enabled := True
6359 SelectReservAction.Enabled := False;
6362 procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
6364 AddRoundNameMenu(RoundNamePopupMenu.Items);
6367 procedure TGikoForm.AddRoundNameMenu(MenuItem: TMenuItem);
6373 Item := TMenuItem.Create(Self);
6374 Item.Caption := '
\90V
\82µ
\82¢
\96¼
\91O
\82Å
\8f\84\89ñ
\97\
\96ñ(&N)...';
6375 Item.OnClick := SelectNewRoundNameExecute;
6377 Item := TMenuItem.Create(Self);
6378 Item.Caption := '
\8f\84\89ñ
\83\8a\83X
\83g
\82©
\82ç
\8dí
\8f\9c(&D)';
6379 Item.OnClick := SelectDeleteRoundExecute;
6381 Item := TMenuItem.Create(Self);
6382 Item.Caption := '-';
6384 for i := 0 to RoundList.RoundNameList.Count - 1 do begin
6385 Item := TMenuItem.Create(Self);
6386 Item.Caption := RoundList.RoundNameList[i];
6387 Item.OnClick := SetSelectRoundName;
6392 procedure TGikoForm.SelectNewRoundNameExecute(Sender: TObject);
6395 Dlg: TRoundNameDialog;
6398 Dlg := TRoundNameDialog.Create(Self);
6401 if Dlg.ModalResult <> mrCancel then begin
6402 s := Trim(Dlg.RoundNameEdit.Text);
6403 RoundList.RoundNameList.Add(s);
6404 SetSelectItemRound(True, s, TMenuItem(Sender).Parent.Name);
6411 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string);
6413 threadItem : TThreadItem;
6415 if ParentName <> 'dummy1' then begin
6416 SetSelectItemRound(RoundFlag, RoundName);
6418 threadItem := GetActiveContent;
6419 if threadItem <> nil then begin
6420 threadItem.RoundName := RoundName;
6421 threadItem.Round := RoundFlag;
6426 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
6431 List := TList.Create;
6433 SelectListItem(List);
6434 for i := 0 to List.Count - 1 do begin
6435 if TObject(List[i]) is TBoard then begin
6436 TBoard(List[i]).RoundName := RoundName;
6437 TBoard(List[i]).Round := RoundFlag;
6438 end else if TObject(List[i]) is TThreadItem then begin
6439 if TThreadItem(List[i]).IsLogFile then begin
6440 TThreadItem(List[i]).RoundName := RoundName;
6441 TThreadItem(List[i]).Round := RoundFlag;
6450 procedure TGikoForm.SelectDeleteRoundExecute(Sender: TObject);
6452 SetSelectItemRound(False, '', TMenuItem(Sender).Parent.Name);
6456 procedure TGikoForm.SelectReservActionExecute(Sender: TObject);
6458 //
\82±
\82Ì
\83R
\83\81\83\93\83g
\8dí
\8f\9c\82µ
\82Ä
\82Í
\91Ê
\96Ú
6461 procedure TGikoForm.SetSelectRoundName(Sender: TObject);
6463 MenuItem: TMenuItem;
6465 if Sender is TMenuItem then begin
6466 MenuItem := TMenuItem(Sender);
6467 SetSelectItemRound(True, StripHotKey(MenuItem.Caption), TMenuItem(Sender).Parent.Name);
6472 procedure TGikoForm.NewBoardActionExecute(Sender: TObject);
6474 Dlg: TNewBoardDialog;
6478 for i := 0 to Screen.CustomFormCount - 1 do begin
6479 if TObject(Screen.CustomForms[i]) is TEditorForm then begin
6480 Msg := '
\83\8c\83X
\83G
\83f
\83B
\83^
\82ð
\91S
\82Ä
\95Â
\82¶
\82Ä
\82
\82¾
\82³
\82¢';
6481 MsgBox(Handle, Msg, '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
6485 Dlg := TNewBoardDialog.Create(Self);
6493 procedure TGikoForm.LoginActionExecute(Sender: TObject);
6498 if GikoSys.Dolib.Connected then begin
6499 //
\83\8d\83O
\83A
\83E
\83g
6500 GikoSys.Dolib.Disconnect;
6501 LoginAction.Checked := False;
6502 AddMessageList('
\83\8d\83O
\83A
\83E
\83g
\82µ
\82Ü
\82µ
\82½', nil, gmiOK);
6503 LoginAction.Caption := '
\83\8d\83O
\83C
\83\93(&L)';
6505 TmpCursor := Screen.Cursor;
6506 Screen.Cursor := crHourGlass;
6508 //
\92Ê
\8fí
\83\8d\83O
\83C
\83\93
6509 if not GikoSys.Setting.ForcedLogin then begin
6510 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6511 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6512 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6513 if GikoSys.Setting.ReadProxy then begin
6514 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6515 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6517 GikoSys.Dolib.ProxyAddress := '';
6518 GikoSys.Dolib.ProxyPort := 0;
6520 if GikoSys.Dolib.Connect then begin
6521 LoginAction.Checked := True;
6522 AddMessageList('
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6523 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6524 LoginToolButton.Style := tbsCheck;
6526 // 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);
6527 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6529 LoginAction.Checked := False;
6530 LoginToolButton.Down := False;
6531 LoginToolButton.Style := tbsButton;
6534 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
6535 + '
\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
6536 + '
\82±
\82Ì
\83\82\81[
\83h
\82Å
\83\8d\83O
\83C
\83\93\82ð
\8e\8e\82Ý
\82Ü
\82·
\82©
\81H' + #13#10;
6537 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) = IDYES then begin
6538 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6539 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6540 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6541 if GikoSys.Setting.ReadProxy then begin
6542 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6543 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6545 GikoSys.Dolib.ProxyAddress := '';
6546 GikoSys.Dolib.ProxyPort := 0;
6548 //SSL
\8fá
\8aQ
\97p
\8b
\90§
\83\8d\83O
\83C
\83\93
6549 GikoSys.Dolib.ForcedConnect;
6550 if GikoSys.Dolib.Connect then begin
6551 LoginAction.Checked := True;
6552 AddMessageList('
\8b
\90§
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6553 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6554 LoginToolButton.Style := tbsCheck;
6556 // 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);
6557 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6559 LoginAction.Checked := False;
6560 LoginToolButton.Down := False;
6561 LoginToolButton.Style := tbsButton;
6564 LoginAction.Checked := False;
6565 LoginToolButton.Down := False;
6566 LoginToolButton.Style := tbsButton;
6570 Screen.Cursor := TmpCursor;
6575 procedure TGikoForm.KeySettingActionExecute(Sender: TObject);
6577 Dlg: TKeySettingForm;
6579 Dlg := TKeySettingForm.Create(Self);
6581 if Dlg.ShowModal = mrOk then
6582 GikoSys.SaveKeySetting(ActionList);
6583 GikoSys.SaveEditorKeySetting(Dlg.EditorForm.ActionList);
6589 procedure TGikoForm.ArrangeActionExecute(Sender: TObject);
6591 if ArrangeAction.Checked then begin
6593 ViewPanel.Align := alNone;
6594 ListSplitter.Align := alNone;
6595 ThreadPanel.Align := alNone;
6597 ViewPanel.Width := FBrowserSizeWidth;
6598 ViewPanel.Align := alLeft;
6600 ListSplitter.Width := 5;
6601 ListSplitter.Align := alLeft;
6603 ViewPanel.Left := -10;
6605 ThreadPanel.Align := alClient;
6607 GikoSys.Setting.ListOrientation := gloHorizontal;
6608 case GikoSys.Setting.ListWidthState of
6610 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6611 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6612 ViewPanel.Width := 1;
6615 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6616 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6619 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6620 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6621 ViewPanel.Width := ThreadMainPanel.Width - 80;
6626 ViewPanel.Align := alNone;
6627 ListSplitter.Align := alNone;
6628 ThreadPanel.Align := alNone;
6630 ViewPanel.Height := FBrowserSizeHeight;
6631 ViewPanel.Align := alTop;
6633 ListSplitter.Height := 5;
6634 ListSplitter.Align := alTop;
6636 ViewPanel.Top := -10;
6638 ThreadPanel.Align := alClient;
6639 GikoSys.Setting.ListOrientation := gloVertical;
6640 case GikoSys.Setting.ListHeightState of
6642 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6643 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6644 ViewPanel.Height := 1;
6647 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6648 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6651 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6652 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6653 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
6660 procedure TGikoForm.PaneInitActionExecute(Sender: TObject);
6662 CabinetPanel.Width := 150;
6663 MessagePanel.Height := 40;
6665 FBrowserSizeWidth := 200;
6666 FBrowserSizeHeight := 200;
6667 if ArrangeAction.Checked then begin
6668 ViewPanel.Width := FBrowserSizeWidth;
6670 ViewPanel.Height := FBrowserSizeHeight;
6672 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6673 if GikoSys.Setting.ListHeightState = glsMax then begin
6674 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6675 GikoSys.Setting.ListHeightState := glsNormal;
6678 if GikoSys.Setting.ListWidthState = glsMax then begin
6679 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6680 GikoSys.Setting.ListWidthState := glsNormal;
6685 procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
6687 DEL_MSG = '
\83\8d\83O
\83t
\83@
\83C
\83\8b\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
6688 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6691 ThreadItem: TThreadItem;
6693 idx := BrowserTab.TabIndex;
6694 if idx <> -1 then begin
6695 if BrowserTab.Tabs.Objects[idx] <> nil then begin
6696 if GikoSys.Setting.DeleteMsg then
6697 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
6699 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).FThread;
6700 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6701 ThreadItem.DeleteLogFile;
6702 if ThreadItem.ParentBoard = FActiveList then
6708 function TGikoForm.GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
6713 if CoolBar = nil then
6715 for i := 0 to CoolBar.Bands.Count - 1 do begin
6716 if CoolBar.Bands[i].Control = Control then begin
6717 Result := CoolBar.Bands[i];
6723 procedure TGikoForm.BrowserTabToolBarResize(Sender: TObject);
6725 if BrowserTab.Parent = BrowserTabToolBar then
6726 BrowserTab.Width := BrowserTabToolBar.Width;
6729 procedure TGikoForm.SelectTextClearActionExecute(Sender: TObject);
6731 GikoSys.Setting.SelectTextList.Clear;
6732 SelectComboBox.Items.Clear;
6733 SelectComboBox.Text := '';
6734 SetListViewType( gvtAll );
6737 procedure TGikoForm.NameTextClearActionExecute(Sender: TObject);
6741 GikoSys.Setting.NameList.Clear;
6742 for i := 0 to Screen.CustomFormCount - 1 do begin
6743 if TObject(Screen.CustomForms[i]) is TEditorForm then
6744 TEditorForm(Screen.CustomForms[i]).NameComboBox.Items.Clear;
6748 procedure TGikoForm.MailTextClearActionExecute(Sender: TObject);
6752 GikoSys.Setting.MailList.Clear;
6753 for i := 0 to Screen.CustomFormCount - 1 do begin
6754 if TObject(Screen.CustomForms[i]) is TEditorForm then
6755 TEditorForm(Screen.CustomForms[i]).MailComboBox.Items.Clear;
6759 procedure TGikoForm.LeftmostTabSelectActionExecute(Sender: TObject);
6761 if BrowserTab.Tabs.Count > 0 then begin
6762 BrowserTab.TabIndex := 0;
6763 BrowserTab.OnChange(nil);
6767 procedure TGikoForm.LeftTabSelectActionExecute(Sender: TObject);
6769 if BrowserTab.Tabs.Count > 0 then begin
6770 if BrowserTab.TabIndex = -1 then begin
6771 BrowserTab.TabIndex := 0;
6772 BrowserTab.OnChange(nil);
6773 end else if BrowserTab.TabIndex > 0 then begin
6774 BrowserTab.TabIndex := BrowserTab.TabIndex - 1;
6775 BrowserTab.OnChange(nil);
6780 procedure TGikoForm.RightTabSelectActionExecute(Sender: TObject);
6782 if BrowserTab.Tabs.Count > 0 then begin
6783 if BrowserTab.TabIndex = -1 then begin
6784 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6785 BrowserTab.OnChange(nil);
6786 end else if BrowserTab.TabIndex < (BrowserTab.Tabs.Count - 1) then begin
6787 BrowserTab.TabIndex := BrowserTab.TabIndex + 1;
6788 BrowserTab.OnChange(nil);
6793 procedure TGikoForm.RightmostTabSelectActionExecute(Sender: TObject);
6795 if BrowserTab.Tabs.Count > 0 then begin
6796 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6797 BrowserTab.OnChange(nil);
6801 procedure TGikoForm.LeftmostTabSelectActionUpdate(Sender: TObject);
6803 LeftmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6806 procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
6808 LeftTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6811 procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);
6813 RightTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6816 procedure TGikoForm.RightmostTabSelectActionUpdate(Sender: TObject);
6818 RightmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6821 procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
6826 procedure TGikoForm.SetMenuFont;
6828 // GikoSys.MenuFont(MenuToolBar.Font);
6829 // MenuToolBar.Buttons[0].AutoSize := False;
6830 // MenuToolBar.Buttons[0].AutoSize := True;
6831 // MenuToolBar.Font.Color := clMenuText;
6832 GikoSys.MenuFont(MainCoolBar.Font);
6833 MenuToolBar.Buttons[0].AutoSize := False;
6834 MenuToolBar.Buttons[0].AutoSize := True;
6835 MainCoolBar.AutoSize := False;
6836 MainCoolBar.AutoSize := True;
6838 GikoSys.MenuFont(ListCoolBar.Font);
6839 GikoSys.MenuFont(BrowserCoolBar.Font);
6840 // MenuToolBar.Font.Color := clMenuText;
6843 procedure TGikoForm.FavoriteMenuClick(Sender: TObject);
6849 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\92Ç
\89Á
6850 NewMenu := TMenuItem.Create(MainMenu);
6851 NewMenu.Action := FavoriteAddAction;
6852 FavoriteMenu.Add(NewMenu);
6853 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\90®
\97\9d
6854 NewMenu := TMenuItem.Create(FavoriteMenu);
6855 NewMenu.Action := FavoriteArrangeAction;
6856 FavoriteMenu.Add(NewMenu);
6857 //
\83Z
\83p
\83\8c\81[
\83^
6858 NewMenu := TMenuItem.Create(FavoriteMenu);
6859 NewMenu.Caption := '-';
6860 FavoriteMenu.Add(NewMenu);
6862 CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
6865 procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
6870 for i := 0 to Node.Count - 1 do begin
6871 NewMenu := TFavoriteMenuItem.Create(Self);
6872 NewMenu.AutoHotkeys := maAutomatic;
6873 NewMenu.Caption := CustomStringReplace(Node.Item[i].Text, '&', '&&');
6874 TFavoriteMenuItem(NewMenu).Data := Node.Item[i].Data;
6875 MenuItem.Add(NewMenu);
6877 if TObject(Node.Item[i].Data) is TFavoriteFolder then begin
6878 NewMenu.ImageIndex := TOOL_ICON_FAV_FOLDER;
6879 CreateFavMenu(Node.Item[i], NewMenu);
6880 end else if TObject(Node.Item[i].Data) is TFavoriteBoardItem then begin
6881 NewMenu.ImageIndex := TOOL_ICON_FAV_BOARD;
6882 NewMenu.OnClick := FavoriteClick;
6883 end else if TObject(Node.Item[i].Data) is TFavoriteThreadItem then begin
6884 NewMenu.ImageIndex := TOOL_ICON_FAV_THREAD;
6885 NewMenu.OnClick := FavoriteClick;
6890 procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
6892 Dlg : TFavoriteAddDialog;
6894 Items : ^TTreeNodes;
6899 Items := @(FavoriteTreeView.Items);
6900 if Item is TFavoriteBoardItem then
6901 Item := TFavoriteBoardItem( Item ).Item
6902 else if Item is TFavoriteThreadItem then
6903 Item := TFavoriteThreadItem( Item ).Item;
6904 if Item is TBoard then begin
6905 ItemURL := TBoard( Item ).URL;
6906 for i := Items^.Count - 1 downto 0 do begin
6907 Data := Items^.Item[ i ].Data;
6908 if TObject( Data ) is TFavoriteBoardItem then begin
6909 if ItemURL = TFavoriteThreadItem( Data ).URL then begin
6910 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
6916 Dlg := TFavoriteAddDialog.Create(Self);
6918 Dlg.SetBoard( TBoard( Item ) );
6923 end else if Item is TThreadItem then begin
6924 ItemURL := TThreadItem( Item ).URL;
6925 for i := Items^.Count - 1 downto 0 do begin
6926 Data := Items^.Item[ i ].Data;
6927 if TObject( Data ) is TFavoriteThreadItem then begin
6928 if ItemURL = TFavoriteThreadItem( Data ).URL then begin
6929 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
6935 Dlg := TFavoriteAddDialog.Create(Self);
6937 Dlg.SetThreadItem( TThreadItem( Item ) );
6947 procedure TGikoForm.FavoriteAddActionExecute(Sender: TObject);
6949 ShowFavoriteAddDialog(GetActiveContent);
6952 procedure TGikoForm.FavoriteClick(Sender: TObject);
6955 FavoriteClick( Sender, True );
6959 procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
6962 ThreadItem: TThreadItem;
6963 FavBoard: TFavoriteBoardItem;
6964 FavThread: TFavoriteThreadItem;
6968 if Sender is TFavoriteMenuItem then
6969 Item := TFavoriteMenuItem(Sender).Data
6970 else if Sender is TLinkToolButton then
6971 Item := TLinkToolButton(Sender).Data
6972 else if Sender is TTreeNode then
6973 Item := TTreeNode( Sender ).Data
6977 if TObject(Item) is TFavoriteBoardItem then begin
6978 FavBoard := TFavoriteBoardItem(Item);
6979 Board := FavBoard.Item;
6980 if Board <> nil then begin
6981 if (FTreeType = gtt2ch) and (FActiveBBS <> Board.ParentCategory.ParenTBBS) then
6982 ShowBBSTree( Board.ParentCategory.ParenTBBS );
6983 SelectTreeNode(Board, True);
6985 end else if TObject(Item) is TFavoriteThreadItem then begin
6986 FavThread := TFavoriteThreadItem(Item);
6987 ThreadItem := FavThread.Item;
6988 if ThreadItem = nil then
6991 InsertBrowserTab(ThreadItem, ActiveTab);
6993 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6994 if GikoSys.Setting.ListWidthState = glsMin then begin
6995 BrowserMaxAndFocusAction.Execute;
6998 if GikoSys.Setting.ListHeightState = glsMin then begin
6999 BrowserMaxAndFocusAction.Execute;
7005 procedure TGikoForm.FavoriteAddActionUpdate(Sender: TObject);
7007 FavoriteAddAction.Enabled := (GetActiveContent <> nil);
7010 procedure TGikoForm.BoardFavoriteAddActionExecute(Sender: TObject);
7012 if TObject(ListView.Selected.Data) is TBoard then
7013 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
7016 procedure TGikoForm.BoardFavoriteAddActionUpdate(Sender: TObject);
7018 BoardFavoriteAddAction.Enabled := (GetActiveList is TCategory) and (ListView.SelCount > 0);
7021 procedure TGikoForm.ThreadFavoriteAddActionExecute(Sender: TObject);
7023 if TObject(ListView.Selected.Data) is TThreadItem then
7024 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
7027 procedure TGikoForm.ThreadFavoriteAddActionUpdate(Sender: TObject);
7029 ThreadFavoriteAddAction.Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
7032 procedure TGikoForm.TreeSelectFavoriteAddActionExecute(Sender: TObject);
7034 ShowFavoriteAddDialog(TObject(FClickNode.Data));
7037 procedure TGikoForm.FavoriteArrangeActionExecute(Sender: TObject);
7039 Dlg: TFavoriteArrangeDialog;
7041 Dlg := TFavoriteArrangeDialog.Create(Self);
7047 PostMessage( Handle, USER_SETLINKBAR, 0, 0 );
7050 procedure TGikoForm.BBSMenuItemOnClick(
7055 if Sender is TBBSMenuItem then
7056 ShowBBSTree( TBBSMenuItem( Sender ).Data );
7060 procedure TGikoForm.MainCoolBarResize(Sender: TObject);
7062 TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
7065 procedure TGikoForm.MoveToActionExecute(Sender: TObject);
7070 URL := Trim(AddressComboBox.Text);
7073 idx := AddressComboBox.Items.IndexOf(URL);
7074 if idx = -1 then begin
7075 AddressComboBox.Items.Insert(0, URL);
7076 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
7077 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
7079 AddressComboBox.Items.Delete(idx);
7080 AddressComboBox.Items.Insert(0, URL);
7084 procedure TGikoForm.MoveToURL(URL: string);
7087 protocol, host, path, document, port, bookmark : string;
7088 URL2, protocol2, host2, path2, document2, port2, bookmark2 : string;
7090 BBSID, BBSKey: string;
7092 ThreadItem: TThreadItem;
7095 tmpThread : TThreadItem;
7096 // category : TCategory;
7097 // categoryNode : TTreeNode;
7098 // boardNode : TTreeNode;
7099 shiftDown : Boolean;
7103 GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark );
7104 GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey );
7107 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
7108 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
7109 if shiftDown then begin
7110 GikoSys.OpenBrowser(URL, gbtUserApp);
7112 end else if ctrlDown then begin
7113 GikoSys.OpenBrowser(URL, gbtIE);
7117 //=====
\83v
\83\89\83O
\83C
\83\93
7120 bi := High( BoardPlugIns );
7121 for i := Low( BoardPlugIns ) to bi do begin
7122 if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
7123 case BoardPlugIns[ i ].AcceptURL( URL ) of
7126 tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL );
7127 boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
7128 Board := BBSsFindBoardFromURL( boardURL );
7129 if Board = nil then begin
7130 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
7131 //GikoSys.OpenBrowser(URL, gbtUserApp);
7134 Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL );
7135 if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
7136 ShowBBSTree( BBSs[ 1 ] );
7139 if not Board.IsThreadDatRead then begin
7140 GikoSys.ReadSubjectFile( Board );
7145 ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
7146 if ThreadItem = nil then begin
7147 ThreadItem := tmpThread;
7148 Board.Insert( 0, ThreadItem );
7149 if ActiveList is TBoard then begin
7150 if TBoard(ActiveList) = Board then
7151 ListView.Items.Count := ListView.Items.Count + 1;
7153 InsertBrowserTab( ThreadItem );
7154 DownloadContent( ThreadItem );
7158 InsertBrowserTab( ThreadItem );
7159 if not ThreadItem.IsLogFile then begin
7160 DownloadContent( ThreadItem );
7170 Board := BBSsFindBoardFromURL( URL );
7171 if Board <> nil then begin
7172 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
7173 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7174 SelectTreeNode( Board, True );
7182 // 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¢
7186 if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
7187 boardURL := GikoSys.Get2chThreadURL2BoardURL( URL );
7188 Board := BBSsFindBoardFromURL( boardURL );
7190 Board := BBSsFindBoardFromBBSID( BBSID );
7192 if Board = nil then begin
7193 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
7194 //
\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)
7195 Board := BBSs[ 0 ].FindBBSID( Copy(BBSID, 1 , Length(BBSID) - 1) );
7197 if Board = nil then begin
7198 //
\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
7199 GikoSys.OpenBrowser(URL, gbtUserApp);
7202 //
\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é
7204 GikoSys.ParseURI(URL2 , protocol2, host2, path2, document2, port2, bookmark2 );
7205 tmp1 := Copy(host, AnsiPos('.', host) + 1, Length(host));
7206 tmp2 := Copy(host2, AnsiPos('.', host2) + 1, Length(host2));
7207 if (tmp1 <> tmp2) then begin
7208 GikoSys.OpenBrowser(URL, gbtUserApp);
7213 if not Board.IsThreadDatRead then
7214 GikoSys.ReadSubjectFile(Board);
7215 URL := GikoSys.Get2chBrowsableThreadURL( URL );
7216 ThreadItem := Board.FindThreadFromURL( URL );
7217 //
\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)
7218 if ThreadItem = nil then begin
7219 ThreadItem := Board.FindThreadFromFileName( BBSKey + '.dat' );
7222 if ThreadItem = nil then begin
7223 //shift ->
\90Ý
\92è
\83u
\83\89\83E
\83U
\81i
\96³
\82¯
\82ê
\82ÎIE
\81j
7225 {shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
7226 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
7228 GikoSys.OpenBrowser(URL, gbtUserApp)
7229 else if ctrlDown then
7230 GikoSys.OpenBrowser(URL, gbtIE)
7233 ThreadItem := TThreadItem.Create( nil, URL );
7234 ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
7235 if AnsiPos(Host, Board.URL) = 0 then
7236 ThreadItem.DownloadHost := Host
7238 ThreadItem.DownloadHost := '';
7239 Board.Insert(0, ThreadItem);
7240 if ActiveList is TBoard then begin
7241 if TBoard(ActiveList) = Board then
7242 ListView.Items.Count := ListView.Items.Count + 1;
7244 InsertBrowserTab(ThreadItem);
7245 DownloadContent(ThreadItem);
7248 if ThreadItem.IsLogFile then
7249 InsertBrowserTab(ThreadItem)
7251 if AnsiPos(Host, Board.URL) = 0 then
7252 ThreadItem.DownloadHost := Host
7254 ThreadItem.DownloadHost := '';
7255 InsertBrowserTab(ThreadItem);
7256 DownloadContent(ThreadItem);
7260 Board := BBSsFindBoardFromURL( URL );
7261 if Board = nil then begin
7262 GikoSys.OpenBrowser(URL, gbtAuto);
7264 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
7265 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7266 SelectTreeNode( Board, True );
7271 procedure TGikoForm.AddressToolBarResize(Sender: TObject);
7273 AddressComboBox.Width := AddressToolBar.Width - MoveToToolButton.Width - 10;
7274 CoolBarResized( Sender, MainCoolBar );
7277 procedure TGikoForm.AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
7278 Shift: TShiftState);
7280 if Key = VK_RETURN then
7281 MoveToAction.Execute;
7284 procedure TGikoForm.BrowserEnter(Sender: TObject);
7286 Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
7289 procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
7291 CDS:PCopyDataStruct;
7295 CDS := Message.CopyDataStruct;
7296 GetMem(PC, CDS^.cbData);
7298 lstrcpy(PC,CDS^.lpData);
7299 SetString(sURL, PC,lstrlen(PC));
7304 Message.Result := 1;
7307 procedure TGikoForm.WndProc(var Message: TMessage);
7312 if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
7315 if Message.WParam = SC_MINIMIZE then
7318 TreeClick( TreeView.Selected );
7332 procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
7334 hComboEdit: THandle;
7335 // KeyData: Integer;
7338 if AddressComboBox.Focused or SelectComboBox.Focused then begin
7339 if Msg.CharCode in [VK_BACK] then begin
7340 hComboEdit := GetFocus;
7341 if hComboEdit <> 0 then
7342 SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, Msg.KeyData);
7343 // SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, $000E0001);
7346 if Msg.CharCode in [VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PRIOR, VK_NEXT] then begin
7347 hComboEdit := GetFocus;
7348 if hComboEdit <> 0 then
7349 SendMessage(hComboEdit, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
7353 //
\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ð
7354 KeyData := Msg.KeyData;
7355 if (KeyData and $20000000) = 0 then begin
7356 if Msg.CharCode in [Ord('F'), Ord('V'), Ord('B'), Ord('R'),
7357 Ord('A'), Ord('T'), Ord('H')] then begin
7358 if not ActionList.IsShortCut(Msg) then begin
7366 procedure TGikoForm.BrowserTabVisibleActionExecute(Sender: TObject);
7368 GikoSys.Setting.BrowserTabVisible := BrowserTabVisibleAction.Checked;
7372 procedure TGikoForm.BrowserTabTopActionExecute(Sender: TObject);
7374 BrowserTabBottomAction.Checked := False;
7375 BrowserTabTopAction.Checked := True;
7376 GikoSys.Setting.BrowserTabPosition := gtpTop;
7380 procedure TGikoForm.BrowserTabBottomActionExecute(Sender: TObject);
7382 BrowserTabTopAction.Checked := False;
7383 BrowserTabBottomAction.Checked := True;
7384 GikoSys.Setting.BrowserTabPosition := gtpBottom;
7388 procedure TGikoForm.BrowserTabTabStyleActionExecute(Sender: TObject);
7390 BrowserTabButtonStyleAction.Checked := False;
7391 BrowserTabFlatStyleAction.Checked := False;
7392 BrowserTabTabStyleAction.Checked := True;
7393 GikoSys.Setting.BrowserTabStyle := gtsTab;
7397 procedure TGikoForm.BrowserTabButtonStyleActionExecute(Sender: TObject);
7399 BrowserTabTabStyleAction.Checked := False;
7400 BrowserTabFlatStyleAction.Checked := False;
7401 BrowserTabButtonStyleAction.Checked := True;
7402 GikoSys.Setting.BrowserTabStyle := gtsButton;
7406 procedure TGikoForm.BrowserTabFlatStyleActionExecute(Sender: TObject);
7408 BrowserTabFlatStyleAction.Checked := True;
7409 BrowserTabTabStyleAction.Checked := False;
7410 BrowserTabButtonStyleAction.Checked := False;
7411 GikoSys.Setting.BrowserTabStyle := gtsFlat;
7415 procedure TGikoForm.PreviewTimerTimer(Sender: TObject);
7421 HtmlFileName: string;
7425 TargetFrameName: OleVariant;
7426 PostData: OleVariant;
7427 Headers: OleVariant;
7428 WindowHeight: Integer;
7429 WindowWidth: Integer;
7433 Protocol, Host, Path, Document, Port, Bookmark: string;
7435 PreviewTimer.Enabled := False;
7439 case GikoSys.Setting.PreviewSize of
7446 WindowHeight := 192;
7450 WindowHeight := 384;
7454 WindowHeight := 480;
7456 else begin //gpsMedium
7458 WindowHeight := 288;
7462 ARect := Rect(0, 0, WindowWidth, WindowHeight);
7464 case GikoSys.Setting.PopupPosition of
7465 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7466 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7467 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
7468 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
7469 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
7470 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
7471 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7472 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7473 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Ó
7476 html := '<html><head>'#13#10
7478 + 'function init() {'#13#10
7479 + ' if ((document.body.clientHeight >= Image1.height) && (document.body.clientWidth >= Image1.width)) {'#13#10
7481 + ' var dh, ih;'#13#10
7482 + ' dh = document.body.clientWidth / document.body.clientHeight;'#13#10
7483 + ' ih = Image1.width / Image1.height;'#13#10
7484 + ' if (document.body.clientWidth < document.body.clientHeight) {'#13#10
7485 + ' if (ih > dh)'#13#10
7486 + ' Image1.width = document.body.clientWidth;'#13#10
7488 + ' Image1.height = document.body.clientHeight;'#13#10
7490 + ' if (ih < dh)'#13#10
7491 + ' Image1.height = document.body.clientHeight;'#13#10
7493 + ' Image1.width = document.body.clientWidth;'#13#10
7496 + ' Message.style.display = "none";'#13#10
7500 + '<body topmargin="0" leftmargin="0" style="border-width: 1px; overflow:hidden; border-style: solid;" onLoad="init()">'#13#10
7501 + '<div align="center" id="Message">
\83v
\83\8c\83r
\83\85\81[
\8dì
\90¬
\92\86</div>'#13#10
7502 + '<div align="center"><img name="Image1" border="0" src="%ImageURL%"></div>'#13#10
7504 sl := TStringList.Create;
7507 HtmlFileName := GikoSys.GetAppDir + HTML_FILE_NAME;
7508 sl.Text := AnsiReplaceStr(html, '%ImageURL%', FPreviewURL);
7509 sl.SaveToFile(HtmlFileName);
7516 NavURL := HtmlFileName;
7518 TargetFrameName := '';
7521 GikoSys.ParseURI(FPreviewURL, Protocol, Host, Path, Document, Port, Bookmark);
7522 Referer := Protocol + '://' + Host;
7524 Referer := Referer + ':' + Port;
7525 Referer := Referer + Path;
7526 Headers := 'Referer: ' + Referer;
7527 FPreviewBrowser.Navigate(NavURL, Flags, TargetFrameName, PostData, Headers);
7528 if ARect.Top + WindowHeight > Screen.DesktopHeight then
7529 ARect.Top := Screen.DesktopHeight - WindowHeight;
7530 if ARect.Left + WindowWidth > Screen.DesktopWidth then
7531 ARect.Left := Screen.DesktopWidth - WindowWidth;
7532 if ARect.Left < Screen.DesktopLeft then ARect.Left := Screen.DesktopLeft;
7533 if ARect.Bottom < Screen.DesktopTop then ARect.Bottom := Screen.DesktopTop;
7535 SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
7536 ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
7538 // Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
7539 // SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
7543 procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
7545 if PreviewTimer.Enabled then
7546 PreviewTimer.Enabled := False;
7547 if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
7548 FHint.ReleaseHandle;
7551 if (FPreviewBrowser <> nil) and (IsWindowVisible(FPreviewBrowser.Handle)) then
7552 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
7553 Message.Result := 1;
7557 procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
7559 MsgBarCloseAction.Execute;
7562 function TGikoForm.OnDocumentContextMenu(Sender: TObject): WordBool;
7564 Doc: IHtmlDocument2;
7565 Range: IHTMLTxtRange;
7568 ThreadItem: TThreadItem;
7571 Doc := FactiveContent.FBrowser.Document as IHtmlDocument2;
7572 if Assigned(Doc) then begin
7573 Range := Doc.selection.createRange as IHTMLTxtRange;
7574 s := CustomStringReplace(Range.text, '
\81@', ' ');//
\91S
\8ap
\8bó
\94\92\82ð
\94¼
\8ap
\8bó
\94\92\82É
7575 s := ZenToHan(Trim(s));
7576 if GikoSys.IsNumeric(s) then begin
7578 ThreadItem := GetActiveContent;
7579 if ThreadItem <> nil then begin
7581 FHint.PopupType := gptThread;
7582 SetResPopupText(ThreadItem, Num, Num, False, False);
7583 if FHint.ResCount <> 0 then
7594 procedure TGikoForm.SetResPopupText(threadItem: TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
7606 boardPlugIn : TBoardPlugIn;
7609 if StNum > ToNum then begin
7615 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
7616 if StNum + MAX_POPUP_RES < ToNum then
7617 ToNum := StNum + MAX_POPUP_RES;
7619 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
7621 if ThreadItem <> nil then
7622 FHint.Title := ThreadItem.Title;
7624 if ThreadItem <> nil then begin
7625 if ThreadItem.IsBoardPlugInAvailable then begin
7626 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
7627 boardPlugIn := ThreadItem.BoardPlugIn;
7629 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
7630 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
7631 for i := StNum to ToNum do begin
7633 //
\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½
7634 tmp := boardPlugIn.GetDat( DWORD( threadItem ), i );
7635 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7636 Res := GikoSys.DivideStrLine(tmp);
7637 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7638 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7640 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7643 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7644 Body := CustomStringReplace(Body, '<br>', #10,true);
7645 Body := CustomStringReplace(Body, '</a>', '',true);
7646 Body := GikoSys.DeleteLink(Body);
7647 Body := CustomStringReplace(Body, '<', '<');
7648 Body := CustomStringReplace(Body, '>', '>');
7649 Body := CustomStringReplace(Body, '"', '"');
7650 Body := CustomStringReplace(Body, '&', '&');
7651 Body := CustomStringReplace(Body, ' ', ' ');
7653 FHint.Add(Header, Body);
7654 //FHint.Title := '';
7658 for i := StNum to ToNum do begin
7660 FileName := ThreadItem.FilePath;
7661 tmp := GikoSys.ReadThreadFile(FileName, Line);
7662 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7663 Res := GikoSys.DivideStrLine(tmp);
7664 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7665 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7667 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7669 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7670 Body := CustomStringReplace(Body, '<br>', #10,true);
7671 Body := CustomStringReplace(Body, '</a>', '',true);
7672 Body := GikoSys.DeleteLink(Body);
7673 Body := CustomStringReplace(Body, '<', '<');
7674 Body := CustomStringReplace(Body, '>', '>');
7675 Body := CustomStringReplace(Body, '"', '"');
7676 Body := CustomStringReplace(Body, '&', '&');
7677 Body := CustomStringReplace(Body, ' ', ' ');
7678 FHint.Add(Header, Body);
7679 //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
7688 procedure TGikoForm.ShowTextPopup;
7693 // if Trim(s) = '' then
7696 FHint.Font.Name := GikoSys.Setting.HintFontName;
7697 FHint.Font.Size := GikoSys.Setting.HintFontSize;
7698 FHint.Font.Color := GikoSys.Setting.HintFontColor;
7699 FHint.Color := GikoSys.Setting.HintBackColor;
7700 FHint.HeaderBold := GikoSys.Setting.ResPopupHeaderBold;
7702 if FHint.PopupType = gptRaw then
7703 ARect := FHint.CalcHintRect(Screen.Width, FHint.Caption, nil)
7705 ARect := FHint.CalcHintRect(Screen.Width, '', nil);
7706 case GikoSys.Setting.PopupPosition of
7707 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7708 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7709 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
7710 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
7711 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
7712 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
7713 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7714 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7715 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Ó
7717 //FHint.ActivateHint(ARect, s);
7718 if FHint.PopupType = gptRaw then
7719 FHint.ActivateHint(ARect, FHint.Caption)
7721 FHint.ActivateHint(ARect, '');
7723 FHint.ReleaseHandle;
7728 procedure TGikoForm.GikoHelpActionExecute(Sender: TObject);
7732 FileName := GikoSys.GetAppDir + 'batahlp.chm';
7733 if not FileExists(FileName) then begin
7736 '
\83w
\83\8b\83v
\82ª
\8c©
\82Â
\82©
\82è
\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½' + #13#10 +
7737 '
\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 +
7738 '
\83w
\83\8b\83v
\82Í
\83M
\83R
\83i
\83r
\82Ì
\83T
\83C
\83g
\82É
\92u
\82¢
\82Ä
\82 \82è
\82Ü
\82·',
7743 ShellExecute(Handle, 'open', PChar(FileName), '', PChar(GikoSys.GetAppDir), SW_SHOW);
7746 procedure TGikoForm.ToolButton18Click(Sender: TObject);
7748 if FTreeType = gttHistory then begin
7751 TreeView.Items.Clear;
7755 procedure TGikoForm.KotehanActionExecute(Sender: TObject);
7757 Dlg: TKotehanDialog;
7759 Dlg := TKotehanDialog.Create(Self);
7767 procedure TGikoForm.SetLinkBar;
7771 ToolButton: TLinkToolButton;
7772 MenuItem: TMenuItem;
7773 oldIgnoreResize : Boolean;
7775 oldIgnoreResize := FIsIgnoreResize;
7776 FIsIgnoreResize := True;
7777 MainCoolBar.Bands.BeginUpdate;
7779 LinkBarPopupMenu.Items.Clear;
7780 for i := LinkToolBar.ButtonCount - 1 downto 0 do
7781 //LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
7782 LinkToolBar.Buttons[i].Free;
7783 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
7784 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
7785 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
7786 ToolButton := TLinkToolButton.Create(LinkToolBar);
7787 // ToolButton.Parent := LinkToolBar;
7788 if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteFolder then begin
7789 MenuItem := TMenuItem.Create(Self);
7790 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
7791 LinkBarPopupMenu.Items.Add(MenuItem);
7792 ToolButton.MenuItem := MenuItem;
7793 ToolButton.ImageIndex := TOOL_ICON_FAV_FOLDER;
7794 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
7795 ToolButton.ImageIndex := TOOL_ICON_FAV_BOARD;
7796 ToolButton.OnClick := FavoriteClick;
7797 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
7798 ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
7799 ToolButton.OnClick := FavoriteClick;
7801 ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
7802 ToolButton.Left := 10000;
7803 ToolButton.Data := FavoriteTreeView.Items[i].Item[j].Data;
7804 ToolButton.AutoSize := True;
7805 ToolButton.OnDragDrop := LinkToolButtonDragDrop;
7806 ToolButton.OnDragOver := FavoriteDragOver;
7807 ToolButton.OnMouseDown := LinkToolButtonOnMouseDown;
7808 ToolButton.OnMouseMove := LinkToolButtonOnMouseMove;
7809 ToolButton.OnMouseUp := LinkToolButtonOnMouseUp;
7810 ToolButton.OnStartDrag := LinkToolButtonStartDrag;
7811 //ToolButton.DragMode := dmAutomatic;
7812 ToolButton.DragMode := dmManual;
7813 ToolButton.PopupMenu := FavoriteTreePopupMenu;
7815 LinkToolBar.InsertControl(ToolButton);
7820 { if LinkToolBar.ButtonCount = 0 then begin
7821 ToolButton := TLinkToolButton.Create(LinkToolBar);
7822 ToolButton.Style := tbsButton;
7823 ToolButton.ImageIndex := -1;
7824 ToolButton.Caption := '';
7825 LinkToolBar.InsertControl(ToolButton);
7828 MainCoolBar.Bands.EndUpdate;
7829 LoadCoolBarSettings;
7830 FIsIgnoreResize := oldIgnoreResize;
7834 procedure TGikoForm.FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
7842 if Sender = FavoriteTreeView then begin
7843 Node := FavoriteTreeView.GetNodeAt(X, Y);
7848 bound := Node.DisplayRect( False );
7849 height := bound.Bottom - bound.Top;
7850 if (bound.Top + height / 2) <= Y then
7851 Node := FavoriteTreeView.GetNodeAt(X, Y + height);
7856 if Node.IsFirstNode then
7861 if FDropSpaceNode <> nil then
7862 if FDropSpaceNode.AbsoluteIndex = Node.AbsoluteIndex then
7865 if Change then begin
7866 if FDropSpaceNode <> nil then
7867 FDropSpaceNode.Free;
7869 FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil );
7870 FDropSpaceNode.MoveTo( Node, naInsert );
7871 FDropSpaceNode.ImageIndex := -1;
7872 FDropSpaceNode.SelectedIndex := -1;
7876 if Source = FavoriteTreeView then begin
7877 if FavoriteTreeView.Selected = FavoriteTreeView.Items.GetFirstNode then begin
7882 end else if Source = BrowserTab then
7884 else if Source = ListView then
7886 else if Source is TLinkToolButton then
7888 else if Source = TreeView then
7894 procedure TGikoForm.FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
7897 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
7900 procedure TGikoForm.LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
7902 // FDragging := true;
7905 procedure TGikoForm.LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
7907 SenderNode: TTreeNode;
7908 LinkToolButton: TLinkToolButton;
7911 LinkToolButton := TLinkToolButton( Sender );
7912 SenderNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data );
7914 FavoriteDragDrop( SenderNode, Source );
7918 procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7920 favButton : TLinkToolButton;
7921 favThreadItem : TFavoriteThreadItem;
7927 if Sender is TLinkToolButton then begin
7928 favButton := TLinkToolButton( Sender );
7929 if TObject( favButton.Data ) is TFavoriteThreadItem then begin
7930 favThreadItem := TFavoriteThreadItem( favButton.Data );
7931 if favThreadItem.Item <> nil then
7932 InsertBrowserTab( favThreadItem.Item, False );
7940 procedure TGikoForm.LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
7944 TToolButton( Sender ).DragMode := dmManual;
7945 if ssLeft in Shift then begin
7946 // 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)
7947 if FDragTime = 0 then begin
7948 FDragTime := GetTickCount();
7950 Now := GetTickCount();
7951 if (Now - FDragTime) > 500 then begin
7952 if FDragButton <> TToolButton( Sender ) then begin
7954 FDragButton := TToolButton( Sender );
7955 TToolButton(Sender).BeginDrag(false ,5);
7958 {$IF Defined(debug)}
7959 ShowMessage('Error');
7970 procedure TGikoForm.LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7975 function TGikoForm.GetWidthAllToolButton(ToolBar: TToolBar): Integer;
7980 for i := 0 to ToolBar.ButtonCount - 1 do
7981 if ToolBar.Buttons[i].Visible then
7982 Result := Result + ToolBar.Buttons[i].Width;
7985 procedure TGikoForm.MainCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7987 Control : TWinControl;
7990 Control := FindControl(BandInfo^.hwndChild);
7991 if Control = nil then
7994 for i := MainCoolBar.Bands.Count - 1 downto 0 do begin
7995 if MainCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
7996 idx := MainCoolBar.Bands[ i ].ID;
8000 Canvas.Font.Handle := GetStockObject( DEFAULT_GUI_FONT );
8001 if (Control = MenuToolBar) or (Control = StdToolBar) then begin
8002 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8003 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8004 BandInfo^.cxMinChild := 0;
8005 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth;
8006 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8007 end else if Control = LinkToolBar then begin
8008 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8009 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8010 BandInfo^.cxMinChild := 0;
8011 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83\8a\83\93\83N' );
8012 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8013 end else begin // AddressToolBar
8014 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8015 BandInfo^.cxMinChild := 0;
8016 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83A
\83h
\83\8c\83X' );
8020 procedure TGikoForm.MainCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8026 ChevronPopupMenu.Items.Clear;
8028 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
8029 if MainCoolBar.Bands[ i ].Visible then begin
8030 if Idx = Int64(RebarChevron^.uBand) then begin
8037 if (Idx >= 0) and (MainCoolBar.Bands.Count > Idx) then begin
8038 if MainCoolBar.Bands[Idx].Control = MenuToolbar then begin
8040 end else if MainCoolBar.Bands[Idx].Control = StdToolbar then begin
8041 ToolBarChevronMenu(StdToolBar);
8042 end else if MainCoolBar.Bands[Idx].Control = LinkToolbar then begin
8046 p := MainCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8047 ChevronPopupMenu.Popup(p.x, p.y);
8051 procedure TGikoForm.MenuBarChevronMenu;
8052 procedure SetSubMenu(MenuItem: TMenuItem; PopupItem: TMenuItem);
8058 for i := 0 to MenuItem.Count - 1 do begin
8060 if MenuItem[i] is TFavoriteMenuItem then begin
8061 Item := TFavoriteMenuItem.Create(Self);
8062 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(MenuItem[i]).Data;
8064 Item := TMenuItem.Create(Self);
8065 Item.Caption := MenuItem[i].Caption;
8066 Item.Action := MenuItem[i].Action;
8067 Item.ImageIndex := MenuItem[i].ImageIndex;
8068 Item.OnClick := MenuItem[i].OnClick;
8069 PopupItem.Add(Item);
8070 if MenuItem[i].Count > 0 then
8071 SetSubMenu(MenuItem[i], Item);
8080 ChevronPopupMenu.Items.Clear;
8081 ChevronPopupMenu.Images := MainMenu.Images;
8082 bw := GetWidthAllToolButton(MenuToolBar);
8083 if MenuToolBar.Width < bw then begin
8085 for i := 0 to MenuToolBar.ButtonCount - 1 do begin
8086 w := w + MenuToolBar.Buttons[i].Width;
8087 if MenuToolBar.Width <= w then begin
8088 Item := TMenuItem.Create(Self);
8089 Item.Caption := MenuToolBar.Buttons[i].MenuItem.Caption;
8090 //Item.Action := MenuToolBar.Buttons[i].MenuItem.Action;
8091 ChevronPopupMenu.Items.Add(Item);
8092 SetSubMenu(MenuToolbar.Buttons[i].MenuItem, Item);
8098 procedure TGikoForm.ToolBarChevronMenu(ToolBar: TToolBar);
8099 procedure SetSubMenu(PopupMenu: TPopupMenu; PopupItem: TMenuItem);
8104 if Assigned(PopupMenu.OnPopup) then
8105 PopupMenu.OnPopup(nil);
8106 for i := 0 to PopupMenu.Items.Count - 1 do begin
8108 if PopupMenu.Items[i] is TFavoriteMenuItem then begin
8109 Item := TFavoriteMenuItem.Create(Self);
8110 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(PopupMenu.Items[i]).Data;
8112 Item := TMenuItem.Create(Self);
8113 Item.Caption := PopupMenu.Items[i].Caption;
8114 Item.Action := PopupMenu.Items[i].Action;
8115 Item.ImageIndex := PopupMenu.Items[i].ImageIndex;
8116 Item.OnClick := PopupMenu.Items[i].OnClick;
8117 PopupItem.Add(Item);
8126 ChevronPopupMenu.Items.Clear;
8127 ChevronPopupMenu.Images := ToolBar.HotImages;
8128 bw := GetWidthAllToolButton(ToolBar);
8129 if ToolBar.Width < bw then begin
8131 for i := 0 to ToolBar.ButtonCount - 1 do begin
8132 w := w + ToolBar.Buttons[i].Width;
8133 if ToolBar.Width <= w then begin
8134 Case ToolBar.Buttons[i].Tag of
8137 Item := TMenuItem.Create(Self);
8138 if ToolBar.Buttons[i].Style = tbsSeparator then
8141 Item.Caption := ToolBar.Buttons[i].Caption;
8142 Item.Action := ToolBar.Buttons[i].Action;
8143 //Item.Visible := True;
8145 ChevronPopupMenu.Items.Add(Item);
8146 if ToolBar.Buttons[i].DropdownMenu <> nil then begin
8148 Item.OnClick := nil;
8149 SetSubMenu(ToolBar.Buttons[i].DropdownMenu, Item);
8153 //
\8f«
\97\88\82Ì
\82½
\82ß
\82Ì
\97\
\96ñ
8160 procedure TGikoForm.LinkBarChevronMenu;
8165 Item: TFavoriteMenuItem;
8167 Button: TLinkToolButton;
8169 ChevronPopupMenu.Items.Clear;
8170 ChevronPopupMenu.Images := LinkToolBar.Images;
8171 bw := GetWidthAllToolButton(LinkToolBar);
8172 if LinkToolBar.Width < bw then begin
8174 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
8175 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
8176 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
8177 w := w + LinkToolBar.Buttons[j].Width;
8178 if LinkToolBar.Width <= w then begin
8179 if LinkToolBar.Buttons[j] is TLinkToolButton then begin
8180 Button := TLinkToolButton(LinkToolBar.Buttons[j]);
8181 Item := TFavoriteMenuItem.Create(Self);
8182 if TObject(Button.Data) is TFavoriteFolder then begin
8183 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], Item);
8184 end else if TObject(Button.Data) is TFavoriteBoardItem then begin
8185 Item.OnClick := FavoriteClick;
8186 end else if TObject(Button.Data) is TFavoriteThreadItem then begin
8187 Item.OnClick := FavoriteClick;
8189 Item.Data := Button.Data;
8190 Item.Caption := LinkToolBar.Buttons[j].Caption;
8191 Item.ImageIndex := LinkToolBar.Buttons[j].ImageIndex;
8192 ChevronPopupMenu.Items.Add(Item);
8203 \brief
\83o
\83\93\83h
\95\9d\82ð
\8dÄ
\8cv
\8eZ
\81E
\8dÄ
\90Ý
\92è
\82·
\82é
8204 \param bar
\83o
\83\93\83h
\82ª
\8f\8a\91®
\82·
\82é CoolBar
8205 \param band
\8dÄ
\8cv
\8eZ
\81E
\8dÄ
\90Ý
\92è
\82·
\82é
\83o
\83\93\83h
8207 \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É
8208 \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
8210 procedure TGikoForm.ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
8212 bandInfo : tagREBARBANDINFOA;
8213 pBandInfo : PReBarBandInfoA;
8220 pBandInfo := @bandInfo;
8221 ZeroMemory( pBandInfo, sizeof( bandInfo ) );
8222 bandInfo.cbSize := sizeof( bandInfo );
8223 bandInfo.hwndChild := h;
8224 bandInfo.cyMinChild := bar.Height;
8225 bar.OnBandInfo( nil, pBandInfo );
8226 // band
\82Ì
\83C
\83\93\83f
\83b
\83N
\83X
\82ð
\92T
\82·
8228 for i := bar.Bands.Count - 1 downto 0 do begin
8229 if bar.Bands[ i ].Control.Handle = h then begin
8235 lResult := SendMessage( bar.Handle, RB_SETBANDINFO, i, Integer( pBandInfo ) );
8239 procedure TGikoForm.ListCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8241 Control: TWinControl;
8244 Control := FindControl(BandInfo^.hwndChild);
8245 if Control = nil then
8248 for i := ListCoolBar.Bands.Count - 1 downto 0 do begin
8249 if ListCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8250 idx := ListCoolBar.Bands[ i ].ID;
8254 if Control = ListToolBar then begin
8255 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8256 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8257 BandInfo^.cxMinChild := 0;
8258 BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
8259 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8261 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8262 BandInfo^.cxMinChild := 0;
8263 BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
8267 procedure TGikoForm.ListCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8272 ChevronPopupMenu.Items.Clear;
8273 Idx := RebarChevron^.uBand;
8274 if (Idx >= 0) and (ListCoolBar.Bands.Count > Idx) then begin
8275 if ListCoolBar.Bands[Idx].Control = ListToolBar then begin
8276 ToolBarChevronMenu(ListToolBar);
8279 p := ListCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8280 ChevronPopupMenu.Popup(p.x, p.y);
8284 procedure TGikoForm.BrowserCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8286 Control: TWinControl;
8289 Control := FindControl(BandInfo^.hwndChild);
8290 if Control = nil then
8293 for i := BrowserCoolBar.Bands.Count - 1 downto 0 do begin
8294 if BrowserCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8295 idx := BrowserCoolBar.Bands[ i ].ID;
8299 if Control = BrowserToolBar then begin
8300 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8301 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8302 BandInfo^.cxMinChild := 0;
8303 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
8304 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8306 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8307 BandInfo^.cxMinChild := 0;
8308 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
8312 procedure TGikoForm.BrowserCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8317 ChevronPopupMenu.Items.Clear;
8318 Idx := RebarChevron^.uBand;
8319 if (Idx >= 0) and (BrowserCoolBar.Bands.Count > Idx) then begin
8320 if BrowserCoolBar.Bands[Idx].Control = BrowserToolBar then
8321 ToolBarChevronMenu(BrowserToolBar)
8324 p := BrowserCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8325 ChevronPopupMenu.Popup(p.x, p.y);
8329 procedure TGikoForm.ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
8331 if Column^.iImage = -1 then begin
8332 Column^.mask := Column^.mask or LVCF_FMT;
8334 Column^.mask := Column^.mask or LVCF_FMT or LVCF_IMAGE;
8335 Column^.fmt := Column^.fmt or LVCFMT_IMAGE or LVCFMT_BITMAP_ON_RIGHT;
8339 procedure TGikoForm.ThreadEditorActionExecute(Sender: TObject);
8341 Editor: TEditorForm;
8343 if not (GetActiveList is TBoard) then
8345 Editor := TEditorForm.Create(Self);
8346 Editor.SetBoard(TBoard(GetActiveList));
8348 Editor.BodyEdit.SetFocus;
8351 procedure TGikoForm.ToolBarSettingActionExecute(Sender: TObject);
8353 Dlg: TToolBarSettingDialog;
8355 //Component: TComponent;
8357 Dlg := TToolBarSettingDialog.Create(Self, ActionList);
8359 Dlg.AddToolBar(StdToolBar, gttStandard);
8360 Dlg.AddToolBar(ListToolBar, gttList);
8361 Dlg.AddToolBar(BrowserToolBar, gttBrowser);
8362 case FToolBarSettingSender of
8363 tssMain: Dlg.ToolBarIndex := 0;
8364 tssList: Dlg.ToolBarIndex := 1;
8365 tssBrowser: Dlg.ToolBarIndex := 2;
8368 if ToolBarSettingAction.ActionComponent.GetParentComponent is TPopupMenu then begin
8369 Component := TPopupMenu( ToolBarSettingAction.ActionComponent.GetParentComponent ).PopupComponent;
8371 if Component = MainCoolBar then
8372 Dlg.ToolBarComboBox.ItemIndex := 0
8373 else if Component = ListCoolBar then
8374 Dlg.ToolBarComboBox.ItemIndex := 1
8375 else if Component = BrowserCoolBar then
8376 Dlg.ToolBarComboBox.ItemIndex := 2;
8379 if Dlg.ShowModal = mrOK then begin
8382 //
\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é
8383 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
8384 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth + 1;
8385 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth - 1;
8387 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
8388 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth + 1;
8389 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth - 1;
8391 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
8392 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth + 1;
8393 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth - 1;
8395 SaveToolBarSetting(StdToolBar);
8396 SaveToolBarSetting(ListToolBar);
8397 for i := ListToolBar.ControlCount - 1 downto 0 do
8399 if ListToolBar.Controls[ i ].Action = SelectItemAction then
8401 //
\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·
8402 if (i + 1) < ListToolBar.ControlCount then
8403 if ListToolBar.Controls[ i + 1 ] is TToolButton then
8404 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
8405 ListToolBar.Controls[ i + 1 ].Visible := False;
8407 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
8408 ListToolBar.Controls[ i ].Visible := False;
8409 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
8410 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
8411 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
8412 SelectComboBox.Parent := ListToolBar;
8413 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
8414 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
8415 SelectComboBoxSplitter.Parent := ListToolBar;
8420 SaveToolBarSetting(BrowserToolBar);
8424 FToolBarSettingSender := tssNone;
8428 function TGikoForm.FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
8433 for i := bar.ButtonCount - 1 downto 0 do begin
8434 if bar.Buttons[ i ].Action = action then begin
8435 Result := bar.Buttons[ i ];
8444 procedure TGikoForm.SetToolBarPopup;
8447 aIEButton : TToolButton;
8448 aCabinetBBSButton : TToolButton;
8450 for i := 0 to StdToolBar.ButtonCount - 1 do begin
8452 for i := 0 to ListToolBar.ButtonCount - 1 do begin
8453 if ListToolBar.Buttons[i].Action = IconStyle then
8454 ListToolBar.Buttons[i].DropdownMenu := ListIconPopupMenu;
8455 if ListToolBar.Buttons[i].Action = SelectReservAction then
8456 ListToolBar.Buttons[i].DropdownMenu := RoundNamePopupMenu;
8458 aIEButton := FindToolBarButton( BrowserToolBar, IEAction );
8459 if aIEButton <> nil then
8460 aIEButton.DropdownMenu := BrowserPopupMenu;
8461 aCabinetBBSButton := FindToolBarButton( StdToolBar, CabinetBBSAction );
8462 if aCabinetBBSButton <> nil then
8463 aCabinetBBSButton.DropdownMenu := BBSSelectPopupMenu;
8466 procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState;
8467 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
8476 Wnd := WindowFromPoint(MousePos);
8478 if WheelDelta > 0 then
8483 if (Wnd = BrowserTab.Handle) or
8484 (Wnd = BrowserTab.Parent.Handle) then begin
8485 BrowserTab.ScrollTabs(Delta);
8486 end else if Wnd = ListView.Handle then begin
8487 if ListView.ViewStyle = vsList then
8488 ListView.Scroll( Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE, 0 )
8490 ListView.Scroll( 0, Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE );
8497 procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
8499 if Length( SelectComboBox.Text ) = 0 then
8501 AllItemAction.Checked := True;
8502 LogItemAction.Checked := False;
8503 NewItemAction.Checked := False;
8505 //
\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é
8506 if AllItemAction.Checked then
8507 AllItemAction.Checked := False;
8508 if LogItemAction.Checked then
8509 LogItemAction.Checked := False;
8510 if NewItemAction.Checked then
8511 NewItemaction.Checked := False;
8514 if Length( SelectComboBox.Text ) = 0 then
8515 SetListViewType( gvtAll )
8517 SetListViewType( gvtUser, SelectComboBox.Text, false);
8520 procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
8521 Shift: TShiftState);
8524 if Key = VK_Return then
8527 end else if Length( SelectComboBox.Text ) = 0 then
8529 AllItemAction.Checked := True;
8530 LogItemAction.Checked := False;
8531 NewItemAction.Checked := False;
8533 //
\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é
8534 if AllItemAction.Checked then
8535 AllItemAction.Checked := False;
8536 if LogItemAction.Checked then
8537 LogItemAction.Checked := False;
8538 if NewItemAction.Checked then
8539 NewItemaction.Checked := False;
8544 procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
8549 if Length( SelectComboBox.Text ) = 0 then
8551 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
8552 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
8557 //
\8di
\82è
\8d\9e\82Ý
\8c\9f\8dõ
\82Ì
\97\9a\97ð
\8dX
\90V
8558 procedure TGikoForm.ModifySelectList;
8565 if SelectComboBox.Parent = nil then
8568 if Length( SelectComboBox.Text ) > 0 then
8570 oldText := SelectComboBox.Text;
8571 idx := GikoSys.Setting.SelectTextList.IndexOf( oldText );
8573 GikoSys.Setting.SelectTextList.Delete( idx );
8574 idx := SelectComboBox.Items.IndexOf( oldText );
8576 SelectComboBox.Items.Delete( idx );
8577 GikoSys.Setting.SelectTextList.Insert( 0, oldText );
8578 SelectComboBox.Items.Insert( 0, oldText );
8579 SelectComboBox.Text := oldText;
8586 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\95Ò
\8fW
\82·
\82é
\82½
\82ß
\82É
\8aJ
\82
8587 procedure TGikoForm.NG1Click(Sender: TObject);
8589 GikoSys.FAbon.EditNGwords;
8591 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\8dÄ
\93Ç
\82Ý
\8d\9e\82Ý
\82·
\82é
8592 procedure TGikoForm.SelectResActionExecute(Sender: TObject);
8594 Dlg: TListSelectDialog;
8595 ThreadItem : TThreadItem;
8596 FilterList : TStringList;
8599 Dlg := TListSelectDialog.Create(Self);
8601 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
8602 Dlg.SelectComboBox.Text := FSelectResWord;
8604 if Dlg.ModalResult = mrOK then begin
8605 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
8606 //
\8bó
\93ü
\97Í
\82Å OK
\82Í
\91S
\83\8c\83X
\95\
\8e¦
\82Æ
\93¯
\88Ó
\8b`
8607 AllResAction.Execute;
8609 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
8610 AllResAction.Checked := False;
8611 SelectResAction.Checked := True;
8613 //
\8dÅ
\8cã
\82É
\90Ý
\92è
\82µ
\82½
\82à
\82Ì
\82ð
\8ao
\82¦
\82Ä
\82¨
\82
8614 FSelectResWord := Dlg.SelectComboBox.Text;
8616 //
\8c\9f\8dõ
\97\9a\97ð
\82Ì
\8dX
\90V
8617 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
8619 GikoSys.Setting.SelectTextList.Delete(idx);
8620 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
8621 while Dlg.SelectComboBox.Items.Count > 100 do begin
8622 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
8626 if SelectComboBox.Parent <> nil then
8627 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
8631 //
\83t
\83B
\83\8b\83^
\82Ì
\90Ý
\92è
8632 FilterList := TStringList.Create;
8634 GikoSys.FSelectResFilter.Reverse := True;
8635 FilterList.Delimiter := ' '; //
\8bæ
\90Ø
\82è
\8eq
\82ð
\94¼
\8ap
\83X
\83y
\81[
\83X
\82É
\90Ý
\92è
8636 FilterList.DelimitedText := Dlg.SelectComboBox.Text;
8638 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8643 //
\83X
\83\8c\83b
\83h
\82Ì
\8dÄ
\95`
\89æ
8644 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
8645 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8647 ThreadItem := GetActiveContent;
8648 if ThreadItem <> nil then
8649 InsertBrowserTab( ThreadItem, True );
8651 end else if Length( FSelectResWord ) > 0 then begin
8652 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
8653 AllResAction.Checked := False;
8654 SelectResAction.Checked := True;
8662 procedure TGikoForm.SelectResActionUpdate(Sender: TObject);
8664 SelectResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
8667 procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;
8668 Shift: TShiftState);
8672 //
\91S
\82Ä
\82Ì
\83\8c\83X
\82ð
\95\
\8e¦
8673 procedure TGikoForm.AllResActionExecute(Sender: TObject);
8675 ThreadItem : TThreadItem;
8676 FilterList : TStringList;
8679 if(FActiveContent <> nil) and (FActiveContent.FBrowser <> nil )
8680 and (FActiveContent.FBrowser.Busy) then Exit;
8682 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
8683 AllResAction.Checked := True;
8684 SelectResAction.Checked := False;
8686 if Length( FSelectResWord ) > 0 then begin
8687 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
8688 FilterList := TStringList.Create;
8690 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8691 GikoSys.FSelectResFilter.Reverse := False;
8696 FSelectResWord := '';
8698 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
8699 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
8700 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8702 ThreadItem := GetActiveContent;
8703 if ThreadItem <> nil then
8704 InsertBrowserTab( ThreadItem, True );
8708 procedure TGikoForm.AllResActionUpdate(Sender: TObject);
8710 AllResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
8713 procedure TGikoForm.ReloadClick(Sender: TObject);
8715 ThreadItem : TThreadItem;
8718 if GikoSys.FAbon.ReLoadFromNGwordFile =false then begin
8719 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);
8721 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8722 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8724 ThreadItem := GetActiveContent;
8725 if ThreadItem <> nil then
8726 InsertBrowserTab( ThreadItem, True );
8731 procedure TGikoForm.GoBackClick(Sender: TObject);
8733 ThreadItem : TThreadItem;
8737 if GikoSys.FAbon.GoForward =false then begin
8738 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);
8740 s := GikoSys.FAbon.NGwordname;
8741 StatusBar.Panels.Items[2].Text := s;
8742 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8743 StatusBarResize(Sender);
8744 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8745 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8747 ThreadItem := GetActiveContent;
8748 if ThreadItem <> nil then
8749 InsertBrowserTab( ThreadItem, True );
8754 procedure TGikoForm.GoFowardClick(Sender: TObject);
8756 ThreadItem : TThreadItem;
8760 if GikoSys.FAbon.GoBack =false then begin
8761 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);
8763 s := GikoSys.FAbon.NGwordname;
8764 StatusBar.Panels.Items[2].Text := s;
8765 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8766 StatusBarResize(Sender);
8767 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8768 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8770 ThreadItem := GetActiveContent;
8771 if ThreadItem <> nil then
8772 InsertBrowserTab( ThreadItem, True );
8777 procedure TGikoForm.SelectComboBoxSplitterMouseMove(Sender: TObject;
8778 Shift: TShiftState; X, Y: Integer);
8783 If (SelectComboBox.Parent <> nil) and (IsDraggingSelectComboBox) Then begin
8786 pos := SelectComboBoxSplitter.ClientToScreen( pos );
8787 w := SelectComboBox.Width + (pos.X - DraggingSelectComboBoxPosition.X);
8789 If w <= 50 Then Begin
8790 //
\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
8791 //
\81u
\8e~
\82Ü
\82Á
\82½(50pixel)
\88Ê
\92u
\81v
\82É
\82È
\82é
\82æ
\82¤
\82É
8792 pos.X := pos.X + (50 - w);
8794 //
\8f¬
\82³
\82
\82È
\82è
\82·
\82¬
\82È
\82¢
\82æ
\82¤
\82É
8798 //
\83`
\83\89\82Â
\82«
\8cy
\8c¸
\82Ì
\88×
8799 If SelectComboBox.Width <> w Then Begin
8800 SelectComboBox.Width := w;
8801 GikoSys.Setting.SelectComboBoxWidth := w;
8802 DraggingSelectComboBoxPosition := pos;
8804 //
\83V
\83F
\83u
\83\8d\83\93\88Ê
\92u
\82ª
\95Ï
\82í
\82é
\82Ì
\82Å BandInfo
\82Ì
\8dÄ
\90Ý
\92è
8805 ResetBandInfo( ListCoolBar, ListToolBar );
8810 procedure TGikoForm.SelectComboBoxSplitterMouseDown(Sender: TObject;
8811 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8815 IsDraggingSelectComboBox := True;
8818 DraggingSelectComboBoxPosition := SelectComboBoxSplitter.ClientToScreen( pos );
8821 procedure TGikoForm.SelectComboBoxSplitterMouseUp(Sender: TObject;
8822 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8824 IsDraggingSelectComboBox := False;
8827 procedure TGikoForm.StatusBarResize(Sender: TObject);
8829 StatusBar.Panels[1].Width := StatusBar.Width -
8830 StatusBar.Panels[0].Width -
8831 StatusBar.Panels[2].Width;
8833 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\92Ê
\8fí
\81v
8834 procedure TGikoForm.IndividualAbon1Click(Sender: TObject);
8836 ThreadItem : TThreadItem;
8839 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,1);
8840 ThreadItem := GetActiveContent;
8841 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8842 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8844 if ThreadItem <> nil then
8845 InsertBrowserTab( ThreadItem, True );
8847 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\93§
\96¾
\81v
8848 procedure TGikoForm.IndividualAbon2Click(Sender: TObject);
8850 ThreadItem : TThreadItem;
8853 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,0);
8854 ThreadItem := GetActiveContent;
8855 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8856 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8857 if ThreadItem <> nil then
8858 InsertBrowserTab( ThreadItem, True );
8860 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c\81i
\81j
8861 procedure TGikoForm.AntiIndividualAbonClick(Sender: TObject);
8863 ThreadItem : TThreadItem;
8867 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
8868 GikoSys.FAbon.DeleteIndividualAbon(KokoPopupMenu.Tag);
8869 ThreadItem := GetActiveContent;
8870 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8871 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8872 if ThreadItem <> nil then
8873 InsertBrowserTab( ThreadItem, True );
8875 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
8876 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
8879 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c
8880 procedure TGikoForm.N42Click(Sender: TObject);
8882 IndividualForm :TIndividualAbonForm;
8883 ThreadItem : TThreadItem;
8887 IndividualForm := TIndividualAbonForm.Create(Self);
8889 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
8890 for i :=0 to GikoSys.FAbon.GetAbonResCount-1 do begin
8891 IndividualForm.ComboBox1.Items.Add(GikoSys.FAbon.GetAbonResString(i));
8893 if IndividualForm.ShowModal = mrOK then begin
8894 GikoSys.FAbon.DeleteIndividualAbon(IndividualForm.ResNumber);
8896 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8897 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8898 ThreadItem := GetActiveContent;
8899 if ThreadItem <> nil then
8900 InsertBrowserTab( ThreadItem, True );
8902 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
8903 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
8906 IndividualForm.Free;
8910 procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
8913 if (Length( SelectComboBox.Text ) = 0) or
8914 (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
8916 SelectComboBox.Text := '';
8917 SelectComboBox.Color := clWindow;
8922 procedure TGikoForm.N51Click(Sender: TObject);
8926 //
\94Â
\96¼
\8c\9f\8dõ
8927 procedure TGikoForm.TreeSelectSearchBoardNameExecute(Sender: TObject);
8931 CurItem : TTreeNode;
8934 if InputQuery('
\94Â
\96¼
\8c\9f\8dõ','
\94Â
\96¼
\82Ì
\93ü
\97Í',s) then begin
8937 if TreeView.Selected = nil then
8938 CurItem := TreeView.Items.GetFirstNode
8940 CurItem := TreeView.Selected.GetNext;
8941 if CurItem = nil then
8942 CurItem := TreeView.Items.GetFirstNode;
8944 while CurItem <> nil do begin
8945 if (CurItem.ImageIndex <> 2) and (VaguePos(s,CurItem.Text) <> 0) then begin
8948 CurItem := CurItem.GetNext;
8951 if CurItem = nil then begin
8952 msg := '
\90æ
\93ª
\82É
\96ß
\82è
\82Ü
\82·
\82©
\81H';
8953 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
8954 CurItem := TreeView.Items.GetFirstNode;
8958 TreeView.Select(CurItem);
8961 TreeView.Select(CurItem);
8963 msg := '
\8e\9f\82É
\8ds
\82«
\82Ü
\82·
\82©
\81H';
8964 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
8978 procedure TGikoForm.CabinetFavoriteActionExecute(Sender: TObject);
8984 if CabinetPanel.Visible then begin
8985 if FTreeType = gttFavorite then begin
8986 CabinetVisible( False );
8987 CabinetFavoriteAction.Checked := False;
8989 CabinetFavoriteAction.Checked := True;
8992 CabinetVisible( True );
8993 CabinetFavoriteAction.Checked := True;
8996 // BBS...BBS, History, Favorite
8997 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 1;
8999 b := CabinetSelectPopupMenu.Items.Count - 1;
9000 for i := 0 to b do begin
9001 item := CabinetSelectPopupMenu.Items[ i ];
9002 if item is TBBSMenuItem then begin
9003 item.Checked := False;
9004 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
9005 CabinetMenu.Items[ i ].Checked := False;
9009 //
\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Ö
9010 HistoryToolBar.Hide;
9011 FavoriteToolBar.Show;
9012 TreeView.Visible := False;
9013 FavoriteTreeView.Visible := True;
9015 CabinetSelectToolButton.Caption := '
\82¨
\8bC
\82É
\93ü
\82è';
9016 FTreeType := gttFavorite;
9018 //
\83\81\83j
\83\85\81[
\8by
\82Ñ
\83{
\83^
\83\93\82Ì
\83`
\83F
\83b
\83N
\82ð
\90Ý
\92è
9019 CabinetBBSAction.Checked := False;
9020 CabinetHistoryAction.Checked := False;
9022 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\83c
\83\8a\81[
\82ð
\93W
\8aJ
9023 FavoriteTreeView.Items.GetFirstNode.Expanded := True;
9027 procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
9030 if (SenderNode = nil) or (SourceNode = nil) or (SenderNode = SourceNode) then
9033 if TObject(SenderNode.Data) is TFavoriteFolder then
9034 SourceNode.MoveTo(SenderNode, naAddChild)
9036 SourceNode.MoveTo(SenderNode, naInsert);
9040 procedure TGikoForm.FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
9044 FavoBoardItem: TFavoriteBoardItem;
9045 FavoThreadItem: TFavoriteThreadItem;
9047 ThreadItem: TThreadItem;
9050 if (SenderNode = nil) or (Source = nil) then
9053 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
9054 FavNode := SenderNode.Parent
9056 FavNode := SenderNode;
9060 if Source is TBoard then begin
9061 Board := TBoard( Source );
9062 FavoBoardItem := TFavoriteBoardItem.CreateWithItem( Board );
9063 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, FavoBoardItem);
9064 Node.ImageIndex := 15;
9065 Node.SelectedIndex := 15;
9066 end else if Source is TFavoriteBoardItem then begin
9067 FavoBoardItem := TFavoriteBoardItem( Source );
9068 Board := FavoBoardItem.Item;
9069 if Board <> nil then
9070 if not Board.IsThreadDatRead then
9071 GikoSys.ReadSubjectFile(Board);
9072 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, Source);
9073 Node.ImageIndex := 15;
9074 Node.SelectedIndex := 15;
9075 end else if Source is TThreadItem then begin
9076 ThreadItem := TThreadItem( Source );
9077 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
9078 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
9079 Node.ImageIndex := 16;
9080 Node.SelectedIndex := 16;
9081 end else if Source is TBrowserRecord then begin
9082 ThreadItem := TBrowserRecord( Source ).FThread;
9083 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
9084 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
9085 Node.ImageIndex := 16;
9086 Node.SelectedIndex := 16;
9087 end else if Source is TFavoriteThreadItem then begin
9088 FavoThreadItem := TFavoriteThreadItem( Source );
9089 ThreadItem := FavoThreadItem.Item;
9090 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, Source);
9091 Node.ImageIndex := 16;
9092 Node.SelectedIndex := 16;
9095 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
9097 FavoriteMoveTo( SenderNode, Node );
9101 procedure TGikoForm.FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
9104 SourceNode: TTreeNode;
9105 LinkToolButton: TLinkToolButton;
9108 if SenderNode = nil then
9111 if not (TObject( SenderNode.Data ) is TFavoriteFolder) then
9112 if FDropSpaceNode <> nil then
9113 SenderNode := FDropSpaceNode;
9115 if Source = FavoriteTreeView then begin
9117 SourceNode := FavoriteTreeView.Selected;
9118 FavoriteMoveTo( SenderNode, SourceNode );
9120 end else if Source is TLinkToolButton then begin
9122 LinkToolButton := TLinkToolButton( Source );
9123 //ShowMessage(LinkToolButton.Text);
9124 SourceNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data );
9125 FavoriteMoveTo( SenderNode, SourceNode );
9127 end else if Source = BrowserTab then begin
9129 idx := BrowserTab.TabIndex;
9130 FavoriteAddTo( SenderNode, BrowserTab.Tabs.Objects[idx] );
9131 end else if Source = ListView then begin
9133 FavoriteAddTo( SenderNode, ListView.Selected.Data );
9135 end else if Source = TreeView then begin
9137 FavoriteAddTo( SenderNode, TreeView.Selected.Data );
9145 procedure TGikoForm.FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
9148 SenderNode: TTreeNode;
9151 SenderNode := FavoriteTreeView.GetNodeAt(X, Y);
9152 if SenderNode <> nil then begin
9153 FavoriteDragDrop( SenderNode, Source );
9156 if FDropSpaceNode <> nil then begin
9157 FDropSpaceNode.Free;
9158 FDropSpaceNode := nil;
9163 procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
9164 Node: TTreeNode; var S: String);
9167 FavoriteTreeView.ReadOnly := True;
9172 procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
9173 Shift: TShiftState);
9179 FClickNode := FavoriteTreeView.Selected;
9180 FavoriteTreeViewRenameActionExecute( Sender );
9184 FClickNode := FavoriteTreeView.Selected;
9185 FavoriteTreeViewDeleteActionExecute( Sender );
9189 FavoriteClick( FavoriteTreeView.Selected );
9190 FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
9193 FavoriteTreeViewDblClick( Sender );
9198 procedure TGikoForm.FavoriteTreePopupMenuPopup(Sender: TObject);
9201 LinkToolButton: TLinkToolButton;
9204 if FavoriteTreePopupMenu.PopupComponent = FavoriteTreeView then begin
9206 FClickNode := FavoriteTreeView.Selected;
9208 end else if FavoriteTreePopupMenu.PopupComponent is TLinkToolButton then begin
9210 LinkToolButton := TLinkToolButton( FavoriteTreePopupMenu.PopupComponent );
9211 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
9212 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
9213 FClickNode := FavoriteTreeView.Items[i];
9217 for i := 0 to FClickNode.Count - 1 do begin
9218 if FClickNode.Item[i].Data = LinkToolButton.Data then begin
9219 FClickNode := FClickNode.Item[i];
9226 if FClickNode = nil then begin
9227 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9228 FavoriteTreeDeletePopupMenu.Visible := False;
9229 FavoriteTreeRenamePopupMenu.Visible := False;
9230 FavoriteTreeNewFolderPopupMenu.Visible := False;
9231 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9232 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9233 FavoriteTreeURLCopyPopupMenu.Visible := False;
9234 FavoriteTreeNameCopyPopupMenu.Visible := False;
9235 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9236 FavoriteTreeReloadPopupMenu.Visible := False;
9237 FavoriteTreeLogDeletePopupMenu.Visible := False;
9238 end else if FClickNode.IsFirstNode then begin
9239 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9240 FavoriteTreeDeletePopupMenu.Visible := False;
9241 FavoriteTreeRenamePopupMenu.Visible := False;
9242 FavoriteTreeNewFolderPopupMenu.Visible := True;
9243 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9244 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9245 FavoriteTreeURLCopyPopupMenu.Visible := False;
9246 FavoriteTreeNameCopyPopupMenu.Visible := True;
9247 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9248 FavoriteTreeReloadPopupMenu.Visible := False;
9249 FavoriteTreeLogDeletePopupMenu.Visible := False;
9250 end else if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
9251 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9252 FavoriteTreeDeletePopupMenu.Visible := True;
9253 FavoriteTreeRenamePopupMenu.Visible := False;
9254 FavoriteTreeNewFolderPopupMenu.Visible := True;
9255 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9256 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9257 FavoriteTreeURLCopyPopupMenu.Visible := False;
9258 FavoriteTreeNameCopyPopupMenu.Visible := True;
9259 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9260 FavoriteTreeReloadPopupMenu.Visible := False;
9261 FavoriteTreeLogDeletePopupMenu.Visible := False;
9262 end else if TObject(FClickNode.Data) is TFavoriteFolder then begin
9263 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9264 FavoriteTreeDeletePopupMenu.Visible := True;
9265 FavoriteTreeRenamePopupMenu.Visible := True;
9266 FavoriteTreeNewFolderPopupMenu.Visible := True;
9267 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9268 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9269 FavoriteTreeURLCopyPopupMenu.Visible := False;
9270 FavoriteTreeNameCopyPopupMenu.Visible := True;
9271 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9272 FavoriteTreeReloadPopupMenu.Visible := False;
9273 FavoriteTreeLogDeletePopupMenu.Visible := False;
9274 end else if TObject(FClickNode.Data) is TFavoriteThreadItem then begin
9275 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9276 FavoriteTreeDeletePopupMenu.Visible := True;
9277 FavoriteTreeRenamePopupMenu.Visible := True;
9278 FavoriteTreeNewFolderPopupMenu.Visible := True;
9279 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
9280 //FavoriteTreeBrowseThreadPopupMenu.Visible := True;
9281 FavoriteTreeURLCopyPopupMenu.Visible := True;
9282 FavoriteTreeNameCopyPopupMenu.Visible := True;
9283 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
9284 FavoriteTreeReloadPopupMenu.Visible := True;
9285 FavoriteTreeLogDeletePopupMenu.Visible := True;
9286 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
9287 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9288 FavoriteTreeDeletePopupMenu.Visible := True;
9289 FavoriteTreeRenamePopupMenu.Visible := True;
9290 FavoriteTreeNewFolderPopupMenu.Visible := True;
9291 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
9292 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9293 FavoriteTreeURLCopyPopupMenu.Visible := True;
9294 FavoriteTreeNameCopyPopupMenu.Visible := True;
9295 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
9296 FavoriteTreeReloadPopupMenu.Visible := True;
9297 FavoriteTreeLogDeletePopupMenu.Visible := False;
9299 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9300 FavoriteTreeDeletePopupMenu.Visible := False;
9301 FavoriteTreeRenamePopupMenu.Visible := False;
9302 FavoriteTreeNewFolderPopupMenu.Visible := False;
9303 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9304 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9305 FavoriteTreeURLCopyPopupMenu.Visible := False;
9306 FavoriteTreeNameCopyPopupMenu.Visible := False;
9307 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9308 FavoriteTreeReloadPopupMenu.Visible := False;
9309 FavoriteTreeLogDeletePopupMenu.Visible := False;
9314 procedure TGikoForm.FavoriteTreeViewDeleteActionExecute(Sender: TObject);
9316 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';
9317 DEL_MSG = '
\81g^0
\81h
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
9318 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
9321 if FClickNode = nil then
9323 if FClickNode.IsFirstNode then
9325 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
9326 if MsgBox(Handle, DEL_LINK_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION) <> ID_YES then
9328 end else if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
9329 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONQUESTION) <> ID_YES then
9333 //FDeleteList.Add(FClickNode.Data);
9334 //SetDeleteItemList(FClickNode);
9342 procedure TGikoForm.FavoriteTreeViewRenameActionExecute(Sender: TObject);
9347 if FClickNode = nil then
9349 if FClickNode.IsFirstNode then
9351 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then
9353 FavoriteTreeView.ReadOnly := False;
9354 if (FTreeType = gttFavorite) and (CabinetPanel.Visible) then begin
9355 node := FClickNode.Parent;
9356 while node <> nil do begin
9357 node.Expanded := True;
9358 node := node.Parent;
9360 FClickNode.EditText;
9362 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 );
9369 procedure TGikoForm.FavoriteTreeViewNewFolderActionExecute(
9372 NewFavFolder: TFavoriteFolder;
9376 if FClickNode = nil then
9380 if not (TObject(FClickNode.Data) is TFavoriteFolder) then begin
9381 FavoriteTreeView.Selected := FClickNode.Parent;
9382 FClickNode := FClickNode.Parent;
9385 NewFavFolder := TFavoriteFolder.Create;
9386 Node := FavoriteTreeView.Items.AddChildObject(FClickNode, '
\90V
\82µ
\82¢
\83t
\83H
\83\8b\83_', NewFavFolder);
9387 Node.ImageIndex := 14;
9388 Node.SelectedIndex := 14;
9389 // FClickNode.Selected.Expanded := True;
9390 FavoriteTreeView.Selected := Node;
9392 FavoriteTreeViewRenameAction.Execute;
9398 procedure TGikoForm.ToolButton19Click(Sender: TObject);
9401 FavoriteArrangeActionExecute( nil );
9405 procedure TGikoForm.FavoriteBrowseFolder( node: TTreeNode );
9410 if not (TObject(node.Data) is TFavoriteFolder) then
9413 for i := 0 to node.Count - 1 do
9415 if TObject(node.Item[i].Data) is TFavoriteFolder then
9416 FavoriteBrowseFolder( node.Item[i] )
9417 else if TObject(node.Item[i].Data) is TFavoriteThreadItem then
9418 FavoriteClick( node.Item[i], False );
9423 procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
9427 FavoriteBrowseFolder( FClickNode );
9428 //BrowserTab.OnChange(nil);
9432 procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
9435 FClickNode := FavoriteTreeView.Selected;
9436 FavoriteTreeViewReloadActionExecute( Sender );
9440 procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
9443 DEL_MSG = '
\83\8d\83O
\83t
\83@
\83C
\83\8b\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
9444 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
9446 ThreadItem: TThreadItem;
9447 FavThread: TFavoriteThreadItem;
9450 if FClickNode = nil then Exit;
9451 if not (TObject(FClickNode.Data) is TFavoriteThreadItem) then Exit;
9453 FavThread := TFavoriteThreadItem( FClickNode.Data );
9454 ThreadItem := FavThread.Item;
9457 if GikoSys.Setting.DeleteMsg then begin
9458 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
9462 DeleteHistory(ThreadItem);
9463 DeleteTab(ThreadItem);
9464 ThreadItem.DeleteLogFile;
9472 procedure TGikoForm.FavoriteTreeViewReloadActionExecute(Sender: TObject);
9474 ThreadItem: TThreadItem;
9475 FavThread: TFavoriteThreadItem;
9477 FavBoard: TFavoriteBoardItem;
9481 if FClickNode = nil then Exit;
9483 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
9485 if TObject( FClickNode.Data ) is TFavoriteThreadItem then begin
9486 FavThread := TFavoriteThreadItem( FClickNode.Data );
9487 ThreadItem := FavThread.Item;
9488 if ThreadItem <> nil then
9489 DownloadContent(ThreadItem, shiftDown);
9490 end else if TObject( FClickNode.Data ) is TFavoriteBoardItem then begin
9491 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9492 Board := FavBoard.Item;
9493 DownloadList(Board, shiftDown);
9498 procedure TGikoForm.FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
9500 FavThread : TFavoriteThreadItem;
9501 FavBoard : TFavoriteBoardItem;
9505 if FClickNode = nil then Exit;
9507 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9509 FavThread := TFavoriteThreadItem( FClickNode.Data );
9510 s := FavThread.URL + #13#10;
9512 Clipboard.AsText := s;
9514 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9516 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9517 s := FavBoard.URL + #13#10;
9519 Clipboard.AsText := s;
9525 procedure TGikoForm.FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
9527 ThreadItem: TThreadItem;
9528 FavThread: TFavoriteThreadItem;
9530 FavBoard: TFavoriteBoardItem;
9534 if FClickNode = nil then Exit;
9536 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9538 FavThread := TFavoriteThreadItem( FClickNode.Data );
9539 ThreadItem := FavThread.Item;
9542 s := ThreadItem.Title + #13#10;
9544 Clipboard.AsText := s;
9548 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9550 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9551 Board := FavBoard.Item;
9552 if Board <> nil then
9553 if not Board.IsThreadDatRead then
9554 GikoSys.ReadSubjectFile(Board);
9557 s := Board.Title + #13#10;
9559 Clipboard.AsText := s;
9567 procedure TGikoForm.FavoriteTreeViewNameURLCopyActionExecute(
9570 ThreadItem: TThreadItem;
9571 FavThread: TFavoriteThreadItem;
9573 FavBoard: TFavoriteBoardItem;
9577 if FClickNode = nil then Exit;
9579 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9581 FavThread := TFavoriteThreadItem( FClickNode.Data );
9582 ThreadItem := FavThread.Item;
9585 s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10;
9587 Clipboard.AsText := s;
9591 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9593 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9594 Board := FavBoard.Item;
9595 if Board <> nil then
9596 if not Board.IsThreadDatRead then
9597 GikoSys.ReadSubjectFile(Board);
9600 s := Board.URL + #13#10 + Board.Title + #13#10;
9602 Clipboard.AsText := s;
9610 function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
9616 for i := 0 to Node.Count - 1 do begin
9617 if Node.Item[i].Data = FindPointer then begin
9618 Result := Node.Item[i];
9620 end else if Node.Item[i].Count > 0 then begin
9621 Found := TreeNodeDataFind( Node.Item[i], FindPointer );
9622 if Found <> nil then begin
9633 procedure TGikoForm.LinkToolBarDragDrop(Sender, Source: TObject; X,
9637 SenderNode: TTreeNode;
9641 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
9642 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
9643 SenderNode := FavoriteTreeView.Items[i];
9648 FavoriteDragDrop( SenderNode, Source );
9652 procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
9653 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
9655 if FDragWFirst <> true then begin
9656 FDragWFirst := false;
9657 end else if (X = FMouseDownPos.X) and (Y = FMouseDownPos.Y) then begin
9658 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
9659 if GikoSys.Setting.ListWidthState = glsMin then begin
9660 BrowserMaxAndFocusAction.Execute;
9663 if GikoSys.Setting.ListHeightState = glsMin then begin
9664 BrowserMaxAndFocusAction.Execute;
9670 procedure TGikoForm.LinkToolBarDragOver(Sender, Source: TObject; X,
9671 Y: Integer; State: TDragState; var Accept: Boolean);
9674 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
9678 procedure TGikoForm.OnlyAHundredResExecute(Sender: TObject);
9680 if (FActiveContent <> nil) and (FActiveContent.FBrowser.Busy) then begin
9681 AHundredResButton.Down := not AHundredResButton.Down;
9684 GikoSys.OnlyAHundredRes := OnlyAHundredRes.Checked;
9685 if FActiveContent <> nil then begin
9686 SetContent(FActiveContent);
9690 procedure TGikoForm.FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
9694 if FDropSpaceNode <> nil then begin
9695 FDropSpaceNode.Free;
9696 FDropSpaceNode := nil;
9702 procedure TGikoForm.ListCoolBarContextPopup(Sender: TObject;
9703 MousePos: TPoint; var Handled: Boolean);
9706 FToolBarSettingSender := tssList;
9707 MousePos := ListCoolBar.ClientToScreen( MousePos );
9708 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9712 procedure TGikoForm.MainCoolBarContextPopup(Sender: TObject;
9713 MousePos: TPoint; var Handled: Boolean);
9716 FToolBarSettingSender := tssMain;
9717 MousePos := MainCoolBar.ClientToScreen( MousePos );
9718 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9722 procedure TGikoForm.BrowserCoolBarContextPopup(Sender: TObject;
9723 MousePos: TPoint; var Handled: Boolean);
9726 FToolBarSettingSender := tssBrowser;
9727 MousePos := BrowserCoolBar.ClientToScreen( MousePos );
9728 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9731 procedure TGikoForm.ExportFavoriteFileAccept(Sender: TObject);
9734 if FavoriteDM.SaveFavoriteFile( ExportFavoriteFile.Dialog.FileName ) Then begin
9735 ShowMessage('
\83t
\83@
\83C
\83\8b\82ð
\8fo
\97Í
\82µ
\82Ü
\82µ
\82½');
9737 ShowMessage('
\83t
\83@
\83C
\83\8b\82Ì
\8fo
\97Í
\82É
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½');
9740 procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
9742 if FListViewBackGroundColor <> value then begin
9743 FListViewBackGroundColor := value;
9744 ListView.Color := FListViewBackGroundColor;
9747 procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
9749 ExportFavoriteFile.Dialog.FileName := FavoriteDM.GetFavoriteFilePath;
9752 procedure TGikoForm.CabinetBBSActionExecute(Sender: TObject);
9755 if CabinetPanel.Visible then begin
9756 if FTreeType = gtt2ch then begin
9757 CabinetVisible( False );
9759 CabinetBBSAction.Checked := False;
9761 CabinetBBSAction.Checked := True;
9764 CabinetVisible( True );
9765 CabinetBBSAction.Checked := True;
9768 if FActiveBBS = nil then
9769 ShowBBSTree( BBSs[ 0 ] )
9771 ShowBBSTree( FActiveBBS );
9775 procedure TGikoForm.FavoriteTreeViewBrowseThreadActionExecute(
9778 threadItem : TThreadItem;
9781 if FClickNode = nil then Exit;
9783 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9785 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9786 if threadItem = nil then
9788 GikoSys.OpenBrowser( threadItem.URL, gbtAuto );
9794 procedure TGikoForm.FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
9796 threadItem : TThreadItem;
9800 if FClickNode = nil then Exit;
9802 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9804 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9805 if threadItem = nil then
9807 GikoSys.OpenBrowser( threadItem.ParentBoard.URL, gbtAuto );
9809 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9811 boardItem := TFavoriteBoardItem( FClickNode.Data ).Item;
9812 if boardItem = nil then
9814 GikoSys.OpenBrowser( boardItem.URL, gbtAuto );
9820 procedure TGikoForm.UpBoardActionExecute(Sender: TObject);
9823 SelectTreeNode( GetActiveContent.ParentBoard, True );
9827 procedure TGikoForm.UpBoardActionUpdate(Sender: TObject);
9830 UpBoardAction.Enabled := GetActiveContent <> nil;
9834 procedure TGikoForm.BrowserTabContextPopup(Sender: TObject;
9835 MousePos: TPoint; var Handled: Boolean);
9839 idx := BrowserTab.IndexOfTabAt(MousePos.X, MousePos.Y);
9840 if BrowserTab.TabIndex <> idx then begin
9841 BrowserTab.TabIndex := idx;
9842 BrowserTab.OnChange(nil);
9847 procedure TGikoForm.KoreCopyExecute(Sender: TObject);
9849 KonoresCopy(KokoPopupMenu.Tag, true);
9851 procedure TGikoForm.KonoresCopy(Number: Integer; ReplaceTag : Boolean);
9853 ThreadItem: TThreadItem;
9859 boardPlugIn : TBoardPlugIn;
9861 if Number = 0 then Exit;
9862 ThreadItem := GetActiveContent;
9864 if ThreadItem <> nil then begin
9865 if ThreadItem.IsBoardPlugInAvailable then begin
9866 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
9867 boardPlugIn := ThreadItem.BoardPlugIn;
9869 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
9870 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
9871 //
\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
9872 tmp := boardPlugIn.GetDat( DWORD( threadItem ), Number );
9874 FileName := ThreadItem.FilePath;
9875 tmp := GikoSys.ReadThreadFile(FileName, Number);
9877 if tmp <> '' then begin
9878 Res := GikoSys.DivideStrLine(tmp);
9880 Header := IntToStr(Number) + '
\81F' + Res.FName + '
\81F' + Res.FDateTime + #13#10;
9881 if ReplaceTag then begin
9882 Header := CustomStringReplace(Header, '</b>', '',true);
9883 Header := CustomStringReplace(Header, '<b>', '',true);
9885 if ThreadItem.IsBoardPlugInAvailable then begin
9886 Body := CustomStringReplace(Res.FBody, '<br>', #13#10,true);
9887 Body := CustomStringReplace(Body, '<br>', #13#10,true);
9889 Body := CustomStringReplace(Res.FBody, ' <br> ', #13#10,true);
9890 Body := CustomStringReplace(Body, ' <br>', #13#10,true);
9891 Body := CustomStringReplace(Body, '<br> ', #13#10,true);
9892 Body := CustomStringReplace(Body, '<br>', #13#10,true);
9895 Body := CustomStringReplace(Body, '</a>', '',true);
9897 Body := GikoSys.DeleteLink(Body);
9898 if ReplaceTag then begin
9899 Body := CustomStringReplace(Body, '<', '<');
9900 Body := CustomStringReplace(Body, '>', '>');
9901 Body := CustomStringReplace(Body, '"', '"');
9902 Body := CustomStringReplace(Body, '&', '&');
9903 //Body := CustomStringReplace(Body, ' ', ' ');
9906 Header := Header + Body;
9908 Clipboard.SetTextBuf( PChar(Header) );
9914 procedure TGikoForm.BrowserTabPopupMenuPopup(Sender: TObject);
9916 AddRoundNameMenu(dummy1);
9919 procedure TGikoForm.FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
9921 FavoriteDM.URLReplace(oldURLs, newURLs);
9924 procedure TGikoForm.RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
9926 RoundList.URLReplace(oldURLs, newURLs);
9929 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82é
9930 procedure TGikoForm.OnMinimize;
9932 FIsMinimize := mtMinimizing;
9933 if FActiveContent <> nil then
9934 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
9935 PostMessage( Handle, USER_MINIMIZED, 0, 0 );
9938 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82½
9939 procedure TGikoForm.OnMinimized;
9941 FIsMinimize := mtMinimized;
9942 FIsIgnoreResize := False;
9945 procedure TGikoForm.CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
9950 affectedBand : TCoolBand;
9953 if (FOldFormWidth = Width) and not IsIconic( Handle ) and not FIsIgnoreResize then begin
9954 FIsIgnoreResize := True;
9955 PostMessage( Handle, USER_RESIZED, 0, 0 );
9956 if not (Sender is TToolBar) or (CoolBar = nil) then
9958 toolbar := TToolBar( Sender );
9960 //
\95Ï
\8dX
\82³
\82ê
\82½
\83N
\81[
\83\8b\83o
\81[
\82Ì
\92l
\82ð
\95Û
\91¶
9961 if CoolBar = MainCoolBar then begin
9962 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
9963 CoolSet.FCoolID := CoolBar.Bands[i].ID;
9964 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
9965 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
9966 GikoSys.Setting.MainCoolSet[i] := CoolSet;
9968 end else if CoolBar = ListCoolBar then begin
9969 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
9970 CoolSet.FCoolID := CoolBar.Bands[i].ID;
9971 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
9972 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
9973 GikoSys.Setting.ListCoolSet[i] := CoolSet;
9975 end else if CoolBar = BrowserCoolBar then begin
9976 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
9977 CoolSet.FCoolID := CoolBar.Bands[i].ID;
9978 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
9979 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
9980 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
9983 //
\95\9d\82Ì
\95Ï
\8dX
\82³
\82ê
\82½
\83o
\83\93\83h
\82ð
\8c©
\82Â
\82¯
\82é
9984 affectedBand := nil;
9985 for i := CoolBar.Bands.Count - 1 downto 0 do begin
9986 if CoolBar.Bands[ i ].Control.Handle = toolbar.Handle then begin
9987 band := CoolBar.Bands[ i ];
9988 if band.Break or (i = 0) then begin
9989 if i + 1 < CoolBar.Bands.Count then
9990 if not CoolBar.Bands[ i + 1 ].Break then
9991 affectedBand := CoolBar.Bands[ i + 1 ];
9994 affectedBand := CoolBar.Bands[ i - 1 ];
9999 //
\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·
10000 if CoolBar = MainCoolBar then begin
10001 coolSet := GikoSys.Setting.MainCoolSet[ band.ID ];
10002 coolSet.FCoolWidth := toolbar.Width + 25;
10003 GikoSys.Setting.MainCoolSet[ band.ID ] := coolSet;
10004 if affectedBand <> nil then begin
10005 coolSet := GikoSys.Setting.MainCoolSet[ affectedBand.ID ];
10006 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
10007 GikoSys.Setting.MainCoolSet[ affectedBand.ID ] := coolSet;
10009 end else if CoolBar = ListCoolBar then begin
10010 coolSet := GikoSys.Setting.ListCoolSet[ band.ID ];
10011 coolSet.FCoolWidth := toolbar.Width + 25;
10012 GikoSys.Setting.ListCoolSet[ band.ID ] := coolSet;
10013 if affectedBand <> nil then begin
10014 coolSet := GikoSys.Setting.ListCoolSet[ affectedBand.ID ];
10015 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
10016 GikoSys.Setting.ListCoolSet[ affectedBand.ID ] := coolSet;
10018 end else if CoolBar = BrowserCoolBar then begin
10019 coolSet := GikoSYs.Setting.BrowserCoolSet[ band.ID ];
10020 coolSet.FCoolWidth := toolbar.Width + 25;
10021 GikoSys.Setting.BrowserCoolSet[ band.ID ] := coolSet;
10022 if affectedBand <> nil then begin
10023 coolSet := GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ];
10024 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
10025 GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ] := coolSet;
10031 procedure TGikoForm.MenuToolBarResize(Sender: TObject);
10033 CoolBarResized( Sender, MainCoolBar );
10036 procedure TGikoForm.StdToolBarResize(Sender: TObject);
10038 CoolBarResized( Sender, MainCoolBar );
10041 procedure TGikoForm.LinkToolBarResize(Sender: TObject);
10043 CoolBarResized( Sender, MainCoolBar );
10046 procedure TGikoForm.ListNameToolBarResize(Sender: TObject);
10048 CoolBarResized( Sender, ListCoolBar );
10051 procedure TGikoForm.ListToolBarResize(Sender: TObject);
10053 CoolBarResized( Sender, ListCoolBar );
10056 procedure TGikoForm.BrowserNameToolBarResize(Sender: TObject);
10058 CoolBarResized( Sender, BrowserCoolBar );
10061 procedure TGikoForm.BrowserToolBarResize(Sender: TObject);
10063 CoolBarResized( Sender, BrowserCoolBar );
10066 procedure TGikoForm.BrowserTabResize(Sender: TObject);
10068 CoolBarResized( Sender, BrowserCoolBar );
10071 // *************************************************************************
10072 // ExternalBoardPlugInMain
10073 //
\83v
\83\89\83O
\83C
\83\93\83\81\83j
\83\85\81[
\82Ì
\8d\80\96Ú
\82ª
\8eÀ
\8ds
\82³
\82ê
\82½
10074 // *************************************************************************
10075 procedure TGikoForm.OnPlugInMenuItem( Sender : TObject );
10078 boardPlugIn : TBoardPlugIn;
10081 if not (Sender is TMenuItem) then
10084 item := TMenuItem( Sender );
10085 if not Assigned( Pointer( item.Tag ) ) then
10088 //
\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·
10089 boardPlugIn := TBoardPlugIn( item.Tag );
10090 boardPlugIn.PlugInMenu( item.Handle );
10093 // TreeView
\82ª
\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
10094 procedure TGikoForm.TreeClick( Node : TTreeNode );
10102 if FTreeType = gttHistory then begin
10103 if Node <> nil then
10104 if TObject( Node.Data ) is TFavoriteThreadItem then
10105 if GetActiveContent <> TFavoriteThreadItem( Node.Data ).Item then
10106 FavoriteClick( Node );
10110 if GetActiveList is TBBS then begin
10111 for i := 0 to ListView.Columns.Count - 1 do
10112 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
10113 end else if GetActiveList is TCategory then begin
10114 for i := 0 to ListView.Columns.Count - 1 do
10115 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
10116 end else if GetActiveList is TBoard then begin
10117 for i := 0 to ListView.Columns.Count - 1 do
10118 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
10121 if TObject(Node.Data) is TBBS then begin
10122 SetActiveList(Node.data);
10123 end else if TObject(Node.Data) is TCategory then begin
10124 SetActiveList(Node.data);
10125 end else if TObject(Node.Data) is TBoard then begin
10126 if not TBoard(Node.Data).IsThreadDatRead then begin
10127 Screen.Cursor := crHourGlass;
10129 if not TBoard(Node.Data).IsThreadDatRead then
10130 GikoSys.ReadSubjectFile(Node.Data);
10132 Screen.Cursor := crDefault;
10135 SetActiveList(Node.data);
10138 if TObject( Node.Data ) is TBoard then begin // not TCategory
10139 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
10140 if GikoSys.Setting.ListWidthState = glsMax then begin
10141 BrowserMinAction.Execute;
10142 if GikoForm.Visible then
10146 if GikoSys.Setting.ListHeightState = glsMax then begin
10147 BrowserMinAction.Execute;
10148 if GikoForm.Visible then
10156 // TreeView
\82ª
\83_
\83u
\83\8b\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
10157 procedure TGikoForm.TreeDoubleClick( Node : TTreeNode );
10160 ThreadItem : TThreadItem;
10161 shiftDown : Boolean;
10164 if Node = nil then Exit;
10166 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
10168 if FTreeType = gtt2ch then begin
10169 if not (TObject(Node.Data) is TBoard) then Exit;
10170 Board := TBoard(Node.Data);
10171 DownloadList(Board, shiftDown);
10172 end else if FTreeType = gttHistory then begin
10173 if not (TObject(Node.Data) is TFavoriteThreadItem) then Exit;
10174 ThreadItem := TFavoriteThreadItem(Node.Data).Item;
10175 DownloadContent(ThreadItem, shiftDown);
10180 procedure TGikoForm.TreeViewClick(Sender: TObject);
10182 TreeClick( TreeView.Selected );
10185 procedure TGikoForm.TreeViewKeyDown(Sender: TObject; var Key: Word;
10186 Shift: TShiftState);
10188 if Key = VK_BACK then begin
10189 // UpFolderButtonClick(Sender);
10190 end else if Key = VK_SPACE then begin
10191 TreeDoubleClick( TreeView.Selected );
10192 end else if Key = VK_RETURN then begin
10193 TreeClick( TreeView.Selected );
10194 TreeView.Selected.Expanded := not TreeView.Selected.Expanded;
10198 //
\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ã
10199 //
\83C
\83x
\83\93\83g
\82ð
\8eæ
\82è
\88µ
\82Á
\82½
\8fê
\8d\87\82Í True
\82ð
\95Ô
\82·
10200 function TGikoForm.BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
10202 iOIPAO : IOleInPlaceActiveObject;
10203 Dispatch : IDispatch;
10206 if Key = VK_BACK then begin
10207 UpBoardAction.Execute;
10209 {end else if Key in [VK_ESCAPE..VK_HELP] then begin
10210 //
\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
10213 end else if(Key in [VK_SPACE..VK_HELP]) and
10214 not(ssCtrl in State) and not(ssAlt in State) and not (ssShift in State) then begin
10217 //
\82»
\82ê
\88È
\8aO
\82Ì
\83C
\83x
\83\93\83g
\82Í Browser
\82É
\97¬
\82·
10218 if(FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10219 Dispatch := FActiveContent.Browser.Application;
10220 if Dispatch <> nil then begin
10221 Dispatch.QueryInterface( IOleInPlaceActiveObject, iOIPAO );
10222 if iOIPAO <> nil then
10223 iOIPAO.TranslateAccelerator( Msg );
10226 //
\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¢
10232 //
\83M
\83R
\83i
\83r
\82Ì
\83\81\83b
\83Z
\81[
\83W
\83\8b\81[
\83v
\82ð
\89¡
\8eæ
\82è
\82µ
\82Ü
\82·
10233 procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
10238 case Msg.message of
10240 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10241 if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
10243 Handled := BrowserKeyDown( Msg, key, KeyDataToShiftState( Msg.lParam ) );
10248 case Msg.wParam shr 16 of
10251 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10252 if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
10253 UpBoardAction.Execute;
10257 if not Handled then begin
10258 if IsDialogMessage( ListView.Handle, Msg ) then begin
10259 UpFolderAction.Execute;
10269 procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject;
10270 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
10272 favItem : TTreeNode;
10273 favThreadItem : TFavoriteThreadItem;
10279 FMouseDownPos.X := X;
10280 FMouseDownPos.Y := Y;
10284 favItem := FavoriteTreeView.GetNodeAt( X, Y );
10285 if favItem = nil then Exit;
10287 if TObject( favItem.Data ) is TFavoriteThreadItem then begin
10288 favThreadItem := TFavoriteThreadItem( favItem.Data );
10289 if favThreadItem.Item <> nil then
10290 InsertBrowserTab( favThreadItem.Item, False );
10297 procedure TGikoForm.MessagePanelResize(Sender: TObject);
10300 if FIsIgnoreResize then
10303 if GikoSys.Setting.ListOrientation = gloVertical then begin
10304 if GikoSys.Setting.ListHeightState = glsMin then begin
10305 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
10306 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
10312 procedure TGikoForm.OnResized;
10315 FOldFormWidth := Width;
10316 FIsIgnoreResize := False;
10320 procedure TGikoForm.TreeSelectNameCopyExecute(Sender: TObject);
10324 TreeView.Selected := FClickNode;
10325 s := FClickNode.Text;
10326 Clipboard.AsText := s;
10329 procedure TGikoForm.FavoriteTreeViewMouseUp(Sender: TObject;
10330 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
10333 if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold) and
10334 (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
10335 FavoriteClick( TObject( FavoriteTreeView.Selected ) );
10340 destructor TBrowserRecord.Destroy;
10344 if Self.FEvent <> nil then
10346 if Self.FBrowser <> nil then begin
10347 if Self.Thread <> nil then begin
10348 doc := Idispatch( olevariant(Self.FBrowser.ControlInterface).Document) as IHTMLDocument2;
10349 Self.Thread.ScrollTop := doc.Body.ScrollTop;
10351 //TOleControl(Self.FBrowser).Visible := false;
10352 ShowWindow(Self.FBrowser.Handle, SW_HIDE);
10357 procedure TGikoForm.OnlyAHundredResUpdate(Sender: TObject);
10359 OnlyAHundredRes.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
10362 function TGikoForm.WebBrowserClick(Sender: TObject): WordBool;
10366 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then
10367 FActiveContent.FBrowser.SetFocus;
10372 procedure TGikoForm.SetFocusForBrowserActionExecute(Sender: TObject);
10374 FActiveContent.FBrowser.SetFocus;
10377 procedure TGikoForm.SetFocusForBrowserActionUpdate(Sender: TObject);
10379 if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
10380 (FActiveContent.Browser <> BrowserNullTab.Browser) then
10381 SetFocusForBrowserAction.Enabled := true
10383 SetFocusForBrowserAction.Enabled := false;
10386 procedure TGikoForm.SetFocusForThreadListActionExecute(Sender: TObject);
10390 if FActiveContent <> nil then
10391 WebBrowserClick(FActiveContent.Browser); //
\88ê
\89ñBrowser
\82É
\93\96\82Ä
\82È
\82¢
\82Æ
\93®
\82©
\82È
\82¢
\82Æ
\82«
\82ª
\82 \82é
10393 if( ListView.Items.Count > 0 ) and (ListView.ItemFocused = nil) then
10394 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é
10396 ListView.Scroll(-ListView.ClientWidth, -ListView.ClientHeight);
10397 rct := ListView.ItemFocused.DisplayRect(drBounds);
10398 ListView.Scroll(0, 2 * rct.Top - rct.Bottom);
10399 if ListView.ViewStyle <> vsReport then begin
10400 ListView.Scroll(rct.Left, 0);
10405 procedure TGikoForm.SetFocusForCabinetActionExecute(Sender: TObject);
10407 if FActiveContent <> nil then
10408 WebBrowserClick(FActiveContent.Browser); //
\88ê
\89ñBrowser
\82É
\93\96\82Ä
\82È
\82¢
\82Æ
\93®
\82©
\82È
\82¢
\82Æ
\82«
\82ª
\82 \82é
10409 if TreeView.Visible then begin
10411 if(TreeView.Items.Count > 0) and ( TreeView.Selected = nil ) then
10412 TreeView.Items.Item[0].Selected := true;
10413 end else if FavoriteTreeView.Visible then begin
10414 FavoriteTreeView.SetFocus;
10415 if(FavoriteTreeView.Items.Count > 0) and (FavoriteTreeView.Selected = nil) then
10416 FavoriteTreeView.Items.Item[0].Selected := true;
10419 procedure TGikoForm.SetFocusForCabinetActionUpdate(Sender: TObject);
10421 SetFocusForCabinetAction.Enabled := CabinetPanel.Visible;
10424 //
\83u
\83\89\83E
\83U
\82ð
\8dÅ
\91å
\89»
\82µ
\82Ä
\83t
\83H
\81[
\83J
\83X
\82ð
\93\96\82Ä
\82é
\81B
10425 procedure TGikoForm.BrowserMaxAndFocusActionExecute(Sender: TObject);
10427 BrowserMaxAction.Execute;
10428 SetFocusForBrowserAction.Execute;
10431 procedure TGikoForm.BrowserMaxAndFocusActionUpdate(Sender: TObject);
10433 if( FActiveContent <> nil) and (FActiveContent.Browser <> nil) and
10434 (FActiveContent.Browser <> BrowserNullTab.Browser) then
10435 BrowserMaxAndFocusAction.Enabled := true
10437 BrowserMaxAndFocusAction.Enabled := false;
10439 //
\83X
\83\8c\83b
\83h
\88ê
\97\97\82ð
\8dÅ
\91å
\89»
\82µ
\82Ä
\83t
\83H
\81[
\83J
\83X
\82ð
\93\96\82Ä
\82é
10440 procedure TGikoForm.ThreadlistMaxAndFocusActionExecute(Sender: TObject);
10442 BrowserMinAction.Execute;
10443 SetFocusForThreadListAction.Execute;
10446 procedure TGikoForm.ListViewExit(Sender: TObject);
10452 procedure TGikoForm.ListViewSelectItem(Sender: TObject; Item: TListItem;
10453 Selected: Boolean);
10456 if not (GikoSys.Setting.BrowserTabVisible) and (Item <> nil) then
10457 if (TObject( Item.Data ) is TThreadItem) then begin
10458 SelectTimer.Interval := GikoSys.Setting.SelectInterval;
10460 SelectTimer.Interval := 0
10462 SelectTimer.Interval := 0;
10466 procedure TGikoForm.SelectTimerTimer(Sender: TObject);
10468 if not (ListView.Selected = nil) then
10469 if( FActiveContent = nil) or
10470 (GetActiveContent <> TThreadItem(ListView.Selected.Data) ) then begin
10471 SelectTimer.Interval := 0;
10476 procedure TGikoForm.SelectItemSaveForDatExecute(Sender: TObject);
10481 List := TList.Create;
10483 Screen.Cursor := crHourGlass;
10484 SelectListItem(List);
10485 if ((GikoSys.Setting.ListOrientation = gloVertical) and
10486 (GikoSys.Setting.ListHeightState = glsMax)) or
10487 ((GikoSys.Setting.ListOrientation = gloHorizontal) and
10488 (GikoSys.Setting.ListWidthState = glsMax)) then
10489 ShowMessage('
\83X
\83\8c\83b
\83h
\88ê
\97\97\82ð
\95\
\8e¦
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10490 else if(List.Count = 0) then
10491 ShowMessage('
\83X
\83\8c\83b
\83h
\82ð
\91I
\91ð
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10493 FileSaveAs1.Dialog.Title := '
\91I
\91ð
\83X
\83\8c\83b
\83h
\82ðdat
\82Ì
\82Ü
\82Ü
\95Û
\91¶';
10494 FileSaveAs1.Dialog.Filter := 'DAT
\83t
\83@
\83C
\83\8b(*.dat)|*.dat';
10495 for i := 0 to List.Count - 1 do begin
10496 if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin
10497 FileSaveAs1.Dialog.FileName := TThreadItem(List[i]).FileName;
10498 if FileSaveAs1.Execute then begin
10499 //
\82È
\82º
\82©
\83L
\83\83\83\93\83Z
\83\8b\82Å
\82à
\82±
\82Á
\82¿
\82É
\93ü
\82Á
\82Ä
\82
\82é
10500 if ExtractFilePath(FileSaveAs1.Dialog.FileName) <> '' then begin
10501 CopyFile(PChar(TThreadItem(List[i]).FilePath),
10502 PChar(FileSaveAs1.Dialog.FileName), true);
10509 Screen.Cursor := crDefault;
10515 procedure TGikoForm.SelectItemSaveForHTMLExecute(Sender: TObject);
10522 List := TList.Create;
10524 Screen.Cursor := crHourGlass;
10525 SelectListItem(List);
10526 if ((GikoSys.Setting.ListOrientation = gloVertical) and
10527 (GikoSys.Setting.ListHeightState = glsMax)) or
10528 ((GikoSys.Setting.ListOrientation = gloHorizontal) and
10529 (GikoSys.Setting.ListWidthState = glsMax)) then
10530 ShowMessage('
\83X
\83\8c\83b
\83h
\88ê
\97\97\82ð
\95\
\8e¦
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10531 else if(List.Count = 0) then
10532 ShowMessage('
\83X
\83\8c\83b
\83h
\82ð
\91I
\91ð
\82µ
\82Ä
\82
\82¾
\82³
\82¢')
10534 FileSaveAs1.Dialog.Title := '
\91I
\91ð
\83X
\83\8c\83b
\83h
\82ðHTML
\89»
\82µ
\82Ä
\95Û
\91¶';
10535 FileSaveAs1.Dialog.Filter := 'HTML
\83t
\83@
\83C
\83\8b(*.html)|*.html';
10536 for i := 0 to List.Count - 1 do begin
10537 if (TObject(List[i]) is TThreadItem) and (TThreadItem(List[i]).IsLogFile) then begin
10538 FileSaveAs1.Dialog.FileName := TThreadItem(List[i]).Title + '.html';
10539 if FileSaveAs1.Execute then begin
10540 //
\82È
\82º
\82©
\83L
\83\83\83\93\83Z
\83\8b\82Å
\82à
\82±
\82Á
\82¿
\82É
\93ü
\82Á
\82Ä
\82
\82é
10541 if ExtractFilePath(FileSaveAs1.Dialog.FileName) <> '' then begin
10542 html := TStringList.Create;
10543 title := TThreadItem(List[i]).Title;
10545 GikoSys.CreateHTML3(html, TThreadItem(List[i]), title);
10546 html.SaveToFile(FileSaveAs1.Dialog.FileName);
10547 SkinorCSSFilesCopy(ExtractFilePath(FileSaveAs1.Dialog.FileName));
10557 Screen.Cursor := crDefault;
10561 procedure TGikoForm.SkinorCSSFilesCopy(path: string);
10563 tmp, tmpD, tmpF: string;
10566 files: TStringList;
10569 if GikoSys.Setting.UseSkin then begin
10570 current := ExtractFilePath(GikoSys.GetSkinDir);
10571 tmp := GikoSys.Setting.CSSFileName;
10572 end else if GikoSys.Setting.UseCSS then begin
10573 current := ExtractFilePath(GikoSys.GetStyleSheetDir);
10574 tmp := ExtractFilePath(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName);
10576 dirs := TStringList.Create;
10579 if tmp <> current then begin
10580 GikoSys.GetDirectoryList(current, '*.*', dirs, true);
10581 for i := 0 to dirs.Count - 1 do begin
10582 files := TStringList.Create;
10584 gikoSys.GetFileList(dirs[i], '*.*', files, true);
10585 tmpD := CustomStringReplace(dirs[i], GikoSys.GetConfigDir, path);
10586 if (AnsiPos(dirs[i], tmp) <> 0) and not (DirectoryExists(tmpD)) then
10587 ForceDirectories(tmpD);
10589 if(dirs[i] = tmp) and (dirs[i] <> current) then begin
10590 for j := 0 to files.Count - 1 do begin
10591 tmpF := CustomStringReplace(files[j], GikoSys.GetConfigDir, path);
10592 if not FileExists(tmpF) then begin
10593 CopyFile(PChar(files[j]), PChar(tmpF),True);
10602 tmpD := CustomStringReplace(dirs[0], GikoSys.GetConfigDir, path);
10603 if not DirectoryExists(tmpD) then
10604 ForceDirectories(tmpD);
10605 tmpF := CustomStringReplace(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName
10606 , GikoSys.GetConfigDir, path);
10607 if not FileExists(tmpF) then begin
10608 CopyFile(PChar(GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName)
10609 , PChar(tmpF), True);
10618 procedure TGikoForm.KidokuActionExecute(Sender: TObject);
10623 List := TList.Create;
10625 SelectListItem(List);
10626 for i := 0 to List.Count - 1 do begin
10627 if TObject(List[i]) is TThreadItem then begin
10628 TThreadItem(List[i]).UnRead := false;
10629 TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;
10632 if TreeView.Visible then
10639 procedure TGikoForm.MidokuActionExecute(Sender: TObject);
10644 List := TList.Create;
10646 SelectListItem(List);
10647 for i := 0 to List.Count - 1 do begin
10648 if TObject(List[i]) is TThreadItem then begin
10649 TThreadItem(List[i]).UnRead := true;
10650 TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;
10653 if TreeView.Visible then
10660 procedure TGikoForm.BrowserPanelCanResize(Sender: TObject; var NewWidth,
10661 NewHeight: Integer; var Resize: Boolean);
10665 for i := 0 to BROWSER_COUNT - 1 do
10666 SetWindowPos(TWebBrowser(FBrowsers[i]).Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER);
10668 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10669 SetWindowPos(FActiveContent.Browser.Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER);
10673 procedure TGikoForm.LogFolderOpenActionExecute(Sender: TObject);
10677 if ((GikoSys.Setting.ListOrientation = gloVertical) and
10678 (GikoSys.Setting.ListHeightState = glsMax)) or
10679 ((GikoSys.Setting.ListOrientation = gloHorizontal) and
10680 (GikoSys.Setting.ListWidthState = glsMax)) then begin
10681 if(GetActiveContent <> nil) then begin
10682 GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(GetActiveContent.FilePath) + '"');
10684 end else if GetActiveList is TCategory then begin
10685 List := TList.Create;
10687 SelectListItem(List);
10688 GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(TBoard(List[0]).FilePath) + '"');
10692 end else if GetActiveList is TBoard then begin
10693 GikoSys.CreateProcess('explorer.exe', '/e,"' + ExtractFilePath(TBoard(GetActiveList).FilePath) + '"');
10698 procedure TGikoForm.LogFolderOpenActionUpdate(Sender: TObject);
10700 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
10701 LogFolderOpenAction.Enabled := True
10702 else if GetActiveList is TBoard then
10703 LogFolderOpenAction.Enabled := True
10705 LogFolderOpenAction.Enabled := False;
10708 procedure TGikoForm.GetTabURLs(AStringList: TStringList; Result:Boolean);
10710 rec : TBrowserRecord;
10711 i, bound : Integer;
10713 bound := BrowserTab.Tabs.Count -1;
10714 if bound = -1 then begin
10716 Exit; //for
\82É
\94ò
\82Î
\82È
\82¢
\82Å
\91\80\8dì
\82ð
\94²
\82¯
\82é
10719 for i := 0 to bound do begin
10720 rec := TBrowserRecord( BrowserTab.Tabs.Objects[ i ] );
10721 if( rec <> nil) and (rec.Thread <> nil) then
10722 AStringList.Add( rec.Thread.URL );
10727 procedure TGikoForm.TabsSaveActionExecute(Sender: TObject);
10729 SaveStringList: TStringList;
10732 SaveStringList := TStringList.Create;
10734 GetTabURLs(SaveStringList, Result);
10735 if not Result then begin
10736 ShowMessage('
\95Û
\91¶
\82·
\82é
\83^
\83u
\82ª
\82 \82è
\82Ü
\82¹
\82ñ');
10738 SaveStringList.SaveToFile(ExtractFilePath(Application.ExeName) + 'tab.sav');
10740 SaveStringList.Free
10744 procedure TGikoForm.TabsOpenActionExecute(Sender: TObject);
10746 i, bound : Integer;
10747 item : TThreadItem;
10748 URLs : TStringList;
10749 GikoTab: TGikoTabAppend;
10752 fileName := ExtractFilePath(Application.ExeName) + 'tab.sav';
10753 URLs := TStringList.Create();
10756 if FileExists(fileName) then
10757 URLs.LoadFromFile(fileName);
10760 ShowMessage('
\83^
\83u
\83t
\83@
\83C
\83\8b\82ª
\8aJ
\82¯
\82Ü
\82¹
\82ñ');
10762 bound := URLs.Count - 1;
10763 if bound = -1 then begin
10764 ShowMessage('
\95\
\8e¦
\82·
\82é
\83^
\83u
\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B');
10768 GikoTab := GikoSys.Setting.BrowserTabAppend;
10769 GikoSys.Setting.BrowserTabAppend := gtpLast;//TGikoTabAppend(1);
10770 for i := 0 to URLs.Count - 1 do begin
10771 item := BBSsFindThreadFromURL( URLs[ i ] );
10772 if item <> nil then
10773 InsertBrowserTab( item, false );
10776 GikoSys.Setting.BrowserTabAppend := GikoTab;
10781 procedure TGikoForm.FileTabSaveClick(Sender: TObject);
10783 SaveStringList: TStringList;
10785 SaveTabList := TStringList.Create;
10786 SaveTabList := GetTabURLs;
10787 if TabSaveDialog.Execute then begin
10788 SaveTabList.SaveToFile(TabSaveDialog.FileName);
10792 procedure TGikoForm.TabsSaveToFileActionExecute(Sender: TObject);
10794 SaveTabList: TStringList;
10797 SaveTabList := TStringList.Create;
10799 GetTabURLs(SaveTabList, Result);
10800 // if TabSaveDialog.Execute then begin
10801 // SaveTabList.SaveToFile(TabSaveDialog.FileName);
10808 procedure TGikoForm.TabsOpenFromFileActionExecute(Sender: TObject);
10811 item : TThreadItem;
10812 URLs : TStringList;
10813 GikoTab: TGikoTabAppend;
10815 URLs := TStringList.Create();
10818 // if TabOpenDialog.Execute then begin
10819 // URLs.LoadFromFile(TabOpenDialog.FileName);
10822 on EFOpenError do ShowMessage('
\83^
\83u
\83t
\83@
\83C
\83\8b\82ª
\8aJ
\82¯
\82Ü
\82¹
\82ñ');
10824 GikoTab := GikoSys.Setting.BrowserTabAppend;
10825 GikoSys.Setting.BrowserTabAppend := gtpLast;//TGikoTabAppend(1);
10826 for i := 0 to URLs.Count - 1 do begin
10827 item := BBSsFindThreadFromURL( URLs[ i ] );
10828 if item <> nil then
10829 InsertBrowserTab( item, false );
10832 GikoSys.Setting.BrowserTabAppend := GikoTab;
10838 OleInitialize(nil);