6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7 OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils, Math,
15 IdHTTP, ActiveX, Clipbrd, Buttons, ToolWin, {HTTPApp,} YofUtils, IdComponent,
16 ShellAPI, ImgList, ActnList, UrlMon, Tabs, IdGlobal, StrUtils,
18 GikoSystem, GikoUtil, Setting, BoardGroup, ThreadControl, ItemDownload,
19 Editor, RoundData, RoundName, KeySetting, GikoPanel, Favorite, FavoriteAdd,
20 FavoriteArrange, AddressHistory, Preview, HTMLDocumentEvent, Kotehan,
21 HintWindow, GikoCoolBar, GikoListView, ToolBarSetting, ToolBarUtil,
22 IndividualAbon, Dialogs, Search, ExternalBoardManager, ExternalBoardPlugInMain,
26 TGikoTreeType = (gttNone, gtt2ch, gttHistory, gttFavorite);
28 TGikoForm = class(TForm)
29 StatusBar: TStatusBar;
32 TreeSplitter: TSplitter;
35 ThreadMainPanel: TPanel;
36 ListSplitter: TSplitter;
38 ListView: TGikoListView;
43 MessageHideButton: TSpeedButton;
44 MessageListView: TListView;
45 MessageSplitter: TSplitter;
47 SpeedButton1: TSpeedButton;
49 CabinetSelectToolButton: TToolButton;
50 HistoryToolBar: TToolBar;
51 ToolButton15: TToolButton;
52 ToolButton18: TToolButton;
53 ItemIcon16: TImageList;
54 ItemIcon32: TImageList;
55 HotToobarImageList: TImageList;
56 ToobarImageList: TImageList;
57 ItemImageList: TImageList;
58 ActionList: TActionList;
59 LogDeleteAction: TAction;
60 KidokuAction: TAction;
61 StdToolBarVisibleAction: TAction;
62 SearchAction: TAction;
63 GikoNaviWebPageAction: TAction;
66 MsgBarVisibleAction: TAction;
67 StatusBarVisibleAction: TAction;
68 LargeIconAction: TAction;
69 SmallIconAction: TAction;
70 ListIconAction: TAction;
71 DetailIconAction: TAction;
72 CabinetBBSAction: TAction;
73 CabinetHistoryAction: TAction;
74 CabinetVisibleAction: TAction;
75 MidokuAction: TAction;
76 AllSelectAction: TAction;
77 UpFolderAction: TAction;
78 ListNumberVisibleAction: TAction;
79 AllItemAction: TAction;
80 LogItemAction: TAction;
81 NewItemAction: TAction;
82 SelectItemAction: TAction;
83 ShowThreadAction: TAction;
87 DeleteMenu: TMenuItem;
89 KidokuMenu: TMenuItem;
90 MidokuMenu: TMenuItem;
91 AllSelectMenu: TMenuItem;
93 StdToolBarMenu: TMenuItem;
94 CabinetMenu: TMenuItem;
97 CabinetVisibleMenu: TMenuItem;
98 MessageMenu: TMenuItem;
99 StatusBarMenu: TMenuItem;
101 LargeIconMenu: TMenuItem;
102 SmallIconMenu: TMenuItem;
104 DetailMenu: TMenuItem;
107 RoundMenu: TMenuItem;
109 OptionMenu: TMenuItem;
113 AboutMenu: TMenuItem;
115 BrowserPopupMenu: TPopupMenu;
116 ShowThreadMenu: TMenuItem;
117 ShowBoardMenu: TMenuItem;
118 ShowBoardAction: TAction;
119 ListIconPopupMenu: TPopupMenu;
120 LargeIconPMenu: TMenuItem;
121 SmallIconPMenu: TMenuItem;
122 ListPMenu: TMenuItem;
123 DetailPMenu: TMenuItem;
124 CabinetCloseAction: TAction;
125 ClosePopupMenu: TPopupMenu;
126 CloseMenu: TMenuItem;
127 OptionAction: TAction;
137 RoundAction: TAction;
138 ListPopupMenu: TPopupMenu;
139 ListRoundPMenu: TMenuItem;
140 ListReservPMenu: TMenuItem;
142 ItemRoundPMenu: TMenuItem;
144 KidokuPMenu: TMenuItem;
145 MidokuPMenu: TMenuItem;
146 AllSelectPMenu: TMenuItem;
147 UrlCopyPMenu: TMenuItem;
149 DeletePMenu: TMenuItem;
151 ViewPMenu: TMenuItem;
152 LargeIconLPMenu: TMenuItem;
153 SmallIconLPMenu: TMenuItem;
154 ListLPMenu: TMenuItem;
155 DetailLPMenu: TMenuItem;
159 URLCopyAction: TAction;
163 MsgBarCloseAction: TAction;
164 ScrollTopAction: TAction;
165 ScrollLastAction: TAction;
166 ScrollNewAction: TAction;
167 ScrollKokoAction: TAction;
168 EditorAction: TAction;
170 ItemReloadAction: TAction;
171 BrowserMaxAction: TAction;
183 SelectListReloadAction: TAction;
184 SelectThreadReloadAction: TAction;
186 KokoPopupMenu: TPopupMenu;
187 KokomadePMenu: TMenuItem;
189 MenuItem1: TMenuItem;
190 MenuItem2: TMenuItem;
191 BrowserTabCloseAction: TAction;
192 BrowserTabPopupMenu: TPopupMenu;
194 KokomadeAction: TAction;
195 ZenbuAction: TAction;
196 KokoResAction: TAction;
197 SelectItemURLCopyAction: TAction;
198 SelectReservAction: TAction;
199 NotSelectTabCloseAction: TAction;
203 TreePopupMenu: TPopupMenu;
204 TreeSelectThreadPupupMenu: TMenuItem;
205 TreeSelectBoardPupupMenu: TMenuItem;
207 TreeSelectURLPupupMenu: TMenuItem;
208 TreeSelectBoradReload: TAction;
209 TreeSelectThreadReload: TAction;
210 TreeSelectURLCopy: TAction;
211 ListToolBarVisibleAction: TAction;
212 BrowserToolBarVisibleAction: TAction;
216 BrowserBottomPanel: TGikoPanel;
217 CabinetSelectPopupMenu: TPopupMenu;
219 ItemReservPMenu: TMenuItem;
220 RoundNamePopupMenu: TPopupMenu;
221 SelectNewRoundName: TAction;
222 SelectDeleteRound: TAction;
223 NewBoardAction: TAction;
226 LoginAction: TAction;
228 KeySettingAction: TAction;
230 AllTabCloseAction: TAction;
238 MessageImageList: TImageList;
239 ProgressBar: TProgressBar;
240 ArrangeAction: TAction;
242 NameURLCopyAction: TAction;
243 SelectItemNameURLCopyAction: TAction;
244 NameUrlCopyPMenu: TMenuItem;
252 ListCoolBar: TGikoCoolBar;
253 ListToolBar: TToolBar;
254 ViewNoButton: TToolButton;
255 IconToolButton: TToolButton;
256 UpFolderButton: TToolButton;
257 Sepa01ToolButton: TToolButton;
258 AllItemToolButton: TToolButton;
259 LogItemToolButton: TToolButton;
260 NewItemToolButton: TToolButton;
261 ListDownloadToolButton: TToolButton;
262 ListThreadDownloadToolButton: TToolButton;
263 ToolButton2: TToolButton;
264 ToolButton1: TToolButton;
265 BrowserCoolBar: TGikoCoolBar;
266 BrowserToolBar: TToolBar;
267 BrowserSizeButton: TToolButton;
268 ToolButton3: TToolButton;
269 TopButton: TToolButton;
270 LastBotton: TToolButton;
271 NewButton: TToolButton;
272 KokoButton: TToolButton;
273 ToolButton9: TToolButton;
274 EditorButton: TToolButton;
275 ToolButton11: TToolButton;
276 IEButton: TToolButton;
277 ToolButton5: TToolButton;
278 ItemReloadButton: TToolButton;
279 ListNameToolBar: TToolBar;
280 ListNameLabel: TLabel;
282 BrowserNameToolBar: TToolBar;
283 ItemBoardImage: TImage;
284 BrowserBoardNameLabel: TLabel;
286 BrowserNameLabel: TLabel;
287 ActiveLogDeleteAction: TAction;
291 ListNameBarVisibleAction: TAction;
293 BrowserNameBarVisibleAction: TAction;
296 TreeSelectNameURLCopy: TAction;
297 TreeSelectNameURLPupupMenu: TMenuItem;
300 PaneInitAction: TAction;
302 BrowserTabToolBar: TToolBar;
303 BrowserTab: TTabControl;
304 ToolButton7: TToolButton;
305 BrowserMinAction: TAction;
308 SelectTextClearAction: TAction;
309 MailTextClearAction: TAction;
310 NameTextClearAction: TAction;
314 LeftmostTabSelectAction: TAction;
315 LeftTabSelectAction: TAction;
316 RightTabSelectAction: TAction;
317 RightmostTabSelectAction: TAction;
323 FavoriteMenu: TMenuItem;
324 FavoriteAddAction: TAction;
326 BoardFavoriteAddMenu: TMenuItem;
327 BoardFavoriteAddAction: TAction;
328 ThreadFavoriteAddAction: TAction;
329 ThreadFavoriteAddMenu: TMenuItem;
330 TreeSelectFavoriteAddAction: TAction;
332 TreeSelectFavoriteAddPupupMenu: TMenuItem;
333 FavoriteArrangeAction: TAction;
334 FavoriteTreeView: TTreeView;
335 StateIconImageList: TImageList;
337 TopRightPanel: TPanel;
340 TopCoolPanel: TPanel;
341 MainCoolBar: TGikoCoolBar;
342 MenuToolBar: TToolBar;
343 StdToolBar: TToolBar;
344 RoundToolButton: TToolButton;
345 ToolButton6: TToolButton;
346 ToolButton4: TToolButton;
347 ToolButton13: TToolButton;
348 AbortToolButton: TToolButton;
349 LoginToolButton: TToolButton;
350 AddressToolBar: TToolBar;
351 AddressComboBox: TComboBox;
352 MoveToToolButton: TToolButton;
353 MoveToAction: TAction;
354 AddressImageList: TImageList;
355 AddressBarVisibleAction: TAction;
356 AddressToolBarMenu: TMenuItem;
358 BrowserTabVisibleAction: TAction;
361 BrowserTabTopAction: TAction;
362 BrowserTabBottomAction: TAction;
366 BrowserTabTabStyleAction: TAction;
367 BrowserTabButtonStyleAction: TAction;
368 BrowserTabFlatStyleAction: TAction;
372 PreviewTimer: TTimer;
373 MonazillaWebPageAction: TAction;
374 MonazillaWebPageAction1: TMenuItem;
375 GikoHelpAction: TAction;
378 KotehanAction: TAction;
380 LinkBarVisibleAction: TAction;
384 ChevronPopupMenu: TPopupMenu;
385 BBS2chWebPageAction: TAction;
388 GikoFolderOpenAction: TAction;
390 LinkToolBar: TToolBar;
392 ToolButton8: TToolButton;
393 ToolButton10: TToolButton;
394 ThreadEditorAction: TAction;
398 LinkBarPopupMenu: TPopupMenu;
399 ToolBarSettingAction: TAction;
401 ToolButton12: TToolButton;
402 ToolButton14: TToolButton;
403 ThreadPopupMenu: TPopupMenu;
404 MenuItem4: TMenuItem;
405 MenuItem5: TMenuItem;
406 MenuItem6: TMenuItem;
408 NameCopyAction: TAction;
409 BoardIEAction: TAction;
411 SelectItemNameCopyAction: TAction;
412 SelectItemNameCopyAction1: TMenuItem;
416 SelectComboBox: TComboBox;
417 MainCoolBarPopupMenu: TPopupMenu;
418 StdToolBarVisiblePMenu: TMenuItem;
419 AddressToolBarVisiblePMenu: TMenuItem;
420 LinkToolBarVisiblePMenu: TMenuItem;
441 SelectItemToolButton: TToolButton;
442 SelectResToolButton: TToolButton;
443 SelectResAction: TAction;
444 ToolButton16: TToolButton;
445 AllResAction: TAction;
446 AllResToolButton: TToolButton;
454 ReloadAction: TAction;
455 GoFowardAction: TAction;
456 GoBackAction: TAction;
457 SelectComboBoxSplitter: TImage;
458 IndividualAbon1: TMenuItem;
460 IndividualAbon2: TMenuItem;
462 CancellIndividualAbon: TAction;
463 AntiIndividualAbon: TMenuItem;
468 SearchBoardName: TMenuItem;
470 TreeSelectSearchBoardName: TAction;
471 CabinetFavoriteAction: TAction;
474 FavoriteTreePopupMenu: TPopupMenu;
475 FavoriteTreeViewRenameAction: TAction;
476 FavoriteTreeRenamePopupMenu: TMenuItem;
477 FavoriteTreeViewNewFolderAction: TAction;
478 FavoriteTreeNewFolderPopupMenu: TMenuItem;
480 FavoriteTreeViewDeleteAction: TAction;
481 FavoriteTreeDeletePopupMenu: TMenuItem;
482 FavoriteToolBar: TToolBar;
483 ToolButton17: TToolButton;
484 ToolButton19: TToolButton;
485 FavoriteTreeViewBrowseFolderAction: TAction;
486 FavoriteTreeBrowseFolderPopupMenu: TMenuItem;
488 FavoriteTreeReloadPopupMenu: TMenuItem;
490 FavoriteTreeURLCopyPopupMenu: TMenuItem;
491 FavoriteTreeNameCopyPopupMenu: TMenuItem;
492 FavoriteTreeLogDeletePopupMenu: TMenuItem;
494 FavoriteTreeNameURLCopyPopupMenu: TMenuItem;
495 FavoriteTreeViewReloadAction: TAction;
496 FavoriteTreeViewURLCopyAction: TAction;
497 FavoriteTreeViewNameCopyAction: TAction;
498 FavoriteTreeViewNameURLCopyAction: TAction;
499 FavoriteTreeViewLogDeleteAction: TAction;
500 OnlyAHundredRes: TAction;
501 ToolButton20: TToolButton;
502 AHundredResButton: TToolButton;
505 ExportFavoriteFileAction1: TMenuItem;
506 ExportFavoriteFile: TFileSaveAs;
507 ToolButton21: TToolButton;
508 ToolButton22: TToolButton;
509 ToolButton23: TToolButton;
510 ToolButton24: TToolButton;
513 FavoriteTreeViewBrowseBoardAction: TAction;
514 FavoriteTreeViewBrowseThreadAction: TAction;
515 UpBoardAction: TAction;
516 procedure FormCreate(Sender: TObject);
517 procedure FormDestroy(Sender: TObject);
518 procedure CabinetPanelHide(Sender: TObject);
519 procedure FormClose(Sender: TObject; var Action: TCloseAction);
520 procedure TreeViewChange(Sender: TObject; Node: TTreeNode);
521 procedure ListViewData(Sender: TObject; Item: TListItem);
522 procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
523 const FindString: String; const FindPosition: TPoint;
524 FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
525 Wrap: Boolean; var Index: Integer);
526 procedure ListViewDataHint(Sender: TObject; StartIndex,
528 procedure ListViewDataStateChange(Sender: TObject; StartIndex,
529 EndIndex: Integer; OldState, NewState: TItemStates);
530 procedure BrowserStatusTextChange(Sender: TObject;
531 const Text: WideString);
532 procedure BrowserTitleChange(Sender: TObject; const Text: WideString);
533 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
534 procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
535 var AllowChange: Boolean);
536 procedure ListViewKeyDown(Sender: TObject; var Key: Word;
538 procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
539 procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
540 Button: TToolButton; State: TCustomDrawState;
541 var DefaultDraw: Boolean);
542 procedure BrowserBeforeNavigate2(Sender: TObject;
543 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
544 Headers: OleVariant; var Cancel: WordBool);
545 procedure ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
546 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
547 var DefaultDraw: Boolean);
548 procedure TreeViewCustomDraw(Sender: TCustomTreeView;
549 const ARect: TRect; var DefaultDraw: Boolean);
550 procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
551 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
552 procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
553 procedure TreeViewDblClick(Sender: TObject);
554 procedure FavoriteTreeViewClick(Sender: TObject);
555 procedure ListViewCustomDraw(Sender: TCustomListView;
556 const ARect: TRect; var DefaultDraw: Boolean);
557 procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
558 Shift: TShiftState; X, Y: Integer);
559 procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
560 procedure MessageListViewResize(Sender: TObject);
561 procedure ExitActionExecute(Sender: TObject);
562 procedure AllSelectActionExecute(Sender: TObject);
563 procedure StdToolBarVisibleActionExecute(Sender: TObject);
564 procedure MsgBarVisibleActionExecute(Sender: TObject);
565 procedure StatusBarVisibleActionExecute(Sender: TObject);
566 procedure LargeIconActionExecute(Sender: TObject);
567 procedure SmallIconActionExecute(Sender: TObject);
568 procedure ListIconActionExecute(Sender: TObject);
569 procedure DetailIconActionExecute(Sender: TObject);
570 procedure SearchActionExecute(Sender: TObject);
571 procedure OptionActionExecute(Sender: TObject);
572 procedure GikoNaviWebPageActionExecute(Sender: TObject);
573 procedure AboutActionExecute(Sender: TObject);
574 procedure CabinetHistoryActionExecute(Sender: TObject);
575 procedure CabinetVisible( isVisible : Boolean );
576 procedure CabinetVisibleActionExecute(Sender: TObject);
577 procedure AllItemActionExecute(Sender: TObject);
578 procedure LogItemActionExecute(Sender: TObject);
579 procedure NewItemActionExecute(Sender: TObject);
580 procedure SelectItemActionExecute(Sender: TObject);
581 procedure ListNumberVisibleActionExecute(Sender: TObject);
582 procedure UpFolderActionExecute(Sender: TObject);
583 procedure IconStyleExecute(Sender: TObject);
584 procedure RoundActionExecute(Sender: TObject);
585 procedure StopActionExecute(Sender: TObject);
586 procedure MsgBarCloseActionExecute(Sender: TObject);
587 procedure BrowserMaxActionExecute(Sender: TObject);
588 procedure ScrollTopActionExecute(Sender: TObject);
589 procedure ScrollLastActionExecute(Sender: TObject);
590 procedure ScrollNewActionExecute(Sender: TObject);
591 procedure ScrollKokoActionExecute(Sender: TObject);
592 procedure EditorActionExecute(Sender: TObject);
593 procedure IEActionExecute(Sender: TObject);
594 procedure ShowThreadActionExecute(Sender: TObject);
595 procedure ShowBoardActionExecute(Sender: TObject);
596 procedure URLCopyActionExecute(Sender: TObject);
597 procedure ItemReloadActionExecute(Sender: TObject);
598 procedure SelectListReloadActionExecute(Sender: TObject);
599 procedure SelectThreadReloadActionExecute(Sender: TObject);
600 procedure SelectListReloadActionUpdate(Sender: TObject);
601 procedure AllItemActionUpdate(Sender: TObject);
602 procedure LogItemActionUpdate(Sender: TObject);
603 procedure NewItemActionUpdate(Sender: TObject);
604 procedure SelectItemActionUpdate(Sender: TObject);
605 procedure UpFolderActionUpdate(Sender: TObject);
606 procedure FormResize(Sender: TObject);
607 procedure ScrollTopActionUpdate(Sender: TObject);
608 procedure ScrollLastActionUpdate(Sender: TObject);
609 procedure ScrollNewActionUpdate(Sender: TObject);
610 procedure ScrollKokoActionUpdate(Sender: TObject);
611 procedure EditorActionUpdate(Sender: TObject);
612 procedure IEActionUpdate(Sender: TObject);
613 procedure ShowThreadActionUpdate(Sender: TObject);
614 procedure ShowBoardActionUpdate(Sender: TObject);
615 procedure SelectThreadReloadActionUpdate(Sender: TObject);
616 procedure ListViewSelectItem(Sender: TObject; Item: TListItem;
618 procedure SelectTimerTimer(Sender: TObject);
619 procedure ItemReloadActionUpdate(Sender: TObject);
620 procedure ListViewDblClick(Sender: TObject);
621 procedure LogDeleteActionExecute(Sender: TObject);
622 procedure KokomadeActionExecute(Sender: TObject);
623 procedure ZenbuActionExecute(Sender: TObject);
624 procedure KokoResActionExecute(Sender: TObject);
625 procedure ListPopupMenuPopup(Sender: TObject);
626 procedure SelectItemURLCopyActionExecute(Sender: TObject);
627 procedure SelectItemURLCopyActionUpdate(Sender: TObject);
628 procedure AllSelectActionUpdate(Sender: TObject);
629 procedure LogDeleteActionUpdate(Sender: TObject);
630 procedure BrowserTabCloseActionExecute(Sender: TObject);
631 procedure NotSelectTabCloseActionExecute(Sender: TObject);
632 procedure TreeSelectBoradReloadExecute(Sender: TObject);
633 procedure TreeSelectThreadReloadExecute(Sender: TObject);
634 procedure TreeSelectURLCopyExecute(Sender: TObject);
635 procedure TreePopupMenuPopup(Sender: TObject);
636 procedure ListToolBarVisibleActionExecute(Sender: TObject);
637 procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
638 procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
639 var Cancel: WordBool);
640 procedure ListSplitterCanResize(Sender: TObject; var NewSize: Integer;
641 var Accept: Boolean);
642 procedure ListSplitterMoved(Sender: TObject);
643 procedure BrowserTabChange(Sender: TObject);
644 procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
645 Shift: TShiftState; X, Y: Integer);
646 procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
647 State: TDragState; var Accept: Boolean);
648 procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
649 procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
651 procedure BrowserDocumentComplete(Sender: TObject;
652 const pDisp: IDispatch; var URL: OleVariant);
653 procedure SelectReservActionUpdate(Sender: TObject);
654 procedure RoundNamePopupMenuPopup(Sender: TObject);
655 procedure SelectNewRoundNameExecute(Sender: TObject);
656 procedure SelectDeleteRoundExecute(Sender: TObject);
657 procedure SelectReservActionExecute(Sender: TObject);
658 procedure NewBoardActionExecute(Sender: TObject);
659 procedure LoginActionExecute(Sender: TObject);
660 procedure KeySettingActionExecute(Sender: TObject);
661 procedure AllTabCloseActionExecute(Sender: TObject);
662 procedure ArrangeActionExecute(Sender: TObject);
663 procedure NameURLCopyActionExecute(Sender: TObject);
664 procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
665 procedure URLCopyActionUpdate(Sender: TObject);
666 procedure NameURLCopyActionUpdate(Sender: TObject);
667 procedure BrowserTabCloseActionUpdate(Sender: TObject);
668 procedure NotSelectTabCloseActionUpdate(Sender: TObject);
669 procedure AllTabCloseActionUpdate(Sender: TObject);
670 procedure SelectItemNameURLCopyActionUpdate(Sender: TObject);
671 procedure ActiveLogDeleteActionExecute(Sender: TObject);
672 procedure ActiveLogDeleteActionUpdate(Sender: TObject);
673 procedure ListNameBarVisibleActionExecute(Sender: TObject);
674 procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
675 procedure TreeSelectNameURLCopyExecute(Sender: TObject);
676 procedure PaneInitActionExecute(Sender: TObject);
677 procedure FormShow(Sender: TObject);
678 procedure BrowserTabToolBarResize(Sender: TObject);
679 procedure BrowserMinActionExecute(Sender: TObject);
680 procedure SelectTextClearActionExecute(Sender: TObject);
681 procedure NameTextClearActionExecute(Sender: TObject);
682 procedure MailTextClearActionExecute(Sender: TObject);
683 procedure LeftmostTabSelectActionExecute(Sender: TObject);
684 procedure LeftTabSelectActionExecute(Sender: TObject);
685 procedure RightTabSelectActionExecute(Sender: TObject);
686 procedure RightmostTabSelectActionExecute(Sender: TObject);
687 procedure LeftmostTabSelectActionUpdate(Sender: TObject);
688 procedure LeftTabSelectActionUpdate(Sender: TObject);
689 procedure RightTabSelectActionUpdate(Sender: TObject);
690 procedure RightmostTabSelectActionUpdate(Sender: TObject);
691 procedure FavoriteMenuClick(Sender: TObject);
692 procedure FavoriteAddActionExecute(Sender: TObject);
693 procedure FavoriteAddActionUpdate(Sender: TObject);
694 procedure BoardFavoriteAddActionExecute(Sender: TObject);
695 procedure BoardFavoriteAddActionUpdate(Sender: TObject);
696 procedure ThreadFavoriteAddActionExecute(Sender: TObject);
697 procedure ThreadFavoriteAddActionUpdate(Sender: TObject);
698 procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
699 procedure FavoriteArrangeActionExecute(Sender: TObject);
700 procedure MainCoolBarResize(Sender: TObject);
701 procedure MoveToActionExecute(Sender: TObject);
702 procedure AddressToolBarResize(Sender: TObject);
703 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
705 procedure AddressBarVisibleActionExecute(Sender: TObject);
706 procedure BrowserEnter(Sender: TObject);
707 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
708 procedure BrowserTabVisibleActionExecute(Sender: TObject);
709 procedure BrowserTabTopActionExecute(Sender: TObject);
710 procedure BrowserTabBottomActionExecute(Sender: TObject);
711 procedure BrowserTabTabStyleActionExecute(Sender: TObject);
712 procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
713 procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
714 procedure PreviewTimerTimer(Sender: TObject);
715 procedure MessageHideButtonClick(Sender: TObject);
716 procedure MonazillaWebPageActionExecute(Sender: TObject);
717 procedure GikoHelpActionExecute(Sender: TObject);
718 procedure ToolButton18Click(Sender: TObject);
719 procedure KotehanActionExecute(Sender: TObject);
720 procedure LinkBarVisibleActionExecute(Sender: TObject);
721 procedure BBS2chWebPageActionExecute(Sender: TObject);
722 procedure GikoFolderOpenActionExecute(Sender: TObject);
723 procedure MainCoolBarBandInfo(Sender: TObject;
724 var BandInfo: PReBarBandInfoA);
725 procedure MainCoolBarChevronClick(Sender: TObject;
726 RebarChevron: PNMRebarChevron);
727 procedure ListCoolBarBandInfo(Sender: TObject;
728 var BandInfo: PReBarBandInfoA);
729 procedure ListCoolBarChevronClick(Sender: TObject;
730 RebarChevron: PNMRebarChevron);
731 procedure BrowserCoolBarBandInfo(Sender: TObject;
732 var BandInfo: PReBarBandInfoA);
733 procedure BrowserCoolBarChevronClick(Sender: TObject;
734 RebarChevron: PNMRebarChevron);
735 procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
736 procedure ThreadEditorActionExecute(Sender: TObject);
737 procedure ThreadEditorActionUpdate(Sender: TObject);
738 procedure ToolBarSettingActionExecute(Sender: TObject);
739 procedure NameCopyActionExecute(Sender: TObject);
740 procedure BoardIEActionExecute(Sender: TObject);
741 procedure SelectItemNameCopyActionExecute(Sender: TObject);
742 procedure SelectItemNameCopyActionUpdate(Sender: TObject);
743 procedure BoardIEActionUpdate(Sender: TObject);
744 procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
745 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
746 procedure NameCopyActionUpdate(Sender: TObject);
747 procedure SelectComboBoxChange(Sender: TObject);
748 procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
750 procedure SelectComboBoxExit(Sender: TObject);
751 procedure NG1Click(Sender: TObject);
752 procedure SelectResActionExecute(Sender: TObject);
753 procedure SelectResActionUpdate(Sender: TObject);
754 procedure FormKeyDown(Sender: TObject; var Key: Word;
756 procedure FormKeyUp(Sender: TObject; var Key: Word;
758 procedure AllResActionExecute(Sender: TObject);
759 procedure AllResActionUpdate(Sender: TObject);
760 procedure ReloadClick(Sender: TObject);
761 procedure GoBackClick(Sender: TObject);
762 procedure GoFowardClick(Sender: TObject);
763 procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
764 Shift: TShiftState; X, Y: Integer);
765 procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
766 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
767 procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
768 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
769 procedure StatusBarResize(Sender: TObject);
770 procedure IndividualAbon1Click(Sender: TObject);
771 procedure IndividualAbon2Click(Sender: TObject);
772 procedure N42Click(Sender: TObject);
773 procedure SelectComboBoxEnter(Sender: TObject);
774 procedure AntiIndividualAbonClick(Sender: TObject);
775 procedure N51Click(Sender: TObject);
776 procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
777 procedure CabinetFavoriteActionExecute(Sender: TObject);
778 procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
780 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
781 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
783 procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
785 procedure FavoriteTreePopupMenuPopup(Sender: TObject);
786 procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
787 procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
788 procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
789 procedure ToolButton19Click(Sender: TObject);
790 procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject);
791 procedure FavoriteTreeViewChange(Sender: TObject; Node: TTreeNode);
792 procedure FavoriteTreeViewDblClick(Sender: TObject);
793 procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject);
794 procedure FavoriteTreeViewReloadActionExecute(Sender: TObject);
795 procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
796 procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
797 procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject);
798 procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
799 procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
800 Shift: TShiftState; X, Y: Integer);
801 procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
802 State: TDragState; var Accept: Boolean);
803 procedure OnlyAHundredResExecute(Sender: TObject);
804 procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
806 procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
807 var Handled: Boolean);
808 procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
809 var Handled: Boolean);
810 procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
811 var Handled: Boolean);
812 procedure ExportFavoriteFileAccept(Sender: TObject);
813 procedure ExportFavoriteFileBeforeExecute(Sender: TObject);
814 procedure CabinetBBSActionExecute(Sender: TObject);
815 procedure FavoriteTreeViewBrowseThreadActionExecute(Sender: TObject);
816 procedure FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
817 procedure UpBoardActionExecute(Sender: TObject);
818 procedure UpBoardActionUpdate(Sender: TObject);
825 FEnabledCloseButton: Boolean;
826 // ThreadCreate: TThreadCreate;
828 FClickNode: TTreeNode;
831 FPreviewBrowser: TPreviewBrowser;
834 FBrowserSizeHeight: Integer;
835 FBrowserSizeWidth: Integer;
837 // FFavorite: TFavorite;
838 FBrowserComplete: Boolean;
839 FTabHintIndex: Integer;
840 FListStyle: TViewStyle; //
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93\83X
\83^
\83C
\83\8b
841 FItemNoVisible: Boolean; //
\83\8a\83X
\83g
\94Ô
\8d\86\95\
\8e¦
\83t
\83\89\83O
842 FViewType: TGikoViewType; //
\83\8a\83X
\83g
\83A
\83C
\83e
\83\80\95\
\8e¦
\83^
\83C
\83v
843 FActiveList: TObject;
844 FActiveContent: TThreadItem; //
846 FHistoryList: TList; //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
847 FTreeType: TGikoTreeType;
851 // FLastRoundTime: TDateTime;
852 BrowserNullTab: TThreadItem;
853 // DoubleClickOccurred: array [TMouseButton] of Boolean;
854 FDownloadTitle: string; //
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86\82Ì
\83^
\83C
\83g
\83\8b\96¼
855 FDownloadMax: Integer; //
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86\82Ì
\8dÅ
\91å
\83T
\83C
\83Y
856 FEvent: THTMLDocumentEventSink;//
\83u
\83\89\83E
\83U
\83h
\83L
\83\85\83\81\83\93\83g
\83C
\83x
\83\93\83g
858 Fkeynum : Integer; //
\83L
\81[
\83{
\81[
\83h
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\97p
860 IsDraggingSelectComboBox : Boolean;
861 DraggingSelectComboBoxPosition : TPoint;
863 FSearchDialog: TSearchDialog;
865 FDropSpaceNode: TTreeNode;
867 FDragTime : Cardinal; //
\83\8a\83\93\83N
\82ÌD&D
\97p
868 FDragButton : TToolButton; //
\83\8a\83\93\83N
\82ÌD&D
\97p
\82ÉDrag
\82µ
\82Ä
\82éButton
\95Û
\91¶
869 FDragWFirst : Boolean; //WebTab
\82ÌD&D
\97p
871 FListViewBackGroundColor : TColor; //ListView
\82ÌBackGroundColor
872 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¦
873 FOddColor : TColor; //
\82»
\82Ì
\90F
875 FSelectResWord : string; //
\83\8c\83X
\8di
\8d\9e\83\8f\81[
\83h
876 procedure SetBoardTreeNode( inBBS : TBBS );
877 function SetCategoryListItem(ABBS2ch: TBBS): Integer;
878 function SetBoardListItem(Category: TCategory): Integer;
879 function SetThreadListItem(Board: TBoard): Integer;
880 // function GetRoundName(index: integer): string;
882 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
883 procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
884 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer);
885 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
886 procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
888 procedure SetActiveList(Obj: TObject);
890 procedure ListDoubleClick;
891 procedure BrowserMovement(AName: string);
892 procedure SelectListItem(List: TList);
893 // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
894 procedure DeleteTab(ThreadItem: TThreadItem);
895 function Hook(var Message: TMessage): Boolean;
896 procedure AddRoundNameMenu(MenuItem: TMenuItem);
897 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
898 procedure SetSelectRoundName(Sender: TObject);
899 function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
901 procedure SetMenuFont;
902 // procedure CreateFavMenu(Folder: TFavoriteFolder);
903 procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
904 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
905 procedure FavoriteClick(Sender: TObject); overload;
906 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
907 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
908 function OnDocumentContextMenu(Sender: TObject): WordBool;
909 // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
910 procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
911 procedure ShowTextPopup;
912 //procedure ShowTextPopup(HintData: THintData);
913 // procedure SetStdToolBar;
914 // function GetAction(ActionName: string): TContainedAction;
915 procedure SetLinkBar;
916 function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
917 procedure MenuBarChevronMenu;
918 procedure LinkBarChevronMenu;
919 procedure ToolBarChevronMenu(ToolBar: TToolBar);
920 procedure ModifySelectList;
921 procedure FavoriteBrowseFolder( node: TTreeNode );
922 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
923 procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
924 procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
925 procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
926 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
927 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
928 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
929 procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
930 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
932 procedure BrowserTabClick(Sender: TObject);
933 procedure SetListViewBackGroundColor(value: TColor);
934 procedure BBSMenuItemOnClick( Sender : TObject );
936 procedure CreateParams(var Params: TCreateParams); override;
937 procedure WndProc(var Message: TMessage); override;
938 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
939 procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
940 procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
943 // FDownload: TDownload;
944 FControlThread: TThreadControl;
945 procedure MoveToURL(URL: string);
946 procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
948 function GetHttpState: Boolean;
949 procedure SetEnabledCloseButton(Enabled: Boolean);
950 function GetTreeNode(Data: TObject): TTreeNode;
951 procedure AppFormDeactivate(Sender: TObject);
952 // procedure CabinetPanelVisible(PanelVisible: Boolean);
953 procedure ListViewAllSelect;
955 property ListStyle: TViewStyle read FListStyle write FListStyle;
956 property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
957 property ViewType: TGikoViewType read FViewType write FViewType;
959 property NameCookie: string read FNameCookie write FNameCookie;
960 property MailCookie: string read FMailCookie write FMailCookie;
962 procedure SetContent(ThreadItem: TThreadItem);
963 function GetActiveContent: TThreadItem;
964 function GetActiveList: TObject;
966 property ActiveList: TObject read GetActiveList write SetActiveList;
967 // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
969 procedure SetListViewType(AViewType: TGikoViewType); overload;
970 procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
971 procedure DownloadContent(ThreadItem: TThreadItem);
972 procedure DownloadList(Board: TBoard);
973 procedure PlaySound(SoundEventName: string);
975 function AddHistory( FavItem: TFavoriteThreadItem ): Boolean;
976 procedure DeleteHistory( threadItem: TThreadItem );
977 procedure ClearHistory;
978 procedure SaveHistory;
979 procedure LoadHistory;
980 procedure ShowBBSTree( inBBS : TBBS );
981 procedure ShowHistoryTree;
982 procedure SetHistoryTreeNode;
983 // procedure SelectTreeNode(Item: TObject);
984 procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
985 procedure SetBrowserTabState;
986 // property Favorite: TFavorite read FFavorite write FFavorite;
987 procedure SetToolBarPopup;
988 procedure ShowFavoriteAddDialog( Item : TObject );
989 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
990 property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
991 property OddColor : TColor read FOddColor write FOddColor;
994 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
997 TFavoriteMenuItem = class(TMenuItem)
1001 property Data: Pointer read FData write FData;
1004 TBBSMenuItem = class(TMenuItem)
1008 property Data: Pointer read FData write FData;
1011 TLinkToolButton = class(TToolButton)
1015 property Data: Pointer read FData write FData;
1019 GikoForm: TGikoForm;
1024 About, Option, Round, Splash, Sort, ListSelect,
1025 NewBoard, MojuUtils;
1028 CAPTION_NAME: string = '
\83M
\83R
\83i
\83r';
1029 BLANK_HTML: string = 'about:blank';
1030 SELECTCOMBOBOX_NAME: string = ''; // '
\83X
\83\8c\83b
\83h
\8di
\8d\9e\8c\9f\8dõ';
1031 SELECTCOMBOBOX_COLOR: TColor = clWindow;
1033 DandD_THRESHOLD = 5; //D&D
\82Ìè
\87\92l
\81ipixcel)
1034 //
\83c
\83\8a\81[
\81E
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93
1035 ITEM_ICON_2CH1 = 0; //2ch
\83A
\83C
\83R
\83\93
1036 ITEM_ICON_2CH2 = 1; //2ch
\83A
\83C
\83R
\83\93
1037 ITEM_ICON_CATEGORY1 = 2; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1038 ITEM_ICON_CATEGORY2 = 3; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1039 ITEM_ICON_BOARD_NOSUBJECT = 3; //
\93Ç
\82Ý
\8d\9e\82Ü
\82ê
\82Ä
\82¢
\82È
\82¢
\94Â
\83A
\83C
\83R
\83\93
1040 ITEM_ICON_BOARD1 = 4; //
\94Â
\83A
\83C
\83R
\83\93
1041 ITEM_ICON_BOARD2 = 5; //
\94Â
\83A
\83C
\83R
\83\93
1042 ITEM_ICON_THREADLOG1 = 6; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1043 ITEM_ICON_THREADLOG2 = 7; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1044 ITEM_ICON_THREAD1 = 8; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1045 ITEM_ICON_THREAD2 = 9; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1046 ITEM_ICON_THREADNEW1 = 10; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1047 ITEM_ICON_THREADNEW2 = 11; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1048 ITEM_ICON_SORT1 = 12; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1049 ITEM_ICON_SORT2 = 13; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1050 ITEM_ICON_BOARD_LOG = 17; //
\83X
\83\8c\83\8d\83O
\82 \82è
\94Â
\83A
\83C
\83R
\83\93
1051 ITEM_ICON_BOARD_NEW = 18; //
\83X
\83\8c\90V
\92\85\94Â
\83A
\83C
\83R
\83\93
1053 //
\83c
\81[
\83\8b\83o
\81[
\83A
\83C
\83R
\83\93
1054 TOOL_ICON_HEIGHT_MAX = 16; //
\8d\82\82³
\8dÅ
\91å
\83A
\83C
\83R
\83\93
1055 TOOL_ICON_HEIGHT_MIN = 17; //
\8d\82\82³
\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1056 TOOL_ICON_HEIGHT_NORMAL = 18; //
\8d\82\82³
\95W
\8f\80\83A
\83C
\83R
\83\93
1057 TOOL_ICON_WIDTH_MAX = 19; //
\95\9d\8dÅ
\91å
\83A
\83C
\83R
\83\93
1058 TOOL_ICON_WIDTH_MIN = 20; //
\95\9d\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1059 TOOL_ICON_WIDTH_NORMAL = 21; //
\95\9d\95W
\8f\80\83A
\83C
\83R
\83\93
1061 TOOL_ICON_FAV_FOLDER = 30; //
\82¨
\8bC
\82É
\93ü
\82è
\83t
\83H
\83\8b\83_
\83A
\83C
\83R
\83\93
1062 TOOL_ICON_FAV_BOARD = 31; //
\82¨
\8bC
\82É
\93ü
\82è
\94Â
\83A
\83C
\83R
\83\93
1063 TOOL_ICON_FAV_THREAD = 32; //
\82¨
\8bC
\82É
\93ü
\82è
\83X
\83\8c\83A
\83C
\83R
\83\93
1065 HTML_FILE_NAME = 'temp_preview.html';
1069 procedure TGikoForm.CreateParams(var Params: TCreateParams);
1072 if FormStyle in [fsNormal, fsStayOnTop] then begin
1073 if BorderStyle in [bsSingle, bsSizeable] then begin
1074 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1075 Params.WndParent := 0;
1080 procedure TGikoForm.FormCreate(Sender: TObject);
1082 TVS_NOTOOLTIPS = $0080;
1088 wp: TWindowPlacement;
1090 item : TBBSMenuItem;
1094 Writeln('============================================================');
1095 Writeln('
\83M
\83R
\83i
\83r
\83f
\83o
\83b
\83O
\83R
\83\93\83\
\81[
\83\8b');
1097 Writeln('
\82±
\82Ì
\89æ
\96Ê
\82ð
\95Â
\82¶
\82È
\82¢
\82Å
\82
\82¾
\82³
\82¢
\81B');
1098 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¢');
1099 Writeln('============================================================');
1101 Application.OnDeactivate := AppFormDeactivate;
1102 Self.OnDeactivate := AppFormDeactivate;
1103 Application.HookMainWindow(Hook);
1105 FTreeType := gttNone;
1107 FSearchDialog := nil;
1109 //
\8eè
\82Ì
\83J
\81[
\83\
\83\8b
1110 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1112 //
\8f\84\89ñ
\83f
\81[
\83^
\93Ç
\82Ý
\8d\9e\82Ý
1113 RoundList := TRoundList.Create;
1114 RoundList.LoadRoundFile;
1116 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1117 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1119 //
\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Æ)
1120 InitializeBoardPlugIns;
1122 EnabledCloseButton := True;
1123 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\93Ç
\8d\9e(ReadFavorite
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1124 GikoSys.ReadBoardFile;
1125 // SetBoardTreeNode; //
\83c
\83\8a\81[
\82É
\83{
\81[
\83h
\92Ç
\89Á
1126 //
\83\81\83j
\83\85\81[
\82É
\92Ç
\89Á
1127 for i := Length( BBSs ) - 1 downto 0 do begin
1129 item := TBBSMenuItem.Create( PopupMenu );
1130 item.Caption := BBSs[ i ].Title;
1131 item.Data := BBSs[ i ];
1132 item.OnClick := BBSMenuItemOnClick;
1133 CabinetSelectPopupMenu.Items.Insert( 0, item );
1134 item := TBBSMenuItem.Create( PopupMenu );
1135 item.Caption := BBSs[ i ].Title;
1136 item.Data := BBSs[ i ];
1137 item.OnClick := BBSMenuItemOnClick;
1138 CabinetMenu.Insert( 0, item );
1143 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g(LoadHistory
\82æ
\82è
\82à
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1144 FHistoryList := TList.Create;
1146 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1149 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
1150 // FFavorite := TFavorite.Create(FavoriteTreeView);
1151 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1152 FavoriteDM.ReadFavorite;
1154 //
\83\8a\83X
\83g
\83X
\83^
\83C
\83\8b
1155 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1157 //
\83\81\83C
\83\93\83N
\81[
\83\8b\83o
\81[
\88Ê
\92u
1158 // MainCoolBar.Top := 0;
1159 // MainCoolBar.Left := 0;
1161 //
\83A
\83j
\83\81\83p
\83l
\83\8b\88Ê
\92u
1162 AnimePanel.Top := 0;
1163 AnimePanel.Left := 0;
1165 //
\8ae
\8eí
\89Â
\8e\8b\8fó
\91Ô
\82È
\82Ç
\90Ý
\92è
1167 //
\83L
\83\83\83r
\83l
\83b
\83g
1168 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1170 //
\83\81\83b
\83Z
\81[
\83W
\83o
\81[
1171 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1172 MsgBarVisibleActionExecute(nil);
1173 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1175 //
\83X
\83e
\81[
\83^
\83X
\83o
\81[
1176 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1177 StatusBarVisibleActionExecute(nil);
1179 //
\83t
\83H
\83\93\83g
\81E
\90F
\90Ý
\92è
1180 TreeView.Items.BeginUpdate;
1181 FavoriteTreeView.Items.BeginUpdate;
1182 ListView.Items.BeginUpdate;
1184 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1185 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1186 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1187 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1189 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1190 FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1191 FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1192 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1194 ListView.Font.Name := GikoSys.Setting.ListFontName;
1195 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1196 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1197 //ListView.Color := GikoSys.Setting.ListBackColor;
1198 ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1199 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1200 FOddColor := GikoSys.Setting.OddColor;
1203 TreeView.Items.EndUpdate;
1204 FavoriteTreeView.Items.EndUpdate;
1205 ListView.Items.EndUpdate;
1207 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1208 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1210 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
1211 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1212 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1213 FDragWFirst := false;
1215 // TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
1216 // TreeView.Selected := TreeView.Items[0]; //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
1217 SetContent(nil); //
\83u
\83\89\83E
\83U
\82ð
\8bó
\94\92\95\
\8e¦
1219 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95\9c\8c³
1220 wp.length := sizeof(wp);
1221 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1222 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1223 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1224 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1225 wp.showCmd := SW_HIDE;
1226 SetWindowPlacement(Handle, @wp);
1228 // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1229 // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1230 if GikoSys.Setting.WindowMax then
1231 WindowState := wsMaximized;
1233 //
\83M
\83R
\83A
\83j
\83\81
1235 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1236 if FileExists(FileName) then
1237 Animate.FileName := FileName;
1240 // AnimePanel.Height := 26;
1241 // AnimePanel.Width := 39;
1242 // AnimePanel.Top := 2;
1243 // AnimePanel.Left := Width - 48;
1249 //
\83X
\83\8c\91S
\95\94\95\
\8e¦
\83{
\83^
\83\93\82ð
\89\9f\82³
\82ê
\82½
\8fó
\91Ô
\82É
\82·
\82é
1250 AllItemAction.Checked := True;
1251 AllResAction.Checked := True;
1253 //TreeView
\82Ì
\8e×
\96\82\8fL
\82¢ToolTip
\82ð
\94ñ
\95\
\8e¦
1254 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1255 Style := Style or TVS_NOTOOLTIPS;
1256 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1258 //
\83c
\83\8a\81[
\82ð
\83\81\83C
\83\93\82¾
\82¯
\95\
\8e¦
\82É
\82µ
\82Ä
\8dÅ
\91å
\89»
1259 TreeView.Align := alClient;
1260 FavoriteTreeView.Align := alClient;
1261 FavoriteTreeView.Visible := False;
1263 //
\83u
\83\89\83E
\83U
\83T
\83C
\83Y
\95Ï
\8dX
\82Ì
\8f\89\8aú
\89»
1264 // FBrowserSizeFlag := False;
1265 // FBrowserSizeHeight := ViewPanel.Height;
1267 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1268 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1270 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1271 ArrangeAction.Execute;
1273 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1274 case GikoSys.Setting.ListWidthState of
1276 ViewPanel.Width := 1;
1277 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1278 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1281 ViewPanel.Width := GikoSys.Setting.ListWidth;
1282 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1283 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1286 ViewPanel.Width := GikoSys.Setting.ListWidth;
1287 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1288 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1291 // if GikoSys.Setting.ListWidthMax then begin
1292 // ViewPanel.Width := 1;
1293 // BrowserSizeAction.ImageIndex := ICON_WIDTH_MIN;
1295 // ViewPanel.Width := GikoSys.Setting.ListWidth;
1296 // BrowserSizeAction.ImageIndex := ICON_WIDTH_MAX;
1299 case GikoSys.Setting.ListHeightState of
1301 ViewPanel.Height := 1;
1302 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1303 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1306 ViewPanel.Height := GikoSys.Setting.ListHeight;
1307 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1308 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1311 ViewPanel.Height := GikoSys.Setting.ListHeight;
1312 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1313 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1316 // if GikoSys.Setting.ListHeightState = glsMax then begin
1318 // ViewPanel.Height := GikoSys.Setting.ListHeight;
1319 // BrowserSizeAction.ImageIndex := ICON_HEIGHT_MAX;
1323 //
\83v
\83\8d\83O
\83\8c\83X
\83o
\81[
\82Ì
\8f\89\8aú
\89»
1324 // ProgressBar.Visible := False;
1325 ProgressBar.Parent := StatusBar;
1326 ProgressBar.Top := 2;
1327 ProgressBar.Left := 0;
1328 ProgressBar.Width := StatusBar.Panels[0].Width;
1329 ProgressBar.Height := StatusBar.Height - 2;
1330 ProgressBar.Position := 0;
1332 //
\83c
\81[
\83\8b\83o
\81[
\95\
\8e¦
1333 //formshow()
\82É
\88Ú
\93®
1335 //
\83_
\83E
\83\93\83\8d\81[
\83h
\83I
\83u
\83W
\83F
\83N
\83g
1336 // FDownload := TDownload.Create;
1337 // FDownload.OnDownloadEnd := OnDonloadEnd;
1338 // FDownload.OnWork := Work;
1339 // FDownload.OnWorkBegin := WorkBegin;
1340 // FDownload.OnWorkEnd := WorkEnd;
1342 //
\83_
\83E
\83\93\83\8d\81[
\83h
\83I
\83u
\83W
\83F
\83N
\83g
1343 FControlThread := TThreadControl.Create(True);
1344 FControlThread.MaxThreadCount := 1;
1345 FControlThread.Resume;
1346 FControlThread.OnDownloadEnd := DownloadEnd;
1347 FControlThread.OnDownloadMsg := DownloadMsg;
1348 FControlThread.OnWork := Work;
1349 FControlThread.OnWorkBegin := WorkBegin;
1350 FControlThread.OnWorkEnd := WorkEnd;
1351 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1353 //
\8di
\8d\9e\8c\9f\8dõ
\97\9a\97ð
1354 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1356 //
\83u
\83\89\83E
\83U
\83^
\83u
\90Ý
\92è
1359 BrowserBoardNameLabel.Caption := '';
1360 BrowserNameLabel.Caption := '';
1363 // DetailIconAction.Execute;
1365 // FBrowserSizeHeight := ViewPanel.Height;
1366 FTabHintIndex := -1;
1368 //
\83\8d\83O
\83t
\83H
\83\8b\83_
\82ª
\91¶
\8dÝ
\82µ
\82È
\82¢
\8fê
\8d\87\82Í
\8dì
\90¬
\82·
\82é
1369 // if not GikoSys.DirectoryExistsEx(BBS2ch.GetLogFolder) then begin
1370 // GikoSys.ForceDirectoriesEx(BBS2ch.GetLogFolder);
1372 // FormResize(Sender);
1373 // MainCoolBarResize(Sender);
1374 // Application.ProcessMessages;
1376 //
\83\8a\83\93\83N
\83o
\81[
1379 //
\83\81\83j
\83\85\81[
\83t
\83H
\83\93\83g
1382 //
\83c
\81[
\83\8b\83o
\81[Wrapable
1383 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1384 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1386 //
\83c
\81[
\83\8b\83{
\83^
\83\93\93Ç
\82Ý
\8d\9e\82Ý
1387 ReadToolBarSetting(ActionList, StdToolBar);
1388 ReadToolBarSetting(ActionList, ListToolBar);
1390 for i := ListToolBar.ControlCount - 1 downto 0 do
1392 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1394 //
\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·
1395 if (i + 1) < ListToolBar.ControlCount then
1396 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1397 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1398 ListToolBar.Controls[ i + 1 ].Visible := False;
1400 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
1401 ListToolBar.Controls[ i ].Visible := False;
1402 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
1403 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1404 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1405 SelectComboBox.Parent := ListToolBar;
1406 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
1407 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1408 SelectComboBoxSplitter.Parent := ListToolBar;
1415 ReadToolBarSetting(ActionList, BrowserToolBar);
1417 OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes;
1418 //
\83A
\83h
\83\8c\83X
\83o
\81[
1419 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1421 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³
\82ÍFormShow
\82É
\88Ú
\93®
\82µ
\82½
1423 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\82ª
\96³
\82¢
\8fê
\8d\87\82Í
\83\81\83b
\83Z
\81[
\83W
\95\
\8e¦
1424 if not FileExists(GikoSys.GetBoardFileName) then begin
1425 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
1426 + '
\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
1427 + '
\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';
1428 MsgBox(SplashWindow.Handle, msg, '
\83M
\83R
\83i
\83r', MB_OK or MB_ICONINFORMATION);
1429 NewBoardAction.Execute;
1432 //
\83L
\81[
\90Ý
\92è
\93Ç
\82Ý
\8d\9e\82Ý
1433 GikoSys.LoadKeySetting(ActionList);
1435 //
\8dÅ
\8fI
\8f\84\89ñ
\8e\9e\8aÔ
1436 // FLastRoundTime := 0;
1439 FHint := TResPopup.Create(Self);
1441 //
\8dÅ
\8cã
\82É
\91I
\91ð
\82³
\82ê
\82½
\83L
\83\83\83r
\83l
\83b
\83g
\82Ì
\95\9c\8c³
1442 CabinetVisible( False );
1443 if GikoSys.Setting.CabinetVisible then begin
1444 i := CabinetSelectPopupMenu.Items.Count - 1;
1445 if GikoSys.Setting.CabinetIndex = i - 1 then
1446 CabinetHistoryAction.Execute
1447 else if GikoSys.Setting.CabinetIndex = i then
1448 CabinetFavoriteAction.Execute
1450 if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
1451 ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
1452 CabinetBBSAction.Execute;
1455 ShowBBSTree( BBSs[ 0 ] );
1458 //
\83I
\81[
\83g
\83\8d\83O
\83C
\83\93
1459 if GikoSys.Setting.AutoLogin then
1460 LoginAction.Execute;
1462 //
\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
1463 for i := 1 to ParamCount do begin
1464 MoveToURL(ParamStr(i));
1469 s := GikoSys.FAbon.NGwordname;
1470 StatusBar.Panels[2].Text := s;
1471 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1472 StatusBarResize(Sender);
1478 procedure TGikoForm.FormShow(Sender: TObject);
1483 ShowWindow(Application.Handle, SW_HIDE);
1485 //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½
1486 //
\83c
\81[
\83\8b\83o
\81[
\95\
\8e¦
1487 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1488 StdToolBarVisibleActionExecute( nil );
1489 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1490 AddressBarVisibleActionExecute( nil );
1491 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1492 LinkBarVisibleActionExecute( nil );
1493 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1494 ListToolBarVisibleActionExecute( nil );
1495 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1496 ListNameBarVisibleActionExecute( nil );
1497 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1498 BrowserToolBarVisibleActionExecute( nil );
1499 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1500 BrowserNameBarVisibleActionExecute( nil );
1502 //
\83u
\83\89\83E
\83U
\83^
\83u
1503 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1504 BrowserTabVisibleActionExecute(nil);
1506 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1507 BrowserTabTopAction.Checked := True;
1508 BrowserTabTopActionExecute(nil);
1510 BrowserTabBottomAction.Checked := True;
1511 BrowserTabBottomActionExecute(nil);
1514 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1515 BrowserTabTabStyleAction.Checked := True;
1516 BrowserTabTabStyleActionExecute(nil);
1517 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1518 BrowserTabButtonStyleAction.Checked := True;
1519 BrowserTabButtonStyleActionExecute(nil);
1521 BrowserTabFlatStyleAction.Checked := True;
1522 BrowserTabFlatStyleActionExecute(nil);
1526 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Main)
1527 MainCoolBar.Bands.BeginUpdate;
1529 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1530 CoolSet := GikoSys.Setting.MainCoolSet[i];
1531 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1533 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1534 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1535 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1538 MainCoolBar.Bands.EndUpdate;
1541 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Board)
1542 ListCoolBar.Bands.BeginUpdate;
1544 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1545 CoolSet := GikoSys.Setting.ListCoolSet[i];
1546 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1548 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1549 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1550 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1553 ListCoolBar.Bands.EndUpdate;
1556 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Browser)
1557 BrowserCoolBar.Bands.BeginUpdate;
1559 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1560 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1561 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1563 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1564 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1565 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1568 BrowserCoolBar.Bands.EndUpdate;
1573 procedure TGikoForm.SetStdToolBar;
1579 Action: TContainedAction;
1580 ToolButton: TToolButton;
1583 for i := StdToolBar.ButtonCount - 1 downto 0 do begin
1584 StdToolBar.RemoveControl(StdToolBar.Buttons[i]);
1585 //StdToolBar.Buttons[i].Free;
1587 FileName := GikoSys.GetConfigDir + 'ToolBar.ini';
1588 ini := TMemIniFile.Create(FileName);
1591 s := ini.ReadString('StdToolBar', IntToStr(i), '');
1594 if s = '-' then begin
1595 ToolButton := TToolButton.Create(StdToolBar);
1596 ToolButton.Style := tbsSeparator;
1597 ToolButton.Width := 8;
1598 ToolButton.Left := 10000;
1599 StdToolBar.InsertControl(ToolButton);
1601 Action := GetAction(s);
1602 if Action <> nil then begin
1603 ToolButton := TToolButton.Create(StdToolBar);
1604 ToolButton.Action := Action;
1605 ToolButton.Left := 10000;
1606 StdToolBar.InsertControl(ToolButton);
1613 {function TGikoForm.GetAction(ActionName: string): TContainedAction;
1617 for i := 0 to ActionList.ActionCount - 1 do begin
1618 if ActionList.Actions[i].Name = ActionName then begin
1619 Result := ActionList.Actions[i];
1626 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1630 wp: TWindowPlacement;
1632 if ( GikoSys.Setting.ShowDialogForEnd ) and
1633 (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
1639 Application.OnDeactivate := nil;
1640 Self.OnDeactivate := nil;
1643 if GetActiveList is TBBS then begin
1644 for i := 0 to ListView.Columns.Count - 1 do
1645 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1646 end else if GetActiveList is TCategory then begin
1647 for i := 0 to ListView.Columns.Count - 1 do
1648 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1649 end else if GetActiveList is TBoard then begin
1650 for i := 0 to ListView.Columns.Count - 1 do
1651 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1654 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95Û
\91¶
1655 wp.length := sizeof(wp);
1656 GetWindowPlacement(Handle, @wp);
1657 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1658 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1659 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1660 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1661 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1663 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1664 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1665 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1666 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1667 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1668 if ArrangeAction.Checked then
1669 GikoSys.Setting.ListOrientation := gloVertical
1671 GikoSys.Setting.ListOrientation := gloHorizontal;
1672 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1674 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Main)
1675 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1676 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1677 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1678 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1679 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1681 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Board)
1682 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1683 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1684 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1685 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1686 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1688 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Browser)
1689 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1690 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1691 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1692 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1693 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1696 GikoSys.Setting.WriteWindowSettingFile;
1697 GikoSys.Setting.WriteNameMailSettingFile;
1699 //
\82¨
\8bC
\82É
\93ü
\82è
\95Û
\91¶
1701 FavoriteDM.WriteFavorite;
1707 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1708 NotSelectTabCloseAction.Execute;
1709 if BrowserTab.Tabs.Count >= 1 then begin
1710 DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1715 //
\8f\84\89ñ
\83\8a\83X
\83g
\95Û
\91¶&
\94j
\8aü
1717 RoundList.SaveRoundFile;
1730 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
\95Û
\91¶
1736 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
1742 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\95Û
\91¶
1744 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1749 FControlThread.Terminate;
1759 //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
1762 TreeView.Items.Clear;
1767 if FavoriteDM <> nil then
1770 if AddressHistoryDM <> nil then
1771 AddressHistoryDM.Free;
1772 AddressHistoryDM := nil;
1776 // TBBS
\82Í
\95Û
\8e\9d\82µ
\82Ä
\82¢
\82é TCategory, TBoard, TThreadItem
\82·
\82×
\82Ä
\82ð
\8aJ
\95ú
\82·
\82é
1777 // TBoard, TThreadItem
\82Ì
\83f
\83X
\83g
\83\89\83N
\83^
\82Í
\83v
\83\89\83O
\83C
\83\93\82É
\94j
\8aü
\82ð
\93`
\82¦
\82é
\82Ì
\82Å
1778 // BoardPluteIns
\82Ì
\8aJ
\95ú
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ
1780 for i := 0 to Length( BBSs ) - 1 do begin
1781 if BBSs[ i ] <> nil then
1789 for i := 0 to Length( BoardPlugIns ) - 1 do begin
1790 if BoardPlugIns[ i ] <> nil then
1791 BoardPlugIns[ i ].Free;
1792 BoardPlugIns[ i ] := nil;
1798 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1799 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1800 CabinetSelectPopupMenu.Items[ i ].Free;
1801 CabinetMenu.Items[ i ].Free;
1809 if FHint <> nil then begin
1810 FHint.ReleaseHandle;
1815 if TPreviewBrowser <> nil then begin
1816 FPreviewBrowser.Free;
1817 FPreviewBrowser := nil;
1823 procedure TGikoForm.FormDestroy(Sender: TObject);
1825 // wp: TWindowPlacement;
1827 { //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
1830 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95Û
\91¶
1831 wp.length := sizeof(wp);
1832 GetWindowPlacement(Handle, @wp);
1834 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1835 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1836 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1837 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1838 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1840 GikoSys.Setting.CabinetVisible := CabinetPanel.Visible;
1841 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1843 GikoSys.Setting.WriteWindowSettingFile;
1844 GikoSys.Setting.WriteNameMailSettingFile;
1849 //
\83t
\83H
\81[
\83\80\83N
\83\8d\81[
\83Y
1850 procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1852 Application.Terminate;
1856 //
\83L
\83\83\83r
\83l
\83b
\83g
\81~
\83{
\83^
\83\93\83N
\83\8a\83b
\83N
1857 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1859 CabinetVisibleAction.Execute;
1860 // CabinetPanelVisible(false);
1863 procedure TGikoForm.ReloadBBS;
1866 item : TBBSMenuItem;
1868 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1869 NotSelectTabCloseAction.Execute;
1870 if BrowserTab.Tabs.Count >= 1 then
1871 DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1872 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
1873 //FHistoryList.Clear;
1874 //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
1875 TreeView.Items.Clear;
1879 for i := Length( BBSs ) - 1 downto 0 do begin
1880 if BBSs[ i ] <> nil then
1889 FTreeType := gttNone;
1891 GikoSys.ReadBoardFile; //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\93Ç
\8d\9e
1892 //
\83\81\83j
\83\85\81[
\82ð
\8dí
\8f\9c
1893 for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin
1895 if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin
1896 CabinetSelectPopupMenu.Items[ i ].Free;
1897 CabinetMenu.Items[ i ].Free;
1902 //
\83\81\83j
\83\85\81[
\82É
\92Ç
\89Á
1903 for i := Length( BBSs ) - 1 downto 0 do begin
1905 item := TBBSMenuItem.Create( PopupMenu );
1906 item.Caption := BBSs[ i ].Title;
1907 item.Data := BBSs[ i ];
1908 item.OnClick := BBSMenuItemOnClick;
1909 CabinetSelectPopupMenu.Items.Insert( 0, item );
1910 item := TBBSMenuItem.Create( PopupMenu );
1911 item.Caption := BBSs[ i ].Title;
1912 item.Data := BBSs[ i ];
1913 item.OnClick := BBSMenuItemOnClick;
1914 CabinetMenu.Insert( 0, item );
1918 ShowBBSTree( BBSs[ 0 ] );
1920 //
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1923 for i := FHistoryList.Count - 1 downto 0 do
1924 TFavoriteThreadItem( FHistoryList[ i ] ).Free;
1930 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
1931 // FFavorite := TFavorite.Create(FavoriteTreeView);
1932 FavoriteTreeView.Items.Clear;
1933 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1934 FavoriteDM.ReadFavorite;
1939 //
\83{
\81[
\83h
\83c
\83\8a\81[
\90Ý
\92è
1940 procedure TGikoForm.SetBoardTreeNode(
1946 CategoryNode: TTreeNode;
1947 BoardNode: TTreeNode;
1948 Category: TCategory;
1951 //
\94Â
\83\8a\83X
\83g
\82Ì
\90Ý
\92è
1952 FActiveBBS := inBBS;
1953 TreeView.Items.BeginUpdate;
1954 TreeView.Items.Clear;
1957 if SplashWindow <> nil then
1958 SplashWindow.ProgressBar.Max := BBSs[ 0 ].Count;
1962 Root := TreeView.Items.Add( nil, inBBS.Title );
1963 Root.ImageIndex := ITEM_ICON_2CH1;
1964 Root.SelectedIndex := ITEM_ICON_2CH2;
1966 for i := 0 to inBBS.Count - 1 do begin
1967 Category := TCategory(inBBS.Items[i]);
1968 CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
1969 CategoryNode.Data := Category;
1970 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
1971 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
1973 for j := 0 to Category.Count - 1 do begin
1974 Board := TBoard(Category.Items[j]);
1976 BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
1977 BoardNode.Data := Board;
1978 //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
1979 if not Board.IsLogFile then begin
1980 BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT;
1981 BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT;
1983 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
1984 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
1985 for k := 0 to Board.Count - 1 do begin
1986 if Board.Items[ k ].IsLogFile then begin
1987 BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG;
1988 BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG;
1997 CategoryNode.Expanded := Category.NodeExpand;
1999 if SplashWindow <> nil then begin
2000 SplashWindow.ProgressBar.StepIt;
2001 Application.ProcessMessages;
2005 TreeView.Items.EndUpdate;
2009 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
2011 COLUMN: array[0..0] of string = ('
\83J
\83e
\83S
\83\8a\96¼');
2013 ListColumn: TListColumn;
2016 ListView.Items.BeginUpdate;
2018 Screen.Cursor := crHourGlass;
2020 ListView.Columns.Clear;
2021 for i := 0 to Length(COLUMN) - 1 do begin
2022 ListColumn := ListView.Columns.Add;
2023 ListColumn.Caption := COLUMN[i];
2024 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
2027 ListView.Items.Count := 0;
2028 ListView.Items.Clear;
2029 ListView.Items.Count := ABBS2ch.Count;
2031 // UpFolderAction.Enabled := False;
2032 // AllItemAction.Enabled := False;
2033 // LogItemAction.Enabled := False;
2034 // NewItemAction.Enabled := False;
2035 // SelectItemAction.Enabled := False;
2036 // ListDownloadToolButton.Enabled := False;
2037 // BoardReservToolButton.Enabled := False;
2038 // ListThreadDownloadToolButton.Enabled := False;
2040 ListNameLabel.Caption := ABBS2ch.Title;
2041 FolderImage.Picture := nil;
2042 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
2045 FSortOrder := False;
2046 ListViewColumnClick(nil, ListView.Column[0]);
2048 Result := ABBS2ch.Count;
2050 Screen.Cursor := crDefault;
2051 ListView.Items.EndUpdate;
2055 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
2057 COLUMN: array[0..2] of string = ('
\94Â
\96¼', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e');
2059 ListColumn: TListColumn;
2062 ListView.Items.BeginUpdate;
2064 Screen.Cursor := crHourGlass;
2066 ListView.Columns.Clear;
2067 for i := 0 to Length(COLUMN) - 1 do begin
2068 ListColumn := ListView.Columns.Add;
2069 ListColumn.Caption := COLUMN[i];
2070 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
2073 ListView.Items.Count := 0;
2074 ListView.Items.Clear;
2075 ListView.Items.Count := Category.Count;
2077 // UpFolderAction.Enabled := True;
2078 // AllItemAction.Enabled := False;
2079 // LogItemAction.Enabled := False;
2080 // NewItemAction.Enabled := False;
2081 // SelectItemAction.Enabled := False;
2082 // ListDownloadToolButton.Enabled := False;
2083 // BoardReservToolButton.Enabled := False;
2084 // ListThreadDownloadToolButton.Enabled := False;
2086 ListNameLabel.Caption := Category.Title;
2087 FolderImage.Picture := nil;
2088 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
2091 FSortOrder := False;
2092 ListViewColumnClick(nil, ListView.Column[0]);
2094 Result := Category.Count;
2096 Screen.Cursor := crDefault;
2097 ListView.Items.EndUpdate;
2101 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
2103 COLUMN: array[0..6] of string = ('
\83X
\83\8c\83b
\83h
\96¼', '
\83J
\83E
\83\93\83g', '
\8eæ
\93¾', '
\90V
\92\85',
2104 '
\96¢
\93Ç', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e');
2105 COLUMN_ALIGNMENT: array[0..6] of TAlignment = (taLeftJustify, taRightJustify,
2106 taRightJustify, taRightJustify,
2107 taRightJustify, taLeftJustify,
2109 //No,
\83X
\83\8c\83b
\83h
\96¼,
\83J
\83E
\83\93\83g,
\8f\84\89ñ
\97\
\96ñ,
\8eæ
\93¾
\93ú
\8e\9e
2111 ListColumn: TListColumn;
2114 ListView.Items.BeginUpdate;
2116 Screen.Cursor := crHourGlass;
2118 //
\83`
\83\89\82Â
\82«
\96h
\8e~
\82Ì
\82½
\82ß
\81A
\95Ï
\8dX
\82³
\82ê
\82Ä
\82¢
\82é
\8fê
\8d\87\82Ì
\82Ý
2119 //
\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Ó
2120 if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
2122 ListView.Columns.Clear;
2123 for i := 0 to Length(COLUMN) - 1 do begin
2124 ListColumn := ListView.Columns.Add;
2125 ListColumn.Caption := COLUMN[i];
2126 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
2127 ListColumn.Alignment := COLUMN_ALIGNMENT[i];
2131 ListView.Items.Count := 0;
2132 ListView.Items.Clear;
2134 case GikoForm.ViewType of
2135 gvtAll: ListView.Items.Count := Board.Count;
2136 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
2137 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
2138 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
2141 ListNameLabel.Caption := Board.Title;
2142 FolderImage.Picture := nil;
2143 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
2146 FSortOrder := False;
2147 ListViewColumnClick(nil, ListView.Column[0]);
2149 Result := Board.Count;
2151 Screen.Cursor := crDefault;
2152 ListView.Items.EndUpdate;
2156 procedure TGikoForm.TreeViewChange(Sender: TObject; Node: TTreeNode);
2160 if FTreeType = gttHistory then begin
2161 if GetActiveContent <> TFavoriteThreadItem( Node ).Item then
2162 FavoriteClick( Node );
2166 ListView.Selected := nil;
2167 ListView.Items.Count := 0;
2168 ListView.Items.Clear;
2169 // ListView.Columns.Clear;
2171 Caption := CAPTION_NAME;
2172 //Application.Title := CAPTION_NAME;
2175 if GetActiveList is TBBS then begin
2176 for i := 0 to ListView.Columns.Count - 1 do
2177 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
2178 end else if GetActiveList is TCategory then begin
2179 for i := 0 to ListView.Columns.Count - 1 do
2180 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
2181 end else if GetActiveList is TBoard then begin
2182 for i := 0 to ListView.Columns.Count - 1 do
2183 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
2186 if TObject(Node.Data) is TBBS then begin
2187 SetActiveList(Node.data);
2188 end else if TObject(Node.Data) is TCategory then begin
2189 SetActiveList(Node.data);
2190 end else if TObject(Node.Data) is TBoard then begin
2191 if not TBoard(Node.Data).IsThreadDatRead then begin
2192 Screen.Cursor := crHourGlass;
2194 GikoSys.ReadSubjectFile(TBoard(Node.Data));
2196 Screen.Cursor := crDefault;
2199 SetActiveList(Node.data);
2203 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2205 // FileName: string;
2206 // DateTime: TDateTime;
2209 Category: TCategory;
2211 ThreadItem: TThreadItem;
2214 if ActiveList is TBBS then begin
2215 BBS := TBBS(ActiveList);
2217 ListView.StateImages := nil;
2219 if BBS = nil then Exit;
2220 if BBS.Count <= 0 then Exit;
2221 if Item = nil then Exit;
2222 if Item.Index > BBS.Count then Exit;
2223 if ListView.Items.Count = 0 then Exit;
2225 if not (BBS.Items[Item.index] is TCategory) then Exit;
2226 Category := TCategory(BBS.Items[Item.index]);
2228 if Category = nil then Exit;
2230 if ListNumberVisibleAction.Checked then
2231 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2233 Item.Caption := Category.Title;
2235 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2236 Item.Data := Category;
2237 end else if ActiveList is TCategory then begin
2238 Category := TCategory(ActiveList);
2240 ListView.StateImages := nil;
2242 if Category = nil then Exit;
2243 if Category.Count <= 0 then Exit;
2244 if Item = nil then Exit;
2245 if Item.Index >= Category.Count then Exit;
2246 if ListView.Items.Count = 0 then Exit;
2248 if not (Category.Items[Item.Index] is TBoard) then Exit;
2249 Board := TBoard(Category.Items[Item.Index]);
2251 if Board = nil then Exit;
2253 if ListNumberVisibleAction.Checked then
2254 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2256 Item.Caption := Board.Title;
2258 if Item.SubItems.Count <> 2 then begin
2259 Item.SubItems.Clear;
2260 Item.SubItems.Add('');
2261 Item.SubItems.Add('');
2264 Item.ImageIndex := ITEM_ICON_BOARD1;
2267 Item.SubItems[0] := Board.RoundName // '
\97\
\96ñ'
2269 Item.SubItems[0] := '';
2271 if Board.RoundDate = ZERO_DATE then begin
2272 Item.SubItems[1] := '';
2274 Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2276 end else if ActiveList is TBoard then begin
2277 Board := TBoard(ActiveList);
2279 if GikoSys.Setting.ListIconVisible then
2280 ListView.StateImages := StateIconImageList
2282 ListView.StateImages := nil;
2284 case GikoForm.ViewType of
2285 gvtAll: BoardCnt := Board.Count;
2286 gvtLog: BoardCnt := Board.GetLogThreadCount;
2287 gvtNew: BoardCnt := Board.GetNewThreadCount;
2288 gvtUser: BoardCnt := Board.GetUserThreadCount;
2293 // if Board = nil then Exit;
2294 if BoardCnt <= 0 then Exit;
2295 if Item = nil then Exit;
2296 if Item.Index > BoardCnt then Exit;
2297 if ListView.Items.Count = 0 then Exit;
2299 // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2302 case GikoForm.ViewType of
2303 gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]);
2304 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2305 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2306 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2309 if ThreadItem = nil then Exit;
2311 // if ListNumberVisibleAction.Checked then
2312 // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2314 RepStr := ThreadItem.Title;
2315 RepStr := CustomStringReplace(RepStr, '<', '<' );
2316 RepStr := CustomStringReplace(RepStr, '>', '>' );
2317 RepStr := CustomStringReplace(RepStr, '"', '"' );
2318 RepStr := CustomStringReplace(RepStr, '&', '&' );
2319 //RepStr := StringReplace(RepStr, '
\81\97\81M', ',', [rfReplaceAll]);
2321 if Item.SubItems.Count <> 6 then begin
2322 Item.SubItems.Clear;
2323 Item.SubItems.Add('');
2324 Item.SubItems.Add('');
2325 Item.SubItems.Add('');
2326 Item.SubItems.Add('');
2327 Item.SubItems.Add('');
2328 Item.SubItems.Add('');
2331 if ListNumberVisibleAction.Checked then
2332 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2334 Item.Caption := RepStr;
2336 case ThreadItem.AgeSage of
2337 gasNone: Item.StateIndex := -1;
2338 gasNew: Item.StateIndex := 0;
2339 gasAge: Item.StateIndex := 1;
2340 gasSage: Item.StateIndex := 2;
2343 if ThreadItem.IsLogFile then begin
2344 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2345 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2346 Item.SubItems[1] := IntToStr(ThreadItem.Count);
2347 if ThreadItem.NewResCount = 0 then
2348 Item.SubItems[2] := ''
2350 Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2351 Item.SubItems[3] := '';
2352 if ThreadItem.Round then
2353 Item.SubItems[4] := ThreadItem.RoundName
2355 Item.SubItems[4] := '';
2356 if ThreadItem.RoundDate = ZERO_DATE then begin
2357 Item.SubItems[5] := '';
2359 Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2360 if ThreadItem.NewArrival then
2361 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2363 Item.ImageIndex := ITEM_ICON_THREAD1;
2364 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2365 Item.SubItems[1] := '';
2366 Item.SubItems[2] := '';
2367 Item.SubItems[3] := '';
2368 Item.SubItems[4] := '';
2369 Item.SubItems[5] := '';
2371 Item.Data := ThreadItem;
2375 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2376 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2377 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2378 var Index: Integer);
2383 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2389 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2390 EndIndex: Integer; OldState, NewState: TItemStates);
2395 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2403 threadItem : TThreadItem;
2405 Protocol, Host, Path, Document, Port, Bookmark: string;
2411 ActiveFileName: string;
2418 if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin
2419 if LowerCase(OleVariant(IHTMLDocument2(Browser.Document)).charset) <> 'shift_jis' then
2420 OleVariant(IHTMLDocument2(Browser.Document)).charset := 'shift_jis';
2426 if PreviewTimer.Enabled then
2427 PreviewTimer.Enabled := False;
2428 Application.CancelHint;
2429 if GetActiveContent <> nil then
2430 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2432 ActiveFileName := '';
2434 StatusBar.Panels[1].Text := Text;
2436 if FHint <> nil then begin
2437 FHint.ReleaseHandle;
2440 if FPreviewBrowser <> nil then
2441 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2443 if not GikoSys.Setting.UnActivePopup then
2444 if not GikoForm.Active then
2447 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2448 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2451 Ext := AnsiLowerCase(ExtractFileExt(Text));
2452 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2453 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2454 if FPreviewBrowser = nil then begin
2455 FPreviewBrowser := TPreviewBrowser.Create(Self);
2456 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2457 TOleControl(FPreviewBrowser).Parent := nil;
2459 FPreviewBrowser.Navigate('about:blank');//
\91O
\89ñ
\82Ì
\83v
\83\8c\83r
\83\85\81[
\89æ
\91\9c\8fÁ
\8b\8e\97p
2460 FPreviewURL := Text;
2461 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2462 PreviewTimer.Enabled := True;
2463 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2464 if Pos('mailto:', Text) = 1 then begin
2465 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2466 //
\83M
\83R
\83i
\83r
\83X
\83\8c \83p
\81[
\83g3
\82Ì466
\8e\81\82É
\8a´
\8eÓ
2468 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2469 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2470 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2471 if (Assigned(e)) then begin
2472 tmp2 := GikoSys.ZenToHan(e.Get_outerText);
2473 if (GikoSys.IsNumeric(tmp2)) then begin
2474 //
\82\93\82Í
\83\8c\83X
\94Ô
\8d\86\82Á
\82Û
\82¢
\82Á
\82·
\81B
2475 wkIntSt := StrToInt(tmp2);
2476 wkIntTo := StrToInt(tmp2);
2477 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2478 FHint.PopupType := gptThread;
2479 SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False);
2481 FHint.PopupType := gptRaw;
2488 if Pos('about:blank..', URL) = 1 then begin
2489 URL := StringReplace( URL, 'about:blank..', 'http://www.2ch.net', [] );
2490 PathRec := Gikosys.Parse2chURL2(URL);
2492 PathRec := Gikosys.Parse2chURL2(URL);
2493 if (AnsiPos('=st=', Text ) <> 0) and ( AnsiPos( '=to=',Text) <> 0 ) then begin
2495 PathRec.FSt := StrToInt( Copy( Text, AnsiPos('=st=', Text ) + 4, AnsiPos( '=to=',Text) - AnsiPos('=st=', Text ) - 4 ) );
2496 PathRec.FTo := StrToInt( Copy( Text, AnsiPos('=to=', Text ) + 4, AnsiPos( '=nofirst=',Text) - AnsiPos('=to=', Text ) - 4) );
2504 GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
2506 //if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
2508 URL := GikoSys.GetBrowsableThreadURL( URL );
2509 wkIntSt := PathRec.FSt;
2510 wkIntTo := PathRec.FTo;
2512 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2515 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2517 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2519 end else if wkIntSt > wkIntTo then begin
2524 //if wkIntSt = 0 then
2526 //if wkINtTo = 0 then
2528 //if PathRec.FFirst then
2530 if PathRec.FStBegin then
2532 if PathRec.FToEnd then
2535 ATitle := ActiveFileName <> PathRec.FKey;
2537 threadItem := BBSsFindThreadFromURL( URL );
2538 if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin
2539 board := BBSs[ 0 ].FindBBSID( PathRec.FBBS );
2540 if board <> nil then
2541 threadItem := board.Find( PathRec.FKey + '.dat' );
2542 if threadItem = nil then
2543 threadItem := GetActiveContent;
2546 if threadItem <> nil then begin
2547 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2548 FHint.PopupType := gptThread;
2549 SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst );
2555 // ShowTextPopup(s);
2556 if FHint.PopupType = gptRaw then begin
2557 if FHint.Caption <> '' then
2560 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2566 procedure TGikoForm.BrowserTitleChange(Sender: TObject;
2567 const Text: WideString);
2571 if (Text = BLANK_HTML) or (Text = GikoSys.GetHtmlTempFileName) then
2572 Title := CAPTION_NAME
2574 Title := CAPTION_NAME + ' - [' + Text + ']';
2576 //Application.Title := Title;
2579 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2582 //SysMenuApp: HMenu;
2584 FEnabledCloseButton := Enabled;
2585 SysMenu := GetSystemMenu(Handle, False);
2586 //SysMenuApp := GetSystemMenu(Application.Handle, False);
2588 if Enabled then begin
2589 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2590 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2592 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2593 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2596 DrawMenuBar(Handle);
2597 //DrawMenuBar(Application.Handle);
2600 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2601 var AllowChange: Boolean);
2603 if FTreeType = gtt2ch then
2607 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2608 Shift: TShiftState);
2610 if Key = VK_BACK then begin
2611 // UpFolderButtonClick(Sender);
2612 end else if Key = VK_SPACE then begin
2614 end else if Key = VK_RETURN then begin
2619 function TGikoForm.GetHttpState: Boolean;
2621 Result := FHttpState;
2624 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2625 Column: TListColumn);
2629 wkCategory: TCategory;
2632 if FSortIndex = Column.Index then
2633 FSortOrder := not FSortOrder
2635 FSortOrder := False;
2637 for i := 0 to ListView.Columns.Count - 1 do
2638 ListView.Column[i].ImageIndex := -1;
2640 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
2642 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
2644 Sort.SortNoFlag := ListNumberVisibleAction.Checked;
2646 //if TObject(TreeView.Selected.Data) is TBBS then begin
2647 if TObject( FActiveList ) is TBBS then begin
2648 //wkBBS := TBBS(TreeView.Selected.Data);
2649 wkBBS := TBBS( FActiveList );
2650 Sort.SortOrder := FSortOrder;
2651 Sort.SortIndex := Column.Index;
2652 wkBBS.Sort(CategorySortProc);
2654 //end else if TObject(TreeView.Selected.Data) is TCategory then begin
2655 end else if TObject( FActiveList ) is TCategory then begin
2656 //wkCategory := TCategory(TreeView.Selected.Data);
2657 wkCategory := TCategory( FActiveList );
2658 Sort.SortOrder := FSortOrder;
2659 Sort.SortIndex := Column.Index;
2660 wkCategory.Sort(BoardSortProc);
2662 //end else if TObject(TreeView.Selected.Data) is TBoard then begin
2663 end else if TObject( FActiveList ) is TBoard then begin
2664 //wkBoard := TBoard(TreeView.Selected.Data);
2665 wkBoard := TBoard( FActiveList );
2666 Sort.SortOrder := FSortOrder;
2667 Sort.SortIndex := Column.Index;
2668 wkBoard.Sort(ThreadItemSortProc);
2671 FSortIndex := Column.Index;
2674 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2675 Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean);
2679 DefaultDraw := True;
2681 DefaultDraw := False;
2682 if (cdsSelected in State) or (cdsHot in State) then begin
2683 Sender.Canvas.Brush.Color := clHighlight;
2684 Sender.Canvas.Font.Color := clHighlightText;
2686 Sender.Canvas.Brush.Color := clBtnFace;
2687 Sender.Canvas.Font.Color := clBtnText;
2689 ARect := Rect(Button.Left, Button.Top, Button.Left + Button.Width, Button.Top + Button.Height);
2690 Sender.Canvas.FillRect(ARect);
2691 DrawText(Sender.Canvas.Handle, PChar(Button.Caption), -1, ARect, DT_SINGLELINE or DT_VCENTER or DT_CENTER);
2694 function TGikoForm.GetTreeNode(Data: TObject): TTreeNode;
2699 Nodes := TreeView.Items;
2701 for i := 0 to Nodes.Count - 1 do begin
2702 if Nodes.Item[i].Data = Data then begin
2703 Result := Nodes.Item[i];
2710 procedure TGikoForm.BrowserBeforeNavigate2(Sender: TObject;
2711 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
2712 Headers: OleVariant; var Cancel: WordBool);
2717 kMenuName: string = 'menu:';
2720 if Pos(kMenuName, URL) <> 0 then begin
2721 sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
2723 if not GikoSys.IsNumeric(sNo) then Exit;
2727 KokoPopupMenu.Tag := StrToInt(sNo);
2728 KokoPopupMenu.Popup(p.x, p.y);
2729 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
2730 Cancel := not GikoSys.Setting.OpenMailer;
2735 procedure TGikoForm.ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
2736 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
2737 var DefaultDraw: Boolean);
2739 ThreadItem: TThreadItem;
2742 // TListView(Sender).Canvas.Font.Style := [];
2743 if TObject(Item.Data) is TThreadItem then begin
2744 ThreadItem := TThreadItem(Item.Data);
2745 if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
2746 ListView.Canvas.Brush.Color := FOddColor;
2748 ListView.Canvas.Brush.Color := FListViewBackGroundColor;
2750 // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
2751 if ThreadItem.UnRead then
2752 TListView(Sender).Canvas.Font.Style := [fsBold];
2756 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
2758 if Application.Terminated then
2760 if PreviewTimer.Enabled then
2761 PreviewTimer.Enabled := False;
2762 //
\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
2763 if FHint <> nil then begin
2764 FHint.ReleaseHandle;
2769 if FPreviewBrowser <> nil then
2770 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2774 procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
2775 const ARect: TRect; var DefaultDraw: Boolean);
2779 IsBoardNode: Boolean;
2785 Category: TCategory;
2789 DefaultDraw := True;
2791 if FTreeType = gttHistory then Exit;
2793 TreeView.Canvas.Font.Color := clBlue;
2794 IsBoardNode := False;
2796 for i := 0 to TreeView.Items.Count - 1 do begin
2798 if not TreeView.Items[i].IsVisible then
2801 if TObject(TreeView.Items[i].Data) is TCategory then begin
2802 if TreeView.Items[i].Expanded then
2805 IsBoardNode := False;
2806 Category := TCategory(TreeView.Items[i].Data);
2807 for j := 0 to Category.Count - 1 do begin
2808 Board := Category.Items[j];
2809 if Board <> nil then begin
2810 if Board.UnRead > 0 then begin
2818 end else if TObject(TreeView.Items[i].Data) is TBoard then begin
2819 IsBoardNode := True;
2820 Board := TBoard(TreeView.Items[i].Data);
2821 Cnt := Board.UnRead;
2827 Bitmap := TBitmap.Create;
2829 Bitmap.Canvas.Font.Assign(TreeView.Canvas.Font);
2830 Bitmap.Canvas.Font.Style := [fsBold];
2831 NodeWidth := Bitmap.Canvas.TextWidth(TreeView.Items[i].Text);
2836 NodeRect := TreeView.Items[i].DisplayRect(True);
2839 CntText := '(' + IntToStr(Cnt) + ')'
2840 else if Cnt = 1 then
2844 TextWidth := TreeView.Canvas.TextWidth(CntText);
2846 TextRect := Rect(NodeRect.Left + NodeWidth + 8,
2848 NodeRect.Left + NodeWidth + TextWidth + 8,
2850 DrawText(TreeView.Canvas.Handle,
2854 DT_SINGLELINE or DT_VCENTER);
2856 TreeViewCustomDrawItem(nil, nil, [], DefaultDraw);
2859 procedure TGikoForm.TreeViewCustomDrawItem(Sender: TCustomTreeView;
2860 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
2863 Category: TCategory;
2866 DefaultDraw := True;
2868 if FTreeType = gttHistory then Exit;
2870 TreeView.Canvas.Font.Style := [];
2871 if Node <> nil then begin
2872 if TObject(Node.Data) is TCategory then begin
2873 Category := TCategory(Node.Data);
2874 for i := 0 to Category.Count - 1 do begin
2875 Board := Category.Items[i];
2876 if Board <> nil then begin
2877 if Board.UnRead > 0 then begin
2878 TreeView.Canvas.Font.Style := [fsBold];
2883 end else if TObject(Node.Data) is TBoard then begin
2884 Board := TBoard(Node.Data);
2885 if Board.UnRead > 0 then
2886 TreeView.Canvas.Font.Style := [fsBold];
2891 procedure TGikoForm.TreeViewExpanded(Sender: TObject; Node: TTreeNode);
2893 TreeView.Invalidate;
2895 if TObject(Node.Data) is TBBS then begin
2896 TBBS(Node.Data).NodeExpand := True;
2897 end else if TObject(Node.Data) is TCategory then begin
2898 TCategory(Node.Data).NodeExpand := True;
2899 end else if TObject(Node.Data) is TBoard then begin
2900 TBoard(Node.Data).NodeExpand := True;
2904 {procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
2906 TreeSplitter.Visible := PanelVisible;
2907 CabinetPanel.Visible := PanelVisible;
2908 CabinetToolButton.Down := PanelVisible;
2911 procedure TGikoForm.ListViewAllSelect;
2917 procedure TGikoForm.TreeViewDblClick(Sender: TObject);
2920 ThreadItem: TThreadItem;
2924 GetCursorPos(APoint);
2925 APoint := TreeView.ScreenToClient(APoint);
2926 HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
2927 if not (htOnLabel in HitTest) then Exit;
2928 if TreeView.Selected = nil then Exit;
2930 if FTreeType = gtt2ch then begin
2931 if not (TObject(TreeView.Selected.Data) is TBoard) then Exit;
2932 Board := TBoard(TreeView.Selected.Data);
2933 DownloadList(Board);
2934 end else if FTreeType = gttHistory then begin
2935 if not (TObject(TreeView.Selected.Data) is TFavoriteThreadItem) then Exit;
2936 ThreadItem := TFavoriteThreadItem(TreeView.Selected.Data).Item;
2937 DownloadContent(ThreadItem);
2941 procedure TGikoForm.FavoriteTreeViewClick(Sender: TObject);
2944 FavoriteClick( TObject( FavoriteTreeView.Selected ) );
2948 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
2950 AddMessageList(Msg, nil, Icon);
2953 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
2959 if Item.DownType = gdtBoard then
2960 ATitle := Item.Board.Title
2962 ATitle := Item.ThreadItem.Title;
2964 ATitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j';
2966 if Item.State in [gdsComplete, gdsDiffComplete] then begin
2968 if Item.DownType = gdtBoard then begin
2971 AddMessageList(ATitle + ' [
\83X
\83\8c\88ê
\97\97\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
2972 if GetActiveList = Item.Board then
2973 SetActiveList(Item.Board);
2974 Item.Board.Modified := True;
2975 Item.Board.IsThreadDatRead := True;
2977 end else if Item.DownType = gdtThread then begin
2980 Item.ThreadItem.NewArrival := True;
2981 if GetActiveContent = Item.ThreadItem then
2982 InsertBrowserTab(Item.ThreadItem)
2984 InsertBrowserTab(Item.ThreadItem, False);
2986 if Item.State = gdsComplete then begin
2988 AddMessageList(ATitle + ' [
\83X
\83\8c\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
2990 PlaySound('NewDiff');
2991 AddMessageList(ATitle + ' [
\83X
\83\8c\8d·
\95ª
\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
2994 //
\8f\84\89ñ
\82 \82è
\82Ì
\8fê
\8d\87\81\95\82P
\82O
\82O
\82O
\92´
\82Í
\8f\84\89ñ
\8dí
\8f\9c
2995 if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin
2996 Item.ThreadItem.Round := False;
2997 Item.ThreadItem.RoundName := '';
2998 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);
3004 end else if Item.State = gdsNotModify then begin
3006 { if (Item.DownType = gdtThread) and (AddHistory(Item.ThreadItem)) then begin
3007 //SetContent(Item.ThreadItem);
3008 InsertBrowserTab(Item.ThreadItem);
3010 AddMessageList(ATitle + ' [
\96¢
\8dX
\90V]', nil, gmiSAD);
3011 PlaySound('NoChange');
3012 Screen.Cursor := crDefault;
3013 end else if Item.State = gdsAbort then begin
3015 AddMessageList(ATitle + ' [
\92\86\92f]', nil, gmiSAD);
3016 end else if Item.State = gdsError then begin
3021 AddMessageList(ATitle + ' [
\83G
\83\89\81[(' + IntToStr(Item.ResponseCode) + s + ')]', nil, gmiNG);
3022 // if Item.ResponseCode = 302 then
3023 // 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);
3029 if FWorkCount < 0 then FWorkCount := 0;
3030 if FWorkCount = 0 then begin
3032 Animate.Active := False;
3034 Screen.Cursor := crDefault;
3041 procedure TGikoForm.WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer);
3043 // SetProgressValue(Number, 0, AWorkCountMax);
3044 // ProgressBar.Visible := True;
3045 ProgressBar.Position := 0;
3046 ProgressBar.Max := AWorkCountMax;
3047 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ð
\8aJ
\8en
\82µ
\82Ü
\82·';
3048 FDownloadMax := AWorkCountMax;
3051 procedure TGikoForm.WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
3053 // ProgressBar.Visible := False;
3054 ProgressBar.Position := 0;
3055 // SetProgressValue(Number, 0);
3056 if FDownloadMax <> 0 then
3057 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ª
\8a®
\97¹
\82µ
\82Ü
\82µ
\82½';
3060 procedure TGikoForm.Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
3062 ProgressBar.Position := AWorkCount;
3063 // SetProgressValue(Number, AWorkCount);
3064 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86 (' + IntToStr(AWorkCount) + '/' + IntToStr(FDownloadMax) + ')';
3068 procedure TGikoForm.SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
3070 Component: TComponent;
3072 Component := FindComponent('ProgressBar' + IntToStr(Number + 1));
3073 if Component <> nil then begin
3074 if not (Component is TProgressBar) then Exit;
3076 TProgressBar(Component).Max := Max;
3077 TProgressBar(Component).Position := Value;
3082 procedure TGikoForm.AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
3084 ListItem: TListItem;
3086 MessageListView.Items.BeginUpdate;
3088 ListItem := MessageListView.Items.Add;
3089 ListItem.Caption := ACaption;
3090 ListItem.Data := AObject;
3091 ListItem.MakeVisible(False);
3093 gmiOK: ListItem.ImageIndex := 0;
3094 gmiSAD: ListItem.ImageIndex := 1;
3095 gmiNG: ListItem.ImageIndex := 2;
3096 gmiWhat: ListItem.ImageIndex := 3;
3099 MessageListView.Items.EndUpdate;
3103 {procedure TGikoForm.BrowserTabChange(Sender: TObject);
3106 ThreadItem: TThreadItem;
3108 ThreadItem := GetActiveContent;
3109 if ThreadItem <> nil then begin
3110 SetContent(ThreadItem);
3114 procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
3117 // OldIndex: Integer;
3118 favItem : TFavoriteThreadItem;
3120 if ThreadItem.IsLogFile then begin
3121 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
3122 if TObject(BrowserTab.Tabs.Objects[i]) is TThreadItem then begin
3123 if TThreadItem(BrowserTab.Tabs.Objects[i]) = ThreadItem then begin
3124 if ActiveTab then begin
3125 //OldIndex := BrowserTab.TabIndex;
3126 BrowserTab.TabIndex := i;
3127 // if OldIndex <> i then
3128 BrowserTab.OnChange(nil);
3136 if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin
3137 favItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
3138 AddHistory( favItem );
3139 BrowserTab.Tabs.Insert(0, GikoSys.GetShortName(ThreadItem.Title, 20));
3140 BrowserTab.Tabs.Objects[0] := ThreadItem;
3142 BrowserTab.TabIndex := 0;
3144 favItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
3145 AddHistory( favItem );
3146 i := BrowserTab.Tabs.Add(GikoSys.GetShortName(ThreadItem.Title, 20));
3147 BrowserTab.Tabs.Objects[i] := ThreadItem;
3149 BrowserTab.TabIndex := i;
3151 if ActiveTab then begin
3152 BrowserTab.OnChange(nil);
3153 BrowserNullTab := nil;
3156 //OldIndex := BrowserTab.TabIndex;
3157 BrowserNullTab := ThreadItem;
3158 BrowserTab.TabIndex := -1;
3159 // if OldIndex = -1 then
3160 BrowserTab.OnChange(nil);
3163 if GikoSys.Setting.URLDisplay then
3164 AddressComboBox.Text := ThreadItem.URL;
3167 procedure TGikoForm.SetContent(ThreadItem: TThreadItem);
3172 // HtmlName: string;
3178 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
3179 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3180 Application.ProcessMessages;
3183 if (FActiveContent <> nil) and
3184 (FActiveContent <> ThreadItem) and
3185 (Assigned(Browser.Document)) then begin
3189 Application.ProcessMessages;
3190 FActiveContent.ScrollTop := OleVariant(IHTMLDocument2(Browser.Document)).Body.ScrollTop;
3193 MsgBox(Handle, E.Message, 'SetContent[<-ScrollTop]', 0);
3199 FActiveContent := ThreadItem;
3201 if ThreadItem = nil then begin
3202 Browser.Navigate(BLANK_HTML);
3203 BrowserBoardNameLabel.Caption := '';
3204 ItemBoardImage.Picture := nil;
3205 BrowserNameLabel.Caption := '';
3206 ItemImage.Picture := nil;
3207 FActiveContent := nil;
3211 BBSID := ThreadItem.ParentBoard.BBSID;
3212 FileName := ThreadItem.FileName;
3214 if GetCapture = ListView.Handle then
3217 //OldCursor := Screen.Cursor;
3218 Screen.Cursor := crHourGlass;
3220 if ThreadItem.UnRead then begin
3221 ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
3222 if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0;
3226 if not ThreadItem.IsLogFile then begin
3228 if (not Assigned(Browser.Document)) then begin
3229 Browser.Navigate('about:blank');
3230 while (not Assigned(Browser.Document)) do begin
3231 Application.ProcessMessages;
3235 s := '<HTML><BODY><CENTER>
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Í
\8eæ
\93¾
\82µ
\82Ä
\82¢
\82Ü
\82¹
\82ñ</CENTER></BODY></HTML>';
3236 doc := Browser.Document;
3238 doc.charset := 'Shift_JIS';
3244 //Application.ProcessMessages;
3245 GikoSys.CreateHTML2(Browser.Document, ThreadItem, sTitle);
3246 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
3247 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3248 Application.ProcessMessages;
3251 Application.ProcessMessages;
3253 if ThreadItem.UnRead then
3254 BrowserMovement('new');
3257 if (ThreadItem.ScrollTop <> 0) and (not ThreadItem.UnRead) then begin
3261 doc := Browser.Document;
3262 doc.Body.ScrollTop := ThreadItem.ScrollTop;
3265 MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
3270 ThreadItem.UnRead := False;
3274 BrowserBoardNameLabel.Caption := ThreadItem.ParentBoard.Title;
3275 ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
3276 BrowserNameLabel.Caption := ThreadItem.Title;
3277 ItemImage.Picture := nil;
3278 if ThreadItem.IsLogFile then
3279 if ThreadItem.NewArrival then
3280 ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap)
3282 ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap)
3284 ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap);
3286 ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;
3287 BrowserNameLabel.Left := ItemImage.Left + 20;
3289 //if Screen.Cursor <> crDefault then
3290 // Screen.Cursor := OldCursor
3292 Screen.Cursor := crDefault;
3296 function TGikoForm.GetActiveContent: TThreadItem;
3301 if BrowserTab.TabIndex = -1 then begin
3302 Result := BrowserNullTab;
3305 Index := BrowserTab.TabIndex;
3306 if BrowserTab.Tabs.Objects[Index] is TThreadItem then
3307 Result := TThreadItem(BrowserTab.Tabs.Objects[Index]);
3309 // Result := FActiveContent;
3312 procedure TGikoForm.SetActiveList(Obj: TObject);
3318 if Obj is TBBS then begin
3319 for i := 0 to ListView.Columns.Count - 1 do
3320 ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i];
3321 SetCategoryListItem(TBBS(Obj));
3322 end else if Obj is TCategory then begin
3323 for i := 0 to ListView.Columns.Count - 1 do
3324 ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i];
3325 SetBoardListItem(TCategory(Obj));
3326 end else if Obj is TBoard then begin
3327 // SetThreadListItem
\8cÄ
\82Ô
\82È
\82ç
\82¢
\82ç
\82È
\82¢
\82ñ
\82¶
\82á
\82Ë
\82¥
\81H
3329 for i := 0 to ListView.Columns.Count - 1 do
3330 ListView.Column[i].Width := GikoSys.Setting.BoardColumnWidth[i];
3332 SetThreadListItem(TBoard(Obj));
3337 //
\81\9a\81\9a\83q
\83\8d\83\86\83L
\83\81\83\82
3338 //
\82»
\82Ì
\82¤
\82¿interface
\82ð
\8eg
\82¤
3339 function TGikoForm.GetActiveList: TObject;
3341 Result := FActiveList;
3344 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType);
3346 SetListViewType(AViewType, '', False);
3349 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
3353 if ActiveList is TBoard then begin
3354 Board := TBoard(ActiveList);
3356 Board.ParentCategory.ParenTBBS.SelectText := SelectText;
3357 Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
3358 // Board.SelectText := SelectText;
3359 // Board.KubetsuChk := KubetsuChk;
3360 ViewType := AViewType;
3361 SetActiveList(Board);
3362 SetThreadListItem(Board);
3366 procedure TGikoForm.ListViewCustomDraw(Sender: TCustomListView;
3367 const ARect: TRect; var DefaultDraw: Boolean);
3373 if ListView.Items.Count = 0 then begin
3374 DefaultDraw := True;
3376 ListView.Canvas.Brush.Color := ListView.Color;
3377 ListView.Canvas.FillRect(ARect);
3381 ListView.Canvas.Font.Color := clWindowText;
3382 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3385 ListView.Canvas.Font.Color := clBlue;
3386 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';
3389 ListView.Canvas.Font.Color := clGreen;
3390 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\90V
\92\85\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3393 ListView.Canvas.Font.Color := clNavy;
3394 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';
3395 if GetActiveList is TBoard then
3396 s := Format(s, [TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText]);
3404 p := Point((ListView.ClientWidth div 2) - (ListView.Canvas.TextWidth(s) div 2),
3405 (ListView.ClientHeight div 2) - (ListView.Canvas.TextHeight(s) div 2));
3406 ListView.Canvas.TextOut(p.X, p.Y, s);
3408 DefaultDraw := True;
3412 procedure TGikoForm.DownloadList(Board: TBoard);
3414 Item: TDownloadItem;
3416 if Board.Title = '' then
3417 FDownloadTitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j'
3419 FDownloadTitle := Board.Title;
3421 if not Board.IsThreadDatRead then
3422 GikoSys.ReadSubjectFile(Board);
3423 Item := TDownloadItem.Create;
3425 Item.Board := Board;
3426 Item.DownType := gdtBoard;
3427 // AbortToolButton.Enabled := True;
3428 // Animate.Active := True;
3429 // FDownload.Add(Item);
3430 FControlThread.AddItem(Item);
3431 // Animate.Active := False;
3432 // AbortToolButton.Enabled := False;
3433 if FWorkCount = 0 then begin
3435 Animate.Active := True;
3438 Screen.Cursor := crAppStart;
3446 procedure TGikoForm.DownloadContent(ThreadItem: TThreadItem);
3448 Item: TDownloadItem;
3450 if ThreadItem.Title = '' then
3451 FDownloadTitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j'
3453 FDownloadTitle := ThreadItem.Title;
3454 Item := TDownloadItem.Create;
3456 Item.ThreadItem := ThreadItem;
3457 Item.DownType := gdtThread;
3458 // AbortToolButton.Enabled := True;
3459 // Animate.Active := True;
3460 // FDownload.Add(Item);
3461 FControlThread.AddItem(Item);
3462 // Animate.Active := False;
3463 // AbortToolButton.Enabled := False;
3464 if FWorkCount = 0 then begin
3466 Animate.Active := True;
3469 Screen.Cursor := crAppStart;
3477 procedure TGikoForm.PlaySound(SoundEventName: string);
3481 FileName := GikoSys.Setting.FindSoundFileName(SoundEventName);
3482 if FileExists(FileName) then begin
3483 if not sndPlaySound(PChar(FileName), SND_ASYNC or SND_NOSTOP) then begin
3484 sndPlaySound(nil, SND_SYNC);
3485 Application.ProcessMessages;
3487 sndPlaySound(PChar(FileName), SND_ASYNC);
3492 function TGikoForm.AddHistory( favItem : TFavoriteThreadItem ): Boolean;
3495 Item: TFavoriteThreadItem;
3499 // if (GetActiveContent = ThreadItem) and
3500 // (ThreadItem.Count <= ThreadItem.Kokomade) then
3502 // if GetActiveContent = ThreadItem then
3506 for i := 0 to FHistoryList.Count - 1 do begin
3507 if TObject(FHistoryList[i]) is TFavoriteThreadItem then begin
3508 Item := TFavoriteThreadItem(FHistoryList[i]);
3509 if Item.URL = favItem.URL then begin
3510 // SetContent(ThreadItem);
3511 FHistoryList.Move(i, 0);
3512 if FTreeType = gttHistory then
3513 TreeView.Items[ i ].MoveTo( TreeView.TopItem, naInsert );
3519 if FHistoryList.Count > 0 then
3520 FHistoryList.Insert( 0, favItem )
3522 FHistoryList.Add( favItem );
3523 // SetContent(ThreadItem);
3525 if FTreeType = gttHistory then begin
3526 Node := TreeView.Items.Add( nil, favItem.Title );
3527 Node.MoveTo( TreeView.TopItem, naInsert );
3529 if favItem.NewArrival then begin
3530 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3531 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3533 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3534 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3537 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
3538 //
\81¦favItem.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
3539 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3540 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3541 Node.Data := favItem;
3545 procedure TGikoForm.DeleteHistory( threadItem: TThreadItem );
3549 for i := 0 to FHistoryList.Count - 1 do begin
3550 if threadItem.URL = TFavoriteThreadItem( FHistoryList.Items[i] ).URL then begin
3551 TFavoriteThreadItem( FHistoryList.Items[ i ] ).Free;
3552 FHistoryList.Delete(i);
3558 procedure TGikoForm.ClearHistory;
3563 procedure TGikoForm.SaveHistory;
3566 saveList : TstringList;
3569 saveList := TStringList.Create;
3572 saveList.Add('<?xml version="1.0" encoding="Shift_JIS" standalone="yes"?>');
3573 saveList.Add('<address>');
3574 bound := FHistoryList.Count - 1;
3575 for i := 0 to bound do begin
3576 // title
\82Í
\8d¡
\82Ì
\82Æ
\82±
\82ë
\8eg
\82Á
\82Ä
\82¢
\82È
\82¢
3578 '<history url="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).URL ) + '"' +
3579 ' title="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).Title ) + '"/>');
3581 saveList.Add('</address>');
3582 saveList.SaveToFile( GikoSys.GetConfigDir + 'History.xml' );
3589 procedure TGikoForm.LoadHistory;
3593 XMLDoc : IXMLDocument;
3595 HistoryNode : IXMLNode;
3597 favItem : TFavoriteThreadItem;
3600 fileName := GikoSys.GetConfigDir + 'History.xml';
3602 if FileExists( fileName ) then begin
3604 XMLDoc := LoadXMLDocument(FileName);
3606 XMLNode := XMLDoc.DocumentElement;
3608 if XMLNode.NodeName = 'address' then begin
3609 bound := XMLNode.ChildNodes.Count - 1;
3610 for i := 0 to bound do begin
3611 HistoryNode := XMLNode.ChildNodes[i];
3612 if HistoryNode.NodeName = 'history' then begin
3613 //if FReadCount >= sl.Count then begin
3614 s := Trim(HistoryNode.Attributes['url']);
3615 if s <> '' then begin
3616 favItem := TFavoriteThreadItem.Create(
3617 s, HistoryNode.Attributes[ 'title' ] );
3618 AddHistory( favItem );
3633 procedure TGikoForm.ShowBBSTree(
3641 FavoriteTreeView.Visible := False;
3642 FavoriteToolBar.Hide;
3643 TreeView.Visible := True;
3645 b := CabinetSelectPopupMenu.Items.Count - 1;
3646 for i := 0 to b do begin
3647 item := CabinetSelectPopupMenu.Items[ i ];
3648 if item is TBBSMenuItem then begin
3649 if TBBSMenuItem( item ).Data = inBBS then begin
3650 item.Checked := True;
3651 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3652 CabinetMenu.Items[ i ].Checked := True;
3653 GikoSys.Setting.CabinetIndex := i;
3657 item.Checked := False;
3658 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3659 CabinetMenu.Items[ i ].Checked := False;
3661 CabinetSelectToolButton.Caption := inBBS.Title;
3663 CabinetHistoryAction.Checked := False;
3664 CabinetFavoriteAction.Checked := False;
3666 if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin
3667 FTreeType := gtt2ch;
3668 HistoryToolBar.Hide;
3669 SetBoardTreeNode( inBBS );
3670 TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
3671 //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
3672 if GetActiveList = nil then
3673 TreeView.Selected := TreeView.Items[0]
3675 for i := 0 to TreeView.Items.Count - 1 do begin
3676 if TreeView.Items[i].Data = GetActiveList then begin
3677 TreeView.Selected := TreeView.Items[i];
3681 TreeView.Selected := TreeView.Items[0]
3689 procedure TGikoForm.ShowHistoryTree;
3694 if CabinetPanel.Visible then begin
3695 if FTreeType = gttHistory then begin
3696 CabinetVisible( False );
3697 CabinetHistoryAction.Checked := False;
3699 CabinetHistoryAction.Checked := True;
3702 CabinetVisible( True );
3703 CabinetHistoryAction.Checked := True;
3706 // BBS...BBS, History, Favorite
3707 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 2;
3709 FavoriteTreeView.Visible := False;
3710 TreeView.Visible := True;
3712 CabinetBBSAction.Checked := False;
3713 CabinetFavoriteAction.Checked := False;
3715 if FTreeType <> gttHistory then begin
3716 b := CabinetSelectPopupMenu.Items.Count - 1;
3717 for i := 0 to b do begin
3718 item := CabinetSelectPopupMenu.Items[ i ];
3719 if item is TBBSMenuItem then begin
3720 item.Checked := False;
3721 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
3722 CabinetMenu.Items[ i ].Checked := False;
3726 FTreeType := gttHistory;
3727 HistoryToolBar.Show;
3728 FavoriteToolBar.Hide;
3730 CabinetSelectToolButton.Caption := '
\97\9a\97ð
\83\8a\83X
\83g';
3734 procedure TGikoForm.SetHistoryTreeNode;
3738 Item: TFavoriteThreadItem;
3740 TreeView.Items.BeginUpdate;
3742 TreeView.Items.Clear;
3743 for i := 0 to FHistoryList.Count - 1 do begin
3744 Item := TFavoriteThreadItem(FHistoryList[i]);
3745 Node := TreeView.Items.Add(nil, Item.Title);
3747 if Item.Item.NewArrival then begin
3748 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3749 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3751 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3752 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3755 //
\95\89\89×
\82ð
\82©
\82¯
\82½
\82
\82È
\82¢
\82Ì
\82Å NewArrival
\82Ì
\83`
\83F
\83b
\83N
\82ð
\8ds
\82í
\82È
\82¢
3756 //
\81¦Item.Item
\83v
\83\8d\83p
\83e
\83B
\82Í dat
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\82ð
\95K
\97v
\82Æ
\82·
\82é
3757 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3758 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3762 TreeView.Items.EndUpdate;
3766 procedure TGikoForm.SelectTreeNode(Item: TObject; CallEvent: Boolean);
3768 ChangeEvent: TTVChangedEvent;
3769 ChangingEvent: TTVChangingEvent;
3773 if Item is TCategory then
3774 bbs := TCategory( Item ).ParenTBBS
3775 else if Item is TBoard then
3776 bbs := TBoard( Item ).ParentCategory.ParenTBBS
3780 if (FTreeType = gtt2ch) and (FActiveBBS = bbs) then begin
3782 ChangingEvent := nil;
3784 if not CallEvent then begin
3785 ChangeEvent := TreeView.OnChange;
3786 ChangingEvent := TreeView.OnChanging;
3789 if not CallEvent then begin
3790 TreeView.OnChange := nil;
3791 TreeView.OnChanging := nil;
3793 Application.ProcessMessages;
3794 for i := 0 to TreeView.Items.Count - 1 do begin
3795 if TreeView.Items[i].Data = Item then begin
3796 TreeView.Items[i].Selected := True;
3798 TreeViewChange(TreeView, TreeView.Items[i]);
3802 Application.ProcessMessages;
3804 if not CallEvent then begin
3805 TreeView.OnChange := ChangeEvent;
3806 TreeView.OnChanging := ChangingEvent;
3810 if GetActiveList is TBBS then begin
3811 for i := 0 to ListView.Columns.Count - 1 do
3812 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
3813 end else if GetActiveList is TCategory then begin
3814 for i := 0 to ListView.Columns.Count - 1 do
3815 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
3816 end else if GetActiveList is TBoard then begin
3817 for i := 0 to ListView.Columns.Count - 1 do
3818 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
3821 if (Item is TBBS) or (Item is TCategory) then begin
3822 SetActiveList( Item );
3823 end else if Item is TBoard then begin
3824 if not TBoard( Item ).IsThreadDatRead then begin
3825 Screen.Cursor := crHourGlass;
3827 GikoSys.ReadSubjectFile(TBoard( Item ));
3829 Screen.Cursor := crDefault;
3832 SetActiveList( Item );
3837 procedure TGikoForm.ListViewMouseDown(Sender: TObject;
3838 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
3842 { if ssDouble in Shift then begin
3843 DoubleClickOccurred[Button] := True;
3845 DoubleClickOccurred[Button] := False;
3846 t := GetTickCount+GetDoubleClickTime;
3847 while GetTickCount < t do begin
3848 Application.ProcessMessages;
3849 if DoubleClickOccurred[Button] then
3854 if ssDouble in Shift then begin
3856 mbLeft: ListDoubleClick;
3869 procedure TGikoForm.ListClick;
3871 ListItem: TListItem;
3872 ThreadItem: TThreadItem;
3874 if ListView.SelCount <> 1 then Exit;
3875 ListItem := ListView.Selected;
3876 if ListItem = nil then Exit;
3877 if not (TObject(ListItem.Data) is TThreadItem) then Exit;
3879 ThreadItem := TThreadItem(ListItem.Data);
3880 if ThreadItem.IsLogFile then begin
3881 // if AddHistory(ThreadItem) then
3882 // SetContent(ThreadItem);
3883 InsertBrowserTab(ThreadItem);
3884 ListView.UpdateItems(ListItem.Index, ListItem.Index);
3886 // SetContent(ThreadItem);
3887 InsertBrowserTab(ThreadItem);
3891 procedure TGikoForm.ListDoubleClick;
3893 ThreadItem: TThreadItem;
3895 // PostMessage(ListView.Handle, WM_CANCELMODE, 0, 0);
3897 if ListView.Selected = nil then Exit;
3898 // if TreeView.Selected = nil then Exit;
3900 if TObject(ListView.Selected.Data) is TCategory then begin
3901 SelectTreeNode(ListView.Selected.Data, True);
3902 // TreeView.Selected.Expanded := True;
3903 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
3904 //TreeViewChange(nil, TreeView.Selected);
3905 end else if TObject(ListView.Selected.Data) is TBoard then begin
3906 SelectTreeNode(ListView.Selected.Data, True);
3907 // TreeView.Selected.Expanded := True;
3908 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
3909 //TreeViewChange(nil, TreeView.Selected);
3910 end else if TObject(ListView.Selected.Data) is TThreadItem then begin
3911 //if TObject(ListView.Selected.Data) is TThreadItem then begin
3912 ThreadItem := TThreadItem(ListView.Selected.Data);
3913 DownloadContent(ThreadItem);
3918 procedure TGikoForm.BrowserMovement(AName: string);
3922 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
3925 OleVariant(Browser.Document as IHTMLDocument2).body.scrollTop :=
3926 OleVariant(Browser.Document as IHTMLDocument2).anchors.item(nm).offsetTop;
3931 procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
3933 if TObject(Node.Data) is TBBS then begin
3934 TBBS(Node.Data).NodeExpand := False;
3935 end else if TObject(Node.Data) is TCategory then begin
3936 TCategory(Node.Data).NodeExpand := False;
3937 end else if TObject(Node.Data) is TBoard then begin
3938 TBoard(Node.Data).NodeExpand := False;
3942 procedure TGikoForm.MessageListViewResize(Sender: TObject);
3944 // MessageListView.Column[0].Width := MessageListView.ClientWidth - 16;
3947 procedure TGikoForm.SelectListItem(List: TList);
3949 // TmpTreeNode: TTreeNode;
3950 TmpListItem: TListItem;
3953 TmpListItem := ListView.Selected;
3954 while TmpListItem <> nil do begin
3955 List.Add(TmpListItem.Data);
3956 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
3960 procedure TGikoForm.ExitActionExecute(Sender: TObject);
3965 procedure TGikoForm.AllSelectActionExecute(Sender: TObject);
3970 procedure TGikoForm.StdToolBarVisibleActionExecute(Sender: TObject);
3972 CoolBand: TCoolBand;
3974 CoolBand := GetCoolBand(MainCoolBar, StdToolBar);
3975 if CoolBand = nil then
3977 GikoSys.Setting.StdToolBarVisible := StdToolBarVisibleAction.Checked;
3978 CoolBand.Visible := GikoSys.Setting.StdToolBarVisible;
3979 // StdToolBar.Visible := StdToolBarVisibleAction.Checked;
3980 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
3982 //StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
3983 StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible;
3986 procedure TGikoForm.AddressBarVisibleActionExecute(Sender: TObject);
3988 CoolBand: TCoolBand;
3990 CoolBand := GetCoolBand(MainCoolBar, AddressToolBar);
3991 if CoolBand = nil then
3993 GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked;
3994 CoolBand.Visible := GikoSys.Setting.AddressBarVisible;
3995 //AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
3996 AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible;
3999 procedure TGikoForm.LinkBarVisibleActionExecute(Sender: TObject);
4001 CoolBand: TCoolBand;
4003 CoolBand := GetCoolBand(MainCoolBar, LinkToolBar);
4004 if CoolBand = nil then
4006 GikoSys.Setting.LinkBarVisible := LinkBarVisibleAction.Checked;
4007 CoolBand.Visible := GikoSys.Setting.LinkBarVisible;
4008 //LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
4009 LinkToolBarVisiblePMenu.Checked := GikoSys.Setting.LinkBarVisible;
4012 procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);
4014 CoolBand: TCoolBand;
4016 CoolBand := GetCoolBand(ListCoolBar, ListToolBar);
4017 if CoolBand = nil then
4019 CoolBand.Visible := ListToolBarVisibleAction.Checked;
4020 // ListToolBar.Visible := ListToolBarVisibleAction.Checked;
4021 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
4022 GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;
4025 procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);
4027 CoolBand: TCoolBand;
4029 CoolBand := GetCoolBand(ListCoolBar, ListNameToolBar);
4030 if CoolBand = nil then
4032 CoolBand.Visible := ListNameBarVisibleAction.Checked;
4033 GikoSys.Setting.ListNameBarVisible := ListNameBarVisibleAction.Checked;
4036 procedure TGikoForm.BrowserToolBarVisibleActionExecute(Sender: TObject);
4038 CoolBand: TCoolBand;
4040 CoolBand := GetCoolBand(BrowserCoolBar, BrowserToolBar);
4041 if CoolBand = nil then
4043 CoolBand.Visible := BrowserToolBarVisibleAction.Checked;
4044 // BrowserToolBar.Visible := BrowserToolBarVisibleAction.Checked;
4045 GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;
4048 procedure TGikoForm.BrowserNameBarVisibleActionExecute(Sender: TObject);
4050 CoolBand: TCoolBand;
4052 CoolBand := GetCoolBand(BrowserCoolBar, BrowserNameToolBar);
4053 if CoolBand = nil then
4055 CoolBand.Visible := BrowserNameBarVisibleAction.Checked;
4056 GikoSys.Setting.BrowserNameBarVisible := BrowserNameBarVisibleAction.Checked;
4059 procedure TGikoForm.MsgBarVisibleActionExecute(Sender: TObject);
4061 MessageSplitter.Visible := MsgBarVisibleAction.Checked;
4062 MessagePanel.Top := MessageSplitter.Top + MessageSplitter.Height;
4063 MessageSplitter.Top := MessagePanel.Top + 1;
4064 MessagePanel.Visible := MsgBarVisibleAction.Checked;
4065 GikoSys.Setting.MessageBarVisible := MsgBarVisibleAction.Checked;
4068 procedure TGikoForm.StatusBarVisibleActionExecute(Sender: TObject);
4070 StatusBar.Visible := StatusBarVisibleAction.Checked;
4071 GikoSys.Setting.StatusBarVisible := StatusBarVisibleAction.Checked;
4074 procedure TGikoForm.IconStyleExecute(Sender: TObject);
4076 case ListView.ViewStyle of
4077 vsIcon: SmallIconAction.Execute;
4078 vsSmallIcon: ListIconAction.Execute;
4079 vsList: DetailIconAction.Execute;
4080 vsReport: LargeIconAction.Execute;
4084 procedure TGikoForm.LargeIconActionExecute(Sender: TObject);
4086 ListView.ViewStyle := vsIcon;
4087 LargeIconAction.Checked := True;
4090 procedure TGikoForm.SmallIconActionExecute(Sender: TObject);
4092 ListView.ViewStyle := vsSmallIcon;
4093 SmallIconAction.Checked := True;
4096 procedure TGikoForm.ListIconActionExecute(Sender: TObject);
4098 ListView.ViewStyle := vsList;
4099 ListIconAction.Checked := True;
4102 procedure TGikoForm.DetailIconActionExecute(Sender: TObject);
4104 ListView.ViewStyle := vsReport;
4105 DetailIconAction.Checked := True;
4108 procedure TGikoForm.SearchActionExecute(Sender: TObject);
4113 if FSearchDialog = nil then begin
4114 if (GikoForm.GetActiveList is TCategory) or (GikoForm.GetActiveList is TBoard) then
4115 chk := GikoForm.GetActiveList
4119 FSearchDialog := TSearchDialog.Create(Self, chk);
4120 FSearchDialog.SearchComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
4130 procedure TGikoForm.OptionActionExecute(Sender: TObject);
4134 Dlg := TOptionDialog.Create(Self);
4142 procedure TGikoForm.GikoNaviWebPageActionExecute(Sender: TObject);
4144 URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
4146 GikoSys.OpenBrowser(URL_GIKONAVI, gbtAuto);
4149 procedure TGikoForm.MonazillaWebPageActionExecute(Sender: TObject);
4151 URL_MONAZILLA: string = 'http://www.monazilla.org/';
4153 GikoSys.OpenBrowser(URL_MONAZILLA, gbtAuto);
4156 procedure TGikoForm.BBS2chWebPageActionExecute(Sender: TObject);
4158 URL_2ch: string = 'http://www.2ch.net/';
4160 GikoSys.OpenBrowser(URL_2ch, gbtAuto);
4163 procedure TGikoForm.GikoFolderOpenActionExecute(Sender: TObject);
4165 // GikoSys.OpenBrowser(GikoSys.GetAppDir, gbtIE);
4166 GikoSys.CreateProcess('explorer.exe', '/e,"' + GikoSys.GetAppDir + '"');
4169 procedure TGikoForm.AboutActionExecute(Sender: TObject);
4173 Dlg := TAboutDialog.Create(Self);
4181 procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject);
4186 procedure TGikoForm.CabinetVisible( isVisible : Boolean );
4188 TreeSplitter.Visible := isVisible;
4189 CabinetPanel.Visible := isVisible;
4190 CabinetVisibleAction.Checked := isVisible;
4193 procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject);
4196 gttHistory: CabinetHistoryAction.Execute;
4197 gttFavorite: CabinetFavoriteAction.Execute;
4199 CabinetBBSAction.Execute;
4203 procedure TGikoForm.AllItemActionExecute(Sender: TObject);
4206 if ViewType <> gvtAll then
4207 SetListViewType(gvtAll);
4208 AllItemAction.Checked := True;
4209 LogItemAction.Checked := False;
4210 NewItemAction.Checked := False;
4211 //SelectItemAction.Checked := False;
4212 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4214 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4215 if SelectComboBox.Parent <> nil then begin
4216 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4217 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4224 procedure TGikoForm.LogItemActionExecute(Sender: TObject);
4227 if ViewType <> gvtLog then
4228 SetListViewType(gvtLog);
4229 AllItemAction.Checked := False;
4230 LogItemAction.Checked := True;
4231 NewItemAction.Checked := False;
4232 //SelectItemAction.Checked := False;
4233 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4235 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4236 if SelectComboBox.Parent <> nil then begin
4237 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4238 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4245 procedure TGikoForm.NewItemActionExecute(Sender: TObject);
4249 if ViewType <> gvtNew then
4250 SetListViewType(gvtNew);
4251 AllItemAction.Checked := False;
4252 LogItemAction.Checked := False;
4253 NewItemAction.Checked := True;
4254 //SelectItemAction.Checked := False;
4255 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
4257 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
4258 if SelectComboBox.Parent <> nil then begin
4259 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4260 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4267 procedure TGikoForm.SelectItemActionExecute(Sender: TObject);
4270 Dlg: TListSelectDialog;
4273 if SelectComboBox.Parent <> nil then begin
4274 if SelectComboBox.Left + SelectComboBox.Width < ListToolBar.Width then begin
4275 // SelectComboBox
\82ª
\82 \82é
\8fê
\8d\87\82Í
\83t
\83H
\81[
\83J
\83X
\82ð
\88Ú
\82·
4276 SelectComboBox.SetFocus;
4283 if SelectComboBox.Text = SELECTCOMBOBOX_NAME then begin
4284 SelectComboBox.Text := '';
4285 SelectComboBox.Color := clWindow;
4288 AllItemAction.Checked := False;
4289 LogItemAction.Checked := False;
4290 NewItemAction.Checked := False;
4291 //SelectItemAction.Checked := True;
4293 Dlg := TListSelectDialog.Create(Self);
4295 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
4296 Dlg.SelectComboBox.Text := SelectComboBox.Text;
4298 if Dlg.ModalResult = mrCancel then begin
4299 if Length( SelectComboBox.Text ) = 0 then begin
4300 AllItemAction.Checked := True;
4301 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4302 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4305 if GetActiveList is TBoard then
4306 SetListViewType(gvtUser, TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText , Dlg.KubetsuCheckBox.Checked);
4308 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
4310 GikoSys.Setting.SelectTextList.Delete(idx);
4311 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
4312 while Dlg.SelectComboBox.Items.Count > 100 do begin
4313 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
4316 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
4317 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
4318 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
4320 SelectComboBox.Text := Dlg.SelectComboBox.Text;
4321 SelectComboBox.Color := clWindow;
4323 SetListViewType(gvtUser, Dlg.SelectComboBox.Text, Dlg.KubetsuCheckBox.Checked);
4330 procedure TGikoForm.ListNumberVisibleActionExecute(Sender: TObject);
4332 GikoSys.Setting.ListViewNo := ListNumberVisibleAction.Checked;
4336 procedure TGikoForm.UpFolderActionExecute(Sender: TObject);
4338 if GetActiveList is TBoard then begin
4339 if FTreeType = gtt2ch then
4340 SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
4341 //SetActiveList(TBoard(GetActiveList).ParentCategory);
4342 end else if GetActiveList is TCategory then begin
4343 if FTreeType = gtt2ch then
4344 SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);
4345 //SetActiveList(TCategory(GetActiveList).ParenTBBS);
4347 // if TreeView.Selected = nil then Exit;
4348 // if TreeView.Selected.Level = 0 then Exit;
4349 // TreeView.Selected.Parent.Selected := True;
4352 procedure TGikoForm.RoundActionExecute(Sender: TObject);
4356 Dlg := TRoundDialog.Create(Self);
4364 procedure TGikoForm.StopActionExecute(Sender: TObject);
4366 FControlThread.DownloadAbort;
4367 if FWorkCount <> 0 then FWorkCount := 0;
4369 Animate.Active := False;
4372 Screen.Cursor := crDefault;
4375 procedure TGikoForm.MsgBarCloseActionExecute(Sender: TObject);
4377 // MessagePanel.Visible := False;
4378 // MessageSplitter.Visible := False;
4379 // MsgBarVisibleAction.Checked := False;
4380 MsgBarVisibleAction.Execute;
4383 procedure TGikoForm.BrowserMaxActionExecute(Sender: TObject);
4385 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4386 case GikoSys.Setting.ListWidthState of
4388 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4389 ViewPanel.Width := FBrowserSizeWidth;
4390 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4391 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4392 GikoSys.Setting.ListWidthState := glsNormal;
4394 glsMin, glsNormal: begin
4395 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4396 if GikoSys.Setting.ListWidthState = glsNormal then
4397 FBrowserSizeWidth := ViewPanel.Width;
4398 ViewPanel.Width := 1;
4399 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4400 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4401 GikoSys.Setting.ListWidthState := glsMax;
4405 case GikoSys.Setting.ListHeightState of
4407 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4408 ViewPanel.Height := FBrowserSizeHeight;
4409 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4410 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4411 GikoSys.Setting.ListHeightState := glsNormal;
4413 glsMin, glsNormal: begin
4414 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4415 if GikoSys.Setting.ListHeightState = glsNormal then
4416 FBrowserSizeHeight := ViewPanel.Height;
4417 ViewPanel.Height := 1;
4418 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4419 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4420 GikoSys.Setting.ListHeightState := glsMax;
4424 // Mouse.CursorPos := BrowserSizeButton.ClientToScreen(Point(
4425 // System.Round(BrowserToolBar.ButtonWidth div 2),
4426 // System.Round(BrowserToolBar.ButtonHeight div 2)));
4429 procedure TGikoForm.BrowserMinActionExecute(Sender: TObject);
4431 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4432 case GikoSys.Setting.ListWidthState of
4433 glsMax, glsNormal: begin
4434 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4435 if GikoSys.Setting.ListWidthState = glsNormal then
4436 FBrowserSizeWidth := ViewPanel.Width;
4437 ViewPanel.Width := ThreadMainPanel.Width - 80;
4438 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4439 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4440 GikoSys.Setting.ListWidthState := glsMin;
4443 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4444 ViewPanel.Width := FBrowserSizeWidth;
4445 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4446 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4447 GikoSys.Setting.ListWidthState := glsNormal;
4451 case GikoSys.Setting.ListHeightState of
4452 glsMax, glsNormal: begin
4453 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4454 if GikoSys.Setting.ListHeightState = glsNormal then
4455 FBrowserSizeHeight := ViewPanel.Height;
4456 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
4457 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4458 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4459 GikoSys.Setting.ListHeightState := glsMin;
4462 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4463 ViewPanel.Height := FBrowserSizeHeight;
4464 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4465 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4466 GikoSys.Setting.ListHeightState := glsNormal;
4472 procedure TGikoForm.ScrollTopActionExecute(Sender: TObject);
4474 BrowserMovement('top');
4477 procedure TGikoForm.ScrollLastActionExecute(Sender: TObject);
4479 BrowserMovement('bottom');
4482 procedure TGikoForm.ScrollNewActionExecute(Sender: TObject);
4484 BrowserMovement('new');
4487 procedure TGikoForm.ScrollKokoActionExecute(Sender: TObject);
4489 BrowserMovement('koko');
4492 procedure TGikoForm.EditorActionExecute(Sender: TObject);
4494 Editor: TEditorForm;
4498 Item := GetActiveContent;
4499 if Item = nil then Exit;
4501 if Item.Count >= 1000 then begin
4502 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
4503 + '
\90V
\83X
\83\8c\83b
\83h
\82ð
\92T
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
4504 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin
4508 Editor := TEditorForm.Create(Self);
4509 Editor.SetThreadItem(Item);
4511 Editor.BodyEdit.SetFocus;
4514 procedure TGikoForm.IEActionExecute(Sender: TObject);
4516 ShowThreadAction.Execute;
4519 procedure TGikoForm.ShowThreadActionExecute(Sender: TObject);
4521 ThreadItem: TThreadItem;
4523 ThreadItem := GetActiveContent;
4524 if ThreadItem = nil then Exit;
4525 GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
4528 procedure TGikoForm.ShowBoardActionExecute(Sender: TObject);
4530 ThreadItem: TThreadItem;
4532 ThreadItem := GetActiveContent;
4533 if ThreadItem = nil then Exit;
4534 GikoSys.OpenBrowser(ThreadItem.ParentBoard.URL, gbtAuto);
4537 //(Thread)URL
\82ð
\83R
\83s
\81[
4538 procedure TGikoForm.URLCopyActionExecute(Sender: TObject);
4543 if TObject(GetActiveContent) is TBoard then
4544 s := s + TBoard(GetActiveContent).URL + #13#10
4545 else if TObject(GetActiveContent) is TThreadItem then
4546 s := s + TThreadItem(GetActiveContent).URL + #13#10;
4548 Clipboard.AsText := s;
4551 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ð
\83R
\83s
\81[
4552 procedure TGikoForm.NameCopyActionExecute(Sender: TObject);
4557 if TObject(GetActiveContent) is TBoard then
4558 s := s + TBoard(GetActiveContent).Title + #13#10
4559 else if TObject(GetActiveContent) is TThreadItem then
4560 s := s + TThreadItem(GetActiveContent).Title + #13#10;
4562 Clipboard.AsText := s;
4565 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ÆURL
\82ð
\83R
\83s
\81[
4566 procedure TGikoForm.NameURLCopyActionExecute(Sender: TObject);
4571 if TObject(GetActiveContent) is TBoard then
4572 s := s + TBoard(GetActiveContent).Title + #13#10 + TBoard(GetActiveContent).URL + #13#10
4573 else if TObject(GetActiveContent) is TThreadItem then
4574 s := s + TThreadItem(GetActiveContent).Title + #13#10 + TThreadItem(GetActiveContent).URL + #13#10;
4576 Clipboard.AsText := s;
4579 procedure TGikoForm.ItemReloadActionExecute(Sender: TObject);
4581 ThreadItem: TThreadItem;
4583 ThreadItem := GetActiveContent;
4584 if ThreadItem <> nil then
4585 DownloadContent(ThreadItem);
4588 procedure TGikoForm.SelectListReloadActionExecute(Sender: TObject);
4594 if GetActiveList is TCategory then begin
4595 List := TList.Create;
4597 SelectListItem(List);
4598 if List.Count > 5 then begin
4599 msg := '5
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
4600 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
4601 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
4604 for i := 0 to List.Count - 1 do begin
4605 if TObject(List[i]) is TBoard then
4606 DownloadList(TBoard(List[i]));
4611 end else if GetActiveList is TBoard then begin
4612 DownloadList(TBoard(GetActiveList));
4616 procedure TGikoForm.SelectThreadReloadActionExecute(Sender: TObject);
4622 List := TList.Create;
4624 SelectListItem(List);
4625 if List.Count > 10 then begin
4626 msg := '10
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
4627 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
4628 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
4631 for i := 0 to List.Count - 1 do begin
4632 if TObject(List[i]) is TThreadItem then
4633 DownloadContent(TThreadItem(List[i]));
4640 procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);
4642 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
4643 SelectListReloadAction.Enabled := True
4644 else if GetActiveList is TBoard then
4645 SelectListReloadAction.Enabled := True
4647 SelectListReloadAction.Enabled := False;
4650 procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);
4652 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
4653 SelectThreadReloadAction.Enabled := True
4655 SelectThreadReloadAction.Enabled := False;
4658 procedure TGikoForm.AllItemActionUpdate(Sender: TObject);
4660 AllItemAction.Enabled := (GetActiveList is TBoard);
4663 procedure TGikoForm.LogItemActionUpdate(Sender: TObject);
4665 LogItemAction.Enabled := (GetActiveList is TBoard);
4668 procedure TGikoForm.NewItemActionUpdate(Sender: TObject);
4670 NewItemAction.Enabled := (GetActiveList is TBoard);
4673 procedure TGikoForm.SelectItemActionUpdate(Sender: TObject);
4675 SelectItemAction.Enabled := (GetActiveList is TBoard);
4678 procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
4680 UpFolderAction.Enabled := not (GetActiveList is TBBS);
4683 procedure TGikoForm.ThreadEditorActionUpdate(Sender: TObject);
4685 ThreadEditorAction.Enabled := (GetActiveList is TBoard);
4688 procedure TGikoForm.FormResize(Sender: TObject);
4690 MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
4691 MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
4694 procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject);
4696 ScrollTopAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
4699 procedure TGikoForm.ScrollLastActionUpdate(Sender: TObject);
4701 ScrollLastAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
4704 procedure TGikoForm.ScrollNewActionUpdate(Sender: TObject);
4706 ScrollNewAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
4709 procedure TGikoForm.ScrollKokoActionUpdate(Sender: TObject);
4711 ScrollKokoAction.Enabled := (GetActiveContent <> nil)
4712 and (GetActiveContent.IsLogFile)
4713 and (GetActiveContent.Kokomade <> -1);
4717 procedure TGikoForm.EditorActionUpdate(Sender: TObject);
4719 EditorAction.Enabled := GetActiveContent <> nil;
4722 procedure TGikoForm.IEActionUpdate(Sender: TObject);
4724 IEAction.Enabled := GetActiveContent <> nil;
4727 procedure TGikoForm.ShowThreadActionUpdate(Sender: TObject);
4729 ShowThreadAction.Enabled := GetActiveContent <> nil;
4732 procedure TGikoForm.ShowBoardActionUpdate(Sender: TObject);
4734 ShowBoardAction.Enabled := GetActiveContent <> nil;
4737 procedure TGikoForm.ItemReloadActionUpdate(Sender: TObject);
4739 ItemReloadAction.Enabled := GetActiveContent <> nil;
4742 procedure TGikoForm.URLCopyActionUpdate(Sender: TObject);
4744 URLCopyAction.Enabled := GetActiveContent <> nil;
4747 procedure TGikoForm.NameCopyActionUpdate(Sender: TObject);
4749 NameCopyAction.Enabled := GetActiveContent <> nil;
4752 procedure TGikoForm.NameURLCopyActionUpdate(Sender: TObject);
4754 NameURLCopyAction.Enabled := GetActiveContent <> nil;
4757 procedure TGikoForm.BrowserTabCloseActionUpdate(Sender: TObject);
4759 BrowserTabCloseAction.Enabled := GetActiveContent <> nil;
4762 procedure TGikoForm.NotSelectTabCloseActionUpdate(Sender: TObject);
4764 NotSelectTabCloseAction.Enabled := GetActiveContent <> nil;
4767 procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
4769 AllTabCloseAction.Enabled := GetActiveContent <> nil;
4772 procedure TGikoForm.ActiveLogDeleteActionUpdate(Sender: TObject);
4774 ActiveLogDeleteAction.Enabled := GetActiveContent <> nil;
4777 procedure TGikoForm.ListViewSelectItem(Sender: TObject; Item: TListItem;
4780 SelectTimer.Enabled := False;
4782 SelectTimer.Enabled := True;
4785 if ListView.Selected = nil then
4787 if ListView.Selected.Data = nil then
4789 if TThreadItem( ListView.Selected.Data ).IsLogFile then begin
4790 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4791 if GikoSys.Setting.ListWidthState = glsMin then
4792 BrowserMaxAction.Execute;
4794 if GikoSys.Setting.ListHeightState = glsMin then
4795 BrowserMaxAction.Execute;
4801 procedure TGikoForm.SelectTimerTimer(Sender: TObject);
4803 SelectTimer.Enabled := False;
4807 procedure TGikoForm.ListViewDblClick(Sender: TObject);
4812 procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
4814 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';
4815 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
4817 ThreadItem: TThreadItem;
4818 TmpListItem: TListItem;
4822 List := TList.Create;
4824 TmpListItem := ListView.Selected;
4825 while TmpListItem <> nil do begin
4826 if TObject(TmpListItem.Data) is TThreadItem then begin
4827 ThreadItem := TThreadItem(TmpListItem.Data);
4828 if ThreadItem.IsLogFile then
4829 List.Add(ThreadItem);
4831 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
4834 if GikoSys.Setting.DeleteMsg and (List.Count > 0) then begin
4835 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
4839 for i := 0 to List.Count - 1 do begin
4840 ThreadItem := TThreadItem(List[i]);
4841 DeleteHistory(ThreadItem);
4842 DeleteTab(ThreadItem);
4843 ThreadItem.DeleteLogFile;
4851 procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
4855 FTabHintIndex := -1;
4856 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
4857 if TThreadItem(BrowserTab.Tabs.Objects[i]) = ThreadItem then begin
4858 BrowserTab.Tabs.Delete(i);
4859 if i > (BrowserTab.Tabs.Count - 1) then
4860 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1
4862 BrowserTab.TabIndex := i;
4863 if BrowserTab.Tabs.Count = 0 then
4865 else if BrowserTab.TabIndex <> -1 then
4866 SetContent(TThreadItem(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]));
4872 procedure TGikoForm.KokomadeActionExecute(Sender: TObject);
4875 ThreadItem: TThreadItem;
4880 No := KokoPopupMenu.Tag;
4881 if No = 0 then Exit;
4882 ThreadItem := GetActiveContent;
4883 if ThreadItem = nil then Exit;
4884 ThreadItem.Kokomade := No;
4885 doc := Browser.Document;
4886 ScrollTop := doc.Body.ScrollTop;
4888 GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
4889 // HtmlName := GikoSys.CreateHTML(ThreadItem, sTitle) + '#koko';
4891 // Browser.Navigate(HtmlName, Flags);
4893 Application.ProcessMessages;
4894 doc.Body.ScrollTop := ScrollTop;
4897 procedure TGikoForm.ZenbuActionExecute(Sender: TObject);
4899 ThreadItem: TThreadItem;
4904 ThreadItem := GetActiveContent;
4905 if ThreadItem = nil then Exit;
4906 ThreadItem.Kokomade := -1;
4907 doc := Browser.Document;
4908 ScrollTop := doc.Body.ScrollTop;
4909 GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
4910 // HtmlName := GikoSys.CreateHTML(ThreadItem, sTitle) + '#koko';
4912 // Browser.Navigate(HtmlName, Flags);
4914 Application.ProcessMessages;
4915 doc.Body.ScrollTop := ScrollTop;
4918 function TGikoForm.Hook(var Message: TMessage): Boolean;
4921 if Message.Msg = CM_APPKEYDOWN then Result := True;
4924 procedure TGikoForm.KokoResActionExecute(Sender: TObject);
4926 Editor: TEditorForm;
4931 Number := KokoPopupMenu.Tag;
4932 if Number = 0 then Exit;
4933 Item := GetActiveContent;
4934 if Item = nil then Exit;
4936 if Item.Count >= 1000 then begin
4937 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
4938 + '
\90V
\83X
\83\8c\83b
\83h
\82ð
\92T
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
4939 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin
4943 Editor := TEditorForm.Create(Self);
4944 Editor.SetThreadItem(Item);
4945 Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
4947 Editor.BodyEdit.SetFocus;
4950 procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
4952 ItemRoundPMenu.Visible := (GetActiveList is TBoard);
4953 ItemReservPMenu.Visible := (GetActiveList is TBoard);
4954 LPMSep01.Visible := (GetActiveList is TBoard);
4955 ListRoundPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
4956 ListReservPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
4957 LPMSep02.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4958 KidokuPMenu.Visible := (GetActiveList is TBoard);
4959 MidokuPMenu.Visible := (GetActiveList is TBoard);
4960 UrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4961 NameUrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4962 AllSelectPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4963 LPMSep05.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4964 DeletePMenu.Visible := (GetActiveList is TBoard);
4965 LPMSep06.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4967 BoardFavoriteAddMenu.Visible := (GetActiveList is TCategory);
4968 ThreadFavoriteAddMenu.Visible := (GetActiveList is TBoard);
4970 AddRoundNameMenu(ItemReservPMenu);
4971 AddRoundNameMenu(ListReservPMenu);
4974 procedure TGikoForm.BoardIEActionExecute(Sender: TObject);
4978 if GetActiveList is TBoard then begin
4979 URL := TBoard(GetActiveList).URL;
4980 GikoSys.OpenBrowser(URL, gbtAuto);
4984 procedure TGikoForm.SelectItemURLCopyActionExecute(Sender: TObject);
4991 List := TList.Create;
4993 SelectListItem(List);
4994 for i := 0 to List.Count - 1 do begin
4995 if TObject(List[i]) is TBoard then
4996 s := s + TBoard(List[i]).URL + #13#10
4997 else if TObject(List[i]) is TThreadItem then
4998 s := s + TThreadItem(List[i]).URL + #13#10;
5001 Clipboard.AsText := s;
5007 procedure TGikoForm.SelectItemNameCopyActionExecute(Sender: TObject);
5014 List := TList.Create;
5016 SelectListItem(List);
5017 for i := 0 to List.Count - 1 do begin
5018 if TObject(List[i]) is TBoard then
5019 s := s + TBoard(List[i]).Title + #13#10
5020 else if TObject(List[i]) is TThreadItem then
5021 s := s + TThreadItem(List[i]).Title + #13#10;
5024 Clipboard.AsText := s;
5030 procedure TGikoForm.SelectItemNameURLCopyActionExecute(Sender: TObject);
5037 List := TList.Create;
5039 SelectListItem(List);
5040 for i := 0 to List.Count - 1 do begin
5041 if TObject(List[i]) is TBoard then
5042 s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10
5043 else if TObject(List[i]) is TThreadItem then
5044 s := s + TThreadItem(List[i]).Title + #13#10 + TThreadItem(List[i]).URL + #13#10;
5047 Clipboard.AsText := s;
5053 procedure TGikoForm.BoardIEActionUpdate(Sender: TObject);
5055 if GetActiveList is TBoard then
5056 BoardIEAction.Enabled := True
5058 BoardIEAction.Enabled := False;
5061 procedure TGikoForm.SelectItemURLCopyActionUpdate(Sender: TObject);
5063 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5064 SelectItemURLCopyAction.Enabled := True
5066 SelectItemURLCopyAction.Enabled := False;
5069 procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
5071 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5072 SelectItemNameCopyAction.Enabled := True
5074 SelectItemNameCopyAction.Enabled := False;
5077 procedure TGikoForm.SelectItemNameURLCopyActionUpdate(Sender: TObject);
5079 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
5080 SelectItemNameURLCopyAction.Enabled := True
5082 SelectItemNameURLCopyAction.Enabled := False;
5085 procedure TGikoForm.AllSelectActionUpdate(Sender: TObject);
5087 if ListView.SelCount > 0 then
5088 AllSelectAction.Enabled := True
5090 AllSelectAction.Enabled := False;
5093 procedure TGikoForm.LogDeleteActionUpdate(Sender: TObject);
5095 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
5096 LogDeleteAction.Enabled := True
5098 LogDeleteAction.Enabled := False;
5101 procedure TGikoForm.BrowserTabCloseActionExecute(Sender: TObject);
5104 ThreadItem: TThreadItem;
5106 idx := BrowserTab.TabIndex;
5107 if idx <> -1 then begin
5108 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5109 DeleteTab(ThreadItem);
5113 procedure TGikoForm.NotSelectTabCloseActionExecute(Sender: TObject);
5117 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
5118 if BrowserTab.TabIndex <> i then begin
5119 BrowserTab.Tabs.Delete(i);
5124 procedure TGikoForm.AllTabCloseActionExecute(Sender: TObject);
5128 for i := BrowserTab.Tabs.Count - 1 downto 0 do
5129 BrowserTab.Tabs.Delete(i);
5133 procedure TGikoForm.TreeSelectBoradReloadExecute(Sender: TObject);
5136 TmpTreeNode: TTreeNode;
5138 TmpTreeNode := FClickNode;
5139 TreeView.Selected := FClickNode;
5140 if TObject(TmpTreeNode.Data) is TBoard then begin
5141 Board := TBoard(TmpTreeNode.Data);
5142 DownloadList(Board);
5146 procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject);
5148 ThreadItem: TThreadItem;
5149 TmpTreeNode: TTreeNode;
5151 TmpTreeNode := FClickNode;
5152 TreeView.Selected := FClickNode;
5153 if TObject(TmpTreeNode.Data) is TThreadItem then begin
5154 ThreadItem := TThreadItem(TmpTreeNode.Data);
5155 DownloadContent(ThreadItem);
5159 procedure TGikoForm.TreeSelectURLCopyExecute(Sender: TObject);
5161 TmpTreeNode: TTreeNode;
5164 TmpTreeNode := FClickNode;
5165 TreeView.Selected := FClickNode;
5166 if TObject(TmpTreeNode.Data) is TBoard then begin
5167 s := TBoard(TmpTreeNode.Data).URL + #13#10;
5168 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5169 s := TThreadItem(TmpTreeNode.Data).URL + #13#10;
5171 Clipboard.AsText := s;
5174 procedure TGikoForm.TreeSelectNameURLCopyExecute(Sender: TObject);
5176 TmpTreeNode: TTreeNode;
5179 TmpTreeNode := FClickNode;
5180 TreeView.Selected := FClickNode;
5181 if TObject(TmpTreeNode.Data) is TBoard then begin
5182 s := TBoard(TmpTreeNode.Data).Title + #13#10 + TBoard(TmpTreeNode.Data).URL + #13#10;
5183 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
5184 s := TThreadItem(TmpTreeNode.Data).Title + #13#10 + TThreadItem(TmpTreeNode.Data).URL + #13#10;
5186 Clipboard.AsText := s;
5190 procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
5192 FClickNode := TreeView.Selected;
5193 if FClickNode = nil then begin
5194 TreeSelectThreadPupupMenu.Visible := False;
5195 TreeSelectBoardPupupMenu.Visible := False;
5196 TPMSep01.Visible := False;
5197 TreeSelectURLPupupMenu.Visible := False;
5198 TreeSelectNameURLPupupMenu.Visible := False;
5199 TreeSelectFavoriteAddPupupMenu.Visible := False;
5200 end else if TObject(FClickNode.Data) is TBoard then begin
5201 TreeSelectThreadPupupMenu.Visible := False;
5202 TreeSelectBoardPupupMenu.Visible := True;
5203 TPMSep01.Visible := True;
5204 TreeSelectURLPupupMenu.Visible := True;
5205 TreeSelectNameURLPupupMenu.Visible := True;
5206 TreeSelectFavoriteAddPupupMenu.Visible := True;
5207 end else if (TObject(FClickNode.Data) is TThreadItem) then begin
5208 TreeSelectThreadPupupMenu.Visible := True;
5209 TreeSelectBoardPupupMenu.Visible := False;
5210 TPMSep01.Visible := True;
5211 TreeSelectURLPupupMenu.Visible := True;
5212 TreeSelectNameURLPupupMenu.Visible := True;
5213 TreeSelectFavoriteAddPupupMenu.Visible := True;
5215 TreeSelectThreadPupupMenu.Visible := False;
5216 TreeSelectBoardPupupMenu.Visible := False;
5217 TPMSep01.Visible := False;
5218 TreeSelectURLPupupMenu.Visible := False;
5219 TreeSelectNameURLPupupMenu.Visible := False;
5220 TreeSelectFavoriteAddPupupMenu.Visible := False;
5224 procedure TGikoForm.BrowserNewWindow2(Sender: TObject;
5225 var ppDisp: IDispatch; var Cancel: WordBool);
5234 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
5235 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
5236 Html := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
5238 URL := GikoSys.GetHRefText(Html);
5239 URL := GikoSys.HTMLDecode(URL);
5241 //
\83A
\83h
\83\8c\83X
\83o
\81[
\82Ì
\97\9a\97ð
5242 if GikoSys.Setting.LinkAddAddressBar then begin
5243 idx := AddressComboBox.Items.IndexOf(URL);
5244 if idx = -1 then begin
5245 AddressComboBox.Items.Insert(0, URL);
5246 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
5247 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
5249 AddressComboBox.Items.Delete(idx);
5250 AddressComboBox.Items.Insert(0, URL);
5257 { ShiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
5258 CtrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
5261 Memo1.Lines.Add('ShiftDown');
5263 Memo1.Lines.Add('CtrlDown');
5265 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
5266 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
5267 Url := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
5271 URL := GetHRefText(URL);
5273 ParseURI(URL, Protocol, Host, path, Document, Port, Bookmark);
5275 b := Parse2chURL(path, document, bbs, num);
5276 memo1.Lines.Add('bbs: ' + bbs);
5277 memo1.Lines.Add('key: ' + num);
5279 Memo1.Lines.Add('Parse2chURL: True')
5281 Memo1.Lines.Add('Parse2chURL: False');
5283 // AppPath := 'C:\Borland\Projects\Test\TestBrowser\TestBrowser.exe';
5288 procedure TGikoForm.ListSplitterCanResize(Sender: TObject;
5289 var NewSize: Integer; var Accept: Boolean);
5291 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5292 if ViewPanel.Width < 2 then begin
5293 ViewPanel.Width := 1;
5294 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5295 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5296 GikoSys.Setting.ListWidthState := glsMax;
5297 end else if ViewPanel.Width > (ThreadMainPanel.Width - 80) then begin
5298 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5299 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5300 GikoSys.Setting.ListWidthState := glsMin;
5302 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5303 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5304 GikoSys.Setting.ListWidthState := glsNormal;
5307 if ViewPanel.Height < 2 then begin
5308 ViewPanel.Height := 1;
5309 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5310 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5311 GikoSys.Setting.ListHeightState := glsMax;
5312 end else if ViewPanel.Height > (ThreadMainPanel.Height - BrowserCoolBar.Height - 7) then begin
5313 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5314 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5315 GikoSys.Setting.ListHeightState := glsMin;
5317 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5318 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5319 GikoSys.Setting.ListHeightState := glsNormal;
5324 procedure TGikoForm.ListSplitterMoved(Sender: TObject);
5326 if Mouse.Capture <> 0 then
5328 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5329 if (ViewPanel.Width > 1) and (ViewPanel.Width <= (ThreadMainPanel.Width - 80)) then
5330 FBrowserSizeWidth := ViewPanel.Width;
5332 if (ViewPanel.Height > 1) and (ViewPanel.Height <= (ThreadMainPanel.Height - BrowserCoolBar.Height)) then
5333 FBrowserSizeHeight := ViewPanel.Height;
5335 { if (Mouse.Capture = 0) and (ViewPanel.Height > 1) and (not ArrangeAction.Checked) then
5336 FBrowserSizeHeight := ViewPanel.Height
5337 else if (Mouse.Capture = 0) and (ViewPanel.Width > 1) and (ArrangeAction.Checked) then
5338 FBrowserSizeWidth := ViewPanel.Width;}
5341 procedure TGikoForm.BrowserTabChange(Sender: TObject);
5344 ThreadItem: TThreadItem;
5347 // if NewTab = -1 then
5348 if not BrowserTab.Dragging then begin
5349 FTabHintIndex := -1;
5350 BrowserTab.Hint := '';
5351 idx := BrowserTab.TabIndex;
5353 SetContent(BrowserNullTab)
5354 else if BrowserTab.Tabs.Objects[idx] is TThreadItem then begin
5355 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5356 SetContent(ThreadItem);
5357 if GikoSys.Setting.URLDisplay then
5358 AddressComboBox.Text := ThreadItem.URL;
5362 procedure TGikoForm.BrowserTabClick(Sender: TObject);
5365 ThreadItem: TThreadItem;
5367 // if NewTab = -1 then
5368 FTabHintIndex := -1;
5369 BrowserTab.Hint := '';
5370 idx := BrowserTab.TabIndex;
5372 SetContent(BrowserNullTab)
5373 else if BrowserTab.Tabs.Objects[idx] is TThreadItem then begin
5374 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5375 SetContent(ThreadItem);
5376 if GikoSys.Setting.URLDisplay then
5377 AddressComboBox.Text := ThreadItem.URL;
5381 procedure TGikoForm.BrowserTabMouseDown(Sender: TObject;
5382 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
5389 if Button = mbMiddle then begin
5390 //
\83}
\83E
\83X
\92\86\83{
\83^
\83\93
5393 p := BrowserTab.ScreenToClient(p);
5394 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
5395 if idx <> -1 then begin
5396 OldIndex := BrowserTab.TabIndex;
5397 BrowserTab.Tabs.Delete(idx);
5398 if idx = OldIndex then begin
5399 if BrowserTab.Tabs.Count > idx then
5400 BrowserTab.TabIndex := idx
5401 else if BrowserTab.Tabs.Count = idx then
5402 BrowserTab.TabIndex := idx - 1
5403 else if BrowserTab.Tabs.Count > 0 then
5404 BrowserTab.TabIndex := 0;
5405 BrowserTab.OnChange(nil);
5408 end else if Button = mbRight then begin
5409 //
\83}
\83E
\83X
\89E
\83{
\83^
\83\93
5412 // GetCursorPos(p2);
5413 p := BrowserTab.ScreenToClient(p);
5414 // idx := BrowserTab.ItemAtPos(p);
5415 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
5416 if idx <> -1 then begin
5417 OldIndex := BrowserTab.TabIndex;
5418 BrowserTab.TabIndex := idx;
5419 if OldIndex <> idx then
5420 BrowserTab.OnChange(nil);
5421 BrowserTabPopupMenu.Tag := idx;
5422 BrowserTabPopupMenu.Popup(p2.X, p2.Y);
5424 end else if BUtton = mbLeft then begin
5425 FDragWFirst := true;
5430 procedure TGikoForm.SetBrowserTabState;
5433 CoolBand: TCoolBand;
5435 BrowserBottomPanel.AutoSize := False;
5436 if GikoSys.Setting.BrowserTabVisible then begin
5437 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
5438 BrowserTab.Style := tsTabs;
5439 if GikoSys.Setting.BrowserTabPosition = gtpTop then
5440 BrowserTab.TabPosition := tpTop
5442 BrowserTab.TabPosition := tpBottom;
5443 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
5444 BrowserTab.TabPosition := tpTop;
5445 BrowserTab.Style := tsButtons;
5447 BrowserTab.TabPosition := tpTop;
5448 BrowserTab.Style := tsFlatButtons
5451 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
5452 BrowserTab.Parent := BrowserTabToolBar;
5453 BrowserBottomPanel.Hide;
5454 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
5455 if CoolBand <> nil then
5456 CoolBand.Visible := True;
5457 // BrowserTab.Parent := BrowserTopPanel;
5458 // BrowserTab.Parent := BrowserCoolBar;
5459 // BrowserTab.Top := 26;
5460 // BrowserTopPanel.Height := 44;
5463 BrowserTab.Parent := BrowserBottomPanel;
5464 BrowserTab.Top := 0;
5465 BrowserTab.Left := 0;
5466 BrowserBottomPanel.Show;
5467 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
5468 if CoolBand <> nil then
5469 CoolBand.Visible := False;
5470 // BrowserTopPanel.Height := 26;
5474 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
5475 if CoolBand <> nil then
5476 CoolBand.Visible := False;
5477 BrowserBottomPanel.Visible := False;
5478 // BrowserTab.Visible := False;
5479 // BrowserTopPanel.Height := 26;
5483 procedure TGikoForm.BrowserTabDragOver(Sender, Source: TObject; X,
5484 Y: Integer; State: TDragState; var Accept: Boolean);
5488 idx := BrowserTab.IndexOfTabAt(X, Y);
5489 Accept := (Source = BrowserTab) and (BrowserTab.TabIndex <> idx);
5492 procedure TGikoForm.BrowserTabDragDrop(Sender, Source: TObject; X,
5497 idx := BrowserTab.IndexOfTabAt(X, Y);
5499 BrowserTab.Tabs.Move(BrowserTab.TabIndex, idx);
5502 procedure TGikoForm.BrowserTabMouseMove(Sender: TObject;
5503 Shift: TShiftState; X, Y: Integer);
5506 ThreadItem: TThreadItem;
5509 TabIdx := BrowserTab.IndexOfTabAt(x, y);
5511 if ( ssLeft in Shift ) and ( BrowserTab.Style = tsTabs ) then begin
5512 if FDragWFirst = false then begin
5513 FDragWFirst := true;
5515 BrowserTab.EndDrag(false);
5516 BrowserTab.BeginDrag(false, DandD_THRESHOLD);
5517 FDragWFirst := false;
5520 BrowserTab.EndDrag(false);
5521 FDragWFirst := false;
5524 if (FTabHintIndex <> TabIdx) and (TabIdx <> -1) then begin
5525 Application.CancelHint;
5526 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[TabIdx]);
5527 if ThreadItem.Title <> BrowserTab.Tabs[TabIdx] then begin
5528 BrowserTab.Hint := ThreadItem.Title;
5529 Application.ShowHint := True;
5531 BrowserTab.Hint := '';
5532 Application.ShowHint := True;
5534 FTabHintIndex := TabIdx;
5539 procedure TGikoForm.BrowserDocumentComplete(Sender: TObject;
5540 const pDisp: IDispatch; var URL: OleVariant);
5542 FDispHtmlDocument: DispHTMLDocument;
5544 // AddMessageList('DocumentComplete', nil);
5545 FBrowserComplete := True;
5546 if FEvent <> nil then
5548 FDispHtmlDocument := Browser.Document as DispHTMLDocument;
5549 FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
5550 FEvent.OnContextMenu := OnDocumentContextMenu;
5554 procedure TGikoForm.SelectReservActionUpdate(Sender: TObject);
5559 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then begin
5560 List := TList.Create;
5562 SelectListItem(List);
5563 for i := 0 to List.Count - 1 do begin
5564 if TObject(List[i]) is TThreadItem then begin
5565 if TThreadItem(List[i]).IsLogFile then begin
5566 SelectReservAction.Enabled := True;
5571 SelectReservAction.Enabled := False;
5575 end else if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
5576 SelectReservAction.Enabled := True
5578 SelectReservAction.Enabled := False;
5581 procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
5583 AddRoundNameMenu(RoundNamePopupMenu.Items);
5586 procedure TGikoForm.AddRoundNameMenu(MenuItem: TMenuItem);
5592 Item := TMenuItem.Create(Self);
5593 Item.Caption := '
\90V
\82µ
\82¢
\96¼
\91O
\82Å
\8f\84\89ñ
\97\
\96ñ(&N)...';
5594 Item.OnClick := SelectNewRoundNameExecute;
5596 Item := TMenuItem.Create(Self);
5597 Item.Caption := '
\8f\84\89ñ
\83\8a\83X
\83g
\82©
\82ç
\8dí
\8f\9c(&D)';
5598 Item.OnClick := SelectDeleteRoundExecute;
5600 Item := TMenuItem.Create(Self);
5601 Item.Caption := '-';
5603 for i := 0 to RoundList.RoundNameList.Count - 1 do begin
5604 Item := TMenuItem.Create(Self);
5605 Item.Caption := RoundList.RoundNameList[i];
5606 Item.OnClick := SetSelectRoundName;
5611 procedure TGikoForm.SelectNewRoundNameExecute(Sender: TObject);
5614 Dlg: TRoundNameDialog;
5616 Dlg := TRoundNameDialog.Create(Self);
5619 if Dlg.ModalResult <> mrCancel then begin
5620 s := Trim(Dlg.RoundNameEdit.Text);
5621 RoundList.RoundNameList.Add(s);
5622 SetSelectItemRound(True, s);
5630 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
5635 List := TList.Create;
5637 SelectListItem(List);
5638 for i := 0 to List.Count - 1 do begin
5639 if TObject(List[i]) is TBoard then begin
5640 TBoard(List[i]).RoundName := RoundName;
5641 TBoard(List[i]).Round := RoundFlag;
5642 end else if TObject(List[i]) is TThreadItem then begin
5643 if TThreadItem(List[i]).IsLogFile then begin
5644 TThreadItem(List[i]).RoundName := RoundName;
5645 TThreadItem(List[i]).Round := RoundFlag;
5654 procedure TGikoForm.SelectDeleteRoundExecute(Sender: TObject);
5656 SetSelectItemRound(False, '');
5660 procedure TGikoForm.SelectReservActionExecute(Sender: TObject);
5662 //
\82±
\82Ì
\83R
\83\81\83\93\83g
\8dí
\8f\9c\82µ
\82Ä
\82Í
\91Ê
\96Ú
5665 procedure TGikoForm.SetSelectRoundName(Sender: TObject);
5667 MenuItem: TMenuItem;
5669 if Sender is TMenuItem then begin
5670 MenuItem := TMenuItem(Sender);
5671 SetSelectItemRound(True, StripHotKey(MenuItem.Caption));
5676 procedure TGikoForm.NewBoardActionExecute(Sender: TObject);
5678 Dlg: TNewBoardDialog;
5682 for i := 0 to Screen.CustomFormCount - 1 do begin
5683 if TObject(Screen.CustomForms[i]) is TEditorForm then begin
5684 Msg := '
\83\8c\83X
\83G
\83f
\83B
\83^
\82ð
\91S
\82Ä
\95Â
\82¶
\82Ä
\82
\82¾
\82³
\82¢';
5685 MsgBox(Handle, Msg, '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
5689 Dlg := TNewBoardDialog.Create(Self);
5697 procedure TGikoForm.LoginActionExecute(Sender: TObject);
5701 if GikoSys.Dolib.Connected then begin
5702 //
\83\8d\83O
\83A
\83E
\83g
5703 GikoSys.Dolib.Disconnect;
5704 LoginAction.Checked := False;
5705 AddMessageList('
\83\8d\83O
\83A
\83E
\83g
\82µ
\82Ü
\82µ
\82½', nil, gmiOK);
5706 LoginAction.Caption := '
\83\8d\83O
\83C
\83\93(&L)';
5708 TmpCursor := Screen.Cursor;
5709 Screen.Cursor := crHourGlass;
5711 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
5712 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
5713 GikoSys.Dolib.Password := GikoSys.Setting.Password;
5714 if GikoSys.Setting.ReadProxy then begin
5715 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
5716 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
5718 GikoSys.Dolib.ProxyAddress := '';
5719 GikoSys.Dolib.ProxyPort := 0;
5721 if GikoSys.Dolib.Connect then begin
5722 LoginAction.Checked := True;
5723 AddMessageList('
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
5724 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
5726 // 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);
5727 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
5729 LoginAction.Checked := False;
5730 LoginToolButton.Down := False;
5733 Screen.Cursor := TmpCursor;
5738 procedure TGikoForm.KeySettingActionExecute(Sender: TObject);
5740 Dlg: TKeySettingForm;
5742 Dlg := TKeySettingForm.Create(Self);
5744 if Dlg.ShowModal = mrOk then
5745 GikoSys.SaveKeySetting(ActionList);
5751 procedure TGikoForm.ArrangeActionExecute(Sender: TObject);
5753 if ArrangeAction.Checked then begin
5755 ViewPanel.Align := alNone;
5756 ListSplitter.Align := alNone;
5757 ThreadPanel.Align := alNone;
5759 ViewPanel.Width := FBrowserSizeWidth;
5760 ViewPanel.Align := alLeft;
5762 ListSplitter.Width := 5;
5763 ListSplitter.Align := alLeft;
5765 ViewPanel.Left := -10;
5767 ThreadPanel.Align := alClient;
5769 GikoSys.Setting.ListOrientation := gloHorizontal;
5770 case GikoSys.Setting.ListWidthState of
5772 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5773 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5774 ViewPanel.Width := 1;
5777 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5778 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5781 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5782 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5783 ViewPanel.Width := ThreadMainPanel.Width - 80;
5788 ViewPanel.Align := alNone;
5789 ListSplitter.Align := alNone;
5790 ThreadPanel.Align := alNone;
5792 ViewPanel.Height := FBrowserSizeHeight;
5793 ViewPanel.Align := alTop;
5795 ListSplitter.Height := 5;
5796 ListSplitter.Align := alTop;
5798 ViewPanel.Top := -10;
5800 ThreadPanel.Align := alClient;
5801 GikoSys.Setting.ListOrientation := gloVertical;
5802 case GikoSys.Setting.ListHeightState of
5804 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5805 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5806 ViewPanel.Height := 1;
5809 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5810 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5813 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5814 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5815 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
5822 procedure TGikoForm.PaneInitActionExecute(Sender: TObject);
5824 CabinetPanel.Width := 150;
5825 MessagePanel.Height := 40;
5827 FBrowserSizeWidth := 200;
5828 FBrowserSizeHeight := 200;
5829 if ArrangeAction.Checked then begin
5830 ViewPanel.Width := FBrowserSizeWidth;
5832 ViewPanel.Height := FBrowserSizeHeight;
5834 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5835 if GikoSys.Setting.ListHeightState = glsMax then begin
5836 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5837 GikoSys.Setting.ListHeightState := glsNormal;
5840 if GikoSys.Setting.ListWidthState = glsMax then begin
5841 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5842 GikoSys.Setting.ListWidthState := glsNormal;
5847 procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
5849 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';
5850 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
5853 ThreadItem: TThreadItem;
5855 idx := BrowserTab.TabIndex;
5856 if idx <> -1 then begin
5857 if GikoSys.Setting.DeleteMsg then
5858 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
5860 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5861 DeleteTab(ThreadItem);
5862 ThreadItem.DeleteLogFile;
5863 if ThreadItem.ParentBoard = FActiveList then
5868 function TGikoForm.GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
5873 if CoolBar = nil then
5875 for i := 0 to CoolBar.Bands.Count - 1 do begin
5876 if CoolBar.Bands[i].Control = Control then begin
5877 Result := CoolBar.Bands[i];
5883 procedure TGikoForm.BrowserTabToolBarResize(Sender: TObject);
5885 if BrowserTab.Parent = BrowserTabToolBar then
5886 BrowserTab.Width := BrowserTabToolBar.Width;
5889 procedure TGikoForm.SelectTextClearActionExecute(Sender: TObject);
5891 GikoSys.Setting.SelectTextList.Clear;
5892 SelectComboBox.Items.Clear;
5893 SelectComboBox.Text := '';
5894 SetListViewType( gvtAll );
5897 procedure TGikoForm.NameTextClearActionExecute(Sender: TObject);
5901 GikoSys.Setting.NameList.Clear;
5902 for i := 0 to Screen.CustomFormCount - 1 do begin
5903 if TObject(Screen.CustomForms[i]) is TEditorForm then
5904 TEditorForm(Screen.CustomForms[i]).NameComboBox.Items.Clear;
5908 procedure TGikoForm.MailTextClearActionExecute(Sender: TObject);
5912 GikoSys.Setting.MailList.Clear;
5913 for i := 0 to Screen.CustomFormCount - 1 do begin
5914 if TObject(Screen.CustomForms[i]) is TEditorForm then
5915 TEditorForm(Screen.CustomForms[i]).MailComboBox.Items.Clear;
5919 procedure TGikoForm.LeftmostTabSelectActionExecute(Sender: TObject);
5921 if BrowserTab.Tabs.Count > 0 then begin
5922 BrowserTab.TabIndex := 0;
5923 BrowserTab.OnChange(nil);
5927 procedure TGikoForm.LeftTabSelectActionExecute(Sender: TObject);
5929 if BrowserTab.Tabs.Count > 0 then begin
5930 if BrowserTab.TabIndex = -1 then begin
5931 BrowserTab.TabIndex := 0;
5932 BrowserTab.OnChange(nil);
5933 end else if BrowserTab.TabIndex > 0 then begin
5934 BrowserTab.TabIndex := BrowserTab.TabIndex - 1;
5935 BrowserTab.OnChange(nil);
5940 procedure TGikoForm.RightTabSelectActionExecute(Sender: TObject);
5942 if BrowserTab.Tabs.Count > 0 then begin
5943 if BrowserTab.TabIndex = -1 then begin
5944 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5945 BrowserTab.OnChange(nil);
5946 end else if BrowserTab.TabIndex < (BrowserTab.Tabs.Count - 1) then begin
5947 BrowserTab.TabIndex := BrowserTab.TabIndex + 1;
5948 BrowserTab.OnChange(nil);
5953 procedure TGikoForm.RightmostTabSelectActionExecute(Sender: TObject);
5955 if BrowserTab.Tabs.Count > 0 then begin
5956 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5957 BrowserTab.OnChange(nil);
5961 procedure TGikoForm.LeftmostTabSelectActionUpdate(Sender: TObject);
5963 LeftmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
5966 procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
5968 LeftTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
5971 procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);
5973 RightTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
5976 procedure TGikoForm.RightmostTabSelectActionUpdate(Sender: TObject);
5978 RightmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
5981 procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
5986 procedure TGikoForm.SetMenuFont;
5988 // GikoSys.MenuFont(MenuToolBar.Font);
5989 // MenuToolBar.Buttons[0].AutoSize := False;
5990 // MenuToolBar.Buttons[0].AutoSize := True;
5991 // MenuToolBar.Font.Color := clMenuText;
5992 GikoSys.MenuFont(MainCoolBar.Font);
5993 MenuToolBar.Buttons[0].AutoSize := False;
5994 MenuToolBar.Buttons[0].AutoSize := True;
5995 MainCoolBar.AutoSize := False;
5996 MainCoolBar.AutoSize := True;
5998 GikoSys.MenuFont(ListCoolBar.Font);
5999 GikoSys.MenuFont(BrowserCoolBar.Font);
6000 // MenuToolBar.Font.Color := clMenuText;
6003 procedure TGikoForm.FavoriteMenuClick(Sender: TObject);
6009 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\92Ç
\89Á
6010 NewMenu := TMenuItem.Create(MainMenu);
6011 NewMenu.Action := FavoriteAddAction;
6012 FavoriteMenu.Add(NewMenu);
6013 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\90®
\97\9d
6014 NewMenu := TMenuItem.Create(FavoriteMenu);
6015 NewMenu.Action := FavoriteArrangeAction;
6016 FavoriteMenu.Add(NewMenu);
6017 //
\83Z
\83p
\83\8c\81[
\83^
6018 NewMenu := TMenuItem.Create(FavoriteMenu);
6019 NewMenu.Caption := '-';
6020 FavoriteMenu.Add(NewMenu);
6022 CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
6025 procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
6030 for i := 0 to Node.Count - 1 do begin
6031 NewMenu := TFavoriteMenuItem.Create(Self);
6032 NewMenu.AutoHotkeys := maAutomatic;
6033 NewMenu.Caption := CustomStringReplace(Node.Item[i].Text, '&', '&&');
6034 TFavoriteMenuItem(NewMenu).Data := Node.Item[i].Data;
6035 MenuItem.Add(NewMenu);
6037 if TObject(Node.Item[i].Data) is TFavoriteFolder then begin
6038 NewMenu.ImageIndex := TOOL_ICON_FAV_FOLDER;
6039 CreateFavMenu(Node.Item[i], NewMenu);
6040 end else if TObject(Node.Item[i].Data) is TFavoriteBoardItem then begin
6041 NewMenu.ImageIndex := TOOL_ICON_FAV_BOARD;
6042 NewMenu.OnClick := FavoriteClick;
6043 end else if TObject(Node.Item[i].Data) is TFavoriteThreadItem then begin
6044 NewMenu.ImageIndex := TOOL_ICON_FAV_THREAD;
6045 NewMenu.OnClick := FavoriteClick;
6050 procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
6052 Dlg: TFavoriteAddDialog;
6054 ThreadItem: TThreadItem;
6056 FavThread: TFavoriteThreadItem;
6057 FavBoard: TFavoriteBoardItem;
6060 b := FavoriteTreeView.Items.Count - 1;
6061 if Item is TBoard then begin
6062 for i := 0 to b do begin
6063 if TObject(FavoriteTreeView.Items.Item[ i ].Data) is TFavoriteBoardItem then begin
6064 FavBoard := TFavoriteBoardItem( FavoriteTreeView.Items.Item[ i ].Data );
6065 Board := FavBoard.Item;
6067 if Board = Item then begin
6068 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
6075 Dlg := TFavoriteAddDialog.Create(Self);
6077 Dlg.SetBoard( TBoard(Item) );
6082 end else if Item is TThreadItem then begin
6083 for i := 0 to b do begin
6084 if TObject(FavoriteTreeView.Items.Item[ i ].Data) is TFavoriteThreadItem then begin
6085 FavThread := TFavoriteThreadItem( FavoriteTreeView.Items.Item[ i ].Data );
6086 ThreadItem := FavThread.Item;
6088 if ThreadItem = Item then begin
6089 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
6096 Dlg := TFavoriteAddDialog.Create(Self);
6098 Dlg.SetThreadItem( TThreadItem(Item) );
6109 procedure TGikoForm.FavoriteAddActionExecute(Sender: TObject);
6111 ShowFavoriteAddDialog(GetActiveContent);
6114 procedure TGikoForm.FavoriteClick(Sender: TObject);
6117 FavoriteClick( Sender, True );
6121 procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
6124 ThreadItem: TThreadItem;
6125 FavBoard: TFavoriteBoardItem;
6126 FavThread: TFavoriteThreadItem;
6130 if Sender is TFavoriteMenuItem then
6131 Item := TFavoriteMenuItem(Sender).Data
6132 else if Sender is TLinkToolButton then
6133 Item := TLinkToolButton(Sender).Data
6134 else if Sender is TTreeNode then
6135 Item := TTreeNode( Sender ).Data
6139 if TObject(Item) is TFavoriteBoardItem then begin
6140 FavBoard := TFavoriteBoardItem(Item);
6141 Board := FavBoard.Item;
6142 if Board <> nil then begin
6143 if (FTreeType = gtt2ch) and (FActiveBBS <> Board.ParentCategory.ParenTBBS) then
6144 ShowBBSTree( Board.ParentCategory.ParenTBBS );
6145 SelectTreeNode(Board, True);
6147 end else if TObject(Item) is TFavoriteThreadItem then begin
6148 FavThread := TFavoriteThreadItem(Item);
6149 ThreadItem := FavThread.Item;
6150 if ThreadItem <> nil then
6151 InsertBrowserTab(ThreadItem, ActiveTab);
6155 procedure TGikoForm.FavoriteAddActionUpdate(Sender: TObject);
6157 FavoriteAddAction.Enabled := (GetActiveContent <> nil);
6160 procedure TGikoForm.BoardFavoriteAddActionExecute(Sender: TObject);
6162 if TObject(ListView.Selected.Data) is TBoard then
6163 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
6166 procedure TGikoForm.BoardFavoriteAddActionUpdate(Sender: TObject);
6168 BoardFavoriteAddAction.Enabled := (GetActiveList is TCategory) and (ListView.SelCount > 0);
6171 procedure TGikoForm.ThreadFavoriteAddActionExecute(Sender: TObject);
6173 if TObject(ListView.Selected.Data) is TThreadItem then
6174 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
6177 procedure TGikoForm.ThreadFavoriteAddActionUpdate(Sender: TObject);
6179 ThreadFavoriteAddAction.Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
6182 procedure TGikoForm.TreeSelectFavoriteAddActionExecute(Sender: TObject);
6184 ShowFavoriteAddDialog(TObject(TreeView.Selected.Data));
6187 procedure TGikoForm.FavoriteArrangeActionExecute(Sender: TObject);
6189 Dlg: TFavoriteArrangeDialog;
6191 Dlg := TFavoriteArrangeDialog.Create(Self);
6200 procedure TGikoForm.BBSMenuItemOnClick(
6205 if Sender is TBBSMenuItem then
6206 ShowBBSTree( TBBSMenuItem( Sender ).Data );
6210 procedure TGikoForm.MainCoolBarResize(Sender: TObject);
6212 TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
6215 procedure TGikoForm.MoveToActionExecute(Sender: TObject);
6220 URL := Trim(AddressComboBox.Text);
6223 idx := AddressComboBox.Items.IndexOf(URL);
6224 if idx = -1 then begin
6225 AddressComboBox.Items.Insert(0, URL);
6226 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
6227 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
6229 AddressComboBox.Items.Delete(idx);
6230 AddressComboBox.Items.Insert(0, URL);
6234 procedure TGikoForm.MoveToURL(URL: string);
6236 protocol, host, path, document, port, bookmark : string;
6237 BBSID, BBSKey: string;
6239 ThreadItem: TThreadItem;
6242 tmpThread : TThreadItem;
6243 category : TCategory;
6244 categoryNode : TTreeNode;
6245 boardNode : TTreeNode;
6246 shiftDown : Boolean;
6250 //=====
\83v
\83\89\83O
\83C
\83\93
6252 bi := High( BoardPlugIns );
6253 for i := Low( BoardPlugIns ) to bi do begin
6254 if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
6255 case BoardPlugIns[ i ].AcceptURL( URL ) of
6258 tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL );
6259 boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
6260 Board := BBSsFindBoardFromURL( boardURL );
6261 if Board = nil then begin
6262 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
6263 GikoSys.OpenBrowser(URL, gbtUserApp);
6266 Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL );
6267 if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
6268 ShowBBSTree( BBSs[ 1 ] );
6271 if not Board.IsThreadDatRead then
6272 GikoSys.ReadSubjectFile( Board );
6275 ThreadItem := Board.Find( tmpThread.FileName );
6276 if ThreadItem = nil then begin
6277 ThreadItem := tmpThread;
6278 Board.Insert( 0, ThreadItem );
6279 if ActiveList is TBoard then begin
6280 if TBoard(ActiveList) = Board then
6281 ListView.Items.Count := ListView.Items.Count + 1;
6283 InsertBrowserTab( ThreadItem );
6284 DownloadContent( ThreadItem );
6287 InsertBrowserTab( ThreadItem );
6288 if not ThreadItem.IsLogFile then
6289 DownloadContent( ThreadItem );
6297 Board := BBSsFindBoardFromURL( URL );
6298 if Board <> nil then begin
6299 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
6300 ShowBBSTree( Board.ParentCategory.ParenTBBS );
6301 SelectTreeNode( Board, True );
6309 // 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¢
6312 GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark );
6313 GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey );
6315 if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
6316 boardURL := GikoSys.Get2chThreadURL2BoardURL( URL );
6317 Board := BBSsFindBoardFromURL( boardURL );
6319 Board := BBSsFindBoardFromBBSID( BBSID );
6320 if Board = nil then begin
6321 //
\81¦
\8dì
\82Á
\82Ä
\82à
\92Ç
\89Á
\82·
\82é
\82Æ
\82±
\82ë
\82ª
\96³
\82¢
\82Ì
\82Å
\8c\83\82µ
\82
\95Û
\97¯
6322 GikoSys.OpenBrowser(URL, gbtUserApp);
6324 //Board := GikoSys.GetUnknownBoard( nil, boardURL );
6325 //if (FTreeType = gtt2ch) and (FActiveBBS = BBSs[ 1 ]) then
6326 // ShowBBSTree( BBSs[ 1 ] );
6328 if not Board.IsThreadDatRead then
6329 GikoSys.ReadSubjectFile(Board);
6330 URL := GikoSys.Get2chBrowsableThreadURL( URL );
6331 ThreadItem := Board.FindThreadFromURL( URL );
6332 if ThreadItem = nil then begin
6333 //shift ->
\90Ý
\92è
\83u
\83\89\83E
\83U
\81i
\96³
\82¯
\82ê
\82ÎIE
\81j
6335 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
6336 ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
6338 GikoSys.OpenBrowser(URL, gbtUserApp)
6339 else if ctrlDown then
6340 GikoSys.OpenBrowser(URL, gbtIE)
6342 ThreadItem := TThreadItem.Create( nil, URL );
6343 ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
6344 if AnsiPos(Host, Board.URL) = 0 then
6345 ThreadItem.DownloadHost := Host
6347 ThreadItem.DownloadHost := '';
6348 Board.Insert(0, ThreadItem);
6349 if ActiveList is TBoard then begin
6350 if TBoard(ActiveList) = Board then
6351 ListView.Items.Count := ListView.Items.Count + 1;
6353 InsertBrowserTab(ThreadItem);
6354 DownloadContent(ThreadItem);
6357 if ThreadItem.IsLogFile then
6358 InsertBrowserTab(ThreadItem)
6360 if AnsiPos(Host, Board.URL) = 0 then
6361 ThreadItem.DownloadHost := Host
6363 ThreadItem.DownloadHost := '';
6364 InsertBrowserTab(ThreadItem);
6365 DownloadContent(ThreadItem);
6369 GikoSys.OpenBrowser(URL, gbtAuto);
6373 procedure TGikoForm.AddressToolBarResize(Sender: TObject);
6375 AddressComboBox.Width := AddressToolBar.Width - MoveToToolButton.Width - 10;
6378 procedure TGikoForm.AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
6379 Shift: TShiftState);
6381 if Key = VK_RETURN then
6382 MoveToAction.Execute;
6385 procedure TGikoForm.BrowserEnter(Sender: TObject);
6387 Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
6390 procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
6392 CDS:PCopyDataStruct;
6396 CDS := Message.CopyDataStruct;
6397 GetMem(PC, CDS^.cbData);
6399 lstrcpy(PC,CDS^.lpData);
6400 SetString(sURL, PC,lstrlen(PC));
6405 Message.Result := 1;
6408 procedure TGikoForm.WndProc(var Message: TMessage);
6410 if (Message.Msg = CM_DIALOGCHAR) then
6411 if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
6416 procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
6418 hComboEdit: THandle;
6419 // KeyData: Integer;
6422 if AddressComboBox.Focused or SelectComboBox.Focused then begin
6423 if Msg.CharCode in [VK_BACK] then begin
6424 hComboEdit := GetFocus;
6425 if hComboEdit <> 0 then
6426 SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, Msg.KeyData);
6427 // SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, $000E0001);
6430 if Msg.CharCode in [VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PRIOR, VK_NEXT] then begin
6431 hComboEdit := GetFocus;
6432 if hComboEdit <> 0 then
6433 SendMessage(hComboEdit, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
6437 //
\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ð
6438 KeyData := Msg.KeyData;
6439 if (KeyData and $20000000) = 0 then begin
6440 if Msg.CharCode in [Ord('F'), Ord('V'), Ord('B'), Ord('R'),
6441 Ord('A'), Ord('T'), Ord('H')] then begin
6442 if not ActionList.IsShortCut(Msg) then begin
6450 procedure TGikoForm.BrowserTabVisibleActionExecute(Sender: TObject);
6452 GikoSys.Setting.BrowserTabVisible := BrowserTabVisibleAction.Checked;
6456 procedure TGikoForm.BrowserTabTopActionExecute(Sender: TObject);
6458 BrowserTabBottomAction.Checked := False;
6459 BrowserTabTopAction.Checked := True;
6460 GikoSys.Setting.BrowserTabPosition := gtpTop;
6464 procedure TGikoForm.BrowserTabBottomActionExecute(Sender: TObject);
6466 BrowserTabTopAction.Checked := False;
6467 BrowserTabBottomAction.Checked := True;
6468 GikoSys.Setting.BrowserTabPosition := gtpBottom;
6472 procedure TGikoForm.BrowserTabTabStyleActionExecute(Sender: TObject);
6474 BrowserTabButtonStyleAction.Checked := False;
6475 BrowserTabFlatStyleAction.Checked := False;
6476 BrowserTabTabStyleAction.Checked := True;
6477 GikoSys.Setting.BrowserTabStyle := gtsTab;
6481 procedure TGikoForm.BrowserTabButtonStyleActionExecute(Sender: TObject);
6483 BrowserTabTabStyleAction.Checked := False;
6484 BrowserTabFlatStyleAction.Checked := False;
6485 BrowserTabButtonStyleAction.Checked := True;
6486 GikoSys.Setting.BrowserTabStyle := gtsButton;
6490 procedure TGikoForm.BrowserTabFlatStyleActionExecute(Sender: TObject);
6492 BrowserTabFlatStyleAction.Checked := True;
6493 BrowserTabTabStyleAction.Checked := False;
6494 BrowserTabButtonStyleAction.Checked := False;
6495 GikoSys.Setting.BrowserTabStyle := gtsFlat;
6499 procedure TGikoForm.PreviewTimerTimer(Sender: TObject);
6505 HtmlFileName: string;
6509 TargetFrameName: OleVariant;
6510 PostData: OleVariant;
6511 Headers: OleVariant;
6512 WindowHeight: Integer;
6513 WindowWidth: Integer;
6517 Protocol, Host, Path, Document, Port, Bookmark: string;
6519 PreviewTimer.Enabled := False;
6523 case GikoSys.Setting.PreviewSize of
6530 WindowHeight := 192;
6534 WindowHeight := 384;
6538 WindowHeight := 480;
6540 else begin //gpsMedium
6542 WindowHeight := 288;
6546 ARect := Rect(0, 0, WindowWidth, WindowHeight);
6548 case GikoSys.Setting.PopupPosition of
6549 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6550 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6551 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
6552 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
6553 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
6554 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
6555 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6556 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6557 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Ó
6560 html := '<html><head>'#13#10
6562 + 'function init() {'#13#10
6563 + ' if ((document.body.clientHeight >= Image1.height) && (document.body.clientWidth >= Image1.width)) {'#13#10
6565 + ' var dh, ih;'#13#10
6566 + ' dh = document.body.clientWidth / document.body.clientHeight;'#13#10
6567 + ' ih = Image1.width / Image1.height;'#13#10
6568 + ' if (document.body.clientWidth < document.body.clientHeight) {'#13#10
6569 + ' if (ih > dh)'#13#10
6570 + ' Image1.width = document.body.clientWidth;'#13#10
6572 + ' Image1.height = document.body.clientHeight;'#13#10
6574 + ' if (ih < dh)'#13#10
6575 + ' Image1.height = document.body.clientHeight;'#13#10
6577 + ' Image1.width = document.body.clientWidth;'#13#10
6580 + ' Message.style.display = "none";'#13#10
6584 + '<body topmargin="0" leftmargin="0" style="border-width: 1px; overflow:hidden; border-style: solid;" onLoad="init()">'#13#10
6585 + '<div align="center" id="Message">
\83v
\83\8c\83r
\83\85\81[
\8dì
\90¬
\92\86</div>'#13#10
6586 + '<div align="center"><img name="Image1" border="0" src="%ImageURL%"></div>'#13#10
6588 sl := TStringList.Create;
6591 HtmlFileName := GikoSys.GetAppDir + HTML_FILE_NAME;
6592 sl.Text := AnsiReplaceStr(html, '%ImageURL%', FPreviewURL);
6593 sl.SaveToFile(HtmlFileName);
6600 NavURL := HtmlFileName;
6602 TargetFrameName := '';
6605 GikoSys.ParseURI(FPreviewURL, Protocol, Host, Path, Document, Port, Bookmark);
6606 Referer := Protocol + '://' + Host;
6608 Referer := Referer + ':' + Port;
6609 Referer := Referer + Path;
6610 Headers := 'Referer: ' + Referer;
6612 FPreviewBrowser.Navigate(NavURL, Flags, TargetFrameName, PostData, Headers);
6614 if ARect.Top + WindowHeight > Screen.DesktopHeight then
6615 ARect.Top := Screen.DesktopHeight - WindowHeight;
6616 if ARect.Left + WindowWidth > Screen.DesktopWidth then
6617 ARect.Left := Screen.DesktopWidth - WindowWidth;
6618 if ARect.Left < Screen.DesktopLeft then ARect.Left := Screen.DesktopLeft;
6619 if ARect.Bottom < Screen.DesktopTop then ARect.Bottom := Screen.DesktopTop;
6621 SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
6622 ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
6624 // Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
6625 // SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
6629 procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
6631 if PreviewTimer.Enabled then
6632 PreviewTimer.Enabled := False;
6633 if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
6634 FHint.ReleaseHandle;
6637 if (FPreviewBrowser <> nil) and (IsWindowVisible(FPreviewBrowser.Handle)) then
6638 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
6639 Message.Result := 1;
6643 procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
6645 MsgBarCloseAction.Execute;
6648 function TGikoForm.OnDocumentContextMenu(Sender: TObject): WordBool;
6650 Doc: IHtmlDocument2;
6651 Range: IHTMLTxtRange;
6654 ThreadItem: TThreadItem;
6656 Doc := Browser.Document as IHtmlDocument2;
6657 Range := Doc.selection.createRange as IHTMLTxtRange;
6658 s := CustomStringReplace(Range.text, '
\81@', ' ');//
\91S
\8ap
\8bó
\94\92\82ð
\94¼
\8ap
\8bó
\94\92\82É
6659 s := GikoSys.ZenToHan(Trim(s));
6660 if GikoSys.IsNumeric(s) then begin
6662 ThreadItem := GetActiveContent;
6663 if ThreadItem <> nil then begin
6665 FHint.PopupType := gptThread;
6666 SetResPopupText(ThreadItem, Num, Num, False, False);
6667 if FHint.ResCount <> 0 then
6677 procedure TGikoForm.SetResPopupText(threadItem: TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
6691 if StNum > ToNum then begin
6697 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
6698 if StNum + 10 < ToNum then
6699 ToNum := StNum + 10;
6701 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
6703 if ThreadItem <> nil then
6704 FHint.Title := ThreadItem.Title;
6706 for i := StNum to ToNum do begin
6708 FileName := ThreadItem.FilePath;
6709 tmp := GikoSys.ReadThreadFile(FileName, Line);
6711 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
6712 Res := GikoSys.DivideStrLine(tmp);
6714 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
6715 Body := CustomStringReplace(Res.FBody, '<br> ', #10,true);
6716 Body := CustomStringReplace(Body, '<br>', #10,true);
6717 Body := CustomStringReplace(Body, '</a>', '',true);
6718 Body := GikoSys.DeleteLink(Body);
6719 Body := CustomStringReplace(Body, '<', '<');
6720 Body := CustomStringReplace(Body, '>', '>');
6721 Body := CustomStringReplace(Body, '"', '"');
6722 Body := CustomStringReplace(Body, '&', '&');
6723 FHint.Add(Header, Body);
6724 // s := StringReplace(s, '&', '&', [rfReplaceAll]);
6725 // s := StringReplace(s, '
\81\97\81M', ',', [rfReplaceAll]);
6732 {function TGikoForm.GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
6744 ActiveFileName: string;
6746 ThreadItem: TThreadItem;
6751 HintData := THintData.Create;
6752 SList := TStringList.Create;
6755 if StNum > ToNum then begin
6761 if (sBoard <> '') and (sThread <> '') then begin
6763 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
6764 if StNum + 10 < ToNum then
6765 ToNum := StNum + 10;
6767 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
6769 Board := BBS2ch.FindBBSID(sBoard);
6770 if Board <> nil then begin
6771 if not Board.IsThreadDatRead then
6772 GikoSys.ReadSubjectFile(Board);
6773 ThreadItem := Board.Find(sThread + '.dat');
6774 //ThreadItem := BBS2ch.FindThreadItem(sBoard, sThread + '.dat');
6775 if ThreadItem <> nil then
6776 HintData.Title := ThreadItem.Title;
6777 //s := s + ThreadItem.Title;
6781 for i := StNum to ToNum do begin
6783 FileName := IncludeTrailingPathDelimiter(BBS2ch.GetLogFolder + sBoard) + sThread + '.dat';
6784 tmp := GikoSys.ReadThreadFile(FileName, Line);
6785 if tmp <> '' then begin
6786 Res := GikoSys.DivideStrLine(tmp);
6790 //s := s + IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime + #10 + #10;
6791 //s := s + ' ' + StringReplace(Res.FBody, '<br>', #10, [rfIgnoreCase, rfReplaceAll]);
6792 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
6794 s := StringReplace(Res.FBody, '<br> ', #10, [rfIgnoreCase, rfReplaceAll]);
6795 s := StringReplace(s, '<br>', #10, [rfIgnoreCase, rfReplaceAll]);
6796 s := StringReplace(s, '</a>', '', [rfIgnoreCase, rfReplaceAll]);
6797 s := GikoSys.DeleteLink(s);
6798 s := StringReplace(s, '<', '<', [rfReplaceAll]);
6799 s := StringReplace(s, '>', '>', [rfReplaceAll]);
6800 s := StringReplace(s, '"', '"', [rfReplaceAll]);
6801 s := StringReplace(s, '&', '&', [rfReplaceAll]);
6803 HintData.Add(Header, Body);
6804 // s := StringReplace(s, '&', '&', [rfReplaceAll]);
6805 // s := StringReplace(s, '
\81\97\81M', ',', [rfReplaceAll]);
6816 procedure TGikoForm.ShowTextPopup;
6821 // if Trim(s) = '' then
6824 FHint.Font.Name := GikoSys.Setting.HintFontName;
6825 FHint.Font.Size := GikoSys.Setting.HintFontSize;
6826 FHint.Font.Color := GikoSys.Setting.HintFontColor;
6827 FHint.Color := GikoSys.Setting.HintBackColor;
6828 FHint.HeaderBold := GikoSys.Setting.ResPopupHeaderBold;
6830 if FHint.PopupType = gptRaw then
6831 ARect := FHint.CalcHintRect(Screen.Width, FHint.Caption, nil)
6833 ARect := FHint.CalcHintRect(Screen.Width, '', nil);
6834 case GikoSys.Setting.PopupPosition of
6835 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6836 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6837 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
6838 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
6839 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
6840 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
6841 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6842 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6843 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Ó
6845 //FHint.ActivateHint(ARect, s);
6846 if FHint.PopupType = gptRaw then
6847 FHint.ActivateHint(ARect, FHint.Caption)
6849 FHint.ActivateHint(ARect, '');
6851 FHint.ReleaseHandle;
6856 procedure TGikoForm.GikoHelpActionExecute(Sender: TObject);
6860 FileName := GikoSys.GetAppDir + 'batahlp.chm';
6861 if not FileExists(FileName) then begin
6864 '
\83w
\83\8b\83v
\82ª
\8c©
\82Â
\82©
\82è
\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½' + #13#10 +
6865 '
\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 +
6866 '
\83w
\83\8b\83v
\82Í
\83M
\83R
\83i
\83r
\82Ì
\83T
\83C
\83g
\82É
\92u
\82¢
\82Ä
\82 \82è
\82Ü
\82·',
6871 ShellExecute(Handle, 'open', PChar(FileName), '', PChar(GikoSys.GetAppDir), SW_SHOW);
6874 procedure TGikoForm.ToolButton18Click(Sender: TObject);
6876 if FTreeType = gttHistory then begin
6878 TreeView.Items.Clear;
6882 procedure TGikoForm.KotehanActionExecute(Sender: TObject);
6884 Dlg: TKotehanDialog;
6886 Dlg := TKotehanDialog.Create(Self);
6894 procedure TGikoForm.SetLinkBar;
6898 ToolButton: TLinkToolButton;
6899 MenuItem: TMenuItem;
6901 MainCoolBar.Bands.BeginUpdate;
6903 LinkBarPopupMenu.Items.Clear;
6904 for i := LinkToolBar.ButtonCount - 1 downto 0 do
6905 LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
6906 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
6907 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
6908 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
6909 ToolButton := TLinkToolButton.Create(LinkToolBar);
6910 if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteFolder then begin
6911 MenuItem := TMenuItem.Create(Self);
6912 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
6913 LinkBarPopupMenu.Items.Add(MenuItem);
6914 ToolButton.MenuItem := MenuItem;
6915 ToolButton.ImageIndex := TOOL_ICON_FAV_FOLDER;
6916 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
6917 ToolButton.ImageIndex := TOOL_ICON_FAV_BOARD;
6918 ToolButton.OnClick := FavoriteClick;
6919 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
6920 ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
6921 ToolButton.OnClick := FavoriteClick;
6923 ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
6924 ToolButton.Left := 10000;
6925 ToolButton.Data := FavoriteTreeView.Items[i].Item[j].Data;
6926 ToolButton.AutoSize := True;
6927 ToolButton.OnDragDrop := LinkToolButtonDragDrop;
6928 ToolButton.OnDragOver := FavoriteDragOver;
6929 ToolButton.OnMouseDown := LinkToolButtonOnMouseDown;
6930 ToolButton.OnMouseMove := LinkToolButtonOnMouseMove;
6931 ToolButton.OnMouseUp := LinkToolButtonOnMouseUp;
6932 ToolButton.OnStartDrag := LinkToolButtonStartDrag;
6933 //ToolButton.DragMode := dmAutomatic;
6934 ToolButton.DragMode := dmManual;
6935 ToolButton.PopupMenu := FavoriteTreePopupMenu;
6937 LinkToolBar.InsertControl(ToolButton);
6942 { if LinkToolBar.ButtonCount = 0 then begin
6943 ToolButton := TLinkToolButton.Create(LinkToolBar);
6944 ToolButton.Style := tbsButton;
6945 ToolButton.ImageIndex := -1;
6946 ToolButton.Caption := '';
6947 LinkToolBar.InsertControl(ToolButton);
6950 MainCoolBar.Bands.EndUpdate;
6954 procedure TGikoForm.FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
6962 if Sender = FavoriteTreeView then begin
6963 Node := FavoriteTreeView.GetNodeAt(X, Y);
6968 bound := Node.DisplayRect( False );
6969 height := bound.Bottom - bound.Top;
6970 if (bound.Top + height / 2) <= Y then
6971 Node := FavoriteTreeView.GetNodeAt(X, Y + height);
6976 if Node.IsFirstNode then
6981 if FDropSpaceNode <> nil then
6982 if FDropSpaceNode.AbsoluteIndex = Node.AbsoluteIndex then
6985 if Change then begin
6986 if FDropSpaceNode <> nil then
6987 FDropSpaceNode.Free;
6989 FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil );
6990 FDropSpaceNode.MoveTo( Node, naInsert );
6991 FDropSpaceNode.ImageIndex := -1;
6992 FDropSpaceNode.SelectedIndex := -1;
6996 if Source = FavoriteTreeView then begin
6997 if FavoriteTreeView.Selected = FavoriteTreeView.Items.GetFirstNode then begin
7002 end else if Source = BrowserTab then
7004 else if Source = ListView then
7006 else if Source is TLinkToolButton then
7008 else if Source = TreeView then
7014 procedure TGikoForm.FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
7017 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
7020 procedure TGikoForm.LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
7022 // FDragging := true;
7025 procedure TGikoForm.LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
7027 SenderNode: TTreeNode;
7028 LinkToolButton: TLinkToolButton;
7031 LinkToolButton := TLinkToolButton( Sender );
7032 SenderNode := TreeNodeDataFind( FavoriteTreeView.TopItem, LinkToolButton.Data );
7034 FavoriteDragDrop( SenderNode, Source );
7038 procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7042 procedure TGikoForm.LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
7046 TToolButton( Sender ).DragMode := dmManual;
7047 if ssLeft in Shift then begin
7048 TToolButton( Sender ).Down := true;
7049 if FDragTime = 0 then begin
7050 FDragTime := GetTickCount();
7052 Now := GetTickCount();
7053 if (Now - FDragTime) > 500 then begin
7054 if FDragButton <> TToolButton( Sender ) then begin
7056 FDragButton := TToolButton( Sender );
7057 TToolButton(Sender).BeginDrag(false ,5);
7060 {$IF Defined(debug)}
7061 ShowMessage('Error');
7072 procedure TGikoForm.LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7077 function TGikoForm.GetWidthAllToolButton(ToolBar: TToolBar): Integer;
7082 for i := 0 to ToolBar.ButtonCount - 1 do
7083 Result := Result + ToolBar.Buttons[i].Width;
7086 procedure TGikoForm.MainCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7088 Control: TWinControl;
7090 Control := FindControl(BandInfo^.hwndChild);
7091 if (Control = MenuToolBar) or (Control = StdToolBar) or (Control = LinkToolBar) then begin
7092 BandInfo^.fMask := BandInfo.fMask or RBBIM_STYLE or RBBIM_IDEALSIZE;
7093 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7094 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7098 procedure TGikoForm.MainCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
7104 ChevronPopupMenu.Items.Clear;
7106 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
7107 if MainCoolBar.Bands[ i ].Visible then begin
7108 if Idx = Int64(RebarChevron^.uBand) then begin
7115 if (Idx >= 0) and (MainCoolBar.Bands.Count > Idx) then begin
7116 if MainCoolBar.Bands[Idx].Control = MenuToolbar then begin
7118 end else if MainCoolBar.Bands[Idx].Control = StdToolbar then begin
7119 ToolBarChevronMenu(StdToolBar);
7120 end else if MainCoolBar.Bands[Idx].Control = LinkToolbar then begin
7124 p := MainCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
7125 ChevronPopupMenu.Popup(p.x, p.y);
7129 procedure TGikoForm.MenuBarChevronMenu;
7130 procedure SetSubMenu(MenuItem: TMenuItem; PopupItem: TMenuItem);
7136 for i := 0 to MenuItem.Count - 1 do begin
7138 if MenuItem[i] is TFavoriteMenuItem then begin
7139 Item := TFavoriteMenuItem.Create(Self);
7140 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(MenuItem[i]).Data;
7142 Item := TMenuItem.Create(Self);
7143 Item.Caption := MenuItem[i].Caption;
7144 Item.Action := MenuItem[i].Action;
7145 Item.ImageIndex := MenuItem[i].ImageIndex;
7146 Item.OnClick := MenuItem[i].OnClick;
7147 PopupItem.Add(Item);
7148 if MenuItem[i].Count > 0 then
7149 SetSubMenu(MenuItem[i], Item);
7158 ChevronPopupMenu.Items.Clear;
7159 ChevronPopupMenu.Images := MainMenu.Images;
7160 bw := GetWidthAllToolButton(MenuToolBar);
7161 if MenuToolBar.Width < bw then begin
7163 for i := 0 to MenuToolBar.ButtonCount - 1 do begin
7164 w := w + MenuToolBar.Buttons[i].Width;
7165 if MenuToolBar.Width <= w then begin
7166 Item := TMenuItem.Create(Self);
7167 Item.Caption := MenuToolBar.Buttons[i].MenuItem.Caption;
7168 //Item.Action := MenuToolBar.Buttons[i].MenuItem.Action;
7169 ChevronPopupMenu.Items.Add(Item);
7170 SetSubMenu(MenuToolbar.Buttons[i].MenuItem, Item);
7176 procedure TGikoForm.ToolBarChevronMenu(ToolBar: TToolBar);
7177 procedure SetSubMenu(PopupMenu: TPopupMenu; PopupItem: TMenuItem);
7182 if Assigned(PopupMenu.OnPopup) then
7183 PopupMenu.OnPopup(nil);
7184 for i := 0 to PopupMenu.Items.Count - 1 do begin
7186 if PopupMenu.Items[i] is TFavoriteMenuItem then begin
7187 Item := TFavoriteMenuItem.Create(Self);
7188 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(PopupMenu.Items[i]).Data;
7190 Item := TMenuItem.Create(Self);
7191 Item.Caption := PopupMenu.Items[i].Caption;
7192 Item.Action := PopupMenu.Items[i].Action;
7193 Item.ImageIndex := PopupMenu.Items[i].ImageIndex;
7194 Item.OnClick := PopupMenu.Items[i].OnClick;
7195 PopupItem.Add(Item);
7204 ChevronPopupMenu.Items.Clear;
7205 ChevronPopupMenu.Images := ToolBar.HotImages;
7206 bw := GetWidthAllToolButton(ToolBar);
7207 if ToolBar.Width < bw then begin
7209 for i := 0 to ToolBar.ButtonCount - 1 do begin
7210 w := w + ToolBar.Buttons[i].Width;
7211 if ToolBar.Width <= w then begin
7212 Case ToolBar.Buttons[i].Tag of
7215 Item := TMenuItem.Create(Self);
7216 if ToolBar.Buttons[i].Style = tbsSeparator then
7219 Item.Caption := ToolBar.Buttons[i].Caption;
7220 Item.Action := ToolBar.Buttons[i].Action;
7221 //Item.Visible := True;
7223 ChevronPopupMenu.Items.Add(Item);
7224 if ToolBar.Buttons[i].DropdownMenu <> nil then begin
7226 Item.OnClick := nil;
7227 SetSubMenu(ToolBar.Buttons[i].DropdownMenu, Item);
7231 //
\8f«
\97\88\82Ì
\82½
\82ß
\82Ì
\97\
\96ñ
7238 procedure TGikoForm.LinkBarChevronMenu;
7243 Item: TFavoriteMenuItem;
7245 Button: TLinkToolButton;
7247 ChevronPopupMenu.Items.Clear;
7248 ChevronPopupMenu.Images := LinkToolBar.Images;
7249 bw := GetWidthAllToolButton(LinkToolBar);
7250 if LinkToolBar.Width < bw then begin
7252 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
7253 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
7254 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
7255 w := w + LinkToolBar.Buttons[j].Width;
7256 if LinkToolBar.Width <= w then begin
7257 if LinkToolBar.Buttons[j] is TLinkToolButton then begin
7258 Button := TLinkToolButton(LinkToolBar.Buttons[j]);
7259 Item := TFavoriteMenuItem.Create(Self);
7260 if TObject(Button.Data) is TFavoriteFolder then begin
7261 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], Item);
7262 end else if TObject(Button.Data) is TFavoriteBoardItem then begin
7263 Item.OnClick := FavoriteClick;
7264 end else if TObject(Button.Data) is TFavoriteThreadItem then begin
7265 Item.OnClick := FavoriteClick;
7267 Item.Data := Button.Data;
7268 Item.Caption := LinkToolBar.Buttons[j].Caption;
7269 Item.ImageIndex := LinkToolBar.Buttons[j].ImageIndex;
7270 ChevronPopupMenu.Items.Add(Item);
7280 procedure TGikoForm.ListCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7282 Control: TWinControl;
7284 Control := FindControl(BandInfo^.hwndChild);
7285 if Control = ListToolBar then begin
7286 BandInfo^.fMask := BandInfo.fMask or RBBIM_STYLE or RBBIM_IDEALSIZE;
7287 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7288 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7292 procedure TGikoForm.ListCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
7297 ChevronPopupMenu.Items.Clear;
7298 Idx := RebarChevron^.uBand;
7299 if (Idx >= 0) and (ListCoolBar.Bands.Count > Idx) then begin
7300 if ListCoolBar.Bands[Idx].Control = ListToolBar then begin
7301 ToolBarChevronMenu(ListToolBar);
7304 p := ListCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
7305 ChevronPopupMenu.Popup(p.x, p.y);
7309 procedure TGikoForm.BrowserCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
7311 Control: TWinControl;
7313 Control := FindControl(BandInfo^.hwndChild);
7314 if Control = BrowserToolBar then begin
7315 BandInfo^.fMask := BandInfo.fMask or RBBIM_STYLE or RBBIM_IDEALSIZE;
7316 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
7317 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
7321 procedure TGikoForm.BrowserCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
7326 ChevronPopupMenu.Items.Clear;
7327 Idx := RebarChevron^.uBand;
7328 if (Idx >= 0) and (BrowserCoolBar.Bands.Count > Idx) then begin
7329 if BrowserCoolBar.Bands[Idx].Control = BrowserToolBar then
7330 ToolBarChevronMenu(BrowserToolBar)
7333 p := BrowserCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
7334 ChevronPopupMenu.Popup(p.x, p.y);
7338 procedure TGikoForm.ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
7340 if Column^.iImage = -1 then begin
7341 Column^.mask := Column^.mask or LVCF_FMT;
7343 Column^.mask := Column^.mask or LVCF_FMT or LVCF_IMAGE;
7344 Column^.fmt := Column^.fmt or LVCFMT_IMAGE or LVCFMT_BITMAP_ON_RIGHT;
7348 procedure TGikoForm.ThreadEditorActionExecute(Sender: TObject);
7350 Editor: TEditorForm;
7352 if not (GetActiveList is TBoard) then
7354 Editor := TEditorForm.Create(Self);
7355 Editor.SetBoard(TBoard(GetActiveList));
7357 Editor.BodyEdit.SetFocus;
7360 procedure TGikoForm.ToolBarSettingActionExecute(Sender: TObject);
7362 Dlg: TToolBarSettingDialog;
7364 //Component: TComponent;
7366 Dlg := TToolBarSettingDialog.Create(Self, ActionList);
7368 Dlg.AddToolBar(StdToolBar, gttStandard);
7369 Dlg.AddToolBar(ListToolBar, gttList);
7370 Dlg.AddToolBar(BrowserToolBar, gttBrowser);
7372 if ToolBarSettingAction.ActionComponent.GetParentComponent is TPopupMenu then begin
7373 Component := TPopupMenu( ToolBarSettingAction.ActionComponent.GetParentComponent ).PopupComponent;
7375 if Component = MainCoolBar then
7376 Dlg.ToolBarComboBox.ItemIndex := 0
7377 else if Component = ListCoolBar then
7378 Dlg.ToolBarComboBox.ItemIndex := 1
7379 else if Component = BrowserCoolBar then
7380 Dlg.ToolBarComboBox.ItemIndex := 2;
7383 if Dlg.ShowModal = mrOK then begin
7386 //
\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é
7387 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
7388 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth + 1;
7389 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth - 1;
7391 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
7392 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth + 1;
7393 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth - 1;
7395 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
7396 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth + 1;
7397 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth - 1;
7399 SaveToolBarSetting(StdToolBar);
7400 SaveToolBarSetting(ListToolBar);
7401 for i := ListToolBar.ControlCount - 1 downto 0 do
7403 if ListToolBar.Controls[ i ].Action = SelectItemAction then
7405 //
\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·
7406 if (i + 1) < ListToolBar.ControlCount then
7407 if ListToolBar.Controls[ i + 1 ] is TToolButton then
7408 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
7409 ListToolBar.Controls[ i + 1 ].Visible := False;
7411 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
7412 ListToolBar.Controls[ i ].Visible := False;
7413 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
7414 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
7415 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
7416 SelectComboBox.Parent := ListToolBar;
7417 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
7418 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
7419 SelectComboBoxSplitter.Parent := ListToolBar;
7424 SaveToolBarSetting(BrowserToolBar);
7431 procedure TGikoForm.SetToolBarPopup;
7435 for i := 0 to StdToolBar.ButtonCount - 1 do begin
7437 for i := 0 to ListToolBar.ButtonCount - 1 do begin
7438 if ListToolBar.Buttons[i].Action = IconStyle then
7439 ListToolBar.Buttons[i].DropdownMenu := ListIconPopupMenu;
7440 if ListToolBar.Buttons[i].Action = SelectReservAction then
7441 ListToolBar.Buttons[i].DropdownMenu := RoundNamePopupMenu;
7443 for i := 0 to BrowserToolBar.ButtonCount - 1 do begin
7444 if BrowserToolBar.Buttons[i].Action = IEAction then
7445 BrowserToolBar.Buttons[i].DropdownMenu := BrowserPopupMenu;
7449 procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState;
7450 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
7459 Wnd := WindowFromPoint(MousePos);
7461 if WheelDelta > 0 then
7466 if (Wnd = BrowserTab.Handle) or
7467 (Wnd = BrowserTab.Parent.Handle) then begin
7468 BrowserTab.ScrollTabs(Delta);
7469 end else if Wnd = ListView.Handle then begin
7470 if ListView.ViewStyle = vsList then
7471 ListView.Scroll( Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE, 0 )
7473 ListView.Scroll( 0, Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE );
7480 procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
7482 if Length( SelectComboBox.Text ) = 0 then
7484 AllItemAction.Checked := True;
7485 LogItemAction.Checked := False;
7486 NewItemAction.Checked := False;
7488 //
\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é
7489 if AllItemAction.Checked then
7490 AllItemAction.Checked := False;
7491 if LogItemAction.Checked then
7492 LogItemAction.Checked := False;
7493 if NewItemAction.Checked then
7494 NewItemaction.Checked := False;
7497 if Length( SelectComboBox.Text ) = 0 then
7498 SetListViewType( gvtAll )
7500 SetListViewType( gvtUser, SelectComboBox.Text, false);
7503 procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
7504 Shift: TShiftState);
7507 if Key = VK_Return then
7510 end else if Length( SelectComboBox.Text ) = 0 then
7512 AllItemAction.Checked := True;
7513 LogItemAction.Checked := False;
7514 NewItemAction.Checked := False;
7516 //
\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é
7517 if AllItemAction.Checked then
7518 AllItemAction.Checked := False;
7519 if LogItemAction.Checked then
7520 LogItemAction.Checked := False;
7521 if NewItemAction.Checked then
7522 NewItemaction.Checked := False;
7527 procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
7532 if Length( SelectComboBox.Text ) = 0 then
7534 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
7535 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
7540 //
\8di
\82è
\8d\9e\82Ý
\8c\9f\8dõ
\82Ì
\97\9a\97ð
\8dX
\90V
7541 procedure TGikoForm.ModifySelectList;
7548 if SelectComboBox.Parent = nil then
7551 if Length( SelectComboBox.Text ) > 0 then
7553 oldText := SelectComboBox.Text;
7554 idx := GikoSys.Setting.SelectTextList.IndexOf( oldText );
7556 GikoSys.Setting.SelectTextList.Delete( idx );
7557 idx := SelectComboBox.Items.IndexOf( oldText );
7559 SelectComboBox.Items.Delete( idx );
7560 GikoSys.Setting.SelectTextList.Insert( 0, oldText );
7561 SelectComboBox.Items.Insert( 0, oldText );
7562 SelectComboBox.Text := oldText;
7569 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\95Ò
\8fW
\82·
\82é
\82½
\82ß
\82É
\8aJ
\82
7570 procedure TGikoForm.NG1Click(Sender: TObject);
7572 GikoSys.FAbon.EditNGwords;
7574 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\8dÄ
\93Ç
\82Ý
\8d\9e\82Ý
\82·
\82é
7575 procedure TGikoForm.SelectResActionExecute(Sender: TObject);
7577 Dlg: TListSelectDialog;
7578 ThreadItem : TThreadItem;
7579 FilterList : TStringList;
7582 Dlg := TListSelectDialog.Create(Self);
7584 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
7585 Dlg.SelectComboBox.Text := FSelectResWord;
7587 if Dlg.ModalResult = mrOK then begin
7588 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
7589 //
\8bó
\93ü
\97Í
\82Å OK
\82Í
\91S
\83\8c\83X
\95\
\8e¦
\82Æ
\93¯
\88Ó
\8b`
7590 AllResAction.Execute;
7592 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
7593 AllResAction.Checked := False;
7594 SelectResAction.Checked := True;
7596 //
\8dÅ
\8cã
\82É
\90Ý
\92è
\82µ
\82½
\82à
\82Ì
\82ð
\8ao
\82¦
\82Ä
\82¨
\82
7597 FSelectResWord := Dlg.SelectComboBox.Text;
7599 //
\8c\9f\8dõ
\97\9a\97ð
\82Ì
\8dX
\90V
7600 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
7602 GikoSys.Setting.SelectTextList.Delete(idx);
7603 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
7604 while Dlg.SelectComboBox.Items.Count > 100 do begin
7605 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
7609 if SelectComboBox.Parent <> nil then
7610 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
7614 //
\83t
\83B
\83\8b\83^
\82Ì
\90Ý
\92è
7615 FilterList := TStringList.Create;
7617 GikoSys.FSelectResFilter.Reverse := True;
7618 FilterList.Delimiter := ' '; //
\8bæ
\90Ø
\82è
\8eq
\82ð
\94¼
\8ap
\83X
\83y
\81[
\83X
\82É
\90Ý
\92è
7619 FilterList.DelimitedText := Dlg.SelectComboBox.Text;
7621 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
7626 //
\83X
\83\8c\83b
\83h
\82Ì
\8dÄ
\95`
\89æ
7627 ThreadItem := GetActiveContent;
7628 if ThreadItem <> nil then
7629 SetContent( ThreadItem );
7631 end else if Length( FSelectResWord ) > 0 then begin
7632 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
7633 AllResAction.Checked := False;
7634 SelectResAction.Checked := True;
7642 procedure TGikoForm.SelectResActionUpdate(Sender: TObject);
7644 SelectResAction.Enabled := GetActiveContent <> nil;
7647 procedure TGikoForm.FormKeyDown(Sender: TObject; var Key: Word;
7648 Shift: TShiftState);
7652 Doc: IHtmlDocument2;
7653 // Range: IHTMLTxtRange;
7656 ThreadItem: TThreadItem;
7660 ThreadItem := GetActiveContent;
7661 if ThreadItem <> nil then begin
7662 if ssCtrl in Shift then begin
7663 if ssAlt in Shift then begin
7664 Doc := Browser.Document as IHtmlDocument2;
7665 s := IntToStr(Fkeynum);
7666 if GikoSys.IsNumeric(s) then begin
7667 ThreadItem := GetActiveContent;
7668 if ThreadItem <> nil then begin
7670 FHint.PopupType := gptThread;
7671 SetResPopupText(ThreadItem, Num, Num, False, False);
7672 if FHint.ResCount <> 0 then begin
7679 if Fkeynum = 0 then begin
7680 if (Key >= $60) and (Key <= $69) then begin
7681 Fkeynum := Key - $60;
7684 if (Key >= $60) and (Key <= $69) then begin
7685 Fkeynum := Fkeynum * 10 + Key - $60;
7691 if FHint <> nil then begin
7692 FHint.ReleaseHandle;
7701 procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;
7702 Shift: TShiftState);
7705 if Key = $11 then begin
7707 if FHint <> nil then begin
7708 FHint.ReleaseHandle;
7716 //
\91S
\82Ä
\82Ì
\83\8c\83X
\82ð
\95\
\8e¦
7717 procedure TGikoForm.AllResActionExecute(Sender: TObject);
7719 ThreadItem : TThreadItem;
7720 FilterList : TStringList;
7722 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
7723 AllResAction.Checked := True;
7724 SelectResAction.Checked := False;
7726 if Length( FSelectResWord ) > 0 then begin
7727 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
7728 FilterList := TStringList.Create;
7730 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
7731 GikoSys.FSelectResFilter.Reverse := False;
7736 FSelectResWord := '';
7738 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
7739 ThreadItem := GetActiveContent;
7740 if ThreadItem <> nil then
7741 SetContent( ThreadItem );
7745 procedure TGikoForm.AllResActionUpdate(Sender: TObject);
7747 AllResAction.Enabled := GetActiveContent <> nil;
7750 procedure TGikoForm.ReloadClick(Sender: TObject);
7752 ThreadItem : TThreadItem;
7754 if GikoSys.FAbon.ReLoadFromNGwordFile =false then begin
7755 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);
7757 ThreadItem := GetActiveContent;
7758 if ThreadItem <> nil then
7759 SetContent( ThreadItem );
7764 procedure TGikoForm.GoBackClick(Sender: TObject);
7766 ThreadItem : TThreadItem;
7769 if GikoSys.FAbon.GoForward =false then begin
7770 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);
7772 s := GikoSys.FAbon.NGwordname;
7773 StatusBar.Panels.Items[2].Text := s;
7774 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
7775 StatusBarResize(Sender);
7776 ThreadItem := GetActiveContent;
7777 if ThreadItem <> nil then
7778 SetContent( ThreadItem );
7783 procedure TGikoForm.GoFowardClick(Sender: TObject);
7785 ThreadItem : TThreadItem;
7788 if GikoSys.FAbon.GoBack =false then begin
7789 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);
7791 s := GikoSys.FAbon.NGwordname;
7792 StatusBar.Panels.Items[2].Text := s;
7793 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
7794 StatusBarResize(Sender);
7795 ThreadItem := GetActiveContent;
7796 if ThreadItem <> nil then
7797 SetContent( ThreadItem );
7802 procedure TGikoForm.SelectComboBoxSplitterMouseMove(Sender: TObject;
7803 Shift: TShiftState; X, Y: Integer);
7808 If (SelectComboBox.Parent <> nil) and (IsDraggingSelectComboBox) Then begin
7811 pos := SelectComboBoxSplitter.ClientToScreen( pos );
7812 w := SelectComboBox.Width + (pos.X - DraggingSelectComboBoxPosition.X);
7814 If w <= 50 Then Begin
7815 //
\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
7816 //
\81u
\8e~
\82Ü
\82Á
\82½(50pixel)
\88Ê
\92u
\81v
\82É
\82È
\82é
\82æ
\82¤
\82É
7817 pos.X := pos.X + (50 - w);
7819 //
\8f¬
\82³
\82
\82È
\82è
\82·
\82¬
\82È
\82¢
\82æ
\82¤
\82É
7823 //
\83`
\83\89\82Â
\82«
\8cy
\8c¸
\82Ì
\88×
7824 If SelectComboBox.Width <> w Then Begin
7825 SelectComboBox.Width := w;
7826 GikoSys.Setting.SelectComboBoxWidth := w;
7827 DraggingSelectComboBoxPosition := pos;
7832 procedure TGikoForm.SelectComboBoxSplitterMouseDown(Sender: TObject;
7833 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7837 IsDraggingSelectComboBox := True;
7840 DraggingSelectComboBoxPosition := SelectComboBoxSplitter.ClientToScreen( pos );
7843 procedure TGikoForm.SelectComboBoxSplitterMouseUp(Sender: TObject;
7844 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7846 IsDraggingSelectComboBox := False;
7849 procedure TGikoForm.StatusBarResize(Sender: TObject);
7851 StatusBar.Panels[1].Width := StatusBar.Width -
7852 StatusBar.Panels[0].Width -
7853 StatusBar.Panels[2].Width;
7855 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\92Ê
\8fí
\81v
7856 procedure TGikoForm.IndividualAbon1Click(Sender: TObject);
7858 ThreadItem : TThreadItem;
7860 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,1);
7861 ThreadItem := GetActiveContent;
7862 if ThreadItem <> nil then
7863 SetContent( ThreadItem );
7865 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\93§
\96¾
\81v
7866 procedure TGikoForm.IndividualAbon2Click(Sender: TObject);
7868 ThreadItem : TThreadItem;
7870 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,0);
7871 ThreadItem := GetActiveContent;
7872 if ThreadItem <> nil then
7873 SetContent( ThreadItem );
7875 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c\81i
\81j
7876 procedure TGikoForm.AntiIndividualAbonClick(Sender: TObject);
7878 ThreadItem : TThreadItem;
7881 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
7882 GikoSys.FAbon.DeleteIndividualAbon(KokoPopupMenu.Tag);
7883 ThreadItem := GetActiveContent;
7884 if ThreadItem <> nil then
7885 SetContent( ThreadItem );
7887 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
7888 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
7891 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c
7892 procedure TGikoForm.N42Click(Sender: TObject);
7894 IndividualForm :TIndividualAbonForm;
7895 ThreadItem : TThreadItem;
7899 IndividualForm := TIndividualAbonForm.Create(Self);
7901 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
7902 for i :=0 to GikoSys.FAbon.GetAbonResCount-1 do begin
7903 IndividualForm.ComboBox1.Items.Add(GikoSys.FAbon.GetAbonResString(i));
7905 if IndividualForm.ShowModal = mrOK then begin
7906 GikoSys.FAbon.DeleteIndividualAbon(IndividualForm.ResNumber);
7908 ThreadItem := GetActiveContent;
7909 if ThreadItem <> nil then
7910 SetContent( ThreadItem );
7912 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
7913 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
7916 IndividualForm.Free;
7920 procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
7923 if (Length( SelectComboBox.Text ) = 0) or
7924 (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
7926 SelectComboBox.Text := '';
7927 SelectComboBox.Color := clWindow;
7932 procedure TGikoForm.N51Click(Sender: TObject);
7936 //
\94Â
\96¼
\8c\9f\8dõ
7937 procedure TGikoForm.TreeSelectSearchBoardNameExecute(Sender: TObject);
7941 CurItem : TTreeNode;
7944 if InputQuery('
\94Â
\96¼
\8c\9f\8dõ','
\94Â
\96¼
\82Ì
\93ü
\97Í',s) then begin
7947 if TreeView.Selected = nil then
7948 CurItem := TreeView.Items.GetFirstNode
7950 CurItem := TreeView.Selected.GetNext;
7951 if CurItem = nil then
7952 CurItem := TreeView.Items.GetFirstNode;
7954 while CurItem <> nil do begin
7955 if (CurItem.ImageIndex <> 2) and (AnsiPos(s,CurItem.Text) <> 0) then begin
7958 CurItem := CurItem.GetNext;
7961 if CurItem = nil then begin
7962 msg := '
\90æ
\93ª
\82É
\96ß
\82è
\82Ü
\82·
\82©
\81H';
7963 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
7964 CurItem := TreeView.Items.GetFirstNode;
7968 TreeView.Select(CurItem);
7971 TreeView.Select(CurItem);
7973 msg := '
\8e\9f\82É
\8ds
\82«
\82Ü
\82·
\82©
\81H';
7974 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
7988 procedure TGikoForm.CabinetFavoriteActionExecute(Sender: TObject);
7994 if CabinetPanel.Visible then begin
7995 if FTreeType = gttFavorite then begin
7996 CabinetVisible( False );
7997 CabinetFavoriteAction.Checked := False;
7999 CabinetFavoriteAction.Checked := True;
8002 CabinetVisible( True );
8003 CabinetFavoriteAction.Checked := True;
8006 // BBS...BBS, History, Favorite
8007 GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 1;
8009 b := CabinetSelectPopupMenu.Items.Count - 1;
8010 for i := 0 to b do begin
8011 item := CabinetSelectPopupMenu.Items[ i ];
8012 if item is TBBSMenuItem then begin
8013 item.Checked := False;
8014 // CabinetMenu
\82Í CabinetSelectPopupMenu
\82Æ
\93¯
\82¶
\82Æ
\8c\88\82ß
\82¤
\82¿
\82µ
\82¿
\82á
\82¤
8015 CabinetMenu.Items[ i ].Checked := False;
8019 //
\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Ö
8020 HistoryToolBar.Hide;
8021 FavoriteToolBar.Show;
8022 TreeView.Visible := False;
8023 FavoriteTreeView.Visible := True;
8025 CabinetSelectToolButton.Caption := '
\82¨
\8bC
\82É
\93ü
\82è';
8026 FTreeType := gttFavorite;
8028 //
\83\81\83j
\83\85\81[
\8by
\82Ñ
\83{
\83^
\83\93\82Ì
\83`
\83F
\83b
\83N
\82ð
\90Ý
\92è
8029 CabinetBBSAction.Checked := False;
8030 CabinetHistoryAction.Checked := False;
8032 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\83c
\83\8a\81[
\82ð
\93W
\8aJ
8033 FavoriteTreeView.TopItem.Expanded := True;
8037 procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
8040 if (SenderNode = nil) or (SourceNode = nil) or (SenderNode = SourceNode) then
8043 if TObject(SenderNode.Data) is TFavoriteFolder then
8044 SourceNode.MoveTo(SenderNode, naAddChild)
8046 SourceNode.MoveTo(SenderNode, naInsert);
8050 procedure TGikoForm.FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
8054 FavoBoardItem: TFavoriteBoardItem;
8055 FavoThreadItem: TFavoriteThreadItem;
8057 ThreadItem: TThreadItem;
8060 if (SenderNode = nil) or (Source = nil) then
8063 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
8064 FavNode := SenderNode.Parent
8066 FavNode := SenderNode;
8070 if Source is TBoard then begin
8071 Board := TBoard( Source );
8072 FavoBoardItem := TFavoriteBoardItem.CreateWithItem( Board );
8073 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, FavoBoardItem);
8074 Node.ImageIndex := 15;
8075 Node.SelectedIndex := 15;
8076 end else if Source is TFavoriteBoardItem then begin
8077 FavoBoardItem := TFavoriteBoardItem( Source );
8078 Board := FavoBoardItem.Item;
8079 if Board <> nil then
8080 if not Board.IsThreadDatRead then
8081 GikoSys.ReadSubjectFile(Board);
8082 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, Source);
8083 Node.ImageIndex := 15;
8084 Node.SelectedIndex := 15;
8085 end else if Source is TThreadItem then begin
8086 ThreadItem := TThreadItem( Source );
8087 FavoThreadItem := TFavoriteThreadItem.CreateWithItem( ThreadItem );
8088 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
8089 Node.ImageIndex := 16;
8090 Node.SelectedIndex := 16;
8091 end else if Source is TFavoriteThreadItem then begin
8092 FavoThreadItem := TFavoriteThreadItem( Source );
8093 ThreadItem := FavoThreadItem.Item;
8094 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, Source);
8095 Node.ImageIndex := 16;
8096 Node.SelectedIndex := 16;
8099 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
8101 FavoriteMoveTo( SenderNode, Node );
8105 procedure TGikoForm.FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
8108 SourceNode: TTreeNode;
8109 LinkToolButton: TLinkToolButton;
8112 if SenderNode = nil then
8115 if not (TObject( SenderNode.Data ) is TFavoriteFolder) then
8116 if FDropSpaceNode <> nil then
8117 SenderNode := FDropSpaceNode;
8119 if Source = FavoriteTreeView then begin
8121 SourceNode := FavoriteTreeView.Selected;
8122 FavoriteMoveTo( SenderNode, SourceNode );
8124 end else if Source is TLinkToolButton then begin
8126 LinkToolButton := TLinkToolButton( Source );
8127 //ShowMessage(LinkToolButton.Text);
8128 SourceNode := TreeNodeDataFind( FavoriteTreeView.TopItem, LinkToolButton.Data );
8129 FavoriteMoveTo( SenderNode, SourceNode );
8131 end else if Source = BrowserTab then begin
8133 idx := BrowserTab.TabIndex;
8134 FavoriteAddTo( SenderNode, BrowserTab.Tabs.Objects[idx] );
8136 end else if Source = ListView then begin
8138 FavoriteAddTo( SenderNode, ListView.Selected.Data );
8140 end else if Source = TreeView then begin
8142 FavoriteAddTo( SenderNode, TreeView.Selected.Data );
8150 procedure TGikoForm.FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
8153 SenderNode: TTreeNode;
8156 SenderNode := FavoriteTreeView.GetNodeAt(X, Y);
8157 if SenderNode <> nil then begin
8158 FavoriteDragDrop( SenderNode, Source );
8161 if FDropSpaceNode <> nil then begin
8162 FDropSpaceNode.Free;
8163 FDropSpaceNode := nil;
8168 procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
8169 Node: TTreeNode; var S: String);
8172 FavoriteTreeView.ReadOnly := True;
8177 procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
8178 Shift: TShiftState);
8184 FClickNode := FavoriteTreeView.Selected;
8185 FavoriteTreeViewRenameActionExecute( Sender );
8189 FClickNode := FavoriteTreeView.Selected;
8190 FavoriteTreeViewDeleteActionExecute( Sender );
8196 procedure TGikoForm.FavoriteTreePopupMenuPopup(Sender: TObject);
8199 LinkToolButton: TLinkToolButton;
8202 if FavoriteTreePopupMenu.PopupComponent = FavoriteTreeView then begin
8204 FClickNode := FavoriteTreeView.Selected;
8206 end else if FavoriteTreePopupMenu.PopupComponent is TLinkToolButton then begin
8208 LinkToolButton := TLinkToolButton( FavoriteTreePopupMenu.PopupComponent );
8209 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
8210 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
8211 FClickNode := FavoriteTreeView.Items[i];
8215 for i := 0 to FClickNode.Count - 1 do begin
8216 if FClickNode.Item[i].Data = LinkToolButton.Data then begin
8217 FClickNode := FClickNode.Item[i];
8224 if FClickNode = nil then begin
8225 FavoriteTreeBrowseFolderPopupMenu.Enabled := False;
8226 FavoriteTreeDeletePopupMenu.Enabled := False;
8227 FavoriteTreeRenamePopupMenu.Enabled := False;
8228 FavoriteTreeNewFolderPopupMenu.Enabled := False;
8229 //FavoriteTreeBrowseBoardPopupMenu.Enabled := False;
8230 //FavoriteTreeBrowseThreadPopupMenu.Enabled := False;
8231 FavoriteTreeURLCopyPopupMenu.Enabled := False;
8232 FavoriteTreeNameCopyPopupMenu.Enabled := False;
8233 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
8234 FavoriteTreeReloadPopupMenu.Enabled := False;
8235 FavoriteTreeLogDeletePopupMenu.Enabled := False;
8236 end else if FClickNode.IsFirstNode then begin
8237 FavoriteTreeBrowseFolderPopupMenu.Enabled := True;
8238 FavoriteTreeDeletePopupMenu.Enabled := False;
8239 FavoriteTreeRenamePopupMenu.Enabled := False;
8240 FavoriteTreeNewFolderPopupMenu.Enabled := True;
8241 //FavoriteTreeBrowseBoardPopupMenu.Enabled := False;
8242 //FavoriteTreeBrowseThreadPopupMenu.Enabled := False;
8243 FavoriteTreeURLCopyPopupMenu.Enabled := False;
8244 FavoriteTreeNameCopyPopupMenu.Enabled := False;
8245 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
8246 FavoriteTreeReloadPopupMenu.Enabled := False;
8247 FavoriteTreeLogDeletePopupMenu.Enabled := False;
8248 end else if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
8249 FavoriteTreeBrowseFolderPopupMenu.Enabled := True;
8250 FavoriteTreeDeletePopupMenu.Enabled := True;
8251 FavoriteTreeRenamePopupMenu.Enabled := False;
8252 FavoriteTreeNewFolderPopupMenu.Enabled := True;
8253 //FavoriteTreeBrowseBoardPopupMenu.Enabled := False;
8254 //FavoriteTreeBrowseThreadPopupMenu.Enabled := False;
8255 FavoriteTreeURLCopyPopupMenu.Enabled := False;
8256 FavoriteTreeNameCopyPopupMenu.Enabled := False;
8257 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
8258 FavoriteTreeReloadPopupMenu.Enabled := False;
8259 FavoriteTreeLogDeletePopupMenu.Enabled := False;
8260 end else if TObject(FClickNode.Data) is TFavoriteFolder then begin
8261 FavoriteTreeBrowseFolderPopupMenu.Enabled := True;
8262 FavoriteTreeDeletePopupMenu.Enabled := True;
8263 FavoriteTreeRenamePopupMenu.Enabled := True;
8264 FavoriteTreeNewFolderPopupMenu.Enabled := True;
8265 //FavoriteTreeBrowseBoardPopupMenu.Enabled := False;
8266 //FavoriteTreeBrowseThreadPopupMenu.Enabled := False;
8267 FavoriteTreeURLCopyPopupMenu.Enabled := False;
8268 FavoriteTreeNameCopyPopupMenu.Enabled := False;
8269 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
8270 FavoriteTreeReloadPopupMenu.Enabled := False;
8271 FavoriteTreeLogDeletePopupMenu.Enabled := False;
8272 end else if TObject(FClickNode.Data) is TFavoriteThreadItem then begin
8273 FavoriteTreeBrowseFolderPopupMenu.Enabled := False;
8274 FavoriteTreeDeletePopupMenu.Enabled := True;
8275 FavoriteTreeRenamePopupMenu.Enabled := True;
8276 FavoriteTreeNewFolderPopupMenu.Enabled := True;
8277 //FavoriteTreeBrowseBoardPopupMenu.Enabled := True;
8278 //FavoriteTreeBrowseThreadPopupMenu.Enabled := True;
8279 FavoriteTreeURLCopyPopupMenu.Enabled := True;
8280 FavoriteTreeNameCopyPopupMenu.Enabled := True;
8281 FavoriteTreeNameURLCopyPopupMenu.Enabled := True;
8282 FavoriteTreeReloadPopupMenu.Enabled := True;
8283 FavoriteTreeLogDeletePopupMenu.Enabled := True;
8284 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
8285 FavoriteTreeBrowseFolderPopupMenu.Enabled := False;
8286 FavoriteTreeDeletePopupMenu.Enabled := True;
8287 FavoriteTreeRenamePopupMenu.Enabled := True;
8288 FavoriteTreeNewFolderPopupMenu.Enabled := True;
8289 //FavoriteTreeBrowseBoardPopupMenu.Enabled := True;
8290 //FavoriteTreeBrowseThreadPopupMenu.Enabled := False;
8291 FavoriteTreeURLCopyPopupMenu.Enabled := True;
8292 FavoriteTreeNameCopyPopupMenu.Enabled := True;
8293 FavoriteTreeNameURLCopyPopupMenu.Enabled := True;
8294 FavoriteTreeReloadPopupMenu.Enabled := True;
8295 FavoriteTreeLogDeletePopupMenu.Enabled := False;
8297 FavoriteTreeBrowseFolderPopupMenu.Enabled := False;
8298 FavoriteTreeDeletePopupMenu.Enabled := False;
8299 FavoriteTreeRenamePopupMenu.Enabled := False;
8300 FavoriteTreeNewFolderPopupMenu.Enabled := False;
8301 //FavoriteTreeBrowseBoardPopupMenu.Enabled := False;
8302 //FavoriteTreeBrowseThreadPopupMenu.Enabled := False;
8303 FavoriteTreeURLCopyPopupMenu.Enabled := False;
8304 FavoriteTreeNameCopyPopupMenu.Enabled := False;
8305 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
8306 FavoriteTreeReloadPopupMenu.Enabled := False;
8307 FavoriteTreeLogDeletePopupMenu.Enabled := False;
8312 procedure TGikoForm.FavoriteTreeViewDeleteActionExecute(Sender: TObject);
8315 if FClickNode = nil then
8317 if FClickNode.IsFirstNode then
8319 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
8320 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
8324 //FDeleteList.Add(FClickNode.Data);
8325 //SetDeleteItemList(FClickNode);
8333 procedure TGikoForm.FavoriteTreeViewRenameActionExecute(Sender: TObject);
8338 if FClickNode = nil then
8340 if FClickNode.IsFirstNode then
8342 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then
8344 FavoriteTreeView.ReadOnly := False;
8345 if (FTreeType = gttFavorite) and (CabinetPanel.Visible) then begin
8346 node := FClickNode.Parent;
8347 while node <> nil do begin
8348 node.Expanded := True;
8349 node := node.Parent;
8351 FClickNode.EditText;
8353 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 );
8360 procedure TGikoForm.FavoriteTreeViewNewFolderActionExecute(
8363 NewFavFolder: TFavoriteFolder;
8367 if FClickNode = nil then
8371 if not (TObject(FClickNode.Data) is TFavoriteFolder) then begin
8372 FavoriteTreeView.Selected := FClickNode.Parent;
8373 FClickNode := FClickNode.Parent;
8376 NewFavFolder := TFavoriteFolder.Create;
8377 Node := FavoriteTreeView.Items.AddChildObject(FClickNode, '
\90V
\82µ
\82¢
\83t
\83H
\83\8b\83_', NewFavFolder);
8378 Node.ImageIndex := 14;
8379 Node.SelectedIndex := 14;
8380 // FClickNode.Selected.Expanded := True;
8381 FavoriteTreeView.Selected := Node;
8383 FavoriteTreeViewRenameAction.Execute;
8389 procedure TGikoForm.ToolButton19Click(Sender: TObject);
8392 FavoriteArrangeActionExecute( nil );
8396 procedure TGikoForm.FavoriteBrowseFolder( node: TTreeNode );
8401 if not (TObject(node.Data) is TFavoriteFolder) then
8404 for i := 0 to node.Count - 1 do
8406 if TObject(node.Item[i].Data) is TFavoriteFolder then
8407 FavoriteBrowseFolder( node.Item[i] )
8408 else if TObject(node.Item[i].Data) is TFavoriteThreadItem then
8409 FavoriteClick( node.Item[i], False );
8414 procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
8418 FavoriteBrowseFolder( FClickNode );
8419 BrowserTab.OnChange(nil);
8423 procedure TGikoForm.FavoriteTreeViewChange(Sender: TObject;
8427 if not Mouse.IsDragging then
8428 FavoriteClick( Node );
8432 procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
8435 FClickNode := FavoriteTreeView.Selected;
8436 FavoriteTreeViewReloadActionExecute( Sender );
8440 procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
8443 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';
8444 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
8446 ThreadItem: TThreadItem;
8447 FavThread: TFavoriteThreadItem;
8450 if FClickNode = nil then Exit;
8451 if not (TObject(FClickNode.Data) is TFavoriteThreadItem) then Exit;
8453 FavThread := TFavoriteThreadItem( FClickNode.Data );
8454 ThreadItem := FavThread.Item;
8457 if GikoSys.Setting.DeleteMsg then begin
8458 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
8462 DeleteHistory(ThreadItem);
8463 DeleteTab(ThreadItem);
8464 ThreadItem.DeleteLogFile;
8472 procedure TGikoForm.FavoriteTreeViewReloadActionExecute(Sender: TObject);
8474 ThreadItem: TThreadItem;
8475 FavThread: TFavoriteThreadItem;
8477 FavBoard: TFavoriteBoardItem;
8480 if FClickNode = nil then Exit;
8482 if TObject( FClickNode.Data ) is TFavoriteThreadItem then begin
8483 FavThread := TFavoriteThreadItem( FClickNode.Data );
8484 ThreadItem := FavThread.Item;
8485 if ThreadItem <> nil then
8486 DownloadContent(ThreadItem);
8487 end else if TObject( FClickNode.Data ) is TFavoriteBoardItem then begin
8488 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8489 Board := FavBoard.Item;
8490 DownloadList(Board);
8495 procedure TGikoForm.FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
8497 ThreadItem: TThreadItem;
8498 FavThread: TFavoriteThreadItem;
8500 FavBoard: TFavoriteBoardItem;
8504 if FClickNode = nil then Exit;
8506 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8508 FavThread := TFavoriteThreadItem( FClickNode.Data );
8509 ThreadItem := FavThread.Item;
8512 s := ThreadItem.URL + #13#10;
8514 Clipboard.AsText := s;
8518 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8520 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8521 Board := FavBoard.Item;
8522 if Board <> nil then
8523 if not Board.IsThreadDatRead then
8524 GikoSys.ReadSubjectFile(Board);
8527 s := Board.URL + #13#10;
8529 Clipboard.AsText := s;
8537 procedure TGikoForm.FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
8539 ThreadItem: TThreadItem;
8540 FavThread: TFavoriteThreadItem;
8542 FavBoard: TFavoriteBoardItem;
8546 if FClickNode = nil then Exit;
8548 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8550 FavThread := TFavoriteThreadItem( FClickNode.Data );
8551 ThreadItem := FavThread.Item;
8554 s := ThreadItem.Title + #13#10;
8556 Clipboard.AsText := s;
8560 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8562 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8563 Board := FavBoard.Item;
8564 if Board <> nil then
8565 if not Board.IsThreadDatRead then
8566 GikoSys.ReadSubjectFile(Board);
8569 s := Board.Title + #13#10;
8571 Clipboard.AsText := s;
8579 procedure TGikoForm.FavoriteTreeViewNameURLCopyActionExecute(
8582 ThreadItem: TThreadItem;
8583 FavThread: TFavoriteThreadItem;
8585 FavBoard: TFavoriteBoardItem;
8589 if FClickNode = nil then Exit;
8591 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8593 FavThread := TFavoriteThreadItem( FClickNode.Data );
8594 ThreadItem := FavThread.Item;
8597 s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10;
8599 Clipboard.AsText := s;
8603 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8605 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8606 Board := FavBoard.Item;
8607 if Board <> nil then
8608 if not Board.IsThreadDatRead then
8609 GikoSys.ReadSubjectFile(Board);
8612 s := Board.URL + #13#10 + Board.Title + #13#10;
8614 Clipboard.AsText := s;
8622 function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
8628 for i := 0 to Node.Count - 1 do begin
8629 if Node.Item[i].Data = FindPointer then begin
8630 Result := Node.Item[i];
8632 end else if Node.Item[i].Count > 0 then begin
8633 Found := TreeNodeDataFind( Node.Item[i], FindPointer );
8634 if Found <> nil then begin
8645 procedure TGikoForm.LinkToolBarDragDrop(Sender, Source: TObject; X,
8649 SenderNode: TTreeNode;
8653 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
8654 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
8655 SenderNode := FavoriteTreeView.Items[i];
8660 FavoriteDragDrop( SenderNode, Source );
8664 procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
8665 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8667 if FDragWFirst <> true then begin
8668 FDragWFirst := false;
8672 procedure TGikoForm.LinkToolBarDragOver(Sender, Source: TObject; X,
8673 Y: Integer; State: TDragState; var Accept: Boolean);
8676 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
8680 procedure TGikoForm.OnlyAHundredResExecute(Sender: TObject);
8682 ThreadItem : TThreadItem;
8684 GikoSys.OnlyAHundredRes := OnlyAHundredRes.Checked;
8685 ThreadItem := GetActiveContent;
8686 if ThreadItem <> nil then
8687 SetContent( ThreadItem );
8690 procedure TGikoForm.FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
8694 if FDropSpaceNode <> nil then begin
8695 FDropSpaceNode.Free;
8696 FDropSpaceNode := nil;
8702 procedure TGikoForm.ListCoolBarContextPopup(Sender: TObject;
8703 MousePos: TPoint; var Handled: Boolean);
8706 MousePos := ListCoolBar.ClientToScreen( MousePos );
8707 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
8711 procedure TGikoForm.MainCoolBarContextPopup(Sender: TObject;
8712 MousePos: TPoint; var Handled: Boolean);
8715 MousePos := MainCoolBar.ClientToScreen( MousePos );
8716 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
8720 procedure TGikoForm.BrowserCoolBarContextPopup(Sender: TObject;
8721 MousePos: TPoint; var Handled: Boolean);
8724 MousePos := BrowserCoolBar.ClientToScreen( MousePos );
8725 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
8728 procedure TGikoForm.ExportFavoriteFileAccept(Sender: TObject);
8730 if FavoriteDM.SaveFavoriteFile( ExportFavoriteFile.Dialog.FileName ) Then begin
8731 ShowMessage('
\83t
\83@
\83C
\83\8b\82ð
\8fo
\97Í
\82µ
\82Ü
\82µ
\82½');
8733 ShowMessage('
\83t
\83@
\83C
\83\8b\82Ì
\8fo
\97Í
\82É
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½');
8736 procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
8738 if FListViewBackGroundColor <> value then begin
8739 FListViewBackGroundColor := value;
8740 ListView.Color := FListViewBackGroundColor;
8743 procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
8745 ExportFavoriteFile.Dialog.FileName := FavoriteDM.GetFavoriteFilePath;
8748 procedure TGikoForm.CabinetBBSActionExecute(Sender: TObject);
8751 if CabinetPanel.Visible then begin
8752 if FTreeType = gtt2ch then begin
8753 CabinetVisible( False );
8754 CabinetBBSAction.Checked := False;
8756 CabinetBBSAction.Checked := True;
8759 CabinetVisible( True );
8760 CabinetBBSAction.Checked := True;
8763 if FActiveBBS = nil then
8764 ShowBBSTree( BBSs[ 0 ] )
8766 ShowBBSTree( FActiveBBS );
8770 procedure TGikoForm.FavoriteTreeViewBrowseThreadActionExecute(
8773 threadItem : TThreadItem;
8776 if FClickNode = nil then Exit;
8778 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8780 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
8781 if threadItem = nil then
8783 GikoSys.OpenBrowser( threadItem.URL, gbtAuto );
8789 procedure TGikoForm.FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject);
8791 threadItem : TThreadItem;
8795 if FClickNode = nil then Exit;
8797 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8799 threadItem := TFavoriteThreadItem( FClickNode.Data ).Item;
8800 if threadItem = nil then
8802 GikoSys.OpenBrowser( threadItem.ParentBoard.URL, gbtAuto );
8804 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8806 boardItem := TFavoriteBoardItem( FClickNode.Data ).Item;
8807 if boardItem = nil then
8809 GikoSys.OpenBrowser( boardItem.URL, gbtAuto );
8815 procedure TGikoForm.UpBoardActionExecute(Sender: TObject);
8818 SelectTreeNode( GetActiveContent.ParentBoard, True );
8820 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
8821 if GikoSys.Setting.ListWidthState = glsMax then
8822 BrowserMinAction.Execute;
8824 if GikoSys.Setting.ListHeightState = glsMax then
8825 BrowserMinAction.Execute;
8831 procedure TGikoForm.UpBoardActionUpdate(Sender: TObject);
8834 UpBoardAction.Enabled := GetActiveContent <> nil;