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,
27 TGikoTreeType = (gttNone, gtt2ch, gttHistory, gttFavorite);
28 TToolBarSettingSenderType = (tssNone, tssMain, tssList, tssBrowser);
29 TMinimizeType = (mtNone, mtMinimizing, mtMinimized);
31 TBrowserRecord = class;
33 TGikoForm = class(TForm)
34 StatusBar: TStatusBar;
37 TreeSplitter: TSplitter;
40 ThreadMainPanel: TPanel;
41 ListSplitter: TSplitter;
43 ListView: TGikoListView;
47 MessageHideButton: TSpeedButton;
48 MessageListView: TListView;
49 MessageSplitter: TSplitter;
51 SpeedButton1: TSpeedButton;
53 CabinetSelectToolButton: TToolButton;
54 HistoryToolBar: TToolBar;
55 ToolButton15: TToolButton;
56 ToolButton18: TToolButton;
57 ItemIcon16: TImageList;
58 ItemIcon32: TImageList;
59 HotToobarImageList: TImageList;
60 ToobarImageList: TImageList;
61 ItemImageList: TImageList;
62 ActionList: TActionList;
63 LogDeleteAction: TAction;
64 KidokuAction: TAction;
65 StdToolBarVisibleAction: TAction;
66 SearchAction: TAction;
67 GikoNaviWebPageAction: TAction;
70 MsgBarVisibleAction: TAction;
71 StatusBarVisibleAction: TAction;
72 LargeIconAction: TAction;
73 SmallIconAction: TAction;
74 ListIconAction: TAction;
75 DetailIconAction: TAction;
76 CabinetBBSAction: TAction;
77 CabinetHistoryAction: TAction;
78 CabinetVisibleAction: TAction;
79 MidokuAction: TAction;
80 AllSelectAction: TAction;
81 UpFolderAction: TAction;
82 ListNumberVisibleAction: TAction;
83 AllItemAction: TAction;
84 LogItemAction: TAction;
85 NewItemAction: TAction;
86 SelectItemAction: TAction;
87 ShowThreadAction: TAction;
91 DeleteMenu: TMenuItem;
93 KidokuMenu: TMenuItem;
94 MidokuMenu: TMenuItem;
95 AllSelectMenu: TMenuItem;
97 StdToolBarMenu: TMenuItem;
98 CabinetMenu: TMenuItem;
101 CabinetVisibleMenu: TMenuItem;
102 MessageMenu: TMenuItem;
103 StatusBarMenu: TMenuItem;
105 LargeIconMenu: TMenuItem;
106 SmallIconMenu: TMenuItem;
108 DetailMenu: TMenuItem;
111 RoundMenu: TMenuItem;
113 OptionMenu: TMenuItem;
117 AboutMenu: TMenuItem;
119 BrowserPopupMenu: TPopupMenu;
120 ShowThreadMenu: TMenuItem;
121 ShowBoardMenu: TMenuItem;
122 ShowBoardAction: TAction;
123 ListIconPopupMenu: TPopupMenu;
124 LargeIconPMenu: TMenuItem;
125 SmallIconPMenu: TMenuItem;
126 ListPMenu: TMenuItem;
127 DetailPMenu: TMenuItem;
128 CabinetCloseAction: TAction;
129 ClosePopupMenu: TPopupMenu;
130 CloseMenu: TMenuItem;
131 OptionAction: TAction;
141 RoundAction: TAction;
142 ListPopupMenu: TPopupMenu;
143 ListRoundPMenu: TMenuItem;
144 ListReservPMenu: TMenuItem;
146 ItemRoundPMenu: TMenuItem;
148 KidokuPMenu: TMenuItem;
149 MidokuPMenu: TMenuItem;
150 AllSelectPMenu: TMenuItem;
151 UrlCopyPMenu: TMenuItem;
153 DeletePMenu: TMenuItem;
155 ViewPMenu: TMenuItem;
156 LargeIconLPMenu: TMenuItem;
157 SmallIconLPMenu: TMenuItem;
158 ListLPMenu: TMenuItem;
159 DetailLPMenu: TMenuItem;
163 URLCopyAction: TAction;
167 MsgBarCloseAction: TAction;
168 ScrollTopAction: TAction;
169 ScrollLastAction: TAction;
170 ScrollNewAction: TAction;
171 ScrollKokoAction: TAction;
172 EditorAction: TAction;
174 ItemReloadAction: TAction;
175 BrowserMaxAction: TAction;
187 SelectListReloadAction: TAction;
188 SelectThreadReloadAction: TAction;
189 KokoPopupMenu: TPopupMenu;
190 KokomadePMenu: TMenuItem;
192 MenuItem1: TMenuItem;
193 MenuItem2: TMenuItem;
194 BrowserTabCloseAction: TAction;
195 BrowserTabPopupMenu: TPopupMenu;
197 KokomadeAction: TAction;
198 ZenbuAction: TAction;
199 KokoResAction: TAction;
200 SelectItemURLCopyAction: TAction;
201 SelectReservAction: TAction;
202 NotSelectTabCloseAction: TAction;
206 TreePopupMenu: TPopupMenu;
207 TreeSelectThreadPupupMenu: TMenuItem;
208 TreeSelectBoardPupupMenu: TMenuItem;
210 TreeSelectURLPupupMenu: TMenuItem;
211 TreeSelectBoradReload: TAction;
212 TreeSelectThreadReload: TAction;
213 TreeSelectURLCopy: TAction;
214 ListToolBarVisibleAction: TAction;
215 BrowserToolBarVisibleAction: TAction;
219 BrowserBottomPanel: TGikoPanel;
220 CabinetSelectPopupMenu: TPopupMenu;
222 ItemReservPMenu: TMenuItem;
223 RoundNamePopupMenu: TPopupMenu;
224 SelectNewRoundName: TAction;
225 SelectDeleteRound: TAction;
226 NewBoardAction: TAction;
229 LoginAction: TAction;
231 KeySettingAction: TAction;
233 AllTabCloseAction: TAction;
241 MessageImageList: TImageList;
242 ProgressBar: TProgressBar;
243 ArrangeAction: TAction;
245 NameURLCopyAction: TAction;
246 SelectItemNameURLCopyAction: TAction;
247 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 Browser: TWebBrowser;
535 BrowserPanel: TPanel;
536 procedure FormCreate(Sender: TObject);
537 procedure FormDestroy(Sender: TObject);
538 procedure CabinetPanelHide(Sender: TObject);
539 procedure FormClose(Sender: TObject; var Action: TCloseAction);
540 procedure ListViewData(Sender: TObject; Item: TListItem);
541 procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
542 const FindString: String; const FindPosition: TPoint;
543 FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
544 Wrap: Boolean; var Index: Integer);
545 procedure ListViewDataHint(Sender: TObject; StartIndex,
547 procedure ListViewDataStateChange(Sender: TObject; StartIndex,
548 EndIndex: Integer; OldState, NewState: TItemStates);
549 procedure BrowserStatusTextChange(Sender: TObject;
550 const Text: WideString);
551 procedure BrowserTitleChange(Sender: TObject; const Text: WideString);
552 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
553 procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
554 var AllowChange: Boolean);
555 procedure ListViewKeyDown(Sender: TObject; var Key: Word;
557 procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
558 procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
559 Button: TToolButton; State: TCustomDrawState;
560 var DefaultDraw: Boolean);
561 procedure BrowserBeforeNavigate2(Sender: TObject;
562 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
563 Headers: OleVariant; var Cancel: WordBool);
564 procedure ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
565 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
566 var DefaultDraw: Boolean);
567 procedure TreeViewCustomDraw(Sender: TCustomTreeView;
568 const ARect: TRect; var DefaultDraw: Boolean);
569 procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
570 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
571 procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
572 procedure TreeViewDblClick(Sender: TObject);
573 procedure ListViewCustomDraw(Sender: TCustomListView;
574 const ARect: TRect; var DefaultDraw: Boolean);
575 procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
576 Shift: TShiftState; X, Y: Integer);
577 procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
578 procedure MessageListViewResize(Sender: TObject);
579 procedure ExitActionExecute(Sender: TObject);
580 procedure AllSelectActionExecute(Sender: TObject);
581 procedure StdToolBarVisibleActionExecute(Sender: TObject);
582 procedure MsgBarVisibleActionExecute(Sender: TObject);
583 procedure StatusBarVisibleActionExecute(Sender: TObject);
584 procedure LargeIconActionExecute(Sender: TObject);
585 procedure SmallIconActionExecute(Sender: TObject);
586 procedure ListIconActionExecute(Sender: TObject);
587 procedure DetailIconActionExecute(Sender: TObject);
588 procedure SearchActionExecute(Sender: TObject);
589 procedure OptionActionExecute(Sender: TObject);
590 procedure GikoNaviWebPageActionExecute(Sender: TObject);
591 procedure AboutActionExecute(Sender: TObject);
592 procedure CabinetHistoryActionExecute(Sender: TObject);
593 procedure CabinetVisible( isVisible : Boolean );
594 procedure CabinetVisibleActionExecute(Sender: TObject);
595 procedure AllItemActionExecute(Sender: TObject);
596 procedure LogItemActionExecute(Sender: TObject);
597 procedure NewItemActionExecute(Sender: TObject);
598 procedure SelectItemActionExecute(Sender: TObject);
599 procedure ListNumberVisibleActionExecute(Sender: TObject);
600 procedure UpFolderActionExecute(Sender: TObject);
601 procedure IconStyleExecute(Sender: TObject);
602 procedure RoundActionExecute(Sender: TObject);
603 procedure StopActionExecute(Sender: TObject);
604 procedure MsgBarCloseActionExecute(Sender: TObject);
605 procedure BrowserMaxActionExecute(Sender: TObject);
606 procedure ScrollTopActionExecute(Sender: TObject);
607 procedure ScrollLastActionExecute(Sender: TObject);
608 procedure ScrollNewActionExecute(Sender: TObject);
609 procedure ScrollKokoActionExecute(Sender: TObject);
610 procedure EditorActionExecute(Sender: TObject);
611 procedure IEActionExecute(Sender: TObject);
612 procedure ShowThreadActionExecute(Sender: TObject);
613 procedure ShowBoardActionExecute(Sender: TObject);
614 procedure URLCopyActionExecute(Sender: TObject);
615 procedure ItemReloadActionExecute(Sender: TObject);
616 procedure SelectListReloadActionExecute(Sender: TObject);
617 procedure SelectThreadReloadActionExecute(Sender: TObject);
618 procedure SelectListReloadActionUpdate(Sender: TObject);
619 procedure AllItemActionUpdate(Sender: TObject);
620 procedure LogItemActionUpdate(Sender: TObject);
621 procedure NewItemActionUpdate(Sender: TObject);
622 procedure SelectItemActionUpdate(Sender: TObject);
623 procedure UpFolderActionUpdate(Sender: TObject);
624 procedure FormResize(Sender: TObject);
625 procedure ScrollTopActionUpdate(Sender: TObject);
626 procedure ScrollLastActionUpdate(Sender: TObject);
627 procedure ScrollNewActionUpdate(Sender: TObject);
628 procedure ScrollKokoActionUpdate(Sender: TObject);
629 procedure EditorActionUpdate(Sender: TObject);
630 procedure IEActionUpdate(Sender: TObject);
631 procedure ShowThreadActionUpdate(Sender: TObject);
632 procedure ShowBoardActionUpdate(Sender: TObject);
633 procedure SelectThreadReloadActionUpdate(Sender: TObject);
634 procedure ItemReloadActionUpdate(Sender: TObject);
635 procedure ListViewDblClick(Sender: TObject);
636 procedure LogDeleteActionExecute(Sender: TObject);
637 procedure KokomadeActionExecute(Sender: TObject);
638 procedure ZenbuActionExecute(Sender: TObject);
639 procedure KokoResActionExecute(Sender: TObject);
640 procedure ListPopupMenuPopup(Sender: TObject);
641 procedure SelectItemURLCopyActionExecute(Sender: TObject);
642 procedure SelectItemURLCopyActionUpdate(Sender: TObject);
643 procedure AllSelectActionUpdate(Sender: TObject);
644 procedure LogDeleteActionUpdate(Sender: TObject);
645 procedure BrowserTabCloseActionExecute(Sender: TObject);
646 procedure NotSelectTabCloseActionExecute(Sender: TObject);
647 procedure TreeSelectBoradReloadExecute(Sender: TObject);
648 procedure TreeSelectThreadReloadExecute(Sender: TObject);
649 procedure TreeSelectURLCopyExecute(Sender: TObject);
650 procedure TreePopupMenuPopup(Sender: TObject);
651 procedure ListToolBarVisibleActionExecute(Sender: TObject);
652 procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
653 procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
654 var Cancel: WordBool);
655 procedure ListSplitterCanResize(Sender: TObject; var NewSize: Integer;
656 var Accept: Boolean);
657 procedure ListSplitterMoved(Sender: TObject);
658 procedure BrowserTabChange(Sender: TObject);
659 procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
660 Shift: TShiftState; X, Y: Integer);
661 procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
662 State: TDragState; var Accept: Boolean);
663 procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
664 procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
666 procedure BrowserDocumentComplete(Sender: TObject;
667 const pDisp: IDispatch; var URL: OleVariant);
668 procedure SelectReservActionUpdate(Sender: TObject);
669 procedure RoundNamePopupMenuPopup(Sender: TObject);
670 procedure SelectNewRoundNameExecute(Sender: TObject);
671 procedure SelectDeleteRoundExecute(Sender: TObject);
672 procedure SelectReservActionExecute(Sender: TObject);
673 procedure NewBoardActionExecute(Sender: TObject);
674 procedure LoginActionExecute(Sender: TObject);
675 procedure KeySettingActionExecute(Sender: TObject);
676 procedure AllTabCloseActionExecute(Sender: TObject);
677 procedure ArrangeActionExecute(Sender: TObject);
678 procedure NameURLCopyActionExecute(Sender: TObject);
679 procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
680 procedure URLCopyActionUpdate(Sender: TObject);
681 procedure NameURLCopyActionUpdate(Sender: TObject);
682 procedure BrowserTabCloseActionUpdate(Sender: TObject);
683 procedure NotSelectTabCloseActionUpdate(Sender: TObject);
684 procedure AllTabCloseActionUpdate(Sender: TObject);
685 procedure SelectItemNameURLCopyActionUpdate(Sender: TObject);
686 procedure ActiveLogDeleteActionExecute(Sender: TObject);
687 procedure ActiveLogDeleteActionUpdate(Sender: TObject);
688 procedure ListNameBarVisibleActionExecute(Sender: TObject);
689 procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
690 procedure TreeSelectNameURLCopyExecute(Sender: TObject);
691 procedure PaneInitActionExecute(Sender: TObject);
692 procedure FormShow(Sender: TObject);
693 procedure BrowserTabToolBarResize(Sender: TObject);
694 procedure BrowserMinActionExecute(Sender: TObject);
695 procedure SelectTextClearActionExecute(Sender: TObject);
696 procedure NameTextClearActionExecute(Sender: TObject);
697 procedure MailTextClearActionExecute(Sender: TObject);
698 procedure LeftmostTabSelectActionExecute(Sender: TObject);
699 procedure LeftTabSelectActionExecute(Sender: TObject);
700 procedure RightTabSelectActionExecute(Sender: TObject);
701 procedure RightmostTabSelectActionExecute(Sender: TObject);
702 procedure LeftmostTabSelectActionUpdate(Sender: TObject);
703 procedure LeftTabSelectActionUpdate(Sender: TObject);
704 procedure RightTabSelectActionUpdate(Sender: TObject);
705 procedure RightmostTabSelectActionUpdate(Sender: TObject);
706 procedure FavoriteMenuClick(Sender: TObject);
707 procedure FavoriteAddActionExecute(Sender: TObject);
708 procedure FavoriteAddActionUpdate(Sender: TObject);
709 procedure BoardFavoriteAddActionExecute(Sender: TObject);
710 procedure BoardFavoriteAddActionUpdate(Sender: TObject);
711 procedure ThreadFavoriteAddActionExecute(Sender: TObject);
712 procedure ThreadFavoriteAddActionUpdate(Sender: TObject);
713 procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
714 procedure FavoriteArrangeActionExecute(Sender: TObject);
715 procedure MainCoolBarResize(Sender: TObject);
716 procedure MoveToActionExecute(Sender: TObject);
717 procedure AddressToolBarResize(Sender: TObject);
718 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
720 procedure AddressBarVisibleActionExecute(Sender: TObject);
721 procedure BrowserEnter(Sender: TObject);
722 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
723 procedure BrowserTabVisibleActionExecute(Sender: TObject);
724 procedure BrowserTabTopActionExecute(Sender: TObject);
725 procedure BrowserTabBottomActionExecute(Sender: TObject);
726 procedure BrowserTabTabStyleActionExecute(Sender: TObject);
727 procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
728 procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
729 procedure PreviewTimerTimer(Sender: TObject);
730 procedure MessageHideButtonClick(Sender: TObject);
731 procedure MonazillaWebPageActionExecute(Sender: TObject);
732 procedure GikoHelpActionExecute(Sender: TObject);
733 procedure ToolButton18Click(Sender: TObject);
734 procedure KotehanActionExecute(Sender: TObject);
735 procedure LinkBarVisibleActionExecute(Sender: TObject);
736 procedure BBS2chWebPageActionExecute(Sender: TObject);
737 procedure GikoFolderOpenActionExecute(Sender: TObject);
738 procedure MainCoolBarBandInfo(Sender: TObject;
739 var BandInfo: PReBarBandInfoA);
740 procedure MainCoolBarChevronClick(Sender: TObject;
741 RebarChevron: PNMRebarChevron);
742 procedure ListCoolBarBandInfo(Sender: TObject;
743 var BandInfo: PReBarBandInfoA);
744 procedure ListCoolBarChevronClick(Sender: TObject;
745 RebarChevron: PNMRebarChevron);
746 procedure BrowserCoolBarBandInfo(Sender: TObject;
747 var BandInfo: PReBarBandInfoA);
748 procedure BrowserCoolBarChevronClick(Sender: TObject;
749 RebarChevron: PNMRebarChevron);
750 procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
751 procedure ThreadEditorActionExecute(Sender: TObject);
752 procedure ThreadEditorActionUpdate(Sender: TObject);
753 procedure ToolBarSettingActionExecute(Sender: TObject);
754 procedure NameCopyActionExecute(Sender: TObject);
755 procedure BoardIEActionExecute(Sender: TObject);
756 procedure SelectItemNameCopyActionExecute(Sender: TObject);
757 procedure SelectItemNameCopyActionUpdate(Sender: TObject);
758 procedure BoardIEActionUpdate(Sender: TObject);
759 procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
760 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
761 procedure NameCopyActionUpdate(Sender: TObject);
762 procedure SelectComboBoxChange(Sender: TObject);
763 procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
765 procedure SelectComboBoxExit(Sender: TObject);
766 procedure NG1Click(Sender: TObject);
767 procedure SelectResActionExecute(Sender: TObject);
768 procedure SelectResActionUpdate(Sender: TObject);
769 procedure FormKeyUp(Sender: TObject; var Key: Word;
771 procedure AllResActionExecute(Sender: TObject);
772 procedure AllResActionUpdate(Sender: TObject);
773 procedure ReloadClick(Sender: TObject);
774 procedure GoBackClick(Sender: TObject);
775 procedure GoFowardClick(Sender: TObject);
776 procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
777 Shift: TShiftState; X, Y: Integer);
778 procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
779 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
780 procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
781 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
782 procedure StatusBarResize(Sender: TObject);
783 procedure IndividualAbon1Click(Sender: TObject);
784 procedure IndividualAbon2Click(Sender: TObject);
785 procedure N42Click(Sender: TObject);
786 procedure SelectComboBoxEnter(Sender: TObject);
787 procedure AntiIndividualAbonClick(Sender: TObject);
788 procedure N51Click(Sender: TObject);
789 procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
790 procedure CabinetFavoriteActionExecute(Sender: TObject);
791 procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
793 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
794 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
796 procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
798 procedure FavoriteTreePopupMenuPopup(Sender: TObject);
799 procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
800 procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
801 procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
802 procedure ToolButton19Click(Sender: TObject);
803 procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject);
804 procedure FavoriteTreeViewDblClick(Sender: TObject);
805 procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject);
806 procedure FavoriteTreeViewReloadActionExecute(Sender: TObject);
807 procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
808 procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
809 procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject);
810 procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
811 procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
812 Shift: TShiftState; X, Y: Integer);
813 procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
814 State: TDragState; var Accept: Boolean);
815 procedure OnlyAHundredResExecute(Sender: TObject);
816 procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
818 procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
819 var Handled: Boolean);
820 procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
821 var Handled: Boolean);
822 procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
823 var Handled: Boolean);
824 procedure ExportFavoriteFileAccept(Sender: TObject);
825 procedure ExportFavoriteFileBeforeExecute(Sender: TObject);
826 procedure CabinetBBSActionExecute(Sender: TObject);
827 procedure FavoriteTreeViewBrowseThreadActionExecute(Sender: TObject);
828 procedure FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
829 procedure UpBoardActionExecute(Sender: TObject);
830 procedure UpBoardActionUpdate(Sender: TObject);
831 procedure BrowserTabContextPopup(Sender: TObject; MousePos: TPoint;
832 var Handled: Boolean);
833 procedure KoreCopyExecute(Sender: TObject);
834 procedure BrowserTabPopupMenuPopup(Sender: TObject);
835 procedure MenuToolBarResize(Sender: TObject);
836 procedure StdToolBarResize(Sender: TObject);
837 procedure LinkToolBarResize(Sender: TObject);
838 procedure ListNameToolBarResize(Sender: TObject);
839 procedure ListToolBarResize(Sender: TObject);
840 procedure BrowserNameToolBarResize(Sender: TObject);
841 procedure BrowserToolBarResize(Sender: TObject);
842 procedure BrowserTabResize(Sender: TObject);
843 procedure ListViewClick(Sender: TObject);
844 procedure TreeViewClick(Sender: TObject);
845 procedure TreeViewKeyDown(Sender: TObject; var Key: Word;
847 procedure FavoriteTreeViewMouseDown(Sender: TObject;
848 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
849 procedure MessagePanelResize(Sender: TObject);
851 procedure TreeSelectNameCopyExecute(Sender: TObject);
852 procedure FavoriteTreeViewMouseUp(Sender: TObject;
853 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
854 procedure OnlyAHundredResUpdate(Sender: TObject);
855 procedure test1Click(Sender: TObject);
858 //RoundList : TRoundList;
862 FEnabledCloseButton: Boolean;
863 // ThreadCreate: TThreadCreate;
865 FClickNode: TTreeNode;
868 FPreviewBrowser: TPreviewBrowser;
871 FBrowserSizeHeight: Integer;
872 FBrowserSizeWidth: Integer;
874 // FFavorite: TFavorite;
875 FTabHintIndex: Integer;
876 FListStyle: TViewStyle; //
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93\83X
\83^
\83C
\83\8b
877 FItemNoVisible: Boolean; //
\83\8a\83X
\83g
\94Ô
\8d\86\95\
\8e¦
\83t
\83\89\83O
878 FViewType: TGikoViewType; //
\83\8a\83X
\83g
\83A
\83C
\83e
\83\80\95\
\8e¦
\83^
\83C
\83v
879 FActiveList: TObject;
880 FActiveContent: TBrowserRecord; //
882 FHistoryList: TList; //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
883 FTreeType: TGikoTreeType;
887 // FLastRoundTime: TDateTime;
888 BrowserNullTab: TBrowserRecord;
889 // DoubleClickOccurred: array [TMouseButton] of Boolean;
890 FDownloadTitle: string; //
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86\82Ì
\83^
\83C
\83g
\83\8b\96¼
891 FDownloadMax: Integer; //
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86\82Ì
\8dÅ
\91å
\83T
\83C
\83Y
892 FEvent: THTMLDocumentEventSink;//
\83u
\83\89\83E
\83U
\83h
\83L
\83\85\83\81\83\93\83g
\83C
\83x
\83\93\83g
894 // Fkeynum : Integer; //
\83L
\81[
\83{
\81[
\83h
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\97p
896 IsDraggingSelectComboBox : Boolean;
897 DraggingSelectComboBoxPosition : TPoint;
899 FSearchDialog: TSearchDialog;
901 FDropSpaceNode: TTreeNode;
903 FDragTime : Cardinal; //
\83\8a\83\93\83N
\82ÌD&D
\97p
904 FDragButton : TToolButton; //
\83\8a\83\93\83N
\82ÌD&D
\97p
\82ÉDrag
\82µ
\82Ä
\82éButton
\95Û
\91¶
905 FDragWFirst : Boolean; //WebTab
\82ÌD&D
\97p
907 FListViewBackGroundColor : TColor; //ListView
\82ÌBackGroundColor
908 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¦
909 FOddColor : TColor; //
\82»
\82Ì
\90F
911 FSelectResWord : string; //
\83\8c\83X
\8di
\8d\9e\83\8f\81[
\83h
912 FIsIgnoreResize : Boolean; //
\83\8a\83T
\83C
\83Y
\83C
\83x
\83\93\83g
\82ð
\96³
\8e\8b\82·
\82é
\82©
\82Ç
\82¤
\82©
913 FIsMinimize : TMinimizeType; //
\8dÅ
\8f¬
\89»
\82µ
\82Ä
\82¢
\82é
\8dÅ
\92\86\82©
914 FOldFormWidth : Integer; //
\92¼
\91O
\82Ì
\83E
\83B
\83\93\83h
\83E
\82Ì
\95\9d
915 FToolBarSettingSender : TToolBarSettingSenderType; //
\83c
\81[
\83\8b\83o
\81[
\90Ý
\92è
\82ð
\83N
\83\8a\83b
\83N
\82µ
\82½
\83N
\81[
\83\8b\83o
\81[
916 FMouseDownPos : TPoint; //
\83u
\83\89\83E
\83U
\83^
\83u
\82Å
\83}
\83E
\83X
\82ð
\89\9f\82µ
\82½
\82Æ
\82«
\82Ì
\8dÀ
\95W
918 procedure SetBoardTreeNode( inBBS : TBBS );
919 function SetCategoryListItem(ABBS2ch: TBBS): Integer;
920 function SetBoardListItem(Category: TCategory): Integer;
921 function SetThreadListItem(Board: TBoard): Integer;
922 // function GetRoundName(index: integer): string;
924 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
925 procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
926 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
927 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
928 procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
930 procedure SetActiveList(Obj: TObject);
932 procedure ListDoubleClick(Shift: TShiftState);
933 procedure BrowserMovement(const AName: string); overload;
934 procedure BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord); overload;
935 procedure SelectListItem(List: TList);
936 // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
937 procedure DeleteTab(ThreadItem: TThreadItem); overload;
938 procedure DeleteTab(BrowserRecord: TBrowserRecord); overload;
939 function Hook(var Message: TMessage): Boolean;
940 procedure AddRoundNameMenu(MenuItem: TMenuItem);
941 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload;
942 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
943 procedure SetSelectRoundName(Sender: TObject);
944 function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
946 procedure SetMenuFont;
947 // procedure CreateFavMenu(Folder: TFavoriteFolder);
948 procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
949 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
950 procedure FavoriteClick(Sender: TObject); overload;
951 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
952 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
953 function OnDocumentContextMenu(Sender: TObject): WordBool;
954 // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
955 procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
956 procedure ShowTextPopup;
957 //procedure ShowTextPopup(HintData: THintData);
958 // procedure SetStdToolBar;
959 // function GetAction(ActionName: string): TContainedAction;
960 procedure SetLinkBar;
961 function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
962 procedure MenuBarChevronMenu;
963 procedure LinkBarChevronMenu;
964 procedure ToolBarChevronMenu(ToolBar: TToolBar);
965 procedure ModifySelectList;
966 procedure FavoriteBrowseFolder( node: TTreeNode );
967 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
968 procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
969 procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
970 procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
971 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
972 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
973 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
974 procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
975 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
977 procedure SetListViewBackGroundColor(value: TColor);
978 procedure BBSMenuItemOnClick( Sender : TObject );
980 procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
981 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82É
\95Û
\91¶
982 procedure SaveCoolBarSettings;
983 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82©
\82ç
\95\9c\8c³
984 procedure LoadCoolBarSettings;
985 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82é
986 procedure OnMinimize;
987 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82½
988 procedure OnMinimized;
989 // CoolBar
\82ª
\83T
\83C
\83Y
\95Ï
\8dX
\82³
\82ê
\82½
990 procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
991 // TreeView
\82ª
\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
992 procedure TreeClick( Node : TTreeNode );
993 // TreeView
\82ª
\83_
\83u
\83\8b\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
994 procedure TreeDoubleClick( Node : TTreeNode );
995 //
\83M
\83R
\83i
\83r
\82Ì
\83\81\83b
\83Z
\81[
\83W
\83\8b\81[
\83v
\82ð
\89¡
\8eæ
\82è
\82µ
\82Ü
\82·
996 procedure HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
997 //
\83u
\83\89\83E
\83U
\82Ì
\83L
\81[
\83_
\83E
\83\93\83C
\83x
\83\93\83g
998 //
\83C
\83x
\83\93\83g
\82ð
\8eæ
\82è
\88µ
\82Á
\82½
\8fê
\8d\87\82Í True
\82ð
\95Ô
\82·
999 function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
1000 //
\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
1001 procedure SetBBSMenu;
1004 procedure CreateParams(var Params: TCreateParams); override;
1005 procedure WndProc(var Message: TMessage); override;
1006 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
1007 procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
1008 procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
1012 // FDownload: TDownload;
1013 FControlThread: TThreadControl;
1014 procedure MoveToURL(URL: string);
1015 procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
1016 procedure ReloadBBS;
1017 function GetHttpState: Boolean;
1018 procedure SetEnabledCloseButton(Enabled: Boolean);
1019 function GetTreeNode(Data: TObject): TTreeNode;
1020 procedure AppFormDeactivate(Sender: TObject);
1021 // procedure CabinetPanelVisible(PanelVisible: Boolean);
1022 procedure ListViewAllSelect;
1024 property ListStyle: TViewStyle read FListStyle write FListStyle;
1025 property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
1026 property ViewType: TGikoViewType read FViewType write FViewType;
1028 property NameCookie: string read FNameCookie write FNameCookie;
1029 property MailCookie: string read FMailCookie write FMailCookie;
1031 procedure SetContent(inThread: TBrowserRecord);
1032 function GetActiveContent: TThreadItem;
1033 function GetActiveList: TObject;
1035 property ActiveList: TObject read GetActiveList write SetActiveList;
1036 // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
1038 procedure SetListViewType(AViewType: TGikoViewType); overload;
1039 procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
1040 procedure DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
1041 procedure DownloadList(Board: TBoard; ForceDownload: Boolean = False);
1042 procedure PlaySound(SoundEventName: string);
1044 function AddHistory( FavItem: TFavoriteThreadItem ): Boolean;
1045 procedure DeleteHistory( threadItem: TThreadItem );
1046 procedure ClearHistory;
1047 procedure SaveHistory;
1048 procedure LoadHistory;
1049 procedure ShowBBSTree( inBBS : TBBS );
1050 procedure ShowBBSTreeOld( inBBS : TBBS );
1051 procedure ShowHistoryTree;
1052 procedure SetHistoryTreeNode;
1053 // procedure SelectTreeNode(Item: TObject);
1054 procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
1055 procedure SetBrowserTabState;
1056 // property Favorite: TFavorite read FFavorite write FFavorite;
1057 procedure SetToolBarPopup;
1058 procedure ShowFavoriteAddDialog( Item : TObject );
1059 procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
1060 procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
1061 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
1062 property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
1063 property OddColor : TColor read FOddColor write FOddColor;
1065 function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
1066 procedure OnPlugInMenuItem( Sender : TObject );
1069 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
1072 TFavoriteMenuItem = class(TMenuItem)
1076 property Data: Pointer read FData write FData;
1079 TBBSMenuItem = class(TMenuItem)
1083 property Data: Pointer read FData write FData;
1086 TLinkToolButton = class(TToolButton)
1090 property Data: Pointer read FData write FData;
1093 TBrowserRecord = class( TObject )
1095 FBrowser : TWebBrowser;
1096 FEvent: THTMLDocumentEventSink;//
\83u
\83\89\83E
\83U
\83h
\83L
\83\85\83\81\83\93\83g
\83C
\83x
\83\93\83g
1097 FThread : TThreadItem;
1098 FLastSize : Integer;
1100 FOnlyHundred: Boolean;
1102 destructor Destroy; override;
1103 property Browser : TWebBrowser read FBrowser write FBrowser;
1104 property Thread : TThreadItem read FThread write FThread;
1105 property LastSize : Integer read FLastSize write FLastSize;
1106 property Repaint : Boolean read FRepaint write FRepaint;
1107 property OnlyHundred : Boolean read FOnlyHundred write FOnlyHundred;
1111 GikoForm: TGikoForm;
1116 About, Option, Round, Splash, Sort, ListSelect,
1117 NewBoard, MojuUtils,Clipbrd;
1120 CAPTION_NAME: string = '
\83M
\83R
\83i
\83r';
1121 BLANK_HTML: string = 'about:blank';
1122 SELECTCOMBOBOX_NAME: string = ''; // '
\83X
\83\8c\83b
\83h
\8di
\8d\9e\8c\9f\8dõ';
1123 SELECTCOMBOBOX_COLOR: TColor = clWindow;
1125 DandD_THRESHOLD = 5; //D&D
\82Ìè
\87\92l
\81ipixcel)
1126 //
\83c
\83\8a\81[
\81E
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93
1127 ITEM_ICON_2CH1 = 0; //2ch
\83A
\83C
\83R
\83\93
1128 ITEM_ICON_2CH2 = 1; //2ch
\83A
\83C
\83R
\83\93
1129 ITEM_ICON_CATEGORY1 = 2; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1130 ITEM_ICON_CATEGORY2 = 3; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1131 ITEM_ICON_BOARD_NOSUBJECT = 3; //
\93Ç
\82Ý
\8d\9e\82Ü
\82ê
\82Ä
\82¢
\82È
\82¢
\94Â
\83A
\83C
\83R
\83\93
1132 ITEM_ICON_BOARD1 = 4; //
\94Â
\83A
\83C
\83R
\83\93
1133 ITEM_ICON_BOARD2 = 5; //
\94Â
\83A
\83C
\83R
\83\93
1134 ITEM_ICON_THREADLOG1 = 6; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1135 ITEM_ICON_THREADLOG2 = 7; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1136 ITEM_ICON_THREAD1 = 8; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1137 ITEM_ICON_THREAD2 = 9; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1138 ITEM_ICON_THREADNEW1 = 10; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1139 ITEM_ICON_THREADNEW2 = 11; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1140 ITEM_ICON_SORT1 = 12; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1141 ITEM_ICON_SORT2 = 13; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1142 ITEM_ICON_BOARD_LOG = 17; //
\83X
\83\8c\83\8d\83O
\82 \82è
\94Â
\83A
\83C
\83R
\83\93
1143 ITEM_ICON_BOARD_NEW = 18; //
\83X
\83\8c\90V
\92\85\94Â
\83A
\83C
\83R
\83\93
1145 //
\83c
\81[
\83\8b\83o
\81[
\83A
\83C
\83R
\83\93
1146 TOOL_ICON_HEIGHT_MAX = 16; //
\8d\82\82³
\8dÅ
\91å
\83A
\83C
\83R
\83\93
1147 TOOL_ICON_HEIGHT_MIN = 17; //
\8d\82\82³
\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1148 TOOL_ICON_HEIGHT_NORMAL = 18; //
\8d\82\82³
\95W
\8f\80\83A
\83C
\83R
\83\93
1149 TOOL_ICON_WIDTH_MAX = 19; //
\95\9d\8dÅ
\91å
\83A
\83C
\83R
\83\93
1150 TOOL_ICON_WIDTH_MIN = 20; //
\95\9d\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1151 TOOL_ICON_WIDTH_NORMAL = 21; //
\95\9d\95W
\8f\80\83A
\83C
\83R
\83\93
1153 TOOL_ICON_FAV_FOLDER = 30; //
\82¨
\8bC
\82É
\93ü
\82è
\83t
\83H
\83\8b\83_
\83A
\83C
\83R
\83\93
1154 TOOL_ICON_FAV_BOARD = 31; //
\82¨
\8bC
\82É
\93ü
\82è
\94Â
\83A
\83C
\83R
\83\93
1155 TOOL_ICON_FAV_THREAD = 32; //
\82¨
\8bC
\82É
\93ü
\82è
\83X
\83\8c\83A
\83C
\83R
\83\93
1157 HTML_FILE_NAME = 'temp_preview.html';
1159 WM_XBUTTONDOWN = $020B;
1160 WM_XBUTTONUP = $020C;
1161 WM_XBUTTONDBLCLK = $020D;
1164 USER_TREECLICK = WM_USER + 2000;
1165 USER_RESIZED = WM_USER + 2001;
1166 USER_MINIMIZED = WM_USER + 2002;
1167 USER_SETLINKBAR = WM_USER + 2003;
1171 procedure TGikoForm.CreateParams(var Params: TCreateParams);
1174 if FormStyle in [fsNormal, fsStayOnTop] then begin
1175 if BorderStyle in [bsSingle, bsSizeable] then begin
1176 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1177 Params.WndParent := 0;
1182 procedure TGikoForm.FormCreate(Sender: TObject);
1184 TVS_NOTOOLTIPS = $0080;
1190 wp: TWindowPlacement;
1192 newbrowser: TWebBrowser;
1196 Writeln('============================================================');
1197 Writeln('
\83M
\83R
\83i
\83r
\83f
\83o
\83b
\83O
\83R
\83\93\83\
\81[
\83\8b');
1199 Writeln('
\82±
\82Ì
\89æ
\96Ê
\82ð
\95Â
\82¶
\82È
\82¢
\82Å
\82
\82¾
\82³
\82¢
\81B');
1200 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¢');
1201 Writeln('============================================================');
1203 Application.OnDeactivate := AppFormDeactivate;
1204 Self.OnDeactivate := AppFormDeactivate;
1205 Application.HookMainWindow(Hook);
1206 Application.OnMessage := HandleAppMessage;
1208 FTreeType := gttNone;
1210 FSearchDialog := nil;
1211 BrowserNullTab := TBrowserRecord.Create;
1212 BrowserNullTab.Browser := Browser;
1213 BrowserNullTab.Browser.Navigate(BLANK_HTML);
1214 FBrowsers := TList.Create;
1215 for i := 0 to 4 do begin
1216 newBrowser := TWebBrowser.Create(nil);
1217 TOleControl(newBrowser).Parent := BrowserPanel;
1218 TOleControl(newBrowser).Align := alClient;
1219 newBrowser.OnDocumentComplete := BrowserDocumentComplete;
1220 newBrowser.OnBeforeNavigate2 := BrowserBeforeNavigate2;
1221 newBrowser.OnEnter := BrowserEnter;
1222 newBrowser.OnNewWindow2 := BrowserNewWindow2;
1223 newBrowser.OnStatusTextChange := BrowserStatusTextChange;
1224 newBrowser.OnTitleChange := BrowserTitleChange;
1225 newBrowser.Navigate(BLANK_HTML);
1226 TOleControl(newBrowser).Visible := false;
1227 FBrowsers.Add(newBrowser);
1230 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô
1231 FIsIgnoreResize := True;
1233 //
\8eè
\82Ì
\83J
\81[
\83\
\83\8b
1234 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1237 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1238 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1240 //
\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Æ)
1241 InitializeBoardPlugIns;
1243 EnabledCloseButton := True;
1246 //
\8f\84\89ñ
\83f
\81[
\83^
\93Ç
\82Ý
\8d\9e\82Ý
1247 RoundList := TRoundList.Create;
1248 RoundList.LoadRoundBoardFile;
1250 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\97ñ
\8b\93(ReadFavorite
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1251 GikoSys.ListBoardFile;
1253 RoundList.LoadRoundThreadFile;
1255 if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
1256 GikoSys.ListBoardFile;
1258 //
\83\81\83j
\83\85\81[
\82É
\92Ç
\89Á
1261 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g(LoadHistory
\82æ
\82è
\82à
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1262 FHistoryList := TList.Create;
1264 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1267 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
1268 // FFavorite := TFavorite.Create(FavoriteTreeView);
1269 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1270 FavoriteDM.ReadFavorite;
1272 //
\83\8a\83X
\83g
\83X
\83^
\83C
\83\8b
1273 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1275 //
\83\81\83C
\83\93\83N
\81[
\83\8b\83o
\81[
\88Ê
\92u
1276 // MainCoolBar.Top := 0;
1277 // MainCoolBar.Left := 0;
1279 //
\83A
\83j
\83\81\83p
\83l
\83\8b\88Ê
\92u
1280 AnimePanel.Top := 0;
1281 AnimePanel.Left := 0;
1283 //
\8ae
\8eí
\89Â
\8e\8b\8fó
\91Ô
\82È
\82Ç
\90Ý
\92è
1285 //
\83L
\83\83\83r
\83l
\83b
\83g
1286 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1288 //
\83\81\83b
\83Z
\81[
\83W
\83o
\81[
1289 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1290 MsgBarVisibleActionExecute(nil);
1291 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1293 //
\83X
\83e
\81[
\83^
\83X
\83o
\81[
1294 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1295 StatusBarVisibleActionExecute(nil);
1297 //
\83t
\83H
\83\93\83g
\81E
\90F
\90Ý
\92è
1298 TreeView.Items.BeginUpdate;
1299 FavoriteTreeView.Items.BeginUpdate;
1300 ListView.Items.BeginUpdate;
1302 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1303 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1304 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1305 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1307 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1308 FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1309 FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1310 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1312 ListView.Font.Name := GikoSys.Setting.ListFontName;
1313 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1314 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1315 //ListView.Color := GikoSys.Setting.ListBackColor;
1316 ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1317 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1318 FOddColor := GikoSys.Setting.OddColor;
1321 TreeView.Items.EndUpdate;
1322 FavoriteTreeView.Items.EndUpdate;
1323 ListView.Items.EndUpdate;
1325 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1326 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1328 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
1329 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1330 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1331 FDragWFirst := false;
1332 SetContent(BrowserNullTab); //
\83u
\83\89\83E
\83U
\82ð
\8bó
\94\92\95\
\8e¦
1333 // TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
1334 // TreeView.Selected := TreeView.Items[0]; //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
1337 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95\9c\8c³
1338 wp.length := sizeof(wp);
1339 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1340 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1341 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1342 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1343 wp.showCmd := SW_HIDE;
1344 SetWindowPlacement(Handle, @wp);
1346 // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1347 // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1348 if GikoSys.Setting.WindowMax then
1349 WindowState := wsMaximized;
1351 //
\83M
\83R
\83A
\83j
\83\81
1353 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1354 if FileExists(FileName) then
1355 Animate.FileName := FileName;
1363 //
\83X
\83\8c\91S
\95\94\95\
\8e¦
\83{
\83^
\83\93\82ð
\89\9f\82³
\82ê
\82½
\8fó
\91Ô
\82É
\82·
\82é
1364 AllItemAction.Checked := True;
1365 AllResAction.Checked := True;
1367 //TreeView
\82Ì
\8e×
\96\82\8fL
\82¢ToolTip
\82ð
\94ñ
\95\
\8e¦
1368 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1369 Style := Style or TVS_NOTOOLTIPS;
1370 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1372 //
\83c
\83\8a\81[
\82ð
\83\81\83C
\83\93\82¾
\82¯
\95\
\8e¦
\82É
\82µ
\82Ä
\8dÅ
\91å
\89»
1373 TreeView.Align := alClient;
1374 FavoriteTreeView.Align := alClient;
1375 FavoriteTreeView.Visible := False;
1377 //
\83u
\83\89\83E
\83U
\83T
\83C
\83Y
\95Ï
\8dX
\82Ì
\8f\89\8aú
\89»
1378 // FBrowserSizeFlag := False;
1379 // FBrowserSizeHeight := ViewPanel.Height;
1381 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1382 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1384 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1385 ArrangeAction.Execute;
1387 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1388 case GikoSys.Setting.ListWidthState of
1390 ViewPanel.Width := 1;
1391 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1392 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1395 ViewPanel.Width := GikoSys.Setting.ListWidth;
1396 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1397 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1400 ViewPanel.Width := GikoSys.Setting.ListWidth;
1401 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1402 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1406 case GikoSys.Setting.ListHeightState of
1408 ViewPanel.Height := 1;
1409 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1410 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1413 ViewPanel.Height := GikoSys.Setting.ListHeight;
1414 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1415 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1418 ViewPanel.Height := GikoSys.Setting.ListHeight;
1419 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1420 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1425 //
\83v
\83\8d\83O
\83\8c\83X
\83o
\81[
\82Ì
\8f\89\8aú
\89»
1426 // ProgressBar.Visible := False;
1427 ProgressBar.Parent := StatusBar;
1428 ProgressBar.Top := 2;
1429 ProgressBar.Left := 0;
1430 ProgressBar.Width := StatusBar.Panels[0].Width;
1431 ProgressBar.Height := StatusBar.Height - 2;
1432 ProgressBar.Position := 0;
1434 //
\83_
\83E
\83\93\83\8d\81[
\83h
\83I
\83u
\83W
\83F
\83N
\83g
1435 FControlThread := TThreadControl.Create(True);
1436 FControlThread.MaxThreadCount := 1;
1437 FControlThread.Resume;
1438 FControlThread.OnDownloadEnd := DownloadEnd;
1439 FControlThread.OnDownloadMsg := DownloadMsg;
1440 FControlThread.OnWork := Work;
1441 FControlThread.OnWorkBegin := WorkBegin;
1442 FControlThread.OnWorkEnd := WorkEnd;
1443 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1445 //
\8di
\8d\9e\8c\9f\8dõ
\97\9a\97ð
1446 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1448 //
\83u
\83\89\83E
\83U
\83^
\83u
\90Ý
\92è
1451 BrowserBoardNameLabel.Caption := '';
1452 BrowserNameLabel.Caption := '';
1455 FTabHintIndex := -1;
1457 //
\83\8a\83\93\83N
\83o
\81[
1460 //
\83\81\83j
\83\85\81[
\83t
\83H
\83\93\83g
1463 //
\83c
\81[
\83\8b\83o
\81[Wrapable
1464 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1465 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1467 KeepDefaultToolButton(StdToolBar, TmpToolBar);
1468 KeepDefaultToolButton(ListToolBar, TmpToolBar);
1469 KeepDefaultToolButton(BrowserToolBar, TmpToolBar);
1471 MakeDefaultINIFile();
1472 //
\83c
\81[
\83\8b\83{
\83^
\83\93\93Ç
\82Ý
\8d\9e\82Ý
1473 ReadToolBarSetting(ActionList, StdToolBar);
1474 ReadToolBarSetting(ActionList, ListToolBar);
1476 for i := ListToolBar.ControlCount - 1 downto 0 do
1478 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1480 //
\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·
1481 if (i + 1) < ListToolBar.ControlCount then
1482 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1483 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1484 ListToolBar.Controls[ i + 1 ].Visible := False;
1486 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
1487 ListToolBar.Controls[ i ].Visible := False;
1488 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
1489 SelectComboBox.Parent := ListToolBar;
1490 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1491 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1492 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
1493 SelectComboBoxSplitter.Parent := ListToolBar;
1494 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1501 ReadToolBarSetting(ActionList, BrowserToolBar);
1503 OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes;
1504 //
\83A
\83h
\83\8c\83X
\83o
\81[
1505 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1507 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³
\82ÍFormShow
\82É
\88Ú
\93®
\82µ
\82½
1509 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\82ª
\96³
\82¢
\8fê
\8d\87\82Í
\83\81\83b
\83Z
\81[
\83W
\95\
\8e¦
1510 if not FileExists(GikoSys.GetBoardFileName) then begin
1511 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
1512 + '
\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
1513 + '
\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';
1514 MsgBox(SplashWindow.Handle, msg, '
\83M
\83R
\83i
\83r', MB_OK or MB_ICONINFORMATION);
1515 NewBoardAction.Execute;
1518 //
\83L
\81[
\90Ý
\92è
\93Ç
\82Ý
\8d\9e\82Ý
1519 GikoSys.LoadKeySetting(ActionList);
1521 //
\8dÅ
\8fI
\8f\84\89ñ
\8e\9e\8aÔ
1522 // FLastRoundTime := 0;
1525 FHint := TResPopup.Create(Self);
1527 //
\8dÅ
\8cã
\82É
\91I
\91ð
\82³
\82ê
\82½
\83L
\83\83\83r
\83l
\83b
\83g
\82Ì
\95\9c\8c³
1528 CabinetVisible( False );
1529 if GikoSys.Setting.CabinetVisible then begin
1530 i := CabinetSelectPopupMenu.Items.Count - 1;
1531 if GikoSys.Setting.CabinetIndex = i - 1 then
1532 CabinetHistoryAction.Execute
1533 else if GikoSys.Setting.CabinetIndex = i then
1534 CabinetFavoriteAction.Execute
1536 if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1537 ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1538 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô 2
1539 FIsIgnoreResize := True;
1540 CabinetBBSAction.Execute;
1543 ShowBBSTreeOld( BBSs[ 0 ] );
1544 PostMessage( Handle, USER_TREECLICK, 0, 0 );
1547 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô 3
1548 FIsIgnoreResize := True;
1550 //
\83I
\81[
\83g
\83\8d\83O
\83C
\83\93
1551 if GikoSys.Setting.AutoLogin then
1552 LoginAction.Execute;
1554 //
\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
1555 for i := 1 to ParamCount do begin
1556 MoveToURL(ParamStr(i));
1561 s := GikoSys.FAbon.NGwordname;
1562 StatusBar.Panels[2].Text := s;
1563 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1564 StatusBarResize(Sender);
1566 dummy1.Caption := ItemReservPMenu.Caption;
1567 dummy1.Hint := ItemReservPMenu.Hint;
1569 //Samba24
\82Ì
\83t
\83@
\83C
\83\8b\83`
\83F
\83b
\83N
1570 GikoSys.SambaFileExists();
1574 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82É
\95Û
\91¶
1575 procedure TGikoForm.SaveCoolBarSettings;
1581 if IsIconic( Handle ) or FIsIgnoreResize then
1584 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Main)
1585 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1586 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1587 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1588 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1589 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1591 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Board)
1592 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1593 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1594 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1595 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1596 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1598 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Browser)
1599 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1600 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1601 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1602 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1603 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1608 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82©
\82ç
\95\9c\8c³
1609 procedure TGikoForm.LoadCoolBarSettings;
1615 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Main)
1616 MainCoolBar.Bands.BeginUpdate;
1618 // for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1619 for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin
1620 CoolSet := GikoSys.Setting.MainCoolSet[i];
1621 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1622 FIsIgnoreResize := False;
1623 SaveCoolBarSettings;
1626 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1627 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1628 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1631 MainCoolBar.Bands.EndUpdate;
1634 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Board)
1635 ListCoolBar.Bands.BeginUpdate;
1637 // for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1638 for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin
1639 CoolSet := GikoSys.Setting.ListCoolSet[i];
1640 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1641 FIsIgnoreResize := False;
1642 SaveCoolBarSettings;
1645 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1646 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1647 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1650 ListCoolBar.Bands.EndUpdate;
1653 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Browser)
1654 BrowserCoolBar.Bands.BeginUpdate;
1656 // for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1657 for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
1658 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1659 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1660 FIsIgnoreResize := False;
1661 SaveCoolBarSettings;
1664 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1665 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1666 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1669 BrowserCoolBar.Bands.EndUpdate;
1677 procedure TGikoForm.FormShow(Sender: TObject);
1679 ShowWindow(Application.Handle, SW_HIDE);
1681 //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½
1682 //
\83c
\81[
\83\8b\83o
\81[
\95\
\8e¦
1683 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1684 StdToolBarVisibleActionExecute( nil );
1685 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1686 AddressBarVisibleActionExecute( nil );
1687 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1688 LinkBarVisibleActionExecute( nil );
1689 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1690 ListToolBarVisibleActionExecute( nil );
1691 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1692 ListNameBarVisibleActionExecute( nil );
1693 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1694 BrowserToolBarVisibleActionExecute( nil );
1695 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1696 BrowserNameBarVisibleActionExecute( nil );
1698 //
\83u
\83\89\83E
\83U
\83^
\83u
1699 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1700 BrowserTabVisibleActionExecute(nil);
1702 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1703 BrowserTabTopAction.Checked := True;
1704 BrowserTabTopActionExecute(nil);
1706 BrowserTabBottomAction.Checked := True;
1707 BrowserTabBottomActionExecute(nil);
1710 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1711 BrowserTabTabStyleAction.Checked := True;
1712 BrowserTabTabStyleActionExecute(nil);
1713 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1714 BrowserTabButtonStyleAction.Checked := True;
1715 BrowserTabButtonStyleActionExecute(nil);
1717 BrowserTabFlatStyleAction.Checked := True;
1718 BrowserTabFlatStyleActionExecute(nil);
1721 // CoolBar
\95\9c\8c³
1722 LoadCoolBarSettings;
1724 FIsIgnoreResize := False;
1727 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1729 SaveCoolBarSettings;
1730 if ( GikoSys.Setting.ShowDialogForEnd ) and
1731 (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
1737 //Application.HookMainWindow(Hook);
1738 Application.UnhookMainWindow(Hook);
1739 Application.Terminate;
1742 procedure TGikoForm.FormDestroy(Sender: TObject);
1745 // CoolSet: TCoolSet;
1746 wp: TWindowPlacement;
1748 // Application.OnDeactivate := nil;
1749 // Self.OnDeactivate := nil;
1752 if GetActiveList is TBBS then begin
1753 for i := 0 to ListView.Columns.Count - 1 do
1754 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1755 end else if GetActiveList is TCategory then begin
1756 for i := 0 to ListView.Columns.Count - 1 do
1757 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1758 end else if GetActiveList is TBoard then begin
1759 for i := 0 to ListView.Columns.Count - 1 do
1760 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1765 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95Û
\91¶
1766 wp.length := sizeof(wp);
1767 GetWindowPlacement(Handle, @wp);
1768 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1769 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1770 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1771 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1772 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1774 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1775 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1776 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1777 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1778 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1779 if ArrangeAction.Checked then
1780 GikoSys.Setting.ListOrientation := gloVertical
1782 GikoSys.Setting.ListOrientation := gloHorizontal;
1783 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1786 //
\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è
1787 //
\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¢
1789 //
\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
1791 if GikoForm.WindowState <> wsMinimized then
1792 SaveCoolBarSettings;
1795 GikoSys.Setting.WriteWindowSettingFile;
1796 GikoSys.Setting.WriteNameMailSettingFile;
1800 //
\82¨
\8bC
\82É
\93ü
\82è
\95Û
\91¶
1802 //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é
1803 FavoriteDM.WriteFavorite;
1809 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1810 BrowserNullTab.Thread := nil;
1811 BrowserTab.OnChange := nil;
1812 BrowserTab.Tabs.BeginUpdate;
1813 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
1814 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
1816 FActiveContent := nil;
1817 BrowserTab.Tabs.Clear;
1818 BrowserTab.Tabs.EndUpdate;
1819 BrowserTab.OnChange := BrowserTabChange;
1823 for i := FBrowsers.Count - 1 downto 0 do begin
1824 TWebBrowser(FBrowsers[i]).Free;
1827 FBrowsers.Capacity := 0;
1830 if BrowserNullTab <> nil then begin
1831 BrowserNullTab.Browser := nil; {*BrowserNullTab
\82ÌBrowser
\82Í
\90Ý
\8cv
\8e\9e\82É
\93\
\82è
\95t
\82¯
\82Ä
\82é
\93z
1832 *
\82È
\82Ì
\82Å
\82±
\82±
\82ÅFree
\82³
\82ê
\82é
\82Æ
\8d¢
\82é
\82Ì
\82Å
\82Í
\82¸
\82µ
\82Ä
\82µ
\82Ü
\82¤
\81B
1834 BrowserNullTab.Free;
1840 TreeView.Items.BeginUpdate;
1841 for i := TreeView.Items.Count - 1 downto 0 do begin
1842 TreeView.Items[i].Free;
1844 TreeView.Items.Clear;
1845 TreeView.Items.EndUpdate;
1849 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\95Û
\91¶
1851 //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
1852 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1856 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
\95Û
\91¶
1870 //
\8f\84\89ñ
\83\8a\83X
\83g
\95Û
\91¶&
\94j
\8aü
1872 RoundList.SaveRoundFile;
1886 FControlThread.Terminate;
1887 FControlThread.WaitFor;
1891 FControlThread.Free;
1894 // TBBS
\82Í
\95Û
\8e\9d\82µ
\82Ä
\82¢
\82é TCategory, TBoard, TThreadItem
\82·
\82×
\82Ä
\82ð
\8aJ
\95ú
\82·
\82é
1895 // 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Å
1896 // BoardPluteIns
\82Ì
\8aJ
\95ú
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ
1898 for i := Length( BBSs ) - 1 downto 0 do begin
1899 if BBSs[ i ] <> nil then
1907 for i := Length( BoardPlugIns ) - 1 downto 0 do begin
1908 if BoardPlugIns[ i ] <> nil then
1909 BoardPlugIns[ i ].Free;
1910 BoardPlugIns[ i ] := nil;
1916 if FEvent <> nil then
1920 if FHint <> nil then begin
1921 FHint.ReleaseHandle;
1926 if TPreviewBrowser <> nil then begin
1927 FPreviewBrowser.Free;
1928 FPreviewBrowser := nil;
1935 //
\83t
\83H
\81[
\83\80\83N
\83\8d\81[
\83Y
1936 procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1939 //
\83L
\83\83\83r
\83l
\83b
\83g
\81~
\83{
\83^
\83\93\83N
\83\8a\83b
\83N
1940 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1942 CabinetVisibleAction.Execute;
1943 // CabinetPanelVisible(false);
1946 //
\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
1947 procedure TGikoForm.SetBBSMenu;
1950 item : TBBSMenuItem;
1953 //
\83\81\83j
\83\85\81[
\82ð
\8dí
\8f\9c
1954 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1956 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1957 CabinetSelectPopupMenu.Items[ i ].Free;
1958 CabinetMenu.Items[ i ].Free;
1959 BBSSelectPopupMenu.Items[ i ].Free;
1965 //
\83\81\83j
\83\85\81[
\82ð
\90Ý
\92è
1966 for i := Length( BBSs ) - 1 downto 0 do begin
1968 item := TBBSMenuItem.Create( PopupMenu );
1969 item.Caption := BBSs[ i ].Title;
1970 item.Data := BBSs[ i ];
1971 item.OnClick := BBSMenuItemOnClick;
1972 CabinetSelectPopupMenu.Items.Insert( 0, item );
1973 item := TBBSMenuItem.Create( PopupMenu );
1974 item.Caption := BBSs[ i ].Title;
1975 item.Data := BBSs[ i ];
1976 item.OnClick := BBSMenuItemOnClick;
1977 CabinetMenu.Insert( 0, item );
1978 item := TBBSMenuItem.Create( PopupMenu );
1979 item.Caption := BBSs[ i ].Title;
1980 item.Data := BBSs[ i ];
1981 item.OnClick := BBSMenuItemOnClick;
1982 BBSSelectPopupMenu.Items.Insert( 0, Item );
1989 procedure TGikoForm.ReloadBBS;
1993 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1994 NotSelectTabCloseAction.Execute;
1995 //if BrowserTab.Tabs.Count >= 1 then
1996 // for i := BrowserTab.Tabs.Count - 1 downto 0 do
1997 // DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[i]));
1998 BrowserTabCloseAction.Execute;
1999 //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
2000 TreeView.Items.Clear;
2004 for i := Length( BBSs ) - 1 downto 0 do begin
2005 if BBSs[ i ] <> nil then
2014 FTreeType := gttNone;
2016 GikoSys.ListBoardFile; //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\93Ç
\8d\9e
2018 // BBS
\83\81\83j
\83\85\81[
\82Ì
\8dX
\90V
2021 ShowBBSTree( BBSs[ 0 ] );
2023 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
2028 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
2029 FavoriteDM.WriteFavorite;
2031 FavoriteDM.ReadFavorite;
2037 //
\83{
\81[
\83h
\83c
\83\8a\81[
\90Ý
\92è
2038 procedure TGikoForm.SetBoardTreeNode(
2044 CategoryNode: TTreeNode;
2045 BoardNode: TTreeNode;
2046 Category: TCategory;
2049 //
\94Â
\83\8a\83X
\83g
\82Ì
\90Ý
\92è
2050 FActiveBBS := inBBS;
2051 TreeView.Items.BeginUpdate;
2052 TreeView.Items.Clear;
2054 if not inBBS.IsBoardFileRead then
2055 GikoSys.ReadBoardFile( inBBS );
2057 if SplashWindow <> nil then
2058 SplashWindow.ProgressBar.Max := inBBS.Count;
2062 Root := TreeView.Items.Add( nil, inBBS.Title );
2063 Root.ImageIndex := ITEM_ICON_2CH1;
2064 Root.SelectedIndex := ITEM_ICON_2CH2;
2066 for i := 0 to inBBS.Count - 1 do begin
2067 Category := TCategory(inBBS.Items[i]);
2068 CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
2069 CategoryNode.Data := Category;
2070 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
2071 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
2073 for j := 0 to Category.Count - 1 do begin
2074 Board := TBoard(Category.Items[j]);
2076 BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
2077 BoardNode.Data := Board;
2078 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
2079 if not Board.IsLogFile then begin
2080 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
2081 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
2083 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
2084 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
2085 for k := 0 to Board.Count - 1 do begin
2086 if Board.Items[ k ].IsLogFile then begin
2087 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
2088 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
2097 CategoryNode.Expanded := Category.NodeExpand;
2099 if SplashWindow <> nil then begin
2100 SplashWindow.ProgressBar.StepIt;
2101 Application.ProcessMessages;
2105 TreeView.Items.EndUpdate;
2109 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
2111 COLUMN: array[0..0] of string = ('
\83J
\83e
\83S
\83\8a\96¼');
2113 ListColumn: TListColumn;
2116 ListView.Items.BeginUpdate;
2118 Screen.Cursor := crHourGlass;
2120 ListView.Columns.Clear;
2121 for i := 0 to Length(COLUMN) - 1 do begin
2122 ListColumn := ListView.Columns.Add;
2123 ListColumn.Caption := COLUMN[i];
2124 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
2127 ListView.Items.Count := 0;
2128 ListView.Items.Clear;
2129 ListView.Items.Count := ABBS2ch.Count;
2131 // UpFolderAction.Enabled := False;
2132 // AllItemAction.Enabled := False;
2133 // LogItemAction.Enabled := False;
2134 // NewItemAction.Enabled := False;
2135 // SelectItemAction.Enabled := False;
2136 // ListDownloadToolButton.Enabled := False;
2137 // BoardReservToolButton.Enabled := False;
2138 // ListThreadDownloadToolButton.Enabled := False;
2140 ListNameLabel.Caption := ABBS2ch.Title;
2141 FolderImage.Picture := nil;
2142 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
2145 FSortOrder := False;
2146 ListViewColumnClick(nil, ListView.Column[0]);
2148 Result := ABBS2ch.Count;
2150 Screen.Cursor := crDefault;
2151 ListView.Items.EndUpdate;
2155 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
2157 COLUMN: array[0..2] of string = ('
\94Â
\96¼', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e');
2159 ListColumn: TListColumn;
2162 ListView.Items.BeginUpdate;
2164 Screen.Cursor := crHourGlass;
2166 ListView.Columns.Clear;
2167 for i := 0 to Length(COLUMN) - 1 do begin
2168 ListColumn := ListView.Columns.Add;
2169 ListColumn.Caption := COLUMN[i];
2170 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
2173 ListView.Items.Count := 0;
2174 ListView.Items.Clear;
2175 ListView.Items.Count := Category.Count;
2177 // UpFolderAction.Enabled := True;
2178 // AllItemAction.Enabled := False;
2179 // LogItemAction.Enabled := False;
2180 // NewItemAction.Enabled := False;
2181 // SelectItemAction.Enabled := False;
2182 // ListDownloadToolButton.Enabled := False;
2183 // BoardReservToolButton.Enabled := False;
2184 // ListThreadDownloadToolButton.Enabled := False;
2186 ListNameLabel.Caption := Category.Title;
2187 FolderImage.Picture := nil;
2188 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2191 FSortOrder := False;
2192 ListViewColumnClick(nil, ListView.Column[0]);
2194 Result := Category.Count;
2196 Screen.Cursor := crDefault;
2197 ListView.Items.EndUpdate;
2201 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2203 COLUMN: array[0..7] of string = ('
\83X
\83\8c\83b
\83h
\96¼', '
\83J
\83E
\83\93\83g', '
\8eæ
\93¾', '
\90V
\92\85',
2204 '
\96¢
\93Ç', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e', '
\83X
\83\8c\8dì
\90¬
\93ú
\8e\9e');
2205 COLUMN_ALIGNMENT: array[0..7] of TAlignment = (taLeftJustify, taRightJustify,
2206 taRightJustify, taRightJustify,
2207 taRightJustify, taLeftJustify,
2208 taLeftJustify, taLeftJustify);
2209 //No,
\83X
\83\8c\83b
\83h
\96¼,
\83J
\83E
\83\93\83g,
\8f\84\89ñ
\97\
\96ñ,
\8eæ
\93¾
\93ú
\8e\9e
2211 ListColumn: TListColumn;
2214 ListView.Items.BeginUpdate;
2216 Screen.Cursor := crHourGlass;
2218 //
\83`
\83\89\82Â
\82«
\96h
\8e~
\82Ì
\82½
\82ß
\81A
\95Ï
\8dX
\82³
\82ê
\82Ä
\82¢
\82é
\8fê
\8d\87\82Ì
\82Ý
2219 //
\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Ó
2220 if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2222 ListView.Columns.Clear;
2223 for i := 0 to Length(COLUMN) - 1 do begin
2224 ListColumn := ListView.Columns.Add;
2225 ListColumn.Caption := COLUMN[i];
2226 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2227 ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2231 ListView.Items.Count := 0;
2232 ListView.Items.Clear;
2234 case GikoForm.ViewType of
2235 gvtAll: ListView.Items.Count := Board.Count;
2236 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2237 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2238 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2241 ListNameLabel.Caption := Board.Title;
2242 FolderImage.Picture := nil;
2243 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2246 FSortOrder := False;
2247 ListViewColumnClick(nil, ListView.Column[0]);
2249 Result := Board.Count;
2251 Screen.Cursor := crDefault;
2252 ListView.Items.EndUpdate;
2256 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2258 // FileName: string;
2259 // DateTime: TDateTime;
2262 Category: TCategory;
2264 ThreadItem: TThreadItem;
2266 ActivListObj : TObject;
2268 ActivListObj := ActiveList;
2269 if ActivListObj is TBBS then begin
2270 BBS := TBBS(ActivListObj);
2272 ListView.StateImages := nil;
2274 if BBS = nil then Exit;
2275 if BBS.Count <= 0 then Exit;
2276 if Item = nil then Exit;
2277 if Item.Index >= BBS.Count then Exit;
2278 if ListView.Items.Count = 0 then Exit;
2280 if not (BBS.Items[Item.index] is TCategory) then Exit;
2281 Category := TCategory(BBS.Items[Item.index]);
2283 if Category = nil then Exit;
2285 if ListNumberVisibleAction.Checked then
2286 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2288 Item.Caption := Category.Title;
2290 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2291 Item.Data := Category;
2292 end else if ActivListObj is TCategory then begin
2293 Category := TCategory(ActivListObj);
2295 ListView.StateImages := nil;
2297 if Category = nil then Exit;
2298 if Category.Count <= 0 then Exit;
2299 if Item = nil then Exit;
2300 if Item.Index >= Category.Count then Exit;
2301 if ListView.Items.Count = 0 then Exit;
2303 if not (Category.Items[Item.Index] is TBoard) then Exit;
2304 Board := TBoard(Category.Items[Item.Index]);
2306 if Board = nil then Exit;
2308 if ListNumberVisibleAction.Checked then
2309 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2311 Item.Caption := Board.Title;
2313 if Item.SubItems.Count <> 2 then begin
2314 Item.SubItems.Clear;
2315 Item.SubItems.Add('');
2316 Item.SubItems.Add('');
2319 Item.ImageIndex := ITEM_ICON_BOARD1;
2322 Item.SubItems[0] := Board.RoundName // '
\97\
\96ñ'
2324 Item.SubItems[0] := '';
2326 if Board.RoundDate = ZERO_DATE then begin
2327 Item.SubItems[1] := '';
2329 Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2331 end else if ActivListObj is TBoard then begin
2332 Board := TBoard(ActivListObj);
2334 if GikoSys.Setting.ListIconVisible then
2335 ListView.StateImages := StateIconImageList
2337 ListView.StateImages := nil;
2339 case GikoForm.ViewType of
2340 gvtAll: BoardCnt := Board.Count;
2341 gvtLog: BoardCnt := Board.GetLogThreadCount;
2342 gvtNew: BoardCnt := Board.GetNewThreadCount;
2343 gvtUser: BoardCnt := Board.GetUserThreadCount;
2348 // if Board = nil then Exit;
2349 if BoardCnt <= 0 then Exit;
2350 if Item = nil then Exit;
2351 if Item.Index > BoardCnt then Exit;
2352 if ListView.Items.Count = 0 then Exit;
2354 // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2357 case GikoForm.ViewType of
2358 gvtAll: if Item.Index >= Board.Count then Exit else
2359 ThreadItem := TThreadItem(Board.Items[Item.Index]);
2360 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2361 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2362 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2365 if ThreadItem = nil then Exit;
2367 // if ListNumberVisibleAction.Checked then
2368 // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2370 RepStr := ThreadItem.Title;
2371 RepStr := CustomStringReplace(RepStr, '<', '<' );
2372 RepStr := CustomStringReplace(RepStr, '>', '>' );
2373 RepStr := CustomStringReplace(RepStr, '"', '"' );
2374 RepStr := CustomStringReplace(RepStr, '&', '&' );
2375 //RepStr := StringReplace(RepStr, '
\81\97\81M', ',', [rfReplaceAll]);
2377 if Item.SubItems.Count <> 7 then begin
2378 Item.SubItems.Clear;
2379 Item.SubItems.Add('');
2380 Item.SubItems.Add('');
2381 Item.SubItems.Add('');
2382 Item.SubItems.Add('');
2383 Item.SubItems.Add('');
2384 Item.SubItems.Add('');
2385 Item.SubItems.Add('');
2388 if ListNumberVisibleAction.Checked then
2389 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2391 Item.Caption := RepStr;
2393 case ThreadItem.AgeSage of
2394 gasNone: Item.StateIndex := -1;
2395 gasNew: Item.StateIndex := 0;
2396 gasAge: Item.StateIndex := 1;
2397 gasSage: Item.StateIndex := 2;
2400 if ThreadItem.IsLogFile then begin
2401 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2402 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2403 Item.SubItems[1] := IntToStr(ThreadItem.Count);
2404 if ThreadItem.NewResCount = 0 then
2405 Item.SubItems[2] := ''
2407 Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2408 Item.SubItems[3] := '';
2409 if ThreadItem.Round then
2410 Item.SubItems[4] := ThreadItem.RoundName
2412 Item.SubItems[4] := '';
2413 if ThreadItem.RoundDate = ZERO_DATE then begin
2414 Item.SubItems[5] := '';
2416 Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2417 if ThreadItem.NewArrival then
2418 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2419 if ThreadItem.CreateDate = ZERO_DATE then begin
2420 Item.SubItems[6] := '';
2422 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2425 Item.ImageIndex := ITEM_ICON_THREAD1;
2426 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2427 Item.SubItems[1] := '';
2428 Item.SubItems[2] := '';
2429 Item.SubItems[3] := '';
2430 Item.SubItems[4] := '';
2431 Item.SubItems[5] := '';
2432 if not GikoSys.Setting.CreationTimeLogs then
2433 if ThreadItem.CreateDate = ZERO_DATE then
2434 Item.SubItems[6] := ''
2436 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2440 Item.Data := ThreadItem;
2444 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2445 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2446 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2447 var Index: Integer);
2453 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2459 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2460 EndIndex: Integer; OldState, NewState: TItemStates);
2465 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2473 threadItem : TThreadItem;
2475 Protocol, Host, Path, Document, Port, Bookmark: string;
2480 ActiveFileName: string;
2488 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) and (Assigned(FActiveContent.Browser.Document)) then begin
2489 while (FActiveContent.Browser.ReadyState <> READYSTATE_COMPLETE) and
2490 (FActiveContent.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
2491 Application.ProcessMessages;
2493 if LowerCase(OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).charset) <> 'shift_jis' then begin
2494 OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).charset := 'shift_jis';
2501 if PreviewTimer.Enabled then
2502 PreviewTimer.Enabled := False;
2503 Application.CancelHint;
2504 if GetActiveContent <> nil then
2505 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2507 ActiveFileName := '';
2509 StatusBar.Panels[1].Text := Text;
2511 if FHint <> nil then begin
2512 FHint.ReleaseHandle;
2515 if FPreviewBrowser <> nil then
2516 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2518 if not GikoSys.Setting.UnActivePopup then
2519 if not GikoForm.Active then
2522 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2523 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2526 Ext := AnsiLowerCase(ExtractFileExt(Text));
2527 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2528 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2529 if FPreviewBrowser = nil then begin
2530 FPreviewBrowser := TPreviewBrowser.Create(Self);
2531 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2532 TOleControl(FPreviewBrowser).Parent := nil;
2534 FPreviewBrowser.Navigate('about:blank');//
\91O
\89ñ
\82Ì
\83v
\83\8c\83r
\83\85\81[
\89æ
\91\9c\8fÁ
\8b\8e\97p
2535 FPreviewURL := Text;
2536 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2537 PreviewTimer.Enabled := True;
2538 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2539 if Pos('mailto:', Text) = 1 then begin
2540 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2541 //
\83M
\83R
\83i
\83r
\83X
\83\8c \83p
\81[
\83g3
\82Ì466
\8e\81\82É
\8a´
\8eÓ
2543 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2544 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2545 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2546 if (Assigned(e)) then begin
2547 tmp2 := ZenToHan(e.Get_outerText);
2548 if (GikoSys.IsNumeric(tmp2)) then begin
2549 //
\82\93\82Í
\83\8c\83X
\94Ô
\8d\86\82Á
\82Û
\82¢
\82Á
\82·
\81B
2550 wkIntSt := StrToInt(tmp2);
2551 wkIntTo := StrToInt(tmp2);
2552 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2553 FHint.PopupType := gptThread;
2554 SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False);
2556 FHint.PopupType := gptRaw;
2561 if Pos('about:blank..', Text) = 1 then begin
2562 threadItem := GetActiveContent;
2563 if AnsiPos('http://jbbs.shitaraba.com/', threadItem.URL) <> 0 then begin
2564 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2565 Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo);
2566 if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then
2567 buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo)
2568 else if( PathRec.FSt <> 0 ) then
2569 buf := IntToStr(PathRec.FSt);
2570 end else if AnsiPos('machi.to/bbs/', threadItem.URL) <> 0 then begin
2571 URL := threaditem.URL;
2572 buf := Copy(Text,AnsiPos('&st=',Text),Length(Text)-AnsiPos('&st=',Text) + 1);
2574 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2575 buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text));
2581 PathRec := Gikosys.Parse2chURL2(URL);
2582 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2583 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
2585 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
2587 URL := GikoSys.GetBrowsableThreadURL( URL );
2588 wkIntSt := PathRec.FSt;
2589 wkIntTo := PathRec.FTo;
2591 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2594 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2596 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2598 end else if wkIntSt > wkIntTo then begin
2603 //if wkIntSt = 0 then
2605 //if wkINtTo = 0 then
2607 //if PathRec.FFirst then
2609 if PathRec.FStBegin then
2611 if PathRec.FToEnd then
2614 //ATitle := ActiveFileName <> PathRec.FKey;
2615 if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
2620 threadItem := BBSsFindThreadFromURL( URL );
2622 if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
2623 board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
2624 if board <> nil then begin
2625 if not board.IsThreadDatRead then
2626 GikoSys.ReadSubjectFile( board );
2627 threadItem := board.FindThreadFromFileName( PathRec.FKey + '.dat' );
2631 if threadItem <> nil then begin
2632 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2633 FHint.PopupType := gptThread;
2634 SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2640 // ShowTextPopup(s);
2641 if FHint.PopupType = gptRaw then begin
2642 if FHint.Caption <> '' then
2645 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2651 procedure TGikoForm.BrowserTitleChange(Sender: TObject;
2652 const Text: WideString);
2656 if (Text = BLANK_HTML) or (Text = GikoSys.GetHtmlTempFileName) then
2657 Title := CAPTION_NAME
2659 Title := CAPTION_NAME + ' - [' + Text + ']';
2661 //Application.Title := Title;
2664 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2667 //SysMenuApp: HMenu;
2669 FEnabledCloseButton := Enabled;
2670 SysMenu := GetSystemMenu(Handle, False);
2671 //SysMenuApp := GetSystemMenu(Application.Handle, False);
2673 if Enabled then begin
2674 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2675 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2677 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2678 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2681 DrawMenuBar(Handle);
2682 //DrawMenuBar(Application.Handle);
2685 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2686 var AllowChange: Boolean);
2688 if FTreeType = gtt2ch then
2692 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2693 Shift: TShiftState);
2695 if GetActiveList is TBoard then begin
2696 if Key = VK_BACK then begin
2697 // UpFolderButtonClick(Sender);
2698 end else if Key = VK_SPACE then begin
2699 ListDoubleClick(Shift);
2700 end else if Key = VK_RETURN then begin
2703 end else begin // TBBS, TCategory
2704 if Key = VK_BACK then begin
2705 // UpFolderButtonClick(Sender);
2706 end else if Key = VK_SPACE then begin
2708 end else if Key = VK_RETURN then begin
2709 ListDoubleClick(Shift);
2714 function TGikoForm.GetHttpState: Boolean;
2716 Result := FHttpState;
2719 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2720 Column: TListColumn);
2724 wkCategory: TCategory;
2727 if FSortIndex = Column.Index then
2728 FSortOrder := not FSortOrder
2730 FSortOrder := False;
2732 for i := 0 to ListView.Columns.Count - 1 do
2733 ListView.Column[i].ImageIndex := -1;
2735 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
2737 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
2739 Sort.SortNoFlag := ListNumberVisibleAction.Checked;
2741 //if TObject(TreeView.Selected.Data) is TBBS then begin
2742 if TObject( FActiveList ) is TBBS then begin
2743 //wkBBS := TBBS(TreeView.Selected.Data);
2744 wkBBS := TBBS( FActiveList );
2745 Sort.SortOrder := FSortOrder;
2746 Sort.SortIndex := Column.Index;
2747 wkBBS.Sort(CategorySortProc);
2749 //end else if TObject(TreeView.Selected.Data) is TCategory then begin
2750 end else if TObject( FActiveList ) is TCategory then begin
2751 //wkCategory := TCategory(TreeView.Selected.Data);
2752 wkCategory := TCategory( FActiveList );
2753 Sort.SortOrder := FSortOrder;
2754 Sort.SortIndex := Column.Index;
2755 wkCategory.CustomSort(BoardSortProc);
2757 //end else if TObject(TreeView.Selected.Data) is TBoard then begin
2758 end else if TObject( FActiveList ) is TBoard then begin
2759 //wkBoard := TBoard(TreeView.Selected.Data);
2760 wkBoard := TBoard( FActiveList );
2761 Sort.SortOrder := FSortOrder;
2762 Sort.SortIndex := Column.Index;
2763 wkBoard.CustomSort(ThreadItemSortProc);
2766 FSortIndex := Column.Index;
2769 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2770 Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean);
2774 DefaultDraw := True;
2776 DefaultDraw := False;
2777 if (cdsSelected in State) or (cdsHot in State) then begin
2778 Sender.Canvas.Brush.Color := clHighlight;
2779 Sender.Canvas.Font.Color := clHighlightText;
2781 Sender.Canvas.Brush.Color := clBtnFace;
2782 Sender.Canvas.Font.Color := clBtnText;
2784 ARect := Rect(Button.Left, Button.Top, Button.Left + Button.Width, Button.Top + Button.Height);
2785 Sender.Canvas.FillRect(ARect);
2786 DrawText(Sender.Canvas.Handle, PChar(Button.Caption), -1, ARect, DT_SINGLELINE or DT_VCENTER or DT_CENTER);
2789 function TGikoForm.GetTreeNode(Data: TObject): TTreeNode;
2794 Nodes := TreeView.Items;
2796 for i := 0 to Nodes.Count - 1 do begin
2797 if Nodes.Item[i].Data = Data then begin
2798 Result := Nodes.Item[i];
2805 procedure TGikoForm.BrowserBeforeNavigate2(Sender: TObject;
2806 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
2807 Headers: OleVariant; var Cancel: WordBool);
2812 kMenuName: string = 'menu:';
2815 if Pos(kMenuName, URL) <> 0 then begin
2816 sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
2818 if not GikoSys.IsNumeric(sNo) then Exit;
2822 KokoPopupMenu.Tag := StrToInt(sNo);
2823 KokoPopupMenu.Popup(p.x, p.y);
2824 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
2825 Cancel := not GikoSys.Setting.OpenMailer;
2830 procedure TGikoForm.ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
2831 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
2832 var DefaultDraw: Boolean);
2834 ThreadItem: TThreadItem;
2836 // TListView(Sender).Canvas.Font.Style := [];
2837 if TObject(Item.Data) is TThreadItem then begin
2838 ThreadItem := TThreadItem(Item.Data);
2839 if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
2840 ListView.Canvas.Brush.Color := FOddColor;
2842 ListView.Canvas.Brush.Color := FListViewBackGroundColor;
2844 // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
2845 if ThreadItem.UnRead then
2846 TListView(Sender).Canvas.Font.Style := [fsBold];
2850 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
2852 Application.ProcessMessages;
2853 if Application.Terminated then
2855 if PreviewTimer.Enabled then
2856 PreviewTimer.Enabled := False;
2857 //
\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
2858 if FHint <> nil then begin
2859 FHint.ReleaseHandle;
2864 if FPreviewBrowser <> nil then
2865 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2869 procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
2870 const ARect: TRect; var DefaultDraw: Boolean);
2874 IsBoardNode: Boolean;
2880 Category: TCategory;
2884 DefaultDraw := True;
2886 if FTreeType = gttHistory then Exit;
2888 TreeView.Canvas.Font.Color := clBlue;
2889 IsBoardNode := False;
2890 for i := 0 to TreeView.Items.Count - 1 do begin
2892 if not TreeView.Items[i].IsVisible then
2895 if TObject(TreeView.Items[i].Data) is TCategory then begin
2896 if TreeView.Items[i].Expanded then
2899 IsBoardNode := False;
2900 Category := TCategory(TreeView.Items[i].Data);
2901 for j := 0 to Category.Count - 1 do begin
2902 Board := Category.Items[j];
2903 if Board <> nil then begin
2904 if Board.UnRead > 0 then begin
2912 end else if TObject(TreeView.Items[i].Data) is TBoard then begin
2913 IsBoardNode := True;
2914 Board := TBoard(TreeView.Items[i].Data);
2915 Cnt := Board.UnRead;
2921 Bitmap := TBitmap.Create;
2923 Bitmap.Canvas.Font.Assign(TreeView.Canvas.Font);
2924 Bitmap.Canvas.Font.Style := [fsBold];
2925 NodeWidth := Bitmap.Canvas.TextWidth(TreeView.Items[i].Text);
2930 NodeRect := TreeView.Items[i].DisplayRect(True);
2933 CntText := '(' + IntToStr(Cnt) + ')'
2934 else if Cnt = 1 then
2938 TextWidth := TreeView.Canvas.TextWidth(CntText);
2940 TextRect := Rect(NodeRect.Left + NodeWidth + 8,
2942 NodeRect.Left + NodeWidth + TextWidth + 8,
2944 DrawText(TreeView.Canvas.Handle,
2948 DT_SINGLELINE or DT_VCENTER);
2950 TreeViewCustomDrawItem(nil, nil, [], DefaultDraw);
2953 procedure TGikoForm.TreeViewCustomDrawItem(Sender: TCustomTreeView;
2954 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
2957 Category: TCategory;
2960 DefaultDraw := True;
2962 if FTreeType = gttHistory then Exit;
2964 TreeView.Canvas.Font.Style := [];
2965 if Node <> nil then begin
2966 if TObject(Node.Data) is TCategory then begin
2967 Category := TCategory(Node.Data);
2968 for i := 0 to Category.Count - 1 do begin
2969 Board := Category.Items[i];
2970 if Board <> nil then begin
2971 if Board.UnRead > 0 then begin
2972 TreeView.Canvas.Font.Style := [fsBold];
2977 end else if TObject(Node.Data) is TBoard then begin
2978 Board := TBoard(Node.Data);
2979 if Board.UnRead > 0 then
2980 TreeView.Canvas.Font.Style := [fsBold];
2985 procedure TGikoForm.TreeViewExpanded(Sender: TObject; Node: TTreeNode);
2987 TreeView.Invalidate;
2989 if TObject(Node.Data) is TBBS then begin
2990 TBBS(Node.Data).NodeExpand := True;
2991 end else if TObject(Node.Data) is TCategory then begin
2992 TCategory(Node.Data).NodeExpand := True;
2993 end else if TObject(Node.Data) is TBoard then begin
2994 TBoard(Node.Data).NodeExpand := True;
2998 {procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
3000 TreeSplitter.Visible := PanelVisible;
3001 CabinetPanel.Visible := PanelVisible;
3002 CabinetToolButton.Down := PanelVisible;
3005 procedure TGikoForm.ListViewAllSelect;
3011 procedure TGikoForm.TreeViewDblClick(Sender: TObject);
3016 GetCursorPos(APoint);
3017 APoint := TreeView.ScreenToClient(APoint);
3018 HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
3019 if not (htOnLabel in HitTest) then Exit;
3021 TreeDoubleClick( TreeView.Selected );
3024 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
3026 AddMessageList(Msg, nil, Icon);
3029 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
3033 boardPlugIn : TBoardPlugIn;
3037 if Item.DownType = gdtBoard then
3038 ATitle := Item.Board.Title
3040 ATitle := Item.ThreadItem.Title;
3042 ATitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j';
3044 if Item.State in [gdsComplete, gdsDiffComplete] then begin
3046 if Item.DownType = gdtBoard then begin
3049 AddMessageList(ATitle + ' [
\83X
\83\8c\88ê
\97\97\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3050 if GetActiveList = Item.Board then begin
3052 SetActiveList(Item.Board);
3054 Item.Board.Modified := True;
3055 Item.Board.IsThreadDatRead := True;
3057 end else if Item.DownType = gdtThread then begin
3060 Item.ThreadItem.NewArrival := True;
3061 if (Item.ThreadItem.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin
3062 boardPlugIn := Item.ThreadItem.BoardPlugIn;
3063 Item.ThreadItem.Title := GikoSys.DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 )).FTitle;
3064 ATitle := Item.ThreadItem.Title;
3065 end else if ATitle = '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j' then begin
3066 ATitle := GikoSys.DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1)).FTitle;
3068 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
3069 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then
3070 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
3072 if GetActiveContent = Item.ThreadItem then
3073 InsertBrowserTab(Item.ThreadItem)
3074 else if (ListView.Selected <> nil ) and ( TObject(ListView.Selected.Data) is TThreadItem ) and ( Item.ThreadItem = TThreadItem(ListView.Selected.Data)) then
3075 InsertBrowserTab(Item.ThreadItem, True)
3077 InsertBrowserTab(Item.ThreadItem, False);
3079 if Item.State = gdsComplete then begin
3081 AddMessageList(ATitle + ' [
\83X
\83\8c\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3083 PlaySound('NewDiff');
3084 AddMessageList(ATitle + ' [
\83X
\83\8c\8d·
\95ª
\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3087 //
\8f\84\89ñ
\82 \82è
\82Ì
\8fê
\8d\87\81\95\82P
\82O
\82O
\82O
\92´
\82Í
\8f\84\89ñ
\8dí
\8f\9c
3088 if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin
3089 Item.ThreadItem.Round := False;
3090 Item.ThreadItem.RoundName := '';
3091 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);
3097 end else if Item.State = gdsNotModify then begin
3099 { if (Item.DownType = gdtThread) and (AddHistory(Item.ThreadItem)) then begin
3100 //SetContent(Item.ThreadItem);
3101 InsertBrowserTab(Item.ThreadItem);
3103 AddMessageList(ATitle + ' [
\96¢
\8dX
\90V]', nil, gmiSAD);
3104 PlaySound('NoChange');
3105 Screen.Cursor := crDefault;
3106 end else if Item.State = gdsAbort then begin
3108 AddMessageList(ATitle + ' [
\92\86\92f]', nil, gmiSAD);
3109 end else if Item.State = gdsError then begin
3114 AddMessageList(ATitle + ' [
\83G
\83\89\81[(' + IntToStr(Item.ResponseCode) + s + ')]', nil, gmiNG);
3115 // if Item.ResponseCode = 302 then
3116 // 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);
3122 if FWorkCount < 0 then FWorkCount := 0;
3123 if FWorkCount = 0 then begin
3125 Animate.Active := False;
3127 Screen.Cursor := crDefault;
3134 procedure TGikoForm.WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
3136 // SetProgressValue(Number, 0, AWorkCountMax);
3137 // ProgressBar.Visible := True;
3138 ProgressBar.Position := 0;
3139 ProgressBar.Max := AWorkCountMax;
3140 FDownloadTitle := AWorkTitle;
3141 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ð
\8aJ
\8en
\82µ
\82Ü
\82·';
3142 FDownloadMax := AWorkCountMax;
3145 procedure TGikoForm.WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
3147 ProgressBar.Position := 0;
3148 if FDownloadMax <> 0 then
3149 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ª
\8a®
\97¹
\82µ
\82Ü
\82µ
\82½';
3152 procedure TGikoForm.Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
3154 ProgressBar.Position := AWorkCount;
3155 // SetProgressValue(Number, AWorkCount);
3156 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86 (' + IntToStr(AWorkCount) + '/' + IntToStr(FDownloadMax) + ')';
3160 procedure TGikoForm.SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
3162 Component: TComponent;
3164 Component := FindComponent('ProgressBar' + IntToStr(Number + 1));
3165 if Component <> nil then begin
3166 if not (Component is TProgressBar) then Exit;
3168 TProgressBar(Component).Max := Max;
3169 TProgressBar(Component).Position := Value;
3174 procedure TGikoForm.AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
3176 ListItem: TListItem;
3178 MessageListView.Items.BeginUpdate;
3180 ListItem := MessageListView.Items.Add;
3181 ListItem.Caption := ACaption;
3182 ListItem.Data := AObject;
3183 ListItem.MakeVisible(False);
3185 gmiOK: ListItem.ImageIndex := 0;
3186 gmiSAD: ListItem.ImageIndex := 1;
3187 gmiNG: ListItem.ImageIndex := 2;
3188 gmiWhat: ListItem.ImageIndex := 3;
3191 MessageListView.Items.EndUpdate;
3195 {procedure TGikoForm.BrowserTabChange(Sender: TObject);
3198 ThreadItem: TThreadItem;
3200 ThreadItem := GetActiveContent;
3201 if ThreadItem <> nil then begin
3202 SetContent(ThreadItem);
3206 procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
3210 favItem : TFavoriteThreadItem;
3211 newBrowser : TBrowserRecord;
3214 if Threaditem = nil then Exit;
3216 if ThreadItem.IsLogFile then begin
3217 //
\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é
3218 //
\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é
3219 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil) and
3220 (FActiveContent.FBrowser <> BrowserNullTab.Browser)then begin
3221 j := FBrowsers.IndexOf(FActiveContent.FBrowser);
3223 FBrowsers.Move(4, 0);
3225 favItem := TFavoriteThreadItem.Create(ThreadItem.URL, ThreadItem.Title );
3226 if not AddHistory( favItem ) then
3229 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
3230 if TObject(BrowserTab.Tabs.Objects[i]) is TBrowserRecord then begin
3231 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
3232 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = nil then begin
3233 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3234 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[4]) then begin
3235 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3236 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3237 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3238 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3243 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser := TWebBrowser(FBrowsers[4]);
3244 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
3245 FBrowsers.Move(4, 0);
3247 if ActiveTab then begin
3248 BrowserTab.TabIndex := i;
3249 BrowserTab.OnChange(nil);
3256 idx := BrowserTab.TabIndex;
3257 if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin
3258 newBrowser := TBrowserRecord.Create;
3259 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3260 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[4]) then begin
3261 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3262 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3263 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3264 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3269 newBrowser.Browser := TWebBrowser(FBrowsers[4]);
3270 FBrowsers.Move(4, 0);
3271 newBrowser.Browser.Navigate(BLANK_HTML);
3272 newBrowser.thread := ThreadItem;
3273 newBrowser.Repaint := true;
3274 newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes;
3276 BrowserTab.Tabs.InsertObject(0, GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser);
3277 if ActiveTab then begin
3278 BrowserTab.TabIndex := 0;
3282 newBrowser := TBrowserRecord.Create;
3283 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3284 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[4]) then begin
3285 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3286 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3287 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3288 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3293 newBrowser.Browser := TWebBrowser(FBrowsers[4]);
3294 FBrowsers.Move(4, 0);
3295 newBrowser.Browser.Navigate(BLANK_HTML);
3296 newBrowser.thread := ThreadItem;
3297 newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes;
3298 newBrowser.Repaint := true;
3300 i := BrowserTab.Tabs.AddObject(GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser);
3301 if ActiveTab then begin
3302 BrowserTab.TabIndex := i;
3305 if(ActiveTab) or (idx = -1) then begin
3306 BrowserTab.OnChange(nil);
3309 if BrowserNullTab = nil then begin
3310 BrowserNullTab := TBrowserRecord.Create;
3311 BrowserNullTab.Browser := Browser;
3313 BrowserNullTab.thread := ThreadItem;
3314 BrowserTab.TabIndex := -1;
3315 SetContent(BrowserNullTab);
3318 if GikoSys.Setting.URLDisplay then
3319 AddressComboBox.Text := ThreadItem.URL;
3323 procedure TGikoForm.SetContent(inThread : TBrowserRecord);
3328 // HtmlName: string;
3331 // OldCursor: TCursor;
3335 if (FActiveContent <> nil) and
3336 (FActiveContent.Thread <> inThread.Thread) and
3337 (Assigned(FActiveContent.Browser.Document)) then begin
3341 //Application.ProcessMessages;
3342 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document).Body).ScrollTop;
3343 //if FActiveContent.Browser <> BrowserNullTab.Browser then
3344 // TOleControl(FActiveContent.Browser).Visible := false;
3347 MsgBox(Handle, E.Message, 'SetContent[<-ScrollTop]', 0);
3352 if inThread = nil then
3354 else if inThread.Thread = nil then begin
3355 inThread.Browser.Navigate(BLANK_HTML);
3356 BrowserBoardNameLabel.Caption := '';
3357 ItemBoardImage.Picture := nil;
3358 BrowserNameLabel.Caption := '';
3359 ItemImage.Picture := nil;
3360 BrowserNullTab.Thread := nil;
3361 TOleControl(BrowserNullTab.Browser).Visible := true;
3362 FActiveContent := nil;
3364 end else if inThread.Browser = nil then begin
3365 if FActiveContent.Browser = TWebBrowser(FBrowsers[4]) then
3366 FBrowsers.Move(4, 0);
3367 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
3368 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = TWebBrowser(FBrowsers[4]) then begin
3369 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser := nil;
3370 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent <> nil then begin
3371 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent.Free;
3372 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent := nil;
3377 inThread.Browser := TWebBrowser(FBrowsers[4]);
3378 FBrowsers.Move(4, 0);
3382 BBSID := inThread.FThread.ParentBoard.BBSID;
3383 FileName := inThread.FThread.FileName;
3385 if GetCapture = ListView.Handle then
3388 Screen.Cursor := crHourGlass;
3390 //if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil) then
3391 // TOleControl(FActiveContent.FBrowser).BringToFront;
3392 if inThread.FThread.UnRead then begin
3393 inThread.FThread.ParentBoard.UnRead := inThread.FThread.ParentBoard.UnRead - 1;
3394 if inThread.FThread.ParentBoard.UnRead < 0 then inThread.FThread.ParentBoard.UnRead := 0;
3397 LockWindowUpdate(Self.Handle);
3398 if not TOleControl(inThread.FBrowser).Visible then
3399 TOleControl(inThread.FBrowser).Visible := true; //
\82±
\82±
\82Å
\95\
\8e¦
\82µ
\82Ä
\82¨
\82©
\82È
\82¢
\82Æ
\95`
\89æ
\82Å
\8e~
\82Ü
\82é
3400 LockWindowUpdate(0);
3401 if inThread.Browser <> BrowserNullTab.Browser then begin
3402 while (inThread.Browser.ReadyState <> READYSTATE_COMPLETE) and
3403 (inThread.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3404 Application.ProcessMessages;
3407 if (not Assigned(inThread.Browser.Document)) then begin
3408 inThread.Browser.Navigate('about:blank');
3410 if not inThread.FThread.IsLogFile then begin
3412 s := '<HTML><BODY><CENTER>
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Í
\8eæ
\93¾
\82µ
\82Ä
\82¢
\82Ü
\82¹
\82ñ</CENTER></BODY></HTML>';
3413 doc := Idispatch( olevariant(BrowserNullTab.Browser.ControlInterface).Document) as IHTMLDocument2;
3415 doc.charset := 'Shift_JIS';
3421 //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«
3422 //
\90V
\8bK
\82ÉThread
\82ð
\8aJ
\82¢
\82½
\82Æ
\82«
\82É
\90^
\82É
\82È
\82Á
\82Ä
\82¢
\82é
\81B
3423 if(inThread.Repaint) or (inThread.OnlyHundred <> GikoSys.OnlyAHundredRes)then begin
3424 //Thread.LastSize := ThreadItem.Size;
3425 inThread.Repaint := false;
3427 doc := Idispatch( olevariant(inThread.Browser.ControlInterface).Document) as IHTMLDocument2;
3428 GikoSys.CreateHTML2(doc, inThread.FThread, sTitle);
3429 //
\82È
\82º
\82©
\82±
\82±
\82Å
\96¾
\8e¦
\93I
\82ÉDocumentComplete
\82ð
\8cÄ
\82Î
\82È
\82¢
\82Æ
\82¤
\82Ü
\82
\82¢
\82©
\82È
\82¢
3430 inThread.FBrowser.OnDocumentComplete(inThread.FBrowser, inThread.FBrowser.Parent, url);
3431 inThread.OnlyHundred := GikoSys.OnlyAHundredRes;
3432 Application.ProcessMessages;
3433 //
\82±
\82±
\82ÅApplication.ProcessMessages
\82ð
\8cÄ
\82Ô
\82±
\82Æ
\82É
\82æ
\82Á
\82ÄWebBrowser
\82ð
\8dX
\90V
\82³
\82¹
\82é
\81B
3434 //
\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é
3435 //
\81@by
\82à
\82¶
\82ã(2004/01/20)
3437 if inThread.FThread.UnRead then
3438 BrowserMovement('new', inThread)
3439 else if inThread.FThread.ScrollTop <> 0 then begin
3441 doc.Body.ScrollTop := inThread.FThread.ScrollTop;
3444 MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
3448 // Application.ProcessMessages;
3451 inThread.FThread.UnRead := False;
3454 // LockWindowUpdate(0);
3455 if(FActiveContent <> nil) and (FActiveContent <> inThread) then begin
3456 if (FActiveContent.Browser <> BrowserNullTab.Browser) and
3457 (TOleControl(FActiveContent.Browser).Visible) then
3458 TOleControl(FActiveContent.Browser).Visible := false;
3460 FActiveContent := inThread;
3462 BrowserBoardNameLabel.Caption := inThread.FThread.ParentBoard.Title;
3463 ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
3464 BrowserNameLabel.Caption := inThread.FThread.Title;
3465 ItemImage.Picture := nil;
3466 if inThread.FThread.IsLogFile then
3467 if inThread.FThread.NewArrival then
3468 ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap)
3470 ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap)
3472 ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap);
3474 ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;
3475 BrowserNameLabel.Left := ItemImage.Left + 20;
3478 Screen.Cursor := crDefault;
3482 function TGikoForm.GetActiveContent: TThreadItem;
3484 if( FActiveContent <> nil) and (FActiveContent.Thread <> nil)then
3485 Result := FActiveContent.Thread
3490 procedure TGikoForm.SetActiveList(Obj: TObject);
3495 // if FActiveList <> Obj then begin
3498 if ListView.Selected <> nil then
3499 idx := ListView.Selected.Index
3502 ListView.Items.Count := 0;
3503 ListView.Items.Clear;
3504 ListView.Selected := nil;
3505 // ListView.Columns.Clear;
3507 Caption := CAPTION_NAME;
3508 //Application.Title := CAPTION_NAME;
3510 if Obj is TBBS then begin
3511 for i := 0 to ListView.Columns.Count - 1 do
3512 ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i];
3513 SetCategoryListItem(TBBS(Obj));
3514 end else if Obj is TCategory then begin
3515 for i := 0 to ListView.Columns.Count - 1 do
3516 ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i];
3517 SetBoardListItem(TCategory(Obj));
3518 end else if Obj is TBoard then begin
3519 SetThreadListItem(TBoard(Obj));
3522 if idx >= 0 then begin
3523 ListView.ItemIndex := idx;
3524 ListView.ItemFocused := ListView.Items.Item[ idx ];
3528 if Obj is TBoard then begin
3529 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
3530 if GikoSys.Setting.ListWidthState = glsMax then begin
3531 BrowserMinAction.Execute;
3532 if GikoForm.Visible then
3536 if GikoSys.Setting.ListHeightState = glsMax then begin
3537 BrowserMinAction.Execute;
3538 if GikoForm.Visible then
3546 //
\81\9a\81\9a\83q
\83\8d\83\86\83L
\83\81\83\82
3547 //
\82»
\82Ì
\82¤
\82¿interface
\82ð
\8eg
\82¤
3548 function TGikoForm.GetActiveList: TObject;
3550 Result := FActiveList;
3553 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType);
3555 SetListViewType(AViewType, '', False);
3558 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
3562 if ActiveList is TBoard then begin
3563 Board := TBoard(ActiveList);
3565 Board.ParentCategory.ParenTBBS.SelectText := SelectText;
3566 Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
3567 // Board.SelectText := SelectText;
3568 // Board.KubetsuChk := KubetsuChk;
3569 ViewType := AViewType;
3570 SetActiveList(Board);
3571 SetThreadListItem(Board);
3575 procedure TGikoForm.ListViewCustomDraw(Sender: TCustomListView;
3576 const ARect: TRect; var DefaultDraw: Boolean);
3582 if ListView.Items.Count = 0 then begin
3583 DefaultDraw := True;
3585 ListView.Canvas.Brush.Color := ListView.Color;
3586 ListView.Canvas.FillRect(ARect);
3590 ListView.Canvas.Font.Color := clWindowText;
3591 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3594 ListView.Canvas.Font.Color := clBlue;
3595 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';
3598 ListView.Canvas.Font.Color := clGreen;
3599 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\90V
\92\85\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3602 ListView.Canvas.Font.Color := clNavy;
3603 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';
3604 if GetActiveList is TBoard then
3605 s := Format(s, [TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText]);
3613 p := Point((ListView.ClientWidth div 2) - (ListView.Canvas.TextWidth(s) div 2),
3614 (ListView.ClientHeight div 2) - (ListView.Canvas.TextHeight(s) div 2));
3615 ListView.Canvas.TextOut(p.X, p.Y, s);
3617 DefaultDraw := True;
3621 procedure TGikoForm.DownloadList(Board: TBoard; ForceDownload: Boolean = False);
3623 Item: TDownloadItem;
3625 if not Board.IsThreadDatRead then
3626 GikoSys.ReadSubjectFile(Board);
3627 Item := TDownloadItem.Create;
3629 Item.Board := Board;
3630 Item.DownType := gdtBoard;
3631 Item.ForceDownload := ForceDownload;
3632 // AbortToolButton.Enabled := True;
3633 // Animate.Active := True;
3634 // FDownload.Add(Item);
3635 FControlThread.AddItem(Item);
3636 // Animate.Active := False;
3637 // AbortToolButton.Enabled := False;
3638 if FWorkCount = 0 then begin
3640 Animate.Active := True;
3643 Screen.Cursor := crAppStart;
3651 procedure TGikoForm.DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
3653 Item: TDownloadItem;
3655 Item := TDownloadItem.Create;
3657 Item.ThreadItem := ThreadItem;
3658 Item.DownType := gdtThread;
3659 Item.ForceDownload := ForceDownload;
3660 // AbortToolButton.Enabled := True;
3661 // Animate.Active := True;
3662 // FDownload.Add(Item);
3663 FControlThread.AddItem(Item);
3664 // Animate.Active := False;
3665 // AbortToolButton.Enabled := False;
3666 if FWorkCount = 0 then begin
3668 Animate.Active := True;
3671 Screen.Cursor := crAppStart;
3679 procedure TGikoForm.PlaySound(SoundEventName: string);
3683 FileName := GikoSys.Setting.FindSoundFileName(SoundEventName);
3684 if FileExists(FileName) then begin
3685 if not sndPlaySound(PChar(FileName), SND_ASYNC or SND_NOSTOP) then begin
3686 sndPlaySound(nil, SND_SYNC);
3687 Application.ProcessMessages;
3689 sndPlaySound(PChar(FileName), SND_ASYNC);
3694 function TGikoForm.AddHistory( favItem : TFavoriteThreadItem ): Boolean;
3697 Item: TFavoriteThreadItem;
3701 // if (GetActiveContent = ThreadItem) and
3702 // (ThreadItem.Count <= ThreadItem.Kokomade) then
3704 // if GetActiveContent = ThreadItem then
3708 if FTreeType = gttHistory then
3709 TreeView.Selected := nil;
3711 for i := 0 to FHistoryList.Count - 1 do begin
3712 if TObject(FHistoryList[i]) is TFavoriteThreadItem then begin
3713 Item := TFavoriteThreadItem(FHistoryList[i]);
3714 if Item.URL = favItem.URL then begin
3715 // SetContent(ThreadItem);
3716 FHistoryList.Move(i, 0);
3717 if FTreeType = gttHistory then
3718 if TreeView.TopItem <> TreeView.Items[ i ] then
3719 TreeView.Items[ i ].MoveTo( TreeView.TopItem, naInsert );
3726 if FHistoryList.Count > 0 then
3727 FHistoryList.Insert( 0, favItem )
3729 FHistoryList.Add( favItem );
3730 // SetContent(ThreadItem);
3732 if FTreeType = gttHistory then begin
3733 Node := TreeView.Items.Add( nil, favItem.Title );
3734 Node.MoveTo( TreeView.TopItem, naInsert );
3736 if favItem.NewArrival then begin
3737 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3738 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3740 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3741 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3744 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
3745 //
\81¦favItem.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
3746 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3747 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3748 Node.Data := favItem;
3752 procedure TGikoForm.DeleteHistory( threadItem: TThreadItem );
3756 for i := 0 to FHistoryList.Count - 1 do begin
3757 if threadItem.URL = TFavoriteThreadItem( FHistoryList.Items[i] ).URL then begin
3758 TFavoriteThreadItem( FHistoryList.Items[ i ] ).Free;
3759 FHistoryList.Delete(i);
3760 FHistoryList.Capacity := FHistoryList.Count;
3766 procedure TGikoForm.ClearHistory;
3770 //FHistoryList.Clear;
3773 for i := FHistoryList.Count - 1 downto 0 do begin
3774 if TObject(FHistoryList[ i ]) is TFavoriteThreadItem then
3775 TFavoriteThreadItem(FHistoryList[ i ]).Free
3776 else if TObject(FHistoryList[ i ]) is TFavoriteBoardItem then
3777 TFavoriteBoardItem(FHistoryList[ i ]).Free;
3779 //FHistoryList.Delete(i);
3785 FHistoryList.Capacity := FHistoryList.Count;
3789 procedure TGikoForm.SaveHistory;
3792 saveList : TstringList;
3795 saveList := TStringList.Create;
3798 FHistoryList.Capacity := FHistoryList.Count;
3799 saveList.Add('<?xml version="1.0" encoding="Shift_JIS" standalone="yes"?>');
3800 saveList.Add('<address>');
3801 bound := FHistoryList.Count - 1;
3802 for i := bound downto 0 do begin
3803 // title
\82Í
\8d¡
\82Ì
\82Æ
\82±
\82ë
\8eg
\82Á
\82Ä
\82¢
\82È
\82¢
3805 '<history url="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).URL ) + '"' +
3806 ' title="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).Title ) + '"/>');
3808 saveList.Add('</address>');
3809 saveList.SaveToFile( GikoSys.GetConfigDir + 'History.xml' );
3816 procedure TGikoForm.LoadHistory;
3820 XMLDoc : IXMLDocument;
3822 HistoryNode : IXMLNode;
3824 favItem : TFavoriteThreadItem;
3827 fileName := GikoSys.GetConfigDir + 'History.xml';
3829 if FileExists( fileName ) then begin
3831 XMLDoc := IXMLDocument.Create;
3832 //XMLDoc := LoadXMLDocument(FileName);
3833 LoadXMLDocument(FileName, XMLDoc);
3835 XMLNode := XMLDoc.DocumentElement;
3837 if XMLNode.NodeName = 'address' then begin
3838 bound := XMLNode.ChildNodes.Count - 1;
3839 for i := 0 to bound do begin
3840 HistoryNode := XMLNode.ChildNodes[i];
3841 if HistoryNode.NodeName = 'history' then begin
3842 //if FReadCount >= sl.Count then begin
3843 s := Trim(HistoryNode.Attributes['url']);
3844 if s <> '' then begin
3845 favItem := TFavoriteThreadItem.Create(
3846 s, HistoryNode.Attributes[ 'title' ] );
3847 if not AddHistory( favItem ) then
3863 procedure TGikoForm.ShowBBSTreeOld(
3871 FavoriteTreeView.Visible := False;
3872 FavoriteToolBar.Hide;
3873 TreeView.Visible := True;
3875 b := CabinetSelectPopupMenu.Items.Count - 1;
3876 for i := 0 to b do begin
3877 item := CabinetSelectPopupMenu.Items[ i ];
3878 if item is TBBSMenuItem then begin
3879 if TBBSMenuItem( item ).Data = inBBS then begin
3880 item.Checked := True;
3881 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
3882 CabinetMenu.Items[ i ].Checked := True;
3883 GikoSys.Setting.CabinetIndex := i;
3887 item.Checked := False;
3888 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
3889 CabinetMenu.Items[ i ].Checked := False;
3891 CabinetSelectToolButton.Caption := inBBS.Title;
3893 CabinetHistoryAction.Checked := False;
3894 CabinetFavoriteAction.Checked := False;
3896 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
3897 FTreeType := gtt2ch;
3898 HistoryToolBar.Hide;
3899 SetBoardTreeNode( inBBS );
3900 TreeView.TopItem.Expanded := True; //?c???[?g?b?v???????J??
3901 //?c???[??g?b?v?????I????
3902 if GetActiveList = nil then
3903 TreeView.Selected := TreeView.Items[0]
3905 for i := 0 to TreeView.Items.Count - 1 do begin
3906 if TreeView.Items[i].Data = GetActiveList then begin
3907 TreeView.Selected := TreeView.Items[i];
3911 TreeView.Selected := TreeView.Items[0]
3919 procedure TGikoForm.ShowBBSTree(
3928 FavoriteTreeView.Visible := False;
3929 FavoriteToolBar.Hide;
3930 TreeView.Visible := True;
3932 b := CabinetSelectPopupMenu.Items.Count - 1;
3933 for i := 0 to b do begin
3934 item := CabinetSelectPopupMenu.Items[ i ];
3935 if item is TBBSMenuItem then begin
3936 if TBBSMenuItem( item ).Data = inBBS then begin
3937 item.Checked := True;
3938 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3939 CabinetMenu.Items[ i ].Checked := True;
3940 GikoSys.Setting.CabinetIndex := i;
3944 item.Checked := False;
3945 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3946 CabinetMenu.Items[ i ].Checked := False;
3948 CabinetSelectToolButton.Caption := inBBS.Title;
3950 CabinetHistoryAction.Checked := False;
3951 CabinetFavoriteAction.Checked := False;
3953 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
3954 FTreeType := gtt2ch;
3955 HistoryToolBar.Hide;
3956 SetBoardTreeNode( inBBS );
3957 TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
3958 //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
3959 if GetActiveList = nil then begin
3961 TreeClick( TreeView.Items[0] );
3965 for i := 0 to TreeView.Items.Count - 1 do begin
3966 if TreeView.Items[i].Data = GetActiveList then begin
3967 TreeClick( TreeView.Items[i] );
3971 TreeClick( TreeView.Items[0] );
3979 procedure TGikoForm.ShowHistoryTree;
3984 if CabinetPanel.Visible then begin
3985 if FTreeType = gttHistory then begin
3986 CabinetVisible( False );
3987 CabinetHistoryAction.Checked := False;
3989 CabinetHistoryAction.Checked := True;
3992 CabinetVisible( True );
3993 CabinetHistoryAction.Checked := True;
3996 // BBS...BBS, History, Favorite
3997 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 2;
3999 FavoriteTreeView.Visible := False;
4000 TreeView.Visible := True;
4002 CabinetBBSAction.Checked := False;
4003 CabinetFavoriteAction.Checked := False;
4005 if FTreeType <> gttHistory then begin
4006 b := CabinetSelectPopupMenu.Items.Count - 1;
4007 for i := 0 to b do begin
4008 item := CabinetSelectPopupMenu.Items[ i ];
4009 if item is TBBSMenuItem then begin
4010 item.Checked := False;
4011 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
4012 CabinetMenu.Items[ i ].Checked := False;
4016 FTreeType := gttHistory;
4017 HistoryToolBar.Show;
4018 FavoriteToolBar.Hide;
4020 CabinetSelectToolButton.Caption := '
\97\9a\97ð
\83\8a\83X
\83g';
4024 procedure TGikoForm.SetHistoryTreeNode;
4028 Item: TFavoriteThreadItem;
4030 TreeView.Items.BeginUpdate;
4032 TreeView.Items.Clear;
4033 for i := 0 to FHistoryList.Count - 1 do begin
4034 Item := TFavoriteThreadItem(FHistoryList[i]);
4035 Node := TreeView.Items.Add(nil, Item.Title);
4037 if Item.Item.NewArrival then begin
4038 Node.ImageIndex := ITEM_ICON_THREADNEW1;
4039 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
4041 Node.ImageIndex := ITEM_ICON_THREADLOG1;
4042 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
4045 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
4046 //
\81¦Item.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
4047 Node.ImageIndex := ITEM_ICON_THREADLOG1;
4048 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
4052 TreeView.Items.EndUpdate;
4056 procedure TGikoForm.SelectTreeNode(Item: TObject; CallEvent: Boolean);
4058 ChangeEvent: TTVChangedEvent;
4059 ChangingEvent: TTVChangingEvent;
4063 if Item is TCategory then
4064 bbs := TCategory( Item ).ParenTBBS
4065 else if Item is TBoard then
4066 bbs := TBoard( Item ).ParentCategory.ParenTBBS
4070 if (FTreeType = gtt2ch) and (FActiveBBS = bbs) then begin
4072 ChangingEvent := nil;
4074 if not CallEvent then begin
4075 ChangeEvent := TreeView.OnChange;
4076 ChangingEvent := TreeView.OnChanging;
4079 if not CallEvent then begin
4080 TreeView.OnChange := nil;
4081 TreeView.OnChanging := nil;
4083 //Application.ProcessMessages;
4084 for i := 0 to TreeView.Items.Count - 1 do begin
4085 if TreeView.Items[i].Data = Item then begin
4086 TreeView.Items[i].Selected := True;
4088 TreeClick(TreeView.Items[i]);
4092 //Application.ProcessMessages;
4094 if not CallEvent then begin
4095 TreeView.OnChange := ChangeEvent;
4096 TreeView.OnChanging := ChangingEvent;
4100 if GetActiveList is TBBS then begin
4101 for i := 0 to ListView.Columns.Count - 1 do
4102 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
4103 end else if GetActiveList is TCategory then begin
4104 for i := 0 to ListView.Columns.Count - 1 do
4105 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
4106 end else if GetActiveList is TBoard then begin
4107 for i := 0 to ListView.Columns.Count - 1 do
4108 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
4111 if (Item is TBBS) or (Item is TCategory) then begin
4112 ListView.Columns.Clear;
4113 SetActiveList( Item );
4114 end else if Item is TBoard then begin
4115 if not TBoard( Item ).IsThreadDatRead then begin
4116 Screen.Cursor := crHourGlass;
4118 if not TBoard( Item ).IsThreadDatRead then
4119 GikoSys.ReadSubjectFile(TBoard( Item ));
4121 Screen.Cursor := crDefault;
4124 SetActiveList( Item );
4129 procedure TGikoForm.ListViewMouseDown(Sender: TObject;
4130 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
4132 listItem : TListItem;
4133 threadItem : TThreadItem;
4139 if not (GetActiveList is TBoard) then Exit;
4140 listItem := ListView.GetItemAt( X, Y );
4141 if listItem = nil then Exit;
4142 if not (TObject(listItem.Data) is TThreadItem) then Exit;
4144 threadItem := TThreadItem(ListItem.Data);
4145 InsertBrowserTab(threadItem, False);
4146 if threadItem.IsLogFile then
4147 ListView.UpdateItems(listItem.Index, listItem.Index);
4150 { if ssDouble in Shift then begin
4151 DoubleClickOccurred[Button] := True;
4153 DoubleClickOccurred[Button] := False;
4154 t := GetTickCount+GetDoubleClickTime;
4155 while GetTickCount < t do begin
4156 Application.ProcessMessages;
4157 if DoubleClickOccurred[Button] then
4162 if ssDouble in Shift then begin
4164 mbLeft: ListDoubleClick;
4177 procedure TGikoForm.ListClick;
4179 ListItem: TListItem;
4180 ThreadItem: TThreadItem;
4182 if ListView.SelCount <> 1 then Exit;
4183 ListItem := ListView.Selected;
4184 if ListItem = nil then Exit;
4185 if not (TObject(ListItem.Data) is TThreadItem) then Exit;
4187 ThreadItem := TThreadItem(ListItem.Data);
4188 if ThreadItem.IsLogFile then begin
4189 // if AddHistory(ThreadItem) then
4190 // SetContent(ThreadItem);
4191 InsertBrowserTab(ThreadItem);
4192 ListView.UpdateItems(ListItem.Index, ListItem.Index);
4194 // SetContent(ThreadItem);
4195 InsertBrowserTab(ThreadItem);
4198 if ListView.Selected = nil then
4200 if ListView.Selected.Data = nil then
4202 if TThreadItem( ListView.Selected.Data ).IsLogFile then begin
4203 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4204 if GikoSys.Setting.ListWidthState = glsMin then begin
4205 BrowserMaxAction.Execute;
4206 if GikoForm.Visible then
4210 if GikoSys.Setting.ListHeightState = glsMin then begin
4211 BrowserMaxAction.Execute;
4212 if GikoForm.Visible then
4219 procedure TGikoForm.ListDoubleClick(Shift: TShiftState);
4221 ThreadItem: TThreadItem;
4224 shiftDown := (ssShift in Shift);
4226 if ListView.Selected = nil then Exit;
4228 if TObject(ListView.Selected.Data) is TCategory then begin
4229 SelectTreeNode(ListView.Selected.Data, True);
4230 // TreeView.Selected.Expanded := True;
4231 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4232 //TreeViewChange(nil, TreeView.Selected);
4233 end else if TObject(ListView.Selected.Data) is TBoard then begin
4234 SelectTreeNode(ListView.Selected.Data, True);
4235 // TreeView.Selected.Expanded := True;
4236 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4237 //TreeViewChange(nil, TreeView.Selected);
4238 end else if TObject(ListView.Selected.Data) is TThreadItem then begin
4239 //if TObject(ListView.Selected.Data) is TThreadItem then begin
4240 Application.ProcessMessages;
4241 ThreadItem := TThreadItem(ListView.Selected.Data);
4242 DownloadContent(ThreadItem, shiftDown);
4246 procedure TGikoForm.BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord);
4251 activeBrower :TWebBrowser;
4253 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
4255 while (BrowserRecord.Browser.ReadyState <> READYSTATE_COMPLETE) and
4256 (BrowserRecord.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4257 Application.ProcessMessages;
4260 // Access Violation
\82ª
\8bN
\82«
\82é
\8e\96\82ª
\82 \82é
\82Ì
\82Å
\8d¡
\8cã
\97v
\83`
\83F
\83b
\83N
4261 if(BrowserRecord <> nil) and (BrowserRecord.FBrowser <> nil) then begin
4262 activeBrower := BrowserRecord.FBrowser;
4266 item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
4268 top := top + item.offsetTop;
4269 item := item.offsetParent;
4270 until AnsiCompareText(item.tagName, 'body' ) = 0;
4272 OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
4278 procedure TGikoForm.BrowserMovement(const AName: string);
4283 activeBrower :TWebBrowser;
4285 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
4287 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
4288 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4289 Application.ProcessMessages;
4292 // Access Violation
\82ª
\8bN
\82«
\82é
\8e\96\82ª
\82 \82é
\82Ì
\82Å
\8d¡
\8cã
\97v
\83`
\83F
\83b
\83N
4293 if(BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex >= 0) then begin
4294 activeBrower := FActiveContent.Browser;
4298 item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
4300 top := top + item.offsetTop;
4301 item := item.offsetParent;
4302 until AnsiCompareText(item.tagName, 'body' ) = 0;
4304 OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
4310 procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
4312 if TObject(Node.Data) is TBBS then begin
4313 TBBS(Node.Data).NodeExpand := False;
4314 end else if TObject(Node.Data) is TCategory then begin
4315 TCategory(Node.Data).NodeExpand := False;
4316 end else if TObject(Node.Data) is TBoard then begin
4317 TBoard(Node.Data).NodeExpand := False;
4321 procedure TGikoForm.MessageListViewResize(Sender: TObject);
4323 // MessageListView.Column[0].Width := MessageListView.ClientWidth - 16;
4326 procedure TGikoForm.SelectListItem(List: TList);
4328 // TmpTreeNode: TTreeNode;
4329 TmpListItem: TListItem;
4332 TmpListItem := ListView.Selected;
4333 while TmpListItem <> nil do begin
4334 List.Add(TmpListItem.Data);
4335 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
4340 procedure TGikoForm.ExitActionExecute(Sender: TObject);
4345 procedure TGikoForm.AllSelectActionExecute(Sender: TObject);
4350 procedure TGikoForm.StdToolBarVisibleActionExecute(Sender: TObject);
4352 CoolBand: TCoolBand;
4354 CoolBand := GetCoolBand(MainCoolBar, StdToolBar);
4355 if CoolBand = nil then
4357 GikoSys.Setting.StdToolBarVisible := StdToolBarVisibleAction.Checked;
4358 CoolBand.Visible := GikoSys.Setting.StdToolBarVisible;
4359 // StdToolBar.Visible := StdToolBarVisibleAction.Checked;
4360 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4362 //StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
4363 StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible;
4366 procedure TGikoForm.AddressBarVisibleActionExecute(Sender: TObject);
4368 CoolBand: TCoolBand;
4370 CoolBand := GetCoolBand(MainCoolBar, AddressToolBar);
4371 if CoolBand = nil then
4373 GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked;
4374 CoolBand.Visible := GikoSys.Setting.AddressBarVisible;
4375 //AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
4376 AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible;
4379 procedure TGikoForm.LinkBarVisibleActionExecute(Sender: TObject);
4381 CoolBand: TCoolBand;
4383 CoolBand := GetCoolBand(MainCoolBar, LinkToolBar);
4384 if CoolBand = nil then
4386 GikoSys.Setting.LinkBarVisible := LinkBarVisibleAction.Checked;
4387 CoolBand.Visible := GikoSys.Setting.LinkBarVisible;
4388 //LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
4389 LinkToolBarVisiblePMenu.Checked := GikoSys.Setting.LinkBarVisible;
4392 procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);
4394 CoolBand: TCoolBand;
4396 CoolBand := GetCoolBand(ListCoolBar, ListToolBar);
4397 if CoolBand = nil then
4399 CoolBand.Visible := ListToolBarVisibleAction.Checked;
4400 // ListToolBar.Visible := ListToolBarVisibleAction.Checked;
4401 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4402 GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;
4405 procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);
4407 CoolBand: TCoolBand;
4409 CoolBand := GetCoolBand(ListCoolBar, ListNameToolBar);
4410 if CoolBand = nil then
4412 CoolBand.Visible := ListNameBarVisibleAction.Checked;
4413 GikoSys.Setting.ListNameBarVisible := ListNameBarVisibleAction.Checked;
4416 procedure TGikoForm.BrowserToolBarVisibleActionExecute(Sender: TObject);
4418 CoolBand: TCoolBand;
4420 CoolBand := GetCoolBand(BrowserCoolBar, BrowserToolBar);
4421 if CoolBand = nil then
4423 CoolBand.Visible := BrowserToolBarVisibleAction.Checked;
4424 // BrowserToolBar.Visible := BrowserToolBarVisibleAction.Checked;
4425 GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;
4428 procedure TGikoForm.BrowserNameBarVisibleActionExecute(Sender: TObject);
4430 CoolBand: TCoolBand;
4432 CoolBand := GetCoolBand(BrowserCoolBar, BrowserNameToolBar);
4433 if CoolBand = nil then
4435 CoolBand.Visible := BrowserNameBarVisibleAction.Checked;
4436 GikoSys.Setting.BrowserNameBarVisible := BrowserNameBarVisibleAction.Checked;
4439 procedure TGikoForm.MsgBarVisibleActionExecute(Sender: TObject);
4441 MessageSplitter.Visible := MsgBarVisibleAction.Checked;
4442 MessagePanel.Top := MessageSplitter.Top + MessageSplitter.Height;
4443 MessageSplitter.Top := MessagePanel.Top + 1;
4444 MessagePanel.Visible := MsgBarVisibleAction.Checked;
4445 GikoSys.Setting.MessageBarVisible := MsgBarVisibleAction.Checked;
4448 procedure TGikoForm.StatusBarVisibleActionExecute(Sender: TObject);
4450 StatusBar.Visible := StatusBarVisibleAction.Checked;
4451 GikoSys.Setting.StatusBarVisible := StatusBarVisibleAction.Checked;
4454 procedure TGikoForm.IconStyleExecute(Sender: TObject);
4456 case ListView.ViewStyle of
4457 vsIcon: SmallIconAction.Execute;
4458 vsSmallIcon: ListIconAction.Execute;
4459 vsList: DetailIconAction.Execute;
4460 vsReport: LargeIconAction.Execute;
4464 procedure TGikoForm.LargeIconActionExecute(Sender: TObject);
4466 ListView.ViewStyle := vsIcon;
4467 LargeIconAction.Checked := True;
4470 procedure TGikoForm.SmallIconActionExecute(Sender: TObject);
4472 ListView.ViewStyle := vsSmallIcon;
4473 SmallIconAction.Checked := True;
4476 procedure TGikoForm.ListIconActionExecute(Sender: TObject);
4478 ListView.ViewStyle := vsList;
4479 ListIconAction.Checked := True;
4482 procedure TGikoForm.DetailIconActionExecute(Sender: TObject);
4484 ListView.ViewStyle := vsReport;
4485 DetailIconAction.Checked := True;
4488 procedure TGikoForm.SearchActionExecute(Sender: TObject);
4493 if FSearchDialog = nil then begin
4494 if (GikoForm.GetActiveList is TCategory) or (GikoForm.GetActiveList is TBoard) then
4495 chk := GikoForm.GetActiveList
4499 FSearchDialog := TSearchDialog.Create(Self, chk);
4500 FSearchDialog.SearchComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
4510 procedure TGikoForm.OptionActionExecute(Sender: TObject);
4514 Dlg := TOptionDialog.Create(Self);
4522 procedure TGikoForm.GikoNaviWebPageActionExecute(Sender: TObject);
4524 URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
4526 GikoSys.OpenBrowser(URL_GIKONAVI, gbtAuto);
4529 procedure TGikoForm.MonazillaWebPageActionExecute(Sender: TObject);
4531 URL_MONAZILLA: string = 'http://www.monazilla.org/';
4533 GikoSys.OpenBrowser(URL_MONAZILLA, gbtAuto);
4536 procedure TGikoForm.BBS2chWebPageActionExecute(Sender: TObject);
4538 URL_2ch: string = 'http://www.2ch.net/';
4540 GikoSys.OpenBrowser(URL_2ch, gbtAuto);
4543 procedure TGikoForm.GikoFolderOpenActionExecute(Sender: TObject);
4545 // GikoSys.OpenBrowser(GikoSys.GetAppDir, gbtIE);
4546 GikoSys.CreateProcess('explorer.exe', '/e,"' + GikoSys.GetAppDir + '"');
4549 procedure TGikoForm.AboutActionExecute(Sender: TObject);
4553 Dlg := TAboutDialog.Create(Self);
4561 procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject);
4566 procedure TGikoForm.CabinetVisible( isVisible : Boolean );
4568 TreeSplitter.Visible := isVisible;
4569 CabinetPanel.Visible := isVisible;
4570 CabinetVisibleAction.Checked := isVisible;
4573 procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject);
4576 gttHistory: CabinetHistoryAction.Execute;
4577 gttFavorite: CabinetFavoriteAction.Execute;
4579 CabinetBBSAction.Execute;
4583 procedure TGikoForm.AllItemActionExecute(Sender: TObject);
4586 if ViewType <> gvtAll then
4587 SetListViewType(gvtAll);
4588 AllItemAction.Checked := True;
4589 LogItemAction.Checked := False;
4590 NewItemAction.Checked := False;
4591 //SelectItemAction.Checked := False;
4592 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4594 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4595 if SelectComboBox.Parent <> nil then begin
4596 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4597 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4604 procedure TGikoForm.LogItemActionExecute(Sender: TObject);
4607 if ViewType <> gvtLog then
4608 SetListViewType(gvtLog);
4609 AllItemAction.Checked := False;
4610 LogItemAction.Checked := True;
4611 NewItemAction.Checked := False;
4612 //SelectItemAction.Checked := False;
4613 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4615 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4616 if SelectComboBox.Parent <> nil then begin
4617 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4618 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4625 procedure TGikoForm.NewItemActionExecute(Sender: TObject);
4629 if ViewType <> gvtNew then
4630 SetListViewType(gvtNew);
4631 AllItemAction.Checked := False;
4632 LogItemAction.Checked := False;
4633 NewItemAction.Checked := True;
4634 //SelectItemAction.Checked := False;
4635 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4637 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4638 if SelectComboBox.Parent <> nil then begin
4639 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4640 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4647 procedure TGikoForm.SelectItemActionExecute(Sender: TObject);
4650 Dlg: TListSelectDialog;
4653 if SelectComboBox.Parent <> nil then begin
4654 if SelectComboBox.Left + SelectComboBox.Width < ListToolBar.Width then begin
4655 // SelectComboBox
\82ª
\82 \82é
\8fê
\8d\87\82Í
\83t
\83H
\81[
\83J
\83X
\82ð
\88Ú
\82·
4656 SelectComboBox.SetFocus;
4663 if SelectComboBox.Text = SELECTCOMBOBOX_NAME then begin
4664 SelectComboBox.Text := '';
4665 SelectComboBox.Color := clWindow;
4668 AllItemAction.Checked := False;
4669 LogItemAction.Checked := False;
4670 NewItemAction.Checked := False;
4671 //SelectItemAction.Checked := True;
4673 Dlg := TListSelectDialog.Create(Self);
4675 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
4676 Dlg.SelectComboBox.Text := SelectComboBox.Text;
4678 if Dlg.ModalResult = mrCancel then begin
4679 if Length( SelectComboBox.Text ) = 0 then begin
4680 AllItemAction.Checked := True;
4681 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4682 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4685 if GetActiveList is TBoard then
4686 SetListViewType(gvtUser, TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText , Dlg.KubetsuCheckBox.Checked);
4688 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
4690 GikoSys.Setting.SelectTextList.Delete(idx);
4691 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
4692 while Dlg.SelectComboBox.Items.Count > 100 do begin
4693 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
4696 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
4697 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4698 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4700 SelectComboBox.Text := Dlg.SelectComboBox.Text;
4701 SelectComboBox.Color := clWindow;
4703 SetListViewType(gvtUser, Dlg.SelectComboBox.Text, Dlg.KubetsuCheckBox.Checked);
4710 procedure TGikoForm.ListNumberVisibleActionExecute(Sender: TObject);
4712 GikoSys.Setting.ListViewNo := ListNumberVisibleAction.Checked;
4716 procedure TGikoForm.UpFolderActionExecute(Sender: TObject);
4718 if GetActiveList is TBoard then begin
4719 // if FTreeType = gtt2ch then
4720 SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
4721 //SetActiveList(TBoard(GetActiveList).ParentCategory);
4722 end else if GetActiveList is TCategory then begin
4723 // if FTreeType = gtt2ch then
4724 SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);
4725 //SetActiveList(TCategory(GetActiveList).ParenTBBS);
4727 // if TreeView.Selected = nil then Exit;
4728 // if TreeView.Selected.Level = 0 then Exit;
4729 // TreeView.Selected.Parent.Selected := True;
4732 procedure TGikoForm.RoundActionExecute(Sender: TObject);
4736 Dlg := TRoundDialog.Create(Self);
4744 procedure TGikoForm.StopActionExecute(Sender: TObject);
4746 FControlThread.DownloadAbort;
4747 if FWorkCount <> 0 then FWorkCount := 0;
4749 Animate.Active := False;
4752 Screen.Cursor := crDefault;
4755 procedure TGikoForm.MsgBarCloseActionExecute(Sender: TObject);
4757 // MessagePanel.Visible := False;
4758 // MessageSplitter.Visible := False;
4759 // MsgBarVisibleAction.Checked := False;
4760 MsgBarVisibleAction.Execute;
4763 procedure TGikoForm.BrowserMaxActionExecute(Sender: TObject);
4765 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4766 case GikoSys.Setting.ListWidthState of
4768 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4769 ViewPanel.Width := FBrowserSizeWidth;
4770 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4771 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4772 GikoSys.Setting.ListWidthState := glsNormal;
4774 glsMin, glsNormal: begin
4775 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4776 if GikoSys.Setting.ListWidthState = glsNormal then
4777 FBrowserSizeWidth := ViewPanel.Width;
4778 ViewPanel.Width := 1;
4779 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4780 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4781 GikoSys.Setting.ListWidthState := glsMax;
4785 case GikoSys.Setting.ListHeightState of
4787 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4788 ViewPanel.Height := FBrowserSizeHeight;
4789 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4790 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4791 GikoSys.Setting.ListHeightState := glsNormal;
4793 glsMin, glsNormal: begin
4794 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4795 if GikoSys.Setting.ListHeightState = glsNormal then
4796 FBrowserSizeHeight := ViewPanel.Height;
4797 ViewPanel.Height := 1;
4798 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4799 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4800 GikoSys.Setting.ListHeightState := glsMax;
4804 // Mouse.CursorPos := BrowserSizeButton.ClientToScreen(Point(
4805 // System.Round(BrowserToolBar.ButtonWidth div 2),
4806 // System.Round(BrowserToolBar.ButtonHeight div 2)));
4807 BrowserTab.OnChange(nil);
4810 procedure TGikoForm.BrowserMinActionExecute(Sender: TObject);
4812 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4813 case GikoSys.Setting.ListWidthState of
4814 glsMax, glsNormal: begin
4815 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4816 if GikoSys.Setting.ListWidthState = glsNormal then
4817 FBrowserSizeWidth := ViewPanel.Width;
4818 ViewPanel.Width := ThreadMainPanel.Width - 80;
4819 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4820 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4821 GikoSys.Setting.ListWidthState := glsMin;
4824 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4825 ViewPanel.Width := FBrowserSizeWidth;
4826 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4827 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4828 GikoSys.Setting.ListWidthState := glsNormal;
4832 case GikoSys.Setting.ListHeightState of
4833 glsMax, glsNormal: begin
4834 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4835 if GikoSys.Setting.ListHeightState = glsNormal then
4836 FBrowserSizeHeight := ViewPanel.Height;
4837 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
4838 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4839 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4840 GikoSys.Setting.ListHeightState := glsMin;
4843 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4844 ViewPanel.Height := FBrowserSizeHeight;
4845 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4846 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4847 GikoSys.Setting.ListHeightState := glsNormal;
4853 procedure TGikoForm.ScrollTopActionExecute(Sender: TObject);
4855 BrowserMovement('top');
4858 procedure TGikoForm.ScrollLastActionExecute(Sender: TObject);
4860 BrowserMovement('bottom');
4863 procedure TGikoForm.ScrollNewActionExecute(Sender: TObject);
4865 BrowserMovement('new');
4868 procedure TGikoForm.ScrollKokoActionExecute(Sender: TObject);
4870 BrowserMovement('koko');
4873 procedure TGikoForm.EditorActionExecute(Sender: TObject);
4875 Editor: TEditorForm;
4879 Item := GetActiveContent;
4880 if Item = nil then Exit;
4882 if Item.Count >= 1000 then begin
4883 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Í
\83\8c\83X
\90\94\82ª
\82P
\82O
\82O
\82O
\82ð
\92´
\82¦
\82Ä
\82¢
\82é
\82Ì
\82Å
\8f\91\8d\9e\82Ý
\8fo
\97\88\82Ü
\82¹
\82ñ
\81B' + #13#10
4884 + '
\90V
\83X
\83\8c\83b
\83h
\82ð
\92T
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
4885 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin
4889 Editor := TEditorForm.Create(Self);
4890 Editor.SetThreadItem(Item);
4891 GikoSys.LoadEditorKeySetting(Editor.ActionList);
4893 Editor.BodyEdit.SetFocus;
4896 procedure TGikoForm.IEActionExecute(Sender: TObject);
4898 ShowThreadAction.Execute;
4901 procedure TGikoForm.ShowThreadActionExecute(Sender: TObject);
4903 ThreadItem: TThreadItem;
4905 ThreadItem := GetActiveContent;
4906 if ThreadItem = nil then Exit;
4907 GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
4910 procedure TGikoForm.ShowBoardActionExecute(Sender: TObject);
4912 ThreadItem: TThreadItem;
4914 ThreadItem := GetActiveContent;
4915 if ThreadItem = nil then Exit;
4916 GikoSys.OpenBrowser(ThreadItem.ParentBoard.URL, gbtAuto);
4919 //(Thread)URL
\82ð
\83R
\83s
\81[
4920 procedure TGikoForm.URLCopyActionExecute(Sender: TObject);
4925 if TObject(GetActiveContent) is TBoard then
4926 s := s + TBoard(GetActiveContent).URL + #13#10
4927 else if TObject(GetActiveContent) is TThreadItem then
4928 s := s + TThreadItem(GetActiveContent).URL + #13#10;
4930 Clipboard.AsText := s;
4933 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ð
\83R
\83s
\81[
4934 procedure TGikoForm.NameCopyActionExecute(Sender: TObject);
4939 if TObject(GetActiveContent) is TBoard then
4940 s := s + TBoard(GetActiveContent).Title + #13#10
4941 else if TObject(GetActiveContent) is TThreadItem then
4942 s := s + TThreadItem(GetActiveContent).Title + #13#10;
4944 Clipboard.AsText := s;
4947 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ÆURL
\82ð
\83R
\83s
\81[
4948 procedure TGikoForm.NameURLCopyActionExecute(Sender: TObject);
4953 if TObject(GetActiveContent) is TBoard then
4954 s := s + TBoard(GetActiveContent).Title + #13#10 + TBoard(GetActiveContent).URL + #13#10
4955 else if TObject(GetActiveContent) is TThreadItem then
4956 s := s + TThreadItem(GetActiveContent).Title + #13#10 + TThreadItem(GetActiveContent).URL + #13#10;
4958 Clipboard.AsText := s;
4961 procedure TGikoForm.ItemReloadActionExecute(Sender: TObject);
4963 ThreadItem: TThreadItem;
4966 ThreadItem := GetActiveContent;
4967 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
4968 if ThreadItem <> nil then
4969 DownloadContent(ThreadItem, shiftDown);
4972 procedure TGikoForm.SelectListReloadActionExecute(Sender: TObject);
4979 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
4980 if GetActiveList is TCategory then begin
4981 List := TList.Create;
4983 SelectListItem(List);
4984 if List.Count > 5 then begin
4985 msg := '5
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
4986 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
4987 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
4990 for i := 0 to List.Count - 1 do begin
4991 if TObject(List[i]) is TBoard then
4992 DownloadList(TBoard(List[i]), shiftDown);
4997 end else if GetActiveList is TBoard then begin
4998 DownloadList(TBoard(GetActiveList), shiftDown);
5002 procedure TGikoForm.SelectThreadReloadActionExecute(Sender: TObject);
5009 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5010 List := TList.Create;
5012 SelectListItem(List);
5013 if List.Count > 10 then begin
5014 msg := '10
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
5015 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
5016 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
5019 for i := 0 to List.Count - 1 do begin
5020 if TObject(List[i]) is TThreadItem then
5021 DownloadContent(TThreadItem(List[i]), shiftDown);
5028 procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);
5030 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
5031 SelectListReloadAction.Enabled := True
5032 else if GetActiveList is TBoard then
5033 SelectListReloadAction.Enabled := True
5035 SelectListReloadAction.Enabled := False;
5038 procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);
5040 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5041 SelectThreadReloadAction.Enabled := True
5043 SelectThreadReloadAction.Enabled := False;
5046 procedure TGikoForm.AllItemActionUpdate(Sender: TObject);
5048 AllItemAction.Enabled := (GetActiveList is TBoard);
5051 procedure TGikoForm.LogItemActionUpdate(Sender: TObject);
5053 LogItemAction.Enabled := (GetActiveList is TBoard);
5056 procedure TGikoForm.NewItemActionUpdate(Sender: TObject);
5058 NewItemAction.Enabled := (GetActiveList is TBoard);
5061 procedure TGikoForm.SelectItemActionUpdate(Sender: TObject);
5063 SelectItemAction.Enabled := (GetActiveList is TBoard);
5066 procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
5068 UpFolderAction.Enabled := not (GetActiveList is TBBS);
5071 procedure TGikoForm.ThreadEditorActionUpdate(Sender: TObject);
5073 ThreadEditorAction.Enabled := (GetActiveList is TBoard);
5076 procedure TGikoForm.FormResize(Sender: TObject);
5080 MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
5081 MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
5083 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5084 if GikoSys.Setting.ListWidthState = glsMin then begin
5085 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5086 ViewPanel.Width := ThreadMainPanel.Width - 80;
5089 if GikoSys.Setting.ListHeightState = glsMin then begin
5090 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5091 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
5095 if FIsMinimize = mtMinimized then begin
5096 if FActiveContent <> nil then begin
5097 Application.ProcessMessages;
5098 doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
5099 doc.Body.ScrollTop := FActiveContent.Thread.ScrollTop;
5100 FIsMinimize := mtNone;
5104 FIsIgnoreResize := True;
5105 PostMessage( Handle, USER_RESIZED, 0, 0 );
5108 procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject);
5110 ScrollTopAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5113 procedure TGikoForm.ScrollLastActionUpdate(Sender: TObject);
5115 ScrollLastAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5118 procedure TGikoForm.ScrollNewActionUpdate(Sender: TObject);
5120 ScrollNewAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5123 procedure TGikoForm.ScrollKokoActionUpdate(Sender: TObject);
5125 ScrollKokoAction.Enabled := (GetActiveContent <> nil)
5126 and (GetActiveContent.IsLogFile)
5127 and (GetActiveContent.Kokomade <> -1);
5131 procedure TGikoForm.EditorActionUpdate(Sender: TObject);
5133 EditorAction.Enabled := GetActiveContent <> nil;
5136 procedure TGikoForm.IEActionUpdate(Sender: TObject);
5138 IEAction.Enabled := GetActiveContent <> nil;
5141 procedure TGikoForm.ShowThreadActionUpdate(Sender: TObject);
5143 ShowThreadAction.Enabled := GetActiveContent <> nil;
5146 procedure TGikoForm.ShowBoardActionUpdate(Sender: TObject);
5148 ShowBoardAction.Enabled := GetActiveContent <> nil;
5151 procedure TGikoForm.ItemReloadActionUpdate(Sender: TObject);
5153 ItemReloadAction.Enabled := GetActiveContent <> nil;
5156 procedure TGikoForm.URLCopyActionUpdate(Sender: TObject);
5158 URLCopyAction.Enabled := GetActiveContent <> nil;
5161 procedure TGikoForm.NameCopyActionUpdate(Sender: TObject);
5163 NameCopyAction.Enabled := GetActiveContent <> nil;
5166 procedure TGikoForm.NameURLCopyActionUpdate(Sender: TObject);
5168 NameURLCopyAction.Enabled := GetActiveContent <> nil;
5171 procedure TGikoForm.BrowserTabCloseActionUpdate(Sender: TObject);
5173 BrowserTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 0);
5176 procedure TGikoForm.NotSelectTabCloseActionUpdate(Sender: TObject);
5178 NotSelectTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 1);
5181 procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
5183 AllTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 0);
5186 procedure TGikoForm.ActiveLogDeleteActionUpdate(Sender: TObject);
5188 ActiveLogDeleteAction.Enabled := GetActiveContent <> nil;
5191 procedure TGikoForm.ListViewDblClick(Sender: TObject);
5196 if GetAsyncKeyState(VK_SHIFT) = Smallint($8001) then
5197 Include(shift, ssShift);
5198 if GetAsyncKeyState(VK_CONTROL) = Smallint($8001) then
5199 Include(shift, ssCtrl);
5200 if GetAsyncKeyState(VK_MENU) = Smallint($8001) then
5201 Include(shift, ssAlt);
5203 ListDoubleClick(shift);
5206 procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
5208 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';
5209 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
5211 ThreadItem: TThreadItem;
5212 TmpListItem: TListItem;
5216 List := TList.Create;
5218 TmpListItem := ListView.Selected;
5219 while TmpListItem <> nil do begin
5220 if TObject(TmpListItem.Data) is TThreadItem then begin
5221 ThreadItem := TThreadItem(TmpListItem.Data);
5222 if ThreadItem.IsLogFile then
5223 List.Add(ThreadItem);
5225 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
5228 if GikoSys.Setting.DeleteMsg and (List.Count > 0) then begin
5229 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
5233 for i := 0 to List.Count - 1 do begin
5234 ThreadItem := TThreadItem(List[i]);
5235 DeleteHistory(ThreadItem);
5236 DeleteTab(ThreadItem);
5237 ThreadItem.DeleteLogFile;
5244 procedure TGikoForm.DeleteTab(BrowserRecord: TBrowserRecord);
5249 idx := BrowserTab.TabIndex;
5250 FTabHintIndex := -1;
5251 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5252 if TBrowserRecord(BrowserTab.Tabs.Objects[i]) = BrowserRecord then begin
5253 BrowserTab.Tabs.BeginUpdate;
5255 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5256 doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
5257 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
5260 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
5262 if( FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i]) ) then
5263 FActiveContent := nil;
5264 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5265 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
5267 FBrowsers.Move(j, 4);
5269 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5270 BrowserTab.Tabs.Delete(i);
5271 if idx >= i then begin
5272 if idx > (BrowserTab.Tabs.Count - 1) then
5273 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1
5274 else if (idx = 0) and (BrowserTab.Tabs.Count > 0) then
5275 BrowserTab.TabIndex := 0
5277 BrowserTab.TabIndex := idx - 1;
5279 BrowserTab.TabIndex := idx;
5281 if BrowserTab.Tabs.Count = 0 then begin
5282 BrowserNullTab.Thread := nil;
5284 if(BrowserTab.TabIndex <> -1) and
5285 ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
5286 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
5287 if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
5288 = TWebBrowser(FBrowsers[4]) )then
5290 TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser := nil;
5291 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
5292 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
5293 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
5298 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
5299 := TWebBrowser(FBrowsers[4]);
5300 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
5301 FBrowsers.Move(4, 0);
5303 BrowserTab.Tabs.EndUpdate;
5304 BrowserTab.OnChange(nil);
5309 procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
5314 idx := BrowserTab.TabIndex;
5315 FTabHintIndex := -1;
5316 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5317 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
5318 BrowserTab.Tabs.BeginUpdate;
5320 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5321 doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
5322 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
5325 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
5327 if(FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i])) then
5328 FActiveContent := nil;
5329 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5330 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
5332 FBrowsers.Move(j, 4);
5334 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5335 BrowserTab.Tabs.Delete(i);
5336 if idx >= i then begin
5337 if idx > (BrowserTab.Tabs.Count - 1) then
5338 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1
5339 else if (idx = 0) and (BrowserTab.Tabs.Count > 0) then
5340 BrowserTab.TabIndex := 0
5342 BrowserTab.TabIndex := idx - 1;
5344 BrowserTab.TabIndex := idx;
5346 if(BrowserTab.TabIndex <> -1) and
5347 ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
5348 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
5349 if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
5350 = TWebBrowser(FBrowsers[4]) )then
5352 TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser := nil;
5353 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
5354 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
5355 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
5360 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
5361 := TWebBrowser(FBrowsers[4]);
5362 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
5363 FBrowsers.Move(4, 0);
5366 BrowserTab.Tabs.EndUpdate;
5367 BrowserTab.OnChange(nil);
5373 procedure TGikoForm.KokomadeActionExecute(Sender: TObject);
5376 ThreadItem: TThreadItem;
5378 No := KokoPopupMenu.Tag;
5379 if No = 0 then Exit;
5380 ThreadItem := GetActiveContent;
5381 if ThreadItem = nil then Exit;
5382 ThreadItem.Kokomade := No;
5383 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
5384 FActiveContent.FRepaint := true;
5385 InsertBrowserTab(FActiveContent.Thread, true);
5386 Application.ProcessMessages;
5389 procedure TGikoForm.ZenbuActionExecute(Sender: TObject);
5391 ThreadItem: TThreadItem;
5393 ThreadItem := GetActiveContent;
5394 if ThreadItem = nil then Exit;
5395 ThreadItem.Kokomade := -1;
5396 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
5397 FActiveContent.FRepaint := true;
5398 InsertBrowserTab(FActiveContent.Thread, true);
5399 Application.ProcessMessages;
5402 function TGikoForm.Hook(var Message: TMessage): Boolean;
5411 procedure TGikoForm.KokoResActionExecute(Sender: TObject);
5413 Editor: TEditorForm;
5418 Number := KokoPopupMenu.Tag;
5419 if Number = 0 then Exit;
5420 Item := GetActiveContent;
5421 if Item = nil then Exit;
5423 if Item.Count >= 1000 then begin
5424 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Í
\83\8c\83X
\90\94\82ª
\82P
\82O
\82O
\82O
\82ð
\92´
\82¦
\82Ä
\82¢
\82é
\82Ì
\82Å
\8f\91\8d\9e\82Ý
\8fo
\97\88\82Ü
\82¹
\82ñ
\81B' + #13#10
5425 + '
\90V
\83X
\83\8c\83b
\83h
\82ð
\92T
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
5426 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin
5430 Editor := TEditorForm.Create(Self);
5431 Editor.SetThreadItem(Item);
5432 Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
5434 Editor.BodyEdit.SetFocus;
5437 procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
5439 ItemRoundPMenu.Visible := (GetActiveList is TBoard);
5440 ItemReservPMenu.Visible := (GetActiveList is TBoard);
5441 LPMSep01.Visible := (GetActiveList is TBoard);
5442 ListRoundPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5443 ListReservPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5444 LPMSep02.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5445 KidokuPMenu.Visible := (GetActiveList is TBoard);
5446 MidokuPMenu.Visible := (GetActiveList is TBoard);
5447 UrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5448 NameUrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5449 AllSelectPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5450 LPMSep05.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5451 DeletePMenu.Visible := (GetActiveList is TBoard);
5452 LPMSep06.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5454 BoardFavoriteAddMenu.Visible := (GetActiveList is TCategory);
5455 ThreadFavoriteAddMenu.Visible := (GetActiveList is TBoard);
5457 AddRoundNameMenu(ItemReservPMenu);
5458 AddRoundNameMenu(ListReservPMenu);
5461 procedure TGikoForm.BoardIEActionExecute(Sender: TObject);
5465 if GetActiveList is TBoard then begin
5466 URL := TBoard(GetActiveList).URL;
5467 GikoSys.OpenBrowser(URL, gbtAuto);
5471 procedure TGikoForm.SelectItemURLCopyActionExecute(Sender: TObject);
5478 List := TList.Create;
5480 SelectListItem(List);
5481 for i := 0 to List.Count - 1 do begin
5482 if TObject(List[i]) is TBoard then
5483 s := s + TBoard(List[i]).URL + #13#10
5484 else if TObject(List[i]) is TThreadItem then
5485 s := s + TThreadItem(List[i]).URL + #13#10;
5488 Clipboard.AsText := s;
5494 procedure TGikoForm.SelectItemNameCopyActionExecute(Sender: TObject);
5501 List := TList.Create;
5503 SelectListItem(List);
5504 for i := 0 to List.Count - 1 do begin
5505 if TObject(List[i]) is TBoard then
5506 s := s + TBoard(List[i]).Title + #13#10
5507 else if TObject(List[i]) is TThreadItem then
5508 s := s + TThreadItem(List[i]).Title + #13#10;
5511 Clipboard.AsText := s;
5517 procedure TGikoForm.SelectItemNameURLCopyActionExecute(Sender: TObject);
5524 List := TList.Create;
5526 SelectListItem(List);
5527 for i := 0 to List.Count - 1 do begin
5528 if TObject(List[i]) is TBoard then
5529 s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10
5530 else if TObject(List[i]) is TThreadItem then
5531 s := s + TThreadItem(List[i]).Title + #13#10 + TThreadItem(List[i]).URL + #13#10;
5534 Clipboard.AsText := s;
5540 procedure TGikoForm.BoardIEActionUpdate(Sender: TObject);
5542 if GetActiveList is TBoard then
5543 BoardIEAction.Enabled := True
5545 BoardIEAction.Enabled := False;
5548 procedure TGikoForm.SelectItemURLCopyActionUpdate(Sender: TObject);
5550 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5551 SelectItemURLCopyAction.Enabled := True
5553 SelectItemURLCopyAction.Enabled := False;
5556 procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
5558 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5559 SelectItemNameCopyAction.Enabled := True
5561 SelectItemNameCopyAction.Enabled := False;
5564 procedure TGikoForm.SelectItemNameURLCopyActionUpdate(Sender: TObject);
5566 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5567 SelectItemNameURLCopyAction.Enabled := True
5569 SelectItemNameURLCopyAction.Enabled := False;
5572 procedure TGikoForm.AllSelectActionUpdate(Sender: TObject);
5574 if ListView.SelCount > 0 then
5575 AllSelectAction.Enabled := True
5577 AllSelectAction.Enabled := False;
5580 procedure TGikoForm.LogDeleteActionUpdate(Sender: TObject);
5582 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5583 LogDeleteAction.Enabled := True
5585 LogDeleteAction.Enabled := False;
5588 procedure TGikoForm.BrowserTabCloseActionExecute(Sender: TObject);
5591 // ThreadItem: TThreadItem;
5593 idx := BrowserTab.TabIndex;
5594 if idx <> -1 then begin
5595 if BrowserTab.Tabs.Objects[idx] <> nil then begin
5596 //ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5597 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
5602 procedure TGikoForm.NotSelectTabCloseActionExecute(Sender: TObject);
5607 idx := BrowserTab.TabIndex;
5608 if idx = -1 then Exit;
5609 BrowserTab.Tabs.BeginUpdate;
5610 for i := BrowserTab.Tabs.Count - 1 downto BrowserTab.TabIndex + 1 do begin
5611 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5612 BrowserTab.Tabs.Delete(i);
5614 if idx > 0 then begin
5615 for i := BrowserTab.TabIndex - 1 downto 0 do begin
5616 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5617 BrowserTab.Tabs.Delete(i);
5620 BrowserTab.Tabs.EndUpdate;
5623 procedure TGikoForm.AllTabCloseActionExecute(Sender: TObject);
5627 //SetContent(BrowserNullTab);
5628 FActiveContent := nil;
5629 BrowserNullTab.Thread := nil;
5630 BrowserTab.OnChange := nil;
5631 BrowserTab.Tabs.BeginUpdate;
5632 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
5633 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5635 BrowserTab.Tabs.Clear;
5636 BrowserTab.Tabs.EndUpdate;
5637 BrowserTab.OnChange := BrowserTabChange;
5638 SetContent(BrowserNullTab);
5641 procedure TGikoForm.TreeSelectBoradReloadExecute(Sender: TObject);
5644 TmpTreeNode: TTreeNode;
5646 TmpTreeNode := FClickNode;
5647 TreeView.Selected := FClickNode;
5650 if TObject(TmpTreeNode.Data) is TBoard then
5651 Board := TBoard(TmpTreeNode.Data)
5652 else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then
5653 Board := TFavoriteBoardItem(TmpTreeNode.Data).Item;
5655 if Board <> nil then
5656 DownloadList(Board);
5659 procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject);
5661 ThreadItem: TThreadItem;
5662 TmpTreeNode: TTreeNode;
5664 TmpTreeNode := FClickNode;
5665 TreeView.Selected := FClickNode;
5668 if TObject(TmpTreeNode.Data) is TThreadItem then
5669 ThreadItem := TThreadItem(TmpTreeNode.Data)
5670 else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then
5671 ThreadItem := TFavoriteThreadItem(TmpTreeNode.Data).Item;
5673 if ThreadItem <> nil then
5674 DownloadContent(ThreadItem);
5677 procedure TGikoForm.TreeSelectURLCopyExecute(Sender: TObject);
5679 TmpTreeNode: TTreeNode;
5682 TmpTreeNode := FClickNode;
5683 TreeView.Selected := FClickNode;
5684 if TObject(TmpTreeNode.Data) is TBoard then begin
5685 s := TBoard(TmpTreeNode.Data).URL + #13#10;
5686 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5687 s := TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5688 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5689 s := TThreadItem(TmpTreeNode.Data).URL + #13#10;
5690 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5691 s := TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5693 Clipboard.AsText := s;
5696 procedure TGikoForm.TreeSelectNameURLCopyExecute(Sender: TObject);
5698 TmpTreeNode: TTreeNode;
5701 TmpTreeNode := FClickNode;
5702 TreeView.Selected := FClickNode;
5703 if TObject(TmpTreeNode.Data) is TBoard then begin
5704 s := TBoard(TmpTreeNode.Data).Title + #13#10 + TBoard(TmpTreeNode.Data).URL + #13#10;
5705 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5706 s := TFavoriteBoardItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5707 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5708 s := TThreadItem(TmpTreeNode.Data).Title + #13#10 + TThreadItem(TmpTreeNode.Data).URL + #13#10;
5709 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5710 s := TFavoriteThreadItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5712 Clipboard.AsText := s;
5715 procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
5717 FClickNode := TreeView.Selected;
5718 if FClickNode = nil then begin
5719 TreeSelectThreadPupupMenu.Visible := False;
5720 TreeSelectBoardPupupMenu.Visible := False;
5721 TPMSep01.Visible := False;
5722 TreeSelectURLPupupMenu.Visible := False;
5723 TreeSelectNamePupupMenu.Visible := False;
5724 TreeSelectNameURLPupupMenu.Visible := False;
5725 TreeSelectFavoriteAddPupupMenu.Visible := False;
5726 TreeSelectLogDeleteSeparator.Visible := False;
5727 TreeSelectLogDeletePopupMenu.Visible := False;
5728 end else if TObject(FClickNode.Data) is TBoard then begin
5729 TreeSelectThreadPupupMenu.Visible := False;
5730 TreeSelectBoardPupupMenu.Visible := True;
5731 TPMSep01.Visible := True;
5732 TreeSelectURLPupupMenu.Visible := True;
5733 TreeSelectNamePupupMenu.Visible := True;
5734 TreeSelectNameURLPupupMenu.Visible := True;
5735 TreeSelectFavoriteAddPupupMenu.Visible := True;
5736 TreeSelectLogDeleteSeparator.Visible := False;
5737 TreeSelectLogDeletePopupMenu.Visible := False;
5738 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
5739 TreeSelectThreadPupupMenu.Visible := False;
5740 TreeSelectBoardPupupMenu.Visible := True;
5741 TPMSep01.Visible := True;
5742 TreeSelectURLPupupMenu.Visible := True;
5743 TreeSelectNamePupupMenu.Visible := True;
5744 TreeSelectNameURLPupupMenu.Visible := True;
5745 TreeSelectFavoriteAddPupupMenu.Visible := True;
5746 TreeSelectLogDeleteSeparator.Visible := False;
5747 TreeSelectLogDeletePopupMenu.Visible := False;
5748 end else if (TObject(FClickNode.Data) is TThreadItem) then begin
5749 TreeSelectThreadPupupMenu.Visible := True;
5750 TreeSelectBoardPupupMenu.Visible := False;
5751 TPMSep01.Visible := True;
5752 TreeSelectURLPupupMenu.Visible := True;
5753 TreeSelectNamePupupMenu.Visible := True;
5754 TreeSelectNameURLPupupMenu.Visible := True;
5755 TreeSelectFavoriteAddPupupMenu.Visible := True;
5756 TreeSelectLogDeleteSeparator.Visible := True;
5757 TreeSelectLogDeletePopupMenu.Visible := True;
5758 end else if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
5759 TreeSelectThreadPupupMenu.Visible := True;
5760 TreeSelectBoardPupupMenu.Visible := False;
5761 TPMSep01.Visible := True;
5762 TreeSelectURLPupupMenu.Visible := True;
5763 TreeSelectNamePupupMenu.Visible := True;
5764 TreeSelectNameURLPupupMenu.Visible := True;
5765 TreeSelectFavoriteAddPupupMenu.Visible := True;
5766 TreeSelectLogDeleteSeparator.Visible := True;
5767 TreeSelectLogDeletePopupMenu.Visible := True;
5768 end else if (TObject(FClickNode.Data) is TCategory) then begin
5769 TreeSelectThreadPupupMenu.Visible := False;
5770 TreeSelectBoardPupupMenu.Visible := False;
5771 TPMSep01.Visible := False;
5772 TreeSelectURLPupupMenu.Visible := False;
5773 TreeSelectNamePupupMenu.Visible := True;
5774 TreeSelectNameURLPupupMenu.Visible := False;
5775 TreeSelectFavoriteAddPupupMenu.Visible := False;
5776 TreeSelectLogDeleteSeparator.Visible := False;
5777 TreeSelectLogDeletePopupMenu.Visible := False;
5778 end else if FClickNode.IsFirstNode then begin
5779 TreeSelectThreadPupupMenu.Visible := False;
5780 TreeSelectBoardPupupMenu.Visible := False;
5781 TPMSep01.Visible := False;
5782 TreeSelectURLPupupMenu.Visible := False;
5783 TreeSelectNamePupupMenu.Visible := True;
5784 TreeSelectNameURLPupupMenu.Visible := False;
5785 TreeSelectFavoriteAddPupupMenu.Visible := False;
5786 TreeSelectLogDeleteSeparator.Visible := False;
5787 TreeSelectLogDeletePopupMenu.Visible := False;
5789 TreeSelectThreadPupupMenu.Visible := False;
5790 TreeSelectBoardPupupMenu.Visible := False;
5791 TPMSep01.Visible := False;
5792 TreeSelectURLPupupMenu.Visible := False;
5793 TreeSelectNamePupupMenu.Visible := False;
5794 TreeSelectNameURLPupupMenu.Visible := False;
5795 TreeSelectFavoriteAddPupupMenu.Visible := False;
5796 TreeSelectLogDeleteSeparator.Visible := False;
5797 TreeSelectLogDeletePopupMenu.Visible := False;
5801 procedure TGikoForm.BrowserNewWindow2(Sender: TObject;
5802 var ppDisp: IDispatch; var Cancel: WordBool);
5811 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
5812 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
5813 Html := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
5815 URL := GikoSys.GetHRefText(Html);
5816 URL := GikoSys.HTMLDecode(URL);
5818 //
\83A
\83h
\83\8c\83X
\83o
\81[
\82Ì
\97\9a\97ð
5819 if GikoSys.Setting.LinkAddAddressBar then begin
5820 idx := AddressComboBox.Items.IndexOf(URL);
5821 if idx = -1 then begin
5822 AddressComboBox.Items.Insert(0, URL);
5823 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
5824 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
5826 AddressComboBox.Items.Delete(idx);
5827 AddressComboBox.Items.Insert(0, URL);
5834 { ShiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5835 CtrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
5838 Memo1.Lines.Add('ShiftDown');
5840 Memo1.Lines.Add('CtrlDown');
5842 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
5843 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
5844 Url := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
5848 URL := GetHRefText(URL);
5850 ParseURI(URL, Protocol, Host, path, Document, Port, Bookmark);
5852 b := Parse2chURL(path, document, bbs, num);
5853 memo1.Lines.Add('bbs: ' + bbs);
5854 memo1.Lines.Add('key: ' + num);
5856 Memo1.Lines.Add('Parse2chURL: True')
5858 Memo1.Lines.Add('Parse2chURL: False');
5860 // AppPath := 'C:\Borland\Projects\Test\TestBrowser\TestBrowser.exe';
5865 procedure TGikoForm.ListSplitterCanResize(Sender: TObject;
5866 var NewSize: Integer; var Accept: Boolean);
5868 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5869 if ViewPanel.Width < 2 then begin
5870 ViewPanel.Width := 1;
5871 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5872 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5873 GikoSys.Setting.ListWidthState := glsMax;
5874 end else if ViewPanel.Width > (ThreadMainPanel.Width - 80) then begin
5875 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5876 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5877 GikoSys.Setting.ListWidthState := glsMin;
5879 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5880 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5881 GikoSys.Setting.ListWidthState := glsNormal;
5884 if ViewPanel.Height < 2 then begin
5885 ViewPanel.Height := 1;
5886 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5887 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5888 GikoSys.Setting.ListHeightState := glsMax;
5889 end else if ViewPanel.Height > (ThreadMainPanel.Height - BrowserCoolBar.Height - 7) then begin
5890 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5891 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5892 GikoSys.Setting.ListHeightState := glsMin;
5894 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5895 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5896 GikoSys.Setting.ListHeightState := glsNormal;
5901 procedure TGikoForm.ListSplitterMoved(Sender: TObject);
5903 if Mouse.Capture <> 0 then
5905 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5906 if (ViewPanel.Width > 1) and (ViewPanel.Width <= (ThreadMainPanel.Width - 80)) then
5907 FBrowserSizeWidth := ViewPanel.Width;
5909 if (ViewPanel.Height > 1) and (ViewPanel.Height <= (ThreadMainPanel.Height - BrowserCoolBar.Height)) then
5910 FBrowserSizeHeight := ViewPanel.Height;
5912 { if (Mouse.Capture = 0) and (ViewPanel.Height > 1) and (not ArrangeAction.Checked) then
5913 FBrowserSizeHeight := ViewPanel.Height
5914 else if (Mouse.Capture = 0) and (ViewPanel.Width > 1) and (ArrangeAction.Checked) then
5915 FBrowserSizeWidth := ViewPanel.Width;}
5918 procedure TGikoForm.BrowserTabChange(Sender: TObject);
5922 ThreadItem: TThreadItem;
5925 // if NewTab = -1 then
5927 if not BrowserTab.Dragging then begin
5928 FTabHintIndex := -1;
5929 BrowserTab.Hint := '';
5930 idx := BrowserTab.TabIndex;
5931 if idx = -1 then begin
5932 BrowserNullTab.Thread := nil;
5933 SetContent(BrowserNullTab);
5935 end else if(BrowserTab.Tabs.Objects[idx] <> nil) and (BrowserTab.Tabs.Objects[idx] is TBrowserRecord) then begin
5936 if TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser <> nil then begin
5937 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser);
5939 FBrowsers.Move(j ,0);
5941 if( FActiveContent <> nil ) and (FActiveContent.Browser <> nil) and
5942 (FActiveContent.Browser <> BrowserNullTab.Browser) and
5943 (FActiveContent.Browser = TWebBrowser(FBrowsers[4])) then
5944 FBrowsers.Move(4, 0);
5946 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5947 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[4]) then begin
5948 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser := nil;
5949 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent <> nil then begin
5950 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent.Free;
5951 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent := nil;
5955 TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser := TWebBrowser(FBrowsers[4]);
5956 TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Repaint := true;
5957 FBrowsers.Move(4, 0);
5959 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Thread;
5960 TOleControl(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser).BringToFront;
5961 GikoSys.OnlyAHundredRes := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
5962 OnlyAHundredRes.Checked := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
5963 SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
5965 if GikoSys.Setting.URLDisplay then
5966 AddressComboBox.Text := ThreadItem.URL;
5969 if ThreadItem = nil then Exit;
5970 if ThreadItem.IsLogFile then begin
5971 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5972 if GikoSys.Setting.ListWidthState = glsMin then begin
5973 BrowserMaxAction.Execute;
5974 if GikoForm.Visible then
5975 SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
5978 if GikoSys.Setting.ListHeightState = glsMin then begin
5979 BrowserMaxAction.Execute;
5980 if GikoForm.Visible then
5981 SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
5990 procedure TGikoForm.BrowserTabMouseDown(Sender: TObject;
5991 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
5997 if Button = mbMiddle then begin
5998 //
\83}
\83E
\83X
\92\86\83{
\83^
\83\93
6001 p := BrowserTab.ScreenToClient(p);
6002 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
6004 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6005 //end else if Button = mbRight then begin
6006 //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é
6007 //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
6008 { //
\83}
\83E
\83X
\89E
\83{
\83^
\83\93
6011 // GetCursorPos(p2);
6012 p := BrowserTab.ScreenToClient(p);
6013 // idx := BrowserTab.ItemAtPos(p);
6014 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
6015 if idx <> -1 then begin
6016 OldIndex := BrowserTab.TabIndex;
6017 BrowserTab.TabIndex := idx;
6018 if OldIndex <> idx then
6019 BrowserTab.OnChange(nil);
6020 BrowserTabPopupMenu.Tag := idx;
6021 BrowserTabPopupMenu.Popup(p2.X, p2.Y);
6024 end else if BUtton = mbLeft then begin
6025 FDragWFirst := true;
6026 FMouseDownPos.X := X;
6027 FMouseDownPos.Y := Y;
6032 procedure TGikoForm.SetBrowserTabState;
6035 CoolBand: TCoolBand;
6037 BrowserBottomPanel.AutoSize := False;
6038 if GikoSys.Setting.BrowserTabVisible then begin
6039 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
6040 BrowserTab.Style := tsTabs;
6041 if GikoSys.Setting.BrowserTabPosition = gtpTop then
6042 BrowserTab.TabPosition := tpTop
6044 BrowserTab.TabPosition := tpBottom;
6045 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
6046 BrowserTab.TabPosition := tpTop;
6047 BrowserTab.Style := tsButtons;
6049 BrowserTab.TabPosition := tpTop;
6050 BrowserTab.Style := tsFlatButtons
6053 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
6054 BrowserTab.Parent := BrowserTabToolBar;
6055 BrowserBottomPanel.Hide;
6056 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6057 if CoolBand <> nil then
6058 CoolBand.Visible := True;
6059 // BrowserTab.Parent := BrowserTopPanel;
6060 // BrowserTab.Parent := BrowserCoolBar;
6061 // BrowserTab.Top := 26;
6062 // BrowserTopPanel.Height := 44;
6065 BrowserTab.Parent := BrowserBottomPanel;
6066 BrowserTab.Top := 0;
6067 BrowserTab.Left := 0;
6068 BrowserBottomPanel.Show;
6069 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6070 if CoolBand <> nil then
6071 CoolBand.Visible := False;
6072 // BrowserTopPanel.Height := 26;
6076 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6077 if CoolBand <> nil then
6078 CoolBand.Visible := False;
6079 BrowserBottomPanel.Visible := False;
6080 // BrowserTab.Visible := False;
6081 // BrowserTopPanel.Height := 26;
6085 procedure TGikoForm.BrowserTabDragOver(Sender, Source: TObject; X,
6086 Y: Integer; State: TDragState; var Accept: Boolean);
6090 idx := BrowserTab.IndexOfTabAt(X, Y);
6091 Accept := (Source = BrowserTab) and (BrowserTab.TabIndex <> idx);
6094 procedure TGikoForm.BrowserTabDragDrop(Sender, Source: TObject; X,
6099 idx := BrowserTab.IndexOfTabAt(X, Y);
6101 BrowserTab.Tabs.Move(BrowserTab.TabIndex, idx);
6104 procedure TGikoForm.BrowserTabMouseMove(Sender: TObject;
6105 Shift: TShiftState; X, Y: Integer);
6108 ThreadItem: TThreadItem;
6111 TabIdx := BrowserTab.IndexOfTabAt(x, y);
6113 if ( ssLeft in Shift ) and ( BrowserTab.Style = tsTabs ) then begin
6114 if FDragWFirst = false then begin
6115 FDragWFirst := true;
6117 BrowserTab.EndDrag(false);
6118 BrowserTab.BeginDrag(false, DandD_THRESHOLD);
6119 FDragWFirst := false;
6122 BrowserTab.EndDrag(false);
6123 FDragWFirst := false;
6126 if (FTabHintIndex <> TabIdx) and (TabIdx <> -1) then begin
6127 Application.CancelHint;
6128 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[TabIdx]).Thread;
6129 if ThreadItem.Title <> BrowserTab.Tabs[TabIdx] then begin
6130 BrowserTab.Hint := ThreadItem.Title;
6131 Application.ShowHint := True;
6133 BrowserTab.Hint := '';
6134 Application.ShowHint := True;
6136 FTabHintIndex := TabIdx;
6141 procedure TGikoForm.BrowserDocumentComplete(Sender: TObject;
6142 const pDisp: IDispatch; var URL: OleVariant);
6144 FDispHtmlDocument: DispHTMLDocument;
6145 BrowserRecord :TBrowserRecord;
6148 // AddMessageList('DocumentComplete', nil);
6149 if TObject(Sender) is TWebBrowser then begin
6150 BrowserRecord := nil;
6151 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
6152 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(Sender) then begin
6153 BrowserRecord := TBrowserRecord(BrowserTab.Tabs.Objects[i]);
6157 if BrowserRecord <> nil then begin
6158 if BrowserRecord.FEvent <> nil then
6159 BrowserRecord.FEvent.Free;
6160 FDispHtmlDocument := Idispatch(OleVariant(BrowserRecord.Browser.ControlInterface).Document) as DispHTMLDocument;
6161 BrowserRecord.FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
6162 BrowserRecord.FEvent.OnContextMenu := OnDocumentContextMenu;
6167 procedure TGikoForm.SelectReservActionUpdate(Sender: TObject);
6172 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then begin
6173 List := TList.Create;
6175 SelectListItem(List);
6176 for i := 0 to List.Count - 1 do begin
6177 if TObject(List[i]) is TThreadItem then begin
6178 if TThreadItem(List[i]).IsLogFile then begin
6179 SelectReservAction.Enabled := True;
6184 SelectReservAction.Enabled := False;
6188 end else if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
6189 SelectReservAction.Enabled := True
6191 SelectReservAction.Enabled := False;
6194 procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
6196 AddRoundNameMenu(RoundNamePopupMenu.Items);
6199 procedure TGikoForm.AddRoundNameMenu(MenuItem: TMenuItem);
6205 Item := TMenuItem.Create(Self);
6206 Item.Caption := '
\90V
\82µ
\82¢
\96¼
\91O
\82Å
\8f\84\89ñ
\97\
\96ñ(&N)...';
6207 Item.OnClick := SelectNewRoundNameExecute;
6209 Item := TMenuItem.Create(Self);
6210 Item.Caption := '
\8f\84\89ñ
\83\8a\83X
\83g
\82©
\82ç
\8dí
\8f\9c(&D)';
6211 Item.OnClick := SelectDeleteRoundExecute;
6213 Item := TMenuItem.Create(Self);
6214 Item.Caption := '-';
6216 for i := 0 to RoundList.RoundNameList.Count - 1 do begin
6217 Item := TMenuItem.Create(Self);
6218 Item.Caption := RoundList.RoundNameList[i];
6219 Item.OnClick := SetSelectRoundName;
6224 procedure TGikoForm.SelectNewRoundNameExecute(Sender: TObject);
6227 Dlg: TRoundNameDialog;
6230 Dlg := TRoundNameDialog.Create(Self);
6233 if Dlg.ModalResult <> mrCancel then begin
6234 s := Trim(Dlg.RoundNameEdit.Text);
6235 RoundList.RoundNameList.Add(s);
6236 SetSelectItemRound(True, s, TMenuItem(Sender).Parent.Name);
6243 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string);
6245 threadItem : TThreadItem;
6247 if ParentName <> 'dummy1' then begin
6248 SetSelectItemRound(RoundFlag, RoundName);
6250 threadItem := GetActiveContent;
6251 if threadItem <> nil then begin
6252 threadItem.RoundName := RoundName;
6253 threadItem.Round := RoundFlag;
6258 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
6263 List := TList.Create;
6265 SelectListItem(List);
6266 for i := 0 to List.Count - 1 do begin
6267 if TObject(List[i]) is TBoard then begin
6268 TBoard(List[i]).RoundName := RoundName;
6269 TBoard(List[i]).Round := RoundFlag;
6270 end else if TObject(List[i]) is TThreadItem then begin
6271 if TThreadItem(List[i]).IsLogFile then begin
6272 TThreadItem(List[i]).RoundName := RoundName;
6273 TThreadItem(List[i]).Round := RoundFlag;
6282 procedure TGikoForm.SelectDeleteRoundExecute(Sender: TObject);
6284 SetSelectItemRound(False, '', TMenuItem(Sender).Parent.Name);
6288 procedure TGikoForm.SelectReservActionExecute(Sender: TObject);
6290 //
\82±
\82Ì
\83R
\83\81\83\93\83g
\8dí
\8f\9c\82µ
\82Ä
\82Í
\91Ê
\96Ú
6293 procedure TGikoForm.SetSelectRoundName(Sender: TObject);
6295 MenuItem: TMenuItem;
6297 if Sender is TMenuItem then begin
6298 MenuItem := TMenuItem(Sender);
6299 SetSelectItemRound(True, StripHotKey(MenuItem.Caption), TMenuItem(Sender).Parent.Name);
6304 procedure TGikoForm.NewBoardActionExecute(Sender: TObject);
6306 Dlg: TNewBoardDialog;
6310 for i := 0 to Screen.CustomFormCount - 1 do begin
6311 if TObject(Screen.CustomForms[i]) is TEditorForm then begin
6312 Msg := '
\83\8c\83X
\83G
\83f
\83B
\83^
\82ð
\91S
\82Ä
\95Â
\82¶
\82Ä
\82
\82¾
\82³
\82¢';
6313 MsgBox(Handle, Msg, '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
6317 Dlg := TNewBoardDialog.Create(Self);
6325 procedure TGikoForm.LoginActionExecute(Sender: TObject);
6330 if GikoSys.Dolib.Connected then begin
6331 //
\83\8d\83O
\83A
\83E
\83g
6332 GikoSys.Dolib.Disconnect;
6333 LoginAction.Checked := False;
6334 AddMessageList('
\83\8d\83O
\83A
\83E
\83g
\82µ
\82Ü
\82µ
\82½', nil, gmiOK);
6335 LoginAction.Caption := '
\83\8d\83O
\83C
\83\93(&L)';
6337 TmpCursor := Screen.Cursor;
6338 Screen.Cursor := crHourGlass;
6340 //
\92Ê
\8fí
\83\8d\83O
\83C
\83\93
6341 if not GikoSys.Setting.ForcedLogin then begin
6342 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6343 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6344 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6345 if GikoSys.Setting.ReadProxy then begin
6346 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6347 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6349 GikoSys.Dolib.ProxyAddress := '';
6350 GikoSys.Dolib.ProxyPort := 0;
6352 if GikoSys.Dolib.Connect then begin
6353 LoginAction.Checked := True;
6354 AddMessageList('
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6355 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6356 LoginToolButton.Style := tbsCheck;
6358 // 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);
6359 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6361 LoginAction.Checked := False;
6362 LoginToolButton.Down := False;
6363 LoginToolButton.Style := tbsButton;
6366 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
6367 + '
\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
6368 + '
\82±
\82Ì
\83\82\81[
\83h
\82Å
\83\8d\83O
\83C
\83\93\82ð
\8e\8e\82Ý
\82Ü
\82·
\82©
\81H' + #13#10;
6369 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) = IDYES then begin
6370 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6371 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6372 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6373 if GikoSys.Setting.ReadProxy then begin
6374 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6375 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6377 GikoSys.Dolib.ProxyAddress := '';
6378 GikoSys.Dolib.ProxyPort := 0;
6380 //SSL
\8fá
\8aQ
\97p
\8b
\90§
\83\8d\83O
\83C
\83\93
6381 GikoSys.Dolib.ForcedConnect;
6382 if GikoSys.Dolib.Connect then begin
6383 LoginAction.Checked := True;
6384 AddMessageList('
\8b
\90§
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6385 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6386 LoginToolButton.Style := tbsCheck;
6388 // 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);
6389 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6391 LoginAction.Checked := False;
6392 LoginToolButton.Down := False;
6393 LoginToolButton.Style := tbsButton;
6396 LoginAction.Checked := False;
6397 LoginToolButton.Down := False;
6398 LoginToolButton.Style := tbsButton;
6402 Screen.Cursor := TmpCursor;
6407 procedure TGikoForm.KeySettingActionExecute(Sender: TObject);
6409 Dlg: TKeySettingForm;
6411 Dlg := TKeySettingForm.Create(Self);
6413 if Dlg.ShowModal = mrOk then
6414 GikoSys.SaveKeySetting(ActionList);
6415 GikoSys.SaveEditorKeySetting(Dlg.EditorForm.ActionList);
6421 procedure TGikoForm.ArrangeActionExecute(Sender: TObject);
6423 if ArrangeAction.Checked then begin
6425 ViewPanel.Align := alNone;
6426 ListSplitter.Align := alNone;
6427 ThreadPanel.Align := alNone;
6429 ViewPanel.Width := FBrowserSizeWidth;
6430 ViewPanel.Align := alLeft;
6432 ListSplitter.Width := 5;
6433 ListSplitter.Align := alLeft;
6435 ViewPanel.Left := -10;
6437 ThreadPanel.Align := alClient;
6439 GikoSys.Setting.ListOrientation := gloHorizontal;
6440 case GikoSys.Setting.ListWidthState of
6442 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6443 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6444 ViewPanel.Width := 1;
6447 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6448 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6451 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6452 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6453 ViewPanel.Width := ThreadMainPanel.Width - 80;
6458 ViewPanel.Align := alNone;
6459 ListSplitter.Align := alNone;
6460 ThreadPanel.Align := alNone;
6462 ViewPanel.Height := FBrowserSizeHeight;
6463 ViewPanel.Align := alTop;
6465 ListSplitter.Height := 5;
6466 ListSplitter.Align := alTop;
6468 ViewPanel.Top := -10;
6470 ThreadPanel.Align := alClient;
6471 GikoSys.Setting.ListOrientation := gloVertical;
6472 case GikoSys.Setting.ListHeightState of
6474 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6475 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6476 ViewPanel.Height := 1;
6479 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6480 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6483 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6484 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6485 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
6492 procedure TGikoForm.PaneInitActionExecute(Sender: TObject);
6494 CabinetPanel.Width := 150;
6495 MessagePanel.Height := 40;
6497 FBrowserSizeWidth := 200;
6498 FBrowserSizeHeight := 200;
6499 if ArrangeAction.Checked then begin
6500 ViewPanel.Width := FBrowserSizeWidth;
6502 ViewPanel.Height := FBrowserSizeHeight;
6504 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6505 if GikoSys.Setting.ListHeightState = glsMax then begin
6506 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6507 GikoSys.Setting.ListHeightState := glsNormal;
6510 if GikoSys.Setting.ListWidthState = glsMax then begin
6511 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6512 GikoSys.Setting.ListWidthState := glsNormal;
6517 procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
6519 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';
6520 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6523 ThreadItem: TThreadItem;
6525 idx := BrowserTab.TabIndex;
6526 if idx <> -1 then begin
6527 if BrowserTab.Tabs.Objects[idx] <> nil then begin
6528 if GikoSys.Setting.DeleteMsg then
6529 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
6531 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).FThread;
6532 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6533 ThreadItem.DeleteLogFile;
6534 if ThreadItem.ParentBoard = FActiveList then
6540 function TGikoForm.GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
6545 if CoolBar = nil then
6547 for i := 0 to CoolBar.Bands.Count - 1 do begin
6548 if CoolBar.Bands[i].Control = Control then begin
6549 Result := CoolBar.Bands[i];
6555 procedure TGikoForm.BrowserTabToolBarResize(Sender: TObject);
6557 if BrowserTab.Parent = BrowserTabToolBar then
6558 BrowserTab.Width := BrowserTabToolBar.Width;
6561 procedure TGikoForm.SelectTextClearActionExecute(Sender: TObject);
6563 GikoSys.Setting.SelectTextList.Clear;
6564 SelectComboBox.Items.Clear;
6565 SelectComboBox.Text := '';
6566 SetListViewType( gvtAll );
6569 procedure TGikoForm.NameTextClearActionExecute(Sender: TObject);
6573 GikoSys.Setting.NameList.Clear;
6574 for i := 0 to Screen.CustomFormCount - 1 do begin
6575 if TObject(Screen.CustomForms[i]) is TEditorForm then
6576 TEditorForm(Screen.CustomForms[i]).NameComboBox.Items.Clear;
6580 procedure TGikoForm.MailTextClearActionExecute(Sender: TObject);
6584 GikoSys.Setting.MailList.Clear;
6585 for i := 0 to Screen.CustomFormCount - 1 do begin
6586 if TObject(Screen.CustomForms[i]) is TEditorForm then
6587 TEditorForm(Screen.CustomForms[i]).MailComboBox.Items.Clear;
6591 procedure TGikoForm.LeftmostTabSelectActionExecute(Sender: TObject);
6593 if BrowserTab.Tabs.Count > 0 then begin
6594 BrowserTab.TabIndex := 0;
6595 BrowserTab.OnChange(nil);
6599 procedure TGikoForm.LeftTabSelectActionExecute(Sender: TObject);
6601 if BrowserTab.Tabs.Count > 0 then begin
6602 if BrowserTab.TabIndex = -1 then begin
6603 BrowserTab.TabIndex := 0;
6604 BrowserTab.OnChange(nil);
6605 end else if BrowserTab.TabIndex > 0 then begin
6606 BrowserTab.TabIndex := BrowserTab.TabIndex - 1;
6607 BrowserTab.OnChange(nil);
6612 procedure TGikoForm.RightTabSelectActionExecute(Sender: TObject);
6614 if BrowserTab.Tabs.Count > 0 then begin
6615 if BrowserTab.TabIndex = -1 then begin
6616 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6617 BrowserTab.OnChange(nil);
6618 end else if BrowserTab.TabIndex < (BrowserTab.Tabs.Count - 1) then begin
6619 BrowserTab.TabIndex := BrowserTab.TabIndex + 1;
6620 BrowserTab.OnChange(nil);
6625 procedure TGikoForm.RightmostTabSelectActionExecute(Sender: TObject);
6627 if BrowserTab.Tabs.Count > 0 then begin
6628 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6629 BrowserTab.OnChange(nil);
6633 procedure TGikoForm.LeftmostTabSelectActionUpdate(Sender: TObject);
6635 LeftmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6638 procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
6640 LeftTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6643 procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);
6645 RightTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6648 procedure TGikoForm.RightmostTabSelectActionUpdate(Sender: TObject);
6650 RightmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6653 procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
6658 procedure TGikoForm.SetMenuFont;
6660 // GikoSys.MenuFont(MenuToolBar.Font);
6661 // MenuToolBar.Buttons[0].AutoSize := False;
6662 // MenuToolBar.Buttons[0].AutoSize := True;
6663 // MenuToolBar.Font.Color := clMenuText;
6664 GikoSys.MenuFont(MainCoolBar.Font);
6665 MenuToolBar.Buttons[0].AutoSize := False;
6666 MenuToolBar.Buttons[0].AutoSize := True;
6667 MainCoolBar.AutoSize := False;
6668 MainCoolBar.AutoSize := True;
6670 GikoSys.MenuFont(ListCoolBar.Font);
6671 GikoSys.MenuFont(BrowserCoolBar.Font);
6672 // MenuToolBar.Font.Color := clMenuText;
6675 procedure TGikoForm.FavoriteMenuClick(Sender: TObject);
6681 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\92Ç
\89Á
6682 NewMenu := TMenuItem.Create(MainMenu);
6683 NewMenu.Action := FavoriteAddAction;
6684 FavoriteMenu.Add(NewMenu);
6685 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\90®
\97\9d
6686 NewMenu := TMenuItem.Create(FavoriteMenu);
6687 NewMenu.Action := FavoriteArrangeAction;
6688 FavoriteMenu.Add(NewMenu);
6689 //
\83Z
\83p
\83\8c\81[
\83^
6690 NewMenu := TMenuItem.Create(FavoriteMenu);
6691 NewMenu.Caption := '-';
6692 FavoriteMenu.Add(NewMenu);
6694 CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
6697 procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
6702 for i := 0 to Node.Count - 1 do begin
6703 NewMenu := TFavoriteMenuItem.Create(Self);
6704 NewMenu.AutoHotkeys := maAutomatic;
6705 NewMenu.Caption := CustomStringReplace(Node.Item[i].Text, '&', '&&');
6706 TFavoriteMenuItem(NewMenu).Data := Node.Item[i].Data;
6707 MenuItem.Add(NewMenu);
6709 if TObject(Node.Item[i].Data) is TFavoriteFolder then begin
6710 NewMenu.ImageIndex := TOOL_ICON_FAV_FOLDER;
6711 CreateFavMenu(Node.Item[i], NewMenu);
6712 end else if TObject(Node.Item[i].Data) is TFavoriteBoardItem then begin
6713 NewMenu.ImageIndex := TOOL_ICON_FAV_BOARD;
6714 NewMenu.OnClick := FavoriteClick;
6715 end else if TObject(Node.Item[i].Data) is TFavoriteThreadItem then begin
6716 NewMenu.ImageIndex := TOOL_ICON_FAV_THREAD;
6717 NewMenu.OnClick := FavoriteClick;
6722 procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
6724 Dlg : TFavoriteAddDialog;
6726 Items : ^TTreeNodes;
6731 Items := @(FavoriteTreeView.Items);
6732 if Item is TFavoriteBoardItem then
6733 Item := TFavoriteBoardItem( Item ).Item
6734 else if Item is TFavoriteThreadItem then
6735 Item := TFavoriteThreadItem( Item ).Item;
6736 if Item is TBoard then begin
6737 ItemURL := TBoard( Item ).URL;
6738 for i := Items^.Count - 1 downto 0 do begin
6739 Data := Items^.Item[ i ].Data;
6740 if TObject( Data ) is TFavoriteBoardItem then begin
6741 if ItemURL = TFavoriteThreadItem( Data ).URL then begin
6742 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
6748 Dlg := TFavoriteAddDialog.Create(Self);
6750 Dlg.SetBoard( TBoard( Item ) );
6755 end else if Item is TThreadItem then begin
6756 ItemURL := TThreadItem( Item ).URL;
6757 for i := Items^.Count - 1 downto 0 do begin
6758 Data := Items^.Item[ i ].Data;
6759 if TObject( Data ) is TFavoriteThreadItem then begin
6760 if ItemURL = TFavoriteThreadItem( Data ).URL then begin
6761 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
6767 Dlg := TFavoriteAddDialog.Create(Self);
6769 Dlg.SetThreadItem( TThreadItem( Item ) );
6779 procedure TGikoForm.FavoriteAddActionExecute(Sender: TObject);
6781 ShowFavoriteAddDialog(GetActiveContent);
6784 procedure TGikoForm.FavoriteClick(Sender: TObject);
6787 FavoriteClick( Sender, True );
6791 procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
6794 ThreadItem: TThreadItem;
6795 FavBoard: TFavoriteBoardItem;
6796 FavThread: TFavoriteThreadItem;
6800 if Sender is TFavoriteMenuItem then
6801 Item := TFavoriteMenuItem(Sender).Data
6802 else if Sender is TLinkToolButton then
6803 Item := TLinkToolButton(Sender).Data
6804 else if Sender is TTreeNode then
6805 Item := TTreeNode( Sender ).Data
6809 if TObject(Item) is TFavoriteBoardItem then begin
6810 FavBoard := TFavoriteBoardItem(Item);
6811 Board := FavBoard.Item;
6812 if Board <> nil then begin
6813 if (FTreeType = gtt2ch) and (FActiveBBS <> Board.ParentCategory.ParenTBBS) then
6814 ShowBBSTree( Board.ParentCategory.ParenTBBS );
6815 SelectTreeNode(Board, True);
6817 end else if TObject(Item) is TFavoriteThreadItem then begin
6818 FavThread := TFavoriteThreadItem(Item);
6819 ThreadItem := FavThread.Item;
6820 if ThreadItem = nil then
6823 InsertBrowserTab(ThreadItem, ActiveTab);
6825 if ThreadItem.IsLogFile then begin
6826 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6827 if GikoSys.Setting.ListWidthState = glsMin then begin
6828 BrowserMaxAction.Execute;
6829 if GikoForm.Visible then
6833 if GikoSys.Setting.ListHeightState = glsMin then begin
6834 BrowserMaxAction.Execute;
6835 if GikoForm.Visible then
6843 procedure TGikoForm.FavoriteAddActionUpdate(Sender: TObject);
6845 FavoriteAddAction.Enabled := (GetActiveContent <> nil);
6848 procedure TGikoForm.BoardFavoriteAddActionExecute(Sender: TObject);
6850 if TObject(ListView.Selected.Data) is TBoard then
6851 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
6854 procedure TGikoForm.BoardFavoriteAddActionUpdate(Sender: TObject);
6856 BoardFavoriteAddAction.Enabled := (GetActiveList is TCategory) and (ListView.SelCount > 0);
6859 procedure TGikoForm.ThreadFavoriteAddActionExecute(Sender: TObject);
6861 if TObject(ListView.Selected.Data) is TThreadItem then
6862 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
6865 procedure TGikoForm.ThreadFavoriteAddActionUpdate(Sender: TObject);
6867 ThreadFavoriteAddAction.Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
6870 procedure TGikoForm.TreeSelectFavoriteAddActionExecute(Sender: TObject);
6872 ShowFavoriteAddDialog(TObject(FClickNode.Data));
6875 procedure TGikoForm.FavoriteArrangeActionExecute(Sender: TObject);
6877 Dlg: TFavoriteArrangeDialog;
6879 Dlg := TFavoriteArrangeDialog.Create(Self);
6885 PostMessage( Handle, USER_SETLINKBAR, 0, 0 );
6888 procedure TGikoForm.BBSMenuItemOnClick(
6893 if Sender is TBBSMenuItem then
6894 ShowBBSTree( TBBSMenuItem( Sender ).Data );
6898 procedure TGikoForm.MainCoolBarResize(Sender: TObject);
6900 TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
6903 procedure TGikoForm.MoveToActionExecute(Sender: TObject);
6908 URL := Trim(AddressComboBox.Text);
6911 idx := AddressComboBox.Items.IndexOf(URL);
6912 if idx = -1 then begin
6913 AddressComboBox.Items.Insert(0, URL);
6914 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
6915 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
6917 AddressComboBox.Items.Delete(idx);
6918 AddressComboBox.Items.Insert(0, URL);
6922 procedure TGikoForm.MoveToURL(URL: string);
6925 protocol, host, path, document, port, bookmark : string;
6926 BBSID, BBSKey: string;
6928 ThreadItem: TThreadItem;
6931 tmpThread : TThreadItem;
6932 // category : TCategory;
6933 // categoryNode : TTreeNode;
6934 // boardNode : TTreeNode;
6935 shiftDown : Boolean;
6939 GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark );
6940 GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey );
6943 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
6944 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
6945 if shiftDown then begin
6946 GikoSys.OpenBrowser(URL, gbtUserApp);
6948 end else if ctrlDown then begin
6949 GikoSys.OpenBrowser(URL, gbtIE);
6953 //=====
\83v
\83\89\83O
\83C
\83\93
6956 bi := High( BoardPlugIns );
6957 for i := Low( BoardPlugIns ) to bi do begin
6958 if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
6959 case BoardPlugIns[ i ].AcceptURL( URL ) of
6962 tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL );
6963 boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
6964 Board := BBSsFindBoardFromURL( boardURL );
6965 if Board = nil then begin
6966 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
6967 //GikoSys.OpenBrowser(URL, gbtUserApp);
6970 Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL );
6971 if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
6972 ShowBBSTree( BBSs[ 1 ] );
6975 if not Board.IsThreadDatRead then begin
6976 GikoSys.ReadSubjectFile( Board );
6981 ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
6982 if ThreadItem = nil then begin
6983 ThreadItem := tmpThread;
6984 Board.Insert( 0, ThreadItem );
6985 if ActiveList is TBoard then begin
6986 if TBoard(ActiveList) = Board then
6987 ListView.Items.Count := ListView.Items.Count + 1;
6989 InsertBrowserTab( ThreadItem );
6990 DownloadContent( ThreadItem );
6994 InsertBrowserTab( ThreadItem );
6995 if not ThreadItem.IsLogFile then begin
6996 DownloadContent( ThreadItem );
7006 Board := BBSsFindBoardFromURL( URL );
7007 if Board <> nil then begin
7008 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
7009 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7010 SelectTreeNode( Board, True );
7018 // 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¢
7022 if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
7023 boardURL := GikoSys.Get2chThreadURL2BoardURL( URL );
7024 Board := BBSsFindBoardFromURL( boardURL );
7026 Board := BBSsFindBoardFromBBSID( BBSID );
7028 if Board = nil then begin
7029 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
7030 //
\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)
7031 Board := BBSs[ 0 ].FindBBSID( Copy(BBSID, 1 , Length(BBSID) - 1) );
7033 if Board = nil then begin
7034 GikoSys.OpenBrowser(URL, gbtUserApp);
7036 //Board := GikoSys.GetUnknownBoard( nil, boardURL );
7037 //if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
7038 // ShowBBSTree( BBSs[ 1 ] );
7040 if not Board.IsThreadDatRead then
7041 GikoSys.ReadSubjectFile(Board);
7042 URL := GikoSys.Get2chBrowsableThreadURL( URL );
7043 ThreadItem := Board.FindThreadFromURL( URL );
7044 //
\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)
7045 if ThreadItem = nil then begin
7046 ThreadItem := Board.FindThreadFromFileName( BBSKey + '.dat' );
7049 if ThreadItem = nil then begin
7050 //shift ->
\90Ý
\92è
\83u
\83\89\83E
\83U
\81i
\96³
\82¯
\82ê
\82ÎIE
\81j
7052 {shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
7053 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
7055 GikoSys.OpenBrowser(URL, gbtUserApp)
7056 else if ctrlDown then
7057 GikoSys.OpenBrowser(URL, gbtIE)
7060 ThreadItem := TThreadItem.Create( nil, URL );
7061 ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
7062 if AnsiPos(Host, Board.URL) = 0 then
7063 ThreadItem.DownloadHost := Host
7065 ThreadItem.DownloadHost := '';
7066 Board.Insert(0, ThreadItem);
7067 if ActiveList is TBoard then begin
7068 if TBoard(ActiveList) = Board then
7069 ListView.Items.Count := ListView.Items.Count + 1;
7071 InsertBrowserTab(ThreadItem);
7072 DownloadContent(ThreadItem);
7075 if ThreadItem.IsLogFile then
7076 InsertBrowserTab(ThreadItem)
7078 if AnsiPos(Host, Board.URL) = 0 then
7079 ThreadItem.DownloadHost := Host
7081 ThreadItem.DownloadHost := '';
7082 InsertBrowserTab(ThreadItem);
7083 DownloadContent(ThreadItem);
7087 Board := BBSsFindBoardFromURL( URL );
7088 if Board = nil then begin
7089 GikoSys.OpenBrowser(URL, gbtAuto);
7091 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
7092 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7093 SelectTreeNode( Board, True );
7098 procedure TGikoForm.AddressToolBarResize(Sender: TObject);
7100 AddressComboBox.Width := AddressToolBar.Width - MoveToToolButton.Width - 10;
7101 CoolBarResized( Sender, MainCoolBar );
7104 procedure TGikoForm.AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
7105 Shift: TShiftState);
7107 if Key = VK_RETURN then
7108 MoveToAction.Execute;
7111 procedure TGikoForm.BrowserEnter(Sender: TObject);
7113 Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
7116 procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
7118 CDS:PCopyDataStruct;
7122 CDS := Message.CopyDataStruct;
7123 GetMem(PC, CDS^.cbData);
7125 lstrcpy(PC,CDS^.lpData);
7126 SetString(sURL, PC,lstrlen(PC));
7131 Message.Result := 1;
7134 procedure TGikoForm.WndProc(var Message: TMessage);
7139 if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
7142 if Message.WParam = SC_MINIMIZE then
7145 TreeClick( TreeView.Selected );
7159 procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
7161 hComboEdit: THandle;
7162 // KeyData: Integer;
7165 if AddressComboBox.Focused or SelectComboBox.Focused then begin
7166 if Msg.CharCode in [VK_BACK] then begin
7167 hComboEdit := GetFocus;
7168 if hComboEdit <> 0 then
7169 SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, Msg.KeyData);
7170 // SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, $000E0001);
7173 if Msg.CharCode in [VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PRIOR, VK_NEXT] then begin
7174 hComboEdit := GetFocus;
7175 if hComboEdit <> 0 then
7176 SendMessage(hComboEdit, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
7180 //
\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ð
7181 KeyData := Msg.KeyData;
7182 if (KeyData and $20000000) = 0 then begin
7183 if Msg.CharCode in [Ord('F'), Ord('V'), Ord('B'), Ord('R'),
7184 Ord('A'), Ord('T'), Ord('H')] then begin
7185 if not ActionList.IsShortCut(Msg) then begin
7193 procedure TGikoForm.BrowserTabVisibleActionExecute(Sender: TObject);
7195 GikoSys.Setting.BrowserTabVisible := BrowserTabVisibleAction.Checked;
7199 procedure TGikoForm.BrowserTabTopActionExecute(Sender: TObject);
7201 BrowserTabBottomAction.Checked := False;
7202 BrowserTabTopAction.Checked := True;
7203 GikoSys.Setting.BrowserTabPosition := gtpTop;
7207 procedure TGikoForm.BrowserTabBottomActionExecute(Sender: TObject);
7209 BrowserTabTopAction.Checked := False;
7210 BrowserTabBottomAction.Checked := True;
7211 GikoSys.Setting.BrowserTabPosition := gtpBottom;
7215 procedure TGikoForm.BrowserTabTabStyleActionExecute(Sender: TObject);
7217 BrowserTabButtonStyleAction.Checked := False;
7218 BrowserTabFlatStyleAction.Checked := False;
7219 BrowserTabTabStyleAction.Checked := True;
7220 GikoSys.Setting.BrowserTabStyle := gtsTab;
7224 procedure TGikoForm.BrowserTabButtonStyleActionExecute(Sender: TObject);
7226 BrowserTabTabStyleAction.Checked := False;
7227 BrowserTabFlatStyleAction.Checked := False;
7228 BrowserTabButtonStyleAction.Checked := True;
7229 GikoSys.Setting.BrowserTabStyle := gtsButton;
7233 procedure TGikoForm.BrowserTabFlatStyleActionExecute(Sender: TObject);
7235 BrowserTabFlatStyleAction.Checked := True;
7236 BrowserTabTabStyleAction.Checked := False;
7237 BrowserTabButtonStyleAction.Checked := False;
7238 GikoSys.Setting.BrowserTabStyle := gtsFlat;
7242 procedure TGikoForm.PreviewTimerTimer(Sender: TObject);
7248 HtmlFileName: string;
7252 TargetFrameName: OleVariant;
7253 PostData: OleVariant;
7254 Headers: OleVariant;
7255 WindowHeight: Integer;
7256 WindowWidth: Integer;
7260 Protocol, Host, Path, Document, Port, Bookmark: string;
7262 PreviewTimer.Enabled := False;
7266 case GikoSys.Setting.PreviewSize of
7273 WindowHeight := 192;
7277 WindowHeight := 384;
7281 WindowHeight := 480;
7283 else begin //gpsMedium
7285 WindowHeight := 288;
7289 ARect := Rect(0, 0, WindowWidth, WindowHeight);
7291 case GikoSys.Setting.PopupPosition of
7292 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7293 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7294 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
7295 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
7296 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
7297 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
7298 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7299 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7300 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Ó
7303 html := '<html><head>'#13#10
7305 + 'function init() {'#13#10
7306 + ' if ((document.body.clientHeight >= Image1.height) && (document.body.clientWidth >= Image1.width)) {'#13#10
7308 + ' var dh, ih;'#13#10
7309 + ' dh = document.body.clientWidth / document.body.clientHeight;'#13#10
7310 + ' ih = Image1.width / Image1.height;'#13#10
7311 + ' if (document.body.clientWidth < document.body.clientHeight) {'#13#10
7312 + ' if (ih > dh)'#13#10
7313 + ' Image1.width = document.body.clientWidth;'#13#10
7315 + ' Image1.height = document.body.clientHeight;'#13#10
7317 + ' if (ih < dh)'#13#10
7318 + ' Image1.height = document.body.clientHeight;'#13#10
7320 + ' Image1.width = document.body.clientWidth;'#13#10
7323 + ' Message.style.display = "none";'#13#10
7327 + '<body topmargin="0" leftmargin="0" style="border-width: 1px; overflow:hidden; border-style: solid;" onLoad="init()">'#13#10
7328 + '<div align="center" id="Message">
\83v
\83\8c\83r
\83\85\81[
\8dì
\90¬
\92\86</div>'#13#10
7329 + '<div align="center"><img name="Image1" border="0" src="%ImageURL%"></div>'#13#10
7331 sl := TStringList.Create;
7334 HtmlFileName := GikoSys.GetAppDir + HTML_FILE_NAME;
7335 sl.Text := AnsiReplaceStr(html, '%ImageURL%', FPreviewURL);
7336 sl.SaveToFile(HtmlFileName);
7343 NavURL := HtmlFileName;
7345 TargetFrameName := '';
7348 GikoSys.ParseURI(FPreviewURL, Protocol, Host, Path, Document, Port, Bookmark);
7349 Referer := Protocol + '://' + Host;
7351 Referer := Referer + ':' + Port;
7352 Referer := Referer + Path;
7353 Headers := 'Referer: ' + Referer;
7355 FPreviewBrowser.Navigate(NavURL, Flags, TargetFrameName, PostData, Headers);
7357 if ARect.Top + WindowHeight > Screen.DesktopHeight then
7358 ARect.Top := Screen.DesktopHeight - WindowHeight;
7359 if ARect.Left + WindowWidth > Screen.DesktopWidth then
7360 ARect.Left := Screen.DesktopWidth - WindowWidth;
7361 if ARect.Left < Screen.DesktopLeft then ARect.Left := Screen.DesktopLeft;
7362 if ARect.Bottom < Screen.DesktopTop then ARect.Bottom := Screen.DesktopTop;
7364 SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
7365 ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
7367 // Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
7368 // SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
7372 procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
7374 if PreviewTimer.Enabled then
7375 PreviewTimer.Enabled := False;
7376 if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
7377 FHint.ReleaseHandle;
7380 if (FPreviewBrowser <> nil) and (IsWindowVisible(FPreviewBrowser.Handle)) then
7381 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
7382 Message.Result := 1;
7386 procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
7388 MsgBarCloseAction.Execute;
7391 function TGikoForm.OnDocumentContextMenu(Sender: TObject): WordBool;
7393 Doc: IHtmlDocument2;
7394 Range: IHTMLTxtRange;
7397 ThreadItem: TThreadItem;
7399 Doc := FactiveContent.FBrowser.Document as IHtmlDocument2;
7400 Range := Doc.selection.createRange as IHTMLTxtRange;
7401 s := CustomStringReplace(Range.text, '
\81@', ' ');//
\91S
\8ap
\8bó
\94\92\82ð
\94¼
\8ap
\8bó
\94\92\82É
7402 s := ZenToHan(Trim(s));
7403 if GikoSys.IsNumeric(s) then begin
7405 ThreadItem := GetActiveContent;
7406 if ThreadItem <> nil then begin
7408 FHint.PopupType := gptThread;
7409 SetResPopupText(ThreadItem, Num, Num, False, False);
7410 if FHint.ResCount <> 0 then
7420 procedure TGikoForm.SetResPopupText(threadItem: TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
7432 boardPlugIn : TBoardPlugIn;
7435 if StNum > ToNum then begin
7441 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
7442 if StNum + 10 < ToNum then
7443 ToNum := StNum + 10;
7445 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
7447 if ThreadItem <> nil then
7448 FHint.Title := ThreadItem.Title;
7450 if ThreadItem <> nil then begin
7451 if ThreadItem.IsBoardPlugInAvailable then begin
7452 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
7453 boardPlugIn := ThreadItem.BoardPlugIn;
7455 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
7456 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
7457 for i := StNum to ToNum do begin
7459 //
\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½
7460 tmp := boardPlugIn.GetDat( DWORD( threadItem ), i );
7461 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7462 Res := GikoSys.DivideStrLine(tmp);
7463 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7464 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7466 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7469 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7470 Body := CustomStringReplace(Body, '<br>', #10,true);
7471 Body := CustomStringReplace(Body, '</a>', '',true);
7472 Body := GikoSys.DeleteLink(Body);
7473 Body := CustomStringReplace(Body, '<', '<');
7474 Body := CustomStringReplace(Body, '>', '>');
7475 Body := CustomStringReplace(Body, '"', '"');
7476 Body := CustomStringReplace(Body, '&', '&');
7477 Body := CustomStringReplace(Body, ' ', ' ');
7479 FHint.Add(Header, Body);
7480 //FHint.Title := '';
7484 for i := StNum to ToNum do begin
7486 FileName := ThreadItem.FilePath;
7487 tmp := GikoSys.ReadThreadFile(FileName, Line);
7488 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7489 Res := GikoSys.DivideStrLine(tmp);
7490 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7491 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7493 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7495 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7496 Body := CustomStringReplace(Body, '<br>', #10,true);
7497 Body := CustomStringReplace(Body, '</a>', '',true);
7498 Body := GikoSys.DeleteLink(Body);
7499 Body := CustomStringReplace(Body, '<', '<');
7500 Body := CustomStringReplace(Body, '>', '>');
7501 Body := CustomStringReplace(Body, '"', '"');
7502 Body := CustomStringReplace(Body, '&', '&');
7503 Body := CustomStringReplace(Body, ' ', ' ');
7504 FHint.Add(Header, Body);
7505 //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
7514 procedure TGikoForm.ShowTextPopup;
7519 // if Trim(s) = '' then
7522 FHint.Font.Name := GikoSys.Setting.HintFontName;
7523 FHint.Font.Size := GikoSys.Setting.HintFontSize;
7524 FHint.Font.Color := GikoSys.Setting.HintFontColor;
7525 FHint.Color := GikoSys.Setting.HintBackColor;
7526 FHint.HeaderBold := GikoSys.Setting.ResPopupHeaderBold;
7528 if FHint.PopupType = gptRaw then
7529 ARect := FHint.CalcHintRect(Screen.Width, FHint.Caption, nil)
7531 ARect := FHint.CalcHintRect(Screen.Width, '', nil);
7532 case GikoSys.Setting.PopupPosition of
7533 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7534 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7535 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
7536 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
7537 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
7538 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
7539 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7540 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7541 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Ó
7543 //FHint.ActivateHint(ARect, s);
7544 if FHint.PopupType = gptRaw then
7545 FHint.ActivateHint(ARect, FHint.Caption)
7547 FHint.ActivateHint(ARect, '');
7549 FHint.ReleaseHandle;
7554 procedure TGikoForm.GikoHelpActionExecute(Sender: TObject);
7558 FileName := GikoSys.GetAppDir + 'batahlp.chm';
7559 if not FileExists(FileName) then begin
7562 '
\83w
\83\8b\83v
\82ª
\8c©
\82Â
\82©
\82è
\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½' + #13#10 +
7563 '
\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 +
7564 '
\83w
\83\8b\83v
\82Í
\83M
\83R
\83i
\83r
\82Ì
\83T
\83C
\83g
\82É
\92u
\82¢
\82Ä
\82 \82è
\82Ü
\82·',
7569 ShellExecute(Handle, 'open', PChar(FileName), '', PChar(GikoSys.GetAppDir), SW_SHOW);
7572 procedure TGikoForm.ToolButton18Click(Sender: TObject);
7574 if FTreeType = gttHistory then begin
7577 TreeView.Items.Clear;
7581 procedure TGikoForm.KotehanActionExecute(Sender: TObject);
7583 Dlg: TKotehanDialog;
7585 Dlg := TKotehanDialog.Create(Self);
7593 procedure TGikoForm.SetLinkBar;
7597 ToolButton: TLinkToolButton;
7598 MenuItem: TMenuItem;
7599 oldIgnoreResize : Boolean;
7601 oldIgnoreResize := FIsIgnoreResize;
7602 FIsIgnoreResize := True;
7603 MainCoolBar.Bands.BeginUpdate;
7605 LinkBarPopupMenu.Items.Clear;
7606 for i := LinkToolBar.ButtonCount - 1 downto 0 do
7607 //LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
7608 LinkToolBar.Buttons[i].Free;
7609 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
7610 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
7611 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
7612 ToolButton := TLinkToolButton.Create(LinkToolBar);
7613 // ToolButton.Parent := LinkToolBar;
7614 if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteFolder then begin
7615 MenuItem := TMenuItem.Create(Self);
7616 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
7617 LinkBarPopupMenu.Items.Add(MenuItem);
7618 ToolButton.MenuItem := MenuItem;
7619 ToolButton.ImageIndex := TOOL_ICON_FAV_FOLDER;
7620 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
7621 ToolButton.ImageIndex := TOOL_ICON_FAV_BOARD;
7622 ToolButton.OnClick := FavoriteClick;
7623 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
7624 ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
7625 ToolButton.OnClick := FavoriteClick;
7627 ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
7628 ToolButton.Left := 10000;
7629 ToolButton.Data := FavoriteTreeView.Items[i].Item[j].Data;
7630 ToolButton.AutoSize := True;
7631 ToolButton.OnDragDrop := LinkToolButtonDragDrop;
7632 ToolButton.OnDragOver := FavoriteDragOver;
7633 ToolButton.OnMouseDown := LinkToolButtonOnMouseDown;
7634 ToolButton.OnMouseMove := LinkToolButtonOnMouseMove;
7635 ToolButton.OnMouseUp := LinkToolButtonOnMouseUp;
7636 ToolButton.OnStartDrag := LinkToolButtonStartDrag;
7637 //ToolButton.DragMode := dmAutomatic;
7638 ToolButton.DragMode := dmManual;
7639 ToolButton.PopupMenu := FavoriteTreePopupMenu;
7641 LinkToolBar.InsertControl(ToolButton);
7646 { if LinkToolBar.ButtonCount = 0 then begin
7647 ToolButton := TLinkToolButton.Create(LinkToolBar);
7648 ToolButton.Style := tbsButton;
7649 ToolButton.ImageIndex := -1;
7650 ToolButton.Caption := '';
7651 LinkToolBar.InsertControl(ToolButton);
7654 MainCoolBar.Bands.EndUpdate;
7655 LoadCoolBarSettings;
7656 FIsIgnoreResize := oldIgnoreResize;
7660 procedure TGikoForm.FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
7668 if Sender = FavoriteTreeView then begin
7669 Node := FavoriteTreeView.GetNodeAt(X, Y);
7674 bound := Node.DisplayRect( False );
7675 height := bound.Bottom - bound.Top;
7676 if (bound.Top + height / 2) <= Y then
7677 Node := FavoriteTreeView.GetNodeAt(X, Y + height);
7682 if Node.IsFirstNode then
7687 if FDropSpaceNode <> nil then
7688 if FDropSpaceNode.AbsoluteIndex = Node.AbsoluteIndex then
7691 if Change then begin
7692 if FDropSpaceNode <> nil then
7693 FDropSpaceNode.Free;
7695 FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil );
7696 FDropSpaceNode.MoveTo( Node, naInsert );
7697 FDropSpaceNode.ImageIndex := -1;
7698 FDropSpaceNode.SelectedIndex := -1;
7702 if Source = FavoriteTreeView then begin
7703 if FavoriteTreeView.Selected = FavoriteTreeView.Items.GetFirstNode then begin
7708 end else if Source = BrowserTab then
7710 else if Source = ListView then
7712 else if Source is TLinkToolButton then
7714 else if Source = TreeView then
7720 procedure TGikoForm.FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
7723 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
7726 procedure TGikoForm.LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
7728 // FDragging := true;
7731 procedure TGikoForm.LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
7733 SenderNode: TTreeNode;
7734 LinkToolButton: TLinkToolButton;
7737 LinkToolButton := TLinkToolButton( Sender );
7738 SenderNode := TreeNodeDataFind( FavoriteTreeView.TopItem, LinkToolButton.Data );
7740 FavoriteDragDrop( SenderNode, Source );
7744 procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7746 favButton : TLinkToolButton;
7747 favThreadItem : TFavoriteThreadItem;
7753 if Sender is TLinkToolButton then begin
7754 favButton := TLinkToolButton( Sender );
7755 if TObject( favButton.Data ) is TFavoriteThreadItem then begin
7756 favThreadItem := TFavoriteThreadItem( favButton.Data );
7757 if favThreadItem.Item <> nil then
7758 InsertBrowserTab( favThreadItem.Item, False );
7766 procedure TGikoForm.LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
7770 TToolButton( Sender ).DragMode := dmManual;
7771 if ssLeft in Shift then begin
7772 // 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)
7773 if FDragTime = 0 then begin
7774 FDragTime := GetTickCount();
7776 Now := GetTickCount();
7777 if (Now - FDragTime) > 500 then begin
7778 if FDragButton <> TToolButton( Sender ) then begin
7780 FDragButton := TToolButton( Sender );
7781 TToolButton(Sender).BeginDrag(false ,5);
7784 {$IF Defined(debug)}
7785 ShowMessage('Error');
7796 procedure TGikoForm.LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7801 function TGikoForm.GetWidthAllToolButton(ToolBar: TToolBar): Integer;
7806 for i := 0 to ToolBar.ButtonCount - 1 do
7807 Result := Result + ToolBar.Buttons[i].Width;
7810 procedure TGikoForm.MainCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7812 Control : TWinControl;
7815 Control := FindControl(BandInfo^.hwndChild);
7816 if Control = nil then
7819 for i := MainCoolBar.Bands.Count - 1 downto 0 do begin
7820 if MainCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
7821 idx := MainCoolBar.Bands[ i ].ID;
7825 Canvas.Font.Handle := GetStockObject( DEFAULT_GUI_FONT );
7826 if (Control = MenuToolBar) or (Control = StdToolBar) then begin
7827 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
7828 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7829 BandInfo^.cxMinChild := 0;
7830 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth;
7831 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7832 end else if Control = LinkToolBar then begin
7833 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
7834 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7835 BandInfo^.cxMinChild := 0;
7836 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83\8a\83\93\83N' );
7837 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7838 end else begin // AddressToolBar
7839 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
7840 BandInfo^.cxMinChild := 0;
7841 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83A
\83h
\83\8c\83X' );
7845 procedure TGikoForm.MainCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
7851 ChevronPopupMenu.Items.Clear;
7853 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
7854 if MainCoolBar.Bands[ i ].Visible then begin
7855 if Idx = Int64(RebarChevron^.uBand) then begin
7862 if (Idx >= 0) and (MainCoolBar.Bands.Count > Idx) then begin
7863 if MainCoolBar.Bands[Idx].Control = MenuToolbar then begin
7865 end else if MainCoolBar.Bands[Idx].Control = StdToolbar then begin
7866 ToolBarChevronMenu(StdToolBar);
7867 end else if MainCoolBar.Bands[Idx].Control = LinkToolbar then begin
7871 p := MainCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
7872 ChevronPopupMenu.Popup(p.x, p.y);
7876 procedure TGikoForm.MenuBarChevronMenu;
7877 procedure SetSubMenu(MenuItem: TMenuItem; PopupItem: TMenuItem);
7883 for i := 0 to MenuItem.Count - 1 do begin
7885 if MenuItem[i] is TFavoriteMenuItem then begin
7886 Item := TFavoriteMenuItem.Create(Self);
7887 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(MenuItem[i]).Data;
7889 Item := TMenuItem.Create(Self);
7890 Item.Caption := MenuItem[i].Caption;
7891 Item.Action := MenuItem[i].Action;
7892 Item.ImageIndex := MenuItem[i].ImageIndex;
7893 Item.OnClick := MenuItem[i].OnClick;
7894 PopupItem.Add(Item);
7895 if MenuItem[i].Count > 0 then
7896 SetSubMenu(MenuItem[i], Item);
7905 ChevronPopupMenu.Items.Clear;
7906 ChevronPopupMenu.Images := MainMenu.Images;
7907 bw := GetWidthAllToolButton(MenuToolBar);
7908 if MenuToolBar.Width < bw then begin
7910 for i := 0 to MenuToolBar.ButtonCount - 1 do begin
7911 w := w + MenuToolBar.Buttons[i].Width;
7912 if MenuToolBar.Width <= w then begin
7913 Item := TMenuItem.Create(Self);
7914 Item.Caption := MenuToolBar.Buttons[i].MenuItem.Caption;
7915 //Item.Action := MenuToolBar.Buttons[i].MenuItem.Action;
7916 ChevronPopupMenu.Items.Add(Item);
7917 SetSubMenu(MenuToolbar.Buttons[i].MenuItem, Item);
7923 procedure TGikoForm.ToolBarChevronMenu(ToolBar: TToolBar);
7924 procedure SetSubMenu(PopupMenu: TPopupMenu; PopupItem: TMenuItem);
7929 if Assigned(PopupMenu.OnPopup) then
7930 PopupMenu.OnPopup(nil);
7931 for i := 0 to PopupMenu.Items.Count - 1 do begin
7933 if PopupMenu.Items[i] is TFavoriteMenuItem then begin
7934 Item := TFavoriteMenuItem.Create(Self);
7935 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(PopupMenu.Items[i]).Data;
7937 Item := TMenuItem.Create(Self);
7938 Item.Caption := PopupMenu.Items[i].Caption;
7939 Item.Action := PopupMenu.Items[i].Action;
7940 Item.ImageIndex := PopupMenu.Items[i].ImageIndex;
7941 Item.OnClick := PopupMenu.Items[i].OnClick;
7942 PopupItem.Add(Item);
7951 ChevronPopupMenu.Items.Clear;
7952 ChevronPopupMenu.Images := ToolBar.HotImages;
7953 bw := GetWidthAllToolButton(ToolBar);
7954 if ToolBar.Width < bw then begin
7956 for i := 0 to ToolBar.ButtonCount - 1 do begin
7957 w := w + ToolBar.Buttons[i].Width;
7958 if ToolBar.Width <= w then begin
7959 Case ToolBar.Buttons[i].Tag of
7962 Item := TMenuItem.Create(Self);
7963 if ToolBar.Buttons[i].Style = tbsSeparator then
7966 Item.Caption := ToolBar.Buttons[i].Caption;
7967 Item.Action := ToolBar.Buttons[i].Action;
7968 //Item.Visible := True;
7970 ChevronPopupMenu.Items.Add(Item);
7971 if ToolBar.Buttons[i].DropdownMenu <> nil then begin
7973 Item.OnClick := nil;
7974 SetSubMenu(ToolBar.Buttons[i].DropdownMenu, Item);
7978 //
\8f«
\97\88\82Ì
\82½
\82ß
\82Ì
\97\
\96ñ
7985 procedure TGikoForm.LinkBarChevronMenu;
7990 Item: TFavoriteMenuItem;
7992 Button: TLinkToolButton;
7994 ChevronPopupMenu.Items.Clear;
7995 ChevronPopupMenu.Images := LinkToolBar.Images;
7996 bw := GetWidthAllToolButton(LinkToolBar);
7997 if LinkToolBar.Width < bw then begin
7999 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
8000 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
8001 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
8002 w := w + LinkToolBar.Buttons[j].Width;
8003 if LinkToolBar.Width <= w then begin
8004 if LinkToolBar.Buttons[j] is TLinkToolButton then begin
8005 Button := TLinkToolButton(LinkToolBar.Buttons[j]);
8006 Item := TFavoriteMenuItem.Create(Self);
8007 if TObject(Button.Data) is TFavoriteFolder then begin
8008 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], Item);
8009 end else if TObject(Button.Data) is TFavoriteBoardItem then begin
8010 Item.OnClick := FavoriteClick;
8011 end else if TObject(Button.Data) is TFavoriteThreadItem then begin
8012 Item.OnClick := FavoriteClick;
8014 Item.Data := Button.Data;
8015 Item.Caption := LinkToolBar.Buttons[j].Caption;
8016 Item.ImageIndex := LinkToolBar.Buttons[j].ImageIndex;
8017 ChevronPopupMenu.Items.Add(Item);
8027 procedure TGikoForm.ListCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8029 Control: TWinControl;
8032 Control := FindControl(BandInfo^.hwndChild);
8033 if Control = nil then
8036 for i := ListCoolBar.Bands.Count - 1 downto 0 do begin
8037 if ListCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8038 idx := ListCoolBar.Bands[ i ].ID;
8042 if Control = ListToolBar then begin
8043 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8044 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8045 BandInfo^.cxMinChild := 0;
8046 BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
8047 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8049 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8050 BandInfo^.cxMinChild := 0;
8051 BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
8055 procedure TGikoForm.ListCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8060 ChevronPopupMenu.Items.Clear;
8061 Idx := RebarChevron^.uBand;
8062 if (Idx >= 0) and (ListCoolBar.Bands.Count > Idx) then begin
8063 if ListCoolBar.Bands[Idx].Control = ListToolBar then begin
8064 ToolBarChevronMenu(ListToolBar);
8067 p := ListCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8068 ChevronPopupMenu.Popup(p.x, p.y);
8072 procedure TGikoForm.BrowserCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8074 Control: TWinControl;
8077 Control := FindControl(BandInfo^.hwndChild);
8078 if Control = nil then
8081 for i := BrowserCoolBar.Bands.Count - 1 downto 0 do begin
8082 if BrowserCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8083 idx := BrowserCoolBar.Bands[ i ].ID;
8087 if Control = BrowserToolBar then begin
8088 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8089 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8090 BandInfo^.cxMinChild := 0;
8091 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
8092 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8094 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8095 BandInfo^.cxMinChild := 0;
8096 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
8100 procedure TGikoForm.BrowserCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8105 ChevronPopupMenu.Items.Clear;
8106 Idx := RebarChevron^.uBand;
8107 if (Idx >= 0) and (BrowserCoolBar.Bands.Count > Idx) then begin
8108 if BrowserCoolBar.Bands[Idx].Control = BrowserToolBar then
8109 ToolBarChevronMenu(BrowserToolBar)
8112 p := BrowserCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8113 ChevronPopupMenu.Popup(p.x, p.y);
8117 procedure TGikoForm.ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
8119 if Column^.iImage = -1 then begin
8120 Column^.mask := Column^.mask or LVCF_FMT;
8122 Column^.mask := Column^.mask or LVCF_FMT or LVCF_IMAGE;
8123 Column^.fmt := Column^.fmt or LVCFMT_IMAGE or LVCFMT_BITMAP_ON_RIGHT;
8127 procedure TGikoForm.ThreadEditorActionExecute(Sender: TObject);
8129 Editor: TEditorForm;
8131 if not (GetActiveList is TBoard) then
8133 Editor := TEditorForm.Create(Self);
8134 Editor.SetBoard(TBoard(GetActiveList));
8136 Editor.BodyEdit.SetFocus;
8139 procedure TGikoForm.ToolBarSettingActionExecute(Sender: TObject);
8141 Dlg: TToolBarSettingDialog;
8143 //Component: TComponent;
8145 Dlg := TToolBarSettingDialog.Create(Self, ActionList);
8147 Dlg.AddToolBar(StdToolBar, gttStandard);
8148 Dlg.AddToolBar(ListToolBar, gttList);
8149 Dlg.AddToolBar(BrowserToolBar, gttBrowser);
8150 case FToolBarSettingSender of
8151 tssMain: Dlg.ToolBarIndex := 0;
8152 tssList: Dlg.ToolBarIndex := 1;
8153 tssBrowser: Dlg.ToolBarIndex := 2;
8156 if ToolBarSettingAction.ActionComponent.GetParentComponent is TPopupMenu then begin
8157 Component := TPopupMenu( ToolBarSettingAction.ActionComponent.GetParentComponent ).PopupComponent;
8159 if Component = MainCoolBar then
8160 Dlg.ToolBarComboBox.ItemIndex := 0
8161 else if Component = ListCoolBar then
8162 Dlg.ToolBarComboBox.ItemIndex := 1
8163 else if Component = BrowserCoolBar then
8164 Dlg.ToolBarComboBox.ItemIndex := 2;
8167 if Dlg.ShowModal = mrOK then begin
8170 //
\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é
8171 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
8172 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth + 1;
8173 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth - 1;
8175 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
8176 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth + 1;
8177 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth - 1;
8179 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
8180 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth + 1;
8181 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth - 1;
8183 SaveToolBarSetting(StdToolBar);
8184 SaveToolBarSetting(ListToolBar);
8185 for i := ListToolBar.ControlCount - 1 downto 0 do
8187 if ListToolBar.Controls[ i ].Action = SelectItemAction then
8189 //
\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·
8190 if (i + 1) < ListToolBar.ControlCount then
8191 if ListToolBar.Controls[ i + 1 ] is TToolButton then
8192 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
8193 ListToolBar.Controls[ i + 1 ].Visible := False;
8195 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
8196 ListToolBar.Controls[ i ].Visible := False;
8197 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
8198 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
8199 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
8200 SelectComboBox.Parent := ListToolBar;
8201 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
8202 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
8203 SelectComboBoxSplitter.Parent := ListToolBar;
8208 SaveToolBarSetting(BrowserToolBar);
8212 FToolBarSettingSender := tssNone;
8216 function TGikoForm.FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
8221 for i := bar.ButtonCount - 1 downto 0 do begin
8222 if bar.Buttons[ i ].Action = action then begin
8223 Result := bar.Buttons[ i ];
8232 procedure TGikoForm.SetToolBarPopup;
8235 aIEButton : TToolButton;
8236 aCabinetBBSButton : TToolButton;
8238 for i := 0 to StdToolBar.ButtonCount - 1 do begin
8240 for i := 0 to ListToolBar.ButtonCount - 1 do begin
8241 if ListToolBar.Buttons[i].Action = IconStyle then
8242 ListToolBar.Buttons[i].DropdownMenu := ListIconPopupMenu;
8243 if ListToolBar.Buttons[i].Action = SelectReservAction then
8244 ListToolBar.Buttons[i].DropdownMenu := RoundNamePopupMenu;
8246 aIEButton := FindToolBarButton( BrowserToolBar, IEAction );
8247 if aIEButton <> nil then
8248 aIEButton.DropdownMenu := BrowserPopupMenu;
8249 aCabinetBBSButton := FindToolBarButton( StdToolBar, CabinetBBSAction );
8250 if aCabinetBBSButton <> nil then
8251 aCabinetBBSButton.DropdownMenu := BBSSelectPopupMenu;
8254 procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState;
8255 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
8264 Wnd := WindowFromPoint(MousePos);
8266 if WheelDelta > 0 then
8271 if (Wnd = BrowserTab.Handle) or
8272 (Wnd = BrowserTab.Parent.Handle) then begin
8273 BrowserTab.ScrollTabs(Delta);
8274 end else if Wnd = ListView.Handle then begin
8275 if ListView.ViewStyle = vsList then
8276 ListView.Scroll( Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE, 0 )
8278 ListView.Scroll( 0, Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE );
8285 procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
8287 if Length( SelectComboBox.Text ) = 0 then
8289 AllItemAction.Checked := True;
8290 LogItemAction.Checked := False;
8291 NewItemAction.Checked := False;
8293 //
\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é
8294 if AllItemAction.Checked then
8295 AllItemAction.Checked := False;
8296 if LogItemAction.Checked then
8297 LogItemAction.Checked := False;
8298 if NewItemAction.Checked then
8299 NewItemaction.Checked := False;
8302 if Length( SelectComboBox.Text ) = 0 then
8303 SetListViewType( gvtAll )
8305 SetListViewType( gvtUser, SelectComboBox.Text, false);
8308 procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
8309 Shift: TShiftState);
8312 if Key = VK_Return then
8315 end else if Length( SelectComboBox.Text ) = 0 then
8317 AllItemAction.Checked := True;
8318 LogItemAction.Checked := False;
8319 NewItemAction.Checked := False;
8321 //
\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é
8322 if AllItemAction.Checked then
8323 AllItemAction.Checked := False;
8324 if LogItemAction.Checked then
8325 LogItemAction.Checked := False;
8326 if NewItemAction.Checked then
8327 NewItemaction.Checked := False;
8332 procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
8337 if Length( SelectComboBox.Text ) = 0 then
8339 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
8340 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
8345 //
\8di
\82è
\8d\9e\82Ý
\8c\9f\8dõ
\82Ì
\97\9a\97ð
\8dX
\90V
8346 procedure TGikoForm.ModifySelectList;
8353 if SelectComboBox.Parent = nil then
8356 if Length( SelectComboBox.Text ) > 0 then
8358 oldText := SelectComboBox.Text;
8359 idx := GikoSys.Setting.SelectTextList.IndexOf( oldText );
8361 GikoSys.Setting.SelectTextList.Delete( idx );
8362 idx := SelectComboBox.Items.IndexOf( oldText );
8364 SelectComboBox.Items.Delete( idx );
8365 GikoSys.Setting.SelectTextList.Insert( 0, oldText );
8366 SelectComboBox.Items.Insert( 0, oldText );
8367 SelectComboBox.Text := oldText;
8374 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\95Ò
\8fW
\82·
\82é
\82½
\82ß
\82É
\8aJ
\82
8375 procedure TGikoForm.NG1Click(Sender: TObject);
8377 GikoSys.FAbon.EditNGwords;
8379 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\8dÄ
\93Ç
\82Ý
\8d\9e\82Ý
\82·
\82é
8380 procedure TGikoForm.SelectResActionExecute(Sender: TObject);
8382 Dlg: TListSelectDialog;
8383 ThreadItem : TThreadItem;
8384 FilterList : TStringList;
8387 Dlg := TListSelectDialog.Create(Self);
8389 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
8390 Dlg.SelectComboBox.Text := FSelectResWord;
8392 if Dlg.ModalResult = mrOK then begin
8393 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
8394 //
\8bó
\93ü
\97Í
\82Å OK
\82Í
\91S
\83\8c\83X
\95\
\8e¦
\82Æ
\93¯
\88Ó
\8b`
8395 AllResAction.Execute;
8397 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
8398 AllResAction.Checked := False;
8399 SelectResAction.Checked := True;
8401 //
\8dÅ
\8cã
\82É
\90Ý
\92è
\82µ
\82½
\82à
\82Ì
\82ð
\8ao
\82¦
\82Ä
\82¨
\82
8402 FSelectResWord := Dlg.SelectComboBox.Text;
8404 //
\8c\9f\8dõ
\97\9a\97ð
\82Ì
\8dX
\90V
8405 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
8407 GikoSys.Setting.SelectTextList.Delete(idx);
8408 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
8409 while Dlg.SelectComboBox.Items.Count > 100 do begin
8410 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
8414 if SelectComboBox.Parent <> nil then
8415 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
8419 //
\83t
\83B
\83\8b\83^
\82Ì
\90Ý
\92è
8420 FilterList := TStringList.Create;
8422 GikoSys.FSelectResFilter.Reverse := True;
8423 FilterList.Delimiter := ' '; //
\8bæ
\90Ø
\82è
\8eq
\82ð
\94¼
\8ap
\83X
\83y
\81[
\83X
\82É
\90Ý
\92è
8424 FilterList.DelimitedText := Dlg.SelectComboBox.Text;
8426 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8431 //
\83X
\83\8c\83b
\83h
\82Ì
\8dÄ
\95`
\89æ
8432 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
8433 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8435 ThreadItem := GetActiveContent;
8436 if ThreadItem <> nil then
8437 InsertBrowserTab( ThreadItem, True );
8439 end else if Length( FSelectResWord ) > 0 then begin
8440 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
8441 AllResAction.Checked := False;
8442 SelectResAction.Checked := True;
8450 procedure TGikoForm.SelectResActionUpdate(Sender: TObject);
8452 SelectResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
8455 procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;
8456 Shift: TShiftState);
8460 //
\91S
\82Ä
\82Ì
\83\8c\83X
\82ð
\95\
\8e¦
8461 procedure TGikoForm.AllResActionExecute(Sender: TObject);
8463 ThreadItem : TThreadItem;
8464 FilterList : TStringList;
8467 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
8468 AllResAction.Checked := True;
8469 SelectResAction.Checked := False;
8471 if Length( FSelectResWord ) > 0 then begin
8472 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
8473 FilterList := TStringList.Create;
8475 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8476 GikoSys.FSelectResFilter.Reverse := False;
8481 FSelectResWord := '';
8483 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
8484 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
8485 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8487 ThreadItem := GetActiveContent;
8488 if ThreadItem <> nil then
8489 InsertBrowserTab( ThreadItem, True );
8493 procedure TGikoForm.AllResActionUpdate(Sender: TObject);
8495 AllResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
8498 procedure TGikoForm.ReloadClick(Sender: TObject);
8500 ThreadItem : TThreadItem;
8503 if GikoSys.FAbon.ReLoadFromNGwordFile =false then begin
8504 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);
8506 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8507 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8509 ThreadItem := GetActiveContent;
8510 if ThreadItem <> nil then
8511 InsertBrowserTab( ThreadItem, True );
8516 procedure TGikoForm.GoBackClick(Sender: TObject);
8518 ThreadItem : TThreadItem;
8522 if GikoSys.FAbon.GoForward =false then begin
8523 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);
8525 s := GikoSys.FAbon.NGwordname;
8526 StatusBar.Panels.Items[2].Text := s;
8527 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8528 StatusBarResize(Sender);
8529 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8530 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8532 ThreadItem := GetActiveContent;
8533 if ThreadItem <> nil then
8534 InsertBrowserTab( ThreadItem, True );
8539 procedure TGikoForm.GoFowardClick(Sender: TObject);
8541 ThreadItem : TThreadItem;
8545 if GikoSys.FAbon.GoBack =false then begin
8546 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);
8548 s := GikoSys.FAbon.NGwordname;
8549 StatusBar.Panels.Items[2].Text := s;
8550 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8551 StatusBarResize(Sender);
8552 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8553 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8555 ThreadItem := GetActiveContent;
8556 if ThreadItem <> nil then
8557 InsertBrowserTab( ThreadItem, True );
8562 procedure TGikoForm.SelectComboBoxSplitterMouseMove(Sender: TObject;
8563 Shift: TShiftState; X, Y: Integer);
8568 If (SelectComboBox.Parent <> nil) and (IsDraggingSelectComboBox) Then begin
8571 pos := SelectComboBoxSplitter.ClientToScreen( pos );
8572 w := SelectComboBox.Width + (pos.X - DraggingSelectComboBoxPosition.X);
8574 If w <= 50 Then Begin
8575 //
\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
8576 //
\81u
\8e~
\82Ü
\82Á
\82½(50pixel)
\88Ê
\92u
\81v
\82É
\82È
\82é
\82æ
\82¤
\82É
8577 pos.X := pos.X + (50 - w);
8579 //
\8f¬
\82³
\82
\82È
\82è
\82·
\82¬
\82È
\82¢
\82æ
\82¤
\82É
8583 //
\83`
\83\89\82Â
\82«
\8cy
\8c¸
\82Ì
\88×
8584 If SelectComboBox.Width <> w Then Begin
8585 SelectComboBox.Width := w;
8586 GikoSys.Setting.SelectComboBoxWidth := w;
8587 DraggingSelectComboBoxPosition := pos;
8592 procedure TGikoForm.SelectComboBoxSplitterMouseDown(Sender: TObject;
8593 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8597 IsDraggingSelectComboBox := True;
8600 DraggingSelectComboBoxPosition := SelectComboBoxSplitter.ClientToScreen( pos );
8603 procedure TGikoForm.SelectComboBoxSplitterMouseUp(Sender: TObject;
8604 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8606 IsDraggingSelectComboBox := False;
8609 procedure TGikoForm.StatusBarResize(Sender: TObject);
8611 StatusBar.Panels[1].Width := StatusBar.Width -
8612 StatusBar.Panels[0].Width -
8613 StatusBar.Panels[2].Width;
8615 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\92Ê
\8fí
\81v
8616 procedure TGikoForm.IndividualAbon1Click(Sender: TObject);
8618 ThreadItem : TThreadItem;
8621 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,1);
8622 ThreadItem := GetActiveContent;
8623 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8624 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8626 if ThreadItem <> nil then
8627 InsertBrowserTab( ThreadItem, True );
8629 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\93§
\96¾
\81v
8630 procedure TGikoForm.IndividualAbon2Click(Sender: TObject);
8632 ThreadItem : TThreadItem;
8635 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,0);
8636 ThreadItem := GetActiveContent;
8637 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8638 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8639 if ThreadItem <> nil then
8640 InsertBrowserTab( ThreadItem, True );
8642 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c\81i
\81j
8643 procedure TGikoForm.AntiIndividualAbonClick(Sender: TObject);
8645 ThreadItem : TThreadItem;
8649 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
8650 GikoSys.FAbon.DeleteIndividualAbon(KokoPopupMenu.Tag);
8651 ThreadItem := GetActiveContent;
8652 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8653 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8654 if ThreadItem <> nil then
8655 InsertBrowserTab( ThreadItem, True );
8657 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
8658 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
8661 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c
8662 procedure TGikoForm.N42Click(Sender: TObject);
8664 IndividualForm :TIndividualAbonForm;
8665 ThreadItem : TThreadItem;
8669 IndividualForm := TIndividualAbonForm.Create(Self);
8671 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
8672 for i :=0 to GikoSys.FAbon.GetAbonResCount-1 do begin
8673 IndividualForm.ComboBox1.Items.Add(GikoSys.FAbon.GetAbonResString(i));
8675 if IndividualForm.ShowModal = mrOK then begin
8676 GikoSys.FAbon.DeleteIndividualAbon(IndividualForm.ResNumber);
8678 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8679 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8680 ThreadItem := GetActiveContent;
8681 if ThreadItem <> nil then
8682 InsertBrowserTab( ThreadItem, True );
8684 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
8685 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
8688 IndividualForm.Free;
8692 procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
8695 if (Length( SelectComboBox.Text ) = 0) or
8696 (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
8698 SelectComboBox.Text := '';
8699 SelectComboBox.Color := clWindow;
8704 procedure TGikoForm.N51Click(Sender: TObject);
8708 //
\94Â
\96¼
\8c\9f\8dõ
8709 procedure TGikoForm.TreeSelectSearchBoardNameExecute(Sender: TObject);
8713 CurItem : TTreeNode;
8716 if InputQuery('
\94Â
\96¼
\8c\9f\8dõ','
\94Â
\96¼
\82Ì
\93ü
\97Í',s) then begin
8719 if TreeView.Selected = nil then
8720 CurItem := TreeView.Items.GetFirstNode
8722 CurItem := TreeView.Selected.GetNext;
8723 if CurItem = nil then
8724 CurItem := TreeView.Items.GetFirstNode;
8726 while CurItem <> nil do begin
8727 if (CurItem.ImageIndex <> 2) and (VaguePos(s,CurItem.Text) <> 0) then begin
8730 CurItem := CurItem.GetNext;
8733 if CurItem = nil then begin
8734 msg := '
\90æ
\93ª
\82É
\96ß
\82è
\82Ü
\82·
\82©
\81H';
8735 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
8736 CurItem := TreeView.Items.GetFirstNode;
8740 TreeView.Select(CurItem);
8743 TreeView.Select(CurItem);
8745 msg := '
\8e\9f\82É
\8ds
\82«
\82Ü
\82·
\82©
\81H';
8746 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
8760 procedure TGikoForm.CabinetFavoriteActionExecute(Sender: TObject);
8766 if CabinetPanel.Visible then begin
8767 if FTreeType = gttFavorite then begin
8768 CabinetVisible( False );
8769 CabinetFavoriteAction.Checked := False;
8771 CabinetFavoriteAction.Checked := True;
8774 CabinetVisible( True );
8775 CabinetFavoriteAction.Checked := True;
8778 // BBS...BBS, History, Favorite
8779 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 1;
8781 b := CabinetSelectPopupMenu.Items.Count - 1;
8782 for i := 0 to b do begin
8783 item := CabinetSelectPopupMenu.Items[ i ];
8784 if item is TBBSMenuItem then begin
8785 item.Checked := False;
8786 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
8787 CabinetMenu.Items[ i ].Checked := False;
8791 //
\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Ö
8792 HistoryToolBar.Hide;
8793 FavoriteToolBar.Show;
8794 TreeView.Visible := False;
8795 FavoriteTreeView.Visible := True;
8797 CabinetSelectToolButton.Caption := '
\82¨
\8bC
\82É
\93ü
\82è';
8798 FTreeType := gttFavorite;
8800 //
\83\81\83j
\83\85\81[
\8by
\82Ñ
\83{
\83^
\83\93\82Ì
\83`
\83F
\83b
\83N
\82ð
\90Ý
\92è
8801 CabinetBBSAction.Checked := False;
8802 CabinetHistoryAction.Checked := False;
8804 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\83c
\83\8a\81[
\82ð
\93W
\8aJ
8805 FavoriteTreeView.TopItem.Expanded := True;
8809 procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
8812 if (SenderNode = nil) or (SourceNode = nil) or (SenderNode = SourceNode) then
8815 if TObject(SenderNode.Data) is TFavoriteFolder then
8816 SourceNode.MoveTo(SenderNode, naAddChild)
8818 SourceNode.MoveTo(SenderNode, naInsert);
8822 procedure TGikoForm.FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
8826 FavoBoardItem: TFavoriteBoardItem;
8827 FavoThreadItem: TFavoriteThreadItem;
8829 ThreadItem: TThreadItem;
8832 if (SenderNode = nil) or (Source = nil) then
8835 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
8836 FavNode := SenderNode.Parent
8838 FavNode := SenderNode;
8842 if Source is TBoard then begin
8843 Board := TBoard( Source );
8844 FavoBoardItem := TFavoriteBoardItem.CreateWithItem( Board );
8845 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, FavoBoardItem);
8846 Node.ImageIndex := 15;
8847 Node.SelectedIndex := 15;
8848 end else if Source is TFavoriteBoardItem then begin
8849 FavoBoardItem := TFavoriteBoardItem( Source );
8850 Board := FavoBoardItem.Item;
8851 if Board <> nil then
8852 if not Board.IsThreadDatRead then
8853 GikoSys.ReadSubjectFile(Board);
8854 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, Source);
8855 Node.ImageIndex := 15;
8856 Node.SelectedIndex := 15;
8857 end else if Source is TThreadItem then begin
8858 ThreadItem := TThreadItem( Source );
8859 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
8860 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
8861 Node.ImageIndex := 16;
8862 Node.SelectedIndex := 16;
8863 end else if Source is TBrowserRecord then begin
8864 ThreadItem := TBrowserRecord( Source ).FThread;
8865 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
8866 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
8867 Node.ImageIndex := 16;
8868 Node.SelectedIndex := 16;
8869 end else if Source is TFavoriteThreadItem then begin
8870 FavoThreadItem := TFavoriteThreadItem( Source );
8871 ThreadItem := FavoThreadItem.Item;
8872 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, Source);
8873 Node.ImageIndex := 16;
8874 Node.SelectedIndex := 16;
8877 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
8879 FavoriteMoveTo( SenderNode, Node );
8883 procedure TGikoForm.FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
8886 SourceNode: TTreeNode;
8887 LinkToolButton: TLinkToolButton;
8890 if SenderNode = nil then
8893 if not (TObject( SenderNode.Data ) is TFavoriteFolder) then
8894 if FDropSpaceNode <> nil then
8895 SenderNode := FDropSpaceNode;
8897 if Source = FavoriteTreeView then begin
8899 SourceNode := FavoriteTreeView.Selected;
8900 FavoriteMoveTo( SenderNode, SourceNode );
8902 end else if Source is TLinkToolButton then begin
8904 LinkToolButton := TLinkToolButton( Source );
8905 //ShowMessage(LinkToolButton.Text);
8906 SourceNode := TreeNodeDataFind( FavoriteTreeView.TopItem, LinkToolButton.Data );
8907 FavoriteMoveTo( SenderNode, SourceNode );
8909 end else if Source = BrowserTab then begin
8911 idx := BrowserTab.TabIndex;
8912 FavoriteAddTo( SenderNode, BrowserTab.Tabs.Objects[idx] );
8913 end else if Source = ListView then begin
8915 FavoriteAddTo( SenderNode, ListView.Selected.Data );
8917 end else if Source = TreeView then begin
8919 FavoriteAddTo( SenderNode, TreeView.Selected.Data );
8927 procedure TGikoForm.FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
8930 SenderNode: TTreeNode;
8933 SenderNode := FavoriteTreeView.GetNodeAt(X, Y);
8934 if SenderNode <> nil then begin
8935 FavoriteDragDrop( SenderNode, Source );
8938 if FDropSpaceNode <> nil then begin
8939 FDropSpaceNode.Free;
8940 FDropSpaceNode := nil;
8945 procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
8946 Node: TTreeNode; var S: String);
8949 FavoriteTreeView.ReadOnly := True;
8954 procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
8955 Shift: TShiftState);
8961 FClickNode := FavoriteTreeView.Selected;
8962 FavoriteTreeViewRenameActionExecute( Sender );
8966 FClickNode := FavoriteTreeView.Selected;
8967 FavoriteTreeViewDeleteActionExecute( Sender );
8970 FavoriteClick( FavoriteTreeView.Selected );
8972 FavoriteTreeViewDblClick( Sender );
8977 procedure TGikoForm.FavoriteTreePopupMenuPopup(Sender: TObject);
8980 LinkToolButton: TLinkToolButton;
8983 if FavoriteTreePopupMenu.PopupComponent = FavoriteTreeView then begin
8985 FClickNode := FavoriteTreeView.Selected;
8987 end else if FavoriteTreePopupMenu.PopupComponent is TLinkToolButton then begin
8989 LinkToolButton := TLinkToolButton( FavoriteTreePopupMenu.PopupComponent );
8990 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
8991 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
8992 FClickNode := FavoriteTreeView.Items[i];
8996 for i := 0 to FClickNode.Count - 1 do begin
8997 if FClickNode.Item[i].Data = LinkToolButton.Data then begin
8998 FClickNode := FClickNode.Item[i];
9005 if FClickNode = nil then begin
9006 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9007 FavoriteTreeDeletePopupMenu.Visible := False;
9008 FavoriteTreeRenamePopupMenu.Visible := False;
9009 FavoriteTreeNewFolderPopupMenu.Visible := False;
9010 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9011 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9012 FavoriteTreeURLCopyPopupMenu.Visible := False;
9013 FavoriteTreeNameCopyPopupMenu.Visible := False;
9014 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9015 FavoriteTreeReloadPopupMenu.Visible := False;
9016 FavoriteTreeLogDeletePopupMenu.Visible := False;
9017 end else if FClickNode.IsFirstNode then begin
9018 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9019 FavoriteTreeDeletePopupMenu.Visible := False;
9020 FavoriteTreeRenamePopupMenu.Visible := False;
9021 FavoriteTreeNewFolderPopupMenu.Visible := True;
9022 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9023 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9024 FavoriteTreeURLCopyPopupMenu.Visible := False;
9025 FavoriteTreeNameCopyPopupMenu.Visible := True;
9026 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9027 FavoriteTreeReloadPopupMenu.Visible := False;
9028 FavoriteTreeLogDeletePopupMenu.Visible := False;
9029 end else if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
9030 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9031 FavoriteTreeDeletePopupMenu.Visible := True;
9032 FavoriteTreeRenamePopupMenu.Visible := False;
9033 FavoriteTreeNewFolderPopupMenu.Visible := True;
9034 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9035 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9036 FavoriteTreeURLCopyPopupMenu.Visible := False;
9037 FavoriteTreeNameCopyPopupMenu.Visible := True;
9038 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9039 FavoriteTreeReloadPopupMenu.Visible := False;
9040 FavoriteTreeLogDeletePopupMenu.Visible := False;
9041 end else if TObject(FClickNode.Data) is TFavoriteFolder then begin
9042 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9043 FavoriteTreeDeletePopupMenu.Visible := True;
9044 FavoriteTreeRenamePopupMenu.Visible := True;
9045 FavoriteTreeNewFolderPopupMenu.Visible := True;
9046 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9047 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9048 FavoriteTreeURLCopyPopupMenu.Visible := False;
9049 FavoriteTreeNameCopyPopupMenu.Visible := True;
9050 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9051 FavoriteTreeReloadPopupMenu.Visible := False;
9052 FavoriteTreeLogDeletePopupMenu.Visible := False;
9053 end else if TObject(FClickNode.Data) is TFavoriteThreadItem then begin
9054 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9055 FavoriteTreeDeletePopupMenu.Visible := True;
9056 FavoriteTreeRenamePopupMenu.Visible := True;
9057 FavoriteTreeNewFolderPopupMenu.Visible := True;
9058 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
9059 //FavoriteTreeBrowseThreadPopupMenu.Visible := True;
9060 FavoriteTreeURLCopyPopupMenu.Visible := True;
9061 FavoriteTreeNameCopyPopupMenu.Visible := True;
9062 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
9063 FavoriteTreeReloadPopupMenu.Visible := True;
9064 FavoriteTreeLogDeletePopupMenu.Visible := True;
9065 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
9066 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9067 FavoriteTreeDeletePopupMenu.Visible := True;
9068 FavoriteTreeRenamePopupMenu.Visible := True;
9069 FavoriteTreeNewFolderPopupMenu.Visible := True;
9070 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
9071 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9072 FavoriteTreeURLCopyPopupMenu.Visible := True;
9073 FavoriteTreeNameCopyPopupMenu.Visible := True;
9074 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
9075 FavoriteTreeReloadPopupMenu.Visible := True;
9076 FavoriteTreeLogDeletePopupMenu.Visible := False;
9078 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9079 FavoriteTreeDeletePopupMenu.Visible := False;
9080 FavoriteTreeRenamePopupMenu.Visible := False;
9081 FavoriteTreeNewFolderPopupMenu.Visible := False;
9082 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9083 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9084 FavoriteTreeURLCopyPopupMenu.Visible := False;
9085 FavoriteTreeNameCopyPopupMenu.Visible := False;
9086 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9087 FavoriteTreeReloadPopupMenu.Visible := False;
9088 FavoriteTreeLogDeletePopupMenu.Visible := False;
9093 procedure TGikoForm.FavoriteTreeViewDeleteActionExecute(Sender: TObject);
9095 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';
9096 DEL_MSG = '
\81g^0
\81h
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
9097 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
9100 if FClickNode = nil then
9102 if FClickNode.IsFirstNode then
9104 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
9105 if MsgBox(Handle, DEL_LINK_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION) <> ID_YES then
9107 end else if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
9108 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONQUESTION) <> ID_YES then
9112 //FDeleteList.Add(FClickNode.Data);
9113 //SetDeleteItemList(FClickNode);
9121 procedure TGikoForm.FavoriteTreeViewRenameActionExecute(Sender: TObject);
9126 if FClickNode = nil then
9128 if FClickNode.IsFirstNode then
9130 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then
9132 FavoriteTreeView.ReadOnly := False;
9133 if (FTreeType = gttFavorite) and (CabinetPanel.Visible) then begin
9134 node := FClickNode.Parent;
9135 while node <> nil do begin
9136 node.Expanded := True;
9137 node := node.Parent;
9139 FClickNode.EditText;
9141 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 );
9148 procedure TGikoForm.FavoriteTreeViewNewFolderActionExecute(
9151 NewFavFolder: TFavoriteFolder;
9155 if FClickNode = nil then
9159 if not (TObject(FClickNode.Data) is TFavoriteFolder) then begin
9160 FavoriteTreeView.Selected := FClickNode.Parent;
9161 FClickNode := FClickNode.Parent;
9164 NewFavFolder := TFavoriteFolder.Create;
9165 Node := FavoriteTreeView.Items.AddChildObject(FClickNode, '
\90V
\82µ
\82¢
\83t
\83H
\83\8b\83_', NewFavFolder);
9166 Node.ImageIndex := 14;
9167 Node.SelectedIndex := 14;
9168 // FClickNode.Selected.Expanded := True;
9169 FavoriteTreeView.Selected := Node;
9171 FavoriteTreeViewRenameAction.Execute;
9177 procedure TGikoForm.ToolButton19Click(Sender: TObject);
9180 FavoriteArrangeActionExecute( nil );
9184 procedure TGikoForm.FavoriteBrowseFolder( node: TTreeNode );
9189 if not (TObject(node.Data) is TFavoriteFolder) then
9192 for i := 0 to node.Count - 1 do
9194 if TObject(node.Item[i].Data) is TFavoriteFolder then
9195 FavoriteBrowseFolder( node.Item[i] )
9196 else if TObject(node.Item[i].Data) is TFavoriteThreadItem then
9197 FavoriteClick( node.Item[i], False );
9202 procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
9206 FavoriteBrowseFolder( FClickNode );
9207 //BrowserTab.OnChange(nil);
9211 procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
9214 FClickNode := FavoriteTreeView.Selected;
9215 FavoriteTreeViewReloadActionExecute( Sender );
9219 procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
9222 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';
9223 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
9225 ThreadItem: TThreadItem;
9226 FavThread: TFavoriteThreadItem;
9229 if FClickNode = nil then Exit;
9230 if not (TObject(FClickNode.Data) is TFavoriteThreadItem) then Exit;
9232 FavThread := TFavoriteThreadItem( FClickNode.Data );
9233 ThreadItem := FavThread.Item;
9236 if GikoSys.Setting.DeleteMsg then begin
9237 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
9241 DeleteHistory(ThreadItem);
9242 DeleteTab(ThreadItem);
9243 ThreadItem.DeleteLogFile;
9251 procedure TGikoForm.FavoriteTreeViewReloadActionExecute(Sender: TObject);
9253 ThreadItem: TThreadItem;
9254 FavThread: TFavoriteThreadItem;
9256 FavBoard: TFavoriteBoardItem;
9260 if FClickNode = nil then Exit;
9262 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
9264 if TObject( FClickNode.Data ) is TFavoriteThreadItem then begin
9265 FavThread := TFavoriteThreadItem( FClickNode.Data );
9266 ThreadItem := FavThread.Item;
9267 if ThreadItem <> nil then
9268 DownloadContent(ThreadItem, shiftDown);
9269 end else if TObject( FClickNode.Data ) is TFavoriteBoardItem then begin
9270 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9271 Board := FavBoard.Item;
9272 DownloadList(Board, shiftDown);
9277 procedure TGikoForm.FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
9279 FavThread : TFavoriteThreadItem;
9280 FavBoard : TFavoriteBoardItem;
9284 if FClickNode = nil then Exit;
9286 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9288 FavThread := TFavoriteThreadItem( FClickNode.Data );
9289 s := FavThread.URL + #13#10;
9291 Clipboard.AsText := s;
9293 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9295 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9296 s := FavBoard.URL + #13#10;
9298 Clipboard.AsText := s;
9304 procedure TGikoForm.FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
9306 ThreadItem: TThreadItem;
9307 FavThread: TFavoriteThreadItem;
9309 FavBoard: TFavoriteBoardItem;
9313 if FClickNode = nil then Exit;
9315 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9317 FavThread := TFavoriteThreadItem( FClickNode.Data );
9318 ThreadItem := FavThread.Item;
9321 s := ThreadItem.Title + #13#10;
9323 Clipboard.AsText := s;
9327 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9329 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9330 Board := FavBoard.Item;
9331 if Board <> nil then
9332 if not Board.IsThreadDatRead then
9333 GikoSys.ReadSubjectFile(Board);
9336 s := Board.Title + #13#10;
9338 Clipboard.AsText := s;
9346 procedure TGikoForm.FavoriteTreeViewNameURLCopyActionExecute(
9349 ThreadItem: TThreadItem;
9350 FavThread: TFavoriteThreadItem;
9352 FavBoard: TFavoriteBoardItem;
9356 if FClickNode = nil then Exit;
9358 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9360 FavThread := TFavoriteThreadItem( FClickNode.Data );
9361 ThreadItem := FavThread.Item;
9364 s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10;
9366 Clipboard.AsText := s;
9370 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9372 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9373 Board := FavBoard.Item;
9374 if Board <> nil then
9375 if not Board.IsThreadDatRead then
9376 GikoSys.ReadSubjectFile(Board);
9379 s := Board.URL + #13#10 + Board.Title + #13#10;
9381 Clipboard.AsText := s;
9389 function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
9395 for i := 0 to Node.Count - 1 do begin
9396 if Node.Item[i].Data = FindPointer then begin
9397 Result := Node.Item[i];
9399 end else if Node.Item[i].Count > 0 then begin
9400 Found := TreeNodeDataFind( Node.Item[i], FindPointer );
9401 if Found <> nil then begin
9412 procedure TGikoForm.LinkToolBarDragDrop(Sender, Source: TObject; X,
9416 SenderNode: TTreeNode;
9420 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
9421 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
9422 SenderNode := FavoriteTreeView.Items[i];
9427 FavoriteDragDrop( SenderNode, Source );
9431 procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
9432 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
9434 if FDragWFirst <> true then begin
9435 FDragWFirst := false;
9436 end else if (X = FMouseDownPos.X) and (Y = FMouseDownPos.Y) then begin
9437 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
9438 if GikoSys.Setting.ListWidthState = glsMin then begin
9439 BrowserMaxAction.Execute;
9440 if GikoForm.Visible then
9444 if GikoSys.Setting.ListHeightState = glsMin then begin
9445 BrowserMaxAction.Execute;
9446 if GikoForm.Visible then
9453 procedure TGikoForm.LinkToolBarDragOver(Sender, Source: TObject; X,
9454 Y: Integer; State: TDragState; var Accept: Boolean);
9457 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
9461 procedure TGikoForm.OnlyAHundredResExecute(Sender: TObject);
9463 GikoSys.OnlyAHundredRes := OnlyAHundredRes.Checked;
9464 if FActiveContent <> nil then begin
9465 SetContent(FActiveContent);
9469 procedure TGikoForm.FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
9473 if FDropSpaceNode <> nil then begin
9474 FDropSpaceNode.Free;
9475 FDropSpaceNode := nil;
9481 procedure TGikoForm.ListCoolBarContextPopup(Sender: TObject;
9482 MousePos: TPoint; var Handled: Boolean);
9485 FToolBarSettingSender := tssList;
9486 MousePos := ListCoolBar.ClientToScreen( MousePos );
9487 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9491 procedure TGikoForm.MainCoolBarContextPopup(Sender: TObject;
9492 MousePos: TPoint; var Handled: Boolean);
9495 FToolBarSettingSender := tssMain;
9496 MousePos := MainCoolBar.ClientToScreen( MousePos );
9497 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9501 procedure TGikoForm.BrowserCoolBarContextPopup(Sender: TObject;
9502 MousePos: TPoint; var Handled: Boolean);
9505 FToolBarSettingSender := tssBrowser;
9506 MousePos := BrowserCoolBar.ClientToScreen( MousePos );
9507 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9510 procedure TGikoForm.ExportFavoriteFileAccept(Sender: TObject);
9512 if FavoriteDM.SaveFavoriteFile( ExportFavoriteFile.Dialog.FileName ) Then begin
9513 ShowMessage('
\83t
\83@
\83C
\83\8b\82ð
\8fo
\97Í
\82µ
\82Ü
\82µ
\82½');
9515 ShowMessage('
\83t
\83@
\83C
\83\8b\82Ì
\8fo
\97Í
\82É
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½');
9518 procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
9520 if FListViewBackGroundColor <> value then begin
9521 FListViewBackGroundColor := value;
9522 ListView.Color := FListViewBackGroundColor;
9525 procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
9527 ExportFavoriteFile.Dialog.FileName := FavoriteDM.GetFavoriteFilePath;
9530 procedure TGikoForm.CabinetBBSActionExecute(Sender: TObject);
9533 if CabinetPanel.Visible then begin
9534 if FTreeType = gtt2ch then begin
9535 CabinetVisible( False );
9537 CabinetBBSAction.Checked := False;
9539 CabinetBBSAction.Checked := True;
9542 CabinetVisible( True );
9543 CabinetBBSAction.Checked := True;
9546 if FActiveBBS = nil then
9547 ShowBBSTree( BBSs[ 0 ] )
9549 ShowBBSTree( FActiveBBS );
9553 procedure TGikoForm.FavoriteTreeViewBrowseThreadActionExecute(
9556 threadItem : TThreadItem;
9559 if FClickNode = nil then Exit;
9561 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9563 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9564 if threadItem = nil then
9566 GikoSys.OpenBrowser( threadItem.URL, gbtAuto );
9572 procedure TGikoForm.FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
9574 threadItem : TThreadItem;
9578 if FClickNode = nil then Exit;
9580 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9582 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9583 if threadItem = nil then
9585 GikoSys.OpenBrowser( threadItem.ParentBoard.URL, gbtAuto );
9587 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9589 boardItem := TFavoriteBoardItem( FClickNode.Data ).Item;
9590 if boardItem = nil then
9592 GikoSys.OpenBrowser( boardItem.URL, gbtAuto );
9598 procedure TGikoForm.UpBoardActionExecute(Sender: TObject);
9601 SelectTreeNode( GetActiveContent.ParentBoard, True );
9605 procedure TGikoForm.UpBoardActionUpdate(Sender: TObject);
9608 UpBoardAction.Enabled := GetActiveContent <> nil;
9612 procedure TGikoForm.BrowserTabContextPopup(Sender: TObject;
9613 MousePos: TPoint; var Handled: Boolean);
9617 idx := BrowserTab.IndexOfTabAt(MousePos.X, MousePos.Y);
9618 if BrowserTab.TabIndex <> idx then begin
9619 BrowserTab.TabIndex := idx;
9620 BrowserTab.OnChange(nil);
9625 procedure TGikoForm.KoreCopyExecute(Sender: TObject);
9627 KonoresCopy(KokoPopupMenu.Tag, true);
9629 procedure TGikoForm.KonoresCopy(Number: Integer; ReplaceTag : Boolean);
9631 ThreadItem: TThreadItem;
9637 boardPlugIn : TBoardPlugIn;
9639 if Number = 0 then Exit;
9640 ThreadItem := GetActiveContent;
9642 if ThreadItem <> nil then begin
9643 if ThreadItem.IsBoardPlugInAvailable then begin
9644 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
9645 boardPlugIn := ThreadItem.BoardPlugIn;
9647 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
9648 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
9649 //
\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
9650 tmp := boardPlugIn.GetDat( DWORD( threadItem ), Number );
9652 FileName := ThreadItem.FilePath;
9653 tmp := GikoSys.ReadThreadFile(FileName, Number);
9655 if tmp <> '' then begin
9656 Res := GikoSys.DivideStrLine(tmp);
9658 Header := IntToStr(Number) + '
\81F' + Res.FName + '
\81F' + Res.FDateTime + #13#10;
9659 if ReplaceTag then begin
9660 Header := CustomStringReplace(Header, '</b>', '',true);
9661 Header := CustomStringReplace(Header, '<b>', '',true);
9664 //Body := CustomStringReplace(Res.FBody, '<br> ', #13#10,true);
9665 Body := CustomStringReplace(Res.FBody, '<br>', #13#10,true);
9666 Body := CustomStringReplace(Body, '<br>', #13#10,true);
9667 Body := CustomStringReplace(Body, '</a>', '',true);
9669 Body := GikoSys.DeleteLink(Body);
9670 if ReplaceTag then begin
9671 Body := CustomStringReplace(Body, '<', '<');
9672 Body := CustomStringReplace(Body, '>', '>');
9673 Body := CustomStringReplace(Body, '"', '"');
9674 Body := CustomStringReplace(Body, '&', '&');
9675 //Body := CustomStringReplace(Body, ' ', ' ');
9678 Header := Header + Body;
9680 Clipboard.SetTextBuf( PChar(Header) );
9686 procedure TGikoForm.BrowserTabPopupMenuPopup(Sender: TObject);
9688 AddRoundNameMenu(dummy1);
9691 procedure TGikoForm.FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
9693 FavoriteDM.URLReplace(oldURLs, newURLs);
9696 procedure TGikoForm.RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
9698 RoundList.URLReplace(oldURLs, newURLs);
9701 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82é
9702 procedure TGikoForm.OnMinimize;
9704 FIsMinimize := mtMinimizing;
9705 if FActiveContent <> nil then
9706 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
9707 PostMessage( Handle, USER_MINIMIZED, 0, 0 );
9710 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82½
9711 procedure TGikoForm.OnMinimized;
9713 FIsMinimize := mtMinimized;
9714 FIsIgnoreResize := False;
9717 procedure TGikoForm.CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
9722 affectedBand : TCoolBand;
9725 if (FOldFormWidth = Width) and not IsIconic( Handle ) and not FIsIgnoreResize then begin
9726 FIsIgnoreResize := True;
9727 PostMessage( Handle, USER_RESIZED, 0, 0 );
9728 if not (Sender is TToolBar) or (CoolBar = nil) then
9730 toolbar := TToolBar( Sender );
9732 //
\95Ï
\8dX
\82³
\82ê
\82½
\83N
\81[
\83\8b\83o
\81[
\82Ì
\92l
\82ð
\95Û
\91¶
9733 if CoolBar = MainCoolBar then begin
9734 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
9735 CoolSet.FCoolID := CoolBar.Bands[i].ID;
9736 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
9737 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
9738 GikoSys.Setting.MainCoolSet[i] := CoolSet;
9740 end else if CoolBar = ListCoolBar then begin
9741 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
9742 CoolSet.FCoolID := CoolBar.Bands[i].ID;
9743 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
9744 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
9745 GikoSys.Setting.ListCoolSet[i] := CoolSet;
9747 end else if CoolBar = BrowserCoolBar then begin
9748 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
9749 CoolSet.FCoolID := CoolBar.Bands[i].ID;
9750 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
9751 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
9752 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
9755 //
\95\9d\82Ì
\95Ï
\8dX
\82³
\82ê
\82½
\83o
\83\93\83h
\82ð
\8c©
\82Â
\82¯
\82é
9756 affectedBand := nil;
9757 for i := CoolBar.Bands.Count - 1 downto 0 do begin
9758 if CoolBar.Bands[ i ].Control.Handle = toolbar.Handle then begin
9759 band := CoolBar.Bands[ i ];
9760 if band.Break or (i = 0) then begin
9761 if i + 1 < CoolBar.Bands.Count then
9762 if not CoolBar.Bands[ i + 1 ].Break then
9763 affectedBand := CoolBar.Bands[ i + 1 ];
9766 affectedBand := CoolBar.Bands[ i - 1 ];
9771 //
\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·
9772 if CoolBar = MainCoolBar then begin
9773 coolSet := GikoSys.Setting.MainCoolSet[ band.ID ];
9774 coolSet.FCoolWidth := toolbar.Width + 25;
9775 GikoSys.Setting.MainCoolSet[ band.ID ] := coolSet;
9776 if affectedBand <> nil then begin
9777 coolSet := GikoSys.Setting.MainCoolSet[ affectedBand.ID ];
9778 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
9779 GikoSys.Setting.MainCoolSet[ affectedBand.ID ] := coolSet;
9781 end else if CoolBar = ListCoolBar then begin
9782 coolSet := GikoSys.Setting.ListCoolSet[ band.ID ];
9783 coolSet.FCoolWidth := toolbar.Width + 25;
9784 GikoSys.Setting.ListCoolSet[ band.ID ] := coolSet;
9785 if affectedBand <> nil then begin
9786 coolSet := GikoSys.Setting.ListCoolSet[ affectedBand.ID ];
9787 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
9788 GikoSys.Setting.ListCoolSet[ affectedBand.ID ] := coolSet;
9790 end else if CoolBar = BrowserCoolBar then begin
9791 coolSet := GikoSYs.Setting.BrowserCoolSet[ band.ID ];
9792 coolSet.FCoolWidth := toolbar.Width + 25;
9793 GikoSys.Setting.BrowserCoolSet[ band.ID ] := coolSet;
9794 if affectedBand <> nil then begin
9795 coolSet := GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ];
9796 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
9797 GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ] := coolSet;
9803 procedure TGikoForm.MenuToolBarResize(Sender: TObject);
9805 CoolBarResized( Sender, MainCoolBar );
9808 procedure TGikoForm.StdToolBarResize(Sender: TObject);
9810 CoolBarResized( Sender, MainCoolBar );
9813 procedure TGikoForm.LinkToolBarResize(Sender: TObject);
9815 CoolBarResized( Sender, MainCoolBar );
9818 procedure TGikoForm.ListNameToolBarResize(Sender: TObject);
9820 CoolBarResized( Sender, ListCoolBar );
9823 procedure TGikoForm.ListToolBarResize(Sender: TObject);
9825 CoolBarResized( Sender, ListCoolBar );
9828 procedure TGikoForm.BrowserNameToolBarResize(Sender: TObject);
9830 CoolBarResized( Sender, BrowserCoolBar );
9833 procedure TGikoForm.BrowserToolBarResize(Sender: TObject);
9835 CoolBarResized( Sender, BrowserCoolBar );
9838 procedure TGikoForm.BrowserTabResize(Sender: TObject);
9840 CoolBarResized( Sender, BrowserCoolBar );
9843 // *************************************************************************
9844 // ExternalBoardPlugInMain
9845 //
\83v
\83\89\83O
\83C
\83\93\83\81\83j
\83\85\81[
\82Ì
\8d\80\96Ú
\82ª
\8eÀ
\8ds
\82³
\82ê
\82½
9846 // *************************************************************************
9847 procedure TGikoForm.OnPlugInMenuItem( Sender : TObject );
9850 boardPlugIn : TBoardPlugIn;
9853 if not (Sender is TMenuItem) then
9856 item := TMenuItem( Sender );
9857 if not Assigned( Pointer( item.Tag ) ) then
9860 //
\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·
9861 boardPlugIn := TBoardPlugIn( item.Tag );
9862 boardPlugIn.PlugInMenu( item.Handle );
9866 procedure TGikoForm.ListViewClick(Sender: TObject);
9871 // TreeView
\82ª
\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
9872 procedure TGikoForm.TreeClick( Node : TTreeNode );
9880 if FTreeType = gttHistory then begin
9882 if TObject( Node.Data ) is TFavoriteThreadItem then
9883 if GetActiveContent <> TFavoriteThreadItem( Node.Data ).Item then
9884 FavoriteClick( Node );
9888 if GetActiveList is TBBS then begin
9889 for i := 0 to ListView.Columns.Count - 1 do
9890 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
9891 end else if GetActiveList is TCategory then begin
9892 for i := 0 to ListView.Columns.Count - 1 do
9893 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
9894 end else if GetActiveList is TBoard then begin
9895 for i := 0 to ListView.Columns.Count - 1 do
9896 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
9899 if TObject(Node.Data) is TBBS then begin
9900 SetActiveList(Node.data);
9901 end else if TObject(Node.Data) is TCategory then begin
9902 SetActiveList(Node.data);
9903 end else if TObject(Node.Data) is TBoard then begin
9904 if not TBoard(Node.Data).IsThreadDatRead then begin
9905 Screen.Cursor := crHourGlass;
9907 if not TBoard(Node.Data).IsThreadDatRead then
9908 GikoSys.ReadSubjectFile(Node.Data);
9910 Screen.Cursor := crDefault;
9913 SetActiveList(Node.data);
9918 // TreeView
\82ª
\83_
\83u
\83\8b\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
9919 procedure TGikoForm.TreeDoubleClick( Node : TTreeNode );
9922 ThreadItem : TThreadItem;
9923 shiftDown : Boolean;
9926 if Node = nil then Exit;
9928 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
9930 if FTreeType = gtt2ch then begin
9931 if not (TObject(Node.Data) is TBoard) then Exit;
9932 Board := TBoard(Node.Data);
9933 DownloadList(Board, shiftDown);
9934 end else if FTreeType = gttHistory then begin
9935 if not (TObject(Node.Data) is TFavoriteThreadItem) then Exit;
9936 ThreadItem := TFavoriteThreadItem(Node.Data).Item;
9937 DownloadContent(ThreadItem, shiftDown);
9942 procedure TGikoForm.TreeViewClick(Sender: TObject);
9944 TreeClick( TreeView.Selected );
9947 procedure TGikoForm.TreeViewKeyDown(Sender: TObject; var Key: Word;
9948 Shift: TShiftState);
9950 if Key = VK_BACK then begin
9951 // UpFolderButtonClick(Sender);
9952 end else if Key = VK_SPACE then begin
9953 TreeDoubleClick( TreeView.Selected );
9954 end else if Key = VK_RETURN then begin
9955 TreeClick( TreeView.Selected );
9959 //
\83u
\83\89\83E
\83U
\82Ì
\83L
\81[
\83_
\83E
\83\93\83C
\83x
\83\93\83g
9960 //
\83C
\83x
\83\93\83g
\82ð
\8eæ
\82è
\88µ
\82Á
\82½
\8fê
\8d\87\82Í True
\82ð
\95Ô
\82·
9961 function TGikoForm.BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
9963 iOIPAO : IOleInPlaceActiveObject;
9964 Dispatch : IDispatch;
9967 if Key = VK_BACK then begin
9968 UpBoardAction.Execute;
9970 {end else if Key in [VK_ESCAPE..VK_HELP] then begin
9971 //
\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
9974 end else if(Key in [VK_SPACE..VK_HELP]) and
9975 not(ssCtrl in State) and not(ssAlt in State) and not (ssShift in State) then begin
9978 //
\82»
\82ê
\88È
\8aO
\82Ì
\83C
\83x
\83\93\83g
\82Í Browser
\82É
\97¬
\82·
9979 if(FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
9980 Dispatch := FActiveContent.Browser.Application;
9981 if Dispatch <> nil then begin
9982 Dispatch.QueryInterface( IOleInPlaceActiveObject, iOIPAO );
9983 if iOIPAO <> nil then
9984 iOIPAO.TranslateAccelerator( Msg );
9987 //
\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¢
9993 //
\83M
\83R
\83i
\83r
\82Ì
\83\81\83b
\83Z
\81[
\83W
\83\8b\81[
\83v
\82ð
\89¡
\8eæ
\82è
\82µ
\82Ü
\82·
9994 procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
10001 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10002 if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
10004 Handled := BrowserKeyDown( Msg, key, KeyDataToShiftState( Msg.lParam ) );
10009 case Msg.wParam shr 16 of
10011 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
10012 if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
10013 UpBoardAction.Execute;
10015 end else if IsDialogMessage( ListView.Handle, Msg ) then begin
10016 UpFolderAction.Execute;
10026 procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject;
10027 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
10029 favItem : TTreeNode;
10030 favThreadItem : TFavoriteThreadItem;
10036 FMouseDownPos.X := X;
10037 FMouseDownPos.Y := Y;
10041 favItem := FavoriteTreeView.GetNodeAt( X, Y );
10042 if favItem = nil then Exit;
10044 if TObject( favItem.Data ) is TFavoriteThreadItem then begin
10045 favThreadItem := TFavoriteThreadItem( favItem.Data );
10046 if favThreadItem.Item <> nil then
10047 InsertBrowserTab( favThreadItem.Item, False );
10054 procedure TGikoForm.MessagePanelResize(Sender: TObject);
10057 if FIsIgnoreResize then
10060 if GikoSys.Setting.ListOrientation = gloVertical then begin
10061 if GikoSys.Setting.ListHeightState = glsMin then begin
10062 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
10063 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
10069 procedure TGikoForm.OnResized;
10072 FOldFormWidth := Width;
10073 FIsIgnoreResize := False;
10077 procedure TGikoForm.TreeSelectNameCopyExecute(Sender: TObject);
10081 TreeView.Selected := FClickNode;
10082 s := FClickNode.Text;
10083 Clipboard.AsText := s;
10086 procedure TGikoForm.FavoriteTreeViewMouseUp(Sender: TObject;
10087 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
10090 if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold) and
10091 (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
10092 FavoriteClick( TObject( FavoriteTreeView.Selected ) );
10097 destructor TBrowserRecord.Destroy;
10101 if Self.FEvent <> nil then
10103 if Self.FBrowser <> nil then begin
10104 if Self.Thread <> nil then begin
10105 doc := Idispatch( olevariant(Self.FBrowser.ControlInterface).Document) as IHTMLDocument2;
10106 Self.Thread.ScrollTop := doc.Body.ScrollTop;
10108 TOleControl(Self.FBrowser).Visible := false;
10113 procedure TGikoForm.OnlyAHundredResUpdate(Sender: TObject);
10115 OnlyAHundredRes.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
10118 procedure TGikoForm.test1Click(Sender: TObject);
10120 TOleControl(FActiveContent.Browser).Visible := not TOleControl(FActiveContent.Browser).Visible;
10124 OleInitialize(nil);