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 FBrowsers := TList.Create;
1214 for i := 0 to 4 do begin
1215 newBrowser := TWebBrowser.Create(nil);
1216 TOleControl(newBrowser).Parent := BrowserPanel;
1217 TOleControl(newBrowser).Align := alClient;
1218 newBrowser.OnDocumentComplete := BrowserDocumentComplete;
1219 newBrowser.OnBeforeNavigate2 := BrowserBeforeNavigate2;
1220 newBrowser.OnEnter := BrowserEnter;
1221 newBrowser.OnNewWindow2 := BrowserNewWindow2;
1222 newBrowser.OnStatusTextChange := BrowserStatusTextChange;
1223 newBrowser.OnTitleChange := BrowserTitleChange;
1224 newBrowser.Navigate(BLANK_HTML);
1225 TOleControl(newBrowser).Visible := false;
1226 FBrowsers.Add(newBrowser);
1229 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô
1230 FIsIgnoreResize := True;
1232 //
\8eè
\82Ì
\83J
\81[
\83\
\83\8b
1233 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1236 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1237 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1239 //
\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Æ)
1240 InitializeBoardPlugIns;
1242 EnabledCloseButton := True;
1245 //
\8f\84\89ñ
\83f
\81[
\83^
\93Ç
\82Ý
\8d\9e\82Ý
1246 RoundList := TRoundList.Create;
1247 RoundList.LoadRoundBoardFile;
1249 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\97ñ
\8b\93(ReadFavorite
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1250 GikoSys.ListBoardFile;
1252 RoundList.LoadRoundThreadFile;
1254 if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
1255 GikoSys.ListBoardFile;
1257 //
\83\81\83j
\83\85\81[
\82É
\92Ç
\89Á
1260 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g(LoadHistory
\82æ
\82è
\82à
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1261 FHistoryList := TList.Create;
1263 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1266 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
1267 // FFavorite := TFavorite.Create(FavoriteTreeView);
1268 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1269 FavoriteDM.ReadFavorite;
1271 //
\83\8a\83X
\83g
\83X
\83^
\83C
\83\8b
1272 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1274 //
\83\81\83C
\83\93\83N
\81[
\83\8b\83o
\81[
\88Ê
\92u
1275 // MainCoolBar.Top := 0;
1276 // MainCoolBar.Left := 0;
1278 //
\83A
\83j
\83\81\83p
\83l
\83\8b\88Ê
\92u
1279 AnimePanel.Top := 0;
1280 AnimePanel.Left := 0;
1282 //
\8ae
\8eí
\89Â
\8e\8b\8fó
\91Ô
\82È
\82Ç
\90Ý
\92è
1284 //
\83L
\83\83\83r
\83l
\83b
\83g
1285 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1287 //
\83\81\83b
\83Z
\81[
\83W
\83o
\81[
1288 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1289 MsgBarVisibleActionExecute(nil);
1290 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1292 //
\83X
\83e
\81[
\83^
\83X
\83o
\81[
1293 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1294 StatusBarVisibleActionExecute(nil);
1296 //
\83t
\83H
\83\93\83g
\81E
\90F
\90Ý
\92è
1297 TreeView.Items.BeginUpdate;
1298 FavoriteTreeView.Items.BeginUpdate;
1299 ListView.Items.BeginUpdate;
1301 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1302 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1303 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1304 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1306 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1307 FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1308 FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1309 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1311 ListView.Font.Name := GikoSys.Setting.ListFontName;
1312 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1313 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1314 //ListView.Color := GikoSys.Setting.ListBackColor;
1315 ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1316 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1317 FOddColor := GikoSys.Setting.OddColor;
1320 TreeView.Items.EndUpdate;
1321 FavoriteTreeView.Items.EndUpdate;
1322 ListView.Items.EndUpdate;
1324 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1325 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1327 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
1328 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1329 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1330 FDragWFirst := false;
1331 SetContent(BrowserNullTab); //
\83u
\83\89\83E
\83U
\82ð
\8bó
\94\92\95\
\8e¦
1332 // TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
1333 // TreeView.Selected := TreeView.Items[0]; //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
1336 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95\9c\8c³
1337 wp.length := sizeof(wp);
1338 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1339 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1340 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1341 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1342 wp.showCmd := SW_HIDE;
1343 SetWindowPlacement(Handle, @wp);
1345 // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1346 // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1347 if GikoSys.Setting.WindowMax then
1348 WindowState := wsMaximized;
1350 //
\83M
\83R
\83A
\83j
\83\81
1352 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1353 if FileExists(FileName) then
1354 Animate.FileName := FileName;
1362 //
\83X
\83\8c\91S
\95\94\95\
\8e¦
\83{
\83^
\83\93\82ð
\89\9f\82³
\82ê
\82½
\8fó
\91Ô
\82É
\82·
\82é
1363 AllItemAction.Checked := True;
1364 AllResAction.Checked := True;
1366 //TreeView
\82Ì
\8e×
\96\82\8fL
\82¢ToolTip
\82ð
\94ñ
\95\
\8e¦
1367 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1368 Style := Style or TVS_NOTOOLTIPS;
1369 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1371 //
\83c
\83\8a\81[
\82ð
\83\81\83C
\83\93\82¾
\82¯
\95\
\8e¦
\82É
\82µ
\82Ä
\8dÅ
\91å
\89»
1372 TreeView.Align := alClient;
1373 FavoriteTreeView.Align := alClient;
1374 FavoriteTreeView.Visible := False;
1376 //
\83u
\83\89\83E
\83U
\83T
\83C
\83Y
\95Ï
\8dX
\82Ì
\8f\89\8aú
\89»
1377 // FBrowserSizeFlag := False;
1378 // FBrowserSizeHeight := ViewPanel.Height;
1380 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1381 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1383 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1384 ArrangeAction.Execute;
1386 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1387 case GikoSys.Setting.ListWidthState of
1389 ViewPanel.Width := 1;
1390 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1391 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1394 ViewPanel.Width := GikoSys.Setting.ListWidth;
1395 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1396 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1399 ViewPanel.Width := GikoSys.Setting.ListWidth;
1400 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1401 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1405 case GikoSys.Setting.ListHeightState of
1407 ViewPanel.Height := 1;
1408 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1409 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1412 ViewPanel.Height := GikoSys.Setting.ListHeight;
1413 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1414 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1417 ViewPanel.Height := GikoSys.Setting.ListHeight;
1418 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1419 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1424 //
\83v
\83\8d\83O
\83\8c\83X
\83o
\81[
\82Ì
\8f\89\8aú
\89»
1425 // ProgressBar.Visible := False;
1426 ProgressBar.Parent := StatusBar;
1427 ProgressBar.Top := 2;
1428 ProgressBar.Left := 0;
1429 ProgressBar.Width := StatusBar.Panels[0].Width;
1430 ProgressBar.Height := StatusBar.Height - 2;
1431 ProgressBar.Position := 0;
1433 //
\83_
\83E
\83\93\83\8d\81[
\83h
\83I
\83u
\83W
\83F
\83N
\83g
1434 FControlThread := TThreadControl.Create(True);
1435 FControlThread.MaxThreadCount := 1;
1436 FControlThread.Resume;
1437 FControlThread.OnDownloadEnd := DownloadEnd;
1438 FControlThread.OnDownloadMsg := DownloadMsg;
1439 FControlThread.OnWork := Work;
1440 FControlThread.OnWorkBegin := WorkBegin;
1441 FControlThread.OnWorkEnd := WorkEnd;
1442 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1444 //
\8di
\8d\9e\8c\9f\8dõ
\97\9a\97ð
1445 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1447 //
\83u
\83\89\83E
\83U
\83^
\83u
\90Ý
\92è
1450 BrowserBoardNameLabel.Caption := '';
1451 BrowserNameLabel.Caption := '';
1454 FTabHintIndex := -1;
1456 //
\83\8a\83\93\83N
\83o
\81[
1459 //
\83\81\83j
\83\85\81[
\83t
\83H
\83\93\83g
1462 //
\83c
\81[
\83\8b\83o
\81[Wrapable
1463 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1464 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1466 KeepDefaultToolButton(StdToolBar, TmpToolBar);
1467 KeepDefaultToolButton(ListToolBar, TmpToolBar);
1468 KeepDefaultToolButton(BrowserToolBar, TmpToolBar);
1470 MakeDefaultINIFile();
1471 //
\83c
\81[
\83\8b\83{
\83^
\83\93\93Ç
\82Ý
\8d\9e\82Ý
1472 ReadToolBarSetting(ActionList, StdToolBar);
1473 ReadToolBarSetting(ActionList, ListToolBar);
1475 for i := ListToolBar.ControlCount - 1 downto 0 do
1477 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1479 //
\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·
1480 if (i + 1) < ListToolBar.ControlCount then
1481 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1482 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1483 ListToolBar.Controls[ i + 1 ].Visible := False;
1485 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
1486 ListToolBar.Controls[ i ].Visible := False;
1487 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
1488 SelectComboBox.Parent := ListToolBar;
1489 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1490 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1491 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
1492 SelectComboBoxSplitter.Parent := ListToolBar;
1493 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1500 ReadToolBarSetting(ActionList, BrowserToolBar);
1502 OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes;
1503 //
\83A
\83h
\83\8c\83X
\83o
\81[
1504 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1506 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³
\82ÍFormShow
\82É
\88Ú
\93®
\82µ
\82½
1508 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\82ª
\96³
\82¢
\8fê
\8d\87\82Í
\83\81\83b
\83Z
\81[
\83W
\95\
\8e¦
1509 if not FileExists(GikoSys.GetBoardFileName) then begin
1510 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
1511 + '
\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
1512 + '
\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';
1513 MsgBox(SplashWindow.Handle, msg, '
\83M
\83R
\83i
\83r', MB_OK or MB_ICONINFORMATION);
1514 NewBoardAction.Execute;
1517 //
\83L
\81[
\90Ý
\92è
\93Ç
\82Ý
\8d\9e\82Ý
1518 GikoSys.LoadKeySetting(ActionList);
1520 //
\8dÅ
\8fI
\8f\84\89ñ
\8e\9e\8aÔ
1521 // FLastRoundTime := 0;
1524 FHint := TResPopup.Create(Self);
1526 //
\8dÅ
\8cã
\82É
\91I
\91ð
\82³
\82ê
\82½
\83L
\83\83\83r
\83l
\83b
\83g
\82Ì
\95\9c\8c³
1527 CabinetVisible( False );
1528 if GikoSys.Setting.CabinetVisible then begin
1529 i := CabinetSelectPopupMenu.Items.Count - 1;
1530 if GikoSys.Setting.CabinetIndex = i - 1 then
1531 CabinetHistoryAction.Execute
1532 else if GikoSys.Setting.CabinetIndex = i then
1533 CabinetFavoriteAction.Execute
1535 if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1536 ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1537 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô 2
1538 FIsIgnoreResize := True;
1539 CabinetBBSAction.Execute;
1542 ShowBBSTreeOld( BBSs[ 0 ] );
1543 PostMessage( Handle, USER_TREECLICK, 0, 0 );
1546 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô 3
1547 FIsIgnoreResize := True;
1549 //
\83I
\81[
\83g
\83\8d\83O
\83C
\83\93
1550 if GikoSys.Setting.AutoLogin then
1551 LoginAction.Execute;
1553 //
\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
1554 for i := 1 to ParamCount do begin
1555 MoveToURL(ParamStr(i));
1560 s := GikoSys.FAbon.NGwordname;
1561 StatusBar.Panels[2].Text := s;
1562 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1563 StatusBarResize(Sender);
1565 dummy1.Caption := ItemReservPMenu.Caption;
1566 dummy1.Hint := ItemReservPMenu.Hint;
1568 //Samba24
\82Ì
\83t
\83@
\83C
\83\8b\83`
\83F
\83b
\83N
1569 GikoSys.SambaFileExists();
1573 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82É
\95Û
\91¶
1574 procedure TGikoForm.SaveCoolBarSettings;
1580 if IsIconic( Handle ) or FIsIgnoreResize then
1583 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Main)
1584 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1585 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1586 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1587 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1588 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1590 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Board)
1591 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1592 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1593 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1594 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1595 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1597 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Browser)
1598 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1599 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1600 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1601 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1602 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1607 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82©
\82ç
\95\9c\8c³
1608 procedure TGikoForm.LoadCoolBarSettings;
1614 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Main)
1615 MainCoolBar.Bands.BeginUpdate;
1617 // for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1618 for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin
1619 CoolSet := GikoSys.Setting.MainCoolSet[i];
1620 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1621 FIsIgnoreResize := False;
1622 SaveCoolBarSettings;
1625 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1626 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1627 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1630 MainCoolBar.Bands.EndUpdate;
1633 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Board)
1634 ListCoolBar.Bands.BeginUpdate;
1636 // for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1637 for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin
1638 CoolSet := GikoSys.Setting.ListCoolSet[i];
1639 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1640 FIsIgnoreResize := False;
1641 SaveCoolBarSettings;
1644 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1645 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1646 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1649 ListCoolBar.Bands.EndUpdate;
1652 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Browser)
1653 BrowserCoolBar.Bands.BeginUpdate;
1655 // for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1656 for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
1657 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1658 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1659 FIsIgnoreResize := False;
1660 SaveCoolBarSettings;
1663 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1664 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1665 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1668 BrowserCoolBar.Bands.EndUpdate;
1676 procedure TGikoForm.FormShow(Sender: TObject);
1678 ShowWindow(Application.Handle, SW_HIDE);
1680 //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½
1681 //
\83c
\81[
\83\8b\83o
\81[
\95\
\8e¦
1682 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1683 StdToolBarVisibleActionExecute( nil );
1684 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1685 AddressBarVisibleActionExecute( nil );
1686 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1687 LinkBarVisibleActionExecute( nil );
1688 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1689 ListToolBarVisibleActionExecute( nil );
1690 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1691 ListNameBarVisibleActionExecute( nil );
1692 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1693 BrowserToolBarVisibleActionExecute( nil );
1694 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1695 BrowserNameBarVisibleActionExecute( nil );
1697 //
\83u
\83\89\83E
\83U
\83^
\83u
1698 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1699 BrowserTabVisibleActionExecute(nil);
1701 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1702 BrowserTabTopAction.Checked := True;
1703 BrowserTabTopActionExecute(nil);
1705 BrowserTabBottomAction.Checked := True;
1706 BrowserTabBottomActionExecute(nil);
1709 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1710 BrowserTabTabStyleAction.Checked := True;
1711 BrowserTabTabStyleActionExecute(nil);
1712 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1713 BrowserTabButtonStyleAction.Checked := True;
1714 BrowserTabButtonStyleActionExecute(nil);
1716 BrowserTabFlatStyleAction.Checked := True;
1717 BrowserTabFlatStyleActionExecute(nil);
1720 // CoolBar
\95\9c\8c³
1721 LoadCoolBarSettings;
1723 FIsIgnoreResize := False;
1726 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1728 if ( GikoSys.Setting.ShowDialogForEnd ) and
1729 (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
1735 //Application.HookMainWindow(Hook);
1736 Application.UnhookMainWindow(Hook);
1737 Application.Terminate;
1740 procedure TGikoForm.FormDestroy(Sender: TObject);
1743 // CoolSet: TCoolSet;
1744 wp: TWindowPlacement;
1746 // Application.OnDeactivate := nil;
1747 // Self.OnDeactivate := nil;
1750 if GetActiveList is TBBS then begin
1751 for i := 0 to ListView.Columns.Count - 1 do
1752 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1753 end else if GetActiveList is TCategory then begin
1754 for i := 0 to ListView.Columns.Count - 1 do
1755 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1756 end else if GetActiveList is TBoard then begin
1757 for i := 0 to ListView.Columns.Count - 1 do
1758 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1763 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95Û
\91¶
1764 wp.length := sizeof(wp);
1765 GetWindowPlacement(Handle, @wp);
1766 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1767 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1768 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1769 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1770 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1772 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1773 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1774 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1775 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1776 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1777 if ArrangeAction.Checked then
1778 GikoSys.Setting.ListOrientation := gloVertical
1780 GikoSys.Setting.ListOrientation := gloHorizontal;
1781 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1784 //
\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è
1785 //
\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¢
1787 //
\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
1789 if GikoForm.WindowState <> wsMinimized then
1790 SaveCoolBarSettings;
1793 GikoSys.Setting.WriteWindowSettingFile;
1794 GikoSys.Setting.WriteNameMailSettingFile;
1798 //
\82¨
\8bC
\82É
\93ü
\82è
\95Û
\91¶
1800 //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é
1801 FavoriteDM.WriteFavorite;
1807 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1808 BrowserNullTab.Thread := nil;
1809 BrowserTab.OnChange := nil;
1810 BrowserTab.Tabs.BeginUpdate;
1811 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
1812 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
1814 FActiveContent := nil;
1815 BrowserTab.Tabs.Clear;
1816 BrowserTab.Tabs.EndUpdate;
1817 BrowserTab.OnChange := BrowserTabChange;
1821 for i := FBrowsers.Count - 1 downto 0 do begin
1822 TWebBrowser(FBrowsers[i]).Free;
1825 FBrowsers.Capacity := 0;
1828 if BrowserNullTab <> nil then begin
1829 BrowserNullTab.Browser := nil; {*BrowserNullTab
\82ÌBrowser
\82Í
\90Ý
\8cv
\8e\9e\82É
\93\
\82è
\95t
\82¯
\82Ä
\82é
\93z
1830 *
\82È
\82Ì
\82Å
\82±
\82±
\82ÅFree
\82³
\82ê
\82é
\82Æ
\8d¢
\82é
\82Ì
\82Å
\82Í
\82¸
\82µ
\82Ä
\82µ
\82Ü
\82¤
\81B
1832 BrowserNullTab.Free;
1838 TreeView.Items.BeginUpdate;
1839 for i := TreeView.Items.Count - 1 downto 0 do begin
1840 TreeView.Items[i].Free;
1842 TreeView.Items.Clear;
1843 TreeView.Items.EndUpdate;
1847 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\95Û
\91¶
1849 //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
1850 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1854 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
\95Û
\91¶
1868 //
\8f\84\89ñ
\83\8a\83X
\83g
\95Û
\91¶&
\94j
\8aü
1870 RoundList.SaveRoundFile;
1884 FControlThread.Terminate;
1885 FControlThread.WaitFor;
1889 FControlThread.Free;
1892 // TBBS
\82Í
\95Û
\8e\9d\82µ
\82Ä
\82¢
\82é TCategory, TBoard, TThreadItem
\82·
\82×
\82Ä
\82ð
\8aJ
\95ú
\82·
\82é
1893 // 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Å
1894 // BoardPluteIns
\82Ì
\8aJ
\95ú
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ
1896 for i := Length( BBSs ) - 1 downto 0 do begin
1897 if BBSs[ i ] <> nil then
1905 for i := Length( BoardPlugIns ) - 1 downto 0 do begin
1906 if BoardPlugIns[ i ] <> nil then
1907 BoardPlugIns[ i ].Free;
1908 BoardPlugIns[ i ] := nil;
1914 if FEvent <> nil then
1918 if FHint <> nil then begin
1919 FHint.ReleaseHandle;
1924 if TPreviewBrowser <> nil then begin
1925 FPreviewBrowser.Free;
1926 FPreviewBrowser := nil;
1933 //
\83t
\83H
\81[
\83\80\83N
\83\8d\81[
\83Y
1934 procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1937 //
\83L
\83\83\83r
\83l
\83b
\83g
\81~
\83{
\83^
\83\93\83N
\83\8a\83b
\83N
1938 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1940 CabinetVisibleAction.Execute;
1941 // CabinetPanelVisible(false);
1944 //
\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
1945 procedure TGikoForm.SetBBSMenu;
1948 item : TBBSMenuItem;
1951 //
\83\81\83j
\83\85\81[
\82ð
\8dí
\8f\9c
1952 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1954 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1955 CabinetSelectPopupMenu.Items[ i ].Free;
1956 CabinetMenu.Items[ i ].Free;
1957 BBSSelectPopupMenu.Items[ i ].Free;
1963 //
\83\81\83j
\83\85\81[
\82ð
\90Ý
\92è
1964 for i := Length( BBSs ) - 1 downto 0 do begin
1966 item := TBBSMenuItem.Create( PopupMenu );
1967 item.Caption := BBSs[ i ].Title;
1968 item.Data := BBSs[ i ];
1969 item.OnClick := BBSMenuItemOnClick;
1970 CabinetSelectPopupMenu.Items.Insert( 0, item );
1971 item := TBBSMenuItem.Create( PopupMenu );
1972 item.Caption := BBSs[ i ].Title;
1973 item.Data := BBSs[ i ];
1974 item.OnClick := BBSMenuItemOnClick;
1975 CabinetMenu.Insert( 0, item );
1976 item := TBBSMenuItem.Create( PopupMenu );
1977 item.Caption := BBSs[ i ].Title;
1978 item.Data := BBSs[ i ];
1979 item.OnClick := BBSMenuItemOnClick;
1980 BBSSelectPopupMenu.Items.Insert( 0, Item );
1987 procedure TGikoForm.ReloadBBS;
1991 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1992 NotSelectTabCloseAction.Execute;
1993 //if BrowserTab.Tabs.Count >= 1 then
1994 // for i := BrowserTab.Tabs.Count - 1 downto 0 do
1995 // DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[i]));
1996 BrowserTabCloseAction.Execute;
1997 //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
1998 TreeView.Items.Clear;
2002 for i := Length( BBSs ) - 1 downto 0 do begin
2003 if BBSs[ i ] <> nil then
2012 FTreeType := gttNone;
2014 GikoSys.ListBoardFile; //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\93Ç
\8d\9e
2016 // BBS
\83\81\83j
\83\85\81[
\82Ì
\8dX
\90V
2019 ShowBBSTree( BBSs[ 0 ] );
2021 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
2026 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
2027 FavoriteDM.WriteFavorite;
2029 FavoriteDM.ReadFavorite;
2035 //
\83{
\81[
\83h
\83c
\83\8a\81[
\90Ý
\92è
2036 procedure TGikoForm.SetBoardTreeNode(
2042 CategoryNode: TTreeNode;
2043 BoardNode: TTreeNode;
2044 Category: TCategory;
2047 //
\94Â
\83\8a\83X
\83g
\82Ì
\90Ý
\92è
2048 FActiveBBS := inBBS;
2049 TreeView.Items.BeginUpdate;
2050 TreeView.Items.Clear;
2052 if not inBBS.IsBoardFileRead then
2053 GikoSys.ReadBoardFile( inBBS );
2055 if SplashWindow <> nil then
2056 SplashWindow.ProgressBar.Max := inBBS.Count;
2060 Root := TreeView.Items.Add( nil, inBBS.Title );
2061 Root.ImageIndex := ITEM_ICON_2CH1;
2062 Root.SelectedIndex := ITEM_ICON_2CH2;
2064 for i := 0 to inBBS.Count - 1 do begin
2065 Category := TCategory(inBBS.Items[i]);
2066 CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
2067 CategoryNode.Data := Category;
2068 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
2069 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
2071 for j := 0 to Category.Count - 1 do begin
2072 Board := TBoard(Category.Items[j]);
2074 BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
2075 BoardNode.Data := Board;
2076 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
2077 if not Board.IsLogFile then begin
2078 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
2079 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
2081 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
2082 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
2083 for k := 0 to Board.Count - 1 do begin
2084 if Board.Items[ k ].IsLogFile then begin
2085 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
2086 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
2095 CategoryNode.Expanded := Category.NodeExpand;
2097 if SplashWindow <> nil then begin
2098 SplashWindow.ProgressBar.StepIt;
2099 Application.ProcessMessages;
2103 TreeView.Items.EndUpdate;
2107 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
2109 COLUMN: array[0..0] of string = ('
\83J
\83e
\83S
\83\8a\96¼');
2111 ListColumn: TListColumn;
2114 ListView.Items.BeginUpdate;
2116 Screen.Cursor := crHourGlass;
2118 ListView.Columns.Clear;
2119 for i := 0 to Length(COLUMN) - 1 do begin
2120 ListColumn := ListView.Columns.Add;
2121 ListColumn.Caption := COLUMN[i];
2122 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
2125 ListView.Items.Count := 0;
2126 ListView.Items.Clear;
2127 ListView.Items.Count := ABBS2ch.Count;
2129 // UpFolderAction.Enabled := False;
2130 // AllItemAction.Enabled := False;
2131 // LogItemAction.Enabled := False;
2132 // NewItemAction.Enabled := False;
2133 // SelectItemAction.Enabled := False;
2134 // ListDownloadToolButton.Enabled := False;
2135 // BoardReservToolButton.Enabled := False;
2136 // ListThreadDownloadToolButton.Enabled := False;
2138 ListNameLabel.Caption := ABBS2ch.Title;
2139 FolderImage.Picture := nil;
2140 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
2143 FSortOrder := False;
2144 ListViewColumnClick(nil, ListView.Column[0]);
2146 Result := ABBS2ch.Count;
2148 Screen.Cursor := crDefault;
2149 ListView.Items.EndUpdate;
2153 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
2155 COLUMN: array[0..2] of string = ('
\94Â
\96¼', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e');
2157 ListColumn: TListColumn;
2160 ListView.Items.BeginUpdate;
2162 Screen.Cursor := crHourGlass;
2164 ListView.Columns.Clear;
2165 for i := 0 to Length(COLUMN) - 1 do begin
2166 ListColumn := ListView.Columns.Add;
2167 ListColumn.Caption := COLUMN[i];
2168 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
2171 ListView.Items.Count := 0;
2172 ListView.Items.Clear;
2173 ListView.Items.Count := Category.Count;
2175 // UpFolderAction.Enabled := True;
2176 // AllItemAction.Enabled := False;
2177 // LogItemAction.Enabled := False;
2178 // NewItemAction.Enabled := False;
2179 // SelectItemAction.Enabled := False;
2180 // ListDownloadToolButton.Enabled := False;
2181 // BoardReservToolButton.Enabled := False;
2182 // ListThreadDownloadToolButton.Enabled := False;
2184 ListNameLabel.Caption := Category.Title;
2185 FolderImage.Picture := nil;
2186 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2189 FSortOrder := False;
2190 ListViewColumnClick(nil, ListView.Column[0]);
2192 Result := Category.Count;
2194 Screen.Cursor := crDefault;
2195 ListView.Items.EndUpdate;
2199 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2201 COLUMN: array[0..7] of string = ('
\83X
\83\8c\83b
\83h
\96¼', '
\83J
\83E
\83\93\83g', '
\8eæ
\93¾', '
\90V
\92\85',
2202 '
\96¢
\93Ç', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e', '
\83X
\83\8c\8dì
\90¬
\93ú
\8e\9e');
2203 COLUMN_ALIGNMENT: array[0..7] of TAlignment = (taLeftJustify, taRightJustify,
2204 taRightJustify, taRightJustify,
2205 taRightJustify, taLeftJustify,
2206 taLeftJustify, taLeftJustify);
2207 //No,
\83X
\83\8c\83b
\83h
\96¼,
\83J
\83E
\83\93\83g,
\8f\84\89ñ
\97\
\96ñ,
\8eæ
\93¾
\93ú
\8e\9e
2209 ListColumn: TListColumn;
2212 ListView.Items.BeginUpdate;
2214 Screen.Cursor := crHourGlass;
2216 //
\83`
\83\89\82Â
\82«
\96h
\8e~
\82Ì
\82½
\82ß
\81A
\95Ï
\8dX
\82³
\82ê
\82Ä
\82¢
\82é
\8fê
\8d\87\82Ì
\82Ý
2217 //
\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Ó
2218 if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2220 ListView.Columns.Clear;
2221 for i := 0 to Length(COLUMN) - 1 do begin
2222 ListColumn := ListView.Columns.Add;
2223 ListColumn.Caption := COLUMN[i];
2224 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2225 ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2229 ListView.Items.Count := 0;
2230 ListView.Items.Clear;
2232 case GikoForm.ViewType of
2233 gvtAll: ListView.Items.Count := Board.Count;
2234 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2235 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2236 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2239 ListNameLabel.Caption := Board.Title;
2240 FolderImage.Picture := nil;
2241 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2244 FSortOrder := False;
2245 ListViewColumnClick(nil, ListView.Column[0]);
2247 Result := Board.Count;
2249 Screen.Cursor := crDefault;
2250 ListView.Items.EndUpdate;
2254 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2256 // FileName: string;
2257 // DateTime: TDateTime;
2260 Category: TCategory;
2262 ThreadItem: TThreadItem;
2264 ActivListObj : TObject;
2266 ActivListObj := ActiveList;
2267 if ActivListObj is TBBS then begin
2268 BBS := TBBS(ActivListObj);
2270 ListView.StateImages := nil;
2272 if BBS = nil then Exit;
2273 if BBS.Count <= 0 then Exit;
2274 if Item = nil then Exit;
2275 if Item.Index >= BBS.Count then Exit;
2276 if ListView.Items.Count = 0 then Exit;
2278 if not (BBS.Items[Item.index] is TCategory) then Exit;
2279 Category := TCategory(BBS.Items[Item.index]);
2281 if Category = nil then Exit;
2283 if ListNumberVisibleAction.Checked then
2284 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2286 Item.Caption := Category.Title;
2288 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2289 Item.Data := Category;
2290 end else if ActivListObj is TCategory then begin
2291 Category := TCategory(ActivListObj);
2293 ListView.StateImages := nil;
2295 if Category = nil then Exit;
2296 if Category.Count <= 0 then Exit;
2297 if Item = nil then Exit;
2298 if Item.Index >= Category.Count then Exit;
2299 if ListView.Items.Count = 0 then Exit;
2301 if not (Category.Items[Item.Index] is TBoard) then Exit;
2302 Board := TBoard(Category.Items[Item.Index]);
2304 if Board = nil then Exit;
2306 if ListNumberVisibleAction.Checked then
2307 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2309 Item.Caption := Board.Title;
2311 if Item.SubItems.Count <> 2 then begin
2312 Item.SubItems.Clear;
2313 Item.SubItems.Add('');
2314 Item.SubItems.Add('');
2317 Item.ImageIndex := ITEM_ICON_BOARD1;
2320 Item.SubItems[0] := Board.RoundName // '
\97\
\96ñ'
2322 Item.SubItems[0] := '';
2324 if Board.RoundDate = ZERO_DATE then begin
2325 Item.SubItems[1] := '';
2327 Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2329 end else if ActivListObj is TBoard then begin
2330 Board := TBoard(ActivListObj);
2332 if GikoSys.Setting.ListIconVisible then
2333 ListView.StateImages := StateIconImageList
2335 ListView.StateImages := nil;
2337 case GikoForm.ViewType of
2338 gvtAll: BoardCnt := Board.Count;
2339 gvtLog: BoardCnt := Board.GetLogThreadCount;
2340 gvtNew: BoardCnt := Board.GetNewThreadCount;
2341 gvtUser: BoardCnt := Board.GetUserThreadCount;
2346 // if Board = nil then Exit;
2347 if BoardCnt <= 0 then Exit;
2348 if Item = nil then Exit;
2349 if Item.Index > BoardCnt then Exit;
2350 if ListView.Items.Count = 0 then Exit;
2352 // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2355 case GikoForm.ViewType of
2356 gvtAll: if Item.Index >= Board.Count then Exit else
2357 ThreadItem := TThreadItem(Board.Items[Item.Index]);
2358 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2359 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2360 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2363 if ThreadItem = nil then Exit;
2365 // if ListNumberVisibleAction.Checked then
2366 // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2368 RepStr := ThreadItem.Title;
2369 RepStr := CustomStringReplace(RepStr, '<', '<' );
2370 RepStr := CustomStringReplace(RepStr, '>', '>' );
2371 RepStr := CustomStringReplace(RepStr, '"', '"' );
2372 RepStr := CustomStringReplace(RepStr, '&', '&' );
2373 //RepStr := StringReplace(RepStr, '
\81\97\81M', ',', [rfReplaceAll]);
2375 if Item.SubItems.Count <> 7 then begin
2376 Item.SubItems.Clear;
2377 Item.SubItems.Add('');
2378 Item.SubItems.Add('');
2379 Item.SubItems.Add('');
2380 Item.SubItems.Add('');
2381 Item.SubItems.Add('');
2382 Item.SubItems.Add('');
2383 Item.SubItems.Add('');
2386 if ListNumberVisibleAction.Checked then
2387 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2389 Item.Caption := RepStr;
2391 case ThreadItem.AgeSage of
2392 gasNone: Item.StateIndex := -1;
2393 gasNew: Item.StateIndex := 0;
2394 gasAge: Item.StateIndex := 1;
2395 gasSage: Item.StateIndex := 2;
2398 if ThreadItem.IsLogFile then begin
2399 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2400 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2401 Item.SubItems[1] := IntToStr(ThreadItem.Count);
2402 if ThreadItem.NewResCount = 0 then
2403 Item.SubItems[2] := ''
2405 Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2406 Item.SubItems[3] := '';
2407 if ThreadItem.Round then
2408 Item.SubItems[4] := ThreadItem.RoundName
2410 Item.SubItems[4] := '';
2411 if ThreadItem.RoundDate = ZERO_DATE then begin
2412 Item.SubItems[5] := '';
2414 Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2415 if ThreadItem.NewArrival then
2416 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2417 if ThreadItem.CreateDate = ZERO_DATE then begin
2418 Item.SubItems[6] := '';
2420 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2423 Item.ImageIndex := ITEM_ICON_THREAD1;
2424 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2425 Item.SubItems[1] := '';
2426 Item.SubItems[2] := '';
2427 Item.SubItems[3] := '';
2428 Item.SubItems[4] := '';
2429 Item.SubItems[5] := '';
2430 if not GikoSys.Setting.CreationTimeLogs then
2431 if ThreadItem.CreateDate = ZERO_DATE then
2432 Item.SubItems[6] := ''
2434 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2438 Item.Data := ThreadItem;
2442 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2443 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2444 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2445 var Index: Integer);
2451 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2457 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2458 EndIndex: Integer; OldState, NewState: TItemStates);
2463 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2471 threadItem : TThreadItem;
2473 Protocol, Host, Path, Document, Port, Bookmark: string;
2478 ActiveFileName: string;
2486 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) and (Assigned(FActiveContent.Browser.Document)) then begin
2487 while (FActiveContent.Browser.ReadyState <> READYSTATE_COMPLETE) and
2488 (FActiveContent.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
2489 Application.ProcessMessages;
2491 if LowerCase(OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).charset) <> 'shift_jis' then begin
2492 OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).charset := 'shift_jis';
2499 if PreviewTimer.Enabled then
2500 PreviewTimer.Enabled := False;
2501 Application.CancelHint;
2502 if GetActiveContent <> nil then
2503 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2505 ActiveFileName := '';
2507 StatusBar.Panels[1].Text := Text;
2509 if FHint <> nil then begin
2510 FHint.ReleaseHandle;
2513 if FPreviewBrowser <> nil then
2514 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2516 if not GikoSys.Setting.UnActivePopup then
2517 if not GikoForm.Active then
2520 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2521 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2524 Ext := AnsiLowerCase(ExtractFileExt(Text));
2525 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2526 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2527 if FPreviewBrowser = nil then begin
2528 FPreviewBrowser := TPreviewBrowser.Create(Self);
2529 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2530 TOleControl(FPreviewBrowser).Parent := nil;
2532 FPreviewBrowser.Navigate('about:blank');//
\91O
\89ñ
\82Ì
\83v
\83\8c\83r
\83\85\81[
\89æ
\91\9c\8fÁ
\8b\8e\97p
2533 FPreviewURL := Text;
2534 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2535 PreviewTimer.Enabled := True;
2536 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2537 if Pos('mailto:', Text) = 1 then begin
2538 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2539 //
\83M
\83R
\83i
\83r
\83X
\83\8c \83p
\81[
\83g3
\82Ì466
\8e\81\82É
\8a´
\8eÓ
2541 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2542 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2543 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2544 if (Assigned(e)) then begin
2545 tmp2 := ZenToHan(e.Get_outerText);
2546 if (GikoSys.IsNumeric(tmp2)) then begin
2547 //
\82\93\82Í
\83\8c\83X
\94Ô
\8d\86\82Á
\82Û
\82¢
\82Á
\82·
\81B
2548 wkIntSt := StrToInt(tmp2);
2549 wkIntTo := StrToInt(tmp2);
2550 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2551 FHint.PopupType := gptThread;
2552 SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False);
2554 FHint.PopupType := gptRaw;
2559 if Pos('about:blank..', Text) = 1 then begin
2560 threadItem := GetActiveContent;
2561 if AnsiPos('http://jbbs.shitaraba.com/', threadItem.URL) <> 0 then begin
2562 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2563 Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo);
2564 if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then
2565 buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo)
2566 else if( PathRec.FSt <> 0 ) then
2567 buf := IntToStr(PathRec.FSt);
2568 end else if AnsiPos('machi.to/bbs/', threadItem.URL) <> 0 then begin
2569 URL := threaditem.URL;
2570 buf := Copy(Text,AnsiPos('&st=',Text),Length(Text)-AnsiPos('&st=',Text) + 1);
2572 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2573 buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text));
2579 PathRec := Gikosys.Parse2chURL2(URL);
2580 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2581 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
2583 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
2585 URL := GikoSys.GetBrowsableThreadURL( URL );
2586 wkIntSt := PathRec.FSt;
2587 wkIntTo := PathRec.FTo;
2589 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2592 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2594 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2596 end else if wkIntSt > wkIntTo then begin
2601 //if wkIntSt = 0 then
2603 //if wkINtTo = 0 then
2605 //if PathRec.FFirst then
2607 if PathRec.FStBegin then
2609 if PathRec.FToEnd then
2612 //ATitle := ActiveFileName <> PathRec.FKey;
2613 if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
2618 threadItem := BBSsFindThreadFromURL( URL );
2620 if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
2621 board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
2622 if board <> nil then begin
2623 if not board.IsThreadDatRead then
2624 GikoSys.ReadSubjectFile( board );
2625 threadItem := board.FindThreadFromFileName( PathRec.FKey + '.dat' );
2629 if threadItem <> nil then begin
2630 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2631 FHint.PopupType := gptThread;
2632 SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2638 // ShowTextPopup(s);
2639 if FHint.PopupType = gptRaw then begin
2640 if FHint.Caption <> '' then
2643 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2649 procedure TGikoForm.BrowserTitleChange(Sender: TObject;
2650 const Text: WideString);
2654 if (Text = BLANK_HTML) or (Text = GikoSys.GetHtmlTempFileName) then
2655 Title := CAPTION_NAME
2657 Title := CAPTION_NAME + ' - [' + Text + ']';
2659 //Application.Title := Title;
2662 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2665 //SysMenuApp: HMenu;
2667 FEnabledCloseButton := Enabled;
2668 SysMenu := GetSystemMenu(Handle, False);
2669 //SysMenuApp := GetSystemMenu(Application.Handle, False);
2671 if Enabled then begin
2672 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2673 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2675 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2676 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2679 DrawMenuBar(Handle);
2680 //DrawMenuBar(Application.Handle);
2683 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2684 var AllowChange: Boolean);
2686 if FTreeType = gtt2ch then
2690 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2691 Shift: TShiftState);
2693 if GetActiveList is TBoard then begin
2694 if Key = VK_BACK then begin
2695 // UpFolderButtonClick(Sender);
2696 end else if Key = VK_SPACE then begin
2697 ListDoubleClick(Shift);
2698 end else if Key = VK_RETURN then begin
2701 end else begin // TBBS, TCategory
2702 if Key = VK_BACK then begin
2703 // UpFolderButtonClick(Sender);
2704 end else if Key = VK_SPACE then begin
2706 end else if Key = VK_RETURN then begin
2707 ListDoubleClick(Shift);
2712 function TGikoForm.GetHttpState: Boolean;
2714 Result := FHttpState;
2717 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2718 Column: TListColumn);
2722 wkCategory: TCategory;
2725 if FSortIndex = Column.Index then
2726 FSortOrder := not FSortOrder
2728 FSortOrder := False;
2730 for i := 0 to ListView.Columns.Count - 1 do
2731 ListView.Column[i].ImageIndex := -1;
2733 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
2735 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
2737 Sort.SortNoFlag := ListNumberVisibleAction.Checked;
2739 //if TObject(TreeView.Selected.Data) is TBBS then begin
2740 if TObject( FActiveList ) is TBBS then begin
2741 //wkBBS := TBBS(TreeView.Selected.Data);
2742 wkBBS := TBBS( FActiveList );
2743 Sort.SortOrder := FSortOrder;
2744 Sort.SortIndex := Column.Index;
2745 wkBBS.Sort(CategorySortProc);
2747 //end else if TObject(TreeView.Selected.Data) is TCategory then begin
2748 end else if TObject( FActiveList ) is TCategory then begin
2749 //wkCategory := TCategory(TreeView.Selected.Data);
2750 wkCategory := TCategory( FActiveList );
2751 Sort.SortOrder := FSortOrder;
2752 Sort.SortIndex := Column.Index;
2753 wkCategory.CustomSort(BoardSortProc);
2755 //end else if TObject(TreeView.Selected.Data) is TBoard then begin
2756 end else if TObject( FActiveList ) is TBoard then begin
2757 //wkBoard := TBoard(TreeView.Selected.Data);
2758 wkBoard := TBoard( FActiveList );
2759 Sort.SortOrder := FSortOrder;
2760 Sort.SortIndex := Column.Index;
2761 wkBoard.CustomSort(ThreadItemSortProc);
2764 FSortIndex := Column.Index;
2767 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2768 Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean);
2772 DefaultDraw := True;
2774 DefaultDraw := False;
2775 if (cdsSelected in State) or (cdsHot in State) then begin
2776 Sender.Canvas.Brush.Color := clHighlight;
2777 Sender.Canvas.Font.Color := clHighlightText;
2779 Sender.Canvas.Brush.Color := clBtnFace;
2780 Sender.Canvas.Font.Color := clBtnText;
2782 ARect := Rect(Button.Left, Button.Top, Button.Left + Button.Width, Button.Top + Button.Height);
2783 Sender.Canvas.FillRect(ARect);
2784 DrawText(Sender.Canvas.Handle, PChar(Button.Caption), -1, ARect, DT_SINGLELINE or DT_VCENTER or DT_CENTER);
2787 function TGikoForm.GetTreeNode(Data: TObject): TTreeNode;
2792 Nodes := TreeView.Items;
2794 for i := 0 to Nodes.Count - 1 do begin
2795 if Nodes.Item[i].Data = Data then begin
2796 Result := Nodes.Item[i];
2803 procedure TGikoForm.BrowserBeforeNavigate2(Sender: TObject;
2804 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
2805 Headers: OleVariant; var Cancel: WordBool);
2810 kMenuName: string = 'menu:';
2813 if Pos(kMenuName, URL) <> 0 then begin
2814 sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
2816 if not GikoSys.IsNumeric(sNo) then Exit;
2820 KokoPopupMenu.Tag := StrToInt(sNo);
2821 KokoPopupMenu.Popup(p.x, p.y);
2822 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
2823 Cancel := not GikoSys.Setting.OpenMailer;
2828 procedure TGikoForm.ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
2829 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
2830 var DefaultDraw: Boolean);
2832 ThreadItem: TThreadItem;
2834 // TListView(Sender).Canvas.Font.Style := [];
2835 if TObject(Item.Data) is TThreadItem then begin
2836 ThreadItem := TThreadItem(Item.Data);
2837 if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
2838 ListView.Canvas.Brush.Color := FOddColor;
2840 ListView.Canvas.Brush.Color := FListViewBackGroundColor;
2842 // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
2843 if ThreadItem.UnRead then
2844 TListView(Sender).Canvas.Font.Style := [fsBold];
2848 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
2850 Application.ProcessMessages;
2851 if Application.Terminated then
2853 if PreviewTimer.Enabled then
2854 PreviewTimer.Enabled := False;
2855 //
\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
2856 if FHint <> nil then begin
2857 FHint.ReleaseHandle;
2862 if FPreviewBrowser <> nil then
2863 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2867 procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
2868 const ARect: TRect; var DefaultDraw: Boolean);
2872 IsBoardNode: Boolean;
2878 Category: TCategory;
2882 DefaultDraw := True;
2884 if FTreeType = gttHistory then Exit;
2886 TreeView.Canvas.Font.Color := clBlue;
2887 IsBoardNode := False;
2888 for i := 0 to TreeView.Items.Count - 1 do begin
2890 if not TreeView.Items[i].IsVisible then
2893 if TObject(TreeView.Items[i].Data) is TCategory then begin
2894 if TreeView.Items[i].Expanded then
2897 IsBoardNode := False;
2898 Category := TCategory(TreeView.Items[i].Data);
2899 for j := 0 to Category.Count - 1 do begin
2900 Board := Category.Items[j];
2901 if Board <> nil then begin
2902 if Board.UnRead > 0 then begin
2910 end else if TObject(TreeView.Items[i].Data) is TBoard then begin
2911 IsBoardNode := True;
2912 Board := TBoard(TreeView.Items[i].Data);
2913 Cnt := Board.UnRead;
2919 Bitmap := TBitmap.Create;
2921 Bitmap.Canvas.Font.Assign(TreeView.Canvas.Font);
2922 Bitmap.Canvas.Font.Style := [fsBold];
2923 NodeWidth := Bitmap.Canvas.TextWidth(TreeView.Items[i].Text);
2928 NodeRect := TreeView.Items[i].DisplayRect(True);
2931 CntText := '(' + IntToStr(Cnt) + ')'
2932 else if Cnt = 1 then
2936 TextWidth := TreeView.Canvas.TextWidth(CntText);
2938 TextRect := Rect(NodeRect.Left + NodeWidth + 8,
2940 NodeRect.Left + NodeWidth + TextWidth + 8,
2942 DrawText(TreeView.Canvas.Handle,
2946 DT_SINGLELINE or DT_VCENTER);
2948 TreeViewCustomDrawItem(nil, nil, [], DefaultDraw);
2951 procedure TGikoForm.TreeViewCustomDrawItem(Sender: TCustomTreeView;
2952 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
2955 Category: TCategory;
2958 DefaultDraw := True;
2960 if FTreeType = gttHistory then Exit;
2962 TreeView.Canvas.Font.Style := [];
2963 if Node <> nil then begin
2964 if TObject(Node.Data) is TCategory then begin
2965 Category := TCategory(Node.Data);
2966 for i := 0 to Category.Count - 1 do begin
2967 Board := Category.Items[i];
2968 if Board <> nil then begin
2969 if Board.UnRead > 0 then begin
2970 TreeView.Canvas.Font.Style := [fsBold];
2975 end else if TObject(Node.Data) is TBoard then begin
2976 Board := TBoard(Node.Data);
2977 if Board.UnRead > 0 then
2978 TreeView.Canvas.Font.Style := [fsBold];
2983 procedure TGikoForm.TreeViewExpanded(Sender: TObject; Node: TTreeNode);
2985 TreeView.Invalidate;
2987 if TObject(Node.Data) is TBBS then begin
2988 TBBS(Node.Data).NodeExpand := True;
2989 end else if TObject(Node.Data) is TCategory then begin
2990 TCategory(Node.Data).NodeExpand := True;
2991 end else if TObject(Node.Data) is TBoard then begin
2992 TBoard(Node.Data).NodeExpand := True;
2996 {procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
2998 TreeSplitter.Visible := PanelVisible;
2999 CabinetPanel.Visible := PanelVisible;
3000 CabinetToolButton.Down := PanelVisible;
3003 procedure TGikoForm.ListViewAllSelect;
3009 procedure TGikoForm.TreeViewDblClick(Sender: TObject);
3014 GetCursorPos(APoint);
3015 APoint := TreeView.ScreenToClient(APoint);
3016 HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
3017 if not (htOnLabel in HitTest) then Exit;
3019 TreeDoubleClick( TreeView.Selected );
3022 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
3024 AddMessageList(Msg, nil, Icon);
3027 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
3031 boardPlugIn : TBoardPlugIn;
3035 if Item.DownType = gdtBoard then
3036 ATitle := Item.Board.Title
3038 ATitle := Item.ThreadItem.Title;
3040 ATitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j';
3042 if Item.State in [gdsComplete, gdsDiffComplete] then begin
3044 if Item.DownType = gdtBoard then begin
3047 AddMessageList(ATitle + ' [
\83X
\83\8c\88ê
\97\97\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3048 if GetActiveList = Item.Board then begin
3050 SetActiveList(Item.Board);
3052 Item.Board.Modified := True;
3053 Item.Board.IsThreadDatRead := True;
3055 end else if Item.DownType = gdtThread then begin
3058 Item.ThreadItem.NewArrival := True;
3059 if (Item.ThreadItem.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin
3060 boardPlugIn := Item.ThreadItem.BoardPlugIn;
3061 Item.ThreadItem.Title := GikoSys.DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 )).FTitle;
3062 ATitle := Item.ThreadItem.Title;
3063 end else if ATitle = '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j' then begin
3064 ATitle := GikoSys.DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1)).FTitle;
3066 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
3067 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then
3068 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
3070 if GetActiveContent = Item.ThreadItem then
3071 InsertBrowserTab(Item.ThreadItem)
3072 else if (ListView.Selected <> nil ) and ( TObject(ListView.Selected.Data) is TThreadItem ) and ( Item.ThreadItem = TThreadItem(ListView.Selected.Data)) then
3073 InsertBrowserTab(Item.ThreadItem, True)
3075 InsertBrowserTab(Item.ThreadItem, False);
3077 if Item.State = gdsComplete then begin
3079 AddMessageList(ATitle + ' [
\83X
\83\8c\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3081 PlaySound('NewDiff');
3082 AddMessageList(ATitle + ' [
\83X
\83\8c\8d·
\95ª
\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3085 //
\8f\84\89ñ
\82 \82è
\82Ì
\8fê
\8d\87\81\95\82P
\82O
\82O
\82O
\92´
\82Í
\8f\84\89ñ
\8dí
\8f\9c
3086 if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin
3087 Item.ThreadItem.Round := False;
3088 Item.ThreadItem.RoundName := '';
3089 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);
3095 end else if Item.State = gdsNotModify then begin
3097 { if (Item.DownType = gdtThread) and (AddHistory(Item.ThreadItem)) then begin
3098 //SetContent(Item.ThreadItem);
3099 InsertBrowserTab(Item.ThreadItem);
3101 AddMessageList(ATitle + ' [
\96¢
\8dX
\90V]', nil, gmiSAD);
3102 PlaySound('NoChange');
3103 Screen.Cursor := crDefault;
3104 end else if Item.State = gdsAbort then begin
3106 AddMessageList(ATitle + ' [
\92\86\92f]', nil, gmiSAD);
3107 end else if Item.State = gdsError then begin
3112 AddMessageList(ATitle + ' [
\83G
\83\89\81[(' + IntToStr(Item.ResponseCode) + s + ')]', nil, gmiNG);
3113 // if Item.ResponseCode = 302 then
3114 // 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);
3120 if FWorkCount < 0 then FWorkCount := 0;
3121 if FWorkCount = 0 then begin
3123 Animate.Active := False;
3125 Screen.Cursor := crDefault;
3132 procedure TGikoForm.WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
3134 // SetProgressValue(Number, 0, AWorkCountMax);
3135 // ProgressBar.Visible := True;
3136 ProgressBar.Position := 0;
3137 ProgressBar.Max := AWorkCountMax;
3138 FDownloadTitle := AWorkTitle;
3139 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ð
\8aJ
\8en
\82µ
\82Ü
\82·';
3140 FDownloadMax := AWorkCountMax;
3143 procedure TGikoForm.WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
3145 ProgressBar.Position := 0;
3146 if FDownloadMax <> 0 then
3147 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ª
\8a®
\97¹
\82µ
\82Ü
\82µ
\82½';
3150 procedure TGikoForm.Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
3152 ProgressBar.Position := AWorkCount;
3153 // SetProgressValue(Number, AWorkCount);
3154 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86 (' + IntToStr(AWorkCount) + '/' + IntToStr(FDownloadMax) + ')';
3158 procedure TGikoForm.SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
3160 Component: TComponent;
3162 Component := FindComponent('ProgressBar' + IntToStr(Number + 1));
3163 if Component <> nil then begin
3164 if not (Component is TProgressBar) then Exit;
3166 TProgressBar(Component).Max := Max;
3167 TProgressBar(Component).Position := Value;
3172 procedure TGikoForm.AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
3174 ListItem: TListItem;
3176 MessageListView.Items.BeginUpdate;
3178 ListItem := MessageListView.Items.Add;
3179 ListItem.Caption := ACaption;
3180 ListItem.Data := AObject;
3181 ListItem.MakeVisible(False);
3183 gmiOK: ListItem.ImageIndex := 0;
3184 gmiSAD: ListItem.ImageIndex := 1;
3185 gmiNG: ListItem.ImageIndex := 2;
3186 gmiWhat: ListItem.ImageIndex := 3;
3189 MessageListView.Items.EndUpdate;
3193 {procedure TGikoForm.BrowserTabChange(Sender: TObject);
3196 ThreadItem: TThreadItem;
3198 ThreadItem := GetActiveContent;
3199 if ThreadItem <> nil then begin
3200 SetContent(ThreadItem);
3204 procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
3208 favItem : TFavoriteThreadItem;
3209 newBrowser : TBrowserRecord;
3212 if Threaditem = nil then Exit;
3214 if ThreadItem.IsLogFile then begin
3215 favItem := TFavoriteThreadItem.Create(ThreadItem.URL, ThreadItem.Title );
3216 if not AddHistory( favItem ) then
3219 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
3220 if TObject(BrowserTab.Tabs.Objects[i]) is TBrowserRecord then begin
3221 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
3222 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = nil then begin
3223 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3224 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[4]) then begin
3225 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3226 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3227 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3228 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3233 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser := TWebBrowser(FBrowsers[4]);
3234 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
3235 FBrowsers.Move(4, 0);
3237 if ActiveTab then begin
3238 BrowserTab.TabIndex := i;
3239 BrowserTab.OnChange(nil);
3246 idx := BrowserTab.TabIndex;
3247 BrowserTab.Tabs.BeginUpdate;
3248 //
\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é
3249 //
\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é
3250 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil) then begin
3251 j := FBrowsers.IndexOf(FActiveContent.FBrowser);
3253 FBrowsers.Move(4, 0);
3255 if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin
3256 newBrowser := TBrowserRecord.Create;
3257 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3258 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[4]) then begin
3259 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3260 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3261 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3262 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3267 newBrowser.Browser := TWebBrowser(FBrowsers[4]);
3268 FBrowsers.Move(4, 0);
3269 newBrowser.Browser.Navigate(BLANK_HTML);
3270 newBrowser.thread := ThreadItem;
3271 newBrowser.Repaint := true;
3272 newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes;
3274 BrowserTab.Tabs.InsertObject(0, GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser);
3275 if ActiveTab then begin
3276 BrowserTab.TabIndex := 0;
3280 newBrowser := TBrowserRecord.Create;
3281 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
3282 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[4]) then begin
3283 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil;
3284 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
3285 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
3286 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
3291 newBrowser.Browser := TWebBrowser(FBrowsers[4]);
3292 FBrowsers.Move(4, 0);
3293 newBrowser.Browser.Navigate(BLANK_HTML);
3294 newBrowser.thread := ThreadItem;
3295 newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes;
3296 newBrowser.Repaint := true;
3298 i := BrowserTab.Tabs.AddObject(GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser);
3299 if ActiveTab then begin
3300 BrowserTab.TabIndex := i;
3303 BrowserTab.Tabs.EndUpdate;;
3304 if(ActiveTab) or (idx = -1) then begin
3305 BrowserTab.OnChange(nil);
3308 if BrowserNullTab = nil then begin
3309 BrowserNullTab := TBrowserRecord.Create;
3310 BrowserNullTab.Browser := Browser;
3312 BrowserNullTab.thread := ThreadItem;
3313 BrowserNullTab.Browser.Navigate(BLANK_HTML);
3314 SetWindowPos( BrowserNullTab.Browser.Handle, HWND_TOPMOST, 0, 0, BrowserPanel.Width, BrowserPanel.Height, SWP_NOACTIVATE or SWP_NOZORDER);
3315 BrowserTab.TabIndex := -1;
3316 SetContent(BrowserNullTab);
3319 if GikoSys.Setting.URLDisplay then
3320 AddressComboBox.Text := ThreadItem.URL;
3324 procedure TGikoForm.SetContent(inThread : TBrowserRecord);
3329 // HtmlName: string;
3332 // OldCursor: TCursor;
3336 if (FActiveContent <> nil) and
3337 (FActiveContent.Thread <> inThread.Thread) and
3338 (Assigned(FActiveContent.Browser.Document)) then begin
3342 //Application.ProcessMessages;
3343 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document).Body).ScrollTop;
3344 //if FActiveContent.Browser <> BrowserNullTab.Browser then
3345 // TOleControl(FActiveContent.Browser).Visible := false;
3348 MsgBox(Handle, E.Message, 'SetContent[<-ScrollTop]', 0);
3353 if inThread = nil then
3355 else if inThread.Browser = nil then begin
3356 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
3357 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = TWebBrowser(FBrowsers[4]) then begin
3358 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser := nil;
3359 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent <> nil then begin
3360 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent.Free;
3361 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent := nil;
3366 inThread.Browser := TWebBrowser(FBrowsers[4]);
3367 FBrowsers.Move(4, 0);
3371 while (inThread.Browser.ReadyState <> READYSTATE_COMPLETE) and
3372 (inThread.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3373 Application.ProcessMessages;
3376 if inThread.Thread = nil then begin
3377 inThread.Browser.Navigate(BLANK_HTML);
3378 BrowserBoardNameLabel.Caption := '';
3379 ItemBoardImage.Picture := nil;
3380 BrowserNameLabel.Caption := '';
3381 ItemImage.Picture := nil;
3382 BrowserNullTab.Thread := nil;
3383 TOleControl(BrowserNullTab.Browser).Visible := true;
3384 TOleControl(BrowserNullTab.Browser).BringToFront;
3385 FActiveContent := nil;
3389 BBSID := inThread.FThread.ParentBoard.BBSID;
3390 FileName := inThread.FThread.FileName;
3392 if GetCapture = ListView.Handle then
3395 Screen.Cursor := crHourGlass;
3397 if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil) then
3398 TOleControl(FActiveContent.FBrowser).BringToFront;
3399 if inThread.FThread.UnRead then begin
3400 inThread.FThread.ParentBoard.UnRead := inThread.FThread.ParentBoard.UnRead - 1;
3401 if inThread.FThread.ParentBoard.UnRead < 0 then inThread.FThread.ParentBoard.UnRead := 0;
3404 LockWindowUpdate(Self.Handle);
3405 TOleControl(inThread.FBrowser).Visible := true; //
\82±
\82±
\82Å
\95\
\8e¦
\82µ
\82Ä
\82¨
\82©
\82È
\82¢
\82Æ
\95`
\89æ
\82Å
\8e~
\82Ü
\82é
3406 TOleControl(inThread.FBrowser).BringToFront;
3407 LockWindowUpdate(0);
3408 if not inThread.FThread.IsLogFile then begin
3410 if (not Assigned(inThread.Browser.Document)) then begin
3411 inThread.Browser.Navigate('about:blank');
3412 //while (not Assigned(Thread.Browser.Document)) do begin
3413 // Application.ProcessMessages;
3417 s := '<HTML><BODY><CENTER>
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Í
\8eæ
\93¾
\82µ
\82Ä
\82¢
\82Ü
\82¹
\82ñ</CENTER></BODY></HTML>';
3418 doc := Idispatch( olevariant(inThread.Browser.ControlInterface).Document) as IHTMLDocument2;
3420 doc.charset := 'Shift_JIS';
3426 //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«
3427 //
\90V
\8bK
\82ÉThread
\82ð
\8aJ
\82¢
\82½
\82Æ
\82«
\82É
\90^
\82É
\82È
\82Á
\82Ä
\82¢
\82é
\81B
3428 if(inThread.Repaint) or (inThread.OnlyHundred <> GikoSys.OnlyAHundredRes)then begin
3429 //Thread.LastSize := ThreadItem.Size;
3430 inThread.Repaint := false;
3432 doc := Idispatch( olevariant(inThread.Browser.ControlInterface).Document) as IHTMLDocument2;
3433 GikoSys.CreateHTML2(doc, inThread.FThread, sTitle);
3434 inThread.FBrowser.OnDocumentComplete(inThread.FBrowser, inThread.FBrowser.Parent, url);
3435 inThread.OnlyHundred := GikoSys.OnlyAHundredRes;
3436 Application.ProcessMessages;
3437 //
\82±
\82±
\82ÅApplication.ProcessMessages
\82ð
\8cÄ
\82Ô
\82±
\82Æ
\82É
\82æ
\82Á
\82ÄWebBrowser
\82ð
\8dX
\90V
\82³
\82¹
\82é
\81B
3438 //
\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é
3439 //
\81@by
\82à
\82¶
\82ã(2004/01/20)
3441 if inThread.FThread.UnRead then
3442 BrowserMovement('new', inThread)
3443 else if inThread.FThread.ScrollTop <> 0 then begin
3445 doc.Body.ScrollTop := inThread.FThread.ScrollTop;
3448 MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
3452 // Application.ProcessMessages;
3455 inThread.FThread.UnRead := False;
3458 // LockWindowUpdate(0);
3459 if(FActiveContent <> nil) and (FActiveContent <> inThread) then begin
3460 if (FActiveContent.Browser <> BrowserNullTab.Browser) and
3461 (TOleControl(FActiveContent.Browser).Visible) then
3462 TOleControl(FActiveContent.Browser).Visible := false;
3464 FActiveContent := inThread;
3466 BrowserBoardNameLabel.Caption := inThread.FThread.ParentBoard.Title;
3467 ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
3468 BrowserNameLabel.Caption := inThread.FThread.Title;
3469 ItemImage.Picture := nil;
3470 if inThread.FThread.IsLogFile then
3471 if inThread.FThread.NewArrival then
3472 ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap)
3474 ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap)
3476 ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap);
3478 ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;
3479 BrowserNameLabel.Left := ItemImage.Left + 20;
3482 Screen.Cursor := crDefault;
3486 function TGikoForm.GetActiveContent: TThreadItem;
3488 if( FActiveContent <> nil) and (FActiveContent.Thread <> nil)then
3489 Result := FActiveContent.Thread
3494 procedure TGikoForm.SetActiveList(Obj: TObject);
3499 // if FActiveList <> Obj then begin
3502 if ListView.Selected <> nil then
3503 idx := ListView.Selected.Index
3506 ListView.Items.Count := 0;
3507 ListView.Items.Clear;
3508 ListView.Selected := nil;
3509 // ListView.Columns.Clear;
3511 Caption := CAPTION_NAME;
3512 //Application.Title := CAPTION_NAME;
3514 if Obj is TBBS then begin
3515 for i := 0 to ListView.Columns.Count - 1 do
3516 ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i];
3517 SetCategoryListItem(TBBS(Obj));
3518 end else if Obj is TCategory then begin
3519 for i := 0 to ListView.Columns.Count - 1 do
3520 ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i];
3521 SetBoardListItem(TCategory(Obj));
3522 end else if Obj is TBoard then begin
3523 SetThreadListItem(TBoard(Obj));
3526 if idx >= 0 then begin
3527 ListView.ItemIndex := idx;
3528 ListView.ItemFocused := ListView.Items.Item[ idx ];
3532 if Obj is TBoard then begin
3533 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
3534 if GikoSys.Setting.ListWidthState = glsMax then begin
3535 BrowserMinAction.Execute;
3536 if GikoForm.Visible then
3540 if GikoSys.Setting.ListHeightState = glsMax then begin
3541 BrowserMinAction.Execute;
3542 if GikoForm.Visible then
3550 //
\81\9a\81\9a\83q
\83\8d\83\86\83L
\83\81\83\82
3551 //
\82»
\82Ì
\82¤
\82¿interface
\82ð
\8eg
\82¤
3552 function TGikoForm.GetActiveList: TObject;
3554 Result := FActiveList;
3557 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType);
3559 SetListViewType(AViewType, '', False);
3562 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
3566 if ActiveList is TBoard then begin
3567 Board := TBoard(ActiveList);
3569 Board.ParentCategory.ParenTBBS.SelectText := SelectText;
3570 Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
3571 // Board.SelectText := SelectText;
3572 // Board.KubetsuChk := KubetsuChk;
3573 ViewType := AViewType;
3574 SetActiveList(Board);
3575 SetThreadListItem(Board);
3579 procedure TGikoForm.ListViewCustomDraw(Sender: TCustomListView;
3580 const ARect: TRect; var DefaultDraw: Boolean);
3586 if ListView.Items.Count = 0 then begin
3587 DefaultDraw := True;
3589 ListView.Canvas.Brush.Color := ListView.Color;
3590 ListView.Canvas.FillRect(ARect);
3594 ListView.Canvas.Font.Color := clWindowText;
3595 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3598 ListView.Canvas.Font.Color := clBlue;
3599 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';
3602 ListView.Canvas.Font.Color := clGreen;
3603 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\90V
\92\85\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3606 ListView.Canvas.Font.Color := clNavy;
3607 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';
3608 if GetActiveList is TBoard then
3609 s := Format(s, [TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText]);
3617 p := Point((ListView.ClientWidth div 2) - (ListView.Canvas.TextWidth(s) div 2),
3618 (ListView.ClientHeight div 2) - (ListView.Canvas.TextHeight(s) div 2));
3619 ListView.Canvas.TextOut(p.X, p.Y, s);
3621 DefaultDraw := True;
3625 procedure TGikoForm.DownloadList(Board: TBoard; ForceDownload: Boolean = False);
3627 Item: TDownloadItem;
3629 if not Board.IsThreadDatRead then
3630 GikoSys.ReadSubjectFile(Board);
3631 Item := TDownloadItem.Create;
3633 Item.Board := Board;
3634 Item.DownType := gdtBoard;
3635 Item.ForceDownload := ForceDownload;
3636 // AbortToolButton.Enabled := True;
3637 // Animate.Active := True;
3638 // FDownload.Add(Item);
3639 FControlThread.AddItem(Item);
3640 // Animate.Active := False;
3641 // AbortToolButton.Enabled := False;
3642 if FWorkCount = 0 then begin
3644 Animate.Active := True;
3647 Screen.Cursor := crAppStart;
3655 procedure TGikoForm.DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False);
3657 Item: TDownloadItem;
3659 Item := TDownloadItem.Create;
3661 Item.ThreadItem := ThreadItem;
3662 Item.DownType := gdtThread;
3663 Item.ForceDownload := ForceDownload;
3664 // AbortToolButton.Enabled := True;
3665 // Animate.Active := True;
3666 // FDownload.Add(Item);
3667 FControlThread.AddItem(Item);
3668 // Animate.Active := False;
3669 // AbortToolButton.Enabled := False;
3670 if FWorkCount = 0 then begin
3672 Animate.Active := True;
3675 Screen.Cursor := crAppStart;
3683 procedure TGikoForm.PlaySound(SoundEventName: string);
3687 FileName := GikoSys.Setting.FindSoundFileName(SoundEventName);
3688 if FileExists(FileName) then begin
3689 if not sndPlaySound(PChar(FileName), SND_ASYNC or SND_NOSTOP) then begin
3690 sndPlaySound(nil, SND_SYNC);
3691 Application.ProcessMessages;
3693 sndPlaySound(PChar(FileName), SND_ASYNC);
3698 function TGikoForm.AddHistory( favItem : TFavoriteThreadItem ): Boolean;
3701 Item: TFavoriteThreadItem;
3705 // if (GetActiveContent = ThreadItem) and
3706 // (ThreadItem.Count <= ThreadItem.Kokomade) then
3708 // if GetActiveContent = ThreadItem then
3712 if FTreeType = gttHistory then
3713 TreeView.Selected := nil;
3715 for i := 0 to FHistoryList.Count - 1 do begin
3716 if TObject(FHistoryList[i]) is TFavoriteThreadItem then begin
3717 Item := TFavoriteThreadItem(FHistoryList[i]);
3718 if Item.URL = favItem.URL then begin
3719 // SetContent(ThreadItem);
3720 FHistoryList.Move(i, 0);
3721 if FTreeType = gttHistory then
3722 if TreeView.TopItem <> TreeView.Items[ i ] then
3723 TreeView.Items[ i ].MoveTo( TreeView.TopItem, naInsert );
3730 if FHistoryList.Count > 0 then
3731 FHistoryList.Insert( 0, favItem )
3733 FHistoryList.Add( favItem );
3734 // SetContent(ThreadItem);
3736 if FTreeType = gttHistory then begin
3737 Node := TreeView.Items.Add( nil, favItem.Title );
3738 Node.MoveTo( TreeView.TopItem, naInsert );
3740 if favItem.NewArrival then begin
3741 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3742 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3744 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3745 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3748 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
3749 //
\81¦favItem.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
3750 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3751 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3752 Node.Data := favItem;
3756 procedure TGikoForm.DeleteHistory( threadItem: TThreadItem );
3760 for i := 0 to FHistoryList.Count - 1 do begin
3761 if threadItem.URL = TFavoriteThreadItem( FHistoryList.Items[i] ).URL then begin
3762 TFavoriteThreadItem( FHistoryList.Items[ i ] ).Free;
3763 FHistoryList.Delete(i);
3764 FHistoryList.Capacity := FHistoryList.Count;
3770 procedure TGikoForm.ClearHistory;
3774 //FHistoryList.Clear;
3777 for i := FHistoryList.Count - 1 downto 0 do begin
3778 if TObject(FHistoryList[ i ]) is TFavoriteThreadItem then
3779 TFavoriteThreadItem(FHistoryList[ i ]).Free
3780 else if TObject(FHistoryList[ i ]) is TFavoriteBoardItem then
3781 TFavoriteBoardItem(FHistoryList[ i ]).Free;
3783 //FHistoryList.Delete(i);
3789 FHistoryList.Capacity := FHistoryList.Count;
3793 procedure TGikoForm.SaveHistory;
3796 saveList : TstringList;
3799 saveList := TStringList.Create;
3802 FHistoryList.Capacity := FHistoryList.Count;
3803 saveList.Add('<?xml version="1.0" encoding="Shift_JIS" standalone="yes"?>');
3804 saveList.Add('<address>');
3805 bound := FHistoryList.Count - 1;
3806 for i := bound downto 0 do begin
3807 // title
\82Í
\8d¡
\82Ì
\82Æ
\82±
\82ë
\8eg
\82Á
\82Ä
\82¢
\82È
\82¢
3809 '<history url="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).URL ) + '"' +
3810 ' title="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).Title ) + '"/>');
3812 saveList.Add('</address>');
3813 saveList.SaveToFile( GikoSys.GetConfigDir + 'History.xml' );
3820 procedure TGikoForm.LoadHistory;
3824 XMLDoc : IXMLDocument;
3826 HistoryNode : IXMLNode;
3828 favItem : TFavoriteThreadItem;
3831 fileName := GikoSys.GetConfigDir + 'History.xml';
3833 if FileExists( fileName ) then begin
3835 XMLDoc := IXMLDocument.Create;
3836 //XMLDoc := LoadXMLDocument(FileName);
3837 LoadXMLDocument(FileName, XMLDoc);
3839 XMLNode := XMLDoc.DocumentElement;
3841 if XMLNode.NodeName = 'address' then begin
3842 bound := XMLNode.ChildNodes.Count - 1;
3843 for i := 0 to bound do begin
3844 HistoryNode := XMLNode.ChildNodes[i];
3845 if HistoryNode.NodeName = 'history' then begin
3846 //if FReadCount >= sl.Count then begin
3847 s := Trim(HistoryNode.Attributes['url']);
3848 if s <> '' then begin
3849 favItem := TFavoriteThreadItem.Create(
3850 s, HistoryNode.Attributes[ 'title' ] );
3851 if not AddHistory( favItem ) then
3867 procedure TGikoForm.ShowBBSTreeOld(
3875 FavoriteTreeView.Visible := False;
3876 FavoriteToolBar.Hide;
3877 TreeView.Visible := True;
3879 b := CabinetSelectPopupMenu.Items.Count - 1;
3880 for i := 0 to b do begin
3881 item := CabinetSelectPopupMenu.Items[ i ];
3882 if item is TBBSMenuItem then begin
3883 if TBBSMenuItem( item ).Data = inBBS then begin
3884 item.Checked := True;
3885 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
3886 CabinetMenu.Items[ i ].Checked := True;
3887 GikoSys.Setting.CabinetIndex := i;
3891 item.Checked := False;
3892 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
3893 CabinetMenu.Items[ i ].Checked := False;
3895 CabinetSelectToolButton.Caption := inBBS.Title;
3897 CabinetHistoryAction.Checked := False;
3898 CabinetFavoriteAction.Checked := False;
3900 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
3901 FTreeType := gtt2ch;
3902 HistoryToolBar.Hide;
3903 SetBoardTreeNode( inBBS );
3904 TreeView.TopItem.Expanded := True; //?c???[?g?b?v???????J??
3905 //?c???[??g?b?v?????I????
3906 if GetActiveList = nil then
3907 TreeView.Selected := TreeView.Items[0]
3909 for i := 0 to TreeView.Items.Count - 1 do begin
3910 if TreeView.Items[i].Data = GetActiveList then begin
3911 TreeView.Selected := TreeView.Items[i];
3915 TreeView.Selected := TreeView.Items[0]
3923 procedure TGikoForm.ShowBBSTree(
3932 FavoriteTreeView.Visible := False;
3933 FavoriteToolBar.Hide;
3934 TreeView.Visible := True;
3936 b := CabinetSelectPopupMenu.Items.Count - 1;
3937 for i := 0 to b do begin
3938 item := CabinetSelectPopupMenu.Items[ i ];
3939 if item is TBBSMenuItem then begin
3940 if TBBSMenuItem( item ).Data = inBBS then begin
3941 item.Checked := True;
3942 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3943 CabinetMenu.Items[ i ].Checked := True;
3944 GikoSys.Setting.CabinetIndex := i;
3948 item.Checked := False;
3949 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3950 CabinetMenu.Items[ i ].Checked := False;
3952 CabinetSelectToolButton.Caption := inBBS.Title;
3954 CabinetHistoryAction.Checked := False;
3955 CabinetFavoriteAction.Checked := False;
3957 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
3958 FTreeType := gtt2ch;
3959 HistoryToolBar.Hide;
3960 SetBoardTreeNode( inBBS );
3961 TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
3962 //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
3963 if GetActiveList = nil then begin
3965 TreeClick( TreeView.Items[0] );
3969 for i := 0 to TreeView.Items.Count - 1 do begin
3970 if TreeView.Items[i].Data = GetActiveList then begin
3971 TreeClick( TreeView.Items[i] );
3975 TreeClick( TreeView.Items[0] );
3983 procedure TGikoForm.ShowHistoryTree;
3988 if CabinetPanel.Visible then begin
3989 if FTreeType = gttHistory then begin
3990 CabinetVisible( False );
3991 CabinetHistoryAction.Checked := False;
3993 CabinetHistoryAction.Checked := True;
3996 CabinetVisible( True );
3997 CabinetHistoryAction.Checked := True;
4000 // BBS...BBS, History, Favorite
4001 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 2;
4003 FavoriteTreeView.Visible := False;
4004 TreeView.Visible := True;
4006 CabinetBBSAction.Checked := False;
4007 CabinetFavoriteAction.Checked := False;
4009 if FTreeType <> gttHistory then begin
4010 b := CabinetSelectPopupMenu.Items.Count - 1;
4011 for i := 0 to b do begin
4012 item := CabinetSelectPopupMenu.Items[ i ];
4013 if item is TBBSMenuItem then begin
4014 item.Checked := False;
4015 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
4016 CabinetMenu.Items[ i ].Checked := False;
4020 FTreeType := gttHistory;
4021 HistoryToolBar.Show;
4022 FavoriteToolBar.Hide;
4024 CabinetSelectToolButton.Caption := '
\97\9a\97ð
\83\8a\83X
\83g';
4028 procedure TGikoForm.SetHistoryTreeNode;
4032 Item: TFavoriteThreadItem;
4034 TreeView.Items.BeginUpdate;
4036 TreeView.Items.Clear;
4037 for i := 0 to FHistoryList.Count - 1 do begin
4038 Item := TFavoriteThreadItem(FHistoryList[i]);
4039 Node := TreeView.Items.Add(nil, Item.Title);
4041 if Item.Item.NewArrival then begin
4042 Node.ImageIndex := ITEM_ICON_THREADNEW1;
4043 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
4045 Node.ImageIndex := ITEM_ICON_THREADLOG1;
4046 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
4049 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
4050 //
\81¦Item.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
4051 Node.ImageIndex := ITEM_ICON_THREADLOG1;
4052 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
4056 TreeView.Items.EndUpdate;
4060 procedure TGikoForm.SelectTreeNode(Item: TObject; CallEvent: Boolean);
4062 ChangeEvent: TTVChangedEvent;
4063 ChangingEvent: TTVChangingEvent;
4067 if Item is TCategory then
4068 bbs := TCategory( Item ).ParenTBBS
4069 else if Item is TBoard then
4070 bbs := TBoard( Item ).ParentCategory.ParenTBBS
4074 if (FTreeType = gtt2ch) and (FActiveBBS = bbs) then begin
4076 ChangingEvent := nil;
4078 if not CallEvent then begin
4079 ChangeEvent := TreeView.OnChange;
4080 ChangingEvent := TreeView.OnChanging;
4083 if not CallEvent then begin
4084 TreeView.OnChange := nil;
4085 TreeView.OnChanging := nil;
4087 //Application.ProcessMessages;
4088 for i := 0 to TreeView.Items.Count - 1 do begin
4089 if TreeView.Items[i].Data = Item then begin
4090 TreeView.Items[i].Selected := True;
4092 TreeClick(TreeView.Items[i]);
4096 //Application.ProcessMessages;
4098 if not CallEvent then begin
4099 TreeView.OnChange := ChangeEvent;
4100 TreeView.OnChanging := ChangingEvent;
4104 if GetActiveList is TBBS then begin
4105 for i := 0 to ListView.Columns.Count - 1 do
4106 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
4107 end else if GetActiveList is TCategory then begin
4108 for i := 0 to ListView.Columns.Count - 1 do
4109 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
4110 end else if GetActiveList is TBoard then begin
4111 for i := 0 to ListView.Columns.Count - 1 do
4112 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
4115 if (Item is TBBS) or (Item is TCategory) then begin
4116 ListView.Columns.Clear;
4117 SetActiveList( Item );
4118 end else if Item is TBoard then begin
4119 if not TBoard( Item ).IsThreadDatRead then begin
4120 Screen.Cursor := crHourGlass;
4122 if not TBoard( Item ).IsThreadDatRead then
4123 GikoSys.ReadSubjectFile(TBoard( Item ));
4125 Screen.Cursor := crDefault;
4128 SetActiveList( Item );
4133 procedure TGikoForm.ListViewMouseDown(Sender: TObject;
4134 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
4136 listItem : TListItem;
4137 threadItem : TThreadItem;
4143 if not (GetActiveList is TBoard) then Exit;
4144 listItem := ListView.GetItemAt( X, Y );
4145 if listItem = nil then Exit;
4146 if not (TObject(listItem.Data) is TThreadItem) then Exit;
4148 threadItem := TThreadItem(ListItem.Data);
4149 InsertBrowserTab(threadItem, False);
4150 if threadItem.IsLogFile then
4151 ListView.UpdateItems(listItem.Index, listItem.Index);
4154 { if ssDouble in Shift then begin
4155 DoubleClickOccurred[Button] := True;
4157 DoubleClickOccurred[Button] := False;
4158 t := GetTickCount+GetDoubleClickTime;
4159 while GetTickCount < t do begin
4160 Application.ProcessMessages;
4161 if DoubleClickOccurred[Button] then
4166 if ssDouble in Shift then begin
4168 mbLeft: ListDoubleClick;
4181 procedure TGikoForm.ListClick;
4183 ListItem: TListItem;
4184 ThreadItem: TThreadItem;
4186 if ListView.SelCount <> 1 then Exit;
4187 ListItem := ListView.Selected;
4188 if ListItem = nil then Exit;
4189 if not (TObject(ListItem.Data) is TThreadItem) then Exit;
4191 ThreadItem := TThreadItem(ListItem.Data);
4192 if ThreadItem.IsLogFile then begin
4193 // if AddHistory(ThreadItem) then
4194 // SetContent(ThreadItem);
4195 InsertBrowserTab(ThreadItem);
4196 ListView.UpdateItems(ListItem.Index, ListItem.Index);
4198 // SetContent(ThreadItem);
4199 InsertBrowserTab(ThreadItem);
4202 if ListView.Selected = nil then
4204 if ListView.Selected.Data = nil then
4206 if TThreadItem( ListView.Selected.Data ).IsLogFile then begin
4207 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4208 if GikoSys.Setting.ListWidthState = glsMin then begin
4209 BrowserMaxAction.Execute;
4210 if GikoForm.Visible then
4214 if GikoSys.Setting.ListHeightState = glsMin then begin
4215 BrowserMaxAction.Execute;
4216 if GikoForm.Visible then
4223 procedure TGikoForm.ListDoubleClick(Shift: TShiftState);
4225 ThreadItem: TThreadItem;
4228 shiftDown := (ssShift in Shift);
4230 if ListView.Selected = nil then Exit;
4232 if TObject(ListView.Selected.Data) is TCategory then begin
4233 SelectTreeNode(ListView.Selected.Data, True);
4234 // TreeView.Selected.Expanded := True;
4235 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4236 //TreeViewChange(nil, TreeView.Selected);
4237 end else if TObject(ListView.Selected.Data) is TBoard then begin
4238 SelectTreeNode(ListView.Selected.Data, True);
4239 // TreeView.Selected.Expanded := True;
4240 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4241 //TreeViewChange(nil, TreeView.Selected);
4242 end else if TObject(ListView.Selected.Data) is TThreadItem then begin
4243 //if TObject(ListView.Selected.Data) is TThreadItem then begin
4244 Application.ProcessMessages;
4245 ThreadItem := TThreadItem(ListView.Selected.Data);
4246 DownloadContent(ThreadItem, shiftDown);
4250 procedure TGikoForm.BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord);
4255 activeBrower :TWebBrowser;
4257 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
4259 while (BrowserRecord.Browser.ReadyState <> READYSTATE_COMPLETE) and
4260 (BrowserRecord.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4261 Application.ProcessMessages;
4264 // Access Violation
\82ª
\8bN
\82«
\82é
\8e\96\82ª
\82 \82é
\82Ì
\82Å
\8d¡
\8cã
\97v
\83`
\83F
\83b
\83N
4265 if(BrowserRecord <> nil) and (BrowserRecord.FBrowser <> nil) then begin
4266 activeBrower := BrowserRecord.FBrowser;
4270 item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
4272 top := top + item.offsetTop;
4273 item := item.offsetParent;
4274 until AnsiCompareText(item.tagName, 'body' ) = 0;
4276 OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
4282 procedure TGikoForm.BrowserMovement(const AName: string);
4287 activeBrower :TWebBrowser;
4289 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
4291 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
4292 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4293 Application.ProcessMessages;
4296 // Access Violation
\82ª
\8bN
\82«
\82é
\8e\96\82ª
\82 \82é
\82Ì
\82Å
\8d¡
\8cã
\97v
\83`
\83F
\83b
\83N
4297 if(BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex >= 0) then begin
4298 activeBrower := FActiveContent.Browser;
4302 item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
4304 top := top + item.offsetTop;
4305 item := item.offsetParent;
4306 until AnsiCompareText(item.tagName, 'body' ) = 0;
4308 OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
4314 procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
4316 if TObject(Node.Data) is TBBS then begin
4317 TBBS(Node.Data).NodeExpand := False;
4318 end else if TObject(Node.Data) is TCategory then begin
4319 TCategory(Node.Data).NodeExpand := False;
4320 end else if TObject(Node.Data) is TBoard then begin
4321 TBoard(Node.Data).NodeExpand := False;
4325 procedure TGikoForm.MessageListViewResize(Sender: TObject);
4327 // MessageListView.Column[0].Width := MessageListView.ClientWidth - 16;
4330 procedure TGikoForm.SelectListItem(List: TList);
4332 // TmpTreeNode: TTreeNode;
4333 TmpListItem: TListItem;
4336 TmpListItem := ListView.Selected;
4337 while TmpListItem <> nil do begin
4338 List.Add(TmpListItem.Data);
4339 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
4344 procedure TGikoForm.ExitActionExecute(Sender: TObject);
4349 procedure TGikoForm.AllSelectActionExecute(Sender: TObject);
4354 procedure TGikoForm.StdToolBarVisibleActionExecute(Sender: TObject);
4356 CoolBand: TCoolBand;
4358 CoolBand := GetCoolBand(MainCoolBar, StdToolBar);
4359 if CoolBand = nil then
4361 GikoSys.Setting.StdToolBarVisible := StdToolBarVisibleAction.Checked;
4362 CoolBand.Visible := GikoSys.Setting.StdToolBarVisible;
4363 // StdToolBar.Visible := StdToolBarVisibleAction.Checked;
4364 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4366 //StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
4367 StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible;
4370 procedure TGikoForm.AddressBarVisibleActionExecute(Sender: TObject);
4372 CoolBand: TCoolBand;
4374 CoolBand := GetCoolBand(MainCoolBar, AddressToolBar);
4375 if CoolBand = nil then
4377 GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked;
4378 CoolBand.Visible := GikoSys.Setting.AddressBarVisible;
4379 //AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
4380 AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible;
4383 procedure TGikoForm.LinkBarVisibleActionExecute(Sender: TObject);
4385 CoolBand: TCoolBand;
4387 CoolBand := GetCoolBand(MainCoolBar, LinkToolBar);
4388 if CoolBand = nil then
4390 GikoSys.Setting.LinkBarVisible := LinkBarVisibleAction.Checked;
4391 CoolBand.Visible := GikoSys.Setting.LinkBarVisible;
4392 //LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
4393 LinkToolBarVisiblePMenu.Checked := GikoSys.Setting.LinkBarVisible;
4396 procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);
4398 CoolBand: TCoolBand;
4400 CoolBand := GetCoolBand(ListCoolBar, ListToolBar);
4401 if CoolBand = nil then
4403 CoolBand.Visible := ListToolBarVisibleAction.Checked;
4404 // ListToolBar.Visible := ListToolBarVisibleAction.Checked;
4405 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4406 GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;
4409 procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);
4411 CoolBand: TCoolBand;
4413 CoolBand := GetCoolBand(ListCoolBar, ListNameToolBar);
4414 if CoolBand = nil then
4416 CoolBand.Visible := ListNameBarVisibleAction.Checked;
4417 GikoSys.Setting.ListNameBarVisible := ListNameBarVisibleAction.Checked;
4420 procedure TGikoForm.BrowserToolBarVisibleActionExecute(Sender: TObject);
4422 CoolBand: TCoolBand;
4424 CoolBand := GetCoolBand(BrowserCoolBar, BrowserToolBar);
4425 if CoolBand = nil then
4427 CoolBand.Visible := BrowserToolBarVisibleAction.Checked;
4428 // BrowserToolBar.Visible := BrowserToolBarVisibleAction.Checked;
4429 GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;
4432 procedure TGikoForm.BrowserNameBarVisibleActionExecute(Sender: TObject);
4434 CoolBand: TCoolBand;
4436 CoolBand := GetCoolBand(BrowserCoolBar, BrowserNameToolBar);
4437 if CoolBand = nil then
4439 CoolBand.Visible := BrowserNameBarVisibleAction.Checked;
4440 GikoSys.Setting.BrowserNameBarVisible := BrowserNameBarVisibleAction.Checked;
4443 procedure TGikoForm.MsgBarVisibleActionExecute(Sender: TObject);
4445 MessageSplitter.Visible := MsgBarVisibleAction.Checked;
4446 MessagePanel.Top := MessageSplitter.Top + MessageSplitter.Height;
4447 MessageSplitter.Top := MessagePanel.Top + 1;
4448 MessagePanel.Visible := MsgBarVisibleAction.Checked;
4449 GikoSys.Setting.MessageBarVisible := MsgBarVisibleAction.Checked;
4452 procedure TGikoForm.StatusBarVisibleActionExecute(Sender: TObject);
4454 StatusBar.Visible := StatusBarVisibleAction.Checked;
4455 GikoSys.Setting.StatusBarVisible := StatusBarVisibleAction.Checked;
4458 procedure TGikoForm.IconStyleExecute(Sender: TObject);
4460 case ListView.ViewStyle of
4461 vsIcon: SmallIconAction.Execute;
4462 vsSmallIcon: ListIconAction.Execute;
4463 vsList: DetailIconAction.Execute;
4464 vsReport: LargeIconAction.Execute;
4468 procedure TGikoForm.LargeIconActionExecute(Sender: TObject);
4470 ListView.ViewStyle := vsIcon;
4471 LargeIconAction.Checked := True;
4474 procedure TGikoForm.SmallIconActionExecute(Sender: TObject);
4476 ListView.ViewStyle := vsSmallIcon;
4477 SmallIconAction.Checked := True;
4480 procedure TGikoForm.ListIconActionExecute(Sender: TObject);
4482 ListView.ViewStyle := vsList;
4483 ListIconAction.Checked := True;
4486 procedure TGikoForm.DetailIconActionExecute(Sender: TObject);
4488 ListView.ViewStyle := vsReport;
4489 DetailIconAction.Checked := True;
4492 procedure TGikoForm.SearchActionExecute(Sender: TObject);
4497 if FSearchDialog = nil then begin
4498 if (GikoForm.GetActiveList is TCategory) or (GikoForm.GetActiveList is TBoard) then
4499 chk := GikoForm.GetActiveList
4503 FSearchDialog := TSearchDialog.Create(Self, chk);
4504 FSearchDialog.SearchComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
4514 procedure TGikoForm.OptionActionExecute(Sender: TObject);
4518 Dlg := TOptionDialog.Create(Self);
4526 procedure TGikoForm.GikoNaviWebPageActionExecute(Sender: TObject);
4528 URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
4530 GikoSys.OpenBrowser(URL_GIKONAVI, gbtAuto);
4533 procedure TGikoForm.MonazillaWebPageActionExecute(Sender: TObject);
4535 URL_MONAZILLA: string = 'http://www.monazilla.org/';
4537 GikoSys.OpenBrowser(URL_MONAZILLA, gbtAuto);
4540 procedure TGikoForm.BBS2chWebPageActionExecute(Sender: TObject);
4542 URL_2ch: string = 'http://www.2ch.net/';
4544 GikoSys.OpenBrowser(URL_2ch, gbtAuto);
4547 procedure TGikoForm.GikoFolderOpenActionExecute(Sender: TObject);
4549 // GikoSys.OpenBrowser(GikoSys.GetAppDir, gbtIE);
4550 GikoSys.CreateProcess('explorer.exe', '/e,"' + GikoSys.GetAppDir + '"');
4553 procedure TGikoForm.AboutActionExecute(Sender: TObject);
4557 Dlg := TAboutDialog.Create(Self);
4565 procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject);
4570 procedure TGikoForm.CabinetVisible( isVisible : Boolean );
4572 TreeSplitter.Visible := isVisible;
4573 CabinetPanel.Visible := isVisible;
4574 CabinetVisibleAction.Checked := isVisible;
4577 procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject);
4580 gttHistory: CabinetHistoryAction.Execute;
4581 gttFavorite: CabinetFavoriteAction.Execute;
4583 CabinetBBSAction.Execute;
4587 procedure TGikoForm.AllItemActionExecute(Sender: TObject);
4590 if ViewType <> gvtAll then
4591 SetListViewType(gvtAll);
4592 AllItemAction.Checked := True;
4593 LogItemAction.Checked := False;
4594 NewItemAction.Checked := False;
4595 //SelectItemAction.Checked := False;
4596 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4598 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4599 if SelectComboBox.Parent <> nil then begin
4600 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4601 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4608 procedure TGikoForm.LogItemActionExecute(Sender: TObject);
4611 if ViewType <> gvtLog then
4612 SetListViewType(gvtLog);
4613 AllItemAction.Checked := False;
4614 LogItemAction.Checked := True;
4615 NewItemAction.Checked := False;
4616 //SelectItemAction.Checked := False;
4617 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4619 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4620 if SelectComboBox.Parent <> nil then begin
4621 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4622 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4629 procedure TGikoForm.NewItemActionExecute(Sender: TObject);
4633 if ViewType <> gvtNew then
4634 SetListViewType(gvtNew);
4635 AllItemAction.Checked := False;
4636 LogItemAction.Checked := False;
4637 NewItemAction.Checked := True;
4638 //SelectItemAction.Checked := False;
4639 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4641 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4642 if SelectComboBox.Parent <> nil then begin
4643 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4644 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4651 procedure TGikoForm.SelectItemActionExecute(Sender: TObject);
4654 Dlg: TListSelectDialog;
4657 if SelectComboBox.Parent <> nil then begin
4658 if SelectComboBox.Left + SelectComboBox.Width < ListToolBar.Width then begin
4659 // SelectComboBox
\82ª
\82 \82é
\8fê
\8d\87\82Í
\83t
\83H
\81[
\83J
\83X
\82ð
\88Ú
\82·
4660 SelectComboBox.SetFocus;
4667 if SelectComboBox.Text = SELECTCOMBOBOX_NAME then begin
4668 SelectComboBox.Text := '';
4669 SelectComboBox.Color := clWindow;
4672 AllItemAction.Checked := False;
4673 LogItemAction.Checked := False;
4674 NewItemAction.Checked := False;
4675 //SelectItemAction.Checked := True;
4677 Dlg := TListSelectDialog.Create(Self);
4679 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
4680 Dlg.SelectComboBox.Text := SelectComboBox.Text;
4682 if Dlg.ModalResult = mrCancel then begin
4683 if Length( SelectComboBox.Text ) = 0 then begin
4684 AllItemAction.Checked := True;
4685 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4686 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4689 if GetActiveList is TBoard then
4690 SetListViewType(gvtUser, TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText , Dlg.KubetsuCheckBox.Checked);
4692 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
4694 GikoSys.Setting.SelectTextList.Delete(idx);
4695 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
4696 while Dlg.SelectComboBox.Items.Count > 100 do begin
4697 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
4700 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
4701 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4702 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4704 SelectComboBox.Text := Dlg.SelectComboBox.Text;
4705 SelectComboBox.Color := clWindow;
4707 SetListViewType(gvtUser, Dlg.SelectComboBox.Text, Dlg.KubetsuCheckBox.Checked);
4714 procedure TGikoForm.ListNumberVisibleActionExecute(Sender: TObject);
4716 GikoSys.Setting.ListViewNo := ListNumberVisibleAction.Checked;
4720 procedure TGikoForm.UpFolderActionExecute(Sender: TObject);
4722 if GetActiveList is TBoard then begin
4723 // if FTreeType = gtt2ch then
4724 SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
4725 //SetActiveList(TBoard(GetActiveList).ParentCategory);
4726 end else if GetActiveList is TCategory then begin
4727 // if FTreeType = gtt2ch then
4728 SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);
4729 //SetActiveList(TCategory(GetActiveList).ParenTBBS);
4731 // if TreeView.Selected = nil then Exit;
4732 // if TreeView.Selected.Level = 0 then Exit;
4733 // TreeView.Selected.Parent.Selected := True;
4736 procedure TGikoForm.RoundActionExecute(Sender: TObject);
4740 Dlg := TRoundDialog.Create(Self);
4748 procedure TGikoForm.StopActionExecute(Sender: TObject);
4750 FControlThread.DownloadAbort;
4751 if FWorkCount <> 0 then FWorkCount := 0;
4753 Animate.Active := False;
4756 Screen.Cursor := crDefault;
4759 procedure TGikoForm.MsgBarCloseActionExecute(Sender: TObject);
4761 // MessagePanel.Visible := False;
4762 // MessageSplitter.Visible := False;
4763 // MsgBarVisibleAction.Checked := False;
4764 MsgBarVisibleAction.Execute;
4767 procedure TGikoForm.BrowserMaxActionExecute(Sender: TObject);
4769 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4770 case GikoSys.Setting.ListWidthState of
4772 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4773 ViewPanel.Width := FBrowserSizeWidth;
4774 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4775 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4776 GikoSys.Setting.ListWidthState := glsNormal;
4778 glsMin, glsNormal: begin
4779 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4780 if GikoSys.Setting.ListWidthState = glsNormal then
4781 FBrowserSizeWidth := ViewPanel.Width;
4782 ViewPanel.Width := 1;
4783 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4784 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4785 GikoSys.Setting.ListWidthState := glsMax;
4789 case GikoSys.Setting.ListHeightState of
4791 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4792 ViewPanel.Height := FBrowserSizeHeight;
4793 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4794 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4795 GikoSys.Setting.ListHeightState := glsNormal;
4797 glsMin, glsNormal: begin
4798 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4799 if GikoSys.Setting.ListHeightState = glsNormal then
4800 FBrowserSizeHeight := ViewPanel.Height;
4801 ViewPanel.Height := 1;
4802 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4803 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4804 GikoSys.Setting.ListHeightState := glsMax;
4808 // Mouse.CursorPos := BrowserSizeButton.ClientToScreen(Point(
4809 // System.Round(BrowserToolBar.ButtonWidth div 2),
4810 // System.Round(BrowserToolBar.ButtonHeight div 2)));
4811 BrowserTab.OnChange(nil);
4814 procedure TGikoForm.BrowserMinActionExecute(Sender: TObject);
4816 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4817 case GikoSys.Setting.ListWidthState of
4818 glsMax, glsNormal: begin
4819 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4820 if GikoSys.Setting.ListWidthState = glsNormal then
4821 FBrowserSizeWidth := ViewPanel.Width;
4822 ViewPanel.Width := ThreadMainPanel.Width - 80;
4823 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4824 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4825 GikoSys.Setting.ListWidthState := glsMin;
4828 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4829 ViewPanel.Width := FBrowserSizeWidth;
4830 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4831 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4832 GikoSys.Setting.ListWidthState := glsNormal;
4836 case GikoSys.Setting.ListHeightState of
4837 glsMax, glsNormal: begin
4838 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4839 if GikoSys.Setting.ListHeightState = glsNormal then
4840 FBrowserSizeHeight := ViewPanel.Height;
4841 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
4842 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4843 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4844 GikoSys.Setting.ListHeightState := glsMin;
4847 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4848 ViewPanel.Height := FBrowserSizeHeight;
4849 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4850 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4851 GikoSys.Setting.ListHeightState := glsNormal;
4857 procedure TGikoForm.ScrollTopActionExecute(Sender: TObject);
4859 BrowserMovement('top');
4862 procedure TGikoForm.ScrollLastActionExecute(Sender: TObject);
4864 BrowserMovement('bottom');
4867 procedure TGikoForm.ScrollNewActionExecute(Sender: TObject);
4869 BrowserMovement('new');
4872 procedure TGikoForm.ScrollKokoActionExecute(Sender: TObject);
4874 BrowserMovement('koko');
4877 procedure TGikoForm.EditorActionExecute(Sender: TObject);
4879 Editor: TEditorForm;
4883 Item := GetActiveContent;
4884 if Item = nil then Exit;
4886 if Item.Count >= 1000 then begin
4887 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
4888 + '
\90V
\83X
\83\8c\83b
\83h
\82ð
\92T
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
4889 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin
4893 Editor := TEditorForm.Create(Self);
4894 Editor.SetThreadItem(Item);
4895 GikoSys.LoadEditorKeySetting(Editor.ActionList);
4897 Editor.BodyEdit.SetFocus;
4900 procedure TGikoForm.IEActionExecute(Sender: TObject);
4902 ShowThreadAction.Execute;
4905 procedure TGikoForm.ShowThreadActionExecute(Sender: TObject);
4907 ThreadItem: TThreadItem;
4909 ThreadItem := GetActiveContent;
4910 if ThreadItem = nil then Exit;
4911 GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
4914 procedure TGikoForm.ShowBoardActionExecute(Sender: TObject);
4916 ThreadItem: TThreadItem;
4918 ThreadItem := GetActiveContent;
4919 if ThreadItem = nil then Exit;
4920 GikoSys.OpenBrowser(ThreadItem.ParentBoard.URL, gbtAuto);
4923 //(Thread)URL
\82ð
\83R
\83s
\81[
4924 procedure TGikoForm.URLCopyActionExecute(Sender: TObject);
4929 if TObject(GetActiveContent) is TBoard then
4930 s := s + TBoard(GetActiveContent).URL + #13#10
4931 else if TObject(GetActiveContent) is TThreadItem then
4932 s := s + TThreadItem(GetActiveContent).URL + #13#10;
4934 Clipboard.AsText := s;
4937 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ð
\83R
\83s
\81[
4938 procedure TGikoForm.NameCopyActionExecute(Sender: TObject);
4943 if TObject(GetActiveContent) is TBoard then
4944 s := s + TBoard(GetActiveContent).Title + #13#10
4945 else if TObject(GetActiveContent) is TThreadItem then
4946 s := s + TThreadItem(GetActiveContent).Title + #13#10;
4948 Clipboard.AsText := s;
4951 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ÆURL
\82ð
\83R
\83s
\81[
4952 procedure TGikoForm.NameURLCopyActionExecute(Sender: TObject);
4957 if TObject(GetActiveContent) is TBoard then
4958 s := s + TBoard(GetActiveContent).Title + #13#10 + TBoard(GetActiveContent).URL + #13#10
4959 else if TObject(GetActiveContent) is TThreadItem then
4960 s := s + TThreadItem(GetActiveContent).Title + #13#10 + TThreadItem(GetActiveContent).URL + #13#10;
4962 Clipboard.AsText := s;
4965 procedure TGikoForm.ItemReloadActionExecute(Sender: TObject);
4967 ThreadItem: TThreadItem;
4970 ThreadItem := GetActiveContent;
4971 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
4972 if ThreadItem <> nil then
4973 DownloadContent(ThreadItem, shiftDown);
4976 procedure TGikoForm.SelectListReloadActionExecute(Sender: TObject);
4983 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
4984 if GetActiveList is TCategory then begin
4985 List := TList.Create;
4987 SelectListItem(List);
4988 if List.Count > 5 then begin
4989 msg := '5
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
4990 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
4991 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
4994 for i := 0 to List.Count - 1 do begin
4995 if TObject(List[i]) is TBoard then
4996 DownloadList(TBoard(List[i]), shiftDown);
5001 end else if GetActiveList is TBoard then begin
5002 DownloadList(TBoard(GetActiveList), shiftDown);
5006 procedure TGikoForm.SelectThreadReloadActionExecute(Sender: TObject);
5013 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5014 List := TList.Create;
5016 SelectListItem(List);
5017 if List.Count > 10 then begin
5018 msg := '10
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
5019 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
5020 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
5023 for i := 0 to List.Count - 1 do begin
5024 if TObject(List[i]) is TThreadItem then
5025 DownloadContent(TThreadItem(List[i]), shiftDown);
5032 procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);
5034 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
5035 SelectListReloadAction.Enabled := True
5036 else if GetActiveList is TBoard then
5037 SelectListReloadAction.Enabled := True
5039 SelectListReloadAction.Enabled := False;
5042 procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);
5044 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5045 SelectThreadReloadAction.Enabled := True
5047 SelectThreadReloadAction.Enabled := False;
5050 procedure TGikoForm.AllItemActionUpdate(Sender: TObject);
5052 AllItemAction.Enabled := (GetActiveList is TBoard);
5055 procedure TGikoForm.LogItemActionUpdate(Sender: TObject);
5057 LogItemAction.Enabled := (GetActiveList is TBoard);
5060 procedure TGikoForm.NewItemActionUpdate(Sender: TObject);
5062 NewItemAction.Enabled := (GetActiveList is TBoard);
5065 procedure TGikoForm.SelectItemActionUpdate(Sender: TObject);
5067 SelectItemAction.Enabled := (GetActiveList is TBoard);
5070 procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
5072 UpFolderAction.Enabled := not (GetActiveList is TBBS);
5075 procedure TGikoForm.ThreadEditorActionUpdate(Sender: TObject);
5077 ThreadEditorAction.Enabled := (GetActiveList is TBoard);
5080 procedure TGikoForm.FormResize(Sender: TObject);
5084 MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
5085 MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
5087 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5088 if GikoSys.Setting.ListWidthState = glsMin then begin
5089 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5090 ViewPanel.Width := ThreadMainPanel.Width - 80;
5093 if GikoSys.Setting.ListHeightState = glsMin then begin
5094 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
5095 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
5099 if FIsMinimize = mtMinimized then begin
5100 if FActiveContent <> nil then begin
5101 Application.ProcessMessages;
5102 doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
5103 doc.Body.ScrollTop := FActiveContent.Thread.ScrollTop;
5104 FIsMinimize := mtNone;
5108 FIsIgnoreResize := True;
5109 PostMessage( Handle, USER_RESIZED, 0, 0 );
5112 procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject);
5114 ScrollTopAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5117 procedure TGikoForm.ScrollLastActionUpdate(Sender: TObject);
5119 ScrollLastAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5122 procedure TGikoForm.ScrollNewActionUpdate(Sender: TObject);
5124 ScrollNewAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
5127 procedure TGikoForm.ScrollKokoActionUpdate(Sender: TObject);
5129 ScrollKokoAction.Enabled := (GetActiveContent <> nil)
5130 and (GetActiveContent.IsLogFile)
5131 and (GetActiveContent.Kokomade <> -1);
5135 procedure TGikoForm.EditorActionUpdate(Sender: TObject);
5137 EditorAction.Enabled := GetActiveContent <> nil;
5140 procedure TGikoForm.IEActionUpdate(Sender: TObject);
5142 IEAction.Enabled := GetActiveContent <> nil;
5145 procedure TGikoForm.ShowThreadActionUpdate(Sender: TObject);
5147 ShowThreadAction.Enabled := GetActiveContent <> nil;
5150 procedure TGikoForm.ShowBoardActionUpdate(Sender: TObject);
5152 ShowBoardAction.Enabled := GetActiveContent <> nil;
5155 procedure TGikoForm.ItemReloadActionUpdate(Sender: TObject);
5157 ItemReloadAction.Enabled := GetActiveContent <> nil;
5160 procedure TGikoForm.URLCopyActionUpdate(Sender: TObject);
5162 URLCopyAction.Enabled := GetActiveContent <> nil;
5165 procedure TGikoForm.NameCopyActionUpdate(Sender: TObject);
5167 NameCopyAction.Enabled := GetActiveContent <> nil;
5170 procedure TGikoForm.NameURLCopyActionUpdate(Sender: TObject);
5172 NameURLCopyAction.Enabled := GetActiveContent <> nil;
5175 procedure TGikoForm.BrowserTabCloseActionUpdate(Sender: TObject);
5177 BrowserTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 0);
5180 procedure TGikoForm.NotSelectTabCloseActionUpdate(Sender: TObject);
5182 NotSelectTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 1);
5185 procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
5187 AllTabCloseAction.Enabled := (BrowserTab.Tabs.Count > 0);
5190 procedure TGikoForm.ActiveLogDeleteActionUpdate(Sender: TObject);
5192 ActiveLogDeleteAction.Enabled := GetActiveContent <> nil;
5195 procedure TGikoForm.ListViewDblClick(Sender: TObject);
5200 if GetAsyncKeyState(VK_SHIFT) = Smallint($8001) then
5201 Include(shift, ssShift);
5202 if GetAsyncKeyState(VK_CONTROL) = Smallint($8001) then
5203 Include(shift, ssCtrl);
5204 if GetAsyncKeyState(VK_MENU) = Smallint($8001) then
5205 Include(shift, ssAlt);
5207 ListDoubleClick(shift);
5210 procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
5212 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';
5213 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
5215 ThreadItem: TThreadItem;
5216 TmpListItem: TListItem;
5220 List := TList.Create;
5222 TmpListItem := ListView.Selected;
5223 while TmpListItem <> nil do begin
5224 if TObject(TmpListItem.Data) is TThreadItem then begin
5225 ThreadItem := TThreadItem(TmpListItem.Data);
5226 if ThreadItem.IsLogFile then
5227 List.Add(ThreadItem);
5229 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
5232 if GikoSys.Setting.DeleteMsg and (List.Count > 0) then begin
5233 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
5237 for i := 0 to List.Count - 1 do begin
5238 ThreadItem := TThreadItem(List[i]);
5239 DeleteHistory(ThreadItem);
5240 DeleteTab(ThreadItem);
5241 ThreadItem.DeleteLogFile;
5248 procedure TGikoForm.DeleteTab(BrowserRecord: TBrowserRecord);
5253 idx := BrowserTab.TabIndex;
5254 FTabHintIndex := -1;
5255 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5256 if TBrowserRecord(BrowserTab.Tabs.Objects[i]) = BrowserRecord then begin
5257 BrowserTab.Tabs.BeginUpdate;
5259 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5260 doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
5261 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
5264 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
5266 if( FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i]) ) then
5267 FActiveContent := nil;
5268 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5269 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
5271 FBrowsers.Move(j, 4);
5273 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5274 BrowserTab.Tabs.Delete(i);
5275 if idx > (BrowserTab.Tabs.Count - 1) then
5276 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1
5278 BrowserTab.TabIndex := idx;
5279 if BrowserTab.Tabs.Count = 0 then begin
5280 BrowserNullTab.Thread := nil;
5282 if(BrowserTab.TabIndex <> -1) and
5283 ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
5284 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
5285 if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
5286 = TWebBrowser(FBrowsers[4]) )then
5288 TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser := nil;
5289 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
5290 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
5291 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
5296 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
5297 := TWebBrowser(FBrowsers[4]);
5298 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
5299 FBrowsers.Move(4, 0);
5301 BrowserTab.Tabs.EndUpdate;
5302 BrowserTab.OnChange(nil);
5307 procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
5312 idx := BrowserTab.TabIndex;
5313 FTabHintIndex := -1;
5314 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5315 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
5316 BrowserTab.Tabs.BeginUpdate;
5318 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5319 doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
5320 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := doc.Body.ScrollTop;
5323 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.ScrollTop := 0;
5325 if(FActiveContent = TBrowserRecord(BrowserTab.Tabs.Objects[i])) then
5326 FActiveContent := nil;
5327 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
5328 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser);
5330 FBrowsers.Move(j, 4);
5332 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5333 BrowserTab.Tabs.Delete(i);
5334 if idx > (BrowserTab.Tabs.Count - 1) then
5335 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1
5337 BrowserTab.TabIndex := idx;
5338 if BrowserTab.Tabs.Count = 0 then begin
5339 BrowserNullTab.Thread := nil;
5341 if(BrowserTab.TabIndex <> -1) and
5342 ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
5343 for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
5344 if(TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser
5345 = TWebBrowser(FBrowsers[4]) )then
5347 TBrowserRecord(BrowserTab.Tabs.Objects[j]).Browser := nil;
5348 if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin
5349 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free;
5350 TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil;
5355 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser
5356 := TWebBrowser(FBrowsers[4]);
5357 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
5358 FBrowsers.Move(4, 0);
5361 BrowserTab.Tabs.EndUpdate;
5362 BrowserTab.OnChange(nil);
5368 procedure TGikoForm.KokomadeActionExecute(Sender: TObject);
5371 ThreadItem: TThreadItem;
5373 No := KokoPopupMenu.Tag;
5374 if No = 0 then Exit;
5375 ThreadItem := GetActiveContent;
5376 if ThreadItem = nil then Exit;
5377 ThreadItem.Kokomade := No;
5378 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
5379 FActiveContent.FRepaint := true;
5380 InsertBrowserTab(FActiveContent.Thread, true);
5381 Application.ProcessMessages;
5384 procedure TGikoForm.ZenbuActionExecute(Sender: TObject);
5386 ThreadItem: TThreadItem;
5388 ThreadItem := GetActiveContent;
5389 if ThreadItem = nil then Exit;
5390 ThreadItem.Kokomade := -1;
5391 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
5392 FActiveContent.FRepaint := true;
5393 InsertBrowserTab(FActiveContent.Thread, true);
5394 Application.ProcessMessages;
5397 function TGikoForm.Hook(var Message: TMessage): Boolean;
5406 procedure TGikoForm.KokoResActionExecute(Sender: TObject);
5408 Editor: TEditorForm;
5413 Number := KokoPopupMenu.Tag;
5414 if Number = 0 then Exit;
5415 Item := GetActiveContent;
5416 if Item = nil then Exit;
5418 if Item.Count >= 1000 then begin
5419 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
5420 + '
\90V
\83X
\83\8c\83b
\83h
\82ð
\92T
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
5421 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin
5425 Editor := TEditorForm.Create(Self);
5426 Editor.SetThreadItem(Item);
5427 Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
5429 Editor.BodyEdit.SetFocus;
5432 procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
5434 ItemRoundPMenu.Visible := (GetActiveList is TBoard);
5435 ItemReservPMenu.Visible := (GetActiveList is TBoard);
5436 LPMSep01.Visible := (GetActiveList is TBoard);
5437 ListRoundPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5438 ListReservPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5439 LPMSep02.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5440 KidokuPMenu.Visible := (GetActiveList is TBoard);
5441 MidokuPMenu.Visible := (GetActiveList is TBoard);
5442 UrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5443 NameUrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5444 AllSelectPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5445 LPMSep05.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5446 DeletePMenu.Visible := (GetActiveList is TBoard);
5447 LPMSep06.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5449 BoardFavoriteAddMenu.Visible := (GetActiveList is TCategory);
5450 ThreadFavoriteAddMenu.Visible := (GetActiveList is TBoard);
5452 AddRoundNameMenu(ItemReservPMenu);
5453 AddRoundNameMenu(ListReservPMenu);
5456 procedure TGikoForm.BoardIEActionExecute(Sender: TObject);
5460 if GetActiveList is TBoard then begin
5461 URL := TBoard(GetActiveList).URL;
5462 GikoSys.OpenBrowser(URL, gbtAuto);
5466 procedure TGikoForm.SelectItemURLCopyActionExecute(Sender: TObject);
5473 List := TList.Create;
5475 SelectListItem(List);
5476 for i := 0 to List.Count - 1 do begin
5477 if TObject(List[i]) is TBoard then
5478 s := s + TBoard(List[i]).URL + #13#10
5479 else if TObject(List[i]) is TThreadItem then
5480 s := s + TThreadItem(List[i]).URL + #13#10;
5483 Clipboard.AsText := s;
5489 procedure TGikoForm.SelectItemNameCopyActionExecute(Sender: TObject);
5496 List := TList.Create;
5498 SelectListItem(List);
5499 for i := 0 to List.Count - 1 do begin
5500 if TObject(List[i]) is TBoard then
5501 s := s + TBoard(List[i]).Title + #13#10
5502 else if TObject(List[i]) is TThreadItem then
5503 s := s + TThreadItem(List[i]).Title + #13#10;
5506 Clipboard.AsText := s;
5512 procedure TGikoForm.SelectItemNameURLCopyActionExecute(Sender: TObject);
5519 List := TList.Create;
5521 SelectListItem(List);
5522 for i := 0 to List.Count - 1 do begin
5523 if TObject(List[i]) is TBoard then
5524 s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10
5525 else if TObject(List[i]) is TThreadItem then
5526 s := s + TThreadItem(List[i]).Title + #13#10 + TThreadItem(List[i]).URL + #13#10;
5529 Clipboard.AsText := s;
5535 procedure TGikoForm.BoardIEActionUpdate(Sender: TObject);
5537 if GetActiveList is TBoard then
5538 BoardIEAction.Enabled := True
5540 BoardIEAction.Enabled := False;
5543 procedure TGikoForm.SelectItemURLCopyActionUpdate(Sender: TObject);
5545 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5546 SelectItemURLCopyAction.Enabled := True
5548 SelectItemURLCopyAction.Enabled := False;
5551 procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
5553 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5554 SelectItemNameCopyAction.Enabled := True
5556 SelectItemNameCopyAction.Enabled := False;
5559 procedure TGikoForm.SelectItemNameURLCopyActionUpdate(Sender: TObject);
5561 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5562 SelectItemNameURLCopyAction.Enabled := True
5564 SelectItemNameURLCopyAction.Enabled := False;
5567 procedure TGikoForm.AllSelectActionUpdate(Sender: TObject);
5569 if ListView.SelCount > 0 then
5570 AllSelectAction.Enabled := True
5572 AllSelectAction.Enabled := False;
5575 procedure TGikoForm.LogDeleteActionUpdate(Sender: TObject);
5577 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5578 LogDeleteAction.Enabled := True
5580 LogDeleteAction.Enabled := False;
5583 procedure TGikoForm.BrowserTabCloseActionExecute(Sender: TObject);
5586 // ThreadItem: TThreadItem;
5588 idx := BrowserTab.TabIndex;
5589 if idx <> -1 then begin
5590 if BrowserTab.Tabs.Objects[idx] <> nil then begin
5591 //ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5592 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
5597 procedure TGikoForm.NotSelectTabCloseActionExecute(Sender: TObject);
5602 idx := BrowserTab.TabIndex;
5603 if idx = -1 then Exit;
5604 BrowserTab.Tabs.BeginUpdate;
5605 for i := BrowserTab.Tabs.Count - 1 downto BrowserTab.TabIndex + 1 do begin
5606 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5607 BrowserTab.Tabs.Delete(i);
5609 if idx > 0 then begin
5610 for i := BrowserTab.TabIndex - 1 downto 0 do begin
5611 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5612 BrowserTab.Tabs.Delete(i);
5615 BrowserTab.Tabs.EndUpdate;
5618 procedure TGikoForm.AllTabCloseActionExecute(Sender: TObject);
5622 //SetContent(BrowserNullTab);
5623 FActiveContent := nil;
5624 BrowserNullTab.Thread := nil;
5625 BrowserTab.OnChange := nil;
5626 BrowserTab.Tabs.BeginUpdate;
5627 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
5628 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
5630 BrowserTab.Tabs.Clear;
5631 BrowserTab.Tabs.EndUpdate;
5632 BrowserTab.OnChange := BrowserTabChange;
5633 SetContent(BrowserNullTab);
5636 procedure TGikoForm.TreeSelectBoradReloadExecute(Sender: TObject);
5639 TmpTreeNode: TTreeNode;
5641 TmpTreeNode := FClickNode;
5642 TreeView.Selected := FClickNode;
5645 if TObject(TmpTreeNode.Data) is TBoard then
5646 Board := TBoard(TmpTreeNode.Data)
5647 else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then
5648 Board := TFavoriteBoardItem(TmpTreeNode.Data).Item;
5650 if Board <> nil then
5651 DownloadList(Board);
5654 procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject);
5656 ThreadItem: TThreadItem;
5657 TmpTreeNode: TTreeNode;
5659 TmpTreeNode := FClickNode;
5660 TreeView.Selected := FClickNode;
5663 if TObject(TmpTreeNode.Data) is TThreadItem then
5664 ThreadItem := TThreadItem(TmpTreeNode.Data)
5665 else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then
5666 ThreadItem := TFavoriteThreadItem(TmpTreeNode.Data).Item;
5668 if ThreadItem <> nil then
5669 DownloadContent(ThreadItem);
5672 procedure TGikoForm.TreeSelectURLCopyExecute(Sender: TObject);
5674 TmpTreeNode: TTreeNode;
5677 TmpTreeNode := FClickNode;
5678 TreeView.Selected := FClickNode;
5679 if TObject(TmpTreeNode.Data) is TBoard then begin
5680 s := TBoard(TmpTreeNode.Data).URL + #13#10;
5681 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5682 s := TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5683 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5684 s := TThreadItem(TmpTreeNode.Data).URL + #13#10;
5685 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5686 s := TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5688 Clipboard.AsText := s;
5691 procedure TGikoForm.TreeSelectNameURLCopyExecute(Sender: TObject);
5693 TmpTreeNode: TTreeNode;
5696 TmpTreeNode := FClickNode;
5697 TreeView.Selected := FClickNode;
5698 if TObject(TmpTreeNode.Data) is TBoard then begin
5699 s := TBoard(TmpTreeNode.Data).Title + #13#10 + TBoard(TmpTreeNode.Data).URL + #13#10;
5700 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5701 s := TFavoriteBoardItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5702 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5703 s := TThreadItem(TmpTreeNode.Data).Title + #13#10 + TThreadItem(TmpTreeNode.Data).URL + #13#10;
5704 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5705 s := TFavoriteThreadItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5707 Clipboard.AsText := s;
5710 procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
5712 FClickNode := TreeView.Selected;
5713 if FClickNode = nil then begin
5714 TreeSelectThreadPupupMenu.Visible := False;
5715 TreeSelectBoardPupupMenu.Visible := False;
5716 TPMSep01.Visible := False;
5717 TreeSelectURLPupupMenu.Visible := False;
5718 TreeSelectNamePupupMenu.Visible := False;
5719 TreeSelectNameURLPupupMenu.Visible := False;
5720 TreeSelectFavoriteAddPupupMenu.Visible := False;
5721 TreeSelectLogDeleteSeparator.Visible := False;
5722 TreeSelectLogDeletePopupMenu.Visible := False;
5723 end else if TObject(FClickNode.Data) is TBoard then begin
5724 TreeSelectThreadPupupMenu.Visible := False;
5725 TreeSelectBoardPupupMenu.Visible := True;
5726 TPMSep01.Visible := True;
5727 TreeSelectURLPupupMenu.Visible := True;
5728 TreeSelectNamePupupMenu.Visible := True;
5729 TreeSelectNameURLPupupMenu.Visible := True;
5730 TreeSelectFavoriteAddPupupMenu.Visible := True;
5731 TreeSelectLogDeleteSeparator.Visible := False;
5732 TreeSelectLogDeletePopupMenu.Visible := False;
5733 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
5734 TreeSelectThreadPupupMenu.Visible := False;
5735 TreeSelectBoardPupupMenu.Visible := True;
5736 TPMSep01.Visible := True;
5737 TreeSelectURLPupupMenu.Visible := True;
5738 TreeSelectNamePupupMenu.Visible := True;
5739 TreeSelectNameURLPupupMenu.Visible := True;
5740 TreeSelectFavoriteAddPupupMenu.Visible := True;
5741 TreeSelectLogDeleteSeparator.Visible := False;
5742 TreeSelectLogDeletePopupMenu.Visible := False;
5743 end else if (TObject(FClickNode.Data) is TThreadItem) then begin
5744 TreeSelectThreadPupupMenu.Visible := True;
5745 TreeSelectBoardPupupMenu.Visible := False;
5746 TPMSep01.Visible := True;
5747 TreeSelectURLPupupMenu.Visible := True;
5748 TreeSelectNamePupupMenu.Visible := True;
5749 TreeSelectNameURLPupupMenu.Visible := True;
5750 TreeSelectFavoriteAddPupupMenu.Visible := True;
5751 TreeSelectLogDeleteSeparator.Visible := True;
5752 TreeSelectLogDeletePopupMenu.Visible := True;
5753 end else if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
5754 TreeSelectThreadPupupMenu.Visible := True;
5755 TreeSelectBoardPupupMenu.Visible := False;
5756 TPMSep01.Visible := True;
5757 TreeSelectURLPupupMenu.Visible := True;
5758 TreeSelectNamePupupMenu.Visible := True;
5759 TreeSelectNameURLPupupMenu.Visible := True;
5760 TreeSelectFavoriteAddPupupMenu.Visible := True;
5761 TreeSelectLogDeleteSeparator.Visible := True;
5762 TreeSelectLogDeletePopupMenu.Visible := True;
5763 end else if (TObject(FClickNode.Data) is TCategory) then begin
5764 TreeSelectThreadPupupMenu.Visible := False;
5765 TreeSelectBoardPupupMenu.Visible := False;
5766 TPMSep01.Visible := False;
5767 TreeSelectURLPupupMenu.Visible := False;
5768 TreeSelectNamePupupMenu.Visible := True;
5769 TreeSelectNameURLPupupMenu.Visible := False;
5770 TreeSelectFavoriteAddPupupMenu.Visible := False;
5771 TreeSelectLogDeleteSeparator.Visible := False;
5772 TreeSelectLogDeletePopupMenu.Visible := False;
5773 end else if FClickNode.IsFirstNode then begin
5774 TreeSelectThreadPupupMenu.Visible := False;
5775 TreeSelectBoardPupupMenu.Visible := False;
5776 TPMSep01.Visible := False;
5777 TreeSelectURLPupupMenu.Visible := False;
5778 TreeSelectNamePupupMenu.Visible := True;
5779 TreeSelectNameURLPupupMenu.Visible := False;
5780 TreeSelectFavoriteAddPupupMenu.Visible := False;
5781 TreeSelectLogDeleteSeparator.Visible := False;
5782 TreeSelectLogDeletePopupMenu.Visible := False;
5784 TreeSelectThreadPupupMenu.Visible := False;
5785 TreeSelectBoardPupupMenu.Visible := False;
5786 TPMSep01.Visible := False;
5787 TreeSelectURLPupupMenu.Visible := False;
5788 TreeSelectNamePupupMenu.Visible := False;
5789 TreeSelectNameURLPupupMenu.Visible := False;
5790 TreeSelectFavoriteAddPupupMenu.Visible := False;
5791 TreeSelectLogDeleteSeparator.Visible := False;
5792 TreeSelectLogDeletePopupMenu.Visible := False;
5796 procedure TGikoForm.BrowserNewWindow2(Sender: TObject;
5797 var ppDisp: IDispatch; var Cancel: WordBool);
5806 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
5807 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
5808 Html := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
5810 URL := GikoSys.GetHRefText(Html);
5811 URL := GikoSys.HTMLDecode(URL);
5813 //
\83A
\83h
\83\8c\83X
\83o
\81[
\82Ì
\97\9a\97ð
5814 if GikoSys.Setting.LinkAddAddressBar then begin
5815 idx := AddressComboBox.Items.IndexOf(URL);
5816 if idx = -1 then begin
5817 AddressComboBox.Items.Insert(0, URL);
5818 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
5819 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
5821 AddressComboBox.Items.Delete(idx);
5822 AddressComboBox.Items.Insert(0, URL);
5829 { ShiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5830 CtrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
5833 Memo1.Lines.Add('ShiftDown');
5835 Memo1.Lines.Add('CtrlDown');
5837 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
5838 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
5839 Url := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
5843 URL := GetHRefText(URL);
5845 ParseURI(URL, Protocol, Host, path, Document, Port, Bookmark);
5847 b := Parse2chURL(path, document, bbs, num);
5848 memo1.Lines.Add('bbs: ' + bbs);
5849 memo1.Lines.Add('key: ' + num);
5851 Memo1.Lines.Add('Parse2chURL: True')
5853 Memo1.Lines.Add('Parse2chURL: False');
5855 // AppPath := 'C:\Borland\Projects\Test\TestBrowser\TestBrowser.exe';
5860 procedure TGikoForm.ListSplitterCanResize(Sender: TObject;
5861 var NewSize: Integer; var Accept: Boolean);
5863 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5864 if ViewPanel.Width < 2 then begin
5865 ViewPanel.Width := 1;
5866 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5867 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5868 GikoSys.Setting.ListWidthState := glsMax;
5869 end else if ViewPanel.Width > (ThreadMainPanel.Width - 80) then begin
5870 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5871 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5872 GikoSys.Setting.ListWidthState := glsMin;
5874 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5875 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5876 GikoSys.Setting.ListWidthState := glsNormal;
5879 if ViewPanel.Height < 2 then begin
5880 ViewPanel.Height := 1;
5881 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5882 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5883 GikoSys.Setting.ListHeightState := glsMax;
5884 end else if ViewPanel.Height > (ThreadMainPanel.Height - BrowserCoolBar.Height - 7) then begin
5885 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5886 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5887 GikoSys.Setting.ListHeightState := glsMin;
5889 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5890 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5891 GikoSys.Setting.ListHeightState := glsNormal;
5896 procedure TGikoForm.ListSplitterMoved(Sender: TObject);
5898 if Mouse.Capture <> 0 then
5900 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5901 if (ViewPanel.Width > 1) and (ViewPanel.Width <= (ThreadMainPanel.Width - 80)) then
5902 FBrowserSizeWidth := ViewPanel.Width;
5904 if (ViewPanel.Height > 1) and (ViewPanel.Height <= (ThreadMainPanel.Height - BrowserCoolBar.Height)) then
5905 FBrowserSizeHeight := ViewPanel.Height;
5907 { if (Mouse.Capture = 0) and (ViewPanel.Height > 1) and (not ArrangeAction.Checked) then
5908 FBrowserSizeHeight := ViewPanel.Height
5909 else if (Mouse.Capture = 0) and (ViewPanel.Width > 1) and (ArrangeAction.Checked) then
5910 FBrowserSizeWidth := ViewPanel.Width;}
5913 procedure TGikoForm.BrowserTabChange(Sender: TObject);
5917 ThreadItem: TThreadItem;
5920 // if NewTab = -1 then
5922 if not BrowserTab.Dragging then begin
5923 FTabHintIndex := -1;
5924 BrowserTab.Hint := '';
5925 idx := BrowserTab.TabIndex;
5926 if idx = -1 then begin
5927 BrowserNullTab.Thread := nil;
5928 SetContent(BrowserNullTab);
5930 end else if(BrowserTab.Tabs.Objects[idx] <> nil) and (BrowserTab.Tabs.Objects[idx] is TBrowserRecord) then begin
5931 if TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser <> nil then begin
5932 j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser);
5934 FBrowsers.Move(j ,0);
5936 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5937 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[4]) then begin
5938 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser := nil;
5939 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent <> nil then begin
5940 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent.Free;
5941 TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent := nil;
5945 TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser := TWebBrowser(FBrowsers[4]);
5946 TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Repaint := true;
5947 FBrowsers.Move(4, 0);
5949 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Thread;
5950 TOleControl(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser).BringToFront;
5951 GikoSys.OnlyAHundredRes := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
5952 OnlyAHundredRes.Checked := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).OnlyHundred;
5953 SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
5955 if GikoSys.Setting.URLDisplay then
5956 AddressComboBox.Text := ThreadItem.URL;
5959 if ThreadItem = nil then Exit;
5960 if ThreadItem.IsLogFile then begin
5961 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5962 if GikoSys.Setting.ListWidthState = glsMin then begin
5963 BrowserMaxAction.Execute;
5964 if GikoForm.Visible then
5965 SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
5968 if GikoSys.Setting.ListHeightState = glsMin then begin
5969 BrowserMaxAction.Execute;
5970 if GikoForm.Visible then
5971 SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
5980 procedure TGikoForm.BrowserTabMouseDown(Sender: TObject;
5981 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
5987 if Button = mbMiddle then begin
5988 //
\83}
\83E
\83X
\92\86\83{
\83^
\83\93
5991 p := BrowserTab.ScreenToClient(p);
5992 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
5994 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
5995 //end else if Button = mbRight then begin
5996 //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é
5997 //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
5998 { //
\83}
\83E
\83X
\89E
\83{
\83^
\83\93
6001 // GetCursorPos(p2);
6002 p := BrowserTab.ScreenToClient(p);
6003 // idx := BrowserTab.ItemAtPos(p);
6004 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
6005 if idx <> -1 then begin
6006 OldIndex := BrowserTab.TabIndex;
6007 BrowserTab.TabIndex := idx;
6008 if OldIndex <> idx then
6009 BrowserTab.OnChange(nil);
6010 BrowserTabPopupMenu.Tag := idx;
6011 BrowserTabPopupMenu.Popup(p2.X, p2.Y);
6014 end else if BUtton = mbLeft then begin
6015 FDragWFirst := true;
6016 FMouseDownPos.X := X;
6017 FMouseDownPos.Y := Y;
6022 procedure TGikoForm.SetBrowserTabState;
6025 CoolBand: TCoolBand;
6027 BrowserBottomPanel.AutoSize := False;
6028 if GikoSys.Setting.BrowserTabVisible then begin
6029 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
6030 BrowserTab.Style := tsTabs;
6031 if GikoSys.Setting.BrowserTabPosition = gtpTop then
6032 BrowserTab.TabPosition := tpTop
6034 BrowserTab.TabPosition := tpBottom;
6035 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
6036 BrowserTab.TabPosition := tpTop;
6037 BrowserTab.Style := tsButtons;
6039 BrowserTab.TabPosition := tpTop;
6040 BrowserTab.Style := tsFlatButtons
6043 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
6044 BrowserTab.Parent := BrowserTabToolBar;
6045 BrowserBottomPanel.Hide;
6046 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6047 if CoolBand <> nil then
6048 CoolBand.Visible := True;
6049 // BrowserTab.Parent := BrowserTopPanel;
6050 // BrowserTab.Parent := BrowserCoolBar;
6051 // BrowserTab.Top := 26;
6052 // BrowserTopPanel.Height := 44;
6055 BrowserTab.Parent := BrowserBottomPanel;
6056 BrowserTab.Top := 0;
6057 BrowserTab.Left := 0;
6058 BrowserBottomPanel.Show;
6059 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6060 if CoolBand <> nil then
6061 CoolBand.Visible := False;
6062 // BrowserTopPanel.Height := 26;
6066 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
6067 if CoolBand <> nil then
6068 CoolBand.Visible := False;
6069 BrowserBottomPanel.Visible := False;
6070 // BrowserTab.Visible := False;
6071 // BrowserTopPanel.Height := 26;
6075 procedure TGikoForm.BrowserTabDragOver(Sender, Source: TObject; X,
6076 Y: Integer; State: TDragState; var Accept: Boolean);
6080 idx := BrowserTab.IndexOfTabAt(X, Y);
6081 Accept := (Source = BrowserTab) and (BrowserTab.TabIndex <> idx);
6084 procedure TGikoForm.BrowserTabDragDrop(Sender, Source: TObject; X,
6089 idx := BrowserTab.IndexOfTabAt(X, Y);
6091 BrowserTab.Tabs.Move(BrowserTab.TabIndex, idx);
6094 procedure TGikoForm.BrowserTabMouseMove(Sender: TObject;
6095 Shift: TShiftState; X, Y: Integer);
6098 ThreadItem: TThreadItem;
6101 TabIdx := BrowserTab.IndexOfTabAt(x, y);
6103 if ( ssLeft in Shift ) and ( BrowserTab.Style = tsTabs ) then begin
6104 if FDragWFirst = false then begin
6105 FDragWFirst := true;
6107 BrowserTab.EndDrag(false);
6108 BrowserTab.BeginDrag(false, DandD_THRESHOLD);
6109 FDragWFirst := false;
6112 BrowserTab.EndDrag(false);
6113 FDragWFirst := false;
6116 if (FTabHintIndex <> TabIdx) and (TabIdx <> -1) then begin
6117 Application.CancelHint;
6118 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[TabIdx]).Thread;
6119 if ThreadItem.Title <> BrowserTab.Tabs[TabIdx] then begin
6120 BrowserTab.Hint := ThreadItem.Title;
6121 Application.ShowHint := True;
6123 BrowserTab.Hint := '';
6124 Application.ShowHint := True;
6126 FTabHintIndex := TabIdx;
6131 procedure TGikoForm.BrowserDocumentComplete(Sender: TObject;
6132 const pDisp: IDispatch; var URL: OleVariant);
6134 FDispHtmlDocument: DispHTMLDocument;
6135 BrowserRecord :TBrowserRecord;
6138 // AddMessageList('DocumentComplete', nil);
6139 if TObject(Sender) is TWebBrowser then begin
6140 BrowserRecord := nil;
6141 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
6142 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(Sender) then begin
6143 BrowserRecord := TBrowserRecord(BrowserTab.Tabs.Objects[i]);
6147 if BrowserRecord <> nil then begin
6148 if BrowserRecord.FEvent <> nil then
6149 BrowserRecord.FEvent.Free;
6150 FDispHtmlDocument := Idispatch(OleVariant(BrowserRecord.Browser.ControlInterface).Document) as DispHTMLDocument;
6151 BrowserRecord.FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
6152 BrowserRecord.FEvent.OnContextMenu := OnDocumentContextMenu;
6157 procedure TGikoForm.SelectReservActionUpdate(Sender: TObject);
6162 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then begin
6163 List := TList.Create;
6165 SelectListItem(List);
6166 for i := 0 to List.Count - 1 do begin
6167 if TObject(List[i]) is TThreadItem then begin
6168 if TThreadItem(List[i]).IsLogFile then begin
6169 SelectReservAction.Enabled := True;
6174 SelectReservAction.Enabled := False;
6178 end else if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
6179 SelectReservAction.Enabled := True
6181 SelectReservAction.Enabled := False;
6184 procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
6186 AddRoundNameMenu(RoundNamePopupMenu.Items);
6189 procedure TGikoForm.AddRoundNameMenu(MenuItem: TMenuItem);
6195 Item := TMenuItem.Create(Self);
6196 Item.Caption := '
\90V
\82µ
\82¢
\96¼
\91O
\82Å
\8f\84\89ñ
\97\
\96ñ(&N)...';
6197 Item.OnClick := SelectNewRoundNameExecute;
6199 Item := TMenuItem.Create(Self);
6200 Item.Caption := '
\8f\84\89ñ
\83\8a\83X
\83g
\82©
\82ç
\8dí
\8f\9c(&D)';
6201 Item.OnClick := SelectDeleteRoundExecute;
6203 Item := TMenuItem.Create(Self);
6204 Item.Caption := '-';
6206 for i := 0 to RoundList.RoundNameList.Count - 1 do begin
6207 Item := TMenuItem.Create(Self);
6208 Item.Caption := RoundList.RoundNameList[i];
6209 Item.OnClick := SetSelectRoundName;
6214 procedure TGikoForm.SelectNewRoundNameExecute(Sender: TObject);
6217 Dlg: TRoundNameDialog;
6220 Dlg := TRoundNameDialog.Create(Self);
6223 if Dlg.ModalResult <> mrCancel then begin
6224 s := Trim(Dlg.RoundNameEdit.Text);
6225 RoundList.RoundNameList.Add(s);
6226 SetSelectItemRound(True, s, TMenuItem(Sender).Parent.Name);
6233 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string);
6235 threadItem : TThreadItem;
6237 if ParentName <> 'dummy1' then begin
6238 SetSelectItemRound(RoundFlag, RoundName);
6240 threadItem := GetActiveContent;
6241 if threadItem <> nil then begin
6242 threadItem.RoundName := RoundName;
6243 threadItem.Round := RoundFlag;
6248 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
6253 List := TList.Create;
6255 SelectListItem(List);
6256 for i := 0 to List.Count - 1 do begin
6257 if TObject(List[i]) is TBoard then begin
6258 TBoard(List[i]).RoundName := RoundName;
6259 TBoard(List[i]).Round := RoundFlag;
6260 end else if TObject(List[i]) is TThreadItem then begin
6261 if TThreadItem(List[i]).IsLogFile then begin
6262 TThreadItem(List[i]).RoundName := RoundName;
6263 TThreadItem(List[i]).Round := RoundFlag;
6272 procedure TGikoForm.SelectDeleteRoundExecute(Sender: TObject);
6274 SetSelectItemRound(False, '', TMenuItem(Sender).Parent.Name);
6278 procedure TGikoForm.SelectReservActionExecute(Sender: TObject);
6280 //
\82±
\82Ì
\83R
\83\81\83\93\83g
\8dí
\8f\9c\82µ
\82Ä
\82Í
\91Ê
\96Ú
6283 procedure TGikoForm.SetSelectRoundName(Sender: TObject);
6285 MenuItem: TMenuItem;
6287 if Sender is TMenuItem then begin
6288 MenuItem := TMenuItem(Sender);
6289 SetSelectItemRound(True, StripHotKey(MenuItem.Caption), TMenuItem(Sender).Parent.Name);
6294 procedure TGikoForm.NewBoardActionExecute(Sender: TObject);
6296 Dlg: TNewBoardDialog;
6300 for i := 0 to Screen.CustomFormCount - 1 do begin
6301 if TObject(Screen.CustomForms[i]) is TEditorForm then begin
6302 Msg := '
\83\8c\83X
\83G
\83f
\83B
\83^
\82ð
\91S
\82Ä
\95Â
\82¶
\82Ä
\82
\82¾
\82³
\82¢';
6303 MsgBox(Handle, Msg, '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
6307 Dlg := TNewBoardDialog.Create(Self);
6315 procedure TGikoForm.LoginActionExecute(Sender: TObject);
6320 if GikoSys.Dolib.Connected then begin
6321 //
\83\8d\83O
\83A
\83E
\83g
6322 GikoSys.Dolib.Disconnect;
6323 LoginAction.Checked := False;
6324 AddMessageList('
\83\8d\83O
\83A
\83E
\83g
\82µ
\82Ü
\82µ
\82½', nil, gmiOK);
6325 LoginAction.Caption := '
\83\8d\83O
\83C
\83\93(&L)';
6327 TmpCursor := Screen.Cursor;
6328 Screen.Cursor := crHourGlass;
6330 //
\92Ê
\8fí
\83\8d\83O
\83C
\83\93
6331 if not GikoSys.Setting.ForcedLogin then begin
6332 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6333 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6334 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6335 if GikoSys.Setting.ReadProxy then begin
6336 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6337 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6339 GikoSys.Dolib.ProxyAddress := '';
6340 GikoSys.Dolib.ProxyPort := 0;
6342 if GikoSys.Dolib.Connect then begin
6343 LoginAction.Checked := True;
6344 AddMessageList('
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6345 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6346 LoginToolButton.Style := tbsCheck;
6348 // 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);
6349 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6351 LoginAction.Checked := False;
6352 LoginToolButton.Down := False;
6353 LoginToolButton.Style := tbsButton;
6356 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
6357 + '
\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
6358 + '
\82±
\82Ì
\83\82\81[
\83h
\82Å
\83\8d\83O
\83C
\83\93\82ð
\8e\8e\82Ý
\82Ü
\82·
\82©
\81H' + #13#10;
6359 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) = IDYES then begin
6360 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6361 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6362 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6363 if GikoSys.Setting.ReadProxy then begin
6364 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6365 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6367 GikoSys.Dolib.ProxyAddress := '';
6368 GikoSys.Dolib.ProxyPort := 0;
6370 //SSL
\8fá
\8aQ
\97p
\8b
\90§
\83\8d\83O
\83C
\83\93
6371 GikoSys.Dolib.ForcedConnect;
6372 if GikoSys.Dolib.Connect then begin
6373 LoginAction.Checked := True;
6374 AddMessageList('
\8b
\90§
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6375 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6376 LoginToolButton.Style := tbsCheck;
6378 // 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);
6379 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6381 LoginAction.Checked := False;
6382 LoginToolButton.Down := False;
6383 LoginToolButton.Style := tbsButton;
6386 LoginAction.Checked := False;
6387 LoginToolButton.Down := False;
6388 LoginToolButton.Style := tbsButton;
6392 Screen.Cursor := TmpCursor;
6397 procedure TGikoForm.KeySettingActionExecute(Sender: TObject);
6399 Dlg: TKeySettingForm;
6401 Dlg := TKeySettingForm.Create(Self);
6403 if Dlg.ShowModal = mrOk then
6404 GikoSys.SaveKeySetting(ActionList);
6405 GikoSys.SaveEditorKeySetting(Dlg.EditorForm.ActionList);
6411 procedure TGikoForm.ArrangeActionExecute(Sender: TObject);
6413 if ArrangeAction.Checked then begin
6415 ViewPanel.Align := alNone;
6416 ListSplitter.Align := alNone;
6417 ThreadPanel.Align := alNone;
6419 ViewPanel.Width := FBrowserSizeWidth;
6420 ViewPanel.Align := alLeft;
6422 ListSplitter.Width := 5;
6423 ListSplitter.Align := alLeft;
6425 ViewPanel.Left := -10;
6427 ThreadPanel.Align := alClient;
6429 GikoSys.Setting.ListOrientation := gloHorizontal;
6430 case GikoSys.Setting.ListWidthState of
6432 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6433 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6434 ViewPanel.Width := 1;
6437 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6438 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6441 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6442 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6443 ViewPanel.Width := ThreadMainPanel.Width - 80;
6448 ViewPanel.Align := alNone;
6449 ListSplitter.Align := alNone;
6450 ThreadPanel.Align := alNone;
6452 ViewPanel.Height := FBrowserSizeHeight;
6453 ViewPanel.Align := alTop;
6455 ListSplitter.Height := 5;
6456 ListSplitter.Align := alTop;
6458 ViewPanel.Top := -10;
6460 ThreadPanel.Align := alClient;
6461 GikoSys.Setting.ListOrientation := gloVertical;
6462 case GikoSys.Setting.ListHeightState of
6464 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6465 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6466 ViewPanel.Height := 1;
6469 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6470 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6473 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6474 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6475 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
6482 procedure TGikoForm.PaneInitActionExecute(Sender: TObject);
6484 CabinetPanel.Width := 150;
6485 MessagePanel.Height := 40;
6487 FBrowserSizeWidth := 200;
6488 FBrowserSizeHeight := 200;
6489 if ArrangeAction.Checked then begin
6490 ViewPanel.Width := FBrowserSizeWidth;
6492 ViewPanel.Height := FBrowserSizeHeight;
6494 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6495 if GikoSys.Setting.ListHeightState = glsMax then begin
6496 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6497 GikoSys.Setting.ListHeightState := glsNormal;
6500 if GikoSys.Setting.ListWidthState = glsMax then begin
6501 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6502 GikoSys.Setting.ListWidthState := glsNormal;
6507 procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
6509 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';
6510 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6513 ThreadItem: TThreadItem;
6515 idx := BrowserTab.TabIndex;
6516 if idx <> -1 then begin
6517 if BrowserTab.Tabs.Objects[idx] <> nil then begin
6518 if GikoSys.Setting.DeleteMsg then
6519 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
6521 ThreadItem := TBrowserRecord(BrowserTab.Tabs.Objects[idx]).FThread;
6522 DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
6523 ThreadItem.DeleteLogFile;
6524 if ThreadItem.ParentBoard = FActiveList then
6530 function TGikoForm.GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
6535 if CoolBar = nil then
6537 for i := 0 to CoolBar.Bands.Count - 1 do begin
6538 if CoolBar.Bands[i].Control = Control then begin
6539 Result := CoolBar.Bands[i];
6545 procedure TGikoForm.BrowserTabToolBarResize(Sender: TObject);
6547 if BrowserTab.Parent = BrowserTabToolBar then
6548 BrowserTab.Width := BrowserTabToolBar.Width;
6551 procedure TGikoForm.SelectTextClearActionExecute(Sender: TObject);
6553 GikoSys.Setting.SelectTextList.Clear;
6554 SelectComboBox.Items.Clear;
6555 SelectComboBox.Text := '';
6556 SetListViewType( gvtAll );
6559 procedure TGikoForm.NameTextClearActionExecute(Sender: TObject);
6563 GikoSys.Setting.NameList.Clear;
6564 for i := 0 to Screen.CustomFormCount - 1 do begin
6565 if TObject(Screen.CustomForms[i]) is TEditorForm then
6566 TEditorForm(Screen.CustomForms[i]).NameComboBox.Items.Clear;
6570 procedure TGikoForm.MailTextClearActionExecute(Sender: TObject);
6574 GikoSys.Setting.MailList.Clear;
6575 for i := 0 to Screen.CustomFormCount - 1 do begin
6576 if TObject(Screen.CustomForms[i]) is TEditorForm then
6577 TEditorForm(Screen.CustomForms[i]).MailComboBox.Items.Clear;
6581 procedure TGikoForm.LeftmostTabSelectActionExecute(Sender: TObject);
6583 if BrowserTab.Tabs.Count > 0 then begin
6584 BrowserTab.TabIndex := 0;
6585 BrowserTab.OnChange(nil);
6589 procedure TGikoForm.LeftTabSelectActionExecute(Sender: TObject);
6591 if BrowserTab.Tabs.Count > 0 then begin
6592 if BrowserTab.TabIndex = -1 then begin
6593 BrowserTab.TabIndex := 0;
6594 BrowserTab.OnChange(nil);
6595 end else if BrowserTab.TabIndex > 0 then begin
6596 BrowserTab.TabIndex := BrowserTab.TabIndex - 1;
6597 BrowserTab.OnChange(nil);
6602 procedure TGikoForm.RightTabSelectActionExecute(Sender: TObject);
6604 if BrowserTab.Tabs.Count > 0 then begin
6605 if BrowserTab.TabIndex = -1 then begin
6606 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6607 BrowserTab.OnChange(nil);
6608 end else if BrowserTab.TabIndex < (BrowserTab.Tabs.Count - 1) then begin
6609 BrowserTab.TabIndex := BrowserTab.TabIndex + 1;
6610 BrowserTab.OnChange(nil);
6615 procedure TGikoForm.RightmostTabSelectActionExecute(Sender: TObject);
6617 if BrowserTab.Tabs.Count > 0 then begin
6618 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6619 BrowserTab.OnChange(nil);
6623 procedure TGikoForm.LeftmostTabSelectActionUpdate(Sender: TObject);
6625 LeftmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6628 procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
6630 LeftTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6633 procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);
6635 RightTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6638 procedure TGikoForm.RightmostTabSelectActionUpdate(Sender: TObject);
6640 RightmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6643 procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
6648 procedure TGikoForm.SetMenuFont;
6650 // GikoSys.MenuFont(MenuToolBar.Font);
6651 // MenuToolBar.Buttons[0].AutoSize := False;
6652 // MenuToolBar.Buttons[0].AutoSize := True;
6653 // MenuToolBar.Font.Color := clMenuText;
6654 GikoSys.MenuFont(MainCoolBar.Font);
6655 MenuToolBar.Buttons[0].AutoSize := False;
6656 MenuToolBar.Buttons[0].AutoSize := True;
6657 MainCoolBar.AutoSize := False;
6658 MainCoolBar.AutoSize := True;
6660 GikoSys.MenuFont(ListCoolBar.Font);
6661 GikoSys.MenuFont(BrowserCoolBar.Font);
6662 // MenuToolBar.Font.Color := clMenuText;
6665 procedure TGikoForm.FavoriteMenuClick(Sender: TObject);
6671 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\92Ç
\89Á
6672 NewMenu := TMenuItem.Create(MainMenu);
6673 NewMenu.Action := FavoriteAddAction;
6674 FavoriteMenu.Add(NewMenu);
6675 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\90®
\97\9d
6676 NewMenu := TMenuItem.Create(FavoriteMenu);
6677 NewMenu.Action := FavoriteArrangeAction;
6678 FavoriteMenu.Add(NewMenu);
6679 //
\83Z
\83p
\83\8c\81[
\83^
6680 NewMenu := TMenuItem.Create(FavoriteMenu);
6681 NewMenu.Caption := '-';
6682 FavoriteMenu.Add(NewMenu);
6684 CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
6687 procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
6692 for i := 0 to Node.Count - 1 do begin
6693 NewMenu := TFavoriteMenuItem.Create(Self);
6694 NewMenu.AutoHotkeys := maAutomatic;
6695 NewMenu.Caption := CustomStringReplace(Node.Item[i].Text, '&', '&&');
6696 TFavoriteMenuItem(NewMenu).Data := Node.Item[i].Data;
6697 MenuItem.Add(NewMenu);
6699 if TObject(Node.Item[i].Data) is TFavoriteFolder then begin
6700 NewMenu.ImageIndex := TOOL_ICON_FAV_FOLDER;
6701 CreateFavMenu(Node.Item[i], NewMenu);
6702 end else if TObject(Node.Item[i].Data) is TFavoriteBoardItem then begin
6703 NewMenu.ImageIndex := TOOL_ICON_FAV_BOARD;
6704 NewMenu.OnClick := FavoriteClick;
6705 end else if TObject(Node.Item[i].Data) is TFavoriteThreadItem then begin
6706 NewMenu.ImageIndex := TOOL_ICON_FAV_THREAD;
6707 NewMenu.OnClick := FavoriteClick;
6712 procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
6714 Dlg : TFavoriteAddDialog;
6716 Items : ^TTreeNodes;
6721 Items := @(FavoriteTreeView.Items);
6722 if Item is TFavoriteBoardItem then
6723 Item := TFavoriteBoardItem( Item ).Item
6724 else if Item is TFavoriteThreadItem then
6725 Item := TFavoriteThreadItem( Item ).Item;
6726 if Item is TBoard then begin
6727 ItemURL := TBoard( Item ).URL;
6728 for i := Items^.Count - 1 downto 0 do begin
6729 Data := Items^.Item[ i ].Data;
6730 if TObject( Data ) is TFavoriteBoardItem then begin
6731 if ItemURL = TFavoriteThreadItem( Data ).URL then begin
6732 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
6738 Dlg := TFavoriteAddDialog.Create(Self);
6740 Dlg.SetBoard( TBoard( Item ) );
6745 end else if Item is TThreadItem then begin
6746 ItemURL := TThreadItem( Item ).URL;
6747 for i := Items^.Count - 1 downto 0 do begin
6748 Data := Items^.Item[ i ].Data;
6749 if TObject( Data ) is TFavoriteThreadItem then begin
6750 if ItemURL = TFavoriteThreadItem( Data ).URL then begin
6751 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
6757 Dlg := TFavoriteAddDialog.Create(Self);
6759 Dlg.SetThreadItem( TThreadItem( Item ) );
6769 procedure TGikoForm.FavoriteAddActionExecute(Sender: TObject);
6771 ShowFavoriteAddDialog(GetActiveContent);
6774 procedure TGikoForm.FavoriteClick(Sender: TObject);
6777 FavoriteClick( Sender, True );
6781 procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
6784 ThreadItem: TThreadItem;
6785 FavBoard: TFavoriteBoardItem;
6786 FavThread: TFavoriteThreadItem;
6790 if Sender is TFavoriteMenuItem then
6791 Item := TFavoriteMenuItem(Sender).Data
6792 else if Sender is TLinkToolButton then
6793 Item := TLinkToolButton(Sender).Data
6794 else if Sender is TTreeNode then
6795 Item := TTreeNode( Sender ).Data
6799 if TObject(Item) is TFavoriteBoardItem then begin
6800 FavBoard := TFavoriteBoardItem(Item);
6801 Board := FavBoard.Item;
6802 if Board <> nil then begin
6803 if (FTreeType = gtt2ch) and (FActiveBBS <> Board.ParentCategory.ParenTBBS) then
6804 ShowBBSTree( Board.ParentCategory.ParenTBBS );
6805 SelectTreeNode(Board, True);
6807 end else if TObject(Item) is TFavoriteThreadItem then begin
6808 FavThread := TFavoriteThreadItem(Item);
6809 ThreadItem := FavThread.Item;
6810 if ThreadItem = nil then
6813 InsertBrowserTab(ThreadItem, ActiveTab);
6815 if ThreadItem.IsLogFile then begin
6816 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6817 if GikoSys.Setting.ListWidthState = glsMin then begin
6818 BrowserMaxAction.Execute;
6819 if GikoForm.Visible then
6823 if GikoSys.Setting.ListHeightState = glsMin then begin
6824 BrowserMaxAction.Execute;
6825 if GikoForm.Visible then
6833 procedure TGikoForm.FavoriteAddActionUpdate(Sender: TObject);
6835 FavoriteAddAction.Enabled := (GetActiveContent <> nil);
6838 procedure TGikoForm.BoardFavoriteAddActionExecute(Sender: TObject);
6840 if TObject(ListView.Selected.Data) is TBoard then
6841 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
6844 procedure TGikoForm.BoardFavoriteAddActionUpdate(Sender: TObject);
6846 BoardFavoriteAddAction.Enabled := (GetActiveList is TCategory) and (ListView.SelCount > 0);
6849 procedure TGikoForm.ThreadFavoriteAddActionExecute(Sender: TObject);
6851 if TObject(ListView.Selected.Data) is TThreadItem then
6852 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
6855 procedure TGikoForm.ThreadFavoriteAddActionUpdate(Sender: TObject);
6857 ThreadFavoriteAddAction.Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
6860 procedure TGikoForm.TreeSelectFavoriteAddActionExecute(Sender: TObject);
6862 ShowFavoriteAddDialog(TObject(FClickNode.Data));
6865 procedure TGikoForm.FavoriteArrangeActionExecute(Sender: TObject);
6867 Dlg: TFavoriteArrangeDialog;
6869 Dlg := TFavoriteArrangeDialog.Create(Self);
6875 PostMessage( Handle, USER_SETLINKBAR, 0, 0 );
6878 procedure TGikoForm.BBSMenuItemOnClick(
6883 if Sender is TBBSMenuItem then
6884 ShowBBSTree( TBBSMenuItem( Sender ).Data );
6888 procedure TGikoForm.MainCoolBarResize(Sender: TObject);
6890 TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
6893 procedure TGikoForm.MoveToActionExecute(Sender: TObject);
6898 URL := Trim(AddressComboBox.Text);
6901 idx := AddressComboBox.Items.IndexOf(URL);
6902 if idx = -1 then begin
6903 AddressComboBox.Items.Insert(0, URL);
6904 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
6905 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
6907 AddressComboBox.Items.Delete(idx);
6908 AddressComboBox.Items.Insert(0, URL);
6912 procedure TGikoForm.MoveToURL(URL: string);
6915 protocol, host, path, document, port, bookmark : string;
6916 BBSID, BBSKey: string;
6918 ThreadItem: TThreadItem;
6921 tmpThread : TThreadItem;
6922 // category : TCategory;
6923 // categoryNode : TTreeNode;
6924 // boardNode : TTreeNode;
6925 shiftDown : Boolean;
6929 GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark );
6930 GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey );
6933 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
6934 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
6935 if shiftDown then begin
6936 GikoSys.OpenBrowser(URL, gbtUserApp);
6938 end else if ctrlDown then begin
6939 GikoSys.OpenBrowser(URL, gbtIE);
6943 //=====
\83v
\83\89\83O
\83C
\83\93
6946 bi := High( BoardPlugIns );
6947 for i := Low( BoardPlugIns ) to bi do begin
6948 if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
6949 case BoardPlugIns[ i ].AcceptURL( URL ) of
6952 tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL );
6953 boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
6954 Board := BBSsFindBoardFromURL( boardURL );
6955 if Board = nil then begin
6956 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
6957 //GikoSys.OpenBrowser(URL, gbtUserApp);
6960 Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL );
6961 if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
6962 ShowBBSTree( BBSs[ 1 ] );
6965 if not Board.IsThreadDatRead then begin
6966 GikoSys.ReadSubjectFile( Board );
6971 ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
6972 if ThreadItem = nil then begin
6973 ThreadItem := tmpThread;
6974 Board.Insert( 0, ThreadItem );
6975 if ActiveList is TBoard then begin
6976 if TBoard(ActiveList) = Board then
6977 ListView.Items.Count := ListView.Items.Count + 1;
6979 InsertBrowserTab( ThreadItem );
6980 DownloadContent( ThreadItem );
6984 InsertBrowserTab( ThreadItem );
6985 if not ThreadItem.IsLogFile then begin
6986 DownloadContent( ThreadItem );
6996 Board := BBSsFindBoardFromURL( URL );
6997 if Board <> nil then begin
6998 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
6999 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7000 SelectTreeNode( Board, True );
7008 // 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¢
7012 if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
7013 boardURL := GikoSys.Get2chThreadURL2BoardURL( URL );
7014 Board := BBSsFindBoardFromURL( boardURL );
7016 Board := BBSsFindBoardFromBBSID( BBSID );
7018 if Board = nil then begin
7019 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
7020 //
\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)
7021 Board := BBSs[ 0 ].FindBBSID( Copy(BBSID, 1 , Length(BBSID) - 1) );
7023 if Board = nil then begin
7024 GikoSys.OpenBrowser(URL, gbtUserApp);
7026 //Board := GikoSys.GetUnknownBoard( nil, boardURL );
7027 //if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
7028 // ShowBBSTree( BBSs[ 1 ] );
7030 if not Board.IsThreadDatRead then
7031 GikoSys.ReadSubjectFile(Board);
7032 URL := GikoSys.Get2chBrowsableThreadURL( URL );
7033 ThreadItem := Board.FindThreadFromURL( URL );
7034 //
\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)
7035 if ThreadItem = nil then begin
7036 ThreadItem := Board.FindThreadFromFileName( BBSKey + '.dat' );
7039 if ThreadItem = nil then begin
7040 //shift ->
\90Ý
\92è
\83u
\83\89\83E
\83U
\81i
\96³
\82¯
\82ê
\82ÎIE
\81j
7042 {shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
7043 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
7045 GikoSys.OpenBrowser(URL, gbtUserApp)
7046 else if ctrlDown then
7047 GikoSys.OpenBrowser(URL, gbtIE)
7050 ThreadItem := TThreadItem.Create( nil, URL );
7051 ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
7052 if AnsiPos(Host, Board.URL) = 0 then
7053 ThreadItem.DownloadHost := Host
7055 ThreadItem.DownloadHost := '';
7056 Board.Insert(0, ThreadItem);
7057 if ActiveList is TBoard then begin
7058 if TBoard(ActiveList) = Board then
7059 ListView.Items.Count := ListView.Items.Count + 1;
7061 InsertBrowserTab(ThreadItem);
7062 DownloadContent(ThreadItem);
7065 if ThreadItem.IsLogFile then
7066 InsertBrowserTab(ThreadItem)
7068 if AnsiPos(Host, Board.URL) = 0 then
7069 ThreadItem.DownloadHost := Host
7071 ThreadItem.DownloadHost := '';
7072 InsertBrowserTab(ThreadItem);
7073 DownloadContent(ThreadItem);
7077 Board := BBSsFindBoardFromURL( URL );
7078 if Board = nil then begin
7079 GikoSys.OpenBrowser(URL, gbtAuto);
7081 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
7082 ShowBBSTree( Board.ParentCategory.ParenTBBS );
7083 SelectTreeNode( Board, True );
7088 procedure TGikoForm.AddressToolBarResize(Sender: TObject);
7090 AddressComboBox.Width := AddressToolBar.Width - MoveToToolButton.Width - 10;
7091 CoolBarResized( Sender, MainCoolBar );
7094 procedure TGikoForm.AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
7095 Shift: TShiftState);
7097 if Key = VK_RETURN then
7098 MoveToAction.Execute;
7101 procedure TGikoForm.BrowserEnter(Sender: TObject);
7103 Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
7106 procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
7108 CDS:PCopyDataStruct;
7112 CDS := Message.CopyDataStruct;
7113 GetMem(PC, CDS^.cbData);
7115 lstrcpy(PC,CDS^.lpData);
7116 SetString(sURL, PC,lstrlen(PC));
7121 Message.Result := 1;
7124 procedure TGikoForm.WndProc(var Message: TMessage);
7129 if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
7132 if Message.WParam = SC_MINIMIZE then
7135 TreeClick( TreeView.Selected );
7149 procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
7151 hComboEdit: THandle;
7152 // KeyData: Integer;
7155 if AddressComboBox.Focused or SelectComboBox.Focused then begin
7156 if Msg.CharCode in [VK_BACK] then begin
7157 hComboEdit := GetFocus;
7158 if hComboEdit <> 0 then
7159 SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, Msg.KeyData);
7160 // SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, $000E0001);
7163 if Msg.CharCode in [VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PRIOR, VK_NEXT] then begin
7164 hComboEdit := GetFocus;
7165 if hComboEdit <> 0 then
7166 SendMessage(hComboEdit, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
7170 //
\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ð
7171 KeyData := Msg.KeyData;
7172 if (KeyData and $20000000) = 0 then begin
7173 if Msg.CharCode in [Ord('F'), Ord('V'), Ord('B'), Ord('R'),
7174 Ord('A'), Ord('T'), Ord('H')] then begin
7175 if not ActionList.IsShortCut(Msg) then begin
7183 procedure TGikoForm.BrowserTabVisibleActionExecute(Sender: TObject);
7185 GikoSys.Setting.BrowserTabVisible := BrowserTabVisibleAction.Checked;
7189 procedure TGikoForm.BrowserTabTopActionExecute(Sender: TObject);
7191 BrowserTabBottomAction.Checked := False;
7192 BrowserTabTopAction.Checked := True;
7193 GikoSys.Setting.BrowserTabPosition := gtpTop;
7197 procedure TGikoForm.BrowserTabBottomActionExecute(Sender: TObject);
7199 BrowserTabTopAction.Checked := False;
7200 BrowserTabBottomAction.Checked := True;
7201 GikoSys.Setting.BrowserTabPosition := gtpBottom;
7205 procedure TGikoForm.BrowserTabTabStyleActionExecute(Sender: TObject);
7207 BrowserTabButtonStyleAction.Checked := False;
7208 BrowserTabFlatStyleAction.Checked := False;
7209 BrowserTabTabStyleAction.Checked := True;
7210 GikoSys.Setting.BrowserTabStyle := gtsTab;
7214 procedure TGikoForm.BrowserTabButtonStyleActionExecute(Sender: TObject);
7216 BrowserTabTabStyleAction.Checked := False;
7217 BrowserTabFlatStyleAction.Checked := False;
7218 BrowserTabButtonStyleAction.Checked := True;
7219 GikoSys.Setting.BrowserTabStyle := gtsButton;
7223 procedure TGikoForm.BrowserTabFlatStyleActionExecute(Sender: TObject);
7225 BrowserTabFlatStyleAction.Checked := True;
7226 BrowserTabTabStyleAction.Checked := False;
7227 BrowserTabButtonStyleAction.Checked := False;
7228 GikoSys.Setting.BrowserTabStyle := gtsFlat;
7232 procedure TGikoForm.PreviewTimerTimer(Sender: TObject);
7238 HtmlFileName: string;
7242 TargetFrameName: OleVariant;
7243 PostData: OleVariant;
7244 Headers: OleVariant;
7245 WindowHeight: Integer;
7246 WindowWidth: Integer;
7250 Protocol, Host, Path, Document, Port, Bookmark: string;
7252 PreviewTimer.Enabled := False;
7256 case GikoSys.Setting.PreviewSize of
7263 WindowHeight := 192;
7267 WindowHeight := 384;
7271 WindowHeight := 480;
7273 else begin //gpsMedium
7275 WindowHeight := 288;
7279 ARect := Rect(0, 0, WindowWidth, WindowHeight);
7281 case GikoSys.Setting.PopupPosition of
7282 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7283 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7284 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
7285 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
7286 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
7287 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
7288 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7289 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7290 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Ó
7293 html := '<html><head>'#13#10
7295 + 'function init() {'#13#10
7296 + ' if ((document.body.clientHeight >= Image1.height) && (document.body.clientWidth >= Image1.width)) {'#13#10
7298 + ' var dh, ih;'#13#10
7299 + ' dh = document.body.clientWidth / document.body.clientHeight;'#13#10
7300 + ' ih = Image1.width / Image1.height;'#13#10
7301 + ' if (document.body.clientWidth < document.body.clientHeight) {'#13#10
7302 + ' if (ih > dh)'#13#10
7303 + ' Image1.width = document.body.clientWidth;'#13#10
7305 + ' Image1.height = document.body.clientHeight;'#13#10
7307 + ' if (ih < dh)'#13#10
7308 + ' Image1.height = document.body.clientHeight;'#13#10
7310 + ' Image1.width = document.body.clientWidth;'#13#10
7313 + ' Message.style.display = "none";'#13#10
7317 + '<body topmargin="0" leftmargin="0" style="border-width: 1px; overflow:hidden; border-style: solid;" onLoad="init()">'#13#10
7318 + '<div align="center" id="Message">
\83v
\83\8c\83r
\83\85\81[
\8dì
\90¬
\92\86</div>'#13#10
7319 + '<div align="center"><img name="Image1" border="0" src="%ImageURL%"></div>'#13#10
7321 sl := TStringList.Create;
7324 HtmlFileName := GikoSys.GetAppDir + HTML_FILE_NAME;
7325 sl.Text := AnsiReplaceStr(html, '%ImageURL%', FPreviewURL);
7326 sl.SaveToFile(HtmlFileName);
7333 NavURL := HtmlFileName;
7335 TargetFrameName := '';
7338 GikoSys.ParseURI(FPreviewURL, Protocol, Host, Path, Document, Port, Bookmark);
7339 Referer := Protocol + '://' + Host;
7341 Referer := Referer + ':' + Port;
7342 Referer := Referer + Path;
7343 Headers := 'Referer: ' + Referer;
7345 FPreviewBrowser.Navigate(NavURL, Flags, TargetFrameName, PostData, Headers);
7347 if ARect.Top + WindowHeight > Screen.DesktopHeight then
7348 ARect.Top := Screen.DesktopHeight - WindowHeight;
7349 if ARect.Left + WindowWidth > Screen.DesktopWidth then
7350 ARect.Left := Screen.DesktopWidth - WindowWidth;
7351 if ARect.Left < Screen.DesktopLeft then ARect.Left := Screen.DesktopLeft;
7352 if ARect.Bottom < Screen.DesktopTop then ARect.Bottom := Screen.DesktopTop;
7354 SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
7355 ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
7357 // Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
7358 // SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
7362 procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
7364 if PreviewTimer.Enabled then
7365 PreviewTimer.Enabled := False;
7366 if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
7367 FHint.ReleaseHandle;
7370 if (FPreviewBrowser <> nil) and (IsWindowVisible(FPreviewBrowser.Handle)) then
7371 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
7372 Message.Result := 1;
7376 procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
7378 MsgBarCloseAction.Execute;
7381 function TGikoForm.OnDocumentContextMenu(Sender: TObject): WordBool;
7383 Doc: IHtmlDocument2;
7384 Range: IHTMLTxtRange;
7387 ThreadItem: TThreadItem;
7389 Doc := FactiveContent.FBrowser.Document as IHtmlDocument2;
7390 Range := Doc.selection.createRange as IHTMLTxtRange;
7391 s := CustomStringReplace(Range.text, '
\81@', ' ');//
\91S
\8ap
\8bó
\94\92\82ð
\94¼
\8ap
\8bó
\94\92\82É
7392 s := ZenToHan(Trim(s));
7393 if GikoSys.IsNumeric(s) then begin
7395 ThreadItem := GetActiveContent;
7396 if ThreadItem <> nil then begin
7398 FHint.PopupType := gptThread;
7399 SetResPopupText(ThreadItem, Num, Num, False, False);
7400 if FHint.ResCount <> 0 then
7410 procedure TGikoForm.SetResPopupText(threadItem: TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
7422 boardPlugIn : TBoardPlugIn;
7425 if StNum > ToNum then begin
7431 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
7432 if StNum + 10 < ToNum then
7433 ToNum := StNum + 10;
7435 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
7437 if ThreadItem <> nil then
7438 FHint.Title := ThreadItem.Title;
7440 if ThreadItem <> nil then begin
7441 if ThreadItem.IsBoardPlugInAvailable then begin
7442 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
7443 boardPlugIn := ThreadItem.BoardPlugIn;
7445 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
7446 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
7447 for i := StNum to ToNum do begin
7449 //
\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½
7450 tmp := boardPlugIn.GetDat( DWORD( threadItem ), i );
7451 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7452 Res := GikoSys.DivideStrLine(tmp);
7453 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7454 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7456 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7459 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7460 Body := CustomStringReplace(Body, '<br>', #10,true);
7461 Body := CustomStringReplace(Body, '</a>', '',true);
7462 Body := GikoSys.DeleteLink(Body);
7463 Body := CustomStringReplace(Body, '<', '<');
7464 Body := CustomStringReplace(Body, '>', '>');
7465 Body := CustomStringReplace(Body, '"', '"');
7466 Body := CustomStringReplace(Body, '&', '&');
7467 Body := CustomStringReplace(Body, ' ', ' ');
7469 FHint.Add(Header, Body);
7470 //FHint.Title := '';
7474 for i := StNum to ToNum do begin
7476 FileName := ThreadItem.FilePath;
7477 tmp := GikoSys.ReadThreadFile(FileName, Line);
7478 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7479 Res := GikoSys.DivideStrLine(tmp);
7480 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7481 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7483 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7485 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7486 Body := CustomStringReplace(Body, '<br>', #10,true);
7487 Body := CustomStringReplace(Body, '</a>', '',true);
7488 Body := GikoSys.DeleteLink(Body);
7489 Body := CustomStringReplace(Body, '<', '<');
7490 Body := CustomStringReplace(Body, '>', '>');
7491 Body := CustomStringReplace(Body, '"', '"');
7492 Body := CustomStringReplace(Body, '&', '&');
7493 Body := CustomStringReplace(Body, ' ', ' ');
7494 FHint.Add(Header, Body);
7495 //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
7504 procedure TGikoForm.ShowTextPopup;
7509 // if Trim(s) = '' then
7512 FHint.Font.Name := GikoSys.Setting.HintFontName;
7513 FHint.Font.Size := GikoSys.Setting.HintFontSize;
7514 FHint.Font.Color := GikoSys.Setting.HintFontColor;
7515 FHint.Color := GikoSys.Setting.HintBackColor;
7516 FHint.HeaderBold := GikoSys.Setting.ResPopupHeaderBold;
7518 if FHint.PopupType = gptRaw then
7519 ARect := FHint.CalcHintRect(Screen.Width, FHint.Caption, nil)
7521 ARect := FHint.CalcHintRect(Screen.Width, '', nil);
7522 case GikoSys.Setting.PopupPosition of
7523 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7524 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7525 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
7526 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
7527 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
7528 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
7529 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7530 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7531 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Ó
7533 //FHint.ActivateHint(ARect, s);
7534 if FHint.PopupType = gptRaw then
7535 FHint.ActivateHint(ARect, FHint.Caption)
7537 FHint.ActivateHint(ARect, '');
7539 FHint.ReleaseHandle;
7544 procedure TGikoForm.GikoHelpActionExecute(Sender: TObject);
7548 FileName := GikoSys.GetAppDir + 'batahlp.chm';
7549 if not FileExists(FileName) then begin
7552 '
\83w
\83\8b\83v
\82ª
\8c©
\82Â
\82©
\82è
\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½' + #13#10 +
7553 '
\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 +
7554 '
\83w
\83\8b\83v
\82Í
\83M
\83R
\83i
\83r
\82Ì
\83T
\83C
\83g
\82É
\92u
\82¢
\82Ä
\82 \82è
\82Ü
\82·',
7559 ShellExecute(Handle, 'open', PChar(FileName), '', PChar(GikoSys.GetAppDir), SW_SHOW);
7562 procedure TGikoForm.ToolButton18Click(Sender: TObject);
7564 if FTreeType = gttHistory then begin
7567 TreeView.Items.Clear;
7571 procedure TGikoForm.KotehanActionExecute(Sender: TObject);
7573 Dlg: TKotehanDialog;
7575 Dlg := TKotehanDialog.Create(Self);
7583 procedure TGikoForm.SetLinkBar;
7587 ToolButton: TLinkToolButton;
7588 MenuItem: TMenuItem;
7589 oldIgnoreResize : Boolean;
7591 oldIgnoreResize := FIsIgnoreResize;
7592 FIsIgnoreResize := True;
7593 MainCoolBar.Bands.BeginUpdate;
7595 LinkBarPopupMenu.Items.Clear;
7596 for i := LinkToolBar.ButtonCount - 1 downto 0 do
7597 //LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
7598 LinkToolBar.Buttons[i].Free;
7599 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
7600 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
7601 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
7602 ToolButton := TLinkToolButton.Create(LinkToolBar);
7603 // ToolButton.Parent := LinkToolBar;
7604 if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteFolder then begin
7605 MenuItem := TMenuItem.Create(Self);
7606 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
7607 LinkBarPopupMenu.Items.Add(MenuItem);
7608 ToolButton.MenuItem := MenuItem;
7609 ToolButton.ImageIndex := TOOL_ICON_FAV_FOLDER;
7610 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
7611 ToolButton.ImageIndex := TOOL_ICON_FAV_BOARD;
7612 ToolButton.OnClick := FavoriteClick;
7613 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
7614 ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
7615 ToolButton.OnClick := FavoriteClick;
7617 ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
7618 ToolButton.Left := 10000;
7619 ToolButton.Data := FavoriteTreeView.Items[i].Item[j].Data;
7620 ToolButton.AutoSize := True;
7621 ToolButton.OnDragDrop := LinkToolButtonDragDrop;
7622 ToolButton.OnDragOver := FavoriteDragOver;
7623 ToolButton.OnMouseDown := LinkToolButtonOnMouseDown;
7624 ToolButton.OnMouseMove := LinkToolButtonOnMouseMove;
7625 ToolButton.OnMouseUp := LinkToolButtonOnMouseUp;
7626 ToolButton.OnStartDrag := LinkToolButtonStartDrag;
7627 //ToolButton.DragMode := dmAutomatic;
7628 ToolButton.DragMode := dmManual;
7629 ToolButton.PopupMenu := FavoriteTreePopupMenu;
7631 LinkToolBar.InsertControl(ToolButton);
7636 { if LinkToolBar.ButtonCount = 0 then begin
7637 ToolButton := TLinkToolButton.Create(LinkToolBar);
7638 ToolButton.Style := tbsButton;
7639 ToolButton.ImageIndex := -1;
7640 ToolButton.Caption := '';
7641 LinkToolBar.InsertControl(ToolButton);
7644 MainCoolBar.Bands.EndUpdate;
7645 LoadCoolBarSettings;
7646 FIsIgnoreResize := oldIgnoreResize;
7650 procedure TGikoForm.FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
7658 if Sender = FavoriteTreeView then begin
7659 Node := FavoriteTreeView.GetNodeAt(X, Y);
7664 bound := Node.DisplayRect( False );
7665 height := bound.Bottom - bound.Top;
7666 if (bound.Top + height / 2) <= Y then
7667 Node := FavoriteTreeView.GetNodeAt(X, Y + height);
7672 if Node.IsFirstNode then
7677 if FDropSpaceNode <> nil then
7678 if FDropSpaceNode.AbsoluteIndex = Node.AbsoluteIndex then
7681 if Change then begin
7682 if FDropSpaceNode <> nil then
7683 FDropSpaceNode.Free;
7685 FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil );
7686 FDropSpaceNode.MoveTo( Node, naInsert );
7687 FDropSpaceNode.ImageIndex := -1;
7688 FDropSpaceNode.SelectedIndex := -1;
7692 if Source = FavoriteTreeView then begin
7693 if FavoriteTreeView.Selected = FavoriteTreeView.Items.GetFirstNode then begin
7698 end else if Source = BrowserTab then
7700 else if Source = ListView then
7702 else if Source is TLinkToolButton then
7704 else if Source = TreeView then
7710 procedure TGikoForm.FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
7713 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
7716 procedure TGikoForm.LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
7718 // FDragging := true;
7721 procedure TGikoForm.LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
7723 SenderNode: TTreeNode;
7724 LinkToolButton: TLinkToolButton;
7727 LinkToolButton := TLinkToolButton( Sender );
7728 SenderNode := TreeNodeDataFind( FavoriteTreeView.TopItem, LinkToolButton.Data );
7730 FavoriteDragDrop( SenderNode, Source );
7734 procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7736 favButton : TLinkToolButton;
7737 favThreadItem : TFavoriteThreadItem;
7743 if Sender is TLinkToolButton then begin
7744 favButton := TLinkToolButton( Sender );
7745 if TObject( favButton.Data ) is TFavoriteThreadItem then begin
7746 favThreadItem := TFavoriteThreadItem( favButton.Data );
7747 if favThreadItem.Item <> nil then
7748 InsertBrowserTab( favThreadItem.Item, False );
7756 procedure TGikoForm.LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
7760 TToolButton( Sender ).DragMode := dmManual;
7761 if ssLeft in Shift then begin
7762 // 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)
7763 if FDragTime = 0 then begin
7764 FDragTime := GetTickCount();
7766 Now := GetTickCount();
7767 if (Now - FDragTime) > 500 then begin
7768 if FDragButton <> TToolButton( Sender ) then begin
7770 FDragButton := TToolButton( Sender );
7771 TToolButton(Sender).BeginDrag(false ,5);
7774 {$IF Defined(debug)}
7775 ShowMessage('Error');
7786 procedure TGikoForm.LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7791 function TGikoForm.GetWidthAllToolButton(ToolBar: TToolBar): Integer;
7796 for i := 0 to ToolBar.ButtonCount - 1 do
7797 Result := Result + ToolBar.Buttons[i].Width;
7800 procedure TGikoForm.MainCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7802 Control : TWinControl;
7805 Control := FindControl(BandInfo^.hwndChild);
7806 if Control = nil then
7809 for i := MainCoolBar.Bands.Count - 1 downto 0 do begin
7810 if MainCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
7811 idx := MainCoolBar.Bands[ i ].ID;
7815 Canvas.Font.Handle := GetStockObject( DEFAULT_GUI_FONT );
7816 if (Control = MenuToolBar) or (Control = StdToolBar) then begin
7817 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
7818 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7819 BandInfo^.cxMinChild := 0;
7820 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth;
7821 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7822 end else if Control = LinkToolBar then begin
7823 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
7824 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7825 BandInfo^.cxMinChild := 0;
7826 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83\8a\83\93\83N' );
7827 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7828 end else begin // AddressToolBar
7829 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
7830 BandInfo^.cxMinChild := 0;
7831 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83A
\83h
\83\8c\83X' );
7835 procedure TGikoForm.MainCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
7841 ChevronPopupMenu.Items.Clear;
7843 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
7844 if MainCoolBar.Bands[ i ].Visible then begin
7845 if Idx = Int64(RebarChevron^.uBand) then begin
7852 if (Idx >= 0) and (MainCoolBar.Bands.Count > Idx) then begin
7853 if MainCoolBar.Bands[Idx].Control = MenuToolbar then begin
7855 end else if MainCoolBar.Bands[Idx].Control = StdToolbar then begin
7856 ToolBarChevronMenu(StdToolBar);
7857 end else if MainCoolBar.Bands[Idx].Control = LinkToolbar then begin
7861 p := MainCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
7862 ChevronPopupMenu.Popup(p.x, p.y);
7866 procedure TGikoForm.MenuBarChevronMenu;
7867 procedure SetSubMenu(MenuItem: TMenuItem; PopupItem: TMenuItem);
7873 for i := 0 to MenuItem.Count - 1 do begin
7875 if MenuItem[i] is TFavoriteMenuItem then begin
7876 Item := TFavoriteMenuItem.Create(Self);
7877 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(MenuItem[i]).Data;
7879 Item := TMenuItem.Create(Self);
7880 Item.Caption := MenuItem[i].Caption;
7881 Item.Action := MenuItem[i].Action;
7882 Item.ImageIndex := MenuItem[i].ImageIndex;
7883 Item.OnClick := MenuItem[i].OnClick;
7884 PopupItem.Add(Item);
7885 if MenuItem[i].Count > 0 then
7886 SetSubMenu(MenuItem[i], Item);
7895 ChevronPopupMenu.Items.Clear;
7896 ChevronPopupMenu.Images := MainMenu.Images;
7897 bw := GetWidthAllToolButton(MenuToolBar);
7898 if MenuToolBar.Width < bw then begin
7900 for i := 0 to MenuToolBar.ButtonCount - 1 do begin
7901 w := w + MenuToolBar.Buttons[i].Width;
7902 if MenuToolBar.Width <= w then begin
7903 Item := TMenuItem.Create(Self);
7904 Item.Caption := MenuToolBar.Buttons[i].MenuItem.Caption;
7905 //Item.Action := MenuToolBar.Buttons[i].MenuItem.Action;
7906 ChevronPopupMenu.Items.Add(Item);
7907 SetSubMenu(MenuToolbar.Buttons[i].MenuItem, Item);
7913 procedure TGikoForm.ToolBarChevronMenu(ToolBar: TToolBar);
7914 procedure SetSubMenu(PopupMenu: TPopupMenu; PopupItem: TMenuItem);
7919 if Assigned(PopupMenu.OnPopup) then
7920 PopupMenu.OnPopup(nil);
7921 for i := 0 to PopupMenu.Items.Count - 1 do begin
7923 if PopupMenu.Items[i] is TFavoriteMenuItem then begin
7924 Item := TFavoriteMenuItem.Create(Self);
7925 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(PopupMenu.Items[i]).Data;
7927 Item := TMenuItem.Create(Self);
7928 Item.Caption := PopupMenu.Items[i].Caption;
7929 Item.Action := PopupMenu.Items[i].Action;
7930 Item.ImageIndex := PopupMenu.Items[i].ImageIndex;
7931 Item.OnClick := PopupMenu.Items[i].OnClick;
7932 PopupItem.Add(Item);
7941 ChevronPopupMenu.Items.Clear;
7942 ChevronPopupMenu.Images := ToolBar.HotImages;
7943 bw := GetWidthAllToolButton(ToolBar);
7944 if ToolBar.Width < bw then begin
7946 for i := 0 to ToolBar.ButtonCount - 1 do begin
7947 w := w + ToolBar.Buttons[i].Width;
7948 if ToolBar.Width <= w then begin
7949 Case ToolBar.Buttons[i].Tag of
7952 Item := TMenuItem.Create(Self);
7953 if ToolBar.Buttons[i].Style = tbsSeparator then
7956 Item.Caption := ToolBar.Buttons[i].Caption;
7957 Item.Action := ToolBar.Buttons[i].Action;
7958 //Item.Visible := True;
7960 ChevronPopupMenu.Items.Add(Item);
7961 if ToolBar.Buttons[i].DropdownMenu <> nil then begin
7963 Item.OnClick := nil;
7964 SetSubMenu(ToolBar.Buttons[i].DropdownMenu, Item);
7968 //
\8f«
\97\88\82Ì
\82½
\82ß
\82Ì
\97\
\96ñ
7975 procedure TGikoForm.LinkBarChevronMenu;
7980 Item: TFavoriteMenuItem;
7982 Button: TLinkToolButton;
7984 ChevronPopupMenu.Items.Clear;
7985 ChevronPopupMenu.Images := LinkToolBar.Images;
7986 bw := GetWidthAllToolButton(LinkToolBar);
7987 if LinkToolBar.Width < bw then begin
7989 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
7990 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
7991 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
7992 w := w + LinkToolBar.Buttons[j].Width;
7993 if LinkToolBar.Width <= w then begin
7994 if LinkToolBar.Buttons[j] is TLinkToolButton then begin
7995 Button := TLinkToolButton(LinkToolBar.Buttons[j]);
7996 Item := TFavoriteMenuItem.Create(Self);
7997 if TObject(Button.Data) is TFavoriteFolder then begin
7998 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], Item);
7999 end else if TObject(Button.Data) is TFavoriteBoardItem then begin
8000 Item.OnClick := FavoriteClick;
8001 end else if TObject(Button.Data) is TFavoriteThreadItem then begin
8002 Item.OnClick := FavoriteClick;
8004 Item.Data := Button.Data;
8005 Item.Caption := LinkToolBar.Buttons[j].Caption;
8006 Item.ImageIndex := LinkToolBar.Buttons[j].ImageIndex;
8007 ChevronPopupMenu.Items.Add(Item);
8017 procedure TGikoForm.ListCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8019 Control: TWinControl;
8022 Control := FindControl(BandInfo^.hwndChild);
8023 if Control = nil then
8026 for i := ListCoolBar.Bands.Count - 1 downto 0 do begin
8027 if ListCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8028 idx := ListCoolBar.Bands[ i ].ID;
8032 if Control = ListToolBar then begin
8033 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8034 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8035 BandInfo^.cxMinChild := 0;
8036 BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
8037 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8039 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8040 BandInfo^.cxMinChild := 0;
8041 BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
8045 procedure TGikoForm.ListCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8050 ChevronPopupMenu.Items.Clear;
8051 Idx := RebarChevron^.uBand;
8052 if (Idx >= 0) and (ListCoolBar.Bands.Count > Idx) then begin
8053 if ListCoolBar.Bands[Idx].Control = ListToolBar then begin
8054 ToolBarChevronMenu(ListToolBar);
8057 p := ListCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8058 ChevronPopupMenu.Popup(p.x, p.y);
8062 procedure TGikoForm.BrowserCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
8064 Control: TWinControl;
8067 Control := FindControl(BandInfo^.hwndChild);
8068 if Control = nil then
8071 for i := BrowserCoolBar.Bands.Count - 1 downto 0 do begin
8072 if BrowserCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
8073 idx := BrowserCoolBar.Bands[ i ].ID;
8077 if Control = BrowserToolBar then begin
8078 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
8079 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
8080 BandInfo^.cxMinChild := 0;
8081 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
8082 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
8084 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
8085 BandInfo^.cxMinChild := 0;
8086 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
8090 procedure TGikoForm.BrowserCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
8095 ChevronPopupMenu.Items.Clear;
8096 Idx := RebarChevron^.uBand;
8097 if (Idx >= 0) and (BrowserCoolBar.Bands.Count > Idx) then begin
8098 if BrowserCoolBar.Bands[Idx].Control = BrowserToolBar then
8099 ToolBarChevronMenu(BrowserToolBar)
8102 p := BrowserCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
8103 ChevronPopupMenu.Popup(p.x, p.y);
8107 procedure TGikoForm.ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
8109 if Column^.iImage = -1 then begin
8110 Column^.mask := Column^.mask or LVCF_FMT;
8112 Column^.mask := Column^.mask or LVCF_FMT or LVCF_IMAGE;
8113 Column^.fmt := Column^.fmt or LVCFMT_IMAGE or LVCFMT_BITMAP_ON_RIGHT;
8117 procedure TGikoForm.ThreadEditorActionExecute(Sender: TObject);
8119 Editor: TEditorForm;
8121 if not (GetActiveList is TBoard) then
8123 Editor := TEditorForm.Create(Self);
8124 Editor.SetBoard(TBoard(GetActiveList));
8126 Editor.BodyEdit.SetFocus;
8129 procedure TGikoForm.ToolBarSettingActionExecute(Sender: TObject);
8131 Dlg: TToolBarSettingDialog;
8133 //Component: TComponent;
8135 Dlg := TToolBarSettingDialog.Create(Self, ActionList);
8137 Dlg.AddToolBar(StdToolBar, gttStandard);
8138 Dlg.AddToolBar(ListToolBar, gttList);
8139 Dlg.AddToolBar(BrowserToolBar, gttBrowser);
8140 case FToolBarSettingSender of
8141 tssMain: Dlg.ToolBarIndex := 0;
8142 tssList: Dlg.ToolBarIndex := 1;
8143 tssBrowser: Dlg.ToolBarIndex := 2;
8146 if ToolBarSettingAction.ActionComponent.GetParentComponent is TPopupMenu then begin
8147 Component := TPopupMenu( ToolBarSettingAction.ActionComponent.GetParentComponent ).PopupComponent;
8149 if Component = MainCoolBar then
8150 Dlg.ToolBarComboBox.ItemIndex := 0
8151 else if Component = ListCoolBar then
8152 Dlg.ToolBarComboBox.ItemIndex := 1
8153 else if Component = BrowserCoolBar then
8154 Dlg.ToolBarComboBox.ItemIndex := 2;
8157 if Dlg.ShowModal = mrOK then begin
8160 //
\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é
8161 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
8162 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth + 1;
8163 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth - 1;
8165 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
8166 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth + 1;
8167 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth - 1;
8169 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
8170 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth + 1;
8171 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth - 1;
8173 SaveToolBarSetting(StdToolBar);
8174 SaveToolBarSetting(ListToolBar);
8175 for i := ListToolBar.ControlCount - 1 downto 0 do
8177 if ListToolBar.Controls[ i ].Action = SelectItemAction then
8179 //
\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·
8180 if (i + 1) < ListToolBar.ControlCount then
8181 if ListToolBar.Controls[ i + 1 ] is TToolButton then
8182 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
8183 ListToolBar.Controls[ i + 1 ].Visible := False;
8185 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
8186 ListToolBar.Controls[ i ].Visible := False;
8187 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
8188 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
8189 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
8190 SelectComboBox.Parent := ListToolBar;
8191 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
8192 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
8193 SelectComboBoxSplitter.Parent := ListToolBar;
8198 SaveToolBarSetting(BrowserToolBar);
8202 FToolBarSettingSender := tssNone;
8206 function TGikoForm.FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
8211 for i := bar.ButtonCount - 1 downto 0 do begin
8212 if bar.Buttons[ i ].Action = action then begin
8213 Result := bar.Buttons[ i ];
8222 procedure TGikoForm.SetToolBarPopup;
8225 aIEButton : TToolButton;
8226 aCabinetBBSButton : TToolButton;
8228 for i := 0 to StdToolBar.ButtonCount - 1 do begin
8230 for i := 0 to ListToolBar.ButtonCount - 1 do begin
8231 if ListToolBar.Buttons[i].Action = IconStyle then
8232 ListToolBar.Buttons[i].DropdownMenu := ListIconPopupMenu;
8233 if ListToolBar.Buttons[i].Action = SelectReservAction then
8234 ListToolBar.Buttons[i].DropdownMenu := RoundNamePopupMenu;
8236 aIEButton := FindToolBarButton( BrowserToolBar, IEAction );
8237 if aIEButton <> nil then
8238 aIEButton.DropdownMenu := BrowserPopupMenu;
8239 aCabinetBBSButton := FindToolBarButton( StdToolBar, CabinetBBSAction );
8240 if aCabinetBBSButton <> nil then
8241 aCabinetBBSButton.DropdownMenu := BBSSelectPopupMenu;
8244 procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState;
8245 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
8254 Wnd := WindowFromPoint(MousePos);
8256 if WheelDelta > 0 then
8261 if (Wnd = BrowserTab.Handle) or
8262 (Wnd = BrowserTab.Parent.Handle) then begin
8263 BrowserTab.ScrollTabs(Delta);
8264 end else if Wnd = ListView.Handle then begin
8265 if ListView.ViewStyle = vsList then
8266 ListView.Scroll( Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE, 0 )
8268 ListView.Scroll( 0, Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE );
8275 procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
8277 if Length( SelectComboBox.Text ) = 0 then
8279 AllItemAction.Checked := True;
8280 LogItemAction.Checked := False;
8281 NewItemAction.Checked := False;
8283 //
\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é
8284 if AllItemAction.Checked then
8285 AllItemAction.Checked := False;
8286 if LogItemAction.Checked then
8287 LogItemAction.Checked := False;
8288 if NewItemAction.Checked then
8289 NewItemaction.Checked := False;
8292 if Length( SelectComboBox.Text ) = 0 then
8293 SetListViewType( gvtAll )
8295 SetListViewType( gvtUser, SelectComboBox.Text, false);
8298 procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
8299 Shift: TShiftState);
8302 if Key = VK_Return then
8305 end else if Length( SelectComboBox.Text ) = 0 then
8307 AllItemAction.Checked := True;
8308 LogItemAction.Checked := False;
8309 NewItemAction.Checked := False;
8311 //
\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é
8312 if AllItemAction.Checked then
8313 AllItemAction.Checked := False;
8314 if LogItemAction.Checked then
8315 LogItemAction.Checked := False;
8316 if NewItemAction.Checked then
8317 NewItemaction.Checked := False;
8322 procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
8327 if Length( SelectComboBox.Text ) = 0 then
8329 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
8330 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
8335 //
\8di
\82è
\8d\9e\82Ý
\8c\9f\8dõ
\82Ì
\97\9a\97ð
\8dX
\90V
8336 procedure TGikoForm.ModifySelectList;
8343 if SelectComboBox.Parent = nil then
8346 if Length( SelectComboBox.Text ) > 0 then
8348 oldText := SelectComboBox.Text;
8349 idx := GikoSys.Setting.SelectTextList.IndexOf( oldText );
8351 GikoSys.Setting.SelectTextList.Delete( idx );
8352 idx := SelectComboBox.Items.IndexOf( oldText );
8354 SelectComboBox.Items.Delete( idx );
8355 GikoSys.Setting.SelectTextList.Insert( 0, oldText );
8356 SelectComboBox.Items.Insert( 0, oldText );
8357 SelectComboBox.Text := oldText;
8364 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\95Ò
\8fW
\82·
\82é
\82½
\82ß
\82É
\8aJ
\82
8365 procedure TGikoForm.NG1Click(Sender: TObject);
8367 GikoSys.FAbon.EditNGwords;
8369 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\8dÄ
\93Ç
\82Ý
\8d\9e\82Ý
\82·
\82é
8370 procedure TGikoForm.SelectResActionExecute(Sender: TObject);
8372 Dlg: TListSelectDialog;
8373 ThreadItem : TThreadItem;
8374 FilterList : TStringList;
8377 Dlg := TListSelectDialog.Create(Self);
8379 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
8380 Dlg.SelectComboBox.Text := FSelectResWord;
8382 if Dlg.ModalResult = mrOK then begin
8383 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
8384 //
\8bó
\93ü
\97Í
\82Å OK
\82Í
\91S
\83\8c\83X
\95\
\8e¦
\82Æ
\93¯
\88Ó
\8b`
8385 AllResAction.Execute;
8387 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
8388 AllResAction.Checked := False;
8389 SelectResAction.Checked := True;
8391 //
\8dÅ
\8cã
\82É
\90Ý
\92è
\82µ
\82½
\82à
\82Ì
\82ð
\8ao
\82¦
\82Ä
\82¨
\82
8392 FSelectResWord := Dlg.SelectComboBox.Text;
8394 //
\8c\9f\8dõ
\97\9a\97ð
\82Ì
\8dX
\90V
8395 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
8397 GikoSys.Setting.SelectTextList.Delete(idx);
8398 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
8399 while Dlg.SelectComboBox.Items.Count > 100 do begin
8400 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
8404 if SelectComboBox.Parent <> nil then
8405 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
8409 //
\83t
\83B
\83\8b\83^
\82Ì
\90Ý
\92è
8410 FilterList := TStringList.Create;
8412 GikoSys.FSelectResFilter.Reverse := True;
8413 FilterList.Delimiter := ' '; //
\8bæ
\90Ø
\82è
\8eq
\82ð
\94¼
\8ap
\83X
\83y
\81[
\83X
\82É
\90Ý
\92è
8414 FilterList.DelimitedText := Dlg.SelectComboBox.Text;
8416 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8421 //
\83X
\83\8c\83b
\83h
\82Ì
\8dÄ
\95`
\89æ
8422 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
8423 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8425 ThreadItem := GetActiveContent;
8426 if ThreadItem <> nil then
8427 InsertBrowserTab( ThreadItem, True );
8429 end else if Length( FSelectResWord ) > 0 then begin
8430 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
8431 AllResAction.Checked := False;
8432 SelectResAction.Checked := True;
8440 procedure TGikoForm.SelectResActionUpdate(Sender: TObject);
8442 SelectResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
8445 procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;
8446 Shift: TShiftState);
8450 //
\91S
\82Ä
\82Ì
\83\8c\83X
\82ð
\95\
\8e¦
8451 procedure TGikoForm.AllResActionExecute(Sender: TObject);
8453 ThreadItem : TThreadItem;
8454 FilterList : TStringList;
8457 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
8458 AllResAction.Checked := True;
8459 SelectResAction.Checked := False;
8461 if Length( FSelectResWord ) > 0 then begin
8462 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
8463 FilterList := TStringList.Create;
8465 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8466 GikoSys.FSelectResFilter.Reverse := False;
8471 FSelectResWord := '';
8473 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
8474 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
8475 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8477 ThreadItem := GetActiveContent;
8478 if ThreadItem <> nil then
8479 InsertBrowserTab( ThreadItem, True );
8483 procedure TGikoForm.AllResActionUpdate(Sender: TObject);
8485 AllResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
8488 procedure TGikoForm.ReloadClick(Sender: TObject);
8490 ThreadItem : TThreadItem;
8493 if GikoSys.FAbon.ReLoadFromNGwordFile =false then begin
8494 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);
8496 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8497 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8499 ThreadItem := GetActiveContent;
8500 if ThreadItem <> nil then
8501 InsertBrowserTab( ThreadItem, True );
8506 procedure TGikoForm.GoBackClick(Sender: TObject);
8508 ThreadItem : TThreadItem;
8512 if GikoSys.FAbon.GoForward =false then begin
8513 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);
8515 s := GikoSys.FAbon.NGwordname;
8516 StatusBar.Panels.Items[2].Text := s;
8517 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8518 StatusBarResize(Sender);
8519 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8520 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8522 ThreadItem := GetActiveContent;
8523 if ThreadItem <> nil then
8524 InsertBrowserTab( ThreadItem, True );
8529 procedure TGikoForm.GoFowardClick(Sender: TObject);
8531 ThreadItem : TThreadItem;
8535 if GikoSys.FAbon.GoBack =false then begin
8536 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);
8538 s := GikoSys.FAbon.NGwordname;
8539 StatusBar.Panels.Items[2].Text := s;
8540 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8541 StatusBarResize(Sender);
8542 for i := BrowserTab.Tabs.Count - 1 downto 0 do
8543 TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
8545 ThreadItem := GetActiveContent;
8546 if ThreadItem <> nil then
8547 InsertBrowserTab( ThreadItem, True );
8552 procedure TGikoForm.SelectComboBoxSplitterMouseMove(Sender: TObject;
8553 Shift: TShiftState; X, Y: Integer);
8558 If (SelectComboBox.Parent <> nil) and (IsDraggingSelectComboBox) Then begin
8561 pos := SelectComboBoxSplitter.ClientToScreen( pos );
8562 w := SelectComboBox.Width + (pos.X - DraggingSelectComboBoxPosition.X);
8564 If w <= 50 Then Begin
8565 //
\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
8566 //
\81u
\8e~
\82Ü
\82Á
\82½(50pixel)
\88Ê
\92u
\81v
\82É
\82È
\82é
\82æ
\82¤
\82É
8567 pos.X := pos.X + (50 - w);
8569 //
\8f¬
\82³
\82
\82È
\82è
\82·
\82¬
\82È
\82¢
\82æ
\82¤
\82É
8573 //
\83`
\83\89\82Â
\82«
\8cy
\8c¸
\82Ì
\88×
8574 If SelectComboBox.Width <> w Then Begin
8575 SelectComboBox.Width := w;
8576 GikoSys.Setting.SelectComboBoxWidth := w;
8577 DraggingSelectComboBoxPosition := pos;
8582 procedure TGikoForm.SelectComboBoxSplitterMouseDown(Sender: TObject;
8583 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8587 IsDraggingSelectComboBox := True;
8590 DraggingSelectComboBoxPosition := SelectComboBoxSplitter.ClientToScreen( pos );
8593 procedure TGikoForm.SelectComboBoxSplitterMouseUp(Sender: TObject;
8594 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8596 IsDraggingSelectComboBox := False;
8599 procedure TGikoForm.StatusBarResize(Sender: TObject);
8601 StatusBar.Panels[1].Width := StatusBar.Width -
8602 StatusBar.Panels[0].Width -
8603 StatusBar.Panels[2].Width;
8605 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\92Ê
\8fí
\81v
8606 procedure TGikoForm.IndividualAbon1Click(Sender: TObject);
8608 ThreadItem : TThreadItem;
8610 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,1);
8611 ThreadItem := GetActiveContent;
8612 if ThreadItem <> nil then
8613 InsertBrowserTab( ThreadItem, True );
8615 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\93§
\96¾
\81v
8616 procedure TGikoForm.IndividualAbon2Click(Sender: TObject);
8618 ThreadItem : TThreadItem;
8620 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,0);
8621 ThreadItem := GetActiveContent;
8622 if ThreadItem <> nil then
8623 InsertBrowserTab( ThreadItem, True );
8625 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c\81i
\81j
8626 procedure TGikoForm.AntiIndividualAbonClick(Sender: TObject);
8628 ThreadItem : TThreadItem;
8631 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
8632 GikoSys.FAbon.DeleteIndividualAbon(KokoPopupMenu.Tag);
8633 ThreadItem := GetActiveContent;
8634 if ThreadItem <> nil then
8635 InsertBrowserTab( ThreadItem, True );
8637 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
8638 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
8641 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c
8642 procedure TGikoForm.N42Click(Sender: TObject);
8644 IndividualForm :TIndividualAbonForm;
8645 ThreadItem : TThreadItem;
8649 IndividualForm := TIndividualAbonForm.Create(Self);
8651 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
8652 for i :=0 to GikoSys.FAbon.GetAbonResCount-1 do begin
8653 IndividualForm.ComboBox1.Items.Add(GikoSys.FAbon.GetAbonResString(i));
8655 if IndividualForm.ShowModal = mrOK then begin
8656 GikoSys.FAbon.DeleteIndividualAbon(IndividualForm.ResNumber);
8658 ThreadItem := GetActiveContent;
8659 if ThreadItem <> nil then
8660 InsertBrowserTab( ThreadItem, True );
8662 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
8663 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
8666 IndividualForm.Free;
8670 procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
8673 if (Length( SelectComboBox.Text ) = 0) or
8674 (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
8676 SelectComboBox.Text := '';
8677 SelectComboBox.Color := clWindow;
8682 procedure TGikoForm.N51Click(Sender: TObject);
8686 //
\94Â
\96¼
\8c\9f\8dõ
8687 procedure TGikoForm.TreeSelectSearchBoardNameExecute(Sender: TObject);
8691 CurItem : TTreeNode;
8694 if InputQuery('
\94Â
\96¼
\8c\9f\8dõ','
\94Â
\96¼
\82Ì
\93ü
\97Í',s) then begin
8697 if TreeView.Selected = nil then
8698 CurItem := TreeView.Items.GetFirstNode
8700 CurItem := TreeView.Selected.GetNext;
8701 if CurItem = nil then
8702 CurItem := TreeView.Items.GetFirstNode;
8704 while CurItem <> nil do begin
8705 if (CurItem.ImageIndex <> 2) and (VaguePos(s,CurItem.Text) <> 0) then begin
8708 CurItem := CurItem.GetNext;
8711 if CurItem = nil then begin
8712 msg := '
\90æ
\93ª
\82É
\96ß
\82è
\82Ü
\82·
\82©
\81H';
8713 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
8714 CurItem := TreeView.Items.GetFirstNode;
8718 TreeView.Select(CurItem);
8721 TreeView.Select(CurItem);
8723 msg := '
\8e\9f\82É
\8ds
\82«
\82Ü
\82·
\82©
\81H';
8724 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
8738 procedure TGikoForm.CabinetFavoriteActionExecute(Sender: TObject);
8744 if CabinetPanel.Visible then begin
8745 if FTreeType = gttFavorite then begin
8746 CabinetVisible( False );
8747 CabinetFavoriteAction.Checked := False;
8749 CabinetFavoriteAction.Checked := True;
8752 CabinetVisible( True );
8753 CabinetFavoriteAction.Checked := True;
8756 // BBS...BBS, History, Favorite
8757 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 1;
8759 b := CabinetSelectPopupMenu.Items.Count - 1;
8760 for i := 0 to b do begin
8761 item := CabinetSelectPopupMenu.Items[ i ];
8762 if item is TBBSMenuItem then begin
8763 item.Checked := False;
8764 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
8765 CabinetMenu.Items[ i ].Checked := False;
8769 //
\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Ö
8770 HistoryToolBar.Hide;
8771 FavoriteToolBar.Show;
8772 TreeView.Visible := False;
8773 FavoriteTreeView.Visible := True;
8775 CabinetSelectToolButton.Caption := '
\82¨
\8bC
\82É
\93ü
\82è';
8776 FTreeType := gttFavorite;
8778 //
\83\81\83j
\83\85\81[
\8by
\82Ñ
\83{
\83^
\83\93\82Ì
\83`
\83F
\83b
\83N
\82ð
\90Ý
\92è
8779 CabinetBBSAction.Checked := False;
8780 CabinetHistoryAction.Checked := False;
8782 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\83c
\83\8a\81[
\82ð
\93W
\8aJ
8783 FavoriteTreeView.TopItem.Expanded := True;
8787 procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
8790 if (SenderNode = nil) or (SourceNode = nil) or (SenderNode = SourceNode) then
8793 if TObject(SenderNode.Data) is TFavoriteFolder then
8794 SourceNode.MoveTo(SenderNode, naAddChild)
8796 SourceNode.MoveTo(SenderNode, naInsert);
8800 procedure TGikoForm.FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
8804 FavoBoardItem: TFavoriteBoardItem;
8805 FavoThreadItem: TFavoriteThreadItem;
8807 ThreadItem: TThreadItem;
8810 if (SenderNode = nil) or (Source = nil) then
8813 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
8814 FavNode := SenderNode.Parent
8816 FavNode := SenderNode;
8820 if Source is TBoard then begin
8821 Board := TBoard( Source );
8822 FavoBoardItem := TFavoriteBoardItem.CreateWithItem( Board );
8823 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, FavoBoardItem);
8824 Node.ImageIndex := 15;
8825 Node.SelectedIndex := 15;
8826 end else if Source is TFavoriteBoardItem then begin
8827 FavoBoardItem := TFavoriteBoardItem( Source );
8828 Board := FavoBoardItem.Item;
8829 if Board <> nil then
8830 if not Board.IsThreadDatRead then
8831 GikoSys.ReadSubjectFile(Board);
8832 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, Source);
8833 Node.ImageIndex := 15;
8834 Node.SelectedIndex := 15;
8835 end else if Source is TThreadItem then begin
8836 ThreadItem := TThreadItem( Source );
8837 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
8838 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
8839 Node.ImageIndex := 16;
8840 Node.SelectedIndex := 16;
8841 end else if Source is TFavoriteThreadItem then begin
8842 FavoThreadItem := TFavoriteThreadItem( Source );
8843 ThreadItem := FavoThreadItem.Item;
8844 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, Source);
8845 Node.ImageIndex := 16;
8846 Node.SelectedIndex := 16;
8849 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
8851 FavoriteMoveTo( SenderNode, Node );
8855 procedure TGikoForm.FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
8858 SourceNode: TTreeNode;
8859 LinkToolButton: TLinkToolButton;
8862 if SenderNode = nil then
8865 if not (TObject( SenderNode.Data ) is TFavoriteFolder) then
8866 if FDropSpaceNode <> nil then
8867 SenderNode := FDropSpaceNode;
8869 if Source = FavoriteTreeView then begin
8871 SourceNode := FavoriteTreeView.Selected;
8872 FavoriteMoveTo( SenderNode, SourceNode );
8874 end else if Source is TLinkToolButton then begin
8876 LinkToolButton := TLinkToolButton( Source );
8877 //ShowMessage(LinkToolButton.Text);
8878 SourceNode := TreeNodeDataFind( FavoriteTreeView.TopItem, LinkToolButton.Data );
8879 FavoriteMoveTo( SenderNode, SourceNode );
8881 end else if Source = BrowserTab then begin
8883 idx := BrowserTab.TabIndex;
8884 FavoriteAddTo( SenderNode, BrowserTab.Tabs.Objects[idx] );
8886 end else if Source = ListView then begin
8888 FavoriteAddTo( SenderNode, ListView.Selected.Data );
8890 end else if Source = TreeView then begin
8892 FavoriteAddTo( SenderNode, TreeView.Selected.Data );
8900 procedure TGikoForm.FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
8903 SenderNode: TTreeNode;
8906 SenderNode := FavoriteTreeView.GetNodeAt(X, Y);
8907 if SenderNode <> nil then begin
8908 FavoriteDragDrop( SenderNode, Source );
8911 if FDropSpaceNode <> nil then begin
8912 FDropSpaceNode.Free;
8913 FDropSpaceNode := nil;
8918 procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
8919 Node: TTreeNode; var S: String);
8922 FavoriteTreeView.ReadOnly := True;
8927 procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
8928 Shift: TShiftState);
8934 FClickNode := FavoriteTreeView.Selected;
8935 FavoriteTreeViewRenameActionExecute( Sender );
8939 FClickNode := FavoriteTreeView.Selected;
8940 FavoriteTreeViewDeleteActionExecute( Sender );
8943 FavoriteClick( FavoriteTreeView.Selected );
8945 FavoriteTreeViewDblClick( Sender );
8950 procedure TGikoForm.FavoriteTreePopupMenuPopup(Sender: TObject);
8953 LinkToolButton: TLinkToolButton;
8956 if FavoriteTreePopupMenu.PopupComponent = FavoriteTreeView then begin
8958 FClickNode := FavoriteTreeView.Selected;
8960 end else if FavoriteTreePopupMenu.PopupComponent is TLinkToolButton then begin
8962 LinkToolButton := TLinkToolButton( FavoriteTreePopupMenu.PopupComponent );
8963 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
8964 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
8965 FClickNode := FavoriteTreeView.Items[i];
8969 for i := 0 to FClickNode.Count - 1 do begin
8970 if FClickNode.Item[i].Data = LinkToolButton.Data then begin
8971 FClickNode := FClickNode.Item[i];
8978 if FClickNode = nil then begin
8979 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
8980 FavoriteTreeDeletePopupMenu.Visible := False;
8981 FavoriteTreeRenamePopupMenu.Visible := False;
8982 FavoriteTreeNewFolderPopupMenu.Visible := False;
8983 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
8984 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
8985 FavoriteTreeURLCopyPopupMenu.Visible := False;
8986 FavoriteTreeNameCopyPopupMenu.Visible := False;
8987 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
8988 FavoriteTreeReloadPopupMenu.Visible := False;
8989 FavoriteTreeLogDeletePopupMenu.Visible := False;
8990 end else if FClickNode.IsFirstNode then begin
8991 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
8992 FavoriteTreeDeletePopupMenu.Visible := False;
8993 FavoriteTreeRenamePopupMenu.Visible := False;
8994 FavoriteTreeNewFolderPopupMenu.Visible := True;
8995 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
8996 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
8997 FavoriteTreeURLCopyPopupMenu.Visible := False;
8998 FavoriteTreeNameCopyPopupMenu.Visible := True;
8999 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9000 FavoriteTreeReloadPopupMenu.Visible := False;
9001 FavoriteTreeLogDeletePopupMenu.Visible := False;
9002 end else if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
9003 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9004 FavoriteTreeDeletePopupMenu.Visible := True;
9005 FavoriteTreeRenamePopupMenu.Visible := False;
9006 FavoriteTreeNewFolderPopupMenu.Visible := True;
9007 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9008 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9009 FavoriteTreeURLCopyPopupMenu.Visible := False;
9010 FavoriteTreeNameCopyPopupMenu.Visible := True;
9011 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9012 FavoriteTreeReloadPopupMenu.Visible := False;
9013 FavoriteTreeLogDeletePopupMenu.Visible := False;
9014 end else if TObject(FClickNode.Data) is TFavoriteFolder then begin
9015 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
9016 FavoriteTreeDeletePopupMenu.Visible := True;
9017 FavoriteTreeRenamePopupMenu.Visible := True;
9018 FavoriteTreeNewFolderPopupMenu.Visible := True;
9019 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9020 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9021 FavoriteTreeURLCopyPopupMenu.Visible := False;
9022 FavoriteTreeNameCopyPopupMenu.Visible := True;
9023 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9024 FavoriteTreeReloadPopupMenu.Visible := False;
9025 FavoriteTreeLogDeletePopupMenu.Visible := False;
9026 end else if TObject(FClickNode.Data) is TFavoriteThreadItem then begin
9027 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9028 FavoriteTreeDeletePopupMenu.Visible := True;
9029 FavoriteTreeRenamePopupMenu.Visible := True;
9030 FavoriteTreeNewFolderPopupMenu.Visible := True;
9031 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
9032 //FavoriteTreeBrowseThreadPopupMenu.Visible := True;
9033 FavoriteTreeURLCopyPopupMenu.Visible := True;
9034 FavoriteTreeNameCopyPopupMenu.Visible := True;
9035 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
9036 FavoriteTreeReloadPopupMenu.Visible := True;
9037 FavoriteTreeLogDeletePopupMenu.Visible := True;
9038 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
9039 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9040 FavoriteTreeDeletePopupMenu.Visible := True;
9041 FavoriteTreeRenamePopupMenu.Visible := True;
9042 FavoriteTreeNewFolderPopupMenu.Visible := True;
9043 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
9044 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9045 FavoriteTreeURLCopyPopupMenu.Visible := True;
9046 FavoriteTreeNameCopyPopupMenu.Visible := True;
9047 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
9048 FavoriteTreeReloadPopupMenu.Visible := True;
9049 FavoriteTreeLogDeletePopupMenu.Visible := False;
9051 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
9052 FavoriteTreeDeletePopupMenu.Visible := False;
9053 FavoriteTreeRenamePopupMenu.Visible := False;
9054 FavoriteTreeNewFolderPopupMenu.Visible := False;
9055 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
9056 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
9057 FavoriteTreeURLCopyPopupMenu.Visible := False;
9058 FavoriteTreeNameCopyPopupMenu.Visible := False;
9059 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
9060 FavoriteTreeReloadPopupMenu.Visible := False;
9061 FavoriteTreeLogDeletePopupMenu.Visible := False;
9066 procedure TGikoForm.FavoriteTreeViewDeleteActionExecute(Sender: TObject);
9068 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';
9069 DEL_MSG = '
\81g^0
\81h
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
9070 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
9073 if FClickNode = nil then
9075 if FClickNode.IsFirstNode then
9077 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
9078 if MsgBox(Handle, DEL_LINK_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION) <> ID_YES then
9080 end else if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
9081 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONQUESTION) <> ID_YES then
9085 //FDeleteList.Add(FClickNode.Data);
9086 //SetDeleteItemList(FClickNode);
9094 procedure TGikoForm.FavoriteTreeViewRenameActionExecute(Sender: TObject);
9099 if FClickNode = nil then
9101 if FClickNode.IsFirstNode then
9103 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then
9105 FavoriteTreeView.ReadOnly := False;
9106 if (FTreeType = gttFavorite) and (CabinetPanel.Visible) then begin
9107 node := FClickNode.Parent;
9108 while node <> nil do begin
9109 node.Expanded := True;
9110 node := node.Parent;
9112 FClickNode.EditText;
9114 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 );
9121 procedure TGikoForm.FavoriteTreeViewNewFolderActionExecute(
9124 NewFavFolder: TFavoriteFolder;
9128 if FClickNode = nil then
9132 if not (TObject(FClickNode.Data) is TFavoriteFolder) then begin
9133 FavoriteTreeView.Selected := FClickNode.Parent;
9134 FClickNode := FClickNode.Parent;
9137 NewFavFolder := TFavoriteFolder.Create;
9138 Node := FavoriteTreeView.Items.AddChildObject(FClickNode, '
\90V
\82µ
\82¢
\83t
\83H
\83\8b\83_', NewFavFolder);
9139 Node.ImageIndex := 14;
9140 Node.SelectedIndex := 14;
9141 // FClickNode.Selected.Expanded := True;
9142 FavoriteTreeView.Selected := Node;
9144 FavoriteTreeViewRenameAction.Execute;
9150 procedure TGikoForm.ToolButton19Click(Sender: TObject);
9153 FavoriteArrangeActionExecute( nil );
9157 procedure TGikoForm.FavoriteBrowseFolder( node: TTreeNode );
9162 if not (TObject(node.Data) is TFavoriteFolder) then
9165 for i := 0 to node.Count - 1 do
9167 if TObject(node.Item[i].Data) is TFavoriteFolder then
9168 FavoriteBrowseFolder( node.Item[i] )
9169 else if TObject(node.Item[i].Data) is TFavoriteThreadItem then
9170 FavoriteClick( node.Item[i], False );
9175 procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
9179 FavoriteBrowseFolder( FClickNode );
9180 //BrowserTab.OnChange(nil);
9184 procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
9187 FClickNode := FavoriteTreeView.Selected;
9188 FavoriteTreeViewReloadActionExecute( Sender );
9192 procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
9195 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';
9196 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
9198 ThreadItem: TThreadItem;
9199 FavThread: TFavoriteThreadItem;
9202 if FClickNode = nil then Exit;
9203 if not (TObject(FClickNode.Data) is TFavoriteThreadItem) then Exit;
9205 FavThread := TFavoriteThreadItem( FClickNode.Data );
9206 ThreadItem := FavThread.Item;
9209 if GikoSys.Setting.DeleteMsg then begin
9210 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
9214 DeleteHistory(ThreadItem);
9215 DeleteTab(ThreadItem);
9216 ThreadItem.DeleteLogFile;
9224 procedure TGikoForm.FavoriteTreeViewReloadActionExecute(Sender: TObject);
9226 ThreadItem: TThreadItem;
9227 FavThread: TFavoriteThreadItem;
9229 FavBoard: TFavoriteBoardItem;
9233 if FClickNode = nil then Exit;
9235 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
9237 if TObject( FClickNode.Data ) is TFavoriteThreadItem then begin
9238 FavThread := TFavoriteThreadItem( FClickNode.Data );
9239 ThreadItem := FavThread.Item;
9240 if ThreadItem <> nil then
9241 DownloadContent(ThreadItem, shiftDown);
9242 end else if TObject( FClickNode.Data ) is TFavoriteBoardItem then begin
9243 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9244 Board := FavBoard.Item;
9245 DownloadList(Board, shiftDown);
9250 procedure TGikoForm.FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
9252 FavThread : TFavoriteThreadItem;
9253 FavBoard : TFavoriteBoardItem;
9257 if FClickNode = nil then Exit;
9259 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9261 FavThread := TFavoriteThreadItem( FClickNode.Data );
9262 s := FavThread.URL + #13#10;
9264 Clipboard.AsText := s;
9266 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9268 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9269 s := FavBoard.URL + #13#10;
9271 Clipboard.AsText := s;
9277 procedure TGikoForm.FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
9279 ThreadItem: TThreadItem;
9280 FavThread: TFavoriteThreadItem;
9282 FavBoard: TFavoriteBoardItem;
9286 if FClickNode = nil then Exit;
9288 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9290 FavThread := TFavoriteThreadItem( FClickNode.Data );
9291 ThreadItem := FavThread.Item;
9294 s := ThreadItem.Title + #13#10;
9296 Clipboard.AsText := s;
9300 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9302 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9303 Board := FavBoard.Item;
9304 if Board <> nil then
9305 if not Board.IsThreadDatRead then
9306 GikoSys.ReadSubjectFile(Board);
9309 s := Board.Title + #13#10;
9311 Clipboard.AsText := s;
9319 procedure TGikoForm.FavoriteTreeViewNameURLCopyActionExecute(
9322 ThreadItem: TThreadItem;
9323 FavThread: TFavoriteThreadItem;
9325 FavBoard: TFavoriteBoardItem;
9329 if FClickNode = nil then Exit;
9331 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9333 FavThread := TFavoriteThreadItem( FClickNode.Data );
9334 ThreadItem := FavThread.Item;
9337 s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10;
9339 Clipboard.AsText := s;
9343 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9345 FavBoard := TFavoriteBoardItem( FClickNode.Data );
9346 Board := FavBoard.Item;
9347 if Board <> nil then
9348 if not Board.IsThreadDatRead then
9349 GikoSys.ReadSubjectFile(Board);
9352 s := Board.URL + #13#10 + Board.Title + #13#10;
9354 Clipboard.AsText := s;
9362 function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
9368 for i := 0 to Node.Count - 1 do begin
9369 if Node.Item[i].Data = FindPointer then begin
9370 Result := Node.Item[i];
9372 end else if Node.Item[i].Count > 0 then begin
9373 Found := TreeNodeDataFind( Node.Item[i], FindPointer );
9374 if Found <> nil then begin
9385 procedure TGikoForm.LinkToolBarDragDrop(Sender, Source: TObject; X,
9389 SenderNode: TTreeNode;
9393 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
9394 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
9395 SenderNode := FavoriteTreeView.Items[i];
9400 FavoriteDragDrop( SenderNode, Source );
9404 procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
9405 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
9407 if FDragWFirst <> true then begin
9408 FDragWFirst := false;
9409 end else if (X = FMouseDownPos.X) and (Y = FMouseDownPos.Y) then begin
9410 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
9411 if GikoSys.Setting.ListWidthState = glsMin then begin
9412 BrowserMaxAction.Execute;
9413 if GikoForm.Visible then
9417 if GikoSys.Setting.ListHeightState = glsMin then begin
9418 BrowserMaxAction.Execute;
9419 if GikoForm.Visible then
9426 procedure TGikoForm.LinkToolBarDragOver(Sender, Source: TObject; X,
9427 Y: Integer; State: TDragState; var Accept: Boolean);
9430 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
9434 procedure TGikoForm.OnlyAHundredResExecute(Sender: TObject);
9436 GikoSys.OnlyAHundredRes := OnlyAHundredRes.Checked;
9437 if FActiveContent <> nil then begin
9438 SetContent(FActiveContent);
9442 procedure TGikoForm.FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
9446 if FDropSpaceNode <> nil then begin
9447 FDropSpaceNode.Free;
9448 FDropSpaceNode := nil;
9454 procedure TGikoForm.ListCoolBarContextPopup(Sender: TObject;
9455 MousePos: TPoint; var Handled: Boolean);
9458 FToolBarSettingSender := tssList;
9459 MousePos := ListCoolBar.ClientToScreen( MousePos );
9460 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9464 procedure TGikoForm.MainCoolBarContextPopup(Sender: TObject;
9465 MousePos: TPoint; var Handled: Boolean);
9468 FToolBarSettingSender := tssMain;
9469 MousePos := MainCoolBar.ClientToScreen( MousePos );
9470 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9474 procedure TGikoForm.BrowserCoolBarContextPopup(Sender: TObject;
9475 MousePos: TPoint; var Handled: Boolean);
9478 FToolBarSettingSender := tssBrowser;
9479 MousePos := BrowserCoolBar.ClientToScreen( MousePos );
9480 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9483 procedure TGikoForm.ExportFavoriteFileAccept(Sender: TObject);
9485 if FavoriteDM.SaveFavoriteFile( ExportFavoriteFile.Dialog.FileName ) Then begin
9486 ShowMessage('
\83t
\83@
\83C
\83\8b\82ð
\8fo
\97Í
\82µ
\82Ü
\82µ
\82½');
9488 ShowMessage('
\83t
\83@
\83C
\83\8b\82Ì
\8fo
\97Í
\82É
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½');
9491 procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
9493 if FListViewBackGroundColor <> value then begin
9494 FListViewBackGroundColor := value;
9495 ListView.Color := FListViewBackGroundColor;
9498 procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
9500 ExportFavoriteFile.Dialog.FileName := FavoriteDM.GetFavoriteFilePath;
9503 procedure TGikoForm.CabinetBBSActionExecute(Sender: TObject);
9506 if CabinetPanel.Visible then begin
9507 if FTreeType = gtt2ch then begin
9508 CabinetVisible( False );
9510 CabinetBBSAction.Checked := False;
9512 CabinetBBSAction.Checked := True;
9515 CabinetVisible( True );
9516 CabinetBBSAction.Checked := True;
9519 if FActiveBBS = nil then
9520 ShowBBSTree( BBSs[ 0 ] )
9522 ShowBBSTree( FActiveBBS );
9526 procedure TGikoForm.FavoriteTreeViewBrowseThreadActionExecute(
9529 threadItem : TThreadItem;
9532 if FClickNode = nil then Exit;
9534 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9536 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9537 if threadItem = nil then
9539 GikoSys.OpenBrowser( threadItem.URL, gbtAuto );
9545 procedure TGikoForm.FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
9547 threadItem : TThreadItem;
9551 if FClickNode = nil then Exit;
9553 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9555 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9556 if threadItem = nil then
9558 GikoSys.OpenBrowser( threadItem.ParentBoard.URL, gbtAuto );
9560 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9562 boardItem := TFavoriteBoardItem( FClickNode.Data ).Item;
9563 if boardItem = nil then
9565 GikoSys.OpenBrowser( boardItem.URL, gbtAuto );
9571 procedure TGikoForm.UpBoardActionExecute(Sender: TObject);
9574 SelectTreeNode( GetActiveContent.ParentBoard, True );
9578 procedure TGikoForm.UpBoardActionUpdate(Sender: TObject);
9581 UpBoardAction.Enabled := GetActiveContent <> nil;
9585 procedure TGikoForm.BrowserTabContextPopup(Sender: TObject;
9586 MousePos: TPoint; var Handled: Boolean);
9590 idx := BrowserTab.IndexOfTabAt(MousePos.X, MousePos.Y);
9591 if BrowserTab.TabIndex <> idx then begin
9592 BrowserTab.TabIndex := idx;
9593 BrowserTab.OnChange(nil);
9598 procedure TGikoForm.KoreCopyExecute(Sender: TObject);
9600 KonoresCopy(KokoPopupMenu.Tag, true);
9602 procedure TGikoForm.KonoresCopy(Number: Integer; ReplaceTag : Boolean);
9604 ThreadItem: TThreadItem;
9610 boardPlugIn : TBoardPlugIn;
9612 if Number = 0 then Exit;
9613 ThreadItem := GetActiveContent;
9615 if ThreadItem <> nil then begin
9616 if ThreadItem.IsBoardPlugInAvailable then begin
9617 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
9618 boardPlugIn := ThreadItem.BoardPlugIn;
9620 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
9621 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
9622 //
\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
9623 tmp := boardPlugIn.GetDat( DWORD( threadItem ), Number );
9625 FileName := ThreadItem.FilePath;
9626 tmp := GikoSys.ReadThreadFile(FileName, Number);
9628 if tmp <> '' then begin
9629 Res := GikoSys.DivideStrLine(tmp);
9631 Header := IntToStr(Number) + '
\81F' + Res.FName + '
\81F' + Res.FDateTime + #13#10;
9632 if ReplaceTag then begin
9633 Header := CustomStringReplace(Header, '</b>', '',true);
9634 Header := CustomStringReplace(Header, '<b>', '',true);
9637 //Body := CustomStringReplace(Res.FBody, '<br> ', #13#10,true);
9638 Body := CustomStringReplace(Res.FBody, '<br>', #13#10,true);
9639 Body := CustomStringReplace(Body, '<br>', #13#10,true);
9640 Body := CustomStringReplace(Body, '</a>', '',true);
9642 Body := GikoSys.DeleteLink(Body);
9643 if ReplaceTag then begin
9644 Body := CustomStringReplace(Body, '<', '<');
9645 Body := CustomStringReplace(Body, '>', '>');
9646 Body := CustomStringReplace(Body, '"', '"');
9647 Body := CustomStringReplace(Body, '&', '&');
9648 //Body := CustomStringReplace(Body, ' ', ' ');
9651 Header := Header + Body;
9653 Clipboard.SetTextBuf( PChar(Header) );
9659 procedure TGikoForm.BrowserTabPopupMenuPopup(Sender: TObject);
9661 AddRoundNameMenu(dummy1);
9664 procedure TGikoForm.FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
9666 FavoriteDM.URLReplace(oldURLs, newURLs);
9669 procedure TGikoForm.RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
9671 RoundList.URLReplace(oldURLs, newURLs);
9674 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82é
9675 procedure TGikoForm.OnMinimize;
9677 FIsMinimize := mtMinimizing;
9678 if FActiveContent <> nil then
9679 FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
9680 PostMessage( Handle, USER_MINIMIZED, 0, 0 );
9683 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82½
9684 procedure TGikoForm.OnMinimized;
9686 FIsMinimize := mtMinimized;
9687 FIsIgnoreResize := False;
9690 procedure TGikoForm.CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
9695 affectedBand : TCoolBand;
9698 if (FOldFormWidth = Width) and not IsIconic( Handle ) and not FIsIgnoreResize then begin
9699 FIsIgnoreResize := True;
9700 PostMessage( Handle, USER_RESIZED, 0, 0 );
9701 if not (Sender is TToolBar) or (CoolBar = nil) then
9703 toolbar := TToolBar( Sender );
9705 //
\95Ï
\8dX
\82³
\82ê
\82½
\83N
\81[
\83\8b\83o
\81[
\82Ì
\92l
\82ð
\95Û
\91¶
9706 if CoolBar = MainCoolBar then begin
9707 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
9708 CoolSet.FCoolID := CoolBar.Bands[i].ID;
9709 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
9710 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
9711 GikoSys.Setting.MainCoolSet[i] := CoolSet;
9713 end else if CoolBar = ListCoolBar then begin
9714 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
9715 CoolSet.FCoolID := CoolBar.Bands[i].ID;
9716 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
9717 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
9718 GikoSys.Setting.ListCoolSet[i] := CoolSet;
9720 end else if CoolBar = BrowserCoolBar then begin
9721 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
9722 CoolSet.FCoolID := CoolBar.Bands[i].ID;
9723 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
9724 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
9725 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
9728 //
\95\9d\82Ì
\95Ï
\8dX
\82³
\82ê
\82½
\83o
\83\93\83h
\82ð
\8c©
\82Â
\82¯
\82é
9729 affectedBand := nil;
9730 for i := CoolBar.Bands.Count - 1 downto 0 do begin
9731 if CoolBar.Bands[ i ].Control.Handle = toolbar.Handle then begin
9732 band := CoolBar.Bands[ i ];
9733 if band.Break or (i = 0) then begin
9734 if i + 1 < CoolBar.Bands.Count then
9735 if not CoolBar.Bands[ i + 1 ].Break then
9736 affectedBand := CoolBar.Bands[ i + 1 ];
9739 affectedBand := CoolBar.Bands[ i - 1 ];
9744 //
\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·
9745 if CoolBar = MainCoolBar then begin
9746 coolSet := GikoSys.Setting.MainCoolSet[ band.ID ];
9747 coolSet.FCoolWidth := toolbar.Width + 25;
9748 GikoSys.Setting.MainCoolSet[ band.ID ] := coolSet;
9749 if affectedBand <> nil then begin
9750 coolSet := GikoSys.Setting.MainCoolSet[ affectedBand.ID ];
9751 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
9752 GikoSys.Setting.MainCoolSet[ affectedBand.ID ] := coolSet;
9754 end else if CoolBar = ListCoolBar then begin
9755 coolSet := GikoSys.Setting.ListCoolSet[ band.ID ];
9756 coolSet.FCoolWidth := toolbar.Width + 25;
9757 GikoSys.Setting.ListCoolSet[ band.ID ] := coolSet;
9758 if affectedBand <> nil then begin
9759 coolSet := GikoSys.Setting.ListCoolSet[ affectedBand.ID ];
9760 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
9761 GikoSys.Setting.ListCoolSet[ affectedBand.ID ] := coolSet;
9763 end else if CoolBar = BrowserCoolBar then begin
9764 coolSet := GikoSYs.Setting.BrowserCoolSet[ band.ID ];
9765 coolSet.FCoolWidth := toolbar.Width + 25;
9766 GikoSys.Setting.BrowserCoolSet[ band.ID ] := coolSet;
9767 if affectedBand <> nil then begin
9768 coolSet := GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ];
9769 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
9770 GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ] := coolSet;
9776 procedure TGikoForm.MenuToolBarResize(Sender: TObject);
9778 CoolBarResized( Sender, MainCoolBar );
9781 procedure TGikoForm.StdToolBarResize(Sender: TObject);
9783 CoolBarResized( Sender, MainCoolBar );
9786 procedure TGikoForm.LinkToolBarResize(Sender: TObject);
9788 CoolBarResized( Sender, MainCoolBar );
9791 procedure TGikoForm.ListNameToolBarResize(Sender: TObject);
9793 CoolBarResized( Sender, ListCoolBar );
9796 procedure TGikoForm.ListToolBarResize(Sender: TObject);
9798 CoolBarResized( Sender, ListCoolBar );
9801 procedure TGikoForm.BrowserNameToolBarResize(Sender: TObject);
9803 CoolBarResized( Sender, BrowserCoolBar );
9806 procedure TGikoForm.BrowserToolBarResize(Sender: TObject);
9808 CoolBarResized( Sender, BrowserCoolBar );
9811 procedure TGikoForm.BrowserTabResize(Sender: TObject);
9813 CoolBarResized( Sender, BrowserCoolBar );
9816 // *************************************************************************
9817 // ExternalBoardPlugInMain
9818 //
\83v
\83\89\83O
\83C
\83\93\83\81\83j
\83\85\81[
\82Ì
\8d\80\96Ú
\82ª
\8eÀ
\8ds
\82³
\82ê
\82½
9819 // *************************************************************************
9820 procedure TGikoForm.OnPlugInMenuItem( Sender : TObject );
9823 boardPlugIn : TBoardPlugIn;
9826 if not (Sender is TMenuItem) then
9829 item := TMenuItem( Sender );
9830 if not Assigned( Pointer( item.Tag ) ) then
9833 //
\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·
9834 boardPlugIn := TBoardPlugIn( item.Tag );
9835 boardPlugIn.PlugInMenu( item.Handle );
9839 procedure TGikoForm.ListViewClick(Sender: TObject);
9844 // TreeView
\82ª
\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
9845 procedure TGikoForm.TreeClick( Node : TTreeNode );
9853 if FTreeType = gttHistory then begin
9855 if TObject( Node.Data ) is TFavoriteThreadItem then
9856 if GetActiveContent <> TFavoriteThreadItem( Node.Data ).Item then
9857 FavoriteClick( Node );
9861 if GetActiveList is TBBS then begin
9862 for i := 0 to ListView.Columns.Count - 1 do
9863 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
9864 end else if GetActiveList is TCategory then begin
9865 for i := 0 to ListView.Columns.Count - 1 do
9866 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
9867 end else if GetActiveList is TBoard then begin
9868 for i := 0 to ListView.Columns.Count - 1 do
9869 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
9872 if TObject(Node.Data) is TBBS then begin
9873 SetActiveList(Node.data);
9874 end else if TObject(Node.Data) is TCategory then begin
9875 SetActiveList(Node.data);
9876 end else if TObject(Node.Data) is TBoard then begin
9877 if not TBoard(Node.Data).IsThreadDatRead then begin
9878 Screen.Cursor := crHourGlass;
9880 if not TBoard(Node.Data).IsThreadDatRead then
9881 GikoSys.ReadSubjectFile(Node.Data);
9883 Screen.Cursor := crDefault;
9886 SetActiveList(Node.data);
9891 // TreeView
\82ª
\83_
\83u
\83\8b\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
9892 procedure TGikoForm.TreeDoubleClick( Node : TTreeNode );
9895 ThreadItem : TThreadItem;
9896 shiftDown : Boolean;
9899 if Node = nil then Exit;
9901 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
9903 if FTreeType = gtt2ch then begin
9904 if not (TObject(Node.Data) is TBoard) then Exit;
9905 Board := TBoard(Node.Data);
9906 DownloadList(Board, shiftDown);
9907 end else if FTreeType = gttHistory then begin
9908 if not (TObject(Node.Data) is TFavoriteThreadItem) then Exit;
9909 ThreadItem := TFavoriteThreadItem(Node.Data).Item;
9910 DownloadContent(ThreadItem, shiftDown);
9915 procedure TGikoForm.TreeViewClick(Sender: TObject);
9917 TreeClick( TreeView.Selected );
9920 procedure TGikoForm.TreeViewKeyDown(Sender: TObject; var Key: Word;
9921 Shift: TShiftState);
9923 if Key = VK_BACK then begin
9924 // UpFolderButtonClick(Sender);
9925 end else if Key = VK_SPACE then begin
9926 TreeDoubleClick( TreeView.Selected );
9927 end else if Key = VK_RETURN then begin
9928 TreeClick( TreeView.Selected );
9932 //
\83u
\83\89\83E
\83U
\82Ì
\83L
\81[
\83_
\83E
\83\93\83C
\83x
\83\93\83g
9933 //
\83C
\83x
\83\93\83g
\82ð
\8eæ
\82è
\88µ
\82Á
\82½
\8fê
\8d\87\82Í True
\82ð
\95Ô
\82·
9934 function TGikoForm.BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
9936 iOIPAO : IOleInPlaceActiveObject;
9937 Dispatch : IDispatch;
9940 if Key = VK_BACK then begin
9941 UpBoardAction.Execute;
9943 {end else if Key in [VK_ESCAPE..VK_HELP] then begin
9944 //
\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
9947 end else if(Key in [VK_SPACE..VK_HELP]) and
9948 not(ssCtrl in State) and not(ssAlt in State) and not (ssShift in State) then begin
9951 //
\82»
\82ê
\88È
\8aO
\82Ì
\83C
\83x
\83\93\83g
\82Í Browser
\82É
\97¬
\82·
9952 if(FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
9953 Dispatch := FActiveContent.Browser.Application;
9954 if Dispatch <> nil then begin
9955 Dispatch.QueryInterface( IOleInPlaceActiveObject, iOIPAO );
9956 if iOIPAO <> nil then
9957 iOIPAO.TranslateAccelerator( Msg );
9960 //
\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¢
9966 //
\83M
\83R
\83i
\83r
\82Ì
\83\81\83b
\83Z
\81[
\83W
\83\8b\81[
\83v
\82ð
\89¡
\8eæ
\82è
\82µ
\82Ü
\82·
9967 procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
9974 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
9975 if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
9977 Handled := BrowserKeyDown( Msg, key, KeyDataToShiftState( Msg.lParam ) );
9982 case Msg.wParam shr 16 of
9984 if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
9985 if IsDialogMessage( FActiveContent.Browser.Handle, Msg ) then begin
9986 UpBoardAction.Execute;
9988 end else if IsDialogMessage( ListView.Handle, Msg ) then begin
9989 UpFolderAction.Execute;
9999 procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject;
10000 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
10002 favItem : TTreeNode;
10003 favThreadItem : TFavoriteThreadItem;
10009 FMouseDownPos.X := X;
10010 FMouseDownPos.Y := Y;
10014 favItem := FavoriteTreeView.GetNodeAt( X, Y );
10015 if favItem = nil then Exit;
10017 if TObject( favItem.Data ) is TFavoriteThreadItem then begin
10018 favThreadItem := TFavoriteThreadItem( favItem.Data );
10019 if favThreadItem.Item <> nil then
10020 InsertBrowserTab( favThreadItem.Item, False );
10027 procedure TGikoForm.MessagePanelResize(Sender: TObject);
10030 if FIsIgnoreResize then
10033 if GikoSys.Setting.ListOrientation = gloVertical then begin
10034 if GikoSys.Setting.ListHeightState = glsMin then begin
10035 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
10036 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
10042 procedure TGikoForm.OnResized;
10045 FOldFormWidth := Width;
10046 FIsIgnoreResize := False;
10050 procedure TGikoForm.TreeSelectNameCopyExecute(Sender: TObject);
10054 TreeView.Selected := FClickNode;
10055 s := FClickNode.Text;
10056 Clipboard.AsText := s;
10059 procedure TGikoForm.FavoriteTreeViewMouseUp(Sender: TObject;
10060 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
10063 if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold) and
10064 (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
10065 FavoriteClick( TObject( FavoriteTreeView.Selected ) );
10070 destructor TBrowserRecord.Destroy;
10074 if Self.FEvent <> nil then
10076 if Self.FBrowser <> nil then begin
10077 if Self.Thread <> nil then begin
10078 doc := Idispatch( olevariant(Self.FBrowser.ControlInterface).Document) as IHTMLDocument2;
10079 Self.Thread.ScrollTop := doc.Body.ScrollTop;
10082 TOleControl(Self.FBrowser).Visible := false;
10087 procedure TGikoForm.OnlyAHundredResUpdate(Sender: TObject);
10089 OnlyAHundredRes.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
10092 procedure TGikoForm.test1Click(Sender: TObject);
10094 TOleControl(FActiveContent.Browser).Visible := not TOleControl(FActiveContent.Browser).Visible;
10098 OleInitialize(nil);