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;
240 MessageImageList: TImageList;
241 ProgressBar: TProgressBar;
242 ArrangeAction: TAction;
244 NameURLCopyAction: TAction;
245 SelectItemNameURLCopyAction: TAction;
246 NameUrlCopyPMenu: TMenuItem;
254 ListCoolBar: TGikoCoolBar;
255 ListToolBar: TToolBar;
256 ViewNoButton: TToolButton;
257 IconToolButton: TToolButton;
258 UpFolderButton: TToolButton;
259 Sepa01ToolButton: TToolButton;
260 AllItemToolButton: TToolButton;
261 LogItemToolButton: TToolButton;
262 NewItemToolButton: TToolButton;
263 ListDownloadToolButton: TToolButton;
264 ListThreadDownloadToolButton: TToolButton;
265 ToolButton2: TToolButton;
266 ToolButton1: TToolButton;
267 BrowserCoolBar: TGikoCoolBar;
268 BrowserToolBar: TToolBar;
269 BrowserSizeButton: TToolButton;
270 ToolButton3: TToolButton;
271 TopButton: TToolButton;
272 LastBotton: TToolButton;
273 NewButton: TToolButton;
274 KokoButton: TToolButton;
275 ToolButton9: TToolButton;
276 EditorButton: TToolButton;
277 ToolButton11: TToolButton;
278 IEButton: TToolButton;
279 ToolButton5: TToolButton;
280 ItemReloadButton: TToolButton;
281 ListNameToolBar: TToolBar;
282 ListNameLabel: TLabel;
284 BrowserNameToolBar: TToolBar;
285 ItemBoardImage: TImage;
286 BrowserBoardNameLabel: TLabel;
288 BrowserNameLabel: TLabel;
289 ActiveLogDeleteAction: TAction;
294 ListNameBarVisibleAction: TAction;
296 BrowserNameBarVisibleAction: TAction;
299 TreeSelectNameURLCopy: TAction;
300 TreeSelectNameURLPupupMenu: TMenuItem;
303 PaneInitAction: TAction;
305 BrowserTabToolBar: TToolBar;
306 BrowserTab: TTabControl;
307 ToolButton7: TToolButton;
308 BrowserMinAction: TAction;
311 SelectTextClearAction: TAction;
312 MailTextClearAction: TAction;
313 NameTextClearAction: TAction;
317 LeftmostTabSelectAction: TAction;
318 LeftTabSelectAction: TAction;
319 RightTabSelectAction: TAction;
320 RightmostTabSelectAction: TAction;
326 FavoriteMenu: TMenuItem;
327 FavoriteAddAction: TAction;
329 BoardFavoriteAddMenu: TMenuItem;
330 BoardFavoriteAddAction: TAction;
331 ThreadFavoriteAddAction: TAction;
332 ThreadFavoriteAddMenu: TMenuItem;
333 TreeSelectFavoriteAddAction: TAction;
335 TreeSelectFavoriteAddPupupMenu: TMenuItem;
336 FavoriteArrangeAction: TAction;
337 FavoriteTreeView: TTreeView;
338 StateIconImageList: TImageList;
340 TopRightPanel: TPanel;
343 TopCoolPanel: TPanel;
344 MainCoolBar: TGikoCoolBar;
345 MenuToolBar: TToolBar;
346 StdToolBar: TToolBar;
347 RoundToolButton: TToolButton;
348 ToolButton6: TToolButton;
349 ToolButton4: TToolButton;
350 ToolButton13: TToolButton;
351 AbortToolButton: TToolButton;
352 LoginToolButton: TToolButton;
353 AddressToolBar: TToolBar;
354 AddressComboBox: TComboBox;
355 MoveToToolButton: TToolButton;
356 MoveToAction: TAction;
357 AddressImageList: TImageList;
358 AddressBarVisibleAction: TAction;
359 AddressToolBarMenu: TMenuItem;
361 BrowserTabVisibleAction: TAction;
364 BrowserTabTopAction: TAction;
365 BrowserTabBottomAction: TAction;
369 BrowserTabTabStyleAction: TAction;
370 BrowserTabButtonStyleAction: TAction;
371 BrowserTabFlatStyleAction: TAction;
375 PreviewTimer: TTimer;
376 MonazillaWebPageAction: TAction;
377 MonazillaWebPageAction1: TMenuItem;
378 GikoHelpAction: TAction;
381 KotehanAction: TAction;
383 LinkBarVisibleAction: TAction;
387 ChevronPopupMenu: TPopupMenu;
388 BBS2chWebPageAction: TAction;
391 GikoFolderOpenAction: TAction;
393 LinkToolBar: TToolBar;
395 ToolButton8: TToolButton;
396 ToolButton10: TToolButton;
397 ThreadEditorAction: TAction;
401 LinkBarPopupMenu: TPopupMenu;
402 ToolBarSettingAction: TAction;
404 ToolButton12: TToolButton;
405 ToolButton14: TToolButton;
406 ThreadPopupMenu: TPopupMenu;
407 MenuItem4: TMenuItem;
408 MenuItem5: TMenuItem;
409 MenuItem6: TMenuItem;
411 NameCopyAction: TAction;
412 BoardIEAction: TAction;
414 SelectItemNameCopyAction: TAction;
415 SelectItemNameCopyAction1: TMenuItem;
419 SelectComboBox: TComboBox;
420 MainCoolBarPopupMenu: TPopupMenu;
421 StdToolBarVisiblePMenu: TMenuItem;
422 AddressToolBarVisiblePMenu: TMenuItem;
423 LinkToolBarVisiblePMenu: TMenuItem;
444 SelectItemToolButton: TToolButton;
445 SelectResToolButton: TToolButton;
446 SelectResAction: TAction;
447 ToolButton16: TToolButton;
448 AllResAction: TAction;
449 AllResToolButton: TToolButton;
457 ReloadAction: TAction;
458 GoFowardAction: TAction;
459 GoBackAction: TAction;
460 SelectComboBoxSplitter: TImage;
461 IndividualAbon1: TMenuItem;
463 IndividualAbon2: TMenuItem;
465 CancellIndividualAbon: TAction;
466 AntiIndividualAbon: TMenuItem;
471 SearchBoardName: TMenuItem;
473 TreeSelectSearchBoardName: TAction;
474 CabinetFavoriteAction: TAction;
477 FavoriteTreePopupMenu: TPopupMenu;
478 FavoriteTreeViewRenameAction: TAction;
479 FavoriteTreeRenamePopupMenu: TMenuItem;
480 FavoriteTreeViewNewFolderAction: TAction;
481 FavoriteTreeNewFolderPopupMenu: TMenuItem;
483 FavoriteTreeViewDeleteAction: TAction;
484 FavoriteTreeDeletePopupMenu: TMenuItem;
485 FavoriteToolBar: TToolBar;
486 ToolButton17: TToolButton;
487 ToolButton19: TToolButton;
488 FavoriteTreeViewBrowseFolderAction: TAction;
489 FavoriteTreeBrowseFolderPopupMenu: TMenuItem;
491 FavoriteTreeReloadPopupMenu: TMenuItem;
493 FavoriteTreeURLCopyPopupMenu: TMenuItem;
494 FavoriteTreeNameCopyPopupMenu: TMenuItem;
495 FavoriteTreeLogDeletePopupMenu: TMenuItem;
497 FavoriteTreeNameURLCopyPopupMenu: TMenuItem;
498 FavoriteTreeViewReloadAction: TAction;
499 FavoriteTreeViewURLCopyAction: TAction;
500 FavoriteTreeViewNameCopyAction: TAction;
501 FavoriteTreeViewNameURLCopyAction: TAction;
502 FavoriteTreeViewLogDeleteAction: TAction;
503 OnlyAHundredRes: TAction;
504 ToolButton20: TToolButton;
505 AHundredResButton: TToolButton;
508 ExportFavoriteFileAction1: TMenuItem;
509 ExportFavoriteFile: TFileSaveAs;
510 ToolButton21: TToolButton;
511 ToolButton22: TToolButton;
512 ToolButton23: TToolButton;
513 ToolButton24: TToolButton;
514 procedure FormCreate(Sender: TObject);
515 procedure FormDestroy(Sender: TObject);
516 procedure CabinetPanelHide(Sender: TObject);
517 procedure FormClose(Sender: TObject; var Action: TCloseAction);
518 procedure TreeViewChange(Sender: TObject; Node: TTreeNode);
519 procedure ListViewData(Sender: TObject; Item: TListItem);
520 procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
521 const FindString: String; const FindPosition: TPoint;
522 FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
523 Wrap: Boolean; var Index: Integer);
524 procedure ListViewDataHint(Sender: TObject; StartIndex,
526 procedure ListViewDataStateChange(Sender: TObject; StartIndex,
527 EndIndex: Integer; OldState, NewState: TItemStates);
528 procedure BrowserStatusTextChange(Sender: TObject;
529 const Text: WideString);
530 procedure BrowserTitleChange(Sender: TObject; const Text: WideString);
531 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
532 procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
533 var AllowChange: Boolean);
534 procedure ListViewKeyDown(Sender: TObject; var Key: Word;
536 procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
537 procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
538 Button: TToolButton; State: TCustomDrawState;
539 var DefaultDraw: Boolean);
540 procedure BrowserBeforeNavigate2(Sender: TObject;
541 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
542 Headers: OleVariant; var Cancel: WordBool);
543 procedure ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
544 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
545 var DefaultDraw: Boolean);
546 procedure TreeViewCustomDraw(Sender: TCustomTreeView;
547 const ARect: TRect; var DefaultDraw: Boolean);
548 procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
549 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
550 procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
551 procedure TreeViewDblClick(Sender: TObject);
552 procedure FavoriteTreeViewClick(Sender: TObject);
553 procedure ListViewCustomDraw(Sender: TCustomListView;
554 const ARect: TRect; var DefaultDraw: Boolean);
555 procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
556 Shift: TShiftState; X, Y: Integer);
557 procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
558 procedure MessageListViewResize(Sender: TObject);
559 procedure ExitActionExecute(Sender: TObject);
560 procedure AllSelectActionExecute(Sender: TObject);
561 procedure StdToolBarVisibleActionExecute(Sender: TObject);
562 procedure MsgBarVisibleActionExecute(Sender: TObject);
563 procedure StatusBarVisibleActionExecute(Sender: TObject);
564 procedure LargeIconActionExecute(Sender: TObject);
565 procedure SmallIconActionExecute(Sender: TObject);
566 procedure ListIconActionExecute(Sender: TObject);
567 procedure DetailIconActionExecute(Sender: TObject);
568 procedure SearchActionExecute(Sender: TObject);
569 procedure OptionActionExecute(Sender: TObject);
570 procedure GikoNaviWebPageActionExecute(Sender: TObject);
571 procedure AboutActionExecute(Sender: TObject);
572 procedure CabinetHistoryActionExecute(Sender: TObject);
573 procedure CabinetVisible( isVisible : Boolean );
574 procedure CabinetVisibleActionExecute(Sender: TObject);
575 procedure AllItemActionExecute(Sender: TObject);
576 procedure LogItemActionExecute(Sender: TObject);
577 procedure NewItemActionExecute(Sender: TObject);
578 procedure SelectItemActionExecute(Sender: TObject);
579 procedure ListNumberVisibleActionExecute(Sender: TObject);
580 procedure UpFolderActionExecute(Sender: TObject);
581 procedure IconStyleExecute(Sender: TObject);
582 procedure RoundActionExecute(Sender: TObject);
583 procedure StopActionExecute(Sender: TObject);
584 procedure MsgBarCloseActionExecute(Sender: TObject);
585 procedure BrowserMaxActionExecute(Sender: TObject);
586 procedure ScrollTopActionExecute(Sender: TObject);
587 procedure ScrollLastActionExecute(Sender: TObject);
588 procedure ScrollNewActionExecute(Sender: TObject);
589 procedure ScrollKokoActionExecute(Sender: TObject);
590 procedure EditorActionExecute(Sender: TObject);
591 procedure IEActionExecute(Sender: TObject);
592 procedure ShowThreadActionExecute(Sender: TObject);
593 procedure ShowBoardActionExecute(Sender: TObject);
594 procedure URLCopyActionExecute(Sender: TObject);
595 procedure ItemReloadActionExecute(Sender: TObject);
596 procedure SelectListReloadActionExecute(Sender: TObject);
597 procedure SelectThreadReloadActionExecute(Sender: TObject);
598 procedure SelectListReloadActionUpdate(Sender: TObject);
599 procedure AllItemActionUpdate(Sender: TObject);
600 procedure LogItemActionUpdate(Sender: TObject);
601 procedure NewItemActionUpdate(Sender: TObject);
602 procedure SelectItemActionUpdate(Sender: TObject);
603 procedure UpFolderActionUpdate(Sender: TObject);
604 procedure FormResize(Sender: TObject);
605 procedure ScrollTopActionUpdate(Sender: TObject);
606 procedure ScrollLastActionUpdate(Sender: TObject);
607 procedure ScrollNewActionUpdate(Sender: TObject);
608 procedure ScrollKokoActionUpdate(Sender: TObject);
609 procedure EditorActionUpdate(Sender: TObject);
610 procedure IEActionUpdate(Sender: TObject);
611 procedure ShowThreadActionUpdate(Sender: TObject);
612 procedure ShowBoardActionUpdate(Sender: TObject);
613 procedure SelectThreadReloadActionUpdate(Sender: TObject);
614 procedure ListViewSelectItem(Sender: TObject; Item: TListItem;
616 procedure SelectTimerTimer(Sender: TObject);
617 procedure ItemReloadActionUpdate(Sender: TObject);
618 procedure ListViewDblClick(Sender: TObject);
619 procedure LogDeleteActionExecute(Sender: TObject);
620 procedure KokomadeActionExecute(Sender: TObject);
621 procedure ZenbuActionExecute(Sender: TObject);
622 procedure KokoResActionExecute(Sender: TObject);
623 procedure ListPopupMenuPopup(Sender: TObject);
624 procedure SelectItemURLCopyActionExecute(Sender: TObject);
625 procedure SelectItemURLCopyActionUpdate(Sender: TObject);
626 procedure AllSelectActionUpdate(Sender: TObject);
627 procedure LogDeleteActionUpdate(Sender: TObject);
628 procedure BrowserTabCloseActionExecute(Sender: TObject);
629 procedure NotSelectTabCloseActionExecute(Sender: TObject);
630 procedure TreeSelectBoradReloadExecute(Sender: TObject);
631 procedure TreeSelectThreadReloadExecute(Sender: TObject);
632 procedure TreeSelectURLCopyExecute(Sender: TObject);
633 procedure TreePopupMenuPopup(Sender: TObject);
634 procedure ListToolBarVisibleActionExecute(Sender: TObject);
635 procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
636 procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
637 var Cancel: WordBool);
638 procedure ListSplitterCanResize(Sender: TObject; var NewSize: Integer;
639 var Accept: Boolean);
640 procedure ListSplitterMoved(Sender: TObject);
641 procedure BrowserTabChange(Sender: TObject);
642 procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
643 Shift: TShiftState; X, Y: Integer);
644 procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
645 State: TDragState; var Accept: Boolean);
646 procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
647 procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
649 procedure BrowserDocumentComplete(Sender: TObject;
650 const pDisp: IDispatch; var URL: OleVariant);
651 procedure SelectReservActionUpdate(Sender: TObject);
652 procedure RoundNamePopupMenuPopup(Sender: TObject);
653 procedure SelectNewRoundNameExecute(Sender: TObject);
654 procedure SelectDeleteRoundExecute(Sender: TObject);
655 procedure SelectReservActionExecute(Sender: TObject);
656 procedure NewBoardActionExecute(Sender: TObject);
657 procedure LoginActionExecute(Sender: TObject);
658 procedure KeySettingActionExecute(Sender: TObject);
659 procedure AllTabCloseActionExecute(Sender: TObject);
660 procedure ArrangeActionExecute(Sender: TObject);
661 procedure NameURLCopyActionExecute(Sender: TObject);
662 procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
663 procedure URLCopyActionUpdate(Sender: TObject);
664 procedure NameURLCopyActionUpdate(Sender: TObject);
665 procedure BrowserTabCloseActionUpdate(Sender: TObject);
666 procedure NotSelectTabCloseActionUpdate(Sender: TObject);
667 procedure AllTabCloseActionUpdate(Sender: TObject);
668 procedure SelectItemNameURLCopyActionUpdate(Sender: TObject);
669 procedure ActiveLogDeleteActionExecute(Sender: TObject);
670 procedure ActiveLogDeleteActionUpdate(Sender: TObject);
671 procedure ListNameBarVisibleActionExecute(Sender: TObject);
672 procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
673 procedure TreeSelectNameURLCopyExecute(Sender: TObject);
674 procedure PaneInitActionExecute(Sender: TObject);
675 procedure FormShow(Sender: TObject);
676 procedure BrowserTabToolBarResize(Sender: TObject);
677 procedure BrowserMinActionExecute(Sender: TObject);
678 procedure SelectTextClearActionExecute(Sender: TObject);
679 procedure NameTextClearActionExecute(Sender: TObject);
680 procedure MailTextClearActionExecute(Sender: TObject);
681 procedure LeftmostTabSelectActionExecute(Sender: TObject);
682 procedure LeftTabSelectActionExecute(Sender: TObject);
683 procedure RightTabSelectActionExecute(Sender: TObject);
684 procedure RightmostTabSelectActionExecute(Sender: TObject);
685 procedure LeftmostTabSelectActionUpdate(Sender: TObject);
686 procedure LeftTabSelectActionUpdate(Sender: TObject);
687 procedure RightTabSelectActionUpdate(Sender: TObject);
688 procedure RightmostTabSelectActionUpdate(Sender: TObject);
689 procedure FavoriteMenuClick(Sender: TObject);
690 procedure FavoriteAddActionExecute(Sender: TObject);
691 procedure FavoriteAddActionUpdate(Sender: TObject);
692 procedure BoardFavoriteAddActionExecute(Sender: TObject);
693 procedure BoardFavoriteAddActionUpdate(Sender: TObject);
694 procedure ThreadFavoriteAddActionExecute(Sender: TObject);
695 procedure ThreadFavoriteAddActionUpdate(Sender: TObject);
696 procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
697 procedure FavoriteArrangeActionExecute(Sender: TObject);
698 procedure MainCoolBarResize(Sender: TObject);
699 procedure MoveToActionExecute(Sender: TObject);
700 procedure AddressToolBarResize(Sender: TObject);
701 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
703 procedure AddressBarVisibleActionExecute(Sender: TObject);
704 procedure BrowserEnter(Sender: TObject);
705 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
706 procedure BrowserTabVisibleActionExecute(Sender: TObject);
707 procedure BrowserTabTopActionExecute(Sender: TObject);
708 procedure BrowserTabBottomActionExecute(Sender: TObject);
709 procedure BrowserTabTabStyleActionExecute(Sender: TObject);
710 procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
711 procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
712 procedure PreviewTimerTimer(Sender: TObject);
713 procedure MessageHideButtonClick(Sender: TObject);
714 procedure MonazillaWebPageActionExecute(Sender: TObject);
715 procedure GikoHelpActionExecute(Sender: TObject);
716 procedure ToolButton18Click(Sender: TObject);
717 procedure KotehanActionExecute(Sender: TObject);
718 procedure LinkBarVisibleActionExecute(Sender: TObject);
719 procedure BBS2chWebPageActionExecute(Sender: TObject);
720 procedure GikoFolderOpenActionExecute(Sender: TObject);
721 procedure MainCoolBarBandInfo(Sender: TObject;
722 var BandInfo: PReBarBandInfoA);
723 procedure MainCoolBarChevronClick(Sender: TObject;
724 RebarChevron: PNMRebarChevron);
725 procedure ListCoolBarBandInfo(Sender: TObject;
726 var BandInfo: PReBarBandInfoA);
727 procedure ListCoolBarChevronClick(Sender: TObject;
728 RebarChevron: PNMRebarChevron);
729 procedure BrowserCoolBarBandInfo(Sender: TObject;
730 var BandInfo: PReBarBandInfoA);
731 procedure BrowserCoolBarChevronClick(Sender: TObject;
732 RebarChevron: PNMRebarChevron);
733 procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
734 procedure ThreadEditorActionExecute(Sender: TObject);
735 procedure ThreadEditorActionUpdate(Sender: TObject);
736 procedure ToolBarSettingActionExecute(Sender: TObject);
737 procedure NameCopyActionExecute(Sender: TObject);
738 procedure BoardIEActionExecute(Sender: TObject);
739 procedure SelectItemNameCopyActionExecute(Sender: TObject);
740 procedure SelectItemNameCopyActionUpdate(Sender: TObject);
741 procedure BoardIEActionUpdate(Sender: TObject);
742 procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
743 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
744 procedure NameCopyActionUpdate(Sender: TObject);
745 procedure SelectComboBoxChange(Sender: TObject);
746 procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
748 procedure SelectComboBoxExit(Sender: TObject);
749 procedure NG1Click(Sender: TObject);
750 procedure SelectResActionExecute(Sender: TObject);
751 procedure SelectResActionUpdate(Sender: TObject);
752 procedure FormKeyDown(Sender: TObject; var Key: Word;
754 procedure FormKeyUp(Sender: TObject; var Key: Word;
756 procedure AllResActionExecute(Sender: TObject);
757 procedure AllResActionUpdate(Sender: TObject);
758 procedure ReloadClick(Sender: TObject);
759 procedure GoBackClick(Sender: TObject);
760 procedure GoFowardClick(Sender: TObject);
761 procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
762 Shift: TShiftState; X, Y: Integer);
763 procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
764 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
765 procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
766 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
767 procedure StatusBarResize(Sender: TObject);
768 procedure IndividualAbon1Click(Sender: TObject);
769 procedure IndividualAbon2Click(Sender: TObject);
770 procedure N42Click(Sender: TObject);
771 procedure SelectComboBoxEnter(Sender: TObject);
772 procedure AntiIndividualAbonClick(Sender: TObject);
773 procedure N51Click(Sender: TObject);
774 procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
775 procedure CabinetFavoriteActionExecute(Sender: TObject);
776 procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
778 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
779 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
781 procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
783 procedure FavoriteTreePopupMenuPopup(Sender: TObject);
784 procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
785 procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
786 procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
787 procedure ToolButton19Click(Sender: TObject);
788 procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject);
789 procedure FavoriteTreeViewChange(Sender: TObject; Node: TTreeNode);
790 procedure FavoriteTreeViewDblClick(Sender: TObject);
791 procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject);
792 procedure FavoriteTreeViewReloadActionExecute(Sender: TObject);
793 procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
794 procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
795 procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject);
796 procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
797 procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
798 Shift: TShiftState; X, Y: Integer);
799 procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
800 State: TDragState; var Accept: Boolean);
801 procedure OnlyAHundredResExecute(Sender: TObject);
802 procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
804 procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
805 var Handled: Boolean);
806 procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
807 var Handled: Boolean);
808 procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
809 var Handled: Boolean);
810 procedure ExportFavoriteFileAccept(Sender: TObject);
811 procedure ExportFavoriteFileBeforeExecute(Sender: TObject);
812 procedure CabinetBBSActionExecute(Sender: TObject);
819 FEnabledCloseButton: Boolean;
820 // ThreadCreate: TThreadCreate;
822 FClickNode: TTreeNode;
825 FPreviewBrowser: TPreviewBrowser;
828 FBrowserSizeHeight: Integer;
829 FBrowserSizeWidth: Integer;
831 // FFavorite: TFavorite;
832 FBrowserComplete: Boolean;
833 FTabHintIndex: Integer;
834 FListStyle: TViewStyle; //
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93\83X
\83^
\83C
\83\8b
835 FItemNoVisible: Boolean; //
\83\8a\83X
\83g
\94Ô
\8d\86\95\
\8e¦
\83t
\83\89\83O
836 FViewType: TGikoViewType; //
\83\8a\83X
\83g
\83A
\83C
\83e
\83\80\95\
\8e¦
\83^
\83C
\83v
837 FActiveList: TObject;
838 FActiveContent: TThreadItem; //
840 FHistoryList: TList; //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
841 FTreeType: TGikoTreeType;
845 // FLastRoundTime: TDateTime;
846 BrowserNullTab: TThreadItem;
847 // DoubleClickOccurred: array [TMouseButton] of Boolean;
848 FDownloadTitle: string; //
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86\82Ì
\83^
\83C
\83g
\83\8b\96¼
849 FDownloadMax: Integer; //
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86\82Ì
\8dÅ
\91å
\83T
\83C
\83Y
850 FEvent: THTMLDocumentEventSink;//
\83u
\83\89\83E
\83U
\83h
\83L
\83\85\83\81\83\93\83g
\83C
\83x
\83\93\83g
852 Fkeynum : Integer; //
\83L
\81[
\83{
\81[
\83h
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\97p
854 IsDraggingSelectComboBox : Boolean;
855 DraggingSelectComboBoxPosition : TPoint;
857 FSearchDialog: TSearchDialog;
859 FDropSpaceNode: TTreeNode;
861 FDragTime : Cardinal; //
\83\8a\83\93\83N
\82ÌD&D
\97p
862 FDragButton : TToolButton; //
\83\8a\83\93\83N
\82ÌD&D
\97p
\82ÉDrag
\82µ
\82Ä
\82éButton
\95Û
\91¶
863 FDragWFirst : Boolean; //WebTab
\82ÌD&D
\97p
865 FListViewBackGroundColor : TColor; //ListView
\82ÌBackGroundColor
866 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¦
867 FOddColor : TColor; //
\82»
\82Ì
\90F
868 procedure SetBoardTreeNode( inBBS : TBBS );
869 function SetCategoryListItem(ABBS2ch: TBBS): Integer;
870 function SetBoardListItem(Category: TCategory): Integer;
871 function SetThreadListItem(Board: TBoard): Integer;
872 // function GetRoundName(index: integer): string;
874 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
875 procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
876 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer);
877 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
878 procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
880 procedure SetActiveList(Obj: TObject);
882 procedure ListDoubleClick;
883 procedure BrowserMovement(AName: string);
884 procedure SelectListItem(List: TList);
885 // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
886 procedure DeleteTab(ThreadItem: TThreadItem);
887 function Hook(var Message: TMessage): Boolean;
888 procedure AddRoundNameMenu(MenuItem: TMenuItem);
889 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
890 procedure SetSelectRoundName(Sender: TObject);
891 function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
893 procedure SetMenuFont;
894 // procedure CreateFavMenu(Folder: TFavoriteFolder);
895 procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
896 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
897 procedure FavoriteClick(Sender: TObject); overload;
898 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
899 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
900 function OnDocumentContextMenu(Sender: TObject): WordBool;
901 // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
902 procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
903 procedure ShowTextPopup;
904 //procedure ShowTextPopup(HintData: THintData);
905 // procedure SetStdToolBar;
906 // function GetAction(ActionName: string): TContainedAction;
907 procedure SetLinkBar;
908 function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
909 procedure MenuBarChevronMenu;
910 procedure LinkBarChevronMenu;
911 procedure ToolBarChevronMenu(ToolBar: TToolBar);
912 procedure ModifySelectList;
913 procedure FavoriteBrowseFolder( node: TTreeNode );
914 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
915 procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
916 procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
917 procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
918 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
919 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
920 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
921 procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
922 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
924 procedure BrowserTabClick(Sender: TObject);
925 procedure SetListViewBackGroundColor(value: TColor);
926 procedure BBSMenuItemOnClick( Sender : TObject );
928 procedure CreateParams(var Params: TCreateParams); override;
929 procedure WndProc(var Message: TMessage); override;
930 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
931 procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
932 procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
935 // FDownload: TDownload;
936 FControlThread: TThreadControl;
937 procedure MoveToURL(URL: string);
938 procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
940 function GetHttpState: Boolean;
941 procedure SetEnabledCloseButton(Enabled: Boolean);
942 function GetTreeNode(Data: TObject): TTreeNode;
943 procedure AppFormDeactivate(Sender: TObject);
944 // procedure CabinetPanelVisible(PanelVisible: Boolean);
945 procedure ListViewAllSelect;
947 property ListStyle: TViewStyle read FListStyle write FListStyle;
948 property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
949 property ViewType: TGikoViewType read FViewType write FViewType;
951 property NameCookie: string read FNameCookie write FNameCookie;
952 property MailCookie: string read FMailCookie write FMailCookie;
954 procedure SetContent(ThreadItem: TThreadItem);
955 function GetActiveContent: TThreadItem;
956 function GetActiveList: TObject;
958 property ActiveList: TObject read GetActiveList write SetActiveList;
959 // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
961 procedure SetListViewType(AViewType: TGikoViewType); overload;
962 procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
963 procedure DownloadContent(ThreadItem: TThreadItem);
964 procedure DownloadList(Board: TBoard);
965 procedure PlaySound(SoundEventName: string);
967 function AddHistory( FavItem: TFavoriteThreadItem ): Boolean;
968 procedure DeleteHistory( threadItem: TThreadItem );
969 procedure ClearHistory;
970 procedure SaveHistory;
971 procedure LoadHistory;
972 procedure ShowBBSTree( inBBS : TBBS );
973 procedure ShowHistoryTree;
974 procedure SetHistoryTreeNode;
975 // procedure SelectTreeNode(Item: TObject);
976 procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
977 procedure SetBrowserTabState;
978 // property Favorite: TFavorite read FFavorite write FFavorite;
979 procedure SetToolBarPopup;
980 procedure ShowFavoriteAddDialog( Item : TObject );
981 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
982 property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
983 property OddColor : TColor read FOddColor write FOddColor;
986 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
989 TFavoriteMenuItem = class(TMenuItem)
993 property Data: Pointer read FData write FData;
996 TBBSMenuItem = class(TMenuItem)
1000 property Data: Pointer read FData write FData;
1003 TLinkToolButton = class(TToolButton)
1007 property Data: Pointer read FData write FData;
1011 GikoForm: TGikoForm;
1016 About, Option, Round, Splash, Sort, ListSelect,
1020 CAPTION_NAME: string = '
\83M
\83R
\83i
\83r';
1021 BLANK_HTML: string = 'about:blank';
1022 SELECTCOMBOBOX_NAME: string = ''; // '
\83X
\83\8c\83b
\83h
\8di
\8d\9e\8c\9f\8dõ';
1023 SELECTCOMBOBOX_COLOR: TColor = clWindow;
1025 DandD_THRESHOLD = 5; //D&D
\82Ìè
\87\92l
\81ipixcel)
1026 //
\83c
\83\8a\81[
\81E
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93
1027 ITEM_ICON_2CH1 = 0; //2ch
\83A
\83C
\83R
\83\93
1028 ITEM_ICON_2CH2 = 1; //2ch
\83A
\83C
\83R
\83\93
1029 ITEM_ICON_CATEGORY1 = 2; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1030 ITEM_ICON_CATEGORY2 = 3; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1031 ITEM_ICON_BOARD_NOSUBJECT = 3; //
\93Ç
\82Ý
\8d\9e\82Ü
\82ê
\82Ä
\82¢
\82È
\82¢
\94Â
\83A
\83C
\83R
\83\93
1032 ITEM_ICON_BOARD1 = 4; //
\94Â
\83A
\83C
\83R
\83\93
1033 ITEM_ICON_BOARD2 = 5; //
\94Â
\83A
\83C
\83R
\83\93
1034 ITEM_ICON_THREADLOG1 = 6; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1035 ITEM_ICON_THREADLOG2 = 7; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1036 ITEM_ICON_THREAD1 = 8; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1037 ITEM_ICON_THREAD2 = 9; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1038 ITEM_ICON_THREADNEW1 = 10; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1039 ITEM_ICON_THREADNEW2 = 11; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1040 ITEM_ICON_SORT1 = 12; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1041 ITEM_ICON_SORT2 = 13; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1042 ITEM_ICON_BOARD_LOG = 17; //
\83X
\83\8c\83\8d\83O
\82 \82è
\94Â
\83A
\83C
\83R
\83\93
1043 ITEM_ICON_BOARD_NEW = 18; //
\83X
\83\8c\90V
\92\85\94Â
\83A
\83C
\83R
\83\93
1045 //
\83c
\81[
\83\8b\83o
\81[
\83A
\83C
\83R
\83\93
1046 TOOL_ICON_HEIGHT_MAX = 16; //
\8d\82\82³
\8dÅ
\91å
\83A
\83C
\83R
\83\93
1047 TOOL_ICON_HEIGHT_MIN = 17; //
\8d\82\82³
\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1048 TOOL_ICON_HEIGHT_NORMAL = 18; //
\8d\82\82³
\95W
\8f\80\83A
\83C
\83R
\83\93
1049 TOOL_ICON_WIDTH_MAX = 19; //
\95\9d\8dÅ
\91å
\83A
\83C
\83R
\83\93
1050 TOOL_ICON_WIDTH_MIN = 20; //
\95\9d\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1051 TOOL_ICON_WIDTH_NORMAL = 21; //
\95\9d\95W
\8f\80\83A
\83C
\83R
\83\93
1053 TOOL_ICON_FAV_FOLDER = 30; //
\82¨
\8bC
\82É
\93ü
\82è
\83t
\83H
\83\8b\83_
\83A
\83C
\83R
\83\93
1054 TOOL_ICON_FAV_BOARD = 31; //
\82¨
\8bC
\82É
\93ü
\82è
\94Â
\83A
\83C
\83R
\83\93
1055 TOOL_ICON_FAV_THREAD = 32; //
\82¨
\8bC
\82É
\93ü
\82è
\83X
\83\8c\83A
\83C
\83R
\83\93
1057 HTML_FILE_NAME = 'temp_preview.html';
1061 procedure TGikoForm.CreateParams(var Params: TCreateParams);
1064 if FormStyle in [fsNormal, fsStayOnTop] then begin
1065 if BorderStyle in [bsSingle, bsSizeable] then begin
1066 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1067 Params.WndParent := 0;
1072 procedure TGikoForm.FormCreate(Sender: TObject);
1074 TVS_NOTOOLTIPS = $0080;
1080 wp: TWindowPlacement;
1082 item : TBBSMenuItem;
1086 Writeln('============================================================');
1087 Writeln('
\83M
\83R
\83i
\83r
\83f
\83o
\83b
\83O
\83R
\83\93\83\
\81[
\83\8b');
1089 Writeln('
\82±
\82Ì
\89æ
\96Ê
\82ð
\95Â
\82¶
\82È
\82¢
\82Å
\82
\82¾
\82³
\82¢
\81B');
1090 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¢');
1091 Writeln('============================================================');
1093 Application.OnDeactivate := AppFormDeactivate;
1094 Self.OnDeactivate := AppFormDeactivate;
1095 Application.HookMainWindow(Hook);
1097 FTreeType := gttNone;
1099 FSearchDialog := nil;
1101 //
\8eè
\82Ì
\83J
\81[
\83\
\83\8b
1102 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1104 //
\8f\84\89ñ
\83f
\81[
\83^
\93Ç
\82Ý
\8d\9e\82Ý
1105 RoundList := TRoundList.Create;
1106 RoundList.LoadRoundFile;
1108 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1109 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1111 //
\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Æ)
1112 InitializeBoardPlugIns;
1114 EnabledCloseButton := True;
1115 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\93Ç
\8d\9e(ReadFavorite
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1116 GikoSys.ReadBoardFile;
1117 // SetBoardTreeNode; //
\83c
\83\8a\81[
\82É
\83{
\81[
\83h
\92Ç
\89Á
1118 //
\83\81\83j
\83\85\81[
\82É
\92Ç
\89Á
1119 for i := Length( BBSs ) - 1 downto 0 do begin
1121 item := TBBSMenuItem.Create( PopupMenu );
1122 item.Caption := BBSs[ i ].Title;
1123 item.Data := BBSs[ i ];
1124 item.OnClick := BBSMenuItemOnClick;
1125 CabinetSelectPopupMenu.Items.Insert( 0, item );
1126 item := TBBSMenuItem.Create( PopupMenu );
1127 item.Caption := BBSs[ i ].Title;
1128 item.Data := BBSs[ i ];
1129 item.OnClick := BBSMenuItemOnClick;
1130 CabinetMenu.Insert( 0, item );
1135 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g(LoadHistory
\82æ
\82è
\82à
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1136 FHistoryList := TList.Create;
1138 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1141 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
1142 // FFavorite := TFavorite.Create(FavoriteTreeView);
1143 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1144 FavoriteDM.ReadFavorite;
1146 //
\83\8a\83X
\83g
\83X
\83^
\83C
\83\8b
1147 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1149 //
\83\81\83C
\83\93\83N
\81[
\83\8b\83o
\81[
\88Ê
\92u
1150 // MainCoolBar.Top := 0;
1151 // MainCoolBar.Left := 0;
1153 //
\83A
\83j
\83\81\83p
\83l
\83\8b\88Ê
\92u
1154 AnimePanel.Top := 0;
1155 AnimePanel.Left := 0;
1157 //
\8ae
\8eí
\89Â
\8e\8b\8fó
\91Ô
\82È
\82Ç
\90Ý
\92è
1159 //
\83L
\83\83\83r
\83l
\83b
\83g
1160 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1162 //
\83\81\83b
\83Z
\81[
\83W
\83o
\81[
1163 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1164 MsgBarVisibleActionExecute(nil);
1165 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1167 //
\83X
\83e
\81[
\83^
\83X
\83o
\81[
1168 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1169 StatusBarVisibleActionExecute(nil);
1171 //
\83t
\83H
\83\93\83g
\81E
\90F
\90Ý
\92è
1172 TreeView.Items.BeginUpdate;
1173 FavoriteTreeView.Items.BeginUpdate;
1174 ListView.Items.BeginUpdate;
1176 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1177 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1178 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1179 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1181 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1182 FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1183 FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1184 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1186 ListView.Font.Name := GikoSys.Setting.ListFontName;
1187 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1188 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1189 //ListView.Color := GikoSys.Setting.ListBackColor;
1190 ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1191 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1192 FOddColor := GikoSys.Setting.OddColor;
1195 TreeView.Items.EndUpdate;
1196 FavoriteTreeView.Items.EndUpdate;
1197 ListView.Items.EndUpdate;
1199 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1200 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1202 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
1203 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1204 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1205 FDragWFirst := false;
1207 // TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
1208 // TreeView.Selected := TreeView.Items[0]; //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
1209 SetContent(nil); //
\83u
\83\89\83E
\83U
\82ð
\8bó
\94\92\95\
\8e¦
1211 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95\9c\8c³
1212 wp.length := sizeof(wp);
1213 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1214 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1215 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1216 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1217 wp.showCmd := SW_HIDE;
1218 SetWindowPlacement(Handle, @wp);
1220 // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1221 // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1222 if GikoSys.Setting.WindowMax then
1223 WindowState := wsMaximized;
1225 //
\83M
\83R
\83A
\83j
\83\81
1227 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1228 if FileExists(FileName) then
1229 Animate.FileName := FileName;
1232 // AnimePanel.Height := 26;
1233 // AnimePanel.Width := 39;
1234 // AnimePanel.Top := 2;
1235 // AnimePanel.Left := Width - 48;
1241 //
\83X
\83\8c\91S
\95\94\95\
\8e¦
\83{
\83^
\83\93\82ð
\89\9f\82³
\82ê
\82½
\8fó
\91Ô
\82É
\82·
\82é
1242 AllItemAction.Checked := True;
1243 AllResAction.Checked := True;
1245 //TreeView
\82Ì
\8e×
\96\82\8fL
\82¢ToolTip
\82ð
\94ñ
\95\
\8e¦
1246 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1247 Style := Style or TVS_NOTOOLTIPS;
1248 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1250 //
\83c
\83\8a\81[
\82ð
\83\81\83C
\83\93\82¾
\82¯
\95\
\8e¦
\82É
\82µ
\82Ä
\8dÅ
\91å
\89»
1251 TreeView.Align := alClient;
1252 FavoriteTreeView.Align := alClient;
1253 FavoriteTreeView.Visible := False;
1255 //
\83u
\83\89\83E
\83U
\83T
\83C
\83Y
\95Ï
\8dX
\82Ì
\8f\89\8aú
\89»
1256 // FBrowserSizeFlag := False;
1257 // FBrowserSizeHeight := ViewPanel.Height;
1259 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1260 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1262 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1263 ArrangeAction.Execute;
1265 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1266 case GikoSys.Setting.ListWidthState of
1268 ViewPanel.Width := 1;
1269 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1270 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1273 ViewPanel.Width := GikoSys.Setting.ListWidth;
1274 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1275 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1278 ViewPanel.Width := GikoSys.Setting.ListWidth;
1279 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1280 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1283 // if GikoSys.Setting.ListWidthMax then begin
1284 // ViewPanel.Width := 1;
1285 // BrowserSizeAction.ImageIndex := ICON_WIDTH_MIN;
1287 // ViewPanel.Width := GikoSys.Setting.ListWidth;
1288 // BrowserSizeAction.ImageIndex := ICON_WIDTH_MAX;
1291 case GikoSys.Setting.ListHeightState of
1293 ViewPanel.Height := 1;
1294 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1295 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1298 ViewPanel.Height := GikoSys.Setting.ListHeight;
1299 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1300 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1303 ViewPanel.Height := GikoSys.Setting.ListHeight;
1304 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1305 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1308 // if GikoSys.Setting.ListHeightState = glsMax then begin
1310 // ViewPanel.Height := GikoSys.Setting.ListHeight;
1311 // BrowserSizeAction.ImageIndex := ICON_HEIGHT_MAX;
1315 //
\83v
\83\8d\83O
\83\8c\83X
\83o
\81[
\82Ì
\8f\89\8aú
\89»
1316 // ProgressBar.Visible := False;
1317 ProgressBar.Parent := StatusBar;
1318 ProgressBar.Top := 2;
1319 ProgressBar.Left := 0;
1320 ProgressBar.Width := StatusBar.Panels[0].Width;
1321 ProgressBar.Height := StatusBar.Height - 2;
1322 ProgressBar.Position := 0;
1324 //
\83c
\81[
\83\8b\83o
\81[
\95\
\8e¦
1325 //formshow()
\82É
\88Ú
\93®
1327 //
\83_
\83E
\83\93\83\8d\81[
\83h
\83I
\83u
\83W
\83F
\83N
\83g
1328 // FDownload := TDownload.Create;
1329 // FDownload.OnDownloadEnd := OnDonloadEnd;
1330 // FDownload.OnWork := Work;
1331 // FDownload.OnWorkBegin := WorkBegin;
1332 // FDownload.OnWorkEnd := WorkEnd;
1334 //
\83_
\83E
\83\93\83\8d\81[
\83h
\83I
\83u
\83W
\83F
\83N
\83g
1335 FControlThread := TThreadControl.Create(True);
1336 FControlThread.MaxThreadCount := 1;
1337 FControlThread.Resume;
1338 FControlThread.OnDownloadEnd := DownloadEnd;
1339 FControlThread.OnDownloadMsg := DownloadMsg;
1340 FControlThread.OnWork := Work;
1341 FControlThread.OnWorkBegin := WorkBegin;
1342 FControlThread.OnWorkEnd := WorkEnd;
1343 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1345 //
\8di
\8d\9e\8c\9f\8dõ
\97\9a\97ð
1346 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1348 //
\83u
\83\89\83E
\83U
\83^
\83u
\90Ý
\92è
1351 BrowserBoardNameLabel.Caption := '';
1352 BrowserNameLabel.Caption := '';
1355 // DetailIconAction.Execute;
1357 // FBrowserSizeHeight := ViewPanel.Height;
1358 FTabHintIndex := -1;
1360 //
\83\8d\83O
\83t
\83H
\83\8b\83_
\82ª
\91¶
\8dÝ
\82µ
\82È
\82¢
\8fê
\8d\87\82Í
\8dì
\90¬
\82·
\82é
1361 // if not GikoSys.DirectoryExistsEx(BBS2ch.GetLogFolder) then begin
1362 // GikoSys.ForceDirectoriesEx(BBS2ch.GetLogFolder);
1364 // FormResize(Sender);
1365 // MainCoolBarResize(Sender);
1366 // Application.ProcessMessages;
1368 //
\83\8a\83\93\83N
\83o
\81[
1371 //
\83\81\83j
\83\85\81[
\83t
\83H
\83\93\83g
1374 //
\83c
\81[
\83\8b\83o
\81[Wrapable
1375 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1376 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1378 //
\83c
\81[
\83\8b\83{
\83^
\83\93\93Ç
\82Ý
\8d\9e\82Ý
1379 ReadToolBarSetting(ActionList, StdToolBar);
1380 ReadToolBarSetting(ActionList, ListToolBar);
1382 for i := ListToolBar.ControlCount - 1 downto 0 do
1384 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1386 //
\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·
1387 if (i + 1) < ListToolBar.ControlCount then
1388 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1389 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1390 ListToolBar.Controls[ i + 1 ].Visible := False;
1392 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
1393 ListToolBar.Controls[ i ].Visible := False;
1394 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
1395 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1396 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1397 SelectComboBox.Parent := ListToolBar;
1398 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
1399 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1400 SelectComboBoxSplitter.Parent := ListToolBar;
1407 ReadToolBarSetting(ActionList, BrowserToolBar);
1409 OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes;
1410 //
\83A
\83h
\83\8c\83X
\83o
\81[
1411 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1413 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³
\82ÍFormShow
\82É
\88Ú
\93®
\82µ
\82½
1415 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\82ª
\96³
\82¢
\8fê
\8d\87\82Í
\83\81\83b
\83Z
\81[
\83W
\95\
\8e¦
1416 if not FileExists(GikoSys.GetBoardFileName) then begin
1417 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
1418 + '
\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
1419 + '
\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';
1420 MsgBox(SplashWindow.Handle, msg, '
\83M
\83R
\83i
\83r', MB_OK or MB_ICONINFORMATION);
1421 NewBoardAction.Execute;
1424 //
\83L
\81[
\90Ý
\92è
\93Ç
\82Ý
\8d\9e\82Ý
1425 GikoSys.LoadKeySetting(ActionList);
1427 //
\8dÅ
\8fI
\8f\84\89ñ
\8e\9e\8aÔ
1428 // FLastRoundTime := 0;
1431 FHint := TResPopup.Create(Self);
1433 //
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\83L
\83\83\83r
\83l
\83b
\83g
\82Ì
\8fó
\91Ô
\95\9c\8c³(
\96¢
\8eÀ
\91\95)
1434 //
\82¨
\82æ
\82Ñ
\83X
\83\8c\88ê
\97\97\83y
\83C
\83\93\82Ì
\8fó
\91Ô
\95\9c\8c³(
\96¢
\8eÀ
\91\95\81A
\8c»
\8dÝ
\82Í
\8f\89\8aú
\95\
\8e¦
\97p)
1435 //i := GikoSys.Setting.CabinetIndex;
1436 //ShowBBSTree( BBSs[ 0 ] );
1437 //GikoSys.Setting.CabinetIndex := i;
1439 //
\8dÅ
\8cã
\82É
\91I
\91ð
\82³
\82ê
\82½
\83L
\83\83\83r
\83l
\83b
\83g
\82Ì
\95\9c\8c³
1440 CabinetVisible( False );
1441 if GikoSys.Setting.CabinetVisible then begin
1442 Case GikoSys.Setting.CabinetIndex of
1443 0: CabinetBBSAction.Execute;
1444 1: CabinetHistoryAction.Execute;
1445 2: CabinetFavoriteAction.Execute;
1449 //
\83I
\81[
\83g
\83\8d\83O
\83C
\83\93
1450 if GikoSys.Setting.AutoLogin then
1451 LoginAction.Execute;
1453 //
\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
1454 for i := 1 to ParamCount do begin
1455 MoveToURL(ParamStr(i));
1460 s := GikoSys.FAbon.NGwordname;
1461 StatusBar.Panels[2].Text := s;
1462 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1463 StatusBarResize(Sender);
1469 procedure TGikoForm.FormShow(Sender: TObject);
1474 ShowWindow(Application.Handle, SW_HIDE);
1476 //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½
1477 //
\83c
\81[
\83\8b\83o
\81[
\95\
\8e¦
1478 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1479 StdToolBarVisibleActionExecute( nil );
1480 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1481 AddressBarVisibleActionExecute( nil );
1482 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1483 LinkBarVisibleActionExecute( nil );
1484 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1485 ListToolBarVisibleActionExecute( nil );
1486 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1487 ListNameBarVisibleActionExecute( nil );
1488 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1489 BrowserToolBarVisibleActionExecute( nil );
1490 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1491 BrowserNameBarVisibleActionExecute( nil );
1493 //
\83u
\83\89\83E
\83U
\83^
\83u
1494 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1495 BrowserTabVisibleActionExecute(nil);
1497 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1498 BrowserTabTopAction.Checked := True;
1499 BrowserTabTopActionExecute(nil);
1501 BrowserTabBottomAction.Checked := True;
1502 BrowserTabBottomActionExecute(nil);
1505 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1506 BrowserTabTabStyleAction.Checked := True;
1507 BrowserTabTabStyleActionExecute(nil);
1508 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1509 BrowserTabButtonStyleAction.Checked := True;
1510 BrowserTabButtonStyleActionExecute(nil);
1512 BrowserTabFlatStyleAction.Checked := True;
1513 BrowserTabFlatStyleActionExecute(nil);
1517 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Main)
1518 MainCoolBar.Bands.BeginUpdate;
1520 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1521 CoolSet := GikoSys.Setting.MainCoolSet[i];
1522 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1524 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1525 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1526 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1529 MainCoolBar.Bands.EndUpdate;
1532 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Board)
1533 ListCoolBar.Bands.BeginUpdate;
1535 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1536 CoolSet := GikoSys.Setting.ListCoolSet[i];
1537 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1539 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1540 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1541 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1544 ListCoolBar.Bands.EndUpdate;
1547 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Browser)
1548 BrowserCoolBar.Bands.BeginUpdate;
1550 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1551 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1552 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1554 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1555 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1556 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1559 BrowserCoolBar.Bands.EndUpdate;
1564 procedure TGikoForm.SetStdToolBar;
1570 Action: TContainedAction;
1571 ToolButton: TToolButton;
1574 for i := StdToolBar.ButtonCount - 1 downto 0 do begin
1575 StdToolBar.RemoveControl(StdToolBar.Buttons[i]);
1576 //StdToolBar.Buttons[i].Free;
1578 FileName := GikoSys.GetConfigDir + 'ToolBar.ini';
1579 ini := TMemIniFile.Create(FileName);
1582 s := ini.ReadString('StdToolBar', IntToStr(i), '');
1585 if s = '-' then begin
1586 ToolButton := TToolButton.Create(StdToolBar);
1587 ToolButton.Style := tbsSeparator;
1588 ToolButton.Width := 8;
1589 ToolButton.Left := 10000;
1590 StdToolBar.InsertControl(ToolButton);
1592 Action := GetAction(s);
1593 if Action <> nil then begin
1594 ToolButton := TToolButton.Create(StdToolBar);
1595 ToolButton.Action := Action;
1596 ToolButton.Left := 10000;
1597 StdToolBar.InsertControl(ToolButton);
1604 {function TGikoForm.GetAction(ActionName: string): TContainedAction;
1608 for i := 0 to ActionList.ActionCount - 1 do begin
1609 if ActionList.Actions[i].Name = ActionName then begin
1610 Result := ActionList.Actions[i];
1617 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1621 wp: TWindowPlacement;
1623 if ( GikoSys.Setting.ShowDialogForEnd ) and
1624 (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
1630 Application.OnDeactivate := nil;
1631 Self.OnDeactivate := nil;
1634 if GetActiveList is TBBS then begin
1635 for i := 0 to ListView.Columns.Count - 1 do
1636 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1637 end else if GetActiveList is TCategory then begin
1638 for i := 0 to ListView.Columns.Count - 1 do
1639 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1640 end else if GetActiveList is TBoard then begin
1641 for i := 0 to ListView.Columns.Count - 1 do
1642 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1645 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95Û
\91¶
1646 wp.length := sizeof(wp);
1647 GetWindowPlacement(Handle, @wp);
1648 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1649 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1650 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1651 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1652 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1654 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1655 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1656 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1657 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1658 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1659 if ArrangeAction.Checked then
1660 GikoSys.Setting.ListOrientation := gloVertical
1662 GikoSys.Setting.ListOrientation := gloHorizontal;
1663 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1665 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Main)
1666 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1667 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1668 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1669 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1670 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1672 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Board)
1673 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1674 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1675 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1676 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1677 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1679 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Browser)
1680 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1681 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1682 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1683 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1684 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1687 GikoSys.Setting.WriteWindowSettingFile;
1688 GikoSys.Setting.WriteNameMailSettingFile;
1690 //
\82¨
\8bC
\82É
\93ü
\82è
\95Û
\91¶
1692 FavoriteDM.WriteFavorite;
1698 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1699 NotSelectTabCloseAction.Execute;
1700 if BrowserTab.Tabs.Count >= 1 then begin
1701 DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1706 //
\8f\84\89ñ
\83\8a\83X
\83g
\95Û
\91¶&
\94j
\8aü
1708 RoundList.SaveRoundFile;
1721 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
\95Û
\91¶
1727 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
1733 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\95Û
\91¶
1735 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1740 FControlThread.Terminate;
1750 //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
1753 TreeView.Items.Clear;
1758 if FavoriteDM <> nil then
1761 if AddressHistoryDM <> nil then
1762 AddressHistoryDM.Free;
1763 AddressHistoryDM := nil;
1768 for i := 0 to Length( BoardPlugIns ) - 1 do begin
1769 if BoardPlugIns[ i ] <> nil then
1770 BoardPlugIns[ i ].Free;
1771 BoardPlugIns[ i ] := nil;
1777 for i := 0 to Length( BBSs ) - 1 do begin
1778 if BBSs[ i ] <> nil then
1786 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1787 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1788 //CabinetSelectPopupMenu.Items[ i ].Free;
1789 CabinetSelectPopupMenu.Items.Delete( i );
1790 CabinetMenu.Delete( i );
1798 if FHint <> nil then begin
1799 FHint.ReleaseHandle;
1804 if TPreviewBrowser <> nil then begin
1805 FPreviewBrowser.Free;
1806 FPreviewBrowser := nil;
1812 procedure TGikoForm.FormDestroy(Sender: TObject);
1814 // wp: TWindowPlacement;
1816 { //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
1819 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95Û
\91¶
1820 wp.length := sizeof(wp);
1821 GetWindowPlacement(Handle, @wp);
1823 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1824 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1825 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1826 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1827 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1829 GikoSys.Setting.CabinetVisible := CabinetPanel.Visible;
1830 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1832 GikoSys.Setting.WriteWindowSettingFile;
1833 GikoSys.Setting.WriteNameMailSettingFile;
1838 //
\83t
\83H
\81[
\83\80\83N
\83\8d\81[
\83Y
1839 procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1841 Application.Terminate;
1845 //
\83L
\83\83\83r
\83l
\83b
\83g
\81~
\83{
\83^
\83\93\83N
\83\8a\83b
\83N
1846 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1848 CabinetVisibleAction.Execute;
1849 // CabinetPanelVisible(false);
1852 procedure TGikoForm.ReloadBBS;
1855 item : TBBSMenuItem;
1857 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1858 NotSelectTabCloseAction.Execute;
1859 if BrowserTab.Tabs.Count >= 1 then
1860 DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1861 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
1862 //FHistoryList.Clear;
1863 //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
1864 TreeView.Items.Clear;
1867 for i := 0 to Length( BBSs ) - 1 do begin
1868 if BBSs[ i ] <> nil then
1875 FTreeType := gttNone;
1877 GikoSys.ReadBoardFile; //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\93Ç
\8d\9e
1878 //
\83\81\83j
\83\85\81[
\82ð
\8dí
\8f\9c
1879 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1881 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1882 //CabinetSelectPopupMenu.Items[ i ].Free;
1883 CabinetSelectPopupMenu.Items.Delete( i );
1884 CabinetMenu.Delete( i );
1889 //
\83\81\83j
\83\85\81[
\82É
\92Ç
\89Á
1890 for i := Length( BBSs ) - 1 downto 0 do begin
1892 item := TBBSMenuItem.Create( PopupMenu );
1893 item.Caption := BBSs[ i ].Title;
1894 item.Data := BBSs[ i ];
1895 item.OnClick := BBSMenuItemOnClick;
1896 CabinetSelectPopupMenu.Items.Insert( 0, item );
1897 item := TBBSMenuItem.Create( PopupMenu );
1898 item.Caption := BBSs[ i ].Title;
1899 item.Data := BBSs[ i ];
1900 item.OnClick := BBSMenuItemOnClick;
1901 CabinetMenu.Insert( 0, item );
1905 ShowBBSTree( BBSs[ 0 ] );
1908 //
\83{
\81[
\83h
\83c
\83\8a\81[
\90Ý
\92è
1909 procedure TGikoForm.SetBoardTreeNode(
1915 CategoryNode: TTreeNode;
1916 BoardNode: TTreeNode;
1917 Category: TCategory;
1920 //
\94Â
\83\8a\83X
\83g
\82Ì
\90Ý
\92è
1921 FActiveBBS := inBBS;
1922 TreeView.Items.BeginUpdate;
1923 TreeView.Items.Clear;
1926 if SplashWindow <> nil then
1927 SplashWindow.ProgressBar.Max := BBSs[ 0 ].Count;
1931 Root := TreeView.Items.Add( nil, inBBS.Title );
1932 Root.ImageIndex := ITEM_ICON_2CH1;
1933 Root.SelectedIndex := ITEM_ICON_2CH2;
1935 for i := 0 to inBBS.Count - 1 do begin
1936 Category := TCategory(inBBS.Items[i]);
1937 CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
1938 CategoryNode.Data := Category;
1939 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
1940 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
1942 for j := 0 to Category.Count - 1 do begin
1943 Board := TBoard(Category.Items[j]);
1945 BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
1946 BoardNode.Data := Board;
1947 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
1948 if not Board.IsLogFile then begin
1949 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
1950 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
1952 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
1953 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
1954 for k := 0 to Board.Count - 1 do begin
1955 if Board.Items[ k ].IsLogFile then begin
1956 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
1957 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
1967 CategoryNode.Expanded := Category.NodeExpand;
1969 if SplashWindow <> nil then begin
1970 SplashWindow.ProgressBar.StepIt;
1971 Application.ProcessMessages;
1975 TreeView.Items.EndUpdate;
1979 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
1981 COLUMN: array[0..0] of string = ('
\83J
\83e
\83S
\83\8a\96¼');
1983 ListColumn: TListColumn;
1986 ListView.Items.BeginUpdate;
1988 Screen.Cursor := crHourGlass;
1990 ListView.Columns.Clear;
1991 for i := 0 to Length(COLUMN) - 1 do begin
1992 ListColumn := ListView.Columns.Add;
1993 ListColumn.Caption := COLUMN[i];
1994 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
1997 ListView.Items.Count := 0;
1998 ListView.Items.Clear;
1999 ListView.Items.Count := ABBS2ch.Count;
2001 // UpFolderAction.Enabled := False;
2002 // AllItemAction.Enabled := False;
2003 // LogItemAction.Enabled := False;
2004 // NewItemAction.Enabled := False;
2005 // SelectItemAction.Enabled := False;
2006 // ListDownloadToolButton.Enabled := False;
2007 // BoardReservToolButton.Enabled := False;
2008 // ListThreadDownloadToolButton.Enabled := False;
2010 ListNameLabel.Caption := ABBS2ch.Title;
2011 FolderImage.Picture := nil;
2012 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
2015 FSortOrder := False;
2016 ListViewColumnClick(nil, ListView.Column[0]);
2018 Result := ABBS2ch.Count;
2020 Screen.Cursor := crDefault;
2021 ListView.Items.EndUpdate;
2025 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
2027 COLUMN: array[0..2] of string = ('
\94Â
\96¼', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e');
2029 ListColumn: TListColumn;
2032 ListView.Items.BeginUpdate;
2034 Screen.Cursor := crHourGlass;
2036 ListView.Columns.Clear;
2037 for i := 0 to Length(COLUMN) - 1 do begin
2038 ListColumn := ListView.Columns.Add;
2039 ListColumn.Caption := COLUMN[i];
2040 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
2043 ListView.Items.Count := 0;
2044 ListView.Items.Clear;
2045 ListView.Items.Count := Category.Count;
2047 // UpFolderAction.Enabled := True;
2048 // AllItemAction.Enabled := False;
2049 // LogItemAction.Enabled := False;
2050 // NewItemAction.Enabled := False;
2051 // SelectItemAction.Enabled := False;
2052 // ListDownloadToolButton.Enabled := False;
2053 // BoardReservToolButton.Enabled := False;
2054 // ListThreadDownloadToolButton.Enabled := False;
2056 ListNameLabel.Caption := Category.Title;
2057 FolderImage.Picture := nil;
2058 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2061 FSortOrder := False;
2062 ListViewColumnClick(nil, ListView.Column[0]);
2064 Result := Category.Count;
2066 Screen.Cursor := crDefault;
2067 ListView.Items.EndUpdate;
2071 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2073 COLUMN: array[0..6] of string = ('
\83X
\83\8c\83b
\83h
\96¼', '
\83J
\83E
\83\93\83g', '
\8eæ
\93¾', '
\90V
\92\85',
2074 '
\96¢
\93Ç', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e');
2075 COLUMN_ALIGNMENT: array[0..6] of TAlignment = (taLeftJustify, taRightJustify,
2076 taRightJustify, taRightJustify,
2077 taRightJustify, taLeftJustify,
2079 //No,
\83X
\83\8c\83b
\83h
\96¼,
\83J
\83E
\83\93\83g,
\8f\84\89ñ
\97\
\96ñ,
\8eæ
\93¾
\93ú
\8e\9e
2081 ListColumn: TListColumn;
2084 ListView.Items.BeginUpdate;
2086 Screen.Cursor := crHourGlass;
2088 //
\83`
\83\89\82Â
\82«
\96h
\8e~
\82Ì
\82½
\82ß
\81A
\95Ï
\8dX
\82³
\82ê
\82Ä
\82¢
\82é
\8fê
\8d\87\82Ì
\82Ý
2089 //
\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Ó
2090 if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2092 ListView.Columns.Clear;
2093 for i := 0 to Length(COLUMN) - 1 do begin
2094 ListColumn := ListView.Columns.Add;
2095 ListColumn.Caption := COLUMN[i];
2096 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2097 ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2101 ListView.Items.Count := 0;
2102 ListView.Items.Clear;
2104 case GikoForm.ViewType of
2105 gvtAll: ListView.Items.Count := Board.Count;
2106 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2107 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2108 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2111 ListNameLabel.Caption := Board.Title;
2112 FolderImage.Picture := nil;
2113 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2116 FSortOrder := False;
2117 ListViewColumnClick(nil, ListView.Column[0]);
2119 Result := Board.Count;
2121 Screen.Cursor := crDefault;
2122 ListView.Items.EndUpdate;
2126 procedure TGikoForm.TreeViewChange(Sender: TObject; Node: TTreeNode);
2130 if FTreeType = gttHistory then begin
2131 // SetContent(TThreadItem(Node.Data));
2132 InsertBrowserTab(TFavoriteThreadItem(Node.Data).Item);
2136 ListView.Selected := nil;
2137 ListView.Items.Count := 0;
2138 ListView.Items.Clear;
2139 // ListView.Columns.Clear;
2141 Caption := CAPTION_NAME;
2142 //Application.Title := CAPTION_NAME;
2145 if GetActiveList is TBBS then begin
2146 for i := 0 to ListView.Columns.Count - 1 do
2147 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
2148 end else if GetActiveList is TCategory then begin
2149 for i := 0 to ListView.Columns.Count - 1 do
2150 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
2151 end else if GetActiveList is TBoard then begin
2152 for i := 0 to ListView.Columns.Count - 1 do
2153 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
2156 if TObject(Node.Data) is TBBS then begin
2157 SetActiveList(Node.data);
2158 end else if TObject(Node.Data) is TCategory then begin
2159 SetActiveList(Node.data);
2160 end else if TObject(Node.Data) is TBoard then begin
2161 if not TBoard(Node.Data).IsThreadDatRead then begin
2162 Screen.Cursor := crHourGlass;
2164 GikoSys.ReadSubjectFile(TBoard(Node.Data));
2166 Screen.Cursor := crDefault;
2169 SetActiveList(Node.data);
2173 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2175 // FileName: string;
2176 // DateTime: TDateTime;
2179 Category: TCategory;
2181 ThreadItem: TThreadItem;
2184 if ActiveList is TBBS then begin
2185 BBS := TBBS(ActiveList);
2187 ListView.StateImages := nil;
2189 if BBS = nil then Exit;
2190 if BBS.Count <= 0 then Exit;
2191 if Item = nil then Exit;
2192 if Item.Index > BBS.Count then Exit;
2193 if ListView.Items.Count = 0 then Exit;
2195 if not (BBS.Items[Item.index] is TCategory) then Exit;
2196 Category := TCategory(BBS.Items[Item.index]);
2198 if Category = nil then Exit;
2200 if ListNumberVisibleAction.Checked then
2201 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2203 Item.Caption := Category.Title;
2205 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2206 Item.Data := Category;
2207 end else if ActiveList is TCategory then begin
2208 Category := TCategory(ActiveList);
2210 ListView.StateImages := nil;
2212 if Category = nil then Exit;
2213 if Category.Count <= 0 then Exit;
2214 if Item = nil then Exit;
2215 if Item.Index >= Category.Count then Exit;
2216 if ListView.Items.Count = 0 then Exit;
2218 if not (Category.Items[Item.Index] is TBoard) then Exit;
2219 Board := TBoard(Category.Items[Item.Index]);
2221 if Board = nil then Exit;
2223 if ListNumberVisibleAction.Checked then
2224 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2226 Item.Caption := Board.Title;
2228 if Item.SubItems.Count <> 2 then begin
2229 Item.SubItems.Clear;
2230 Item.SubItems.Add('');
2231 Item.SubItems.Add('');
2234 Item.ImageIndex := ITEM_ICON_BOARD1;
2237 Item.SubItems[0] := Board.RoundName // '
\97\
\96ñ'
2239 Item.SubItems[0] := '';
2241 if Board.RoundDate = ZERO_DATE then begin
2242 Item.SubItems[1] := '';
2244 Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2246 end else if ActiveList is TBoard then begin
2247 Board := TBoard(ActiveList);
2249 if GikoSys.Setting.ListIconVisible then
2250 ListView.StateImages := StateIconImageList
2252 ListView.StateImages := nil;
2254 case GikoForm.ViewType of
2255 gvtAll: BoardCnt := Board.Count;
2256 gvtLog: BoardCnt := Board.GetLogThreadCount;
2257 gvtNew: BoardCnt := Board.GetNewThreadCount;
2258 gvtUser: BoardCnt := Board.GetUserThreadCount;
2263 // if Board = nil then Exit;
2264 if BoardCnt <= 0 then Exit;
2265 if Item = nil then Exit;
2266 if Item.Index > BoardCnt then Exit;
2267 if ListView.Items.Count = 0 then Exit;
2269 // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2272 case GikoForm.ViewType of
2273 gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]);
2274 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2275 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2276 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2279 if ThreadItem = nil then Exit;
2281 // if ListNumberVisibleAction.Checked then
2282 // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2284 RepStr := ThreadItem.Title;
2285 //RepStr := StringReplace(RepStr, '&', '&', [rfReplaceAll]);
2286 RepStr := StringReplace(RepStr, '<', '<', [rfReplaceAll]);
2287 RepStr := StringReplace(RepStr, '>', '>', [rfReplaceAll]);
2288 RepStr := StringReplace(RepStr, '"', '"', [rfReplaceAll]);
2289 RepStr := StringReplace(RepStr, '&', '&', [rfReplaceAll]);
2290 //RepStr := StringReplace(RepStr, '
\81\97\81M', ',', [rfReplaceAll]);
2292 if Item.SubItems.Count <> 6 then begin
2293 Item.SubItems.Clear;
2294 Item.SubItems.Add('');
2295 Item.SubItems.Add('');
2296 Item.SubItems.Add('');
2297 Item.SubItems.Add('');
2298 Item.SubItems.Add('');
2299 Item.SubItems.Add('');
2302 if ListNumberVisibleAction.Checked then
2303 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2305 Item.Caption := RepStr;
2307 case ThreadItem.AgeSage of
2308 gasNone: Item.StateIndex := -1;
2309 gasNew: Item.StateIndex := 0;
2310 gasAge: Item.StateIndex := 1;
2311 gasSage: Item.StateIndex := 2;
2314 if ThreadItem.IsLogFile then begin
2315 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2316 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2317 Item.SubItems[1] := IntToStr(ThreadItem.Count);
2318 if ThreadItem.NewResCount = 0 then
2319 Item.SubItems[2] := ''
2321 Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2322 Item.SubItems[3] := '';
2323 if ThreadItem.Round then
2324 Item.SubItems[4] := ThreadItem.RoundName
2326 Item.SubItems[4] := '';
2327 if ThreadItem.RoundDate = ZERO_DATE then begin
2328 Item.SubItems[5] := '';
2330 Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2331 if ThreadItem.NewArrival then
2332 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2334 Item.ImageIndex := ITEM_ICON_THREAD1;
2335 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2336 Item.SubItems[1] := '';
2337 Item.SubItems[2] := '';
2338 Item.SubItems[3] := '';
2339 Item.SubItems[4] := '';
2340 Item.SubItems[5] := '';
2342 Item.Data := ThreadItem;
2346 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2347 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2348 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2349 var Index: Integer);
2354 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2360 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2361 EndIndex: Integer; OldState, NewState: TItemStates);
2366 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2374 threadItem : TThreadItem;
2381 ActiveFileName: string;
2388 if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin
2389 if LowerCase(OleVariant(IHTMLDocument2(Browser.Document)).charset) <> 'shift_jis' then
2390 OleVariant(IHTMLDocument2(Browser.Document)).charset := 'shift_jis';
2396 if PreviewTimer.Enabled then
2397 PreviewTimer.Enabled := False;
2398 Application.CancelHint;
2399 if GetActiveContent <> nil then
2400 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2402 ActiveFileName := '';
2404 StatusBar.Panels[1].Text := Text;
2406 if FHint <> nil then begin
2407 FHint.ReleaseHandle;
2410 if FPreviewBrowser <> nil then
2411 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2413 if not GikoSys.Setting.UnActivePopup then
2414 if not GikoForm.Active then
2417 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2418 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2421 Ext := AnsiLowerCase(ExtractFileExt(Text));
2422 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2423 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2424 if FPreviewBrowser = nil then begin
2425 FPreviewBrowser := TPreviewBrowser.Create(Self);
2426 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2427 TOleControl(FPreviewBrowser).Parent := nil;
2429 FPreviewBrowser.Navigate('about:blank');//
\91O
\89ñ
\82Ì
\83v
\83\8c\83r
\83\85\81[
\89æ
\91\9c\8fÁ
\8b\8e\97p
2430 FPreviewURL := Text;
2431 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2432 PreviewTimer.Enabled := True;
2433 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2434 if Pos('mailto:', Text) = 1 then begin
2435 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2436 //
\83M
\83R
\83i
\83r
\83X
\83\8c \83p
\81[
\83g3
\82Ì466
\8e\81\82É
\8a´
\8eÓ
2438 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2439 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2440 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2441 if (Assigned(e)) then begin
2442 tmp2 := GikoSys.ZenToHan(e.Get_outerText);
2443 if (GikoSys.IsNumeric(tmp2)) then begin
2444 //
\82\93\82Í
\83\8c\83X
\94Ô
\8d\86\82Á
\82Û
\82¢
\82Á
\82·
\81B
2445 wkIntSt := StrToInt(tmp2);
2446 wkIntTo := StrToInt(tmp2);
2447 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2448 FHint.PopupType := gptThread;
2449 SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False);
2451 FHint.PopupType := gptRaw;
2458 if Pos('about:blank..', URL) = 1 then
2459 URL := StringReplace( URL, 'about:blank..', 'http://www.2ch.net', [] );
2461 PathRec := Gikosys.Parse2chURL2(URL);
2463 if PathRec.FDone then begin
2465 wkIntSt := PathRec.FSt;
2466 wkIntTo := PathRec.FTo;
2468 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2471 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2473 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2475 end else if wkIntSt > wkIntTo then begin
2480 //if wkIntSt = 0 then
2482 //if wkINtTo = 0 then
2484 //if PathRec.FFirst then
2486 if PathRec.FStBegin then
2488 if PathRec.FToEnd then
2491 ATitle := ActiveFileName <> PathRec.FKey;
2493 threadItem := BBSsFindThreadFromURL( URL );
2494 if threadItem = nil then begin
2495 board := BBSsFindBoardFromBBSID( PathRec.FBBS );
2496 threadItem := board.Find( PathRec.FKey + '.dat' );
2499 if threadItem <> nil then begin
2500 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2501 FHint.PopupType := gptThread;
2502 SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2508 // ShowTextPopup(s);
2509 if FHint.PopupType = gptRaw then begin
2510 if FHint.Caption <> '' then
2513 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2519 procedure TGikoForm.BrowserTitleChange(Sender: TObject;
2520 const Text: WideString);
2524 if (Text = BLANK_HTML) or (Text = GikoSys.GetHtmlTempFileName) then
2525 Title := CAPTION_NAME
2527 Title := CAPTION_NAME + ' - [' + Text + ']';
2529 //Application.Title := Title;
2532 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2535 //SysMenuApp: HMenu;
2537 FEnabledCloseButton := Enabled;
2538 SysMenu := GetSystemMenu(Handle, False);
2539 //SysMenuApp := GetSystemMenu(Application.Handle, False);
2541 if Enabled then begin
2542 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2543 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2545 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2546 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2549 DrawMenuBar(Handle);
2550 //DrawMenuBar(Application.Handle);
2553 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2554 var AllowChange: Boolean);
2556 if FTreeType = gtt2ch then
2560 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2561 Shift: TShiftState);
2563 if Key = VK_BACK then begin
2564 // UpFolderButtonClick(Sender);
2565 end else if Key = VK_SPACE then begin
2567 end else if Key = VK_RETURN then begin
2572 function TGikoForm.GetHttpState: Boolean;
2574 Result := FHttpState;
2577 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2578 Column: TListColumn);
2582 wkCategory: TCategory;
2585 if FSortIndex = Column.Index then
2586 FSortOrder := not FSortOrder
2588 FSortOrder := False;
2590 for i := 0 to ListView.Columns.Count - 1 do
2591 ListView.Column[i].ImageIndex := -1;
2593 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
2595 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
2597 Sort.SortNoFlag := ListNumberVisibleAction.Checked;
2599 //if TObject(TreeView.Selected.Data) is TBBS then begin
2600 if TObject( FActiveList ) is TBBS then begin
2601 //wkBBS := TBBS(TreeView.Selected.Data);
2602 wkBBS := TBBS( FActiveList );
2603 Sort.SortOrder := FSortOrder;
2604 Sort.SortIndex := Column.Index;
2605 wkBBS.Sort(CategorySortProc);
2607 //end else if TObject(TreeView.Selected.Data) is TCategory then begin
2608 end else if TObject( FActiveList ) is TCategory then begin
2609 //wkCategory := TCategory(TreeView.Selected.Data);
2610 wkCategory := TCategory( FActiveList );
2611 Sort.SortOrder := FSortOrder;
2612 Sort.SortIndex := Column.Index;
2613 wkCategory.Sort(BoardSortProc);
2615 //end else if TObject(TreeView.Selected.Data) is TBoard then begin
2616 end else if TObject( FActiveList ) is TBoard then begin
2617 //wkBoard := TBoard(TreeView.Selected.Data);
2618 wkBoard := TBoard( FActiveList );
2619 Sort.SortOrder := FSortOrder;
2620 Sort.SortIndex := Column.Index;
2621 wkBoard.Sort(ThreadItemSortProc);
2624 FSortIndex := Column.Index;
2627 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2628 Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean);
2632 DefaultDraw := True;
2634 DefaultDraw := False;
2635 if (cdsSelected in State) or (cdsHot in State) then begin
2636 Sender.Canvas.Brush.Color := clHighlight;
2637 Sender.Canvas.Font.Color := clHighlightText;
2639 Sender.Canvas.Brush.Color := clBtnFace;
2640 Sender.Canvas.Font.Color := clBtnText;
2642 ARect := Rect(Button.Left, Button.Top, Button.Left + Button.Width, Button.Top + Button.Height);
2643 Sender.Canvas.FillRect(ARect);
2644 DrawText(Sender.Canvas.Handle, PChar(Button.Caption), -1, ARect, DT_SINGLELINE or DT_VCENTER or DT_CENTER);
2647 function TGikoForm.GetTreeNode(Data: TObject): TTreeNode;
2652 Nodes := TreeView.Items;
2654 for i := 0 to Nodes.Count - 1 do begin
2655 if Nodes.Item[i].Data = Data then begin
2656 Result := Nodes.Item[i];
2663 procedure TGikoForm.BrowserBeforeNavigate2(Sender: TObject;
2664 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
2665 Headers: OleVariant; var Cancel: WordBool);
2670 kMenuName: string = 'menu:';
2673 if Pos(kMenuName, URL) <> 0 then begin
2674 sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
2676 if not GikoSys.IsNumeric(sNo) then Exit;
2680 KokoPopupMenu.Tag := StrToInt(sNo);
2681 KokoPopupMenu.Popup(p.x, p.y);
2682 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
2683 Cancel := not GikoSys.Setting.OpenMailer;
2688 procedure TGikoForm.ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
2689 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
2690 var DefaultDraw: Boolean);
2692 ThreadItem: TThreadItem;
2695 // TListView(Sender).Canvas.Font.Style := [];
2696 if TObject(Item.Data) is TThreadItem then begin
2697 ThreadItem := TThreadItem(Item.Data);
2698 if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
2699 ListView.Canvas.Brush.Color := FOddColor;
2701 ListView.Canvas.Brush.Color := FListViewBackGroundColor;
2703 // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
2704 if ThreadItem.UnRead then
2705 TListView(Sender).Canvas.Font.Style := [fsBold];
2709 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
2711 if Application.Terminated then
2713 if PreviewTimer.Enabled then
2714 PreviewTimer.Enabled := False;
2715 //
\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
2716 if FHint <> nil then begin
2717 FHint.ReleaseHandle;
2722 if FPreviewBrowser <> nil then
2723 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2727 procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
2728 const ARect: TRect; var DefaultDraw: Boolean);
2732 IsBoardNode: Boolean;
2738 Category: TCategory;
2742 DefaultDraw := True;
2744 if FTreeType = gttHistory then Exit;
2746 TreeView.Canvas.Font.Color := clBlue;
2747 IsBoardNode := False;
2749 for i := 0 to TreeView.Items.Count - 1 do begin
2751 if not TreeView.Items[i].IsVisible then
2754 if TObject(TreeView.Items[i].Data) is TCategory then begin
2755 if TreeView.Items[i].Expanded then
2758 IsBoardNode := False;
2759 Category := TCategory(TreeView.Items[i].Data);
2760 for j := 0 to Category.Count - 1 do begin
2761 Board := Category.Items[j];
2762 if Board <> nil then begin
2763 if Board.UnRead > 0 then begin
2771 end else if TObject(TreeView.Items[i].Data) is TBoard then begin
2772 IsBoardNode := True;
2773 Board := TBoard(TreeView.Items[i].Data);
2774 Cnt := Board.UnRead;
2780 Bitmap := TBitmap.Create;
2782 Bitmap.Canvas.Font.Assign(TreeView.Canvas.Font);
2783 Bitmap.Canvas.Font.Style := [fsBold];
2784 NodeWidth := Bitmap.Canvas.TextWidth(TreeView.Items[i].Text);
2789 NodeRect := TreeView.Items[i].DisplayRect(True);
2792 CntText := '(' + IntToStr(Cnt) + ')'
2793 else if Cnt = 1 then
2797 TextWidth := TreeView.Canvas.TextWidth(CntText);
2799 TextRect := Rect(NodeRect.Left + NodeWidth + 8,
2801 NodeRect.Left + NodeWidth + TextWidth + 8,
2803 DrawText(TreeView.Canvas.Handle,
2807 DT_SINGLELINE or DT_VCENTER);
2809 TreeViewCustomDrawItem(nil, nil, [], DefaultDraw);
2812 procedure TGikoForm.TreeViewCustomDrawItem(Sender: TCustomTreeView;
2813 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
2816 Category: TCategory;
2819 DefaultDraw := True;
2821 if FTreeType = gttHistory then Exit;
2823 TreeView.Canvas.Font.Style := [];
2824 if Node <> nil then begin
2825 if TObject(Node.Data) is TCategory then begin
2826 Category := TCategory(Node.Data);
2827 for i := 0 to Category.Count - 1 do begin
2828 Board := Category.Items[i];
2829 if Board <> nil then begin
2830 if Board.UnRead > 0 then begin
2831 TreeView.Canvas.Font.Style := [fsBold];
2836 end else if TObject(Node.Data) is TBoard then begin
2837 Board := TBoard(Node.Data);
2838 if Board.UnRead > 0 then
2839 TreeView.Canvas.Font.Style := [fsBold];
2844 procedure TGikoForm.TreeViewExpanded(Sender: TObject; Node: TTreeNode);
2846 TreeView.Invalidate;
2848 if TObject(Node.Data) is TBBS then begin
2849 TBBS(Node.Data).NodeExpand := True;
2850 end else if TObject(Node.Data) is TCategory then begin
2851 TCategory(Node.Data).NodeExpand := True;
2852 end else if TObject(Node.Data) is TBoard then begin
2853 TBoard(Node.Data).NodeExpand := True;
2857 {procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
2859 TreeSplitter.Visible := PanelVisible;
2860 CabinetPanel.Visible := PanelVisible;
2861 CabinetToolButton.Down := PanelVisible;
2864 procedure TGikoForm.ListViewAllSelect;
2870 procedure TGikoForm.TreeViewDblClick(Sender: TObject);
2873 ThreadItem: TThreadItem;
2877 GetCursorPos(APoint);
2878 APoint := TreeView.ScreenToClient(APoint);
2879 HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
2880 if not (htOnLabel in HitTest) then Exit;
2881 if TreeView.Selected = nil then Exit;
2883 if FTreeType = gtt2ch then begin
2884 if not (TObject(TreeView.Selected.Data) is TBoard) then Exit;
2885 Board := TBoard(TreeView.Selected.Data);
2886 DownloadList(Board);
2887 end else if FTreeType = gttHistory then begin
2888 if not (TObject(TreeView.Selected.Data) is TFavoriteThreadItem) then Exit;
2889 ThreadItem := TFavoriteThreadItem(TreeView.Selected.Data).Item;
2890 DownloadContent(ThreadItem);
2894 procedure TGikoForm.FavoriteTreeViewClick(Sender: TObject);
2897 FavoriteClick( TObject( FavoriteTreeView.Selected ) );
2901 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
2903 AddMessageList(Msg, nil, Icon);
2906 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
2912 if Item.DownType = gdtBoard then
2913 ATitle := Item.Board.Title
2915 ATitle := Item.ThreadItem.Title;
2917 ATitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j';
2919 if Item.State in [gdsComplete, gdsDiffComplete] then begin
2921 if Item.DownType = gdtBoard then begin
2924 AddMessageList(ATitle + ' [
\83X
\83\8c\88ê
\97\97\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
2925 if GetActiveList = Item.Board then
2926 SetActiveList(Item.Board);
2927 Item.Board.Modified := True;
2928 Item.Board.IsThreadDatRead := True;
2930 end else if Item.DownType = gdtThread then begin
2933 Item.ThreadItem.NewArrival := True;
2934 if GetActiveContent = Item.ThreadItem then
2935 InsertBrowserTab(Item.ThreadItem)
2937 InsertBrowserTab(Item.ThreadItem, False);
2939 if Item.State = gdsComplete then begin
2941 AddMessageList(ATitle + ' [
\83X
\83\8c\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
2943 PlaySound('NewDiff');
2944 AddMessageList(ATitle + ' [
\83X
\83\8c\8d·
\95ª
\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
2947 //
\8f\84\89ñ
\82 \82è
\82Ì
\8fê
\8d\87\81\95\82P
\82O
\82O
\82O
\92´
\82Í
\8f\84\89ñ
\8dí
\8f\9c
2948 if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin
2949 Item.ThreadItem.Round := False;
2950 Item.ThreadItem.RoundName := '';
2951 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);
2957 end else if Item.State = gdsNotModify then begin
2959 { if (Item.DownType = gdtThread) and (AddHistory(Item.ThreadItem)) then begin
2960 //SetContent(Item.ThreadItem);
2961 InsertBrowserTab(Item.ThreadItem);
2963 AddMessageList(ATitle + ' [
\96¢
\8dX
\90V]', nil, gmiSAD);
2964 PlaySound('NoChange');
2965 Screen.Cursor := crDefault;
2966 end else if Item.State = gdsAbort then begin
2968 AddMessageList(ATitle + ' [
\92\86\92f]', nil, gmiSAD);
2969 end else if Item.State = gdsError then begin
2974 AddMessageList(ATitle + ' [
\83G
\83\89\81[(' + IntToStr(Item.ResponseCode) + s + ')]', nil, gmiNG);
2975 // if Item.ResponseCode = 302 then
2976 // 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);
2982 if FWorkCount < 0 then FWorkCount := 0;
2983 if FWorkCount = 0 then begin
2985 Animate.Active := False;
2987 Screen.Cursor := crDefault;
2994 procedure TGikoForm.WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer);
2996 // SetProgressValue(Number, 0, AWorkCountMax);
2997 // ProgressBar.Visible := True;
2998 ProgressBar.Position := 0;
2999 ProgressBar.Max := AWorkCountMax;
3000 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ð
\8aJ
\8en
\82µ
\82Ü
\82·';
3001 FDownloadMax := AWorkCountMax;
3004 procedure TGikoForm.WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
3006 // ProgressBar.Visible := False;
3007 ProgressBar.Position := 0;
3008 // SetProgressValue(Number, 0);
3009 if FDownloadMax <> 0 then
3010 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ª
\8a®
\97¹
\82µ
\82Ü
\82µ
\82½';
3013 procedure TGikoForm.Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
3015 ProgressBar.Position := AWorkCount;
3016 // SetProgressValue(Number, AWorkCount);
3017 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86 (' + IntToStr(AWorkCount) + '/' + IntToStr(FDownloadMax) + ')';
3021 procedure TGikoForm.SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
3023 Component: TComponent;
3025 Component := FindComponent('ProgressBar' + IntToStr(Number + 1));
3026 if Component <> nil then begin
3027 if not (Component is TProgressBar) then Exit;
3029 TProgressBar(Component).Max := Max;
3030 TProgressBar(Component).Position := Value;
3035 procedure TGikoForm.AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
3037 ListItem: TListItem;
3039 MessageListView.Items.BeginUpdate;
3041 ListItem := MessageListView.Items.Add;
3042 ListItem.Caption := ACaption;
3043 ListItem.Data := AObject;
3044 ListItem.MakeVisible(False);
3046 gmiOK: ListItem.ImageIndex := 0;
3047 gmiSAD: ListItem.ImageIndex := 1;
3048 gmiNG: ListItem.ImageIndex := 2;
3049 gmiWhat: ListItem.ImageIndex := 3;
3052 MessageListView.Items.EndUpdate;
3056 {procedure TGikoForm.BrowserTabChange(Sender: TObject);
3059 ThreadItem: TThreadItem;
3061 ThreadItem := GetActiveContent;
3062 if ThreadItem <> nil then begin
3063 SetContent(ThreadItem);
3067 procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
3070 // OldIndex: Integer;
3071 favItem : TFavoriteThreadItem;
3073 if ThreadItem.IsLogFile then begin
3074 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
3075 if TObject(BrowserTab.Tabs.Objects[i]) is TThreadItem then begin
3076 if TThreadItem(BrowserTab.Tabs.Objects[i]) = ThreadItem then begin
3077 if ActiveTab then begin
3078 //OldIndex := BrowserTab.TabIndex;
3079 BrowserTab.TabIndex := i;
3080 // if OldIndex <> i then
3081 BrowserTab.OnChange(nil);
3088 if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin
3089 favItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
3090 AddHistory( favItem );
3091 BrowserTab.Tabs.Insert(0, GikoSys.GetShortName(ThreadItem.Title, 20));
3092 BrowserTab.Tabs.Objects[0] := ThreadItem;
3094 BrowserTab.TabIndex := 0;
3096 favItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
3097 AddHistory( favItem );
3098 i := BrowserTab.Tabs.Add(GikoSys.GetShortName(ThreadItem.Title, 20));
3099 BrowserTab.Tabs.Objects[i] := ThreadItem;
3101 BrowserTab.TabIndex := i;
3103 if ActiveTab then begin
3104 BrowserTab.OnChange(nil);
3105 BrowserNullTab := nil;
3108 //OldIndex := BrowserTab.TabIndex;
3109 BrowserNullTab := ThreadItem;
3110 BrowserTab.TabIndex := -1;
3111 // if OldIndex = -1 then
3112 BrowserTab.OnChange(nil);
3115 if GikoSys.Setting.URLDisplay then
3116 AddressComboBox.Text := ThreadItem.URL;
3119 procedure TGikoForm.SetContent(ThreadItem: TThreadItem);
3124 // HtmlName: string;
3130 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
3131 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3132 Application.ProcessMessages;
3135 if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin
3139 Application.ProcessMessages;
3140 FActiveContent.ScrollTop := OleVariant(IHTMLDocument2(Browser.Document)).Body.ScrollTop;
3143 MsgBox(Handle, E.Message, 'SetContent[<-ScrollTop]', 0);
3149 FActiveContent := ThreadItem;
3151 if ThreadItem = nil then begin
3152 Browser.Navigate(BLANK_HTML);
3153 BrowserBoardNameLabel.Caption := '';
3154 ItemBoardImage.Picture := nil;
3155 BrowserNameLabel.Caption := '';
3156 ItemImage.Picture := nil;
3157 FActiveContent := nil;
3161 BBSID := ThreadItem.ParentBoard.BBSID;
3162 FileName := ThreadItem.FileName;
3164 if GetCapture = ListView.Handle then
3167 //OldCursor := Screen.Cursor;
3168 Screen.Cursor := crHourGlass;
3170 if ThreadItem.UnRead then begin
3171 ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
3172 if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0;
3176 if not ThreadItem.IsLogFile then begin
3178 if (not Assigned(Browser.Document)) then begin
3179 Browser.Navigate('about:blank');
3180 while (not Assigned(Browser.Document)) do begin
3181 Application.ProcessMessages;
3185 s := '<HTML><BODY><CENTER>
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Í
\8eæ
\93¾
\82µ
\82Ä
\82¢
\82Ü
\82¹
\82ñ</CENTER></BODY></HTML>';
3186 doc := Browser.Document;
3188 doc.charset := 'Shift_JIS';
3194 //Application.ProcessMessages;
3195 GikoSys.CreateHTML2(Browser.Document, ThreadItem, sTitle);
3196 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
3197 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3198 Application.ProcessMessages;
3201 Application.ProcessMessages;
3203 if ThreadItem.UnRead then
3204 BrowserMovement('new');
3207 if (ThreadItem.ScrollTop <> 0) and (not ThreadItem.UnRead) then begin
3211 doc := Browser.Document;
3212 doc.Body.ScrollTop := ThreadItem.ScrollTop;
3215 MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
3220 ThreadItem.UnRead := False;
3224 BrowserBoardNameLabel.Caption := ThreadItem.ParentBoard.Title;
3225 ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
3226 BrowserNameLabel.Caption := ThreadItem.Title;
3227 ItemImage.Picture := nil;
3228 if ThreadItem.IsLogFile then
3229 if ThreadItem.NewArrival then
3230 ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap)
3232 ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap)
3234 ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap);
3236 ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;
3237 BrowserNameLabel.Left := ItemImage.Left + 20;
3239 //if Screen.Cursor <> crDefault then
3240 // Screen.Cursor := OldCursor
3242 Screen.Cursor := crDefault;
3246 function TGikoForm.GetActiveContent: TThreadItem;
3251 if BrowserTab.TabIndex = -1 then begin
3252 Result := BrowserNullTab;
3255 Index := BrowserTab.TabIndex;
3256 if BrowserTab.Tabs.Objects[Index] is TThreadItem then
3257 Result := TThreadItem(BrowserTab.Tabs.Objects[Index]);
3259 // Result := FActiveContent;
3262 procedure TGikoForm.SetActiveList(Obj: TObject);
3268 if Obj is TBBS then begin
3269 for i := 0 to ListView.Columns.Count - 1 do
3270 ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i];
3271 SetCategoryListItem(TBBS(Obj));
3272 end else if Obj is TCategory then begin
3273 for i := 0 to ListView.Columns.Count - 1 do
3274 ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i];
3275 SetBoardListItem(TCategory(Obj));
3276 end else if Obj is TBoard then begin
3277 // SetThreadListItem
\8cÄ
\82Ô
\82È
\82ç
\82¢
\82ç
\82È
\82¢
\82ñ
\82¶
\82á
\82Ë
\82¥
\81H
3279 for i := 0 to ListView.Columns.Count - 1 do
3280 ListView.Column[i].Width := GikoSys.Setting.BoardColumnWidth[i];
3282 SetThreadListItem(TBoard(Obj));
3287 //
\81\9a\81\9a\83q
\83\8d\83\86\83L
\83\81\83\82
3288 //
\82»
\82Ì
\82¤
\82¿interface
\82ð
\8eg
\82¤
3289 function TGikoForm.GetActiveList: TObject;
3291 Result := FActiveList;
3294 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType);
3296 SetListViewType(AViewType, '', False);
3299 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
3303 if ActiveList is TBoard then begin
3304 Board := TBoard(ActiveList);
3306 Board.ParentCategory.ParenTBBS.SelectText := SelectText;
3307 Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
3308 // Board.SelectText := SelectText;
3309 // Board.KubetsuChk := KubetsuChk;
3310 ViewType := AViewType;
3311 SetActiveList(Board);
3312 SetThreadListItem(Board);
3316 procedure TGikoForm.ListViewCustomDraw(Sender: TCustomListView;
3317 const ARect: TRect; var DefaultDraw: Boolean);
3323 if ListView.Items.Count = 0 then begin
3324 DefaultDraw := True;
3326 ListView.Canvas.Brush.Color := ListView.Color;
3327 ListView.Canvas.FillRect(ARect);
3331 ListView.Canvas.Font.Color := clWindowText;
3332 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3335 ListView.Canvas.Font.Color := clBlue;
3336 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';
3339 ListView.Canvas.Font.Color := clGreen;
3340 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\90V
\92\85\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3343 ListView.Canvas.Font.Color := clNavy;
3344 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';
3345 if GetActiveList is TBoard then
3346 s := Format(s, [TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText]);
3354 p := Point((ListView.ClientWidth div 2) - (ListView.Canvas.TextWidth(s) div 2),
3355 (ListView.ClientHeight div 2) - (ListView.Canvas.TextHeight(s) div 2));
3356 ListView.Canvas.TextOut(p.X, p.Y, s);
3358 DefaultDraw := True;
3362 procedure TGikoForm.DownloadList(Board: TBoard);
3364 Item: TDownloadItem;
3366 if Board.Title = '' then
3367 FDownloadTitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j'
3369 FDownloadTitle := Board.Title;
3371 if not Board.IsThreadDatRead then
3372 GikoSys.ReadSubjectFile(Board);
3373 Item := TDownloadItem.Create;
3375 Item.Board := Board;
3376 Item.DownType := gdtBoard;
3377 // AbortToolButton.Enabled := True;
3378 // Animate.Active := True;
3379 // FDownload.Add(Item);
3380 FControlThread.AddItem(Item);
3381 // Animate.Active := False;
3382 // AbortToolButton.Enabled := False;
3383 if FWorkCount = 0 then begin
3385 Animate.Active := True;
3388 Screen.Cursor := crAppStart;
3396 procedure TGikoForm.DownloadContent(ThreadItem: TThreadItem);
3398 Item: TDownloadItem;
3400 if ThreadItem.Title = '' then
3401 FDownloadTitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j'
3403 FDownloadTitle := ThreadItem.Title;
3404 Item := TDownloadItem.Create;
3406 Item.ThreadItem := ThreadItem;
3407 Item.DownType := gdtThread;
3408 // AbortToolButton.Enabled := True;
3409 // Animate.Active := True;
3410 // FDownload.Add(Item);
3411 FControlThread.AddItem(Item);
3412 // Animate.Active := False;
3413 // AbortToolButton.Enabled := False;
3414 if FWorkCount = 0 then begin
3416 Animate.Active := True;
3419 Screen.Cursor := crAppStart;
3427 procedure TGikoForm.PlaySound(SoundEventName: string);
3431 FileName := GikoSys.Setting.FindSoundFileName(SoundEventName);
3432 if FileExists(FileName) then begin
3433 if not sndPlaySound(PChar(FileName), SND_ASYNC or SND_NOSTOP) then begin
3434 sndPlaySound(nil, SND_SYNC);
3435 Application.ProcessMessages;
3437 sndPlaySound(PChar(FileName), SND_ASYNC);
3442 function TGikoForm.AddHistory( favItem : TFavoriteThreadItem ): Boolean;
3445 Item: TFavoriteThreadItem;
3449 // if (GetActiveContent = ThreadItem) and
3450 // (ThreadItem.Count <= ThreadItem.Kokomade) then
3452 // if GetActiveContent = ThreadItem then
3457 for i := 0 to FHistoryList.Count - 1 do begin
3458 if TObject(FHistoryList[i]) is TFavoriteThreadItem then begin
3459 Item := TFavoriteThreadItem(FHistoryList[i]);
3460 if Item.URL = favItem.URL then begin
3461 // SetContent(ThreadItem);
3462 FHistoryList.Move(i, 0);
3463 if FTreeType = gttHistory then
3464 TreeView.Items[ i ].MoveTo( TreeView.TopItem, naInsert );
3470 if FHistoryList.Count > 0 then
3471 FHistoryList.Insert( 0, favItem )
3473 FHistoryList.Add( favItem );
3474 // SetContent(ThreadItem);
3476 if FTreeType = gttHistory then begin
3477 Node := TreeView.Items.Add( nil, favItem.Title );
3478 TreeView.Items[ i ].MoveTo( TreeView.TopItem, naInsert );
3480 if favItem.NewArrival then begin
3481 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3482 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3484 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3485 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3488 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
3489 //
\81¦favItem.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
3490 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3491 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3492 Node.Data := favItem;
3496 procedure TGikoForm.DeleteHistory( threadItem: TThreadItem );
3500 for i := 0 to FHistoryList.Count - 1 do begin
3501 if threadItem.URL = TFavoriteThreadItem( FHistoryList.Items[i] ).URL then begin
3502 TFavoriteThreadItem( FHistoryList.Items[ i ] ).Free;
3503 FHistoryList.Delete(i);
3509 procedure TGikoForm.ClearHistory;
3514 procedure TGikoForm.SaveHistory;
3517 saveList : TstringList;
3520 saveList := TStringList.Create;
3523 saveList.Add('<?xml version="1.0" encoding="Shift_JIS" standalone="yes"?>');
3524 saveList.Add('<address>');
3525 bound := FHistoryList.Count - 1;
3526 for i := 0 to bound do begin
3527 // title
\82Í
\8d¡
\82Ì
\82Æ
\82±
\82ë
\8eg
\82Á
\82Ä
\82¢
\82È
\82¢
3529 '<history url="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).URL ) + '"' +
3530 ' title="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).Title ) + '"/>');
3532 saveList.Add('</address>');
3533 saveList.SaveToFile( GikoSys.GetConfigDir + 'History.xml' );
3540 procedure TGikoForm.LoadHistory;
3544 XMLDoc : IXMLDocument;
3546 HistoryNode : IXMLNode;
3548 favItem : TFavoriteThreadItem;
3551 fileName := GikoSys.GetConfigDir + 'History.xml';
3553 if FileExists( fileName ) then begin
3555 XMLDoc := LoadXMLDocument(FileName);
3556 XMLNode := XMLDoc.DocumentElement;
3558 if XMLNode.NodeName = 'address' then begin
3559 bound := XMLNode.ChildNodes.Count - 1;
3560 for i := 0 to bound do begin
3561 HistoryNode := XMLNode.ChildNodes[i];
3562 if HistoryNode.NodeName = 'history' then begin
3563 //if FReadCount >= sl.Count then begin
3564 s := Trim(HistoryNode.Attributes['url']);
3565 if s <> '' then begin
3566 favItem := TFavoriteThreadItem.Create(
3567 s, HistoryNode.Attributes[ 'title' ] );
3568 AddHistory( favItem );
3580 procedure TGikoForm.ShowBBSTree(
3588 GikoSys.Setting.CabinetIndex := 0;
3590 FavoriteTreeView.Visible := False;
3591 FavoriteToolBar.Hide;
3592 TreeView.Visible := True;
3594 b := CabinetSelectPopupMenu.Items.Count - 1;
3595 for i := 0 to b do begin
3596 item := CabinetSelectPopupMenu.Items[ i ];
3597 if item is TBBSMenuItem then begin
3598 if TBBSMenuItem( item ).Data = inBBS then begin
3599 item.Checked := True;
3600 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3601 CabinetMenu.Items[ i ].Checked := True;
3605 item.Checked := False;
3606 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3607 CabinetMenu.Items[ i ].Checked := False;
3609 CabinetSelectToolButton.Caption := inBBS.Title;
3611 CabinetHistoryAction.Checked := False;
3612 CabinetFavoriteAction.Checked := False;
3614 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
3615 FTreeType := gtt2ch;
3616 HistoryToolBar.Hide;
3617 SetBoardTreeNode( inBBS );
3618 TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
3619 //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
3620 if GetActiveList = nil then
3621 TreeView.Selected := TreeView.Items[0]
3623 for i := 0 to TreeView.Items.Count - 1 do begin
3624 if TreeView.Items[i].Data = GetActiveList then begin
3625 TreeView.Selected := TreeView.Items[i];
3629 TreeView.Selected := TreeView.Items[0]
3637 procedure TGikoForm.ShowHistoryTree;
3642 if CabinetPanel.Visible then begin
3643 if FTreeType = gttHistory then begin
3644 CabinetVisible( False );
3645 CabinetHistoryAction.Checked := False;
3647 CabinetHistoryAction.Checked := True;
3650 CabinetVisible( True );
3651 CabinetHistoryAction.Checked := True;
3654 GikoSys.Setting.CabinetIndex := 1;
3656 FavoriteTreeView.Visible := False;
3657 TreeView.Visible := True;
3659 CabinetBBSAction.Checked := False;
3660 CabinetFavoriteAction.Checked := False;
3662 if FTreeType <> gttHistory then begin
3663 b := CabinetSelectPopupMenu.Items.Count - 1;
3664 for i := 0 to b do begin
3665 item := CabinetSelectPopupMenu.Items[ i ];
3666 if item is TBBSMenuItem then begin
3667 item.Checked := False;
3668 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3669 CabinetMenu.Items[ i ].Checked := False;
3673 FTreeType := gttHistory;
3674 HistoryToolBar.Show;
3675 FavoriteToolBar.Hide;
3677 CabinetSelectToolButton.Caption := '
\97\9a\97ð
\83\8a\83X
\83g';
3681 procedure TGikoForm.SetHistoryTreeNode;
3685 Item: TFavoriteThreadItem;
3687 TreeView.Items.BeginUpdate;
3689 TreeView.Items.Clear;
3690 for i := 0 to FHistoryList.Count - 1 do begin
3691 Item := TFavoriteThreadItem(FHistoryList[i]);
3692 Node := TreeView.Items.Add(nil, Item.Title);
3694 if Item.Item.NewArrival then begin
3695 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3696 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3698 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3699 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3702 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
3703 //
\81¦Item.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
3704 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3705 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3709 TreeView.Items.EndUpdate;
3713 procedure TGikoForm.SelectTreeNode(Item: TObject; CallEvent: Boolean);
3715 ChangeEvent: TTVChangedEvent;
3716 ChangingEvent: TTVChangingEvent;
3720 if Item is TCategory then
3721 bbs := TCategory( Item ).ParenTBBS
3722 else if Item is TBoard then
3723 bbs := TBoard( Item ).ParentCategory.ParenTBBS
3727 if (FTreeType = gtt2ch) and (FActiveBBS = bbs) then begin
3729 ChangingEvent := nil;
3731 if not CallEvent then begin
3732 ChangeEvent := TreeView.OnChange;
3733 ChangingEvent := TreeView.OnChanging;
3736 if not CallEvent then begin
3737 TreeView.OnChange := nil;
3738 TreeView.OnChanging := nil;
3740 Application.ProcessMessages;
3741 for i := 0 to TreeView.Items.Count - 1 do begin
3742 if TreeView.Items[i].Data = Item then begin
3743 TreeView.Items[i].Selected := True;
3745 TreeViewChange(TreeView, TreeView.Items[i]);
3749 Application.ProcessMessages;
3751 if not CallEvent then begin
3752 TreeView.OnChange := ChangeEvent;
3753 TreeView.OnChanging := ChangingEvent;
3757 if GetActiveList is TBBS then begin
3758 for i := 0 to ListView.Columns.Count - 1 do
3759 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
3760 end else if GetActiveList is TCategory then begin
3761 for i := 0 to ListView.Columns.Count - 1 do
3762 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
3763 end else if GetActiveList is TBoard then begin
3764 for i := 0 to ListView.Columns.Count - 1 do
3765 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
3768 if (Item is TBBS) or (Item is TCategory) then begin
3769 SetActiveList( Item );
3770 end else if Item is TBoard then begin
3771 if not TBoard( Item ).IsThreadDatRead then begin
3772 Screen.Cursor := crHourGlass;
3774 GikoSys.ReadSubjectFile(TBoard( Item ));
3776 Screen.Cursor := crDefault;
3779 SetActiveList( Item );
3784 procedure TGikoForm.ListViewMouseDown(Sender: TObject;
3785 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
3789 { if ssDouble in Shift then begin
3790 DoubleClickOccurred[Button] := True;
3792 DoubleClickOccurred[Button] := False;
3793 t := GetTickCount+GetDoubleClickTime;
3794 while GetTickCount < t do begin
3795 Application.ProcessMessages;
3796 if DoubleClickOccurred[Button] then
3801 if ssDouble in Shift then begin
3803 mbLeft: ListDoubleClick;
3816 procedure TGikoForm.ListClick;
3818 ListItem: TListItem;
3819 ThreadItem: TThreadItem;
3821 if ListView.SelCount <> 1 then Exit;
3822 ListItem := ListView.Selected;
3823 if ListItem = nil then Exit;
3824 if not (TObject(ListItem.Data) is TThreadItem) then Exit;
3826 ThreadItem := TThreadItem(ListItem.Data);
3827 if ThreadItem.IsLogFile then begin
3828 // if AddHistory(ThreadItem) then
3829 // SetContent(ThreadItem);
3830 InsertBrowserTab(ThreadItem);
3831 ListView.UpdateItems(ListItem.Index, ListItem.Index);
3833 // SetContent(ThreadItem);
3834 InsertBrowserTab(ThreadItem);
3838 procedure TGikoForm.ListDoubleClick;
3840 ThreadItem: TThreadItem;
3842 // PostMessage(ListView.Handle, WM_CANCELMODE, 0, 0);
3844 if ListView.Selected = nil then Exit;
3845 // if TreeView.Selected = nil then Exit;
3847 if TObject(ListView.Selected.Data) is TCategory then begin
3848 SelectTreeNode(ListView.Selected.Data, True);
3849 // TreeView.Selected.Expanded := True;
3850 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
3851 //TreeViewChange(nil, TreeView.Selected);
3852 end else if TObject(ListView.Selected.Data) is TBoard then begin
3853 SelectTreeNode(ListView.Selected.Data, True);
3854 // TreeView.Selected.Expanded := True;
3855 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
3856 //TreeViewChange(nil, TreeView.Selected);
3857 end else if TObject(ListView.Selected.Data) is TThreadItem then begin
3858 //if TObject(ListView.Selected.Data) is TThreadItem then begin
3859 ThreadItem := TThreadItem(ListView.Selected.Data);
3860 DownloadContent(ThreadItem);
3865 procedure TGikoForm.BrowserMovement(AName: string);
3869 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
3872 OleVariant(Browser.Document as IHTMLDocument2).body.scrollTop :=
3873 OleVariant(Browser.Document as IHTMLDocument2).anchors.item(nm).offsetTop;
3878 procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
3880 if TObject(Node.Data) is TBBS then begin
3881 TBBS(Node.Data).NodeExpand := False;
3882 end else if TObject(Node.Data) is TCategory then begin
3883 TCategory(Node.Data).NodeExpand := False;
3884 end else if TObject(Node.Data) is TBoard then begin
3885 TBoard(Node.Data).NodeExpand := False;
3889 procedure TGikoForm.MessageListViewResize(Sender: TObject);
3891 // MessageListView.Column[0].Width := MessageListView.ClientWidth - 16;
3894 procedure TGikoForm.SelectListItem(List: TList);
3896 // TmpTreeNode: TTreeNode;
3897 TmpListItem: TListItem;
3900 TmpListItem := ListView.Selected;
3901 while TmpListItem <> nil do begin
3902 List.Add(TmpListItem.Data);
3903 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
3907 procedure TGikoForm.ExitActionExecute(Sender: TObject);
3912 procedure TGikoForm.AllSelectActionExecute(Sender: TObject);
3917 procedure TGikoForm.StdToolBarVisibleActionExecute(Sender: TObject);
3919 CoolBand: TCoolBand;
3921 CoolBand := GetCoolBand(MainCoolBar, StdToolBar);
3922 if CoolBand = nil then
3924 GikoSys.Setting.StdToolBarVisible := StdToolBarVisibleAction.Checked;
3925 CoolBand.Visible := GikoSys.Setting.StdToolBarVisible;
3926 // StdToolBar.Visible := StdToolBarVisibleAction.Checked;
3927 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
3929 //StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
3930 StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible;
3933 procedure TGikoForm.AddressBarVisibleActionExecute(Sender: TObject);
3935 CoolBand: TCoolBand;
3937 CoolBand := GetCoolBand(MainCoolBar, AddressToolBar);
3938 if CoolBand = nil then
3940 GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked;
3941 CoolBand.Visible := GikoSys.Setting.AddressBarVisible;
3942 //AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
3943 AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible;
3946 procedure TGikoForm.LinkBarVisibleActionExecute(Sender: TObject);
3948 CoolBand: TCoolBand;
3950 CoolBand := GetCoolBand(MainCoolBar, LinkToolBar);
3951 if CoolBand = nil then
3953 GikoSys.Setting.LinkBarVisible := LinkBarVisibleAction.Checked;
3954 CoolBand.Visible := GikoSys.Setting.LinkBarVisible;
3955 //LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
3956 LinkToolBarVisiblePMenu.Checked := GikoSys.Setting.LinkBarVisible;
3959 procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);
3961 CoolBand: TCoolBand;
3963 CoolBand := GetCoolBand(ListCoolBar, ListToolBar);
3964 if CoolBand = nil then
3966 CoolBand.Visible := ListToolBarVisibleAction.Checked;
3967 // ListToolBar.Visible := ListToolBarVisibleAction.Checked;
3968 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
3969 GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;
3972 procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);
3974 CoolBand: TCoolBand;
3976 CoolBand := GetCoolBand(ListCoolBar, ListNameToolBar);
3977 if CoolBand = nil then
3979 CoolBand.Visible := ListNameBarVisibleAction.Checked;
3980 GikoSys.Setting.ListNameBarVisible := ListNameBarVisibleAction.Checked;
3983 procedure TGikoForm.BrowserToolBarVisibleActionExecute(Sender: TObject);
3985 CoolBand: TCoolBand;
3987 CoolBand := GetCoolBand(BrowserCoolBar, BrowserToolBar);
3988 if CoolBand = nil then
3990 CoolBand.Visible := BrowserToolBarVisibleAction.Checked;
3991 // BrowserToolBar.Visible := BrowserToolBarVisibleAction.Checked;
3992 GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;
3995 procedure TGikoForm.BrowserNameBarVisibleActionExecute(Sender: TObject);
3997 CoolBand: TCoolBand;
3999 CoolBand := GetCoolBand(BrowserCoolBar, BrowserNameToolBar);
4000 if CoolBand = nil then
4002 CoolBand.Visible := BrowserNameBarVisibleAction.Checked;
4003 GikoSys.Setting.BrowserNameBarVisible := BrowserNameBarVisibleAction.Checked;
4006 procedure TGikoForm.MsgBarVisibleActionExecute(Sender: TObject);
4008 MessageSplitter.Visible := MsgBarVisibleAction.Checked;
4009 MessagePanel.Top := MessageSplitter.Top + MessageSplitter.Height;
4010 MessageSplitter.Top := MessagePanel.Top + 1;
4011 MessagePanel.Visible := MsgBarVisibleAction.Checked;
4012 GikoSys.Setting.MessageBarVisible := MsgBarVisibleAction.Checked;
4015 procedure TGikoForm.StatusBarVisibleActionExecute(Sender: TObject);
4017 StatusBar.Visible := StatusBarVisibleAction.Checked;
4018 GikoSys.Setting.StatusBarVisible := StatusBarVisibleAction.Checked;
4021 procedure TGikoForm.IconStyleExecute(Sender: TObject);
4023 case ListView.ViewStyle of
4024 vsIcon: SmallIconAction.Execute;
4025 vsSmallIcon: ListIconAction.Execute;
4026 vsList: DetailIconAction.Execute;
4027 vsReport: LargeIconAction.Execute;
4031 procedure TGikoForm.LargeIconActionExecute(Sender: TObject);
4033 ListView.ViewStyle := vsIcon;
4034 LargeIconAction.Checked := True;
4037 procedure TGikoForm.SmallIconActionExecute(Sender: TObject);
4039 ListView.ViewStyle := vsSmallIcon;
4040 SmallIconAction.Checked := True;
4043 procedure TGikoForm.ListIconActionExecute(Sender: TObject);
4045 ListView.ViewStyle := vsList;
4046 ListIconAction.Checked := True;
4049 procedure TGikoForm.DetailIconActionExecute(Sender: TObject);
4051 ListView.ViewStyle := vsReport;
4052 DetailIconAction.Checked := True;
4055 procedure TGikoForm.SearchActionExecute(Sender: TObject);
4060 if FSearchDialog = nil then begin
4061 if (GikoForm.GetActiveList is TCategory) or (GikoForm.GetActiveList is TBoard) then
4062 chk := GikoForm.GetActiveList
4066 FSearchDialog := TSearchDialog.Create(Self, chk);
4067 FSearchDialog.SearchComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
4077 procedure TGikoForm.OptionActionExecute(Sender: TObject);
4081 Dlg := TOptionDialog.Create(Self);
4089 procedure TGikoForm.GikoNaviWebPageActionExecute(Sender: TObject);
4091 URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
4093 GikoSys.OpenBrowser(URL_GIKONAVI, gbtAuto);
4096 procedure TGikoForm.MonazillaWebPageActionExecute(Sender: TObject);
4098 URL_MONAZILLA: string = 'http://www.monazilla.org/';
4100 GikoSys.OpenBrowser(URL_MONAZILLA, gbtAuto);
4103 procedure TGikoForm.BBS2chWebPageActionExecute(Sender: TObject);
4105 URL_2ch: string = 'http://www.2ch.net/';
4107 GikoSys.OpenBrowser(URL_2ch, gbtAuto);
4110 procedure TGikoForm.GikoFolderOpenActionExecute(Sender: TObject);
4112 // GikoSys.OpenBrowser(GikoSys.GetAppDir, gbtIE);
4113 GikoSys.CreateProcess('explorer.exe', '/e,"' + GikoSys.GetAppDir + '"');
4116 procedure TGikoForm.AboutActionExecute(Sender: TObject);
4120 Dlg := TAboutDialog.Create(Self);
4128 procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject);
4133 procedure TGikoForm.CabinetVisible( isVisible : Boolean );
4135 TreeSplitter.Visible := isVisible;
4136 CabinetPanel.Visible := isVisible;
4137 CabinetVisibleAction.Checked := isVisible;
4140 procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject);
4143 gttHistory: CabinetHistoryAction.Execute;
4144 gttFavorite: CabinetFavoriteAction.Execute;
4146 CabinetBBSAction.Execute;
4150 procedure TGikoForm.AllItemActionExecute(Sender: TObject);
4153 if ViewType <> gvtAll then
4154 SetListViewType(gvtAll);
4155 AllItemAction.Checked := True;
4156 LogItemAction.Checked := False;
4157 NewItemAction.Checked := False;
4158 //SelectItemAction.Checked := False;
4159 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4161 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4162 if SelectComboBox.Parent <> nil then begin
4163 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4164 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4171 procedure TGikoForm.LogItemActionExecute(Sender: TObject);
4174 if ViewType <> gvtLog then
4175 SetListViewType(gvtLog);
4176 AllItemAction.Checked := False;
4177 LogItemAction.Checked := True;
4178 NewItemAction.Checked := False;
4179 //SelectItemAction.Checked := False;
4180 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4182 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4183 if SelectComboBox.Parent <> nil then begin
4184 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4185 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4192 procedure TGikoForm.NewItemActionExecute(Sender: TObject);
4196 if ViewType <> gvtNew then
4197 SetListViewType(gvtNew);
4198 AllItemAction.Checked := False;
4199 LogItemAction.Checked := False;
4200 NewItemAction.Checked := True;
4201 //SelectItemAction.Checked := False;
4202 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4204 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4205 if SelectComboBox.Parent <> nil then begin
4206 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4207 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4214 procedure TGikoForm.SelectItemActionExecute(Sender: TObject);
4217 Dlg: TListSelectDialog;
4220 if SelectComboBox.Parent <> nil then begin
4221 if SelectComboBox.Left + SelectComboBox.Width < ListToolBar.Width then begin
4222 // SelectComboBox
\82ª
\82 \82é
\8fê
\8d\87\82Í
\83t
\83H
\81[
\83J
\83X
\82ð
\88Ú
\82·
4223 SelectComboBox.SetFocus;
4230 if SelectComboBox.Text = SELECTCOMBOBOX_NAME then begin
4231 SelectComboBox.Text := '';
4232 SelectComboBox.Color := clWindow;
4235 AllItemAction.Checked := False;
4236 LogItemAction.Checked := False;
4237 NewItemAction.Checked := False;
4238 //SelectItemAction.Checked := True;
4240 Dlg := TListSelectDialog.Create(Self);
4242 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
4243 Dlg.SelectComboBox.Text := SelectComboBox.Text;
4245 if Dlg.ModalResult = mrCancel then begin
4246 if Length( SelectComboBox.Text ) = 0 then begin
4247 AllItemAction.Checked := True;
4248 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4249 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4252 if GetActiveList is TBoard then
4253 SetListViewType(gvtUser, TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText , Dlg.KubetsuCheckBox.Checked);
4255 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
4257 GikoSys.Setting.SelectTextList.Delete(idx);
4258 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
4259 while Dlg.SelectComboBox.Items.Count > 100 do begin
4260 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
4263 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
4264 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4265 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4267 SelectComboBox.Text := Dlg.SelectComboBox.Text;
4268 SelectComboBox.Color := clWindow;
4270 SetListViewType(gvtUser, Dlg.SelectComboBox.Text, Dlg.KubetsuCheckBox.Checked);
4277 procedure TGikoForm.ListNumberVisibleActionExecute(Sender: TObject);
4279 GikoSys.Setting.ListViewNo := ListNumberVisibleAction.Checked;
4283 procedure TGikoForm.UpFolderActionExecute(Sender: TObject);
4285 if GetActiveList is TBoard then begin
4286 if FTreeType = gtt2ch then
4287 SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
4288 //SetActiveList(TBoard(GetActiveList).ParentCategory);
4289 end else if GetActiveList is TCategory then begin
4290 if FTreeType = gtt2ch then
4291 SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);
4292 //SetActiveList(TCategory(GetActiveList).ParenTBBS);
4294 // if TreeView.Selected = nil then Exit;
4295 // if TreeView.Selected.Level = 0 then Exit;
4296 // TreeView.Selected.Parent.Selected := True;
4299 procedure TGikoForm.RoundActionExecute(Sender: TObject);
4303 Dlg := TRoundDialog.Create(Self);
4311 procedure TGikoForm.StopActionExecute(Sender: TObject);
4313 FControlThread.DownloadAbort;
4314 if FWorkCount <> 0 then FWorkCount := 0;
4316 Animate.Active := False;
4319 Screen.Cursor := crDefault;
4322 procedure TGikoForm.MsgBarCloseActionExecute(Sender: TObject);
4324 // MessagePanel.Visible := False;
4325 // MessageSplitter.Visible := False;
4326 // MsgBarVisibleAction.Checked := False;
4327 MsgBarVisibleAction.Execute;
4330 procedure TGikoForm.BrowserMaxActionExecute(Sender: TObject);
4332 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4333 case GikoSys.Setting.ListWidthState of
4335 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4336 ViewPanel.Width := FBrowserSizeWidth;
4337 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4338 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4339 GikoSys.Setting.ListWidthState := glsNormal;
4341 glsMin, glsNormal: begin
4342 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4343 if GikoSys.Setting.ListWidthState = glsNormal then
4344 FBrowserSizeWidth := ViewPanel.Width;
4345 ViewPanel.Width := 1;
4346 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4347 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4348 GikoSys.Setting.ListWidthState := glsMax;
4352 case GikoSys.Setting.ListHeightState of
4354 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4355 ViewPanel.Height := FBrowserSizeHeight;
4356 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4357 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4358 GikoSys.Setting.ListHeightState := glsNormal;
4360 glsMin, glsNormal: begin
4361 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4362 if GikoSys.Setting.ListHeightState = glsNormal then
4363 FBrowserSizeHeight := ViewPanel.Height;
4364 ViewPanel.Height := 1;
4365 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4366 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4367 GikoSys.Setting.ListHeightState := glsMax;
4371 // Mouse.CursorPos := BrowserSizeButton.ClientToScreen(Point(
4372 // System.Round(BrowserToolBar.ButtonWidth div 2),
4373 // System.Round(BrowserToolBar.ButtonHeight div 2)));
4376 procedure TGikoForm.BrowserMinActionExecute(Sender: TObject);
4378 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4379 case GikoSys.Setting.ListWidthState of
4380 glsMax, glsNormal: begin
4381 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4382 if GikoSys.Setting.ListWidthState = glsNormal then
4383 FBrowserSizeWidth := ViewPanel.Width;
4384 ViewPanel.Width := ThreadMainPanel.Width - 80;
4385 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4386 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4387 GikoSys.Setting.ListWidthState := glsMin;
4390 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4391 ViewPanel.Width := FBrowserSizeWidth;
4392 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4393 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4394 GikoSys.Setting.ListWidthState := glsNormal;
4398 case GikoSys.Setting.ListHeightState of
4399 glsMax, glsNormal: begin
4400 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4401 if GikoSys.Setting.ListHeightState = glsNormal then
4402 FBrowserSizeHeight := ViewPanel.Height;
4403 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
4404 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4405 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4406 GikoSys.Setting.ListHeightState := glsMin;
4409 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4410 ViewPanel.Height := FBrowserSizeHeight;
4411 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4412 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4413 GikoSys.Setting.ListHeightState := glsNormal;
4419 procedure TGikoForm.ScrollTopActionExecute(Sender: TObject);
4421 BrowserMovement('top');
4424 procedure TGikoForm.ScrollLastActionExecute(Sender: TObject);
4426 BrowserMovement('bottom');
4429 procedure TGikoForm.ScrollNewActionExecute(Sender: TObject);
4431 BrowserMovement('new');
4434 procedure TGikoForm.ScrollKokoActionExecute(Sender: TObject);
4436 BrowserMovement('koko');
4439 procedure TGikoForm.EditorActionExecute(Sender: TObject);
4441 Editor: TEditorForm;
4445 Item := GetActiveContent;
4446 if Item = nil then Exit;
4448 if Item.Count >= 1000 then begin
4449 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
4450 + '
\90V
\83X
\83\8c\83b
\83h
\82ð
\92T
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
4451 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin
4455 Editor := TEditorForm.Create(Self);
4456 Editor.SetThreadItem(Item);
4458 Editor.BodyEdit.SetFocus;
4461 procedure TGikoForm.IEActionExecute(Sender: TObject);
4463 ShowThreadAction.Execute;
4466 procedure TGikoForm.ShowThreadActionExecute(Sender: TObject);
4468 ThreadItem: TThreadItem;
4470 ThreadItem := GetActiveContent;
4471 if ThreadItem = nil then Exit;
4472 GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
4475 procedure TGikoForm.ShowBoardActionExecute(Sender: TObject);
4477 ThreadItem: TThreadItem;
4479 ThreadItem := GetActiveContent;
4480 if ThreadItem = nil then Exit;
4481 GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
4484 //(Thread)URL
\82ð
\83R
\83s
\81[
4485 procedure TGikoForm.URLCopyActionExecute(Sender: TObject);
4490 if TObject(GetActiveContent) is TBoard then
4491 s := s + TBoard(GetActiveContent).URL + #13#10
4492 else if TObject(GetActiveContent) is TThreadItem then
4493 s := s + TThreadItem(GetActiveContent).URL + #13#10;
4495 Clipboard.AsText := s;
4498 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ð
\83R
\83s
\81[
4499 procedure TGikoForm.NameCopyActionExecute(Sender: TObject);
4504 if TObject(GetActiveContent) is TBoard then
4505 s := s + TBoard(GetActiveContent).Title + #13#10
4506 else if TObject(GetActiveContent) is TThreadItem then
4507 s := s + TThreadItem(GetActiveContent).Title + #13#10;
4509 Clipboard.AsText := s;
4512 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ÆURL
\82ð
\83R
\83s
\81[
4513 procedure TGikoForm.NameURLCopyActionExecute(Sender: TObject);
4518 if TObject(GetActiveContent) is TBoard then
4519 s := s + TBoard(GetActiveContent).Title + #13#10 + TBoard(GetActiveContent).URL + #13#10
4520 else if TObject(GetActiveContent) is TThreadItem then
4521 s := s + TThreadItem(GetActiveContent).Title + #13#10 + TThreadItem(GetActiveContent).URL + #13#10;
4523 Clipboard.AsText := s;
4526 procedure TGikoForm.ItemReloadActionExecute(Sender: TObject);
4528 ThreadItem: TThreadItem;
4530 ThreadItem := GetActiveContent;
4531 if ThreadItem <> nil then
4532 DownloadContent(ThreadItem);
4535 procedure TGikoForm.SelectListReloadActionExecute(Sender: TObject);
4541 if GetActiveList is TCategory then begin
4542 List := TList.Create;
4544 SelectListItem(List);
4545 if List.Count > 5 then begin
4546 msg := '5
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
4547 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
4548 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
4551 for i := 0 to List.Count - 1 do begin
4552 if TObject(List[i]) is TBoard then
4553 DownloadList(TBoard(List[i]));
4558 end else if GetActiveList is TBoard then begin
4559 DownloadList(TBoard(GetActiveList));
4563 procedure TGikoForm.SelectThreadReloadActionExecute(Sender: TObject);
4569 List := TList.Create;
4571 SelectListItem(List);
4572 if List.Count > 10 then begin
4573 msg := '10
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
4574 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
4575 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
4578 for i := 0 to List.Count - 1 do begin
4579 if TObject(List[i]) is TThreadItem then
4580 DownloadContent(TThreadItem(List[i]));
4587 procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);
4589 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
4590 SelectListReloadAction.Enabled := True
4591 else if GetActiveList is TBoard then
4592 SelectListReloadAction.Enabled := True
4594 SelectListReloadAction.Enabled := False;
4597 procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);
4599 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
4600 SelectThreadReloadAction.Enabled := True
4602 SelectThreadReloadAction.Enabled := False;
4605 procedure TGikoForm.AllItemActionUpdate(Sender: TObject);
4607 AllItemAction.Enabled := (GetActiveList is TBoard);
4610 procedure TGikoForm.LogItemActionUpdate(Sender: TObject);
4612 LogItemAction.Enabled := (GetActiveList is TBoard);
4615 procedure TGikoForm.NewItemActionUpdate(Sender: TObject);
4617 NewItemAction.Enabled := (GetActiveList is TBoard);
4620 procedure TGikoForm.SelectItemActionUpdate(Sender: TObject);
4622 SelectItemAction.Enabled := (GetActiveList is TBoard);
4625 procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
4627 UpFolderAction.Enabled := not (GetActiveList is TBBS);
4630 procedure TGikoForm.ThreadEditorActionUpdate(Sender: TObject);
4632 ThreadEditorAction.Enabled := (GetActiveList is TBoard);
4635 procedure TGikoForm.FormResize(Sender: TObject);
4637 MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
4638 MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
4641 procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject);
4643 ScrollTopAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
4646 procedure TGikoForm.ScrollLastActionUpdate(Sender: TObject);
4648 ScrollLastAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
4651 procedure TGikoForm.ScrollNewActionUpdate(Sender: TObject);
4653 ScrollNewAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
4656 procedure TGikoForm.ScrollKokoActionUpdate(Sender: TObject);
4658 ScrollKokoAction.Enabled := (GetActiveContent <> nil)
4659 and (GetActiveContent.IsLogFile)
4660 and (GetActiveContent.Kokomade <> -1);
4664 procedure TGikoForm.EditorActionUpdate(Sender: TObject);
4666 EditorAction.Enabled := GetActiveContent <> nil;
4669 procedure TGikoForm.IEActionUpdate(Sender: TObject);
4671 IEAction.Enabled := GetActiveContent <> nil;
4674 procedure TGikoForm.ShowThreadActionUpdate(Sender: TObject);
4676 ShowThreadAction.Enabled := GetActiveContent <> nil;
4679 procedure TGikoForm.ShowBoardActionUpdate(Sender: TObject);
4681 ShowBoardAction.Enabled := GetActiveContent <> nil;
4684 procedure TGikoForm.ItemReloadActionUpdate(Sender: TObject);
4686 ItemReloadAction.Enabled := GetActiveContent <> nil;
4689 procedure TGikoForm.URLCopyActionUpdate(Sender: TObject);
4691 URLCopyAction.Enabled := GetActiveContent <> nil;
4694 procedure TGikoForm.NameCopyActionUpdate(Sender: TObject);
4696 NameCopyAction.Enabled := GetActiveContent <> nil;
4699 procedure TGikoForm.NameURLCopyActionUpdate(Sender: TObject);
4701 NameURLCopyAction.Enabled := GetActiveContent <> nil;
4704 procedure TGikoForm.BrowserTabCloseActionUpdate(Sender: TObject);
4706 BrowserTabCloseAction.Enabled := GetActiveContent <> nil;
4709 procedure TGikoForm.NotSelectTabCloseActionUpdate(Sender: TObject);
4711 NotSelectTabCloseAction.Enabled := GetActiveContent <> nil;
4714 procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
4716 AllTabCloseAction.Enabled := GetActiveContent <> nil;
4719 procedure TGikoForm.ActiveLogDeleteActionUpdate(Sender: TObject);
4721 ActiveLogDeleteAction.Enabled := GetActiveContent <> nil;
4724 procedure TGikoForm.ListViewSelectItem(Sender: TObject; Item: TListItem;
4727 SelectTimer.Enabled := False;
4729 SelectTimer.Enabled := True;
4732 procedure TGikoForm.SelectTimerTimer(Sender: TObject);
4734 SelectTimer.Enabled := False;
4738 procedure TGikoForm.ListViewDblClick(Sender: TObject);
4743 procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
4745 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';
4746 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
4748 ThreadItem: TThreadItem;
4749 TmpListItem: TListItem;
4753 List := TList.Create;
4755 TmpListItem := ListView.Selected;
4756 while TmpListItem <> nil do begin
4757 if TObject(TmpListItem.Data) is TThreadItem then begin
4758 ThreadItem := TThreadItem(TmpListItem.Data);
4759 if ThreadItem.IsLogFile then
4760 List.Add(ThreadItem);
4762 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
4765 if GikoSys.Setting.DeleteMsg and (List.Count > 0) then begin
4766 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
4770 for i := 0 to List.Count - 1 do begin
4771 ThreadItem := TThreadItem(List[i]);
4772 DeleteHistory(ThreadItem);
4773 DeleteTab(ThreadItem);
4774 ThreadItem.DeleteLogFile;
4782 procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
4786 FTabHintIndex := -1;
4787 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
4788 if TThreadItem(BrowserTab.Tabs.Objects[i]) = ThreadItem then begin
4789 BrowserTab.Tabs.Delete(i);
4790 if i > (BrowserTab.Tabs.Count - 1) then
4791 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1
4793 BrowserTab.TabIndex := i;
4794 if BrowserTab.Tabs.Count = 0 then
4796 else if BrowserTab.TabIndex <> -1 then
4797 SetContent(TThreadItem(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]));
4803 procedure TGikoForm.KokomadeActionExecute(Sender: TObject);
4806 ThreadItem: TThreadItem;
4811 No := KokoPopupMenu.Tag;
4812 if No = 0 then Exit;
4813 ThreadItem := GetActiveContent;
4814 if ThreadItem = nil then Exit;
4815 ThreadItem.Kokomade := No;
4816 doc := Browser.Document;
4817 ScrollTop := doc.Body.ScrollTop;
4819 GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
4820 // HtmlName := GikoSys.CreateHTML(ThreadItem, sTitle) + '#koko';
4822 // Browser.Navigate(HtmlName, Flags);
4824 Application.ProcessMessages;
4825 doc.Body.ScrollTop := ScrollTop;
4828 procedure TGikoForm.ZenbuActionExecute(Sender: TObject);
4830 ThreadItem: TThreadItem;
4835 ThreadItem := GetActiveContent;
4836 if ThreadItem = nil then Exit;
4837 ThreadItem.Kokomade := -1;
4838 doc := Browser.Document;
4839 ScrollTop := doc.Body.ScrollTop;
4840 GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
4841 // HtmlName := GikoSys.CreateHTML(ThreadItem, sTitle) + '#koko';
4843 // Browser.Navigate(HtmlName, Flags);
4845 Application.ProcessMessages;
4846 doc.Body.ScrollTop := ScrollTop;
4849 function TGikoForm.Hook(var Message: TMessage): Boolean;
4852 if Message.Msg = CM_APPKEYDOWN then Result := True;
4855 procedure TGikoForm.KokoResActionExecute(Sender: TObject);
4857 Editor: TEditorForm;
4862 Number := KokoPopupMenu.Tag;
4863 if Number = 0 then Exit;
4864 Item := GetActiveContent;
4865 if Item = nil then Exit;
4867 if Item.Count >= 1000 then begin
4868 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
4869 + '
\90V
\83X
\83\8c\83b
\83h
\82ð
\92T
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
4870 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin
4874 Editor := TEditorForm.Create(Self);
4875 Editor.SetThreadItem(Item);
4876 Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
4878 Editor.BodyEdit.SetFocus;
4881 procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
4883 ItemRoundPMenu.Visible := (GetActiveList is TBoard);
4884 ItemReservPMenu.Visible := (GetActiveList is TBoard);
4885 LPMSep01.Visible := (GetActiveList is TBoard);
4886 ListRoundPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
4887 ListReservPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
4888 LPMSep02.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4889 KidokuPMenu.Visible := (GetActiveList is TBoard);
4890 MidokuPMenu.Visible := (GetActiveList is TBoard);
4891 UrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4892 NameUrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4893 AllSelectPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4894 LPMSep05.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4895 DeletePMenu.Visible := (GetActiveList is TBoard);
4896 LPMSep06.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4898 BoardFavoriteAddMenu.Visible := (GetActiveList is TCategory);
4899 ThreadFavoriteAddMenu.Visible := (GetActiveList is TBoard);
4901 AddRoundNameMenu(ItemReservPMenu);
4902 AddRoundNameMenu(ListReservPMenu);
4905 procedure TGikoForm.BoardIEActionExecute(Sender: TObject);
4909 if GetActiveList is TBoard then begin
4910 URL := TBoard(GetActiveList).URL;
4911 GikoSys.OpenBrowser(URL, gbtAuto);
4915 procedure TGikoForm.SelectItemURLCopyActionExecute(Sender: TObject);
4922 List := TList.Create;
4924 SelectListItem(List);
4925 for i := 0 to List.Count - 1 do begin
4926 if TObject(List[i]) is TBoard then
4927 s := s + TBoard(List[i]).URL + #13#10
4928 else if TObject(List[i]) is TThreadItem then
4929 s := s + TThreadItem(List[i]).URL + #13#10;
4932 Clipboard.AsText := s;
4938 procedure TGikoForm.SelectItemNameCopyActionExecute(Sender: TObject);
4945 List := TList.Create;
4947 SelectListItem(List);
4948 for i := 0 to List.Count - 1 do begin
4949 if TObject(List[i]) is TBoard then
4950 s := s + TBoard(List[i]).Title + #13#10
4951 else if TObject(List[i]) is TThreadItem then
4952 s := s + TThreadItem(List[i]).Title + #13#10;
4955 Clipboard.AsText := s;
4961 procedure TGikoForm.SelectItemNameURLCopyActionExecute(Sender: TObject);
4968 List := TList.Create;
4970 SelectListItem(List);
4971 for i := 0 to List.Count - 1 do begin
4972 if TObject(List[i]) is TBoard then
4973 s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10
4974 else if TObject(List[i]) is TThreadItem then
4975 s := s + TThreadItem(List[i]).Title + #13#10 + TThreadItem(List[i]).URL + #13#10;
4978 Clipboard.AsText := s;
4984 procedure TGikoForm.BoardIEActionUpdate(Sender: TObject);
4986 if GetActiveList is TBoard then
4987 BoardIEAction.Enabled := True
4989 BoardIEAction.Enabled := False;
4992 procedure TGikoForm.SelectItemURLCopyActionUpdate(Sender: TObject);
4994 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
4995 SelectItemURLCopyAction.Enabled := True
4997 SelectItemURLCopyAction.Enabled := False;
5000 procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
5002 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5003 SelectItemNameCopyAction.Enabled := True
5005 SelectItemNameCopyAction.Enabled := False;
5008 procedure TGikoForm.SelectItemNameURLCopyActionUpdate(Sender: TObject);
5010 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5011 SelectItemNameURLCopyAction.Enabled := True
5013 SelectItemNameURLCopyAction.Enabled := False;
5016 procedure TGikoForm.AllSelectActionUpdate(Sender: TObject);
5018 if ListView.SelCount > 0 then
5019 AllSelectAction.Enabled := True
5021 AllSelectAction.Enabled := False;
5024 procedure TGikoForm.LogDeleteActionUpdate(Sender: TObject);
5026 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5027 LogDeleteAction.Enabled := True
5029 LogDeleteAction.Enabled := False;
5032 procedure TGikoForm.BrowserTabCloseActionExecute(Sender: TObject);
5035 ThreadItem: TThreadItem;
5037 idx := BrowserTab.TabIndex;
5038 if idx <> -1 then begin
5039 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5040 DeleteTab(ThreadItem);
5044 procedure TGikoForm.NotSelectTabCloseActionExecute(Sender: TObject);
5048 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
5049 if BrowserTab.TabIndex <> i then begin
5050 BrowserTab.Tabs.Delete(i);
5055 procedure TGikoForm.AllTabCloseActionExecute(Sender: TObject);
5059 for i := BrowserTab.Tabs.Count - 1 downto 0 do
5060 BrowserTab.Tabs.Delete(i);
5064 procedure TGikoForm.TreeSelectBoradReloadExecute(Sender: TObject);
5067 TmpTreeNode: TTreeNode;
5069 TmpTreeNode := FClickNode;
5070 TreeView.Selected := FClickNode;
5071 if TObject(TmpTreeNode.Data) is TBoard then begin
5072 Board := TBoard(TmpTreeNode.Data);
5073 DownloadList(Board);
5077 procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject);
5079 ThreadItem: TThreadItem;
5080 TmpTreeNode: TTreeNode;
5082 TmpTreeNode := FClickNode;
5083 TreeView.Selected := FClickNode;
5084 if TObject(TmpTreeNode.Data) is TThreadItem then begin
5085 ThreadItem := TThreadItem(TmpTreeNode.Data);
5086 DownloadContent(ThreadItem);
5090 procedure TGikoForm.TreeSelectURLCopyExecute(Sender: TObject);
5092 TmpTreeNode: TTreeNode;
5095 TmpTreeNode := FClickNode;
5096 TreeView.Selected := FClickNode;
5097 if TObject(TmpTreeNode.Data) is TBoard then begin
5098 s := TBoard(TmpTreeNode.Data).URL + #13#10;
5099 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5100 s := TThreadItem(TmpTreeNode.Data).URL + #13#10;
5102 Clipboard.AsText := s;
5105 procedure TGikoForm.TreeSelectNameURLCopyExecute(Sender: TObject);
5107 TmpTreeNode: TTreeNode;
5110 TmpTreeNode := FClickNode;
5111 TreeView.Selected := FClickNode;
5112 if TObject(TmpTreeNode.Data) is TBoard then begin
5113 s := TBoard(TmpTreeNode.Data).Title + #13#10 + TBoard(TmpTreeNode.Data).URL + #13#10;
5114 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5115 s := TThreadItem(TmpTreeNode.Data).Title + #13#10 + TThreadItem(TmpTreeNode.Data).URL + #13#10;
5117 Clipboard.AsText := s;
5121 procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
5123 FClickNode := TreeView.Selected;
5124 if FClickNode = nil then begin
5125 TreeSelectThreadPupupMenu.Visible := False;
5126 TreeSelectBoardPupupMenu.Visible := False;
5127 TPMSep01.Visible := False;
5128 TreeSelectURLPupupMenu.Visible := False;
5129 TreeSelectNameURLPupupMenu.Visible := False;
5130 TreeSelectFavoriteAddPupupMenu.Visible := False;
5131 end else if TObject(FClickNode.Data) is TBoard then begin
5132 TreeSelectThreadPupupMenu.Visible := False;
5133 TreeSelectBoardPupupMenu.Visible := True;
5134 TPMSep01.Visible := True;
5135 TreeSelectURLPupupMenu.Visible := True;
5136 TreeSelectNameURLPupupMenu.Visible := True;
5137 TreeSelectFavoriteAddPupupMenu.Visible := True;
5138 end else if (TObject(FClickNode.Data) is TThreadItem) then begin
5139 TreeSelectThreadPupupMenu.Visible := True;
5140 TreeSelectBoardPupupMenu.Visible := False;
5141 TPMSep01.Visible := True;
5142 TreeSelectURLPupupMenu.Visible := True;
5143 TreeSelectNameURLPupupMenu.Visible := True;
5144 TreeSelectFavoriteAddPupupMenu.Visible := True;
5146 TreeSelectThreadPupupMenu.Visible := False;
5147 TreeSelectBoardPupupMenu.Visible := False;
5148 TPMSep01.Visible := False;
5149 TreeSelectURLPupupMenu.Visible := False;
5150 TreeSelectNameURLPupupMenu.Visible := False;
5151 TreeSelectFavoriteAddPupupMenu.Visible := False;
5155 procedure TGikoForm.BrowserNewWindow2(Sender: TObject;
5156 var ppDisp: IDispatch; var Cancel: WordBool);
5165 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
5166 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
5167 Html := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
5169 URL := GikoSys.GetHRefText(Html);
5170 URL := GikoSys.HTMLDecode(URL);
5172 //
\83A
\83h
\83\8c\83X
\83o
\81[
\82Ì
\97\9a\97ð
5173 if GikoSys.Setting.LinkAddAddressBar then begin
5174 idx := AddressComboBox.Items.IndexOf(URL);
5175 if idx = -1 then begin
5176 AddressComboBox.Items.Insert(0, URL);
5177 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
5178 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
5180 AddressComboBox.Items.Delete(idx);
5181 AddressComboBox.Items.Insert(0, URL);
5188 { ShiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5189 CtrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
5192 Memo1.Lines.Add('ShiftDown');
5194 Memo1.Lines.Add('CtrlDown');
5196 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
5197 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
5198 Url := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
5202 URL := GetHRefText(URL);
5204 ParseURI(URL, Protocol, Host, path, Document, Port, Bookmark);
5206 b := Parse2chURL(path, document, bbs, num);
5207 memo1.Lines.Add('bbs: ' + bbs);
5208 memo1.Lines.Add('key: ' + num);
5210 Memo1.Lines.Add('Parse2chURL: True')
5212 Memo1.Lines.Add('Parse2chURL: False');
5214 // AppPath := 'C:\Borland\Projects\Test\TestBrowser\TestBrowser.exe';
5219 procedure TGikoForm.ListSplitterCanResize(Sender: TObject;
5220 var NewSize: Integer; var Accept: Boolean);
5222 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5223 if ViewPanel.Width < 2 then begin
5224 ViewPanel.Width := 1;
5225 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5226 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5227 GikoSys.Setting.ListWidthState := glsMax;
5228 end else if ViewPanel.Width > (ThreadMainPanel.Width - 80) then begin
5229 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5230 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5231 GikoSys.Setting.ListWidthState := glsMin;
5233 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5234 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5235 GikoSys.Setting.ListWidthState := glsNormal;
5238 if ViewPanel.Height < 2 then begin
5239 ViewPanel.Height := 1;
5240 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5241 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5242 GikoSys.Setting.ListHeightState := glsMax;
5243 end else if ViewPanel.Height > (ThreadMainPanel.Height - BrowserCoolBar.Height - 7) then begin
5244 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5245 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5246 GikoSys.Setting.ListHeightState := glsMin;
5248 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5249 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5250 GikoSys.Setting.ListHeightState := glsNormal;
5255 procedure TGikoForm.ListSplitterMoved(Sender: TObject);
5257 if Mouse.Capture <> 0 then
5259 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5260 if (ViewPanel.Width > 1) and (ViewPanel.Width <= (ThreadMainPanel.Width - 80)) then
5261 FBrowserSizeWidth := ViewPanel.Width;
5263 if (ViewPanel.Height > 1) and (ViewPanel.Height <= (ThreadMainPanel.Height - BrowserCoolBar.Height)) then
5264 FBrowserSizeHeight := ViewPanel.Height;
5266 { if (Mouse.Capture = 0) and (ViewPanel.Height > 1) and (not ArrangeAction.Checked) then
5267 FBrowserSizeHeight := ViewPanel.Height
5268 else if (Mouse.Capture = 0) and (ViewPanel.Width > 1) and (ArrangeAction.Checked) then
5269 FBrowserSizeWidth := ViewPanel.Width;}
5272 procedure TGikoForm.BrowserTabChange(Sender: TObject);
5275 ThreadItem: TThreadItem;
5278 // if NewTab = -1 then
5279 if not BrowserTab.Dragging then begin
5280 FTabHintIndex := -1;
5281 BrowserTab.Hint := '';
5282 idx := BrowserTab.TabIndex;
5284 SetContent(BrowserNullTab)
5285 else if BrowserTab.Tabs.Objects[idx] is TThreadItem then begin
5286 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5287 SetContent(ThreadItem);
5288 if GikoSys.Setting.URLDisplay then
5289 AddressComboBox.Text := ThreadItem.URL;
5293 procedure TGikoForm.BrowserTabClick(Sender: TObject);
5296 ThreadItem: TThreadItem;
5298 // if NewTab = -1 then
5299 FTabHintIndex := -1;
5300 BrowserTab.Hint := '';
5301 idx := BrowserTab.TabIndex;
5303 SetContent(BrowserNullTab)
5304 else if BrowserTab.Tabs.Objects[idx] is TThreadItem then begin
5305 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5306 SetContent(ThreadItem);
5307 if GikoSys.Setting.URLDisplay then
5308 AddressComboBox.Text := ThreadItem.URL;
5312 procedure TGikoForm.BrowserTabMouseDown(Sender: TObject;
5313 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
5320 if Button = mbMiddle then begin
5321 //
\83}
\83E
\83X
\92\86\83{
\83^
\83\93
5324 p := BrowserTab.ScreenToClient(p);
5325 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
5326 if idx <> -1 then begin
5327 OldIndex := BrowserTab.TabIndex;
5328 BrowserTab.Tabs.Delete(idx);
5329 if idx = OldIndex then begin
5330 if BrowserTab.Tabs.Count > idx then
5331 BrowserTab.TabIndex := idx
5332 else if BrowserTab.Tabs.Count = idx then
5333 BrowserTab.TabIndex := idx - 1
5334 else if BrowserTab.Tabs.Count > 0 then
5335 BrowserTab.TabIndex := 0;
5336 BrowserTab.OnChange(nil);
5339 end else if Button = mbRight then begin
5340 //
\83}
\83E
\83X
\89E
\83{
\83^
\83\93
5343 // GetCursorPos(p2);
5344 p := BrowserTab.ScreenToClient(p);
5345 // idx := BrowserTab.ItemAtPos(p);
5346 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
5347 if idx <> -1 then begin
5348 OldIndex := BrowserTab.TabIndex;
5349 BrowserTab.TabIndex := idx;
5350 if OldIndex <> idx then
5351 BrowserTab.OnChange(nil);
5352 BrowserTabPopupMenu.Tag := idx;
5353 BrowserTabPopupMenu.Popup(p2.X, p2.Y);
5355 end else if BUtton = mbLeft then begin
5356 FDragWFirst := true;
5361 procedure TGikoForm.SetBrowserTabState;
5364 CoolBand: TCoolBand;
5366 BrowserBottomPanel.AutoSize := False;
5367 if GikoSys.Setting.BrowserTabVisible then begin
5368 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
5369 BrowserTab.Style := tsTabs;
5370 if GikoSys.Setting.BrowserTabPosition = gtpTop then
5371 BrowserTab.TabPosition := tpTop
5373 BrowserTab.TabPosition := tpBottom;
5374 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
5375 BrowserTab.TabPosition := tpTop;
5376 BrowserTab.Style := tsButtons;
5378 BrowserTab.TabPosition := tpTop;
5379 BrowserTab.Style := tsFlatButtons
5382 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
5383 BrowserTab.Parent := BrowserTabToolBar;
5384 BrowserBottomPanel.Hide;
5385 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
5386 if CoolBand <> nil then
5387 CoolBand.Visible := True;
5388 // BrowserTab.Parent := BrowserTopPanel;
5389 // BrowserTab.Parent := BrowserCoolBar;
5390 // BrowserTab.Top := 26;
5391 // BrowserTopPanel.Height := 44;
5394 BrowserTab.Parent := BrowserBottomPanel;
5395 BrowserTab.Top := 0;
5396 BrowserTab.Left := 0;
5397 BrowserBottomPanel.Show;
5398 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
5399 if CoolBand <> nil then
5400 CoolBand.Visible := False;
5401 // BrowserTopPanel.Height := 26;
5405 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
5406 if CoolBand <> nil then
5407 CoolBand.Visible := False;
5408 BrowserBottomPanel.Visible := False;
5409 // BrowserTab.Visible := False;
5410 // BrowserTopPanel.Height := 26;
5414 procedure TGikoForm.BrowserTabDragOver(Sender, Source: TObject; X,
5415 Y: Integer; State: TDragState; var Accept: Boolean);
5419 idx := BrowserTab.IndexOfTabAt(X, Y);
5420 Accept := (Source = BrowserTab) and (BrowserTab.TabIndex <> idx);
5423 procedure TGikoForm.BrowserTabDragDrop(Sender, Source: TObject; X,
5428 idx := BrowserTab.IndexOfTabAt(X, Y);
5430 BrowserTab.Tabs.Move(BrowserTab.TabIndex, idx);
5433 procedure TGikoForm.BrowserTabMouseMove(Sender: TObject;
5434 Shift: TShiftState; X, Y: Integer);
5437 ThreadItem: TThreadItem;
5440 TabIdx := BrowserTab.IndexOfTabAt(x, y);
5442 if ( ssLeft in Shift ) and ( BrowserTab.Style = tsTabs ) then begin
5443 if FDragWFirst = false then begin
5444 FDragWFirst := true;
5446 BrowserTab.EndDrag(false);
5447 BrowserTab.BeginDrag(false, DandD_THRESHOLD);
5448 FDragWFirst := false;
5451 BrowserTab.EndDrag(false);
5452 FDragWFirst := false;
5455 if (FTabHintIndex <> TabIdx) and (TabIdx <> -1) then begin
5456 Application.CancelHint;
5457 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[TabIdx]);
5458 if ThreadItem.Title <> BrowserTab.Tabs[TabIdx] then begin
5459 BrowserTab.Hint := ThreadItem.Title;
5460 Application.ShowHint := True;
5462 BrowserTab.Hint := '';
5463 Application.ShowHint := True;
5465 FTabHintIndex := TabIdx;
5470 procedure TGikoForm.BrowserDocumentComplete(Sender: TObject;
5471 const pDisp: IDispatch; var URL: OleVariant);
5473 FDispHtmlDocument: DispHTMLDocument;
5475 // AddMessageList('DocumentComplete', nil);
5476 FBrowserComplete := True;
5477 if FEvent <> nil then
5479 FDispHtmlDocument := Browser.Document as DispHTMLDocument;
5480 FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
5481 FEvent.OnContextMenu := OnDocumentContextMenu;
5485 procedure TGikoForm.SelectReservActionUpdate(Sender: TObject);
5490 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then begin
5491 List := TList.Create;
5493 SelectListItem(List);
5494 for i := 0 to List.Count - 1 do begin
5495 if TObject(List[i]) is TThreadItem then begin
5496 if TThreadItem(List[i]).IsLogFile then begin
5497 SelectReservAction.Enabled := True;
5502 SelectReservAction.Enabled := False;
5506 end else if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
5507 SelectReservAction.Enabled := True
5509 SelectReservAction.Enabled := False;
5512 procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
5514 AddRoundNameMenu(RoundNamePopupMenu.Items);
5517 procedure TGikoForm.AddRoundNameMenu(MenuItem: TMenuItem);
5523 Item := TMenuItem.Create(Self);
5524 Item.Caption := '
\90V
\82µ
\82¢
\96¼
\91O
\82Å
\8f\84\89ñ
\97\
\96ñ(&N)...';
5525 Item.OnClick := SelectNewRoundNameExecute;
5527 Item := TMenuItem.Create(Self);
5528 Item.Caption := '
\8f\84\89ñ
\83\8a\83X
\83g
\82©
\82ç
\8dí
\8f\9c(&D)';
5529 Item.OnClick := SelectDeleteRoundExecute;
5531 Item := TMenuItem.Create(Self);
5532 Item.Caption := '-';
5534 for i := 0 to RoundList.RoundNameList.Count - 1 do begin
5535 Item := TMenuItem.Create(Self);
5536 Item.Caption := RoundList.RoundNameList[i];
5537 Item.OnClick := SetSelectRoundName;
5542 procedure TGikoForm.SelectNewRoundNameExecute(Sender: TObject);
5545 Dlg: TRoundNameDialog;
5547 Dlg := TRoundNameDialog.Create(Self);
5550 if Dlg.ModalResult <> mrCancel then begin
5551 s := Trim(Dlg.RoundNameEdit.Text);
5552 RoundList.RoundNameList.Add(s);
5553 SetSelectItemRound(True, s);
5561 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
5566 List := TList.Create;
5568 SelectListItem(List);
5569 for i := 0 to List.Count - 1 do begin
5570 if TObject(List[i]) is TBoard then begin
5571 TBoard(List[i]).RoundName := RoundName;
5572 TBoard(List[i]).Round := RoundFlag;
5573 end else if TObject(List[i]) is TThreadItem then begin
5574 if TThreadItem(List[i]).IsLogFile then begin
5575 TThreadItem(List[i]).RoundName := RoundName;
5576 TThreadItem(List[i]).Round := RoundFlag;
5585 procedure TGikoForm.SelectDeleteRoundExecute(Sender: TObject);
5587 SetSelectItemRound(False, '');
5591 procedure TGikoForm.SelectReservActionExecute(Sender: TObject);
5593 //
\82±
\82Ì
\83R
\83\81\83\93\83g
\8dí
\8f\9c\82µ
\82Ä
\82Í
\91Ê
\96Ú
5596 procedure TGikoForm.SetSelectRoundName(Sender: TObject);
5598 MenuItem: TMenuItem;
5600 if Sender is TMenuItem then begin
5601 MenuItem := TMenuItem(Sender);
5602 SetSelectItemRound(True, StripHotKey(MenuItem.Caption));
5607 procedure TGikoForm.NewBoardActionExecute(Sender: TObject);
5609 Dlg: TNewBoardDialog;
5613 for i := 0 to Screen.CustomFormCount - 1 do begin
5614 if TObject(Screen.CustomForms[i]) is TEditorForm then begin
5615 Msg := '
\83\8c\83X
\83G
\83f
\83B
\83^
\82ð
\91S
\82Ä
\95Â
\82¶
\82Ä
\82
\82¾
\82³
\82¢';
5616 MsgBox(Handle, Msg, '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
5620 Dlg := TNewBoardDialog.Create(Self);
5628 procedure TGikoForm.LoginActionExecute(Sender: TObject);
5632 if GikoSys.Dolib.Connected then begin
5633 //
\83\8d\83O
\83A
\83E
\83g
5634 GikoSys.Dolib.Disconnect;
5635 LoginAction.Checked := False;
5636 AddMessageList('
\83\8d\83O
\83A
\83E
\83g
\82µ
\82Ü
\82µ
\82½', nil, gmiOK);
5637 LoginAction.Caption := '
\83\8d\83O
\83C
\83\93(&L)';
5639 TmpCursor := Screen.Cursor;
5640 Screen.Cursor := crHourGlass;
5642 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
5643 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
5644 GikoSys.Dolib.Password := GikoSys.Setting.Password;
5645 if GikoSys.Setting.ReadProxy then begin
5646 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
5647 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
5649 GikoSys.Dolib.ProxyAddress := '';
5650 GikoSys.Dolib.ProxyPort := 0;
5652 if GikoSys.Dolib.Connect then begin
5653 LoginAction.Checked := True;
5654 AddMessageList('
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
5655 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
5657 // 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);
5658 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
5660 LoginAction.Checked := False;
5661 LoginToolButton.Down := False;
5664 Screen.Cursor := TmpCursor;
5669 procedure TGikoForm.KeySettingActionExecute(Sender: TObject);
5671 Dlg: TKeySettingForm;
5673 Dlg := TKeySettingForm.Create(Self);
5675 if Dlg.ShowModal = mrOk then
5676 GikoSys.SaveKeySetting(ActionList);
5682 procedure TGikoForm.ArrangeActionExecute(Sender: TObject);
5684 if ArrangeAction.Checked then begin
5686 ViewPanel.Align := alNone;
5687 ListSplitter.Align := alNone;
5688 ThreadPanel.Align := alNone;
5690 ViewPanel.Width := FBrowserSizeWidth;
5691 ViewPanel.Align := alLeft;
5693 ListSplitter.Width := 5;
5694 ListSplitter.Align := alLeft;
5696 ViewPanel.Left := -10;
5698 ThreadPanel.Align := alClient;
5700 GikoSys.Setting.ListOrientation := gloHorizontal;
5701 case GikoSys.Setting.ListWidthState of
5703 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5704 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5705 ViewPanel.Width := 1;
5708 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5709 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5712 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5713 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5714 ViewPanel.Width := ThreadMainPanel.Width - 80;
5719 ViewPanel.Align := alNone;
5720 ListSplitter.Align := alNone;
5721 ThreadPanel.Align := alNone;
5723 ViewPanel.Height := FBrowserSizeHeight;
5724 ViewPanel.Align := alTop;
5726 ListSplitter.Height := 5;
5727 ListSplitter.Align := alTop;
5729 ViewPanel.Top := -10;
5731 ThreadPanel.Align := alClient;
5732 GikoSys.Setting.ListOrientation := gloVertical;
5733 case GikoSys.Setting.ListHeightState of
5735 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5736 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5737 ViewPanel.Height := 1;
5740 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5741 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5744 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5745 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5746 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
5753 procedure TGikoForm.PaneInitActionExecute(Sender: TObject);
5755 CabinetPanel.Width := 150;
5756 MessagePanel.Height := 40;
5758 FBrowserSizeWidth := 200;
5759 FBrowserSizeHeight := 200;
5760 if ArrangeAction.Checked then begin
5761 ViewPanel.Width := FBrowserSizeWidth;
5763 ViewPanel.Height := FBrowserSizeHeight;
5765 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5766 if GikoSys.Setting.ListHeightState = glsMax then begin
5767 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5768 GikoSys.Setting.ListHeightState := glsNormal;
5771 if GikoSys.Setting.ListWidthState = glsMax then begin
5772 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5773 GikoSys.Setting.ListWidthState := glsNormal;
5778 procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
5780 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';
5781 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
5784 ThreadItem: TThreadItem;
5786 idx := BrowserTab.TabIndex;
5787 if idx <> -1 then begin
5788 if GikoSys.Setting.DeleteMsg then
5789 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
5791 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5792 DeleteTab(ThreadItem);
5793 ThreadItem.DeleteLogFile;
5794 if ThreadItem.ParentBoard = FActiveList then
5799 function TGikoForm.GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
5804 if CoolBar = nil then
5806 for i := 0 to CoolBar.Bands.Count - 1 do begin
5807 if CoolBar.Bands[i].Control = Control then begin
5808 Result := CoolBar.Bands[i];
5814 procedure TGikoForm.BrowserTabToolBarResize(Sender: TObject);
5816 if BrowserTab.Parent = BrowserTabToolBar then
5817 BrowserTab.Width := BrowserTabToolBar.Width;
5820 procedure TGikoForm.SelectTextClearActionExecute(Sender: TObject);
5822 GikoSys.Setting.SelectTextList.Clear;
5823 SelectComboBox.Items.Clear;
5824 SelectComboBox.Text := '';
5825 SetListViewType( gvtAll );
5828 procedure TGikoForm.NameTextClearActionExecute(Sender: TObject);
5832 GikoSys.Setting.NameList.Clear;
5833 for i := 0 to Screen.CustomFormCount - 1 do begin
5834 if TObject(Screen.CustomForms[i]) is TEditorForm then
5835 TEditorForm(Screen.CustomForms[i]).NameComboBox.Items.Clear;
5839 procedure TGikoForm.MailTextClearActionExecute(Sender: TObject);
5843 GikoSys.Setting.MailList.Clear;
5844 for i := 0 to Screen.CustomFormCount - 1 do begin
5845 if TObject(Screen.CustomForms[i]) is TEditorForm then
5846 TEditorForm(Screen.CustomForms[i]).MailComboBox.Items.Clear;
5850 procedure TGikoForm.LeftmostTabSelectActionExecute(Sender: TObject);
5852 if BrowserTab.Tabs.Count > 0 then begin
5853 BrowserTab.TabIndex := 0;
5854 BrowserTab.OnChange(nil);
5858 procedure TGikoForm.LeftTabSelectActionExecute(Sender: TObject);
5860 if BrowserTab.Tabs.Count > 0 then begin
5861 if BrowserTab.TabIndex = -1 then begin
5862 BrowserTab.TabIndex := 0;
5863 BrowserTab.OnChange(nil);
5864 end else if BrowserTab.TabIndex > 0 then begin
5865 BrowserTab.TabIndex := BrowserTab.TabIndex - 1;
5866 BrowserTab.OnChange(nil);
5871 procedure TGikoForm.RightTabSelectActionExecute(Sender: TObject);
5873 if BrowserTab.Tabs.Count > 0 then begin
5874 if BrowserTab.TabIndex = -1 then begin
5875 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5876 BrowserTab.OnChange(nil);
5877 end else if BrowserTab.TabIndex < (BrowserTab.Tabs.Count - 1) then begin
5878 BrowserTab.TabIndex := BrowserTab.TabIndex + 1;
5879 BrowserTab.OnChange(nil);
5884 procedure TGikoForm.RightmostTabSelectActionExecute(Sender: TObject);
5886 if BrowserTab.Tabs.Count > 0 then begin
5887 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5888 BrowserTab.OnChange(nil);
5892 procedure TGikoForm.LeftmostTabSelectActionUpdate(Sender: TObject);
5894 LeftmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
5897 procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
5899 LeftTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
5902 procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);
5904 RightTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
5907 procedure TGikoForm.RightmostTabSelectActionUpdate(Sender: TObject);
5909 RightmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
5912 procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
5917 procedure TGikoForm.SetMenuFont;
5919 // GikoSys.MenuFont(MenuToolBar.Font);
5920 // MenuToolBar.Buttons[0].AutoSize := False;
5921 // MenuToolBar.Buttons[0].AutoSize := True;
5922 // MenuToolBar.Font.Color := clMenuText;
5923 GikoSys.MenuFont(MainCoolBar.Font);
5924 MenuToolBar.Buttons[0].AutoSize := False;
5925 MenuToolBar.Buttons[0].AutoSize := True;
5926 MainCoolBar.AutoSize := False;
5927 MainCoolBar.AutoSize := True;
5929 GikoSys.MenuFont(ListCoolBar.Font);
5930 GikoSys.MenuFont(BrowserCoolBar.Font);
5931 // MenuToolBar.Font.Color := clMenuText;
5934 procedure TGikoForm.FavoriteMenuClick(Sender: TObject);
5940 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\92Ç
\89Á
5941 NewMenu := TMenuItem.Create(MainMenu);
5942 NewMenu.Action := FavoriteAddAction;
5943 FavoriteMenu.Add(NewMenu);
5944 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\90®
\97\9d
5945 NewMenu := TMenuItem.Create(FavoriteMenu);
5946 NewMenu.Action := FavoriteArrangeAction;
5947 FavoriteMenu.Add(NewMenu);
5948 //
\83Z
\83p
\83\8c\81[
\83^
5949 NewMenu := TMenuItem.Create(FavoriteMenu);
5950 NewMenu.Caption := '-';
5951 FavoriteMenu.Add(NewMenu);
5953 CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
5956 procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
5961 for i := 0 to Node.Count - 1 do begin
5962 NewMenu := TFavoriteMenuItem.Create(Self);
5963 NewMenu.AutoHotkeys := maAutomatic;
5964 NewMenu.Caption := StringReplace(Node.Item[i].Text, '&', '&&', [rfReplaceAll]);
5965 TFavoriteMenuItem(NewMenu).Data := Node.Item[i].Data;
5966 MenuItem.Add(NewMenu);
5968 if TObject(Node.Item[i].Data) is TFavoriteFolder then begin
5969 NewMenu.ImageIndex := TOOL_ICON_FAV_FOLDER;
5970 CreateFavMenu(Node.Item[i], NewMenu);
5971 end else if TObject(Node.Item[i].Data) is TFavoriteBoardItem then begin
5972 NewMenu.ImageIndex := TOOL_ICON_FAV_BOARD;
5973 NewMenu.OnClick := FavoriteClick;
5974 end else if TObject(Node.Item[i].Data) is TFavoriteThreadItem then begin
5975 NewMenu.ImageIndex := TOOL_ICON_FAV_THREAD;
5976 NewMenu.OnClick := FavoriteClick;
5981 procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
5983 Dlg: TFavoriteAddDialog;
5985 ThreadItem: TThreadItem;
5987 FavThread: TFavoriteThreadItem;
5988 FavBoard: TFavoriteBoardItem;
5991 b := FavoriteTreeView.Items.Count - 1;
5992 if Item is TBoard then begin
5993 for i := 0 to b do begin
5994 if TObject(FavoriteTreeView.Items.Item[ i ].Data) is TFavoriteBoardItem then begin
5995 FavBoard := TFavoriteBoardItem( FavoriteTreeView.Items.Item[ i ].Data );
5996 Board := FavBoard.Item;
5998 if Board = Item then begin
5999 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
6006 Dlg := TFavoriteAddDialog.Create(Self);
6008 Dlg.SetBoard( TBoard(Item) );
6013 end else if Item is TThreadItem then begin
6014 for i := 0 to b do begin
6015 if TObject(FavoriteTreeView.Items.Item[ i ].Data) is TFavoriteThreadItem then begin
6016 FavThread := TFavoriteThreadItem( FavoriteTreeView.Items.Item[ i ].Data );
6017 ThreadItem := FavThread.Item;
6019 if ThreadItem = Item then begin
6020 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
6027 Dlg := TFavoriteAddDialog.Create(Self);
6029 Dlg.SetThreadItem( TThreadItem(Item) );
6040 procedure TGikoForm.FavoriteAddActionExecute(Sender: TObject);
6042 ShowFavoriteAddDialog(GetActiveContent);
6045 procedure TGikoForm.FavoriteClick(Sender: TObject);
6048 FavoriteClick( Sender, True );
6052 procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
6055 ThreadItem: TThreadItem;
6056 FavBoard: TFavoriteBoardItem;
6057 FavThread: TFavoriteThreadItem;
6061 if Sender is TFavoriteMenuItem then
6062 Item := TFavoriteMenuItem(Sender).Data
6063 else if Sender is TLinkToolButton then
6064 Item := TLinkToolButton(Sender).Data
6065 else if Sender is TTreeNode then
6066 Item := TTreeNode( Sender ).Data
6070 if TObject(Item) is TFavoriteBoardItem then begin
6071 FavBoard := TFavoriteBoardItem(Item);
6072 Board := FavBoard.Item;
6073 if Board <> nil then begin
6074 if (FTreeType = gtt2ch) and (FActiveBBS <> Board.ParentCategory.ParenTBBS) then
6075 ShowBBSTree( Board.ParentCategory.ParenTBBS );
6076 SelectTreeNode(Board, True);
6078 end else if TObject(Item) is TFavoriteThreadItem then begin
6079 FavThread := TFavoriteThreadItem(Item);
6080 ThreadItem := FavThread.Item;
6081 if ThreadItem <> nil then
6082 InsertBrowserTab(ThreadItem, ActiveTab);
6086 procedure TGikoForm.FavoriteAddActionUpdate(Sender: TObject);
6088 FavoriteAddAction.Enabled := (GetActiveContent <> nil);
6091 procedure TGikoForm.BoardFavoriteAddActionExecute(Sender: TObject);
6093 if TObject(ListView.Selected.Data) is TBoard then
6094 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
6097 procedure TGikoForm.BoardFavoriteAddActionUpdate(Sender: TObject);
6099 BoardFavoriteAddAction.Enabled := (GetActiveList is TCategory) and (ListView.SelCount > 0);
6102 procedure TGikoForm.ThreadFavoriteAddActionExecute(Sender: TObject);
6104 if TObject(ListView.Selected.Data) is TThreadItem then
6105 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
6108 procedure TGikoForm.ThreadFavoriteAddActionUpdate(Sender: TObject);
6110 ThreadFavoriteAddAction.Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
6113 procedure TGikoForm.TreeSelectFavoriteAddActionExecute(Sender: TObject);
6115 ShowFavoriteAddDialog(TObject(TreeView.Selected.Data));
6118 procedure TGikoForm.FavoriteArrangeActionExecute(Sender: TObject);
6120 Dlg: TFavoriteArrangeDialog;
6122 Dlg := TFavoriteArrangeDialog.Create(Self);
6131 procedure TGikoForm.BBSMenuItemOnClick(
6136 if Sender is TBBSMenuItem then
6137 ShowBBSTree( TBBSMenuItem( Sender ).Data );
6141 procedure TGikoForm.MainCoolBarResize(Sender: TObject);
6143 TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
6146 procedure TGikoForm.MoveToActionExecute(Sender: TObject);
6151 URL := Trim(AddressComboBox.Text);
6154 idx := AddressComboBox.Items.IndexOf(URL);
6155 if idx = -1 then begin
6156 AddressComboBox.Items.Insert(0, URL);
6157 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
6158 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
6160 AddressComboBox.Items.Delete(idx);
6161 AddressComboBox.Items.Insert(0, URL);
6165 procedure TGikoForm.MoveToURL(URL: string);
6167 protocol, host, path, document, port, bookmark : string;
6168 BBSID, BBSKey: string;
6170 ThreadItem: TThreadItem;
6173 tmpThread : TThreadItem;
6174 category : TCategory;
6175 categoryNode : TTreeNode;
6176 boardNode : TTreeNode;
6177 shiftDown : Boolean;
6181 //=====
\83v
\83\89\83O
\83C
\83\93
6183 bi := High( BoardPlugIns );
6184 for i := Low( BoardPlugIns ) to bi do begin
6185 if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
6186 case BoardPlugIns[ i ].AcceptURL( URL ) of
6189 tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL );
6190 boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
6191 Board := BBSsFindBoardFromURL( boardURL );
6192 if Board = nil then begin
6193 Board := TBoard.Create( tmpThread.BoardPlugIn, boardURL );
6194 category := TCategory.Create;
6195 category.Title := '(
\96¼
\8fÌ
\95s
\96¾)';
6196 category.Add( Board );
6197 //
\81¦
\8c\83\82µ
\82
\95Û
\97¯
\92\86
6198 //BBS2ch.Add( category );
6200 if FTreeType = gtt2ch then begin
6201 //
\94Â
\83\8a\83X
\83g
\82É
\93o
\98^
\82³
\82ê
\82Ä
\82¢
\82È
\82¢
\82Ì
\82Å
\83c
\83\8a\81[
\82É
\92Ç
\89Á
6202 // SetBoardTreeNode; 1
\8ds
\82Å
\8dÏ
\82Ü
\82¹
\82Ä
\82à
\82æ
\82µ
6203 categoryNode := TreeView.Items.AddChild(
6204 TreeView.Items.GetFirstNode, category.Title );
6205 categoryNode.Data := category;
6206 categoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
6207 categoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
6211 TreeView.Items.AddChild( categoryNode, Board.Title );
6212 boardNode.Data := Board;
6213 boardNode.ImageIndex := ITEM_ICON_BOARD1;
6214 boardNode.SelectedIndex := ITEM_ICON_BOARD2;
6219 if not Board.IsThreadDatRead then
6220 GikoSys.ReadSubjectFile( Board );
6223 ThreadItem := Board.Find( tmpThread.FileName );
6224 if ThreadItem = nil then begin
6225 ThreadItem := tmpThread;
6226 Board.Insert( 0, ThreadItem );
6227 if ActiveList is TBoard then begin
6228 if TBoard(ActiveList) = Board then
6229 ListView.Items.Count := ListView.Items.Count + 1;
6231 InsertBrowserTab( ThreadItem );
6232 DownloadContent( ThreadItem );
6235 InsertBrowserTab( ThreadItem );
6236 if not ThreadItem.IsLogFile then
6237 DownloadContent( ThreadItem );
6245 Board := BBSsFindBoardFromURL( URL );
6246 if Board <> nil then begin
6247 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
6248 ShowBBSTree( Board.ParentCategory.ParenTBBS );
6249 SelectTreeNode( Board, True );
6257 // 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¢
6260 GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark );
6261 GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey );
6263 if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
6264 Board := BBSsFindBoardFromURL( GikoSys.Get2chThreadURL2BoardURL( URL ) );
6265 if Board = nil then begin
6266 GikoSys.OpenBrowser(URL, gbtAuto);
6269 if not Board.IsThreadDatRead then
6270 GikoSys.ReadSubjectFile(Board);
6271 ThreadItem := Board.FindThreadFromURL( URL );
6272 if ThreadItem = nil then begin
6273 //shift ->
\90Ý
\92è
\83u
\83\89\83E
\83U
\81i
\96³
\82¯
\82ê
\82ÎIE
\81j
6275 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
6276 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
6278 GikoSys.OpenBrowser(URL, gbtUserApp)
6279 else if ctrlDown then
6280 GikoSys.OpenBrowser(URL, gbtIE)
6282 ThreadItem := TThreadItem.Create( nil, GikoSys.Get2chBrowsableThreadURL( URL ) );
6283 ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
6284 if AnsiPos(Host, Board.URL) = 0 then
6285 ThreadItem.DownloadHost := Host
6287 ThreadItem.DownloadHost := '';
6288 Board.Insert(0, ThreadItem);
6289 if ActiveList is TBoard then begin
6290 if TBoard(ActiveList) = Board then
6291 ListView.Items.Count := ListView.Items.Count + 1;
6293 InsertBrowserTab(ThreadItem);
6294 DownloadContent(ThreadItem);
6297 if ThreadItem.IsLogFile then
6298 InsertBrowserTab(ThreadItem)
6300 if AnsiPos(Host, Board.URL) = 0 then
6301 ThreadItem.DownloadHost := Host
6303 ThreadItem.DownloadHost := '';
6304 InsertBrowserTab(ThreadItem);
6305 DownloadContent(ThreadItem);
6309 GikoSys.OpenBrowser(URL, gbtAuto);
6313 procedure TGikoForm.AddressToolBarResize(Sender: TObject);
6315 AddressComboBox.Width := AddressToolBar.Width - MoveToToolButton.Width - 10;
6318 procedure TGikoForm.AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
6319 Shift: TShiftState);
6321 if Key = VK_RETURN then
6322 MoveToAction.Execute;
6325 procedure TGikoForm.BrowserEnter(Sender: TObject);
6327 Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
6330 procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
6332 CDS:PCopyDataStruct;
6336 CDS := Message.CopyDataStruct;
6337 GetMem(PC, CDS^.cbData);
6339 lstrcpy(PC,CDS^.lpData);
6340 SetString(sURL, PC,lstrlen(PC));
6345 Message.Result := 1;
6348 procedure TGikoForm.WndProc(var Message: TMessage);
6350 if (Message.Msg = CM_DIALOGCHAR) then
6351 if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
6356 procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
6358 hComboEdit: THandle;
6359 // KeyData: Integer;
6362 if AddressComboBox.Focused or SelectComboBox.Focused then begin
6363 if Msg.CharCode in [VK_BACK] then begin
6364 hComboEdit := GetFocus;
6365 if hComboEdit <> 0 then
6366 SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, Msg.KeyData);
6367 // SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, $000E0001);
6370 if Msg.CharCode in [VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PRIOR, VK_NEXT] then begin
6371 hComboEdit := GetFocus;
6372 if hComboEdit <> 0 then
6373 SendMessage(hComboEdit, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
6377 //
\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ð
6378 KeyData := Msg.KeyData;
6379 if (KeyData and $20000000) = 0 then begin
6380 if Msg.CharCode in [Ord('F'), Ord('V'), Ord('B'), Ord('R'),
6381 Ord('A'), Ord('T'), Ord('H')] then begin
6382 if not ActionList.IsShortCut(Msg) then begin
6390 procedure TGikoForm.BrowserTabVisibleActionExecute(Sender: TObject);
6392 GikoSys.Setting.BrowserTabVisible := BrowserTabVisibleAction.Checked;
6396 procedure TGikoForm.BrowserTabTopActionExecute(Sender: TObject);
6398 BrowserTabBottomAction.Checked := False;
6399 BrowserTabTopAction.Checked := True;
6400 GikoSys.Setting.BrowserTabPosition := gtpTop;
6404 procedure TGikoForm.BrowserTabBottomActionExecute(Sender: TObject);
6406 BrowserTabTopAction.Checked := False;
6407 BrowserTabBottomAction.Checked := True;
6408 GikoSys.Setting.BrowserTabPosition := gtpBottom;
6412 procedure TGikoForm.BrowserTabTabStyleActionExecute(Sender: TObject);
6414 BrowserTabButtonStyleAction.Checked := False;
6415 BrowserTabFlatStyleAction.Checked := False;
6416 BrowserTabTabStyleAction.Checked := True;
6417 GikoSys.Setting.BrowserTabStyle := gtsTab;
6421 procedure TGikoForm.BrowserTabButtonStyleActionExecute(Sender: TObject);
6423 BrowserTabTabStyleAction.Checked := False;
6424 BrowserTabFlatStyleAction.Checked := False;
6425 BrowserTabButtonStyleAction.Checked := True;
6426 GikoSys.Setting.BrowserTabStyle := gtsButton;
6430 procedure TGikoForm.BrowserTabFlatStyleActionExecute(Sender: TObject);
6432 BrowserTabFlatStyleAction.Checked := True;
6433 BrowserTabTabStyleAction.Checked := False;
6434 BrowserTabButtonStyleAction.Checked := False;
6435 GikoSys.Setting.BrowserTabStyle := gtsFlat;
6439 procedure TGikoForm.PreviewTimerTimer(Sender: TObject);
6445 HtmlFileName: string;
6449 TargetFrameName: OleVariant;
6450 PostData: OleVariant;
6451 Headers: OleVariant;
6452 WindowHeight: Integer;
6453 WindowWidth: Integer;
6457 Protocol, Host, Path, Document, Port, Bookmark: string;
6459 PreviewTimer.Enabled := False;
6463 case GikoSys.Setting.PreviewSize of
6470 WindowHeight := 192;
6474 WindowHeight := 384;
6478 WindowHeight := 480;
6480 else begin //gpsMedium
6482 WindowHeight := 288;
6486 ARect := Rect(0, 0, WindowWidth, WindowHeight);
6488 case GikoSys.Setting.PopupPosition of
6489 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6490 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6491 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
6492 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
6493 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
6494 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
6495 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6496 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6497 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Ó
6500 html := '<html><head>'#13#10
6502 + 'function init() {'#13#10
6503 + ' if ((document.body.clientHeight >= Image1.height) && (document.body.clientWidth >= Image1.width)) {'#13#10
6505 + ' var dh, ih;'#13#10
6506 + ' dh = document.body.clientWidth / document.body.clientHeight;'#13#10
6507 + ' ih = Image1.width / Image1.height;'#13#10
6508 + ' if (document.body.clientWidth < document.body.clientHeight) {'#13#10
6509 + ' if (ih > dh)'#13#10
6510 + ' Image1.width = document.body.clientWidth;'#13#10
6512 + ' Image1.height = document.body.clientHeight;'#13#10
6514 + ' if (ih < dh)'#13#10
6515 + ' Image1.height = document.body.clientHeight;'#13#10
6517 + ' Image1.width = document.body.clientWidth;'#13#10
6520 + ' Message.style.display = "none";'#13#10
6524 + '<body topmargin="0" leftmargin="0" style="border-width: 1px; overflow:hidden; border-style: solid;" onLoad="init()">'#13#10
6525 + '<div align="center" id="Message">
\83v
\83\8c\83r
\83\85\81[
\8dì
\90¬
\92\86</div>'#13#10
6526 + '<div align="center"><img name="Image1" border="0" src="%ImageURL%"></div>'#13#10
6528 sl := TStringList.Create;
6531 HtmlFileName := GikoSys.GetAppDir + HTML_FILE_NAME;
6532 sl.Text := AnsiReplaceStr(html, '%ImageURL%', FPreviewURL);
6533 sl.SaveToFile(HtmlFileName);
6540 NavURL := HtmlFileName;
6542 TargetFrameName := '';
6545 GikoSys.ParseURI(FPreviewURL, Protocol, Host, Path, Document, Port, Bookmark);
6546 Referer := Protocol + '://' + Host;
6548 Referer := Referer + ':' + Port;
6549 Referer := Referer + Path;
6550 Headers := 'Referer: ' + Referer;
6552 FPreviewBrowser.Navigate(NavURL, Flags, TargetFrameName, PostData, Headers);
6554 if ARect.Top + WindowHeight > Screen.DesktopHeight then
6555 ARect.Top := Screen.DesktopHeight - WindowHeight;
6556 if ARect.Left + WindowWidth > Screen.DesktopWidth then
6557 ARect.Left := Screen.DesktopWidth - WindowWidth;
6558 if ARect.Left < Screen.DesktopLeft then ARect.Left := Screen.DesktopLeft;
6559 if ARect.Bottom < Screen.DesktopTop then ARect.Bottom := Screen.DesktopTop;
6561 SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
6562 ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
6564 // Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
6565 // SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
6569 procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
6571 if PreviewTimer.Enabled then
6572 PreviewTimer.Enabled := False;
6573 if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
6574 FHint.ReleaseHandle;
6577 if (FPreviewBrowser <> nil) and (IsWindowVisible(FPreviewBrowser.Handle)) then
6578 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
6579 Message.Result := 1;
6583 procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
6585 MsgBarCloseAction.Execute;
6588 function TGikoForm.OnDocumentContextMenu(Sender: TObject): WordBool;
6590 Doc: IHtmlDocument2;
6591 Range: IHTMLTxtRange;
6594 ThreadItem: TThreadItem;
6596 Doc := Browser.Document as IHtmlDocument2;
6597 Range := Doc.selection.createRange as IHTMLTxtRange;
6598 s := StringReplace(Range.text, '
\81@', ' ', [rfReplaceAll]);
6599 s := GikoSys.ZenToHan(Trim(s));
6600 if GikoSys.IsNumeric(s) then begin
6602 ThreadItem := GetActiveContent;
6603 if ThreadItem <> nil then begin
6605 FHint.PopupType := gptThread;
6606 SetResPopupText(ThreadItem, Num, Num, False, False);
6607 if FHint.ResCount <> 0 then
6617 procedure TGikoForm.SetResPopupText(threadItem: TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
6633 if StNum > ToNum then begin
6639 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
6640 if StNum + 10 < ToNum then
6641 ToNum := StNum + 10;
6643 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
6645 if ThreadItem <> nil then
6646 FHint.Title := ThreadItem.Title;
6648 for i := StNum to ToNum do begin
6650 FileName := ThreadItem.FilePath;
6651 tmp := GikoSys.ReadThreadFile(FileName, Line);
6653 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
6654 Res := GikoSys.DivideStrLine(tmp);
6656 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
6658 Body := StringReplace(Res.FBody, '<br> ', #10, [rfIgnoreCase, rfReplaceAll]);
6659 Body := StringReplace(Body, '<br>', #10, [rfIgnoreCase, rfReplaceAll]);
6660 Body := StringReplace(Body, '</a>', '', [rfIgnoreCase, rfReplaceAll]);
6661 Body := GikoSys.DeleteLink(Body);
6662 Body := StringReplace(Body, '<', '<', [rfReplaceAll]);
6663 Body := StringReplace(Body, '>', '>', [rfReplaceAll]);
6664 Body := StringReplace(Body, '"', '"', [rfReplaceAll]);
6665 Body := StringReplace(Body, '&', '&', [rfReplaceAll]);
6666 FHint.Add(Header, Body);
6667 // s := StringReplace(s, '&', '&', [rfReplaceAll]);
6668 // s := StringReplace(s, '
\81\97\81M', ',', [rfReplaceAll]);
6675 {function TGikoForm.GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
6687 ActiveFileName: string;
6689 ThreadItem: TThreadItem;
6694 HintData := THintData.Create;
6695 SList := TStringList.Create;
6698 if StNum > ToNum then begin
6704 if (sBoard <> '') and (sThread <> '') then begin
6706 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
6707 if StNum + 10 < ToNum then
6708 ToNum := StNum + 10;
6710 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
6712 Board := BBS2ch.FindBBSID(sBoard);
6713 if Board <> nil then begin
6714 if not Board.IsThreadDatRead then
6715 GikoSys.ReadSubjectFile(Board);
6716 ThreadItem := Board.Find(sThread + '.dat');
6717 //ThreadItem := BBS2ch.FindThreadItem(sBoard, sThread + '.dat');
6718 if ThreadItem <> nil then
6719 HintData.Title := ThreadItem.Title;
6720 //s := s + ThreadItem.Title;
6724 for i := StNum to ToNum do begin
6726 FileName := IncludeTrailingPathDelimiter(BBS2ch.GetLogFolder + sBoard) + sThread + '.dat';
6727 tmp := GikoSys.ReadThreadFile(FileName, Line);
6728 if tmp <> '' then begin
6729 Res := GikoSys.DivideStrLine(tmp);
6733 //s := s + IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime + #10 + #10;
6734 //s := s + ' ' + StringReplace(Res.FBody, '<br>', #10, [rfIgnoreCase, rfReplaceAll]);
6735 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
6737 s := StringReplace(Res.FBody, '<br> ', #10, [rfIgnoreCase, rfReplaceAll]);
6738 s := StringReplace(s, '<br>', #10, [rfIgnoreCase, rfReplaceAll]);
6739 s := StringReplace(s, '</a>', '', [rfIgnoreCase, rfReplaceAll]);
6740 s := GikoSys.DeleteLink(s);
6741 s := StringReplace(s, '<', '<', [rfReplaceAll]);
6742 s := StringReplace(s, '>', '>', [rfReplaceAll]);
6743 s := StringReplace(s, '"', '"', [rfReplaceAll]);
6744 s := StringReplace(s, '&', '&', [rfReplaceAll]);
6746 HintData.Add(Header, Body);
6747 // s := StringReplace(s, '&', '&', [rfReplaceAll]);
6748 // s := StringReplace(s, '
\81\97\81M', ',', [rfReplaceAll]);
6759 procedure TGikoForm.ShowTextPopup;
6764 // if Trim(s) = '' then
6767 FHint.Font.Name := GikoSys.Setting.HintFontName;
6768 FHint.Font.Size := GikoSys.Setting.HintFontSize;
6769 FHint.Font.Color := GikoSys.Setting.HintFontColor;
6770 FHint.Color := GikoSys.Setting.HintBackColor;
6771 FHint.HeaderBold := GikoSys.Setting.ResPopupHeaderBold;
6773 if FHint.PopupType = gptRaw then
6774 ARect := FHint.CalcHintRect(Screen.Width, FHint.Caption, nil)
6776 ARect := FHint.CalcHintRect(Screen.Width, '', nil);
6777 case GikoSys.Setting.PopupPosition of
6778 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6779 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6780 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
6781 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
6782 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
6783 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
6784 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6785 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6786 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Ó
6788 //FHint.ActivateHint(ARect, s);
6789 if FHint.PopupType = gptRaw then
6790 FHint.ActivateHint(ARect, FHint.Caption)
6792 FHint.ActivateHint(ARect, '');
6794 FHint.ReleaseHandle;
6799 procedure TGikoForm.GikoHelpActionExecute(Sender: TObject);
6803 FileName := GikoSys.GetAppDir + 'batahlp.chm';
6804 if not FileExists(FileName) then begin
6807 '
\83w
\83\8b\83v
\82ª
\8c©
\82Â
\82©
\82è
\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½' + #13#10 +
6808 '
\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 +
6809 '
\83w
\83\8b\83v
\82Í
\83M
\83R
\83i
\83r
\82Ì
\83T
\83C
\83g
\82É
\92u
\82¢
\82Ä
\82 \82è
\82Ü
\82·',
6814 ShellExecute(Handle, 'open', PChar(FileName), '', PChar(GikoSys.GetAppDir), SW_SHOW);
6817 procedure TGikoForm.ToolButton18Click(Sender: TObject);
6819 if FTreeType = gttHistory then begin
6821 TreeView.Items.Clear;
6825 procedure TGikoForm.KotehanActionExecute(Sender: TObject);
6827 Dlg: TKotehanDialog;
6829 Dlg := TKotehanDialog.Create(Self);
6837 procedure TGikoForm.SetLinkBar;
6841 ToolButton: TLinkToolButton;
6842 MenuItem: TMenuItem;
6844 MainCoolBar.Bands.BeginUpdate;
6846 LinkBarPopupMenu.Items.Clear;
6847 for i := LinkToolBar.ButtonCount - 1 downto 0 do
6848 LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
6849 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
6850 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
6851 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
6852 ToolButton := TLinkToolButton.Create(LinkToolBar);
6853 if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteFolder then begin
6854 MenuItem := TMenuItem.Create(Self);
6855 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
6856 LinkBarPopupMenu.Items.Add(MenuItem);
6857 ToolButton.MenuItem := MenuItem;
6858 ToolButton.ImageIndex := TOOL_ICON_FAV_FOLDER;
6859 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
6860 ToolButton.ImageIndex := TOOL_ICON_FAV_BOARD;
6861 ToolButton.OnClick := FavoriteClick;
6862 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
6863 ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
6864 ToolButton.OnClick := FavoriteClick;
6866 ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
6867 ToolButton.Left := 10000;
6868 ToolButton.Data := FavoriteTreeView.Items[i].Item[j].Data;
6869 ToolButton.AutoSize := True;
6870 ToolButton.OnDragDrop := LinkToolButtonDragDrop;
6871 ToolButton.OnDragOver := FavoriteDragOver;
6872 ToolButton.OnMouseDown := LinkToolButtonOnMouseDown;
6873 ToolButton.OnMouseMove := LinkToolButtonOnMouseMove;
6874 ToolButton.OnMouseUp := LinkToolButtonOnMouseUp;
6875 ToolButton.OnStartDrag := LinkToolButtonStartDrag;
6876 //ToolButton.DragMode := dmAutomatic;
6877 ToolButton.DragMode := dmManual;
6878 ToolButton.PopupMenu := FavoriteTreePopupMenu;
6880 LinkToolBar.InsertControl(ToolButton);
6885 { if LinkToolBar.ButtonCount = 0 then begin
6886 ToolButton := TLinkToolButton.Create(LinkToolBar);
6887 ToolButton.Style := tbsButton;
6888 ToolButton.ImageIndex := -1;
6889 ToolButton.Caption := '';
6890 LinkToolBar.InsertControl(ToolButton);
6893 MainCoolBar.Bands.EndUpdate;
6897 procedure TGikoForm.FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
6905 if Sender = FavoriteTreeView then begin
6906 Node := FavoriteTreeView.GetNodeAt(X, Y);
6911 bound := Node.DisplayRect( False );
6912 height := bound.Bottom - bound.Top;
6913 if (bound.Top + height / 2) <= Y then
6914 Node := FavoriteTreeView.GetNodeAt(X, Y + height);
6919 if Node.IsFirstNode then
6924 if FDropSpaceNode <> nil then
6925 if FDropSpaceNode.AbsoluteIndex = Node.AbsoluteIndex then
6928 if Change then begin
6929 if FDropSpaceNode <> nil then
6930 FDropSpaceNode.Free;
6932 FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil );
6933 FDropSpaceNode.MoveTo( Node, naInsert );
6934 FDropSpaceNode.ImageIndex := -1;
6935 FDropSpaceNode.SelectedIndex := -1;
6939 if Source = FavoriteTreeView then begin
6940 if FavoriteTreeView.Selected = FavoriteTreeView.Items.GetFirstNode then begin
6945 end else if Source = BrowserTab then
6947 else if Source = ListView then
6949 else if Source is TLinkToolButton then
6951 else if Source = TreeView then
6957 procedure TGikoForm.FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
6960 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
6963 procedure TGikoForm.LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
6965 // FDragging := true;
6968 procedure TGikoForm.LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
6970 SenderNode: TTreeNode;
6971 LinkToolButton: TLinkToolButton;
6974 LinkToolButton := TLinkToolButton( Sender );
6975 SenderNode := TreeNodeDataFind( FavoriteTreeView.TopItem, LinkToolButton.Data );
6977 FavoriteDragDrop( SenderNode, Source );
6981 procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
6985 procedure TGikoForm.LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
6989 TToolButton( Sender ).DragMode := dmManual;
6990 if ssLeft in Shift then begin
6991 TToolButton( Sender ).Down := true;
6992 if FDragTime = 0 then begin
6993 FDragTime := GetTickCount();
6995 Now := GetTickCount();
6996 if (Now - FDragTime) > 500 then begin
6997 if FDragButton <> TToolButton( Sender ) then begin
6999 FDragButton := TToolButton( Sender );
7000 TToolButton(Sender).BeginDrag(false ,5);
7003 {$IF Defined(debug)}
7004 ShowMessage('Error');
7015 procedure TGikoForm.LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7020 function TGikoForm.GetWidthAllToolButton(ToolBar: TToolBar): Integer;
7025 for i := 0 to ToolBar.ButtonCount - 1 do
7026 Result := Result + ToolBar.Buttons[i].Width;
7029 procedure TGikoForm.MainCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7031 Control: TWinControl;
7033 Control := FindControl(BandInfo^.hwndChild);
7034 if (Control = MenuToolBar) or (Control = StdToolBar) or (Control = LinkToolBar) then begin
7035 BandInfo^.fMask := BandInfo.fMask or RBBIM_STYLE or RBBIM_IDEALSIZE;
7036 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7037 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7041 procedure TGikoForm.MainCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
7047 ChevronPopupMenu.Items.Clear;
7049 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
7050 if MainCoolBar.Bands[ i ].Visible then begin
7051 if Idx = Int64(RebarChevron^.uBand) then begin
7058 if (Idx >= 0) and (MainCoolBar.Bands.Count > Idx) then begin
7059 if MainCoolBar.Bands[Idx].Control = MenuToolbar then begin
7061 end else if MainCoolBar.Bands[Idx].Control = StdToolbar then begin
7062 ToolBarChevronMenu(StdToolBar);
7063 end else if MainCoolBar.Bands[Idx].Control = LinkToolbar then begin
7067 p := MainCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
7068 ChevronPopupMenu.Popup(p.x, p.y);
7072 procedure TGikoForm.MenuBarChevronMenu;
7073 procedure SetSubMenu(MenuItem: TMenuItem; PopupItem: TMenuItem);
7079 for i := 0 to MenuItem.Count - 1 do begin
7081 if MenuItem[i] is TFavoriteMenuItem then begin
7082 Item := TFavoriteMenuItem.Create(Self);
7083 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(MenuItem[i]).Data;
7085 Item := TMenuItem.Create(Self);
7086 Item.Caption := MenuItem[i].Caption;
7087 Item.Action := MenuItem[i].Action;
7088 Item.ImageIndex := MenuItem[i].ImageIndex;
7089 Item.OnClick := MenuItem[i].OnClick;
7090 PopupItem.Add(Item);
7091 if MenuItem[i].Count > 0 then
7092 SetSubMenu(MenuItem[i], Item);
7101 ChevronPopupMenu.Items.Clear;
7102 ChevronPopupMenu.Images := MainMenu.Images;
7103 bw := GetWidthAllToolButton(MenuToolBar);
7104 if MenuToolBar.Width < bw then begin
7106 for i := 0 to MenuToolBar.ButtonCount - 1 do begin
7107 w := w + MenuToolBar.Buttons[i].Width;
7108 if MenuToolBar.Width <= w then begin
7109 Item := TMenuItem.Create(Self);
7110 Item.Caption := MenuToolBar.Buttons[i].MenuItem.Caption;
7111 //Item.Action := MenuToolBar.Buttons[i].MenuItem.Action;
7112 ChevronPopupMenu.Items.Add(Item);
7113 SetSubMenu(MenuToolbar.Buttons[i].MenuItem, Item);
7119 procedure TGikoForm.ToolBarChevronMenu(ToolBar: TToolBar);
7120 procedure SetSubMenu(PopupMenu: TPopupMenu; PopupItem: TMenuItem);
7125 if Assigned(PopupMenu.OnPopup) then
7126 PopupMenu.OnPopup(nil);
7127 for i := 0 to PopupMenu.Items.Count - 1 do begin
7129 if PopupMenu.Items[i] is TFavoriteMenuItem then begin
7130 Item := TFavoriteMenuItem.Create(Self);
7131 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(PopupMenu.Items[i]).Data;
7133 Item := TMenuItem.Create(Self);
7134 Item.Caption := PopupMenu.Items[i].Caption;
7135 Item.Action := PopupMenu.Items[i].Action;
7136 Item.ImageIndex := PopupMenu.Items[i].ImageIndex;
7137 Item.OnClick := PopupMenu.Items[i].OnClick;
7138 PopupItem.Add(Item);
7147 ChevronPopupMenu.Items.Clear;
7148 ChevronPopupMenu.Images := ToolBar.HotImages;
7149 bw := GetWidthAllToolButton(ToolBar);
7150 if ToolBar.Width < bw then begin
7152 for i := 0 to ToolBar.ButtonCount - 1 do begin
7153 w := w + ToolBar.Buttons[i].Width;
7154 if ToolBar.Width <= w then begin
7155 Case ToolBar.Buttons[i].Tag of
7158 Item := TMenuItem.Create(Self);
7159 if ToolBar.Buttons[i].Style = tbsSeparator then
7162 Item.Caption := ToolBar.Buttons[i].Caption;
7163 Item.Action := ToolBar.Buttons[i].Action;
7164 //Item.Visible := True;
7166 ChevronPopupMenu.Items.Add(Item);
7167 if ToolBar.Buttons[i].DropdownMenu <> nil then begin
7169 Item.OnClick := nil;
7170 SetSubMenu(ToolBar.Buttons[i].DropdownMenu, Item);
7174 //
\8f«
\97\88\82Ì
\82½
\82ß
\82Ì
\97\
\96ñ
7181 procedure TGikoForm.LinkBarChevronMenu;
7186 Item: TFavoriteMenuItem;
7188 Button: TLinkToolButton;
7190 ChevronPopupMenu.Items.Clear;
7191 ChevronPopupMenu.Images := LinkToolBar.Images;
7192 bw := GetWidthAllToolButton(LinkToolBar);
7193 if LinkToolBar.Width < bw then begin
7195 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
7196 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
7197 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
7198 w := w + LinkToolBar.Buttons[j].Width;
7199 if LinkToolBar.Width <= w then begin
7200 if LinkToolBar.Buttons[j] is TLinkToolButton then begin
7201 Button := TLinkToolButton(LinkToolBar.Buttons[j]);
7202 Item := TFavoriteMenuItem.Create(Self);
7203 if TObject(Button.Data) is TFavoriteFolder then begin
7204 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], Item);
7205 end else if TObject(Button.Data) is TFavoriteBoardItem then begin
7206 Item.OnClick := FavoriteClick;
7207 end else if TObject(Button.Data) is TFavoriteThreadItem then begin
7208 Item.OnClick := FavoriteClick;
7210 Item.Data := Button.Data;
7211 Item.Caption := LinkToolBar.Buttons[j].Caption;
7212 Item.ImageIndex := LinkToolBar.Buttons[j].ImageIndex;
7213 ChevronPopupMenu.Items.Add(Item);
7223 procedure TGikoForm.ListCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7225 Control: TWinControl;
7227 Control := FindControl(BandInfo^.hwndChild);
7228 if Control = ListToolBar then begin
7229 BandInfo^.fMask := BandInfo.fMask or RBBIM_STYLE or RBBIM_IDEALSIZE;
7230 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7231 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7235 procedure TGikoForm.ListCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
7240 ChevronPopupMenu.Items.Clear;
7241 Idx := RebarChevron^.uBand;
7242 if (Idx >= 0) and (ListCoolBar.Bands.Count > Idx) then begin
7243 if ListCoolBar.Bands[Idx].Control = ListToolBar then begin
7244 ToolBarChevronMenu(ListToolBar);
7247 p := ListCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
7248 ChevronPopupMenu.Popup(p.x, p.y);
7252 procedure TGikoForm.BrowserCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7254 Control: TWinControl;
7256 Control := FindControl(BandInfo^.hwndChild);
7257 if Control = BrowserToolBar then begin
7258 BandInfo^.fMask := BandInfo.fMask or RBBIM_STYLE or RBBIM_IDEALSIZE;
7259 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7260 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7264 procedure TGikoForm.BrowserCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
7269 ChevronPopupMenu.Items.Clear;
7270 Idx := RebarChevron^.uBand;
7271 if (Idx >= 0) and (BrowserCoolBar.Bands.Count > Idx) then begin
7272 if BrowserCoolBar.Bands[Idx].Control = BrowserToolBar then
7273 ToolBarChevronMenu(BrowserToolBar)
7276 p := BrowserCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
7277 ChevronPopupMenu.Popup(p.x, p.y);
7281 procedure TGikoForm.ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
7283 if Column^.iImage = -1 then begin
7284 Column^.mask := Column^.mask or LVCF_FMT;
7286 Column^.mask := Column^.mask or LVCF_FMT or LVCF_IMAGE;
7287 Column^.fmt := Column^.fmt or LVCFMT_IMAGE or LVCFMT_BITMAP_ON_RIGHT;
7291 procedure TGikoForm.ThreadEditorActionExecute(Sender: TObject);
7293 Editor: TEditorForm;
7295 if not (GetActiveList is TBoard) then
7297 Editor := TEditorForm.Create(Self);
7298 Editor.SetBoard(TBoard(GetActiveList));
7300 Editor.BodyEdit.SetFocus;
7303 procedure TGikoForm.ToolBarSettingActionExecute(Sender: TObject);
7305 Dlg: TToolBarSettingDialog;
7307 //Component: TComponent;
7309 Dlg := TToolBarSettingDialog.Create(Self, ActionList);
7311 Dlg.AddToolBar(StdToolBar, gttStandard);
7312 Dlg.AddToolBar(ListToolBar, gttList);
7313 Dlg.AddToolBar(BrowserToolBar, gttBrowser);
7315 if ToolBarSettingAction.ActionComponent.GetParentComponent is TPopupMenu then begin
7316 Component := TPopupMenu( ToolBarSettingAction.ActionComponent.GetParentComponent ).PopupComponent;
7318 if Component = MainCoolBar then
7319 Dlg.ToolBarComboBox.ItemIndex := 0
7320 else if Component = ListCoolBar then
7321 Dlg.ToolBarComboBox.ItemIndex := 1
7322 else if Component = BrowserCoolBar then
7323 Dlg.ToolBarComboBox.ItemIndex := 2;
7326 if Dlg.ShowModal = mrOK then begin
7329 //
\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é
7330 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
7331 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth + 1;
7332 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth - 1;
7334 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
7335 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth + 1;
7336 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth - 1;
7338 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
7339 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth + 1;
7340 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth - 1;
7342 SaveToolBarSetting(StdToolBar);
7343 SaveToolBarSetting(ListToolBar);
7344 for i := ListToolBar.ControlCount - 1 downto 0 do
7346 if ListToolBar.Controls[ i ].Action = SelectItemAction then
7348 //
\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·
7349 if (i + 1) < ListToolBar.ControlCount then
7350 if ListToolBar.Controls[ i + 1 ] is TToolButton then
7351 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
7352 ListToolBar.Controls[ i + 1 ].Visible := False;
7354 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
7355 ListToolBar.Controls[ i ].Visible := False;
7356 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
7357 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
7358 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
7359 SelectComboBox.Parent := ListToolBar;
7360 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
7361 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
7362 SelectComboBoxSplitter.Parent := ListToolBar;
7367 SaveToolBarSetting(BrowserToolBar);
7374 procedure TGikoForm.SetToolBarPopup;
7378 for i := 0 to StdToolBar.ButtonCount - 1 do begin
7380 for i := 0 to ListToolBar.ButtonCount - 1 do begin
7381 if ListToolBar.Buttons[i].Action = IconStyle then
7382 ListToolBar.Buttons[i].DropdownMenu := ListIconPopupMenu;
7383 if ListToolBar.Buttons[i].Action = SelectReservAction then
7384 ListToolBar.Buttons[i].DropdownMenu := RoundNamePopupMenu;
7386 for i := 0 to BrowserToolBar.ButtonCount - 1 do begin
7387 if BrowserToolBar.Buttons[i].Action = IEAction then
7388 BrowserToolBar.Buttons[i].DropdownMenu := BrowserPopupMenu;
7392 procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState;
7393 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
7402 Wnd := WindowFromPoint(MousePos);
7404 if WheelDelta > 0 then
7409 if (Wnd = BrowserTab.Handle) or
7410 (Wnd = BrowserTab.Parent.Handle) then begin
7411 BrowserTab.ScrollTabs(Delta);
7412 end else if Wnd = ListView.Handle then begin
7413 if ListView.ViewStyle = vsList then
7414 ListView.Scroll( Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE, 0 )
7416 ListView.Scroll( 0, Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE );
7423 procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
7425 if Length( SelectComboBox.Text ) = 0 then
7427 AllItemAction.Checked := True;
7428 LogItemAction.Checked := False;
7429 NewItemAction.Checked := False;
7431 //
\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é
7432 if AllItemAction.Checked then
7433 AllItemAction.Checked := False;
7434 if LogItemAction.Checked then
7435 LogItemAction.Checked := False;
7436 if NewItemAction.Checked then
7437 NewItemaction.Checked := False;
7440 if Length( SelectComboBox.Text ) = 0 then
7441 SetListViewType( gvtAll )
7443 SetListViewType( gvtUser, SelectComboBox.Text, false);
7446 procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
7447 Shift: TShiftState);
7450 if Key = VK_Return then
7453 end else if Length( SelectComboBox.Text ) = 0 then
7455 AllItemAction.Checked := True;
7456 LogItemAction.Checked := False;
7457 NewItemAction.Checked := False;
7459 //
\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é
7460 if AllItemAction.Checked then
7461 AllItemAction.Checked := False;
7462 if LogItemAction.Checked then
7463 LogItemAction.Checked := False;
7464 if NewItemAction.Checked then
7465 NewItemaction.Checked := False;
7470 procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
7475 if Length( SelectComboBox.Text ) = 0 then
7477 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
7478 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
7483 //
\8di
\82è
\8d\9e\82Ý
\8c\9f\8dõ
\82Ì
\97\9a\97ð
\8dX
\90V
7484 procedure TGikoForm.ModifySelectList;
7491 if SelectComboBox.Parent = nil then
7494 if Length( SelectComboBox.Text ) > 0 then
7496 oldText := SelectComboBox.Text;
7497 idx := GikoSys.Setting.SelectTextList.IndexOf( oldText );
7499 GikoSys.Setting.SelectTextList.Delete( idx );
7500 idx := SelectComboBox.Items.IndexOf( oldText );
7502 SelectComboBox.Items.Delete( idx );
7503 GikoSys.Setting.SelectTextList.Insert( 0, oldText );
7504 SelectComboBox.Items.Insert( 0, oldText );
7505 SelectComboBox.Text := oldText;
7512 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\95Ò
\8fW
\82·
\82é
\82½
\82ß
\82É
\8aJ
\82
7513 procedure TGikoForm.NG1Click(Sender: TObject);
7515 GikoSys.FAbon.EditNGwords;
7517 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\8dÄ
\93Ç
\82Ý
\8d\9e\82Ý
\82·
\82é
7518 procedure TGikoForm.SelectResActionExecute(Sender: TObject);
7520 Dlg: TListSelectDialog;
7521 ThreadItem : TThreadItem;
7522 FilterList : TStringList;
7525 Dlg := TListSelectDialog.Create(Self);
7527 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
7528 Dlg.SelectComboBox.Text := '';
7530 if (Dlg.ModalResult = mrCancel) or (Length( Dlg.SelectComboBox.Text ) = 0) then begin
7531 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
7532 AllResAction.Checked := True;
7533 SelectResAction.Checked := False;
7535 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
7536 FilterList := TStringList.Create;
7538 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
7539 GikoSys.FSelectResFilter.Reverse := False;
7544 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
7545 AllResAction.Checked := False;
7546 SelectResAction.Checked := True;
7548 //
\8c\9f\8dõ
\97\9a\97ð
\82Ì
\8dX
\90V
7549 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
7551 GikoSys.Setting.SelectTextList.Delete(idx);
7552 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
7553 while Dlg.SelectComboBox.Items.Count > 100 do begin
7554 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
7558 if SelectComboBox.Parent <> nil then
7559 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
7563 //
\83t
\83B
\83\8b\83^
\82Ì
\90Ý
\92è
7564 FilterList := TStringList.Create;
7566 GikoSys.FSelectResFilter.Reverse := True;
7567 FilterList.Delimiter := ' '; //
\8bæ
\90Ø
\82è
\8eq
\82ð
\94¼
\8ap
\83X
\83y
\81[
\83X
\82É
\90Ý
\92è
7568 FilterList.DelimitedText := Dlg.SelectComboBox.Text;
7570 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
7576 //
\83X
\83\8c\83b
\83h
\82Ì
\8dÄ
\95`
\89æ
7577 ThreadItem := GetActiveContent;
7578 if ThreadItem <> nil then
7579 SetContent( ThreadItem );
7586 procedure TGikoForm.SelectResActionUpdate(Sender: TObject);
7588 SelectResAction.Enabled := GetActiveContent <> nil;
7591 procedure TGikoForm.FormKeyDown(Sender: TObject; var Key: Word;
7592 Shift: TShiftState);
7596 Doc: IHtmlDocument2;
7597 // Range: IHTMLTxtRange;
7600 ThreadItem: TThreadItem;
7604 ThreadItem := GetActiveContent;
7605 if ThreadItem <> nil then begin
7606 if ssCtrl in Shift then begin
7607 if ssAlt in Shift then begin
7608 Doc := Browser.Document as IHtmlDocument2;
7609 s := IntToStr(Fkeynum);
7610 if GikoSys.IsNumeric(s) then begin
7611 ThreadItem := GetActiveContent;
7612 if ThreadItem <> nil then begin
7614 FHint.PopupType := gptThread;
7615 SetResPopupText(ThreadItem, Num, Num, False, False);
7616 if FHint.ResCount <> 0 then begin
7623 if Fkeynum = 0 then begin
7624 if (Key >= $60) and (Key <= $69) then begin
7625 Fkeynum := Key - $60;
7628 if (Key >= $60) and (Key <= $69) then begin
7629 Fkeynum := Fkeynum * 10 + Key - $60;
7635 if FHint <> nil then begin
7636 FHint.ReleaseHandle;
7645 procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;
7646 Shift: TShiftState);
7649 if Key = $11 then begin
7651 if FHint <> nil then begin
7652 FHint.ReleaseHandle;
7660 //
\91S
\82Ä
\82Ì
\83\8c\83X
\82ð
\95\
\8e¦
7661 procedure TGikoForm.AllResActionExecute(Sender: TObject);
7663 ThreadItem : TThreadItem;
7664 FilterList : TStringList;
7666 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
7667 AllResAction.Checked := True;
7668 SelectResAction.Checked := False;
7670 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
7671 FilterList := TStringList.Create;
7673 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
7674 GikoSys.FSelectResFilter.Reverse := False;
7679 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
7680 ThreadItem := GetActiveContent;
7681 if ThreadItem <> nil then
7682 SetContent( ThreadItem );
7685 procedure TGikoForm.AllResActionUpdate(Sender: TObject);
7687 AllResAction.Enabled := GetActiveContent <> nil;
7690 procedure TGikoForm.ReloadClick(Sender: TObject);
7692 ThreadItem : TThreadItem;
7694 if GikoSys.FAbon.ReLoadFromNGwordFile =false then begin
7695 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);
7697 ThreadItem := GetActiveContent;
7698 if ThreadItem <> nil then
7699 SetContent( ThreadItem );
7704 procedure TGikoForm.GoBackClick(Sender: TObject);
7706 ThreadItem : TThreadItem;
7709 if GikoSys.FAbon.GoForward =false then begin
7710 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);
7712 s := GikoSys.FAbon.NGwordname;
7713 StatusBar.Panels.Items[2].Text := s;
7714 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
7715 StatusBarResize(Sender);
7716 ThreadItem := GetActiveContent;
7717 if ThreadItem <> nil then
7718 SetContent( ThreadItem );
7723 procedure TGikoForm.GoFowardClick(Sender: TObject);
7725 ThreadItem : TThreadItem;
7728 if GikoSys.FAbon.GoBack =false then begin
7729 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);
7731 s := GikoSys.FAbon.NGwordname;
7732 StatusBar.Panels.Items[2].Text := s;
7733 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
7734 StatusBarResize(Sender);
7735 ThreadItem := GetActiveContent;
7736 if ThreadItem <> nil then
7737 SetContent( ThreadItem );
7742 procedure TGikoForm.SelectComboBoxSplitterMouseMove(Sender: TObject;
7743 Shift: TShiftState; X, Y: Integer);
7748 If (SelectComboBox.Parent <> nil) and (IsDraggingSelectComboBox) Then begin
7751 pos := SelectComboBoxSplitter.ClientToScreen( pos );
7752 w := SelectComboBox.Width + (pos.X - DraggingSelectComboBoxPosition.X);
7754 If w <= 50 Then Begin
7755 //
\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
7756 //
\81u
\8e~
\82Ü
\82Á
\82½(50pixel)
\88Ê
\92u
\81v
\82É
\82È
\82é
\82æ
\82¤
\82É
7757 pos.X := pos.X + (50 - w);
7759 //
\8f¬
\82³
\82
\82È
\82è
\82·
\82¬
\82È
\82¢
\82æ
\82¤
\82É
7763 //
\83`
\83\89\82Â
\82«
\8cy
\8c¸
\82Ì
\88×
7764 If SelectComboBox.Width <> w Then Begin
7765 SelectComboBox.Width := w;
7766 GikoSys.Setting.SelectComboBoxWidth := w;
7767 DraggingSelectComboBoxPosition := pos;
7772 procedure TGikoForm.SelectComboBoxSplitterMouseDown(Sender: TObject;
7773 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7777 IsDraggingSelectComboBox := True;
7780 DraggingSelectComboBoxPosition := SelectComboBoxSplitter.ClientToScreen( pos );
7783 procedure TGikoForm.SelectComboBoxSplitterMouseUp(Sender: TObject;
7784 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7786 IsDraggingSelectComboBox := False;
7789 procedure TGikoForm.StatusBarResize(Sender: TObject);
7791 StatusBar.Panels[1].Width := StatusBar.Width -
7792 StatusBar.Panels[0].Width -
7793 StatusBar.Panels[2].Width;
7795 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\92Ê
\8fí
\81v
7796 procedure TGikoForm.IndividualAbon1Click(Sender: TObject);
7798 ThreadItem : TThreadItem;
7800 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,1);
7801 ThreadItem := GetActiveContent;
7802 if ThreadItem <> nil then
7803 SetContent( ThreadItem );
7805 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\93§
\96¾
\81v
7806 procedure TGikoForm.IndividualAbon2Click(Sender: TObject);
7808 ThreadItem : TThreadItem;
7810 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,0);
7811 ThreadItem := GetActiveContent;
7812 if ThreadItem <> nil then
7813 SetContent( ThreadItem );
7815 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c\81i
\81j
7816 procedure TGikoForm.AntiIndividualAbonClick(Sender: TObject);
7818 ThreadItem : TThreadItem;
7821 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
7822 GikoSys.FAbon.DeleteIndividualAbon(KokoPopupMenu.Tag);
7823 ThreadItem := GetActiveContent;
7824 if ThreadItem <> nil then
7825 SetContent( ThreadItem );
7827 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
7828 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
7831 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c
7832 procedure TGikoForm.N42Click(Sender: TObject);
7834 IndividualForm :TIndividualAbonForm;
7835 ThreadItem : TThreadItem;
7839 IndividualForm := TIndividualAbonForm.Create(Self);
7841 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
7842 for i :=0 to GikoSys.FAbon.GetAbonResCount-1 do begin
7843 IndividualForm.ComboBox1.Items.Add(GikoSys.FAbon.GetAbonResString(i));
7845 if IndividualForm.ShowModal = mrOK then begin
7846 GikoSys.FAbon.DeleteIndividualAbon(IndividualForm.ResNumber);
7848 ThreadItem := GetActiveContent;
7849 if ThreadItem <> nil then
7850 SetContent( ThreadItem );
7852 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
7853 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
7856 IndividualForm.Free;
7860 procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
7863 if (Length( SelectComboBox.Text ) = 0) or
7864 (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
7866 SelectComboBox.Text := '';
7867 SelectComboBox.Color := clWindow;
7872 procedure TGikoForm.N51Click(Sender: TObject);
7876 //
\94Â
\96¼
\8c\9f\8dõ
7877 procedure TGikoForm.TreeSelectSearchBoardNameExecute(Sender: TObject);
7881 CurItem : TTreeNode;
7884 if InputQuery('
\94Â
\96¼
\8c\9f\8dõ','
\94Â
\96¼
\82Ì
\93ü
\97Í',s) then begin
7887 if TreeView.Selected = nil then
7888 CurItem := TreeView.Items.GetFirstNode
7890 CurItem := TreeView.Selected.GetNext;
7891 if CurItem = nil then
7892 CurItem := TreeView.Items.GetFirstNode;
7894 while CurItem <> nil do begin
7895 if (CurItem.ImageIndex <> 2) and (AnsiPos(s,CurItem.Text) <> 0) then begin
7898 CurItem := CurItem.GetNext;
7901 if CurItem = nil then begin
7902 msg := '
\90æ
\93ª
\82É
\96ß
\82è
\82Ü
\82·
\82©
\81H';
7903 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
7904 CurItem := TreeView.Items.GetFirstNode;
7908 TreeView.Select(CurItem);
7911 TreeView.Select(CurItem);
7913 msg := '
\8e\9f\82É
\8ds
\82«
\82Ü
\82·
\82©
\81H';
7914 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
7928 procedure TGikoForm.CabinetFavoriteActionExecute(Sender: TObject);
7934 if CabinetPanel.Visible then begin
7935 if FTreeType = gttFavorite then begin
7936 CabinetVisible( False );
7937 CabinetFavoriteAction.Checked := False;
7939 CabinetFavoriteAction.Checked := True;
7942 CabinetVisible( True );
7943 CabinetFavoriteAction.Checked := True;
7946 GikoSys.Setting.CabinetIndex := 2;
7948 b := CabinetSelectPopupMenu.Items.Count - 1;
7949 for i := 0 to b do begin
7950 item := CabinetSelectPopupMenu.Items[ i ];
7951 if item is TBBSMenuItem then begin
7952 item.Checked := False;
7953 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
7954 CabinetMenu.Items[ i ].Checked := False;
7958 //
\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Ö
7959 HistoryToolBar.Hide;
7960 FavoriteToolBar.Show;
7961 TreeView.Visible := False;
7962 FavoriteTreeView.Visible := True;
7964 CabinetSelectToolButton.Caption := '
\82¨
\8bC
\82É
\93ü
\82è';
7965 FTreeType := gttFavorite;
7967 //
\83\81\83j
\83\85\81[
\8by
\82Ñ
\83{
\83^
\83\93\82Ì
\83`
\83F
\83b
\83N
\82ð
\90Ý
\92è
7968 CabinetBBSAction.Checked := False;
7969 CabinetHistoryAction.Checked := False;
7971 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\83c
\83\8a\81[
\82ð
\93W
\8aJ
7972 FavoriteTreeView.TopItem.Expanded := True;
7976 procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
7979 if (SenderNode = nil) or (SourceNode = nil) or (SenderNode = SourceNode) then
7982 if TObject(SenderNode.Data) is TFavoriteFolder then
7983 SourceNode.MoveTo(SenderNode, naAddChild)
7985 SourceNode.MoveTo(SenderNode, naInsert);
7989 procedure TGikoForm.FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
7993 FavoBoardItem: TFavoriteBoardItem;
7994 FavoThreadItem: TFavoriteThreadItem;
7996 ThreadItem: TThreadItem;
7999 if (SenderNode = nil) or (Source = nil) then
8002 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
8003 FavNode := SenderNode.Parent
8005 FavNode := SenderNode;
8009 if Source is TBoard then begin
8010 Board := TBoard( Source );
8011 FavoBoardItem := TFavoriteBoardItem.CreateWithItem( Board );
8012 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, FavoBoardItem);
8013 Node.ImageIndex := 15;
8014 Node.SelectedIndex := 15;
8015 end else if Source is TFavoriteBoardItem then begin
8016 FavoBoardItem := TFavoriteBoardItem( Source );
8017 Board := FavoBoardItem.Item;
8018 if Board <> nil then
8019 if not Board.IsThreadDatRead then
8020 GikoSys.ReadSubjectFile(Board);
8021 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, Source);
8022 Node.ImageIndex := 15;
8023 Node.SelectedIndex := 15;
8024 end else if Source is TThreadItem then begin
8025 ThreadItem := TThreadItem( Source );
8026 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
8027 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
8028 Node.ImageIndex := 16;
8029 Node.SelectedIndex := 16;
8030 end else if Source is TFavoriteThreadItem then begin
8031 FavoThreadItem := TFavoriteThreadItem( Source );
8032 ThreadItem := FavoThreadItem.Item;
8033 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, Source);
8034 Node.ImageIndex := 16;
8035 Node.SelectedIndex := 16;
8038 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
8040 FavoriteMoveTo( SenderNode, Node );
8044 procedure TGikoForm.FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
8047 SourceNode: TTreeNode;
8048 LinkToolButton: TLinkToolButton;
8051 if SenderNode = nil then
8054 if not (TObject( SenderNode.Data ) is TFavoriteFolder) then
8055 if FDropSpaceNode <> nil then
8056 SenderNode := FDropSpaceNode;
8058 if Source = FavoriteTreeView then begin
8060 SourceNode := FavoriteTreeView.Selected;
8061 FavoriteMoveTo( SenderNode, SourceNode );
8063 end else if Source is TLinkToolButton then begin
8065 LinkToolButton := TLinkToolButton( Source );
8066 //ShowMessage(LinkToolButton.Text);
8067 SourceNode := TreeNodeDataFind( FavoriteTreeView.TopItem, LinkToolButton.Data );
8068 FavoriteMoveTo( SenderNode, SourceNode );
8070 end else if Source = BrowserTab then begin
8072 idx := BrowserTab.TabIndex;
8073 FavoriteAddTo( SenderNode, BrowserTab.Tabs.Objects[idx] );
8075 end else if Source = ListView then begin
8077 FavoriteAddTo( SenderNode, ListView.Selected.Data );
8079 end else if Source = TreeView then begin
8081 FavoriteAddTo( SenderNode, TreeView.Selected.Data );
8089 procedure TGikoForm.FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
8092 SenderNode: TTreeNode;
8095 SenderNode := FavoriteTreeView.GetNodeAt(X, Y);
8096 if SenderNode <> nil then begin
8097 FavoriteDragDrop( SenderNode, Source );
8100 if FDropSpaceNode <> nil then begin
8101 FDropSpaceNode.Free;
8102 FDropSpaceNode := nil;
8107 procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
8108 Node: TTreeNode; var S: String);
8111 FavoriteTreeView.ReadOnly := True;
8116 procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
8117 Shift: TShiftState);
8123 FClickNode := FavoriteTreeView.Selected;
8124 FavoriteTreeViewRenameActionExecute( Sender );
8128 FClickNode := FavoriteTreeView.Selected;
8129 FavoriteTreeViewDeleteActionExecute( Sender );
8135 procedure TGikoForm.FavoriteTreePopupMenuPopup(Sender: TObject);
8138 LinkToolButton: TLinkToolButton;
8141 if FavoriteTreePopupMenu.PopupComponent = FavoriteTreeView then begin
8143 FClickNode := FavoriteTreeView.Selected;
8145 end else if FavoriteTreePopupMenu.PopupComponent is TLinkToolButton then begin
8147 LinkToolButton := TLinkToolButton( FavoriteTreePopupMenu.PopupComponent );
8148 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
8149 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
8150 FClickNode := FavoriteTreeView.Items[i];
8154 for i := 0 to FClickNode.Count - 1 do begin
8155 if FClickNode.Item[i].Data = LinkToolButton.Data then begin
8156 FClickNode := FClickNode.Item[i];
8163 if FClickNode = nil then begin
8164 FavoriteTreeBrowseFolderPopupMenu.Enabled := False;
8165 FavoriteTreeDeletePopupMenu.Enabled := False;
8166 FavoriteTreeRenamePopupMenu.Enabled := False;
8167 FavoriteTreeNewFolderPopupMenu.Enabled := False;
8168 FavoriteTreeReloadPopupMenu.Enabled := False;
8169 FavoriteTreeURLCopyPopupMenu.Enabled := False;
8170 FavoriteTreeNameCopyPopupMenu.Enabled := False;
8171 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
8172 FavoriteTreeLogDeletePopupMenu.Enabled := False;
8173 end else if FClickNode.IsFirstNode then begin
8174 FavoriteTreeBrowseFolderPopupMenu.Enabled := True;
8175 FavoriteTreeDeletePopupMenu.Enabled := False;
8176 FavoriteTreeRenamePopupMenu.Enabled := False;
8177 FavoriteTreeNewFolderPopupMenu.Enabled := True;
8178 FavoriteTreeReloadPopupMenu.Enabled := False;
8179 FavoriteTreeURLCopyPopupMenu.Enabled := False;
8180 FavoriteTreeNameCopyPopupMenu.Enabled := False;
8181 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
8182 FavoriteTreeLogDeletePopupMenu.Enabled := False;
8183 end else if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
8184 FavoriteTreeBrowseFolderPopupMenu.Enabled := True;
8185 FavoriteTreeDeletePopupMenu.Enabled := True;
8186 FavoriteTreeRenamePopupMenu.Enabled := False;
8187 FavoriteTreeNewFolderPopupMenu.Enabled := True;
8188 FavoriteTreeReloadPopupMenu.Enabled := False;
8189 FavoriteTreeURLCopyPopupMenu.Enabled := False;
8190 FavoriteTreeNameCopyPopupMenu.Enabled := False;
8191 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
8192 FavoriteTreeLogDeletePopupMenu.Enabled := False;
8193 end else if TObject(FClickNode.Data) is TFavoriteFolder then begin
8194 FavoriteTreeBrowseFolderPopupMenu.Enabled := True;
8195 FavoriteTreeDeletePopupMenu.Enabled := True;
8196 FavoriteTreeRenamePopupMenu.Enabled := True;
8197 FavoriteTreeNewFolderPopupMenu.Enabled := True;
8198 FavoriteTreeReloadPopupMenu.Enabled := False;
8199 FavoriteTreeURLCopyPopupMenu.Enabled := False;
8200 FavoriteTreeNameCopyPopupMenu.Enabled := False;
8201 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
8202 FavoriteTreeLogDeletePopupMenu.Enabled := False;
8203 end else if TObject(FClickNode.Data) is TFavoriteThreadItem then begin
8204 FavoriteTreeBrowseFolderPopupMenu.Enabled := False;
8205 FavoriteTreeDeletePopupMenu.Enabled := True;
8206 FavoriteTreeRenamePopupMenu.Enabled := True;
8207 FavoriteTreeNewFolderPopupMenu.Enabled := True;
8208 FavoriteTreeReloadPopupMenu.Enabled := True;
8209 FavoriteTreeURLCopyPopupMenu.Enabled := True;
8210 FavoriteTreeNameCopyPopupMenu.Enabled := True;
8211 FavoriteTreeNameURLCopyPopupMenu.Enabled := True;
8212 FavoriteTreeLogDeletePopupMenu.Enabled := True;
8213 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
8214 FavoriteTreeBrowseFolderPopupMenu.Enabled := False;
8215 FavoriteTreeDeletePopupMenu.Enabled := True;
8216 FavoriteTreeRenamePopupMenu.Enabled := True;
8217 FavoriteTreeNewFolderPopupMenu.Enabled := True;
8218 FavoriteTreeReloadPopupMenu.Enabled := True;
8219 FavoriteTreeURLCopyPopupMenu.Enabled := True;
8220 FavoriteTreeNameCopyPopupMenu.Enabled := True;
8221 FavoriteTreeNameURLCopyPopupMenu.Enabled := True;
8222 FavoriteTreeLogDeletePopupMenu.Enabled := False;
8224 FavoriteTreeBrowseFolderPopupMenu.Enabled := False;
8225 FavoriteTreeDeletePopupMenu.Enabled := False;
8226 FavoriteTreeRenamePopupMenu.Enabled := False;
8227 FavoriteTreeNewFolderPopupMenu.Enabled := False;
8228 FavoriteTreeReloadPopupMenu.Enabled := False;
8229 FavoriteTreeURLCopyPopupMenu.Enabled := False;
8230 FavoriteTreeNameCopyPopupMenu.Enabled := False;
8231 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
8232 FavoriteTreeLogDeletePopupMenu.Enabled := False;
8237 procedure TGikoForm.FavoriteTreeViewDeleteActionExecute(Sender: TObject);
8240 if FClickNode = nil then
8242 if FClickNode.IsFirstNode then
8244 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
8245 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
8249 //FDeleteList.Add(FClickNode.Data);
8250 //SetDeleteItemList(FClickNode);
8258 procedure TGikoForm.FavoriteTreeViewRenameActionExecute(Sender: TObject);
8261 if FClickNode = nil then
8263 if FClickNode.IsFirstNode then
8265 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then
8267 FavoriteTreeView.ReadOnly := False;
8268 if (FTreeType = gttFavorite) and (CabinetPanel.Visible) then
8271 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 );
8277 procedure TGikoForm.FavoriteTreeViewNewFolderActionExecute(
8280 NewFavFolder: TFavoriteFolder;
8284 if FClickNode = nil then
8288 if not (TObject(FClickNode.Data) is TFavoriteFolder) then begin
8289 FavoriteTreeView.Selected := FClickNode.Parent;
8290 FClickNode := FClickNode.Parent;
8293 NewFavFolder := TFavoriteFolder.Create;
8294 Node := FavoriteTreeView.Items.AddChildObject(FClickNode, '
\90V
\82µ
\82¢
\83t
\83H
\83\8b\83_', NewFavFolder);
8295 Node.ImageIndex := 14;
8296 Node.SelectedIndex := 14;
8297 // FClickNode.Selected.Expanded := True;
8298 FavoriteTreeView.Selected := Node;
8300 FavoriteTreeViewRenameAction.Execute;
8306 procedure TGikoForm.ToolButton19Click(Sender: TObject);
8309 FavoriteArrangeActionExecute( nil );
8313 procedure TGikoForm.FavoriteBrowseFolder( node: TTreeNode );
8318 if not (TObject(node.Data) is TFavoriteFolder) then
8321 for i := 0 to node.Count - 1 do
8323 if TObject(node.Item[i].Data) is TFavoriteFolder then
8324 FavoriteBrowseFolder( node.Item[i] )
8325 else if TObject(node.Item[i].Data) is TFavoriteThreadItem then
8326 FavoriteClick( node.Item[i], False );
8331 procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
8335 FavoriteBrowseFolder( FClickNode );
8336 BrowserTab.OnChange(nil);
8340 procedure TGikoForm.FavoriteTreeViewChange(Sender: TObject;
8344 if not Mouse.IsDragging then
8345 FavoriteClick( Node );
8349 procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
8352 FClickNode := FavoriteTreeView.Selected;
8353 FavoriteTreeViewReloadActionExecute( Sender );
8357 procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
8360 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';
8361 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
8363 ThreadItem: TThreadItem;
8364 FavThread: TFavoriteThreadItem;
8367 if FClickNode = nil then Exit;
8368 if not (TObject(FClickNode.Data) is TFavoriteThreadItem) then Exit;
8370 FavThread := TFavoriteThreadItem( FClickNode.Data );
8371 ThreadItem := FavThread.Item;
8374 if GikoSys.Setting.DeleteMsg then begin
8375 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
8379 DeleteHistory(ThreadItem);
8380 DeleteTab(ThreadItem);
8381 ThreadItem.DeleteLogFile;
8389 procedure TGikoForm.FavoriteTreeViewReloadActionExecute(Sender: TObject);
8391 ThreadItem: TThreadItem;
8392 FavThread: TFavoriteThreadItem;
8394 FavBoard: TFavoriteBoardItem;
8397 if FClickNode = nil then Exit;
8399 if TObject( FClickNode.Data ) is TFavoriteThreadItem then begin
8400 FavThread := TFavoriteThreadItem( FClickNode.Data );
8401 ThreadItem := FavThread.Item;
8402 if ThreadItem <> nil then
8403 DownloadContent(ThreadItem);
8404 end else if TObject( FClickNode.Data ) is TFavoriteBoardItem then begin
8405 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8406 Board := FavBoard.Item;
8407 DownloadList(Board);
8412 procedure TGikoForm.FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
8414 ThreadItem: TThreadItem;
8415 FavThread: TFavoriteThreadItem;
8417 FavBoard: TFavoriteBoardItem;
8421 if FClickNode = nil then Exit;
8423 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8425 FavThread := TFavoriteThreadItem( FClickNode.Data );
8426 ThreadItem := FavThread.Item;
8429 s := ThreadItem.URL + #13#10;
8431 Clipboard.AsText := s;
8435 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8437 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8438 Board := FavBoard.Item;
8439 if Board <> nil then
8440 if not Board.IsThreadDatRead then
8441 GikoSys.ReadSubjectFile(Board);
8444 s := Board.URL + #13#10;
8446 Clipboard.AsText := s;
8454 procedure TGikoForm.FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
8456 ThreadItem: TThreadItem;
8457 FavThread: TFavoriteThreadItem;
8459 FavBoard: TFavoriteBoardItem;
8463 if FClickNode = nil then Exit;
8465 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8467 FavThread := TFavoriteThreadItem( FClickNode.Data );
8468 ThreadItem := FavThread.Item;
8471 s := ThreadItem.Title + #13#10;
8473 Clipboard.AsText := s;
8477 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8479 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8480 Board := FavBoard.Item;
8481 if Board <> nil then
8482 if not Board.IsThreadDatRead then
8483 GikoSys.ReadSubjectFile(Board);
8486 s := Board.Title + #13#10;
8488 Clipboard.AsText := s;
8496 procedure TGikoForm.FavoriteTreeViewNameURLCopyActionExecute(
8499 ThreadItem: TThreadItem;
8500 FavThread: TFavoriteThreadItem;
8502 FavBoard: TFavoriteBoardItem;
8506 if FClickNode = nil then Exit;
8508 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8510 FavThread := TFavoriteThreadItem( FClickNode.Data );
8511 ThreadItem := FavThread.Item;
8514 s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10;
8516 Clipboard.AsText := s;
8520 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8522 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8523 Board := FavBoard.Item;
8524 if Board <> nil then
8525 if not Board.IsThreadDatRead then
8526 GikoSys.ReadSubjectFile(Board);
8529 s := Board.URL + #13#10 + Board.Title + #13#10;
8531 Clipboard.AsText := s;
8539 function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
8545 for i := 0 to Node.Count - 1 do begin
8546 if Node.Item[i].Data = FindPointer then begin
8547 Result := Node.Item[i];
8549 end else if Node.Item[i].Count > 0 then begin
8550 Found := TreeNodeDataFind( Node.Item[i], FindPointer );
8551 if Found <> nil then begin
8562 procedure TGikoForm.LinkToolBarDragDrop(Sender, Source: TObject; X,
8566 SenderNode: TTreeNode;
8570 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
8571 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
8572 SenderNode := FavoriteTreeView.Items[i];
8577 FavoriteDragDrop( SenderNode, Source );
8581 procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
8582 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8584 if FDragWFirst <> true then begin
8585 FDragWFirst := false;
8589 procedure TGikoForm.LinkToolBarDragOver(Sender, Source: TObject; X,
8590 Y: Integer; State: TDragState; var Accept: Boolean);
8593 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
8597 procedure TGikoForm.OnlyAHundredResExecute(Sender: TObject);
8599 ThreadItem : TThreadItem;
8601 GikoSys.OnlyAHundredRes := OnlyAHundredRes.Checked;
8602 ThreadItem := GetActiveContent;
8603 if ThreadItem <> nil then
8604 SetContent( ThreadItem );
8607 procedure TGikoForm.FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
8611 if FDropSpaceNode <> nil then begin
8612 FDropSpaceNode.Free;
8613 FDropSpaceNode := nil;
8619 procedure TGikoForm.ListCoolBarContextPopup(Sender: TObject;
8620 MousePos: TPoint; var Handled: Boolean);
8623 MousePos := ListCoolBar.ClientToScreen( MousePos );
8624 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
8628 procedure TGikoForm.MainCoolBarContextPopup(Sender: TObject;
8629 MousePos: TPoint; var Handled: Boolean);
8632 MousePos := MainCoolBar.ClientToScreen( MousePos );
8633 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
8637 procedure TGikoForm.BrowserCoolBarContextPopup(Sender: TObject;
8638 MousePos: TPoint; var Handled: Boolean);
8641 MousePos := BrowserCoolBar.ClientToScreen( MousePos );
8642 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
8645 procedure TGikoForm.ExportFavoriteFileAccept(Sender: TObject);
8647 if FavoriteDM.SaveFavoriteFile( ExportFavoriteFile.Dialog.FileName ) Then begin
8648 ShowMessage('
\83t
\83@
\83C
\83\8b\82ð
\8fo
\97Í
\82µ
\82Ü
\82µ
\82½');
8650 ShowMessage('
\83t
\83@
\83C
\83\8b\82Ì
\8fo
\97Í
\82É
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½');
8653 procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
8655 if FListViewBackGroundColor <> value then begin
8656 FListViewBackGroundColor := value;
8657 ListView.Color := FListViewBackGroundColor;
8660 procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
8662 ExportFavoriteFile.Dialog.FileName := FavoriteDM.GetFavoriteFilePath;
8665 procedure TGikoForm.CabinetBBSActionExecute(Sender: TObject);
8668 if CabinetPanel.Visible then begin
8669 if FTreeType = gtt2ch then begin
8670 CabinetVisible( False );
8671 CabinetBBSAction.Checked := False;
8673 CabinetBBSAction.Checked := True;
8676 CabinetVisible( True );
8677 CabinetBBSAction.Checked := True;
8680 if FActiveBBS = nil then
8681 ShowBBSTree( BBSs[ 0 ] )
8683 ShowBBSTree( FActiveBBS );