6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7 OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils, Math,
15 IdHTTP, ActiveX, Clipbrd, Buttons, ToolWin, {HTTPApp,} YofUtils, IdComponent,
16 ShellAPI, ImgList, ActnList, UrlMon, Tabs, IdGlobal, StrUtils,
18 GikoSystem, GikoUtil, Setting, BoardGroup, ThreadControl, ItemDownload,
19 Editor, RoundData, RoundName, KeySetting, GikoPanel, Favorite, FavoriteAdd,
20 FavoriteArrange, AddressHistory, Preview, HTMLDocumentEvent, Kotehan,
21 HintWindow, GikoCoolBar, GikoListView, ToolBarSetting, ToolBarUtil,
22 IndividualAbon, Dialogs, Search, ExternalBoardManager, ExternalBoardPlugInMain,
26 TGikoTreeType = (gttNone, gtt2ch, gttHistory, gttFavorite);
28 TGikoForm = class(TForm)
29 StatusBar: TStatusBar;
32 TreeSplitter: TSplitter;
35 ThreadMainPanel: TPanel;
36 ListSplitter: TSplitter;
38 ListView: TGikoListView;
43 MessageHideButton: TSpeedButton;
44 MessageListView: TListView;
45 MessageSplitter: TSplitter;
47 SpeedButton1: TSpeedButton;
49 CabinetSelectToolButton: TToolButton;
50 HistoryToolBar: TToolBar;
51 ToolButton15: TToolButton;
52 ToolButton18: TToolButton;
53 ItemIcon16: TImageList;
54 ItemIcon32: TImageList;
55 HotToobarImageList: TImageList;
56 ToobarImageList: TImageList;
57 ItemImageList: TImageList;
58 ActionList: TActionList;
59 LogDeleteAction: TAction;
60 KidokuAction: TAction;
61 StdToolBarVisibleAction: TAction;
62 SearchAction: TAction;
63 GikoNaviWebPageAction: TAction;
66 MsgBarVisibleAction: TAction;
67 StatusBarVisibleAction: TAction;
68 LargeIconAction: TAction;
69 SmallIconAction: TAction;
70 ListIconAction: TAction;
71 DetailIconAction: TAction;
72 CabinetBBSAction: TAction;
73 CabinetHistoryAction: TAction;
74 CabinetVisibleAction: TAction;
75 MidokuAction: TAction;
76 AllSelectAction: TAction;
77 UpFolderAction: TAction;
78 ListNumberVisibleAction: TAction;
79 AllItemAction: TAction;
80 LogItemAction: TAction;
81 NewItemAction: TAction;
82 SelectItemAction: TAction;
83 ShowThreadAction: TAction;
87 DeleteMenu: TMenuItem;
89 KidokuMenu: TMenuItem;
90 MidokuMenu: TMenuItem;
91 AllSelectMenu: TMenuItem;
93 StdToolBarMenu: TMenuItem;
94 CabinetMenu: TMenuItem;
97 CabinetVisibleMenu: TMenuItem;
98 MessageMenu: TMenuItem;
99 StatusBarMenu: TMenuItem;
101 LargeIconMenu: TMenuItem;
102 SmallIconMenu: TMenuItem;
104 DetailMenu: TMenuItem;
107 RoundMenu: TMenuItem;
109 OptionMenu: TMenuItem;
113 AboutMenu: TMenuItem;
115 BrowserPopupMenu: TPopupMenu;
116 ShowThreadMenu: TMenuItem;
117 ShowBoardMenu: TMenuItem;
118 ShowBoardAction: TAction;
119 ListIconPopupMenu: TPopupMenu;
120 LargeIconPMenu: TMenuItem;
121 SmallIconPMenu: TMenuItem;
122 ListPMenu: TMenuItem;
123 DetailPMenu: TMenuItem;
124 CabinetCloseAction: TAction;
125 ClosePopupMenu: TPopupMenu;
126 CloseMenu: TMenuItem;
127 OptionAction: TAction;
137 RoundAction: TAction;
138 ListPopupMenu: TPopupMenu;
139 ListRoundPMenu: TMenuItem;
140 ListReservPMenu: TMenuItem;
142 ItemRoundPMenu: TMenuItem;
144 KidokuPMenu: TMenuItem;
145 MidokuPMenu: TMenuItem;
146 AllSelectPMenu: TMenuItem;
147 UrlCopyPMenu: TMenuItem;
149 DeletePMenu: TMenuItem;
151 ViewPMenu: TMenuItem;
152 LargeIconLPMenu: TMenuItem;
153 SmallIconLPMenu: TMenuItem;
154 ListLPMenu: TMenuItem;
155 DetailLPMenu: TMenuItem;
159 URLCopyAction: TAction;
163 MsgBarCloseAction: TAction;
164 ScrollTopAction: TAction;
165 ScrollLastAction: TAction;
166 ScrollNewAction: TAction;
167 ScrollKokoAction: TAction;
168 EditorAction: TAction;
170 ItemReloadAction: TAction;
171 BrowserMaxAction: TAction;
183 SelectListReloadAction: TAction;
184 SelectThreadReloadAction: TAction;
186 KokoPopupMenu: TPopupMenu;
187 KokomadePMenu: TMenuItem;
189 MenuItem1: TMenuItem;
190 MenuItem2: TMenuItem;
191 BrowserTabCloseAction: TAction;
192 BrowserTabPopupMenu: TPopupMenu;
194 KokomadeAction: TAction;
195 ZenbuAction: TAction;
196 KokoResAction: TAction;
197 SelectItemURLCopyAction: TAction;
198 SelectReservAction: TAction;
199 NotSelectTabCloseAction: TAction;
203 TreePopupMenu: TPopupMenu;
204 TreeSelectThreadPupupMenu: TMenuItem;
205 TreeSelectBoardPupupMenu: TMenuItem;
207 TreeSelectURLPupupMenu: TMenuItem;
208 TreeSelectBoradReload: TAction;
209 TreeSelectThreadReload: TAction;
210 TreeSelectURLCopy: TAction;
211 ListToolBarVisibleAction: TAction;
212 BrowserToolBarVisibleAction: TAction;
216 BrowserBottomPanel: TGikoPanel;
217 CabinetSelectPopupMenu: TPopupMenu;
219 ItemReservPMenu: TMenuItem;
220 RoundNamePopupMenu: TPopupMenu;
221 SelectNewRoundName: TAction;
222 SelectDeleteRound: TAction;
223 NewBoardAction: TAction;
226 LoginAction: TAction;
228 KeySettingAction: TAction;
230 AllTabCloseAction: TAction;
238 MessageImageList: TImageList;
239 ProgressBar: TProgressBar;
240 ArrangeAction: TAction;
242 NameURLCopyAction: TAction;
243 SelectItemNameURLCopyAction: TAction;
244 NameUrlCopyPMenu: TMenuItem;
252 ListCoolBar: TGikoCoolBar;
253 ListToolBar: TToolBar;
254 ViewNoButton: TToolButton;
255 IconToolButton: TToolButton;
256 UpFolderButton: TToolButton;
257 Sepa01ToolButton: TToolButton;
258 AllItemToolButton: TToolButton;
259 LogItemToolButton: TToolButton;
260 NewItemToolButton: TToolButton;
261 ListDownloadToolButton: TToolButton;
262 ListThreadDownloadToolButton: TToolButton;
263 ToolButton2: TToolButton;
264 ToolButton1: TToolButton;
265 BrowserCoolBar: TGikoCoolBar;
266 BrowserToolBar: TToolBar;
267 BrowserSizeButton: TToolButton;
268 ToolButton3: TToolButton;
269 TopButton: TToolButton;
270 LastBotton: TToolButton;
271 NewButton: TToolButton;
272 KokoButton: TToolButton;
273 ToolButton9: TToolButton;
274 EditorButton: TToolButton;
275 ToolButton11: TToolButton;
276 IEButton: TToolButton;
277 ToolButton5: TToolButton;
278 ItemReloadButton: TToolButton;
279 ListNameToolBar: TToolBar;
280 ListNameLabel: TLabel;
282 BrowserNameToolBar: TToolBar;
283 ItemBoardImage: TImage;
284 BrowserBoardNameLabel: TLabel;
286 BrowserNameLabel: TLabel;
287 ActiveLogDeleteAction: TAction;
291 ListNameBarVisibleAction: TAction;
293 BrowserNameBarVisibleAction: TAction;
296 TreeSelectNameURLCopy: TAction;
297 TreeSelectNameURLPupupMenu: TMenuItem;
300 PaneInitAction: TAction;
302 BrowserTabToolBar: TToolBar;
303 BrowserTab: TTabControl;
304 ToolButton7: TToolButton;
305 BrowserMinAction: TAction;
308 SelectTextClearAction: TAction;
309 MailTextClearAction: TAction;
310 NameTextClearAction: TAction;
314 LeftmostTabSelectAction: TAction;
315 LeftTabSelectAction: TAction;
316 RightTabSelectAction: TAction;
317 RightmostTabSelectAction: TAction;
323 FavoriteMenu: TMenuItem;
324 FavoriteAddAction: TAction;
326 BoardFavoriteAddMenu: TMenuItem;
327 BoardFavoriteAddAction: TAction;
328 ThreadFavoriteAddAction: TAction;
329 ThreadFavoriteAddMenu: TMenuItem;
330 TreeSelectFavoriteAddAction: TAction;
332 TreeSelectFavoriteAddPupupMenu: TMenuItem;
333 FavoriteArrangeAction: TAction;
334 FavoriteTreeView: TTreeView;
335 StateIconImageList: TImageList;
337 TopRightPanel: TPanel;
340 TopCoolPanel: TPanel;
341 MainCoolBar: TGikoCoolBar;
342 MenuToolBar: TToolBar;
343 StdToolBar: TToolBar;
344 RoundToolButton: TToolButton;
345 ToolButton6: TToolButton;
346 ToolButton4: TToolButton;
347 ToolButton13: TToolButton;
348 AbortToolButton: TToolButton;
349 LoginToolButton: TToolButton;
350 AddressToolBar: TToolBar;
351 AddressComboBox: TComboBox;
352 MoveToToolButton: TToolButton;
353 MoveToAction: TAction;
354 AddressImageList: TImageList;
355 AddressBarVisibleAction: TAction;
356 AddressToolBarMenu: TMenuItem;
358 BrowserTabVisibleAction: TAction;
361 BrowserTabTopAction: TAction;
362 BrowserTabBottomAction: TAction;
366 BrowserTabTabStyleAction: TAction;
367 BrowserTabButtonStyleAction: TAction;
368 BrowserTabFlatStyleAction: TAction;
372 PreviewTimer: TTimer;
373 MonazillaWebPageAction: TAction;
374 MonazillaWebPageAction1: TMenuItem;
375 GikoHelpAction: TAction;
378 KotehanAction: TAction;
380 LinkBarVisibleAction: TAction;
384 ChevronPopupMenu: TPopupMenu;
385 BBS2chWebPageAction: TAction;
388 GikoFolderOpenAction: TAction;
390 LinkToolBar: TToolBar;
392 ToolButton8: TToolButton;
393 ToolButton10: TToolButton;
394 ThreadEditorAction: TAction;
398 LinkBarPopupMenu: TPopupMenu;
399 ToolBarSettingAction: TAction;
401 ToolButton12: TToolButton;
402 ToolButton14: TToolButton;
403 ThreadPopupMenu: TPopupMenu;
404 MenuItem4: TMenuItem;
405 MenuItem5: TMenuItem;
406 MenuItem6: TMenuItem;
408 NameCopyAction: TAction;
409 BoardIEAction: TAction;
411 SelectItemNameCopyAction: TAction;
412 SelectItemNameCopyAction1: TMenuItem;
416 SelectComboBox: TComboBox;
417 MainCoolBarPopupMenu: TPopupMenu;
418 StdToolBarVisiblePMenu: TMenuItem;
419 AddressToolBarVisiblePMenu: TMenuItem;
420 LinkToolBarVisiblePMenu: TMenuItem;
441 SelectItemToolButton: TToolButton;
442 SelectResToolButton: TToolButton;
443 SelectResAction: TAction;
444 ToolButton16: TToolButton;
445 AllResAction: TAction;
446 AllResToolButton: TToolButton;
454 ReloadAction: TAction;
455 GoFowardAction: TAction;
456 GoBackAction: TAction;
457 SelectComboBoxSplitter: TImage;
458 IndividualAbon1: TMenuItem;
460 IndividualAbon2: TMenuItem;
462 CancellIndividualAbon: TAction;
463 AntiIndividualAbon: TMenuItem;
468 SearchBoardName: TMenuItem;
470 TreeSelectSearchBoardName: TAction;
471 CabinetFavoriteAction: TAction;
474 FavoriteTreePopupMenu: TPopupMenu;
475 FavoriteTreeViewRenameAction: TAction;
476 FavoriteTreeRenamePopupMenu: TMenuItem;
477 FavoriteTreeViewNewFolderAction: TAction;
478 FavoriteTreeNewFolderPopupMenu: TMenuItem;
480 FavoriteTreeViewDeleteAction: TAction;
481 FavoriteTreeDeletePopupMenu: TMenuItem;
482 FavoriteToolBar: TToolBar;
483 ToolButton17: TToolButton;
484 ToolButton19: TToolButton;
485 FavoriteTreeViewBrowseFolderAction: TAction;
486 FavoriteTreeBrowseFolderPopupMenu: TMenuItem;
488 FavoriteTreeReloadPopupMenu: TMenuItem;
490 FavoriteTreeURLCopyPopupMenu: TMenuItem;
491 FavoriteTreeNameCopyPopupMenu: TMenuItem;
492 FavoriteTreeLogDeletePopupMenu: TMenuItem;
494 FavoriteTreeNameURLCopyPopupMenu: TMenuItem;
495 FavoriteTreeViewReloadAction: TAction;
496 FavoriteTreeViewURLCopyAction: TAction;
497 FavoriteTreeViewNameCopyAction: TAction;
498 FavoriteTreeViewNameURLCopyAction: TAction;
499 FavoriteTreeViewLogDeleteAction: TAction;
500 OnlyAHundredRes: TAction;
501 ToolButton20: TToolButton;
502 AHundredResButton: TToolButton;
505 ExportFavoriteFileAction1: TMenuItem;
506 ExportFavoriteFile: TFileSaveAs;
507 ToolButton21: TToolButton;
508 ToolButton22: TToolButton;
509 ToolButton23: TToolButton;
510 ToolButton24: TToolButton;
513 FavoriteTreeViewBrowseBoardAction: TAction;
514 FavoriteTreeViewBrowseThreadAction: TAction;
515 FavoriteTreeBrowseBoardPopupMenu: TMenuItem;
516 FavoriteTreeBrowseThreadPopupMenu: TMenuItem;
517 procedure FormCreate(Sender: TObject);
518 procedure FormDestroy(Sender: TObject);
519 procedure CabinetPanelHide(Sender: TObject);
520 procedure FormClose(Sender: TObject; var Action: TCloseAction);
521 procedure TreeViewChange(Sender: TObject; Node: TTreeNode);
522 procedure ListViewData(Sender: TObject; Item: TListItem);
523 procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
524 const FindString: String; const FindPosition: TPoint;
525 FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
526 Wrap: Boolean; var Index: Integer);
527 procedure ListViewDataHint(Sender: TObject; StartIndex,
529 procedure ListViewDataStateChange(Sender: TObject; StartIndex,
530 EndIndex: Integer; OldState, NewState: TItemStates);
531 procedure BrowserStatusTextChange(Sender: TObject;
532 const Text: WideString);
533 procedure BrowserTitleChange(Sender: TObject; const Text: WideString);
534 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
535 procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
536 var AllowChange: Boolean);
537 procedure ListViewKeyDown(Sender: TObject; var Key: Word;
539 procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
540 procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
541 Button: TToolButton; State: TCustomDrawState;
542 var DefaultDraw: Boolean);
543 procedure BrowserBeforeNavigate2(Sender: TObject;
544 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
545 Headers: OleVariant; var Cancel: WordBool);
546 procedure ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
547 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
548 var DefaultDraw: Boolean);
549 procedure TreeViewCustomDraw(Sender: TCustomTreeView;
550 const ARect: TRect; var DefaultDraw: Boolean);
551 procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
552 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
553 procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
554 procedure TreeViewDblClick(Sender: TObject);
555 procedure FavoriteTreeViewClick(Sender: TObject);
556 procedure ListViewCustomDraw(Sender: TCustomListView;
557 const ARect: TRect; var DefaultDraw: Boolean);
558 procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
559 Shift: TShiftState; X, Y: Integer);
560 procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
561 procedure MessageListViewResize(Sender: TObject);
562 procedure ExitActionExecute(Sender: TObject);
563 procedure AllSelectActionExecute(Sender: TObject);
564 procedure StdToolBarVisibleActionExecute(Sender: TObject);
565 procedure MsgBarVisibleActionExecute(Sender: TObject);
566 procedure StatusBarVisibleActionExecute(Sender: TObject);
567 procedure LargeIconActionExecute(Sender: TObject);
568 procedure SmallIconActionExecute(Sender: TObject);
569 procedure ListIconActionExecute(Sender: TObject);
570 procedure DetailIconActionExecute(Sender: TObject);
571 procedure SearchActionExecute(Sender: TObject);
572 procedure OptionActionExecute(Sender: TObject);
573 procedure GikoNaviWebPageActionExecute(Sender: TObject);
574 procedure AboutActionExecute(Sender: TObject);
575 procedure CabinetHistoryActionExecute(Sender: TObject);
576 procedure CabinetVisible( isVisible : Boolean );
577 procedure CabinetVisibleActionExecute(Sender: TObject);
578 procedure AllItemActionExecute(Sender: TObject);
579 procedure LogItemActionExecute(Sender: TObject);
580 procedure NewItemActionExecute(Sender: TObject);
581 procedure SelectItemActionExecute(Sender: TObject);
582 procedure ListNumberVisibleActionExecute(Sender: TObject);
583 procedure UpFolderActionExecute(Sender: TObject);
584 procedure IconStyleExecute(Sender: TObject);
585 procedure RoundActionExecute(Sender: TObject);
586 procedure StopActionExecute(Sender: TObject);
587 procedure MsgBarCloseActionExecute(Sender: TObject);
588 procedure BrowserMaxActionExecute(Sender: TObject);
589 procedure ScrollTopActionExecute(Sender: TObject);
590 procedure ScrollLastActionExecute(Sender: TObject);
591 procedure ScrollNewActionExecute(Sender: TObject);
592 procedure ScrollKokoActionExecute(Sender: TObject);
593 procedure EditorActionExecute(Sender: TObject);
594 procedure IEActionExecute(Sender: TObject);
595 procedure ShowThreadActionExecute(Sender: TObject);
596 procedure ShowBoardActionExecute(Sender: TObject);
597 procedure URLCopyActionExecute(Sender: TObject);
598 procedure ItemReloadActionExecute(Sender: TObject);
599 procedure SelectListReloadActionExecute(Sender: TObject);
600 procedure SelectThreadReloadActionExecute(Sender: TObject);
601 procedure SelectListReloadActionUpdate(Sender: TObject);
602 procedure AllItemActionUpdate(Sender: TObject);
603 procedure LogItemActionUpdate(Sender: TObject);
604 procedure NewItemActionUpdate(Sender: TObject);
605 procedure SelectItemActionUpdate(Sender: TObject);
606 procedure UpFolderActionUpdate(Sender: TObject);
607 procedure FormResize(Sender: TObject);
608 procedure ScrollTopActionUpdate(Sender: TObject);
609 procedure ScrollLastActionUpdate(Sender: TObject);
610 procedure ScrollNewActionUpdate(Sender: TObject);
611 procedure ScrollKokoActionUpdate(Sender: TObject);
612 procedure EditorActionUpdate(Sender: TObject);
613 procedure IEActionUpdate(Sender: TObject);
614 procedure ShowThreadActionUpdate(Sender: TObject);
615 procedure ShowBoardActionUpdate(Sender: TObject);
616 procedure SelectThreadReloadActionUpdate(Sender: TObject);
617 procedure ListViewSelectItem(Sender: TObject; Item: TListItem;
619 procedure SelectTimerTimer(Sender: TObject);
620 procedure ItemReloadActionUpdate(Sender: TObject);
621 procedure ListViewDblClick(Sender: TObject);
622 procedure LogDeleteActionExecute(Sender: TObject);
623 procedure KokomadeActionExecute(Sender: TObject);
624 procedure ZenbuActionExecute(Sender: TObject);
625 procedure KokoResActionExecute(Sender: TObject);
626 procedure ListPopupMenuPopup(Sender: TObject);
627 procedure SelectItemURLCopyActionExecute(Sender: TObject);
628 procedure SelectItemURLCopyActionUpdate(Sender: TObject);
629 procedure AllSelectActionUpdate(Sender: TObject);
630 procedure LogDeleteActionUpdate(Sender: TObject);
631 procedure BrowserTabCloseActionExecute(Sender: TObject);
632 procedure NotSelectTabCloseActionExecute(Sender: TObject);
633 procedure TreeSelectBoradReloadExecute(Sender: TObject);
634 procedure TreeSelectThreadReloadExecute(Sender: TObject);
635 procedure TreeSelectURLCopyExecute(Sender: TObject);
636 procedure TreePopupMenuPopup(Sender: TObject);
637 procedure ListToolBarVisibleActionExecute(Sender: TObject);
638 procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
639 procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
640 var Cancel: WordBool);
641 procedure ListSplitterCanResize(Sender: TObject; var NewSize: Integer;
642 var Accept: Boolean);
643 procedure ListSplitterMoved(Sender: TObject);
644 procedure BrowserTabChange(Sender: TObject);
645 procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
646 Shift: TShiftState; X, Y: Integer);
647 procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
648 State: TDragState; var Accept: Boolean);
649 procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
650 procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
652 procedure BrowserDocumentComplete(Sender: TObject;
653 const pDisp: IDispatch; var URL: OleVariant);
654 procedure SelectReservActionUpdate(Sender: TObject);
655 procedure RoundNamePopupMenuPopup(Sender: TObject);
656 procedure SelectNewRoundNameExecute(Sender: TObject);
657 procedure SelectDeleteRoundExecute(Sender: TObject);
658 procedure SelectReservActionExecute(Sender: TObject);
659 procedure NewBoardActionExecute(Sender: TObject);
660 procedure LoginActionExecute(Sender: TObject);
661 procedure KeySettingActionExecute(Sender: TObject);
662 procedure AllTabCloseActionExecute(Sender: TObject);
663 procedure ArrangeActionExecute(Sender: TObject);
664 procedure NameURLCopyActionExecute(Sender: TObject);
665 procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
666 procedure URLCopyActionUpdate(Sender: TObject);
667 procedure NameURLCopyActionUpdate(Sender: TObject);
668 procedure BrowserTabCloseActionUpdate(Sender: TObject);
669 procedure NotSelectTabCloseActionUpdate(Sender: TObject);
670 procedure AllTabCloseActionUpdate(Sender: TObject);
671 procedure SelectItemNameURLCopyActionUpdate(Sender: TObject);
672 procedure ActiveLogDeleteActionExecute(Sender: TObject);
673 procedure ActiveLogDeleteActionUpdate(Sender: TObject);
674 procedure ListNameBarVisibleActionExecute(Sender: TObject);
675 procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
676 procedure TreeSelectNameURLCopyExecute(Sender: TObject);
677 procedure PaneInitActionExecute(Sender: TObject);
678 procedure FormShow(Sender: TObject);
679 procedure BrowserTabToolBarResize(Sender: TObject);
680 procedure BrowserMinActionExecute(Sender: TObject);
681 procedure SelectTextClearActionExecute(Sender: TObject);
682 procedure NameTextClearActionExecute(Sender: TObject);
683 procedure MailTextClearActionExecute(Sender: TObject);
684 procedure LeftmostTabSelectActionExecute(Sender: TObject);
685 procedure LeftTabSelectActionExecute(Sender: TObject);
686 procedure RightTabSelectActionExecute(Sender: TObject);
687 procedure RightmostTabSelectActionExecute(Sender: TObject);
688 procedure LeftmostTabSelectActionUpdate(Sender: TObject);
689 procedure LeftTabSelectActionUpdate(Sender: TObject);
690 procedure RightTabSelectActionUpdate(Sender: TObject);
691 procedure RightmostTabSelectActionUpdate(Sender: TObject);
692 procedure FavoriteMenuClick(Sender: TObject);
693 procedure FavoriteAddActionExecute(Sender: TObject);
694 procedure FavoriteAddActionUpdate(Sender: TObject);
695 procedure BoardFavoriteAddActionExecute(Sender: TObject);
696 procedure BoardFavoriteAddActionUpdate(Sender: TObject);
697 procedure ThreadFavoriteAddActionExecute(Sender: TObject);
698 procedure ThreadFavoriteAddActionUpdate(Sender: TObject);
699 procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
700 procedure FavoriteArrangeActionExecute(Sender: TObject);
701 procedure MainCoolBarResize(Sender: TObject);
702 procedure MoveToActionExecute(Sender: TObject);
703 procedure AddressToolBarResize(Sender: TObject);
704 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
706 procedure AddressBarVisibleActionExecute(Sender: TObject);
707 procedure BrowserEnter(Sender: TObject);
708 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
709 procedure BrowserTabVisibleActionExecute(Sender: TObject);
710 procedure BrowserTabTopActionExecute(Sender: TObject);
711 procedure BrowserTabBottomActionExecute(Sender: TObject);
712 procedure BrowserTabTabStyleActionExecute(Sender: TObject);
713 procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
714 procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
715 procedure PreviewTimerTimer(Sender: TObject);
716 procedure MessageHideButtonClick(Sender: TObject);
717 procedure MonazillaWebPageActionExecute(Sender: TObject);
718 procedure GikoHelpActionExecute(Sender: TObject);
719 procedure ToolButton18Click(Sender: TObject);
720 procedure KotehanActionExecute(Sender: TObject);
721 procedure LinkBarVisibleActionExecute(Sender: TObject);
722 procedure BBS2chWebPageActionExecute(Sender: TObject);
723 procedure GikoFolderOpenActionExecute(Sender: TObject);
724 procedure MainCoolBarBandInfo(Sender: TObject;
725 var BandInfo: PReBarBandInfoA);
726 procedure MainCoolBarChevronClick(Sender: TObject;
727 RebarChevron: PNMRebarChevron);
728 procedure ListCoolBarBandInfo(Sender: TObject;
729 var BandInfo: PReBarBandInfoA);
730 procedure ListCoolBarChevronClick(Sender: TObject;
731 RebarChevron: PNMRebarChevron);
732 procedure BrowserCoolBarBandInfo(Sender: TObject;
733 var BandInfo: PReBarBandInfoA);
734 procedure BrowserCoolBarChevronClick(Sender: TObject;
735 RebarChevron: PNMRebarChevron);
736 procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
737 procedure ThreadEditorActionExecute(Sender: TObject);
738 procedure ThreadEditorActionUpdate(Sender: TObject);
739 procedure ToolBarSettingActionExecute(Sender: TObject);
740 procedure NameCopyActionExecute(Sender: TObject);
741 procedure BoardIEActionExecute(Sender: TObject);
742 procedure SelectItemNameCopyActionExecute(Sender: TObject);
743 procedure SelectItemNameCopyActionUpdate(Sender: TObject);
744 procedure BoardIEActionUpdate(Sender: TObject);
745 procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
746 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
747 procedure NameCopyActionUpdate(Sender: TObject);
748 procedure SelectComboBoxChange(Sender: TObject);
749 procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
751 procedure SelectComboBoxExit(Sender: TObject);
752 procedure NG1Click(Sender: TObject);
753 procedure SelectResActionExecute(Sender: TObject);
754 procedure SelectResActionUpdate(Sender: TObject);
755 procedure FormKeyDown(Sender: TObject; var Key: Word;
757 procedure FormKeyUp(Sender: TObject; var Key: Word;
759 procedure AllResActionExecute(Sender: TObject);
760 procedure AllResActionUpdate(Sender: TObject);
761 procedure ReloadClick(Sender: TObject);
762 procedure GoBackClick(Sender: TObject);
763 procedure GoFowardClick(Sender: TObject);
764 procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
765 Shift: TShiftState; X, Y: Integer);
766 procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
767 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
768 procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
769 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
770 procedure StatusBarResize(Sender: TObject);
771 procedure IndividualAbon1Click(Sender: TObject);
772 procedure IndividualAbon2Click(Sender: TObject);
773 procedure N42Click(Sender: TObject);
774 procedure SelectComboBoxEnter(Sender: TObject);
775 procedure AntiIndividualAbonClick(Sender: TObject);
776 procedure N51Click(Sender: TObject);
777 procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
778 procedure CabinetFavoriteActionExecute(Sender: TObject);
779 procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
781 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
782 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
784 procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
786 procedure FavoriteTreePopupMenuPopup(Sender: TObject);
787 procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
788 procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
789 procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
790 procedure ToolButton19Click(Sender: TObject);
791 procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject);
792 procedure FavoriteTreeViewChange(Sender: TObject; Node: TTreeNode);
793 procedure FavoriteTreeViewDblClick(Sender: TObject);
794 procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject);
795 procedure FavoriteTreeViewReloadActionExecute(Sender: TObject);
796 procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
797 procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
798 procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject);
799 procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
800 procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
801 Shift: TShiftState; X, Y: Integer);
802 procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
803 State: TDragState; var Accept: Boolean);
804 procedure OnlyAHundredResExecute(Sender: TObject);
805 procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
807 procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
808 var Handled: Boolean);
809 procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
810 var Handled: Boolean);
811 procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
812 var Handled: Boolean);
813 procedure ExportFavoriteFileAccept(Sender: TObject);
814 procedure ExportFavoriteFileBeforeExecute(Sender: TObject);
815 procedure CabinetBBSActionExecute(Sender: TObject);
816 procedure FavoriteTreeViewBrowseThreadActionExecute(Sender: TObject);
817 procedure FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
824 FEnabledCloseButton: Boolean;
825 // ThreadCreate: TThreadCreate;
827 FClickNode: TTreeNode;
830 FPreviewBrowser: TPreviewBrowser;
833 FBrowserSizeHeight: Integer;
834 FBrowserSizeWidth: Integer;
836 // FFavorite: TFavorite;
837 FBrowserComplete: Boolean;
838 FTabHintIndex: Integer;
839 FListStyle: TViewStyle; //
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93\83X
\83^
\83C
\83\8b
840 FItemNoVisible: Boolean; //
\83\8a\83X
\83g
\94Ô
\8d\86\95\
\8e¦
\83t
\83\89\83O
841 FViewType: TGikoViewType; //
\83\8a\83X
\83g
\83A
\83C
\83e
\83\80\95\
\8e¦
\83^
\83C
\83v
842 FActiveList: TObject;
843 FActiveContent: TThreadItem; //
845 FHistoryList: TList; //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
846 FTreeType: TGikoTreeType;
850 // FLastRoundTime: TDateTime;
851 BrowserNullTab: TThreadItem;
852 // DoubleClickOccurred: array [TMouseButton] of Boolean;
853 FDownloadTitle: string; //
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86\82Ì
\83^
\83C
\83g
\83\8b\96¼
854 FDownloadMax: Integer; //
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86\82Ì
\8dÅ
\91å
\83T
\83C
\83Y
855 FEvent: THTMLDocumentEventSink;//
\83u
\83\89\83E
\83U
\83h
\83L
\83\85\83\81\83\93\83g
\83C
\83x
\83\93\83g
857 Fkeynum : Integer; //
\83L
\81[
\83{
\81[
\83h
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\97p
859 IsDraggingSelectComboBox : Boolean;
860 DraggingSelectComboBoxPosition : TPoint;
862 FSearchDialog: TSearchDialog;
864 FDropSpaceNode: TTreeNode;
866 FDragTime : Cardinal; //
\83\8a\83\93\83N
\82ÌD&D
\97p
867 FDragButton : TToolButton; //
\83\8a\83\93\83N
\82ÌD&D
\97p
\82ÉDrag
\82µ
\82Ä
\82éButton
\95Û
\91¶
868 FDragWFirst : Boolean; //WebTab
\82ÌD&D
\97p
870 FListViewBackGroundColor : TColor; //ListView
\82ÌBackGroundColor
871 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¦
872 FOddColor : TColor; //
\82»
\82Ì
\90F
874 FSelectResWord : string; //
\83\8c\83X
\8di
\8d\9e\83\8f\81[
\83h
875 procedure SetBoardTreeNode( inBBS : TBBS );
876 function SetCategoryListItem(ABBS2ch: TBBS): Integer;
877 function SetBoardListItem(Category: TCategory): Integer;
878 function SetThreadListItem(Board: TBoard): Integer;
879 // function GetRoundName(index: integer): string;
881 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
882 procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
883 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer);
884 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
885 procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
887 procedure SetActiveList(Obj: TObject);
889 procedure ListDoubleClick;
890 procedure BrowserMovement(AName: string);
891 procedure SelectListItem(List: TList);
892 // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
893 procedure DeleteTab(ThreadItem: TThreadItem);
894 function Hook(var Message: TMessage): Boolean;
895 procedure AddRoundNameMenu(MenuItem: TMenuItem);
896 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
897 procedure SetSelectRoundName(Sender: TObject);
898 function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
900 procedure SetMenuFont;
901 // procedure CreateFavMenu(Folder: TFavoriteFolder);
902 procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
903 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
904 procedure FavoriteClick(Sender: TObject); overload;
905 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
906 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
907 function OnDocumentContextMenu(Sender: TObject): WordBool;
908 // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
909 procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
910 procedure ShowTextPopup;
911 //procedure ShowTextPopup(HintData: THintData);
912 // procedure SetStdToolBar;
913 // function GetAction(ActionName: string): TContainedAction;
914 procedure SetLinkBar;
915 function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
916 procedure MenuBarChevronMenu;
917 procedure LinkBarChevronMenu;
918 procedure ToolBarChevronMenu(ToolBar: TToolBar);
919 procedure ModifySelectList;
920 procedure FavoriteBrowseFolder( node: TTreeNode );
921 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
922 procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
923 procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
924 procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
925 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
926 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
927 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
928 procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
929 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
931 procedure BrowserTabClick(Sender: TObject);
932 procedure SetListViewBackGroundColor(value: TColor);
933 procedure BBSMenuItemOnClick( Sender : TObject );
935 procedure CreateParams(var Params: TCreateParams); override;
936 procedure WndProc(var Message: TMessage); override;
937 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
938 procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
939 procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
942 // FDownload: TDownload;
943 FControlThread: TThreadControl;
944 procedure MoveToURL(URL: string);
945 procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
947 function GetHttpState: Boolean;
948 procedure SetEnabledCloseButton(Enabled: Boolean);
949 function GetTreeNode(Data: TObject): TTreeNode;
950 procedure AppFormDeactivate(Sender: TObject);
951 // procedure CabinetPanelVisible(PanelVisible: Boolean);
952 procedure ListViewAllSelect;
954 property ListStyle: TViewStyle read FListStyle write FListStyle;
955 property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
956 property ViewType: TGikoViewType read FViewType write FViewType;
958 property NameCookie: string read FNameCookie write FNameCookie;
959 property MailCookie: string read FMailCookie write FMailCookie;
961 procedure SetContent(ThreadItem: TThreadItem);
962 function GetActiveContent: TThreadItem;
963 function GetActiveList: TObject;
965 property ActiveList: TObject read GetActiveList write SetActiveList;
966 // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
968 procedure SetListViewType(AViewType: TGikoViewType); overload;
969 procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
970 procedure DownloadContent(ThreadItem: TThreadItem);
971 procedure DownloadList(Board: TBoard);
972 procedure PlaySound(SoundEventName: string);
974 function AddHistory( FavItem: TFavoriteThreadItem ): Boolean;
975 procedure DeleteHistory( threadItem: TThreadItem );
976 procedure ClearHistory;
977 procedure SaveHistory;
978 procedure LoadHistory;
979 procedure ShowBBSTree( inBBS : TBBS );
980 procedure ShowHistoryTree;
981 procedure SetHistoryTreeNode;
982 // procedure SelectTreeNode(Item: TObject);
983 procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
984 procedure SetBrowserTabState;
985 // property Favorite: TFavorite read FFavorite write FFavorite;
986 procedure SetToolBarPopup;
987 procedure ShowFavoriteAddDialog( Item : TObject );
988 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
989 property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
990 property OddColor : TColor read FOddColor write FOddColor;
993 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
996 TFavoriteMenuItem = class(TMenuItem)
1000 property Data: Pointer read FData write FData;
1003 TBBSMenuItem = class(TMenuItem)
1007 property Data: Pointer read FData write FData;
1010 TLinkToolButton = class(TToolButton)
1014 property Data: Pointer read FData write FData;
1018 GikoForm: TGikoForm;
1023 About, Option, Round, Splash, Sort, ListSelect,
1024 NewBoard, MojuUtils;
1027 CAPTION_NAME: string = '
\83M
\83R
\83i
\83r';
1028 BLANK_HTML: string = 'about:blank';
1029 SELECTCOMBOBOX_NAME: string = ''; // '
\83X
\83\8c\83b
\83h
\8di
\8d\9e\8c\9f\8dõ';
1030 SELECTCOMBOBOX_COLOR: TColor = clWindow;
1032 DandD_THRESHOLD = 5; //D&D
\82Ìè
\87\92l
\81ipixcel)
1033 //
\83c
\83\8a\81[
\81E
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93
1034 ITEM_ICON_2CH1 = 0; //2ch
\83A
\83C
\83R
\83\93
1035 ITEM_ICON_2CH2 = 1; //2ch
\83A
\83C
\83R
\83\93
1036 ITEM_ICON_CATEGORY1 = 2; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1037 ITEM_ICON_CATEGORY2 = 3; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1038 ITEM_ICON_BOARD_NOSUBJECT = 3; //
\93Ç
\82Ý
\8d\9e\82Ü
\82ê
\82Ä
\82¢
\82È
\82¢
\94Â
\83A
\83C
\83R
\83\93
1039 ITEM_ICON_BOARD1 = 4; //
\94Â
\83A
\83C
\83R
\83\93
1040 ITEM_ICON_BOARD2 = 5; //
\94Â
\83A
\83C
\83R
\83\93
1041 ITEM_ICON_THREADLOG1 = 6; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1042 ITEM_ICON_THREADLOG2 = 7; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1043 ITEM_ICON_THREAD1 = 8; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1044 ITEM_ICON_THREAD2 = 9; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1045 ITEM_ICON_THREADNEW1 = 10; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1046 ITEM_ICON_THREADNEW2 = 11; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1047 ITEM_ICON_SORT1 = 12; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1048 ITEM_ICON_SORT2 = 13; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1049 ITEM_ICON_BOARD_LOG = 17; //
\83X
\83\8c\83\8d\83O
\82 \82è
\94Â
\83A
\83C
\83R
\83\93
1050 ITEM_ICON_BOARD_NEW = 18; //
\83X
\83\8c\90V
\92\85\94Â
\83A
\83C
\83R
\83\93
1052 //
\83c
\81[
\83\8b\83o
\81[
\83A
\83C
\83R
\83\93
1053 TOOL_ICON_HEIGHT_MAX = 16; //
\8d\82\82³
\8dÅ
\91å
\83A
\83C
\83R
\83\93
1054 TOOL_ICON_HEIGHT_MIN = 17; //
\8d\82\82³
\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1055 TOOL_ICON_HEIGHT_NORMAL = 18; //
\8d\82\82³
\95W
\8f\80\83A
\83C
\83R
\83\93
1056 TOOL_ICON_WIDTH_MAX = 19; //
\95\9d\8dÅ
\91å
\83A
\83C
\83R
\83\93
1057 TOOL_ICON_WIDTH_MIN = 20; //
\95\9d\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1058 TOOL_ICON_WIDTH_NORMAL = 21; //
\95\9d\95W
\8f\80\83A
\83C
\83R
\83\93
1060 TOOL_ICON_FAV_FOLDER = 30; //
\82¨
\8bC
\82É
\93ü
\82è
\83t
\83H
\83\8b\83_
\83A
\83C
\83R
\83\93
1061 TOOL_ICON_FAV_BOARD = 31; //
\82¨
\8bC
\82É
\93ü
\82è
\94Â
\83A
\83C
\83R
\83\93
1062 TOOL_ICON_FAV_THREAD = 32; //
\82¨
\8bC
\82É
\93ü
\82è
\83X
\83\8c\83A
\83C
\83R
\83\93
1064 HTML_FILE_NAME = 'temp_preview.html';
1068 procedure TGikoForm.CreateParams(var Params: TCreateParams);
1071 if FormStyle in [fsNormal, fsStayOnTop] then begin
1072 if BorderStyle in [bsSingle, bsSizeable] then begin
1073 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1074 Params.WndParent := 0;
1079 procedure TGikoForm.FormCreate(Sender: TObject);
1081 TVS_NOTOOLTIPS = $0080;
1087 wp: TWindowPlacement;
1089 item : TBBSMenuItem;
1093 Writeln('============================================================');
1094 Writeln('
\83M
\83R
\83i
\83r
\83f
\83o
\83b
\83O
\83R
\83\93\83\
\81[
\83\8b');
1096 Writeln('
\82±
\82Ì
\89æ
\96Ê
\82ð
\95Â
\82¶
\82È
\82¢
\82Å
\82
\82¾
\82³
\82¢
\81B');
1097 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¢');
1098 Writeln('============================================================');
1100 Application.OnDeactivate := AppFormDeactivate;
1101 Self.OnDeactivate := AppFormDeactivate;
1102 Application.HookMainWindow(Hook);
1104 FTreeType := gttNone;
1106 FSearchDialog := nil;
1108 //
\8eè
\82Ì
\83J
\81[
\83\
\83\8b
1109 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1111 //
\8f\84\89ñ
\83f
\81[
\83^
\93Ç
\82Ý
\8d\9e\82Ý
1112 RoundList := TRoundList.Create;
1113 RoundList.LoadRoundFile;
1115 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1116 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1118 //
\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Æ)
1119 InitializeBoardPlugIns;
1121 EnabledCloseButton := True;
1122 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\93Ç
\8d\9e(ReadFavorite
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1123 GikoSys.ReadBoardFile;
1124 // SetBoardTreeNode; //
\83c
\83\8a\81[
\82É
\83{
\81[
\83h
\92Ç
\89Á
1125 //
\83\81\83j
\83\85\81[
\82É
\92Ç
\89Á
1126 for i := Length( BBSs ) - 1 downto 0 do begin
1128 item := TBBSMenuItem.Create( PopupMenu );
1129 item.Caption := BBSs[ i ].Title;
1130 item.Data := BBSs[ i ];
1131 item.OnClick := BBSMenuItemOnClick;
1132 CabinetSelectPopupMenu.Items.Insert( 0, item );
1133 item := TBBSMenuItem.Create( PopupMenu );
1134 item.Caption := BBSs[ i ].Title;
1135 item.Data := BBSs[ i ];
1136 item.OnClick := BBSMenuItemOnClick;
1137 CabinetMenu.Insert( 0, item );
1142 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g(LoadHistory
\82æ
\82è
\82à
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1143 FHistoryList := TList.Create;
1145 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1148 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
1149 // FFavorite := TFavorite.Create(FavoriteTreeView);
1150 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1151 FavoriteDM.ReadFavorite;
1153 //
\83\8a\83X
\83g
\83X
\83^
\83C
\83\8b
1154 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1156 //
\83\81\83C
\83\93\83N
\81[
\83\8b\83o
\81[
\88Ê
\92u
1157 // MainCoolBar.Top := 0;
1158 // MainCoolBar.Left := 0;
1160 //
\83A
\83j
\83\81\83p
\83l
\83\8b\88Ê
\92u
1161 AnimePanel.Top := 0;
1162 AnimePanel.Left := 0;
1164 //
\8ae
\8eí
\89Â
\8e\8b\8fó
\91Ô
\82È
\82Ç
\90Ý
\92è
1166 //
\83L
\83\83\83r
\83l
\83b
\83g
1167 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1169 //
\83\81\83b
\83Z
\81[
\83W
\83o
\81[
1170 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1171 MsgBarVisibleActionExecute(nil);
1172 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1174 //
\83X
\83e
\81[
\83^
\83X
\83o
\81[
1175 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1176 StatusBarVisibleActionExecute(nil);
1178 //
\83t
\83H
\83\93\83g
\81E
\90F
\90Ý
\92è
1179 TreeView.Items.BeginUpdate;
1180 FavoriteTreeView.Items.BeginUpdate;
1181 ListView.Items.BeginUpdate;
1183 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1184 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1185 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1186 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1188 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1189 FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1190 FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1191 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1193 ListView.Font.Name := GikoSys.Setting.ListFontName;
1194 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1195 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1196 //ListView.Color := GikoSys.Setting.ListBackColor;
1197 ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1198 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1199 FOddColor := GikoSys.Setting.OddColor;
1202 TreeView.Items.EndUpdate;
1203 FavoriteTreeView.Items.EndUpdate;
1204 ListView.Items.EndUpdate;
1206 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1207 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1209 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
1210 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1211 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1212 FDragWFirst := false;
1214 // TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
1215 // TreeView.Selected := TreeView.Items[0]; //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
1216 SetContent(nil); //
\83u
\83\89\83E
\83U
\82ð
\8bó
\94\92\95\
\8e¦
1218 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95\9c\8c³
1219 wp.length := sizeof(wp);
1220 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1221 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1222 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1223 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1224 wp.showCmd := SW_HIDE;
1225 SetWindowPlacement(Handle, @wp);
1227 // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1228 // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1229 if GikoSys.Setting.WindowMax then
1230 WindowState := wsMaximized;
1232 //
\83M
\83R
\83A
\83j
\83\81
1234 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1235 if FileExists(FileName) then
1236 Animate.FileName := FileName;
1239 // AnimePanel.Height := 26;
1240 // AnimePanel.Width := 39;
1241 // AnimePanel.Top := 2;
1242 // AnimePanel.Left := Width - 48;
1248 //
\83X
\83\8c\91S
\95\94\95\
\8e¦
\83{
\83^
\83\93\82ð
\89\9f\82³
\82ê
\82½
\8fó
\91Ô
\82É
\82·
\82é
1249 AllItemAction.Checked := True;
1250 AllResAction.Checked := True;
1252 //TreeView
\82Ì
\8e×
\96\82\8fL
\82¢ToolTip
\82ð
\94ñ
\95\
\8e¦
1253 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1254 Style := Style or TVS_NOTOOLTIPS;
1255 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1257 //
\83c
\83\8a\81[
\82ð
\83\81\83C
\83\93\82¾
\82¯
\95\
\8e¦
\82É
\82µ
\82Ä
\8dÅ
\91å
\89»
1258 TreeView.Align := alClient;
1259 FavoriteTreeView.Align := alClient;
1260 FavoriteTreeView.Visible := False;
1262 //
\83u
\83\89\83E
\83U
\83T
\83C
\83Y
\95Ï
\8dX
\82Ì
\8f\89\8aú
\89»
1263 // FBrowserSizeFlag := False;
1264 // FBrowserSizeHeight := ViewPanel.Height;
1266 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1267 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1269 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1270 ArrangeAction.Execute;
1272 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1273 case GikoSys.Setting.ListWidthState of
1275 ViewPanel.Width := 1;
1276 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1277 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1280 ViewPanel.Width := GikoSys.Setting.ListWidth;
1281 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1282 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1285 ViewPanel.Width := GikoSys.Setting.ListWidth;
1286 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1287 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1290 // if GikoSys.Setting.ListWidthMax then begin
1291 // ViewPanel.Width := 1;
1292 // BrowserSizeAction.ImageIndex := ICON_WIDTH_MIN;
1294 // ViewPanel.Width := GikoSys.Setting.ListWidth;
1295 // BrowserSizeAction.ImageIndex := ICON_WIDTH_MAX;
1298 case GikoSys.Setting.ListHeightState of
1300 ViewPanel.Height := 1;
1301 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1302 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1305 ViewPanel.Height := GikoSys.Setting.ListHeight;
1306 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1307 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1310 ViewPanel.Height := GikoSys.Setting.ListHeight;
1311 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1312 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1315 // if GikoSys.Setting.ListHeightState = glsMax then begin
1317 // ViewPanel.Height := GikoSys.Setting.ListHeight;
1318 // BrowserSizeAction.ImageIndex := ICON_HEIGHT_MAX;
1322 //
\83v
\83\8d\83O
\83\8c\83X
\83o
\81[
\82Ì
\8f\89\8aú
\89»
1323 // ProgressBar.Visible := False;
1324 ProgressBar.Parent := StatusBar;
1325 ProgressBar.Top := 2;
1326 ProgressBar.Left := 0;
1327 ProgressBar.Width := StatusBar.Panels[0].Width;
1328 ProgressBar.Height := StatusBar.Height - 2;
1329 ProgressBar.Position := 0;
1331 //
\83c
\81[
\83\8b\83o
\81[
\95\
\8e¦
1332 //formshow()
\82É
\88Ú
\93®
1334 //
\83_
\83E
\83\93\83\8d\81[
\83h
\83I
\83u
\83W
\83F
\83N
\83g
1335 // FDownload := TDownload.Create;
1336 // FDownload.OnDownloadEnd := OnDonloadEnd;
1337 // FDownload.OnWork := Work;
1338 // FDownload.OnWorkBegin := WorkBegin;
1339 // FDownload.OnWorkEnd := WorkEnd;
1341 //
\83_
\83E
\83\93\83\8d\81[
\83h
\83I
\83u
\83W
\83F
\83N
\83g
1342 FControlThread := TThreadControl.Create(True);
1343 FControlThread.MaxThreadCount := 1;
1344 FControlThread.Resume;
1345 FControlThread.OnDownloadEnd := DownloadEnd;
1346 FControlThread.OnDownloadMsg := DownloadMsg;
1347 FControlThread.OnWork := Work;
1348 FControlThread.OnWorkBegin := WorkBegin;
1349 FControlThread.OnWorkEnd := WorkEnd;
1350 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1352 //
\8di
\8d\9e\8c\9f\8dõ
\97\9a\97ð
1353 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1355 //
\83u
\83\89\83E
\83U
\83^
\83u
\90Ý
\92è
1358 BrowserBoardNameLabel.Caption := '';
1359 BrowserNameLabel.Caption := '';
1362 // DetailIconAction.Execute;
1364 // FBrowserSizeHeight := ViewPanel.Height;
1365 FTabHintIndex := -1;
1367 //
\83\8d\83O
\83t
\83H
\83\8b\83_
\82ª
\91¶
\8dÝ
\82µ
\82È
\82¢
\8fê
\8d\87\82Í
\8dì
\90¬
\82·
\82é
1368 // if not GikoSys.DirectoryExistsEx(BBS2ch.GetLogFolder) then begin
1369 // GikoSys.ForceDirectoriesEx(BBS2ch.GetLogFolder);
1371 // FormResize(Sender);
1372 // MainCoolBarResize(Sender);
1373 // Application.ProcessMessages;
1375 //
\83\8a\83\93\83N
\83o
\81[
1378 //
\83\81\83j
\83\85\81[
\83t
\83H
\83\93\83g
1381 //
\83c
\81[
\83\8b\83o
\81[Wrapable
1382 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1383 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1385 //
\83c
\81[
\83\8b\83{
\83^
\83\93\93Ç
\82Ý
\8d\9e\82Ý
1386 ReadToolBarSetting(ActionList, StdToolBar);
1387 ReadToolBarSetting(ActionList, ListToolBar);
1389 for i := ListToolBar.ControlCount - 1 downto 0 do
1391 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1393 //
\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·
1394 if (i + 1) < ListToolBar.ControlCount then
1395 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1396 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1397 ListToolBar.Controls[ i + 1 ].Visible := False;
1399 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
1400 ListToolBar.Controls[ i ].Visible := False;
1401 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
1402 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1403 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1404 SelectComboBox.Parent := ListToolBar;
1405 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
1406 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1407 SelectComboBoxSplitter.Parent := ListToolBar;
1414 ReadToolBarSetting(ActionList, BrowserToolBar);
1416 OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes;
1417 //
\83A
\83h
\83\8c\83X
\83o
\81[
1418 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1420 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³
\82ÍFormShow
\82É
\88Ú
\93®
\82µ
\82½
1422 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\82ª
\96³
\82¢
\8fê
\8d\87\82Í
\83\81\83b
\83Z
\81[
\83W
\95\
\8e¦
1423 if not FileExists(GikoSys.GetBoardFileName) then begin
1424 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
1425 + '
\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
1426 + '
\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';
1427 MsgBox(SplashWindow.Handle, msg, '
\83M
\83R
\83i
\83r', MB_OK or MB_ICONINFORMATION);
1428 NewBoardAction.Execute;
1431 //
\83L
\81[
\90Ý
\92è
\93Ç
\82Ý
\8d\9e\82Ý
1432 GikoSys.LoadKeySetting(ActionList);
1434 //
\8dÅ
\8fI
\8f\84\89ñ
\8e\9e\8aÔ
1435 // FLastRoundTime := 0;
1438 FHint := TResPopup.Create(Self);
1440 //
\8dÅ
\8cã
\82É
\91I
\91ð
\82³
\82ê
\82½
\83L
\83\83\83r
\83l
\83b
\83g
\82Ì
\95\9c\8c³
1441 CabinetVisible( False );
1442 if GikoSys.Setting.CabinetVisible then begin
1443 i := CabinetSelectPopupMenu.Items.Count - 1;
1444 if GikoSys.Setting.CabinetIndex = i - 1 then
1445 CabinetHistoryAction.Execute
1446 else if GikoSys.Setting.CabinetIndex = i then
1447 CabinetFavoriteAction.Execute
1449 if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1450 ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1451 CabinetBBSAction.Execute;
1454 ShowBBSTree( BBSs[ 0 ] );
1457 //
\83I
\81[
\83g
\83\8d\83O
\83C
\83\93
1458 if GikoSys.Setting.AutoLogin then
1459 LoginAction.Execute;
1461 //
\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
1462 for i := 1 to ParamCount do begin
1463 MoveToURL(ParamStr(i));
1468 s := GikoSys.FAbon.NGwordname;
1469 StatusBar.Panels[2].Text := s;
1470 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1471 StatusBarResize(Sender);
1477 procedure TGikoForm.FormShow(Sender: TObject);
1482 ShowWindow(Application.Handle, SW_HIDE);
1484 //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½
1485 //
\83c
\81[
\83\8b\83o
\81[
\95\
\8e¦
1486 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1487 StdToolBarVisibleActionExecute( nil );
1488 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1489 AddressBarVisibleActionExecute( nil );
1490 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1491 LinkBarVisibleActionExecute( nil );
1492 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1493 ListToolBarVisibleActionExecute( nil );
1494 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1495 ListNameBarVisibleActionExecute( nil );
1496 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1497 BrowserToolBarVisibleActionExecute( nil );
1498 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1499 BrowserNameBarVisibleActionExecute( nil );
1501 //
\83u
\83\89\83E
\83U
\83^
\83u
1502 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1503 BrowserTabVisibleActionExecute(nil);
1505 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1506 BrowserTabTopAction.Checked := True;
1507 BrowserTabTopActionExecute(nil);
1509 BrowserTabBottomAction.Checked := True;
1510 BrowserTabBottomActionExecute(nil);
1513 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1514 BrowserTabTabStyleAction.Checked := True;
1515 BrowserTabTabStyleActionExecute(nil);
1516 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1517 BrowserTabButtonStyleAction.Checked := True;
1518 BrowserTabButtonStyleActionExecute(nil);
1520 BrowserTabFlatStyleAction.Checked := True;
1521 BrowserTabFlatStyleActionExecute(nil);
1525 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Main)
1526 MainCoolBar.Bands.BeginUpdate;
1528 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1529 CoolSet := GikoSys.Setting.MainCoolSet[i];
1530 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1532 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1533 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1534 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1537 MainCoolBar.Bands.EndUpdate;
1540 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Board)
1541 ListCoolBar.Bands.BeginUpdate;
1543 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1544 CoolSet := GikoSys.Setting.ListCoolSet[i];
1545 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1547 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1548 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1549 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1552 ListCoolBar.Bands.EndUpdate;
1555 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Browser)
1556 BrowserCoolBar.Bands.BeginUpdate;
1558 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1559 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1560 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1562 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1563 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1564 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1567 BrowserCoolBar.Bands.EndUpdate;
1572 procedure TGikoForm.SetStdToolBar;
1578 Action: TContainedAction;
1579 ToolButton: TToolButton;
1582 for i := StdToolBar.ButtonCount - 1 downto 0 do begin
1583 StdToolBar.RemoveControl(StdToolBar.Buttons[i]);
1584 //StdToolBar.Buttons[i].Free;
1586 FileName := GikoSys.GetConfigDir + 'ToolBar.ini';
1587 ini := TMemIniFile.Create(FileName);
1590 s := ini.ReadString('StdToolBar', IntToStr(i), '');
1593 if s = '-' then begin
1594 ToolButton := TToolButton.Create(StdToolBar);
1595 ToolButton.Style := tbsSeparator;
1596 ToolButton.Width := 8;
1597 ToolButton.Left := 10000;
1598 StdToolBar.InsertControl(ToolButton);
1600 Action := GetAction(s);
1601 if Action <> nil then begin
1602 ToolButton := TToolButton.Create(StdToolBar);
1603 ToolButton.Action := Action;
1604 ToolButton.Left := 10000;
1605 StdToolBar.InsertControl(ToolButton);
1612 {function TGikoForm.GetAction(ActionName: string): TContainedAction;
1616 for i := 0 to ActionList.ActionCount - 1 do begin
1617 if ActionList.Actions[i].Name = ActionName then begin
1618 Result := ActionList.Actions[i];
1625 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1629 wp: TWindowPlacement;
1631 if ( GikoSys.Setting.ShowDialogForEnd ) and
1632 (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
1638 Application.OnDeactivate := nil;
1639 Self.OnDeactivate := nil;
1642 if GetActiveList is TBBS then begin
1643 for i := 0 to ListView.Columns.Count - 1 do
1644 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1645 end else if GetActiveList is TCategory then begin
1646 for i := 0 to ListView.Columns.Count - 1 do
1647 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1648 end else if GetActiveList is TBoard then begin
1649 for i := 0 to ListView.Columns.Count - 1 do
1650 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1653 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95Û
\91¶
1654 wp.length := sizeof(wp);
1655 GetWindowPlacement(Handle, @wp);
1656 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1657 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1658 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1659 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1660 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1662 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1663 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1664 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1665 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1666 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1667 if ArrangeAction.Checked then
1668 GikoSys.Setting.ListOrientation := gloVertical
1670 GikoSys.Setting.ListOrientation := gloHorizontal;
1671 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1673 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Main)
1674 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1675 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1676 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1677 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1678 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1680 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Board)
1681 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1682 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1683 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1684 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1685 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1687 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Browser)
1688 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1689 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1690 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1691 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1692 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1695 GikoSys.Setting.WriteWindowSettingFile;
1696 GikoSys.Setting.WriteNameMailSettingFile;
1698 //
\82¨
\8bC
\82É
\93ü
\82è
\95Û
\91¶
1700 FavoriteDM.WriteFavorite;
1706 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1707 NotSelectTabCloseAction.Execute;
1708 if BrowserTab.Tabs.Count >= 1 then begin
1709 DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1714 //
\8f\84\89ñ
\83\8a\83X
\83g
\95Û
\91¶&
\94j
\8aü
1716 RoundList.SaveRoundFile;
1729 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
\95Û
\91¶
1735 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
1741 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\95Û
\91¶
1743 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1748 FControlThread.Terminate;
1758 //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
1761 TreeView.Items.Clear;
1766 if FavoriteDM <> nil then
1769 if AddressHistoryDM <> nil then
1770 AddressHistoryDM.Free;
1771 AddressHistoryDM := nil;
1775 // TBBS
\82Í
\95Û
\8e\9d\82µ
\82Ä
\82¢
\82é TCategory, TBoard, TThreadItem
\82·
\82×
\82Ä
\82ð
\8aJ
\95ú
\82·
\82é
1776 // 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Å
1777 // BoardPluteIns
\82Ì
\8aJ
\95ú
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ
1779 for i := 0 to Length( BBSs ) - 1 do begin
1780 if BBSs[ i ] <> nil then
1788 for i := 0 to Length( BoardPlugIns ) - 1 do begin
1789 if BoardPlugIns[ i ] <> nil then
1790 BoardPlugIns[ i ].Free;
1791 BoardPlugIns[ i ] := nil;
1797 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1798 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1799 CabinetSelectPopupMenu.Items[ i ].Free;
1800 CabinetMenu.Items[ i ].Free;
1808 if FHint <> nil then begin
1809 FHint.ReleaseHandle;
1814 if TPreviewBrowser <> nil then begin
1815 FPreviewBrowser.Free;
1816 FPreviewBrowser := nil;
1822 procedure TGikoForm.FormDestroy(Sender: TObject);
1824 // wp: TWindowPlacement;
1826 { //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
1829 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95Û
\91¶
1830 wp.length := sizeof(wp);
1831 GetWindowPlacement(Handle, @wp);
1833 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1834 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1835 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1836 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1837 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1839 GikoSys.Setting.CabinetVisible := CabinetPanel.Visible;
1840 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1842 GikoSys.Setting.WriteWindowSettingFile;
1843 GikoSys.Setting.WriteNameMailSettingFile;
1848 //
\83t
\83H
\81[
\83\80\83N
\83\8d\81[
\83Y
1849 procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1851 Application.Terminate;
1855 //
\83L
\83\83\83r
\83l
\83b
\83g
\81~
\83{
\83^
\83\93\83N
\83\8a\83b
\83N
1856 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1858 CabinetVisibleAction.Execute;
1859 // CabinetPanelVisible(false);
1862 procedure TGikoForm.ReloadBBS;
1865 item : TBBSMenuItem;
1867 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1868 NotSelectTabCloseAction.Execute;
1869 if BrowserTab.Tabs.Count >= 1 then
1870 DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1871 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
1872 //FHistoryList.Clear;
1873 //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
1874 TreeView.Items.Clear;
1878 for i := Length( BBSs ) - 1 downto 0 do begin
1879 if BBSs[ i ] <> nil then
1888 FTreeType := gttNone;
1890 GikoSys.ReadBoardFile; //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\93Ç
\8d\9e
1891 //
\83\81\83j
\83\85\81[
\82ð
\8dí
\8f\9c
1892 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1894 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1895 CabinetSelectPopupMenu.Items[ i ].Free;
1896 CabinetMenu.Items[ i ].Free;
1901 //
\83\81\83j
\83\85\81[
\82É
\92Ç
\89Á
1902 for i := Length( BBSs ) - 1 downto 0 do begin
1904 item := TBBSMenuItem.Create( PopupMenu );
1905 item.Caption := BBSs[ i ].Title;
1906 item.Data := BBSs[ i ];
1907 item.OnClick := BBSMenuItemOnClick;
1908 CabinetSelectPopupMenu.Items.Insert( 0, item );
1909 item := TBBSMenuItem.Create( PopupMenu );
1910 item.Caption := BBSs[ i ].Title;
1911 item.Data := BBSs[ i ];
1912 item.OnClick := BBSMenuItemOnClick;
1913 CabinetMenu.Insert( 0, item );
1917 ShowBBSTree( BBSs[ 0 ] );
1919 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1922 for i := FHistoryList.Count - 1 downto 0 do
1923 TFavoriteThreadItem( FHistoryList[ i ] ).Free;
1929 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
1930 // FFavorite := TFavorite.Create(FavoriteTreeView);
1931 FavoriteTreeView.Items.Clear;
1932 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1933 FavoriteDM.ReadFavorite;
1938 //
\83{
\81[
\83h
\83c
\83\8a\81[
\90Ý
\92è
1939 procedure TGikoForm.SetBoardTreeNode(
1945 CategoryNode: TTreeNode;
1946 BoardNode: TTreeNode;
1947 Category: TCategory;
1950 //
\94Â
\83\8a\83X
\83g
\82Ì
\90Ý
\92è
1951 FActiveBBS := inBBS;
1952 TreeView.Items.BeginUpdate;
1953 TreeView.Items.Clear;
1956 if SplashWindow <> nil then
1957 SplashWindow.ProgressBar.Max := BBSs[ 0 ].Count;
1961 Root := TreeView.Items.Add( nil, inBBS.Title );
1962 Root.ImageIndex := ITEM_ICON_2CH1;
1963 Root.SelectedIndex := ITEM_ICON_2CH2;
1965 for i := 0 to inBBS.Count - 1 do begin
1966 Category := TCategory(inBBS.Items[i]);
1967 CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
1968 CategoryNode.Data := Category;
1969 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
1970 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
1972 for j := 0 to Category.Count - 1 do begin
1973 Board := TBoard(Category.Items[j]);
1975 BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
1976 BoardNode.Data := Board;
1977 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
1978 if not Board.IsLogFile then begin
1979 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
1980 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
1982 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
1983 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
1984 for k := 0 to Board.Count - 1 do begin
1985 if Board.Items[ k ].IsLogFile then begin
1986 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
1987 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
1996 CategoryNode.Expanded := Category.NodeExpand;
1998 if SplashWindow <> nil then begin
1999 SplashWindow.ProgressBar.StepIt;
2000 Application.ProcessMessages;
2004 TreeView.Items.EndUpdate;
2008 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
2010 COLUMN: array[0..0] of string = ('
\83J
\83e
\83S
\83\8a\96¼');
2012 ListColumn: TListColumn;
2015 ListView.Items.BeginUpdate;
2017 Screen.Cursor := crHourGlass;
2019 ListView.Columns.Clear;
2020 for i := 0 to Length(COLUMN) - 1 do begin
2021 ListColumn := ListView.Columns.Add;
2022 ListColumn.Caption := COLUMN[i];
2023 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
2026 ListView.Items.Count := 0;
2027 ListView.Items.Clear;
2028 ListView.Items.Count := ABBS2ch.Count;
2030 // UpFolderAction.Enabled := False;
2031 // AllItemAction.Enabled := False;
2032 // LogItemAction.Enabled := False;
2033 // NewItemAction.Enabled := False;
2034 // SelectItemAction.Enabled := False;
2035 // ListDownloadToolButton.Enabled := False;
2036 // BoardReservToolButton.Enabled := False;
2037 // ListThreadDownloadToolButton.Enabled := False;
2039 ListNameLabel.Caption := ABBS2ch.Title;
2040 FolderImage.Picture := nil;
2041 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
2044 FSortOrder := False;
2045 ListViewColumnClick(nil, ListView.Column[0]);
2047 Result := ABBS2ch.Count;
2049 Screen.Cursor := crDefault;
2050 ListView.Items.EndUpdate;
2054 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
2056 COLUMN: array[0..2] of string = ('
\94Â
\96¼', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e');
2058 ListColumn: TListColumn;
2061 ListView.Items.BeginUpdate;
2063 Screen.Cursor := crHourGlass;
2065 ListView.Columns.Clear;
2066 for i := 0 to Length(COLUMN) - 1 do begin
2067 ListColumn := ListView.Columns.Add;
2068 ListColumn.Caption := COLUMN[i];
2069 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
2072 ListView.Items.Count := 0;
2073 ListView.Items.Clear;
2074 ListView.Items.Count := Category.Count;
2076 // UpFolderAction.Enabled := True;
2077 // AllItemAction.Enabled := False;
2078 // LogItemAction.Enabled := False;
2079 // NewItemAction.Enabled := False;
2080 // SelectItemAction.Enabled := False;
2081 // ListDownloadToolButton.Enabled := False;
2082 // BoardReservToolButton.Enabled := False;
2083 // ListThreadDownloadToolButton.Enabled := False;
2085 ListNameLabel.Caption := Category.Title;
2086 FolderImage.Picture := nil;
2087 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2090 FSortOrder := False;
2091 ListViewColumnClick(nil, ListView.Column[0]);
2093 Result := Category.Count;
2095 Screen.Cursor := crDefault;
2096 ListView.Items.EndUpdate;
2100 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2102 COLUMN: array[0..6] of string = ('
\83X
\83\8c\83b
\83h
\96¼', '
\83J
\83E
\83\93\83g', '
\8eæ
\93¾', '
\90V
\92\85',
2103 '
\96¢
\93Ç', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e');
2104 COLUMN_ALIGNMENT: array[0..6] of TAlignment = (taLeftJustify, taRightJustify,
2105 taRightJustify, taRightJustify,
2106 taRightJustify, taLeftJustify,
2108 //No,
\83X
\83\8c\83b
\83h
\96¼,
\83J
\83E
\83\93\83g,
\8f\84\89ñ
\97\
\96ñ,
\8eæ
\93¾
\93ú
\8e\9e
2110 ListColumn: TListColumn;
2113 ListView.Items.BeginUpdate;
2115 Screen.Cursor := crHourGlass;
2117 //
\83`
\83\89\82Â
\82«
\96h
\8e~
\82Ì
\82½
\82ß
\81A
\95Ï
\8dX
\82³
\82ê
\82Ä
\82¢
\82é
\8fê
\8d\87\82Ì
\82Ý
2118 //
\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Ó
2119 if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2121 ListView.Columns.Clear;
2122 for i := 0 to Length(COLUMN) - 1 do begin
2123 ListColumn := ListView.Columns.Add;
2124 ListColumn.Caption := COLUMN[i];
2125 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2126 ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2130 ListView.Items.Count := 0;
2131 ListView.Items.Clear;
2133 case GikoForm.ViewType of
2134 gvtAll: ListView.Items.Count := Board.Count;
2135 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2136 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2137 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2140 ListNameLabel.Caption := Board.Title;
2141 FolderImage.Picture := nil;
2142 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2145 FSortOrder := False;
2146 ListViewColumnClick(nil, ListView.Column[0]);
2148 Result := Board.Count;
2150 Screen.Cursor := crDefault;
2151 ListView.Items.EndUpdate;
2155 procedure TGikoForm.TreeViewChange(Sender: TObject; Node: TTreeNode);
2159 if FTreeType = gttHistory then begin
2160 if GetActiveContent <> TFavoriteThreadItem( Node ).Item then
2161 FavoriteClick( Node );
2165 ListView.Selected := nil;
2166 ListView.Items.Count := 0;
2167 ListView.Items.Clear;
2168 // ListView.Columns.Clear;
2170 Caption := CAPTION_NAME;
2171 //Application.Title := CAPTION_NAME;
2174 if GetActiveList is TBBS then begin
2175 for i := 0 to ListView.Columns.Count - 1 do
2176 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
2177 end else if GetActiveList is TCategory then begin
2178 for i := 0 to ListView.Columns.Count - 1 do
2179 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
2180 end else if GetActiveList is TBoard then begin
2181 for i := 0 to ListView.Columns.Count - 1 do
2182 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
2185 if TObject(Node.Data) is TBBS then begin
2186 SetActiveList(Node.data);
2187 end else if TObject(Node.Data) is TCategory then begin
2188 SetActiveList(Node.data);
2189 end else if TObject(Node.Data) is TBoard then begin
2190 if not TBoard(Node.Data).IsThreadDatRead then begin
2191 Screen.Cursor := crHourGlass;
2193 GikoSys.ReadSubjectFile(TBoard(Node.Data));
2195 Screen.Cursor := crDefault;
2198 SetActiveList(Node.data);
2202 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2204 // FileName: string;
2205 // DateTime: TDateTime;
2208 Category: TCategory;
2210 ThreadItem: TThreadItem;
2213 if ActiveList is TBBS then begin
2214 BBS := TBBS(ActiveList);
2216 ListView.StateImages := nil;
2218 if BBS = nil then Exit;
2219 if BBS.Count <= 0 then Exit;
2220 if Item = nil then Exit;
2221 if Item.Index > BBS.Count then Exit;
2222 if ListView.Items.Count = 0 then Exit;
2224 if not (BBS.Items[Item.index] is TCategory) then Exit;
2225 Category := TCategory(BBS.Items[Item.index]);
2227 if Category = nil then Exit;
2229 if ListNumberVisibleAction.Checked then
2230 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2232 Item.Caption := Category.Title;
2234 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2235 Item.Data := Category;
2236 end else if ActiveList is TCategory then begin
2237 Category := TCategory(ActiveList);
2239 ListView.StateImages := nil;
2241 if Category = nil then Exit;
2242 if Category.Count <= 0 then Exit;
2243 if Item = nil then Exit;
2244 if Item.Index >= Category.Count then Exit;
2245 if ListView.Items.Count = 0 then Exit;
2247 if not (Category.Items[Item.Index] is TBoard) then Exit;
2248 Board := TBoard(Category.Items[Item.Index]);
2250 if Board = nil then Exit;
2252 if ListNumberVisibleAction.Checked then
2253 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2255 Item.Caption := Board.Title;
2257 if Item.SubItems.Count <> 2 then begin
2258 Item.SubItems.Clear;
2259 Item.SubItems.Add('');
2260 Item.SubItems.Add('');
2263 Item.ImageIndex := ITEM_ICON_BOARD1;
2266 Item.SubItems[0] := Board.RoundName // '
\97\
\96ñ'
2268 Item.SubItems[0] := '';
2270 if Board.RoundDate = ZERO_DATE then begin
2271 Item.SubItems[1] := '';
2273 Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2275 end else if ActiveList is TBoard then begin
2276 Board := TBoard(ActiveList);
2278 if GikoSys.Setting.ListIconVisible then
2279 ListView.StateImages := StateIconImageList
2281 ListView.StateImages := nil;
2283 case GikoForm.ViewType of
2284 gvtAll: BoardCnt := Board.Count;
2285 gvtLog: BoardCnt := Board.GetLogThreadCount;
2286 gvtNew: BoardCnt := Board.GetNewThreadCount;
2287 gvtUser: BoardCnt := Board.GetUserThreadCount;
2292 // if Board = nil then Exit;
2293 if BoardCnt <= 0 then Exit;
2294 if Item = nil then Exit;
2295 if Item.Index > BoardCnt then Exit;
2296 if ListView.Items.Count = 0 then Exit;
2298 // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2301 case GikoForm.ViewType of
2302 gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]);
2303 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2304 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2305 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2308 if ThreadItem = nil then Exit;
2310 // if ListNumberVisibleAction.Checked then
2311 // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2313 RepStr := ThreadItem.Title;
2314 RepStr := CustomStringReplace(RepStr, '<', '<' );
2315 RepStr := CustomStringReplace(RepStr, '>', '>' );
2316 RepStr := CustomStringReplace(RepStr, '"', '"' );
2317 RepStr := CustomStringReplace(RepStr, '&', '&' );
2318 //RepStr := StringReplace(RepStr, '
\81\97\81M', ',', [rfReplaceAll]);
2320 if Item.SubItems.Count <> 6 then begin
2321 Item.SubItems.Clear;
2322 Item.SubItems.Add('');
2323 Item.SubItems.Add('');
2324 Item.SubItems.Add('');
2325 Item.SubItems.Add('');
2326 Item.SubItems.Add('');
2327 Item.SubItems.Add('');
2330 if ListNumberVisibleAction.Checked then
2331 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2333 Item.Caption := RepStr;
2335 case ThreadItem.AgeSage of
2336 gasNone: Item.StateIndex := -1;
2337 gasNew: Item.StateIndex := 0;
2338 gasAge: Item.StateIndex := 1;
2339 gasSage: Item.StateIndex := 2;
2342 if ThreadItem.IsLogFile then begin
2343 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2344 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2345 Item.SubItems[1] := IntToStr(ThreadItem.Count);
2346 if ThreadItem.NewResCount = 0 then
2347 Item.SubItems[2] := ''
2349 Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2350 Item.SubItems[3] := '';
2351 if ThreadItem.Round then
2352 Item.SubItems[4] := ThreadItem.RoundName
2354 Item.SubItems[4] := '';
2355 if ThreadItem.RoundDate = ZERO_DATE then begin
2356 Item.SubItems[5] := '';
2358 Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2359 if ThreadItem.NewArrival then
2360 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2362 Item.ImageIndex := ITEM_ICON_THREAD1;
2363 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2364 Item.SubItems[1] := '';
2365 Item.SubItems[2] := '';
2366 Item.SubItems[3] := '';
2367 Item.SubItems[4] := '';
2368 Item.SubItems[5] := '';
2370 Item.Data := ThreadItem;
2374 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2375 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2376 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2377 var Index: Integer);
2382 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2388 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2389 EndIndex: Integer; OldState, NewState: TItemStates);
2394 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2402 threadItem : TThreadItem;
2409 ActiveFileName: string;
2416 if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin
2417 if LowerCase(OleVariant(IHTMLDocument2(Browser.Document)).charset) <> 'shift_jis' then
2418 OleVariant(IHTMLDocument2(Browser.Document)).charset := 'shift_jis';
2424 if PreviewTimer.Enabled then
2425 PreviewTimer.Enabled := False;
2426 Application.CancelHint;
2427 if GetActiveContent <> nil then
2428 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2430 ActiveFileName := '';
2432 StatusBar.Panels[1].Text := Text;
2434 if FHint <> nil then begin
2435 FHint.ReleaseHandle;
2438 if FPreviewBrowser <> nil then
2439 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2441 if not GikoSys.Setting.UnActivePopup then
2442 if not GikoForm.Active then
2445 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2446 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2449 Ext := AnsiLowerCase(ExtractFileExt(Text));
2450 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2451 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2452 if FPreviewBrowser = nil then begin
2453 FPreviewBrowser := TPreviewBrowser.Create(Self);
2454 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2455 TOleControl(FPreviewBrowser).Parent := nil;
2457 FPreviewBrowser.Navigate('about:blank');//
\91O
\89ñ
\82Ì
\83v
\83\8c\83r
\83\85\81[
\89æ
\91\9c\8fÁ
\8b\8e\97p
2458 FPreviewURL := Text;
2459 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2460 PreviewTimer.Enabled := True;
2461 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2462 if Pos('mailto:', Text) = 1 then begin
2463 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2464 //
\83M
\83R
\83i
\83r
\83X
\83\8c \83p
\81[
\83g3
\82Ì466
\8e\81\82É
\8a´
\8eÓ
2466 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2467 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2468 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2469 if (Assigned(e)) then begin
2470 tmp2 := GikoSys.ZenToHan(e.Get_outerText);
2471 if (GikoSys.IsNumeric(tmp2)) then begin
2472 //
\82\93\82Í
\83\8c\83X
\94Ô
\8d\86\82Á
\82Û
\82¢
\82Á
\82·
\81B
2473 wkIntSt := StrToInt(tmp2);
2474 wkIntTo := StrToInt(tmp2);
2475 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2476 FHint.PopupType := gptThread;
2477 SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False);
2479 FHint.PopupType := gptRaw;
2486 if Pos('about:blank..', URL) = 1 then
2487 URL := StringReplace( URL, 'about:blank..', 'http://www.2ch.net', [] );
2489 PathRec := Gikosys.Parse2chURL2(URL);
2491 if PathRec.FDone then begin
2493 wkIntSt := PathRec.FSt;
2494 wkIntTo := PathRec.FTo;
2496 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2499 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2501 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2503 end else if wkIntSt > wkIntTo then begin
2508 //if wkIntSt = 0 then
2510 //if wkINtTo = 0 then
2512 //if PathRec.FFirst then
2514 if PathRec.FStBegin then
2516 if PathRec.FToEnd then
2519 ATitle := ActiveFileName <> PathRec.FKey;
2521 threadItem := BBSsFindThreadFromURL( URL );
2522 if threadItem = nil then begin
2523 board := BBSsFindBoardFromBBSID( PathRec.FBBS );
2524 if board <> nil then
2525 threadItem := board.Find( PathRec.FKey + '.dat' );
2528 if threadItem <> nil then begin
2529 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2530 FHint.PopupType := gptThread;
2531 SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2537 // ShowTextPopup(s);
2538 if FHint.PopupType = gptRaw then begin
2539 if FHint.Caption <> '' then
2542 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2548 procedure TGikoForm.BrowserTitleChange(Sender: TObject;
2549 const Text: WideString);
2553 if (Text = BLANK_HTML) or (Text = GikoSys.GetHtmlTempFileName) then
2554 Title := CAPTION_NAME
2556 Title := CAPTION_NAME + ' - [' + Text + ']';
2558 //Application.Title := Title;
2561 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2564 //SysMenuApp: HMenu;
2566 FEnabledCloseButton := Enabled;
2567 SysMenu := GetSystemMenu(Handle, False);
2568 //SysMenuApp := GetSystemMenu(Application.Handle, False);
2570 if Enabled then begin
2571 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2572 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2574 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2575 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2578 DrawMenuBar(Handle);
2579 //DrawMenuBar(Application.Handle);
2582 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2583 var AllowChange: Boolean);
2585 if FTreeType = gtt2ch then
2589 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2590 Shift: TShiftState);
2592 if Key = VK_BACK then begin
2593 // UpFolderButtonClick(Sender);
2594 end else if Key = VK_SPACE then begin
2596 end else if Key = VK_RETURN then begin
2601 function TGikoForm.GetHttpState: Boolean;
2603 Result := FHttpState;
2606 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2607 Column: TListColumn);
2611 wkCategory: TCategory;
2614 if FSortIndex = Column.Index then
2615 FSortOrder := not FSortOrder
2617 FSortOrder := False;
2619 for i := 0 to ListView.Columns.Count - 1 do
2620 ListView.Column[i].ImageIndex := -1;
2622 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
2624 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
2626 Sort.SortNoFlag := ListNumberVisibleAction.Checked;
2628 //if TObject(TreeView.Selected.Data) is TBBS then begin
2629 if TObject( FActiveList ) is TBBS then begin
2630 //wkBBS := TBBS(TreeView.Selected.Data);
2631 wkBBS := TBBS( FActiveList );
2632 Sort.SortOrder := FSortOrder;
2633 Sort.SortIndex := Column.Index;
2634 wkBBS.Sort(CategorySortProc);
2636 //end else if TObject(TreeView.Selected.Data) is TCategory then begin
2637 end else if TObject( FActiveList ) is TCategory then begin
2638 //wkCategory := TCategory(TreeView.Selected.Data);
2639 wkCategory := TCategory( FActiveList );
2640 Sort.SortOrder := FSortOrder;
2641 Sort.SortIndex := Column.Index;
2642 wkCategory.Sort(BoardSortProc);
2644 //end else if TObject(TreeView.Selected.Data) is TBoard then begin
2645 end else if TObject( FActiveList ) is TBoard then begin
2646 //wkBoard := TBoard(TreeView.Selected.Data);
2647 wkBoard := TBoard( FActiveList );
2648 Sort.SortOrder := FSortOrder;
2649 Sort.SortIndex := Column.Index;
2650 wkBoard.Sort(ThreadItemSortProc);
2653 FSortIndex := Column.Index;
2656 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2657 Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean);
2661 DefaultDraw := True;
2663 DefaultDraw := False;
2664 if (cdsSelected in State) or (cdsHot in State) then begin
2665 Sender.Canvas.Brush.Color := clHighlight;
2666 Sender.Canvas.Font.Color := clHighlightText;
2668 Sender.Canvas.Brush.Color := clBtnFace;
2669 Sender.Canvas.Font.Color := clBtnText;
2671 ARect := Rect(Button.Left, Button.Top, Button.Left + Button.Width, Button.Top + Button.Height);
2672 Sender.Canvas.FillRect(ARect);
2673 DrawText(Sender.Canvas.Handle, PChar(Button.Caption), -1, ARect, DT_SINGLELINE or DT_VCENTER or DT_CENTER);
2676 function TGikoForm.GetTreeNode(Data: TObject): TTreeNode;
2681 Nodes := TreeView.Items;
2683 for i := 0 to Nodes.Count - 1 do begin
2684 if Nodes.Item[i].Data = Data then begin
2685 Result := Nodes.Item[i];
2692 procedure TGikoForm.BrowserBeforeNavigate2(Sender: TObject;
2693 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
2694 Headers: OleVariant; var Cancel: WordBool);
2699 kMenuName: string = 'menu:';
2702 if Pos(kMenuName, URL) <> 0 then begin
2703 sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
2705 if not GikoSys.IsNumeric(sNo) then Exit;
2709 KokoPopupMenu.Tag := StrToInt(sNo);
2710 KokoPopupMenu.Popup(p.x, p.y);
2711 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
2712 Cancel := not GikoSys.Setting.OpenMailer;
2717 procedure TGikoForm.ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
2718 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
2719 var DefaultDraw: Boolean);
2721 ThreadItem: TThreadItem;
2724 // TListView(Sender).Canvas.Font.Style := [];
2725 if TObject(Item.Data) is TThreadItem then begin
2726 ThreadItem := TThreadItem(Item.Data);
2727 if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
2728 ListView.Canvas.Brush.Color := FOddColor;
2730 ListView.Canvas.Brush.Color := FListViewBackGroundColor;
2732 // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
2733 if ThreadItem.UnRead then
2734 TListView(Sender).Canvas.Font.Style := [fsBold];
2738 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
2740 if Application.Terminated then
2742 if PreviewTimer.Enabled then
2743 PreviewTimer.Enabled := False;
2744 //
\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
2745 if FHint <> nil then begin
2746 FHint.ReleaseHandle;
2751 if FPreviewBrowser <> nil then
2752 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2756 procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
2757 const ARect: TRect; var DefaultDraw: Boolean);
2761 IsBoardNode: Boolean;
2767 Category: TCategory;
2771 DefaultDraw := True;
2773 if FTreeType = gttHistory then Exit;
2775 TreeView.Canvas.Font.Color := clBlue;
2776 IsBoardNode := False;
2778 for i := 0 to TreeView.Items.Count - 1 do begin
2780 if not TreeView.Items[i].IsVisible then
2783 if TObject(TreeView.Items[i].Data) is TCategory then begin
2784 if TreeView.Items[i].Expanded then
2787 IsBoardNode := False;
2788 Category := TCategory(TreeView.Items[i].Data);
2789 for j := 0 to Category.Count - 1 do begin
2790 Board := Category.Items[j];
2791 if Board <> nil then begin
2792 if Board.UnRead > 0 then begin
2800 end else if TObject(TreeView.Items[i].Data) is TBoard then begin
2801 IsBoardNode := True;
2802 Board := TBoard(TreeView.Items[i].Data);
2803 Cnt := Board.UnRead;
2809 Bitmap := TBitmap.Create;
2811 Bitmap.Canvas.Font.Assign(TreeView.Canvas.Font);
2812 Bitmap.Canvas.Font.Style := [fsBold];
2813 NodeWidth := Bitmap.Canvas.TextWidth(TreeView.Items[i].Text);
2818 NodeRect := TreeView.Items[i].DisplayRect(True);
2821 CntText := '(' + IntToStr(Cnt) + ')'
2822 else if Cnt = 1 then
2826 TextWidth := TreeView.Canvas.TextWidth(CntText);
2828 TextRect := Rect(NodeRect.Left + NodeWidth + 8,
2830 NodeRect.Left + NodeWidth + TextWidth + 8,
2832 DrawText(TreeView.Canvas.Handle,
2836 DT_SINGLELINE or DT_VCENTER);
2838 TreeViewCustomDrawItem(nil, nil, [], DefaultDraw);
2841 procedure TGikoForm.TreeViewCustomDrawItem(Sender: TCustomTreeView;
2842 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
2845 Category: TCategory;
2848 DefaultDraw := True;
2850 if FTreeType = gttHistory then Exit;
2852 TreeView.Canvas.Font.Style := [];
2853 if Node <> nil then begin
2854 if TObject(Node.Data) is TCategory then begin
2855 Category := TCategory(Node.Data);
2856 for i := 0 to Category.Count - 1 do begin
2857 Board := Category.Items[i];
2858 if Board <> nil then begin
2859 if Board.UnRead > 0 then begin
2860 TreeView.Canvas.Font.Style := [fsBold];
2865 end else if TObject(Node.Data) is TBoard then begin
2866 Board := TBoard(Node.Data);
2867 if Board.UnRead > 0 then
2868 TreeView.Canvas.Font.Style := [fsBold];
2873 procedure TGikoForm.TreeViewExpanded(Sender: TObject; Node: TTreeNode);
2875 TreeView.Invalidate;
2877 if TObject(Node.Data) is TBBS then begin
2878 TBBS(Node.Data).NodeExpand := True;
2879 end else if TObject(Node.Data) is TCategory then begin
2880 TCategory(Node.Data).NodeExpand := True;
2881 end else if TObject(Node.Data) is TBoard then begin
2882 TBoard(Node.Data).NodeExpand := True;
2886 {procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
2888 TreeSplitter.Visible := PanelVisible;
2889 CabinetPanel.Visible := PanelVisible;
2890 CabinetToolButton.Down := PanelVisible;
2893 procedure TGikoForm.ListViewAllSelect;
2899 procedure TGikoForm.TreeViewDblClick(Sender: TObject);
2902 ThreadItem: TThreadItem;
2906 GetCursorPos(APoint);
2907 APoint := TreeView.ScreenToClient(APoint);
2908 HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
2909 if not (htOnLabel in HitTest) then Exit;
2910 if TreeView.Selected = nil then Exit;
2912 if FTreeType = gtt2ch then begin
2913 if not (TObject(TreeView.Selected.Data) is TBoard) then Exit;
2914 Board := TBoard(TreeView.Selected.Data);
2915 DownloadList(Board);
2916 end else if FTreeType = gttHistory then begin
2917 if not (TObject(TreeView.Selected.Data) is TFavoriteThreadItem) then Exit;
2918 ThreadItem := TFavoriteThreadItem(TreeView.Selected.Data).Item;
2919 DownloadContent(ThreadItem);
2923 procedure TGikoForm.FavoriteTreeViewClick(Sender: TObject);
2926 FavoriteClick( TObject( FavoriteTreeView.Selected ) );
2930 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
2932 AddMessageList(Msg, nil, Icon);
2935 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
2941 if Item.DownType = gdtBoard then
2942 ATitle := Item.Board.Title
2944 ATitle := Item.ThreadItem.Title;
2946 ATitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j';
2948 if Item.State in [gdsComplete, gdsDiffComplete] then begin
2950 if Item.DownType = gdtBoard then begin
2953 AddMessageList(ATitle + ' [
\83X
\83\8c\88ê
\97\97\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
2954 if GetActiveList = Item.Board then
2955 SetActiveList(Item.Board);
2956 Item.Board.Modified := True;
2957 Item.Board.IsThreadDatRead := True;
2959 end else if Item.DownType = gdtThread then begin
2962 Item.ThreadItem.NewArrival := True;
2963 if GetActiveContent = Item.ThreadItem then
2964 InsertBrowserTab(Item.ThreadItem)
2966 InsertBrowserTab(Item.ThreadItem, False);
2968 if Item.State = gdsComplete then begin
2970 AddMessageList(ATitle + ' [
\83X
\83\8c\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
2972 PlaySound('NewDiff');
2973 AddMessageList(ATitle + ' [
\83X
\83\8c\8d·
\95ª
\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
2976 //
\8f\84\89ñ
\82 \82è
\82Ì
\8fê
\8d\87\81\95\82P
\82O
\82O
\82O
\92´
\82Í
\8f\84\89ñ
\8dí
\8f\9c
2977 if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin
2978 Item.ThreadItem.Round := False;
2979 Item.ThreadItem.RoundName := '';
2980 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);
2986 end else if Item.State = gdsNotModify then begin
2988 { if (Item.DownType = gdtThread) and (AddHistory(Item.ThreadItem)) then begin
2989 //SetContent(Item.ThreadItem);
2990 InsertBrowserTab(Item.ThreadItem);
2992 AddMessageList(ATitle + ' [
\96¢
\8dX
\90V]', nil, gmiSAD);
2993 PlaySound('NoChange');
2994 Screen.Cursor := crDefault;
2995 end else if Item.State = gdsAbort then begin
2997 AddMessageList(ATitle + ' [
\92\86\92f]', nil, gmiSAD);
2998 end else if Item.State = gdsError then begin
3003 AddMessageList(ATitle + ' [
\83G
\83\89\81[(' + IntToStr(Item.ResponseCode) + s + ')]', nil, gmiNG);
3004 // if Item.ResponseCode = 302 then
3005 // 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);
3011 if FWorkCount < 0 then FWorkCount := 0;
3012 if FWorkCount = 0 then begin
3014 Animate.Active := False;
3016 Screen.Cursor := crDefault;
3023 procedure TGikoForm.WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer);
3025 // SetProgressValue(Number, 0, AWorkCountMax);
3026 // ProgressBar.Visible := True;
3027 ProgressBar.Position := 0;
3028 ProgressBar.Max := AWorkCountMax;
3029 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ð
\8aJ
\8en
\82µ
\82Ü
\82·';
3030 FDownloadMax := AWorkCountMax;
3033 procedure TGikoForm.WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
3035 // ProgressBar.Visible := False;
3036 ProgressBar.Position := 0;
3037 // SetProgressValue(Number, 0);
3038 if FDownloadMax <> 0 then
3039 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ª
\8a®
\97¹
\82µ
\82Ü
\82µ
\82½';
3042 procedure TGikoForm.Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
3044 ProgressBar.Position := AWorkCount;
3045 // SetProgressValue(Number, AWorkCount);
3046 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86 (' + IntToStr(AWorkCount) + '/' + IntToStr(FDownloadMax) + ')';
3050 procedure TGikoForm.SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
3052 Component: TComponent;
3054 Component := FindComponent('ProgressBar' + IntToStr(Number + 1));
3055 if Component <> nil then begin
3056 if not (Component is TProgressBar) then Exit;
3058 TProgressBar(Component).Max := Max;
3059 TProgressBar(Component).Position := Value;
3064 procedure TGikoForm.AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
3066 ListItem: TListItem;
3068 MessageListView.Items.BeginUpdate;
3070 ListItem := MessageListView.Items.Add;
3071 ListItem.Caption := ACaption;
3072 ListItem.Data := AObject;
3073 ListItem.MakeVisible(False);
3075 gmiOK: ListItem.ImageIndex := 0;
3076 gmiSAD: ListItem.ImageIndex := 1;
3077 gmiNG: ListItem.ImageIndex := 2;
3078 gmiWhat: ListItem.ImageIndex := 3;
3081 MessageListView.Items.EndUpdate;
3085 {procedure TGikoForm.BrowserTabChange(Sender: TObject);
3088 ThreadItem: TThreadItem;
3090 ThreadItem := GetActiveContent;
3091 if ThreadItem <> nil then begin
3092 SetContent(ThreadItem);
3096 procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
3099 // OldIndex: Integer;
3100 favItem : TFavoriteThreadItem;
3102 if ThreadItem.IsLogFile then begin
3103 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
3104 if TObject(BrowserTab.Tabs.Objects[i]) is TThreadItem then begin
3105 if TThreadItem(BrowserTab.Tabs.Objects[i]) = ThreadItem then begin
3106 if ActiveTab then begin
3107 //OldIndex := BrowserTab.TabIndex;
3108 BrowserTab.TabIndex := i;
3109 // if OldIndex <> i then
3110 BrowserTab.OnChange(nil);
3118 if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin
3119 favItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
3120 AddHistory( favItem );
3121 BrowserTab.Tabs.Insert(0, GikoSys.GetShortName(ThreadItem.Title, 20));
3122 BrowserTab.Tabs.Objects[0] := ThreadItem;
3124 BrowserTab.TabIndex := 0;
3126 favItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
3127 AddHistory( favItem );
3128 i := BrowserTab.Tabs.Add(GikoSys.GetShortName(ThreadItem.Title, 20));
3129 BrowserTab.Tabs.Objects[i] := ThreadItem;
3131 BrowserTab.TabIndex := i;
3133 if ActiveTab then begin
3134 BrowserTab.OnChange(nil);
3135 BrowserNullTab := nil;
3138 //OldIndex := BrowserTab.TabIndex;
3139 BrowserNullTab := ThreadItem;
3140 BrowserTab.TabIndex := -1;
3141 // if OldIndex = -1 then
3142 BrowserTab.OnChange(nil);
3145 if GikoSys.Setting.URLDisplay then
3146 AddressComboBox.Text := ThreadItem.URL;
3149 procedure TGikoForm.SetContent(ThreadItem: TThreadItem);
3154 // HtmlName: string;
3160 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
3161 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3162 Application.ProcessMessages;
3165 if (FActiveContent <> nil) and
3166 (FActiveContent <> ThreadItem) and
3167 (Assigned(Browser.Document)) then begin
3171 Application.ProcessMessages;
3172 FActiveContent.ScrollTop := OleVariant(IHTMLDocument2(Browser.Document)).Body.ScrollTop;
3175 MsgBox(Handle, E.Message, 'SetContent[<-ScrollTop]', 0);
3181 FActiveContent := ThreadItem;
3183 if ThreadItem = nil then begin
3184 Browser.Navigate(BLANK_HTML);
3185 BrowserBoardNameLabel.Caption := '';
3186 ItemBoardImage.Picture := nil;
3187 BrowserNameLabel.Caption := '';
3188 ItemImage.Picture := nil;
3189 FActiveContent := nil;
3193 BBSID := ThreadItem.ParentBoard.BBSID;
3194 FileName := ThreadItem.FileName;
3196 if GetCapture = ListView.Handle then
3199 //OldCursor := Screen.Cursor;
3200 Screen.Cursor := crHourGlass;
3202 if ThreadItem.UnRead then begin
3203 ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
3204 if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0;
3208 if not ThreadItem.IsLogFile then begin
3210 if (not Assigned(Browser.Document)) then begin
3211 Browser.Navigate('about:blank');
3212 while (not Assigned(Browser.Document)) do begin
3213 Application.ProcessMessages;
3217 s := '<HTML><BODY><CENTER>
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Í
\8eæ
\93¾
\82µ
\82Ä
\82¢
\82Ü
\82¹
\82ñ</CENTER></BODY></HTML>';
3218 doc := Browser.Document;
3220 doc.charset := 'Shift_JIS';
3226 //Application.ProcessMessages;
3227 GikoSys.CreateHTML2(Browser.Document, ThreadItem, sTitle);
3228 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
3229 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3230 Application.ProcessMessages;
3233 Application.ProcessMessages;
3235 if ThreadItem.UnRead then
3236 BrowserMovement('new');
3239 if (ThreadItem.ScrollTop <> 0) and (not ThreadItem.UnRead) then begin
3243 doc := Browser.Document;
3244 doc.Body.ScrollTop := ThreadItem.ScrollTop;
3247 MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
3252 ThreadItem.UnRead := False;
3256 BrowserBoardNameLabel.Caption := ThreadItem.ParentBoard.Title;
3257 ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
3258 BrowserNameLabel.Caption := ThreadItem.Title;
3259 ItemImage.Picture := nil;
3260 if ThreadItem.IsLogFile then
3261 if ThreadItem.NewArrival then
3262 ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap)
3264 ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap)
3266 ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap);
3268 ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;
3269 BrowserNameLabel.Left := ItemImage.Left + 20;
3271 //if Screen.Cursor <> crDefault then
3272 // Screen.Cursor := OldCursor
3274 Screen.Cursor := crDefault;
3278 function TGikoForm.GetActiveContent: TThreadItem;
3283 if BrowserTab.TabIndex = -1 then begin
3284 Result := BrowserNullTab;
3287 Index := BrowserTab.TabIndex;
3288 if BrowserTab.Tabs.Objects[Index] is TThreadItem then
3289 Result := TThreadItem(BrowserTab.Tabs.Objects[Index]);
3291 // Result := FActiveContent;
3294 procedure TGikoForm.SetActiveList(Obj: TObject);
3300 if Obj is TBBS then begin
3301 for i := 0 to ListView.Columns.Count - 1 do
3302 ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i];
3303 SetCategoryListItem(TBBS(Obj));
3304 end else if Obj is TCategory then begin
3305 for i := 0 to ListView.Columns.Count - 1 do
3306 ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i];
3307 SetBoardListItem(TCategory(Obj));
3308 end else if Obj is TBoard then begin
3309 // SetThreadListItem
\8cÄ
\82Ô
\82È
\82ç
\82¢
\82ç
\82È
\82¢
\82ñ
\82¶
\82á
\82Ë
\82¥
\81H
3311 for i := 0 to ListView.Columns.Count - 1 do
3312 ListView.Column[i].Width := GikoSys.Setting.BoardColumnWidth[i];
3314 SetThreadListItem(TBoard(Obj));
3319 //
\81\9a\81\9a\83q
\83\8d\83\86\83L
\83\81\83\82
3320 //
\82»
\82Ì
\82¤
\82¿interface
\82ð
\8eg
\82¤
3321 function TGikoForm.GetActiveList: TObject;
3323 Result := FActiveList;
3326 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType);
3328 SetListViewType(AViewType, '', False);
3331 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
3335 if ActiveList is TBoard then begin
3336 Board := TBoard(ActiveList);
3338 Board.ParentCategory.ParenTBBS.SelectText := SelectText;
3339 Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
3340 // Board.SelectText := SelectText;
3341 // Board.KubetsuChk := KubetsuChk;
3342 ViewType := AViewType;
3343 SetActiveList(Board);
3344 SetThreadListItem(Board);
3348 procedure TGikoForm.ListViewCustomDraw(Sender: TCustomListView;
3349 const ARect: TRect; var DefaultDraw: Boolean);
3355 if ListView.Items.Count = 0 then begin
3356 DefaultDraw := True;
3358 ListView.Canvas.Brush.Color := ListView.Color;
3359 ListView.Canvas.FillRect(ARect);
3363 ListView.Canvas.Font.Color := clWindowText;
3364 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3367 ListView.Canvas.Font.Color := clBlue;
3368 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';
3371 ListView.Canvas.Font.Color := clGreen;
3372 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\90V
\92\85\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3375 ListView.Canvas.Font.Color := clNavy;
3376 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';
3377 if GetActiveList is TBoard then
3378 s := Format(s, [TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText]);
3386 p := Point((ListView.ClientWidth div 2) - (ListView.Canvas.TextWidth(s) div 2),
3387 (ListView.ClientHeight div 2) - (ListView.Canvas.TextHeight(s) div 2));
3388 ListView.Canvas.TextOut(p.X, p.Y, s);
3390 DefaultDraw := True;
3394 procedure TGikoForm.DownloadList(Board: TBoard);
3396 Item: TDownloadItem;
3398 if Board.Title = '' then
3399 FDownloadTitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j'
3401 FDownloadTitle := Board.Title;
3403 if not Board.IsThreadDatRead then
3404 GikoSys.ReadSubjectFile(Board);
3405 Item := TDownloadItem.Create;
3407 Item.Board := Board;
3408 Item.DownType := gdtBoard;
3409 // AbortToolButton.Enabled := True;
3410 // Animate.Active := True;
3411 // FDownload.Add(Item);
3412 FControlThread.AddItem(Item);
3413 // Animate.Active := False;
3414 // AbortToolButton.Enabled := False;
3415 if FWorkCount = 0 then begin
3417 Animate.Active := True;
3420 Screen.Cursor := crAppStart;
3428 procedure TGikoForm.DownloadContent(ThreadItem: TThreadItem);
3430 Item: TDownloadItem;
3432 if ThreadItem.Title = '' then
3433 FDownloadTitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j'
3435 FDownloadTitle := ThreadItem.Title;
3436 Item := TDownloadItem.Create;
3438 Item.ThreadItem := ThreadItem;
3439 Item.DownType := gdtThread;
3440 // AbortToolButton.Enabled := True;
3441 // Animate.Active := True;
3442 // FDownload.Add(Item);
3443 FControlThread.AddItem(Item);
3444 // Animate.Active := False;
3445 // AbortToolButton.Enabled := False;
3446 if FWorkCount = 0 then begin
3448 Animate.Active := True;
3451 Screen.Cursor := crAppStart;
3459 procedure TGikoForm.PlaySound(SoundEventName: string);
3463 FileName := GikoSys.Setting.FindSoundFileName(SoundEventName);
3464 if FileExists(FileName) then begin
3465 if not sndPlaySound(PChar(FileName), SND_ASYNC or SND_NOSTOP) then begin
3466 sndPlaySound(nil, SND_SYNC);
3467 Application.ProcessMessages;
3469 sndPlaySound(PChar(FileName), SND_ASYNC);
3474 function TGikoForm.AddHistory( favItem : TFavoriteThreadItem ): Boolean;
3477 Item: TFavoriteThreadItem;
3481 // if (GetActiveContent = ThreadItem) and
3482 // (ThreadItem.Count <= ThreadItem.Kokomade) then
3484 // if GetActiveContent = ThreadItem then
3488 for i := 0 to FHistoryList.Count - 1 do begin
3489 if TObject(FHistoryList[i]) is TFavoriteThreadItem then begin
3490 Item := TFavoriteThreadItem(FHistoryList[i]);
3491 if Item.URL = favItem.URL then begin
3492 // SetContent(ThreadItem);
3493 FHistoryList.Move(i, 0);
3494 if FTreeType = gttHistory then
3495 TreeView.Items[ i ].MoveTo( TreeView.TopItem, naInsert );
3501 if FHistoryList.Count > 0 then
3502 FHistoryList.Insert( 0, favItem )
3504 FHistoryList.Add( favItem );
3505 // SetContent(ThreadItem);
3507 if FTreeType = gttHistory then begin
3508 Node := TreeView.Items.Add( nil, favItem.Title );
3509 Node.MoveTo( TreeView.TopItem, naInsert );
3511 if favItem.NewArrival then begin
3512 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3513 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3515 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3516 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3519 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
3520 //
\81¦favItem.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
3521 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3522 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3523 Node.Data := favItem;
3527 procedure TGikoForm.DeleteHistory( threadItem: TThreadItem );
3531 for i := 0 to FHistoryList.Count - 1 do begin
3532 if threadItem.URL = TFavoriteThreadItem( FHistoryList.Items[i] ).URL then begin
3533 TFavoriteThreadItem( FHistoryList.Items[ i ] ).Free;
3534 FHistoryList.Delete(i);
3540 procedure TGikoForm.ClearHistory;
3545 procedure TGikoForm.SaveHistory;
3548 saveList : TstringList;
3551 saveList := TStringList.Create;
3554 saveList.Add('<?xml version="1.0" encoding="Shift_JIS" standalone="yes"?>');
3555 saveList.Add('<address>');
3556 bound := FHistoryList.Count - 1;
3557 for i := 0 to bound do begin
3558 // title
\82Í
\8d¡
\82Ì
\82Æ
\82±
\82ë
\8eg
\82Á
\82Ä
\82¢
\82È
\82¢
3560 '<history url="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).URL ) + '"' +
3561 ' title="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).Title ) + '"/>');
3563 saveList.Add('</address>');
3564 saveList.SaveToFile( GikoSys.GetConfigDir + 'History.xml' );
3571 procedure TGikoForm.LoadHistory;
3575 XMLDoc : IXMLDocument;
3577 HistoryNode : IXMLNode;
3579 favItem : TFavoriteThreadItem;
3582 fileName := GikoSys.GetConfigDir + 'History.xml';
3584 if FileExists( fileName ) then begin
3586 XMLDoc := LoadXMLDocument(FileName);
3588 XMLNode := XMLDoc.DocumentElement;
3590 if XMLNode.NodeName = 'address' then begin
3591 bound := XMLNode.ChildNodes.Count - 1;
3592 for i := 0 to bound do begin
3593 HistoryNode := XMLNode.ChildNodes[i];
3594 if HistoryNode.NodeName = 'history' then begin
3595 //if FReadCount >= sl.Count then begin
3596 s := Trim(HistoryNode.Attributes['url']);
3597 if s <> '' then begin
3598 favItem := TFavoriteThreadItem.Create(
3599 s, HistoryNode.Attributes[ 'title' ] );
3600 AddHistory( favItem );
3615 procedure TGikoForm.ShowBBSTree(
3623 FavoriteTreeView.Visible := False;
3624 FavoriteToolBar.Hide;
3625 TreeView.Visible := True;
3627 b := CabinetSelectPopupMenu.Items.Count - 1;
3628 for i := 0 to b do begin
3629 item := CabinetSelectPopupMenu.Items[ i ];
3630 if item is TBBSMenuItem then begin
3631 if TBBSMenuItem( item ).Data = inBBS then begin
3632 item.Checked := True;
3633 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3634 CabinetMenu.Items[ i ].Checked := True;
3635 GikoSys.Setting.CabinetIndex := i;
3639 item.Checked := False;
3640 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3641 CabinetMenu.Items[ i ].Checked := False;
3643 CabinetSelectToolButton.Caption := inBBS.Title;
3645 CabinetHistoryAction.Checked := False;
3646 CabinetFavoriteAction.Checked := False;
3648 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
3649 FTreeType := gtt2ch;
3650 HistoryToolBar.Hide;
3651 SetBoardTreeNode( inBBS );
3652 TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
3653 //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
3654 if GetActiveList = nil then
3655 TreeView.Selected := TreeView.Items[0]
3657 for i := 0 to TreeView.Items.Count - 1 do begin
3658 if TreeView.Items[i].Data = GetActiveList then begin
3659 TreeView.Selected := TreeView.Items[i];
3663 TreeView.Selected := TreeView.Items[0]
3671 procedure TGikoForm.ShowHistoryTree;
3676 if CabinetPanel.Visible then begin
3677 if FTreeType = gttHistory then begin
3678 CabinetVisible( False );
3679 CabinetHistoryAction.Checked := False;
3681 CabinetHistoryAction.Checked := True;
3684 CabinetVisible( True );
3685 CabinetHistoryAction.Checked := True;
3688 // BBS...BBS, History, Favorite
3689 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 2;
3691 FavoriteTreeView.Visible := False;
3692 TreeView.Visible := True;
3694 CabinetBBSAction.Checked := False;
3695 CabinetFavoriteAction.Checked := False;
3697 if FTreeType <> gttHistory then begin
3698 b := CabinetSelectPopupMenu.Items.Count - 1;
3699 for i := 0 to b do begin
3700 item := CabinetSelectPopupMenu.Items[ i ];
3701 if item is TBBSMenuItem then begin
3702 item.Checked := False;
3703 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3704 CabinetMenu.Items[ i ].Checked := False;
3708 FTreeType := gttHistory;
3709 HistoryToolBar.Show;
3710 FavoriteToolBar.Hide;
3712 CabinetSelectToolButton.Caption := '
\97\9a\97ð
\83\8a\83X
\83g';
3716 procedure TGikoForm.SetHistoryTreeNode;
3720 Item: TFavoriteThreadItem;
3722 TreeView.Items.BeginUpdate;
3724 TreeView.Items.Clear;
3725 for i := 0 to FHistoryList.Count - 1 do begin
3726 Item := TFavoriteThreadItem(FHistoryList[i]);
3727 Node := TreeView.Items.Add(nil, Item.Title);
3729 if Item.Item.NewArrival then begin
3730 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3731 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3733 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3734 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3737 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
3738 //
\81¦Item.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
3739 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3740 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3744 TreeView.Items.EndUpdate;
3748 procedure TGikoForm.SelectTreeNode(Item: TObject; CallEvent: Boolean);
3750 ChangeEvent: TTVChangedEvent;
3751 ChangingEvent: TTVChangingEvent;
3755 if Item is TCategory then
3756 bbs := TCategory( Item ).ParenTBBS
3757 else if Item is TBoard then
3758 bbs := TBoard( Item ).ParentCategory.ParenTBBS
3762 if (FTreeType = gtt2ch) and (FActiveBBS = bbs) then begin
3764 ChangingEvent := nil;
3766 if not CallEvent then begin
3767 ChangeEvent := TreeView.OnChange;
3768 ChangingEvent := TreeView.OnChanging;
3771 if not CallEvent then begin
3772 TreeView.OnChange := nil;
3773 TreeView.OnChanging := nil;
3775 Application.ProcessMessages;
3776 for i := 0 to TreeView.Items.Count - 1 do begin
3777 if TreeView.Items[i].Data = Item then begin
3778 TreeView.Items[i].Selected := True;
3780 TreeViewChange(TreeView, TreeView.Items[i]);
3784 Application.ProcessMessages;
3786 if not CallEvent then begin
3787 TreeView.OnChange := ChangeEvent;
3788 TreeView.OnChanging := ChangingEvent;
3792 if GetActiveList is TBBS then begin
3793 for i := 0 to ListView.Columns.Count - 1 do
3794 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
3795 end else if GetActiveList is TCategory then begin
3796 for i := 0 to ListView.Columns.Count - 1 do
3797 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
3798 end else if GetActiveList is TBoard then begin
3799 for i := 0 to ListView.Columns.Count - 1 do
3800 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
3803 if (Item is TBBS) or (Item is TCategory) then begin
3804 SetActiveList( Item );
3805 end else if Item is TBoard then begin
3806 if not TBoard( Item ).IsThreadDatRead then begin
3807 Screen.Cursor := crHourGlass;
3809 GikoSys.ReadSubjectFile(TBoard( Item ));
3811 Screen.Cursor := crDefault;
3814 SetActiveList( Item );
3819 procedure TGikoForm.ListViewMouseDown(Sender: TObject;
3820 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
3824 { if ssDouble in Shift then begin
3825 DoubleClickOccurred[Button] := True;
3827 DoubleClickOccurred[Button] := False;
3828 t := GetTickCount+GetDoubleClickTime;
3829 while GetTickCount < t do begin
3830 Application.ProcessMessages;
3831 if DoubleClickOccurred[Button] then
3836 if ssDouble in Shift then begin
3838 mbLeft: ListDoubleClick;
3851 procedure TGikoForm.ListClick;
3853 ListItem: TListItem;
3854 ThreadItem: TThreadItem;
3856 if ListView.SelCount <> 1 then Exit;
3857 ListItem := ListView.Selected;
3858 if ListItem = nil then Exit;
3859 if not (TObject(ListItem.Data) is TThreadItem) then Exit;
3861 ThreadItem := TThreadItem(ListItem.Data);
3862 if ThreadItem.IsLogFile then begin
3863 // if AddHistory(ThreadItem) then
3864 // SetContent(ThreadItem);
3865 InsertBrowserTab(ThreadItem);
3866 ListView.UpdateItems(ListItem.Index, ListItem.Index);
3868 // SetContent(ThreadItem);
3869 InsertBrowserTab(ThreadItem);
3873 procedure TGikoForm.ListDoubleClick;
3875 ThreadItem: TThreadItem;
3877 // PostMessage(ListView.Handle, WM_CANCELMODE, 0, 0);
3879 if ListView.Selected = nil then Exit;
3880 // if TreeView.Selected = nil then Exit;
3882 if TObject(ListView.Selected.Data) is TCategory then begin
3883 SelectTreeNode(ListView.Selected.Data, True);
3884 // TreeView.Selected.Expanded := True;
3885 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
3886 //TreeViewChange(nil, TreeView.Selected);
3887 end else if TObject(ListView.Selected.Data) is TBoard then begin
3888 SelectTreeNode(ListView.Selected.Data, True);
3889 // TreeView.Selected.Expanded := True;
3890 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
3891 //TreeViewChange(nil, TreeView.Selected);
3892 end else if TObject(ListView.Selected.Data) is TThreadItem then begin
3893 //if TObject(ListView.Selected.Data) is TThreadItem then begin
3894 ThreadItem := TThreadItem(ListView.Selected.Data);
3895 DownloadContent(ThreadItem);
3900 procedure TGikoForm.BrowserMovement(AName: string);
3904 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
3907 OleVariant(Browser.Document as IHTMLDocument2).body.scrollTop :=
3908 OleVariant(Browser.Document as IHTMLDocument2).anchors.item(nm).offsetTop;
3913 procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
3915 if TObject(Node.Data) is TBBS then begin
3916 TBBS(Node.Data).NodeExpand := False;
3917 end else if TObject(Node.Data) is TCategory then begin
3918 TCategory(Node.Data).NodeExpand := False;
3919 end else if TObject(Node.Data) is TBoard then begin
3920 TBoard(Node.Data).NodeExpand := False;
3924 procedure TGikoForm.MessageListViewResize(Sender: TObject);
3926 // MessageListView.Column[0].Width := MessageListView.ClientWidth - 16;
3929 procedure TGikoForm.SelectListItem(List: TList);
3931 // TmpTreeNode: TTreeNode;
3932 TmpListItem: TListItem;
3935 TmpListItem := ListView.Selected;
3936 while TmpListItem <> nil do begin
3937 List.Add(TmpListItem.Data);
3938 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
3942 procedure TGikoForm.ExitActionExecute(Sender: TObject);
3947 procedure TGikoForm.AllSelectActionExecute(Sender: TObject);
3952 procedure TGikoForm.StdToolBarVisibleActionExecute(Sender: TObject);
3954 CoolBand: TCoolBand;
3956 CoolBand := GetCoolBand(MainCoolBar, StdToolBar);
3957 if CoolBand = nil then
3959 GikoSys.Setting.StdToolBarVisible := StdToolBarVisibleAction.Checked;
3960 CoolBand.Visible := GikoSys.Setting.StdToolBarVisible;
3961 // StdToolBar.Visible := StdToolBarVisibleAction.Checked;
3962 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
3964 //StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
3965 StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible;
3968 procedure TGikoForm.AddressBarVisibleActionExecute(Sender: TObject);
3970 CoolBand: TCoolBand;
3972 CoolBand := GetCoolBand(MainCoolBar, AddressToolBar);
3973 if CoolBand = nil then
3975 GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked;
3976 CoolBand.Visible := GikoSys.Setting.AddressBarVisible;
3977 //AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
3978 AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible;
3981 procedure TGikoForm.LinkBarVisibleActionExecute(Sender: TObject);
3983 CoolBand: TCoolBand;
3985 CoolBand := GetCoolBand(MainCoolBar, LinkToolBar);
3986 if CoolBand = nil then
3988 GikoSys.Setting.LinkBarVisible := LinkBarVisibleAction.Checked;
3989 CoolBand.Visible := GikoSys.Setting.LinkBarVisible;
3990 //LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
3991 LinkToolBarVisiblePMenu.Checked := GikoSys.Setting.LinkBarVisible;
3994 procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);
3996 CoolBand: TCoolBand;
3998 CoolBand := GetCoolBand(ListCoolBar, ListToolBar);
3999 if CoolBand = nil then
4001 CoolBand.Visible := ListToolBarVisibleAction.Checked;
4002 // ListToolBar.Visible := ListToolBarVisibleAction.Checked;
4003 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4004 GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;
4007 procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);
4009 CoolBand: TCoolBand;
4011 CoolBand := GetCoolBand(ListCoolBar, ListNameToolBar);
4012 if CoolBand = nil then
4014 CoolBand.Visible := ListNameBarVisibleAction.Checked;
4015 GikoSys.Setting.ListNameBarVisible := ListNameBarVisibleAction.Checked;
4018 procedure TGikoForm.BrowserToolBarVisibleActionExecute(Sender: TObject);
4020 CoolBand: TCoolBand;
4022 CoolBand := GetCoolBand(BrowserCoolBar, BrowserToolBar);
4023 if CoolBand = nil then
4025 CoolBand.Visible := BrowserToolBarVisibleAction.Checked;
4026 // BrowserToolBar.Visible := BrowserToolBarVisibleAction.Checked;
4027 GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;
4030 procedure TGikoForm.BrowserNameBarVisibleActionExecute(Sender: TObject);
4032 CoolBand: TCoolBand;
4034 CoolBand := GetCoolBand(BrowserCoolBar, BrowserNameToolBar);
4035 if CoolBand = nil then
4037 CoolBand.Visible := BrowserNameBarVisibleAction.Checked;
4038 GikoSys.Setting.BrowserNameBarVisible := BrowserNameBarVisibleAction.Checked;
4041 procedure TGikoForm.MsgBarVisibleActionExecute(Sender: TObject);
4043 MessageSplitter.Visible := MsgBarVisibleAction.Checked;
4044 MessagePanel.Top := MessageSplitter.Top + MessageSplitter.Height;
4045 MessageSplitter.Top := MessagePanel.Top + 1;
4046 MessagePanel.Visible := MsgBarVisibleAction.Checked;
4047 GikoSys.Setting.MessageBarVisible := MsgBarVisibleAction.Checked;
4050 procedure TGikoForm.StatusBarVisibleActionExecute(Sender: TObject);
4052 StatusBar.Visible := StatusBarVisibleAction.Checked;
4053 GikoSys.Setting.StatusBarVisible := StatusBarVisibleAction.Checked;
4056 procedure TGikoForm.IconStyleExecute(Sender: TObject);
4058 case ListView.ViewStyle of
4059 vsIcon: SmallIconAction.Execute;
4060 vsSmallIcon: ListIconAction.Execute;
4061 vsList: DetailIconAction.Execute;
4062 vsReport: LargeIconAction.Execute;
4066 procedure TGikoForm.LargeIconActionExecute(Sender: TObject);
4068 ListView.ViewStyle := vsIcon;
4069 LargeIconAction.Checked := True;
4072 procedure TGikoForm.SmallIconActionExecute(Sender: TObject);
4074 ListView.ViewStyle := vsSmallIcon;
4075 SmallIconAction.Checked := True;
4078 procedure TGikoForm.ListIconActionExecute(Sender: TObject);
4080 ListView.ViewStyle := vsList;
4081 ListIconAction.Checked := True;
4084 procedure TGikoForm.DetailIconActionExecute(Sender: TObject);
4086 ListView.ViewStyle := vsReport;
4087 DetailIconAction.Checked := True;
4090 procedure TGikoForm.SearchActionExecute(Sender: TObject);
4095 if FSearchDialog = nil then begin
4096 if (GikoForm.GetActiveList is TCategory) or (GikoForm.GetActiveList is TBoard) then
4097 chk := GikoForm.GetActiveList
4101 FSearchDialog := TSearchDialog.Create(Self, chk);
4102 FSearchDialog.SearchComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
4112 procedure TGikoForm.OptionActionExecute(Sender: TObject);
4116 Dlg := TOptionDialog.Create(Self);
4124 procedure TGikoForm.GikoNaviWebPageActionExecute(Sender: TObject);
4126 URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
4128 GikoSys.OpenBrowser(URL_GIKONAVI, gbtAuto);
4131 procedure TGikoForm.MonazillaWebPageActionExecute(Sender: TObject);
4133 URL_MONAZILLA: string = 'http://www.monazilla.org/';
4135 GikoSys.OpenBrowser(URL_MONAZILLA, gbtAuto);
4138 procedure TGikoForm.BBS2chWebPageActionExecute(Sender: TObject);
4140 URL_2ch: string = 'http://www.2ch.net/';
4142 GikoSys.OpenBrowser(URL_2ch, gbtAuto);
4145 procedure TGikoForm.GikoFolderOpenActionExecute(Sender: TObject);
4147 // GikoSys.OpenBrowser(GikoSys.GetAppDir, gbtIE);
4148 GikoSys.CreateProcess('explorer.exe', '/e,"' + GikoSys.GetAppDir + '"');
4151 procedure TGikoForm.AboutActionExecute(Sender: TObject);
4155 Dlg := TAboutDialog.Create(Self);
4163 procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject);
4168 procedure TGikoForm.CabinetVisible( isVisible : Boolean );
4170 TreeSplitter.Visible := isVisible;
4171 CabinetPanel.Visible := isVisible;
4172 CabinetVisibleAction.Checked := isVisible;
4175 procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject);
4178 gttHistory: CabinetHistoryAction.Execute;
4179 gttFavorite: CabinetFavoriteAction.Execute;
4181 CabinetBBSAction.Execute;
4185 procedure TGikoForm.AllItemActionExecute(Sender: TObject);
4188 if ViewType <> gvtAll then
4189 SetListViewType(gvtAll);
4190 AllItemAction.Checked := True;
4191 LogItemAction.Checked := False;
4192 NewItemAction.Checked := False;
4193 //SelectItemAction.Checked := False;
4194 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4196 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4197 if SelectComboBox.Parent <> nil then begin
4198 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4199 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4206 procedure TGikoForm.LogItemActionExecute(Sender: TObject);
4209 if ViewType <> gvtLog then
4210 SetListViewType(gvtLog);
4211 AllItemAction.Checked := False;
4212 LogItemAction.Checked := True;
4213 NewItemAction.Checked := False;
4214 //SelectItemAction.Checked := False;
4215 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4217 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4218 if SelectComboBox.Parent <> nil then begin
4219 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4220 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4227 procedure TGikoForm.NewItemActionExecute(Sender: TObject);
4231 if ViewType <> gvtNew then
4232 SetListViewType(gvtNew);
4233 AllItemAction.Checked := False;
4234 LogItemAction.Checked := False;
4235 NewItemAction.Checked := True;
4236 //SelectItemAction.Checked := False;
4237 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4239 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4240 if SelectComboBox.Parent <> nil then begin
4241 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4242 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4249 procedure TGikoForm.SelectItemActionExecute(Sender: TObject);
4252 Dlg: TListSelectDialog;
4255 if SelectComboBox.Parent <> nil then begin
4256 if SelectComboBox.Left + SelectComboBox.Width < ListToolBar.Width then begin
4257 // SelectComboBox
\82ª
\82 \82é
\8fê
\8d\87\82Í
\83t
\83H
\81[
\83J
\83X
\82ð
\88Ú
\82·
4258 SelectComboBox.SetFocus;
4265 if SelectComboBox.Text = SELECTCOMBOBOX_NAME then begin
4266 SelectComboBox.Text := '';
4267 SelectComboBox.Color := clWindow;
4270 AllItemAction.Checked := False;
4271 LogItemAction.Checked := False;
4272 NewItemAction.Checked := False;
4273 //SelectItemAction.Checked := True;
4275 Dlg := TListSelectDialog.Create(Self);
4277 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
4278 Dlg.SelectComboBox.Text := SelectComboBox.Text;
4280 if Dlg.ModalResult = mrCancel then begin
4281 if Length( SelectComboBox.Text ) = 0 then begin
4282 AllItemAction.Checked := True;
4283 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4284 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4287 if GetActiveList is TBoard then
4288 SetListViewType(gvtUser, TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText , Dlg.KubetsuCheckBox.Checked);
4290 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
4292 GikoSys.Setting.SelectTextList.Delete(idx);
4293 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
4294 while Dlg.SelectComboBox.Items.Count > 100 do begin
4295 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
4298 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
4299 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4300 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4302 SelectComboBox.Text := Dlg.SelectComboBox.Text;
4303 SelectComboBox.Color := clWindow;
4305 SetListViewType(gvtUser, Dlg.SelectComboBox.Text, Dlg.KubetsuCheckBox.Checked);
4312 procedure TGikoForm.ListNumberVisibleActionExecute(Sender: TObject);
4314 GikoSys.Setting.ListViewNo := ListNumberVisibleAction.Checked;
4318 procedure TGikoForm.UpFolderActionExecute(Sender: TObject);
4320 if GetActiveList is TBoard then begin
4321 if FTreeType = gtt2ch then
4322 SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
4323 //SetActiveList(TBoard(GetActiveList).ParentCategory);
4324 end else if GetActiveList is TCategory then begin
4325 if FTreeType = gtt2ch then
4326 SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);
4327 //SetActiveList(TCategory(GetActiveList).ParenTBBS);
4329 // if TreeView.Selected = nil then Exit;
4330 // if TreeView.Selected.Level = 0 then Exit;
4331 // TreeView.Selected.Parent.Selected := True;
4334 procedure TGikoForm.RoundActionExecute(Sender: TObject);
4338 Dlg := TRoundDialog.Create(Self);
4346 procedure TGikoForm.StopActionExecute(Sender: TObject);
4348 FControlThread.DownloadAbort;
4349 if FWorkCount <> 0 then FWorkCount := 0;
4351 Animate.Active := False;
4354 Screen.Cursor := crDefault;
4357 procedure TGikoForm.MsgBarCloseActionExecute(Sender: TObject);
4359 // MessagePanel.Visible := False;
4360 // MessageSplitter.Visible := False;
4361 // MsgBarVisibleAction.Checked := False;
4362 MsgBarVisibleAction.Execute;
4365 procedure TGikoForm.BrowserMaxActionExecute(Sender: TObject);
4367 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4368 case GikoSys.Setting.ListWidthState of
4370 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4371 ViewPanel.Width := FBrowserSizeWidth;
4372 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4373 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4374 GikoSys.Setting.ListWidthState := glsNormal;
4376 glsMin, glsNormal: begin
4377 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4378 if GikoSys.Setting.ListWidthState = glsNormal then
4379 FBrowserSizeWidth := ViewPanel.Width;
4380 ViewPanel.Width := 1;
4381 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4382 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4383 GikoSys.Setting.ListWidthState := glsMax;
4387 case GikoSys.Setting.ListHeightState of
4389 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4390 ViewPanel.Height := FBrowserSizeHeight;
4391 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4392 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4393 GikoSys.Setting.ListHeightState := glsNormal;
4395 glsMin, glsNormal: begin
4396 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4397 if GikoSys.Setting.ListHeightState = glsNormal then
4398 FBrowserSizeHeight := ViewPanel.Height;
4399 ViewPanel.Height := 1;
4400 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4401 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4402 GikoSys.Setting.ListHeightState := glsMax;
4406 // Mouse.CursorPos := BrowserSizeButton.ClientToScreen(Point(
4407 // System.Round(BrowserToolBar.ButtonWidth div 2),
4408 // System.Round(BrowserToolBar.ButtonHeight div 2)));
4411 procedure TGikoForm.BrowserMinActionExecute(Sender: TObject);
4413 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4414 case GikoSys.Setting.ListWidthState of
4415 glsMax, glsNormal: begin
4416 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4417 if GikoSys.Setting.ListWidthState = glsNormal then
4418 FBrowserSizeWidth := ViewPanel.Width;
4419 ViewPanel.Width := ThreadMainPanel.Width - 80;
4420 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4421 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4422 GikoSys.Setting.ListWidthState := glsMin;
4425 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4426 ViewPanel.Width := FBrowserSizeWidth;
4427 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4428 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4429 GikoSys.Setting.ListWidthState := glsNormal;
4433 case GikoSys.Setting.ListHeightState of
4434 glsMax, glsNormal: begin
4435 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4436 if GikoSys.Setting.ListHeightState = glsNormal then
4437 FBrowserSizeHeight := ViewPanel.Height;
4438 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
4439 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4440 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4441 GikoSys.Setting.ListHeightState := glsMin;
4444 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4445 ViewPanel.Height := FBrowserSizeHeight;
4446 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4447 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4448 GikoSys.Setting.ListHeightState := glsNormal;
4454 procedure TGikoForm.ScrollTopActionExecute(Sender: TObject);
4456 BrowserMovement('top');
4459 procedure TGikoForm.ScrollLastActionExecute(Sender: TObject);
4461 BrowserMovement('bottom');
4464 procedure TGikoForm.ScrollNewActionExecute(Sender: TObject);
4466 BrowserMovement('new');
4469 procedure TGikoForm.ScrollKokoActionExecute(Sender: TObject);
4471 BrowserMovement('koko');
4474 procedure TGikoForm.EditorActionExecute(Sender: TObject);
4476 Editor: TEditorForm;
4480 Item := GetActiveContent;
4481 if Item = nil then Exit;
4483 if Item.Count >= 1000 then begin
4484 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
4485 + '
\90V
\83X
\83\8c\83b
\83h
\82ð
\92T
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
4486 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin
4490 Editor := TEditorForm.Create(Self);
4491 Editor.SetThreadItem(Item);
4493 Editor.BodyEdit.SetFocus;
4496 procedure TGikoForm.IEActionExecute(Sender: TObject);
4498 ShowThreadAction.Execute;
4501 procedure TGikoForm.ShowThreadActionExecute(Sender: TObject);
4503 ThreadItem: TThreadItem;
4505 ThreadItem := GetActiveContent;
4506 if ThreadItem = nil then Exit;
4507 GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
4510 procedure TGikoForm.ShowBoardActionExecute(Sender: TObject);
4512 ThreadItem: TThreadItem;
4514 ThreadItem := GetActiveContent;
4515 if ThreadItem = nil then Exit;
4516 GikoSys.OpenBrowser(ThreadItem.ParentBoard.URL, gbtAuto);
4519 //(Thread)URL
\82ð
\83R
\83s
\81[
4520 procedure TGikoForm.URLCopyActionExecute(Sender: TObject);
4525 if TObject(GetActiveContent) is TBoard then
4526 s := s + TBoard(GetActiveContent).URL + #13#10
4527 else if TObject(GetActiveContent) is TThreadItem then
4528 s := s + TThreadItem(GetActiveContent).URL + #13#10;
4530 Clipboard.AsText := s;
4533 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ð
\83R
\83s
\81[
4534 procedure TGikoForm.NameCopyActionExecute(Sender: TObject);
4539 if TObject(GetActiveContent) is TBoard then
4540 s := s + TBoard(GetActiveContent).Title + #13#10
4541 else if TObject(GetActiveContent) is TThreadItem then
4542 s := s + TThreadItem(GetActiveContent).Title + #13#10;
4544 Clipboard.AsText := s;
4547 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ÆURL
\82ð
\83R
\83s
\81[
4548 procedure TGikoForm.NameURLCopyActionExecute(Sender: TObject);
4553 if TObject(GetActiveContent) is TBoard then
4554 s := s + TBoard(GetActiveContent).Title + #13#10 + TBoard(GetActiveContent).URL + #13#10
4555 else if TObject(GetActiveContent) is TThreadItem then
4556 s := s + TThreadItem(GetActiveContent).Title + #13#10 + TThreadItem(GetActiveContent).URL + #13#10;
4558 Clipboard.AsText := s;
4561 procedure TGikoForm.ItemReloadActionExecute(Sender: TObject);
4563 ThreadItem: TThreadItem;
4565 ThreadItem := GetActiveContent;
4566 if ThreadItem <> nil then
4567 DownloadContent(ThreadItem);
4570 procedure TGikoForm.SelectListReloadActionExecute(Sender: TObject);
4576 if GetActiveList is TCategory then begin
4577 List := TList.Create;
4579 SelectListItem(List);
4580 if List.Count > 5 then begin
4581 msg := '5
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
4582 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
4583 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
4586 for i := 0 to List.Count - 1 do begin
4587 if TObject(List[i]) is TBoard then
4588 DownloadList(TBoard(List[i]));
4593 end else if GetActiveList is TBoard then begin
4594 DownloadList(TBoard(GetActiveList));
4598 procedure TGikoForm.SelectThreadReloadActionExecute(Sender: TObject);
4604 List := TList.Create;
4606 SelectListItem(List);
4607 if List.Count > 10 then begin
4608 msg := '10
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
4609 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
4610 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
4613 for i := 0 to List.Count - 1 do begin
4614 if TObject(List[i]) is TThreadItem then
4615 DownloadContent(TThreadItem(List[i]));
4622 procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);
4624 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
4625 SelectListReloadAction.Enabled := True
4626 else if GetActiveList is TBoard then
4627 SelectListReloadAction.Enabled := True
4629 SelectListReloadAction.Enabled := False;
4632 procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);
4634 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
4635 SelectThreadReloadAction.Enabled := True
4637 SelectThreadReloadAction.Enabled := False;
4640 procedure TGikoForm.AllItemActionUpdate(Sender: TObject);
4642 AllItemAction.Enabled := (GetActiveList is TBoard);
4645 procedure TGikoForm.LogItemActionUpdate(Sender: TObject);
4647 LogItemAction.Enabled := (GetActiveList is TBoard);
4650 procedure TGikoForm.NewItemActionUpdate(Sender: TObject);
4652 NewItemAction.Enabled := (GetActiveList is TBoard);
4655 procedure TGikoForm.SelectItemActionUpdate(Sender: TObject);
4657 SelectItemAction.Enabled := (GetActiveList is TBoard);
4660 procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
4662 UpFolderAction.Enabled := not (GetActiveList is TBBS);
4665 procedure TGikoForm.ThreadEditorActionUpdate(Sender: TObject);
4667 ThreadEditorAction.Enabled := (GetActiveList is TBoard);
4670 procedure TGikoForm.FormResize(Sender: TObject);
4672 MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
4673 MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
4676 procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject);
4678 ScrollTopAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
4681 procedure TGikoForm.ScrollLastActionUpdate(Sender: TObject);
4683 ScrollLastAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
4686 procedure TGikoForm.ScrollNewActionUpdate(Sender: TObject);
4688 ScrollNewAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
4691 procedure TGikoForm.ScrollKokoActionUpdate(Sender: TObject);
4693 ScrollKokoAction.Enabled := (GetActiveContent <> nil)
4694 and (GetActiveContent.IsLogFile)
4695 and (GetActiveContent.Kokomade <> -1);
4699 procedure TGikoForm.EditorActionUpdate(Sender: TObject);
4701 EditorAction.Enabled := GetActiveContent <> nil;
4704 procedure TGikoForm.IEActionUpdate(Sender: TObject);
4706 IEAction.Enabled := GetActiveContent <> nil;
4709 procedure TGikoForm.ShowThreadActionUpdate(Sender: TObject);
4711 ShowThreadAction.Enabled := GetActiveContent <> nil;
4714 procedure TGikoForm.ShowBoardActionUpdate(Sender: TObject);
4716 ShowBoardAction.Enabled := GetActiveContent <> nil;
4719 procedure TGikoForm.ItemReloadActionUpdate(Sender: TObject);
4721 ItemReloadAction.Enabled := GetActiveContent <> nil;
4724 procedure TGikoForm.URLCopyActionUpdate(Sender: TObject);
4726 URLCopyAction.Enabled := GetActiveContent <> nil;
4729 procedure TGikoForm.NameCopyActionUpdate(Sender: TObject);
4731 NameCopyAction.Enabled := GetActiveContent <> nil;
4734 procedure TGikoForm.NameURLCopyActionUpdate(Sender: TObject);
4736 NameURLCopyAction.Enabled := GetActiveContent <> nil;
4739 procedure TGikoForm.BrowserTabCloseActionUpdate(Sender: TObject);
4741 BrowserTabCloseAction.Enabled := GetActiveContent <> nil;
4744 procedure TGikoForm.NotSelectTabCloseActionUpdate(Sender: TObject);
4746 NotSelectTabCloseAction.Enabled := GetActiveContent <> nil;
4749 procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
4751 AllTabCloseAction.Enabled := GetActiveContent <> nil;
4754 procedure TGikoForm.ActiveLogDeleteActionUpdate(Sender: TObject);
4756 ActiveLogDeleteAction.Enabled := GetActiveContent <> nil;
4759 procedure TGikoForm.ListViewSelectItem(Sender: TObject; Item: TListItem;
4762 SelectTimer.Enabled := False;
4764 SelectTimer.Enabled := True;
4767 procedure TGikoForm.SelectTimerTimer(Sender: TObject);
4769 SelectTimer.Enabled := False;
4773 procedure TGikoForm.ListViewDblClick(Sender: TObject);
4778 procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
4780 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';
4781 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
4783 ThreadItem: TThreadItem;
4784 TmpListItem: TListItem;
4788 List := TList.Create;
4790 TmpListItem := ListView.Selected;
4791 while TmpListItem <> nil do begin
4792 if TObject(TmpListItem.Data) is TThreadItem then begin
4793 ThreadItem := TThreadItem(TmpListItem.Data);
4794 if ThreadItem.IsLogFile then
4795 List.Add(ThreadItem);
4797 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
4800 if GikoSys.Setting.DeleteMsg and (List.Count > 0) then begin
4801 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
4805 for i := 0 to List.Count - 1 do begin
4806 ThreadItem := TThreadItem(List[i]);
4807 DeleteHistory(ThreadItem);
4808 DeleteTab(ThreadItem);
4809 ThreadItem.DeleteLogFile;
4817 procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
4821 FTabHintIndex := -1;
4822 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
4823 if TThreadItem(BrowserTab.Tabs.Objects[i]) = ThreadItem then begin
4824 BrowserTab.Tabs.Delete(i);
4825 if i > (BrowserTab.Tabs.Count - 1) then
4826 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1
4828 BrowserTab.TabIndex := i;
4829 if BrowserTab.Tabs.Count = 0 then
4831 else if BrowserTab.TabIndex <> -1 then
4832 SetContent(TThreadItem(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]));
4838 procedure TGikoForm.KokomadeActionExecute(Sender: TObject);
4841 ThreadItem: TThreadItem;
4846 No := KokoPopupMenu.Tag;
4847 if No = 0 then Exit;
4848 ThreadItem := GetActiveContent;
4849 if ThreadItem = nil then Exit;
4850 ThreadItem.Kokomade := No;
4851 doc := Browser.Document;
4852 ScrollTop := doc.Body.ScrollTop;
4854 GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
4855 // HtmlName := GikoSys.CreateHTML(ThreadItem, sTitle) + '#koko';
4857 // Browser.Navigate(HtmlName, Flags);
4859 Application.ProcessMessages;
4860 doc.Body.ScrollTop := ScrollTop;
4863 procedure TGikoForm.ZenbuActionExecute(Sender: TObject);
4865 ThreadItem: TThreadItem;
4870 ThreadItem := GetActiveContent;
4871 if ThreadItem = nil then Exit;
4872 ThreadItem.Kokomade := -1;
4873 doc := Browser.Document;
4874 ScrollTop := doc.Body.ScrollTop;
4875 GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
4876 // HtmlName := GikoSys.CreateHTML(ThreadItem, sTitle) + '#koko';
4878 // Browser.Navigate(HtmlName, Flags);
4880 Application.ProcessMessages;
4881 doc.Body.ScrollTop := ScrollTop;
4884 function TGikoForm.Hook(var Message: TMessage): Boolean;
4887 if Message.Msg = CM_APPKEYDOWN then Result := True;
4890 procedure TGikoForm.KokoResActionExecute(Sender: TObject);
4892 Editor: TEditorForm;
4897 Number := KokoPopupMenu.Tag;
4898 if Number = 0 then Exit;
4899 Item := GetActiveContent;
4900 if Item = nil then Exit;
4902 if Item.Count >= 1000 then begin
4903 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
4904 + '
\90V
\83X
\83\8c\83b
\83h
\82ð
\92T
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
4905 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin
4909 Editor := TEditorForm.Create(Self);
4910 Editor.SetThreadItem(Item);
4911 Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
4913 Editor.BodyEdit.SetFocus;
4916 procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
4918 ItemRoundPMenu.Visible := (GetActiveList is TBoard);
4919 ItemReservPMenu.Visible := (GetActiveList is TBoard);
4920 LPMSep01.Visible := (GetActiveList is TBoard);
4921 ListRoundPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
4922 ListReservPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
4923 LPMSep02.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4924 KidokuPMenu.Visible := (GetActiveList is TBoard);
4925 MidokuPMenu.Visible := (GetActiveList is TBoard);
4926 UrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4927 NameUrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4928 AllSelectPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4929 LPMSep05.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4930 DeletePMenu.Visible := (GetActiveList is TBoard);
4931 LPMSep06.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4933 BoardFavoriteAddMenu.Visible := (GetActiveList is TCategory);
4934 ThreadFavoriteAddMenu.Visible := (GetActiveList is TBoard);
4936 AddRoundNameMenu(ItemReservPMenu);
4937 AddRoundNameMenu(ListReservPMenu);
4940 procedure TGikoForm.BoardIEActionExecute(Sender: TObject);
4944 if GetActiveList is TBoard then begin
4945 URL := TBoard(GetActiveList).URL;
4946 GikoSys.OpenBrowser(URL, gbtAuto);
4950 procedure TGikoForm.SelectItemURLCopyActionExecute(Sender: TObject);
4957 List := TList.Create;
4959 SelectListItem(List);
4960 for i := 0 to List.Count - 1 do begin
4961 if TObject(List[i]) is TBoard then
4962 s := s + TBoard(List[i]).URL + #13#10
4963 else if TObject(List[i]) is TThreadItem then
4964 s := s + TThreadItem(List[i]).URL + #13#10;
4967 Clipboard.AsText := s;
4973 procedure TGikoForm.SelectItemNameCopyActionExecute(Sender: TObject);
4980 List := TList.Create;
4982 SelectListItem(List);
4983 for i := 0 to List.Count - 1 do begin
4984 if TObject(List[i]) is TBoard then
4985 s := s + TBoard(List[i]).Title + #13#10
4986 else if TObject(List[i]) is TThreadItem then
4987 s := s + TThreadItem(List[i]).Title + #13#10;
4990 Clipboard.AsText := s;
4996 procedure TGikoForm.SelectItemNameURLCopyActionExecute(Sender: TObject);
5003 List := TList.Create;
5005 SelectListItem(List);
5006 for i := 0 to List.Count - 1 do begin
5007 if TObject(List[i]) is TBoard then
5008 s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10
5009 else if TObject(List[i]) is TThreadItem then
5010 s := s + TThreadItem(List[i]).Title + #13#10 + TThreadItem(List[i]).URL + #13#10;
5013 Clipboard.AsText := s;
5019 procedure TGikoForm.BoardIEActionUpdate(Sender: TObject);
5021 if GetActiveList is TBoard then
5022 BoardIEAction.Enabled := True
5024 BoardIEAction.Enabled := False;
5027 procedure TGikoForm.SelectItemURLCopyActionUpdate(Sender: TObject);
5029 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5030 SelectItemURLCopyAction.Enabled := True
5032 SelectItemURLCopyAction.Enabled := False;
5035 procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
5037 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5038 SelectItemNameCopyAction.Enabled := True
5040 SelectItemNameCopyAction.Enabled := False;
5043 procedure TGikoForm.SelectItemNameURLCopyActionUpdate(Sender: TObject);
5045 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5046 SelectItemNameURLCopyAction.Enabled := True
5048 SelectItemNameURLCopyAction.Enabled := False;
5051 procedure TGikoForm.AllSelectActionUpdate(Sender: TObject);
5053 if ListView.SelCount > 0 then
5054 AllSelectAction.Enabled := True
5056 AllSelectAction.Enabled := False;
5059 procedure TGikoForm.LogDeleteActionUpdate(Sender: TObject);
5061 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5062 LogDeleteAction.Enabled := True
5064 LogDeleteAction.Enabled := False;
5067 procedure TGikoForm.BrowserTabCloseActionExecute(Sender: TObject);
5070 ThreadItem: TThreadItem;
5072 idx := BrowserTab.TabIndex;
5073 if idx <> -1 then begin
5074 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5075 DeleteTab(ThreadItem);
5079 procedure TGikoForm.NotSelectTabCloseActionExecute(Sender: TObject);
5083 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
5084 if BrowserTab.TabIndex <> i then begin
5085 BrowserTab.Tabs.Delete(i);
5090 procedure TGikoForm.AllTabCloseActionExecute(Sender: TObject);
5094 for i := BrowserTab.Tabs.Count - 1 downto 0 do
5095 BrowserTab.Tabs.Delete(i);
5099 procedure TGikoForm.TreeSelectBoradReloadExecute(Sender: TObject);
5102 TmpTreeNode: TTreeNode;
5104 TmpTreeNode := FClickNode;
5105 TreeView.Selected := FClickNode;
5106 if TObject(TmpTreeNode.Data) is TBoard then begin
5107 Board := TBoard(TmpTreeNode.Data);
5108 DownloadList(Board);
5112 procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject);
5114 ThreadItem: TThreadItem;
5115 TmpTreeNode: TTreeNode;
5117 TmpTreeNode := FClickNode;
5118 TreeView.Selected := FClickNode;
5119 if TObject(TmpTreeNode.Data) is TThreadItem then begin
5120 ThreadItem := TThreadItem(TmpTreeNode.Data);
5121 DownloadContent(ThreadItem);
5125 procedure TGikoForm.TreeSelectURLCopyExecute(Sender: TObject);
5127 TmpTreeNode: TTreeNode;
5130 TmpTreeNode := FClickNode;
5131 TreeView.Selected := FClickNode;
5132 if TObject(TmpTreeNode.Data) is TBoard then begin
5133 s := TBoard(TmpTreeNode.Data).URL + #13#10;
5134 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5135 s := TThreadItem(TmpTreeNode.Data).URL + #13#10;
5137 Clipboard.AsText := s;
5140 procedure TGikoForm.TreeSelectNameURLCopyExecute(Sender: TObject);
5142 TmpTreeNode: TTreeNode;
5145 TmpTreeNode := FClickNode;
5146 TreeView.Selected := FClickNode;
5147 if TObject(TmpTreeNode.Data) is TBoard then begin
5148 s := TBoard(TmpTreeNode.Data).Title + #13#10 + TBoard(TmpTreeNode.Data).URL + #13#10;
5149 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5150 s := TThreadItem(TmpTreeNode.Data).Title + #13#10 + TThreadItem(TmpTreeNode.Data).URL + #13#10;
5152 Clipboard.AsText := s;
5156 procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
5158 FClickNode := TreeView.Selected;
5159 if FClickNode = nil then begin
5160 TreeSelectThreadPupupMenu.Visible := False;
5161 TreeSelectBoardPupupMenu.Visible := False;
5162 TPMSep01.Visible := False;
5163 TreeSelectURLPupupMenu.Visible := False;
5164 TreeSelectNameURLPupupMenu.Visible := False;
5165 TreeSelectFavoriteAddPupupMenu.Visible := False;
5166 end else if TObject(FClickNode.Data) is TBoard then begin
5167 TreeSelectThreadPupupMenu.Visible := False;
5168 TreeSelectBoardPupupMenu.Visible := True;
5169 TPMSep01.Visible := True;
5170 TreeSelectURLPupupMenu.Visible := True;
5171 TreeSelectNameURLPupupMenu.Visible := True;
5172 TreeSelectFavoriteAddPupupMenu.Visible := True;
5173 end else if (TObject(FClickNode.Data) is TThreadItem) then begin
5174 TreeSelectThreadPupupMenu.Visible := True;
5175 TreeSelectBoardPupupMenu.Visible := False;
5176 TPMSep01.Visible := True;
5177 TreeSelectURLPupupMenu.Visible := True;
5178 TreeSelectNameURLPupupMenu.Visible := True;
5179 TreeSelectFavoriteAddPupupMenu.Visible := True;
5181 TreeSelectThreadPupupMenu.Visible := False;
5182 TreeSelectBoardPupupMenu.Visible := False;
5183 TPMSep01.Visible := False;
5184 TreeSelectURLPupupMenu.Visible := False;
5185 TreeSelectNameURLPupupMenu.Visible := False;
5186 TreeSelectFavoriteAddPupupMenu.Visible := False;
5190 procedure TGikoForm.BrowserNewWindow2(Sender: TObject;
5191 var ppDisp: IDispatch; var Cancel: WordBool);
5200 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
5201 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
5202 Html := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
5204 URL := GikoSys.GetHRefText(Html);
5205 URL := GikoSys.HTMLDecode(URL);
5207 //
\83A
\83h
\83\8c\83X
\83o
\81[
\82Ì
\97\9a\97ð
5208 if GikoSys.Setting.LinkAddAddressBar then begin
5209 idx := AddressComboBox.Items.IndexOf(URL);
5210 if idx = -1 then begin
5211 AddressComboBox.Items.Insert(0, URL);
5212 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
5213 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
5215 AddressComboBox.Items.Delete(idx);
5216 AddressComboBox.Items.Insert(0, URL);
5223 { ShiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5224 CtrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
5227 Memo1.Lines.Add('ShiftDown');
5229 Memo1.Lines.Add('CtrlDown');
5231 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
5232 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
5233 Url := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
5237 URL := GetHRefText(URL);
5239 ParseURI(URL, Protocol, Host, path, Document, Port, Bookmark);
5241 b := Parse2chURL(path, document, bbs, num);
5242 memo1.Lines.Add('bbs: ' + bbs);
5243 memo1.Lines.Add('key: ' + num);
5245 Memo1.Lines.Add('Parse2chURL: True')
5247 Memo1.Lines.Add('Parse2chURL: False');
5249 // AppPath := 'C:\Borland\Projects\Test\TestBrowser\TestBrowser.exe';
5254 procedure TGikoForm.ListSplitterCanResize(Sender: TObject;
5255 var NewSize: Integer; var Accept: Boolean);
5257 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5258 if ViewPanel.Width < 2 then begin
5259 ViewPanel.Width := 1;
5260 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5261 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5262 GikoSys.Setting.ListWidthState := glsMax;
5263 end else if ViewPanel.Width > (ThreadMainPanel.Width - 80) then begin
5264 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5265 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5266 GikoSys.Setting.ListWidthState := glsMin;
5268 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5269 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5270 GikoSys.Setting.ListWidthState := glsNormal;
5273 if ViewPanel.Height < 2 then begin
5274 ViewPanel.Height := 1;
5275 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5276 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5277 GikoSys.Setting.ListHeightState := glsMax;
5278 end else if ViewPanel.Height > (ThreadMainPanel.Height - BrowserCoolBar.Height - 7) then begin
5279 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5280 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5281 GikoSys.Setting.ListHeightState := glsMin;
5283 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5284 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5285 GikoSys.Setting.ListHeightState := glsNormal;
5290 procedure TGikoForm.ListSplitterMoved(Sender: TObject);
5292 if Mouse.Capture <> 0 then
5294 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5295 if (ViewPanel.Width > 1) and (ViewPanel.Width <= (ThreadMainPanel.Width - 80)) then
5296 FBrowserSizeWidth := ViewPanel.Width;
5298 if (ViewPanel.Height > 1) and (ViewPanel.Height <= (ThreadMainPanel.Height - BrowserCoolBar.Height)) then
5299 FBrowserSizeHeight := ViewPanel.Height;
5301 { if (Mouse.Capture = 0) and (ViewPanel.Height > 1) and (not ArrangeAction.Checked) then
5302 FBrowserSizeHeight := ViewPanel.Height
5303 else if (Mouse.Capture = 0) and (ViewPanel.Width > 1) and (ArrangeAction.Checked) then
5304 FBrowserSizeWidth := ViewPanel.Width;}
5307 procedure TGikoForm.BrowserTabChange(Sender: TObject);
5310 ThreadItem: TThreadItem;
5313 // if NewTab = -1 then
5314 if not BrowserTab.Dragging then begin
5315 FTabHintIndex := -1;
5316 BrowserTab.Hint := '';
5317 idx := BrowserTab.TabIndex;
5319 SetContent(BrowserNullTab)
5320 else if BrowserTab.Tabs.Objects[idx] is TThreadItem then begin
5321 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5322 SetContent(ThreadItem);
5323 if GikoSys.Setting.URLDisplay then
5324 AddressComboBox.Text := ThreadItem.URL;
5328 procedure TGikoForm.BrowserTabClick(Sender: TObject);
5331 ThreadItem: TThreadItem;
5333 // if NewTab = -1 then
5334 FTabHintIndex := -1;
5335 BrowserTab.Hint := '';
5336 idx := BrowserTab.TabIndex;
5338 SetContent(BrowserNullTab)
5339 else if BrowserTab.Tabs.Objects[idx] is TThreadItem then begin
5340 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5341 SetContent(ThreadItem);
5342 if GikoSys.Setting.URLDisplay then
5343 AddressComboBox.Text := ThreadItem.URL;
5347 procedure TGikoForm.BrowserTabMouseDown(Sender: TObject;
5348 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
5355 if Button = mbMiddle then begin
5356 //
\83}
\83E
\83X
\92\86\83{
\83^
\83\93
5359 p := BrowserTab.ScreenToClient(p);
5360 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
5361 if idx <> -1 then begin
5362 OldIndex := BrowserTab.TabIndex;
5363 BrowserTab.Tabs.Delete(idx);
5364 if idx = OldIndex then begin
5365 if BrowserTab.Tabs.Count > idx then
5366 BrowserTab.TabIndex := idx
5367 else if BrowserTab.Tabs.Count = idx then
5368 BrowserTab.TabIndex := idx - 1
5369 else if BrowserTab.Tabs.Count > 0 then
5370 BrowserTab.TabIndex := 0;
5371 BrowserTab.OnChange(nil);
5374 end else if Button = mbRight then begin
5375 //
\83}
\83E
\83X
\89E
\83{
\83^
\83\93
5378 // GetCursorPos(p2);
5379 p := BrowserTab.ScreenToClient(p);
5380 // idx := BrowserTab.ItemAtPos(p);
5381 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
5382 if idx <> -1 then begin
5383 OldIndex := BrowserTab.TabIndex;
5384 BrowserTab.TabIndex := idx;
5385 if OldIndex <> idx then
5386 BrowserTab.OnChange(nil);
5387 BrowserTabPopupMenu.Tag := idx;
5388 BrowserTabPopupMenu.Popup(p2.X, p2.Y);
5390 end else if BUtton = mbLeft then begin
5391 FDragWFirst := true;
5396 procedure TGikoForm.SetBrowserTabState;
5399 CoolBand: TCoolBand;
5401 BrowserBottomPanel.AutoSize := False;
5402 if GikoSys.Setting.BrowserTabVisible then begin
5403 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
5404 BrowserTab.Style := tsTabs;
5405 if GikoSys.Setting.BrowserTabPosition = gtpTop then
5406 BrowserTab.TabPosition := tpTop
5408 BrowserTab.TabPosition := tpBottom;
5409 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
5410 BrowserTab.TabPosition := tpTop;
5411 BrowserTab.Style := tsButtons;
5413 BrowserTab.TabPosition := tpTop;
5414 BrowserTab.Style := tsFlatButtons
5417 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
5418 BrowserTab.Parent := BrowserTabToolBar;
5419 BrowserBottomPanel.Hide;
5420 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
5421 if CoolBand <> nil then
5422 CoolBand.Visible := True;
5423 // BrowserTab.Parent := BrowserTopPanel;
5424 // BrowserTab.Parent := BrowserCoolBar;
5425 // BrowserTab.Top := 26;
5426 // BrowserTopPanel.Height := 44;
5429 BrowserTab.Parent := BrowserBottomPanel;
5430 BrowserTab.Top := 0;
5431 BrowserTab.Left := 0;
5432 BrowserBottomPanel.Show;
5433 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
5434 if CoolBand <> nil then
5435 CoolBand.Visible := False;
5436 // BrowserTopPanel.Height := 26;
5440 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
5441 if CoolBand <> nil then
5442 CoolBand.Visible := False;
5443 BrowserBottomPanel.Visible := False;
5444 // BrowserTab.Visible := False;
5445 // BrowserTopPanel.Height := 26;
5449 procedure TGikoForm.BrowserTabDragOver(Sender, Source: TObject; X,
5450 Y: Integer; State: TDragState; var Accept: Boolean);
5454 idx := BrowserTab.IndexOfTabAt(X, Y);
5455 Accept := (Source = BrowserTab) and (BrowserTab.TabIndex <> idx);
5458 procedure TGikoForm.BrowserTabDragDrop(Sender, Source: TObject; X,
5463 idx := BrowserTab.IndexOfTabAt(X, Y);
5465 BrowserTab.Tabs.Move(BrowserTab.TabIndex, idx);
5468 procedure TGikoForm.BrowserTabMouseMove(Sender: TObject;
5469 Shift: TShiftState; X, Y: Integer);
5472 ThreadItem: TThreadItem;
5475 TabIdx := BrowserTab.IndexOfTabAt(x, y);
5477 if ( ssLeft in Shift ) and ( BrowserTab.Style = tsTabs ) then begin
5478 if FDragWFirst = false then begin
5479 FDragWFirst := true;
5481 BrowserTab.EndDrag(false);
5482 BrowserTab.BeginDrag(false, DandD_THRESHOLD);
5483 FDragWFirst := false;
5486 BrowserTab.EndDrag(false);
5487 FDragWFirst := false;
5490 if (FTabHintIndex <> TabIdx) and (TabIdx <> -1) then begin
5491 Application.CancelHint;
5492 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[TabIdx]);
5493 if ThreadItem.Title <> BrowserTab.Tabs[TabIdx] then begin
5494 BrowserTab.Hint := ThreadItem.Title;
5495 Application.ShowHint := True;
5497 BrowserTab.Hint := '';
5498 Application.ShowHint := True;
5500 FTabHintIndex := TabIdx;
5505 procedure TGikoForm.BrowserDocumentComplete(Sender: TObject;
5506 const pDisp: IDispatch; var URL: OleVariant);
5508 FDispHtmlDocument: DispHTMLDocument;
5510 // AddMessageList('DocumentComplete', nil);
5511 FBrowserComplete := True;
5512 if FEvent <> nil then
5514 FDispHtmlDocument := Browser.Document as DispHTMLDocument;
5515 FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
5516 FEvent.OnContextMenu := OnDocumentContextMenu;
5520 procedure TGikoForm.SelectReservActionUpdate(Sender: TObject);
5525 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then begin
5526 List := TList.Create;
5528 SelectListItem(List);
5529 for i := 0 to List.Count - 1 do begin
5530 if TObject(List[i]) is TThreadItem then begin
5531 if TThreadItem(List[i]).IsLogFile then begin
5532 SelectReservAction.Enabled := True;
5537 SelectReservAction.Enabled := False;
5541 end else if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
5542 SelectReservAction.Enabled := True
5544 SelectReservAction.Enabled := False;
5547 procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
5549 AddRoundNameMenu(RoundNamePopupMenu.Items);
5552 procedure TGikoForm.AddRoundNameMenu(MenuItem: TMenuItem);
5558 Item := TMenuItem.Create(Self);
5559 Item.Caption := '
\90V
\82µ
\82¢
\96¼
\91O
\82Å
\8f\84\89ñ
\97\
\96ñ(&N)...';
5560 Item.OnClick := SelectNewRoundNameExecute;
5562 Item := TMenuItem.Create(Self);
5563 Item.Caption := '
\8f\84\89ñ
\83\8a\83X
\83g
\82©
\82ç
\8dí
\8f\9c(&D)';
5564 Item.OnClick := SelectDeleteRoundExecute;
5566 Item := TMenuItem.Create(Self);
5567 Item.Caption := '-';
5569 for i := 0 to RoundList.RoundNameList.Count - 1 do begin
5570 Item := TMenuItem.Create(Self);
5571 Item.Caption := RoundList.RoundNameList[i];
5572 Item.OnClick := SetSelectRoundName;
5577 procedure TGikoForm.SelectNewRoundNameExecute(Sender: TObject);
5580 Dlg: TRoundNameDialog;
5582 Dlg := TRoundNameDialog.Create(Self);
5585 if Dlg.ModalResult <> mrCancel then begin
5586 s := Trim(Dlg.RoundNameEdit.Text);
5587 RoundList.RoundNameList.Add(s);
5588 SetSelectItemRound(True, s);
5596 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
5601 List := TList.Create;
5603 SelectListItem(List);
5604 for i := 0 to List.Count - 1 do begin
5605 if TObject(List[i]) is TBoard then begin
5606 TBoard(List[i]).RoundName := RoundName;
5607 TBoard(List[i]).Round := RoundFlag;
5608 end else if TObject(List[i]) is TThreadItem then begin
5609 if TThreadItem(List[i]).IsLogFile then begin
5610 TThreadItem(List[i]).RoundName := RoundName;
5611 TThreadItem(List[i]).Round := RoundFlag;
5620 procedure TGikoForm.SelectDeleteRoundExecute(Sender: TObject);
5622 SetSelectItemRound(False, '');
5626 procedure TGikoForm.SelectReservActionExecute(Sender: TObject);
5628 //
\82±
\82Ì
\83R
\83\81\83\93\83g
\8dí
\8f\9c\82µ
\82Ä
\82Í
\91Ê
\96Ú
5631 procedure TGikoForm.SetSelectRoundName(Sender: TObject);
5633 MenuItem: TMenuItem;
5635 if Sender is TMenuItem then begin
5636 MenuItem := TMenuItem(Sender);
5637 SetSelectItemRound(True, StripHotKey(MenuItem.Caption));
5642 procedure TGikoForm.NewBoardActionExecute(Sender: TObject);
5644 Dlg: TNewBoardDialog;
5648 for i := 0 to Screen.CustomFormCount - 1 do begin
5649 if TObject(Screen.CustomForms[i]) is TEditorForm then begin
5650 Msg := '
\83\8c\83X
\83G
\83f
\83B
\83^
\82ð
\91S
\82Ä
\95Â
\82¶
\82Ä
\82
\82¾
\82³
\82¢';
5651 MsgBox(Handle, Msg, '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
5655 Dlg := TNewBoardDialog.Create(Self);
5663 procedure TGikoForm.LoginActionExecute(Sender: TObject);
5667 if GikoSys.Dolib.Connected then begin
5668 //
\83\8d\83O
\83A
\83E
\83g
5669 GikoSys.Dolib.Disconnect;
5670 LoginAction.Checked := False;
5671 AddMessageList('
\83\8d\83O
\83A
\83E
\83g
\82µ
\82Ü
\82µ
\82½', nil, gmiOK);
5672 LoginAction.Caption := '
\83\8d\83O
\83C
\83\93(&L)';
5674 TmpCursor := Screen.Cursor;
5675 Screen.Cursor := crHourGlass;
5677 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
5678 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
5679 GikoSys.Dolib.Password := GikoSys.Setting.Password;
5680 if GikoSys.Setting.ReadProxy then begin
5681 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
5682 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
5684 GikoSys.Dolib.ProxyAddress := '';
5685 GikoSys.Dolib.ProxyPort := 0;
5687 if GikoSys.Dolib.Connect then begin
5688 LoginAction.Checked := True;
5689 AddMessageList('
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
5690 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
5692 // 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);
5693 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
5695 LoginAction.Checked := False;
5696 LoginToolButton.Down := False;
5699 Screen.Cursor := TmpCursor;
5704 procedure TGikoForm.KeySettingActionExecute(Sender: TObject);
5706 Dlg: TKeySettingForm;
5708 Dlg := TKeySettingForm.Create(Self);
5710 if Dlg.ShowModal = mrOk then
5711 GikoSys.SaveKeySetting(ActionList);
5717 procedure TGikoForm.ArrangeActionExecute(Sender: TObject);
5719 if ArrangeAction.Checked then begin
5721 ViewPanel.Align := alNone;
5722 ListSplitter.Align := alNone;
5723 ThreadPanel.Align := alNone;
5725 ViewPanel.Width := FBrowserSizeWidth;
5726 ViewPanel.Align := alLeft;
5728 ListSplitter.Width := 5;
5729 ListSplitter.Align := alLeft;
5731 ViewPanel.Left := -10;
5733 ThreadPanel.Align := alClient;
5735 GikoSys.Setting.ListOrientation := gloHorizontal;
5736 case GikoSys.Setting.ListWidthState of
5738 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5739 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5740 ViewPanel.Width := 1;
5743 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5744 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5747 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5748 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5749 ViewPanel.Width := ThreadMainPanel.Width - 80;
5754 ViewPanel.Align := alNone;
5755 ListSplitter.Align := alNone;
5756 ThreadPanel.Align := alNone;
5758 ViewPanel.Height := FBrowserSizeHeight;
5759 ViewPanel.Align := alTop;
5761 ListSplitter.Height := 5;
5762 ListSplitter.Align := alTop;
5764 ViewPanel.Top := -10;
5766 ThreadPanel.Align := alClient;
5767 GikoSys.Setting.ListOrientation := gloVertical;
5768 case GikoSys.Setting.ListHeightState of
5770 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5771 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5772 ViewPanel.Height := 1;
5775 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5776 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5779 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5780 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5781 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
5788 procedure TGikoForm.PaneInitActionExecute(Sender: TObject);
5790 CabinetPanel.Width := 150;
5791 MessagePanel.Height := 40;
5793 FBrowserSizeWidth := 200;
5794 FBrowserSizeHeight := 200;
5795 if ArrangeAction.Checked then begin
5796 ViewPanel.Width := FBrowserSizeWidth;
5798 ViewPanel.Height := FBrowserSizeHeight;
5800 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5801 if GikoSys.Setting.ListHeightState = glsMax then begin
5802 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5803 GikoSys.Setting.ListHeightState := glsNormal;
5806 if GikoSys.Setting.ListWidthState = glsMax then begin
5807 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5808 GikoSys.Setting.ListWidthState := glsNormal;
5813 procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
5815 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';
5816 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
5819 ThreadItem: TThreadItem;
5821 idx := BrowserTab.TabIndex;
5822 if idx <> -1 then begin
5823 if GikoSys.Setting.DeleteMsg then
5824 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
5826 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5827 DeleteTab(ThreadItem);
5828 ThreadItem.DeleteLogFile;
5829 if ThreadItem.ParentBoard = FActiveList then
5834 function TGikoForm.GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
5839 if CoolBar = nil then
5841 for i := 0 to CoolBar.Bands.Count - 1 do begin
5842 if CoolBar.Bands[i].Control = Control then begin
5843 Result := CoolBar.Bands[i];
5849 procedure TGikoForm.BrowserTabToolBarResize(Sender: TObject);
5851 if BrowserTab.Parent = BrowserTabToolBar then
5852 BrowserTab.Width := BrowserTabToolBar.Width;
5855 procedure TGikoForm.SelectTextClearActionExecute(Sender: TObject);
5857 GikoSys.Setting.SelectTextList.Clear;
5858 SelectComboBox.Items.Clear;
5859 SelectComboBox.Text := '';
5860 SetListViewType( gvtAll );
5863 procedure TGikoForm.NameTextClearActionExecute(Sender: TObject);
5867 GikoSys.Setting.NameList.Clear;
5868 for i := 0 to Screen.CustomFormCount - 1 do begin
5869 if TObject(Screen.CustomForms[i]) is TEditorForm then
5870 TEditorForm(Screen.CustomForms[i]).NameComboBox.Items.Clear;
5874 procedure TGikoForm.MailTextClearActionExecute(Sender: TObject);
5878 GikoSys.Setting.MailList.Clear;
5879 for i := 0 to Screen.CustomFormCount - 1 do begin
5880 if TObject(Screen.CustomForms[i]) is TEditorForm then
5881 TEditorForm(Screen.CustomForms[i]).MailComboBox.Items.Clear;
5885 procedure TGikoForm.LeftmostTabSelectActionExecute(Sender: TObject);
5887 if BrowserTab.Tabs.Count > 0 then begin
5888 BrowserTab.TabIndex := 0;
5889 BrowserTab.OnChange(nil);
5893 procedure TGikoForm.LeftTabSelectActionExecute(Sender: TObject);
5895 if BrowserTab.Tabs.Count > 0 then begin
5896 if BrowserTab.TabIndex = -1 then begin
5897 BrowserTab.TabIndex := 0;
5898 BrowserTab.OnChange(nil);
5899 end else if BrowserTab.TabIndex > 0 then begin
5900 BrowserTab.TabIndex := BrowserTab.TabIndex - 1;
5901 BrowserTab.OnChange(nil);
5906 procedure TGikoForm.RightTabSelectActionExecute(Sender: TObject);
5908 if BrowserTab.Tabs.Count > 0 then begin
5909 if BrowserTab.TabIndex = -1 then begin
5910 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5911 BrowserTab.OnChange(nil);
5912 end else if BrowserTab.TabIndex < (BrowserTab.Tabs.Count - 1) then begin
5913 BrowserTab.TabIndex := BrowserTab.TabIndex + 1;
5914 BrowserTab.OnChange(nil);
5919 procedure TGikoForm.RightmostTabSelectActionExecute(Sender: TObject);
5921 if BrowserTab.Tabs.Count > 0 then begin
5922 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5923 BrowserTab.OnChange(nil);
5927 procedure TGikoForm.LeftmostTabSelectActionUpdate(Sender: TObject);
5929 LeftmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
5932 procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
5934 LeftTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
5937 procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);
5939 RightTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
5942 procedure TGikoForm.RightmostTabSelectActionUpdate(Sender: TObject);
5944 RightmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
5947 procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
5952 procedure TGikoForm.SetMenuFont;
5954 // GikoSys.MenuFont(MenuToolBar.Font);
5955 // MenuToolBar.Buttons[0].AutoSize := False;
5956 // MenuToolBar.Buttons[0].AutoSize := True;
5957 // MenuToolBar.Font.Color := clMenuText;
5958 GikoSys.MenuFont(MainCoolBar.Font);
5959 MenuToolBar.Buttons[0].AutoSize := False;
5960 MenuToolBar.Buttons[0].AutoSize := True;
5961 MainCoolBar.AutoSize := False;
5962 MainCoolBar.AutoSize := True;
5964 GikoSys.MenuFont(ListCoolBar.Font);
5965 GikoSys.MenuFont(BrowserCoolBar.Font);
5966 // MenuToolBar.Font.Color := clMenuText;
5969 procedure TGikoForm.FavoriteMenuClick(Sender: TObject);
5975 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\92Ç
\89Á
5976 NewMenu := TMenuItem.Create(MainMenu);
5977 NewMenu.Action := FavoriteAddAction;
5978 FavoriteMenu.Add(NewMenu);
5979 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\90®
\97\9d
5980 NewMenu := TMenuItem.Create(FavoriteMenu);
5981 NewMenu.Action := FavoriteArrangeAction;
5982 FavoriteMenu.Add(NewMenu);
5983 //
\83Z
\83p
\83\8c\81[
\83^
5984 NewMenu := TMenuItem.Create(FavoriteMenu);
5985 NewMenu.Caption := '-';
5986 FavoriteMenu.Add(NewMenu);
5988 CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
5991 procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
5996 for i := 0 to Node.Count - 1 do begin
5997 NewMenu := TFavoriteMenuItem.Create(Self);
5998 NewMenu.AutoHotkeys := maAutomatic;
5999 NewMenu.Caption := CustomStringReplace(Node.Item[i].Text, '&', '&&');
6000 TFavoriteMenuItem(NewMenu).Data := Node.Item[i].Data;
6001 MenuItem.Add(NewMenu);
6003 if TObject(Node.Item[i].Data) is TFavoriteFolder then begin
6004 NewMenu.ImageIndex := TOOL_ICON_FAV_FOLDER;
6005 CreateFavMenu(Node.Item[i], NewMenu);
6006 end else if TObject(Node.Item[i].Data) is TFavoriteBoardItem then begin
6007 NewMenu.ImageIndex := TOOL_ICON_FAV_BOARD;
6008 NewMenu.OnClick := FavoriteClick;
6009 end else if TObject(Node.Item[i].Data) is TFavoriteThreadItem then begin
6010 NewMenu.ImageIndex := TOOL_ICON_FAV_THREAD;
6011 NewMenu.OnClick := FavoriteClick;
6016 procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
6018 Dlg: TFavoriteAddDialog;
6020 ThreadItem: TThreadItem;
6022 FavThread: TFavoriteThreadItem;
6023 FavBoard: TFavoriteBoardItem;
6026 b := FavoriteTreeView.Items.Count - 1;
6027 if Item is TBoard then begin
6028 for i := 0 to b do begin
6029 if TObject(FavoriteTreeView.Items.Item[ i ].Data) is TFavoriteBoardItem then begin
6030 FavBoard := TFavoriteBoardItem( FavoriteTreeView.Items.Item[ i ].Data );
6031 Board := FavBoard.Item;
6033 if Board = Item then begin
6034 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
6041 Dlg := TFavoriteAddDialog.Create(Self);
6043 Dlg.SetBoard( TBoard(Item) );
6048 end else if Item is TThreadItem then begin
6049 for i := 0 to b do begin
6050 if TObject(FavoriteTreeView.Items.Item[ i ].Data) is TFavoriteThreadItem then begin
6051 FavThread := TFavoriteThreadItem( FavoriteTreeView.Items.Item[ i ].Data );
6052 ThreadItem := FavThread.Item;
6054 if ThreadItem = Item then begin
6055 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
6062 Dlg := TFavoriteAddDialog.Create(Self);
6064 Dlg.SetThreadItem( TThreadItem(Item) );
6075 procedure TGikoForm.FavoriteAddActionExecute(Sender: TObject);
6077 ShowFavoriteAddDialog(GetActiveContent);
6080 procedure TGikoForm.FavoriteClick(Sender: TObject);
6083 FavoriteClick( Sender, True );
6087 procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
6090 ThreadItem: TThreadItem;
6091 FavBoard: TFavoriteBoardItem;
6092 FavThread: TFavoriteThreadItem;
6096 if Sender is TFavoriteMenuItem then
6097 Item := TFavoriteMenuItem(Sender).Data
6098 else if Sender is TLinkToolButton then
6099 Item := TLinkToolButton(Sender).Data
6100 else if Sender is TTreeNode then
6101 Item := TTreeNode( Sender ).Data
6105 if TObject(Item) is TFavoriteBoardItem then begin
6106 FavBoard := TFavoriteBoardItem(Item);
6107 Board := FavBoard.Item;
6108 if Board <> nil then begin
6109 if (FTreeType = gtt2ch) and (FActiveBBS <> Board.ParentCategory.ParenTBBS) then
6110 ShowBBSTree( Board.ParentCategory.ParenTBBS );
6111 SelectTreeNode(Board, True);
6113 end else if TObject(Item) is TFavoriteThreadItem then begin
6114 FavThread := TFavoriteThreadItem(Item);
6115 ThreadItem := FavThread.Item;
6116 if ThreadItem <> nil then
6117 InsertBrowserTab(ThreadItem, ActiveTab);
6121 procedure TGikoForm.FavoriteAddActionUpdate(Sender: TObject);
6123 FavoriteAddAction.Enabled := (GetActiveContent <> nil);
6126 procedure TGikoForm.BoardFavoriteAddActionExecute(Sender: TObject);
6128 if TObject(ListView.Selected.Data) is TBoard then
6129 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
6132 procedure TGikoForm.BoardFavoriteAddActionUpdate(Sender: TObject);
6134 BoardFavoriteAddAction.Enabled := (GetActiveList is TCategory) and (ListView.SelCount > 0);
6137 procedure TGikoForm.ThreadFavoriteAddActionExecute(Sender: TObject);
6139 if TObject(ListView.Selected.Data) is TThreadItem then
6140 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
6143 procedure TGikoForm.ThreadFavoriteAddActionUpdate(Sender: TObject);
6145 ThreadFavoriteAddAction.Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
6148 procedure TGikoForm.TreeSelectFavoriteAddActionExecute(Sender: TObject);
6150 ShowFavoriteAddDialog(TObject(TreeView.Selected.Data));
6153 procedure TGikoForm.FavoriteArrangeActionExecute(Sender: TObject);
6155 Dlg: TFavoriteArrangeDialog;
6157 Dlg := TFavoriteArrangeDialog.Create(Self);
6166 procedure TGikoForm.BBSMenuItemOnClick(
6171 if Sender is TBBSMenuItem then
6172 ShowBBSTree( TBBSMenuItem( Sender ).Data );
6176 procedure TGikoForm.MainCoolBarResize(Sender: TObject);
6178 TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
6181 procedure TGikoForm.MoveToActionExecute(Sender: TObject);
6186 URL := Trim(AddressComboBox.Text);
6189 idx := AddressComboBox.Items.IndexOf(URL);
6190 if idx = -1 then begin
6191 AddressComboBox.Items.Insert(0, URL);
6192 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
6193 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
6195 AddressComboBox.Items.Delete(idx);
6196 AddressComboBox.Items.Insert(0, URL);
6200 procedure TGikoForm.MoveToURL(URL: string);
6202 protocol, host, path, document, port, bookmark : string;
6203 BBSID, BBSKey: string;
6205 ThreadItem: TThreadItem;
6208 tmpThread : TThreadItem;
6209 category : TCategory;
6210 categoryNode : TTreeNode;
6211 boardNode : TTreeNode;
6212 shiftDown : Boolean;
6216 //=====
\83v
\83\89\83O
\83C
\83\93
6218 bi := High( BoardPlugIns );
6219 for i := Low( BoardPlugIns ) to bi do begin
6220 if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
6221 case BoardPlugIns[ i ].AcceptURL( URL ) of
6224 tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL );
6225 boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
6226 Board := BBSsFindBoardFromURL( boardURL );
6227 if Board = nil then begin
6228 Board := TBoard.Create( tmpThread.BoardPlugIn, boardURL );
6229 category := TCategory.Create;
6230 category.Title := '(
\96¼
\8fÌ
\95s
\96¾)';
6231 category.Add( Board );
6232 //
\81¦
\8c\83\82µ
\82
\95Û
\97¯
\92\86
6233 BBSs[ 0 ].Add( category );
6235 if FTreeType = gtt2ch then begin
6236 //
\94Â
\83\8a\83X
\83g
\82É
\93o
\98^
\82³
\82ê
\82Ä
\82¢
\82È
\82¢
\82Ì
\82Å
\83c
\83\8a\81[
\82É
\92Ç
\89Á
6237 // SetBoardTreeNode; 1
\8ds
\82Å
\8dÏ
\82Ü
\82¹
\82Ä
\82à
\82æ
\82µ
6238 categoryNode := TreeView.Items.AddChild(
6239 TreeView.Items.GetFirstNode, category.Title );
6240 categoryNode.Data := category;
6241 categoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
6242 categoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
6246 TreeView.Items.AddChild( categoryNode, Board.Title );
6247 boardNode.Data := Board;
6248 boardNode.ImageIndex := ITEM_ICON_BOARD1;
6249 boardNode.SelectedIndex := ITEM_ICON_BOARD2;
6253 if not Board.IsThreadDatRead then
6254 GikoSys.ReadSubjectFile( Board );
6257 ThreadItem := Board.Find( tmpThread.FileName );
6258 if ThreadItem = nil then begin
6259 ThreadItem := tmpThread;
6260 Board.Insert( 0, ThreadItem );
6261 if ActiveList is TBoard then begin
6262 if TBoard(ActiveList) = Board then
6263 ListView.Items.Count := ListView.Items.Count + 1;
6265 InsertBrowserTab( ThreadItem );
6266 DownloadContent( ThreadItem );
6269 InsertBrowserTab( ThreadItem );
6270 if not ThreadItem.IsLogFile then
6271 DownloadContent( ThreadItem );
6279 Board := BBSsFindBoardFromURL( URL );
6280 if Board <> nil then begin
6281 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
6282 ShowBBSTree( Board.ParentCategory.ParenTBBS );
6283 SelectTreeNode( Board, True );
6291 // 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¢
6294 GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark );
6295 GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey );
6297 if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
6298 boardURL := GikoSys.Get2chThreadURL2BoardURL( URL );
6299 Board := BBSsFindBoardFromURL( boardURL );
6301 Board := BBSsFindBoardFromBBSID( BBSID );
6303 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
6304 Board := TBoard.Create( nil, boardURL );
6305 if not Board.IsThreadDatRead then
6306 GikoSys.ReadSubjectFile(Board);
6307 ThreadItem := Board.FindThreadFromURL( URL );
6308 if ThreadItem = nil then begin
6309 //shift ->
\90Ý
\92è
\83u
\83\89\83E
\83U
\81i
\96³
\82¯
\82ê
\82ÎIE
\81j
6311 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
6312 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
6314 GikoSys.OpenBrowser(URL, gbtUserApp)
6315 else if ctrlDown then
6316 GikoSys.OpenBrowser(URL, gbtIE)
6318 ThreadItem := TThreadItem.Create( nil, GikoSys.Get2chBrowsableThreadURL( URL ) );
6319 ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
6320 if AnsiPos(Host, Board.URL) = 0 then
6321 ThreadItem.DownloadHost := Host
6323 ThreadItem.DownloadHost := '';
6324 Board.Insert(0, ThreadItem);
6325 if ActiveList is TBoard then begin
6326 if TBoard(ActiveList) = Board then
6327 ListView.Items.Count := ListView.Items.Count + 1;
6329 InsertBrowserTab(ThreadItem);
6330 DownloadContent(ThreadItem);
6333 if ThreadItem.IsLogFile then
6334 InsertBrowserTab(ThreadItem)
6336 if AnsiPos(Host, Board.URL) = 0 then
6337 ThreadItem.DownloadHost := Host
6339 ThreadItem.DownloadHost := '';
6340 InsertBrowserTab(ThreadItem);
6341 DownloadContent(ThreadItem);
6345 GikoSys.OpenBrowser(URL, gbtAuto);
6349 procedure TGikoForm.AddressToolBarResize(Sender: TObject);
6351 AddressComboBox.Width := AddressToolBar.Width - MoveToToolButton.Width - 10;
6354 procedure TGikoForm.AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
6355 Shift: TShiftState);
6357 if Key = VK_RETURN then
6358 MoveToAction.Execute;
6361 procedure TGikoForm.BrowserEnter(Sender: TObject);
6363 Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
6366 procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
6368 CDS:PCopyDataStruct;
6372 CDS := Message.CopyDataStruct;
6373 GetMem(PC, CDS^.cbData);
6375 lstrcpy(PC,CDS^.lpData);
6376 SetString(sURL, PC,lstrlen(PC));
6381 Message.Result := 1;
6384 procedure TGikoForm.WndProc(var Message: TMessage);
6386 if (Message.Msg = CM_DIALOGCHAR) then
6387 if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
6392 procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
6394 hComboEdit: THandle;
6395 // KeyData: Integer;
6398 if AddressComboBox.Focused or SelectComboBox.Focused then begin
6399 if Msg.CharCode in [VK_BACK] then begin
6400 hComboEdit := GetFocus;
6401 if hComboEdit <> 0 then
6402 SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, Msg.KeyData);
6403 // SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, $000E0001);
6406 if Msg.CharCode in [VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PRIOR, VK_NEXT] then begin
6407 hComboEdit := GetFocus;
6408 if hComboEdit <> 0 then
6409 SendMessage(hComboEdit, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
6413 //
\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ð
6414 KeyData := Msg.KeyData;
6415 if (KeyData and $20000000) = 0 then begin
6416 if Msg.CharCode in [Ord('F'), Ord('V'), Ord('B'), Ord('R'),
6417 Ord('A'), Ord('T'), Ord('H')] then begin
6418 if not ActionList.IsShortCut(Msg) then begin
6426 procedure TGikoForm.BrowserTabVisibleActionExecute(Sender: TObject);
6428 GikoSys.Setting.BrowserTabVisible := BrowserTabVisibleAction.Checked;
6432 procedure TGikoForm.BrowserTabTopActionExecute(Sender: TObject);
6434 BrowserTabBottomAction.Checked := False;
6435 BrowserTabTopAction.Checked := True;
6436 GikoSys.Setting.BrowserTabPosition := gtpTop;
6440 procedure TGikoForm.BrowserTabBottomActionExecute(Sender: TObject);
6442 BrowserTabTopAction.Checked := False;
6443 BrowserTabBottomAction.Checked := True;
6444 GikoSys.Setting.BrowserTabPosition := gtpBottom;
6448 procedure TGikoForm.BrowserTabTabStyleActionExecute(Sender: TObject);
6450 BrowserTabButtonStyleAction.Checked := False;
6451 BrowserTabFlatStyleAction.Checked := False;
6452 BrowserTabTabStyleAction.Checked := True;
6453 GikoSys.Setting.BrowserTabStyle := gtsTab;
6457 procedure TGikoForm.BrowserTabButtonStyleActionExecute(Sender: TObject);
6459 BrowserTabTabStyleAction.Checked := False;
6460 BrowserTabFlatStyleAction.Checked := False;
6461 BrowserTabButtonStyleAction.Checked := True;
6462 GikoSys.Setting.BrowserTabStyle := gtsButton;
6466 procedure TGikoForm.BrowserTabFlatStyleActionExecute(Sender: TObject);
6468 BrowserTabFlatStyleAction.Checked := True;
6469 BrowserTabTabStyleAction.Checked := False;
6470 BrowserTabButtonStyleAction.Checked := False;
6471 GikoSys.Setting.BrowserTabStyle := gtsFlat;
6475 procedure TGikoForm.PreviewTimerTimer(Sender: TObject);
6481 HtmlFileName: string;
6485 TargetFrameName: OleVariant;
6486 PostData: OleVariant;
6487 Headers: OleVariant;
6488 WindowHeight: Integer;
6489 WindowWidth: Integer;
6493 Protocol, Host, Path, Document, Port, Bookmark: string;
6495 PreviewTimer.Enabled := False;
6499 case GikoSys.Setting.PreviewSize of
6506 WindowHeight := 192;
6510 WindowHeight := 384;
6514 WindowHeight := 480;
6516 else begin //gpsMedium
6518 WindowHeight := 288;
6522 ARect := Rect(0, 0, WindowWidth, WindowHeight);
6524 case GikoSys.Setting.PopupPosition of
6525 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6526 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6527 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
6528 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
6529 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
6530 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
6531 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6532 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6533 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Ó
6536 html := '<html><head>'#13#10
6538 + 'function init() {'#13#10
6539 + ' if ((document.body.clientHeight >= Image1.height) && (document.body.clientWidth >= Image1.width)) {'#13#10
6541 + ' var dh, ih;'#13#10
6542 + ' dh = document.body.clientWidth / document.body.clientHeight;'#13#10
6543 + ' ih = Image1.width / Image1.height;'#13#10
6544 + ' if (document.body.clientWidth < document.body.clientHeight) {'#13#10
6545 + ' if (ih > dh)'#13#10
6546 + ' Image1.width = document.body.clientWidth;'#13#10
6548 + ' Image1.height = document.body.clientHeight;'#13#10
6550 + ' if (ih < dh)'#13#10
6551 + ' Image1.height = document.body.clientHeight;'#13#10
6553 + ' Image1.width = document.body.clientWidth;'#13#10
6556 + ' Message.style.display = "none";'#13#10
6560 + '<body topmargin="0" leftmargin="0" style="border-width: 1px; overflow:hidden; border-style: solid;" onLoad="init()">'#13#10
6561 + '<div align="center" id="Message">
\83v
\83\8c\83r
\83\85\81[
\8dì
\90¬
\92\86</div>'#13#10
6562 + '<div align="center"><img name="Image1" border="0" src="%ImageURL%"></div>'#13#10
6564 sl := TStringList.Create;
6567 HtmlFileName := GikoSys.GetAppDir + HTML_FILE_NAME;
6568 sl.Text := AnsiReplaceStr(html, '%ImageURL%', FPreviewURL);
6569 sl.SaveToFile(HtmlFileName);
6576 NavURL := HtmlFileName;
6578 TargetFrameName := '';
6581 GikoSys.ParseURI(FPreviewURL, Protocol, Host, Path, Document, Port, Bookmark);
6582 Referer := Protocol + '://' + Host;
6584 Referer := Referer + ':' + Port;
6585 Referer := Referer + Path;
6586 Headers := 'Referer: ' + Referer;
6588 FPreviewBrowser.Navigate(NavURL, Flags, TargetFrameName, PostData, Headers);
6590 if ARect.Top + WindowHeight > Screen.DesktopHeight then
6591 ARect.Top := Screen.DesktopHeight - WindowHeight;
6592 if ARect.Left + WindowWidth > Screen.DesktopWidth then
6593 ARect.Left := Screen.DesktopWidth - WindowWidth;
6594 if ARect.Left < Screen.DesktopLeft then ARect.Left := Screen.DesktopLeft;
6595 if ARect.Bottom < Screen.DesktopTop then ARect.Bottom := Screen.DesktopTop;
6597 SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
6598 ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
6600 // Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
6601 // SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
6605 procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
6607 if PreviewTimer.Enabled then
6608 PreviewTimer.Enabled := False;
6609 if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
6610 FHint.ReleaseHandle;
6613 if (FPreviewBrowser <> nil) and (IsWindowVisible(FPreviewBrowser.Handle)) then
6614 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
6615 Message.Result := 1;
6619 procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
6621 MsgBarCloseAction.Execute;
6624 function TGikoForm.OnDocumentContextMenu(Sender: TObject): WordBool;
6626 Doc: IHtmlDocument2;
6627 Range: IHTMLTxtRange;
6630 ThreadItem: TThreadItem;
6632 Doc := Browser.Document as IHtmlDocument2;
6633 Range := Doc.selection.createRange as IHTMLTxtRange;
6634 s := CustomStringReplace(Range.text, '
\81@', ' ');//
\91S
\8ap
\8bó
\94\92\82ð
\94¼
\8ap
\8bó
\94\92\82É
6635 s := GikoSys.ZenToHan(Trim(s));
6636 if GikoSys.IsNumeric(s) then begin
6638 ThreadItem := GetActiveContent;
6639 if ThreadItem <> nil then begin
6641 FHint.PopupType := gptThread;
6642 SetResPopupText(ThreadItem, Num, Num, False, False);
6643 if FHint.ResCount <> 0 then
6653 procedure TGikoForm.SetResPopupText(threadItem: TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
6667 if StNum > ToNum then begin
6673 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
6674 if StNum + 10 < ToNum then
6675 ToNum := StNum + 10;
6677 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
6679 if ThreadItem <> nil then
6680 FHint.Title := ThreadItem.Title;
6682 for i := StNum to ToNum do begin
6684 FileName := ThreadItem.FilePath;
6685 tmp := GikoSys.ReadThreadFile(FileName, Line);
6687 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
6688 Res := GikoSys.DivideStrLine(tmp);
6690 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
6691 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
6692 Body := CustomStringReplace(Body, '<br>', #10,true);
6693 Body := CustomStringReplace(Body, '</a>', '',true);
6694 Body := GikoSys.DeleteLink(Body);
6695 Body := CustomStringReplace(Body, '<', '<');
6696 Body := CustomStringReplace(Body, '>', '>');
6697 Body := CustomStringReplace(Body, '"', '"');
6698 Body := CustomStringReplace(Body, '&', '&');
6699 FHint.Add(Header, Body);
6700 // s := StringReplace(s, '&', '&', [rfReplaceAll]);
6701 // s := StringReplace(s, '
\81\97\81M', ',', [rfReplaceAll]);
6708 {function TGikoForm.GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
6720 ActiveFileName: string;
6722 ThreadItem: TThreadItem;
6727 HintData := THintData.Create;
6728 SList := TStringList.Create;
6731 if StNum > ToNum then begin
6737 if (sBoard <> '') and (sThread <> '') then begin
6739 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
6740 if StNum + 10 < ToNum then
6741 ToNum := StNum + 10;
6743 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
6745 Board := BBS2ch.FindBBSID(sBoard);
6746 if Board <> nil then begin
6747 if not Board.IsThreadDatRead then
6748 GikoSys.ReadSubjectFile(Board);
6749 ThreadItem := Board.Find(sThread + '.dat');
6750 //ThreadItem := BBS2ch.FindThreadItem(sBoard, sThread + '.dat');
6751 if ThreadItem <> nil then
6752 HintData.Title := ThreadItem.Title;
6753 //s := s + ThreadItem.Title;
6757 for i := StNum to ToNum do begin
6759 FileName := IncludeTrailingPathDelimiter(BBS2ch.GetLogFolder + sBoard) + sThread + '.dat';
6760 tmp := GikoSys.ReadThreadFile(FileName, Line);
6761 if tmp <> '' then begin
6762 Res := GikoSys.DivideStrLine(tmp);
6766 //s := s + IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime + #10 + #10;
6767 //s := s + ' ' + StringReplace(Res.FBody, '<br>', #10, [rfIgnoreCase, rfReplaceAll]);
6768 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
6770 s := StringReplace(Res.FBody, '<br> ', #10, [rfIgnoreCase, rfReplaceAll]);
6771 s := StringReplace(s, '<br>', #10, [rfIgnoreCase, rfReplaceAll]);
6772 s := StringReplace(s, '</a>', '', [rfIgnoreCase, rfReplaceAll]);
6773 s := GikoSys.DeleteLink(s);
6774 s := StringReplace(s, '<', '<', [rfReplaceAll]);
6775 s := StringReplace(s, '>', '>', [rfReplaceAll]);
6776 s := StringReplace(s, '"', '"', [rfReplaceAll]);
6777 s := StringReplace(s, '&', '&', [rfReplaceAll]);
6779 HintData.Add(Header, Body);
6780 // s := StringReplace(s, '&', '&', [rfReplaceAll]);
6781 // s := StringReplace(s, '
\81\97\81M', ',', [rfReplaceAll]);
6792 procedure TGikoForm.ShowTextPopup;
6797 // if Trim(s) = '' then
6800 FHint.Font.Name := GikoSys.Setting.HintFontName;
6801 FHint.Font.Size := GikoSys.Setting.HintFontSize;
6802 FHint.Font.Color := GikoSys.Setting.HintFontColor;
6803 FHint.Color := GikoSys.Setting.HintBackColor;
6804 FHint.HeaderBold := GikoSys.Setting.ResPopupHeaderBold;
6806 if FHint.PopupType = gptRaw then
6807 ARect := FHint.CalcHintRect(Screen.Width, FHint.Caption, nil)
6809 ARect := FHint.CalcHintRect(Screen.Width, '', nil);
6810 case GikoSys.Setting.PopupPosition of
6811 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6812 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6813 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
6814 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
6815 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
6816 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
6817 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6818 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6819 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Ó
6821 //FHint.ActivateHint(ARect, s);
6822 if FHint.PopupType = gptRaw then
6823 FHint.ActivateHint(ARect, FHint.Caption)
6825 FHint.ActivateHint(ARect, '');
6827 FHint.ReleaseHandle;
6832 procedure TGikoForm.GikoHelpActionExecute(Sender: TObject);
6836 FileName := GikoSys.GetAppDir + 'batahlp.chm';
6837 if not FileExists(FileName) then begin
6840 '
\83w
\83\8b\83v
\82ª
\8c©
\82Â
\82©
\82è
\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½' + #13#10 +
6841 '
\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 +
6842 '
\83w
\83\8b\83v
\82Í
\83M
\83R
\83i
\83r
\82Ì
\83T
\83C
\83g
\82É
\92u
\82¢
\82Ä
\82 \82è
\82Ü
\82·',
6847 ShellExecute(Handle, 'open', PChar(FileName), '', PChar(GikoSys.GetAppDir), SW_SHOW);
6850 procedure TGikoForm.ToolButton18Click(Sender: TObject);
6852 if FTreeType = gttHistory then begin
6854 TreeView.Items.Clear;
6858 procedure TGikoForm.KotehanActionExecute(Sender: TObject);
6860 Dlg: TKotehanDialog;
6862 Dlg := TKotehanDialog.Create(Self);
6870 procedure TGikoForm.SetLinkBar;
6874 ToolButton: TLinkToolButton;
6875 MenuItem: TMenuItem;
6877 MainCoolBar.Bands.BeginUpdate;
6879 LinkBarPopupMenu.Items.Clear;
6880 for i := LinkToolBar.ButtonCount - 1 downto 0 do
6881 LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
6882 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
6883 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
6884 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
6885 ToolButton := TLinkToolButton.Create(LinkToolBar);
6886 if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteFolder then begin
6887 MenuItem := TMenuItem.Create(Self);
6888 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
6889 LinkBarPopupMenu.Items.Add(MenuItem);
6890 ToolButton.MenuItem := MenuItem;
6891 ToolButton.ImageIndex := TOOL_ICON_FAV_FOLDER;
6892 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
6893 ToolButton.ImageIndex := TOOL_ICON_FAV_BOARD;
6894 ToolButton.OnClick := FavoriteClick;
6895 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
6896 ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
6897 ToolButton.OnClick := FavoriteClick;
6899 ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
6900 ToolButton.Left := 10000;
6901 ToolButton.Data := FavoriteTreeView.Items[i].Item[j].Data;
6902 ToolButton.AutoSize := True;
6903 ToolButton.OnDragDrop := LinkToolButtonDragDrop;
6904 ToolButton.OnDragOver := FavoriteDragOver;
6905 ToolButton.OnMouseDown := LinkToolButtonOnMouseDown;
6906 ToolButton.OnMouseMove := LinkToolButtonOnMouseMove;
6907 ToolButton.OnMouseUp := LinkToolButtonOnMouseUp;
6908 ToolButton.OnStartDrag := LinkToolButtonStartDrag;
6909 //ToolButton.DragMode := dmAutomatic;
6910 ToolButton.DragMode := dmManual;
6911 ToolButton.PopupMenu := FavoriteTreePopupMenu;
6913 LinkToolBar.InsertControl(ToolButton);
6918 { if LinkToolBar.ButtonCount = 0 then begin
6919 ToolButton := TLinkToolButton.Create(LinkToolBar);
6920 ToolButton.Style := tbsButton;
6921 ToolButton.ImageIndex := -1;
6922 ToolButton.Caption := '';
6923 LinkToolBar.InsertControl(ToolButton);
6926 MainCoolBar.Bands.EndUpdate;
6930 procedure TGikoForm.FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
6938 if Sender = FavoriteTreeView then begin
6939 Node := FavoriteTreeView.GetNodeAt(X, Y);
6944 bound := Node.DisplayRect( False );
6945 height := bound.Bottom - bound.Top;
6946 if (bound.Top + height / 2) <= Y then
6947 Node := FavoriteTreeView.GetNodeAt(X, Y + height);
6952 if Node.IsFirstNode then
6957 if FDropSpaceNode <> nil then
6958 if FDropSpaceNode.AbsoluteIndex = Node.AbsoluteIndex then
6961 if Change then begin
6962 if FDropSpaceNode <> nil then
6963 FDropSpaceNode.Free;
6965 FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil );
6966 FDropSpaceNode.MoveTo( Node, naInsert );
6967 FDropSpaceNode.ImageIndex := -1;
6968 FDropSpaceNode.SelectedIndex := -1;
6972 if Source = FavoriteTreeView then begin
6973 if FavoriteTreeView.Selected = FavoriteTreeView.Items.GetFirstNode then begin
6978 end else if Source = BrowserTab then
6980 else if Source = ListView then
6982 else if Source is TLinkToolButton then
6984 else if Source = TreeView then
6990 procedure TGikoForm.FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
6993 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
6996 procedure TGikoForm.LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
6998 // FDragging := true;
7001 procedure TGikoForm.LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
7003 SenderNode: TTreeNode;
7004 LinkToolButton: TLinkToolButton;
7007 LinkToolButton := TLinkToolButton( Sender );
7008 SenderNode := TreeNodeDataFind( FavoriteTreeView.TopItem, LinkToolButton.Data );
7010 FavoriteDragDrop( SenderNode, Source );
7014 procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7018 procedure TGikoForm.LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
7022 TToolButton( Sender ).DragMode := dmManual;
7023 if ssLeft in Shift then begin
7024 TToolButton( Sender ).Down := true;
7025 if FDragTime = 0 then begin
7026 FDragTime := GetTickCount();
7028 Now := GetTickCount();
7029 if (Now - FDragTime) > 500 then begin
7030 if FDragButton <> TToolButton( Sender ) then begin
7032 FDragButton := TToolButton( Sender );
7033 TToolButton(Sender).BeginDrag(false ,5);
7036 {$IF Defined(debug)}
7037 ShowMessage('Error');
7048 procedure TGikoForm.LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7053 function TGikoForm.GetWidthAllToolButton(ToolBar: TToolBar): Integer;
7058 for i := 0 to ToolBar.ButtonCount - 1 do
7059 Result := Result + ToolBar.Buttons[i].Width;
7062 procedure TGikoForm.MainCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7064 Control: TWinControl;
7066 Control := FindControl(BandInfo^.hwndChild);
7067 if (Control = MenuToolBar) or (Control = StdToolBar) or (Control = LinkToolBar) then begin
7068 BandInfo^.fMask := BandInfo.fMask or RBBIM_STYLE or RBBIM_IDEALSIZE;
7069 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7070 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7074 procedure TGikoForm.MainCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
7080 ChevronPopupMenu.Items.Clear;
7082 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
7083 if MainCoolBar.Bands[ i ].Visible then begin
7084 if Idx = Int64(RebarChevron^.uBand) then begin
7091 if (Idx >= 0) and (MainCoolBar.Bands.Count > Idx) then begin
7092 if MainCoolBar.Bands[Idx].Control = MenuToolbar then begin
7094 end else if MainCoolBar.Bands[Idx].Control = StdToolbar then begin
7095 ToolBarChevronMenu(StdToolBar);
7096 end else if MainCoolBar.Bands[Idx].Control = LinkToolbar then begin
7100 p := MainCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
7101 ChevronPopupMenu.Popup(p.x, p.y);
7105 procedure TGikoForm.MenuBarChevronMenu;
7106 procedure SetSubMenu(MenuItem: TMenuItem; PopupItem: TMenuItem);
7112 for i := 0 to MenuItem.Count - 1 do begin
7114 if MenuItem[i] is TFavoriteMenuItem then begin
7115 Item := TFavoriteMenuItem.Create(Self);
7116 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(MenuItem[i]).Data;
7118 Item := TMenuItem.Create(Self);
7119 Item.Caption := MenuItem[i].Caption;
7120 Item.Action := MenuItem[i].Action;
7121 Item.ImageIndex := MenuItem[i].ImageIndex;
7122 Item.OnClick := MenuItem[i].OnClick;
7123 PopupItem.Add(Item);
7124 if MenuItem[i].Count > 0 then
7125 SetSubMenu(MenuItem[i], Item);
7134 ChevronPopupMenu.Items.Clear;
7135 ChevronPopupMenu.Images := MainMenu.Images;
7136 bw := GetWidthAllToolButton(MenuToolBar);
7137 if MenuToolBar.Width < bw then begin
7139 for i := 0 to MenuToolBar.ButtonCount - 1 do begin
7140 w := w + MenuToolBar.Buttons[i].Width;
7141 if MenuToolBar.Width <= w then begin
7142 Item := TMenuItem.Create(Self);
7143 Item.Caption := MenuToolBar.Buttons[i].MenuItem.Caption;
7144 //Item.Action := MenuToolBar.Buttons[i].MenuItem.Action;
7145 ChevronPopupMenu.Items.Add(Item);
7146 SetSubMenu(MenuToolbar.Buttons[i].MenuItem, Item);
7152 procedure TGikoForm.ToolBarChevronMenu(ToolBar: TToolBar);
7153 procedure SetSubMenu(PopupMenu: TPopupMenu; PopupItem: TMenuItem);
7158 if Assigned(PopupMenu.OnPopup) then
7159 PopupMenu.OnPopup(nil);
7160 for i := 0 to PopupMenu.Items.Count - 1 do begin
7162 if PopupMenu.Items[i] is TFavoriteMenuItem then begin
7163 Item := TFavoriteMenuItem.Create(Self);
7164 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(PopupMenu.Items[i]).Data;
7166 Item := TMenuItem.Create(Self);
7167 Item.Caption := PopupMenu.Items[i].Caption;
7168 Item.Action := PopupMenu.Items[i].Action;
7169 Item.ImageIndex := PopupMenu.Items[i].ImageIndex;
7170 Item.OnClick := PopupMenu.Items[i].OnClick;
7171 PopupItem.Add(Item);
7180 ChevronPopupMenu.Items.Clear;
7181 ChevronPopupMenu.Images := ToolBar.HotImages;
7182 bw := GetWidthAllToolButton(ToolBar);
7183 if ToolBar.Width < bw then begin
7185 for i := 0 to ToolBar.ButtonCount - 1 do begin
7186 w := w + ToolBar.Buttons[i].Width;
7187 if ToolBar.Width <= w then begin
7188 Case ToolBar.Buttons[i].Tag of
7191 Item := TMenuItem.Create(Self);
7192 if ToolBar.Buttons[i].Style = tbsSeparator then
7195 Item.Caption := ToolBar.Buttons[i].Caption;
7196 Item.Action := ToolBar.Buttons[i].Action;
7197 //Item.Visible := True;
7199 ChevronPopupMenu.Items.Add(Item);
7200 if ToolBar.Buttons[i].DropdownMenu <> nil then begin
7202 Item.OnClick := nil;
7203 SetSubMenu(ToolBar.Buttons[i].DropdownMenu, Item);
7207 //
\8f«
\97\88\82Ì
\82½
\82ß
\82Ì
\97\
\96ñ
7214 procedure TGikoForm.LinkBarChevronMenu;
7219 Item: TFavoriteMenuItem;
7221 Button: TLinkToolButton;
7223 ChevronPopupMenu.Items.Clear;
7224 ChevronPopupMenu.Images := LinkToolBar.Images;
7225 bw := GetWidthAllToolButton(LinkToolBar);
7226 if LinkToolBar.Width < bw then begin
7228 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
7229 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
7230 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
7231 w := w + LinkToolBar.Buttons[j].Width;
7232 if LinkToolBar.Width <= w then begin
7233 if LinkToolBar.Buttons[j] is TLinkToolButton then begin
7234 Button := TLinkToolButton(LinkToolBar.Buttons[j]);
7235 Item := TFavoriteMenuItem.Create(Self);
7236 if TObject(Button.Data) is TFavoriteFolder then begin
7237 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], Item);
7238 end else if TObject(Button.Data) is TFavoriteBoardItem then begin
7239 Item.OnClick := FavoriteClick;
7240 end else if TObject(Button.Data) is TFavoriteThreadItem then begin
7241 Item.OnClick := FavoriteClick;
7243 Item.Data := Button.Data;
7244 Item.Caption := LinkToolBar.Buttons[j].Caption;
7245 Item.ImageIndex := LinkToolBar.Buttons[j].ImageIndex;
7246 ChevronPopupMenu.Items.Add(Item);
7256 procedure TGikoForm.ListCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7258 Control: TWinControl;
7260 Control := FindControl(BandInfo^.hwndChild);
7261 if Control = ListToolBar then begin
7262 BandInfo^.fMask := BandInfo.fMask or RBBIM_STYLE or RBBIM_IDEALSIZE;
7263 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7264 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7268 procedure TGikoForm.ListCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
7273 ChevronPopupMenu.Items.Clear;
7274 Idx := RebarChevron^.uBand;
7275 if (Idx >= 0) and (ListCoolBar.Bands.Count > Idx) then begin
7276 if ListCoolBar.Bands[Idx].Control = ListToolBar then begin
7277 ToolBarChevronMenu(ListToolBar);
7280 p := ListCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
7281 ChevronPopupMenu.Popup(p.x, p.y);
7285 procedure TGikoForm.BrowserCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7287 Control: TWinControl;
7289 Control := FindControl(BandInfo^.hwndChild);
7290 if Control = BrowserToolBar then begin
7291 BandInfo^.fMask := BandInfo.fMask or RBBIM_STYLE or RBBIM_IDEALSIZE;
7292 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7293 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7297 procedure TGikoForm.BrowserCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
7302 ChevronPopupMenu.Items.Clear;
7303 Idx := RebarChevron^.uBand;
7304 if (Idx >= 0) and (BrowserCoolBar.Bands.Count > Idx) then begin
7305 if BrowserCoolBar.Bands[Idx].Control = BrowserToolBar then
7306 ToolBarChevronMenu(BrowserToolBar)
7309 p := BrowserCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
7310 ChevronPopupMenu.Popup(p.x, p.y);
7314 procedure TGikoForm.ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
7316 if Column^.iImage = -1 then begin
7317 Column^.mask := Column^.mask or LVCF_FMT;
7319 Column^.mask := Column^.mask or LVCF_FMT or LVCF_IMAGE;
7320 Column^.fmt := Column^.fmt or LVCFMT_IMAGE or LVCFMT_BITMAP_ON_RIGHT;
7324 procedure TGikoForm.ThreadEditorActionExecute(Sender: TObject);
7326 Editor: TEditorForm;
7328 if not (GetActiveList is TBoard) then
7330 Editor := TEditorForm.Create(Self);
7331 Editor.SetBoard(TBoard(GetActiveList));
7333 Editor.BodyEdit.SetFocus;
7336 procedure TGikoForm.ToolBarSettingActionExecute(Sender: TObject);
7338 Dlg: TToolBarSettingDialog;
7340 //Component: TComponent;
7342 Dlg := TToolBarSettingDialog.Create(Self, ActionList);
7344 Dlg.AddToolBar(StdToolBar, gttStandard);
7345 Dlg.AddToolBar(ListToolBar, gttList);
7346 Dlg.AddToolBar(BrowserToolBar, gttBrowser);
7348 if ToolBarSettingAction.ActionComponent.GetParentComponent is TPopupMenu then begin
7349 Component := TPopupMenu( ToolBarSettingAction.ActionComponent.GetParentComponent ).PopupComponent;
7351 if Component = MainCoolBar then
7352 Dlg.ToolBarComboBox.ItemIndex := 0
7353 else if Component = ListCoolBar then
7354 Dlg.ToolBarComboBox.ItemIndex := 1
7355 else if Component = BrowserCoolBar then
7356 Dlg.ToolBarComboBox.ItemIndex := 2;
7359 if Dlg.ShowModal = mrOK then begin
7362 //
\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é
7363 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
7364 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth + 1;
7365 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth - 1;
7367 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
7368 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth + 1;
7369 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth - 1;
7371 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
7372 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth + 1;
7373 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth - 1;
7375 SaveToolBarSetting(StdToolBar);
7376 SaveToolBarSetting(ListToolBar);
7377 for i := ListToolBar.ControlCount - 1 downto 0 do
7379 if ListToolBar.Controls[ i ].Action = SelectItemAction then
7381 //
\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·
7382 if (i + 1) < ListToolBar.ControlCount then
7383 if ListToolBar.Controls[ i + 1 ] is TToolButton then
7384 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
7385 ListToolBar.Controls[ i + 1 ].Visible := False;
7387 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
7388 ListToolBar.Controls[ i ].Visible := False;
7389 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
7390 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
7391 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
7392 SelectComboBox.Parent := ListToolBar;
7393 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
7394 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
7395 SelectComboBoxSplitter.Parent := ListToolBar;
7400 SaveToolBarSetting(BrowserToolBar);
7407 procedure TGikoForm.SetToolBarPopup;
7411 for i := 0 to StdToolBar.ButtonCount - 1 do begin
7413 for i := 0 to ListToolBar.ButtonCount - 1 do begin
7414 if ListToolBar.Buttons[i].Action = IconStyle then
7415 ListToolBar.Buttons[i].DropdownMenu := ListIconPopupMenu;
7416 if ListToolBar.Buttons[i].Action = SelectReservAction then
7417 ListToolBar.Buttons[i].DropdownMenu := RoundNamePopupMenu;
7419 for i := 0 to BrowserToolBar.ButtonCount - 1 do begin
7420 if BrowserToolBar.Buttons[i].Action = IEAction then
7421 BrowserToolBar.Buttons[i].DropdownMenu := BrowserPopupMenu;
7425 procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState;
7426 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
7435 Wnd := WindowFromPoint(MousePos);
7437 if WheelDelta > 0 then
7442 if (Wnd = BrowserTab.Handle) or
7443 (Wnd = BrowserTab.Parent.Handle) then begin
7444 BrowserTab.ScrollTabs(Delta);
7445 end else if Wnd = ListView.Handle then begin
7446 if ListView.ViewStyle = vsList then
7447 ListView.Scroll( Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE, 0 )
7449 ListView.Scroll( 0, Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE );
7456 procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
7458 if Length( SelectComboBox.Text ) = 0 then
7460 AllItemAction.Checked := True;
7461 LogItemAction.Checked := False;
7462 NewItemAction.Checked := False;
7464 //
\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é
7465 if AllItemAction.Checked then
7466 AllItemAction.Checked := False;
7467 if LogItemAction.Checked then
7468 LogItemAction.Checked := False;
7469 if NewItemAction.Checked then
7470 NewItemaction.Checked := False;
7473 if Length( SelectComboBox.Text ) = 0 then
7474 SetListViewType( gvtAll )
7476 SetListViewType( gvtUser, SelectComboBox.Text, false);
7479 procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
7480 Shift: TShiftState);
7483 if Key = VK_Return then
7486 end else if Length( SelectComboBox.Text ) = 0 then
7488 AllItemAction.Checked := True;
7489 LogItemAction.Checked := False;
7490 NewItemAction.Checked := False;
7492 //
\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é
7493 if AllItemAction.Checked then
7494 AllItemAction.Checked := False;
7495 if LogItemAction.Checked then
7496 LogItemAction.Checked := False;
7497 if NewItemAction.Checked then
7498 NewItemaction.Checked := False;
7503 procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
7508 if Length( SelectComboBox.Text ) = 0 then
7510 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
7511 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
7516 //
\8di
\82è
\8d\9e\82Ý
\8c\9f\8dõ
\82Ì
\97\9a\97ð
\8dX
\90V
7517 procedure TGikoForm.ModifySelectList;
7524 if SelectComboBox.Parent = nil then
7527 if Length( SelectComboBox.Text ) > 0 then
7529 oldText := SelectComboBox.Text;
7530 idx := GikoSys.Setting.SelectTextList.IndexOf( oldText );
7532 GikoSys.Setting.SelectTextList.Delete( idx );
7533 idx := SelectComboBox.Items.IndexOf( oldText );
7535 SelectComboBox.Items.Delete( idx );
7536 GikoSys.Setting.SelectTextList.Insert( 0, oldText );
7537 SelectComboBox.Items.Insert( 0, oldText );
7538 SelectComboBox.Text := oldText;
7545 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\95Ò
\8fW
\82·
\82é
\82½
\82ß
\82É
\8aJ
\82
7546 procedure TGikoForm.NG1Click(Sender: TObject);
7548 GikoSys.FAbon.EditNGwords;
7550 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\8dÄ
\93Ç
\82Ý
\8d\9e\82Ý
\82·
\82é
7551 procedure TGikoForm.SelectResActionExecute(Sender: TObject);
7553 Dlg: TListSelectDialog;
7554 ThreadItem : TThreadItem;
7555 FilterList : TStringList;
7558 Dlg := TListSelectDialog.Create(Self);
7560 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
7561 Dlg.SelectComboBox.Text := FSelectResWord;
7563 if Dlg.ModalResult = mrOK then begin
7564 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
7565 //
\8bó
\93ü
\97Í
\82Å OK
\82Í
\91S
\83\8c\83X
\95\
\8e¦
\82Æ
\93¯
\88Ó
\8b`
7566 AllResAction.Execute;
7568 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
7569 AllResAction.Checked := False;
7570 SelectResAction.Checked := True;
7572 //
\8dÅ
\8cã
\82É
\90Ý
\92è
\82µ
\82½
\82à
\82Ì
\82ð
\8ao
\82¦
\82Ä
\82¨
\82
7573 FSelectResWord := Dlg.SelectComboBox.Text;
7575 //
\8c\9f\8dõ
\97\9a\97ð
\82Ì
\8dX
\90V
7576 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
7578 GikoSys.Setting.SelectTextList.Delete(idx);
7579 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
7580 while Dlg.SelectComboBox.Items.Count > 100 do begin
7581 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
7585 if SelectComboBox.Parent <> nil then
7586 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
7590 //
\83t
\83B
\83\8b\83^
\82Ì
\90Ý
\92è
7591 FilterList := TStringList.Create;
7593 GikoSys.FSelectResFilter.Reverse := True;
7594 FilterList.Delimiter := ' '; //
\8bæ
\90Ø
\82è
\8eq
\82ð
\94¼
\8ap
\83X
\83y
\81[
\83X
\82É
\90Ý
\92è
7595 FilterList.DelimitedText := Dlg.SelectComboBox.Text;
7597 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
7602 //
\83X
\83\8c\83b
\83h
\82Ì
\8dÄ
\95`
\89æ
7603 ThreadItem := GetActiveContent;
7604 if ThreadItem <> nil then
7605 SetContent( ThreadItem );
7607 end else if Length( FSelectResWord ) > 0 then begin
7608 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
7609 AllResAction.Checked := False;
7610 SelectResAction.Checked := True;
7618 procedure TGikoForm.SelectResActionUpdate(Sender: TObject);
7620 SelectResAction.Enabled := GetActiveContent <> nil;
7623 procedure TGikoForm.FormKeyDown(Sender: TObject; var Key: Word;
7624 Shift: TShiftState);
7628 Doc: IHtmlDocument2;
7629 // Range: IHTMLTxtRange;
7632 ThreadItem: TThreadItem;
7636 ThreadItem := GetActiveContent;
7637 if ThreadItem <> nil then begin
7638 if ssCtrl in Shift then begin
7639 if ssAlt in Shift then begin
7640 Doc := Browser.Document as IHtmlDocument2;
7641 s := IntToStr(Fkeynum);
7642 if GikoSys.IsNumeric(s) then begin
7643 ThreadItem := GetActiveContent;
7644 if ThreadItem <> nil then begin
7646 FHint.PopupType := gptThread;
7647 SetResPopupText(ThreadItem, Num, Num, False, False);
7648 if FHint.ResCount <> 0 then begin
7655 if Fkeynum = 0 then begin
7656 if (Key >= $60) and (Key <= $69) then begin
7657 Fkeynum := Key - $60;
7660 if (Key >= $60) and (Key <= $69) then begin
7661 Fkeynum := Fkeynum * 10 + Key - $60;
7667 if FHint <> nil then begin
7668 FHint.ReleaseHandle;
7677 procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;
7678 Shift: TShiftState);
7681 if Key = $11 then begin
7683 if FHint <> nil then begin
7684 FHint.ReleaseHandle;
7692 //
\91S
\82Ä
\82Ì
\83\8c\83X
\82ð
\95\
\8e¦
7693 procedure TGikoForm.AllResActionExecute(Sender: TObject);
7695 ThreadItem : TThreadItem;
7696 FilterList : TStringList;
7698 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
7699 AllResAction.Checked := True;
7700 SelectResAction.Checked := False;
7702 if Length( FSelectResWord ) > 0 then begin
7703 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
7704 FilterList := TStringList.Create;
7706 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
7707 GikoSys.FSelectResFilter.Reverse := False;
7712 FSelectResWord := '';
7714 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
7715 ThreadItem := GetActiveContent;
7716 if ThreadItem <> nil then
7717 SetContent( ThreadItem );
7721 procedure TGikoForm.AllResActionUpdate(Sender: TObject);
7723 AllResAction.Enabled := GetActiveContent <> nil;
7726 procedure TGikoForm.ReloadClick(Sender: TObject);
7728 ThreadItem : TThreadItem;
7730 if GikoSys.FAbon.ReLoadFromNGwordFile =false then begin
7731 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);
7733 ThreadItem := GetActiveContent;
7734 if ThreadItem <> nil then
7735 SetContent( ThreadItem );
7740 procedure TGikoForm.GoBackClick(Sender: TObject);
7742 ThreadItem : TThreadItem;
7745 if GikoSys.FAbon.GoForward =false then begin
7746 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);
7748 s := GikoSys.FAbon.NGwordname;
7749 StatusBar.Panels.Items[2].Text := s;
7750 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
7751 StatusBarResize(Sender);
7752 ThreadItem := GetActiveContent;
7753 if ThreadItem <> nil then
7754 SetContent( ThreadItem );
7759 procedure TGikoForm.GoFowardClick(Sender: TObject);
7761 ThreadItem : TThreadItem;
7764 if GikoSys.FAbon.GoBack =false then begin
7765 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);
7767 s := GikoSys.FAbon.NGwordname;
7768 StatusBar.Panels.Items[2].Text := s;
7769 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
7770 StatusBarResize(Sender);
7771 ThreadItem := GetActiveContent;
7772 if ThreadItem <> nil then
7773 SetContent( ThreadItem );
7778 procedure TGikoForm.SelectComboBoxSplitterMouseMove(Sender: TObject;
7779 Shift: TShiftState; X, Y: Integer);
7784 If (SelectComboBox.Parent <> nil) and (IsDraggingSelectComboBox) Then begin
7787 pos := SelectComboBoxSplitter.ClientToScreen( pos );
7788 w := SelectComboBox.Width + (pos.X - DraggingSelectComboBoxPosition.X);
7790 If w <= 50 Then Begin
7791 //
\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
7792 //
\81u
\8e~
\82Ü
\82Á
\82½(50pixel)
\88Ê
\92u
\81v
\82É
\82È
\82é
\82æ
\82¤
\82É
7793 pos.X := pos.X + (50 - w);
7795 //
\8f¬
\82³
\82
\82È
\82è
\82·
\82¬
\82È
\82¢
\82æ
\82¤
\82É
7799 //
\83`
\83\89\82Â
\82«
\8cy
\8c¸
\82Ì
\88×
7800 If SelectComboBox.Width <> w Then Begin
7801 SelectComboBox.Width := w;
7802 GikoSys.Setting.SelectComboBoxWidth := w;
7803 DraggingSelectComboBoxPosition := pos;
7808 procedure TGikoForm.SelectComboBoxSplitterMouseDown(Sender: TObject;
7809 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7813 IsDraggingSelectComboBox := True;
7816 DraggingSelectComboBoxPosition := SelectComboBoxSplitter.ClientToScreen( pos );
7819 procedure TGikoForm.SelectComboBoxSplitterMouseUp(Sender: TObject;
7820 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7822 IsDraggingSelectComboBox := False;
7825 procedure TGikoForm.StatusBarResize(Sender: TObject);
7827 StatusBar.Panels[1].Width := StatusBar.Width -
7828 StatusBar.Panels[0].Width -
7829 StatusBar.Panels[2].Width;
7831 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\92Ê
\8fí
\81v
7832 procedure TGikoForm.IndividualAbon1Click(Sender: TObject);
7834 ThreadItem : TThreadItem;
7836 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,1);
7837 ThreadItem := GetActiveContent;
7838 if ThreadItem <> nil then
7839 SetContent( ThreadItem );
7841 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\93§
\96¾
\81v
7842 procedure TGikoForm.IndividualAbon2Click(Sender: TObject);
7844 ThreadItem : TThreadItem;
7846 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,0);
7847 ThreadItem := GetActiveContent;
7848 if ThreadItem <> nil then
7849 SetContent( ThreadItem );
7851 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c\81i
\81j
7852 procedure TGikoForm.AntiIndividualAbonClick(Sender: TObject);
7854 ThreadItem : TThreadItem;
7857 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
7858 GikoSys.FAbon.DeleteIndividualAbon(KokoPopupMenu.Tag);
7859 ThreadItem := GetActiveContent;
7860 if ThreadItem <> nil then
7861 SetContent( ThreadItem );
7863 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
7864 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
7867 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c
7868 procedure TGikoForm.N42Click(Sender: TObject);
7870 IndividualForm :TIndividualAbonForm;
7871 ThreadItem : TThreadItem;
7875 IndividualForm := TIndividualAbonForm.Create(Self);
7877 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
7878 for i :=0 to GikoSys.FAbon.GetAbonResCount-1 do begin
7879 IndividualForm.ComboBox1.Items.Add(GikoSys.FAbon.GetAbonResString(i));
7881 if IndividualForm.ShowModal = mrOK then begin
7882 GikoSys.FAbon.DeleteIndividualAbon(IndividualForm.ResNumber);
7884 ThreadItem := GetActiveContent;
7885 if ThreadItem <> nil then
7886 SetContent( ThreadItem );
7888 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
7889 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
7892 IndividualForm.Free;
7896 procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
7899 if (Length( SelectComboBox.Text ) = 0) or
7900 (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
7902 SelectComboBox.Text := '';
7903 SelectComboBox.Color := clWindow;
7908 procedure TGikoForm.N51Click(Sender: TObject);
7912 //
\94Â
\96¼
\8c\9f\8dõ
7913 procedure TGikoForm.TreeSelectSearchBoardNameExecute(Sender: TObject);
7917 CurItem : TTreeNode;
7920 if InputQuery('
\94Â
\96¼
\8c\9f\8dõ','
\94Â
\96¼
\82Ì
\93ü
\97Í',s) then begin
7923 if TreeView.Selected = nil then
7924 CurItem := TreeView.Items.GetFirstNode
7926 CurItem := TreeView.Selected.GetNext;
7927 if CurItem = nil then
7928 CurItem := TreeView.Items.GetFirstNode;
7930 while CurItem <> nil do begin
7931 if (CurItem.ImageIndex <> 2) and (AnsiPos(s,CurItem.Text) <> 0) then begin
7934 CurItem := CurItem.GetNext;
7937 if CurItem = nil then begin
7938 msg := '
\90æ
\93ª
\82É
\96ß
\82è
\82Ü
\82·
\82©
\81H';
7939 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
7940 CurItem := TreeView.Items.GetFirstNode;
7944 TreeView.Select(CurItem);
7947 TreeView.Select(CurItem);
7949 msg := '
\8e\9f\82É
\8ds
\82«
\82Ü
\82·
\82©
\81H';
7950 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
7964 procedure TGikoForm.CabinetFavoriteActionExecute(Sender: TObject);
7970 if CabinetPanel.Visible then begin
7971 if FTreeType = gttFavorite then begin
7972 CabinetVisible( False );
7973 CabinetFavoriteAction.Checked := False;
7975 CabinetFavoriteAction.Checked := True;
7978 CabinetVisible( True );
7979 CabinetFavoriteAction.Checked := True;
7982 // BBS...BBS, History, Favorite
7983 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 1;
7985 b := CabinetSelectPopupMenu.Items.Count - 1;
7986 for i := 0 to b do begin
7987 item := CabinetSelectPopupMenu.Items[ i ];
7988 if item is TBBSMenuItem then begin
7989 item.Checked := False;
7990 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
7991 CabinetMenu.Items[ i ].Checked := False;
7995 //
\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Ö
7996 HistoryToolBar.Hide;
7997 FavoriteToolBar.Show;
7998 TreeView.Visible := False;
7999 FavoriteTreeView.Visible := True;
8001 CabinetSelectToolButton.Caption := '
\82¨
\8bC
\82É
\93ü
\82è';
8002 FTreeType := gttFavorite;
8004 //
\83\81\83j
\83\85\81[
\8by
\82Ñ
\83{
\83^
\83\93\82Ì
\83`
\83F
\83b
\83N
\82ð
\90Ý
\92è
8005 CabinetBBSAction.Checked := False;
8006 CabinetHistoryAction.Checked := False;
8008 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\83c
\83\8a\81[
\82ð
\93W
\8aJ
8009 FavoriteTreeView.TopItem.Expanded := True;
8013 procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
8016 if (SenderNode = nil) or (SourceNode = nil) or (SenderNode = SourceNode) then
8019 if TObject(SenderNode.Data) is TFavoriteFolder then
8020 SourceNode.MoveTo(SenderNode, naAddChild)
8022 SourceNode.MoveTo(SenderNode, naInsert);
8026 procedure TGikoForm.FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
8030 FavoBoardItem: TFavoriteBoardItem;
8031 FavoThreadItem: TFavoriteThreadItem;
8033 ThreadItem: TThreadItem;
8036 if (SenderNode = nil) or (Source = nil) then
8039 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
8040 FavNode := SenderNode.Parent
8042 FavNode := SenderNode;
8046 if Source is TBoard then begin
8047 Board := TBoard( Source );
8048 FavoBoardItem := TFavoriteBoardItem.CreateWithItem( Board );
8049 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, FavoBoardItem);
8050 Node.ImageIndex := 15;
8051 Node.SelectedIndex := 15;
8052 end else if Source is TFavoriteBoardItem then begin
8053 FavoBoardItem := TFavoriteBoardItem( Source );
8054 Board := FavoBoardItem.Item;
8055 if Board <> nil then
8056 if not Board.IsThreadDatRead then
8057 GikoSys.ReadSubjectFile(Board);
8058 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, Source);
8059 Node.ImageIndex := 15;
8060 Node.SelectedIndex := 15;
8061 end else if Source is TThreadItem then begin
8062 ThreadItem := TThreadItem( Source );
8063 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
8064 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
8065 Node.ImageIndex := 16;
8066 Node.SelectedIndex := 16;
8067 end else if Source is TFavoriteThreadItem then begin
8068 FavoThreadItem := TFavoriteThreadItem( Source );
8069 ThreadItem := FavoThreadItem.Item;
8070 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, Source);
8071 Node.ImageIndex := 16;
8072 Node.SelectedIndex := 16;
8075 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
8077 FavoriteMoveTo( SenderNode, Node );
8081 procedure TGikoForm.FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
8084 SourceNode: TTreeNode;
8085 LinkToolButton: TLinkToolButton;
8088 if SenderNode = nil then
8091 if not (TObject( SenderNode.Data ) is TFavoriteFolder) then
8092 if FDropSpaceNode <> nil then
8093 SenderNode := FDropSpaceNode;
8095 if Source = FavoriteTreeView then begin
8097 SourceNode := FavoriteTreeView.Selected;
8098 FavoriteMoveTo( SenderNode, SourceNode );
8100 end else if Source is TLinkToolButton then begin
8102 LinkToolButton := TLinkToolButton( Source );
8103 //ShowMessage(LinkToolButton.Text);
8104 SourceNode := TreeNodeDataFind( FavoriteTreeView.TopItem, LinkToolButton.Data );
8105 FavoriteMoveTo( SenderNode, SourceNode );
8107 end else if Source = BrowserTab then begin
8109 idx := BrowserTab.TabIndex;
8110 FavoriteAddTo( SenderNode, BrowserTab.Tabs.Objects[idx] );
8112 end else if Source = ListView then begin
8114 FavoriteAddTo( SenderNode, ListView.Selected.Data );
8116 end else if Source = TreeView then begin
8118 FavoriteAddTo( SenderNode, TreeView.Selected.Data );
8126 procedure TGikoForm.FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
8129 SenderNode: TTreeNode;
8132 SenderNode := FavoriteTreeView.GetNodeAt(X, Y);
8133 if SenderNode <> nil then begin
8134 FavoriteDragDrop( SenderNode, Source );
8137 if FDropSpaceNode <> nil then begin
8138 FDropSpaceNode.Free;
8139 FDropSpaceNode := nil;
8144 procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
8145 Node: TTreeNode; var S: String);
8148 FavoriteTreeView.ReadOnly := True;
8153 procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
8154 Shift: TShiftState);
8160 FClickNode := FavoriteTreeView.Selected;
8161 FavoriteTreeViewRenameActionExecute( Sender );
8165 FClickNode := FavoriteTreeView.Selected;
8166 FavoriteTreeViewDeleteActionExecute( Sender );
8172 procedure TGikoForm.FavoriteTreePopupMenuPopup(Sender: TObject);
8175 LinkToolButton: TLinkToolButton;
8178 if FavoriteTreePopupMenu.PopupComponent = FavoriteTreeView then begin
8180 FClickNode := FavoriteTreeView.Selected;
8182 end else if FavoriteTreePopupMenu.PopupComponent is TLinkToolButton then begin
8184 LinkToolButton := TLinkToolButton( FavoriteTreePopupMenu.PopupComponent );
8185 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
8186 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
8187 FClickNode := FavoriteTreeView.Items[i];
8191 for i := 0 to FClickNode.Count - 1 do begin
8192 if FClickNode.Item[i].Data = LinkToolButton.Data then begin
8193 FClickNode := FClickNode.Item[i];
8200 if FClickNode = nil then begin
8201 FavoriteTreeBrowseFolderPopupMenu.Enabled := False;
8202 FavoriteTreeDeletePopupMenu.Enabled := False;
8203 FavoriteTreeRenamePopupMenu.Enabled := False;
8204 FavoriteTreeNewFolderPopupMenu.Enabled := False;
8205 FavoriteTreeBrowseBoardPopupMenu.Enabled := False;
8206 FavoriteTreeBrowseThreadPopupMenu.Enabled := False;
8207 FavoriteTreeURLCopyPopupMenu.Enabled := False;
8208 FavoriteTreeNameCopyPopupMenu.Enabled := False;
8209 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
8210 FavoriteTreeReloadPopupMenu.Enabled := False;
8211 FavoriteTreeLogDeletePopupMenu.Enabled := False;
8212 end else if FClickNode.IsFirstNode then begin
8213 FavoriteTreeBrowseFolderPopupMenu.Enabled := True;
8214 FavoriteTreeDeletePopupMenu.Enabled := False;
8215 FavoriteTreeRenamePopupMenu.Enabled := False;
8216 FavoriteTreeNewFolderPopupMenu.Enabled := True;
8217 FavoriteTreeBrowseBoardPopupMenu.Enabled := False;
8218 FavoriteTreeBrowseThreadPopupMenu.Enabled := False;
8219 FavoriteTreeURLCopyPopupMenu.Enabled := False;
8220 FavoriteTreeNameCopyPopupMenu.Enabled := False;
8221 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
8222 FavoriteTreeReloadPopupMenu.Enabled := False;
8223 FavoriteTreeLogDeletePopupMenu.Enabled := False;
8224 end else if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
8225 FavoriteTreeBrowseFolderPopupMenu.Enabled := True;
8226 FavoriteTreeDeletePopupMenu.Enabled := True;
8227 FavoriteTreeRenamePopupMenu.Enabled := False;
8228 FavoriteTreeNewFolderPopupMenu.Enabled := True;
8229 FavoriteTreeBrowseBoardPopupMenu.Enabled := False;
8230 FavoriteTreeBrowseThreadPopupMenu.Enabled := False;
8231 FavoriteTreeURLCopyPopupMenu.Enabled := False;
8232 FavoriteTreeNameCopyPopupMenu.Enabled := False;
8233 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
8234 FavoriteTreeReloadPopupMenu.Enabled := False;
8235 FavoriteTreeLogDeletePopupMenu.Enabled := False;
8236 end else if TObject(FClickNode.Data) is TFavoriteFolder then begin
8237 FavoriteTreeBrowseFolderPopupMenu.Enabled := True;
8238 FavoriteTreeDeletePopupMenu.Enabled := True;
8239 FavoriteTreeRenamePopupMenu.Enabled := True;
8240 FavoriteTreeNewFolderPopupMenu.Enabled := True;
8241 FavoriteTreeBrowseBoardPopupMenu.Enabled := False;
8242 FavoriteTreeBrowseThreadPopupMenu.Enabled := False;
8243 FavoriteTreeURLCopyPopupMenu.Enabled := False;
8244 FavoriteTreeNameCopyPopupMenu.Enabled := False;
8245 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
8246 FavoriteTreeReloadPopupMenu.Enabled := False;
8247 FavoriteTreeLogDeletePopupMenu.Enabled := False;
8248 end else if TObject(FClickNode.Data) is TFavoriteThreadItem then begin
8249 FavoriteTreeBrowseFolderPopupMenu.Enabled := False;
8250 FavoriteTreeDeletePopupMenu.Enabled := True;
8251 FavoriteTreeRenamePopupMenu.Enabled := True;
8252 FavoriteTreeNewFolderPopupMenu.Enabled := True;
8253 FavoriteTreeBrowseBoardPopupMenu.Enabled := True;
8254 FavoriteTreeBrowseThreadPopupMenu.Enabled := True;
8255 FavoriteTreeURLCopyPopupMenu.Enabled := True;
8256 FavoriteTreeNameCopyPopupMenu.Enabled := True;
8257 FavoriteTreeNameURLCopyPopupMenu.Enabled := True;
8258 FavoriteTreeReloadPopupMenu.Enabled := True;
8259 FavoriteTreeLogDeletePopupMenu.Enabled := True;
8260 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
8261 FavoriteTreeBrowseFolderPopupMenu.Enabled := False;
8262 FavoriteTreeDeletePopupMenu.Enabled := True;
8263 FavoriteTreeRenamePopupMenu.Enabled := True;
8264 FavoriteTreeNewFolderPopupMenu.Enabled := True;
8265 FavoriteTreeBrowseBoardPopupMenu.Enabled := True;
8266 FavoriteTreeBrowseThreadPopupMenu.Enabled := False;
8267 FavoriteTreeURLCopyPopupMenu.Enabled := True;
8268 FavoriteTreeNameCopyPopupMenu.Enabled := True;
8269 FavoriteTreeNameURLCopyPopupMenu.Enabled := True;
8270 FavoriteTreeReloadPopupMenu.Enabled := True;
8271 FavoriteTreeLogDeletePopupMenu.Enabled := False;
8273 FavoriteTreeBrowseFolderPopupMenu.Enabled := False;
8274 FavoriteTreeDeletePopupMenu.Enabled := False;
8275 FavoriteTreeRenamePopupMenu.Enabled := False;
8276 FavoriteTreeNewFolderPopupMenu.Enabled := False;
8277 FavoriteTreeBrowseBoardPopupMenu.Enabled := False;
8278 FavoriteTreeBrowseThreadPopupMenu.Enabled := False;
8279 FavoriteTreeURLCopyPopupMenu.Enabled := False;
8280 FavoriteTreeNameCopyPopupMenu.Enabled := False;
8281 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
8282 FavoriteTreeReloadPopupMenu.Enabled := False;
8283 FavoriteTreeLogDeletePopupMenu.Enabled := False;
8288 procedure TGikoForm.FavoriteTreeViewDeleteActionExecute(Sender: TObject);
8291 if FClickNode = nil then
8293 if FClickNode.IsFirstNode then
8295 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
8296 if MsgBox(Handle, '
\81u
\83\8a\83\93\83N
\81v
\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', '
\8am
\94F', MB_YESNO or MB_ICONQUESTION) <> ID_YES then
8300 //FDeleteList.Add(FClickNode.Data);
8301 //SetDeleteItemList(FClickNode);
8309 procedure TGikoForm.FavoriteTreeViewRenameActionExecute(Sender: TObject);
8314 if FClickNode = nil then
8316 if FClickNode.IsFirstNode then
8318 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then
8320 FavoriteTreeView.ReadOnly := False;
8321 if (FTreeType = gttFavorite) and (CabinetPanel.Visible) then begin
8322 node := FClickNode.Parent;
8323 while node <> nil do begin
8324 node.Expanded := True;
8325 node := node.Parent;
8327 FClickNode.EditText;
8329 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 );
8336 procedure TGikoForm.FavoriteTreeViewNewFolderActionExecute(
8339 NewFavFolder: TFavoriteFolder;
8343 if FClickNode = nil then
8347 if not (TObject(FClickNode.Data) is TFavoriteFolder) then begin
8348 FavoriteTreeView.Selected := FClickNode.Parent;
8349 FClickNode := FClickNode.Parent;
8352 NewFavFolder := TFavoriteFolder.Create;
8353 Node := FavoriteTreeView.Items.AddChildObject(FClickNode, '
\90V
\82µ
\82¢
\83t
\83H
\83\8b\83_', NewFavFolder);
8354 Node.ImageIndex := 14;
8355 Node.SelectedIndex := 14;
8356 // FClickNode.Selected.Expanded := True;
8357 FavoriteTreeView.Selected := Node;
8359 FavoriteTreeViewRenameAction.Execute;
8365 procedure TGikoForm.ToolButton19Click(Sender: TObject);
8368 FavoriteArrangeActionExecute( nil );
8372 procedure TGikoForm.FavoriteBrowseFolder( node: TTreeNode );
8377 if not (TObject(node.Data) is TFavoriteFolder) then
8380 for i := 0 to node.Count - 1 do
8382 if TObject(node.Item[i].Data) is TFavoriteFolder then
8383 FavoriteBrowseFolder( node.Item[i] )
8384 else if TObject(node.Item[i].Data) is TFavoriteThreadItem then
8385 FavoriteClick( node.Item[i], False );
8390 procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
8394 FavoriteBrowseFolder( FClickNode );
8395 BrowserTab.OnChange(nil);
8399 procedure TGikoForm.FavoriteTreeViewChange(Sender: TObject;
8403 if not Mouse.IsDragging then
8404 FavoriteClick( Node );
8408 procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
8411 FClickNode := FavoriteTreeView.Selected;
8412 FavoriteTreeViewReloadActionExecute( Sender );
8416 procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
8419 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';
8420 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
8422 ThreadItem: TThreadItem;
8423 FavThread: TFavoriteThreadItem;
8426 if FClickNode = nil then Exit;
8427 if not (TObject(FClickNode.Data) is TFavoriteThreadItem) then Exit;
8429 FavThread := TFavoriteThreadItem( FClickNode.Data );
8430 ThreadItem := FavThread.Item;
8433 if GikoSys.Setting.DeleteMsg then begin
8434 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
8438 DeleteHistory(ThreadItem);
8439 DeleteTab(ThreadItem);
8440 ThreadItem.DeleteLogFile;
8448 procedure TGikoForm.FavoriteTreeViewReloadActionExecute(Sender: TObject);
8450 ThreadItem: TThreadItem;
8451 FavThread: TFavoriteThreadItem;
8453 FavBoard: TFavoriteBoardItem;
8456 if FClickNode = nil then Exit;
8458 if TObject( FClickNode.Data ) is TFavoriteThreadItem then begin
8459 FavThread := TFavoriteThreadItem( FClickNode.Data );
8460 ThreadItem := FavThread.Item;
8461 if ThreadItem <> nil then
8462 DownloadContent(ThreadItem);
8463 end else if TObject( FClickNode.Data ) is TFavoriteBoardItem then begin
8464 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8465 Board := FavBoard.Item;
8466 DownloadList(Board);
8471 procedure TGikoForm.FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
8473 ThreadItem: TThreadItem;
8474 FavThread: TFavoriteThreadItem;
8476 FavBoard: TFavoriteBoardItem;
8480 if FClickNode = nil then Exit;
8482 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8484 FavThread := TFavoriteThreadItem( FClickNode.Data );
8485 ThreadItem := FavThread.Item;
8488 s := ThreadItem.URL + #13#10;
8490 Clipboard.AsText := s;
8494 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8496 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8497 Board := FavBoard.Item;
8498 if Board <> nil then
8499 if not Board.IsThreadDatRead then
8500 GikoSys.ReadSubjectFile(Board);
8503 s := Board.URL + #13#10;
8505 Clipboard.AsText := s;
8513 procedure TGikoForm.FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
8515 ThreadItem: TThreadItem;
8516 FavThread: TFavoriteThreadItem;
8518 FavBoard: TFavoriteBoardItem;
8522 if FClickNode = nil then Exit;
8524 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8526 FavThread := TFavoriteThreadItem( FClickNode.Data );
8527 ThreadItem := FavThread.Item;
8530 s := ThreadItem.Title + #13#10;
8532 Clipboard.AsText := s;
8536 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8538 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8539 Board := FavBoard.Item;
8540 if Board <> nil then
8541 if not Board.IsThreadDatRead then
8542 GikoSys.ReadSubjectFile(Board);
8545 s := Board.Title + #13#10;
8547 Clipboard.AsText := s;
8555 procedure TGikoForm.FavoriteTreeViewNameURLCopyActionExecute(
8558 ThreadItem: TThreadItem;
8559 FavThread: TFavoriteThreadItem;
8561 FavBoard: TFavoriteBoardItem;
8565 if FClickNode = nil then Exit;
8567 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8569 FavThread := TFavoriteThreadItem( FClickNode.Data );
8570 ThreadItem := FavThread.Item;
8573 s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10;
8575 Clipboard.AsText := s;
8579 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8581 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8582 Board := FavBoard.Item;
8583 if Board <> nil then
8584 if not Board.IsThreadDatRead then
8585 GikoSys.ReadSubjectFile(Board);
8588 s := Board.URL + #13#10 + Board.Title + #13#10;
8590 Clipboard.AsText := s;
8598 function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
8604 for i := 0 to Node.Count - 1 do begin
8605 if Node.Item[i].Data = FindPointer then begin
8606 Result := Node.Item[i];
8608 end else if Node.Item[i].Count > 0 then begin
8609 Found := TreeNodeDataFind( Node.Item[i], FindPointer );
8610 if Found <> nil then begin
8621 procedure TGikoForm.LinkToolBarDragDrop(Sender, Source: TObject; X,
8625 SenderNode: TTreeNode;
8629 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
8630 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
8631 SenderNode := FavoriteTreeView.Items[i];
8636 FavoriteDragDrop( SenderNode, Source );
8640 procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
8641 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8643 if FDragWFirst <> true then begin
8644 FDragWFirst := false;
8648 procedure TGikoForm.LinkToolBarDragOver(Sender, Source: TObject; X,
8649 Y: Integer; State: TDragState; var Accept: Boolean);
8652 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
8656 procedure TGikoForm.OnlyAHundredResExecute(Sender: TObject);
8658 ThreadItem : TThreadItem;
8660 GikoSys.OnlyAHundredRes := OnlyAHundredRes.Checked;
8661 ThreadItem := GetActiveContent;
8662 if ThreadItem <> nil then
8663 SetContent( ThreadItem );
8666 procedure TGikoForm.FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
8670 if FDropSpaceNode <> nil then begin
8671 FDropSpaceNode.Free;
8672 FDropSpaceNode := nil;
8678 procedure TGikoForm.ListCoolBarContextPopup(Sender: TObject;
8679 MousePos: TPoint; var Handled: Boolean);
8682 MousePos := ListCoolBar.ClientToScreen( MousePos );
8683 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
8687 procedure TGikoForm.MainCoolBarContextPopup(Sender: TObject;
8688 MousePos: TPoint; var Handled: Boolean);
8691 MousePos := MainCoolBar.ClientToScreen( MousePos );
8692 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
8696 procedure TGikoForm.BrowserCoolBarContextPopup(Sender: TObject;
8697 MousePos: TPoint; var Handled: Boolean);
8700 MousePos := BrowserCoolBar.ClientToScreen( MousePos );
8701 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
8704 procedure TGikoForm.ExportFavoriteFileAccept(Sender: TObject);
8706 if FavoriteDM.SaveFavoriteFile( ExportFavoriteFile.Dialog.FileName ) Then begin
8707 ShowMessage('
\83t
\83@
\83C
\83\8b\82ð
\8fo
\97Í
\82µ
\82Ü
\82µ
\82½');
8709 ShowMessage('
\83t
\83@
\83C
\83\8b\82Ì
\8fo
\97Í
\82É
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½');
8712 procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
8714 if FListViewBackGroundColor <> value then begin
8715 FListViewBackGroundColor := value;
8716 ListView.Color := FListViewBackGroundColor;
8719 procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
8721 ExportFavoriteFile.Dialog.FileName := FavoriteDM.GetFavoriteFilePath;
8724 procedure TGikoForm.CabinetBBSActionExecute(Sender: TObject);
8727 if CabinetPanel.Visible then begin
8728 if FTreeType = gtt2ch then begin
8729 CabinetVisible( False );
8730 CabinetBBSAction.Checked := False;
8732 CabinetBBSAction.Checked := True;
8735 CabinetVisible( True );
8736 CabinetBBSAction.Checked := True;
8739 if FActiveBBS = nil then
8740 ShowBBSTree( BBSs[ 0 ] )
8742 ShowBBSTree( FActiveBBS );
8746 procedure TGikoForm.FavoriteTreeViewBrowseThreadActionExecute(
8749 threadItem : TThreadItem;
8752 if FClickNode = nil then Exit;
8754 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8756 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
8757 if threadItem = nil then
8759 GikoSys.OpenBrowser( threadItem.URL, gbtAuto );
8765 procedure TGikoForm.FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
8767 threadItem : TThreadItem;
8771 if FClickNode = nil then Exit;
8773 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8775 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
8776 if threadItem = nil then
8778 GikoSys.OpenBrowser( threadItem.ParentBoard.URL, gbtAuto );
8780 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8782 boardItem := TFavoriteBoardItem( FClickNode.Data ).Item;
8783 if boardItem = nil then
8785 GikoSys.OpenBrowser( boardItem.URL, gbtAuto );