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 TGikoForm = class(TForm)
32 StatusBar: TStatusBar;
35 TreeSplitter: TSplitter;
38 ThreadMainPanel: TPanel;
39 ListSplitter: TSplitter;
41 ListView: TGikoListView;
45 MessageHideButton: TSpeedButton;
46 MessageListView: TListView;
47 MessageSplitter: TSplitter;
49 SpeedButton1: TSpeedButton;
51 CabinetSelectToolButton: TToolButton;
52 HistoryToolBar: TToolBar;
53 ToolButton15: TToolButton;
54 ToolButton18: TToolButton;
55 ItemIcon16: TImageList;
56 ItemIcon32: TImageList;
57 HotToobarImageList: TImageList;
58 ToobarImageList: TImageList;
59 ItemImageList: TImageList;
60 ActionList: TActionList;
61 LogDeleteAction: TAction;
62 KidokuAction: TAction;
63 StdToolBarVisibleAction: TAction;
64 SearchAction: TAction;
65 GikoNaviWebPageAction: TAction;
68 MsgBarVisibleAction: TAction;
69 StatusBarVisibleAction: TAction;
70 LargeIconAction: TAction;
71 SmallIconAction: TAction;
72 ListIconAction: TAction;
73 DetailIconAction: TAction;
74 CabinetBBSAction: TAction;
75 CabinetHistoryAction: TAction;
76 CabinetVisibleAction: TAction;
77 MidokuAction: TAction;
78 AllSelectAction: TAction;
79 UpFolderAction: TAction;
80 ListNumberVisibleAction: TAction;
81 AllItemAction: TAction;
82 LogItemAction: TAction;
83 NewItemAction: TAction;
84 SelectItemAction: TAction;
85 ShowThreadAction: TAction;
89 DeleteMenu: TMenuItem;
91 KidokuMenu: TMenuItem;
92 MidokuMenu: TMenuItem;
93 AllSelectMenu: TMenuItem;
95 StdToolBarMenu: TMenuItem;
96 CabinetMenu: TMenuItem;
99 CabinetVisibleMenu: TMenuItem;
100 MessageMenu: TMenuItem;
101 StatusBarMenu: TMenuItem;
103 LargeIconMenu: TMenuItem;
104 SmallIconMenu: TMenuItem;
106 DetailMenu: TMenuItem;
109 RoundMenu: TMenuItem;
111 OptionMenu: TMenuItem;
115 AboutMenu: TMenuItem;
117 BrowserPopupMenu: TPopupMenu;
118 ShowThreadMenu: TMenuItem;
119 ShowBoardMenu: TMenuItem;
120 ShowBoardAction: TAction;
121 ListIconPopupMenu: TPopupMenu;
122 LargeIconPMenu: TMenuItem;
123 SmallIconPMenu: TMenuItem;
124 ListPMenu: TMenuItem;
125 DetailPMenu: TMenuItem;
126 CabinetCloseAction: TAction;
127 ClosePopupMenu: TPopupMenu;
128 CloseMenu: TMenuItem;
129 OptionAction: TAction;
139 RoundAction: TAction;
140 ListPopupMenu: TPopupMenu;
141 ListRoundPMenu: TMenuItem;
142 ListReservPMenu: TMenuItem;
144 ItemRoundPMenu: TMenuItem;
146 KidokuPMenu: TMenuItem;
147 MidokuPMenu: TMenuItem;
148 AllSelectPMenu: TMenuItem;
149 UrlCopyPMenu: TMenuItem;
151 DeletePMenu: TMenuItem;
153 ViewPMenu: TMenuItem;
154 LargeIconLPMenu: TMenuItem;
155 SmallIconLPMenu: TMenuItem;
156 ListLPMenu: TMenuItem;
157 DetailLPMenu: TMenuItem;
161 URLCopyAction: TAction;
165 MsgBarCloseAction: TAction;
166 ScrollTopAction: TAction;
167 ScrollLastAction: TAction;
168 ScrollNewAction: TAction;
169 ScrollKokoAction: TAction;
170 EditorAction: TAction;
172 ItemReloadAction: TAction;
173 BrowserMaxAction: TAction;
185 SelectListReloadAction: TAction;
186 SelectThreadReloadAction: TAction;
187 KokoPopupMenu: TPopupMenu;
188 KokomadePMenu: TMenuItem;
190 MenuItem1: TMenuItem;
191 MenuItem2: TMenuItem;
192 BrowserTabCloseAction: TAction;
193 BrowserTabPopupMenu: TPopupMenu;
195 KokomadeAction: TAction;
196 ZenbuAction: TAction;
197 KokoResAction: TAction;
198 SelectItemURLCopyAction: TAction;
199 SelectReservAction: TAction;
200 NotSelectTabCloseAction: TAction;
204 TreePopupMenu: TPopupMenu;
205 TreeSelectThreadPupupMenu: TMenuItem;
206 TreeSelectBoardPupupMenu: TMenuItem;
208 TreeSelectURLPupupMenu: TMenuItem;
209 TreeSelectBoradReload: TAction;
210 TreeSelectThreadReload: TAction;
211 TreeSelectURLCopy: TAction;
212 ListToolBarVisibleAction: TAction;
213 BrowserToolBarVisibleAction: TAction;
217 BrowserBottomPanel: TGikoPanel;
218 CabinetSelectPopupMenu: TPopupMenu;
220 ItemReservPMenu: TMenuItem;
221 RoundNamePopupMenu: TPopupMenu;
222 SelectNewRoundName: TAction;
223 SelectDeleteRound: TAction;
224 NewBoardAction: TAction;
227 LoginAction: TAction;
229 KeySettingAction: TAction;
231 AllTabCloseAction: TAction;
239 MessageImageList: TImageList;
240 ProgressBar: TProgressBar;
241 ArrangeAction: TAction;
243 NameURLCopyAction: TAction;
244 SelectItemNameURLCopyAction: TAction;
245 NameUrlCopyPMenu: TMenuItem;
253 ListCoolBar: TGikoCoolBar;
254 ListToolBar: TToolBar;
255 ViewNoButton: TToolButton;
256 IconToolButton: TToolButton;
257 UpFolderButton: TToolButton;
258 Sepa01ToolButton: TToolButton;
259 AllItemToolButton: TToolButton;
260 LogItemToolButton: TToolButton;
261 NewItemToolButton: TToolButton;
262 ListDownloadToolButton: TToolButton;
263 ListThreadDownloadToolButton: TToolButton;
264 ToolButton2: TToolButton;
265 ToolButton1: TToolButton;
266 BrowserCoolBar: TGikoCoolBar;
267 BrowserToolBar: TToolBar;
268 BrowserSizeButton: TToolButton;
269 ToolButton3: TToolButton;
270 TopButton: TToolButton;
271 LastBotton: TToolButton;
272 NewButton: TToolButton;
273 KokoButton: TToolButton;
274 ToolButton9: TToolButton;
275 EditorButton: TToolButton;
276 ToolButton11: TToolButton;
277 IEButton: TToolButton;
278 ToolButton5: TToolButton;
279 ItemReloadButton: TToolButton;
280 ListNameToolBar: TToolBar;
281 ListNameLabel: TLabel;
283 BrowserNameToolBar: TToolBar;
284 ItemBoardImage: TImage;
285 BrowserBoardNameLabel: TLabel;
287 BrowserNameLabel: TLabel;
288 ActiveLogDeleteAction: TAction;
292 ListNameBarVisibleAction: TAction;
294 BrowserNameBarVisibleAction: TAction;
297 TreeSelectNameURLCopy: TAction;
298 TreeSelectNameURLPupupMenu: TMenuItem;
301 PaneInitAction: TAction;
303 BrowserTabToolBar: TToolBar;
304 BrowserTab: TTabControl;
305 ToolButton7: TToolButton;
306 BrowserMinAction: TAction;
309 SelectTextClearAction: TAction;
310 MailTextClearAction: TAction;
311 NameTextClearAction: TAction;
315 LeftmostTabSelectAction: TAction;
316 LeftTabSelectAction: TAction;
317 RightTabSelectAction: TAction;
318 RightmostTabSelectAction: TAction;
324 FavoriteMenu: TMenuItem;
325 FavoriteAddAction: TAction;
327 BoardFavoriteAddMenu: TMenuItem;
328 BoardFavoriteAddAction: TAction;
329 ThreadFavoriteAddAction: TAction;
330 ThreadFavoriteAddMenu: TMenuItem;
331 TreeSelectFavoriteAddAction: TAction;
333 TreeSelectFavoriteAddPupupMenu: TMenuItem;
334 FavoriteArrangeAction: TAction;
335 FavoriteTreeView: TTreeView;
336 StateIconImageList: TImageList;
338 TopRightPanel: TPanel;
341 TopCoolPanel: TPanel;
342 MainCoolBar: TGikoCoolBar;
343 MenuToolBar: TToolBar;
344 StdToolBar: TToolBar;
345 RoundToolButton: TToolButton;
346 ToolButton6: TToolButton;
347 ToolButton4: TToolButton;
348 ToolButton13: TToolButton;
349 AbortToolButton: TToolButton;
350 LoginToolButton: TToolButton;
351 AddressToolBar: TToolBar;
352 AddressComboBox: TComboBox;
353 MoveToToolButton: TToolButton;
354 MoveToAction: TAction;
355 AddressImageList: TImageList;
356 AddressBarVisibleAction: TAction;
357 AddressToolBarMenu: TMenuItem;
359 BrowserTabVisibleAction: TAction;
362 BrowserTabTopAction: TAction;
363 BrowserTabBottomAction: TAction;
367 BrowserTabTabStyleAction: TAction;
368 BrowserTabButtonStyleAction: TAction;
369 BrowserTabFlatStyleAction: TAction;
373 PreviewTimer: TTimer;
374 MonazillaWebPageAction: TAction;
375 MonazillaWebPageAction1: TMenuItem;
376 GikoHelpAction: TAction;
379 KotehanAction: TAction;
381 LinkBarVisibleAction: TAction;
385 ChevronPopupMenu: TPopupMenu;
386 BBS2chWebPageAction: TAction;
389 GikoFolderOpenAction: TAction;
391 LinkToolBar: TToolBar;
393 ToolButton8: TToolButton;
394 ToolButton10: TToolButton;
395 ThreadEditorAction: TAction;
399 LinkBarPopupMenu: TPopupMenu;
400 ToolBarSettingAction: TAction;
402 ToolButton12: TToolButton;
403 ToolButton14: TToolButton;
404 ThreadPopupMenu: TPopupMenu;
405 MenuItem4: TMenuItem;
406 MenuItem5: TMenuItem;
407 MenuItem6: TMenuItem;
409 NameCopyAction: TAction;
410 BoardIEAction: TAction;
412 SelectItemNameCopyAction: TAction;
413 SelectItemNameCopyAction1: TMenuItem;
417 SelectComboBox: TComboBox;
418 MainCoolBarPopupMenu: TPopupMenu;
419 StdToolBarVisiblePMenu: TMenuItem;
420 AddressToolBarVisiblePMenu: TMenuItem;
421 LinkToolBarVisiblePMenu: TMenuItem;
442 SelectItemToolButton: TToolButton;
443 SelectResToolButton: TToolButton;
444 SelectResAction: TAction;
445 ToolButton16: TToolButton;
446 AllResAction: TAction;
447 AllResToolButton: TToolButton;
455 ReloadAction: TAction;
456 GoFowardAction: TAction;
457 GoBackAction: TAction;
458 SelectComboBoxSplitter: TImage;
459 IndividualAbon1: TMenuItem;
461 IndividualAbon2: TMenuItem;
463 CancellIndividualAbon: TAction;
464 AntiIndividualAbon: TMenuItem;
469 SearchBoardName: TMenuItem;
470 TreeSelectLogDeleteSeparator: TMenuItem;
471 TreeSelectSearchBoardName: TAction;
472 CabinetFavoriteAction: TAction;
475 FavoriteTreePopupMenu: TPopupMenu;
476 FavoriteTreeViewRenameAction: TAction;
477 FavoriteTreeRenamePopupMenu: TMenuItem;
478 FavoriteTreeViewNewFolderAction: TAction;
479 FavoriteTreeNewFolderPopupMenu: TMenuItem;
481 FavoriteTreeViewDeleteAction: TAction;
482 FavoriteTreeDeletePopupMenu: TMenuItem;
483 FavoriteToolBar: TToolBar;
484 ToolButton17: TToolButton;
485 ToolButton19: TToolButton;
486 FavoriteTreeViewBrowseFolderAction: TAction;
487 FavoriteTreeBrowseFolderPopupMenu: TMenuItem;
489 FavoriteTreeReloadPopupMenu: TMenuItem;
491 FavoriteTreeURLCopyPopupMenu: TMenuItem;
492 FavoriteTreeNameCopyPopupMenu: TMenuItem;
493 FavoriteTreeLogDeletePopupMenu: TMenuItem;
495 FavoriteTreeNameURLCopyPopupMenu: TMenuItem;
496 FavoriteTreeViewReloadAction: TAction;
497 FavoriteTreeViewURLCopyAction: TAction;
498 FavoriteTreeViewNameCopyAction: TAction;
499 FavoriteTreeViewNameURLCopyAction: TAction;
500 FavoriteTreeViewLogDeleteAction: TAction;
501 OnlyAHundredRes: TAction;
502 ToolButton20: TToolButton;
503 AHundredResButton: TToolButton;
505 ExportFavoriteFileAction1: TMenuItem;
506 ExportFavoriteFile: TFileSaveAs;
507 ToolButton21: TToolButton;
508 CabinetBBSToolButton: TToolButton;
509 ToolButton23: TToolButton;
510 ToolButton24: TToolButton;
513 FavoriteTreeViewBrowseBoardAction: TAction;
514 FavoriteTreeViewBrowseThreadAction: TAction;
515 UpBoardAction: TAction;
525 Browser: TWebBrowser;
526 TreeSelectLogDeletePopupMenu: TMenuItem;
528 BBSSelectPopupMenu: TPopupMenu;
529 PlugInMenu: TMenuItem;
530 TmpToolBar: TToolBar;
531 TreeSelectNameCopy: TAction;
532 TreeSelectNamePupupMenu: TMenuItem;
533 procedure FormCreate(Sender: TObject);
534 procedure FormDestroy(Sender: TObject);
535 procedure CabinetPanelHide(Sender: TObject);
536 procedure FormClose(Sender: TObject; var Action: TCloseAction);
537 procedure ListViewData(Sender: TObject; Item: TListItem);
538 procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
539 const FindString: String; const FindPosition: TPoint;
540 FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
541 Wrap: Boolean; var Index: Integer);
542 procedure ListViewDataHint(Sender: TObject; StartIndex,
544 procedure ListViewDataStateChange(Sender: TObject; StartIndex,
545 EndIndex: Integer; OldState, NewState: TItemStates);
546 procedure BrowserStatusTextChange(Sender: TObject;
547 const Text: WideString);
548 procedure BrowserTitleChange(Sender: TObject; const Text: WideString);
549 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
550 procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
551 var AllowChange: Boolean);
552 procedure ListViewKeyDown(Sender: TObject; var Key: Word;
554 procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
555 procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
556 Button: TToolButton; State: TCustomDrawState;
557 var DefaultDraw: Boolean);
558 procedure BrowserBeforeNavigate2(Sender: TObject;
559 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
560 Headers: OleVariant; var Cancel: WordBool);
561 procedure ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
562 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
563 var DefaultDraw: Boolean);
564 procedure TreeViewCustomDraw(Sender: TCustomTreeView;
565 const ARect: TRect; var DefaultDraw: Boolean);
566 procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
567 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
568 procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
569 procedure TreeViewDblClick(Sender: TObject);
570 procedure ListViewCustomDraw(Sender: TCustomListView;
571 const ARect: TRect; var DefaultDraw: Boolean);
572 procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
573 Shift: TShiftState; X, Y: Integer);
574 procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
575 procedure MessageListViewResize(Sender: TObject);
576 procedure ExitActionExecute(Sender: TObject);
577 procedure AllSelectActionExecute(Sender: TObject);
578 procedure StdToolBarVisibleActionExecute(Sender: TObject);
579 procedure MsgBarVisibleActionExecute(Sender: TObject);
580 procedure StatusBarVisibleActionExecute(Sender: TObject);
581 procedure LargeIconActionExecute(Sender: TObject);
582 procedure SmallIconActionExecute(Sender: TObject);
583 procedure ListIconActionExecute(Sender: TObject);
584 procedure DetailIconActionExecute(Sender: TObject);
585 procedure SearchActionExecute(Sender: TObject);
586 procedure OptionActionExecute(Sender: TObject);
587 procedure GikoNaviWebPageActionExecute(Sender: TObject);
588 procedure AboutActionExecute(Sender: TObject);
589 procedure CabinetHistoryActionExecute(Sender: TObject);
590 procedure CabinetVisible( isVisible : Boolean );
591 procedure CabinetVisibleActionExecute(Sender: TObject);
592 procedure AllItemActionExecute(Sender: TObject);
593 procedure LogItemActionExecute(Sender: TObject);
594 procedure NewItemActionExecute(Sender: TObject);
595 procedure SelectItemActionExecute(Sender: TObject);
596 procedure ListNumberVisibleActionExecute(Sender: TObject);
597 procedure UpFolderActionExecute(Sender: TObject);
598 procedure IconStyleExecute(Sender: TObject);
599 procedure RoundActionExecute(Sender: TObject);
600 procedure StopActionExecute(Sender: TObject);
601 procedure MsgBarCloseActionExecute(Sender: TObject);
602 procedure BrowserMaxActionExecute(Sender: TObject);
603 procedure ScrollTopActionExecute(Sender: TObject);
604 procedure ScrollLastActionExecute(Sender: TObject);
605 procedure ScrollNewActionExecute(Sender: TObject);
606 procedure ScrollKokoActionExecute(Sender: TObject);
607 procedure EditorActionExecute(Sender: TObject);
608 procedure IEActionExecute(Sender: TObject);
609 procedure ShowThreadActionExecute(Sender: TObject);
610 procedure ShowBoardActionExecute(Sender: TObject);
611 procedure URLCopyActionExecute(Sender: TObject);
612 procedure ItemReloadActionExecute(Sender: TObject);
613 procedure SelectListReloadActionExecute(Sender: TObject);
614 procedure SelectThreadReloadActionExecute(Sender: TObject);
615 procedure SelectListReloadActionUpdate(Sender: TObject);
616 procedure AllItemActionUpdate(Sender: TObject);
617 procedure LogItemActionUpdate(Sender: TObject);
618 procedure NewItemActionUpdate(Sender: TObject);
619 procedure SelectItemActionUpdate(Sender: TObject);
620 procedure UpFolderActionUpdate(Sender: TObject);
621 procedure FormResize(Sender: TObject);
622 procedure ScrollTopActionUpdate(Sender: TObject);
623 procedure ScrollLastActionUpdate(Sender: TObject);
624 procedure ScrollNewActionUpdate(Sender: TObject);
625 procedure ScrollKokoActionUpdate(Sender: TObject);
626 procedure EditorActionUpdate(Sender: TObject);
627 procedure IEActionUpdate(Sender: TObject);
628 procedure ShowThreadActionUpdate(Sender: TObject);
629 procedure ShowBoardActionUpdate(Sender: TObject);
630 procedure SelectThreadReloadActionUpdate(Sender: TObject);
631 procedure ItemReloadActionUpdate(Sender: TObject);
632 procedure ListViewDblClick(Sender: TObject);
633 procedure LogDeleteActionExecute(Sender: TObject);
634 procedure KokomadeActionExecute(Sender: TObject);
635 procedure ZenbuActionExecute(Sender: TObject);
636 procedure KokoResActionExecute(Sender: TObject);
637 procedure ListPopupMenuPopup(Sender: TObject);
638 procedure SelectItemURLCopyActionExecute(Sender: TObject);
639 procedure SelectItemURLCopyActionUpdate(Sender: TObject);
640 procedure AllSelectActionUpdate(Sender: TObject);
641 procedure LogDeleteActionUpdate(Sender: TObject);
642 procedure BrowserTabCloseActionExecute(Sender: TObject);
643 procedure NotSelectTabCloseActionExecute(Sender: TObject);
644 procedure TreeSelectBoradReloadExecute(Sender: TObject);
645 procedure TreeSelectThreadReloadExecute(Sender: TObject);
646 procedure TreeSelectURLCopyExecute(Sender: TObject);
647 procedure TreePopupMenuPopup(Sender: TObject);
648 procedure ListToolBarVisibleActionExecute(Sender: TObject);
649 procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
650 procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
651 var Cancel: WordBool);
652 procedure ListSplitterCanResize(Sender: TObject; var NewSize: Integer;
653 var Accept: Boolean);
654 procedure ListSplitterMoved(Sender: TObject);
655 procedure BrowserTabChange(Sender: TObject);
656 procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
657 Shift: TShiftState; X, Y: Integer);
658 procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
659 State: TDragState; var Accept: Boolean);
660 procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
661 procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
663 procedure BrowserDocumentComplete(Sender: TObject;
664 const pDisp: IDispatch; var URL: OleVariant);
665 procedure SelectReservActionUpdate(Sender: TObject);
666 procedure RoundNamePopupMenuPopup(Sender: TObject);
667 procedure SelectNewRoundNameExecute(Sender: TObject);
668 procedure SelectDeleteRoundExecute(Sender: TObject);
669 procedure SelectReservActionExecute(Sender: TObject);
670 procedure NewBoardActionExecute(Sender: TObject);
671 procedure LoginActionExecute(Sender: TObject);
672 procedure KeySettingActionExecute(Sender: TObject);
673 procedure AllTabCloseActionExecute(Sender: TObject);
674 procedure ArrangeActionExecute(Sender: TObject);
675 procedure NameURLCopyActionExecute(Sender: TObject);
676 procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
677 procedure URLCopyActionUpdate(Sender: TObject);
678 procedure NameURLCopyActionUpdate(Sender: TObject);
679 procedure BrowserTabCloseActionUpdate(Sender: TObject);
680 procedure NotSelectTabCloseActionUpdate(Sender: TObject);
681 procedure AllTabCloseActionUpdate(Sender: TObject);
682 procedure SelectItemNameURLCopyActionUpdate(Sender: TObject);
683 procedure ActiveLogDeleteActionExecute(Sender: TObject);
684 procedure ActiveLogDeleteActionUpdate(Sender: TObject);
685 procedure ListNameBarVisibleActionExecute(Sender: TObject);
686 procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
687 procedure TreeSelectNameURLCopyExecute(Sender: TObject);
688 procedure PaneInitActionExecute(Sender: TObject);
689 procedure FormShow(Sender: TObject);
690 procedure BrowserTabToolBarResize(Sender: TObject);
691 procedure BrowserMinActionExecute(Sender: TObject);
692 procedure SelectTextClearActionExecute(Sender: TObject);
693 procedure NameTextClearActionExecute(Sender: TObject);
694 procedure MailTextClearActionExecute(Sender: TObject);
695 procedure LeftmostTabSelectActionExecute(Sender: TObject);
696 procedure LeftTabSelectActionExecute(Sender: TObject);
697 procedure RightTabSelectActionExecute(Sender: TObject);
698 procedure RightmostTabSelectActionExecute(Sender: TObject);
699 procedure LeftmostTabSelectActionUpdate(Sender: TObject);
700 procedure LeftTabSelectActionUpdate(Sender: TObject);
701 procedure RightTabSelectActionUpdate(Sender: TObject);
702 procedure RightmostTabSelectActionUpdate(Sender: TObject);
703 procedure FavoriteMenuClick(Sender: TObject);
704 procedure FavoriteAddActionExecute(Sender: TObject);
705 procedure FavoriteAddActionUpdate(Sender: TObject);
706 procedure BoardFavoriteAddActionExecute(Sender: TObject);
707 procedure BoardFavoriteAddActionUpdate(Sender: TObject);
708 procedure ThreadFavoriteAddActionExecute(Sender: TObject);
709 procedure ThreadFavoriteAddActionUpdate(Sender: TObject);
710 procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
711 procedure FavoriteArrangeActionExecute(Sender: TObject);
712 procedure MainCoolBarResize(Sender: TObject);
713 procedure MoveToActionExecute(Sender: TObject);
714 procedure AddressToolBarResize(Sender: TObject);
715 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
717 procedure AddressBarVisibleActionExecute(Sender: TObject);
718 procedure BrowserEnter(Sender: TObject);
719 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
720 procedure BrowserTabVisibleActionExecute(Sender: TObject);
721 procedure BrowserTabTopActionExecute(Sender: TObject);
722 procedure BrowserTabBottomActionExecute(Sender: TObject);
723 procedure BrowserTabTabStyleActionExecute(Sender: TObject);
724 procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
725 procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
726 procedure PreviewTimerTimer(Sender: TObject);
727 procedure MessageHideButtonClick(Sender: TObject);
728 procedure MonazillaWebPageActionExecute(Sender: TObject);
729 procedure GikoHelpActionExecute(Sender: TObject);
730 procedure ToolButton18Click(Sender: TObject);
731 procedure KotehanActionExecute(Sender: TObject);
732 procedure LinkBarVisibleActionExecute(Sender: TObject);
733 procedure BBS2chWebPageActionExecute(Sender: TObject);
734 procedure GikoFolderOpenActionExecute(Sender: TObject);
735 procedure MainCoolBarBandInfo(Sender: TObject;
736 var BandInfo: PReBarBandInfoA);
737 procedure MainCoolBarChevronClick(Sender: TObject;
738 RebarChevron: PNMRebarChevron);
739 procedure ListCoolBarBandInfo(Sender: TObject;
740 var BandInfo: PReBarBandInfoA);
741 procedure ListCoolBarChevronClick(Sender: TObject;
742 RebarChevron: PNMRebarChevron);
743 procedure BrowserCoolBarBandInfo(Sender: TObject;
744 var BandInfo: PReBarBandInfoA);
745 procedure BrowserCoolBarChevronClick(Sender: TObject;
746 RebarChevron: PNMRebarChevron);
747 procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
748 procedure ThreadEditorActionExecute(Sender: TObject);
749 procedure ThreadEditorActionUpdate(Sender: TObject);
750 procedure ToolBarSettingActionExecute(Sender: TObject);
751 procedure NameCopyActionExecute(Sender: TObject);
752 procedure BoardIEActionExecute(Sender: TObject);
753 procedure SelectItemNameCopyActionExecute(Sender: TObject);
754 procedure SelectItemNameCopyActionUpdate(Sender: TObject);
755 procedure BoardIEActionUpdate(Sender: TObject);
756 procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
757 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
758 procedure NameCopyActionUpdate(Sender: TObject);
759 procedure SelectComboBoxChange(Sender: TObject);
760 procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
762 procedure SelectComboBoxExit(Sender: TObject);
763 procedure NG1Click(Sender: TObject);
764 procedure SelectResActionExecute(Sender: TObject);
765 procedure SelectResActionUpdate(Sender: TObject);
766 procedure FormKeyUp(Sender: TObject; var Key: Word;
768 procedure AllResActionExecute(Sender: TObject);
769 procedure AllResActionUpdate(Sender: TObject);
770 procedure ReloadClick(Sender: TObject);
771 procedure GoBackClick(Sender: TObject);
772 procedure GoFowardClick(Sender: TObject);
773 procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
774 Shift: TShiftState; X, Y: Integer);
775 procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
776 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
777 procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
778 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
779 procedure StatusBarResize(Sender: TObject);
780 procedure IndividualAbon1Click(Sender: TObject);
781 procedure IndividualAbon2Click(Sender: TObject);
782 procedure N42Click(Sender: TObject);
783 procedure SelectComboBoxEnter(Sender: TObject);
784 procedure AntiIndividualAbonClick(Sender: TObject);
785 procedure N51Click(Sender: TObject);
786 procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
787 procedure CabinetFavoriteActionExecute(Sender: TObject);
788 procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
790 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
791 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
793 procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
795 procedure FavoriteTreePopupMenuPopup(Sender: TObject);
796 procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
797 procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
798 procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
799 procedure ToolButton19Click(Sender: TObject);
800 procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject);
801 procedure FavoriteTreeViewDblClick(Sender: TObject);
802 procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject);
803 procedure FavoriteTreeViewReloadActionExecute(Sender: TObject);
804 procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
805 procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
806 procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject);
807 procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
808 procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
809 Shift: TShiftState; X, Y: Integer);
810 procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
811 State: TDragState; var Accept: Boolean);
812 procedure OnlyAHundredResExecute(Sender: TObject);
813 procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
815 procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
816 var Handled: Boolean);
817 procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
818 var Handled: Boolean);
819 procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
820 var Handled: Boolean);
821 procedure ExportFavoriteFileAccept(Sender: TObject);
822 procedure ExportFavoriteFileBeforeExecute(Sender: TObject);
823 procedure CabinetBBSActionExecute(Sender: TObject);
824 procedure FavoriteTreeViewBrowseThreadActionExecute(Sender: TObject);
825 procedure FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
826 procedure UpBoardActionExecute(Sender: TObject);
827 procedure UpBoardActionUpdate(Sender: TObject);
828 procedure BrowserTabContextPopup(Sender: TObject; MousePos: TPoint;
829 var Handled: Boolean);
830 procedure KoreCopyExecute(Sender: TObject);
831 procedure BrowserTabPopupMenuPopup(Sender: TObject);
832 procedure MenuToolBarResize(Sender: TObject);
833 procedure StdToolBarResize(Sender: TObject);
834 procedure LinkToolBarResize(Sender: TObject);
835 procedure ListNameToolBarResize(Sender: TObject);
836 procedure ListToolBarResize(Sender: TObject);
837 procedure BrowserNameToolBarResize(Sender: TObject);
838 procedure BrowserToolBarResize(Sender: TObject);
839 procedure BrowserTabResize(Sender: TObject);
840 procedure ListViewClick(Sender: TObject);
841 procedure TreeViewClick(Sender: TObject);
842 procedure TreeViewKeyDown(Sender: TObject; var Key: Word;
844 procedure FavoriteTreeViewMouseDown(Sender: TObject;
845 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
846 procedure MessagePanelResize(Sender: TObject);
848 procedure TreeSelectNameCopyExecute(Sender: TObject);
849 procedure FavoriteTreeViewMouseUp(Sender: TObject;
850 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
853 //RoundList : TRoundList;
857 FEnabledCloseButton: Boolean;
858 // ThreadCreate: TThreadCreate;
860 FClickNode: TTreeNode;
863 FPreviewBrowser: TPreviewBrowser;
866 FBrowserSizeHeight: Integer;
867 FBrowserSizeWidth: Integer;
869 // FFavorite: TFavorite;
870 FBrowserComplete: Boolean;
871 FTabHintIndex: Integer;
872 FListStyle: TViewStyle; //
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93\83X
\83^
\83C
\83\8b
873 FItemNoVisible: Boolean; //
\83\8a\83X
\83g
\94Ô
\8d\86\95\
\8e¦
\83t
\83\89\83O
874 FViewType: TGikoViewType; //
\83\8a\83X
\83g
\83A
\83C
\83e
\83\80\95\
\8e¦
\83^
\83C
\83v
875 FActiveList: TObject;
876 FActiveContent: TThreadItem; //
878 FHistoryList: TList; //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
879 FTreeType: TGikoTreeType;
883 // FLastRoundTime: TDateTime;
884 BrowserNullTab: TThreadItem;
885 // DoubleClickOccurred: array [TMouseButton] of Boolean;
886 FDownloadTitle: string; //
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86\82Ì
\83^
\83C
\83g
\83\8b\96¼
887 FDownloadMax: Integer; //
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86\82Ì
\8dÅ
\91å
\83T
\83C
\83Y
888 FEvent: THTMLDocumentEventSink;//
\83u
\83\89\83E
\83U
\83h
\83L
\83\85\83\81\83\93\83g
\83C
\83x
\83\93\83g
890 // Fkeynum : Integer; //
\83L
\81[
\83{
\81[
\83h
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\97p
892 IsDraggingSelectComboBox : Boolean;
893 DraggingSelectComboBoxPosition : TPoint;
895 FSearchDialog: TSearchDialog;
897 FDropSpaceNode: TTreeNode;
899 FDragTime : Cardinal; //
\83\8a\83\93\83N
\82ÌD&D
\97p
900 FDragButton : TToolButton; //
\83\8a\83\93\83N
\82ÌD&D
\97p
\82ÉDrag
\82µ
\82Ä
\82éButton
\95Û
\91¶
901 FDragWFirst : Boolean; //WebTab
\82ÌD&D
\97p
903 FListViewBackGroundColor : TColor; //ListView
\82ÌBackGroundColor
904 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¦
905 FOddColor : TColor; //
\82»
\82Ì
\90F
907 FSelectResWord : string; //
\83\8c\83X
\8di
\8d\9e\83\8f\81[
\83h
908 FIsIgnoreResize : Boolean; //
\83\8a\83T
\83C
\83Y
\83C
\83x
\83\93\83g
\82ð
\96³
\8e\8b\82·
\82é
\82©
\82Ç
\82¤
\82©
909 FIsMinimize : TMinimizeType; //
\8dÅ
\8f¬
\89»
\82µ
\82Ä
\82¢
\82é
\8dÅ
\92\86\82©
910 FOldFormWidth : Integer; //
\92¼
\91O
\82Ì
\83E
\83B
\83\93\83h
\83E
\82Ì
\95\9d
911 FToolBarSettingSender : TToolBarSettingSenderType; //
\83c
\81[
\83\8b\83o
\81[
\90Ý
\92è
\82ð
\83N
\83\8a\83b
\83N
\82µ
\82½
\83N
\81[
\83\8b\83o
\81[
912 FMouseDownPos : TPoint; //
\83u
\83\89\83E
\83U
\83^
\83u
\82Å
\83}
\83E
\83X
\82ð
\89\9f\82µ
\82½
\82Æ
\82«
\82Ì
\8dÀ
\95W
913 procedure SetBoardTreeNode( inBBS : TBBS );
914 function SetCategoryListItem(ABBS2ch: TBBS): Integer;
915 function SetBoardListItem(Category: TCategory): Integer;
916 function SetThreadListItem(Board: TBoard): Integer;
917 // function GetRoundName(index: integer): string;
919 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
920 procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
921 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
922 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
923 procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
925 procedure SetActiveList(Obj: TObject);
927 procedure ListDoubleClick;
928 procedure BrowserMovement(AName: string);
929 procedure SelectListItem(List: TList);
930 // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
931 procedure DeleteTab(ThreadItem: TThreadItem);
932 function Hook(var Message: TMessage): Boolean;
933 procedure AddRoundNameMenu(MenuItem: TMenuItem);
934 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload;
935 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload;
936 procedure SetSelectRoundName(Sender: TObject);
937 function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
939 procedure SetMenuFont;
940 // procedure CreateFavMenu(Folder: TFavoriteFolder);
941 procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
942 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
943 procedure FavoriteClick(Sender: TObject); overload;
944 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
945 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
946 function OnDocumentContextMenu(Sender: TObject): WordBool;
947 // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
948 procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
949 procedure ShowTextPopup;
950 //procedure ShowTextPopup(HintData: THintData);
951 // procedure SetStdToolBar;
952 // function GetAction(ActionName: string): TContainedAction;
953 procedure SetLinkBar;
954 procedure ClearLinkBar;
955 function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
956 procedure MenuBarChevronMenu;
957 procedure LinkBarChevronMenu;
958 procedure ToolBarChevronMenu(ToolBar: TToolBar);
959 procedure ModifySelectList;
960 procedure FavoriteBrowseFolder( node: TTreeNode );
961 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
962 procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
963 procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
964 procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
965 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
966 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
967 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
968 procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
969 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
971 procedure BrowserTabClick(Sender: TObject);
972 procedure SetListViewBackGroundColor(value: TColor);
973 procedure BBSMenuItemOnClick( Sender : TObject );
975 procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
976 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82É
\95Û
\91¶
977 procedure SaveCoolBarSettings;
978 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82©
\82ç
\95\9c\8c³
979 procedure LoadCoolBarSettings;
980 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82é
981 procedure OnMinimize;
982 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82½
983 procedure OnMinimized;
984 // CoolBar
\82ª
\83T
\83C
\83Y
\95Ï
\8dX
\82³
\82ê
\82½
985 procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
986 // TreeView
\82ª
\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
987 procedure TreeClick( Node : TTreeNode );
988 // TreeView
\82ª
\83_
\83u
\83\8b\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
989 procedure TreeDoubleClick( Node : TTreeNode );
990 //
\83M
\83R
\83i
\83r
\82Ì
\83\81\83b
\83Z
\81[
\83W
\83\8b\81[
\83v
\82ð
\89¡
\8eæ
\82è
\82µ
\82Ü
\82·
991 procedure HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
992 //
\83u
\83\89\83E
\83U
\82Ì
\83L
\81[
\83_
\83E
\83\93\83C
\83x
\83\93\83g
993 //
\83C
\83x
\83\93\83g
\82ð
\8eæ
\82è
\88µ
\82Á
\82½
\8fê
\8d\87\82Í True
\82ð
\95Ô
\82·
994 function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
997 procedure CreateParams(var Params: TCreateParams); override;
998 procedure WndProc(var Message: TMessage); override;
999 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
1000 procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
1001 procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
1005 // FDownload: TDownload;
1006 FControlThread: TThreadControl;
1007 procedure MoveToURL(URL: string);
1008 procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
1009 procedure ReloadBBS;
1010 function GetHttpState: Boolean;
1011 procedure SetEnabledCloseButton(Enabled: Boolean);
1012 function GetTreeNode(Data: TObject): TTreeNode;
1013 procedure AppFormDeactivate(Sender: TObject);
1014 // procedure CabinetPanelVisible(PanelVisible: Boolean);
1015 procedure ListViewAllSelect;
1017 property ListStyle: TViewStyle read FListStyle write FListStyle;
1018 property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
1019 property ViewType: TGikoViewType read FViewType write FViewType;
1021 property NameCookie: string read FNameCookie write FNameCookie;
1022 property MailCookie: string read FMailCookie write FMailCookie;
1024 procedure SetContent(ThreadItem: TThreadItem);
1025 function GetActiveContent: TThreadItem;
1026 function GetActiveList: TObject;
1028 property ActiveList: TObject read GetActiveList write SetActiveList;
1029 // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
1031 procedure SetListViewType(AViewType: TGikoViewType); overload;
1032 procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
1033 procedure DownloadContent(ThreadItem: TThreadItem);
1034 procedure DownloadList(Board: TBoard);
1035 procedure PlaySound(SoundEventName: string);
1037 function AddHistory( FavItem: TFavoriteThreadItem ): Boolean;
1038 procedure DeleteHistory( threadItem: TThreadItem );
1039 procedure ClearHistory;
1040 procedure SaveHistory;
1041 procedure LoadHistory;
1042 procedure ShowBBSTree( inBBS : TBBS );
1043 procedure ShowBBSTreeOld( inBBS : TBBS );
1044 procedure ShowHistoryTree;
1045 procedure SetHistoryTreeNode;
1046 // procedure SelectTreeNode(Item: TObject);
1047 procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
1048 procedure SetBrowserTabState;
1049 // property Favorite: TFavorite read FFavorite write FFavorite;
1050 procedure SetToolBarPopup;
1051 procedure ShowFavoriteAddDialog( Item : TObject );
1052 procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
1053 procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
1054 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
1055 property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
1056 property OddColor : TColor read FOddColor write FOddColor;
1058 function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
1059 procedure OnPlugInMenuItem( Sender : TObject );
1062 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
1065 TFavoriteMenuItem = class(TMenuItem)
1069 property Data: Pointer read FData write FData;
1072 TBBSMenuItem = class(TMenuItem)
1076 property Data: Pointer read FData write FData;
1079 TLinkToolButton = class(TToolButton)
1083 property Data: Pointer read FData write FData;
1087 GikoForm: TGikoForm;
1092 About, Option, Round, Splash, Sort, ListSelect,
1093 NewBoard, MojuUtils,Clipbrd;
1096 CAPTION_NAME: string = '
\83M
\83R
\83i
\83r';
1097 BLANK_HTML: string = 'about:blank';
1098 SELECTCOMBOBOX_NAME: string = ''; // '
\83X
\83\8c\83b
\83h
\8di
\8d\9e\8c\9f\8dõ';
1099 SELECTCOMBOBOX_COLOR: TColor = clWindow;
1101 DandD_THRESHOLD = 5; //D&D
\82Ìè
\87\92l
\81ipixcel)
1102 //
\83c
\83\8a\81[
\81E
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93
1103 ITEM_ICON_2CH1 = 0; //2ch
\83A
\83C
\83R
\83\93
1104 ITEM_ICON_2CH2 = 1; //2ch
\83A
\83C
\83R
\83\93
1105 ITEM_ICON_CATEGORY1 = 2; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1106 ITEM_ICON_CATEGORY2 = 3; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1107 ITEM_ICON_BOARD_NOSUBJECT = 3; //
\93Ç
\82Ý
\8d\9e\82Ü
\82ê
\82Ä
\82¢
\82È
\82¢
\94Â
\83A
\83C
\83R
\83\93
1108 ITEM_ICON_BOARD1 = 4; //
\94Â
\83A
\83C
\83R
\83\93
1109 ITEM_ICON_BOARD2 = 5; //
\94Â
\83A
\83C
\83R
\83\93
1110 ITEM_ICON_THREADLOG1 = 6; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1111 ITEM_ICON_THREADLOG2 = 7; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1112 ITEM_ICON_THREAD1 = 8; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1113 ITEM_ICON_THREAD2 = 9; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1114 ITEM_ICON_THREADNEW1 = 10; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1115 ITEM_ICON_THREADNEW2 = 11; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1116 ITEM_ICON_SORT1 = 12; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1117 ITEM_ICON_SORT2 = 13; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1118 ITEM_ICON_BOARD_LOG = 17; //
\83X
\83\8c\83\8d\83O
\82 \82è
\94Â
\83A
\83C
\83R
\83\93
1119 ITEM_ICON_BOARD_NEW = 18; //
\83X
\83\8c\90V
\92\85\94Â
\83A
\83C
\83R
\83\93
1121 //
\83c
\81[
\83\8b\83o
\81[
\83A
\83C
\83R
\83\93
1122 TOOL_ICON_HEIGHT_MAX = 16; //
\8d\82\82³
\8dÅ
\91å
\83A
\83C
\83R
\83\93
1123 TOOL_ICON_HEIGHT_MIN = 17; //
\8d\82\82³
\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1124 TOOL_ICON_HEIGHT_NORMAL = 18; //
\8d\82\82³
\95W
\8f\80\83A
\83C
\83R
\83\93
1125 TOOL_ICON_WIDTH_MAX = 19; //
\95\9d\8dÅ
\91å
\83A
\83C
\83R
\83\93
1126 TOOL_ICON_WIDTH_MIN = 20; //
\95\9d\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1127 TOOL_ICON_WIDTH_NORMAL = 21; //
\95\9d\95W
\8f\80\83A
\83C
\83R
\83\93
1129 TOOL_ICON_FAV_FOLDER = 30; //
\82¨
\8bC
\82É
\93ü
\82è
\83t
\83H
\83\8b\83_
\83A
\83C
\83R
\83\93
1130 TOOL_ICON_FAV_BOARD = 31; //
\82¨
\8bC
\82É
\93ü
\82è
\94Â
\83A
\83C
\83R
\83\93
1131 TOOL_ICON_FAV_THREAD = 32; //
\82¨
\8bC
\82É
\93ü
\82è
\83X
\83\8c\83A
\83C
\83R
\83\93
1133 HTML_FILE_NAME = 'temp_preview.html';
1135 WM_XBUTTONDOWN = $020B;
1136 WM_XBUTTONUP = $020C;
1137 WM_XBUTTONDBLCLK = $020D;
1140 USER_TREECLICK = WM_USER + 2000;
1141 USER_RESIZED = WM_USER + 2001;
1142 USER_MINIMIZED = WM_USER + 2002;
1143 USER_SETLINKBAR = WM_USER + 2003;
1147 procedure TGikoForm.CreateParams(var Params: TCreateParams);
1150 if FormStyle in [fsNormal, fsStayOnTop] then begin
1151 if BorderStyle in [bsSingle, bsSizeable] then begin
1152 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1153 Params.WndParent := 0;
1158 procedure TGikoForm.FormCreate(Sender: TObject);
1160 TVS_NOTOOLTIPS = $0080;
1166 wp: TWindowPlacement;
1168 item : TBBSMenuItem;
1172 Writeln('============================================================');
1173 Writeln('
\83M
\83R
\83i
\83r
\83f
\83o
\83b
\83O
\83R
\83\93\83\
\81[
\83\8b');
1175 Writeln('
\82±
\82Ì
\89æ
\96Ê
\82ð
\95Â
\82¶
\82È
\82¢
\82Å
\82
\82¾
\82³
\82¢
\81B');
1176 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¢');
1177 Writeln('============================================================');
1179 Application.OnDeactivate := AppFormDeactivate;
1180 Self.OnDeactivate := AppFormDeactivate;
1181 Application.HookMainWindow(Hook);
1182 Application.OnMessage := HandleAppMessage;
1184 FTreeType := gttNone;
1186 FSearchDialog := nil;
1188 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô
1189 FIsIgnoreResize := True;
1191 //
\8eè
\82Ì
\83J
\81[
\83\
\83\8b
1192 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1195 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1196 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1198 //
\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Æ)
1199 InitializeBoardPlugIns;
1201 EnabledCloseButton := True;
1204 //
\8f\84\89ñ
\83f
\81[
\83^
\93Ç
\82Ý
\8d\9e\82Ý
1205 RoundList := TRoundList.Create;
1206 RoundList.LoadRoundBoardFile;
1208 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\97ñ
\8b\93(ReadFavorite
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1209 GikoSys.ListBoardFile;
1211 RoundList.LoadRoundThreadFile;
1213 if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
1214 GikoSys.ListBoardFile;
1216 //
\83\81\83j
\83\85\81[
\82É
\92Ç
\89Á
1217 for i := Length( BBSs ) - 1 downto 0 do begin
1219 item := TBBSMenuItem.Create( PopupMenu );
1220 item.Caption := BBSs[ i ].Title;
1221 item.Data := BBSs[ i ];
1222 item.OnClick := BBSMenuItemOnClick;
1223 CabinetSelectPopupMenu.Items.Insert( 0, item );
1224 item := TBBSMenuItem.Create( PopupMenu );
1225 item.Caption := BBSs[ i ].Title;
1226 item.Data := BBSs[ i ];
1227 item.OnClick := BBSMenuItemOnClick;
1228 CabinetMenu.Insert( 0, item );
1229 item := TBBSMenuItem.Create( PopupMenu );
1230 item.Caption := BBSs[ i ].Title;
1231 item.Data := BBSs[ i ];
1232 item.OnClick := BBSMenuItemOnClick;
1233 BBSSelectPopupMenu.Items.Insert( 0, Item );
1239 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g(LoadHistory
\82æ
\82è
\82à
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1240 FHistoryList := TList.Create;
1242 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1245 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
1246 // FFavorite := TFavorite.Create(FavoriteTreeView);
1247 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1248 FavoriteDM.ReadFavorite;
1250 //
\83\8a\83X
\83g
\83X
\83^
\83C
\83\8b
1251 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1253 //
\83\81\83C
\83\93\83N
\81[
\83\8b\83o
\81[
\88Ê
\92u
1254 // MainCoolBar.Top := 0;
1255 // MainCoolBar.Left := 0;
1257 //
\83A
\83j
\83\81\83p
\83l
\83\8b\88Ê
\92u
1258 AnimePanel.Top := 0;
1259 AnimePanel.Left := 0;
1261 //
\8ae
\8eí
\89Â
\8e\8b\8fó
\91Ô
\82È
\82Ç
\90Ý
\92è
1263 //
\83L
\83\83\83r
\83l
\83b
\83g
1264 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1266 //
\83\81\83b
\83Z
\81[
\83W
\83o
\81[
1267 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1268 MsgBarVisibleActionExecute(nil);
1269 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1271 //
\83X
\83e
\81[
\83^
\83X
\83o
\81[
1272 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1273 StatusBarVisibleActionExecute(nil);
1275 //
\83t
\83H
\83\93\83g
\81E
\90F
\90Ý
\92è
1276 TreeView.Items.BeginUpdate;
1277 FavoriteTreeView.Items.BeginUpdate;
1278 ListView.Items.BeginUpdate;
1280 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1281 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1282 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1283 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1285 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1286 FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1287 FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1288 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1290 ListView.Font.Name := GikoSys.Setting.ListFontName;
1291 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1292 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1293 //ListView.Color := GikoSys.Setting.ListBackColor;
1294 ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1295 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1296 FOddColor := GikoSys.Setting.OddColor;
1299 TreeView.Items.EndUpdate;
1300 FavoriteTreeView.Items.EndUpdate;
1301 ListView.Items.EndUpdate;
1303 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1304 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1306 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
1307 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1308 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1309 FDragWFirst := false;
1311 // TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
1312 // TreeView.Selected := TreeView.Items[0]; //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
1313 SetContent(nil); //
\83u
\83\89\83E
\83U
\82ð
\8bó
\94\92\95\
\8e¦
1315 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95\9c\8c³
1316 wp.length := sizeof(wp);
1317 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1318 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1319 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1320 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1321 wp.showCmd := SW_HIDE;
1322 SetWindowPlacement(Handle, @wp);
1324 // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1325 // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1326 if GikoSys.Setting.WindowMax then
1327 WindowState := wsMaximized;
1329 //
\83M
\83R
\83A
\83j
\83\81
1331 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1332 if FileExists(FileName) then
1333 Animate.FileName := FileName;
1341 //
\83X
\83\8c\91S
\95\94\95\
\8e¦
\83{
\83^
\83\93\82ð
\89\9f\82³
\82ê
\82½
\8fó
\91Ô
\82É
\82·
\82é
1342 AllItemAction.Checked := True;
1343 AllResAction.Checked := True;
1345 //TreeView
\82Ì
\8e×
\96\82\8fL
\82¢ToolTip
\82ð
\94ñ
\95\
\8e¦
1346 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1347 Style := Style or TVS_NOTOOLTIPS;
1348 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1350 //
\83c
\83\8a\81[
\82ð
\83\81\83C
\83\93\82¾
\82¯
\95\
\8e¦
\82É
\82µ
\82Ä
\8dÅ
\91å
\89»
1351 TreeView.Align := alClient;
1352 FavoriteTreeView.Align := alClient;
1353 FavoriteTreeView.Visible := False;
1355 //
\83u
\83\89\83E
\83U
\83T
\83C
\83Y
\95Ï
\8dX
\82Ì
\8f\89\8aú
\89»
1356 // FBrowserSizeFlag := False;
1357 // FBrowserSizeHeight := ViewPanel.Height;
1359 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1360 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1362 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1363 ArrangeAction.Execute;
1365 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1366 case GikoSys.Setting.ListWidthState of
1368 ViewPanel.Width := 1;
1369 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1370 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1373 ViewPanel.Width := GikoSys.Setting.ListWidth;
1374 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1375 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1378 ViewPanel.Width := GikoSys.Setting.ListWidth;
1379 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1380 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1384 case GikoSys.Setting.ListHeightState of
1386 ViewPanel.Height := 1;
1387 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1388 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1391 ViewPanel.Height := GikoSys.Setting.ListHeight;
1392 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1393 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1396 ViewPanel.Height := GikoSys.Setting.ListHeight;
1397 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1398 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1403 //
\83v
\83\8d\83O
\83\8c\83X
\83o
\81[
\82Ì
\8f\89\8aú
\89»
1404 // ProgressBar.Visible := False;
1405 ProgressBar.Parent := StatusBar;
1406 ProgressBar.Top := 2;
1407 ProgressBar.Left := 0;
1408 ProgressBar.Width := StatusBar.Panels[0].Width;
1409 ProgressBar.Height := StatusBar.Height - 2;
1410 ProgressBar.Position := 0;
1412 //
\83_
\83E
\83\93\83\8d\81[
\83h
\83I
\83u
\83W
\83F
\83N
\83g
1413 FControlThread := TThreadControl.Create(True);
1414 FControlThread.MaxThreadCount := 1;
1415 FControlThread.Resume;
1416 FControlThread.OnDownloadEnd := DownloadEnd;
1417 FControlThread.OnDownloadMsg := DownloadMsg;
1418 FControlThread.OnWork := Work;
1419 FControlThread.OnWorkBegin := WorkBegin;
1420 FControlThread.OnWorkEnd := WorkEnd;
1421 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1423 //
\8di
\8d\9e\8c\9f\8dõ
\97\9a\97ð
1424 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1426 //
\83u
\83\89\83E
\83U
\83^
\83u
\90Ý
\92è
1429 BrowserBoardNameLabel.Caption := '';
1430 BrowserNameLabel.Caption := '';
1433 FTabHintIndex := -1;
1435 //
\83\8a\83\93\83N
\83o
\81[
1438 //
\83\81\83j
\83\85\81[
\83t
\83H
\83\93\83g
1441 //
\83c
\81[
\83\8b\83o
\81[Wrapable
1442 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1443 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1445 KeepDefaultToolButton(StdToolBar, TmpToolBar);
1446 KeepDefaultToolButton(ListToolBar, TmpToolBar);
1447 KeepDefaultToolButton(BrowserToolBar, TmpToolBar);
1449 MakeDefaultINIFile();
1450 //
\83c
\81[
\83\8b\83{
\83^
\83\93\93Ç
\82Ý
\8d\9e\82Ý
1451 ReadToolBarSetting(ActionList, StdToolBar);
1452 ReadToolBarSetting(ActionList, ListToolBar);
1454 for i := ListToolBar.ControlCount - 1 downto 0 do
1456 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1458 //
\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·
1459 if (i + 1) < ListToolBar.ControlCount then
1460 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1461 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1462 ListToolBar.Controls[ i + 1 ].Visible := False;
1464 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
1465 ListToolBar.Controls[ i ].Visible := False;
1466 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
1467 SelectComboBox.Parent := ListToolBar;
1468 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1469 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1470 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
1471 SelectComboBoxSplitter.Parent := ListToolBar;
1472 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1479 ReadToolBarSetting(ActionList, BrowserToolBar);
1481 OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes;
1482 //
\83A
\83h
\83\8c\83X
\83o
\81[
1483 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1485 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³
\82ÍFormShow
\82É
\88Ú
\93®
\82µ
\82½
1487 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\82ª
\96³
\82¢
\8fê
\8d\87\82Í
\83\81\83b
\83Z
\81[
\83W
\95\
\8e¦
1488 if not FileExists(GikoSys.GetBoardFileName) then begin
1489 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
1490 + '
\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
1491 + '
\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';
1492 MsgBox(SplashWindow.Handle, msg, '
\83M
\83R
\83i
\83r', MB_OK or MB_ICONINFORMATION);
1493 NewBoardAction.Execute;
1496 //
\83L
\81[
\90Ý
\92è
\93Ç
\82Ý
\8d\9e\82Ý
1497 GikoSys.LoadKeySetting(ActionList);
1499 //
\8dÅ
\8fI
\8f\84\89ñ
\8e\9e\8aÔ
1500 // FLastRoundTime := 0;
1503 FHint := TResPopup.Create(Self);
1505 //
\8dÅ
\8cã
\82É
\91I
\91ð
\82³
\82ê
\82½
\83L
\83\83\83r
\83l
\83b
\83g
\82Ì
\95\9c\8c³
1506 CabinetVisible( False );
1507 if GikoSys.Setting.CabinetVisible then begin
1508 i := CabinetSelectPopupMenu.Items.Count - 1;
1509 if GikoSys.Setting.CabinetIndex = i - 1 then
1510 CabinetHistoryAction.Execute
1511 else if GikoSys.Setting.CabinetIndex = i then
1512 CabinetFavoriteAction.Execute
1514 if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1515 ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1516 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô 2
1517 FIsIgnoreResize := True;
1518 CabinetBBSAction.Execute;
1521 ShowBBSTreeOld( BBSs[ 0 ] );
1522 PostMessage( Handle, USER_TREECLICK, 0, 0 );
1525 //
\8bN
\93®
\8e\9e\82É
\95Û
\91¶
\82³
\82ê
\82Ä
\82µ
\82Ü
\82¤
\91Î
\8dô 3
1526 FIsIgnoreResize := True;
1528 //
\83I
\81[
\83g
\83\8d\83O
\83C
\83\93
1529 if GikoSys.Setting.AutoLogin then
1530 LoginAction.Execute;
1532 //
\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
1533 for i := 1 to ParamCount do begin
1534 MoveToURL(ParamStr(i));
1539 s := GikoSys.FAbon.NGwordname;
1540 StatusBar.Panels[2].Text := s;
1541 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1542 StatusBarResize(Sender);
1544 dummy1.Caption := ItemReservPMenu.Caption;
1545 dummy1.Hint := ItemReservPMenu.Hint;
1547 //Samba24
\82Ì
\83t
\83@
\83C
\83\8b\83`
\83F
\83b
\83N
1548 GikoSys.SambaFileExists();
1551 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82É
\95Û
\91¶
1552 procedure TGikoForm.SaveCoolBarSettings;
1558 if IsIconic( Handle ) or FIsIgnoreResize then
1561 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Main)
1562 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1563 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1564 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1565 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1566 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1568 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Board)
1569 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1570 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1571 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1572 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1573 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1575 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Browser)
1576 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1577 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1578 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1579 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1580 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1585 // CoolBar
\82Ì
\90Ý
\92è
\82ð
\95Ï
\90\94\82©
\82ç
\95\9c\8c³
1586 procedure TGikoForm.LoadCoolBarSettings;
1592 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Main)
1593 MainCoolBar.Bands.BeginUpdate;
1595 // for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1596 for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin
1597 CoolSet := GikoSys.Setting.MainCoolSet[i];
1598 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1599 FIsIgnoreResize := False;
1600 SaveCoolBarSettings;
1603 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1604 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1605 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1608 MainCoolBar.Bands.EndUpdate;
1611 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Board)
1612 ListCoolBar.Bands.BeginUpdate;
1614 // for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1615 for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin
1616 CoolSet := GikoSys.Setting.ListCoolSet[i];
1617 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1618 FIsIgnoreResize := False;
1619 SaveCoolBarSettings;
1622 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1623 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1624 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1627 ListCoolBar.Bands.EndUpdate;
1630 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Browser)
1631 BrowserCoolBar.Bands.BeginUpdate;
1633 // for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1634 for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
1635 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1636 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
1637 FIsIgnoreResize := False;
1638 SaveCoolBarSettings;
1641 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1642 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1643 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1646 BrowserCoolBar.Bands.EndUpdate;
1654 procedure TGikoForm.FormShow(Sender: TObject);
1656 ShowWindow(Application.Handle, SW_HIDE);
1658 //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½
1659 //
\83c
\81[
\83\8b\83o
\81[
\95\
\8e¦
1660 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1661 StdToolBarVisibleActionExecute( nil );
1662 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1663 AddressBarVisibleActionExecute( nil );
1664 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1665 LinkBarVisibleActionExecute( nil );
1666 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1667 ListToolBarVisibleActionExecute( nil );
1668 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1669 ListNameBarVisibleActionExecute( nil );
1670 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1671 BrowserToolBarVisibleActionExecute( nil );
1672 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1673 BrowserNameBarVisibleActionExecute( nil );
1675 //
\83u
\83\89\83E
\83U
\83^
\83u
1676 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1677 BrowserTabVisibleActionExecute(nil);
1679 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1680 BrowserTabTopAction.Checked := True;
1681 BrowserTabTopActionExecute(nil);
1683 BrowserTabBottomAction.Checked := True;
1684 BrowserTabBottomActionExecute(nil);
1687 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1688 BrowserTabTabStyleAction.Checked := True;
1689 BrowserTabTabStyleActionExecute(nil);
1690 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1691 BrowserTabButtonStyleAction.Checked := True;
1692 BrowserTabButtonStyleActionExecute(nil);
1694 BrowserTabFlatStyleAction.Checked := True;
1695 BrowserTabFlatStyleActionExecute(nil);
1698 // CoolBar
\95\9c\8c³
1699 LoadCoolBarSettings;
1701 FIsIgnoreResize := False;
1704 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1706 if ( GikoSys.Setting.ShowDialogForEnd ) and
1707 (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
1713 //Application.HookMainWindow(Hook);
1714 Application.UnhookMainWindow(Hook);
1715 Application.Terminate;
1718 procedure TGikoForm.FormDestroy(Sender: TObject);
1721 // CoolSet: TCoolSet;
1722 wp: TWindowPlacement;
1724 // Application.OnDeactivate := nil;
1725 // Self.OnDeactivate := nil;
1728 if GetActiveList is TBBS then begin
1729 for i := 0 to ListView.Columns.Count - 1 do
1730 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1731 end else if GetActiveList is TCategory then begin
1732 for i := 0 to ListView.Columns.Count - 1 do
1733 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1734 end else if GetActiveList is TBoard then begin
1735 for i := 0 to ListView.Columns.Count - 1 do
1736 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1741 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95Û
\91¶
1742 wp.length := sizeof(wp);
1743 GetWindowPlacement(Handle, @wp);
1744 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1745 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1746 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1747 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1748 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1750 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1751 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1752 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1753 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1754 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1755 if ArrangeAction.Checked then
1756 GikoSys.Setting.ListOrientation := gloVertical
1758 GikoSys.Setting.ListOrientation := gloHorizontal;
1759 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1763 //
\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è
1764 //
\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¢
1766 //
\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
1768 if GikoForm.WindowState <> wsMinimized then
1769 SaveCoolBarSettings;
1772 GikoSys.Setting.WriteWindowSettingFile;
1773 GikoSys.Setting.WriteNameMailSettingFile;
1777 //
\82¨
\8bC
\82É
\93ü
\82è
\95Û
\91¶
1779 //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é
1780 FavoriteDM.WriteFavorite;
1786 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1787 //NotSelectTabCloseAction.Execute;
1788 {if BrowserTab.Tabs.Count >= 1 then begin
1789 DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1796 TreeView.Items.BeginUpdate;
1797 for i := TreeView.Items.Count - 1 downto 0 do begin
1798 TreeView.Items[i].Free;
1800 TreeView.Items.Clear;
1801 TreeView.Items.EndUpdate;
1805 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\95Û
\91¶
1807 //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
1808 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1812 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
\95Û
\91¶
1826 //
\8f\84\89ñ
\83\8a\83X
\83g
\95Û
\91¶&
\94j
\8aü
1828 RoundList.SaveRoundFile;
1842 FControlThread.Terminate;
1843 FControlThread.WaitFor;
1847 FControlThread.Free;
1850 // TBBS
\82Í
\95Û
\8e\9d\82µ
\82Ä
\82¢
\82é TCategory, TBoard, TThreadItem
\82·
\82×
\82Ä
\82ð
\8aJ
\95ú
\82·
\82é
1851 // 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Å
1852 // BoardPluteIns
\82Ì
\8aJ
\95ú
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ
1854 for i := Length( BBSs ) - 1 downto 0 do begin
1855 if BBSs[ i ] <> nil then
1863 for i := Length( BoardPlugIns ) - 1 downto 0 do begin
1864 if BoardPlugIns[ i ] <> nil then
1865 BoardPlugIns[ i ].Free;
1866 BoardPlugIns[ i ] := nil;
1872 if FEvent <> nil then
1876 if FHint <> nil then begin
1877 FHint.ReleaseHandle;
1882 if TPreviewBrowser <> nil then begin
1883 FPreviewBrowser.Free;
1884 FPreviewBrowser := nil;
1891 //
\83t
\83H
\81[
\83\80\83N
\83\8d\81[
\83Y
1892 procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1895 //
\83L
\83\83\83r
\83l
\83b
\83g
\81~
\83{
\83^
\83\93\83N
\83\8a\83b
\83N
1896 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1898 CabinetVisibleAction.Execute;
1899 // CabinetPanelVisible(false);
1902 procedure TGikoForm.ReloadBBS;
1905 item : TBBSMenuItem;
1907 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1908 NotSelectTabCloseAction.Execute;
1909 if BrowserTab.Tabs.Count >= 1 then
1910 DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1911 //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
1912 TreeView.Items.Clear;
1916 for i := Length( BBSs ) - 1 downto 0 do begin
1917 if BBSs[ i ] <> nil then
1926 FTreeType := gttNone;
1928 GikoSys.ListBoardFile; //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\93Ç
\8d\9e
1929 //
\83\81\83j
\83\85\81[
\82ð
\8dí
\8f\9c
1930 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1932 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1933 CabinetSelectPopupMenu.Items[ i ].Free;
1934 CabinetMenu.Items[ i ].Free;
1939 //
\83\81\83j
\83\85\81[
\82É
\92Ç
\89Á
1940 for i := Length( BBSs ) - 1 downto 0 do begin
1942 item := TBBSMenuItem.Create( PopupMenu );
1943 item.Caption := BBSs[ i ].Title;
1944 item.Data := BBSs[ i ];
1945 item.OnClick := BBSMenuItemOnClick;
1946 CabinetSelectPopupMenu.Items.Insert( 0, item );
1947 item := TBBSMenuItem.Create( PopupMenu );
1948 item.Caption := BBSs[ i ].Title;
1949 item.Data := BBSs[ i ];
1950 item.OnClick := BBSMenuItemOnClick;
1951 CabinetMenu.Insert( 0, item );
1955 ShowBBSTree( BBSs[ 0 ] );
1957 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1962 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
1963 //FavoriteDM.WriteFavorite;
1965 FavoriteDM.ReadFavorite;
1971 //
\83{
\81[
\83h
\83c
\83\8a\81[
\90Ý
\92è
1972 procedure TGikoForm.SetBoardTreeNode(
1978 CategoryNode: TTreeNode;
1979 BoardNode: TTreeNode;
1980 Category: TCategory;
1983 //
\94Â
\83\8a\83X
\83g
\82Ì
\90Ý
\92è
1984 FActiveBBS := inBBS;
1985 TreeView.Items.BeginUpdate;
1986 TreeView.Items.Clear;
1988 if not inBBS.IsBoardFileRead then
1989 GikoSys.ReadBoardFile( inBBS );
1991 if SplashWindow <> nil then
1992 SplashWindow.ProgressBar.Max := inBBS.Count;
1996 Root := TreeView.Items.Add( nil, inBBS.Title );
1997 Root.ImageIndex := ITEM_ICON_2CH1;
1998 Root.SelectedIndex := ITEM_ICON_2CH2;
2000 for i := 0 to inBBS.Count - 1 do begin
2001 Category := TCategory(inBBS.Items[i]);
2002 CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
2003 CategoryNode.Data := Category;
2004 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
2005 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
2007 for j := 0 to Category.Count - 1 do begin
2008 Board := TBoard(Category.Items[j]);
2010 BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
2011 BoardNode.Data := Board;
2012 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
2013 if not Board.IsLogFile then begin
2014 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
2015 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
2017 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
2018 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
2019 for k := 0 to Board.Count - 1 do begin
2020 if Board.Items[ k ].IsLogFile then begin
2021 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
2022 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
2031 CategoryNode.Expanded := Category.NodeExpand;
2033 if SplashWindow <> nil then begin
2034 SplashWindow.ProgressBar.StepIt;
2035 Application.ProcessMessages;
2039 TreeView.Items.EndUpdate;
2043 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
2045 COLUMN: array[0..0] of string = ('
\83J
\83e
\83S
\83\8a\96¼');
2047 ListColumn: TListColumn;
2050 ListView.Items.BeginUpdate;
2052 Screen.Cursor := crHourGlass;
2054 ListView.Columns.Clear;
2055 for i := 0 to Length(COLUMN) - 1 do begin
2056 ListColumn := ListView.Columns.Add;
2057 ListColumn.Caption := COLUMN[i];
2058 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
2061 ListView.Items.Count := 0;
2062 ListView.Items.Clear;
2063 ListView.Items.Count := ABBS2ch.Count;
2065 // UpFolderAction.Enabled := False;
2066 // AllItemAction.Enabled := False;
2067 // LogItemAction.Enabled := False;
2068 // NewItemAction.Enabled := False;
2069 // SelectItemAction.Enabled := False;
2070 // ListDownloadToolButton.Enabled := False;
2071 // BoardReservToolButton.Enabled := False;
2072 // ListThreadDownloadToolButton.Enabled := False;
2074 ListNameLabel.Caption := ABBS2ch.Title;
2075 FolderImage.Picture := nil;
2076 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
2079 FSortOrder := False;
2080 ListViewColumnClick(nil, ListView.Column[0]);
2082 Result := ABBS2ch.Count;
2084 Screen.Cursor := crDefault;
2085 ListView.Items.EndUpdate;
2089 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
2091 COLUMN: array[0..2] of string = ('
\94Â
\96¼', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e');
2093 ListColumn: TListColumn;
2096 ListView.Items.BeginUpdate;
2098 Screen.Cursor := crHourGlass;
2100 ListView.Columns.Clear;
2101 for i := 0 to Length(COLUMN) - 1 do begin
2102 ListColumn := ListView.Columns.Add;
2103 ListColumn.Caption := COLUMN[i];
2104 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
2107 ListView.Items.Count := 0;
2108 ListView.Items.Clear;
2109 ListView.Items.Count := Category.Count;
2111 // UpFolderAction.Enabled := True;
2112 // AllItemAction.Enabled := False;
2113 // LogItemAction.Enabled := False;
2114 // NewItemAction.Enabled := False;
2115 // SelectItemAction.Enabled := False;
2116 // ListDownloadToolButton.Enabled := False;
2117 // BoardReservToolButton.Enabled := False;
2118 // ListThreadDownloadToolButton.Enabled := False;
2120 ListNameLabel.Caption := Category.Title;
2121 FolderImage.Picture := nil;
2122 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2125 FSortOrder := False;
2126 ListViewColumnClick(nil, ListView.Column[0]);
2128 Result := Category.Count;
2130 Screen.Cursor := crDefault;
2131 ListView.Items.EndUpdate;
2135 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2137 COLUMN: array[0..7] of string = ('
\83X
\83\8c\83b
\83h
\96¼', '
\83J
\83E
\83\93\83g', '
\8eæ
\93¾', '
\90V
\92\85',
2138 '
\96¢
\93Ç', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e', '
\83X
\83\8c\8dì
\90¬
\93ú
\8e\9e');
2139 COLUMN_ALIGNMENT: array[0..7] of TAlignment = (taLeftJustify, taRightJustify,
2140 taRightJustify, taRightJustify,
2141 taRightJustify, taLeftJustify,
2142 taLeftJustify, taLeftJustify);
2143 //No,
\83X
\83\8c\83b
\83h
\96¼,
\83J
\83E
\83\93\83g,
\8f\84\89ñ
\97\
\96ñ,
\8eæ
\93¾
\93ú
\8e\9e
2145 ListColumn: TListColumn;
2148 ListView.Items.BeginUpdate;
2150 Screen.Cursor := crHourGlass;
2152 //
\83`
\83\89\82Â
\82«
\96h
\8e~
\82Ì
\82½
\82ß
\81A
\95Ï
\8dX
\82³
\82ê
\82Ä
\82¢
\82é
\8fê
\8d\87\82Ì
\82Ý
2153 //
\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Ó
2154 if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2156 ListView.Columns.Clear;
2157 for i := 0 to Length(COLUMN) - 1 do begin
2158 ListColumn := ListView.Columns.Add;
2159 ListColumn.Caption := COLUMN[i];
2160 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2161 ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2165 ListView.Items.Count := 0;
2166 ListView.Items.Clear;
2168 case GikoForm.ViewType of
2169 gvtAll: ListView.Items.Count := Board.Count;
2170 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2171 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2172 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2175 ListNameLabel.Caption := Board.Title;
2176 FolderImage.Picture := nil;
2177 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2180 FSortOrder := False;
2181 ListViewColumnClick(nil, ListView.Column[0]);
2183 Result := Board.Count;
2185 Screen.Cursor := crDefault;
2186 ListView.Items.EndUpdate;
2190 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2192 // FileName: string;
2193 // DateTime: TDateTime;
2196 Category: TCategory;
2198 ThreadItem: TThreadItem;
2200 ActivListObj : TObject;
2202 ActivListObj := ActiveList;
2203 if ActivListObj is TBBS then begin
2204 BBS := TBBS(ActivListObj);
2206 ListView.StateImages := nil;
2208 if BBS = nil then Exit;
2209 if BBS.Count <= 0 then Exit;
2210 if Item = nil then Exit;
2211 if Item.Index > BBS.Count then Exit;
2212 if ListView.Items.Count = 0 then Exit;
2214 if not (BBS.Items[Item.index] is TCategory) then Exit;
2215 Category := TCategory(BBS.Items[Item.index]);
2217 if Category = nil then Exit;
2219 if ListNumberVisibleAction.Checked then
2220 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2222 Item.Caption := Category.Title;
2224 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2225 Item.Data := Category;
2226 end else if ActivListObj is TCategory then begin
2227 Category := TCategory(ActivListObj);
2229 ListView.StateImages := nil;
2231 if Category = nil then Exit;
2232 if Category.Count <= 0 then Exit;
2233 if Item = nil then Exit;
2234 if Item.Index >= Category.Count then Exit;
2235 if ListView.Items.Count = 0 then Exit;
2237 if not (Category.Items[Item.Index] is TBoard) then Exit;
2238 Board := TBoard(Category.Items[Item.Index]);
2240 if Board = nil then Exit;
2242 if ListNumberVisibleAction.Checked then
2243 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2245 Item.Caption := Board.Title;
2247 if Item.SubItems.Count <> 2 then begin
2248 Item.SubItems.Clear;
2249 Item.SubItems.Add('');
2250 Item.SubItems.Add('');
2253 Item.ImageIndex := ITEM_ICON_BOARD1;
2256 Item.SubItems[0] := Board.RoundName // '
\97\
\96ñ'
2258 Item.SubItems[0] := '';
2260 if Board.RoundDate = ZERO_DATE then begin
2261 Item.SubItems[1] := '';
2263 Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2265 end else if ActivListObj is TBoard then begin
2266 Board := TBoard(ActivListObj);
2268 if GikoSys.Setting.ListIconVisible then
2269 ListView.StateImages := StateIconImageList
2271 ListView.StateImages := nil;
2273 case GikoForm.ViewType of
2274 gvtAll: BoardCnt := Board.Count;
2275 gvtLog: BoardCnt := Board.GetLogThreadCount;
2276 gvtNew: BoardCnt := Board.GetNewThreadCount;
2277 gvtUser: BoardCnt := Board.GetUserThreadCount;
2282 // if Board = nil then Exit;
2283 if BoardCnt <= 0 then Exit;
2284 if Item = nil then Exit;
2285 if Item.Index > BoardCnt then Exit;
2286 if ListView.Items.Count = 0 then Exit;
2288 // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2291 case GikoForm.ViewType of
2292 gvtAll: if Item.Index >= Board.Count then Exit else
2293 ThreadItem := TThreadItem(Board.Items[Item.Index]);
2294 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2295 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2296 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2299 if ThreadItem = nil then Exit;
2301 // if ListNumberVisibleAction.Checked then
2302 // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2304 RepStr := ThreadItem.Title;
2305 RepStr := CustomStringReplace(RepStr, '<', '<' );
2306 RepStr := CustomStringReplace(RepStr, '>', '>' );
2307 RepStr := CustomStringReplace(RepStr, '"', '"' );
2308 RepStr := CustomStringReplace(RepStr, '&', '&' );
2309 //RepStr := StringReplace(RepStr, '
\81\97\81M', ',', [rfReplaceAll]);
2311 if Item.SubItems.Count <> 7 then begin
2312 Item.SubItems.Clear;
2313 Item.SubItems.Add('');
2314 Item.SubItems.Add('');
2315 Item.SubItems.Add('');
2316 Item.SubItems.Add('');
2317 Item.SubItems.Add('');
2318 Item.SubItems.Add('');
2319 Item.SubItems.Add('');
2322 if ListNumberVisibleAction.Checked then
2323 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2325 Item.Caption := RepStr;
2327 case ThreadItem.AgeSage of
2328 gasNone: Item.StateIndex := -1;
2329 gasNew: Item.StateIndex := 0;
2330 gasAge: Item.StateIndex := 1;
2331 gasSage: Item.StateIndex := 2;
2334 if ThreadItem.IsLogFile then begin
2335 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2336 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2337 Item.SubItems[1] := IntToStr(ThreadItem.Count);
2338 if ThreadItem.NewResCount = 0 then
2339 Item.SubItems[2] := ''
2341 Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2342 Item.SubItems[3] := '';
2343 if ThreadItem.Round then
2344 Item.SubItems[4] := ThreadItem.RoundName
2346 Item.SubItems[4] := '';
2347 if ThreadItem.RoundDate = ZERO_DATE then begin
2348 Item.SubItems[5] := '';
2350 Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2351 if ThreadItem.NewArrival then
2352 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2353 if ThreadItem.CreateDate = ZERO_DATE then begin
2354 Item.SubItems[6] := '';
2356 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2359 Item.ImageIndex := ITEM_ICON_THREAD1;
2360 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2361 Item.SubItems[1] := '';
2362 Item.SubItems[2] := '';
2363 Item.SubItems[3] := '';
2364 Item.SubItems[4] := '';
2365 Item.SubItems[5] := '';
2366 if not GikoSys.Setting.CreationTimeLogs then
2367 if ThreadItem.CreateDate = ZERO_DATE then
2368 Item.SubItems[6] := ''
2370 Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
2374 Item.Data := ThreadItem;
2378 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2379 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2380 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2381 var Index: Integer);
2387 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2393 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2394 EndIndex: Integer; OldState, NewState: TItemStates);
2399 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2407 threadItem : TThreadItem;
2409 Protocol, Host, Path, Document, Port, Bookmark: string;
2414 ActiveFileName: string;
2422 if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin
2423 if LowerCase(OleVariant(IHTMLDocument2(Browser.Document)).charset) <> 'shift_jis' then
2424 OleVariant(IHTMLDocument2(Browser.Document)).charset := 'shift_jis';
2430 if PreviewTimer.Enabled then
2431 PreviewTimer.Enabled := False;
2432 Application.CancelHint;
2433 if GetActiveContent <> nil then
2434 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2436 ActiveFileName := '';
2438 StatusBar.Panels[1].Text := Text;
2440 if FHint <> nil then begin
2441 FHint.ReleaseHandle;
2444 if FPreviewBrowser <> nil then
2445 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2447 if not GikoSys.Setting.UnActivePopup then
2448 if not GikoForm.Active then
2451 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2452 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2455 Ext := AnsiLowerCase(ExtractFileExt(Text));
2456 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2457 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2458 if FPreviewBrowser = nil then begin
2459 FPreviewBrowser := TPreviewBrowser.Create(Self);
2460 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2461 TOleControl(FPreviewBrowser).Parent := nil;
2463 FPreviewBrowser.Navigate('about:blank');//
\91O
\89ñ
\82Ì
\83v
\83\8c\83r
\83\85\81[
\89æ
\91\9c\8fÁ
\8b\8e\97p
2464 FPreviewURL := Text;
2465 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2466 PreviewTimer.Enabled := True;
2467 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2468 if Pos('mailto:', Text) = 1 then begin
2469 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2470 //
\83M
\83R
\83i
\83r
\83X
\83\8c \83p
\81[
\83g3
\82Ì466
\8e\81\82É
\8a´
\8eÓ
2472 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2473 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2474 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2475 if (Assigned(e)) then begin
2476 tmp2 := GikoSys.ZenToHan(e.Get_outerText);
2477 if (GikoSys.IsNumeric(tmp2)) then begin
2478 //
\82\93\82Í
\83\8c\83X
\94Ô
\8d\86\82Á
\82Û
\82¢
\82Á
\82·
\81B
2479 wkIntSt := StrToInt(tmp2);
2480 wkIntTo := StrToInt(tmp2);
2481 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2482 FHint.PopupType := gptThread;
2483 SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False);
2485 FHint.PopupType := gptRaw;
2490 if Pos('about:blank..', Text) = 1 then begin
2491 threadItem := GetActiveContent;
2492 if AnsiPos('http://jbbs.shitaraba.com/', threadItem.URL) <> 0 then begin
2493 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2494 Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo);
2495 if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then
2496 buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo)
2497 else if( PathRec.FSt <> 0 ) then
2498 buf := IntToStr(PathRec.FSt);
2499 end else if AnsiPos('machi.to/bbs/', threadItem.URL) <> 0 then begin
2500 URL := threaditem.URL;
2501 buf := Copy(Text,AnsiPos('&st=',Text),Length(Text)-AnsiPos('&st=',Text) + 1);
2503 URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
2504 buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text));
2510 PathRec := Gikosys.Parse2chURL2(URL);
2511 Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
2512 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
2514 if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
2516 URL := GikoSys.GetBrowsableThreadURL( URL );
2517 wkIntSt := PathRec.FSt;
2518 wkIntTo := PathRec.FTo;
2520 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2523 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2525 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2527 end else if wkIntSt > wkIntTo then begin
2532 //if wkIntSt = 0 then
2534 //if wkINtTo = 0 then
2536 //if PathRec.FFirst then
2538 if PathRec.FStBegin then
2540 if PathRec.FToEnd then
2543 //ATitle := ActiveFileName <> PathRec.FKey;
2544 if GetActiveContent.URL = URL then
2549 threadItem := BBSsFindThreadFromURL( URL );
2551 if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
2552 board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
2553 if board <> nil then begin
2554 if not board.IsThreadDatRead then
2555 GikoSys.ReadSubjectFile( board );
2556 threadItem := board.FindThreadFromFileName( PathRec.FKey + '.dat' );
2560 if threadItem <> nil then begin
2561 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2562 FHint.PopupType := gptThread;
2563 SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2569 // ShowTextPopup(s);
2570 if FHint.PopupType = gptRaw then begin
2571 if FHint.Caption <> '' then
2574 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2580 procedure TGikoForm.BrowserTitleChange(Sender: TObject;
2581 const Text: WideString);
2585 if (Text = BLANK_HTML) or (Text = GikoSys.GetHtmlTempFileName) then
2586 Title := CAPTION_NAME
2588 Title := CAPTION_NAME + ' - [' + Text + ']';
2590 //Application.Title := Title;
2593 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2596 //SysMenuApp: HMenu;
2598 FEnabledCloseButton := Enabled;
2599 SysMenu := GetSystemMenu(Handle, False);
2600 //SysMenuApp := GetSystemMenu(Application.Handle, False);
2602 if Enabled then begin
2603 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2604 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2606 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2607 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2610 DrawMenuBar(Handle);
2611 //DrawMenuBar(Application.Handle);
2614 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2615 var AllowChange: Boolean);
2617 if FTreeType = gtt2ch then
2621 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2622 Shift: TShiftState);
2624 if GetActiveList is TBoard then begin
2625 if Key = VK_BACK then begin
2626 // UpFolderButtonClick(Sender);
2627 end else if Key = VK_SPACE then begin
2629 end else if Key = VK_RETURN then begin
2632 end else begin // TBBS, TCategory
2633 if Key = VK_BACK then begin
2634 // UpFolderButtonClick(Sender);
2635 end else if Key = VK_SPACE then begin
2637 end else if Key = VK_RETURN then begin
2643 function TGikoForm.GetHttpState: Boolean;
2645 Result := FHttpState;
2648 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2649 Column: TListColumn);
2653 wkCategory: TCategory;
2656 if FSortIndex = Column.Index then
2657 FSortOrder := not FSortOrder
2659 FSortOrder := False;
2661 for i := 0 to ListView.Columns.Count - 1 do
2662 ListView.Column[i].ImageIndex := -1;
2664 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
2666 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
2668 Sort.SortNoFlag := ListNumberVisibleAction.Checked;
2670 //if TObject(TreeView.Selected.Data) is TBBS then begin
2671 if TObject( FActiveList ) is TBBS then begin
2672 //wkBBS := TBBS(TreeView.Selected.Data);
2673 wkBBS := TBBS( FActiveList );
2674 Sort.SortOrder := FSortOrder;
2675 Sort.SortIndex := Column.Index;
2676 wkBBS.Sort(CategorySortProc);
2678 //end else if TObject(TreeView.Selected.Data) is TCategory then begin
2679 end else if TObject( FActiveList ) is TCategory then begin
2680 //wkCategory := TCategory(TreeView.Selected.Data);
2681 wkCategory := TCategory( FActiveList );
2682 Sort.SortOrder := FSortOrder;
2683 Sort.SortIndex := Column.Index;
2684 wkCategory.CustomSort(BoardSortProc);
2686 //end else if TObject(TreeView.Selected.Data) is TBoard then begin
2687 end else if TObject( FActiveList ) is TBoard then begin
2688 //wkBoard := TBoard(TreeView.Selected.Data);
2689 wkBoard := TBoard( FActiveList );
2690 Sort.SortOrder := FSortOrder;
2691 Sort.SortIndex := Column.Index;
2692 wkBoard.CustomSort(ThreadItemSortProc);
2695 FSortIndex := Column.Index;
2698 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2699 Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean);
2703 DefaultDraw := True;
2705 DefaultDraw := False;
2706 if (cdsSelected in State) or (cdsHot in State) then begin
2707 Sender.Canvas.Brush.Color := clHighlight;
2708 Sender.Canvas.Font.Color := clHighlightText;
2710 Sender.Canvas.Brush.Color := clBtnFace;
2711 Sender.Canvas.Font.Color := clBtnText;
2713 ARect := Rect(Button.Left, Button.Top, Button.Left + Button.Width, Button.Top + Button.Height);
2714 Sender.Canvas.FillRect(ARect);
2715 DrawText(Sender.Canvas.Handle, PChar(Button.Caption), -1, ARect, DT_SINGLELINE or DT_VCENTER or DT_CENTER);
2718 function TGikoForm.GetTreeNode(Data: TObject): TTreeNode;
2723 Nodes := TreeView.Items;
2725 for i := 0 to Nodes.Count - 1 do begin
2726 if Nodes.Item[i].Data = Data then begin
2727 Result := Nodes.Item[i];
2734 procedure TGikoForm.BrowserBeforeNavigate2(Sender: TObject;
2735 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
2736 Headers: OleVariant; var Cancel: WordBool);
2741 kMenuName: string = 'menu:';
2744 if Pos(kMenuName, URL) <> 0 then begin
2745 sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
2747 if not GikoSys.IsNumeric(sNo) then Exit;
2751 KokoPopupMenu.Tag := StrToInt(sNo);
2752 KokoPopupMenu.Popup(p.x, p.y);
2753 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
2754 Cancel := not GikoSys.Setting.OpenMailer;
2759 procedure TGikoForm.ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
2760 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
2761 var DefaultDraw: Boolean);
2763 ThreadItem: TThreadItem;
2766 // TListView(Sender).Canvas.Font.Style := [];
2767 if TObject(Item.Data) is TThreadItem then begin
2768 ThreadItem := TThreadItem(Item.Data);
2769 if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
2770 ListView.Canvas.Brush.Color := FOddColor;
2772 ListView.Canvas.Brush.Color := FListViewBackGroundColor;
2774 // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
2775 if ThreadItem.UnRead then
2776 TListView(Sender).Canvas.Font.Style := [fsBold];
2780 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
2782 Application.ProcessMessages;
2783 if Application.Terminated then
2785 if PreviewTimer.Enabled then
2786 PreviewTimer.Enabled := False;
2787 //
\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
2788 if FHint <> nil then begin
2789 FHint.ReleaseHandle;
2794 if FPreviewBrowser <> nil then
2795 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2799 procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
2800 const ARect: TRect; var DefaultDraw: Boolean);
2804 IsBoardNode: Boolean;
2810 Category: TCategory;
2814 DefaultDraw := True;
2816 if FTreeType = gttHistory then Exit;
2818 TreeView.Canvas.Font.Color := clBlue;
2819 IsBoardNode := False;
2820 for i := 0 to TreeView.Items.Count - 1 do begin
2822 if not TreeView.Items[i].IsVisible then
2825 if TObject(TreeView.Items[i].Data) is TCategory then begin
2826 if TreeView.Items[i].Expanded then
2829 IsBoardNode := False;
2830 Category := TCategory(TreeView.Items[i].Data);
2831 for j := 0 to Category.Count - 1 do begin
2832 Board := Category.Items[j];
2833 if Board <> nil then begin
2834 if Board.UnRead > 0 then begin
2842 end else if TObject(TreeView.Items[i].Data) is TBoard then begin
2843 IsBoardNode := True;
2844 Board := TBoard(TreeView.Items[i].Data);
2845 Cnt := Board.UnRead;
2851 Bitmap := TBitmap.Create;
2853 Bitmap.Canvas.Font.Assign(TreeView.Canvas.Font);
2854 Bitmap.Canvas.Font.Style := [fsBold];
2855 NodeWidth := Bitmap.Canvas.TextWidth(TreeView.Items[i].Text);
2860 NodeRect := TreeView.Items[i].DisplayRect(True);
2863 CntText := '(' + IntToStr(Cnt) + ')'
2864 else if Cnt = 1 then
2868 TextWidth := TreeView.Canvas.TextWidth(CntText);
2870 TextRect := Rect(NodeRect.Left + NodeWidth + 8,
2872 NodeRect.Left + NodeWidth + TextWidth + 8,
2874 DrawText(TreeView.Canvas.Handle,
2878 DT_SINGLELINE or DT_VCENTER);
2880 TreeViewCustomDrawItem(nil, nil, [], DefaultDraw);
2883 procedure TGikoForm.TreeViewCustomDrawItem(Sender: TCustomTreeView;
2884 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
2887 Category: TCategory;
2890 DefaultDraw := True;
2892 if FTreeType = gttHistory then Exit;
2894 TreeView.Canvas.Font.Style := [];
2895 if Node <> nil then begin
2896 if TObject(Node.Data) is TCategory then begin
2897 Category := TCategory(Node.Data);
2898 for i := 0 to Category.Count - 1 do begin
2899 Board := Category.Items[i];
2900 if Board <> nil then begin
2901 if Board.UnRead > 0 then begin
2902 TreeView.Canvas.Font.Style := [fsBold];
2907 end else if TObject(Node.Data) is TBoard then begin
2908 Board := TBoard(Node.Data);
2909 if Board.UnRead > 0 then
2910 TreeView.Canvas.Font.Style := [fsBold];
2915 procedure TGikoForm.TreeViewExpanded(Sender: TObject; Node: TTreeNode);
2917 TreeView.Invalidate;
2919 if TObject(Node.Data) is TBBS then begin
2920 TBBS(Node.Data).NodeExpand := True;
2921 end else if TObject(Node.Data) is TCategory then begin
2922 TCategory(Node.Data).NodeExpand := True;
2923 end else if TObject(Node.Data) is TBoard then begin
2924 TBoard(Node.Data).NodeExpand := True;
2928 {procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
2930 TreeSplitter.Visible := PanelVisible;
2931 CabinetPanel.Visible := PanelVisible;
2932 CabinetToolButton.Down := PanelVisible;
2935 procedure TGikoForm.ListViewAllSelect;
2941 procedure TGikoForm.TreeViewDblClick(Sender: TObject);
2946 GetCursorPos(APoint);
2947 APoint := TreeView.ScreenToClient(APoint);
2948 HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
2949 if not (htOnLabel in HitTest) then Exit;
2951 TreeDoubleClick( TreeView.Selected );
2954 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
2956 AddMessageList(Msg, nil, Icon);
2959 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
2963 boardPlugIn : TBoardPlugIn;
2966 if Item.DownType = gdtBoard then
2967 ATitle := Item.Board.Title
2969 ATitle := Item.ThreadItem.Title;
2971 ATitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j';
2973 if Item.State in [gdsComplete, gdsDiffComplete] then begin
2975 if Item.DownType = gdtBoard then begin
2978 AddMessageList(ATitle + ' [
\83X
\83\8c\88ê
\97\97\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
2979 if GetActiveList = Item.Board then begin
2981 SetActiveList(Item.Board);
2983 Item.Board.Modified := True;
2984 Item.Board.IsThreadDatRead := True;
2986 end else if Item.DownType = gdtThread then begin
2989 Item.ThreadItem.NewArrival := True;
2990 if (Item.ThreadItem.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin
2991 boardPlugIn := Item.ThreadItem.BoardPlugIn;
2992 Item.ThreadItem.Title := GikoSys.DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 )).FTitle;
2993 ATitle := Item.ThreadItem.Title;
2995 if GetActiveContent = Item.ThreadItem then
2996 InsertBrowserTab(Item.ThreadItem)
2997 else if (ListView.Selected <> nil ) and ( TObject(ListView.Selected.Data) is TThreadItem ) and ( Item.ThreadItem = TThreadItem(ListView.Selected.Data)) then
2998 InsertBrowserTab(Item.ThreadItem, True)
3000 InsertBrowserTab(Item.ThreadItem, False);
3002 if Item.State = gdsComplete then begin
3004 AddMessageList(ATitle + ' [
\83X
\83\8c\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3006 PlaySound('NewDiff');
3007 AddMessageList(ATitle + ' [
\83X
\83\8c\8d·
\95ª
\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
3010 //
\8f\84\89ñ
\82 \82è
\82Ì
\8fê
\8d\87\81\95\82P
\82O
\82O
\82O
\92´
\82Í
\8f\84\89ñ
\8dí
\8f\9c
3011 if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin
3012 Item.ThreadItem.Round := False;
3013 Item.ThreadItem.RoundName := '';
3014 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);
3020 end else if Item.State = gdsNotModify then begin
3022 { if (Item.DownType = gdtThread) and (AddHistory(Item.ThreadItem)) then begin
3023 //SetContent(Item.ThreadItem);
3024 InsertBrowserTab(Item.ThreadItem);
3026 AddMessageList(ATitle + ' [
\96¢
\8dX
\90V]', nil, gmiSAD);
3027 PlaySound('NoChange');
3028 Screen.Cursor := crDefault;
3029 end else if Item.State = gdsAbort then begin
3031 AddMessageList(ATitle + ' [
\92\86\92f]', nil, gmiSAD);
3032 end else if Item.State = gdsError then begin
3037 AddMessageList(ATitle + ' [
\83G
\83\89\81[(' + IntToStr(Item.ResponseCode) + s + ')]', nil, gmiNG);
3038 // if Item.ResponseCode = 302 then
3039 // 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);
3045 if FWorkCount < 0 then FWorkCount := 0;
3046 if FWorkCount = 0 then begin
3048 Animate.Active := False;
3050 Screen.Cursor := crDefault;
3057 procedure TGikoForm.WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
3059 // SetProgressValue(Number, 0, AWorkCountMax);
3060 // ProgressBar.Visible := True;
3061 ProgressBar.Position := 0;
3062 ProgressBar.Max := AWorkCountMax;
3063 FDownloadTitle := AWorkTitle;
3064 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ð
\8aJ
\8en
\82µ
\82Ü
\82·';
3065 FDownloadMax := AWorkCountMax;
3068 procedure TGikoForm.WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
3070 // ProgressBar.Visible := False;
3071 ProgressBar.Position := 0;
3072 // SetProgressValue(Number, 0);
3073 if FDownloadMax <> 0 then
3074 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ª
\8a®
\97¹
\82µ
\82Ü
\82µ
\82½';
3077 procedure TGikoForm.Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
3079 ProgressBar.Position := AWorkCount;
3080 // SetProgressValue(Number, AWorkCount);
3081 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86 (' + IntToStr(AWorkCount) + '/' + IntToStr(FDownloadMax) + ')';
3085 procedure TGikoForm.SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
3087 Component: TComponent;
3089 Component := FindComponent('ProgressBar' + IntToStr(Number + 1));
3090 if Component <> nil then begin
3091 if not (Component is TProgressBar) then Exit;
3093 TProgressBar(Component).Max := Max;
3094 TProgressBar(Component).Position := Value;
3099 procedure TGikoForm.AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
3101 ListItem: TListItem;
3103 MessageListView.Items.BeginUpdate;
3105 ListItem := MessageListView.Items.Add;
3106 ListItem.Caption := ACaption;
3107 ListItem.Data := AObject;
3108 ListItem.MakeVisible(False);
3110 gmiOK: ListItem.ImageIndex := 0;
3111 gmiSAD: ListItem.ImageIndex := 1;
3112 gmiNG: ListItem.ImageIndex := 2;
3113 gmiWhat: ListItem.ImageIndex := 3;
3116 MessageListView.Items.EndUpdate;
3120 {procedure TGikoForm.BrowserTabChange(Sender: TObject);
3123 ThreadItem: TThreadItem;
3125 ThreadItem := GetActiveContent;
3126 if ThreadItem <> nil then begin
3127 SetContent(ThreadItem);
3131 procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
3135 // OldIndex: Integer;
3136 favItem : TFavoriteThreadItem;
3138 if Threaditem = nil then Exit;
3140 if ThreadItem.IsLogFile then begin
3141 //favItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
3142 favItem := TFavoriteThreadItem.Create(ThreadItem.URL, ThreadItem.Title );
3143 if not AddHistory( favItem ) then
3147 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
3148 if TObject(BrowserTab.Tabs.Objects[i]) is TThreadItem then begin
3149 if TThreadItem(BrowserTab.Tabs.Objects[i]) = ThreadItem then begin
3150 if ActiveTab then begin
3151 //OldIndex := BrowserTab.TabIndex;
3152 BrowserTab.TabIndex := i;
3153 // if OldIndex <> i then
3154 BrowserTab.OnChange(nil);
3162 if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin
3163 BrowserTab.Tabs.Insert(0, GikoSys.GetShortName(ThreadItem.Title, 20));
3164 BrowserTab.Tabs.Objects[0] := ThreadItem;
3166 BrowserTab.TabIndex := 0;
3169 i := BrowserTab.Tabs.Add(GikoSys.GetShortName(ThreadItem.Title, 20));
3170 BrowserTab.Tabs.Objects[i] := ThreadItem;
3172 BrowserTab.TabIndex := i;
3174 if ( ActiveTab ) or ( BrowserTab.Tabs.Count = 1 ) then begin
3175 BrowserTab.OnChange(nil);
3176 BrowserNullTab := nil;
3179 //OldIndex := BrowserTab.TabIndex;
3180 BrowserNullTab := ThreadItem;
3181 BrowserTab.TabIndex := -1;
3182 // if OldIndex = -1 then
3183 BrowserTab.OnChange(nil);
3186 if GikoSys.Setting.URLDisplay then
3187 AddressComboBox.Text := ThreadItem.URL;
3190 procedure TGikoForm.SetContent(ThreadItem: TThreadItem);
3195 // HtmlName: string;
3198 // OldCursor: TCursor;
3201 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
3202 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3203 Application.ProcessMessages;
3206 if (FActiveContent <> nil) and
3207 (FActiveContent <> ThreadItem) and
3208 (Assigned(Browser.Document)) then begin
3212 //Application.ProcessMessages;
3213 FActiveContent.ScrollTop := OleVariant(IHTMLDocument2(Browser.Document)).Body.ScrollTop;
3216 MsgBox(Handle, E.Message, 'SetContent[<-ScrollTop]', 0);
3222 FActiveContent := ThreadItem;
3224 if ThreadItem = nil then begin
3225 Browser.Navigate(BLANK_HTML);
3226 BrowserBoardNameLabel.Caption := '';
3227 ItemBoardImage.Picture := nil;
3228 BrowserNameLabel.Caption := '';
3229 ItemImage.Picture := nil;
3230 FActiveContent := nil;
3234 BBSID := ThreadItem.ParentBoard.BBSID;
3235 FileName := ThreadItem.FileName;
3237 if GetCapture = ListView.Handle then
3240 //OldCursor := Screen.Cursor;
3241 Screen.Cursor := crHourGlass;
3243 if ThreadItem.UnRead then begin
3244 ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
3245 if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0;
3249 if not ThreadItem.IsLogFile then begin
3251 if (not Assigned(Browser.Document)) then begin
3252 Browser.Navigate('about:blank');
3253 while (not Assigned(Browser.Document)) do begin
3254 Application.ProcessMessages;
3258 s := '<HTML><BODY><CENTER>
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Í
\8eæ
\93¾
\82µ
\82Ä
\82¢
\82Ü
\82¹
\82ñ</CENTER></BODY></HTML>';
3259 doc := Browser.Document;
3261 doc.charset := 'Shift_JIS';
3267 GikoSys.CreateHTML2(Browser.Document, ThreadItem, sTitle);
3269 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
3270 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3271 Application.ProcessMessages;
3275 doc := Browser.Document;
3276 Application.ProcessMessages;
3277 //
\82±
\82±
\82ÅApplication.ProcessMessages
\82ð
\8cÄ
\82Ô
\82±
\82Æ
\82É
\82æ
\82Á
\82ÄWebBrowser
\82ð
\8dX
\90V
\82³
\82¹
\82é
\81B
3278 //
\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é
3279 //
\81@by
\82à
\82¶
\82ã(2004/01/20)
3281 if ThreadItem.UnRead then
3282 BrowserMovement('new')
3283 else if (ThreadItem.ScrollTop <> 0) and (not ThreadItem.UnRead) then begin
3285 doc.Body.ScrollTop := ThreadItem.ScrollTop;
3288 MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
3292 // Application.ProcessMessages;
3295 ThreadItem.UnRead := False;
3299 BrowserBoardNameLabel.Caption := ThreadItem.ParentBoard.Title;
3300 ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
3301 BrowserNameLabel.Caption := ThreadItem.Title;
3302 ItemImage.Picture := nil;
3303 if ThreadItem.IsLogFile then
3304 if ThreadItem.NewArrival then
3305 ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap)
3307 ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap)
3309 ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap);
3311 ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;
3312 BrowserNameLabel.Left := ItemImage.Left + 20;
3314 //if Screen.Cursor <> crDefault then
3315 // Screen.Cursor := OldCursor
3317 Screen.Cursor := crDefault;
3321 function TGikoForm.GetActiveContent: TThreadItem;
3326 if BrowserTab.TabIndex = -1 then begin
3327 Result := BrowserNullTab;
3330 Index := BrowserTab.TabIndex;
3331 if BrowserTab.Tabs.Objects[Index] is TThreadItem then
3332 Result := TThreadItem(BrowserTab.Tabs.Objects[Index]);
3334 // Result := FActiveContent;
3337 procedure TGikoForm.SetActiveList(Obj: TObject);
3341 if FActiveList <> Obj then begin
3344 ListView.Items.Count := 0;
3345 ListView.Items.Clear;
3346 ListView.Selected := nil;
3347 // ListView.Columns.Clear;
3349 Caption := CAPTION_NAME;
3350 //Application.Title := CAPTION_NAME;
3352 if Obj is TBBS then begin
3353 for i := 0 to ListView.Columns.Count - 1 do
3354 ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i];
3355 SetCategoryListItem(TBBS(Obj));
3356 end else if Obj is TCategory then begin
3357 for i := 0 to ListView.Columns.Count - 1 do
3358 ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i];
3359 SetBoardListItem(TCategory(Obj));
3360 end else if Obj is TBoard then begin
3361 SetThreadListItem(TBoard(Obj));
3365 if Obj is TBoard then begin
3366 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
3367 if GikoSys.Setting.ListWidthState = glsMax then begin
3368 BrowserMinAction.Execute;
3369 if GikoForm.Visible then
3373 if GikoSys.Setting.ListHeightState = glsMax then begin
3374 BrowserMinAction.Execute;
3375 if GikoForm.Visible then
3383 //
\81\9a\81\9a\83q
\83\8d\83\86\83L
\83\81\83\82
3384 //
\82»
\82Ì
\82¤
\82¿interface
\82ð
\8eg
\82¤
3385 function TGikoForm.GetActiveList: TObject;
3387 Result := FActiveList;
3390 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType);
3392 SetListViewType(AViewType, '', False);
3395 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
3399 if ActiveList is TBoard then begin
3400 Board := TBoard(ActiveList);
3402 Board.ParentCategory.ParenTBBS.SelectText := SelectText;
3403 Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
3404 // Board.SelectText := SelectText;
3405 // Board.KubetsuChk := KubetsuChk;
3406 ViewType := AViewType;
3407 SetActiveList(Board);
3408 SetThreadListItem(Board);
3412 procedure TGikoForm.ListViewCustomDraw(Sender: TCustomListView;
3413 const ARect: TRect; var DefaultDraw: Boolean);
3419 if ListView.Items.Count = 0 then begin
3420 DefaultDraw := True;
3422 ListView.Canvas.Brush.Color := ListView.Color;
3423 ListView.Canvas.FillRect(ARect);
3427 ListView.Canvas.Font.Color := clWindowText;
3428 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3431 ListView.Canvas.Font.Color := clBlue;
3432 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';
3435 ListView.Canvas.Font.Color := clGreen;
3436 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\90V
\92\85\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3439 ListView.Canvas.Font.Color := clNavy;
3440 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';
3441 if GetActiveList is TBoard then
3442 s := Format(s, [TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText]);
3450 p := Point((ListView.ClientWidth div 2) - (ListView.Canvas.TextWidth(s) div 2),
3451 (ListView.ClientHeight div 2) - (ListView.Canvas.TextHeight(s) div 2));
3452 ListView.Canvas.TextOut(p.X, p.Y, s);
3454 DefaultDraw := True;
3458 procedure TGikoForm.DownloadList(Board: TBoard);
3460 Item: TDownloadItem;
3462 if not Board.IsThreadDatRead then
3463 GikoSys.ReadSubjectFile(Board);
3464 Item := TDownloadItem.Create;
3466 Item.Board := Board;
3467 Item.DownType := gdtBoard;
3468 // AbortToolButton.Enabled := True;
3469 // Animate.Active := True;
3470 // FDownload.Add(Item);
3471 FControlThread.AddItem(Item);
3472 // Animate.Active := False;
3473 // AbortToolButton.Enabled := False;
3474 if FWorkCount = 0 then begin
3476 Animate.Active := True;
3479 Screen.Cursor := crAppStart;
3487 procedure TGikoForm.DownloadContent(ThreadItem: TThreadItem);
3489 Item: TDownloadItem;
3491 Item := TDownloadItem.Create;
3493 Item.ThreadItem := ThreadItem;
3494 Item.DownType := gdtThread;
3495 // AbortToolButton.Enabled := True;
3496 // Animate.Active := True;
3497 // FDownload.Add(Item);
3498 FControlThread.AddItem(Item);
3499 // Animate.Active := False;
3500 // AbortToolButton.Enabled := False;
3501 if FWorkCount = 0 then begin
3503 Animate.Active := True;
3506 Screen.Cursor := crAppStart;
3514 procedure TGikoForm.PlaySound(SoundEventName: string);
3518 FileName := GikoSys.Setting.FindSoundFileName(SoundEventName);
3519 if FileExists(FileName) then begin
3520 if not sndPlaySound(PChar(FileName), SND_ASYNC or SND_NOSTOP) then begin
3521 sndPlaySound(nil, SND_SYNC);
3522 Application.ProcessMessages;
3524 sndPlaySound(PChar(FileName), SND_ASYNC);
3529 function TGikoForm.AddHistory( favItem : TFavoriteThreadItem ): Boolean;
3532 Item: TFavoriteThreadItem;
3536 // if (GetActiveContent = ThreadItem) and
3537 // (ThreadItem.Count <= ThreadItem.Kokomade) then
3539 // if GetActiveContent = ThreadItem then
3543 if FTreeType = gttHistory then
3544 TreeView.Selected := nil;
3546 for i := 0 to FHistoryList.Count - 1 do begin
3547 if TObject(FHistoryList[i]) is TFavoriteThreadItem then begin
3548 Item := TFavoriteThreadItem(FHistoryList[i]);
3549 if Item.URL = favItem.URL then begin
3550 // SetContent(ThreadItem);
3551 FHistoryList.Move(i, 0);
3552 if FTreeType = gttHistory then
3553 if TreeView.TopItem <> TreeView.Items[ i ] then
3554 TreeView.Items[ i ].MoveTo( TreeView.TopItem, naInsert );
3561 if FHistoryList.Count > 0 then
3562 FHistoryList.Insert( 0, favItem )
3564 FHistoryList.Add( favItem );
3565 // SetContent(ThreadItem);
3567 if FTreeType = gttHistory then begin
3568 Node := TreeView.Items.Add( nil, favItem.Title );
3569 Node.MoveTo( TreeView.TopItem, naInsert );
3571 if favItem.NewArrival then begin
3572 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3573 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3575 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3576 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3579 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
3580 //
\81¦favItem.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
3581 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3582 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3583 Node.Data := favItem;
3587 procedure TGikoForm.DeleteHistory( threadItem: TThreadItem );
3591 for i := 0 to FHistoryList.Count - 1 do begin
3592 if threadItem.URL = TFavoriteThreadItem( FHistoryList.Items[i] ).URL then begin
3593 TFavoriteThreadItem( FHistoryList.Items[ i ] ).Free;
3594 FHistoryList.Delete(i);
3595 FHistoryList.Capacity := FHistoryList.Count;
3601 procedure TGikoForm.ClearHistory;
3605 //FHistoryList.Clear;
3608 for i := FHistoryList.Count - 1 downto 0 do begin
3609 if TObject(FHistoryList[ i ]) is TFavoriteThreadItem then
3610 TFavoriteThreadItem(FHistoryList[ i ]).Free
3611 else if TObject(FHistoryList[ i ]) is TFavoriteBoardItem then
3612 TFavoriteBoardItem(FHistoryList[ i ]).Free;
3614 //FHistoryList.Delete(i);
3620 FHistoryList.Capacity := FHistoryList.Count;
3624 procedure TGikoForm.SaveHistory;
3627 saveList : TstringList;
3630 saveList := TStringList.Create;
3633 FHistoryList.Capacity := FHistoryList.Count;
3634 saveList.Add('<?xml version="1.0" encoding="Shift_JIS" standalone="yes"?>');
3635 saveList.Add('<address>');
3636 bound := FHistoryList.Count - 1;
3637 for i := bound downto 0 do begin
3638 // title
\82Í
\8d¡
\82Ì
\82Æ
\82±
\82ë
\8eg
\82Á
\82Ä
\82¢
\82È
\82¢
3640 '<history url="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).URL ) + '"' +
3641 ' title="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).Title ) + '"/>');
3643 saveList.Add('</address>');
3644 saveList.SaveToFile( GikoSys.GetConfigDir + 'History.xml' );
3651 procedure TGikoForm.LoadHistory;
3655 XMLDoc : IXMLDocument;
3657 HistoryNode : IXMLNode;
3659 favItem : TFavoriteThreadItem;
3662 fileName := GikoSys.GetConfigDir + 'History.xml';
3664 if FileExists( fileName ) then begin
3666 XMLDoc := IXMLDocument.Create;
3667 //XMLDoc := LoadXMLDocument(FileName);
3668 LoadXMLDocument(FileName, XMLDoc);
3670 XMLNode := XMLDoc.DocumentElement;
3672 if XMLNode.NodeName = 'address' then begin
3673 bound := XMLNode.ChildNodes.Count - 1;
3674 for i := 0 to bound do begin
3675 HistoryNode := XMLNode.ChildNodes[i];
3676 if HistoryNode.NodeName = 'history' then begin
3677 //if FReadCount >= sl.Count then begin
3678 s := Trim(HistoryNode.Attributes['url']);
3679 if s <> '' then begin
3680 favItem := TFavoriteThreadItem.Create(
3681 s, HistoryNode.Attributes[ 'title' ] );
3682 if not AddHistory( favItem ) then
3698 procedure TGikoForm.ShowBBSTreeOld(
3706 FavoriteTreeView.Visible := False;
3707 FavoriteToolBar.Hide;
3708 TreeView.Visible := True;
3710 b := CabinetSelectPopupMenu.Items.Count - 1;
3711 for i := 0 to b do begin
3712 item := CabinetSelectPopupMenu.Items[ i ];
3713 if item is TBBSMenuItem then begin
3714 if TBBSMenuItem( item ).Data = inBBS then begin
3715 item.Checked := True;
3716 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
3717 CabinetMenu.Items[ i ].Checked := True;
3718 GikoSys.Setting.CabinetIndex := i;
3722 item.Checked := False;
3723 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
3724 CabinetMenu.Items[ i ].Checked := False;
3726 CabinetSelectToolButton.Caption := inBBS.Title;
3728 CabinetHistoryAction.Checked := False;
3729 CabinetFavoriteAction.Checked := False;
3731 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
3732 FTreeType := gtt2ch;
3733 HistoryToolBar.Hide;
3734 SetBoardTreeNode( inBBS );
3735 TreeView.TopItem.Expanded := True; //?c???[?g?b?v???????J??
3736 //?c???[??g?b?v?????I????
3737 if GetActiveList = nil then
3738 TreeView.Selected := TreeView.Items[0]
3740 for i := 0 to TreeView.Items.Count - 1 do begin
3741 if TreeView.Items[i].Data = GetActiveList then begin
3742 TreeView.Selected := TreeView.Items[i];
3746 TreeView.Selected := TreeView.Items[0]
3754 procedure TGikoForm.ShowBBSTree(
3763 FavoriteTreeView.Visible := False;
3764 FavoriteToolBar.Hide;
3765 TreeView.Visible := True;
3767 b := CabinetSelectPopupMenu.Items.Count - 1;
3768 for i := 0 to b do begin
3769 item := CabinetSelectPopupMenu.Items[ i ];
3770 if item is TBBSMenuItem then begin
3771 if TBBSMenuItem( item ).Data = inBBS then begin
3772 item.Checked := True;
3773 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3774 CabinetMenu.Items[ i ].Checked := True;
3775 GikoSys.Setting.CabinetIndex := i;
3779 item.Checked := False;
3780 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3781 CabinetMenu.Items[ i ].Checked := False;
3783 CabinetSelectToolButton.Caption := inBBS.Title;
3785 CabinetHistoryAction.Checked := False;
3786 CabinetFavoriteAction.Checked := False;
3788 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
3789 FTreeType := gtt2ch;
3790 HistoryToolBar.Hide;
3791 SetBoardTreeNode( inBBS );
3792 TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
3793 //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
3794 if GetActiveList = nil then begin
3796 TreeClick( TreeView.Items[0] );
3800 for i := 0 to TreeView.Items.Count - 1 do begin
3801 if TreeView.Items[i].Data = GetActiveList then begin
3802 TreeClick( TreeView.Items[i] );
3806 TreeClick( TreeView.Items[0] );
3814 procedure TGikoForm.ShowHistoryTree;
3819 if CabinetPanel.Visible then begin
3820 if FTreeType = gttHistory then begin
3821 CabinetVisible( False );
3822 CabinetHistoryAction.Checked := False;
3824 CabinetHistoryAction.Checked := True;
3827 CabinetVisible( True );
3828 CabinetHistoryAction.Checked := True;
3831 // BBS...BBS, History, Favorite
3832 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 2;
3834 FavoriteTreeView.Visible := False;
3835 TreeView.Visible := True;
3837 CabinetBBSAction.Checked := False;
3838 CabinetFavoriteAction.Checked := False;
3840 if FTreeType <> gttHistory then begin
3841 b := CabinetSelectPopupMenu.Items.Count - 1;
3842 for i := 0 to b do begin
3843 item := CabinetSelectPopupMenu.Items[ i ];
3844 if item is TBBSMenuItem then begin
3845 item.Checked := False;
3846 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3847 CabinetMenu.Items[ i ].Checked := False;
3851 FTreeType := gttHistory;
3852 HistoryToolBar.Show;
3853 FavoriteToolBar.Hide;
3855 CabinetSelectToolButton.Caption := '
\97\9a\97ð
\83\8a\83X
\83g';
3859 procedure TGikoForm.SetHistoryTreeNode;
3863 Item: TFavoriteThreadItem;
3865 TreeView.Items.BeginUpdate;
3867 TreeView.Items.Clear;
3868 for i := 0 to FHistoryList.Count - 1 do begin
3869 Item := TFavoriteThreadItem(FHistoryList[i]);
3870 Node := TreeView.Items.Add(nil, Item.Title);
3872 if Item.Item.NewArrival then begin
3873 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3874 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3876 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3877 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3880 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
3881 //
\81¦Item.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
3882 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3883 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3887 TreeView.Items.EndUpdate;
3891 procedure TGikoForm.SelectTreeNode(Item: TObject; CallEvent: Boolean);
3893 ChangeEvent: TTVChangedEvent;
3894 ChangingEvent: TTVChangingEvent;
3898 if Item is TCategory then
3899 bbs := TCategory( Item ).ParenTBBS
3900 else if Item is TBoard then
3901 bbs := TBoard( Item ).ParentCategory.ParenTBBS
3905 if (FTreeType = gtt2ch) and (FActiveBBS = bbs) then begin
3907 ChangingEvent := nil;
3909 if not CallEvent then begin
3910 ChangeEvent := TreeView.OnChange;
3911 ChangingEvent := TreeView.OnChanging;
3914 if not CallEvent then begin
3915 TreeView.OnChange := nil;
3916 TreeView.OnChanging := nil;
3918 //Application.ProcessMessages;
3919 for i := 0 to TreeView.Items.Count - 1 do begin
3920 if TreeView.Items[i].Data = Item then begin
3921 TreeView.Items[i].Selected := True;
3923 TreeClick(TreeView.Items[i]);
3927 //Application.ProcessMessages;
3929 if not CallEvent then begin
3930 TreeView.OnChange := ChangeEvent;
3931 TreeView.OnChanging := ChangingEvent;
3935 if GetActiveList is TBBS then begin
3936 for i := 0 to ListView.Columns.Count - 1 do
3937 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
3938 end else if GetActiveList is TCategory then begin
3939 for i := 0 to ListView.Columns.Count - 1 do
3940 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
3941 end else if GetActiveList is TBoard then begin
3942 for i := 0 to ListView.Columns.Count - 1 do
3943 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
3946 if (Item is TBBS) or (Item is TCategory) then begin
3947 ListView.Columns.Clear;
3948 SetActiveList( Item );
3949 end else if Item is TBoard then begin
3950 if not TBoard( Item ).IsThreadDatRead then begin
3951 Screen.Cursor := crHourGlass;
3953 if not TBoard( Item ).IsThreadDatRead then
3954 GikoSys.ReadSubjectFile(TBoard( Item ));
3956 Screen.Cursor := crDefault;
3959 SetActiveList( Item );
3964 procedure TGikoForm.ListViewMouseDown(Sender: TObject;
3965 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
3967 listItem : TListItem;
3968 threadItem : TThreadItem;
3974 if not (GetActiveList is TBoard) then Exit;
3975 listItem := ListView.GetItemAt( X, Y );
3976 if listItem = nil then Exit;
3977 if not (TObject(listItem.Data) is TThreadItem) then Exit;
3979 threadItem := TThreadItem(ListItem.Data);
3980 InsertBrowserTab(threadItem);
3981 if threadItem.IsLogFile then
3982 ListView.UpdateItems(listItem.Index, listItem.Index);
3985 { if ssDouble in Shift then begin
3986 DoubleClickOccurred[Button] := True;
3988 DoubleClickOccurred[Button] := False;
3989 t := GetTickCount+GetDoubleClickTime;
3990 while GetTickCount < t do begin
3991 Application.ProcessMessages;
3992 if DoubleClickOccurred[Button] then
3997 if ssDouble in Shift then begin
3999 mbLeft: ListDoubleClick;
4012 procedure TGikoForm.ListClick;
4014 ListItem: TListItem;
4015 ThreadItem: TThreadItem;
4017 if ListView.SelCount <> 1 then Exit;
4018 ListItem := ListView.Selected;
4019 if ListItem = nil then Exit;
4020 if not (TObject(ListItem.Data) is TThreadItem) then Exit;
4022 ThreadItem := TThreadItem(ListItem.Data);
4023 if ThreadItem.IsLogFile then begin
4024 // if AddHistory(ThreadItem) then
4025 // SetContent(ThreadItem);
4026 InsertBrowserTab(ListItem.Data);
4027 ListView.UpdateItems(ListItem.Index, ListItem.Index);
4029 // SetContent(ThreadItem);
4030 InsertBrowserTab(ListItem.Data);
4033 if ListView.Selected = nil then
4035 if ListView.Selected.Data = nil then
4037 if TThreadItem( ListView.Selected.Data ).IsLogFile then begin
4038 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4039 if GikoSys.Setting.ListWidthState = glsMin then begin
4040 BrowserMaxAction.Execute;
4041 if GikoForm.Visible then
4045 if GikoSys.Setting.ListHeightState = glsMin then begin
4046 BrowserMaxAction.Execute;
4047 if GikoForm.Visible then
4054 procedure TGikoForm.ListDoubleClick;
4056 ThreadItem: TThreadItem;
4058 // PostMessage(ListView.Handle, WM_CANCELMODE, 0, 0);
4060 if ListView.Selected = nil then Exit;
4061 // if TreeView.Selected = nil then Exit;
4063 if TObject(ListView.Selected.Data) is TCategory then begin
4064 SelectTreeNode(ListView.Selected.Data, True);
4065 // TreeView.Selected.Expanded := True;
4066 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4067 //TreeViewChange(nil, TreeView.Selected);
4068 end else if TObject(ListView.Selected.Data) is TBoard then begin
4069 SelectTreeNode(ListView.Selected.Data, True);
4070 // TreeView.Selected.Expanded := True;
4071 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4072 //TreeViewChange(nil, TreeView.Selected);
4073 end else if TObject(ListView.Selected.Data) is TThreadItem then begin
4074 //if TObject(ListView.Selected.Data) is TThreadItem then begin
4075 Application.ProcessMessages;
4076 ThreadItem := TThreadItem(ListView.Selected.Data);
4077 DownloadContent(ThreadItem);
4082 procedure TGikoForm.BrowserMovement(AName: string);
4088 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
4090 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
4091 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4092 Application.ProcessMessages;
4095 // Access Violation
\82ª
\8bN
\82«
\82é
\8e\96\82ª
\82 \82é
\82Ì
\82Å
\8d¡
\8cã
\97v
\83`
\83F
\83b
\83N
4099 item := OleVariant( Browser.Document as IHTMLDocument2).anchors.item(nm);
4101 top := top + item.offsetTop;
4102 item := item.offsetParent;
4103 until AnsiCompareText(item.tagName, 'body' ) = 0;
4105 OleVariant(Browser.Document as IHTMLDocument2).body.scrollTop := top;
4110 procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
4112 if TObject(Node.Data) is TBBS then begin
4113 TBBS(Node.Data).NodeExpand := False;
4114 end else if TObject(Node.Data) is TCategory then begin
4115 TCategory(Node.Data).NodeExpand := False;
4116 end else if TObject(Node.Data) is TBoard then begin
4117 TBoard(Node.Data).NodeExpand := False;
4121 procedure TGikoForm.MessageListViewResize(Sender: TObject);
4123 // MessageListView.Column[0].Width := MessageListView.ClientWidth - 16;
4126 procedure TGikoForm.SelectListItem(List: TList);
4128 // TmpTreeNode: TTreeNode;
4129 TmpListItem: TListItem;
4132 TmpListItem := ListView.Selected;
4133 while TmpListItem <> nil do begin
4134 List.Add(TmpListItem.Data);
4135 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
4140 procedure TGikoForm.ExitActionExecute(Sender: TObject);
4145 procedure TGikoForm.AllSelectActionExecute(Sender: TObject);
4150 procedure TGikoForm.StdToolBarVisibleActionExecute(Sender: TObject);
4152 CoolBand: TCoolBand;
4154 CoolBand := GetCoolBand(MainCoolBar, StdToolBar);
4155 if CoolBand = nil then
4157 GikoSys.Setting.StdToolBarVisible := StdToolBarVisibleAction.Checked;
4158 CoolBand.Visible := GikoSys.Setting.StdToolBarVisible;
4159 // StdToolBar.Visible := StdToolBarVisibleAction.Checked;
4160 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4162 //StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
4163 StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible;
4166 procedure TGikoForm.AddressBarVisibleActionExecute(Sender: TObject);
4168 CoolBand: TCoolBand;
4170 CoolBand := GetCoolBand(MainCoolBar, AddressToolBar);
4171 if CoolBand = nil then
4173 GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked;
4174 CoolBand.Visible := GikoSys.Setting.AddressBarVisible;
4175 //AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
4176 AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible;
4179 procedure TGikoForm.LinkBarVisibleActionExecute(Sender: TObject);
4181 CoolBand: TCoolBand;
4183 CoolBand := GetCoolBand(MainCoolBar, LinkToolBar);
4184 if CoolBand = nil then
4186 GikoSys.Setting.LinkBarVisible := LinkBarVisibleAction.Checked;
4187 CoolBand.Visible := GikoSys.Setting.LinkBarVisible;
4188 //LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
4189 LinkToolBarVisiblePMenu.Checked := GikoSys.Setting.LinkBarVisible;
4192 procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);
4194 CoolBand: TCoolBand;
4196 CoolBand := GetCoolBand(ListCoolBar, ListToolBar);
4197 if CoolBand = nil then
4199 CoolBand.Visible := ListToolBarVisibleAction.Checked;
4200 // ListToolBar.Visible := ListToolBarVisibleAction.Checked;
4201 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4202 GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;
4205 procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);
4207 CoolBand: TCoolBand;
4209 CoolBand := GetCoolBand(ListCoolBar, ListNameToolBar);
4210 if CoolBand = nil then
4212 CoolBand.Visible := ListNameBarVisibleAction.Checked;
4213 GikoSys.Setting.ListNameBarVisible := ListNameBarVisibleAction.Checked;
4216 procedure TGikoForm.BrowserToolBarVisibleActionExecute(Sender: TObject);
4218 CoolBand: TCoolBand;
4220 CoolBand := GetCoolBand(BrowserCoolBar, BrowserToolBar);
4221 if CoolBand = nil then
4223 CoolBand.Visible := BrowserToolBarVisibleAction.Checked;
4224 // BrowserToolBar.Visible := BrowserToolBarVisibleAction.Checked;
4225 GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;
4228 procedure TGikoForm.BrowserNameBarVisibleActionExecute(Sender: TObject);
4230 CoolBand: TCoolBand;
4232 CoolBand := GetCoolBand(BrowserCoolBar, BrowserNameToolBar);
4233 if CoolBand = nil then
4235 CoolBand.Visible := BrowserNameBarVisibleAction.Checked;
4236 GikoSys.Setting.BrowserNameBarVisible := BrowserNameBarVisibleAction.Checked;
4239 procedure TGikoForm.MsgBarVisibleActionExecute(Sender: TObject);
4241 MessageSplitter.Visible := MsgBarVisibleAction.Checked;
4242 MessagePanel.Top := MessageSplitter.Top + MessageSplitter.Height;
4243 MessageSplitter.Top := MessagePanel.Top + 1;
4244 MessagePanel.Visible := MsgBarVisibleAction.Checked;
4245 GikoSys.Setting.MessageBarVisible := MsgBarVisibleAction.Checked;
4248 procedure TGikoForm.StatusBarVisibleActionExecute(Sender: TObject);
4250 StatusBar.Visible := StatusBarVisibleAction.Checked;
4251 GikoSys.Setting.StatusBarVisible := StatusBarVisibleAction.Checked;
4254 procedure TGikoForm.IconStyleExecute(Sender: TObject);
4256 case ListView.ViewStyle of
4257 vsIcon: SmallIconAction.Execute;
4258 vsSmallIcon: ListIconAction.Execute;
4259 vsList: DetailIconAction.Execute;
4260 vsReport: LargeIconAction.Execute;
4264 procedure TGikoForm.LargeIconActionExecute(Sender: TObject);
4266 ListView.ViewStyle := vsIcon;
4267 LargeIconAction.Checked := True;
4270 procedure TGikoForm.SmallIconActionExecute(Sender: TObject);
4272 ListView.ViewStyle := vsSmallIcon;
4273 SmallIconAction.Checked := True;
4276 procedure TGikoForm.ListIconActionExecute(Sender: TObject);
4278 ListView.ViewStyle := vsList;
4279 ListIconAction.Checked := True;
4282 procedure TGikoForm.DetailIconActionExecute(Sender: TObject);
4284 ListView.ViewStyle := vsReport;
4285 DetailIconAction.Checked := True;
4288 procedure TGikoForm.SearchActionExecute(Sender: TObject);
4293 if FSearchDialog = nil then begin
4294 if (GikoForm.GetActiveList is TCategory) or (GikoForm.GetActiveList is TBoard) then
4295 chk := GikoForm.GetActiveList
4299 FSearchDialog := TSearchDialog.Create(Self, chk);
4300 FSearchDialog.SearchComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
4310 procedure TGikoForm.OptionActionExecute(Sender: TObject);
4314 Dlg := TOptionDialog.Create(Self);
4322 procedure TGikoForm.GikoNaviWebPageActionExecute(Sender: TObject);
4324 URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
4326 GikoSys.OpenBrowser(URL_GIKONAVI, gbtAuto);
4329 procedure TGikoForm.MonazillaWebPageActionExecute(Sender: TObject);
4331 URL_MONAZILLA: string = 'http://www.monazilla.org/';
4333 GikoSys.OpenBrowser(URL_MONAZILLA, gbtAuto);
4336 procedure TGikoForm.BBS2chWebPageActionExecute(Sender: TObject);
4338 URL_2ch: string = 'http://www.2ch.net/';
4340 GikoSys.OpenBrowser(URL_2ch, gbtAuto);
4343 procedure TGikoForm.GikoFolderOpenActionExecute(Sender: TObject);
4345 // GikoSys.OpenBrowser(GikoSys.GetAppDir, gbtIE);
4346 GikoSys.CreateProcess('explorer.exe', '/e,"' + GikoSys.GetAppDir + '"');
4349 procedure TGikoForm.AboutActionExecute(Sender: TObject);
4353 Dlg := TAboutDialog.Create(Self);
4361 procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject);
4366 procedure TGikoForm.CabinetVisible( isVisible : Boolean );
4368 TreeSplitter.Visible := isVisible;
4369 CabinetPanel.Visible := isVisible;
4370 CabinetVisibleAction.Checked := isVisible;
4373 procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject);
4376 gttHistory: CabinetHistoryAction.Execute;
4377 gttFavorite: CabinetFavoriteAction.Execute;
4379 CabinetBBSAction.Execute;
4383 procedure TGikoForm.AllItemActionExecute(Sender: TObject);
4386 if ViewType <> gvtAll then
4387 SetListViewType(gvtAll);
4388 AllItemAction.Checked := True;
4389 LogItemAction.Checked := False;
4390 NewItemAction.Checked := False;
4391 //SelectItemAction.Checked := False;
4392 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4394 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4395 if SelectComboBox.Parent <> nil then begin
4396 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4397 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4404 procedure TGikoForm.LogItemActionExecute(Sender: TObject);
4407 if ViewType <> gvtLog then
4408 SetListViewType(gvtLog);
4409 AllItemAction.Checked := False;
4410 LogItemAction.Checked := True;
4411 NewItemAction.Checked := False;
4412 //SelectItemAction.Checked := False;
4413 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4415 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4416 if SelectComboBox.Parent <> nil then begin
4417 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4418 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4425 procedure TGikoForm.NewItemActionExecute(Sender: TObject);
4429 if ViewType <> gvtNew then
4430 SetListViewType(gvtNew);
4431 AllItemAction.Checked := False;
4432 LogItemAction.Checked := False;
4433 NewItemAction.Checked := True;
4434 //SelectItemAction.Checked := False;
4435 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4437 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4438 if SelectComboBox.Parent <> nil then begin
4439 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4440 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4447 procedure TGikoForm.SelectItemActionExecute(Sender: TObject);
4450 Dlg: TListSelectDialog;
4453 if SelectComboBox.Parent <> nil then begin
4454 if SelectComboBox.Left + SelectComboBox.Width < ListToolBar.Width then begin
4455 // SelectComboBox
\82ª
\82 \82é
\8fê
\8d\87\82Í
\83t
\83H
\81[
\83J
\83X
\82ð
\88Ú
\82·
4456 SelectComboBox.SetFocus;
4463 if SelectComboBox.Text = SELECTCOMBOBOX_NAME then begin
4464 SelectComboBox.Text := '';
4465 SelectComboBox.Color := clWindow;
4468 AllItemAction.Checked := False;
4469 LogItemAction.Checked := False;
4470 NewItemAction.Checked := False;
4471 //SelectItemAction.Checked := True;
4473 Dlg := TListSelectDialog.Create(Self);
4475 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
4476 Dlg.SelectComboBox.Text := SelectComboBox.Text;
4478 if Dlg.ModalResult = mrCancel then begin
4479 if Length( SelectComboBox.Text ) = 0 then begin
4480 AllItemAction.Checked := True;
4481 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4482 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4485 if GetActiveList is TBoard then
4486 SetListViewType(gvtUser, TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText , Dlg.KubetsuCheckBox.Checked);
4488 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
4490 GikoSys.Setting.SelectTextList.Delete(idx);
4491 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
4492 while Dlg.SelectComboBox.Items.Count > 100 do begin
4493 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
4496 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
4497 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4498 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4500 SelectComboBox.Text := Dlg.SelectComboBox.Text;
4501 SelectComboBox.Color := clWindow;
4503 SetListViewType(gvtUser, Dlg.SelectComboBox.Text, Dlg.KubetsuCheckBox.Checked);
4510 procedure TGikoForm.ListNumberVisibleActionExecute(Sender: TObject);
4512 GikoSys.Setting.ListViewNo := ListNumberVisibleAction.Checked;
4516 procedure TGikoForm.UpFolderActionExecute(Sender: TObject);
4518 if GetActiveList is TBoard then begin
4519 // if FTreeType = gtt2ch then
4520 SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
4521 //SetActiveList(TBoard(GetActiveList).ParentCategory);
4522 end else if GetActiveList is TCategory then begin
4523 // if FTreeType = gtt2ch then
4524 SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);
4525 //SetActiveList(TCategory(GetActiveList).ParenTBBS);
4527 // if TreeView.Selected = nil then Exit;
4528 // if TreeView.Selected.Level = 0 then Exit;
4529 // TreeView.Selected.Parent.Selected := True;
4532 procedure TGikoForm.RoundActionExecute(Sender: TObject);
4536 Dlg := TRoundDialog.Create(Self);
4544 procedure TGikoForm.StopActionExecute(Sender: TObject);
4546 FControlThread.DownloadAbort;
4547 if FWorkCount <> 0 then FWorkCount := 0;
4549 Animate.Active := False;
4552 Screen.Cursor := crDefault;
4555 procedure TGikoForm.MsgBarCloseActionExecute(Sender: TObject);
4557 // MessagePanel.Visible := False;
4558 // MessageSplitter.Visible := False;
4559 // MsgBarVisibleAction.Checked := False;
4560 MsgBarVisibleAction.Execute;
4563 procedure TGikoForm.BrowserMaxActionExecute(Sender: TObject);
4565 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4566 case GikoSys.Setting.ListWidthState of
4568 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4569 ViewPanel.Width := FBrowserSizeWidth;
4570 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4571 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4572 GikoSys.Setting.ListWidthState := glsNormal;
4574 glsMin, glsNormal: begin
4575 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4576 if GikoSys.Setting.ListWidthState = glsNormal then
4577 FBrowserSizeWidth := ViewPanel.Width;
4578 ViewPanel.Width := 1;
4579 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4580 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4581 GikoSys.Setting.ListWidthState := glsMax;
4585 case GikoSys.Setting.ListHeightState of
4587 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4588 ViewPanel.Height := FBrowserSizeHeight;
4589 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4590 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4591 GikoSys.Setting.ListHeightState := glsNormal;
4593 glsMin, glsNormal: begin
4594 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4595 if GikoSys.Setting.ListHeightState = glsNormal then
4596 FBrowserSizeHeight := ViewPanel.Height;
4597 ViewPanel.Height := 1;
4598 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4599 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4600 GikoSys.Setting.ListHeightState := glsMax;
4604 // Mouse.CursorPos := BrowserSizeButton.ClientToScreen(Point(
4605 // System.Round(BrowserToolBar.ButtonWidth div 2),
4606 // System.Round(BrowserToolBar.ButtonHeight div 2)));
4609 procedure TGikoForm.BrowserMinActionExecute(Sender: TObject);
4611 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4612 case GikoSys.Setting.ListWidthState of
4613 glsMax, glsNormal: begin
4614 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4615 if GikoSys.Setting.ListWidthState = glsNormal then
4616 FBrowserSizeWidth := ViewPanel.Width;
4617 ViewPanel.Width := ThreadMainPanel.Width - 80;
4618 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4619 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4620 GikoSys.Setting.ListWidthState := glsMin;
4623 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4624 ViewPanel.Width := FBrowserSizeWidth;
4625 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4626 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4627 GikoSys.Setting.ListWidthState := glsNormal;
4631 case GikoSys.Setting.ListHeightState of
4632 glsMax, glsNormal: begin
4633 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4634 if GikoSys.Setting.ListHeightState = glsNormal then
4635 FBrowserSizeHeight := ViewPanel.Height;
4636 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
4637 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4638 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4639 GikoSys.Setting.ListHeightState := glsMin;
4642 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4643 ViewPanel.Height := FBrowserSizeHeight;
4644 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4645 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4646 GikoSys.Setting.ListHeightState := glsNormal;
4652 procedure TGikoForm.ScrollTopActionExecute(Sender: TObject);
4654 BrowserMovement('top');
4657 procedure TGikoForm.ScrollLastActionExecute(Sender: TObject);
4659 BrowserMovement('bottom');
4662 procedure TGikoForm.ScrollNewActionExecute(Sender: TObject);
4664 BrowserMovement('new');
4667 procedure TGikoForm.ScrollKokoActionExecute(Sender: TObject);
4669 BrowserMovement('koko');
4672 procedure TGikoForm.EditorActionExecute(Sender: TObject);
4674 Editor: TEditorForm;
4678 Item := GetActiveContent;
4679 if Item = nil then Exit;
4681 if Item.Count >= 1000 then begin
4682 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
4683 + '
\90V
\83X
\83\8c\83b
\83h
\82ð
\92T
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
4684 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin
4688 Editor := TEditorForm.Create(Self);
4689 Editor.SetThreadItem(Item);
4690 GikoSys.LoadEditorKeySetting(Editor.ActionList);
4692 Editor.BodyEdit.SetFocus;
4695 procedure TGikoForm.IEActionExecute(Sender: TObject);
4697 ShowThreadAction.Execute;
4700 procedure TGikoForm.ShowThreadActionExecute(Sender: TObject);
4702 ThreadItem: TThreadItem;
4704 ThreadItem := GetActiveContent;
4705 if ThreadItem = nil then Exit;
4706 GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
4709 procedure TGikoForm.ShowBoardActionExecute(Sender: TObject);
4711 ThreadItem: TThreadItem;
4713 ThreadItem := GetActiveContent;
4714 if ThreadItem = nil then Exit;
4715 GikoSys.OpenBrowser(ThreadItem.ParentBoard.URL, gbtAuto);
4718 //(Thread)URL
\82ð
\83R
\83s
\81[
4719 procedure TGikoForm.URLCopyActionExecute(Sender: TObject);
4724 if TObject(GetActiveContent) is TBoard then
4725 s := s + TBoard(GetActiveContent).URL + #13#10
4726 else if TObject(GetActiveContent) is TThreadItem then
4727 s := s + TThreadItem(GetActiveContent).URL + #13#10;
4729 Clipboard.AsText := s;
4732 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ð
\83R
\83s
\81[
4733 procedure TGikoForm.NameCopyActionExecute(Sender: TObject);
4738 if TObject(GetActiveContent) is TBoard then
4739 s := s + TBoard(GetActiveContent).Title + #13#10
4740 else if TObject(GetActiveContent) is TThreadItem then
4741 s := s + TThreadItem(GetActiveContent).Title + #13#10;
4743 Clipboard.AsText := s;
4746 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ÆURL
\82ð
\83R
\83s
\81[
4747 procedure TGikoForm.NameURLCopyActionExecute(Sender: TObject);
4752 if TObject(GetActiveContent) is TBoard then
4753 s := s + TBoard(GetActiveContent).Title + #13#10 + TBoard(GetActiveContent).URL + #13#10
4754 else if TObject(GetActiveContent) is TThreadItem then
4755 s := s + TThreadItem(GetActiveContent).Title + #13#10 + TThreadItem(GetActiveContent).URL + #13#10;
4757 Clipboard.AsText := s;
4760 procedure TGikoForm.ItemReloadActionExecute(Sender: TObject);
4762 ThreadItem: TThreadItem;
4764 ThreadItem := GetActiveContent;
4765 if ThreadItem <> nil then
4766 DownloadContent(ThreadItem);
4769 procedure TGikoForm.SelectListReloadActionExecute(Sender: TObject);
4775 if GetActiveList is TCategory then begin
4776 List := TList.Create;
4778 SelectListItem(List);
4779 if List.Count > 5 then begin
4780 msg := '5
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
4781 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
4782 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
4785 for i := 0 to List.Count - 1 do begin
4786 if TObject(List[i]) is TBoard then
4787 DownloadList(TBoard(List[i]));
4792 end else if GetActiveList is TBoard then begin
4793 DownloadList(TBoard(GetActiveList));
4797 procedure TGikoForm.SelectThreadReloadActionExecute(Sender: TObject);
4803 List := TList.Create;
4805 SelectListItem(List);
4806 if List.Count > 10 then begin
4807 msg := '10
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
4808 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
4809 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
4812 for i := 0 to List.Count - 1 do begin
4813 if TObject(List[i]) is TThreadItem then
4814 DownloadContent(TThreadItem(List[i]));
4821 procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);
4823 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
4824 SelectListReloadAction.Enabled := True
4825 else if GetActiveList is TBoard then
4826 SelectListReloadAction.Enabled := True
4828 SelectListReloadAction.Enabled := False;
4831 procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);
4833 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
4834 SelectThreadReloadAction.Enabled := True
4836 SelectThreadReloadAction.Enabled := False;
4839 procedure TGikoForm.AllItemActionUpdate(Sender: TObject);
4841 AllItemAction.Enabled := (GetActiveList is TBoard);
4844 procedure TGikoForm.LogItemActionUpdate(Sender: TObject);
4846 LogItemAction.Enabled := (GetActiveList is TBoard);
4849 procedure TGikoForm.NewItemActionUpdate(Sender: TObject);
4851 NewItemAction.Enabled := (GetActiveList is TBoard);
4854 procedure TGikoForm.SelectItemActionUpdate(Sender: TObject);
4856 SelectItemAction.Enabled := (GetActiveList is TBoard);
4859 procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
4861 UpFolderAction.Enabled := not (GetActiveList is TBBS);
4864 procedure TGikoForm.ThreadEditorActionUpdate(Sender: TObject);
4866 ThreadEditorAction.Enabled := (GetActiveList is TBoard);
4869 procedure TGikoForm.FormResize(Sender: TObject);
4873 MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
4874 MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
4876 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4877 if GikoSys.Setting.ListWidthState = glsMin then begin
4878 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4879 ViewPanel.Width := ThreadMainPanel.Width - 80;
4882 if GikoSys.Setting.ListHeightState = glsMin then begin
4883 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4884 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
4888 if FIsMinimize = mtMinimized then begin
4889 if FActiveContent <> nil then begin
4890 doc := Browser.Document;
4891 doc.Body.ScrollTop := FActiveContent.ScrollTop;
4892 FIsMinimize := mtNone;
4896 FIsIgnoreResize := True;
4897 PostMessage( Handle, USER_RESIZED, 0, 0 );
4900 procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject);
4902 ScrollTopAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
4905 procedure TGikoForm.ScrollLastActionUpdate(Sender: TObject);
4907 ScrollLastAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
4910 procedure TGikoForm.ScrollNewActionUpdate(Sender: TObject);
4912 ScrollNewAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
4915 procedure TGikoForm.ScrollKokoActionUpdate(Sender: TObject);
4917 ScrollKokoAction.Enabled := (GetActiveContent <> nil)
4918 and (GetActiveContent.IsLogFile)
4919 and (GetActiveContent.Kokomade <> -1);
4923 procedure TGikoForm.EditorActionUpdate(Sender: TObject);
4925 EditorAction.Enabled := GetActiveContent <> nil;
4928 procedure TGikoForm.IEActionUpdate(Sender: TObject);
4930 IEAction.Enabled := GetActiveContent <> nil;
4933 procedure TGikoForm.ShowThreadActionUpdate(Sender: TObject);
4935 ShowThreadAction.Enabled := GetActiveContent <> nil;
4938 procedure TGikoForm.ShowBoardActionUpdate(Sender: TObject);
4940 ShowBoardAction.Enabled := GetActiveContent <> nil;
4943 procedure TGikoForm.ItemReloadActionUpdate(Sender: TObject);
4945 ItemReloadAction.Enabled := GetActiveContent <> nil;
4948 procedure TGikoForm.URLCopyActionUpdate(Sender: TObject);
4950 URLCopyAction.Enabled := GetActiveContent <> nil;
4953 procedure TGikoForm.NameCopyActionUpdate(Sender: TObject);
4955 NameCopyAction.Enabled := GetActiveContent <> nil;
4958 procedure TGikoForm.NameURLCopyActionUpdate(Sender: TObject);
4960 NameURLCopyAction.Enabled := GetActiveContent <> nil;
4963 procedure TGikoForm.BrowserTabCloseActionUpdate(Sender: TObject);
4965 BrowserTabCloseAction.Enabled := GetActiveContent <> nil;
4968 procedure TGikoForm.NotSelectTabCloseActionUpdate(Sender: TObject);
4970 NotSelectTabCloseAction.Enabled := GetActiveContent <> nil;
4973 procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
4975 AllTabCloseAction.Enabled := GetActiveContent <> nil;
4978 procedure TGikoForm.ActiveLogDeleteActionUpdate(Sender: TObject);
4980 ActiveLogDeleteAction.Enabled := GetActiveContent <> nil;
4983 procedure TGikoForm.ListViewDblClick(Sender: TObject);
4988 procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
4990 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';
4991 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
4993 ThreadItem: TThreadItem;
4994 TmpListItem: TListItem;
4998 List := TList.Create;
5000 TmpListItem := ListView.Selected;
5001 while TmpListItem <> nil do begin
5002 if TObject(TmpListItem.Data) is TThreadItem then begin
5003 ThreadItem := TThreadItem(TmpListItem.Data);
5004 if ThreadItem.IsLogFile then
5005 List.Add(ThreadItem);
5007 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
5010 if GikoSys.Setting.DeleteMsg and (List.Count > 0) then begin
5011 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
5015 for i := 0 to List.Count - 1 do begin
5016 ThreadItem := TThreadItem(List[i]);
5017 DeleteHistory(ThreadItem);
5018 DeleteTab(ThreadItem);
5019 ThreadItem.DeleteLogFile;
5027 procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
5031 FTabHintIndex := -1;
5032 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5033 if TThreadItem(BrowserTab.Tabs.Objects[i]) = ThreadItem then begin
5034 BrowserTab.Tabs.Delete(i);
5035 if i > (BrowserTab.Tabs.Count - 1) then
5036 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1
5038 BrowserTab.TabIndex := i;
5039 if BrowserTab.Tabs.Count = 0 then
5041 else if BrowserTab.TabIndex <> -1 then
5042 SetContent(TThreadItem(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]));
5048 procedure TGikoForm.KokomadeActionExecute(Sender: TObject);
5051 ThreadItem: TThreadItem;
5056 No := KokoPopupMenu.Tag;
5057 if No = 0 then Exit;
5058 ThreadItem := GetActiveContent;
5059 if ThreadItem = nil then Exit;
5060 ThreadItem.Kokomade := No;
5061 doc := Browser.Document;
5062 ScrollTop := doc.Body.ScrollTop;
5064 GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
5065 // HtmlName := GikoSys.CreateHTML(ThreadItem, sTitle) + '#koko';
5067 // Browser.Navigate(HtmlName, Flags);
5069 Application.ProcessMessages;
5070 doc.Body.ScrollTop := ScrollTop;
5073 procedure TGikoForm.ZenbuActionExecute(Sender: TObject);
5075 ThreadItem: TThreadItem;
5080 ThreadItem := GetActiveContent;
5081 if ThreadItem = nil then Exit;
5082 ThreadItem.Kokomade := -1;
5083 doc := Browser.Document;
5084 ScrollTop := doc.Body.ScrollTop;
5085 GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
5086 // HtmlName := GikoSys.CreateHTML(ThreadItem, sTitle) + '#koko';
5088 // Browser.Navigate(HtmlName, Flags);
5090 Application.ProcessMessages;
5091 doc.Body.ScrollTop := ScrollTop;
5094 function TGikoForm.Hook(var Message: TMessage): Boolean;
5103 procedure TGikoForm.KokoResActionExecute(Sender: TObject);
5105 Editor: TEditorForm;
5110 Number := KokoPopupMenu.Tag;
5111 if Number = 0 then Exit;
5112 Item := GetActiveContent;
5113 if Item = nil then Exit;
5115 if Item.Count >= 1000 then begin
5116 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
5117 + '
\90V
\83X
\83\8c\83b
\83h
\82ð
\92T
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
5118 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin
5122 Editor := TEditorForm.Create(Self);
5123 Editor.SetThreadItem(Item);
5124 Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
5126 Editor.BodyEdit.SetFocus;
5129 procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
5131 ItemRoundPMenu.Visible := (GetActiveList is TBoard);
5132 ItemReservPMenu.Visible := (GetActiveList is TBoard);
5133 LPMSep01.Visible := (GetActiveList is TBoard);
5134 ListRoundPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5135 ListReservPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5136 LPMSep02.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5137 KidokuPMenu.Visible := (GetActiveList is TBoard);
5138 MidokuPMenu.Visible := (GetActiveList is TBoard);
5139 UrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5140 NameUrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5141 AllSelectPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5142 LPMSep05.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5143 DeletePMenu.Visible := (GetActiveList is TBoard);
5144 LPMSep06.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5146 BoardFavoriteAddMenu.Visible := (GetActiveList is TCategory);
5147 ThreadFavoriteAddMenu.Visible := (GetActiveList is TBoard);
5149 AddRoundNameMenu(ItemReservPMenu);
5150 AddRoundNameMenu(ListReservPMenu);
5153 procedure TGikoForm.BoardIEActionExecute(Sender: TObject);
5157 if GetActiveList is TBoard then begin
5158 URL := TBoard(GetActiveList).URL;
5159 GikoSys.OpenBrowser(URL, gbtAuto);
5163 procedure TGikoForm.SelectItemURLCopyActionExecute(Sender: TObject);
5170 List := TList.Create;
5172 SelectListItem(List);
5173 for i := 0 to List.Count - 1 do begin
5174 if TObject(List[i]) is TBoard then
5175 s := s + TBoard(List[i]).URL + #13#10
5176 else if TObject(List[i]) is TThreadItem then
5177 s := s + TThreadItem(List[i]).URL + #13#10;
5180 Clipboard.AsText := s;
5186 procedure TGikoForm.SelectItemNameCopyActionExecute(Sender: TObject);
5193 List := TList.Create;
5195 SelectListItem(List);
5196 for i := 0 to List.Count - 1 do begin
5197 if TObject(List[i]) is TBoard then
5198 s := s + TBoard(List[i]).Title + #13#10
5199 else if TObject(List[i]) is TThreadItem then
5200 s := s + TThreadItem(List[i]).Title + #13#10;
5203 Clipboard.AsText := s;
5209 procedure TGikoForm.SelectItemNameURLCopyActionExecute(Sender: TObject);
5216 List := TList.Create;
5218 SelectListItem(List);
5219 for i := 0 to List.Count - 1 do begin
5220 if TObject(List[i]) is TBoard then
5221 s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10
5222 else if TObject(List[i]) is TThreadItem then
5223 s := s + TThreadItem(List[i]).Title + #13#10 + TThreadItem(List[i]).URL + #13#10;
5226 Clipboard.AsText := s;
5232 procedure TGikoForm.BoardIEActionUpdate(Sender: TObject);
5234 if GetActiveList is TBoard then
5235 BoardIEAction.Enabled := True
5237 BoardIEAction.Enabled := False;
5240 procedure TGikoForm.SelectItemURLCopyActionUpdate(Sender: TObject);
5242 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5243 SelectItemURLCopyAction.Enabled := True
5245 SelectItemURLCopyAction.Enabled := False;
5248 procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
5250 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5251 SelectItemNameCopyAction.Enabled := True
5253 SelectItemNameCopyAction.Enabled := False;
5256 procedure TGikoForm.SelectItemNameURLCopyActionUpdate(Sender: TObject);
5258 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5259 SelectItemNameURLCopyAction.Enabled := True
5261 SelectItemNameURLCopyAction.Enabled := False;
5264 procedure TGikoForm.AllSelectActionUpdate(Sender: TObject);
5266 if ListView.SelCount > 0 then
5267 AllSelectAction.Enabled := True
5269 AllSelectAction.Enabled := False;
5272 procedure TGikoForm.LogDeleteActionUpdate(Sender: TObject);
5274 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5275 LogDeleteAction.Enabled := True
5277 LogDeleteAction.Enabled := False;
5280 procedure TGikoForm.BrowserTabCloseActionExecute(Sender: TObject);
5283 ThreadItem: TThreadItem;
5285 idx := BrowserTab.TabIndex;
5286 if idx <> -1 then begin
5287 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5288 DeleteTab(ThreadItem);
5292 procedure TGikoForm.NotSelectTabCloseActionExecute(Sender: TObject);
5296 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
5297 if BrowserTab.TabIndex <> i then begin
5298 BrowserTab.Tabs.Delete(i);
5303 procedure TGikoForm.AllTabCloseActionExecute(Sender: TObject);
5307 for i := BrowserTab.Tabs.Count - 1 downto 0 do
5308 BrowserTab.Tabs.Delete(i);
5312 procedure TGikoForm.TreeSelectBoradReloadExecute(Sender: TObject);
5315 TmpTreeNode: TTreeNode;
5317 TmpTreeNode := FClickNode;
5318 TreeView.Selected := FClickNode;
5321 if TObject(TmpTreeNode.Data) is TBoard then
5322 Board := TBoard(TmpTreeNode.Data)
5323 else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then
5324 Board := TFavoriteBoardItem(TmpTreeNode.Data).Item;
5326 if Board <> nil then
5327 DownloadList(Board);
5330 procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject);
5332 ThreadItem: TThreadItem;
5333 TmpTreeNode: TTreeNode;
5335 TmpTreeNode := FClickNode;
5336 TreeView.Selected := FClickNode;
5339 if TObject(TmpTreeNode.Data) is TThreadItem then
5340 ThreadItem := TThreadItem(TmpTreeNode.Data)
5341 else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then
5342 ThreadItem := TFavoriteThreadItem(TmpTreeNode.Data).Item;
5344 if ThreadItem <> nil then
5345 DownloadContent(ThreadItem);
5348 procedure TGikoForm.TreeSelectURLCopyExecute(Sender: TObject);
5350 TmpTreeNode: TTreeNode;
5353 TmpTreeNode := FClickNode;
5354 TreeView.Selected := FClickNode;
5355 if TObject(TmpTreeNode.Data) is TBoard then begin
5356 s := TBoard(TmpTreeNode.Data).URL + #13#10;
5357 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5358 s := TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5359 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5360 s := TThreadItem(TmpTreeNode.Data).URL + #13#10;
5361 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5362 s := TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5364 Clipboard.AsText := s;
5367 procedure TGikoForm.TreeSelectNameURLCopyExecute(Sender: TObject);
5369 TmpTreeNode: TTreeNode;
5372 TmpTreeNode := FClickNode;
5373 TreeView.Selected := FClickNode;
5374 if TObject(TmpTreeNode.Data) is TBoard then begin
5375 s := TBoard(TmpTreeNode.Data).Title + #13#10 + TBoard(TmpTreeNode.Data).URL + #13#10;
5376 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5377 s := TFavoriteBoardItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5378 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5379 s := TThreadItem(TmpTreeNode.Data).Title + #13#10 + TThreadItem(TmpTreeNode.Data).URL + #13#10;
5380 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5381 s := TFavoriteThreadItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5383 Clipboard.AsText := s;
5386 procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
5388 FClickNode := TreeView.Selected;
5389 if FClickNode = nil then begin
5390 TreeSelectThreadPupupMenu.Visible := False;
5391 TreeSelectBoardPupupMenu.Visible := False;
5392 TPMSep01.Visible := False;
5393 TreeSelectURLPupupMenu.Visible := False;
5394 TreeSelectNamePupupMenu.Visible := False;
5395 TreeSelectNameURLPupupMenu.Visible := False;
5396 TreeSelectFavoriteAddPupupMenu.Visible := False;
5397 TreeSelectLogDeleteSeparator.Visible := False;
5398 TreeSelectLogDeletePopupMenu.Visible := False;
5399 end else if TObject(FClickNode.Data) is TBoard then begin
5400 TreeSelectThreadPupupMenu.Visible := False;
5401 TreeSelectBoardPupupMenu.Visible := True;
5402 TPMSep01.Visible := True;
5403 TreeSelectURLPupupMenu.Visible := True;
5404 TreeSelectNamePupupMenu.Visible := True;
5405 TreeSelectNameURLPupupMenu.Visible := True;
5406 TreeSelectFavoriteAddPupupMenu.Visible := True;
5407 TreeSelectLogDeleteSeparator.Visible := False;
5408 TreeSelectLogDeletePopupMenu.Visible := False;
5409 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
5410 TreeSelectThreadPupupMenu.Visible := False;
5411 TreeSelectBoardPupupMenu.Visible := True;
5412 TPMSep01.Visible := True;
5413 TreeSelectURLPupupMenu.Visible := True;
5414 TreeSelectNamePupupMenu.Visible := True;
5415 TreeSelectNameURLPupupMenu.Visible := True;
5416 TreeSelectFavoriteAddPupupMenu.Visible := True;
5417 TreeSelectLogDeleteSeparator.Visible := False;
5418 TreeSelectLogDeletePopupMenu.Visible := False;
5419 end else if (TObject(FClickNode.Data) is TThreadItem) then begin
5420 TreeSelectThreadPupupMenu.Visible := True;
5421 TreeSelectBoardPupupMenu.Visible := False;
5422 TPMSep01.Visible := True;
5423 TreeSelectURLPupupMenu.Visible := True;
5424 TreeSelectNamePupupMenu.Visible := True;
5425 TreeSelectNameURLPupupMenu.Visible := True;
5426 TreeSelectFavoriteAddPupupMenu.Visible := True;
5427 TreeSelectLogDeleteSeparator.Visible := True;
5428 TreeSelectLogDeletePopupMenu.Visible := True;
5429 end else if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
5430 TreeSelectThreadPupupMenu.Visible := True;
5431 TreeSelectBoardPupupMenu.Visible := False;
5432 TPMSep01.Visible := True;
5433 TreeSelectURLPupupMenu.Visible := True;
5434 TreeSelectNamePupupMenu.Visible := True;
5435 TreeSelectNameURLPupupMenu.Visible := True;
5436 TreeSelectFavoriteAddPupupMenu.Visible := True;
5437 TreeSelectLogDeleteSeparator.Visible := True;
5438 TreeSelectLogDeletePopupMenu.Visible := True;
5439 end else if (TObject(FClickNode.Data) is TCategory) then begin
5440 TreeSelectThreadPupupMenu.Visible := False;
5441 TreeSelectBoardPupupMenu.Visible := False;
5442 TPMSep01.Visible := False;
5443 TreeSelectURLPupupMenu.Visible := False;
5444 TreeSelectNamePupupMenu.Visible := True;
5445 TreeSelectNameURLPupupMenu.Visible := False;
5446 TreeSelectFavoriteAddPupupMenu.Visible := False;
5447 TreeSelectLogDeleteSeparator.Visible := False;
5448 TreeSelectLogDeletePopupMenu.Visible := False;
5449 end else if FClickNode.IsFirstNode then begin
5450 TreeSelectThreadPupupMenu.Visible := False;
5451 TreeSelectBoardPupupMenu.Visible := False;
5452 TPMSep01.Visible := False;
5453 TreeSelectURLPupupMenu.Visible := False;
5454 TreeSelectNamePupupMenu.Visible := True;
5455 TreeSelectNameURLPupupMenu.Visible := False;
5456 TreeSelectFavoriteAddPupupMenu.Visible := False;
5457 TreeSelectLogDeleteSeparator.Visible := False;
5458 TreeSelectLogDeletePopupMenu.Visible := False;
5460 TreeSelectThreadPupupMenu.Visible := False;
5461 TreeSelectBoardPupupMenu.Visible := False;
5462 TPMSep01.Visible := False;
5463 TreeSelectURLPupupMenu.Visible := False;
5464 TreeSelectNamePupupMenu.Visible := False;
5465 TreeSelectNameURLPupupMenu.Visible := False;
5466 TreeSelectFavoriteAddPupupMenu.Visible := False;
5467 TreeSelectLogDeleteSeparator.Visible := False;
5468 TreeSelectLogDeletePopupMenu.Visible := False;
5472 procedure TGikoForm.BrowserNewWindow2(Sender: TObject;
5473 var ppDisp: IDispatch; var Cancel: WordBool);
5482 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
5483 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
5484 Html := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
5486 URL := GikoSys.GetHRefText(Html);
5487 URL := GikoSys.HTMLDecode(URL);
5489 //
\83A
\83h
\83\8c\83X
\83o
\81[
\82Ì
\97\9a\97ð
5490 if GikoSys.Setting.LinkAddAddressBar then begin
5491 idx := AddressComboBox.Items.IndexOf(URL);
5492 if idx = -1 then begin
5493 AddressComboBox.Items.Insert(0, URL);
5494 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
5495 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
5497 AddressComboBox.Items.Delete(idx);
5498 AddressComboBox.Items.Insert(0, URL);
5505 { ShiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5506 CtrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
5509 Memo1.Lines.Add('ShiftDown');
5511 Memo1.Lines.Add('CtrlDown');
5513 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
5514 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
5515 Url := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
5519 URL := GetHRefText(URL);
5521 ParseURI(URL, Protocol, Host, path, Document, Port, Bookmark);
5523 b := Parse2chURL(path, document, bbs, num);
5524 memo1.Lines.Add('bbs: ' + bbs);
5525 memo1.Lines.Add('key: ' + num);
5527 Memo1.Lines.Add('Parse2chURL: True')
5529 Memo1.Lines.Add('Parse2chURL: False');
5531 // AppPath := 'C:\Borland\Projects\Test\TestBrowser\TestBrowser.exe';
5536 procedure TGikoForm.ListSplitterCanResize(Sender: TObject;
5537 var NewSize: Integer; var Accept: Boolean);
5539 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5540 if ViewPanel.Width < 2 then begin
5541 ViewPanel.Width := 1;
5542 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5543 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5544 GikoSys.Setting.ListWidthState := glsMax;
5545 end else if ViewPanel.Width > (ThreadMainPanel.Width - 80) then begin
5546 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5547 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5548 GikoSys.Setting.ListWidthState := glsMin;
5550 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5551 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5552 GikoSys.Setting.ListWidthState := glsNormal;
5555 if ViewPanel.Height < 2 then begin
5556 ViewPanel.Height := 1;
5557 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5558 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5559 GikoSys.Setting.ListHeightState := glsMax;
5560 end else if ViewPanel.Height > (ThreadMainPanel.Height - BrowserCoolBar.Height - 7) then begin
5561 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5562 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5563 GikoSys.Setting.ListHeightState := glsMin;
5565 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5566 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5567 GikoSys.Setting.ListHeightState := glsNormal;
5572 procedure TGikoForm.ListSplitterMoved(Sender: TObject);
5574 if Mouse.Capture <> 0 then
5576 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5577 if (ViewPanel.Width > 1) and (ViewPanel.Width <= (ThreadMainPanel.Width - 80)) then
5578 FBrowserSizeWidth := ViewPanel.Width;
5580 if (ViewPanel.Height > 1) and (ViewPanel.Height <= (ThreadMainPanel.Height - BrowserCoolBar.Height)) then
5581 FBrowserSizeHeight := ViewPanel.Height;
5583 { if (Mouse.Capture = 0) and (ViewPanel.Height > 1) and (not ArrangeAction.Checked) then
5584 FBrowserSizeHeight := ViewPanel.Height
5585 else if (Mouse.Capture = 0) and (ViewPanel.Width > 1) and (ArrangeAction.Checked) then
5586 FBrowserSizeWidth := ViewPanel.Width;}
5589 procedure TGikoForm.BrowserTabChange(Sender: TObject);
5592 ThreadItem: TThreadItem;
5595 // if NewTab = -1 then
5596 if not BrowserTab.Dragging then begin
5597 FTabHintIndex := -1;
5598 BrowserTab.Hint := '';
5599 idx := BrowserTab.TabIndex;
5600 if idx = -1 then begin
5601 SetContent(BrowserNullTab);
5602 end else if BrowserTab.Tabs.Objects[idx] is TThreadItem then begin
5603 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5604 SetContent(ThreadItem);
5605 if GikoSys.Setting.URLDisplay then
5606 AddressComboBox.Text := ThreadItem.URL;
5609 if ThreadItem = nil then Exit;
5610 if ThreadItem.IsLogFile then begin
5611 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5612 if GikoSys.Setting.ListWidthState = glsMin then begin
5613 BrowserMaxAction.Execute;
5614 if GikoForm.Visible then
5618 if GikoSys.Setting.ListHeightState = glsMin then begin
5619 BrowserMaxAction.Execute;
5620 if GikoForm.Visible then
5629 procedure TGikoForm.BrowserTabClick(Sender: TObject);
5632 ThreadItem: TThreadItem;
5634 // if NewTab = -1 then
5635 FTabHintIndex := -1;
5636 BrowserTab.Hint := '';
5637 idx := BrowserTab.TabIndex;
5639 SetContent(BrowserNullTab)
5640 else if BrowserTab.Tabs.Objects[idx] is TThreadItem then begin
5641 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5642 SetContent(ThreadItem);
5643 if GikoSys.Setting.URLDisplay then
5644 AddressComboBox.Text := ThreadItem.URL;
5648 procedure TGikoForm.BrowserTabMouseDown(Sender: TObject;
5649 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
5656 if Button = mbMiddle then begin
5657 //
\83}
\83E
\83X
\92\86\83{
\83^
\83\93
5660 p := BrowserTab.ScreenToClient(p);
5661 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
5662 if idx <> -1 then begin
5663 OldIndex := BrowserTab.TabIndex;
5664 BrowserTab.Tabs.Delete(idx);
5665 if idx = OldIndex then begin
5666 if BrowserTab.Tabs.Count > idx then
5667 BrowserTab.TabIndex := idx
5668 else if BrowserTab.Tabs.Count = idx then
5669 BrowserTab.TabIndex := idx - 1
5670 else if BrowserTab.Tabs.Count > 0 then
5671 BrowserTab.TabIndex := 0;
5672 BrowserTab.OnChange(nil);
5675 //end else if Button = mbRight then begin
5676 //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é
5677 //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
5678 { //
\83}
\83E
\83X
\89E
\83{
\83^
\83\93
5681 // GetCursorPos(p2);
5682 p := BrowserTab.ScreenToClient(p);
5683 // idx := BrowserTab.ItemAtPos(p);
5684 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
5685 if idx <> -1 then begin
5686 OldIndex := BrowserTab.TabIndex;
5687 BrowserTab.TabIndex := idx;
5688 if OldIndex <> idx then
5689 BrowserTab.OnChange(nil);
5690 BrowserTabPopupMenu.Tag := idx;
5691 BrowserTabPopupMenu.Popup(p2.X, p2.Y);
5694 end else if BUtton = mbLeft then begin
5695 FDragWFirst := true;
5696 FMouseDownPos.X := X;
5697 FMouseDownPos.Y := Y;
5702 procedure TGikoForm.SetBrowserTabState;
5705 CoolBand: TCoolBand;
5707 BrowserBottomPanel.AutoSize := False;
5708 if GikoSys.Setting.BrowserTabVisible then begin
5709 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
5710 BrowserTab.Style := tsTabs;
5711 if GikoSys.Setting.BrowserTabPosition = gtpTop then
5712 BrowserTab.TabPosition := tpTop
5714 BrowserTab.TabPosition := tpBottom;
5715 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
5716 BrowserTab.TabPosition := tpTop;
5717 BrowserTab.Style := tsButtons;
5719 BrowserTab.TabPosition := tpTop;
5720 BrowserTab.Style := tsFlatButtons
5723 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
5724 BrowserTab.Parent := BrowserTabToolBar;
5725 BrowserBottomPanel.Hide;
5726 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
5727 if CoolBand <> nil then
5728 CoolBand.Visible := True;
5729 // BrowserTab.Parent := BrowserTopPanel;
5730 // BrowserTab.Parent := BrowserCoolBar;
5731 // BrowserTab.Top := 26;
5732 // BrowserTopPanel.Height := 44;
5735 BrowserTab.Parent := BrowserBottomPanel;
5736 BrowserTab.Top := 0;
5737 BrowserTab.Left := 0;
5738 BrowserBottomPanel.Show;
5739 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
5740 if CoolBand <> nil then
5741 CoolBand.Visible := False;
5742 // BrowserTopPanel.Height := 26;
5746 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
5747 if CoolBand <> nil then
5748 CoolBand.Visible := False;
5749 BrowserBottomPanel.Visible := False;
5750 // BrowserTab.Visible := False;
5751 // BrowserTopPanel.Height := 26;
5755 procedure TGikoForm.BrowserTabDragOver(Sender, Source: TObject; X,
5756 Y: Integer; State: TDragState; var Accept: Boolean);
5760 idx := BrowserTab.IndexOfTabAt(X, Y);
5761 Accept := (Source = BrowserTab) and (BrowserTab.TabIndex <> idx);
5764 procedure TGikoForm.BrowserTabDragDrop(Sender, Source: TObject; X,
5769 idx := BrowserTab.IndexOfTabAt(X, Y);
5771 BrowserTab.Tabs.Move(BrowserTab.TabIndex, idx);
5774 procedure TGikoForm.BrowserTabMouseMove(Sender: TObject;
5775 Shift: TShiftState; X, Y: Integer);
5778 ThreadItem: TThreadItem;
5781 TabIdx := BrowserTab.IndexOfTabAt(x, y);
5783 if ( ssLeft in Shift ) and ( BrowserTab.Style = tsTabs ) then begin
5784 if FDragWFirst = false then begin
5785 FDragWFirst := true;
5787 BrowserTab.EndDrag(false);
5788 BrowserTab.BeginDrag(false, DandD_THRESHOLD);
5789 FDragWFirst := false;
5792 BrowserTab.EndDrag(false);
5793 FDragWFirst := false;
5796 if (FTabHintIndex <> TabIdx) and (TabIdx <> -1) then begin
5797 Application.CancelHint;
5798 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[TabIdx]);
5799 if ThreadItem.Title <> BrowserTab.Tabs[TabIdx] then begin
5800 BrowserTab.Hint := ThreadItem.Title;
5801 Application.ShowHint := True;
5803 BrowserTab.Hint := '';
5804 Application.ShowHint := True;
5806 FTabHintIndex := TabIdx;
5811 procedure TGikoForm.BrowserDocumentComplete(Sender: TObject;
5812 const pDisp: IDispatch; var URL: OleVariant);
5814 FDispHtmlDocument: DispHTMLDocument;
5816 // AddMessageList('DocumentComplete', nil);
5817 FBrowserComplete := True;
5818 if FEvent <> nil then
5820 FDispHtmlDocument := Browser.Document as DispHTMLDocument;
5821 FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
5822 FEvent.OnContextMenu := OnDocumentContextMenu;
5826 procedure TGikoForm.SelectReservActionUpdate(Sender: TObject);
5831 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then begin
5832 List := TList.Create;
5834 SelectListItem(List);
5835 for i := 0 to List.Count - 1 do begin
5836 if TObject(List[i]) is TThreadItem then begin
5837 if TThreadItem(List[i]).IsLogFile then begin
5838 SelectReservAction.Enabled := True;
5843 SelectReservAction.Enabled := False;
5847 end else if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
5848 SelectReservAction.Enabled := True
5850 SelectReservAction.Enabled := False;
5853 procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
5855 AddRoundNameMenu(RoundNamePopupMenu.Items);
5858 procedure TGikoForm.AddRoundNameMenu(MenuItem: TMenuItem);
5864 Item := TMenuItem.Create(Self);
5865 Item.Caption := '
\90V
\82µ
\82¢
\96¼
\91O
\82Å
\8f\84\89ñ
\97\
\96ñ(&N)...';
5866 Item.OnClick := SelectNewRoundNameExecute;
5868 Item := TMenuItem.Create(Self);
5869 Item.Caption := '
\8f\84\89ñ
\83\8a\83X
\83g
\82©
\82ç
\8dí
\8f\9c(&D)';
5870 Item.OnClick := SelectDeleteRoundExecute;
5872 Item := TMenuItem.Create(Self);
5873 Item.Caption := '-';
5875 for i := 0 to RoundList.RoundNameList.Count - 1 do begin
5876 Item := TMenuItem.Create(Self);
5877 Item.Caption := RoundList.RoundNameList[i];
5878 Item.OnClick := SetSelectRoundName;
5883 procedure TGikoForm.SelectNewRoundNameExecute(Sender: TObject);
5886 Dlg: TRoundNameDialog;
5889 Dlg := TRoundNameDialog.Create(Self);
5892 if Dlg.ModalResult <> mrCancel then begin
5893 s := Trim(Dlg.RoundNameEdit.Text);
5894 RoundList.RoundNameList.Add(s);
5895 SetSelectItemRound(True, s, TMenuItem(Sender).Parent.Name);
5902 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string);
5904 threadItem : TThreadItem;
5906 if ParentName <> 'dummy1' then begin
5907 SetSelectItemRound(RoundFlag, RoundName);
5909 threadItem := GetActiveContent;
5910 if threadItem <> nil then begin
5911 threadItem.RoundName := RoundName;
5912 threadItem.Round := RoundFlag;
5917 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
5922 List := TList.Create;
5924 SelectListItem(List);
5925 for i := 0 to List.Count - 1 do begin
5926 if TObject(List[i]) is TBoard then begin
5927 TBoard(List[i]).RoundName := RoundName;
5928 TBoard(List[i]).Round := RoundFlag;
5929 end else if TObject(List[i]) is TThreadItem then begin
5930 if TThreadItem(List[i]).IsLogFile then begin
5931 TThreadItem(List[i]).RoundName := RoundName;
5932 TThreadItem(List[i]).Round := RoundFlag;
5941 procedure TGikoForm.SelectDeleteRoundExecute(Sender: TObject);
5943 SetSelectItemRound(False, '', TMenuItem(Sender).Parent.Name);
5947 procedure TGikoForm.SelectReservActionExecute(Sender: TObject);
5949 //
\82±
\82Ì
\83R
\83\81\83\93\83g
\8dí
\8f\9c\82µ
\82Ä
\82Í
\91Ê
\96Ú
5952 procedure TGikoForm.SetSelectRoundName(Sender: TObject);
5954 MenuItem: TMenuItem;
5956 if Sender is TMenuItem then begin
5957 MenuItem := TMenuItem(Sender);
5958 SetSelectItemRound(True, StripHotKey(MenuItem.Caption), TMenuItem(Sender).Parent.Name);
5963 procedure TGikoForm.NewBoardActionExecute(Sender: TObject);
5965 Dlg: TNewBoardDialog;
5969 for i := 0 to Screen.CustomFormCount - 1 do begin
5970 if TObject(Screen.CustomForms[i]) is TEditorForm then begin
5971 Msg := '
\83\8c\83X
\83G
\83f
\83B
\83^
\82ð
\91S
\82Ä
\95Â
\82¶
\82Ä
\82
\82¾
\82³
\82¢';
5972 MsgBox(Handle, Msg, '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
5976 Dlg := TNewBoardDialog.Create(Self);
5984 procedure TGikoForm.LoginActionExecute(Sender: TObject);
5989 if GikoSys.Dolib.Connected then begin
5990 //
\83\8d\83O
\83A
\83E
\83g
5991 GikoSys.Dolib.Disconnect;
5992 LoginAction.Checked := False;
5993 AddMessageList('
\83\8d\83O
\83A
\83E
\83g
\82µ
\82Ü
\82µ
\82½', nil, gmiOK);
5994 LoginAction.Caption := '
\83\8d\83O
\83C
\83\93(&L)';
5996 TmpCursor := Screen.Cursor;
5997 Screen.Cursor := crHourGlass;
5999 //
\92Ê
\8fí
\83\8d\83O
\83C
\83\93
6000 if not GikoSys.Setting.ForcedLogin then begin
6001 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6002 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6003 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6004 if GikoSys.Setting.ReadProxy then begin
6005 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6006 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6008 GikoSys.Dolib.ProxyAddress := '';
6009 GikoSys.Dolib.ProxyPort := 0;
6011 if GikoSys.Dolib.Connect then begin
6012 LoginAction.Checked := True;
6013 AddMessageList('
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6014 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6015 LoginToolButton.Style := tbsCheck;
6017 // 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);
6018 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6020 LoginAction.Checked := False;
6021 LoginToolButton.Down := False;
6022 LoginToolButton.Style := tbsButton;
6025 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
6026 + '
\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
6027 + '
\82±
\82Ì
\83\82\81[
\83h
\82Å
\83\8d\83O
\83C
\83\93\82ð
\8e\8e\82Ý
\82Ü
\82·
\82©
\81H' + #13#10;
6028 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) = IDYES then begin
6029 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6030 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6031 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6032 if GikoSys.Setting.ReadProxy then begin
6033 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6034 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6036 GikoSys.Dolib.ProxyAddress := '';
6037 GikoSys.Dolib.ProxyPort := 0;
6039 //SSL
\8fá
\8aQ
\97p
\8b
\90§
\83\8d\83O
\83C
\83\93
6040 GikoSys.Dolib.ForcedConnect;
6041 if GikoSys.Dolib.Connect then begin
6042 LoginAction.Checked := True;
6043 AddMessageList('
\8b
\90§
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6044 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6045 LoginToolButton.Style := tbsCheck;
6047 // 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);
6048 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6050 LoginAction.Checked := False;
6051 LoginToolButton.Down := False;
6052 LoginToolButton.Style := tbsButton;
6055 LoginAction.Checked := False;
6056 LoginToolButton.Down := False;
6057 LoginToolButton.Style := tbsButton;
6061 Screen.Cursor := TmpCursor;
6066 procedure TGikoForm.KeySettingActionExecute(Sender: TObject);
6068 Dlg: TKeySettingForm;
6070 Dlg := TKeySettingForm.Create(Self);
6072 if Dlg.ShowModal = mrOk then
6073 GikoSys.SaveKeySetting(ActionList);
6074 GikoSys.SaveEditorKeySetting(Dlg.EditorForm.ActionList);
6080 procedure TGikoForm.ArrangeActionExecute(Sender: TObject);
6082 if ArrangeAction.Checked then begin
6084 ViewPanel.Align := alNone;
6085 ListSplitter.Align := alNone;
6086 ThreadPanel.Align := alNone;
6088 ViewPanel.Width := FBrowserSizeWidth;
6089 ViewPanel.Align := alLeft;
6091 ListSplitter.Width := 5;
6092 ListSplitter.Align := alLeft;
6094 ViewPanel.Left := -10;
6096 ThreadPanel.Align := alClient;
6098 GikoSys.Setting.ListOrientation := gloHorizontal;
6099 case GikoSys.Setting.ListWidthState of
6101 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6102 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6103 ViewPanel.Width := 1;
6106 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6107 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6110 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6111 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6112 ViewPanel.Width := ThreadMainPanel.Width - 80;
6117 ViewPanel.Align := alNone;
6118 ListSplitter.Align := alNone;
6119 ThreadPanel.Align := alNone;
6121 ViewPanel.Height := FBrowserSizeHeight;
6122 ViewPanel.Align := alTop;
6124 ListSplitter.Height := 5;
6125 ListSplitter.Align := alTop;
6127 ViewPanel.Top := -10;
6129 ThreadPanel.Align := alClient;
6130 GikoSys.Setting.ListOrientation := gloVertical;
6131 case GikoSys.Setting.ListHeightState of
6133 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6134 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6135 ViewPanel.Height := 1;
6138 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6139 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6142 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6143 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6144 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
6151 procedure TGikoForm.PaneInitActionExecute(Sender: TObject);
6153 CabinetPanel.Width := 150;
6154 MessagePanel.Height := 40;
6156 FBrowserSizeWidth := 200;
6157 FBrowserSizeHeight := 200;
6158 if ArrangeAction.Checked then begin
6159 ViewPanel.Width := FBrowserSizeWidth;
6161 ViewPanel.Height := FBrowserSizeHeight;
6163 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6164 if GikoSys.Setting.ListHeightState = glsMax then begin
6165 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6166 GikoSys.Setting.ListHeightState := glsNormal;
6169 if GikoSys.Setting.ListWidthState = glsMax then begin
6170 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6171 GikoSys.Setting.ListWidthState := glsNormal;
6176 procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
6178 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';
6179 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6182 ThreadItem: TThreadItem;
6184 idx := BrowserTab.TabIndex;
6185 if idx <> -1 then begin
6186 if GikoSys.Setting.DeleteMsg then
6187 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
6189 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
6190 DeleteTab(ThreadItem);
6191 ThreadItem.DeleteLogFile;
6192 if ThreadItem.ParentBoard = FActiveList then
6197 function TGikoForm.GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
6202 if CoolBar = nil then
6204 for i := 0 to CoolBar.Bands.Count - 1 do begin
6205 if CoolBar.Bands[i].Control = Control then begin
6206 Result := CoolBar.Bands[i];
6212 procedure TGikoForm.BrowserTabToolBarResize(Sender: TObject);
6214 if BrowserTab.Parent = BrowserTabToolBar then
6215 BrowserTab.Width := BrowserTabToolBar.Width;
6218 procedure TGikoForm.SelectTextClearActionExecute(Sender: TObject);
6220 GikoSys.Setting.SelectTextList.Clear;
6221 SelectComboBox.Items.Clear;
6222 SelectComboBox.Text := '';
6223 SetListViewType( gvtAll );
6226 procedure TGikoForm.NameTextClearActionExecute(Sender: TObject);
6230 GikoSys.Setting.NameList.Clear;
6231 for i := 0 to Screen.CustomFormCount - 1 do begin
6232 if TObject(Screen.CustomForms[i]) is TEditorForm then
6233 TEditorForm(Screen.CustomForms[i]).NameComboBox.Items.Clear;
6237 procedure TGikoForm.MailTextClearActionExecute(Sender: TObject);
6241 GikoSys.Setting.MailList.Clear;
6242 for i := 0 to Screen.CustomFormCount - 1 do begin
6243 if TObject(Screen.CustomForms[i]) is TEditorForm then
6244 TEditorForm(Screen.CustomForms[i]).MailComboBox.Items.Clear;
6248 procedure TGikoForm.LeftmostTabSelectActionExecute(Sender: TObject);
6250 if BrowserTab.Tabs.Count > 0 then begin
6251 BrowserTab.TabIndex := 0;
6252 BrowserTab.OnChange(nil);
6256 procedure TGikoForm.LeftTabSelectActionExecute(Sender: TObject);
6258 if BrowserTab.Tabs.Count > 0 then begin
6259 if BrowserTab.TabIndex = -1 then begin
6260 BrowserTab.TabIndex := 0;
6261 BrowserTab.OnChange(nil);
6262 end else if BrowserTab.TabIndex > 0 then begin
6263 BrowserTab.TabIndex := BrowserTab.TabIndex - 1;
6264 BrowserTab.OnChange(nil);
6269 procedure TGikoForm.RightTabSelectActionExecute(Sender: TObject);
6271 if BrowserTab.Tabs.Count > 0 then begin
6272 if BrowserTab.TabIndex = -1 then begin
6273 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6274 BrowserTab.OnChange(nil);
6275 end else if BrowserTab.TabIndex < (BrowserTab.Tabs.Count - 1) then begin
6276 BrowserTab.TabIndex := BrowserTab.TabIndex + 1;
6277 BrowserTab.OnChange(nil);
6282 procedure TGikoForm.RightmostTabSelectActionExecute(Sender: TObject);
6284 if BrowserTab.Tabs.Count > 0 then begin
6285 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6286 BrowserTab.OnChange(nil);
6290 procedure TGikoForm.LeftmostTabSelectActionUpdate(Sender: TObject);
6292 LeftmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6295 procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
6297 LeftTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6300 procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);
6302 RightTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6305 procedure TGikoForm.RightmostTabSelectActionUpdate(Sender: TObject);
6307 RightmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6310 procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
6315 procedure TGikoForm.SetMenuFont;
6317 // GikoSys.MenuFont(MenuToolBar.Font);
6318 // MenuToolBar.Buttons[0].AutoSize := False;
6319 // MenuToolBar.Buttons[0].AutoSize := True;
6320 // MenuToolBar.Font.Color := clMenuText;
6321 GikoSys.MenuFont(MainCoolBar.Font);
6322 MenuToolBar.Buttons[0].AutoSize := False;
6323 MenuToolBar.Buttons[0].AutoSize := True;
6324 MainCoolBar.AutoSize := False;
6325 MainCoolBar.AutoSize := True;
6327 GikoSys.MenuFont(ListCoolBar.Font);
6328 GikoSys.MenuFont(BrowserCoolBar.Font);
6329 // MenuToolBar.Font.Color := clMenuText;
6332 procedure TGikoForm.FavoriteMenuClick(Sender: TObject);
6338 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\92Ç
\89Á
6339 NewMenu := TMenuItem.Create(MainMenu);
6340 NewMenu.Action := FavoriteAddAction;
6341 FavoriteMenu.Add(NewMenu);
6342 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\90®
\97\9d
6343 NewMenu := TMenuItem.Create(FavoriteMenu);
6344 NewMenu.Action := FavoriteArrangeAction;
6345 FavoriteMenu.Add(NewMenu);
6346 //
\83Z
\83p
\83\8c\81[
\83^
6347 NewMenu := TMenuItem.Create(FavoriteMenu);
6348 NewMenu.Caption := '-';
6349 FavoriteMenu.Add(NewMenu);
6351 CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
6354 procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
6359 for i := 0 to Node.Count - 1 do begin
6360 NewMenu := TFavoriteMenuItem.Create(Self);
6361 NewMenu.AutoHotkeys := maAutomatic;
6362 NewMenu.Caption := CustomStringReplace(Node.Item[i].Text, '&', '&&');
6363 TFavoriteMenuItem(NewMenu).Data := Node.Item[i].Data;
6364 MenuItem.Add(NewMenu);
6366 if TObject(Node.Item[i].Data) is TFavoriteFolder then begin
6367 NewMenu.ImageIndex := TOOL_ICON_FAV_FOLDER;
6368 CreateFavMenu(Node.Item[i], NewMenu);
6369 end else if TObject(Node.Item[i].Data) is TFavoriteBoardItem then begin
6370 NewMenu.ImageIndex := TOOL_ICON_FAV_BOARD;
6371 NewMenu.OnClick := FavoriteClick;
6372 end else if TObject(Node.Item[i].Data) is TFavoriteThreadItem then begin
6373 NewMenu.ImageIndex := TOOL_ICON_FAV_THREAD;
6374 NewMenu.OnClick := FavoriteClick;
6379 procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
6381 Dlg : TFavoriteAddDialog;
6383 Items : ^TTreeNodes;
6388 Items := @(FavoriteTreeView.Items);
6389 if Item is TFavoriteBoardItem then
6390 Item := TFavoriteBoardItem( Item ).Item
6391 else if Item is TFavoriteThreadItem then
6392 Item := TFavoriteThreadItem( Item ).Item;
6393 if Item is TBoard then begin
6394 ItemURL := TBoard( Item ).URL;
6395 for i := Items^.Count - 1 downto 0 do begin
6396 Data := Items^.Item[ i ].Data;
6397 if TObject( Data ) is TFavoriteBoardItem then begin
6398 if ItemURL = TFavoriteThreadItem( Data ).URL then begin
6399 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
6405 Dlg := TFavoriteAddDialog.Create(Self);
6407 Dlg.SetBoard( TBoard( Item ) );
6412 end else if Item is TThreadItem then begin
6413 ItemURL := TThreadItem( Item ).URL;
6414 for i := Items^.Count - 1 downto 0 do begin
6415 Data := Items^.Item[ i ].Data;
6416 if TObject( Data ) is TFavoriteThreadItem then begin
6417 if ItemURL = TFavoriteThreadItem( Data ).URL then begin
6418 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
6424 Dlg := TFavoriteAddDialog.Create(Self);
6426 Dlg.SetThreadItem( TThreadItem( Item ) );
6436 procedure TGikoForm.FavoriteAddActionExecute(Sender: TObject);
6438 ShowFavoriteAddDialog(GetActiveContent);
6441 procedure TGikoForm.FavoriteClick(Sender: TObject);
6444 FavoriteClick( Sender, True );
6448 procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
6451 ThreadItem: TThreadItem;
6452 FavBoard: TFavoriteBoardItem;
6453 FavThread: TFavoriteThreadItem;
6457 if Sender is TFavoriteMenuItem then
6458 Item := TFavoriteMenuItem(Sender).Data
6459 else if Sender is TLinkToolButton then
6460 Item := TLinkToolButton(Sender).Data
6461 else if Sender is TTreeNode then
6462 Item := TTreeNode( Sender ).Data
6466 if TObject(Item) is TFavoriteBoardItem then begin
6467 FavBoard := TFavoriteBoardItem(Item);
6468 Board := FavBoard.Item;
6469 if Board <> nil then begin
6470 if (FTreeType = gtt2ch) and (FActiveBBS <> Board.ParentCategory.ParenTBBS) then
6471 ShowBBSTree( Board.ParentCategory.ParenTBBS );
6472 SelectTreeNode(Board, True);
6474 end else if TObject(Item) is TFavoriteThreadItem then begin
6475 FavThread := TFavoriteThreadItem(Item);
6476 ThreadItem := FavThread.Item;
6477 if ThreadItem = nil then
6480 InsertBrowserTab(ThreadItem, ActiveTab);
6482 if ThreadItem.IsLogFile then begin
6483 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6484 if GikoSys.Setting.ListWidthState = glsMin then begin
6485 BrowserMaxAction.Execute;
6486 if GikoForm.Visible then
6490 if GikoSys.Setting.ListHeightState = glsMin then begin
6491 BrowserMaxAction.Execute;
6492 if GikoForm.Visible then
6500 procedure TGikoForm.FavoriteAddActionUpdate(Sender: TObject);
6502 FavoriteAddAction.Enabled := (GetActiveContent <> nil);
6505 procedure TGikoForm.BoardFavoriteAddActionExecute(Sender: TObject);
6507 if TObject(ListView.Selected.Data) is TBoard then
6508 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
6511 procedure TGikoForm.BoardFavoriteAddActionUpdate(Sender: TObject);
6513 BoardFavoriteAddAction.Enabled := (GetActiveList is TCategory) and (ListView.SelCount > 0);
6516 procedure TGikoForm.ThreadFavoriteAddActionExecute(Sender: TObject);
6518 if TObject(ListView.Selected.Data) is TThreadItem then
6519 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
6522 procedure TGikoForm.ThreadFavoriteAddActionUpdate(Sender: TObject);
6524 ThreadFavoriteAddAction.Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
6527 procedure TGikoForm.TreeSelectFavoriteAddActionExecute(Sender: TObject);
6529 ShowFavoriteAddDialog(TObject(FClickNode.Data));
6532 procedure TGikoForm.FavoriteArrangeActionExecute(Sender: TObject);
6534 Dlg: TFavoriteArrangeDialog;
6536 Dlg := TFavoriteArrangeDialog.Create(Self);
6542 PostMessage( Handle, USER_SETLINKBAR, 0, 0 );
6545 procedure TGikoForm.BBSMenuItemOnClick(
6550 if Sender is TBBSMenuItem then
6551 ShowBBSTree( TBBSMenuItem( Sender ).Data );
6555 procedure TGikoForm.MainCoolBarResize(Sender: TObject);
6557 TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
6560 procedure TGikoForm.MoveToActionExecute(Sender: TObject);
6565 URL := Trim(AddressComboBox.Text);
6568 idx := AddressComboBox.Items.IndexOf(URL);
6569 if idx = -1 then begin
6570 AddressComboBox.Items.Insert(0, URL);
6571 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
6572 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
6574 AddressComboBox.Items.Delete(idx);
6575 AddressComboBox.Items.Insert(0, URL);
6579 procedure TGikoForm.MoveToURL(URL: string);
6582 protocol, host, path, document, port, bookmark : string;
6583 BBSID, BBSKey: string;
6585 ThreadItem: TThreadItem;
6588 tmpThread : TThreadItem;
6589 // category : TCategory;
6590 // categoryNode : TTreeNode;
6591 // boardNode : TTreeNode;
6592 shiftDown : Boolean;
6596 GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark );
6597 GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey );
6600 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
6601 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
6602 if shiftDown then begin
6603 GikoSys.OpenBrowser(URL, gbtUserApp);
6605 end else if ctrlDown then begin
6606 GikoSys.OpenBrowser(URL, gbtIE);
6610 //=====
\83v
\83\89\83O
\83C
\83\93
6613 bi := High( BoardPlugIns );
6614 for i := Low( BoardPlugIns ) to bi do begin
6615 if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
6616 case BoardPlugIns[ i ].AcceptURL( URL ) of
6619 tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL );
6620 boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
6621 Board := BBSsFindBoardFromURL( boardURL );
6622 if Board = nil then begin
6623 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
6624 //GikoSys.OpenBrowser(URL, gbtUserApp);
6627 Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL );
6628 if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
6629 ShowBBSTree( BBSs[ 1 ] );
6632 if not Board.IsThreadDatRead then begin
6633 GikoSys.ReadSubjectFile( Board );
6638 ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
6639 if ThreadItem = nil then begin
6640 ThreadItem := tmpThread;
6641 Board.Insert( 0, ThreadItem );
6642 if ActiveList is TBoard then begin
6643 if TBoard(ActiveList) = Board then
6644 ListView.Items.Count := ListView.Items.Count + 1;
6646 InsertBrowserTab( ThreadItem );
6647 DownloadContent( ThreadItem );
6651 InsertBrowserTab( ThreadItem );
6652 if not ThreadItem.IsLogFile then begin
6653 DownloadContent( ThreadItem );
6663 Board := BBSsFindBoardFromURL( URL );
6664 if Board <> nil then begin
6665 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
6666 ShowBBSTree( Board.ParentCategory.ParenTBBS );
6667 SelectTreeNode( Board, True );
6675 // 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¢
6679 if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
6680 boardURL := GikoSys.Get2chThreadURL2BoardURL( URL );
6681 Board := BBSsFindBoardFromURL( boardURL );
6683 Board := BBSsFindBoardFromBBSID( BBSID );
6685 if Board = nil then begin
6686 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
6687 //
\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)
6688 Board := BBSs[ 0 ].FindBBSID( Copy(BBSID, 1 , Length(BBSID) - 1) );
6690 if Board = nil then begin
6691 GikoSys.OpenBrowser(URL, gbtUserApp);
6693 //Board := GikoSys.GetUnknownBoard( nil, boardURL );
6694 //if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
6695 // ShowBBSTree( BBSs[ 1 ] );
6697 if not Board.IsThreadDatRead then
6698 GikoSys.ReadSubjectFile(Board);
6699 URL := GikoSys.Get2chBrowsableThreadURL( URL );
6700 ThreadItem := Board.FindThreadFromURL( URL );
6701 //
\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)
6702 if ThreadItem = nil then begin
6703 ThreadItem := Board.FindThreadFromFileName( BBSKey + '.dat' );
6706 if ThreadItem = nil then begin
6707 //shift ->
\90Ý
\92è
\83u
\83\89\83E
\83U
\81i
\96³
\82¯
\82ê
\82ÎIE
\81j
6709 {shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
6710 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
6712 GikoSys.OpenBrowser(URL, gbtUserApp)
6713 else if ctrlDown then
6714 GikoSys.OpenBrowser(URL, gbtIE)
6717 ThreadItem := TThreadItem.Create( nil, URL );
6718 ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
6719 if AnsiPos(Host, Board.URL) = 0 then
6720 ThreadItem.DownloadHost := Host
6722 ThreadItem.DownloadHost := '';
6723 Board.Insert(0, ThreadItem);
6724 if ActiveList is TBoard then begin
6725 if TBoard(ActiveList) = Board then
6726 ListView.Items.Count := ListView.Items.Count + 1;
6728 InsertBrowserTab(ThreadItem);
6729 DownloadContent(ThreadItem);
6732 if ThreadItem.IsLogFile then
6733 InsertBrowserTab(ThreadItem)
6735 if AnsiPos(Host, Board.URL) = 0 then
6736 ThreadItem.DownloadHost := Host
6738 ThreadItem.DownloadHost := '';
6739 InsertBrowserTab(ThreadItem);
6740 DownloadContent(ThreadItem);
6744 Board := BBSsFindBoardFromURL( URL );
6745 if Board = nil then begin
6746 GikoSys.OpenBrowser(URL, gbtAuto);
6748 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
6749 ShowBBSTree( Board.ParentCategory.ParenTBBS );
6750 SelectTreeNode( Board, True );
6755 procedure TGikoForm.AddressToolBarResize(Sender: TObject);
6757 AddressComboBox.Width := AddressToolBar.Width - MoveToToolButton.Width - 10;
6758 CoolBarResized( Sender, MainCoolBar );
6761 procedure TGikoForm.AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
6762 Shift: TShiftState);
6764 if Key = VK_RETURN then
6765 MoveToAction.Execute;
6768 procedure TGikoForm.BrowserEnter(Sender: TObject);
6770 Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
6773 procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
6775 CDS:PCopyDataStruct;
6779 CDS := Message.CopyDataStruct;
6780 GetMem(PC, CDS^.cbData);
6782 lstrcpy(PC,CDS^.lpData);
6783 SetString(sURL, PC,lstrlen(PC));
6788 Message.Result := 1;
6791 procedure TGikoForm.WndProc(var Message: TMessage);
6796 if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
6799 if Message.WParam = SC_MINIMIZE then
6802 TreeClick( TreeView.Selected );
6816 procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
6818 hComboEdit: THandle;
6819 // KeyData: Integer;
6822 if AddressComboBox.Focused or SelectComboBox.Focused then begin
6823 if Msg.CharCode in [VK_BACK] then begin
6824 hComboEdit := GetFocus;
6825 if hComboEdit <> 0 then
6826 SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, Msg.KeyData);
6827 // SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, $000E0001);
6830 if Msg.CharCode in [VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PRIOR, VK_NEXT] then begin
6831 hComboEdit := GetFocus;
6832 if hComboEdit <> 0 then
6833 SendMessage(hComboEdit, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
6837 //
\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ð
6838 KeyData := Msg.KeyData;
6839 if (KeyData and $20000000) = 0 then begin
6840 if Msg.CharCode in [Ord('F'), Ord('V'), Ord('B'), Ord('R'),
6841 Ord('A'), Ord('T'), Ord('H')] then begin
6842 if not ActionList.IsShortCut(Msg) then begin
6850 procedure TGikoForm.BrowserTabVisibleActionExecute(Sender: TObject);
6852 GikoSys.Setting.BrowserTabVisible := BrowserTabVisibleAction.Checked;
6856 procedure TGikoForm.BrowserTabTopActionExecute(Sender: TObject);
6858 BrowserTabBottomAction.Checked := False;
6859 BrowserTabTopAction.Checked := True;
6860 GikoSys.Setting.BrowserTabPosition := gtpTop;
6864 procedure TGikoForm.BrowserTabBottomActionExecute(Sender: TObject);
6866 BrowserTabTopAction.Checked := False;
6867 BrowserTabBottomAction.Checked := True;
6868 GikoSys.Setting.BrowserTabPosition := gtpBottom;
6872 procedure TGikoForm.BrowserTabTabStyleActionExecute(Sender: TObject);
6874 BrowserTabButtonStyleAction.Checked := False;
6875 BrowserTabFlatStyleAction.Checked := False;
6876 BrowserTabTabStyleAction.Checked := True;
6877 GikoSys.Setting.BrowserTabStyle := gtsTab;
6881 procedure TGikoForm.BrowserTabButtonStyleActionExecute(Sender: TObject);
6883 BrowserTabTabStyleAction.Checked := False;
6884 BrowserTabFlatStyleAction.Checked := False;
6885 BrowserTabButtonStyleAction.Checked := True;
6886 GikoSys.Setting.BrowserTabStyle := gtsButton;
6890 procedure TGikoForm.BrowserTabFlatStyleActionExecute(Sender: TObject);
6892 BrowserTabFlatStyleAction.Checked := True;
6893 BrowserTabTabStyleAction.Checked := False;
6894 BrowserTabButtonStyleAction.Checked := False;
6895 GikoSys.Setting.BrowserTabStyle := gtsFlat;
6899 procedure TGikoForm.PreviewTimerTimer(Sender: TObject);
6905 HtmlFileName: string;
6909 TargetFrameName: OleVariant;
6910 PostData: OleVariant;
6911 Headers: OleVariant;
6912 WindowHeight: Integer;
6913 WindowWidth: Integer;
6917 Protocol, Host, Path, Document, Port, Bookmark: string;
6919 PreviewTimer.Enabled := False;
6923 case GikoSys.Setting.PreviewSize of
6930 WindowHeight := 192;
6934 WindowHeight := 384;
6938 WindowHeight := 480;
6940 else begin //gpsMedium
6942 WindowHeight := 288;
6946 ARect := Rect(0, 0, WindowWidth, WindowHeight);
6948 case GikoSys.Setting.PopupPosition of
6949 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6950 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6951 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
6952 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
6953 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
6954 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
6955 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6956 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6957 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Ó
6960 html := '<html><head>'#13#10
6962 + 'function init() {'#13#10
6963 + ' if ((document.body.clientHeight >= Image1.height) && (document.body.clientWidth >= Image1.width)) {'#13#10
6965 + ' var dh, ih;'#13#10
6966 + ' dh = document.body.clientWidth / document.body.clientHeight;'#13#10
6967 + ' ih = Image1.width / Image1.height;'#13#10
6968 + ' if (document.body.clientWidth < document.body.clientHeight) {'#13#10
6969 + ' if (ih > dh)'#13#10
6970 + ' Image1.width = document.body.clientWidth;'#13#10
6972 + ' Image1.height = document.body.clientHeight;'#13#10
6974 + ' if (ih < dh)'#13#10
6975 + ' Image1.height = document.body.clientHeight;'#13#10
6977 + ' Image1.width = document.body.clientWidth;'#13#10
6980 + ' Message.style.display = "none";'#13#10
6984 + '<body topmargin="0" leftmargin="0" style="border-width: 1px; overflow:hidden; border-style: solid;" onLoad="init()">'#13#10
6985 + '<div align="center" id="Message">
\83v
\83\8c\83r
\83\85\81[
\8dì
\90¬
\92\86</div>'#13#10
6986 + '<div align="center"><img name="Image1" border="0" src="%ImageURL%"></div>'#13#10
6988 sl := TStringList.Create;
6991 HtmlFileName := GikoSys.GetAppDir + HTML_FILE_NAME;
6992 sl.Text := AnsiReplaceStr(html, '%ImageURL%', FPreviewURL);
6993 sl.SaveToFile(HtmlFileName);
7000 NavURL := HtmlFileName;
7002 TargetFrameName := '';
7005 GikoSys.ParseURI(FPreviewURL, Protocol, Host, Path, Document, Port, Bookmark);
7006 Referer := Protocol + '://' + Host;
7008 Referer := Referer + ':' + Port;
7009 Referer := Referer + Path;
7010 Headers := 'Referer: ' + Referer;
7012 FPreviewBrowser.Navigate(NavURL, Flags, TargetFrameName, PostData, Headers);
7014 if ARect.Top + WindowHeight > Screen.DesktopHeight then
7015 ARect.Top := Screen.DesktopHeight - WindowHeight;
7016 if ARect.Left + WindowWidth > Screen.DesktopWidth then
7017 ARect.Left := Screen.DesktopWidth - WindowWidth;
7018 if ARect.Left < Screen.DesktopLeft then ARect.Left := Screen.DesktopLeft;
7019 if ARect.Bottom < Screen.DesktopTop then ARect.Bottom := Screen.DesktopTop;
7021 SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
7022 ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
7024 // Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
7025 // SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
7029 procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
7031 if PreviewTimer.Enabled then
7032 PreviewTimer.Enabled := False;
7033 if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
7034 FHint.ReleaseHandle;
7037 if (FPreviewBrowser <> nil) and (IsWindowVisible(FPreviewBrowser.Handle)) then
7038 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
7039 Message.Result := 1;
7043 procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
7045 MsgBarCloseAction.Execute;
7048 function TGikoForm.OnDocumentContextMenu(Sender: TObject): WordBool;
7050 Doc: IHtmlDocument2;
7051 Range: IHTMLTxtRange;
7054 ThreadItem: TThreadItem;
7056 Doc := Browser.Document as IHtmlDocument2;
7057 Range := Doc.selection.createRange as IHTMLTxtRange;
7058 s := CustomStringReplace(Range.text, '
\81@', ' ');//
\91S
\8ap
\8bó
\94\92\82ð
\94¼
\8ap
\8bó
\94\92\82É
7059 s := GikoSys.ZenToHan(Trim(s));
7060 if GikoSys.IsNumeric(s) then begin
7062 ThreadItem := GetActiveContent;
7063 if ThreadItem <> nil then begin
7065 FHint.PopupType := gptThread;
7066 SetResPopupText(ThreadItem, Num, Num, False, False);
7067 if FHint.ResCount <> 0 then
7077 procedure TGikoForm.SetResPopupText(threadItem: TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
7089 boardPlugIn : TBoardPlugIn;
7092 if StNum > ToNum then begin
7098 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
7099 if StNum + 10 < ToNum then
7100 ToNum := StNum + 10;
7102 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
7104 if ThreadItem <> nil then
7105 FHint.Title := ThreadItem.Title;
7107 if ThreadItem <> nil then begin
7108 if ThreadItem.IsBoardPlugInAvailable then begin
7109 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
7110 boardPlugIn := ThreadItem.BoardPlugIn;
7112 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
7113 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
7114 for i := StNum to ToNum do begin
7116 //
\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½
7117 tmp := boardPlugIn.GetDat( DWORD( threadItem ), i );
7118 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7119 Res := GikoSys.DivideStrLine(tmp);
7120 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7121 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7123 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7126 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7127 Body := CustomStringReplace(Body, '<br>', #10,true);
7128 Body := CustomStringReplace(Body, '</a>', '',true);
7129 Body := GikoSys.DeleteLink(Body);
7130 Body := CustomStringReplace(Body, '<', '<');
7131 Body := CustomStringReplace(Body, '>', '>');
7132 Body := CustomStringReplace(Body, '"', '"');
7133 Body := CustomStringReplace(Body, '&', '&');
7134 Body := CustomStringReplace(Body, ' ', ' ');
7136 FHint.Add(Header, Body);
7137 //FHint.Title := '';
7141 for i := StNum to ToNum do begin
7143 FileName := ThreadItem.FilePath;
7144 tmp := GikoSys.ReadThreadFile(FileName, Line);
7145 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7146 Res := GikoSys.DivideStrLine(tmp);
7147 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7148 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7150 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7152 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7153 Body := CustomStringReplace(Body, '<br>', #10,true);
7154 Body := CustomStringReplace(Body, '</a>', '',true);
7155 Body := GikoSys.DeleteLink(Body);
7156 Body := CustomStringReplace(Body, '<', '<');
7157 Body := CustomStringReplace(Body, '>', '>');
7158 Body := CustomStringReplace(Body, '"', '"');
7159 Body := CustomStringReplace(Body, '&', '&');
7160 Body := CustomStringReplace(Body, ' ', ' ');
7161 FHint.Add(Header, Body);
7162 //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
7171 procedure TGikoForm.ShowTextPopup;
7176 // if Trim(s) = '' then
7179 FHint.Font.Name := GikoSys.Setting.HintFontName;
7180 FHint.Font.Size := GikoSys.Setting.HintFontSize;
7181 FHint.Font.Color := GikoSys.Setting.HintFontColor;
7182 FHint.Color := GikoSys.Setting.HintBackColor;
7183 FHint.HeaderBold := GikoSys.Setting.ResPopupHeaderBold;
7185 if FHint.PopupType = gptRaw then
7186 ARect := FHint.CalcHintRect(Screen.Width, FHint.Caption, nil)
7188 ARect := FHint.CalcHintRect(Screen.Width, '', nil);
7189 case GikoSys.Setting.PopupPosition of
7190 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7191 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7192 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
7193 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
7194 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
7195 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
7196 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7197 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7198 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Ó
7200 //FHint.ActivateHint(ARect, s);
7201 if FHint.PopupType = gptRaw then
7202 FHint.ActivateHint(ARect, FHint.Caption)
7204 FHint.ActivateHint(ARect, '');
7206 FHint.ReleaseHandle;
7211 procedure TGikoForm.GikoHelpActionExecute(Sender: TObject);
7215 FileName := GikoSys.GetAppDir + 'batahlp.chm';
7216 if not FileExists(FileName) then begin
7219 '
\83w
\83\8b\83v
\82ª
\8c©
\82Â
\82©
\82è
\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½' + #13#10 +
7220 '
\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 +
7221 '
\83w
\83\8b\83v
\82Í
\83M
\83R
\83i
\83r
\82Ì
\83T
\83C
\83g
\82É
\92u
\82¢
\82Ä
\82 \82è
\82Ü
\82·',
7226 ShellExecute(Handle, 'open', PChar(FileName), '', PChar(GikoSys.GetAppDir), SW_SHOW);
7229 procedure TGikoForm.ToolButton18Click(Sender: TObject);
7231 if FTreeType = gttHistory then begin
7234 TreeView.Items.Clear;
7238 procedure TGikoForm.KotehanActionExecute(Sender: TObject);
7240 Dlg: TKotehanDialog;
7242 Dlg := TKotehanDialog.Create(Self);
7250 procedure TGikoForm.SetLinkBar;
7254 ToolButton: TLinkToolButton;
7255 MenuItem: TMenuItem;
7256 oldIgnoreResize : Boolean;
7258 oldIgnoreResize := FIsIgnoreResize;
7259 FIsIgnoreResize := True;
7260 MainCoolBar.Bands.BeginUpdate;
7262 LinkBarPopupMenu.Items.Clear;
7263 for i := LinkToolBar.ButtonCount - 1 downto 0 do
7264 //LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
7265 LinkToolBar.Buttons[i].Free;
7266 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
7267 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
7268 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
7269 ToolButton := TLinkToolButton.Create(LinkToolBar);
7270 // ToolButton.Parent := LinkToolBar;
7271 if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteFolder then begin
7272 MenuItem := TMenuItem.Create(Self);
7273 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
7274 LinkBarPopupMenu.Items.Add(MenuItem);
7275 ToolButton.MenuItem := MenuItem;
7276 ToolButton.ImageIndex := TOOL_ICON_FAV_FOLDER;
7277 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
7278 ToolButton.ImageIndex := TOOL_ICON_FAV_BOARD;
7279 ToolButton.OnClick := FavoriteClick;
7280 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
7281 ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
7282 ToolButton.OnClick := FavoriteClick;
7284 ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
7285 ToolButton.Left := 10000;
7286 ToolButton.Data := FavoriteTreeView.Items[i].Item[j].Data;
7287 ToolButton.AutoSize := True;
7288 ToolButton.OnDragDrop := LinkToolButtonDragDrop;
7289 ToolButton.OnDragOver := FavoriteDragOver;
7290 ToolButton.OnMouseDown := LinkToolButtonOnMouseDown;
7291 ToolButton.OnMouseMove := LinkToolButtonOnMouseMove;
7292 ToolButton.OnMouseUp := LinkToolButtonOnMouseUp;
7293 ToolButton.OnStartDrag := LinkToolButtonStartDrag;
7294 //ToolButton.DragMode := dmAutomatic;
7295 ToolButton.DragMode := dmManual;
7296 ToolButton.PopupMenu := FavoriteTreePopupMenu;
7298 LinkToolBar.InsertControl(ToolButton);
7303 { if LinkToolBar.ButtonCount = 0 then begin
7304 ToolButton := TLinkToolButton.Create(LinkToolBar);
7305 ToolButton.Style := tbsButton;
7306 ToolButton.ImageIndex := -1;
7307 ToolButton.Caption := '';
7308 LinkToolBar.InsertControl(ToolButton);
7311 MainCoolBar.Bands.EndUpdate;
7312 LoadCoolBarSettings;
7313 FIsIgnoreResize := oldIgnoreResize;
7316 procedure TGikoForm.ClearLinkBar;
7320 MainCoolBar.Bands.BeginUpdate;
7322 if LinkBarPopupMenu.Items.Count > 0 then
7323 LinkBarPopupMenu.Items.Clear;
7324 for i := LinkToolBar.ButtonCount - 1 downto 0 do
7325 //LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
7326 LinkToolBar.Buttons[i].Free;
7328 MainCoolBar.Bands.EndUpdate;
7332 procedure TGikoForm.FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
7340 if Sender = FavoriteTreeView then begin
7341 Node := FavoriteTreeView.GetNodeAt(X, Y);
7346 bound := Node.DisplayRect( False );
7347 height := bound.Bottom - bound.Top;
7348 if (bound.Top + height / 2) <= Y then
7349 Node := FavoriteTreeView.GetNodeAt(X, Y + height);
7354 if Node.IsFirstNode then
7359 if FDropSpaceNode <> nil then
7360 if FDropSpaceNode.AbsoluteIndex = Node.AbsoluteIndex then
7363 if Change then begin
7364 if FDropSpaceNode <> nil then
7365 FDropSpaceNode.Free;
7367 FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil );
7368 FDropSpaceNode.MoveTo( Node, naInsert );
7369 FDropSpaceNode.ImageIndex := -1;
7370 FDropSpaceNode.SelectedIndex := -1;
7374 if Source = FavoriteTreeView then begin
7375 if FavoriteTreeView.Selected = FavoriteTreeView.Items.GetFirstNode then begin
7380 end else if Source = BrowserTab then
7382 else if Source = ListView then
7384 else if Source is TLinkToolButton then
7386 else if Source = TreeView then
7392 procedure TGikoForm.FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
7395 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
7398 procedure TGikoForm.LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
7400 // FDragging := true;
7403 procedure TGikoForm.LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
7405 SenderNode: TTreeNode;
7406 LinkToolButton: TLinkToolButton;
7409 LinkToolButton := TLinkToolButton( Sender );
7410 SenderNode := TreeNodeDataFind( FavoriteTreeView.TopItem, LinkToolButton.Data );
7412 FavoriteDragDrop( SenderNode, Source );
7416 procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7420 procedure TGikoForm.LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
7424 TToolButton( Sender ).DragMode := dmManual;
7425 if ssLeft in Shift then begin
7426 // 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)
7427 if FDragTime = 0 then begin
7428 FDragTime := GetTickCount();
7430 Now := GetTickCount();
7431 if (Now - FDragTime) > 500 then begin
7432 if FDragButton <> TToolButton( Sender ) then begin
7434 FDragButton := TToolButton( Sender );
7435 TToolButton(Sender).BeginDrag(false ,5);
7438 {$IF Defined(debug)}
7439 ShowMessage('Error');
7450 procedure TGikoForm.LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7455 function TGikoForm.GetWidthAllToolButton(ToolBar: TToolBar): Integer;
7460 for i := 0 to ToolBar.ButtonCount - 1 do
7461 Result := Result + ToolBar.Buttons[i].Width;
7464 procedure TGikoForm.MainCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7466 Control : TWinControl;
7469 Control := FindControl(BandInfo^.hwndChild);
7470 if Control = nil then
7473 for i := MainCoolBar.Bands.Count - 1 downto 0 do begin
7474 if MainCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
7475 idx := MainCoolBar.Bands[ i ].ID;
7479 Canvas.Font.Handle := GetStockObject( DEFAULT_GUI_FONT );
7480 if (Control = MenuToolBar) or (Control = StdToolBar) then begin
7481 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
7482 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7483 BandInfo^.cxMinChild := 0;
7484 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth;
7485 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7486 end else if Control = LinkToolBar then begin
7487 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
7488 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7489 BandInfo^.cxMinChild := 0;
7490 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83\8a\83\93\83N' );
7491 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7492 end else begin // AddressToolBar
7493 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
7494 BandInfo^.cxMinChild := 0;
7495 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83A
\83h
\83\8c\83X' );
7499 procedure TGikoForm.MainCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
7505 ChevronPopupMenu.Items.Clear;
7507 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
7508 if MainCoolBar.Bands[ i ].Visible then begin
7509 if Idx = Int64(RebarChevron^.uBand) then begin
7516 if (Idx >= 0) and (MainCoolBar.Bands.Count > Idx) then begin
7517 if MainCoolBar.Bands[Idx].Control = MenuToolbar then begin
7519 end else if MainCoolBar.Bands[Idx].Control = StdToolbar then begin
7520 ToolBarChevronMenu(StdToolBar);
7521 end else if MainCoolBar.Bands[Idx].Control = LinkToolbar then begin
7525 p := MainCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
7526 ChevronPopupMenu.Popup(p.x, p.y);
7530 procedure TGikoForm.MenuBarChevronMenu;
7531 procedure SetSubMenu(MenuItem: TMenuItem; PopupItem: TMenuItem);
7537 for i := 0 to MenuItem.Count - 1 do begin
7539 if MenuItem[i] is TFavoriteMenuItem then begin
7540 Item := TFavoriteMenuItem.Create(Self);
7541 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(MenuItem[i]).Data;
7543 Item := TMenuItem.Create(Self);
7544 Item.Caption := MenuItem[i].Caption;
7545 Item.Action := MenuItem[i].Action;
7546 Item.ImageIndex := MenuItem[i].ImageIndex;
7547 Item.OnClick := MenuItem[i].OnClick;
7548 PopupItem.Add(Item);
7549 if MenuItem[i].Count > 0 then
7550 SetSubMenu(MenuItem[i], Item);
7559 ChevronPopupMenu.Items.Clear;
7560 ChevronPopupMenu.Images := MainMenu.Images;
7561 bw := GetWidthAllToolButton(MenuToolBar);
7562 if MenuToolBar.Width < bw then begin
7564 for i := 0 to MenuToolBar.ButtonCount - 1 do begin
7565 w := w + MenuToolBar.Buttons[i].Width;
7566 if MenuToolBar.Width <= w then begin
7567 Item := TMenuItem.Create(Self);
7568 Item.Caption := MenuToolBar.Buttons[i].MenuItem.Caption;
7569 //Item.Action := MenuToolBar.Buttons[i].MenuItem.Action;
7570 ChevronPopupMenu.Items.Add(Item);
7571 SetSubMenu(MenuToolbar.Buttons[i].MenuItem, Item);
7577 procedure TGikoForm.ToolBarChevronMenu(ToolBar: TToolBar);
7578 procedure SetSubMenu(PopupMenu: TPopupMenu; PopupItem: TMenuItem);
7583 if Assigned(PopupMenu.OnPopup) then
7584 PopupMenu.OnPopup(nil);
7585 for i := 0 to PopupMenu.Items.Count - 1 do begin
7587 if PopupMenu.Items[i] is TFavoriteMenuItem then begin
7588 Item := TFavoriteMenuItem.Create(Self);
7589 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(PopupMenu.Items[i]).Data;
7591 Item := TMenuItem.Create(Self);
7592 Item.Caption := PopupMenu.Items[i].Caption;
7593 Item.Action := PopupMenu.Items[i].Action;
7594 Item.ImageIndex := PopupMenu.Items[i].ImageIndex;
7595 Item.OnClick := PopupMenu.Items[i].OnClick;
7596 PopupItem.Add(Item);
7605 ChevronPopupMenu.Items.Clear;
7606 ChevronPopupMenu.Images := ToolBar.HotImages;
7607 bw := GetWidthAllToolButton(ToolBar);
7608 if ToolBar.Width < bw then begin
7610 for i := 0 to ToolBar.ButtonCount - 1 do begin
7611 w := w + ToolBar.Buttons[i].Width;
7612 if ToolBar.Width <= w then begin
7613 Case ToolBar.Buttons[i].Tag of
7616 Item := TMenuItem.Create(Self);
7617 if ToolBar.Buttons[i].Style = tbsSeparator then
7620 Item.Caption := ToolBar.Buttons[i].Caption;
7621 Item.Action := ToolBar.Buttons[i].Action;
7622 //Item.Visible := True;
7624 ChevronPopupMenu.Items.Add(Item);
7625 if ToolBar.Buttons[i].DropdownMenu <> nil then begin
7627 Item.OnClick := nil;
7628 SetSubMenu(ToolBar.Buttons[i].DropdownMenu, Item);
7632 //
\8f«
\97\88\82Ì
\82½
\82ß
\82Ì
\97\
\96ñ
7639 procedure TGikoForm.LinkBarChevronMenu;
7644 Item: TFavoriteMenuItem;
7646 Button: TLinkToolButton;
7648 ChevronPopupMenu.Items.Clear;
7649 ChevronPopupMenu.Images := LinkToolBar.Images;
7650 bw := GetWidthAllToolButton(LinkToolBar);
7651 if LinkToolBar.Width < bw then begin
7653 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
7654 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
7655 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
7656 w := w + LinkToolBar.Buttons[j].Width;
7657 if LinkToolBar.Width <= w then begin
7658 if LinkToolBar.Buttons[j] is TLinkToolButton then begin
7659 Button := TLinkToolButton(LinkToolBar.Buttons[j]);
7660 Item := TFavoriteMenuItem.Create(Self);
7661 if TObject(Button.Data) is TFavoriteFolder then begin
7662 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], Item);
7663 end else if TObject(Button.Data) is TFavoriteBoardItem then begin
7664 Item.OnClick := FavoriteClick;
7665 end else if TObject(Button.Data) is TFavoriteThreadItem then begin
7666 Item.OnClick := FavoriteClick;
7668 Item.Data := Button.Data;
7669 Item.Caption := LinkToolBar.Buttons[j].Caption;
7670 Item.ImageIndex := LinkToolBar.Buttons[j].ImageIndex;
7671 ChevronPopupMenu.Items.Add(Item);
7681 procedure TGikoForm.ListCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7683 Control: TWinControl;
7686 Control := FindControl(BandInfo^.hwndChild);
7687 if Control = nil then
7690 for i := ListCoolBar.Bands.Count - 1 downto 0 do begin
7691 if ListCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
7692 idx := ListCoolBar.Bands[ i ].ID;
7696 if Control = ListToolBar then begin
7697 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
7698 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7699 BandInfo^.cxMinChild := 0;
7700 BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
7701 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7703 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
7704 BandInfo^.cxMinChild := 0;
7705 BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
7709 procedure TGikoForm.ListCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
7714 ChevronPopupMenu.Items.Clear;
7715 Idx := RebarChevron^.uBand;
7716 if (Idx >= 0) and (ListCoolBar.Bands.Count > Idx) then begin
7717 if ListCoolBar.Bands[Idx].Control = ListToolBar then begin
7718 ToolBarChevronMenu(ListToolBar);
7721 p := ListCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
7722 ChevronPopupMenu.Popup(p.x, p.y);
7726 procedure TGikoForm.BrowserCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7728 Control: TWinControl;
7731 Control := FindControl(BandInfo^.hwndChild);
7732 if Control = nil then
7735 for i := BrowserCoolBar.Bands.Count - 1 downto 0 do begin
7736 if BrowserCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
7737 idx := BrowserCoolBar.Bands[ i ].ID;
7741 if Control = BrowserToolBar then begin
7742 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
7743 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7744 BandInfo^.cxMinChild := 0;
7745 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
7746 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7748 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
7749 BandInfo^.cxMinChild := 0;
7750 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
7754 procedure TGikoForm.BrowserCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
7759 ChevronPopupMenu.Items.Clear;
7760 Idx := RebarChevron^.uBand;
7761 if (Idx >= 0) and (BrowserCoolBar.Bands.Count > Idx) then begin
7762 if BrowserCoolBar.Bands[Idx].Control = BrowserToolBar then
7763 ToolBarChevronMenu(BrowserToolBar)
7766 p := BrowserCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
7767 ChevronPopupMenu.Popup(p.x, p.y);
7771 procedure TGikoForm.ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
7773 if Column^.iImage = -1 then begin
7774 Column^.mask := Column^.mask or LVCF_FMT;
7776 Column^.mask := Column^.mask or LVCF_FMT or LVCF_IMAGE;
7777 Column^.fmt := Column^.fmt or LVCFMT_IMAGE or LVCFMT_BITMAP_ON_RIGHT;
7781 procedure TGikoForm.ThreadEditorActionExecute(Sender: TObject);
7783 Editor: TEditorForm;
7785 if not (GetActiveList is TBoard) then
7787 Editor := TEditorForm.Create(Self);
7788 Editor.SetBoard(TBoard(GetActiveList));
7790 Editor.BodyEdit.SetFocus;
7793 procedure TGikoForm.ToolBarSettingActionExecute(Sender: TObject);
7795 Dlg: TToolBarSettingDialog;
7797 //Component: TComponent;
7799 Dlg := TToolBarSettingDialog.Create(Self, ActionList);
7801 Dlg.AddToolBar(StdToolBar, gttStandard);
7802 Dlg.AddToolBar(ListToolBar, gttList);
7803 Dlg.AddToolBar(BrowserToolBar, gttBrowser);
7804 case FToolBarSettingSender of
7805 tssMain: Dlg.ToolBarIndex := 0;
7806 tssList: Dlg.ToolBarIndex := 1;
7807 tssBrowser: Dlg.ToolBarIndex := 2;
7810 if ToolBarSettingAction.ActionComponent.GetParentComponent is TPopupMenu then begin
7811 Component := TPopupMenu( ToolBarSettingAction.ActionComponent.GetParentComponent ).PopupComponent;
7813 if Component = MainCoolBar then
7814 Dlg.ToolBarComboBox.ItemIndex := 0
7815 else if Component = ListCoolBar then
7816 Dlg.ToolBarComboBox.ItemIndex := 1
7817 else if Component = BrowserCoolBar then
7818 Dlg.ToolBarComboBox.ItemIndex := 2;
7821 if Dlg.ShowModal = mrOK then begin
7824 //
\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é
7825 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
7826 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth + 1;
7827 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth - 1;
7829 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
7830 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth + 1;
7831 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth - 1;
7833 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
7834 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth + 1;
7835 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth - 1;
7837 SaveToolBarSetting(StdToolBar);
7838 SaveToolBarSetting(ListToolBar);
7839 for i := ListToolBar.ControlCount - 1 downto 0 do
7841 if ListToolBar.Controls[ i ].Action = SelectItemAction then
7843 //
\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·
7844 if (i + 1) < ListToolBar.ControlCount then
7845 if ListToolBar.Controls[ i + 1 ] is TToolButton then
7846 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
7847 ListToolBar.Controls[ i + 1 ].Visible := False;
7849 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
7850 ListToolBar.Controls[ i ].Visible := False;
7851 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
7852 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
7853 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
7854 SelectComboBox.Parent := ListToolBar;
7855 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
7856 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
7857 SelectComboBoxSplitter.Parent := ListToolBar;
7862 SaveToolBarSetting(BrowserToolBar);
7866 FToolBarSettingSender := tssNone;
7870 function TGikoForm.FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
7875 for i := bar.ButtonCount - 1 downto 0 do begin
7876 if bar.Buttons[ i ].Action = action then begin
7877 Result := bar.Buttons[ i ];
7886 procedure TGikoForm.SetToolBarPopup;
7889 aIEButton : TToolButton;
7890 aCabinetBBSButton : TToolButton;
7892 for i := 0 to StdToolBar.ButtonCount - 1 do begin
7894 for i := 0 to ListToolBar.ButtonCount - 1 do begin
7895 if ListToolBar.Buttons[i].Action = IconStyle then
7896 ListToolBar.Buttons[i].DropdownMenu := ListIconPopupMenu;
7897 if ListToolBar.Buttons[i].Action = SelectReservAction then
7898 ListToolBar.Buttons[i].DropdownMenu := RoundNamePopupMenu;
7900 aIEButton := FindToolBarButton( BrowserToolBar, IEAction );
7901 if aIEButton <> nil then
7902 aIEButton.DropdownMenu := BrowserPopupMenu;
7903 aCabinetBBSButton := FindToolBarButton( StdToolBar, CabinetBBSAction );
7904 if aCabinetBBSButton <> nil then
7905 aCabinetBBSButton.DropdownMenu := BBSSelectPopupMenu;
7908 procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState;
7909 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
7918 Wnd := WindowFromPoint(MousePos);
7920 if WheelDelta > 0 then
7925 if (Wnd = BrowserTab.Handle) or
7926 (Wnd = BrowserTab.Parent.Handle) then begin
7927 BrowserTab.ScrollTabs(Delta);
7928 end else if Wnd = ListView.Handle then begin
7929 if ListView.ViewStyle = vsList then
7930 ListView.Scroll( Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE, 0 )
7932 ListView.Scroll( 0, Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE );
7939 procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
7941 if Length( SelectComboBox.Text ) = 0 then
7943 AllItemAction.Checked := True;
7944 LogItemAction.Checked := False;
7945 NewItemAction.Checked := False;
7947 //
\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é
7948 if AllItemAction.Checked then
7949 AllItemAction.Checked := False;
7950 if LogItemAction.Checked then
7951 LogItemAction.Checked := False;
7952 if NewItemAction.Checked then
7953 NewItemaction.Checked := False;
7956 if Length( SelectComboBox.Text ) = 0 then
7957 SetListViewType( gvtAll )
7959 SetListViewType( gvtUser, SelectComboBox.Text, false);
7962 procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
7963 Shift: TShiftState);
7966 if Key = VK_Return then
7969 end else if Length( SelectComboBox.Text ) = 0 then
7971 AllItemAction.Checked := True;
7972 LogItemAction.Checked := False;
7973 NewItemAction.Checked := False;
7975 //
\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é
7976 if AllItemAction.Checked then
7977 AllItemAction.Checked := False;
7978 if LogItemAction.Checked then
7979 LogItemAction.Checked := False;
7980 if NewItemAction.Checked then
7981 NewItemaction.Checked := False;
7986 procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
7991 if Length( SelectComboBox.Text ) = 0 then
7993 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
7994 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
7999 //
\8di
\82è
\8d\9e\82Ý
\8c\9f\8dõ
\82Ì
\97\9a\97ð
\8dX
\90V
8000 procedure TGikoForm.ModifySelectList;
8007 if SelectComboBox.Parent = nil then
8010 if Length( SelectComboBox.Text ) > 0 then
8012 oldText := SelectComboBox.Text;
8013 idx := GikoSys.Setting.SelectTextList.IndexOf( oldText );
8015 GikoSys.Setting.SelectTextList.Delete( idx );
8016 idx := SelectComboBox.Items.IndexOf( oldText );
8018 SelectComboBox.Items.Delete( idx );
8019 GikoSys.Setting.SelectTextList.Insert( 0, oldText );
8020 SelectComboBox.Items.Insert( 0, oldText );
8021 SelectComboBox.Text := oldText;
8028 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\95Ò
\8fW
\82·
\82é
\82½
\82ß
\82É
\8aJ
\82
8029 procedure TGikoForm.NG1Click(Sender: TObject);
8031 GikoSys.FAbon.EditNGwords;
8033 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\8dÄ
\93Ç
\82Ý
\8d\9e\82Ý
\82·
\82é
8034 procedure TGikoForm.SelectResActionExecute(Sender: TObject);
8036 Dlg: TListSelectDialog;
8037 ThreadItem : TThreadItem;
8038 FilterList : TStringList;
8041 Dlg := TListSelectDialog.Create(Self);
8043 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
8044 Dlg.SelectComboBox.Text := FSelectResWord;
8046 if Dlg.ModalResult = mrOK then begin
8047 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
8048 //
\8bó
\93ü
\97Í
\82Å OK
\82Í
\91S
\83\8c\83X
\95\
\8e¦
\82Æ
\93¯
\88Ó
\8b`
8049 AllResAction.Execute;
8051 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
8052 AllResAction.Checked := False;
8053 SelectResAction.Checked := True;
8055 //
\8dÅ
\8cã
\82É
\90Ý
\92è
\82µ
\82½
\82à
\82Ì
\82ð
\8ao
\82¦
\82Ä
\82¨
\82
8056 FSelectResWord := Dlg.SelectComboBox.Text;
8058 //
\8c\9f\8dõ
\97\9a\97ð
\82Ì
\8dX
\90V
8059 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
8061 GikoSys.Setting.SelectTextList.Delete(idx);
8062 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
8063 while Dlg.SelectComboBox.Items.Count > 100 do begin
8064 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
8068 if SelectComboBox.Parent <> nil then
8069 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
8073 //
\83t
\83B
\83\8b\83^
\82Ì
\90Ý
\92è
8074 FilterList := TStringList.Create;
8076 GikoSys.FSelectResFilter.Reverse := True;
8077 FilterList.Delimiter := ' '; //
\8bæ
\90Ø
\82è
\8eq
\82ð
\94¼
\8ap
\83X
\83y
\81[
\83X
\82É
\90Ý
\92è
8078 FilterList.DelimitedText := Dlg.SelectComboBox.Text;
8080 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8085 //
\83X
\83\8c\83b
\83h
\82Ì
\8dÄ
\95`
\89æ
8086 ThreadItem := GetActiveContent;
8087 if ThreadItem <> nil then
8088 SetContent( ThreadItem );
8090 end else if Length( FSelectResWord ) > 0 then begin
8091 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
8092 AllResAction.Checked := False;
8093 SelectResAction.Checked := True;
8101 procedure TGikoForm.SelectResActionUpdate(Sender: TObject);
8103 SelectResAction.Enabled := GetActiveContent <> nil;
8106 procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;
8107 Shift: TShiftState);
8111 //
\91S
\82Ä
\82Ì
\83\8c\83X
\82ð
\95\
\8e¦
8112 procedure TGikoForm.AllResActionExecute(Sender: TObject);
8114 ThreadItem : TThreadItem;
8115 FilterList : TStringList;
8117 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
8118 AllResAction.Checked := True;
8119 SelectResAction.Checked := False;
8121 if Length( FSelectResWord ) > 0 then begin
8122 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
8123 FilterList := TStringList.Create;
8125 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8126 GikoSys.FSelectResFilter.Reverse := False;
8131 FSelectResWord := '';
8133 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
8134 ThreadItem := GetActiveContent;
8135 if ThreadItem <> nil then
8136 SetContent( ThreadItem );
8140 procedure TGikoForm.AllResActionUpdate(Sender: TObject);
8142 AllResAction.Enabled := GetActiveContent <> nil;
8145 procedure TGikoForm.ReloadClick(Sender: TObject);
8147 ThreadItem : TThreadItem;
8149 if GikoSys.FAbon.ReLoadFromNGwordFile =false then begin
8150 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);
8152 ThreadItem := GetActiveContent;
8153 if ThreadItem <> nil then
8154 SetContent( ThreadItem );
8159 procedure TGikoForm.GoBackClick(Sender: TObject);
8161 ThreadItem : TThreadItem;
8164 if GikoSys.FAbon.GoForward =false then begin
8165 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);
8167 s := GikoSys.FAbon.NGwordname;
8168 StatusBar.Panels.Items[2].Text := s;
8169 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8170 StatusBarResize(Sender);
8171 ThreadItem := GetActiveContent;
8172 if ThreadItem <> nil then
8173 SetContent( ThreadItem );
8178 procedure TGikoForm.GoFowardClick(Sender: TObject);
8180 ThreadItem : TThreadItem;
8183 if GikoSys.FAbon.GoBack =false then begin
8184 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);
8186 s := GikoSys.FAbon.NGwordname;
8187 StatusBar.Panels.Items[2].Text := s;
8188 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8189 StatusBarResize(Sender);
8190 ThreadItem := GetActiveContent;
8191 if ThreadItem <> nil then
8192 SetContent( ThreadItem );
8197 procedure TGikoForm.SelectComboBoxSplitterMouseMove(Sender: TObject;
8198 Shift: TShiftState; X, Y: Integer);
8203 If (SelectComboBox.Parent <> nil) and (IsDraggingSelectComboBox) Then begin
8206 pos := SelectComboBoxSplitter.ClientToScreen( pos );
8207 w := SelectComboBox.Width + (pos.X - DraggingSelectComboBoxPosition.X);
8209 If w <= 50 Then Begin
8210 //
\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
8211 //
\81u
\8e~
\82Ü
\82Á
\82½(50pixel)
\88Ê
\92u
\81v
\82É
\82È
\82é
\82æ
\82¤
\82É
8212 pos.X := pos.X + (50 - w);
8214 //
\8f¬
\82³
\82
\82È
\82è
\82·
\82¬
\82È
\82¢
\82æ
\82¤
\82É
8218 //
\83`
\83\89\82Â
\82«
\8cy
\8c¸
\82Ì
\88×
8219 If SelectComboBox.Width <> w Then Begin
8220 SelectComboBox.Width := w;
8221 GikoSys.Setting.SelectComboBoxWidth := w;
8222 DraggingSelectComboBoxPosition := pos;
8227 procedure TGikoForm.SelectComboBoxSplitterMouseDown(Sender: TObject;
8228 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8232 IsDraggingSelectComboBox := True;
8235 DraggingSelectComboBoxPosition := SelectComboBoxSplitter.ClientToScreen( pos );
8238 procedure TGikoForm.SelectComboBoxSplitterMouseUp(Sender: TObject;
8239 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8241 IsDraggingSelectComboBox := False;
8244 procedure TGikoForm.StatusBarResize(Sender: TObject);
8246 StatusBar.Panels[1].Width := StatusBar.Width -
8247 StatusBar.Panels[0].Width -
8248 StatusBar.Panels[2].Width;
8250 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\92Ê
\8fí
\81v
8251 procedure TGikoForm.IndividualAbon1Click(Sender: TObject);
8253 ThreadItem : TThreadItem;
8255 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,1);
8256 ThreadItem := GetActiveContent;
8257 if ThreadItem <> nil then
8258 SetContent( ThreadItem );
8260 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\93§
\96¾
\81v
8261 procedure TGikoForm.IndividualAbon2Click(Sender: TObject);
8263 ThreadItem : TThreadItem;
8265 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,0);
8266 ThreadItem := GetActiveContent;
8267 if ThreadItem <> nil then
8268 SetContent( ThreadItem );
8270 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c\81i
\81j
8271 procedure TGikoForm.AntiIndividualAbonClick(Sender: TObject);
8273 ThreadItem : TThreadItem;
8276 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
8277 GikoSys.FAbon.DeleteIndividualAbon(KokoPopupMenu.Tag);
8278 ThreadItem := GetActiveContent;
8279 if ThreadItem <> nil then
8280 SetContent( ThreadItem );
8282 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
8283 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
8286 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c
8287 procedure TGikoForm.N42Click(Sender: TObject);
8289 IndividualForm :TIndividualAbonForm;
8290 ThreadItem : TThreadItem;
8294 IndividualForm := TIndividualAbonForm.Create(Self);
8296 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
8297 for i :=0 to GikoSys.FAbon.GetAbonResCount-1 do begin
8298 IndividualForm.ComboBox1.Items.Add(GikoSys.FAbon.GetAbonResString(i));
8300 if IndividualForm.ShowModal = mrOK then begin
8301 GikoSys.FAbon.DeleteIndividualAbon(IndividualForm.ResNumber);
8303 ThreadItem := GetActiveContent;
8304 if ThreadItem <> nil then
8305 SetContent( ThreadItem );
8307 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
8308 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
8311 IndividualForm.Free;
8315 procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
8318 if (Length( SelectComboBox.Text ) = 0) or
8319 (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
8321 SelectComboBox.Text := '';
8322 SelectComboBox.Color := clWindow;
8327 procedure TGikoForm.N51Click(Sender: TObject);
8331 //
\94Â
\96¼
\8c\9f\8dõ
8332 procedure TGikoForm.TreeSelectSearchBoardNameExecute(Sender: TObject);
8336 CurItem : TTreeNode;
8339 if InputQuery('
\94Â
\96¼
\8c\9f\8dõ','
\94Â
\96¼
\82Ì
\93ü
\97Í',s) then begin
8342 if TreeView.Selected = nil then
8343 CurItem := TreeView.Items.GetFirstNode
8345 CurItem := TreeView.Selected.GetNext;
8346 if CurItem = nil then
8347 CurItem := TreeView.Items.GetFirstNode;
8349 while CurItem <> nil do begin
8350 if (CurItem.ImageIndex <> 2) and (GikoSys.VaguePos(s,CurItem.Text) <> 0) then begin
8353 CurItem := CurItem.GetNext;
8356 if CurItem = nil then begin
8357 msg := '
\90æ
\93ª
\82É
\96ß
\82è
\82Ü
\82·
\82©
\81H';
8358 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
8359 CurItem := TreeView.Items.GetFirstNode;
8363 TreeView.Select(CurItem);
8366 TreeView.Select(CurItem);
8368 msg := '
\8e\9f\82É
\8ds
\82«
\82Ü
\82·
\82©
\81H';
8369 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
8383 procedure TGikoForm.CabinetFavoriteActionExecute(Sender: TObject);
8389 if CabinetPanel.Visible then begin
8390 if FTreeType = gttFavorite then begin
8391 CabinetVisible( False );
8392 CabinetFavoriteAction.Checked := False;
8394 CabinetFavoriteAction.Checked := True;
8397 CabinetVisible( True );
8398 CabinetFavoriteAction.Checked := True;
8401 // BBS...BBS, History, Favorite
8402 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 1;
8404 b := CabinetSelectPopupMenu.Items.Count - 1;
8405 for i := 0 to b do begin
8406 item := CabinetSelectPopupMenu.Items[ i ];
8407 if item is TBBSMenuItem then begin
8408 item.Checked := False;
8409 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
8410 CabinetMenu.Items[ i ].Checked := False;
8414 //
\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Ö
8415 HistoryToolBar.Hide;
8416 FavoriteToolBar.Show;
8417 TreeView.Visible := False;
8418 FavoriteTreeView.Visible := True;
8420 CabinetSelectToolButton.Caption := '
\82¨
\8bC
\82É
\93ü
\82è';
8421 FTreeType := gttFavorite;
8423 //
\83\81\83j
\83\85\81[
\8by
\82Ñ
\83{
\83^
\83\93\82Ì
\83`
\83F
\83b
\83N
\82ð
\90Ý
\92è
8424 CabinetBBSAction.Checked := False;
8425 CabinetHistoryAction.Checked := False;
8427 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\83c
\83\8a\81[
\82ð
\93W
\8aJ
8428 FavoriteTreeView.TopItem.Expanded := True;
8432 procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
8435 if (SenderNode = nil) or (SourceNode = nil) or (SenderNode = SourceNode) then
8438 if TObject(SenderNode.Data) is TFavoriteFolder then
8439 SourceNode.MoveTo(SenderNode, naAddChild)
8441 SourceNode.MoveTo(SenderNode, naInsert);
8445 procedure TGikoForm.FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
8449 FavoBoardItem: TFavoriteBoardItem;
8450 FavoThreadItem: TFavoriteThreadItem;
8452 ThreadItem: TThreadItem;
8455 if (SenderNode = nil) or (Source = nil) then
8458 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
8459 FavNode := SenderNode.Parent
8461 FavNode := SenderNode;
8465 if Source is TBoard then begin
8466 Board := TBoard( Source );
8467 FavoBoardItem := TFavoriteBoardItem.CreateWithItem( Board );
8468 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, FavoBoardItem);
8469 Node.ImageIndex := 15;
8470 Node.SelectedIndex := 15;
8471 end else if Source is TFavoriteBoardItem then begin
8472 FavoBoardItem := TFavoriteBoardItem( Source );
8473 Board := FavoBoardItem.Item;
8474 if Board <> nil then
8475 if not Board.IsThreadDatRead then
8476 GikoSys.ReadSubjectFile(Board);
8477 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, Source);
8478 Node.ImageIndex := 15;
8479 Node.SelectedIndex := 15;
8480 end else if Source is TThreadItem then begin
8481 ThreadItem := TThreadItem( Source );
8482 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
8483 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
8484 Node.ImageIndex := 16;
8485 Node.SelectedIndex := 16;
8486 end else if Source is TFavoriteThreadItem then begin
8487 FavoThreadItem := TFavoriteThreadItem( Source );
8488 ThreadItem := FavoThreadItem.Item;
8489 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, Source);
8490 Node.ImageIndex := 16;
8491 Node.SelectedIndex := 16;
8494 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
8496 FavoriteMoveTo( SenderNode, Node );
8500 procedure TGikoForm.FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
8503 SourceNode: TTreeNode;
8504 LinkToolButton: TLinkToolButton;
8507 if SenderNode = nil then
8510 if not (TObject( SenderNode.Data ) is TFavoriteFolder) then
8511 if FDropSpaceNode <> nil then
8512 SenderNode := FDropSpaceNode;
8514 if Source = FavoriteTreeView then begin
8516 SourceNode := FavoriteTreeView.Selected;
8517 FavoriteMoveTo( SenderNode, SourceNode );
8519 end else if Source is TLinkToolButton then begin
8521 LinkToolButton := TLinkToolButton( Source );
8522 //ShowMessage(LinkToolButton.Text);
8523 SourceNode := TreeNodeDataFind( FavoriteTreeView.TopItem, LinkToolButton.Data );
8524 FavoriteMoveTo( SenderNode, SourceNode );
8526 end else if Source = BrowserTab then begin
8528 idx := BrowserTab.TabIndex;
8529 FavoriteAddTo( SenderNode, BrowserTab.Tabs.Objects[idx] );
8531 end else if Source = ListView then begin
8533 FavoriteAddTo( SenderNode, ListView.Selected.Data );
8535 end else if Source = TreeView then begin
8537 FavoriteAddTo( SenderNode, TreeView.Selected.Data );
8545 procedure TGikoForm.FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
8548 SenderNode: TTreeNode;
8551 SenderNode := FavoriteTreeView.GetNodeAt(X, Y);
8552 if SenderNode <> nil then begin
8553 FavoriteDragDrop( SenderNode, Source );
8556 if FDropSpaceNode <> nil then begin
8557 FDropSpaceNode.Free;
8558 FDropSpaceNode := nil;
8563 procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
8564 Node: TTreeNode; var S: String);
8567 FavoriteTreeView.ReadOnly := True;
8572 procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
8573 Shift: TShiftState);
8579 FClickNode := FavoriteTreeView.Selected;
8580 FavoriteTreeViewRenameActionExecute( Sender );
8584 FClickNode := FavoriteTreeView.Selected;
8585 FavoriteTreeViewDeleteActionExecute( Sender );
8588 FavoriteClick( FavoriteTreeView.Selected );
8590 FavoriteTreeViewDblClick( Sender );
8595 procedure TGikoForm.FavoriteTreePopupMenuPopup(Sender: TObject);
8598 LinkToolButton: TLinkToolButton;
8601 if FavoriteTreePopupMenu.PopupComponent = FavoriteTreeView then begin
8603 FClickNode := FavoriteTreeView.Selected;
8605 end else if FavoriteTreePopupMenu.PopupComponent is TLinkToolButton then begin
8607 LinkToolButton := TLinkToolButton( FavoriteTreePopupMenu.PopupComponent );
8608 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
8609 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
8610 FClickNode := FavoriteTreeView.Items[i];
8614 for i := 0 to FClickNode.Count - 1 do begin
8615 if FClickNode.Item[i].Data = LinkToolButton.Data then begin
8616 FClickNode := FClickNode.Item[i];
8623 if FClickNode = nil then begin
8624 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
8625 FavoriteTreeDeletePopupMenu.Visible := False;
8626 FavoriteTreeRenamePopupMenu.Visible := False;
8627 FavoriteTreeNewFolderPopupMenu.Visible := False;
8628 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
8629 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
8630 FavoriteTreeURLCopyPopupMenu.Visible := False;
8631 FavoriteTreeNameCopyPopupMenu.Visible := False;
8632 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
8633 FavoriteTreeReloadPopupMenu.Visible := False;
8634 FavoriteTreeLogDeletePopupMenu.Visible := False;
8635 end else if FClickNode.IsFirstNode then begin
8636 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
8637 FavoriteTreeDeletePopupMenu.Visible := False;
8638 FavoriteTreeRenamePopupMenu.Visible := False;
8639 FavoriteTreeNewFolderPopupMenu.Visible := True;
8640 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
8641 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
8642 FavoriteTreeURLCopyPopupMenu.Visible := False;
8643 FavoriteTreeNameCopyPopupMenu.Visible := True;
8644 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
8645 FavoriteTreeReloadPopupMenu.Visible := False;
8646 FavoriteTreeLogDeletePopupMenu.Visible := False;
8647 end else if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
8648 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
8649 FavoriteTreeDeletePopupMenu.Visible := True;
8650 FavoriteTreeRenamePopupMenu.Visible := False;
8651 FavoriteTreeNewFolderPopupMenu.Visible := True;
8652 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
8653 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
8654 FavoriteTreeURLCopyPopupMenu.Visible := False;
8655 FavoriteTreeNameCopyPopupMenu.Visible := True;
8656 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
8657 FavoriteTreeReloadPopupMenu.Visible := False;
8658 FavoriteTreeLogDeletePopupMenu.Visible := False;
8659 end else if TObject(FClickNode.Data) is TFavoriteFolder then begin
8660 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
8661 FavoriteTreeDeletePopupMenu.Visible := True;
8662 FavoriteTreeRenamePopupMenu.Visible := True;
8663 FavoriteTreeNewFolderPopupMenu.Visible := True;
8664 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
8665 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
8666 FavoriteTreeURLCopyPopupMenu.Visible := False;
8667 FavoriteTreeNameCopyPopupMenu.Visible := True;
8668 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
8669 FavoriteTreeReloadPopupMenu.Visible := False;
8670 FavoriteTreeLogDeletePopupMenu.Visible := False;
8671 end else if TObject(FClickNode.Data) is TFavoriteThreadItem then begin
8672 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
8673 FavoriteTreeDeletePopupMenu.Visible := True;
8674 FavoriteTreeRenamePopupMenu.Visible := True;
8675 FavoriteTreeNewFolderPopupMenu.Visible := True;
8676 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
8677 //FavoriteTreeBrowseThreadPopupMenu.Visible := True;
8678 FavoriteTreeURLCopyPopupMenu.Visible := True;
8679 FavoriteTreeNameCopyPopupMenu.Visible := True;
8680 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
8681 FavoriteTreeReloadPopupMenu.Visible := True;
8682 FavoriteTreeLogDeletePopupMenu.Visible := True;
8683 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
8684 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
8685 FavoriteTreeDeletePopupMenu.Visible := True;
8686 FavoriteTreeRenamePopupMenu.Visible := True;
8687 FavoriteTreeNewFolderPopupMenu.Visible := True;
8688 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
8689 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
8690 FavoriteTreeURLCopyPopupMenu.Visible := True;
8691 FavoriteTreeNameCopyPopupMenu.Visible := True;
8692 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
8693 FavoriteTreeReloadPopupMenu.Visible := True;
8694 FavoriteTreeLogDeletePopupMenu.Visible := False;
8696 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
8697 FavoriteTreeDeletePopupMenu.Visible := False;
8698 FavoriteTreeRenamePopupMenu.Visible := False;
8699 FavoriteTreeNewFolderPopupMenu.Visible := False;
8700 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
8701 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
8702 FavoriteTreeURLCopyPopupMenu.Visible := False;
8703 FavoriteTreeNameCopyPopupMenu.Visible := False;
8704 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
8705 FavoriteTreeReloadPopupMenu.Visible := False;
8706 FavoriteTreeLogDeletePopupMenu.Visible := False;
8711 procedure TGikoForm.FavoriteTreeViewDeleteActionExecute(Sender: TObject);
8713 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';
8714 DEL_MSG = '
\81g^0
\81h
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
8715 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
8718 if FClickNode = nil then
8720 if FClickNode.IsFirstNode then
8722 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
8723 if MsgBox(Handle, DEL_LINK_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION) <> ID_YES then
8725 end else if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
8726 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONQUESTION) <> ID_YES then
8730 //FDeleteList.Add(FClickNode.Data);
8731 //SetDeleteItemList(FClickNode);
8739 procedure TGikoForm.FavoriteTreeViewRenameActionExecute(Sender: TObject);
8744 if FClickNode = nil then
8746 if FClickNode.IsFirstNode then
8748 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then
8750 FavoriteTreeView.ReadOnly := False;
8751 if (FTreeType = gttFavorite) and (CabinetPanel.Visible) then begin
8752 node := FClickNode.Parent;
8753 while node <> nil do begin
8754 node.Expanded := True;
8755 node := node.Parent;
8757 FClickNode.EditText;
8759 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 );
8766 procedure TGikoForm.FavoriteTreeViewNewFolderActionExecute(
8769 NewFavFolder: TFavoriteFolder;
8773 if FClickNode = nil then
8777 if not (TObject(FClickNode.Data) is TFavoriteFolder) then begin
8778 FavoriteTreeView.Selected := FClickNode.Parent;
8779 FClickNode := FClickNode.Parent;
8782 NewFavFolder := TFavoriteFolder.Create;
8783 Node := FavoriteTreeView.Items.AddChildObject(FClickNode, '
\90V
\82µ
\82¢
\83t
\83H
\83\8b\83_', NewFavFolder);
8784 Node.ImageIndex := 14;
8785 Node.SelectedIndex := 14;
8786 // FClickNode.Selected.Expanded := True;
8787 FavoriteTreeView.Selected := Node;
8789 FavoriteTreeViewRenameAction.Execute;
8795 procedure TGikoForm.ToolButton19Click(Sender: TObject);
8798 FavoriteArrangeActionExecute( nil );
8802 procedure TGikoForm.FavoriteBrowseFolder( node: TTreeNode );
8807 if not (TObject(node.Data) is TFavoriteFolder) then
8810 for i := 0 to node.Count - 1 do
8812 if TObject(node.Item[i].Data) is TFavoriteFolder then
8813 FavoriteBrowseFolder( node.Item[i] )
8814 else if TObject(node.Item[i].Data) is TFavoriteThreadItem then
8815 FavoriteClick( node.Item[i], False );
8820 procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
8824 FavoriteBrowseFolder( FClickNode );
8825 BrowserTab.OnChange(nil);
8829 procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
8832 FClickNode := FavoriteTreeView.Selected;
8833 FavoriteTreeViewReloadActionExecute( Sender );
8837 procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
8840 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';
8841 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
8843 ThreadItem: TThreadItem;
8844 FavThread: TFavoriteThreadItem;
8847 if FClickNode = nil then Exit;
8848 if not (TObject(FClickNode.Data) is TFavoriteThreadItem) then Exit;
8850 FavThread := TFavoriteThreadItem( FClickNode.Data );
8851 ThreadItem := FavThread.Item;
8854 if GikoSys.Setting.DeleteMsg then begin
8855 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
8859 DeleteHistory(ThreadItem);
8860 DeleteTab(ThreadItem);
8861 ThreadItem.DeleteLogFile;
8869 procedure TGikoForm.FavoriteTreeViewReloadActionExecute(Sender: TObject);
8871 ThreadItem: TThreadItem;
8872 FavThread: TFavoriteThreadItem;
8874 FavBoard: TFavoriteBoardItem;
8877 if FClickNode = nil then Exit;
8879 if TObject( FClickNode.Data ) is TFavoriteThreadItem then begin
8880 FavThread := TFavoriteThreadItem( FClickNode.Data );
8881 ThreadItem := FavThread.Item;
8882 if ThreadItem <> nil then
8883 DownloadContent(ThreadItem);
8884 end else if TObject( FClickNode.Data ) is TFavoriteBoardItem then begin
8885 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8886 Board := FavBoard.Item;
8887 DownloadList(Board);
8892 procedure TGikoForm.FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
8894 FavThread : TFavoriteThreadItem;
8895 FavBoard : TFavoriteBoardItem;
8899 if FClickNode = nil then Exit;
8901 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8903 FavThread := TFavoriteThreadItem( FClickNode.Data );
8904 s := FavThread.URL + #13#10;
8906 Clipboard.AsText := s;
8908 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8910 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8911 s := FavBoard.URL + #13#10;
8913 Clipboard.AsText := s;
8919 procedure TGikoForm.FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
8921 ThreadItem: TThreadItem;
8922 FavThread: TFavoriteThreadItem;
8924 FavBoard: TFavoriteBoardItem;
8928 if FClickNode = nil then Exit;
8930 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8932 FavThread := TFavoriteThreadItem( FClickNode.Data );
8933 ThreadItem := FavThread.Item;
8936 s := ThreadItem.Title + #13#10;
8938 Clipboard.AsText := s;
8942 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8944 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8945 Board := FavBoard.Item;
8946 if Board <> nil then
8947 if not Board.IsThreadDatRead then
8948 GikoSys.ReadSubjectFile(Board);
8951 s := Board.Title + #13#10;
8953 Clipboard.AsText := s;
8961 procedure TGikoForm.FavoriteTreeViewNameURLCopyActionExecute(
8964 ThreadItem: TThreadItem;
8965 FavThread: TFavoriteThreadItem;
8967 FavBoard: TFavoriteBoardItem;
8971 if FClickNode = nil then Exit;
8973 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8975 FavThread := TFavoriteThreadItem( FClickNode.Data );
8976 ThreadItem := FavThread.Item;
8979 s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10;
8981 Clipboard.AsText := s;
8985 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8987 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8988 Board := FavBoard.Item;
8989 if Board <> nil then
8990 if not Board.IsThreadDatRead then
8991 GikoSys.ReadSubjectFile(Board);
8994 s := Board.URL + #13#10 + Board.Title + #13#10;
8996 Clipboard.AsText := s;
9004 function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
9010 for i := 0 to Node.Count - 1 do begin
9011 if Node.Item[i].Data = FindPointer then begin
9012 Result := Node.Item[i];
9014 end else if Node.Item[i].Count > 0 then begin
9015 Found := TreeNodeDataFind( Node.Item[i], FindPointer );
9016 if Found <> nil then begin
9027 procedure TGikoForm.LinkToolBarDragDrop(Sender, Source: TObject; X,
9031 SenderNode: TTreeNode;
9035 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
9036 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
9037 SenderNode := FavoriteTreeView.Items[i];
9042 FavoriteDragDrop( SenderNode, Source );
9046 procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
9047 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
9049 if FDragWFirst <> true then begin
9050 FDragWFirst := false;
9051 end else if (X = FMouseDownPos.X) and (Y = FMouseDownPos.Y) then begin
9052 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
9053 if GikoSys.Setting.ListWidthState = glsMin then begin
9054 BrowserMaxAction.Execute;
9055 if GikoForm.Visible then
9059 if GikoSys.Setting.ListHeightState = glsMin then begin
9060 BrowserMaxAction.Execute;
9061 if GikoForm.Visible then
9068 procedure TGikoForm.LinkToolBarDragOver(Sender, Source: TObject; X,
9069 Y: Integer; State: TDragState; var Accept: Boolean);
9072 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
9076 procedure TGikoForm.OnlyAHundredResExecute(Sender: TObject);
9078 ThreadItem : TThreadItem;
9080 GikoSys.OnlyAHundredRes := OnlyAHundredRes.Checked;
9081 ThreadItem := GetActiveContent;
9082 if ThreadItem <> nil then
9083 SetContent( ThreadItem );
9086 procedure TGikoForm.FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
9090 if FDropSpaceNode <> nil then begin
9091 FDropSpaceNode.Free;
9092 FDropSpaceNode := nil;
9098 procedure TGikoForm.ListCoolBarContextPopup(Sender: TObject;
9099 MousePos: TPoint; var Handled: Boolean);
9102 FToolBarSettingSender := tssList;
9103 MousePos := ListCoolBar.ClientToScreen( MousePos );
9104 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9108 procedure TGikoForm.MainCoolBarContextPopup(Sender: TObject;
9109 MousePos: TPoint; var Handled: Boolean);
9112 FToolBarSettingSender := tssMain;
9113 MousePos := MainCoolBar.ClientToScreen( MousePos );
9114 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9118 procedure TGikoForm.BrowserCoolBarContextPopup(Sender: TObject;
9119 MousePos: TPoint; var Handled: Boolean);
9122 FToolBarSettingSender := tssBrowser;
9123 MousePos := BrowserCoolBar.ClientToScreen( MousePos );
9124 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9127 procedure TGikoForm.ExportFavoriteFileAccept(Sender: TObject);
9129 if FavoriteDM.SaveFavoriteFile( ExportFavoriteFile.Dialog.FileName ) Then begin
9130 ShowMessage('
\83t
\83@
\83C
\83\8b\82ð
\8fo
\97Í
\82µ
\82Ü
\82µ
\82½');
9132 ShowMessage('
\83t
\83@
\83C
\83\8b\82Ì
\8fo
\97Í
\82É
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½');
9135 procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
9137 if FListViewBackGroundColor <> value then begin
9138 FListViewBackGroundColor := value;
9139 ListView.Color := FListViewBackGroundColor;
9142 procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
9144 ExportFavoriteFile.Dialog.FileName := FavoriteDM.GetFavoriteFilePath;
9147 procedure TGikoForm.CabinetBBSActionExecute(Sender: TObject);
9150 if CabinetPanel.Visible then begin
9151 if FTreeType = gtt2ch then begin
9152 CabinetVisible( False );
9154 CabinetBBSAction.Checked := False;
9156 CabinetBBSAction.Checked := True;
9159 CabinetVisible( True );
9160 CabinetBBSAction.Checked := True;
9163 if FActiveBBS = nil then
9164 ShowBBSTree( BBSs[ 0 ] )
9166 ShowBBSTree( FActiveBBS );
9170 procedure TGikoForm.FavoriteTreeViewBrowseThreadActionExecute(
9173 threadItem : TThreadItem;
9176 if FClickNode = nil then Exit;
9178 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9180 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9181 if threadItem = nil then
9183 GikoSys.OpenBrowser( threadItem.URL, gbtAuto );
9189 procedure TGikoForm.FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
9191 threadItem : TThreadItem;
9195 if FClickNode = nil then Exit;
9197 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9199 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9200 if threadItem = nil then
9202 GikoSys.OpenBrowser( threadItem.ParentBoard.URL, gbtAuto );
9204 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9206 boardItem := TFavoriteBoardItem( FClickNode.Data ).Item;
9207 if boardItem = nil then
9209 GikoSys.OpenBrowser( boardItem.URL, gbtAuto );
9215 procedure TGikoForm.UpBoardActionExecute(Sender: TObject);
9218 SelectTreeNode( GetActiveContent.ParentBoard, True );
9222 procedure TGikoForm.UpBoardActionUpdate(Sender: TObject);
9225 UpBoardAction.Enabled := GetActiveContent <> nil;
9229 procedure TGikoForm.BrowserTabContextPopup(Sender: TObject;
9230 MousePos: TPoint; var Handled: Boolean);
9234 idx := BrowserTab.IndexOfTabAt(MousePos.X, MousePos.Y);
9235 if BrowserTab.TabIndex <> idx then begin
9236 BrowserTab.TabIndex := idx;
9237 BrowserTab.OnChange(nil);
9242 procedure TGikoForm.KoreCopyExecute(Sender: TObject);
9244 KonoresCopy(KokoPopupMenu.Tag, true);
9246 procedure TGikoForm.KonoresCopy(Number: Integer; ReplaceTag : Boolean);
9248 ThreadItem: TThreadItem;
9254 boardPlugIn : TBoardPlugIn;
9256 if Number = 0 then Exit;
9257 ThreadItem := GetActiveContent;
9259 if ThreadItem <> nil then begin
9260 if ThreadItem.IsBoardPlugInAvailable then begin
9261 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
9262 boardPlugIn := ThreadItem.BoardPlugIn;
9264 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
9265 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
9266 //
\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
9267 tmp := boardPlugIn.GetDat( DWORD( threadItem ), Number );
9269 FileName := ThreadItem.FilePath;
9270 tmp := GikoSys.ReadThreadFile(FileName, Number);
9272 if tmp <> '' then begin
9273 Res := GikoSys.DivideStrLine(tmp);
9275 Header := IntToStr(Number) + '
\81F' + Res.FName + '
\81F' + Res.FDateTime + #13#10;
9276 if ReplaceTag then begin
9277 Header := CustomStringReplace(Header, '</b>', '',true);
9278 Header := CustomStringReplace(Header, '<b>', '',true);
9281 Body := CustomStringReplace(Res.FBody, '<br> ', #13#10,true);
9282 Body := CustomStringReplace(Body, '<br>', #13#10,true);
9283 Body := CustomStringReplace(Body, '</a>', '',true);
9285 Body := GikoSys.DeleteLink(Body);
9286 if ReplaceTag then begin
9287 Body := CustomStringReplace(Body, '<', '<');
9288 Body := CustomStringReplace(Body, '>', '>');
9289 Body := CustomStringReplace(Body, '"', '"');
9290 Body := CustomStringReplace(Body, '&', '&');
9291 Body := CustomStringReplace(Body, ' ', ' ');
9294 Header := Header + Body;
9296 Clipboard.SetTextBuf( PChar(Header) );
9302 procedure TGikoForm.BrowserTabPopupMenuPopup(Sender: TObject);
9304 AddRoundNameMenu(dummy1);
9307 procedure TGikoForm.FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
9309 FavoriteDM.URLReplace(oldURLs, newURLs);
9312 procedure TGikoForm.RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
9314 RoundList.URLReplace(oldURLs, newURLs);
9317 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82é
9318 procedure TGikoForm.OnMinimize;
9320 FIsMinimize := mtMinimizing;
9321 if FActiveContent <> nil then
9322 FActiveContent.ScrollTop := OleVariant(IHTMLDocument2(Browser.Document)).Body.ScrollTop;
9323 PostMessage( Handle, USER_MINIMIZED, 0, 0 );
9326 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82½
9327 procedure TGikoForm.OnMinimized;
9329 FIsMinimize := mtMinimized;
9330 FIsIgnoreResize := False;
9333 procedure TGikoForm.CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
9338 affectedBand : TCoolBand;
9341 if (FOldFormWidth = Width) and not IsIconic( Handle ) and not FIsIgnoreResize then begin
9342 FIsIgnoreResize := True;
9343 PostMessage( Handle, USER_RESIZED, 0, 0 );
9344 if not (Sender is TToolBar) or (CoolBar = nil) then
9346 toolbar := TToolBar( Sender );
9348 //
\95Ï
\8dX
\82³
\82ê
\82½
\83N
\81[
\83\8b\83o
\81[
\82Ì
\92l
\82ð
\95Û
\91¶
9349 if CoolBar = MainCoolBar then begin
9350 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
9351 CoolSet.FCoolID := CoolBar.Bands[i].ID;
9352 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
9353 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
9354 GikoSys.Setting.MainCoolSet[i] := CoolSet;
9356 end else if CoolBar = ListCoolBar then begin
9357 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
9358 CoolSet.FCoolID := CoolBar.Bands[i].ID;
9359 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
9360 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
9361 GikoSys.Setting.ListCoolSet[i] := CoolSet;
9363 end else if CoolBar = BrowserCoolBar then begin
9364 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
9365 CoolSet.FCoolID := CoolBar.Bands[i].ID;
9366 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
9367 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
9368 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
9371 //
\95\9d\82Ì
\95Ï
\8dX
\82³
\82ê
\82½
\83o
\83\93\83h
\82ð
\8c©
\82Â
\82¯
\82é
9372 affectedBand := nil;
9373 for i := CoolBar.Bands.Count - 1 downto 0 do begin
9374 if CoolBar.Bands[ i ].Control.Handle = toolbar.Handle then begin
9375 band := CoolBar.Bands[ i ];
9376 if band.Break or (i = 0) then begin
9377 if i + 1 < CoolBar.Bands.Count then
9378 if not CoolBar.Bands[ i + 1 ].Break then
9379 affectedBand := CoolBar.Bands[ i + 1 ];
9382 affectedBand := CoolBar.Bands[ i - 1 ];
9387 //
\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·
9388 if CoolBar = MainCoolBar then begin
9389 coolSet := GikoSys.Setting.MainCoolSet[ band.ID ];
9390 coolSet.FCoolWidth := toolbar.Width + 25;
9391 GikoSys.Setting.MainCoolSet[ band.ID ] := coolSet;
9392 if affectedBand <> nil then begin
9393 coolSet := GikoSys.Setting.MainCoolSet[ affectedBand.ID ];
9394 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
9395 GikoSys.Setting.MainCoolSet[ affectedBand.ID ] := coolSet;
9397 end else if CoolBar = ListCoolBar then begin
9398 coolSet := GikoSys.Setting.ListCoolSet[ band.ID ];
9399 coolSet.FCoolWidth := toolbar.Width + 25;
9400 GikoSys.Setting.ListCoolSet[ band.ID ] := coolSet;
9401 if affectedBand <> nil then begin
9402 coolSet := GikoSys.Setting.ListCoolSet[ affectedBand.ID ];
9403 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
9404 GikoSys.Setting.ListCoolSet[ affectedBand.ID ] := coolSet;
9406 end else if CoolBar = BrowserCoolBar then begin
9407 coolSet := GikoSYs.Setting.BrowserCoolSet[ band.ID ];
9408 coolSet.FCoolWidth := toolbar.Width + 25;
9409 GikoSys.Setting.BrowserCoolSet[ band.ID ] := coolSet;
9410 if affectedBand <> nil then begin
9411 coolSet := GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ];
9412 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
9413 GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ] := coolSet;
9419 procedure TGikoForm.MenuToolBarResize(Sender: TObject);
9421 CoolBarResized( Sender, MainCoolBar );
9424 procedure TGikoForm.StdToolBarResize(Sender: TObject);
9426 CoolBarResized( Sender, MainCoolBar );
9429 procedure TGikoForm.LinkToolBarResize(Sender: TObject);
9431 CoolBarResized( Sender, MainCoolBar );
9434 procedure TGikoForm.ListNameToolBarResize(Sender: TObject);
9436 CoolBarResized( Sender, ListCoolBar );
9439 procedure TGikoForm.ListToolBarResize(Sender: TObject);
9441 CoolBarResized( Sender, ListCoolBar );
9444 procedure TGikoForm.BrowserNameToolBarResize(Sender: TObject);
9446 CoolBarResized( Sender, BrowserCoolBar );
9449 procedure TGikoForm.BrowserToolBarResize(Sender: TObject);
9451 CoolBarResized( Sender, BrowserCoolBar );
9454 procedure TGikoForm.BrowserTabResize(Sender: TObject);
9456 CoolBarResized( Sender, BrowserCoolBar );
9459 // *************************************************************************
9460 // ExternalBoardPlugInMain
9461 //
\83v
\83\89\83O
\83C
\83\93\83\81\83j
\83\85\81[
\82Ì
\8d\80\96Ú
\82ª
\8eÀ
\8ds
\82³
\82ê
\82½
9462 // *************************************************************************
9463 procedure TGikoForm.OnPlugInMenuItem( Sender : TObject );
9466 boardPlugIn : TBoardPlugIn;
9469 if not (Sender is TMenuItem) then
9472 item := TMenuItem( Sender );
9473 if not Assigned( Pointer( item.Tag ) ) then
9476 //
\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·
9477 boardPlugIn := TBoardPlugIn( item.Tag );
9478 boardPlugIn.PlugInMenu( item.Handle );
9482 procedure TGikoForm.ListViewClick(Sender: TObject);
9487 // TreeView
\82ª
\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
9488 procedure TGikoForm.TreeClick( Node : TTreeNode );
9496 if FTreeType = gttHistory then begin
9498 if TObject( Node.Data ) is TFavoriteThreadItem then
9499 if GetActiveContent <> TFavoriteThreadItem( Node.Data ).Item then
9500 FavoriteClick( Node );
9504 if GetActiveList is TBBS then begin
9505 for i := 0 to ListView.Columns.Count - 1 do
9506 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
9507 end else if GetActiveList is TCategory then begin
9508 for i := 0 to ListView.Columns.Count - 1 do
9509 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
9510 end else if GetActiveList is TBoard then begin
9511 for i := 0 to ListView.Columns.Count - 1 do
9512 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
9515 if TObject(Node.Data) is TBBS then begin
9516 SetActiveList(Node.data);
9517 end else if TObject(Node.Data) is TCategory then begin
9518 SetActiveList(Node.data);
9519 end else if TObject(Node.Data) is TBoard then begin
9520 if not TBoard(Node.Data).IsThreadDatRead then begin
9521 Screen.Cursor := crHourGlass;
9523 if not TBoard(Node.Data).IsThreadDatRead then
9524 GikoSys.ReadSubjectFile(Node.Data);
9526 Screen.Cursor := crDefault;
9529 SetActiveList(Node.data);
9534 // TreeView
\82ª
\83_
\83u
\83\8b\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
9535 procedure TGikoForm.TreeDoubleClick( Node : TTreeNode );
9538 ThreadItem : TThreadItem;
9541 if Node = nil then Exit;
9543 if FTreeType = gtt2ch then begin
9544 if not (TObject(Node.Data) is TBoard) then Exit;
9545 Board := TBoard(Node.Data);
9546 DownloadList(Board);
9547 end else if FTreeType = gttHistory then begin
9548 if not (TObject(Node.Data) is TFavoriteThreadItem) then Exit;
9549 ThreadItem := TFavoriteThreadItem(Node.Data).Item;
9550 DownloadContent(ThreadItem);
9555 procedure TGikoForm.TreeViewClick(Sender: TObject);
9557 TreeClick( TreeView.Selected );
9560 procedure TGikoForm.TreeViewKeyDown(Sender: TObject; var Key: Word;
9561 Shift: TShiftState);
9563 if Key = VK_BACK then begin
9564 // UpFolderButtonClick(Sender);
9565 end else if Key = VK_SPACE then begin
9566 TreeDoubleClick( TreeView.Selected );
9567 end else if Key = VK_RETURN then begin
9568 TreeClick( TreeView.Selected );
9572 //
\83u
\83\89\83E
\83U
\82Ì
\83L
\81[
\83_
\83E
\83\93\83C
\83x
\83\93\83g
9573 //
\83C
\83x
\83\93\83g
\82ð
\8eæ
\82è
\88µ
\82Á
\82½
\8fê
\8d\87\82Í True
\82ð
\95Ô
\82·
9574 function TGikoForm.BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
9576 iOIPAO : IOleInPlaceActiveObject;
9577 Dispatch : IDispatch;
9580 if Key = VK_BACK then begin
9581 UpBoardAction.Execute;
9583 end else if Key in [VK_ESCAPE..VK_HELP] then begin
9584 //
\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
9587 //
\82»
\82ê
\88È
\8aO
\82Ì
\83C
\83x
\83\93\83g
\82Í Browser
\82É
\97¬
\82·
9588 Dispatch := Browser.Application;
9589 if Dispatch <> nil then
9590 Dispatch.QueryInterface( IOleInPlaceActiveObject, iOIPAO );
9591 if iOIPAO <> nil then
9592 iOIPAO.TranslateAccelerator( Msg );
9594 //
\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¢
9600 //
\83M
\83R
\83i
\83r
\82Ì
\83\81\83b
\83Z
\81[
\83W
\83\8b\81[
\83v
\82ð
\89¡
\8eæ
\82è
\82µ
\82Ü
\82·
9601 procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
9608 if IsDialogMessage( Browser.Handle, Msg ) then begin
9610 Handled := BrowserKeyDown( Msg, key, KeyDataToShiftState( Msg.lParam ) );
9613 case Msg.wParam shr 16 of
9615 if IsDialogMessage( Browser.Handle, Msg ) then begin
9616 UpBoardAction.Execute;
9618 end else if IsDialogMessage( ListView.Handle, Msg ) then begin
9619 UpFolderAction.Execute;
9628 procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject;
9629 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
9631 favItem : TTreeNode;
9632 favThreadItem : TFavoriteThreadItem;
9638 FMouseDownPos.X := X;
9639 FMouseDownPos.Y := Y;
9643 favItem := FavoriteTreeView.GetNodeAt( X, Y );
9644 if favItem = nil then Exit;
9646 if TObject( favItem.Data ) is TFavoriteThreadItem then begin
9647 favThreadItem := TFavoriteThreadItem( favItem.Data );
9648 if favThreadItem.Item <> nil then
9649 InsertBrowserTab( favThreadItem.Item );
9656 procedure TGikoForm.MessagePanelResize(Sender: TObject);
9659 if FIsIgnoreResize then
9662 if GikoSys.Setting.ListOrientation = gloVertical then begin
9663 if GikoSys.Setting.ListHeightState = glsMin then begin
9664 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
9665 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
9671 procedure TGikoForm.OnResized;
9674 FOldFormWidth := Width;
9675 FIsIgnoreResize := False;
9679 procedure TGikoForm.TreeSelectNameCopyExecute(Sender: TObject);
9683 TreeView.Selected := FClickNode;
9684 s := FClickNode.Text;
9685 Clipboard.AsText := s;
9688 procedure TGikoForm.FavoriteTreeViewMouseUp(Sender: TObject;
9689 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
9692 if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold) and
9693 (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
9694 FavoriteClick( TObject( FavoriteTreeView.Selected ) );