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);
3342 // if FActiveList <> Obj then begin
3345 if ListView.Selected <> nil then
3346 idx := ListView.Selected.Index
3349 ListView.Items.Count := 0;
3350 ListView.Items.Clear;
3351 ListView.Selected := nil;
3352 // ListView.Columns.Clear;
3354 Caption := CAPTION_NAME;
3355 //Application.Title := CAPTION_NAME;
3357 if Obj is TBBS then begin
3358 for i := 0 to ListView.Columns.Count - 1 do
3359 ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i];
3360 SetCategoryListItem(TBBS(Obj));
3361 end else if Obj is TCategory then begin
3362 for i := 0 to ListView.Columns.Count - 1 do
3363 ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i];
3364 SetBoardListItem(TCategory(Obj));
3365 end else if Obj is TBoard then begin
3366 SetThreadListItem(TBoard(Obj));
3369 if idx >= 0 then begin
3370 ListView.ItemIndex := idx;
3371 ListView.ItemFocused := ListView.Items.Item[ idx ];
3375 if Obj is TBoard then begin
3376 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
3377 if GikoSys.Setting.ListWidthState = glsMax then begin
3378 BrowserMinAction.Execute;
3379 if GikoForm.Visible then
3383 if GikoSys.Setting.ListHeightState = glsMax then begin
3384 BrowserMinAction.Execute;
3385 if GikoForm.Visible then
3393 //
\81\9a\81\9a\83q
\83\8d\83\86\83L
\83\81\83\82
3394 //
\82»
\82Ì
\82¤
\82¿interface
\82ð
\8eg
\82¤
3395 function TGikoForm.GetActiveList: TObject;
3397 Result := FActiveList;
3400 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType);
3402 SetListViewType(AViewType, '', False);
3405 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
3409 if ActiveList is TBoard then begin
3410 Board := TBoard(ActiveList);
3412 Board.ParentCategory.ParenTBBS.SelectText := SelectText;
3413 Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
3414 // Board.SelectText := SelectText;
3415 // Board.KubetsuChk := KubetsuChk;
3416 ViewType := AViewType;
3417 SetActiveList(Board);
3418 SetThreadListItem(Board);
3422 procedure TGikoForm.ListViewCustomDraw(Sender: TCustomListView;
3423 const ARect: TRect; var DefaultDraw: Boolean);
3429 if ListView.Items.Count = 0 then begin
3430 DefaultDraw := True;
3432 ListView.Canvas.Brush.Color := ListView.Color;
3433 ListView.Canvas.FillRect(ARect);
3437 ListView.Canvas.Font.Color := clWindowText;
3438 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3441 ListView.Canvas.Font.Color := clBlue;
3442 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';
3445 ListView.Canvas.Font.Color := clGreen;
3446 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\90V
\92\85\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3449 ListView.Canvas.Font.Color := clNavy;
3450 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';
3451 if GetActiveList is TBoard then
3452 s := Format(s, [TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText]);
3460 p := Point((ListView.ClientWidth div 2) - (ListView.Canvas.TextWidth(s) div 2),
3461 (ListView.ClientHeight div 2) - (ListView.Canvas.TextHeight(s) div 2));
3462 ListView.Canvas.TextOut(p.X, p.Y, s);
3464 DefaultDraw := True;
3468 procedure TGikoForm.DownloadList(Board: TBoard);
3470 Item: TDownloadItem;
3472 if not Board.IsThreadDatRead then
3473 GikoSys.ReadSubjectFile(Board);
3474 Item := TDownloadItem.Create;
3476 Item.Board := Board;
3477 Item.DownType := gdtBoard;
3478 // AbortToolButton.Enabled := True;
3479 // Animate.Active := True;
3480 // FDownload.Add(Item);
3481 FControlThread.AddItem(Item);
3482 // Animate.Active := False;
3483 // AbortToolButton.Enabled := False;
3484 if FWorkCount = 0 then begin
3486 Animate.Active := True;
3489 Screen.Cursor := crAppStart;
3497 procedure TGikoForm.DownloadContent(ThreadItem: TThreadItem);
3499 Item: TDownloadItem;
3501 Item := TDownloadItem.Create;
3503 Item.ThreadItem := ThreadItem;
3504 Item.DownType := gdtThread;
3505 // AbortToolButton.Enabled := True;
3506 // Animate.Active := True;
3507 // FDownload.Add(Item);
3508 FControlThread.AddItem(Item);
3509 // Animate.Active := False;
3510 // AbortToolButton.Enabled := False;
3511 if FWorkCount = 0 then begin
3513 Animate.Active := True;
3516 Screen.Cursor := crAppStart;
3524 procedure TGikoForm.PlaySound(SoundEventName: string);
3528 FileName := GikoSys.Setting.FindSoundFileName(SoundEventName);
3529 if FileExists(FileName) then begin
3530 if not sndPlaySound(PChar(FileName), SND_ASYNC or SND_NOSTOP) then begin
3531 sndPlaySound(nil, SND_SYNC);
3532 Application.ProcessMessages;
3534 sndPlaySound(PChar(FileName), SND_ASYNC);
3539 function TGikoForm.AddHistory( favItem : TFavoriteThreadItem ): Boolean;
3542 Item: TFavoriteThreadItem;
3546 // if (GetActiveContent = ThreadItem) and
3547 // (ThreadItem.Count <= ThreadItem.Kokomade) then
3549 // if GetActiveContent = ThreadItem then
3553 if FTreeType = gttHistory then
3554 TreeView.Selected := nil;
3556 for i := 0 to FHistoryList.Count - 1 do begin
3557 if TObject(FHistoryList[i]) is TFavoriteThreadItem then begin
3558 Item := TFavoriteThreadItem(FHistoryList[i]);
3559 if Item.URL = favItem.URL then begin
3560 // SetContent(ThreadItem);
3561 FHistoryList.Move(i, 0);
3562 if FTreeType = gttHistory then
3563 if TreeView.TopItem <> TreeView.Items[ i ] then
3564 TreeView.Items[ i ].MoveTo( TreeView.TopItem, naInsert );
3571 if FHistoryList.Count > 0 then
3572 FHistoryList.Insert( 0, favItem )
3574 FHistoryList.Add( favItem );
3575 // SetContent(ThreadItem);
3577 if FTreeType = gttHistory then begin
3578 Node := TreeView.Items.Add( nil, favItem.Title );
3579 Node.MoveTo( TreeView.TopItem, naInsert );
3581 if favItem.NewArrival then begin
3582 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3583 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3585 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3586 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3589 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
3590 //
\81¦favItem.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
3591 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3592 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3593 Node.Data := favItem;
3597 procedure TGikoForm.DeleteHistory( threadItem: TThreadItem );
3601 for i := 0 to FHistoryList.Count - 1 do begin
3602 if threadItem.URL = TFavoriteThreadItem( FHistoryList.Items[i] ).URL then begin
3603 TFavoriteThreadItem( FHistoryList.Items[ i ] ).Free;
3604 FHistoryList.Delete(i);
3605 FHistoryList.Capacity := FHistoryList.Count;
3611 procedure TGikoForm.ClearHistory;
3615 //FHistoryList.Clear;
3618 for i := FHistoryList.Count - 1 downto 0 do begin
3619 if TObject(FHistoryList[ i ]) is TFavoriteThreadItem then
3620 TFavoriteThreadItem(FHistoryList[ i ]).Free
3621 else if TObject(FHistoryList[ i ]) is TFavoriteBoardItem then
3622 TFavoriteBoardItem(FHistoryList[ i ]).Free;
3624 //FHistoryList.Delete(i);
3630 FHistoryList.Capacity := FHistoryList.Count;
3634 procedure TGikoForm.SaveHistory;
3637 saveList : TstringList;
3640 saveList := TStringList.Create;
3643 FHistoryList.Capacity := FHistoryList.Count;
3644 saveList.Add('<?xml version="1.0" encoding="Shift_JIS" standalone="yes"?>');
3645 saveList.Add('<address>');
3646 bound := FHistoryList.Count - 1;
3647 for i := bound downto 0 do begin
3648 // title
\82Í
\8d¡
\82Ì
\82Æ
\82±
\82ë
\8eg
\82Á
\82Ä
\82¢
\82È
\82¢
3650 '<history url="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).URL ) + '"' +
3651 ' title="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).Title ) + '"/>');
3653 saveList.Add('</address>');
3654 saveList.SaveToFile( GikoSys.GetConfigDir + 'History.xml' );
3661 procedure TGikoForm.LoadHistory;
3665 XMLDoc : IXMLDocument;
3667 HistoryNode : IXMLNode;
3669 favItem : TFavoriteThreadItem;
3672 fileName := GikoSys.GetConfigDir + 'History.xml';
3674 if FileExists( fileName ) then begin
3676 XMLDoc := IXMLDocument.Create;
3677 //XMLDoc := LoadXMLDocument(FileName);
3678 LoadXMLDocument(FileName, XMLDoc);
3680 XMLNode := XMLDoc.DocumentElement;
3682 if XMLNode.NodeName = 'address' then begin
3683 bound := XMLNode.ChildNodes.Count - 1;
3684 for i := 0 to bound do begin
3685 HistoryNode := XMLNode.ChildNodes[i];
3686 if HistoryNode.NodeName = 'history' then begin
3687 //if FReadCount >= sl.Count then begin
3688 s := Trim(HistoryNode.Attributes['url']);
3689 if s <> '' then begin
3690 favItem := TFavoriteThreadItem.Create(
3691 s, HistoryNode.Attributes[ 'title' ] );
3692 if not AddHistory( favItem ) then
3708 procedure TGikoForm.ShowBBSTreeOld(
3716 FavoriteTreeView.Visible := False;
3717 FavoriteToolBar.Hide;
3718 TreeView.Visible := True;
3720 b := CabinetSelectPopupMenu.Items.Count - 1;
3721 for i := 0 to b do begin
3722 item := CabinetSelectPopupMenu.Items[ i ];
3723 if item is TBBSMenuItem then begin
3724 if TBBSMenuItem( item ).Data = inBBS then begin
3725 item.Checked := True;
3726 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
3727 CabinetMenu.Items[ i ].Checked := True;
3728 GikoSys.Setting.CabinetIndex := i;
3732 item.Checked := False;
3733 // CabinetMenu ?? CabinetSelectPopupMenu ??????????????
3734 CabinetMenu.Items[ i ].Checked := False;
3736 CabinetSelectToolButton.Caption := inBBS.Title;
3738 CabinetHistoryAction.Checked := False;
3739 CabinetFavoriteAction.Checked := False;
3741 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
3742 FTreeType := gtt2ch;
3743 HistoryToolBar.Hide;
3744 SetBoardTreeNode( inBBS );
3745 TreeView.TopItem.Expanded := True; //?c???[?g?b?v???????J??
3746 //?c???[??g?b?v?????I????
3747 if GetActiveList = nil then
3748 TreeView.Selected := TreeView.Items[0]
3750 for i := 0 to TreeView.Items.Count - 1 do begin
3751 if TreeView.Items[i].Data = GetActiveList then begin
3752 TreeView.Selected := TreeView.Items[i];
3756 TreeView.Selected := TreeView.Items[0]
3764 procedure TGikoForm.ShowBBSTree(
3773 FavoriteTreeView.Visible := False;
3774 FavoriteToolBar.Hide;
3775 TreeView.Visible := True;
3777 b := CabinetSelectPopupMenu.Items.Count - 1;
3778 for i := 0 to b do begin
3779 item := CabinetSelectPopupMenu.Items[ i ];
3780 if item is TBBSMenuItem then begin
3781 if TBBSMenuItem( item ).Data = inBBS then begin
3782 item.Checked := True;
3783 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3784 CabinetMenu.Items[ i ].Checked := True;
3785 GikoSys.Setting.CabinetIndex := i;
3789 item.Checked := False;
3790 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3791 CabinetMenu.Items[ i ].Checked := False;
3793 CabinetSelectToolButton.Caption := inBBS.Title;
3795 CabinetHistoryAction.Checked := False;
3796 CabinetFavoriteAction.Checked := False;
3798 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
3799 FTreeType := gtt2ch;
3800 HistoryToolBar.Hide;
3801 SetBoardTreeNode( inBBS );
3802 TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
3803 //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
3804 if GetActiveList = nil then begin
3806 TreeClick( TreeView.Items[0] );
3810 for i := 0 to TreeView.Items.Count - 1 do begin
3811 if TreeView.Items[i].Data = GetActiveList then begin
3812 TreeClick( TreeView.Items[i] );
3816 TreeClick( TreeView.Items[0] );
3824 procedure TGikoForm.ShowHistoryTree;
3829 if CabinetPanel.Visible then begin
3830 if FTreeType = gttHistory then begin
3831 CabinetVisible( False );
3832 CabinetHistoryAction.Checked := False;
3834 CabinetHistoryAction.Checked := True;
3837 CabinetVisible( True );
3838 CabinetHistoryAction.Checked := True;
3841 // BBS...BBS, History, Favorite
3842 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 2;
3844 FavoriteTreeView.Visible := False;
3845 TreeView.Visible := True;
3847 CabinetBBSAction.Checked := False;
3848 CabinetFavoriteAction.Checked := False;
3850 if FTreeType <> gttHistory then begin
3851 b := CabinetSelectPopupMenu.Items.Count - 1;
3852 for i := 0 to b do begin
3853 item := CabinetSelectPopupMenu.Items[ i ];
3854 if item is TBBSMenuItem then begin
3855 item.Checked := False;
3856 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3857 CabinetMenu.Items[ i ].Checked := False;
3861 FTreeType := gttHistory;
3862 HistoryToolBar.Show;
3863 FavoriteToolBar.Hide;
3865 CabinetSelectToolButton.Caption := '
\97\9a\97ð
\83\8a\83X
\83g';
3869 procedure TGikoForm.SetHistoryTreeNode;
3873 Item: TFavoriteThreadItem;
3875 TreeView.Items.BeginUpdate;
3877 TreeView.Items.Clear;
3878 for i := 0 to FHistoryList.Count - 1 do begin
3879 Item := TFavoriteThreadItem(FHistoryList[i]);
3880 Node := TreeView.Items.Add(nil, Item.Title);
3882 if Item.Item.NewArrival then begin
3883 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3884 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3886 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3887 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3890 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
3891 //
\81¦Item.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
3892 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3893 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3897 TreeView.Items.EndUpdate;
3901 procedure TGikoForm.SelectTreeNode(Item: TObject; CallEvent: Boolean);
3903 ChangeEvent: TTVChangedEvent;
3904 ChangingEvent: TTVChangingEvent;
3908 if Item is TCategory then
3909 bbs := TCategory( Item ).ParenTBBS
3910 else if Item is TBoard then
3911 bbs := TBoard( Item ).ParentCategory.ParenTBBS
3915 if (FTreeType = gtt2ch) and (FActiveBBS = bbs) then begin
3917 ChangingEvent := nil;
3919 if not CallEvent then begin
3920 ChangeEvent := TreeView.OnChange;
3921 ChangingEvent := TreeView.OnChanging;
3924 if not CallEvent then begin
3925 TreeView.OnChange := nil;
3926 TreeView.OnChanging := nil;
3928 //Application.ProcessMessages;
3929 for i := 0 to TreeView.Items.Count - 1 do begin
3930 if TreeView.Items[i].Data = Item then begin
3931 TreeView.Items[i].Selected := True;
3933 TreeClick(TreeView.Items[i]);
3937 //Application.ProcessMessages;
3939 if not CallEvent then begin
3940 TreeView.OnChange := ChangeEvent;
3941 TreeView.OnChanging := ChangingEvent;
3945 if GetActiveList is TBBS then begin
3946 for i := 0 to ListView.Columns.Count - 1 do
3947 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
3948 end else if GetActiveList is TCategory then begin
3949 for i := 0 to ListView.Columns.Count - 1 do
3950 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
3951 end else if GetActiveList is TBoard then begin
3952 for i := 0 to ListView.Columns.Count - 1 do
3953 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
3956 if (Item is TBBS) or (Item is TCategory) then begin
3957 ListView.Columns.Clear;
3958 SetActiveList( Item );
3959 end else if Item is TBoard then begin
3960 if not TBoard( Item ).IsThreadDatRead then begin
3961 Screen.Cursor := crHourGlass;
3963 if not TBoard( Item ).IsThreadDatRead then
3964 GikoSys.ReadSubjectFile(TBoard( Item ));
3966 Screen.Cursor := crDefault;
3969 SetActiveList( Item );
3974 procedure TGikoForm.ListViewMouseDown(Sender: TObject;
3975 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
3977 listItem : TListItem;
3978 threadItem : TThreadItem;
3984 if not (GetActiveList is TBoard) then Exit;
3985 listItem := ListView.GetItemAt( X, Y );
3986 if listItem = nil then Exit;
3987 if not (TObject(listItem.Data) is TThreadItem) then Exit;
3989 threadItem := TThreadItem(ListItem.Data);
3990 InsertBrowserTab(threadItem);
3991 if threadItem.IsLogFile then
3992 ListView.UpdateItems(listItem.Index, listItem.Index);
3995 { if ssDouble in Shift then begin
3996 DoubleClickOccurred[Button] := True;
3998 DoubleClickOccurred[Button] := False;
3999 t := GetTickCount+GetDoubleClickTime;
4000 while GetTickCount < t do begin
4001 Application.ProcessMessages;
4002 if DoubleClickOccurred[Button] then
4007 if ssDouble in Shift then begin
4009 mbLeft: ListDoubleClick;
4022 procedure TGikoForm.ListClick;
4024 ListItem: TListItem;
4025 ThreadItem: TThreadItem;
4027 if ListView.SelCount <> 1 then Exit;
4028 ListItem := ListView.Selected;
4029 if ListItem = nil then Exit;
4030 if not (TObject(ListItem.Data) is TThreadItem) then Exit;
4032 ThreadItem := TThreadItem(ListItem.Data);
4033 if ThreadItem.IsLogFile then begin
4034 // if AddHistory(ThreadItem) then
4035 // SetContent(ThreadItem);
4036 InsertBrowserTab(ListItem.Data);
4037 ListView.UpdateItems(ListItem.Index, ListItem.Index);
4039 // SetContent(ThreadItem);
4040 InsertBrowserTab(ListItem.Data);
4043 if ListView.Selected = nil then
4045 if ListView.Selected.Data = nil then
4047 if TThreadItem( ListView.Selected.Data ).IsLogFile then begin
4048 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4049 if GikoSys.Setting.ListWidthState = glsMin then begin
4050 BrowserMaxAction.Execute;
4051 if GikoForm.Visible then
4055 if GikoSys.Setting.ListHeightState = glsMin then begin
4056 BrowserMaxAction.Execute;
4057 if GikoForm.Visible then
4064 procedure TGikoForm.ListDoubleClick;
4066 ThreadItem: TThreadItem;
4068 // PostMessage(ListView.Handle, WM_CANCELMODE, 0, 0);
4070 if ListView.Selected = nil then Exit;
4071 // if TreeView.Selected = nil then Exit;
4073 if TObject(ListView.Selected.Data) is TCategory then begin
4074 SelectTreeNode(ListView.Selected.Data, True);
4075 // TreeView.Selected.Expanded := True;
4076 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4077 //TreeViewChange(nil, TreeView.Selected);
4078 end else if TObject(ListView.Selected.Data) is TBoard then begin
4079 SelectTreeNode(ListView.Selected.Data, True);
4080 // TreeView.Selected.Expanded := True;
4081 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
4082 //TreeViewChange(nil, TreeView.Selected);
4083 end else if TObject(ListView.Selected.Data) is TThreadItem then begin
4084 //if TObject(ListView.Selected.Data) is TThreadItem then begin
4085 Application.ProcessMessages;
4086 ThreadItem := TThreadItem(ListView.Selected.Data);
4087 DownloadContent(ThreadItem);
4092 procedure TGikoForm.BrowserMovement(AName: string);
4098 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
4100 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
4101 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
4102 Application.ProcessMessages;
4105 // Access Violation
\82ª
\8bN
\82«
\82é
\8e\96\82ª
\82 \82é
\82Ì
\82Å
\8d¡
\8cã
\97v
\83`
\83F
\83b
\83N
4109 item := OleVariant( Browser.Document as IHTMLDocument2).anchors.item(nm);
4111 top := top + item.offsetTop;
4112 item := item.offsetParent;
4113 until AnsiCompareText(item.tagName, 'body' ) = 0;
4115 OleVariant(Browser.Document as IHTMLDocument2).body.scrollTop := top;
4120 procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
4122 if TObject(Node.Data) is TBBS then begin
4123 TBBS(Node.Data).NodeExpand := False;
4124 end else if TObject(Node.Data) is TCategory then begin
4125 TCategory(Node.Data).NodeExpand := False;
4126 end else if TObject(Node.Data) is TBoard then begin
4127 TBoard(Node.Data).NodeExpand := False;
4131 procedure TGikoForm.MessageListViewResize(Sender: TObject);
4133 // MessageListView.Column[0].Width := MessageListView.ClientWidth - 16;
4136 procedure TGikoForm.SelectListItem(List: TList);
4138 // TmpTreeNode: TTreeNode;
4139 TmpListItem: TListItem;
4142 TmpListItem := ListView.Selected;
4143 while TmpListItem <> nil do begin
4144 List.Add(TmpListItem.Data);
4145 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
4150 procedure TGikoForm.ExitActionExecute(Sender: TObject);
4155 procedure TGikoForm.AllSelectActionExecute(Sender: TObject);
4160 procedure TGikoForm.StdToolBarVisibleActionExecute(Sender: TObject);
4162 CoolBand: TCoolBand;
4164 CoolBand := GetCoolBand(MainCoolBar, StdToolBar);
4165 if CoolBand = nil then
4167 GikoSys.Setting.StdToolBarVisible := StdToolBarVisibleAction.Checked;
4168 CoolBand.Visible := GikoSys.Setting.StdToolBarVisible;
4169 // StdToolBar.Visible := StdToolBarVisibleAction.Checked;
4170 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4172 //StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
4173 StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible;
4176 procedure TGikoForm.AddressBarVisibleActionExecute(Sender: TObject);
4178 CoolBand: TCoolBand;
4180 CoolBand := GetCoolBand(MainCoolBar, AddressToolBar);
4181 if CoolBand = nil then
4183 GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked;
4184 CoolBand.Visible := GikoSys.Setting.AddressBarVisible;
4185 //AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
4186 AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible;
4189 procedure TGikoForm.LinkBarVisibleActionExecute(Sender: TObject);
4191 CoolBand: TCoolBand;
4193 CoolBand := GetCoolBand(MainCoolBar, LinkToolBar);
4194 if CoolBand = nil then
4196 GikoSys.Setting.LinkBarVisible := LinkBarVisibleAction.Checked;
4197 CoolBand.Visible := GikoSys.Setting.LinkBarVisible;
4198 //LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
4199 LinkToolBarVisiblePMenu.Checked := GikoSys.Setting.LinkBarVisible;
4202 procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);
4204 CoolBand: TCoolBand;
4206 CoolBand := GetCoolBand(ListCoolBar, ListToolBar);
4207 if CoolBand = nil then
4209 CoolBand.Visible := ListToolBarVisibleAction.Checked;
4210 // ListToolBar.Visible := ListToolBarVisibleAction.Checked;
4211 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4212 GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;
4215 procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);
4217 CoolBand: TCoolBand;
4219 CoolBand := GetCoolBand(ListCoolBar, ListNameToolBar);
4220 if CoolBand = nil then
4222 CoolBand.Visible := ListNameBarVisibleAction.Checked;
4223 GikoSys.Setting.ListNameBarVisible := ListNameBarVisibleAction.Checked;
4226 procedure TGikoForm.BrowserToolBarVisibleActionExecute(Sender: TObject);
4228 CoolBand: TCoolBand;
4230 CoolBand := GetCoolBand(BrowserCoolBar, BrowserToolBar);
4231 if CoolBand = nil then
4233 CoolBand.Visible := BrowserToolBarVisibleAction.Checked;
4234 // BrowserToolBar.Visible := BrowserToolBarVisibleAction.Checked;
4235 GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;
4238 procedure TGikoForm.BrowserNameBarVisibleActionExecute(Sender: TObject);
4240 CoolBand: TCoolBand;
4242 CoolBand := GetCoolBand(BrowserCoolBar, BrowserNameToolBar);
4243 if CoolBand = nil then
4245 CoolBand.Visible := BrowserNameBarVisibleAction.Checked;
4246 GikoSys.Setting.BrowserNameBarVisible := BrowserNameBarVisibleAction.Checked;
4249 procedure TGikoForm.MsgBarVisibleActionExecute(Sender: TObject);
4251 MessageSplitter.Visible := MsgBarVisibleAction.Checked;
4252 MessagePanel.Top := MessageSplitter.Top + MessageSplitter.Height;
4253 MessageSplitter.Top := MessagePanel.Top + 1;
4254 MessagePanel.Visible := MsgBarVisibleAction.Checked;
4255 GikoSys.Setting.MessageBarVisible := MsgBarVisibleAction.Checked;
4258 procedure TGikoForm.StatusBarVisibleActionExecute(Sender: TObject);
4260 StatusBar.Visible := StatusBarVisibleAction.Checked;
4261 GikoSys.Setting.StatusBarVisible := StatusBarVisibleAction.Checked;
4264 procedure TGikoForm.IconStyleExecute(Sender: TObject);
4266 case ListView.ViewStyle of
4267 vsIcon: SmallIconAction.Execute;
4268 vsSmallIcon: ListIconAction.Execute;
4269 vsList: DetailIconAction.Execute;
4270 vsReport: LargeIconAction.Execute;
4274 procedure TGikoForm.LargeIconActionExecute(Sender: TObject);
4276 ListView.ViewStyle := vsIcon;
4277 LargeIconAction.Checked := True;
4280 procedure TGikoForm.SmallIconActionExecute(Sender: TObject);
4282 ListView.ViewStyle := vsSmallIcon;
4283 SmallIconAction.Checked := True;
4286 procedure TGikoForm.ListIconActionExecute(Sender: TObject);
4288 ListView.ViewStyle := vsList;
4289 ListIconAction.Checked := True;
4292 procedure TGikoForm.DetailIconActionExecute(Sender: TObject);
4294 ListView.ViewStyle := vsReport;
4295 DetailIconAction.Checked := True;
4298 procedure TGikoForm.SearchActionExecute(Sender: TObject);
4303 if FSearchDialog = nil then begin
4304 if (GikoForm.GetActiveList is TCategory) or (GikoForm.GetActiveList is TBoard) then
4305 chk := GikoForm.GetActiveList
4309 FSearchDialog := TSearchDialog.Create(Self, chk);
4310 FSearchDialog.SearchComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
4320 procedure TGikoForm.OptionActionExecute(Sender: TObject);
4324 Dlg := TOptionDialog.Create(Self);
4332 procedure TGikoForm.GikoNaviWebPageActionExecute(Sender: TObject);
4334 URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
4336 GikoSys.OpenBrowser(URL_GIKONAVI, gbtAuto);
4339 procedure TGikoForm.MonazillaWebPageActionExecute(Sender: TObject);
4341 URL_MONAZILLA: string = 'http://www.monazilla.org/';
4343 GikoSys.OpenBrowser(URL_MONAZILLA, gbtAuto);
4346 procedure TGikoForm.BBS2chWebPageActionExecute(Sender: TObject);
4348 URL_2ch: string = 'http://www.2ch.net/';
4350 GikoSys.OpenBrowser(URL_2ch, gbtAuto);
4353 procedure TGikoForm.GikoFolderOpenActionExecute(Sender: TObject);
4355 // GikoSys.OpenBrowser(GikoSys.GetAppDir, gbtIE);
4356 GikoSys.CreateProcess('explorer.exe', '/e,"' + GikoSys.GetAppDir + '"');
4359 procedure TGikoForm.AboutActionExecute(Sender: TObject);
4363 Dlg := TAboutDialog.Create(Self);
4371 procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject);
4376 procedure TGikoForm.CabinetVisible( isVisible : Boolean );
4378 TreeSplitter.Visible := isVisible;
4379 CabinetPanel.Visible := isVisible;
4380 CabinetVisibleAction.Checked := isVisible;
4383 procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject);
4386 gttHistory: CabinetHistoryAction.Execute;
4387 gttFavorite: CabinetFavoriteAction.Execute;
4389 CabinetBBSAction.Execute;
4393 procedure TGikoForm.AllItemActionExecute(Sender: TObject);
4396 if ViewType <> gvtAll then
4397 SetListViewType(gvtAll);
4398 AllItemAction.Checked := True;
4399 LogItemAction.Checked := False;
4400 NewItemAction.Checked := False;
4401 //SelectItemAction.Checked := False;
4402 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4404 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4405 if SelectComboBox.Parent <> nil then begin
4406 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4407 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4414 procedure TGikoForm.LogItemActionExecute(Sender: TObject);
4417 if ViewType <> gvtLog then
4418 SetListViewType(gvtLog);
4419 AllItemAction.Checked := False;
4420 LogItemAction.Checked := True;
4421 NewItemAction.Checked := False;
4422 //SelectItemAction.Checked := False;
4423 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4425 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4426 if SelectComboBox.Parent <> nil then begin
4427 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4428 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4435 procedure TGikoForm.NewItemActionExecute(Sender: TObject);
4439 if ViewType <> gvtNew then
4440 SetListViewType(gvtNew);
4441 AllItemAction.Checked := False;
4442 LogItemAction.Checked := False;
4443 NewItemAction.Checked := True;
4444 //SelectItemAction.Checked := False;
4445 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4447 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4448 if SelectComboBox.Parent <> nil then begin
4449 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4450 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4457 procedure TGikoForm.SelectItemActionExecute(Sender: TObject);
4460 Dlg: TListSelectDialog;
4463 if SelectComboBox.Parent <> nil then begin
4464 if SelectComboBox.Left + SelectComboBox.Width < ListToolBar.Width then begin
4465 // SelectComboBox
\82ª
\82 \82é
\8fê
\8d\87\82Í
\83t
\83H
\81[
\83J
\83X
\82ð
\88Ú
\82·
4466 SelectComboBox.SetFocus;
4473 if SelectComboBox.Text = SELECTCOMBOBOX_NAME then begin
4474 SelectComboBox.Text := '';
4475 SelectComboBox.Color := clWindow;
4478 AllItemAction.Checked := False;
4479 LogItemAction.Checked := False;
4480 NewItemAction.Checked := False;
4481 //SelectItemAction.Checked := True;
4483 Dlg := TListSelectDialog.Create(Self);
4485 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
4486 Dlg.SelectComboBox.Text := SelectComboBox.Text;
4488 if Dlg.ModalResult = mrCancel then begin
4489 if Length( SelectComboBox.Text ) = 0 then begin
4490 AllItemAction.Checked := True;
4491 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4492 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4495 if GetActiveList is TBoard then
4496 SetListViewType(gvtUser, TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText , Dlg.KubetsuCheckBox.Checked);
4498 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
4500 GikoSys.Setting.SelectTextList.Delete(idx);
4501 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
4502 while Dlg.SelectComboBox.Items.Count > 100 do begin
4503 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
4506 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
4507 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4508 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4510 SelectComboBox.Text := Dlg.SelectComboBox.Text;
4511 SelectComboBox.Color := clWindow;
4513 SetListViewType(gvtUser, Dlg.SelectComboBox.Text, Dlg.KubetsuCheckBox.Checked);
4520 procedure TGikoForm.ListNumberVisibleActionExecute(Sender: TObject);
4522 GikoSys.Setting.ListViewNo := ListNumberVisibleAction.Checked;
4526 procedure TGikoForm.UpFolderActionExecute(Sender: TObject);
4528 if GetActiveList is TBoard then begin
4529 // if FTreeType = gtt2ch then
4530 SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
4531 //SetActiveList(TBoard(GetActiveList).ParentCategory);
4532 end else if GetActiveList is TCategory then begin
4533 // if FTreeType = gtt2ch then
4534 SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);
4535 //SetActiveList(TCategory(GetActiveList).ParenTBBS);
4537 // if TreeView.Selected = nil then Exit;
4538 // if TreeView.Selected.Level = 0 then Exit;
4539 // TreeView.Selected.Parent.Selected := True;
4542 procedure TGikoForm.RoundActionExecute(Sender: TObject);
4546 Dlg := TRoundDialog.Create(Self);
4554 procedure TGikoForm.StopActionExecute(Sender: TObject);
4556 FControlThread.DownloadAbort;
4557 if FWorkCount <> 0 then FWorkCount := 0;
4559 Animate.Active := False;
4562 Screen.Cursor := crDefault;
4565 procedure TGikoForm.MsgBarCloseActionExecute(Sender: TObject);
4567 // MessagePanel.Visible := False;
4568 // MessageSplitter.Visible := False;
4569 // MsgBarVisibleAction.Checked := False;
4570 MsgBarVisibleAction.Execute;
4573 procedure TGikoForm.BrowserMaxActionExecute(Sender: TObject);
4575 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4576 case GikoSys.Setting.ListWidthState of
4578 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4579 ViewPanel.Width := FBrowserSizeWidth;
4580 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4581 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4582 GikoSys.Setting.ListWidthState := glsNormal;
4584 glsMin, glsNormal: begin
4585 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4586 if GikoSys.Setting.ListWidthState = glsNormal then
4587 FBrowserSizeWidth := ViewPanel.Width;
4588 ViewPanel.Width := 1;
4589 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4590 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4591 GikoSys.Setting.ListWidthState := glsMax;
4595 case GikoSys.Setting.ListHeightState of
4597 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4598 ViewPanel.Height := FBrowserSizeHeight;
4599 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4600 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4601 GikoSys.Setting.ListHeightState := glsNormal;
4603 glsMin, glsNormal: begin
4604 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4605 if GikoSys.Setting.ListHeightState = glsNormal then
4606 FBrowserSizeHeight := ViewPanel.Height;
4607 ViewPanel.Height := 1;
4608 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4609 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4610 GikoSys.Setting.ListHeightState := glsMax;
4614 // Mouse.CursorPos := BrowserSizeButton.ClientToScreen(Point(
4615 // System.Round(BrowserToolBar.ButtonWidth div 2),
4616 // System.Round(BrowserToolBar.ButtonHeight div 2)));
4619 procedure TGikoForm.BrowserMinActionExecute(Sender: TObject);
4621 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4622 case GikoSys.Setting.ListWidthState of
4623 glsMax, glsNormal: begin
4624 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4625 if GikoSys.Setting.ListWidthState = glsNormal then
4626 FBrowserSizeWidth := ViewPanel.Width;
4627 ViewPanel.Width := ThreadMainPanel.Width - 80;
4628 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4629 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4630 GikoSys.Setting.ListWidthState := glsMin;
4633 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4634 ViewPanel.Width := FBrowserSizeWidth;
4635 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4636 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4637 GikoSys.Setting.ListWidthState := glsNormal;
4641 case GikoSys.Setting.ListHeightState of
4642 glsMax, glsNormal: begin
4643 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4644 if GikoSys.Setting.ListHeightState = glsNormal then
4645 FBrowserSizeHeight := ViewPanel.Height;
4646 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
4647 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4648 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4649 GikoSys.Setting.ListHeightState := glsMin;
4652 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4653 ViewPanel.Height := FBrowserSizeHeight;
4654 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4655 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4656 GikoSys.Setting.ListHeightState := glsNormal;
4662 procedure TGikoForm.ScrollTopActionExecute(Sender: TObject);
4664 BrowserMovement('top');
4667 procedure TGikoForm.ScrollLastActionExecute(Sender: TObject);
4669 BrowserMovement('bottom');
4672 procedure TGikoForm.ScrollNewActionExecute(Sender: TObject);
4674 BrowserMovement('new');
4677 procedure TGikoForm.ScrollKokoActionExecute(Sender: TObject);
4679 BrowserMovement('koko');
4682 procedure TGikoForm.EditorActionExecute(Sender: TObject);
4684 Editor: TEditorForm;
4688 Item := GetActiveContent;
4689 if Item = nil then Exit;
4691 if Item.Count >= 1000 then begin
4692 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
4693 + '
\90V
\83X
\83\8c\83b
\83h
\82ð
\92T
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
4694 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin
4698 Editor := TEditorForm.Create(Self);
4699 Editor.SetThreadItem(Item);
4700 GikoSys.LoadEditorKeySetting(Editor.ActionList);
4702 Editor.BodyEdit.SetFocus;
4705 procedure TGikoForm.IEActionExecute(Sender: TObject);
4707 ShowThreadAction.Execute;
4710 procedure TGikoForm.ShowThreadActionExecute(Sender: TObject);
4712 ThreadItem: TThreadItem;
4714 ThreadItem := GetActiveContent;
4715 if ThreadItem = nil then Exit;
4716 GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
4719 procedure TGikoForm.ShowBoardActionExecute(Sender: TObject);
4721 ThreadItem: TThreadItem;
4723 ThreadItem := GetActiveContent;
4724 if ThreadItem = nil then Exit;
4725 GikoSys.OpenBrowser(ThreadItem.ParentBoard.URL, gbtAuto);
4728 //(Thread)URL
\82ð
\83R
\83s
\81[
4729 procedure TGikoForm.URLCopyActionExecute(Sender: TObject);
4734 if TObject(GetActiveContent) is TBoard then
4735 s := s + TBoard(GetActiveContent).URL + #13#10
4736 else if TObject(GetActiveContent) is TThreadItem then
4737 s := s + TThreadItem(GetActiveContent).URL + #13#10;
4739 Clipboard.AsText := s;
4742 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ð
\83R
\83s
\81[
4743 procedure TGikoForm.NameCopyActionExecute(Sender: TObject);
4748 if TObject(GetActiveContent) is TBoard then
4749 s := s + TBoard(GetActiveContent).Title + #13#10
4750 else if TObject(GetActiveContent) is TThreadItem then
4751 s := s + TThreadItem(GetActiveContent).Title + #13#10;
4753 Clipboard.AsText := s;
4756 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ÆURL
\82ð
\83R
\83s
\81[
4757 procedure TGikoForm.NameURLCopyActionExecute(Sender: TObject);
4762 if TObject(GetActiveContent) is TBoard then
4763 s := s + TBoard(GetActiveContent).Title + #13#10 + TBoard(GetActiveContent).URL + #13#10
4764 else if TObject(GetActiveContent) is TThreadItem then
4765 s := s + TThreadItem(GetActiveContent).Title + #13#10 + TThreadItem(GetActiveContent).URL + #13#10;
4767 Clipboard.AsText := s;
4770 procedure TGikoForm.ItemReloadActionExecute(Sender: TObject);
4772 ThreadItem: TThreadItem;
4774 ThreadItem := GetActiveContent;
4775 if ThreadItem <> nil then
4776 DownloadContent(ThreadItem);
4779 procedure TGikoForm.SelectListReloadActionExecute(Sender: TObject);
4785 if GetActiveList is TCategory then begin
4786 List := TList.Create;
4788 SelectListItem(List);
4789 if List.Count > 5 then begin
4790 msg := '5
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
4791 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
4792 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
4795 for i := 0 to List.Count - 1 do begin
4796 if TObject(List[i]) is TBoard then
4797 DownloadList(TBoard(List[i]));
4802 end else if GetActiveList is TBoard then begin
4803 DownloadList(TBoard(GetActiveList));
4807 procedure TGikoForm.SelectThreadReloadActionExecute(Sender: TObject);
4813 List := TList.Create;
4815 SelectListItem(List);
4816 if List.Count > 10 then begin
4817 msg := '10
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
4818 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
4819 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
4822 for i := 0 to List.Count - 1 do begin
4823 if TObject(List[i]) is TThreadItem then
4824 DownloadContent(TThreadItem(List[i]));
4831 procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);
4833 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
4834 SelectListReloadAction.Enabled := True
4835 else if GetActiveList is TBoard then
4836 SelectListReloadAction.Enabled := True
4838 SelectListReloadAction.Enabled := False;
4841 procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);
4843 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
4844 SelectThreadReloadAction.Enabled := True
4846 SelectThreadReloadAction.Enabled := False;
4849 procedure TGikoForm.AllItemActionUpdate(Sender: TObject);
4851 AllItemAction.Enabled := (GetActiveList is TBoard);
4854 procedure TGikoForm.LogItemActionUpdate(Sender: TObject);
4856 LogItemAction.Enabled := (GetActiveList is TBoard);
4859 procedure TGikoForm.NewItemActionUpdate(Sender: TObject);
4861 NewItemAction.Enabled := (GetActiveList is TBoard);
4864 procedure TGikoForm.SelectItemActionUpdate(Sender: TObject);
4866 SelectItemAction.Enabled := (GetActiveList is TBoard);
4869 procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
4871 UpFolderAction.Enabled := not (GetActiveList is TBBS);
4874 procedure TGikoForm.ThreadEditorActionUpdate(Sender: TObject);
4876 ThreadEditorAction.Enabled := (GetActiveList is TBoard);
4879 procedure TGikoForm.FormResize(Sender: TObject);
4883 MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
4884 MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
4886 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4887 if GikoSys.Setting.ListWidthState = glsMin then begin
4888 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4889 ViewPanel.Width := ThreadMainPanel.Width - 80;
4892 if GikoSys.Setting.ListHeightState = glsMin then begin
4893 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4894 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
4898 if FIsMinimize = mtMinimized then begin
4899 if FActiveContent <> nil then begin
4900 doc := Browser.Document;
4901 doc.Body.ScrollTop := FActiveContent.ScrollTop;
4902 FIsMinimize := mtNone;
4906 FIsIgnoreResize := True;
4907 PostMessage( Handle, USER_RESIZED, 0, 0 );
4910 procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject);
4912 ScrollTopAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
4915 procedure TGikoForm.ScrollLastActionUpdate(Sender: TObject);
4917 ScrollLastAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
4920 procedure TGikoForm.ScrollNewActionUpdate(Sender: TObject);
4922 ScrollNewAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
4925 procedure TGikoForm.ScrollKokoActionUpdate(Sender: TObject);
4927 ScrollKokoAction.Enabled := (GetActiveContent <> nil)
4928 and (GetActiveContent.IsLogFile)
4929 and (GetActiveContent.Kokomade <> -1);
4933 procedure TGikoForm.EditorActionUpdate(Sender: TObject);
4935 EditorAction.Enabled := GetActiveContent <> nil;
4938 procedure TGikoForm.IEActionUpdate(Sender: TObject);
4940 IEAction.Enabled := GetActiveContent <> nil;
4943 procedure TGikoForm.ShowThreadActionUpdate(Sender: TObject);
4945 ShowThreadAction.Enabled := GetActiveContent <> nil;
4948 procedure TGikoForm.ShowBoardActionUpdate(Sender: TObject);
4950 ShowBoardAction.Enabled := GetActiveContent <> nil;
4953 procedure TGikoForm.ItemReloadActionUpdate(Sender: TObject);
4955 ItemReloadAction.Enabled := GetActiveContent <> nil;
4958 procedure TGikoForm.URLCopyActionUpdate(Sender: TObject);
4960 URLCopyAction.Enabled := GetActiveContent <> nil;
4963 procedure TGikoForm.NameCopyActionUpdate(Sender: TObject);
4965 NameCopyAction.Enabled := GetActiveContent <> nil;
4968 procedure TGikoForm.NameURLCopyActionUpdate(Sender: TObject);
4970 NameURLCopyAction.Enabled := GetActiveContent <> nil;
4973 procedure TGikoForm.BrowserTabCloseActionUpdate(Sender: TObject);
4975 BrowserTabCloseAction.Enabled := GetActiveContent <> nil;
4978 procedure TGikoForm.NotSelectTabCloseActionUpdate(Sender: TObject);
4980 NotSelectTabCloseAction.Enabled := GetActiveContent <> nil;
4983 procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
4985 AllTabCloseAction.Enabled := GetActiveContent <> nil;
4988 procedure TGikoForm.ActiveLogDeleteActionUpdate(Sender: TObject);
4990 ActiveLogDeleteAction.Enabled := GetActiveContent <> nil;
4993 procedure TGikoForm.ListViewDblClick(Sender: TObject);
4998 procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
5000 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';
5001 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
5003 ThreadItem: TThreadItem;
5004 TmpListItem: TListItem;
5008 List := TList.Create;
5010 TmpListItem := ListView.Selected;
5011 while TmpListItem <> nil do begin
5012 if TObject(TmpListItem.Data) is TThreadItem then begin
5013 ThreadItem := TThreadItem(TmpListItem.Data);
5014 if ThreadItem.IsLogFile then
5015 List.Add(ThreadItem);
5017 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
5020 if GikoSys.Setting.DeleteMsg and (List.Count > 0) then begin
5021 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
5025 for i := 0 to List.Count - 1 do begin
5026 ThreadItem := TThreadItem(List[i]);
5027 DeleteHistory(ThreadItem);
5028 DeleteTab(ThreadItem);
5029 ThreadItem.DeleteLogFile;
5037 procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
5041 FTabHintIndex := -1;
5042 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
5043 if TThreadItem(BrowserTab.Tabs.Objects[i]) = ThreadItem then begin
5044 BrowserTab.Tabs.Delete(i);
5045 if i > (BrowserTab.Tabs.Count - 1) then
5046 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1
5048 BrowserTab.TabIndex := i;
5049 if BrowserTab.Tabs.Count = 0 then
5051 else if BrowserTab.TabIndex <> -1 then
5052 SetContent(TThreadItem(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]));
5058 procedure TGikoForm.KokomadeActionExecute(Sender: TObject);
5061 ThreadItem: TThreadItem;
5066 No := KokoPopupMenu.Tag;
5067 if No = 0 then Exit;
5068 ThreadItem := GetActiveContent;
5069 if ThreadItem = nil then Exit;
5070 ThreadItem.Kokomade := No;
5071 doc := Browser.Document;
5072 ScrollTop := doc.Body.ScrollTop;
5074 GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
5075 // HtmlName := GikoSys.CreateHTML(ThreadItem, sTitle) + '#koko';
5077 // Browser.Navigate(HtmlName, Flags);
5079 Application.ProcessMessages;
5080 doc.Body.ScrollTop := ScrollTop;
5083 procedure TGikoForm.ZenbuActionExecute(Sender: TObject);
5085 ThreadItem: TThreadItem;
5090 ThreadItem := GetActiveContent;
5091 if ThreadItem = nil then Exit;
5092 ThreadItem.Kokomade := -1;
5093 doc := Browser.Document;
5094 ScrollTop := doc.Body.ScrollTop;
5095 GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
5096 // HtmlName := GikoSys.CreateHTML(ThreadItem, sTitle) + '#koko';
5098 // Browser.Navigate(HtmlName, Flags);
5100 Application.ProcessMessages;
5101 doc.Body.ScrollTop := ScrollTop;
5104 function TGikoForm.Hook(var Message: TMessage): Boolean;
5113 procedure TGikoForm.KokoResActionExecute(Sender: TObject);
5115 Editor: TEditorForm;
5120 Number := KokoPopupMenu.Tag;
5121 if Number = 0 then Exit;
5122 Item := GetActiveContent;
5123 if Item = nil then Exit;
5125 if Item.Count >= 1000 then begin
5126 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
5127 + '
\90V
\83X
\83\8c\83b
\83h
\82ð
\92T
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
5128 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin
5132 Editor := TEditorForm.Create(Self);
5133 Editor.SetThreadItem(Item);
5134 Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
5136 Editor.BodyEdit.SetFocus;
5139 procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
5141 ItemRoundPMenu.Visible := (GetActiveList is TBoard);
5142 ItemReservPMenu.Visible := (GetActiveList is TBoard);
5143 LPMSep01.Visible := (GetActiveList is TBoard);
5144 ListRoundPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5145 ListReservPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
5146 LPMSep02.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5147 KidokuPMenu.Visible := (GetActiveList is TBoard);
5148 MidokuPMenu.Visible := (GetActiveList is TBoard);
5149 UrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5150 NameUrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5151 AllSelectPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5152 LPMSep05.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5153 DeletePMenu.Visible := (GetActiveList is TBoard);
5154 LPMSep06.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
5156 BoardFavoriteAddMenu.Visible := (GetActiveList is TCategory);
5157 ThreadFavoriteAddMenu.Visible := (GetActiveList is TBoard);
5159 AddRoundNameMenu(ItemReservPMenu);
5160 AddRoundNameMenu(ListReservPMenu);
5163 procedure TGikoForm.BoardIEActionExecute(Sender: TObject);
5167 if GetActiveList is TBoard then begin
5168 URL := TBoard(GetActiveList).URL;
5169 GikoSys.OpenBrowser(URL, gbtAuto);
5173 procedure TGikoForm.SelectItemURLCopyActionExecute(Sender: TObject);
5180 List := TList.Create;
5182 SelectListItem(List);
5183 for i := 0 to List.Count - 1 do begin
5184 if TObject(List[i]) is TBoard then
5185 s := s + TBoard(List[i]).URL + #13#10
5186 else if TObject(List[i]) is TThreadItem then
5187 s := s + TThreadItem(List[i]).URL + #13#10;
5190 Clipboard.AsText := s;
5196 procedure TGikoForm.SelectItemNameCopyActionExecute(Sender: TObject);
5203 List := TList.Create;
5205 SelectListItem(List);
5206 for i := 0 to List.Count - 1 do begin
5207 if TObject(List[i]) is TBoard then
5208 s := s + TBoard(List[i]).Title + #13#10
5209 else if TObject(List[i]) is TThreadItem then
5210 s := s + TThreadItem(List[i]).Title + #13#10;
5213 Clipboard.AsText := s;
5219 procedure TGikoForm.SelectItemNameURLCopyActionExecute(Sender: TObject);
5226 List := TList.Create;
5228 SelectListItem(List);
5229 for i := 0 to List.Count - 1 do begin
5230 if TObject(List[i]) is TBoard then
5231 s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10
5232 else if TObject(List[i]) is TThreadItem then
5233 s := s + TThreadItem(List[i]).Title + #13#10 + TThreadItem(List[i]).URL + #13#10;
5236 Clipboard.AsText := s;
5242 procedure TGikoForm.BoardIEActionUpdate(Sender: TObject);
5244 if GetActiveList is TBoard then
5245 BoardIEAction.Enabled := True
5247 BoardIEAction.Enabled := False;
5250 procedure TGikoForm.SelectItemURLCopyActionUpdate(Sender: TObject);
5252 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5253 SelectItemURLCopyAction.Enabled := True
5255 SelectItemURLCopyAction.Enabled := False;
5258 procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
5260 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5261 SelectItemNameCopyAction.Enabled := True
5263 SelectItemNameCopyAction.Enabled := False;
5266 procedure TGikoForm.SelectItemNameURLCopyActionUpdate(Sender: TObject);
5268 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5269 SelectItemNameURLCopyAction.Enabled := True
5271 SelectItemNameURLCopyAction.Enabled := False;
5274 procedure TGikoForm.AllSelectActionUpdate(Sender: TObject);
5276 if ListView.SelCount > 0 then
5277 AllSelectAction.Enabled := True
5279 AllSelectAction.Enabled := False;
5282 procedure TGikoForm.LogDeleteActionUpdate(Sender: TObject);
5284 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5285 LogDeleteAction.Enabled := True
5287 LogDeleteAction.Enabled := False;
5290 procedure TGikoForm.BrowserTabCloseActionExecute(Sender: TObject);
5293 ThreadItem: TThreadItem;
5295 idx := BrowserTab.TabIndex;
5296 if idx <> -1 then begin
5297 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5298 DeleteTab(ThreadItem);
5302 procedure TGikoForm.NotSelectTabCloseActionExecute(Sender: TObject);
5306 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
5307 if BrowserTab.TabIndex <> i then begin
5308 BrowserTab.Tabs.Delete(i);
5313 procedure TGikoForm.AllTabCloseActionExecute(Sender: TObject);
5317 for i := BrowserTab.Tabs.Count - 1 downto 0 do
5318 BrowserTab.Tabs.Delete(i);
5322 procedure TGikoForm.TreeSelectBoradReloadExecute(Sender: TObject);
5325 TmpTreeNode: TTreeNode;
5327 TmpTreeNode := FClickNode;
5328 TreeView.Selected := FClickNode;
5331 if TObject(TmpTreeNode.Data) is TBoard then
5332 Board := TBoard(TmpTreeNode.Data)
5333 else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then
5334 Board := TFavoriteBoardItem(TmpTreeNode.Data).Item;
5336 if Board <> nil then
5337 DownloadList(Board);
5340 procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject);
5342 ThreadItem: TThreadItem;
5343 TmpTreeNode: TTreeNode;
5345 TmpTreeNode := FClickNode;
5346 TreeView.Selected := FClickNode;
5349 if TObject(TmpTreeNode.Data) is TThreadItem then
5350 ThreadItem := TThreadItem(TmpTreeNode.Data)
5351 else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then
5352 ThreadItem := TFavoriteThreadItem(TmpTreeNode.Data).Item;
5354 if ThreadItem <> nil then
5355 DownloadContent(ThreadItem);
5358 procedure TGikoForm.TreeSelectURLCopyExecute(Sender: TObject);
5360 TmpTreeNode: TTreeNode;
5363 TmpTreeNode := FClickNode;
5364 TreeView.Selected := FClickNode;
5365 if TObject(TmpTreeNode.Data) is TBoard then begin
5366 s := TBoard(TmpTreeNode.Data).URL + #13#10;
5367 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5368 s := TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5369 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5370 s := TThreadItem(TmpTreeNode.Data).URL + #13#10;
5371 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5372 s := TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5374 Clipboard.AsText := s;
5377 procedure TGikoForm.TreeSelectNameURLCopyExecute(Sender: TObject);
5379 TmpTreeNode: TTreeNode;
5382 TmpTreeNode := FClickNode;
5383 TreeView.Selected := FClickNode;
5384 if TObject(TmpTreeNode.Data) is TBoard then begin
5385 s := TBoard(TmpTreeNode.Data).Title + #13#10 + TBoard(TmpTreeNode.Data).URL + #13#10;
5386 end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin
5387 s := TFavoriteBoardItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10;
5388 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5389 s := TThreadItem(TmpTreeNode.Data).Title + #13#10 + TThreadItem(TmpTreeNode.Data).URL + #13#10;
5390 end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin
5391 s := TFavoriteThreadItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10;
5393 Clipboard.AsText := s;
5396 procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
5398 FClickNode := TreeView.Selected;
5399 if FClickNode = nil then begin
5400 TreeSelectThreadPupupMenu.Visible := False;
5401 TreeSelectBoardPupupMenu.Visible := False;
5402 TPMSep01.Visible := False;
5403 TreeSelectURLPupupMenu.Visible := False;
5404 TreeSelectNamePupupMenu.Visible := False;
5405 TreeSelectNameURLPupupMenu.Visible := False;
5406 TreeSelectFavoriteAddPupupMenu.Visible := False;
5407 TreeSelectLogDeleteSeparator.Visible := False;
5408 TreeSelectLogDeletePopupMenu.Visible := False;
5409 end else if TObject(FClickNode.Data) is TBoard 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 TFavoriteBoardItem then begin
5420 TreeSelectThreadPupupMenu.Visible := False;
5421 TreeSelectBoardPupupMenu.Visible := True;
5422 TPMSep01.Visible := True;
5423 TreeSelectURLPupupMenu.Visible := True;
5424 TreeSelectNamePupupMenu.Visible := True;
5425 TreeSelectNameURLPupupMenu.Visible := True;
5426 TreeSelectFavoriteAddPupupMenu.Visible := True;
5427 TreeSelectLogDeleteSeparator.Visible := False;
5428 TreeSelectLogDeletePopupMenu.Visible := False;
5429 end else if (TObject(FClickNode.Data) is TThreadItem) 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 TFavoriteThreadItem) then begin
5440 TreeSelectThreadPupupMenu.Visible := True;
5441 TreeSelectBoardPupupMenu.Visible := False;
5442 TPMSep01.Visible := True;
5443 TreeSelectURLPupupMenu.Visible := True;
5444 TreeSelectNamePupupMenu.Visible := True;
5445 TreeSelectNameURLPupupMenu.Visible := True;
5446 TreeSelectFavoriteAddPupupMenu.Visible := True;
5447 TreeSelectLogDeleteSeparator.Visible := True;
5448 TreeSelectLogDeletePopupMenu.Visible := True;
5449 end else if (TObject(FClickNode.Data) is TCategory) 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;
5459 end else if FClickNode.IsFirstNode then begin
5460 TreeSelectThreadPupupMenu.Visible := False;
5461 TreeSelectBoardPupupMenu.Visible := False;
5462 TPMSep01.Visible := False;
5463 TreeSelectURLPupupMenu.Visible := False;
5464 TreeSelectNamePupupMenu.Visible := True;
5465 TreeSelectNameURLPupupMenu.Visible := False;
5466 TreeSelectFavoriteAddPupupMenu.Visible := False;
5467 TreeSelectLogDeleteSeparator.Visible := False;
5468 TreeSelectLogDeletePopupMenu.Visible := False;
5470 TreeSelectThreadPupupMenu.Visible := False;
5471 TreeSelectBoardPupupMenu.Visible := False;
5472 TPMSep01.Visible := False;
5473 TreeSelectURLPupupMenu.Visible := False;
5474 TreeSelectNamePupupMenu.Visible := False;
5475 TreeSelectNameURLPupupMenu.Visible := False;
5476 TreeSelectFavoriteAddPupupMenu.Visible := False;
5477 TreeSelectLogDeleteSeparator.Visible := False;
5478 TreeSelectLogDeletePopupMenu.Visible := False;
5482 procedure TGikoForm.BrowserNewWindow2(Sender: TObject;
5483 var ppDisp: IDispatch; var Cancel: WordBool);
5492 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
5493 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
5494 Html := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
5496 URL := GikoSys.GetHRefText(Html);
5497 URL := GikoSys.HTMLDecode(URL);
5499 //
\83A
\83h
\83\8c\83X
\83o
\81[
\82Ì
\97\9a\97ð
5500 if GikoSys.Setting.LinkAddAddressBar then begin
5501 idx := AddressComboBox.Items.IndexOf(URL);
5502 if idx = -1 then begin
5503 AddressComboBox.Items.Insert(0, URL);
5504 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
5505 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
5507 AddressComboBox.Items.Delete(idx);
5508 AddressComboBox.Items.Insert(0, URL);
5515 { ShiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5516 CtrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
5519 Memo1.Lines.Add('ShiftDown');
5521 Memo1.Lines.Add('CtrlDown');
5523 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
5524 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
5525 Url := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
5529 URL := GetHRefText(URL);
5531 ParseURI(URL, Protocol, Host, path, Document, Port, Bookmark);
5533 b := Parse2chURL(path, document, bbs, num);
5534 memo1.Lines.Add('bbs: ' + bbs);
5535 memo1.Lines.Add('key: ' + num);
5537 Memo1.Lines.Add('Parse2chURL: True')
5539 Memo1.Lines.Add('Parse2chURL: False');
5541 // AppPath := 'C:\Borland\Projects\Test\TestBrowser\TestBrowser.exe';
5546 procedure TGikoForm.ListSplitterCanResize(Sender: TObject;
5547 var NewSize: Integer; var Accept: Boolean);
5549 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5550 if ViewPanel.Width < 2 then begin
5551 ViewPanel.Width := 1;
5552 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5553 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5554 GikoSys.Setting.ListWidthState := glsMax;
5555 end else if ViewPanel.Width > (ThreadMainPanel.Width - 80) then begin
5556 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5557 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5558 GikoSys.Setting.ListWidthState := glsMin;
5560 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5561 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5562 GikoSys.Setting.ListWidthState := glsNormal;
5565 if ViewPanel.Height < 2 then begin
5566 ViewPanel.Height := 1;
5567 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5568 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5569 GikoSys.Setting.ListHeightState := glsMax;
5570 end else if ViewPanel.Height > (ThreadMainPanel.Height - BrowserCoolBar.Height - 7) then begin
5571 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5572 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5573 GikoSys.Setting.ListHeightState := glsMin;
5575 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5576 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5577 GikoSys.Setting.ListHeightState := glsNormal;
5582 procedure TGikoForm.ListSplitterMoved(Sender: TObject);
5584 if Mouse.Capture <> 0 then
5586 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5587 if (ViewPanel.Width > 1) and (ViewPanel.Width <= (ThreadMainPanel.Width - 80)) then
5588 FBrowserSizeWidth := ViewPanel.Width;
5590 if (ViewPanel.Height > 1) and (ViewPanel.Height <= (ThreadMainPanel.Height - BrowserCoolBar.Height)) then
5591 FBrowserSizeHeight := ViewPanel.Height;
5593 { if (Mouse.Capture = 0) and (ViewPanel.Height > 1) and (not ArrangeAction.Checked) then
5594 FBrowserSizeHeight := ViewPanel.Height
5595 else if (Mouse.Capture = 0) and (ViewPanel.Width > 1) and (ArrangeAction.Checked) then
5596 FBrowserSizeWidth := ViewPanel.Width;}
5599 procedure TGikoForm.BrowserTabChange(Sender: TObject);
5602 ThreadItem: TThreadItem;
5605 // if NewTab = -1 then
5606 if not BrowserTab.Dragging then begin
5607 FTabHintIndex := -1;
5608 BrowserTab.Hint := '';
5609 idx := BrowserTab.TabIndex;
5610 if idx = -1 then begin
5611 SetContent(BrowserNullTab);
5612 end else if BrowserTab.Tabs.Objects[idx] is TThreadItem then begin
5613 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5614 SetContent(ThreadItem);
5615 if GikoSys.Setting.URLDisplay then
5616 AddressComboBox.Text := ThreadItem.URL;
5619 if ThreadItem = nil then Exit;
5620 if ThreadItem.IsLogFile then begin
5621 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5622 if GikoSys.Setting.ListWidthState = glsMin then begin
5623 BrowserMaxAction.Execute;
5624 if GikoForm.Visible then
5628 if GikoSys.Setting.ListHeightState = glsMin then begin
5629 BrowserMaxAction.Execute;
5630 if GikoForm.Visible then
5639 procedure TGikoForm.BrowserTabClick(Sender: TObject);
5642 ThreadItem: TThreadItem;
5644 // if NewTab = -1 then
5645 FTabHintIndex := -1;
5646 BrowserTab.Hint := '';
5647 idx := BrowserTab.TabIndex;
5649 SetContent(BrowserNullTab)
5650 else if BrowserTab.Tabs.Objects[idx] is TThreadItem then begin
5651 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5652 SetContent(ThreadItem);
5653 if GikoSys.Setting.URLDisplay then
5654 AddressComboBox.Text := ThreadItem.URL;
5658 procedure TGikoForm.BrowserTabMouseDown(Sender: TObject;
5659 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
5666 if Button = mbMiddle then begin
5667 //
\83}
\83E
\83X
\92\86\83{
\83^
\83\93
5670 p := BrowserTab.ScreenToClient(p);
5671 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
5672 if idx <> -1 then begin
5673 OldIndex := BrowserTab.TabIndex;
5674 BrowserTab.Tabs.Delete(idx);
5675 if idx = OldIndex then begin
5676 if BrowserTab.Tabs.Count > idx then
5677 BrowserTab.TabIndex := idx
5678 else if BrowserTab.Tabs.Count = idx then
5679 BrowserTab.TabIndex := idx - 1
5680 else if BrowserTab.Tabs.Count > 0 then
5681 BrowserTab.TabIndex := 0;
5682 BrowserTab.OnChange(nil);
5685 //end else if Button = mbRight then begin
5686 //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é
5687 //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
5688 { //
\83}
\83E
\83X
\89E
\83{
\83^
\83\93
5691 // GetCursorPos(p2);
5692 p := BrowserTab.ScreenToClient(p);
5693 // idx := BrowserTab.ItemAtPos(p);
5694 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
5695 if idx <> -1 then begin
5696 OldIndex := BrowserTab.TabIndex;
5697 BrowserTab.TabIndex := idx;
5698 if OldIndex <> idx then
5699 BrowserTab.OnChange(nil);
5700 BrowserTabPopupMenu.Tag := idx;
5701 BrowserTabPopupMenu.Popup(p2.X, p2.Y);
5704 end else if BUtton = mbLeft then begin
5705 FDragWFirst := true;
5706 FMouseDownPos.X := X;
5707 FMouseDownPos.Y := Y;
5712 procedure TGikoForm.SetBrowserTabState;
5715 CoolBand: TCoolBand;
5717 BrowserBottomPanel.AutoSize := False;
5718 if GikoSys.Setting.BrowserTabVisible then begin
5719 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
5720 BrowserTab.Style := tsTabs;
5721 if GikoSys.Setting.BrowserTabPosition = gtpTop then
5722 BrowserTab.TabPosition := tpTop
5724 BrowserTab.TabPosition := tpBottom;
5725 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
5726 BrowserTab.TabPosition := tpTop;
5727 BrowserTab.Style := tsButtons;
5729 BrowserTab.TabPosition := tpTop;
5730 BrowserTab.Style := tsFlatButtons
5733 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
5734 BrowserTab.Parent := BrowserTabToolBar;
5735 BrowserBottomPanel.Hide;
5736 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
5737 if CoolBand <> nil then
5738 CoolBand.Visible := True;
5739 // BrowserTab.Parent := BrowserTopPanel;
5740 // BrowserTab.Parent := BrowserCoolBar;
5741 // BrowserTab.Top := 26;
5742 // BrowserTopPanel.Height := 44;
5745 BrowserTab.Parent := BrowserBottomPanel;
5746 BrowserTab.Top := 0;
5747 BrowserTab.Left := 0;
5748 BrowserBottomPanel.Show;
5749 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
5750 if CoolBand <> nil then
5751 CoolBand.Visible := False;
5752 // BrowserTopPanel.Height := 26;
5756 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
5757 if CoolBand <> nil then
5758 CoolBand.Visible := False;
5759 BrowserBottomPanel.Visible := False;
5760 // BrowserTab.Visible := False;
5761 // BrowserTopPanel.Height := 26;
5765 procedure TGikoForm.BrowserTabDragOver(Sender, Source: TObject; X,
5766 Y: Integer; State: TDragState; var Accept: Boolean);
5770 idx := BrowserTab.IndexOfTabAt(X, Y);
5771 Accept := (Source = BrowserTab) and (BrowserTab.TabIndex <> idx);
5774 procedure TGikoForm.BrowserTabDragDrop(Sender, Source: TObject; X,
5779 idx := BrowserTab.IndexOfTabAt(X, Y);
5781 BrowserTab.Tabs.Move(BrowserTab.TabIndex, idx);
5784 procedure TGikoForm.BrowserTabMouseMove(Sender: TObject;
5785 Shift: TShiftState; X, Y: Integer);
5788 ThreadItem: TThreadItem;
5791 TabIdx := BrowserTab.IndexOfTabAt(x, y);
5793 if ( ssLeft in Shift ) and ( BrowserTab.Style = tsTabs ) then begin
5794 if FDragWFirst = false then begin
5795 FDragWFirst := true;
5797 BrowserTab.EndDrag(false);
5798 BrowserTab.BeginDrag(false, DandD_THRESHOLD);
5799 FDragWFirst := false;
5802 BrowserTab.EndDrag(false);
5803 FDragWFirst := false;
5806 if (FTabHintIndex <> TabIdx) and (TabIdx <> -1) then begin
5807 Application.CancelHint;
5808 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[TabIdx]);
5809 if ThreadItem.Title <> BrowserTab.Tabs[TabIdx] then begin
5810 BrowserTab.Hint := ThreadItem.Title;
5811 Application.ShowHint := True;
5813 BrowserTab.Hint := '';
5814 Application.ShowHint := True;
5816 FTabHintIndex := TabIdx;
5821 procedure TGikoForm.BrowserDocumentComplete(Sender: TObject;
5822 const pDisp: IDispatch; var URL: OleVariant);
5824 FDispHtmlDocument: DispHTMLDocument;
5826 // AddMessageList('DocumentComplete', nil);
5827 FBrowserComplete := True;
5828 if FEvent <> nil then
5830 FDispHtmlDocument := Browser.Document as DispHTMLDocument;
5831 FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
5832 FEvent.OnContextMenu := OnDocumentContextMenu;
5836 procedure TGikoForm.SelectReservActionUpdate(Sender: TObject);
5841 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then begin
5842 List := TList.Create;
5844 SelectListItem(List);
5845 for i := 0 to List.Count - 1 do begin
5846 if TObject(List[i]) is TThreadItem then begin
5847 if TThreadItem(List[i]).IsLogFile then begin
5848 SelectReservAction.Enabled := True;
5853 SelectReservAction.Enabled := False;
5857 end else if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
5858 SelectReservAction.Enabled := True
5860 SelectReservAction.Enabled := False;
5863 procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
5865 AddRoundNameMenu(RoundNamePopupMenu.Items);
5868 procedure TGikoForm.AddRoundNameMenu(MenuItem: TMenuItem);
5874 Item := TMenuItem.Create(Self);
5875 Item.Caption := '
\90V
\82µ
\82¢
\96¼
\91O
\82Å
\8f\84\89ñ
\97\
\96ñ(&N)...';
5876 Item.OnClick := SelectNewRoundNameExecute;
5878 Item := TMenuItem.Create(Self);
5879 Item.Caption := '
\8f\84\89ñ
\83\8a\83X
\83g
\82©
\82ç
\8dí
\8f\9c(&D)';
5880 Item.OnClick := SelectDeleteRoundExecute;
5882 Item := TMenuItem.Create(Self);
5883 Item.Caption := '-';
5885 for i := 0 to RoundList.RoundNameList.Count - 1 do begin
5886 Item := TMenuItem.Create(Self);
5887 Item.Caption := RoundList.RoundNameList[i];
5888 Item.OnClick := SetSelectRoundName;
5893 procedure TGikoForm.SelectNewRoundNameExecute(Sender: TObject);
5896 Dlg: TRoundNameDialog;
5899 Dlg := TRoundNameDialog.Create(Self);
5902 if Dlg.ModalResult <> mrCancel then begin
5903 s := Trim(Dlg.RoundNameEdit.Text);
5904 RoundList.RoundNameList.Add(s);
5905 SetSelectItemRound(True, s, TMenuItem(Sender).Parent.Name);
5912 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string);
5914 threadItem : TThreadItem;
5916 if ParentName <> 'dummy1' then begin
5917 SetSelectItemRound(RoundFlag, RoundName);
5919 threadItem := GetActiveContent;
5920 if threadItem <> nil then begin
5921 threadItem.RoundName := RoundName;
5922 threadItem.Round := RoundFlag;
5927 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
5932 List := TList.Create;
5934 SelectListItem(List);
5935 for i := 0 to List.Count - 1 do begin
5936 if TObject(List[i]) is TBoard then begin
5937 TBoard(List[i]).RoundName := RoundName;
5938 TBoard(List[i]).Round := RoundFlag;
5939 end else if TObject(List[i]) is TThreadItem then begin
5940 if TThreadItem(List[i]).IsLogFile then begin
5941 TThreadItem(List[i]).RoundName := RoundName;
5942 TThreadItem(List[i]).Round := RoundFlag;
5951 procedure TGikoForm.SelectDeleteRoundExecute(Sender: TObject);
5953 SetSelectItemRound(False, '', TMenuItem(Sender).Parent.Name);
5957 procedure TGikoForm.SelectReservActionExecute(Sender: TObject);
5959 //
\82±
\82Ì
\83R
\83\81\83\93\83g
\8dí
\8f\9c\82µ
\82Ä
\82Í
\91Ê
\96Ú
5962 procedure TGikoForm.SetSelectRoundName(Sender: TObject);
5964 MenuItem: TMenuItem;
5966 if Sender is TMenuItem then begin
5967 MenuItem := TMenuItem(Sender);
5968 SetSelectItemRound(True, StripHotKey(MenuItem.Caption), TMenuItem(Sender).Parent.Name);
5973 procedure TGikoForm.NewBoardActionExecute(Sender: TObject);
5975 Dlg: TNewBoardDialog;
5979 for i := 0 to Screen.CustomFormCount - 1 do begin
5980 if TObject(Screen.CustomForms[i]) is TEditorForm then begin
5981 Msg := '
\83\8c\83X
\83G
\83f
\83B
\83^
\82ð
\91S
\82Ä
\95Â
\82¶
\82Ä
\82
\82¾
\82³
\82¢';
5982 MsgBox(Handle, Msg, '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
5986 Dlg := TNewBoardDialog.Create(Self);
5994 procedure TGikoForm.LoginActionExecute(Sender: TObject);
5999 if GikoSys.Dolib.Connected then begin
6000 //
\83\8d\83O
\83A
\83E
\83g
6001 GikoSys.Dolib.Disconnect;
6002 LoginAction.Checked := False;
6003 AddMessageList('
\83\8d\83O
\83A
\83E
\83g
\82µ
\82Ü
\82µ
\82½', nil, gmiOK);
6004 LoginAction.Caption := '
\83\8d\83O
\83C
\83\93(&L)';
6006 TmpCursor := Screen.Cursor;
6007 Screen.Cursor := crHourGlass;
6009 //
\92Ê
\8fí
\83\8d\83O
\83C
\83\93
6010 if not GikoSys.Setting.ForcedLogin then begin
6011 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6012 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6013 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6014 if GikoSys.Setting.ReadProxy then begin
6015 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6016 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6018 GikoSys.Dolib.ProxyAddress := '';
6019 GikoSys.Dolib.ProxyPort := 0;
6021 if GikoSys.Dolib.Connect then begin
6022 LoginAction.Checked := True;
6023 AddMessageList('
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6024 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6025 LoginToolButton.Style := tbsCheck;
6027 // 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);
6028 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6030 LoginAction.Checked := False;
6031 LoginToolButton.Down := False;
6032 LoginToolButton.Style := tbsButton;
6035 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
6036 + '
\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
6037 + '
\82±
\82Ì
\83\82\81[
\83h
\82Å
\83\8d\83O
\83C
\83\93\82ð
\8e\8e\82Ý
\82Ü
\82·
\82©
\81H' + #13#10;
6038 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) = IDYES then begin
6039 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
6040 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
6041 GikoSys.Dolib.Password := GikoSys.Setting.Password;
6042 if GikoSys.Setting.ReadProxy then begin
6043 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
6044 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
6046 GikoSys.Dolib.ProxyAddress := '';
6047 GikoSys.Dolib.ProxyPort := 0;
6049 //SSL
\8fá
\8aQ
\97p
\8b
\90§
\83\8d\83O
\83C
\83\93
6050 GikoSys.Dolib.ForcedConnect;
6051 if GikoSys.Dolib.Connect then begin
6052 LoginAction.Checked := True;
6053 AddMessageList('
\8b
\90§
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
6054 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
6055 LoginToolButton.Style := tbsCheck;
6057 // 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);
6058 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
6060 LoginAction.Checked := False;
6061 LoginToolButton.Down := False;
6062 LoginToolButton.Style := tbsButton;
6065 LoginAction.Checked := False;
6066 LoginToolButton.Down := False;
6067 LoginToolButton.Style := tbsButton;
6071 Screen.Cursor := TmpCursor;
6076 procedure TGikoForm.KeySettingActionExecute(Sender: TObject);
6078 Dlg: TKeySettingForm;
6080 Dlg := TKeySettingForm.Create(Self);
6082 if Dlg.ShowModal = mrOk then
6083 GikoSys.SaveKeySetting(ActionList);
6084 GikoSys.SaveEditorKeySetting(Dlg.EditorForm.ActionList);
6090 procedure TGikoForm.ArrangeActionExecute(Sender: TObject);
6092 if ArrangeAction.Checked then begin
6094 ViewPanel.Align := alNone;
6095 ListSplitter.Align := alNone;
6096 ThreadPanel.Align := alNone;
6098 ViewPanel.Width := FBrowserSizeWidth;
6099 ViewPanel.Align := alLeft;
6101 ListSplitter.Width := 5;
6102 ListSplitter.Align := alLeft;
6104 ViewPanel.Left := -10;
6106 ThreadPanel.Align := alClient;
6108 GikoSys.Setting.ListOrientation := gloHorizontal;
6109 case GikoSys.Setting.ListWidthState of
6111 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6112 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6113 ViewPanel.Width := 1;
6116 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6117 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
6120 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6121 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
6122 ViewPanel.Width := ThreadMainPanel.Width - 80;
6127 ViewPanel.Align := alNone;
6128 ListSplitter.Align := alNone;
6129 ThreadPanel.Align := alNone;
6131 ViewPanel.Height := FBrowserSizeHeight;
6132 ViewPanel.Align := alTop;
6134 ListSplitter.Height := 5;
6135 ListSplitter.Align := alTop;
6137 ViewPanel.Top := -10;
6139 ThreadPanel.Align := alClient;
6140 GikoSys.Setting.ListOrientation := gloVertical;
6141 case GikoSys.Setting.ListHeightState of
6143 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6144 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6145 ViewPanel.Height := 1;
6148 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6149 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
6152 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6153 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
6154 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
6161 procedure TGikoForm.PaneInitActionExecute(Sender: TObject);
6163 CabinetPanel.Width := 150;
6164 MessagePanel.Height := 40;
6166 FBrowserSizeWidth := 200;
6167 FBrowserSizeHeight := 200;
6168 if ArrangeAction.Checked then begin
6169 ViewPanel.Width := FBrowserSizeWidth;
6171 ViewPanel.Height := FBrowserSizeHeight;
6173 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6174 if GikoSys.Setting.ListHeightState = glsMax then begin
6175 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
6176 GikoSys.Setting.ListHeightState := glsNormal;
6179 if GikoSys.Setting.ListWidthState = glsMax then begin
6180 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
6181 GikoSys.Setting.ListWidthState := glsNormal;
6186 procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
6188 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';
6189 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
6192 ThreadItem: TThreadItem;
6194 idx := BrowserTab.TabIndex;
6195 if idx <> -1 then begin
6196 if GikoSys.Setting.DeleteMsg then
6197 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
6199 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
6200 DeleteTab(ThreadItem);
6201 ThreadItem.DeleteLogFile;
6202 if ThreadItem.ParentBoard = FActiveList then
6207 function TGikoForm.GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
6212 if CoolBar = nil then
6214 for i := 0 to CoolBar.Bands.Count - 1 do begin
6215 if CoolBar.Bands[i].Control = Control then begin
6216 Result := CoolBar.Bands[i];
6222 procedure TGikoForm.BrowserTabToolBarResize(Sender: TObject);
6224 if BrowserTab.Parent = BrowserTabToolBar then
6225 BrowserTab.Width := BrowserTabToolBar.Width;
6228 procedure TGikoForm.SelectTextClearActionExecute(Sender: TObject);
6230 GikoSys.Setting.SelectTextList.Clear;
6231 SelectComboBox.Items.Clear;
6232 SelectComboBox.Text := '';
6233 SetListViewType( gvtAll );
6236 procedure TGikoForm.NameTextClearActionExecute(Sender: TObject);
6240 GikoSys.Setting.NameList.Clear;
6241 for i := 0 to Screen.CustomFormCount - 1 do begin
6242 if TObject(Screen.CustomForms[i]) is TEditorForm then
6243 TEditorForm(Screen.CustomForms[i]).NameComboBox.Items.Clear;
6247 procedure TGikoForm.MailTextClearActionExecute(Sender: TObject);
6251 GikoSys.Setting.MailList.Clear;
6252 for i := 0 to Screen.CustomFormCount - 1 do begin
6253 if TObject(Screen.CustomForms[i]) is TEditorForm then
6254 TEditorForm(Screen.CustomForms[i]).MailComboBox.Items.Clear;
6258 procedure TGikoForm.LeftmostTabSelectActionExecute(Sender: TObject);
6260 if BrowserTab.Tabs.Count > 0 then begin
6261 BrowserTab.TabIndex := 0;
6262 BrowserTab.OnChange(nil);
6266 procedure TGikoForm.LeftTabSelectActionExecute(Sender: TObject);
6268 if BrowserTab.Tabs.Count > 0 then begin
6269 if BrowserTab.TabIndex = -1 then begin
6270 BrowserTab.TabIndex := 0;
6271 BrowserTab.OnChange(nil);
6272 end else if BrowserTab.TabIndex > 0 then begin
6273 BrowserTab.TabIndex := BrowserTab.TabIndex - 1;
6274 BrowserTab.OnChange(nil);
6279 procedure TGikoForm.RightTabSelectActionExecute(Sender: TObject);
6281 if BrowserTab.Tabs.Count > 0 then begin
6282 if BrowserTab.TabIndex = -1 then begin
6283 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6284 BrowserTab.OnChange(nil);
6285 end else if BrowserTab.TabIndex < (BrowserTab.Tabs.Count - 1) then begin
6286 BrowserTab.TabIndex := BrowserTab.TabIndex + 1;
6287 BrowserTab.OnChange(nil);
6292 procedure TGikoForm.RightmostTabSelectActionExecute(Sender: TObject);
6294 if BrowserTab.Tabs.Count > 0 then begin
6295 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
6296 BrowserTab.OnChange(nil);
6300 procedure TGikoForm.LeftmostTabSelectActionUpdate(Sender: TObject);
6302 LeftmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6305 procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
6307 LeftTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
6310 procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);
6312 RightTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6315 procedure TGikoForm.RightmostTabSelectActionUpdate(Sender: TObject);
6317 RightmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
6320 procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
6325 procedure TGikoForm.SetMenuFont;
6327 // GikoSys.MenuFont(MenuToolBar.Font);
6328 // MenuToolBar.Buttons[0].AutoSize := False;
6329 // MenuToolBar.Buttons[0].AutoSize := True;
6330 // MenuToolBar.Font.Color := clMenuText;
6331 GikoSys.MenuFont(MainCoolBar.Font);
6332 MenuToolBar.Buttons[0].AutoSize := False;
6333 MenuToolBar.Buttons[0].AutoSize := True;
6334 MainCoolBar.AutoSize := False;
6335 MainCoolBar.AutoSize := True;
6337 GikoSys.MenuFont(ListCoolBar.Font);
6338 GikoSys.MenuFont(BrowserCoolBar.Font);
6339 // MenuToolBar.Font.Color := clMenuText;
6342 procedure TGikoForm.FavoriteMenuClick(Sender: TObject);
6348 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\92Ç
\89Á
6349 NewMenu := TMenuItem.Create(MainMenu);
6350 NewMenu.Action := FavoriteAddAction;
6351 FavoriteMenu.Add(NewMenu);
6352 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\90®
\97\9d
6353 NewMenu := TMenuItem.Create(FavoriteMenu);
6354 NewMenu.Action := FavoriteArrangeAction;
6355 FavoriteMenu.Add(NewMenu);
6356 //
\83Z
\83p
\83\8c\81[
\83^
6357 NewMenu := TMenuItem.Create(FavoriteMenu);
6358 NewMenu.Caption := '-';
6359 FavoriteMenu.Add(NewMenu);
6361 CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
6364 procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
6369 for i := 0 to Node.Count - 1 do begin
6370 NewMenu := TFavoriteMenuItem.Create(Self);
6371 NewMenu.AutoHotkeys := maAutomatic;
6372 NewMenu.Caption := CustomStringReplace(Node.Item[i].Text, '&', '&&');
6373 TFavoriteMenuItem(NewMenu).Data := Node.Item[i].Data;
6374 MenuItem.Add(NewMenu);
6376 if TObject(Node.Item[i].Data) is TFavoriteFolder then begin
6377 NewMenu.ImageIndex := TOOL_ICON_FAV_FOLDER;
6378 CreateFavMenu(Node.Item[i], NewMenu);
6379 end else if TObject(Node.Item[i].Data) is TFavoriteBoardItem then begin
6380 NewMenu.ImageIndex := TOOL_ICON_FAV_BOARD;
6381 NewMenu.OnClick := FavoriteClick;
6382 end else if TObject(Node.Item[i].Data) is TFavoriteThreadItem then begin
6383 NewMenu.ImageIndex := TOOL_ICON_FAV_THREAD;
6384 NewMenu.OnClick := FavoriteClick;
6389 procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
6391 Dlg : TFavoriteAddDialog;
6393 Items : ^TTreeNodes;
6398 Items := @(FavoriteTreeView.Items);
6399 if Item is TFavoriteBoardItem then
6400 Item := TFavoriteBoardItem( Item ).Item
6401 else if Item is TFavoriteThreadItem then
6402 Item := TFavoriteThreadItem( Item ).Item;
6403 if Item is TBoard then begin
6404 ItemURL := TBoard( Item ).URL;
6405 for i := Items^.Count - 1 downto 0 do begin
6406 Data := Items^.Item[ i ].Data;
6407 if TObject( Data ) is TFavoriteBoardItem then begin
6408 if ItemURL = TFavoriteThreadItem( Data ).URL then begin
6409 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
6415 Dlg := TFavoriteAddDialog.Create(Self);
6417 Dlg.SetBoard( TBoard( Item ) );
6422 end else if Item is TThreadItem then begin
6423 ItemURL := TThreadItem( Item ).URL;
6424 for i := Items^.Count - 1 downto 0 do begin
6425 Data := Items^.Item[ i ].Data;
6426 if TObject( Data ) is TFavoriteThreadItem then begin
6427 if ItemURL = TFavoriteThreadItem( Data ).URL then begin
6428 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
6434 Dlg := TFavoriteAddDialog.Create(Self);
6436 Dlg.SetThreadItem( TThreadItem( Item ) );
6446 procedure TGikoForm.FavoriteAddActionExecute(Sender: TObject);
6448 ShowFavoriteAddDialog(GetActiveContent);
6451 procedure TGikoForm.FavoriteClick(Sender: TObject);
6454 FavoriteClick( Sender, True );
6458 procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
6461 ThreadItem: TThreadItem;
6462 FavBoard: TFavoriteBoardItem;
6463 FavThread: TFavoriteThreadItem;
6467 if Sender is TFavoriteMenuItem then
6468 Item := TFavoriteMenuItem(Sender).Data
6469 else if Sender is TLinkToolButton then
6470 Item := TLinkToolButton(Sender).Data
6471 else if Sender is TTreeNode then
6472 Item := TTreeNode( Sender ).Data
6476 if TObject(Item) is TFavoriteBoardItem then begin
6477 FavBoard := TFavoriteBoardItem(Item);
6478 Board := FavBoard.Item;
6479 if Board <> nil then begin
6480 if (FTreeType = gtt2ch) and (FActiveBBS <> Board.ParentCategory.ParenTBBS) then
6481 ShowBBSTree( Board.ParentCategory.ParenTBBS );
6482 SelectTreeNode(Board, True);
6484 end else if TObject(Item) is TFavoriteThreadItem then begin
6485 FavThread := TFavoriteThreadItem(Item);
6486 ThreadItem := FavThread.Item;
6487 if ThreadItem = nil then
6490 InsertBrowserTab(ThreadItem, ActiveTab);
6492 if ThreadItem.IsLogFile then begin
6493 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
6494 if GikoSys.Setting.ListWidthState = glsMin then begin
6495 BrowserMaxAction.Execute;
6496 if GikoForm.Visible then
6500 if GikoSys.Setting.ListHeightState = glsMin then begin
6501 BrowserMaxAction.Execute;
6502 if GikoForm.Visible then
6510 procedure TGikoForm.FavoriteAddActionUpdate(Sender: TObject);
6512 FavoriteAddAction.Enabled := (GetActiveContent <> nil);
6515 procedure TGikoForm.BoardFavoriteAddActionExecute(Sender: TObject);
6517 if TObject(ListView.Selected.Data) is TBoard then
6518 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
6521 procedure TGikoForm.BoardFavoriteAddActionUpdate(Sender: TObject);
6523 BoardFavoriteAddAction.Enabled := (GetActiveList is TCategory) and (ListView.SelCount > 0);
6526 procedure TGikoForm.ThreadFavoriteAddActionExecute(Sender: TObject);
6528 if TObject(ListView.Selected.Data) is TThreadItem then
6529 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
6532 procedure TGikoForm.ThreadFavoriteAddActionUpdate(Sender: TObject);
6534 ThreadFavoriteAddAction.Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
6537 procedure TGikoForm.TreeSelectFavoriteAddActionExecute(Sender: TObject);
6539 ShowFavoriteAddDialog(TObject(FClickNode.Data));
6542 procedure TGikoForm.FavoriteArrangeActionExecute(Sender: TObject);
6544 Dlg: TFavoriteArrangeDialog;
6546 Dlg := TFavoriteArrangeDialog.Create(Self);
6552 PostMessage( Handle, USER_SETLINKBAR, 0, 0 );
6555 procedure TGikoForm.BBSMenuItemOnClick(
6560 if Sender is TBBSMenuItem then
6561 ShowBBSTree( TBBSMenuItem( Sender ).Data );
6565 procedure TGikoForm.MainCoolBarResize(Sender: TObject);
6567 TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
6570 procedure TGikoForm.MoveToActionExecute(Sender: TObject);
6575 URL := Trim(AddressComboBox.Text);
6578 idx := AddressComboBox.Items.IndexOf(URL);
6579 if idx = -1 then begin
6580 AddressComboBox.Items.Insert(0, URL);
6581 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
6582 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
6584 AddressComboBox.Items.Delete(idx);
6585 AddressComboBox.Items.Insert(0, URL);
6589 procedure TGikoForm.MoveToURL(URL: string);
6592 protocol, host, path, document, port, bookmark : string;
6593 BBSID, BBSKey: string;
6595 ThreadItem: TThreadItem;
6598 tmpThread : TThreadItem;
6599 // category : TCategory;
6600 // categoryNode : TTreeNode;
6601 // boardNode : TTreeNode;
6602 shiftDown : Boolean;
6606 GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark );
6607 GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey );
6610 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
6611 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
6612 if shiftDown then begin
6613 GikoSys.OpenBrowser(URL, gbtUserApp);
6615 end else if ctrlDown then begin
6616 GikoSys.OpenBrowser(URL, gbtIE);
6620 //=====
\83v
\83\89\83O
\83C
\83\93
6623 bi := High( BoardPlugIns );
6624 for i := Low( BoardPlugIns ) to bi do begin
6625 if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
6626 case BoardPlugIns[ i ].AcceptURL( URL ) of
6629 tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL );
6630 boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
6631 Board := BBSsFindBoardFromURL( boardURL );
6632 if Board = nil then begin
6633 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
6634 //GikoSys.OpenBrowser(URL, gbtUserApp);
6637 Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL );
6638 if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
6639 ShowBBSTree( BBSs[ 1 ] );
6642 if not Board.IsThreadDatRead then begin
6643 GikoSys.ReadSubjectFile( Board );
6648 ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
6649 if ThreadItem = nil then begin
6650 ThreadItem := tmpThread;
6651 Board.Insert( 0, ThreadItem );
6652 if ActiveList is TBoard then begin
6653 if TBoard(ActiveList) = Board then
6654 ListView.Items.Count := ListView.Items.Count + 1;
6656 InsertBrowserTab( ThreadItem );
6657 DownloadContent( ThreadItem );
6661 InsertBrowserTab( ThreadItem );
6662 if not ThreadItem.IsLogFile then begin
6663 DownloadContent( ThreadItem );
6673 Board := BBSsFindBoardFromURL( URL );
6674 if Board <> nil then begin
6675 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
6676 ShowBBSTree( Board.ParentCategory.ParenTBBS );
6677 SelectTreeNode( Board, True );
6685 // 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¢
6689 if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
6690 boardURL := GikoSys.Get2chThreadURL2BoardURL( URL );
6691 Board := BBSsFindBoardFromURL( boardURL );
6693 Board := BBSsFindBoardFromBBSID( BBSID );
6695 if Board = nil then begin
6696 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
6697 //
\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)
6698 Board := BBSs[ 0 ].FindBBSID( Copy(BBSID, 1 , Length(BBSID) - 1) );
6700 if Board = nil then begin
6701 GikoSys.OpenBrowser(URL, gbtUserApp);
6703 //Board := GikoSys.GetUnknownBoard( nil, boardURL );
6704 //if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
6705 // ShowBBSTree( BBSs[ 1 ] );
6707 if not Board.IsThreadDatRead then
6708 GikoSys.ReadSubjectFile(Board);
6709 URL := GikoSys.Get2chBrowsableThreadURL( URL );
6710 ThreadItem := Board.FindThreadFromURL( URL );
6711 //
\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)
6712 if ThreadItem = nil then begin
6713 ThreadItem := Board.FindThreadFromFileName( BBSKey + '.dat' );
6716 if ThreadItem = nil then begin
6717 //shift ->
\90Ý
\92è
\83u
\83\89\83E
\83U
\81i
\96³
\82¯
\82ê
\82ÎIE
\81j
6719 {shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
6720 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
6722 GikoSys.OpenBrowser(URL, gbtUserApp)
6723 else if ctrlDown then
6724 GikoSys.OpenBrowser(URL, gbtIE)
6727 ThreadItem := TThreadItem.Create( nil, URL );
6728 ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
6729 if AnsiPos(Host, Board.URL) = 0 then
6730 ThreadItem.DownloadHost := Host
6732 ThreadItem.DownloadHost := '';
6733 Board.Insert(0, ThreadItem);
6734 if ActiveList is TBoard then begin
6735 if TBoard(ActiveList) = Board then
6736 ListView.Items.Count := ListView.Items.Count + 1;
6738 InsertBrowserTab(ThreadItem);
6739 DownloadContent(ThreadItem);
6742 if ThreadItem.IsLogFile then
6743 InsertBrowserTab(ThreadItem)
6745 if AnsiPos(Host, Board.URL) = 0 then
6746 ThreadItem.DownloadHost := Host
6748 ThreadItem.DownloadHost := '';
6749 InsertBrowserTab(ThreadItem);
6750 DownloadContent(ThreadItem);
6754 Board := BBSsFindBoardFromURL( URL );
6755 if Board = nil then begin
6756 GikoSys.OpenBrowser(URL, gbtAuto);
6758 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
6759 ShowBBSTree( Board.ParentCategory.ParenTBBS );
6760 SelectTreeNode( Board, True );
6765 procedure TGikoForm.AddressToolBarResize(Sender: TObject);
6767 AddressComboBox.Width := AddressToolBar.Width - MoveToToolButton.Width - 10;
6768 CoolBarResized( Sender, MainCoolBar );
6771 procedure TGikoForm.AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
6772 Shift: TShiftState);
6774 if Key = VK_RETURN then
6775 MoveToAction.Execute;
6778 procedure TGikoForm.BrowserEnter(Sender: TObject);
6780 Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
6783 procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
6785 CDS:PCopyDataStruct;
6789 CDS := Message.CopyDataStruct;
6790 GetMem(PC, CDS^.cbData);
6792 lstrcpy(PC,CDS^.lpData);
6793 SetString(sURL, PC,lstrlen(PC));
6798 Message.Result := 1;
6801 procedure TGikoForm.WndProc(var Message: TMessage);
6806 if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
6809 if Message.WParam = SC_MINIMIZE then
6812 TreeClick( TreeView.Selected );
6826 procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
6828 hComboEdit: THandle;
6829 // KeyData: Integer;
6832 if AddressComboBox.Focused or SelectComboBox.Focused then begin
6833 if Msg.CharCode in [VK_BACK] then begin
6834 hComboEdit := GetFocus;
6835 if hComboEdit <> 0 then
6836 SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, Msg.KeyData);
6837 // SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, $000E0001);
6840 if Msg.CharCode in [VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PRIOR, VK_NEXT] then begin
6841 hComboEdit := GetFocus;
6842 if hComboEdit <> 0 then
6843 SendMessage(hComboEdit, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
6847 //
\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ð
6848 KeyData := Msg.KeyData;
6849 if (KeyData and $20000000) = 0 then begin
6850 if Msg.CharCode in [Ord('F'), Ord('V'), Ord('B'), Ord('R'),
6851 Ord('A'), Ord('T'), Ord('H')] then begin
6852 if not ActionList.IsShortCut(Msg) then begin
6860 procedure TGikoForm.BrowserTabVisibleActionExecute(Sender: TObject);
6862 GikoSys.Setting.BrowserTabVisible := BrowserTabVisibleAction.Checked;
6866 procedure TGikoForm.BrowserTabTopActionExecute(Sender: TObject);
6868 BrowserTabBottomAction.Checked := False;
6869 BrowserTabTopAction.Checked := True;
6870 GikoSys.Setting.BrowserTabPosition := gtpTop;
6874 procedure TGikoForm.BrowserTabBottomActionExecute(Sender: TObject);
6876 BrowserTabTopAction.Checked := False;
6877 BrowserTabBottomAction.Checked := True;
6878 GikoSys.Setting.BrowserTabPosition := gtpBottom;
6882 procedure TGikoForm.BrowserTabTabStyleActionExecute(Sender: TObject);
6884 BrowserTabButtonStyleAction.Checked := False;
6885 BrowserTabFlatStyleAction.Checked := False;
6886 BrowserTabTabStyleAction.Checked := True;
6887 GikoSys.Setting.BrowserTabStyle := gtsTab;
6891 procedure TGikoForm.BrowserTabButtonStyleActionExecute(Sender: TObject);
6893 BrowserTabTabStyleAction.Checked := False;
6894 BrowserTabFlatStyleAction.Checked := False;
6895 BrowserTabButtonStyleAction.Checked := True;
6896 GikoSys.Setting.BrowserTabStyle := gtsButton;
6900 procedure TGikoForm.BrowserTabFlatStyleActionExecute(Sender: TObject);
6902 BrowserTabFlatStyleAction.Checked := True;
6903 BrowserTabTabStyleAction.Checked := False;
6904 BrowserTabButtonStyleAction.Checked := False;
6905 GikoSys.Setting.BrowserTabStyle := gtsFlat;
6909 procedure TGikoForm.PreviewTimerTimer(Sender: TObject);
6915 HtmlFileName: string;
6919 TargetFrameName: OleVariant;
6920 PostData: OleVariant;
6921 Headers: OleVariant;
6922 WindowHeight: Integer;
6923 WindowWidth: Integer;
6927 Protocol, Host, Path, Document, Port, Bookmark: string;
6929 PreviewTimer.Enabled := False;
6933 case GikoSys.Setting.PreviewSize of
6940 WindowHeight := 192;
6944 WindowHeight := 384;
6948 WindowHeight := 480;
6950 else begin //gpsMedium
6952 WindowHeight := 288;
6956 ARect := Rect(0, 0, WindowWidth, WindowHeight);
6958 case GikoSys.Setting.PopupPosition of
6959 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6960 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6961 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
6962 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
6963 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
6964 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
6965 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6966 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6967 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Ó
6970 html := '<html><head>'#13#10
6972 + 'function init() {'#13#10
6973 + ' if ((document.body.clientHeight >= Image1.height) && (document.body.clientWidth >= Image1.width)) {'#13#10
6975 + ' var dh, ih;'#13#10
6976 + ' dh = document.body.clientWidth / document.body.clientHeight;'#13#10
6977 + ' ih = Image1.width / Image1.height;'#13#10
6978 + ' if (document.body.clientWidth < document.body.clientHeight) {'#13#10
6979 + ' if (ih > dh)'#13#10
6980 + ' Image1.width = document.body.clientWidth;'#13#10
6982 + ' Image1.height = document.body.clientHeight;'#13#10
6984 + ' if (ih < dh)'#13#10
6985 + ' Image1.height = document.body.clientHeight;'#13#10
6987 + ' Image1.width = document.body.clientWidth;'#13#10
6990 + ' Message.style.display = "none";'#13#10
6994 + '<body topmargin="0" leftmargin="0" style="border-width: 1px; overflow:hidden; border-style: solid;" onLoad="init()">'#13#10
6995 + '<div align="center" id="Message">
\83v
\83\8c\83r
\83\85\81[
\8dì
\90¬
\92\86</div>'#13#10
6996 + '<div align="center"><img name="Image1" border="0" src="%ImageURL%"></div>'#13#10
6998 sl := TStringList.Create;
7001 HtmlFileName := GikoSys.GetAppDir + HTML_FILE_NAME;
7002 sl.Text := AnsiReplaceStr(html, '%ImageURL%', FPreviewURL);
7003 sl.SaveToFile(HtmlFileName);
7010 NavURL := HtmlFileName;
7012 TargetFrameName := '';
7015 GikoSys.ParseURI(FPreviewURL, Protocol, Host, Path, Document, Port, Bookmark);
7016 Referer := Protocol + '://' + Host;
7018 Referer := Referer + ':' + Port;
7019 Referer := Referer + Path;
7020 Headers := 'Referer: ' + Referer;
7022 FPreviewBrowser.Navigate(NavURL, Flags, TargetFrameName, PostData, Headers);
7024 if ARect.Top + WindowHeight > Screen.DesktopHeight then
7025 ARect.Top := Screen.DesktopHeight - WindowHeight;
7026 if ARect.Left + WindowWidth > Screen.DesktopWidth then
7027 ARect.Left := Screen.DesktopWidth - WindowWidth;
7028 if ARect.Left < Screen.DesktopLeft then ARect.Left := Screen.DesktopLeft;
7029 if ARect.Bottom < Screen.DesktopTop then ARect.Bottom := Screen.DesktopTop;
7031 SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
7032 ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
7034 // Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
7035 // SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
7039 procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
7041 if PreviewTimer.Enabled then
7042 PreviewTimer.Enabled := False;
7043 if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
7044 FHint.ReleaseHandle;
7047 if (FPreviewBrowser <> nil) and (IsWindowVisible(FPreviewBrowser.Handle)) then
7048 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
7049 Message.Result := 1;
7053 procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
7055 MsgBarCloseAction.Execute;
7058 function TGikoForm.OnDocumentContextMenu(Sender: TObject): WordBool;
7060 Doc: IHtmlDocument2;
7061 Range: IHTMLTxtRange;
7064 ThreadItem: TThreadItem;
7066 Doc := Browser.Document as IHtmlDocument2;
7067 Range := Doc.selection.createRange as IHTMLTxtRange;
7068 s := CustomStringReplace(Range.text, '
\81@', ' ');//
\91S
\8ap
\8bó
\94\92\82ð
\94¼
\8ap
\8bó
\94\92\82É
7069 s := GikoSys.ZenToHan(Trim(s));
7070 if GikoSys.IsNumeric(s) then begin
7072 ThreadItem := GetActiveContent;
7073 if ThreadItem <> nil then begin
7075 FHint.PopupType := gptThread;
7076 SetResPopupText(ThreadItem, Num, Num, False, False);
7077 if FHint.ResCount <> 0 then
7087 procedure TGikoForm.SetResPopupText(threadItem: TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
7099 boardPlugIn : TBoardPlugIn;
7102 if StNum > ToNum then begin
7108 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
7109 if StNum + 10 < ToNum then
7110 ToNum := StNum + 10;
7112 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
7114 if ThreadItem <> nil then
7115 FHint.Title := ThreadItem.Title;
7117 if ThreadItem <> nil then begin
7118 if ThreadItem.IsBoardPlugInAvailable then begin
7119 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
7120 boardPlugIn := ThreadItem.BoardPlugIn;
7122 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
7123 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
7124 for i := StNum to ToNum do begin
7126 //
\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½
7127 tmp := boardPlugIn.GetDat( DWORD( threadItem ), i );
7128 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7129 Res := GikoSys.DivideStrLine(tmp);
7130 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7131 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7133 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7136 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7137 Body := CustomStringReplace(Body, '<br>', #10,true);
7138 Body := CustomStringReplace(Body, '</a>', '',true);
7139 Body := GikoSys.DeleteLink(Body);
7140 Body := CustomStringReplace(Body, '<', '<');
7141 Body := CustomStringReplace(Body, '>', '>');
7142 Body := CustomStringReplace(Body, '"', '"');
7143 Body := CustomStringReplace(Body, '&', '&');
7144 Body := CustomStringReplace(Body, ' ', ' ');
7146 FHint.Add(Header, Body);
7147 //FHint.Title := '';
7151 for i := StNum to ToNum do begin
7153 FileName := ThreadItem.FilePath;
7154 tmp := GikoSys.ReadThreadFile(FileName, Line);
7155 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
7156 Res := GikoSys.DivideStrLine(tmp);
7157 if (GikoSys.Setting.ShowMail = false) or (Length(res.FMailTo) = 0) then
7158 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime
7160 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + ' [' + res.FMailTo + ']
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
7162 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
7163 Body := CustomStringReplace(Body, '<br>', #10,true);
7164 Body := CustomStringReplace(Body, '</a>', '',true);
7165 Body := GikoSys.DeleteLink(Body);
7166 Body := CustomStringReplace(Body, '<', '<');
7167 Body := CustomStringReplace(Body, '>', '>');
7168 Body := CustomStringReplace(Body, '"', '"');
7169 Body := CustomStringReplace(Body, '&', '&');
7170 Body := CustomStringReplace(Body, ' ', ' ');
7171 FHint.Add(Header, Body);
7172 //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
7181 procedure TGikoForm.ShowTextPopup;
7186 // if Trim(s) = '' then
7189 FHint.Font.Name := GikoSys.Setting.HintFontName;
7190 FHint.Font.Size := GikoSys.Setting.HintFontSize;
7191 FHint.Font.Color := GikoSys.Setting.HintFontColor;
7192 FHint.Color := GikoSys.Setting.HintBackColor;
7193 FHint.HeaderBold := GikoSys.Setting.ResPopupHeaderBold;
7195 if FHint.PopupType = gptRaw then
7196 ARect := FHint.CalcHintRect(Screen.Width, FHint.Caption, nil)
7198 ARect := FHint.CalcHintRect(Screen.Width, '', nil);
7199 case GikoSys.Setting.PopupPosition of
7200 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7201 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7202 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
7203 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
7204 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
7205 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
7206 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
7207 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
7208 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Ó
7210 //FHint.ActivateHint(ARect, s);
7211 if FHint.PopupType = gptRaw then
7212 FHint.ActivateHint(ARect, FHint.Caption)
7214 FHint.ActivateHint(ARect, '');
7216 FHint.ReleaseHandle;
7221 procedure TGikoForm.GikoHelpActionExecute(Sender: TObject);
7225 FileName := GikoSys.GetAppDir + 'batahlp.chm';
7226 if not FileExists(FileName) then begin
7229 '
\83w
\83\8b\83v
\82ª
\8c©
\82Â
\82©
\82è
\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½' + #13#10 +
7230 '
\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 +
7231 '
\83w
\83\8b\83v
\82Í
\83M
\83R
\83i
\83r
\82Ì
\83T
\83C
\83g
\82É
\92u
\82¢
\82Ä
\82 \82è
\82Ü
\82·',
7236 ShellExecute(Handle, 'open', PChar(FileName), '', PChar(GikoSys.GetAppDir), SW_SHOW);
7239 procedure TGikoForm.ToolButton18Click(Sender: TObject);
7241 if FTreeType = gttHistory then begin
7244 TreeView.Items.Clear;
7248 procedure TGikoForm.KotehanActionExecute(Sender: TObject);
7250 Dlg: TKotehanDialog;
7252 Dlg := TKotehanDialog.Create(Self);
7260 procedure TGikoForm.SetLinkBar;
7264 ToolButton: TLinkToolButton;
7265 MenuItem: TMenuItem;
7266 oldIgnoreResize : Boolean;
7268 oldIgnoreResize := FIsIgnoreResize;
7269 FIsIgnoreResize := True;
7270 MainCoolBar.Bands.BeginUpdate;
7272 LinkBarPopupMenu.Items.Clear;
7273 for i := LinkToolBar.ButtonCount - 1 downto 0 do
7274 //LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
7275 LinkToolBar.Buttons[i].Free;
7276 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
7277 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
7278 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
7279 ToolButton := TLinkToolButton.Create(LinkToolBar);
7280 // ToolButton.Parent := LinkToolBar;
7281 if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteFolder then begin
7282 MenuItem := TMenuItem.Create(Self);
7283 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
7284 LinkBarPopupMenu.Items.Add(MenuItem);
7285 ToolButton.MenuItem := MenuItem;
7286 ToolButton.ImageIndex := TOOL_ICON_FAV_FOLDER;
7287 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
7288 ToolButton.ImageIndex := TOOL_ICON_FAV_BOARD;
7289 ToolButton.OnClick := FavoriteClick;
7290 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
7291 ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
7292 ToolButton.OnClick := FavoriteClick;
7294 ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
7295 ToolButton.Left := 10000;
7296 ToolButton.Data := FavoriteTreeView.Items[i].Item[j].Data;
7297 ToolButton.AutoSize := True;
7298 ToolButton.OnDragDrop := LinkToolButtonDragDrop;
7299 ToolButton.OnDragOver := FavoriteDragOver;
7300 ToolButton.OnMouseDown := LinkToolButtonOnMouseDown;
7301 ToolButton.OnMouseMove := LinkToolButtonOnMouseMove;
7302 ToolButton.OnMouseUp := LinkToolButtonOnMouseUp;
7303 ToolButton.OnStartDrag := LinkToolButtonStartDrag;
7304 //ToolButton.DragMode := dmAutomatic;
7305 ToolButton.DragMode := dmManual;
7306 ToolButton.PopupMenu := FavoriteTreePopupMenu;
7308 LinkToolBar.InsertControl(ToolButton);
7313 { if LinkToolBar.ButtonCount = 0 then begin
7314 ToolButton := TLinkToolButton.Create(LinkToolBar);
7315 ToolButton.Style := tbsButton;
7316 ToolButton.ImageIndex := -1;
7317 ToolButton.Caption := '';
7318 LinkToolBar.InsertControl(ToolButton);
7321 MainCoolBar.Bands.EndUpdate;
7322 LoadCoolBarSettings;
7323 FIsIgnoreResize := oldIgnoreResize;
7326 procedure TGikoForm.ClearLinkBar;
7330 MainCoolBar.Bands.BeginUpdate;
7332 if LinkBarPopupMenu.Items.Count > 0 then
7333 LinkBarPopupMenu.Items.Clear;
7334 for i := LinkToolBar.ButtonCount - 1 downto 0 do
7335 //LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
7336 LinkToolBar.Buttons[i].Free;
7338 MainCoolBar.Bands.EndUpdate;
7342 procedure TGikoForm.FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
7350 if Sender = FavoriteTreeView then begin
7351 Node := FavoriteTreeView.GetNodeAt(X, Y);
7356 bound := Node.DisplayRect( False );
7357 height := bound.Bottom - bound.Top;
7358 if (bound.Top + height / 2) <= Y then
7359 Node := FavoriteTreeView.GetNodeAt(X, Y + height);
7364 if Node.IsFirstNode then
7369 if FDropSpaceNode <> nil then
7370 if FDropSpaceNode.AbsoluteIndex = Node.AbsoluteIndex then
7373 if Change then begin
7374 if FDropSpaceNode <> nil then
7375 FDropSpaceNode.Free;
7377 FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil );
7378 FDropSpaceNode.MoveTo( Node, naInsert );
7379 FDropSpaceNode.ImageIndex := -1;
7380 FDropSpaceNode.SelectedIndex := -1;
7384 if Source = FavoriteTreeView then begin
7385 if FavoriteTreeView.Selected = FavoriteTreeView.Items.GetFirstNode then begin
7390 end else if Source = BrowserTab then
7392 else if Source = ListView then
7394 else if Source is TLinkToolButton then
7396 else if Source = TreeView then
7402 procedure TGikoForm.FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
7405 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
7408 procedure TGikoForm.LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
7410 // FDragging := true;
7413 procedure TGikoForm.LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
7415 SenderNode: TTreeNode;
7416 LinkToolButton: TLinkToolButton;
7419 LinkToolButton := TLinkToolButton( Sender );
7420 SenderNode := TreeNodeDataFind( FavoriteTreeView.TopItem, LinkToolButton.Data );
7422 FavoriteDragDrop( SenderNode, Source );
7426 procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7430 procedure TGikoForm.LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
7434 TToolButton( Sender ).DragMode := dmManual;
7435 if ssLeft in Shift then begin
7436 // 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)
7437 if FDragTime = 0 then begin
7438 FDragTime := GetTickCount();
7440 Now := GetTickCount();
7441 if (Now - FDragTime) > 500 then begin
7442 if FDragButton <> TToolButton( Sender ) then begin
7444 FDragButton := TToolButton( Sender );
7445 TToolButton(Sender).BeginDrag(false ,5);
7448 {$IF Defined(debug)}
7449 ShowMessage('Error');
7460 procedure TGikoForm.LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7465 function TGikoForm.GetWidthAllToolButton(ToolBar: TToolBar): Integer;
7470 for i := 0 to ToolBar.ButtonCount - 1 do
7471 Result := Result + ToolBar.Buttons[i].Width;
7474 procedure TGikoForm.MainCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7476 Control : TWinControl;
7479 Control := FindControl(BandInfo^.hwndChild);
7480 if Control = nil then
7483 for i := MainCoolBar.Bands.Count - 1 downto 0 do begin
7484 if MainCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
7485 idx := MainCoolBar.Bands[ i ].ID;
7489 Canvas.Font.Handle := GetStockObject( DEFAULT_GUI_FONT );
7490 if (Control = MenuToolBar) or (Control = StdToolBar) then begin
7491 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
7492 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7493 BandInfo^.cxMinChild := 0;
7494 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth;
7495 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7496 end else if Control = LinkToolBar then begin
7497 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
7498 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7499 BandInfo^.cxMinChild := 0;
7500 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83\8a\83\93\83N' );
7501 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7502 end else begin // AddressToolBar
7503 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
7504 BandInfo^.cxMinChild := 0;
7505 BandInfo^.cx := GikoSys.Setting.MainCoolSet[ idx ].FCoolWidth + Canvas.TextWidth( '
\83A
\83h
\83\8c\83X' );
7509 procedure TGikoForm.MainCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
7515 ChevronPopupMenu.Items.Clear;
7517 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
7518 if MainCoolBar.Bands[ i ].Visible then begin
7519 if Idx = Int64(RebarChevron^.uBand) then begin
7526 if (Idx >= 0) and (MainCoolBar.Bands.Count > Idx) then begin
7527 if MainCoolBar.Bands[Idx].Control = MenuToolbar then begin
7529 end else if MainCoolBar.Bands[Idx].Control = StdToolbar then begin
7530 ToolBarChevronMenu(StdToolBar);
7531 end else if MainCoolBar.Bands[Idx].Control = LinkToolbar then begin
7535 p := MainCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
7536 ChevronPopupMenu.Popup(p.x, p.y);
7540 procedure TGikoForm.MenuBarChevronMenu;
7541 procedure SetSubMenu(MenuItem: TMenuItem; PopupItem: TMenuItem);
7547 for i := 0 to MenuItem.Count - 1 do begin
7549 if MenuItem[i] is TFavoriteMenuItem then begin
7550 Item := TFavoriteMenuItem.Create(Self);
7551 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(MenuItem[i]).Data;
7553 Item := TMenuItem.Create(Self);
7554 Item.Caption := MenuItem[i].Caption;
7555 Item.Action := MenuItem[i].Action;
7556 Item.ImageIndex := MenuItem[i].ImageIndex;
7557 Item.OnClick := MenuItem[i].OnClick;
7558 PopupItem.Add(Item);
7559 if MenuItem[i].Count > 0 then
7560 SetSubMenu(MenuItem[i], Item);
7569 ChevronPopupMenu.Items.Clear;
7570 ChevronPopupMenu.Images := MainMenu.Images;
7571 bw := GetWidthAllToolButton(MenuToolBar);
7572 if MenuToolBar.Width < bw then begin
7574 for i := 0 to MenuToolBar.ButtonCount - 1 do begin
7575 w := w + MenuToolBar.Buttons[i].Width;
7576 if MenuToolBar.Width <= w then begin
7577 Item := TMenuItem.Create(Self);
7578 Item.Caption := MenuToolBar.Buttons[i].MenuItem.Caption;
7579 //Item.Action := MenuToolBar.Buttons[i].MenuItem.Action;
7580 ChevronPopupMenu.Items.Add(Item);
7581 SetSubMenu(MenuToolbar.Buttons[i].MenuItem, Item);
7587 procedure TGikoForm.ToolBarChevronMenu(ToolBar: TToolBar);
7588 procedure SetSubMenu(PopupMenu: TPopupMenu; PopupItem: TMenuItem);
7593 if Assigned(PopupMenu.OnPopup) then
7594 PopupMenu.OnPopup(nil);
7595 for i := 0 to PopupMenu.Items.Count - 1 do begin
7597 if PopupMenu.Items[i] is TFavoriteMenuItem then begin
7598 Item := TFavoriteMenuItem.Create(Self);
7599 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(PopupMenu.Items[i]).Data;
7601 Item := TMenuItem.Create(Self);
7602 Item.Caption := PopupMenu.Items[i].Caption;
7603 Item.Action := PopupMenu.Items[i].Action;
7604 Item.ImageIndex := PopupMenu.Items[i].ImageIndex;
7605 Item.OnClick := PopupMenu.Items[i].OnClick;
7606 PopupItem.Add(Item);
7615 ChevronPopupMenu.Items.Clear;
7616 ChevronPopupMenu.Images := ToolBar.HotImages;
7617 bw := GetWidthAllToolButton(ToolBar);
7618 if ToolBar.Width < bw then begin
7620 for i := 0 to ToolBar.ButtonCount - 1 do begin
7621 w := w + ToolBar.Buttons[i].Width;
7622 if ToolBar.Width <= w then begin
7623 Case ToolBar.Buttons[i].Tag of
7626 Item := TMenuItem.Create(Self);
7627 if ToolBar.Buttons[i].Style = tbsSeparator then
7630 Item.Caption := ToolBar.Buttons[i].Caption;
7631 Item.Action := ToolBar.Buttons[i].Action;
7632 //Item.Visible := True;
7634 ChevronPopupMenu.Items.Add(Item);
7635 if ToolBar.Buttons[i].DropdownMenu <> nil then begin
7637 Item.OnClick := nil;
7638 SetSubMenu(ToolBar.Buttons[i].DropdownMenu, Item);
7642 //
\8f«
\97\88\82Ì
\82½
\82ß
\82Ì
\97\
\96ñ
7649 procedure TGikoForm.LinkBarChevronMenu;
7654 Item: TFavoriteMenuItem;
7656 Button: TLinkToolButton;
7658 ChevronPopupMenu.Items.Clear;
7659 ChevronPopupMenu.Images := LinkToolBar.Images;
7660 bw := GetWidthAllToolButton(LinkToolBar);
7661 if LinkToolBar.Width < bw then begin
7663 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
7664 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
7665 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
7666 w := w + LinkToolBar.Buttons[j].Width;
7667 if LinkToolBar.Width <= w then begin
7668 if LinkToolBar.Buttons[j] is TLinkToolButton then begin
7669 Button := TLinkToolButton(LinkToolBar.Buttons[j]);
7670 Item := TFavoriteMenuItem.Create(Self);
7671 if TObject(Button.Data) is TFavoriteFolder then begin
7672 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], Item);
7673 end else if TObject(Button.Data) is TFavoriteBoardItem then begin
7674 Item.OnClick := FavoriteClick;
7675 end else if TObject(Button.Data) is TFavoriteThreadItem then begin
7676 Item.OnClick := FavoriteClick;
7678 Item.Data := Button.Data;
7679 Item.Caption := LinkToolBar.Buttons[j].Caption;
7680 Item.ImageIndex := LinkToolBar.Buttons[j].ImageIndex;
7681 ChevronPopupMenu.Items.Add(Item);
7691 procedure TGikoForm.ListCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7693 Control: TWinControl;
7696 Control := FindControl(BandInfo^.hwndChild);
7697 if Control = nil then
7700 for i := ListCoolBar.Bands.Count - 1 downto 0 do begin
7701 if ListCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
7702 idx := ListCoolBar.Bands[ i ].ID;
7706 if Control = ListToolBar then begin
7707 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
7708 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7709 BandInfo^.cxMinChild := 0;
7710 BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
7711 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7713 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
7714 BandInfo^.cxMinChild := 0;
7715 BandInfo^.cx := GikoSys.Setting.ListCoolSet[ idx ].FCoolWidth;
7719 procedure TGikoForm.ListCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
7724 ChevronPopupMenu.Items.Clear;
7725 Idx := RebarChevron^.uBand;
7726 if (Idx >= 0) and (ListCoolBar.Bands.Count > Idx) then begin
7727 if ListCoolBar.Bands[Idx].Control = ListToolBar then begin
7728 ToolBarChevronMenu(ListToolBar);
7731 p := ListCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
7732 ChevronPopupMenu.Popup(p.x, p.y);
7736 procedure TGikoForm.BrowserCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7738 Control: TWinControl;
7741 Control := FindControl(BandInfo^.hwndChild);
7742 if Control = nil then
7745 for i := BrowserCoolBar.Bands.Count - 1 downto 0 do begin
7746 if BrowserCoolBar.Bands[ i ].Control.Handle = Control.Handle then begin
7747 idx := BrowserCoolBar.Bands[ i ].ID;
7751 if Control = BrowserToolBar then begin
7752 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE or RBBIM_STYLE or RBBIM_IDEALSIZE;
7753 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7754 BandInfo^.cxMinChild := 0;
7755 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
7756 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7758 BandInfo^.fMask := BandInfo.fMask or RBBIM_CHILDSIZE;
7759 BandInfo^.cxMinChild := 0;
7760 BandInfo^.cx := GikoSys.Setting.BrowserCoolSet[ idx ].FCoolWidth;
7764 procedure TGikoForm.BrowserCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
7769 ChevronPopupMenu.Items.Clear;
7770 Idx := RebarChevron^.uBand;
7771 if (Idx >= 0) and (BrowserCoolBar.Bands.Count > Idx) then begin
7772 if BrowserCoolBar.Bands[Idx].Control = BrowserToolBar then
7773 ToolBarChevronMenu(BrowserToolBar)
7776 p := BrowserCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
7777 ChevronPopupMenu.Popup(p.x, p.y);
7781 procedure TGikoForm.ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
7783 if Column^.iImage = -1 then begin
7784 Column^.mask := Column^.mask or LVCF_FMT;
7786 Column^.mask := Column^.mask or LVCF_FMT or LVCF_IMAGE;
7787 Column^.fmt := Column^.fmt or LVCFMT_IMAGE or LVCFMT_BITMAP_ON_RIGHT;
7791 procedure TGikoForm.ThreadEditorActionExecute(Sender: TObject);
7793 Editor: TEditorForm;
7795 if not (GetActiveList is TBoard) then
7797 Editor := TEditorForm.Create(Self);
7798 Editor.SetBoard(TBoard(GetActiveList));
7800 Editor.BodyEdit.SetFocus;
7803 procedure TGikoForm.ToolBarSettingActionExecute(Sender: TObject);
7805 Dlg: TToolBarSettingDialog;
7807 //Component: TComponent;
7809 Dlg := TToolBarSettingDialog.Create(Self, ActionList);
7811 Dlg.AddToolBar(StdToolBar, gttStandard);
7812 Dlg.AddToolBar(ListToolBar, gttList);
7813 Dlg.AddToolBar(BrowserToolBar, gttBrowser);
7814 case FToolBarSettingSender of
7815 tssMain: Dlg.ToolBarIndex := 0;
7816 tssList: Dlg.ToolBarIndex := 1;
7817 tssBrowser: Dlg.ToolBarIndex := 2;
7820 if ToolBarSettingAction.ActionComponent.GetParentComponent is TPopupMenu then begin
7821 Component := TPopupMenu( ToolBarSettingAction.ActionComponent.GetParentComponent ).PopupComponent;
7823 if Component = MainCoolBar then
7824 Dlg.ToolBarComboBox.ItemIndex := 0
7825 else if Component = ListCoolBar then
7826 Dlg.ToolBarComboBox.ItemIndex := 1
7827 else if Component = BrowserCoolBar then
7828 Dlg.ToolBarComboBox.ItemIndex := 2;
7831 if Dlg.ShowModal = mrOK then begin
7834 //
\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é
7835 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
7836 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth + 1;
7837 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth - 1;
7839 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
7840 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth + 1;
7841 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth - 1;
7843 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
7844 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth + 1;
7845 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth - 1;
7847 SaveToolBarSetting(StdToolBar);
7848 SaveToolBarSetting(ListToolBar);
7849 for i := ListToolBar.ControlCount - 1 downto 0 do
7851 if ListToolBar.Controls[ i ].Action = SelectItemAction then
7853 //
\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·
7854 if (i + 1) < ListToolBar.ControlCount then
7855 if ListToolBar.Controls[ i + 1 ] is TToolButton then
7856 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
7857 ListToolBar.Controls[ i + 1 ].Visible := False;
7859 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
7860 ListToolBar.Controls[ i ].Visible := False;
7861 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
7862 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
7863 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
7864 SelectComboBox.Parent := ListToolBar;
7865 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
7866 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
7867 SelectComboBoxSplitter.Parent := ListToolBar;
7872 SaveToolBarSetting(BrowserToolBar);
7876 FToolBarSettingSender := tssNone;
7880 function TGikoForm.FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
7885 for i := bar.ButtonCount - 1 downto 0 do begin
7886 if bar.Buttons[ i ].Action = action then begin
7887 Result := bar.Buttons[ i ];
7896 procedure TGikoForm.SetToolBarPopup;
7899 aIEButton : TToolButton;
7900 aCabinetBBSButton : TToolButton;
7902 for i := 0 to StdToolBar.ButtonCount - 1 do begin
7904 for i := 0 to ListToolBar.ButtonCount - 1 do begin
7905 if ListToolBar.Buttons[i].Action = IconStyle then
7906 ListToolBar.Buttons[i].DropdownMenu := ListIconPopupMenu;
7907 if ListToolBar.Buttons[i].Action = SelectReservAction then
7908 ListToolBar.Buttons[i].DropdownMenu := RoundNamePopupMenu;
7910 aIEButton := FindToolBarButton( BrowserToolBar, IEAction );
7911 if aIEButton <> nil then
7912 aIEButton.DropdownMenu := BrowserPopupMenu;
7913 aCabinetBBSButton := FindToolBarButton( StdToolBar, CabinetBBSAction );
7914 if aCabinetBBSButton <> nil then
7915 aCabinetBBSButton.DropdownMenu := BBSSelectPopupMenu;
7918 procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState;
7919 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
7928 Wnd := WindowFromPoint(MousePos);
7930 if WheelDelta > 0 then
7935 if (Wnd = BrowserTab.Handle) or
7936 (Wnd = BrowserTab.Parent.Handle) then begin
7937 BrowserTab.ScrollTabs(Delta);
7938 end else if Wnd = ListView.Handle then begin
7939 if ListView.ViewStyle = vsList then
7940 ListView.Scroll( Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE, 0 )
7942 ListView.Scroll( 0, Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE );
7949 procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
7951 if Length( SelectComboBox.Text ) = 0 then
7953 AllItemAction.Checked := True;
7954 LogItemAction.Checked := False;
7955 NewItemAction.Checked := False;
7957 //
\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é
7958 if AllItemAction.Checked then
7959 AllItemAction.Checked := False;
7960 if LogItemAction.Checked then
7961 LogItemAction.Checked := False;
7962 if NewItemAction.Checked then
7963 NewItemaction.Checked := False;
7966 if Length( SelectComboBox.Text ) = 0 then
7967 SetListViewType( gvtAll )
7969 SetListViewType( gvtUser, SelectComboBox.Text, false);
7972 procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
7973 Shift: TShiftState);
7976 if Key = VK_Return then
7979 end else if Length( SelectComboBox.Text ) = 0 then
7981 AllItemAction.Checked := True;
7982 LogItemAction.Checked := False;
7983 NewItemAction.Checked := False;
7985 //
\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é
7986 if AllItemAction.Checked then
7987 AllItemAction.Checked := False;
7988 if LogItemAction.Checked then
7989 LogItemAction.Checked := False;
7990 if NewItemAction.Checked then
7991 NewItemaction.Checked := False;
7996 procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
8001 if Length( SelectComboBox.Text ) = 0 then
8003 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
8004 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
8009 //
\8di
\82è
\8d\9e\82Ý
\8c\9f\8dõ
\82Ì
\97\9a\97ð
\8dX
\90V
8010 procedure TGikoForm.ModifySelectList;
8017 if SelectComboBox.Parent = nil then
8020 if Length( SelectComboBox.Text ) > 0 then
8022 oldText := SelectComboBox.Text;
8023 idx := GikoSys.Setting.SelectTextList.IndexOf( oldText );
8025 GikoSys.Setting.SelectTextList.Delete( idx );
8026 idx := SelectComboBox.Items.IndexOf( oldText );
8028 SelectComboBox.Items.Delete( idx );
8029 GikoSys.Setting.SelectTextList.Insert( 0, oldText );
8030 SelectComboBox.Items.Insert( 0, oldText );
8031 SelectComboBox.Text := oldText;
8038 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\95Ò
\8fW
\82·
\82é
\82½
\82ß
\82É
\8aJ
\82
8039 procedure TGikoForm.NG1Click(Sender: TObject);
8041 GikoSys.FAbon.EditNGwords;
8043 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\8dÄ
\93Ç
\82Ý
\8d\9e\82Ý
\82·
\82é
8044 procedure TGikoForm.SelectResActionExecute(Sender: TObject);
8046 Dlg: TListSelectDialog;
8047 ThreadItem : TThreadItem;
8048 FilterList : TStringList;
8051 Dlg := TListSelectDialog.Create(Self);
8053 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
8054 Dlg.SelectComboBox.Text := FSelectResWord;
8056 if Dlg.ModalResult = mrOK then begin
8057 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
8058 //
\8bó
\93ü
\97Í
\82Å OK
\82Í
\91S
\83\8c\83X
\95\
\8e¦
\82Æ
\93¯
\88Ó
\8b`
8059 AllResAction.Execute;
8061 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
8062 AllResAction.Checked := False;
8063 SelectResAction.Checked := True;
8065 //
\8dÅ
\8cã
\82É
\90Ý
\92è
\82µ
\82½
\82à
\82Ì
\82ð
\8ao
\82¦
\82Ä
\82¨
\82
8066 FSelectResWord := Dlg.SelectComboBox.Text;
8068 //
\8c\9f\8dõ
\97\9a\97ð
\82Ì
\8dX
\90V
8069 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
8071 GikoSys.Setting.SelectTextList.Delete(idx);
8072 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
8073 while Dlg.SelectComboBox.Items.Count > 100 do begin
8074 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
8078 if SelectComboBox.Parent <> nil then
8079 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
8083 //
\83t
\83B
\83\8b\83^
\82Ì
\90Ý
\92è
8084 FilterList := TStringList.Create;
8086 GikoSys.FSelectResFilter.Reverse := True;
8087 FilterList.Delimiter := ' '; //
\8bæ
\90Ø
\82è
\8eq
\82ð
\94¼
\8ap
\83X
\83y
\81[
\83X
\82É
\90Ý
\92è
8088 FilterList.DelimitedText := Dlg.SelectComboBox.Text;
8090 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8095 //
\83X
\83\8c\83b
\83h
\82Ì
\8dÄ
\95`
\89æ
8096 ThreadItem := GetActiveContent;
8097 if ThreadItem <> nil then
8098 SetContent( ThreadItem );
8100 end else if Length( FSelectResWord ) > 0 then begin
8101 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
8102 AllResAction.Checked := False;
8103 SelectResAction.Checked := True;
8111 procedure TGikoForm.SelectResActionUpdate(Sender: TObject);
8113 SelectResAction.Enabled := GetActiveContent <> nil;
8116 procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;
8117 Shift: TShiftState);
8121 //
\91S
\82Ä
\82Ì
\83\8c\83X
\82ð
\95\
\8e¦
8122 procedure TGikoForm.AllResActionExecute(Sender: TObject);
8124 ThreadItem : TThreadItem;
8125 FilterList : TStringList;
8127 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
8128 AllResAction.Checked := True;
8129 SelectResAction.Checked := False;
8131 if Length( FSelectResWord ) > 0 then begin
8132 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
8133 FilterList := TStringList.Create;
8135 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
8136 GikoSys.FSelectResFilter.Reverse := False;
8141 FSelectResWord := '';
8143 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
8144 ThreadItem := GetActiveContent;
8145 if ThreadItem <> nil then
8146 SetContent( ThreadItem );
8150 procedure TGikoForm.AllResActionUpdate(Sender: TObject);
8152 AllResAction.Enabled := GetActiveContent <> nil;
8155 procedure TGikoForm.ReloadClick(Sender: TObject);
8157 ThreadItem : TThreadItem;
8159 if GikoSys.FAbon.ReLoadFromNGwordFile =false then begin
8160 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);
8162 ThreadItem := GetActiveContent;
8163 if ThreadItem <> nil then
8164 SetContent( ThreadItem );
8169 procedure TGikoForm.GoBackClick(Sender: TObject);
8171 ThreadItem : TThreadItem;
8174 if GikoSys.FAbon.GoForward =false then begin
8175 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);
8177 s := GikoSys.FAbon.NGwordname;
8178 StatusBar.Panels.Items[2].Text := s;
8179 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8180 StatusBarResize(Sender);
8181 ThreadItem := GetActiveContent;
8182 if ThreadItem <> nil then
8183 SetContent( ThreadItem );
8188 procedure TGikoForm.GoFowardClick(Sender: TObject);
8190 ThreadItem : TThreadItem;
8193 if GikoSys.FAbon.GoBack =false then begin
8194 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);
8196 s := GikoSys.FAbon.NGwordname;
8197 StatusBar.Panels.Items[2].Text := s;
8198 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
8199 StatusBarResize(Sender);
8200 ThreadItem := GetActiveContent;
8201 if ThreadItem <> nil then
8202 SetContent( ThreadItem );
8207 procedure TGikoForm.SelectComboBoxSplitterMouseMove(Sender: TObject;
8208 Shift: TShiftState; X, Y: Integer);
8213 If (SelectComboBox.Parent <> nil) and (IsDraggingSelectComboBox) Then begin
8216 pos := SelectComboBoxSplitter.ClientToScreen( pos );
8217 w := SelectComboBox.Width + (pos.X - DraggingSelectComboBoxPosition.X);
8219 If w <= 50 Then Begin
8220 //
\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
8221 //
\81u
\8e~
\82Ü
\82Á
\82½(50pixel)
\88Ê
\92u
\81v
\82É
\82È
\82é
\82æ
\82¤
\82É
8222 pos.X := pos.X + (50 - w);
8224 //
\8f¬
\82³
\82
\82È
\82è
\82·
\82¬
\82È
\82¢
\82æ
\82¤
\82É
8228 //
\83`
\83\89\82Â
\82«
\8cy
\8c¸
\82Ì
\88×
8229 If SelectComboBox.Width <> w Then Begin
8230 SelectComboBox.Width := w;
8231 GikoSys.Setting.SelectComboBoxWidth := w;
8232 DraggingSelectComboBoxPosition := pos;
8237 procedure TGikoForm.SelectComboBoxSplitterMouseDown(Sender: TObject;
8238 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8242 IsDraggingSelectComboBox := True;
8245 DraggingSelectComboBoxPosition := SelectComboBoxSplitter.ClientToScreen( pos );
8248 procedure TGikoForm.SelectComboBoxSplitterMouseUp(Sender: TObject;
8249 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8251 IsDraggingSelectComboBox := False;
8254 procedure TGikoForm.StatusBarResize(Sender: TObject);
8256 StatusBar.Panels[1].Width := StatusBar.Width -
8257 StatusBar.Panels[0].Width -
8258 StatusBar.Panels[2].Width;
8260 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\92Ê
\8fí
\81v
8261 procedure TGikoForm.IndividualAbon1Click(Sender: TObject);
8263 ThreadItem : TThreadItem;
8265 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,1);
8266 ThreadItem := GetActiveContent;
8267 if ThreadItem <> nil then
8268 SetContent( ThreadItem );
8270 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\93§
\96¾
\81v
8271 procedure TGikoForm.IndividualAbon2Click(Sender: TObject);
8273 ThreadItem : TThreadItem;
8275 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,0);
8276 ThreadItem := GetActiveContent;
8277 if ThreadItem <> nil then
8278 SetContent( ThreadItem );
8280 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c\81i
\81j
8281 procedure TGikoForm.AntiIndividualAbonClick(Sender: TObject);
8283 ThreadItem : TThreadItem;
8286 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
8287 GikoSys.FAbon.DeleteIndividualAbon(KokoPopupMenu.Tag);
8288 ThreadItem := GetActiveContent;
8289 if ThreadItem <> nil then
8290 SetContent( ThreadItem );
8292 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
8293 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
8296 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c
8297 procedure TGikoForm.N42Click(Sender: TObject);
8299 IndividualForm :TIndividualAbonForm;
8300 ThreadItem : TThreadItem;
8304 IndividualForm := TIndividualAbonForm.Create(Self);
8306 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
8307 for i :=0 to GikoSys.FAbon.GetAbonResCount-1 do begin
8308 IndividualForm.ComboBox1.Items.Add(GikoSys.FAbon.GetAbonResString(i));
8310 if IndividualForm.ShowModal = mrOK then begin
8311 GikoSys.FAbon.DeleteIndividualAbon(IndividualForm.ResNumber);
8313 ThreadItem := GetActiveContent;
8314 if ThreadItem <> nil then
8315 SetContent( ThreadItem );
8317 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
8318 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
8321 IndividualForm.Free;
8325 procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
8328 if (Length( SelectComboBox.Text ) = 0) or
8329 (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
8331 SelectComboBox.Text := '';
8332 SelectComboBox.Color := clWindow;
8337 procedure TGikoForm.N51Click(Sender: TObject);
8341 //
\94Â
\96¼
\8c\9f\8dõ
8342 procedure TGikoForm.TreeSelectSearchBoardNameExecute(Sender: TObject);
8346 CurItem : TTreeNode;
8349 if InputQuery('
\94Â
\96¼
\8c\9f\8dõ','
\94Â
\96¼
\82Ì
\93ü
\97Í',s) then begin
8352 if TreeView.Selected = nil then
8353 CurItem := TreeView.Items.GetFirstNode
8355 CurItem := TreeView.Selected.GetNext;
8356 if CurItem = nil then
8357 CurItem := TreeView.Items.GetFirstNode;
8359 while CurItem <> nil do begin
8360 if (CurItem.ImageIndex <> 2) and (GikoSys.VaguePos(s,CurItem.Text) <> 0) then begin
8363 CurItem := CurItem.GetNext;
8366 if CurItem = nil then begin
8367 msg := '
\90æ
\93ª
\82É
\96ß
\82è
\82Ü
\82·
\82©
\81H';
8368 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
8369 CurItem := TreeView.Items.GetFirstNode;
8373 TreeView.Select(CurItem);
8376 TreeView.Select(CurItem);
8378 msg := '
\8e\9f\82É
\8ds
\82«
\82Ü
\82·
\82©
\81H';
8379 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
8393 procedure TGikoForm.CabinetFavoriteActionExecute(Sender: TObject);
8399 if CabinetPanel.Visible then begin
8400 if FTreeType = gttFavorite then begin
8401 CabinetVisible( False );
8402 CabinetFavoriteAction.Checked := False;
8404 CabinetFavoriteAction.Checked := True;
8407 CabinetVisible( True );
8408 CabinetFavoriteAction.Checked := True;
8411 // BBS...BBS, History, Favorite
8412 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 1;
8414 b := CabinetSelectPopupMenu.Items.Count - 1;
8415 for i := 0 to b do begin
8416 item := CabinetSelectPopupMenu.Items[ i ];
8417 if item is TBBSMenuItem then begin
8418 item.Checked := False;
8419 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
8420 CabinetMenu.Items[ i ].Checked := False;
8424 //
\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Ö
8425 HistoryToolBar.Hide;
8426 FavoriteToolBar.Show;
8427 TreeView.Visible := False;
8428 FavoriteTreeView.Visible := True;
8430 CabinetSelectToolButton.Caption := '
\82¨
\8bC
\82É
\93ü
\82è';
8431 FTreeType := gttFavorite;
8433 //
\83\81\83j
\83\85\81[
\8by
\82Ñ
\83{
\83^
\83\93\82Ì
\83`
\83F
\83b
\83N
\82ð
\90Ý
\92è
8434 CabinetBBSAction.Checked := False;
8435 CabinetHistoryAction.Checked := False;
8437 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\83c
\83\8a\81[
\82ð
\93W
\8aJ
8438 FavoriteTreeView.TopItem.Expanded := True;
8442 procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
8445 if (SenderNode = nil) or (SourceNode = nil) or (SenderNode = SourceNode) then
8448 if TObject(SenderNode.Data) is TFavoriteFolder then
8449 SourceNode.MoveTo(SenderNode, naAddChild)
8451 SourceNode.MoveTo(SenderNode, naInsert);
8455 procedure TGikoForm.FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
8459 FavoBoardItem: TFavoriteBoardItem;
8460 FavoThreadItem: TFavoriteThreadItem;
8462 ThreadItem: TThreadItem;
8465 if (SenderNode = nil) or (Source = nil) then
8468 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
8469 FavNode := SenderNode.Parent
8471 FavNode := SenderNode;
8475 if Source is TBoard then begin
8476 Board := TBoard( Source );
8477 FavoBoardItem := TFavoriteBoardItem.CreateWithItem( Board );
8478 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, FavoBoardItem);
8479 Node.ImageIndex := 15;
8480 Node.SelectedIndex := 15;
8481 end else if Source is TFavoriteBoardItem then begin
8482 FavoBoardItem := TFavoriteBoardItem( Source );
8483 Board := FavoBoardItem.Item;
8484 if Board <> nil then
8485 if not Board.IsThreadDatRead then
8486 GikoSys.ReadSubjectFile(Board);
8487 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, Source);
8488 Node.ImageIndex := 15;
8489 Node.SelectedIndex := 15;
8490 end else if Source is TThreadItem then begin
8491 ThreadItem := TThreadItem( Source );
8492 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
8493 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
8494 Node.ImageIndex := 16;
8495 Node.SelectedIndex := 16;
8496 end else if Source is TFavoriteThreadItem then begin
8497 FavoThreadItem := TFavoriteThreadItem( Source );
8498 ThreadItem := FavoThreadItem.Item;
8499 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, Source);
8500 Node.ImageIndex := 16;
8501 Node.SelectedIndex := 16;
8504 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
8506 FavoriteMoveTo( SenderNode, Node );
8510 procedure TGikoForm.FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
8513 SourceNode: TTreeNode;
8514 LinkToolButton: TLinkToolButton;
8517 if SenderNode = nil then
8520 if not (TObject( SenderNode.Data ) is TFavoriteFolder) then
8521 if FDropSpaceNode <> nil then
8522 SenderNode := FDropSpaceNode;
8524 if Source = FavoriteTreeView then begin
8526 SourceNode := FavoriteTreeView.Selected;
8527 FavoriteMoveTo( SenderNode, SourceNode );
8529 end else if Source is TLinkToolButton then begin
8531 LinkToolButton := TLinkToolButton( Source );
8532 //ShowMessage(LinkToolButton.Text);
8533 SourceNode := TreeNodeDataFind( FavoriteTreeView.TopItem, LinkToolButton.Data );
8534 FavoriteMoveTo( SenderNode, SourceNode );
8536 end else if Source = BrowserTab then begin
8538 idx := BrowserTab.TabIndex;
8539 FavoriteAddTo( SenderNode, BrowserTab.Tabs.Objects[idx] );
8541 end else if Source = ListView then begin
8543 FavoriteAddTo( SenderNode, ListView.Selected.Data );
8545 end else if Source = TreeView then begin
8547 FavoriteAddTo( SenderNode, TreeView.Selected.Data );
8555 procedure TGikoForm.FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
8558 SenderNode: TTreeNode;
8561 SenderNode := FavoriteTreeView.GetNodeAt(X, Y);
8562 if SenderNode <> nil then begin
8563 FavoriteDragDrop( SenderNode, Source );
8566 if FDropSpaceNode <> nil then begin
8567 FDropSpaceNode.Free;
8568 FDropSpaceNode := nil;
8573 procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
8574 Node: TTreeNode; var S: String);
8577 FavoriteTreeView.ReadOnly := True;
8582 procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
8583 Shift: TShiftState);
8589 FClickNode := FavoriteTreeView.Selected;
8590 FavoriteTreeViewRenameActionExecute( Sender );
8594 FClickNode := FavoriteTreeView.Selected;
8595 FavoriteTreeViewDeleteActionExecute( Sender );
8598 FavoriteClick( FavoriteTreeView.Selected );
8600 FavoriteTreeViewDblClick( Sender );
8605 procedure TGikoForm.FavoriteTreePopupMenuPopup(Sender: TObject);
8608 LinkToolButton: TLinkToolButton;
8611 if FavoriteTreePopupMenu.PopupComponent = FavoriteTreeView then begin
8613 FClickNode := FavoriteTreeView.Selected;
8615 end else if FavoriteTreePopupMenu.PopupComponent is TLinkToolButton then begin
8617 LinkToolButton := TLinkToolButton( FavoriteTreePopupMenu.PopupComponent );
8618 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
8619 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
8620 FClickNode := FavoriteTreeView.Items[i];
8624 for i := 0 to FClickNode.Count - 1 do begin
8625 if FClickNode.Item[i].Data = LinkToolButton.Data then begin
8626 FClickNode := FClickNode.Item[i];
8633 if FClickNode = nil then begin
8634 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
8635 FavoriteTreeDeletePopupMenu.Visible := False;
8636 FavoriteTreeRenamePopupMenu.Visible := False;
8637 FavoriteTreeNewFolderPopupMenu.Visible := False;
8638 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
8639 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
8640 FavoriteTreeURLCopyPopupMenu.Visible := False;
8641 FavoriteTreeNameCopyPopupMenu.Visible := False;
8642 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
8643 FavoriteTreeReloadPopupMenu.Visible := False;
8644 FavoriteTreeLogDeletePopupMenu.Visible := False;
8645 end else if FClickNode.IsFirstNode then begin
8646 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
8647 FavoriteTreeDeletePopupMenu.Visible := False;
8648 FavoriteTreeRenamePopupMenu.Visible := False;
8649 FavoriteTreeNewFolderPopupMenu.Visible := True;
8650 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
8651 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
8652 FavoriteTreeURLCopyPopupMenu.Visible := False;
8653 FavoriteTreeNameCopyPopupMenu.Visible := True;
8654 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
8655 FavoriteTreeReloadPopupMenu.Visible := False;
8656 FavoriteTreeLogDeletePopupMenu.Visible := False;
8657 end else if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
8658 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
8659 FavoriteTreeDeletePopupMenu.Visible := True;
8660 FavoriteTreeRenamePopupMenu.Visible := False;
8661 FavoriteTreeNewFolderPopupMenu.Visible := True;
8662 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
8663 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
8664 FavoriteTreeURLCopyPopupMenu.Visible := False;
8665 FavoriteTreeNameCopyPopupMenu.Visible := True;
8666 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
8667 FavoriteTreeReloadPopupMenu.Visible := False;
8668 FavoriteTreeLogDeletePopupMenu.Visible := False;
8669 end else if TObject(FClickNode.Data) is TFavoriteFolder then begin
8670 FavoriteTreeBrowseFolderPopupMenu.Visible := True;
8671 FavoriteTreeDeletePopupMenu.Visible := True;
8672 FavoriteTreeRenamePopupMenu.Visible := True;
8673 FavoriteTreeNewFolderPopupMenu.Visible := True;
8674 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
8675 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
8676 FavoriteTreeURLCopyPopupMenu.Visible := False;
8677 FavoriteTreeNameCopyPopupMenu.Visible := True;
8678 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
8679 FavoriteTreeReloadPopupMenu.Visible := False;
8680 FavoriteTreeLogDeletePopupMenu.Visible := False;
8681 end else if TObject(FClickNode.Data) is TFavoriteThreadItem then begin
8682 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
8683 FavoriteTreeDeletePopupMenu.Visible := True;
8684 FavoriteTreeRenamePopupMenu.Visible := True;
8685 FavoriteTreeNewFolderPopupMenu.Visible := True;
8686 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
8687 //FavoriteTreeBrowseThreadPopupMenu.Visible := True;
8688 FavoriteTreeURLCopyPopupMenu.Visible := True;
8689 FavoriteTreeNameCopyPopupMenu.Visible := True;
8690 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
8691 FavoriteTreeReloadPopupMenu.Visible := True;
8692 FavoriteTreeLogDeletePopupMenu.Visible := True;
8693 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
8694 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
8695 FavoriteTreeDeletePopupMenu.Visible := True;
8696 FavoriteTreeRenamePopupMenu.Visible := True;
8697 FavoriteTreeNewFolderPopupMenu.Visible := True;
8698 //FavoriteTreeBrowseBoardPopupMenu.Visible := True;
8699 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
8700 FavoriteTreeURLCopyPopupMenu.Visible := True;
8701 FavoriteTreeNameCopyPopupMenu.Visible := True;
8702 FavoriteTreeNameURLCopyPopupMenu.Visible := True;
8703 FavoriteTreeReloadPopupMenu.Visible := True;
8704 FavoriteTreeLogDeletePopupMenu.Visible := False;
8706 FavoriteTreeBrowseFolderPopupMenu.Visible := False;
8707 FavoriteTreeDeletePopupMenu.Visible := False;
8708 FavoriteTreeRenamePopupMenu.Visible := False;
8709 FavoriteTreeNewFolderPopupMenu.Visible := False;
8710 //FavoriteTreeBrowseBoardPopupMenu.Visible := False;
8711 //FavoriteTreeBrowseThreadPopupMenu.Visible := False;
8712 FavoriteTreeURLCopyPopupMenu.Visible := False;
8713 FavoriteTreeNameCopyPopupMenu.Visible := False;
8714 FavoriteTreeNameURLCopyPopupMenu.Visible := False;
8715 FavoriteTreeReloadPopupMenu.Visible := False;
8716 FavoriteTreeLogDeletePopupMenu.Visible := False;
8721 procedure TGikoForm.FavoriteTreeViewDeleteActionExecute(Sender: TObject);
8723 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';
8724 DEL_MSG = '
\81g^0
\81h
\82ð
\8dí
\8f\9c\82µ
\82Ü
\82·
\81B
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
8725 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
8728 if FClickNode = nil then
8730 if FClickNode.IsFirstNode then
8732 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
8733 if MsgBox(Handle, DEL_LINK_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION) <> ID_YES then
8735 end else if (GetKeyState( VK_SHIFT ) and $80000000) = 0 then begin
8736 if MsgBox(Handle, StringReplace( DEL_MSG, '^0', FClickNode.Text, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONQUESTION) <> ID_YES then
8740 //FDeleteList.Add(FClickNode.Data);
8741 //SetDeleteItemList(FClickNode);
8749 procedure TGikoForm.FavoriteTreeViewRenameActionExecute(Sender: TObject);
8754 if FClickNode = nil then
8756 if FClickNode.IsFirstNode then
8758 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then
8760 FavoriteTreeView.ReadOnly := False;
8761 if (FTreeType = gttFavorite) and (CabinetPanel.Visible) then begin
8762 node := FClickNode.Parent;
8763 while node <> nil do begin
8764 node.Expanded := True;
8765 node := node.Parent;
8767 FClickNode.EditText;
8769 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 );
8776 procedure TGikoForm.FavoriteTreeViewNewFolderActionExecute(
8779 NewFavFolder: TFavoriteFolder;
8783 if FClickNode = nil then
8787 if not (TObject(FClickNode.Data) is TFavoriteFolder) then begin
8788 FavoriteTreeView.Selected := FClickNode.Parent;
8789 FClickNode := FClickNode.Parent;
8792 NewFavFolder := TFavoriteFolder.Create;
8793 Node := FavoriteTreeView.Items.AddChildObject(FClickNode, '
\90V
\82µ
\82¢
\83t
\83H
\83\8b\83_', NewFavFolder);
8794 Node.ImageIndex := 14;
8795 Node.SelectedIndex := 14;
8796 // FClickNode.Selected.Expanded := True;
8797 FavoriteTreeView.Selected := Node;
8799 FavoriteTreeViewRenameAction.Execute;
8805 procedure TGikoForm.ToolButton19Click(Sender: TObject);
8808 FavoriteArrangeActionExecute( nil );
8812 procedure TGikoForm.FavoriteBrowseFolder( node: TTreeNode );
8817 if not (TObject(node.Data) is TFavoriteFolder) then
8820 for i := 0 to node.Count - 1 do
8822 if TObject(node.Item[i].Data) is TFavoriteFolder then
8823 FavoriteBrowseFolder( node.Item[i] )
8824 else if TObject(node.Item[i].Data) is TFavoriteThreadItem then
8825 FavoriteClick( node.Item[i], False );
8830 procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
8834 FavoriteBrowseFolder( FClickNode );
8835 BrowserTab.OnChange(nil);
8839 procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
8842 FClickNode := FavoriteTreeView.Selected;
8843 FavoriteTreeViewReloadActionExecute( Sender );
8847 procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
8850 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';
8851 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
8853 ThreadItem: TThreadItem;
8854 FavThread: TFavoriteThreadItem;
8857 if FClickNode = nil then Exit;
8858 if not (TObject(FClickNode.Data) is TFavoriteThreadItem) then Exit;
8860 FavThread := TFavoriteThreadItem( FClickNode.Data );
8861 ThreadItem := FavThread.Item;
8864 if GikoSys.Setting.DeleteMsg then begin
8865 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
8869 DeleteHistory(ThreadItem);
8870 DeleteTab(ThreadItem);
8871 ThreadItem.DeleteLogFile;
8879 procedure TGikoForm.FavoriteTreeViewReloadActionExecute(Sender: TObject);
8881 ThreadItem: TThreadItem;
8882 FavThread: TFavoriteThreadItem;
8884 FavBoard: TFavoriteBoardItem;
8887 if FClickNode = nil then Exit;
8889 if TObject( FClickNode.Data ) is TFavoriteThreadItem then begin
8890 FavThread := TFavoriteThreadItem( FClickNode.Data );
8891 ThreadItem := FavThread.Item;
8892 if ThreadItem <> nil then
8893 DownloadContent(ThreadItem);
8894 end else if TObject( FClickNode.Data ) is TFavoriteBoardItem then begin
8895 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8896 Board := FavBoard.Item;
8897 DownloadList(Board);
8902 procedure TGikoForm.FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
8904 FavThread : TFavoriteThreadItem;
8905 FavBoard : TFavoriteBoardItem;
8909 if FClickNode = nil then Exit;
8911 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8913 FavThread := TFavoriteThreadItem( FClickNode.Data );
8914 s := FavThread.URL + #13#10;
8916 Clipboard.AsText := s;
8918 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8920 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8921 s := FavBoard.URL + #13#10;
8923 Clipboard.AsText := s;
8929 procedure TGikoForm.FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
8931 ThreadItem: TThreadItem;
8932 FavThread: TFavoriteThreadItem;
8934 FavBoard: TFavoriteBoardItem;
8938 if FClickNode = nil then Exit;
8940 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8942 FavThread := TFavoriteThreadItem( FClickNode.Data );
8943 ThreadItem := FavThread.Item;
8946 s := ThreadItem.Title + #13#10;
8948 Clipboard.AsText := s;
8952 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8954 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8955 Board := FavBoard.Item;
8956 if Board <> nil then
8957 if not Board.IsThreadDatRead then
8958 GikoSys.ReadSubjectFile(Board);
8961 s := Board.Title + #13#10;
8963 Clipboard.AsText := s;
8971 procedure TGikoForm.FavoriteTreeViewNameURLCopyActionExecute(
8974 ThreadItem: TThreadItem;
8975 FavThread: TFavoriteThreadItem;
8977 FavBoard: TFavoriteBoardItem;
8981 if FClickNode = nil then Exit;
8983 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8985 FavThread := TFavoriteThreadItem( FClickNode.Data );
8986 ThreadItem := FavThread.Item;
8989 s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10;
8991 Clipboard.AsText := s;
8995 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8997 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8998 Board := FavBoard.Item;
8999 if Board <> nil then
9000 if not Board.IsThreadDatRead then
9001 GikoSys.ReadSubjectFile(Board);
9004 s := Board.URL + #13#10 + Board.Title + #13#10;
9006 Clipboard.AsText := s;
9014 function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
9020 for i := 0 to Node.Count - 1 do begin
9021 if Node.Item[i].Data = FindPointer then begin
9022 Result := Node.Item[i];
9024 end else if Node.Item[i].Count > 0 then begin
9025 Found := TreeNodeDataFind( Node.Item[i], FindPointer );
9026 if Found <> nil then begin
9037 procedure TGikoForm.LinkToolBarDragDrop(Sender, Source: TObject; X,
9041 SenderNode: TTreeNode;
9045 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
9046 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
9047 SenderNode := FavoriteTreeView.Items[i];
9052 FavoriteDragDrop( SenderNode, Source );
9056 procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
9057 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
9059 if FDragWFirst <> true then begin
9060 FDragWFirst := false;
9061 end else if (X = FMouseDownPos.X) and (Y = FMouseDownPos.Y) then begin
9062 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
9063 if GikoSys.Setting.ListWidthState = glsMin then begin
9064 BrowserMaxAction.Execute;
9065 if GikoForm.Visible then
9069 if GikoSys.Setting.ListHeightState = glsMin then begin
9070 BrowserMaxAction.Execute;
9071 if GikoForm.Visible then
9078 procedure TGikoForm.LinkToolBarDragOver(Sender, Source: TObject; X,
9079 Y: Integer; State: TDragState; var Accept: Boolean);
9082 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
9086 procedure TGikoForm.OnlyAHundredResExecute(Sender: TObject);
9088 ThreadItem : TThreadItem;
9090 GikoSys.OnlyAHundredRes := OnlyAHundredRes.Checked;
9091 ThreadItem := GetActiveContent;
9092 if ThreadItem <> nil then
9093 SetContent( ThreadItem );
9096 procedure TGikoForm.FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
9100 if FDropSpaceNode <> nil then begin
9101 FDropSpaceNode.Free;
9102 FDropSpaceNode := nil;
9108 procedure TGikoForm.ListCoolBarContextPopup(Sender: TObject;
9109 MousePos: TPoint; var Handled: Boolean);
9112 FToolBarSettingSender := tssList;
9113 MousePos := ListCoolBar.ClientToScreen( MousePos );
9114 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9118 procedure TGikoForm.MainCoolBarContextPopup(Sender: TObject;
9119 MousePos: TPoint; var Handled: Boolean);
9122 FToolBarSettingSender := tssMain;
9123 MousePos := MainCoolBar.ClientToScreen( MousePos );
9124 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9128 procedure TGikoForm.BrowserCoolBarContextPopup(Sender: TObject;
9129 MousePos: TPoint; var Handled: Boolean);
9132 FToolBarSettingSender := tssBrowser;
9133 MousePos := BrowserCoolBar.ClientToScreen( MousePos );
9134 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
9137 procedure TGikoForm.ExportFavoriteFileAccept(Sender: TObject);
9139 if FavoriteDM.SaveFavoriteFile( ExportFavoriteFile.Dialog.FileName ) Then begin
9140 ShowMessage('
\83t
\83@
\83C
\83\8b\82ð
\8fo
\97Í
\82µ
\82Ü
\82µ
\82½');
9142 ShowMessage('
\83t
\83@
\83C
\83\8b\82Ì
\8fo
\97Í
\82É
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½');
9145 procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
9147 if FListViewBackGroundColor <> value then begin
9148 FListViewBackGroundColor := value;
9149 ListView.Color := FListViewBackGroundColor;
9152 procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
9154 ExportFavoriteFile.Dialog.FileName := FavoriteDM.GetFavoriteFilePath;
9157 procedure TGikoForm.CabinetBBSActionExecute(Sender: TObject);
9160 if CabinetPanel.Visible then begin
9161 if FTreeType = gtt2ch then begin
9162 CabinetVisible( False );
9164 CabinetBBSAction.Checked := False;
9166 CabinetBBSAction.Checked := True;
9169 CabinetVisible( True );
9170 CabinetBBSAction.Checked := True;
9173 if FActiveBBS = nil then
9174 ShowBBSTree( BBSs[ 0 ] )
9176 ShowBBSTree( FActiveBBS );
9180 procedure TGikoForm.FavoriteTreeViewBrowseThreadActionExecute(
9183 threadItem : TThreadItem;
9186 if FClickNode = nil then Exit;
9188 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9190 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9191 if threadItem = nil then
9193 GikoSys.OpenBrowser( threadItem.URL, gbtAuto );
9199 procedure TGikoForm.FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
9201 threadItem : TThreadItem;
9205 if FClickNode = nil then Exit;
9207 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
9209 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
9210 if threadItem = nil then
9212 GikoSys.OpenBrowser( threadItem.ParentBoard.URL, gbtAuto );
9214 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
9216 boardItem := TFavoriteBoardItem( FClickNode.Data ).Item;
9217 if boardItem = nil then
9219 GikoSys.OpenBrowser( boardItem.URL, gbtAuto );
9225 procedure TGikoForm.UpBoardActionExecute(Sender: TObject);
9228 SelectTreeNode( GetActiveContent.ParentBoard, True );
9232 procedure TGikoForm.UpBoardActionUpdate(Sender: TObject);
9235 UpBoardAction.Enabled := GetActiveContent <> nil;
9239 procedure TGikoForm.BrowserTabContextPopup(Sender: TObject;
9240 MousePos: TPoint; var Handled: Boolean);
9244 idx := BrowserTab.IndexOfTabAt(MousePos.X, MousePos.Y);
9245 if BrowserTab.TabIndex <> idx then begin
9246 BrowserTab.TabIndex := idx;
9247 BrowserTab.OnChange(nil);
9252 procedure TGikoForm.KoreCopyExecute(Sender: TObject);
9254 KonoresCopy(KokoPopupMenu.Tag, true);
9256 procedure TGikoForm.KonoresCopy(Number: Integer; ReplaceTag : Boolean);
9258 ThreadItem: TThreadItem;
9264 boardPlugIn : TBoardPlugIn;
9266 if Number = 0 then Exit;
9267 ThreadItem := GetActiveContent;
9269 if ThreadItem <> nil then begin
9270 if ThreadItem.IsBoardPlugInAvailable then begin
9271 //=====
\83v
\83\89\83O
\83C
\83\93\82É
\82æ
\82é
\95\
\8e¦
9272 boardPlugIn := ThreadItem.BoardPlugIn;
9274 //
\83t
\83H
\83\93\83g
\82â
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
9275 //
\95¶
\8e\9a\83R
\81[
\83h
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94C
\82¹
\82é
9276 //
\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
9277 tmp := boardPlugIn.GetDat( DWORD( threadItem ), Number );
9279 FileName := ThreadItem.FilePath;
9280 tmp := GikoSys.ReadThreadFile(FileName, Number);
9282 if tmp <> '' then begin
9283 Res := GikoSys.DivideStrLine(tmp);
9285 Header := IntToStr(Number) + '
\81F' + Res.FName + '
\81F' + Res.FDateTime + #13#10;
9286 if ReplaceTag then begin
9287 Header := CustomStringReplace(Header, '</b>', '',true);
9288 Header := CustomStringReplace(Header, '<b>', '',true);
9291 Body := CustomStringReplace(Res.FBody, '<br> ', #13#10,true);
9292 Body := CustomStringReplace(Body, '<br>', #13#10,true);
9293 Body := CustomStringReplace(Body, '</a>', '',true);
9295 Body := GikoSys.DeleteLink(Body);
9296 if ReplaceTag then begin
9297 Body := CustomStringReplace(Body, '<', '<');
9298 Body := CustomStringReplace(Body, '>', '>');
9299 Body := CustomStringReplace(Body, '"', '"');
9300 Body := CustomStringReplace(Body, '&', '&');
9301 Body := CustomStringReplace(Body, ' ', ' ');
9304 Header := Header + Body;
9306 Clipboard.SetTextBuf( PChar(Header) );
9312 procedure TGikoForm.BrowserTabPopupMenuPopup(Sender: TObject);
9314 AddRoundNameMenu(dummy1);
9317 procedure TGikoForm.FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
9319 FavoriteDM.URLReplace(oldURLs, newURLs);
9322 procedure TGikoForm.RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
9324 RoundList.URLReplace(oldURLs, newURLs);
9327 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82é
9328 procedure TGikoForm.OnMinimize;
9330 FIsMinimize := mtMinimizing;
9331 if FActiveContent <> nil then
9332 FActiveContent.ScrollTop := OleVariant(IHTMLDocument2(Browser.Document)).Body.ScrollTop;
9333 PostMessage( Handle, USER_MINIMIZED, 0, 0 );
9336 //
\8dÅ
\8f¬
\89»
\82³
\82ê
\82½
9337 procedure TGikoForm.OnMinimized;
9339 FIsMinimize := mtMinimized;
9340 FIsIgnoreResize := False;
9343 procedure TGikoForm.CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
9348 affectedBand : TCoolBand;
9351 if (FOldFormWidth = Width) and not IsIconic( Handle ) and not FIsIgnoreResize then begin
9352 FIsIgnoreResize := True;
9353 PostMessage( Handle, USER_RESIZED, 0, 0 );
9354 if not (Sender is TToolBar) or (CoolBar = nil) then
9356 toolbar := TToolBar( Sender );
9358 //
\95Ï
\8dX
\82³
\82ê
\82½
\83N
\81[
\83\8b\83o
\81[
\82Ì
\92l
\82ð
\95Û
\91¶
9359 if CoolBar = MainCoolBar then begin
9360 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
9361 CoolSet.FCoolID := CoolBar.Bands[i].ID;
9362 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
9363 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
9364 GikoSys.Setting.MainCoolSet[i] := CoolSet;
9366 end else if CoolBar = ListCoolBar then begin
9367 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
9368 CoolSet.FCoolID := CoolBar.Bands[i].ID;
9369 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
9370 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
9371 GikoSys.Setting.ListCoolSet[i] := CoolSet;
9373 end else if CoolBar = BrowserCoolBar then begin
9374 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
9375 CoolSet.FCoolID := CoolBar.Bands[i].ID;
9376 CoolSet.FCoolWidth := CoolBar.Bands[i].Width;
9377 CoolSet.FCoolBreak := CoolBar.Bands[i].Break;
9378 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
9381 //
\95\9d\82Ì
\95Ï
\8dX
\82³
\82ê
\82½
\83o
\83\93\83h
\82ð
\8c©
\82Â
\82¯
\82é
9382 affectedBand := nil;
9383 for i := CoolBar.Bands.Count - 1 downto 0 do begin
9384 if CoolBar.Bands[ i ].Control.Handle = toolbar.Handle then begin
9385 band := CoolBar.Bands[ i ];
9386 if band.Break or (i = 0) then begin
9387 if i + 1 < CoolBar.Bands.Count then
9388 if not CoolBar.Bands[ i + 1 ].Break then
9389 affectedBand := CoolBar.Bands[ i + 1 ];
9392 affectedBand := CoolBar.Bands[ i - 1 ];
9397 //
\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·
9398 if CoolBar = MainCoolBar then begin
9399 coolSet := GikoSys.Setting.MainCoolSet[ band.ID ];
9400 coolSet.FCoolWidth := toolbar.Width + 25;
9401 GikoSys.Setting.MainCoolSet[ band.ID ] := coolSet;
9402 if affectedBand <> nil then begin
9403 coolSet := GikoSys.Setting.MainCoolSet[ affectedBand.ID ];
9404 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
9405 GikoSys.Setting.MainCoolSet[ affectedBand.ID ] := coolSet;
9407 end else if CoolBar = ListCoolBar then begin
9408 coolSet := GikoSys.Setting.ListCoolSet[ band.ID ];
9409 coolSet.FCoolWidth := toolbar.Width + 25;
9410 GikoSys.Setting.ListCoolSet[ band.ID ] := coolSet;
9411 if affectedBand <> nil then begin
9412 coolSet := GikoSys.Setting.ListCoolSet[ affectedBand.ID ];
9413 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
9414 GikoSys.Setting.ListCoolSet[ affectedBand.ID ] := coolSet;
9416 end else if CoolBar = BrowserCoolBar then begin
9417 coolSet := GikoSYs.Setting.BrowserCoolSet[ band.ID ];
9418 coolSet.FCoolWidth := toolbar.Width + 25;
9419 GikoSys.Setting.BrowserCoolSet[ band.ID ] := coolSet;
9420 if affectedBand <> nil then begin
9421 coolSet := GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ];
9422 coolSet.FCoolWidth := affectedBand.Control.Width + 25;
9423 GikoSys.Setting.BrowserCoolSet[ affectedBand.ID ] := coolSet;
9429 procedure TGikoForm.MenuToolBarResize(Sender: TObject);
9431 CoolBarResized( Sender, MainCoolBar );
9434 procedure TGikoForm.StdToolBarResize(Sender: TObject);
9436 CoolBarResized( Sender, MainCoolBar );
9439 procedure TGikoForm.LinkToolBarResize(Sender: TObject);
9441 CoolBarResized( Sender, MainCoolBar );
9444 procedure TGikoForm.ListNameToolBarResize(Sender: TObject);
9446 CoolBarResized( Sender, ListCoolBar );
9449 procedure TGikoForm.ListToolBarResize(Sender: TObject);
9451 CoolBarResized( Sender, ListCoolBar );
9454 procedure TGikoForm.BrowserNameToolBarResize(Sender: TObject);
9456 CoolBarResized( Sender, BrowserCoolBar );
9459 procedure TGikoForm.BrowserToolBarResize(Sender: TObject);
9461 CoolBarResized( Sender, BrowserCoolBar );
9464 procedure TGikoForm.BrowserTabResize(Sender: TObject);
9466 CoolBarResized( Sender, BrowserCoolBar );
9469 // *************************************************************************
9470 // ExternalBoardPlugInMain
9471 //
\83v
\83\89\83O
\83C
\83\93\83\81\83j
\83\85\81[
\82Ì
\8d\80\96Ú
\82ª
\8eÀ
\8ds
\82³
\82ê
\82½
9472 // *************************************************************************
9473 procedure TGikoForm.OnPlugInMenuItem( Sender : TObject );
9476 boardPlugIn : TBoardPlugIn;
9479 if not (Sender is TMenuItem) then
9482 item := TMenuItem( Sender );
9483 if not Assigned( Pointer( item.Tag ) ) then
9486 //
\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·
9487 boardPlugIn := TBoardPlugIn( item.Tag );
9488 boardPlugIn.PlugInMenu( item.Handle );
9492 procedure TGikoForm.ListViewClick(Sender: TObject);
9497 // TreeView
\82ª
\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
9498 procedure TGikoForm.TreeClick( Node : TTreeNode );
9506 if FTreeType = gttHistory then begin
9508 if TObject( Node.Data ) is TFavoriteThreadItem then
9509 if GetActiveContent <> TFavoriteThreadItem( Node.Data ).Item then
9510 FavoriteClick( Node );
9514 if GetActiveList is TBBS then begin
9515 for i := 0 to ListView.Columns.Count - 1 do
9516 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
9517 end else if GetActiveList is TCategory then begin
9518 for i := 0 to ListView.Columns.Count - 1 do
9519 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
9520 end else if GetActiveList is TBoard then begin
9521 for i := 0 to ListView.Columns.Count - 1 do
9522 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
9525 if TObject(Node.Data) is TBBS then begin
9526 SetActiveList(Node.data);
9527 end else if TObject(Node.Data) is TCategory then begin
9528 SetActiveList(Node.data);
9529 end else if TObject(Node.Data) is TBoard then begin
9530 if not TBoard(Node.Data).IsThreadDatRead then begin
9531 Screen.Cursor := crHourGlass;
9533 if not TBoard(Node.Data).IsThreadDatRead then
9534 GikoSys.ReadSubjectFile(Node.Data);
9536 Screen.Cursor := crDefault;
9539 SetActiveList(Node.data);
9544 // TreeView
\82ª
\83_
\83u
\83\8b\83N
\83\8a\83b
\83N
\82³
\82ê
\82½
9545 procedure TGikoForm.TreeDoubleClick( Node : TTreeNode );
9548 ThreadItem : TThreadItem;
9551 if Node = nil then Exit;
9553 if FTreeType = gtt2ch then begin
9554 if not (TObject(Node.Data) is TBoard) then Exit;
9555 Board := TBoard(Node.Data);
9556 DownloadList(Board);
9557 end else if FTreeType = gttHistory then begin
9558 if not (TObject(Node.Data) is TFavoriteThreadItem) then Exit;
9559 ThreadItem := TFavoriteThreadItem(Node.Data).Item;
9560 DownloadContent(ThreadItem);
9565 procedure TGikoForm.TreeViewClick(Sender: TObject);
9567 TreeClick( TreeView.Selected );
9570 procedure TGikoForm.TreeViewKeyDown(Sender: TObject; var Key: Word;
9571 Shift: TShiftState);
9573 if Key = VK_BACK then begin
9574 // UpFolderButtonClick(Sender);
9575 end else if Key = VK_SPACE then begin
9576 TreeDoubleClick( TreeView.Selected );
9577 end else if Key = VK_RETURN then begin
9578 TreeClick( TreeView.Selected );
9582 //
\83u
\83\89\83E
\83U
\82Ì
\83L
\81[
\83_
\83E
\83\93\83C
\83x
\83\93\83g
9583 //
\83C
\83x
\83\93\83g
\82ð
\8eæ
\82è
\88µ
\82Á
\82½
\8fê
\8d\87\82Í True
\82ð
\95Ô
\82·
9584 function TGikoForm.BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
9586 iOIPAO : IOleInPlaceActiveObject;
9587 Dispatch : IDispatch;
9590 if Key = VK_BACK then begin
9591 UpBoardAction.Execute;
9593 end else if Key in [VK_ESCAPE..VK_HELP] then begin
9594 //
\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
9597 //
\82»
\82ê
\88È
\8aO
\82Ì
\83C
\83x
\83\93\83g
\82Í Browser
\82É
\97¬
\82·
9598 Dispatch := Browser.Application;
9599 if Dispatch <> nil then
9600 Dispatch.QueryInterface( IOleInPlaceActiveObject, iOIPAO );
9601 if iOIPAO <> nil then
9602 iOIPAO.TranslateAccelerator( Msg );
9604 //
\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¢
9610 //
\83M
\83R
\83i
\83r
\82Ì
\83\81\83b
\83Z
\81[
\83W
\83\8b\81[
\83v
\82ð
\89¡
\8eæ
\82è
\82µ
\82Ü
\82·
9611 procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
9618 if IsDialogMessage( Browser.Handle, Msg ) then begin
9620 Handled := BrowserKeyDown( Msg, key, KeyDataToShiftState( Msg.lParam ) );
9623 case Msg.wParam shr 16 of
9625 if IsDialogMessage( Browser.Handle, Msg ) then begin
9626 UpBoardAction.Execute;
9628 end else if IsDialogMessage( ListView.Handle, Msg ) then begin
9629 UpFolderAction.Execute;
9638 procedure TGikoForm.FavoriteTreeViewMouseDown(Sender: TObject;
9639 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
9641 favItem : TTreeNode;
9642 favThreadItem : TFavoriteThreadItem;
9648 FMouseDownPos.X := X;
9649 FMouseDownPos.Y := Y;
9653 favItem := FavoriteTreeView.GetNodeAt( X, Y );
9654 if favItem = nil then Exit;
9656 if TObject( favItem.Data ) is TFavoriteThreadItem then begin
9657 favThreadItem := TFavoriteThreadItem( favItem.Data );
9658 if favThreadItem.Item <> nil then
9659 InsertBrowserTab( favThreadItem.Item );
9666 procedure TGikoForm.MessagePanelResize(Sender: TObject);
9669 if FIsIgnoreResize then
9672 if GikoSys.Setting.ListOrientation = gloVertical then begin
9673 if GikoSys.Setting.ListHeightState = glsMin then begin
9674 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
9675 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
9681 procedure TGikoForm.OnResized;
9684 FOldFormWidth := Width;
9685 FIsIgnoreResize := False;
9689 procedure TGikoForm.TreeSelectNameCopyExecute(Sender: TObject);
9693 TreeView.Selected := FClickNode;
9694 s := FClickNode.Text;
9695 Clipboard.AsText := s;
9698 procedure TGikoForm.FavoriteTreeViewMouseUp(Sender: TObject;
9699 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
9702 if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold) and
9703 (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
9704 FavoriteClick( TObject( FavoriteTreeView.Selected ) );