6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7 OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils,
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, StdActns;
25 TGikoTreeType = (gttNone, gtt2ch, gttHistory);
27 TGikoForm = class(TForm)
28 StatusBar: TStatusBar;
31 TreeSplitter: TSplitter;
34 ThreadMainPanel: TPanel;
35 ListSplitter: TSplitter;
37 ListView: TGikoListView;
42 MessageHideButton: TSpeedButton;
43 MessageListView: TListView;
44 MessageSplitter: TSplitter;
46 SpeedButton1: TSpeedButton;
48 CabinetSelectToolButton: TToolButton;
49 HistoryToolBar: TToolBar;
50 ToolButton15: TToolButton;
51 ToolButton18: TToolButton;
52 ItemIcon16: TImageList;
53 ItemIcon32: TImageList;
54 HotToobarImageList: TImageList;
55 ToobarImageList: TImageList;
56 ItemImageList: TImageList;
57 ActionList: TActionList;
58 LogDeleteAction: TAction;
59 KidokuAction: TAction;
60 StdToolBarVisibleAction: TAction;
61 SearchAction: TAction;
62 GikoNaviWebPageAction: TAction;
65 MsgBarVisibleAction: TAction;
66 StatusBarVisibleAction: TAction;
67 LargeIconAction: TAction;
68 SmallIconAction: TAction;
69 ListIconAction: TAction;
70 DetailIconAction: TAction;
71 Cabinet2chAction: TAction;
72 CabinetHistoryAction: TAction;
73 CabinetVisibleAction: TAction;
74 MidokuAction: TAction;
75 AllSelectAction: TAction;
76 UpFolderAction: TAction;
77 ListNumberVisibleAction: TAction;
78 AllItemAction: TAction;
79 LogItemAction: TAction;
80 NewItemAction: TAction;
81 SelectItemAction: TAction;
82 ShowThreadAction: TAction;
86 DeleteMenu: TMenuItem;
88 KidokuMenu: TMenuItem;
89 MidokuMenu: TMenuItem;
90 AllSelectMenu: TMenuItem;
92 StdToolBarMenu: TMenuItem;
93 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;
220 ItemReservPMenu: TMenuItem;
221 RoundNamePopupMenu: TPopupMenu;
222 SelectNewRoundName: TAction;
223 SelectDeleteRound: TAction;
224 NewBoardAction: TAction;
227 LoginAction: TAction;
229 KeySettingAction: TAction;
231 AllTabCloseAction: TAction;
241 MessageImageList: TImageList;
242 ProgressBar: TProgressBar;
243 ArrangeAction: TAction;
245 NameURLCopyAction: TAction;
246 SelectItemNameURLCopyAction: TAction;
247 NameUrlCopyPMenu: TMenuItem;
255 ListCoolBar: TGikoCoolBar;
256 ListToolBar: TToolBar;
257 ViewNoButton: TToolButton;
258 IconToolButton: TToolButton;
259 UpFolderButton: TToolButton;
260 Sepa01ToolButton: TToolButton;
261 AllItemToolButton: TToolButton;
262 LogItemToolButton: TToolButton;
263 NewItemToolButton: TToolButton;
264 ListDownloadToolButton: TToolButton;
265 ListThreadDownloadToolButton: TToolButton;
266 ToolButton2: TToolButton;
267 ToolButton1: TToolButton;
268 BrowserCoolBar: TGikoCoolBar;
269 BrowserToolBar: TToolBar;
270 BrowserSizeButton: TToolButton;
271 ToolButton3: TToolButton;
272 TopButton: TToolButton;
273 LastBotton: TToolButton;
274 NewButton: TToolButton;
275 KokoButton: TToolButton;
276 ToolButton9: TToolButton;
277 EditorButton: TToolButton;
278 ToolButton11: TToolButton;
279 IEButton: TToolButton;
280 ToolButton5: TToolButton;
281 ItemReloadButton: TToolButton;
282 ListNameToolBar: TToolBar;
283 ListNameLabel: TLabel;
285 BrowserNameToolBar: TToolBar;
286 ItemBoardImage: TImage;
287 BrowserBoardNameLabel: TLabel;
289 BrowserNameLabel: TLabel;
290 ActiveLogDeleteAction: TAction;
295 ListNameBarVisibleAction: TAction;
297 BrowserNameBarVisibleAction: TAction;
300 TreeSelectNameURLCopy: TAction;
301 TreeSelectNameURLPupupMenu: TMenuItem;
304 PaneInitAction: TAction;
306 BrowserTabToolBar: TToolBar;
307 BrowserTab: TTabControl;
308 ToolButton7: TToolButton;
309 BrowserMinAction: TAction;
312 SelectTextClearAction: TAction;
313 MailTextClearAction: TAction;
314 NameTextClearAction: TAction;
318 LeftmostTabSelectAction: TAction;
319 LeftTabSelectAction: TAction;
320 RightTabSelectAction: TAction;
321 RightmostTabSelectAction: TAction;
327 FavoriteMenu: TMenuItem;
328 FavoriteAddAction: TAction;
330 BoardFavoriteAddMenu: TMenuItem;
331 BoardFavoriteAddAction: TAction;
332 ThreadFavoriteAddAction: TAction;
333 ThreadFavoriteAddMenu: TMenuItem;
334 TreeSelectFavoriteAddAction: TAction;
336 TreeSelectFavoriteAddPupupMenu: TMenuItem;
337 FavoriteArrangeAction: TAction;
338 FavoriteTreeView: TTreeView;
339 StateIconImageList: TImageList;
341 TopRightPanel: TPanel;
344 TopCoolPanel: TPanel;
345 MainCoolBar: TGikoCoolBar;
346 MenuToolBar: TToolBar;
347 StdToolBar: TToolBar;
348 RoundToolButton: TToolButton;
349 ToolButton6: TToolButton;
350 CabinetToolButton: TToolButton;
351 ToolButton4: TToolButton;
352 ToolButton13: TToolButton;
353 AbortToolButton: TToolButton;
354 LoginToolButton: TToolButton;
355 AddressToolBar: TToolBar;
356 AddressComboBox: TComboBox;
357 MoveToToolButton: TToolButton;
358 MoveToAction: TAction;
359 AddressImageList: TImageList;
360 AddressBarVisibleAction: TAction;
361 AddressToolBarMenu: TMenuItem;
363 BrowserTabVisibleAction: TAction;
366 BrowserTabTopAction: TAction;
367 BrowserTabBottomAction: TAction;
371 BrowserTabTabStyleAction: TAction;
372 BrowserTabButtonStyleAction: TAction;
373 BrowserTabFlatStyleAction: TAction;
377 PreviewTimer: TTimer;
378 MonazillaWebPageAction: TAction;
379 MonazillaWebPageAction1: TMenuItem;
380 GikoHelpAction: TAction;
383 KotehanAction: TAction;
385 LinkBarVisibleAction: TAction;
389 ChevronPopupMenu: TPopupMenu;
390 BBS2chWebPageAction: TAction;
393 GikoFolderOpenAction: TAction;
395 LinkToolBar: TToolBar;
397 ToolButton8: TToolButton;
398 ToolButton10: TToolButton;
399 ThreadEditorAction: TAction;
403 LinkBarPopupMenu: TPopupMenu;
404 ToolBarSettingAction: TAction;
406 ToolButton12: TToolButton;
407 ToolButton14: TToolButton;
408 ThreadPopupMenu: TPopupMenu;
409 MenuItem4: TMenuItem;
410 MenuItem5: TMenuItem;
411 MenuItem6: TMenuItem;
413 NameCopyAction: TAction;
414 BoardIEAction: TAction;
416 SelectItemNameCopyAction: TAction;
417 SelectItemNameCopyAction1: TMenuItem;
421 SelectComboBox: TComboBox;
422 MainCoolBarPopupMenu: TPopupMenu;
423 StdToolBarVisiblePMenu: TMenuItem;
424 AddressToolBarVisiblePMenu: TMenuItem;
425 LinkToolBarVisiblePMenu: TMenuItem;
446 SelectItemToolButton: TToolButton;
447 SelectResToolButton: TToolButton;
448 SelectResAction: TAction;
449 ToolButton16: TToolButton;
450 AllResAction: TAction;
451 AllResToolButton: TToolButton;
459 ReloadAction: TAction;
460 GoFowardAction: TAction;
461 GoBackAction: TAction;
462 SelectComboBoxSplitter: TImage;
463 IndividualAbon1: TMenuItem;
465 IndividualAbon2: TMenuItem;
467 CancellIndividualAbon: TAction;
468 AntiIndividualAbon: TMenuItem;
473 SearchBoardName: TMenuItem;
475 TreeSelectSearchBoardName: TAction;
476 CabinetFavoriteAction: TAction;
479 FavoriteTreePopupMenu: TPopupMenu;
480 FavoriteTreeViewRenameAction: TAction;
481 FavoriteTreeRenamePopupMenu: TMenuItem;
482 FavoriteTreeViewNewFolderAction: TAction;
483 FavoriteTreeNewFolderPopupMenu: TMenuItem;
485 FavoriteTreeViewDeleteAction: TAction;
486 FavoriteTreeDeletePopupMenu: TMenuItem;
487 FavoriteToolBar: TToolBar;
488 ToolButton17: TToolButton;
489 ToolButton19: TToolButton;
490 FavoriteTreeViewBrowseFolderAction: TAction;
491 FavoriteTreeBrowseFolderPopupMenu: TMenuItem;
493 FavoriteTreeReloadPopupMenu: TMenuItem;
495 FavoriteTreeURLCopyPopupMenu: TMenuItem;
496 FavoriteTreeNameCopyPopupMenu: TMenuItem;
497 FavoriteTreeLogDeletePopupMenu: TMenuItem;
499 FavoriteTreeNameURLCopyPopupMenu: TMenuItem;
500 FavoriteTreeViewReloadAction: TAction;
501 FavoriteTreeViewURLCopyAction: TAction;
502 FavoriteTreeViewNameCopyAction: TAction;
503 FavoriteTreeViewNameURLCopyAction: TAction;
504 FavoriteTreeViewLogDeleteAction: TAction;
505 OnlyAHundredRes: TAction;
506 ToolButton20: TToolButton;
507 AHundredResButton: TToolButton;
510 ExportFavoriteFileAction1: TMenuItem;
511 ExportFavoriteFile: TFileSaveAs;
512 procedure FormCreate(Sender: TObject);
513 procedure FormDestroy(Sender: TObject);
514 procedure CabinetPanelHide(Sender: TObject);
515 procedure FormClose(Sender: TObject; var Action: TCloseAction);
516 procedure TreeViewChange(Sender: TObject; Node: TTreeNode);
517 procedure ListViewData(Sender: TObject; Item: TListItem);
518 procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
519 const FindString: String; const FindPosition: TPoint;
520 FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection;
521 Wrap: Boolean; var Index: Integer);
522 procedure ListViewDataHint(Sender: TObject; StartIndex,
524 procedure ListViewDataStateChange(Sender: TObject; StartIndex,
525 EndIndex: Integer; OldState, NewState: TItemStates);
526 procedure BrowserStatusTextChange(Sender: TObject;
527 const Text: WideString);
528 procedure BrowserTitleChange(Sender: TObject; const Text: WideString);
529 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
530 procedure TreeViewChanging(Sender: TObject; Node: TTreeNode;
531 var AllowChange: Boolean);
532 procedure ListViewKeyDown(Sender: TObject; var Key: Word;
534 procedure ListViewColumnClick(Sender: TObject; Column: TListColumn);
535 procedure MenuToolBarCustomDrawButton(Sender: TToolBar;
536 Button: TToolButton; State: TCustomDrawState;
537 var DefaultDraw: Boolean);
538 procedure BrowserBeforeNavigate2(Sender: TObject;
539 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
540 Headers: OleVariant; var Cancel: WordBool);
541 procedure ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
542 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
543 var DefaultDraw: Boolean);
544 procedure TreeViewCustomDraw(Sender: TCustomTreeView;
545 const ARect: TRect; var DefaultDraw: Boolean);
546 procedure TreeViewCustomDrawItem(Sender: TCustomTreeView;
547 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
548 procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode);
549 procedure TreeViewDblClick(Sender: TObject);
550 procedure FavoriteTreeViewClick(Sender: TObject);
551 procedure ListViewCustomDraw(Sender: TCustomListView;
552 const ARect: TRect; var DefaultDraw: Boolean);
553 procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton;
554 Shift: TShiftState; X, Y: Integer);
555 procedure TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
556 procedure MessageListViewResize(Sender: TObject);
557 procedure ExitActionExecute(Sender: TObject);
558 procedure AllSelectActionExecute(Sender: TObject);
559 procedure StdToolBarVisibleActionExecute(Sender: TObject);
560 procedure MsgBarVisibleActionExecute(Sender: TObject);
561 procedure StatusBarVisibleActionExecute(Sender: TObject);
562 procedure LargeIconActionExecute(Sender: TObject);
563 procedure SmallIconActionExecute(Sender: TObject);
564 procedure ListIconActionExecute(Sender: TObject);
565 procedure DetailIconActionExecute(Sender: TObject);
566 procedure SearchActionExecute(Sender: TObject);
567 procedure OptionActionExecute(Sender: TObject);
568 procedure GikoNaviWebPageActionExecute(Sender: TObject);
569 procedure AboutActionExecute(Sender: TObject);
570 procedure Cabinet2chActionExecute(Sender: TObject);
571 procedure CabinetHistoryActionExecute(Sender: TObject);
572 procedure CabinetVisibleActionExecute(Sender: TObject);
573 procedure AllItemActionExecute(Sender: TObject);
574 procedure LogItemActionExecute(Sender: TObject);
575 procedure NewItemActionExecute(Sender: TObject);
576 procedure SelectItemActionExecute(Sender: TObject);
577 procedure ListNumberVisibleActionExecute(Sender: TObject);
578 procedure UpFolderActionExecute(Sender: TObject);
579 procedure IconStyleExecute(Sender: TObject);
580 procedure RoundActionExecute(Sender: TObject);
581 procedure StopActionExecute(Sender: TObject);
582 procedure MsgBarCloseActionExecute(Sender: TObject);
583 procedure BrowserMaxActionExecute(Sender: TObject);
584 procedure ScrollTopActionExecute(Sender: TObject);
585 procedure ScrollLastActionExecute(Sender: TObject);
586 procedure ScrollNewActionExecute(Sender: TObject);
587 procedure ScrollKokoActionExecute(Sender: TObject);
588 procedure EditorActionExecute(Sender: TObject);
589 procedure IEActionExecute(Sender: TObject);
590 procedure ShowThreadActionExecute(Sender: TObject);
591 procedure ShowBoardActionExecute(Sender: TObject);
592 procedure URLCopyActionExecute(Sender: TObject);
593 procedure ItemReloadActionExecute(Sender: TObject);
594 procedure SelectListReloadActionExecute(Sender: TObject);
595 procedure SelectThreadReloadActionExecute(Sender: TObject);
596 procedure SelectListReloadActionUpdate(Sender: TObject);
597 procedure AllItemActionUpdate(Sender: TObject);
598 procedure LogItemActionUpdate(Sender: TObject);
599 procedure NewItemActionUpdate(Sender: TObject);
600 procedure SelectItemActionUpdate(Sender: TObject);
601 procedure UpFolderActionUpdate(Sender: TObject);
602 procedure FormResize(Sender: TObject);
603 procedure ScrollTopActionUpdate(Sender: TObject);
604 procedure ScrollLastActionUpdate(Sender: TObject);
605 procedure ScrollNewActionUpdate(Sender: TObject);
606 procedure ScrollKokoActionUpdate(Sender: TObject);
607 procedure EditorActionUpdate(Sender: TObject);
608 procedure IEActionUpdate(Sender: TObject);
609 procedure ShowThreadActionUpdate(Sender: TObject);
610 procedure ShowBoardActionUpdate(Sender: TObject);
611 procedure SelectThreadReloadActionUpdate(Sender: TObject);
612 procedure ListViewSelectItem(Sender: TObject; Item: TListItem;
614 procedure SelectTimerTimer(Sender: TObject);
615 procedure ItemReloadActionUpdate(Sender: TObject);
616 procedure ListViewDblClick(Sender: TObject);
617 procedure LogDeleteActionExecute(Sender: TObject);
618 procedure KokomadeActionExecute(Sender: TObject);
619 procedure ZenbuActionExecute(Sender: TObject);
620 procedure KokoResActionExecute(Sender: TObject);
621 procedure ListPopupMenuPopup(Sender: TObject);
622 procedure SelectItemURLCopyActionExecute(Sender: TObject);
623 procedure SelectItemURLCopyActionUpdate(Sender: TObject);
624 procedure AllSelectActionUpdate(Sender: TObject);
625 procedure LogDeleteActionUpdate(Sender: TObject);
626 procedure BrowserTabCloseActionExecute(Sender: TObject);
627 procedure NotSelectTabCloseActionExecute(Sender: TObject);
628 procedure TreeSelectBoradReloadExecute(Sender: TObject);
629 procedure TreeSelectThreadReloadExecute(Sender: TObject);
630 procedure TreeSelectURLCopyExecute(Sender: TObject);
631 procedure TreePopupMenuPopup(Sender: TObject);
632 procedure ListToolBarVisibleActionExecute(Sender: TObject);
633 procedure BrowserToolBarVisibleActionExecute(Sender: TObject);
634 procedure BrowserNewWindow2(Sender: TObject; var ppDisp: IDispatch;
635 var Cancel: WordBool);
636 procedure ListSplitterCanResize(Sender: TObject; var NewSize: Integer;
637 var Accept: Boolean);
638 procedure ListSplitterMoved(Sender: TObject);
639 procedure BrowserTabChange(Sender: TObject);
640 procedure BrowserTabMouseDown(Sender: TObject; Button: TMouseButton;
641 Shift: TShiftState; X, Y: Integer);
642 procedure BrowserTabDragOver(Sender, Source: TObject; X, Y: Integer;
643 State: TDragState; var Accept: Boolean);
644 procedure BrowserTabDragDrop(Sender, Source: TObject; X, Y: Integer);
645 procedure BrowserTabMouseMove(Sender: TObject; Shift: TShiftState; X,
647 procedure BrowserDocumentComplete(Sender: TObject;
648 const pDisp: IDispatch; var URL: OleVariant);
649 procedure SelectReservActionUpdate(Sender: TObject);
650 procedure RoundNamePopupMenuPopup(Sender: TObject);
651 procedure SelectNewRoundNameExecute(Sender: TObject);
652 procedure SelectDeleteRoundExecute(Sender: TObject);
653 procedure SelectReservActionExecute(Sender: TObject);
654 procedure NewBoardActionExecute(Sender: TObject);
655 procedure LoginActionExecute(Sender: TObject);
656 procedure KeySettingActionExecute(Sender: TObject);
657 procedure AllTabCloseActionExecute(Sender: TObject);
658 procedure ArrangeActionExecute(Sender: TObject);
659 procedure NameURLCopyActionExecute(Sender: TObject);
660 procedure SelectItemNameURLCopyActionExecute(Sender: TObject);
661 procedure URLCopyActionUpdate(Sender: TObject);
662 procedure NameURLCopyActionUpdate(Sender: TObject);
663 procedure BrowserTabCloseActionUpdate(Sender: TObject);
664 procedure NotSelectTabCloseActionUpdate(Sender: TObject);
665 procedure AllTabCloseActionUpdate(Sender: TObject);
666 procedure SelectItemNameURLCopyActionUpdate(Sender: TObject);
667 procedure ActiveLogDeleteActionExecute(Sender: TObject);
668 procedure ActiveLogDeleteActionUpdate(Sender: TObject);
669 procedure ListNameBarVisibleActionExecute(Sender: TObject);
670 procedure BrowserNameBarVisibleActionExecute(Sender: TObject);
671 procedure TreeSelectNameURLCopyExecute(Sender: TObject);
672 procedure PaneInitActionExecute(Sender: TObject);
673 procedure FormShow(Sender: TObject);
674 procedure BrowserTabToolBarResize(Sender: TObject);
675 procedure BrowserMinActionExecute(Sender: TObject);
676 procedure SelectTextClearActionExecute(Sender: TObject);
677 procedure NameTextClearActionExecute(Sender: TObject);
678 procedure MailTextClearActionExecute(Sender: TObject);
679 procedure LeftmostTabSelectActionExecute(Sender: TObject);
680 procedure LeftTabSelectActionExecute(Sender: TObject);
681 procedure RightTabSelectActionExecute(Sender: TObject);
682 procedure RightmostTabSelectActionExecute(Sender: TObject);
683 procedure LeftmostTabSelectActionUpdate(Sender: TObject);
684 procedure LeftTabSelectActionUpdate(Sender: TObject);
685 procedure RightTabSelectActionUpdate(Sender: TObject);
686 procedure RightmostTabSelectActionUpdate(Sender: TObject);
687 procedure FavoriteMenuClick(Sender: TObject);
688 procedure FavoriteAddActionExecute(Sender: TObject);
689 procedure FavoriteAddActionUpdate(Sender: TObject);
690 procedure BoardFavoriteAddActionExecute(Sender: TObject);
691 procedure BoardFavoriteAddActionUpdate(Sender: TObject);
692 procedure ThreadFavoriteAddActionExecute(Sender: TObject);
693 procedure ThreadFavoriteAddActionUpdate(Sender: TObject);
694 procedure TreeSelectFavoriteAddActionExecute(Sender: TObject);
695 procedure FavoriteArrangeActionExecute(Sender: TObject);
696 procedure MainCoolBarResize(Sender: TObject);
697 procedure MoveToActionExecute(Sender: TObject);
698 procedure AddressToolBarResize(Sender: TObject);
699 procedure AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
701 procedure AddressBarVisibleActionExecute(Sender: TObject);
702 procedure BrowserEnter(Sender: TObject);
703 procedure FormShortCut(var Msg: TWMKey; var Handled: Boolean);
704 procedure BrowserTabVisibleActionExecute(Sender: TObject);
705 procedure BrowserTabTopActionExecute(Sender: TObject);
706 procedure BrowserTabBottomActionExecute(Sender: TObject);
707 procedure BrowserTabTabStyleActionExecute(Sender: TObject);
708 procedure BrowserTabButtonStyleActionExecute(Sender: TObject);
709 procedure BrowserTabFlatStyleActionExecute(Sender: TObject);
710 procedure PreviewTimerTimer(Sender: TObject);
711 procedure MessageHideButtonClick(Sender: TObject);
712 procedure MonazillaWebPageActionExecute(Sender: TObject);
713 procedure GikoHelpActionExecute(Sender: TObject);
714 procedure ToolButton18Click(Sender: TObject);
715 procedure KotehanActionExecute(Sender: TObject);
716 procedure LinkBarVisibleActionExecute(Sender: TObject);
717 procedure BBS2chWebPageActionExecute(Sender: TObject);
718 procedure GikoFolderOpenActionExecute(Sender: TObject);
719 procedure MainCoolBarBandInfo(Sender: TObject;
720 var BandInfo: PReBarBandInfoA);
721 procedure MainCoolBarChevronClick(Sender: TObject;
722 RebarChevron: PNMRebarChevron);
723 procedure ListCoolBarBandInfo(Sender: TObject;
724 var BandInfo: PReBarBandInfoA);
725 procedure ListCoolBarChevronClick(Sender: TObject;
726 RebarChevron: PNMRebarChevron);
727 procedure BrowserCoolBarBandInfo(Sender: TObject;
728 var BandInfo: PReBarBandInfoA);
729 procedure BrowserCoolBarChevronClick(Sender: TObject;
730 RebarChevron: PNMRebarChevron);
731 procedure ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
732 procedure ThreadEditorActionExecute(Sender: TObject);
733 procedure ThreadEditorActionUpdate(Sender: TObject);
734 procedure ToolBarSettingActionExecute(Sender: TObject);
735 procedure NameCopyActionExecute(Sender: TObject);
736 procedure BoardIEActionExecute(Sender: TObject);
737 procedure SelectItemNameCopyActionExecute(Sender: TObject);
738 procedure SelectItemNameCopyActionUpdate(Sender: TObject);
739 procedure BoardIEActionUpdate(Sender: TObject);
740 procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
741 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
742 procedure NameCopyActionUpdate(Sender: TObject);
743 procedure SelectComboBoxChange(Sender: TObject);
744 procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
746 procedure SelectComboBoxExit(Sender: TObject);
747 procedure NG1Click(Sender: TObject);
748 procedure SelectResActionExecute(Sender: TObject);
749 procedure SelectResActionUpdate(Sender: TObject);
750 procedure FormKeyDown(Sender: TObject; var Key: Word;
752 procedure FormKeyUp(Sender: TObject; var Key: Word;
754 procedure AllResActionExecute(Sender: TObject);
755 procedure AllResActionUpdate(Sender: TObject);
756 procedure ReloadClick(Sender: TObject);
757 procedure GoBackClick(Sender: TObject);
758 procedure GoFowardClick(Sender: TObject);
759 procedure SelectComboBoxSplitterMouseMove(Sender: TObject;
760 Shift: TShiftState; X, Y: Integer);
761 procedure SelectComboBoxSplitterMouseDown(Sender: TObject;
762 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
763 procedure SelectComboBoxSplitterMouseUp(Sender: TObject;
764 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
765 procedure StatusBarResize(Sender: TObject);
766 procedure IndividualAbon1Click(Sender: TObject);
767 procedure IndividualAbon2Click(Sender: TObject);
768 procedure N42Click(Sender: TObject);
769 procedure SelectComboBoxEnter(Sender: TObject);
770 procedure AntiIndividualAbonClick(Sender: TObject);
771 procedure N51Click(Sender: TObject);
772 procedure TreeSelectSearchBoardNameExecute(Sender: TObject);
773 procedure CabinetFavoriteActionExecute(Sender: TObject);
774 procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
776 procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
777 procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode;
779 procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
781 procedure FavoriteTreePopupMenuPopup(Sender: TObject);
782 procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject);
783 procedure FavoriteTreeViewRenameActionExecute(Sender: TObject);
784 procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject);
785 procedure ToolButton19Click(Sender: TObject);
786 procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject);
787 procedure FavoriteTreeViewChange(Sender: TObject; Node: TTreeNode);
788 procedure FavoriteTreeViewDblClick(Sender: TObject);
789 procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject);
790 procedure FavoriteTreeViewReloadActionExecute(Sender: TObject);
791 procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
792 procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
793 procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject);
794 procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer);
795 procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton;
796 Shift: TShiftState; X, Y: Integer);
797 procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer;
798 State: TDragState; var Accept: Boolean);
799 procedure OnlyAHundredResExecute(Sender: TObject);
800 procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
802 procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
803 var Handled: Boolean);
804 procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
805 var Handled: Boolean);
806 procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint;
807 var Handled: Boolean);
808 procedure ExportFavoriteFileAccept(Sender: TObject);
809 procedure ExportFavoriteFileBeforeExecute(Sender: TObject);
816 FEnabledCloseButton: Boolean;
817 // ThreadCreate: TThreadCreate;
819 FClickNode: TTreeNode;
822 FPreviewBrowser: TPreviewBrowser;
825 FBrowserSizeHeight: Integer;
826 FBrowserSizeWidth: Integer;
828 // FFavorite: TFavorite;
829 FBrowserComplete: Boolean;
830 FTabHintIndex: Integer;
831 FListStyle: TViewStyle; //
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93\83X
\83^
\83C
\83\8b
832 FItemNoVisible: Boolean; //
\83\8a\83X
\83g
\94Ô
\8d\86\95\
\8e¦
\83t
\83\89\83O
833 FViewType: TGikoViewType; //
\83\8a\83X
\83g
\83A
\83C
\83e
\83\80\95\
\8e¦
\83^
\83C
\83v
834 FActiveList: TObject;
835 FActiveContent: TThreadItem; //
836 FHistoryList: TList; //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
837 FTreeType: TGikoTreeType;
841 // FLastRoundTime: TDateTime;
842 BrowserNullTab: TThreadItem;
843 // DoubleClickOccurred: array [TMouseButton] of Boolean;
844 FDownloadTitle: string; //
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86\82Ì
\83^
\83C
\83g
\83\8b\96¼
845 FDownloadMax: Integer; //
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86\82Ì
\8dÅ
\91å
\83T
\83C
\83Y
846 FEvent: THTMLDocumentEventSink;//
\83u
\83\89\83E
\83U
\83h
\83L
\83\85\83\81\83\93\83g
\83C
\83x
\83\93\83g
848 Fkeynum : Integer; //
\83L
\81[
\83{
\81[
\83h
\83\8c\83X
\83|
\83b
\83v
\83A
\83b
\83v
\97p
850 IsDraggingSelectComboBox : Boolean;
851 DraggingSelectComboBoxPosition : TPoint;
853 FSearchDialog: TSearchDialog;
855 FDropSpaceNode: TTreeNode;
857 FDragTime : Cardinal; //
\83\8a\83\93\83N
\82ÌD&D
\97p
858 FDragButton : TToolButton; //
\83\8a\83\93\83N
\82ÌD&D
\97p
\82ÉDrag
\82µ
\82Ä
\82éButton
\95Û
\91¶
859 FDragWFirst : Boolean; //WebTab
\82ÌD&D
\97p
861 FListViewBackGroundColor : TColor; //ListView
\82ÌBackGroundColor
862 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¦
863 FOddColor : TColor; //
\82»
\82Ì
\90F
864 procedure SetBoardTreeNode;
865 function SetCategoryListItem(ABBS2ch: TBBS2ch): Integer;
866 function SetBoardListItem(Category: TCategory): Integer;
867 function SetThreadListItem(Board: TBoard): Integer;
868 // function GetRoundName(index: integer): string;
870 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
871 procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
872 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer);
873 procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
874 procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
876 procedure SetActiveList(Obj: TObject);
878 procedure ListDoubleClick;
879 procedure BrowserMovement(AName: string);
880 procedure SelectListItem(List: TList);
881 // procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
882 procedure DeleteTab(ThreadItem: TThreadItem);
883 function Hook(var Message: TMessage): Boolean;
884 procedure AddRoundNameMenu(MenuItem: TMenuItem);
885 procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
886 procedure SetSelectRoundName(Sender: TObject);
887 function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
889 procedure SetMenuFont;
890 // procedure CreateFavMenu(Folder: TFavoriteFolder);
891 procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
892 procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload;
893 procedure FavoriteClick(Sender: TObject); overload;
894 procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
895 procedure SelectTreeNode(Item: TObject; CallEvent: Boolean);
896 function OnDocumentContextMenu(Sender: TObject): WordBool;
897 // function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
898 procedure SetResPopupText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean);
899 procedure ShowTextPopup;
900 //procedure ShowTextPopup(HintData: THintData);
901 // procedure SetStdToolBar;
902 // function GetAction(ActionName: string): TContainedAction;
903 procedure SetLinkBar;
904 function GetWidthAllToolButton(ToolBar: TToolBar): Integer;
905 procedure MenuBarChevronMenu;
906 procedure LinkBarChevronMenu;
907 procedure ToolBarChevronMenu(ToolBar: TToolBar);
908 procedure ModifySelectList;
909 procedure FavoriteBrowseFolder( node: TTreeNode );
910 procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
911 procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
912 procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
913 procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
914 procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
915 function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
916 procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
917 procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
918 procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
920 procedure BrowserTabClick(Sender: TObject);
921 procedure SetListViewBackGroundColor(value: TColor);
923 procedure CreateParams(var Params: TCreateParams); override;
924 procedure WndProc(var Message: TMessage); override;
925 procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR;
926 procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE;
927 procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA;
930 // FDownload: TDownload;
931 FControlThread: TThreadControl;
932 procedure MoveToURL(URL: string);
933 procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
935 function GetHttpState: Boolean;
936 procedure SetEnabledCloseButton(Enabled: Boolean);
937 function GetTreeNode(Data: TObject): TTreeNode;
938 procedure AppFormDeactivate(Sender: TObject);
939 // procedure CabinetPanelVisible(PanelVisible: Boolean);
940 procedure ListViewAllSelect;
942 property ListStyle: TViewStyle read FListStyle write FListStyle;
943 property ItemNoVisible: Boolean read FItemNoVisible write FItemNoVisible;
944 property ViewType: TGikoViewType read FViewType write FViewType;
946 property NameCookie: string read FNameCookie write FNameCookie;
947 property MailCookie: string read FMailCookie write FMailCookie;
949 procedure SetContent(ThreadItem: TThreadItem);
950 function GetActiveContent: TThreadItem;
951 function GetActiveList: TObject;
953 property ActiveList: TObject read GetActiveList write SetActiveList;
954 // property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
956 procedure SetListViewType(AViewType: TGikoViewType); overload;
957 procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload;
958 procedure DownloadContent(ThreadItem: TThreadItem);
959 procedure DownloadList(Board: TBoard);
960 procedure PlaySound(SoundEventName: string);
962 function AddHistory(ThreadItem: TThreadItem): Boolean;
963 procedure DeleteHistory(ThreadItem: TThreadItem);
964 procedure ClearHistory;
965 procedure Show2chTree;
966 procedure ShowHistoryTree;
967 procedure SetHistoryTreeNode;
968 // procedure SelectTreeNode(Item: TObject);
969 procedure AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
970 procedure SetBrowserTabState;
971 // property Favorite: TFavorite read FFavorite write FFavorite;
972 procedure SetToolBarPopup;
973 procedure ShowFavoriteAddDialog( Item : TObject );
974 property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
975 property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
976 property OddColor : TColor read FOddColor write FOddColor;
979 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
982 TFavoriteMenuItem = class(TMenuItem)
986 property Data: Pointer read FData write FData;
989 TLinkToolButton = class(TToolButton)
993 property Data: Pointer read FData write FData;
1002 About, Option, Round, Splash, Sort, ListSelect,
1006 CAPTION_NAME: string = '
\83M
\83R
\83i
\83r';
1007 BLANK_HTML: string = 'about:blank';
1008 SELECTCOMBOBOX_NAME: string = ''; // '
\83X
\83\8c\83b
\83h
\8di
\8d\9e\8c\9f\8dõ';
1009 SELECTCOMBOBOX_COLOR: TColor = clWindow;
1011 DandD_THRESHOLD = 5; //D&D
\82Ìè
\87\92l
\81ipixcel)
1012 //
\83c
\83\8a\81[
\81E
\83\8a\83X
\83g
\83A
\83C
\83R
\83\93
1013 ITEM_ICON_2CH1 = 0; //2ch
\83A
\83C
\83R
\83\93
1014 ITEM_ICON_2CH2 = 1; //2ch
\83A
\83C
\83R
\83\93
1015 ITEM_ICON_CATEGORY1 = 2; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1016 ITEM_ICON_CATEGORY2 = 3; //
\83J
\83e
\83S
\83\8a\83A
\83C
\83R
\83\93
1017 ITEM_ICON_BOARD1 = 4; //
\94Â
\83A
\83C
\83R
\83\93
1018 ITEM_ICON_BOARD2 = 5; //
\94Â
\83A
\83C
\83R
\83\93
1019 ITEM_ICON_THREADLOG1 = 6; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1020 ITEM_ICON_THREADLOG2 = 7; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82 \82è
\81j
1021 ITEM_ICON_THREAD1 = 8; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1022 ITEM_ICON_THREAD2 = 9; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\83\8d\83O
\82È
\82µ
\81j
1023 ITEM_ICON_THREADNEW1 = 10; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1024 ITEM_ICON_THREADNEW2 = 11; //
\83X
\83\8c\83A
\83C
\83R
\83\93\81i
\90V
\92\85\81j
1025 ITEM_ICON_SORT1 = 12; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1026 ITEM_ICON_SORT2 = 13; //
\83\
\81[
\83g
\83A
\83C
\83R
\83\93
1028 //
\83c
\81[
\83\8b\83o
\81[
\83A
\83C
\83R
\83\93
1029 TOOL_ICON_HEIGHT_MAX = 16; //
\8d\82\82³
\8dÅ
\91å
\83A
\83C
\83R
\83\93
1030 TOOL_ICON_HEIGHT_MIN = 17; //
\8d\82\82³
\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1031 TOOL_ICON_HEIGHT_NORMAL = 18; //
\8d\82\82³
\95W
\8f\80\83A
\83C
\83R
\83\93
1032 TOOL_ICON_WIDTH_MAX = 19; //
\95\9d\8dÅ
\91å
\83A
\83C
\83R
\83\93
1033 TOOL_ICON_WIDTH_MIN = 20; //
\95\9d\8dÅ
\8f¬
\83A
\83C
\83R
\83\93
1034 TOOL_ICON_WIDTH_NORMAL = 21; //
\95\9d\95W
\8f\80\83A
\83C
\83R
\83\93
1036 TOOL_ICON_FAV_FOLDER = 30; //
\82¨
\8bC
\82É
\93ü
\82è
\83t
\83H
\83\8b\83_
\83A
\83C
\83R
\83\93
1037 TOOL_ICON_FAV_BOARD = 31; //
\82¨
\8bC
\82É
\93ü
\82è
\94Â
\83A
\83C
\83R
\83\93
1038 TOOL_ICON_FAV_THREAD = 32; //
\82¨
\8bC
\82É
\93ü
\82è
\83X
\83\8c\83A
\83C
\83R
\83\93
1040 HTML_FILE_NAME = 'temp_preview.html';
1044 procedure TGikoForm.CreateParams(var Params: TCreateParams);
1047 if FormStyle in [fsNormal, fsStayOnTop] then begin
1048 if BorderStyle in [bsSingle, bsSizeable] then begin
1049 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
1050 Params.WndParent := 0;
1055 procedure TGikoForm.FormCreate(Sender: TObject);
1057 TVS_NOTOOLTIPS = $0080;
1063 wp: TWindowPlacement;
1068 Writeln('============================================================');
1069 Writeln('
\83M
\83R
\83i
\83r
\83f
\83o
\83b
\83O
\83R
\83\93\83\
\81[
\83\8b');
1071 Writeln('
\82±
\82Ì
\89æ
\96Ê
\82ð
\95Â
\82¶
\82È
\82¢
\82Å
\82
\82¾
\82³
\82¢
\81B');
1072 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¢');
1073 Writeln('============================================================');
1075 Application.OnDeactivate := AppFormDeactivate;
1076 Self.OnDeactivate := AppFormDeactivate;
1077 Application.HookMainWindow(Hook);
1079 FTreeType := gttNone;
1081 FSearchDialog := nil;
1083 //
\8eè
\82Ì
\83J
\81[
\83\
\83\8b
1084 Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
1086 //
\8f\84\89ñ
\83f
\81[
\83^
\93Ç
\82Ý
\8d\9e\82Ý
1087 RoundList := TRoundList.Create;
1088 RoundList.LoadRoundFile;
1091 BBS2ch := TBBS2ch.Create(GikoSys.Setting.LogFolder);
1093 //
\82¨
\8bC
\82É
\93ü
\82è
\93Ç
\82Ý
\8d\9e\82Ý
1094 // FFavorite := TFavorite.Create(FavoriteTreeView);
1095 FavoriteDM.SetFavTreeView(FavoriteTreeView);
1096 FavoriteDM.ReadFavorite;
1098 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\93Ç
\82Ý
\8d\9e\82Ý
1099 AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1101 //
\8aO
\95\94\94Â
\83v
\83\89\83O
\83C
\83\93\82ð
\83\8d\81[
\83h(ReadBoardFile
\82æ
\82è
\90æ
\82É
\8ds
\82¤
\82±
\82Æ)
1102 InitializeBoardPlugIns;
1104 EnabledCloseButton := True;
1105 BoardGroup.BBS2ch.ReadBoardFile; //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\93Ç
\8d\9e
1106 // SetBoardTreeNode; //
\83c
\83\8a\81[
\82É
\83{
\81[
\83h
\92Ç
\89Á
1108 //
\83\8a\83X
\83g
\83X
\83^
\83C
\83\8b
1109 ListView.ViewStyle := GikoSys.Setting.ListStyle;
1111 //
\83\81\83C
\83\93\83N
\81[
\83\8b\83o
\81[
\88Ê
\92u
1112 // MainCoolBar.Top := 0;
1113 // MainCoolBar.Left := 0;
1115 //
\83A
\83j
\83\81\83p
\83l
\83\8b\88Ê
\92u
1116 AnimePanel.Top := 0;
1117 AnimePanel.Left := 0;
1119 //
\8ae
\8eí
\89Â
\8e\8b\8fó
\91Ô
\82È
\82Ç
\90Ý
\92è
1121 //
\83L
\83\83\83r
\83l
\83b
\83g
1122 CabinetVisibleAction.Checked := not GikoSys.Setting.CabinetVisible;
1123 CabinetVisibleAction.Execute;
1124 CabinetPanel.Width := GikoSys.Setting.CabinetWidth;
1126 //
\83\81\83b
\83Z
\81[
\83W
\83o
\81[
1127 MsgBarVisibleAction.Checked := GikoSys.Setting.MessageBarVisible;
1128 MsgBarVisibleActionExecute(nil);
1129 MessagePanel.Height := GikoSys.Setting.MessegeBarHeight;
1131 //
\83X
\83e
\81[
\83^
\83X
\83o
\81[
1132 StatusBarVisibleAction.Checked := GikoSys.Setting.StatusBarVisible;
1133 StatusBarVisibleActionExecute(nil);
1135 //
\83t
\83H
\83\93\83g
\81E
\90F
\90Ý
\92è
1136 TreeView.Items.BeginUpdate;
1137 FavoriteTreeView.Items.BeginUpdate;
1138 ListView.Items.BeginUpdate;
1140 TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1141 TreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1142 TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1143 TreeView.Color := GikoSys.Setting.CabinetBackColor;
1145 FavoriteTreeView.Font.Name := GikoSys.Setting.CabinetFontName;
1146 FavoriteTreeView.Font.Size := GikoSys.Setting.CabinetFontSize;
1147 FavoriteTreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
1148 FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
1150 ListView.Font.Name := GikoSys.Setting.ListFontName;
1151 ListView.Font.Size := GikoSys.Setting.ListFontSize;
1152 ListView.Font.Color := GikoSys.Setting.ListFontColor;
1153 //ListView.Color := GikoSys.Setting.ListBackColor;
1154 ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
1155 FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
1156 FOddColor := GikoSys.Setting.OddColor;
1159 TreeView.Items.EndUpdate;
1160 FavoriteTreeView.Items.EndUpdate;
1161 ListView.Items.EndUpdate;
1163 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
1164 ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
1166 //
\83u
\83\89\83E
\83U
\83^
\83u
\83t
\83H
\83\93\83g
1167 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
1168 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
1169 FDragWFirst := false;
1171 // TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
1172 // TreeView.Selected := TreeView.Items[0]; //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
1173 SetContent(nil); //
\83u
\83\89\83E
\83U
\82ð
\8bó
\94\92\95\
\8e¦
1175 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95\9c\8c³
1176 wp.length := sizeof(wp);
1177 wp.rcNormalPosition.Top := GikoSys.Setting.WindowTop;
1178 wp.rcNormalPosition.Left := GikoSys.Setting.WindowLeft;
1179 wp.rcNormalPosition.Bottom := GikoSys.Setting.WindowTop + GikoSys.Setting.WindowHeight;
1180 wp.rcNormalPosition.Right := GikoSys.Setting.WindowLeft + GikoSys.Setting.WindowWidth;
1181 wp.showCmd := SW_HIDE;
1182 SetWindowPlacement(Handle, @wp);
1184 // SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop,
1185 // GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight);
1186 if GikoSys.Setting.WindowMax then
1187 WindowState := wsMaximized;
1189 //
\83M
\83R
\83A
\83j
\83\81
1191 FileName := GikoSys.GetAppDir + 'gikoNavi.avi';
1192 if FileExists(FileName) then
1193 Animate.FileName := FileName;
1196 // AnimePanel.Height := 26;
1197 // AnimePanel.Width := 39;
1198 // AnimePanel.Top := 2;
1199 // AnimePanel.Left := Width - 48;
1205 //
\83X
\83\8c\91S
\95\94\95\
\8e¦
\83{
\83^
\83\93\82ð
\89\9f\82³
\82ê
\82½
\8fó
\91Ô
\82É
\82·
\82é
1206 AllItemAction.Checked := True;
1207 AllResAction.Checked := True;
1209 //TreeView
\82Ì
\8e×
\96\82\8fL
\82¢ToolTip
\82ð
\94ñ
\95\
\8e¦
1210 Style := GetWindowLong(TreeView.Handle, GWL_STYLE);
1211 Style := Style or TVS_NOTOOLTIPS;
1212 SetWindowLong(TreeView.Handle, GWL_STYLE, Style);
1214 //
\83c
\83\8a\81[
\82ð
\83\81\83C
\83\93\82¾
\82¯
\95\
\8e¦
\82É
\82µ
\82Ä
\8dÅ
\91å
\89»
1215 TreeView.Align := alClient;
1216 FavoriteTreeView.Align := alClient;
1217 FavoriteTreeView.Visible := False;
1219 //
\83u
\83\89\83E
\83U
\83T
\83C
\83Y
\95Ï
\8dX
\82Ì
\8f\89\8aú
\89»
1220 // FBrowserSizeFlag := False;
1221 // FBrowserSizeHeight := ViewPanel.Height;
1223 FBrowserSizeHeight := GikoSys.Setting.ListHeight;
1224 FBrowserSizeWidth := GikoSys.Setting.ListWidth;
1226 ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
1227 ArrangeAction.Execute;
1229 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
1230 case GikoSys.Setting.ListWidthState of
1232 ViewPanel.Width := 1;
1233 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1234 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1237 ViewPanel.Width := GikoSys.Setting.ListWidth;
1238 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1239 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
1242 ViewPanel.Width := GikoSys.Setting.ListWidth;
1243 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
1244 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
1247 // if GikoSys.Setting.ListWidthMax then begin
1248 // ViewPanel.Width := 1;
1249 // BrowserSizeAction.ImageIndex := ICON_WIDTH_MIN;
1251 // ViewPanel.Width := GikoSys.Setting.ListWidth;
1252 // BrowserSizeAction.ImageIndex := ICON_WIDTH_MAX;
1255 case GikoSys.Setting.ListHeightState of
1257 ViewPanel.Height := 1;
1258 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1259 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1262 ViewPanel.Height := GikoSys.Setting.ListHeight;
1263 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1264 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
1267 ViewPanel.Height := GikoSys.Setting.ListHeight;
1268 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
1269 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
1272 // if GikoSys.Setting.ListHeightState = glsMax then begin
1274 // ViewPanel.Height := GikoSys.Setting.ListHeight;
1275 // BrowserSizeAction.ImageIndex := ICON_HEIGHT_MAX;
1279 //
\83v
\83\8d\83O
\83\8c\83X
\83o
\81[
\82Ì
\8f\89\8aú
\89»
1280 // ProgressBar.Visible := False;
1281 ProgressBar.Parent := StatusBar;
1282 ProgressBar.Top := 2;
1283 ProgressBar.Left := 0;
1284 ProgressBar.Width := StatusBar.Panels[0].Width;
1285 ProgressBar.Height := StatusBar.Height - 2;
1286 ProgressBar.Position := 0;
1288 //
\83c
\81[
\83\8b\83o
\81[
\95\
\8e¦
1289 //formshow()
\82É
\88Ú
\93®
1291 //
\83_
\83E
\83\93\83\8d\81[
\83h
\83I
\83u
\83W
\83F
\83N
\83g
1292 // FDownload := TDownload.Create;
1293 // FDownload.OnDownloadEnd := OnDonloadEnd;
1294 // FDownload.OnWork := Work;
1295 // FDownload.OnWorkBegin := WorkBegin;
1296 // FDownload.OnWorkEnd := WorkEnd;
1298 //
\83_
\83E
\83\93\83\8d\81[
\83h
\83I
\83u
\83W
\83F
\83N
\83g
1299 FControlThread := TThreadControl.Create(True);
1300 FControlThread.MaxThreadCount := 1;
1301 FControlThread.Resume;
1302 FControlThread.OnDownloadEnd := DownloadEnd;
1303 FControlThread.OnDownloadMsg := DownloadMsg;
1304 FControlThread.OnWork := Work;
1305 FControlThread.OnWorkBegin := WorkBegin;
1306 FControlThread.OnWorkEnd := WorkEnd;
1307 // ProgressPanel.Width := FControlThread.MaxThreadCount * 12;
1309 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
1310 FHistoryList := TList.Create;
1312 //
\8di
\8d\9e\8c\9f\8dõ
\97\9a\97ð
1313 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
1315 //
\83u
\83\89\83E
\83U
\83^
\83u
\90Ý
\92è
1318 BrowserBoardNameLabel.Caption := '';
1319 BrowserNameLabel.Caption := '';
1322 // DetailIconAction.Execute;
1324 // FBrowserSizeHeight := ViewPanel.Height;
1325 FTabHintIndex := -1;
1327 //
\83\8d\83O
\83t
\83H
\83\8b\83_
\82ª
\91¶
\8dÝ
\82µ
\82È
\82¢
\8fê
\8d\87\82Í
\8dì
\90¬
\82·
\82é
1328 // if not GikoSys.DirectoryExistsEx(BBS2ch.GetLogFolder) then begin
1329 // GikoSys.ForceDirectoriesEx(BBS2ch.GetLogFolder);
1331 // FormResize(Sender);
1332 // MainCoolBarResize(Sender);
1333 // Application.ProcessMessages;
1335 //
\83\8a\83\93\83N
\83o
\81[
1338 //
\83\81\83j
\83\85\81[
\83t
\83H
\83\93\83g
1341 //
\83c
\81[
\83\8b\83o
\81[Wrapable
1342 ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable;
1343 BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable;
1345 //
\83c
\81[
\83\8b\83{
\83^
\83\93\93Ç
\82Ý
\8d\9e\82Ý
1346 ReadToolBarSetting(ActionList, StdToolBar);
1347 ReadToolBarSetting(ActionList, ListToolBar);
1349 for i := ListToolBar.ControlCount - 1 downto 0 do
1351 if ListToolBar.Controls[ i ].Action = SelectItemAction then
1353 //
\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·
1354 if (i + 1) < ListToolBar.ControlCount then
1355 if ListToolBar.Controls[ i + 1 ] is TToolButton then
1356 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
1357 ListToolBar.Controls[ i + 1 ].Visible := False;
1359 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
1360 ListToolBar.Controls[ i ].Visible := False;
1361 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
1362 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
1363 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
1364 SelectComboBox.Parent := ListToolBar;
1365 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
1366 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
1367 SelectComboBoxSplitter.Parent := ListToolBar;
1374 ReadToolBarSetting(ActionList, BrowserToolBar);
1376 OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes;
1377 //
\83A
\83h
\83\8c\83X
\83o
\81[
1378 AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
1380 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³
\82ÍFormShow
\82É
\88Ú
\93®
\82µ
\82½
1382 //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\82ª
\96³
\82¢
\8fê
\8d\87\82Í
\83\81\83b
\83Z
\81[
\83W
\95\
\8e¦
1383 if not FileExists(GikoSys.GetBoardFileName) then begin
1384 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
1385 + '
\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
1386 + '
\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';
1387 MsgBox(SplashWindow.Handle, msg, '
\83M
\83R
\83i
\83r', MB_OK or MB_ICONINFORMATION);
1388 NewBoardAction.Execute;
1391 //
\83L
\81[
\90Ý
\92è
\93Ç
\82Ý
\8d\9e\82Ý
1392 GikoSys.LoadKeySetting(ActionList);
1394 //
\8dÅ
\8fI
\8f\84\89ñ
\8e\9e\8aÔ
1395 // FLastRoundTime := 0;
1398 FHint := TResPopup.Create(Self);
1400 //
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\83L
\83\83\83r
\83l
\83b
\83g
\82Ì
\8fó
\91Ô
\95\9c\8c³(
\96¢
\8eÀ
\91\95)
1401 //
\82¨
\82æ
\82Ñ
\83X
\83\8c\88ê
\97\97\83y
\83C
\83\93\82Ì
\8fó
\91Ô
\95\9c\8c³(
\96¢
\8eÀ
\91\95\81A
\8c»
\8dÝ
\82Í
\8f\89\8aú
\95\
\8e¦
\97p)
1402 i := GikoSys.Setting.CabinetIndex;
1403 Cabinet2chAction.Execute;
1404 GikoSys.Setting.CabinetIndex := i;
1406 //
\8dÅ
\8cã
\82É
\91I
\91ð
\82³
\82ê
\82½
\83L
\83\83\83r
\83l
\83b
\83g
\82Ì
\95\9c\8c³
1407 Case GikoSys.Setting.CabinetIndex of
1408 0: Cabinet2chAction.Execute;
1409 1: CabinetHistoryAction.Execute;
1410 2: CabinetFavoriteAction.Execute;
1413 //
\83I
\81[
\83g
\83\8d\83O
\83C
\83\93
1414 if GikoSys.Setting.AutoLogin then
1415 LoginAction.Execute;
1417 //
\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
1418 for i := 1 to ParamCount do begin
1419 MoveToURL(ParamStr(i));
1424 s := GikoSys.FAbon.NGwordname;
1425 StatusBar.Panels[2].Text := s;
1426 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
1427 StatusBarResize(Sender);
1433 procedure TGikoForm.FormShow(Sender: TObject);
1438 ShowWindow(Application.Handle, SW_HIDE);
1440 //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½
1441 //
\83c
\81[
\83\8b\83o
\81[
\95\
\8e¦
1442 StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
1443 StdToolBarVisibleActionExecute( nil );
1444 AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
1445 AddressBarVisibleActionExecute( nil );
1446 LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
1447 LinkBarVisibleActionExecute( nil );
1448 ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
1449 ListToolBarVisibleActionExecute( nil );
1450 ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
1451 ListNameBarVisibleActionExecute( nil );
1452 BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
1453 BrowserToolBarVisibleActionExecute( nil );
1454 BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
1455 BrowserNameBarVisibleActionExecute( nil );
1457 //
\83u
\83\89\83E
\83U
\83^
\83u
1458 BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1459 BrowserTabVisibleActionExecute(nil);
1461 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1462 BrowserTabTopAction.Checked := True;
1463 BrowserTabTopActionExecute(nil);
1465 BrowserTabBottomAction.Checked := True;
1466 BrowserTabBottomActionExecute(nil);
1469 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1470 BrowserTabTabStyleAction.Checked := True;
1471 BrowserTabTabStyleActionExecute(nil);
1472 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1473 BrowserTabButtonStyleAction.Checked := True;
1474 BrowserTabButtonStyleActionExecute(nil);
1476 BrowserTabFlatStyleAction.Checked := True;
1477 BrowserTabFlatStyleActionExecute(nil);
1481 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Main)
1482 MainCoolBar.Bands.BeginUpdate;
1484 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
1485 CoolSet := GikoSys.Setting.MainCoolSet[i];
1486 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1488 MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1489 MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1490 MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1493 MainCoolBar.Bands.EndUpdate;
1496 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Board)
1497 ListCoolBar.Bands.BeginUpdate;
1499 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
1500 CoolSet := GikoSys.Setting.ListCoolSet[i];
1501 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1503 ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1504 ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1505 ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1508 ListCoolBar.Bands.EndUpdate;
1511 //
\83N
\81[
\83\8b\83o
\81[
\95\9c\8c³(Browser)
1512 BrowserCoolBar.Bands.BeginUpdate;
1514 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
1515 CoolSet := GikoSys.Setting.BrowserCoolSet[i];
1516 if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then
1518 BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i;
1519 BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak;
1520 BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth;
1523 BrowserCoolBar.Bands.EndUpdate;
1528 procedure TGikoForm.SetStdToolBar;
1534 Action: TContainedAction;
1535 ToolButton: TToolButton;
1538 for i := StdToolBar.ButtonCount - 1 downto 0 do begin
1539 StdToolBar.RemoveControl(StdToolBar.Buttons[i]);
1540 //StdToolBar.Buttons[i].Free;
1542 FileName := GikoSys.GetConfigDir + 'ToolBar.ini';
1543 ini := TMemIniFile.Create(FileName);
1546 s := ini.ReadString('StdToolBar', IntToStr(i), '');
1549 if s = '-' then begin
1550 ToolButton := TToolButton.Create(StdToolBar);
1551 ToolButton.Style := tbsSeparator;
1552 ToolButton.Width := 8;
1553 ToolButton.Left := 10000;
1554 StdToolBar.InsertControl(ToolButton);
1556 Action := GetAction(s);
1557 if Action <> nil then begin
1558 ToolButton := TToolButton.Create(StdToolBar);
1559 ToolButton.Action := Action;
1560 ToolButton.Left := 10000;
1561 StdToolBar.InsertControl(ToolButton);
1568 {function TGikoForm.GetAction(ActionName: string): TContainedAction;
1572 for i := 0 to ActionList.ActionCount - 1 do begin
1573 if ActionList.Actions[i].Name = ActionName then begin
1574 Result := ActionList.Actions[i];
1581 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
1585 wp: TWindowPlacement;
1587 if ( GikoSys.Setting.ShowDialogForEnd ) and
1588 (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
1594 Application.OnDeactivate := nil;
1595 Self.OnDeactivate := nil;
1598 if GetActiveList is TBBS2ch then begin
1599 for i := 0 to ListView.Columns.Count - 1 do
1600 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
1601 end else if GetActiveList is TCategory then begin
1602 for i := 0 to ListView.Columns.Count - 1 do
1603 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
1604 end else if GetActiveList is TBoard then begin
1605 for i := 0 to ListView.Columns.Count - 1 do
1606 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
1609 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95Û
\91¶
1610 wp.length := sizeof(wp);
1611 GetWindowPlacement(Handle, @wp);
1612 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1613 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1614 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1615 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1616 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1618 GikoSys.Setting.ListStyle := ListView.ViewStyle;
1619 GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked;
1620 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1621 GikoSys.Setting.ListHeight := FBrowserSizeHeight;
1622 GikoSys.Setting.ListWidth := FBrowserSizeWidth;
1623 if ArrangeAction.Checked then
1624 GikoSys.Setting.ListOrientation := gloVertical
1626 GikoSys.Setting.ListOrientation := gloHorizontal;
1627 GikoSys.Setting.MessegeBarHeight := MessagePanel.Height;
1629 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Main)
1630 for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin
1631 CoolSet.FCoolID := MainCoolBar.Bands[i].ID;
1632 CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width;
1633 CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break;
1634 GikoSys.Setting.MainCoolSet[i] := CoolSet;
1636 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Board)
1637 for i := 0 to LIST_COOLBAND_COUNT - 1 do begin
1638 CoolSet.FCoolID := ListCoolBar.Bands[i].ID;
1639 CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width;
1640 CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break;
1641 GikoSys.Setting.ListCoolSet[i] := CoolSet;
1643 //
\83N
\81[
\83\8b\83o
\81[
\95Û
\91¶(Browser)
1644 for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin
1645 CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID;
1646 CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width;
1647 CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break;
1648 GikoSys.Setting.BrowserCoolSet[i] := CoolSet;
1651 GikoSys.Setting.WriteWindowSettingFile;
1652 GikoSys.Setting.WriteNameMailSettingFile;
1654 //
\82¨
\8bC
\82É
\93ü
\82è
\95Û
\91¶
1656 FavoriteDM.WriteFavorite;
1662 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1663 NotSelectTabCloseAction.Execute;
1664 if BrowserTab.Tabs.Count >= 1 then begin
1665 DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1670 //
\8f\84\89ñ
\83\8a\83X
\83g
\95Û
\91¶&
\94j
\8aü
1672 RoundList.SaveRoundFile;
1684 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
1690 //
\83A
\83h
\83\8c\83X
\97\9a\97ð
\95Û
\91¶
1692 AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
1697 FControlThread.Terminate;
1706 //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
1709 TreeView.Items.Clear;
1714 if FavoriteDM <> nil then
1717 if AddressHistoryDM <> nil then
1718 AddressHistoryDM.Free;
1719 AddressHistoryDM := nil;
1723 if BBS2ch <> nil then
1731 if FHint <> nil then begin
1732 FHint.ReleaseHandle;
1737 if TPreviewBrowser <> nil then begin
1738 FPreviewBrowser.Free;
1739 FPreviewBrowser := nil;
1745 procedure TGikoForm.FormDestroy(Sender: TObject);
1747 // wp: TWindowPlacement;
1749 { //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
1752 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95Û
\91¶
1753 wp.length := sizeof(wp);
1754 GetWindowPlacement(Handle, @wp);
1756 GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top;
1757 GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left;
1758 GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
1759 GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
1760 GikoSys.Setting.WindowMax := WindowState = wsMaximized;
1762 GikoSys.Setting.CabinetVisible := CabinetPanel.Visible;
1763 GikoSys.Setting.CabinetWidth := CabinetPanel.Width;
1765 GikoSys.Setting.WriteWindowSettingFile;
1766 GikoSys.Setting.WriteNameMailSettingFile;
1771 //
\83t
\83H
\81[
\83\80\83N
\83\8d\81[
\83Y
1772 procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
1774 Application.Terminate;
1778 //
\83L
\83\83\83r
\83l
\83b
\83g
\81~
\83{
\83^
\83\93\83N
\83\8a\83b
\83N
1779 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
1781 CabinetVisibleAction.Execute;
1782 // CabinetPanelVisible(false);
1785 procedure TGikoForm.ReloadBBS;
1787 //
\83^
\83u
\83N
\83\8d\81[
\83Y
1788 NotSelectTabCloseAction.Execute;
1789 if BrowserTab.Tabs.Count >= 1 then
1790 DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0]));
1791 //
\83q
\83X
\83g
\83\8a\83\8a\83X
\83g
1793 //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
1794 TreeView.Items.Clear;
1801 FTreeType := gttNone;
1804 BBS2ch := TBBS2ch.Create(GikoSys.Setting.LogFolder);
1806 BBS2ch.ReadBoardFile; //
\83{
\81[
\83h
\83t
\83@
\83C
\83\8b\93Ç
\8d\9e
1810 //
\83{
\81[
\83h
\83c
\83\8a\81[
\90Ý
\92è
1811 procedure TGikoForm.SetBoardTreeNode;
1815 CategoryNode: TTreeNode;
1816 BoardNode: TTreeNode;
1817 Category: TCategory;
1820 TreeView.Items.BeginUpdate;
1821 TreeView.Items.Clear;
1823 Root := TreeView.Items.Add(nil, BBS2ch.Title);
1824 Root.ImageIndex := ITEM_ICON_2CH1;
1825 Root.SelectedIndex := ITEM_ICON_2CH2;
1826 Root.Data := BBS2ch;
1827 if SplashWindow <> nil then
1828 SplashWindow.ProgressBar.Max := BoardGroup.BBS2ch.Count;
1830 for i := 0 to BoardGroup.BBS2ch.Count - 1 do begin
1831 Category := TCategory(BoardGroup.BBS2ch.Items[i]);
1832 CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
1833 CategoryNode.Data := Category;
1834 CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
1835 CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
1837 for j := 0 to Category.Count - 1 do begin
1838 Board := TBoard(Category.Items[j]);
1840 BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
1841 BoardNode.Data := Board;
1842 BoardNode.ImageIndex := ITEM_ICON_BOARD1;
1843 BoardNode.SelectedIndex := ITEM_ICON_BOARD2;
1848 CategoryNode.Expanded := Category.NodeExpand;
1850 if SplashWindow <> nil then begin
1851 SplashWindow.ProgressBar.StepIt;
1852 Application.ProcessMessages;
1857 TreeView.Items.EndUpdate;
1861 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS2ch): Integer;
1863 COLUMN: array[0..0] of string = ('
\83J
\83e
\83S
\83\8a\96¼');
1865 ListColumn: TListColumn;
1868 ListView.Items.BeginUpdate;
1870 Screen.Cursor := crHourGlass;
1872 ListView.Columns.Clear;
1873 for i := 0 to Length(COLUMN) - 1 do begin
1874 ListColumn := ListView.Columns.Add;
1875 ListColumn.Caption := COLUMN[i];
1876 ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
1879 ListView.Items.Count := 0;
1880 ListView.Items.Clear;
1881 ListView.Items.Count := ABBS2ch.Count;
1883 // UpFolderAction.Enabled := False;
1884 // AllItemAction.Enabled := False;
1885 // LogItemAction.Enabled := False;
1886 // NewItemAction.Enabled := False;
1887 // SelectItemAction.Enabled := False;
1888 // ListDownloadToolButton.Enabled := False;
1889 // BoardReservToolButton.Enabled := False;
1890 // ListThreadDownloadToolButton.Enabled := False;
1892 ListNameLabel.Caption := ABBS2ch.Title;
1893 FolderImage.Picture := nil;
1894 ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap);
1897 FSortOrder := False;
1898 ListViewColumnClick(nil, ListView.Column[0]);
1900 Result := ABBS2ch.Count;
1902 Screen.Cursor := crDefault;
1903 ListView.Items.EndUpdate;
1907 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
1909 COLUMN: array[0..2] of string = ('
\94Â
\96¼', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e');
1911 ListColumn: TListColumn;
1914 ListView.Items.BeginUpdate;
1916 Screen.Cursor := crHourGlass;
1918 ListView.Columns.Clear;
1919 for i := 0 to Length(COLUMN) - 1 do begin
1920 ListColumn := ListView.Columns.Add;
1921 ListColumn.Caption := COLUMN[i];
1922 ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
1925 ListView.Items.Count := 0;
1926 ListView.Items.Clear;
1927 ListView.Items.Count := Category.Count;
1929 // UpFolderAction.Enabled := True;
1930 // AllItemAction.Enabled := False;
1931 // LogItemAction.Enabled := False;
1932 // NewItemAction.Enabled := False;
1933 // SelectItemAction.Enabled := False;
1934 // ListDownloadToolButton.Enabled := False;
1935 // BoardReservToolButton.Enabled := False;
1936 // ListThreadDownloadToolButton.Enabled := False;
1938 ListNameLabel.Caption := Category.Title;
1939 FolderImage.Picture := nil;
1940 ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap);
1943 FSortOrder := False;
1944 ListViewColumnClick(nil, ListView.Column[0]);
1946 Result := Category.Count;
1948 Screen.Cursor := crDefault;
1949 ListView.Items.EndUpdate;
1953 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
1955 COLUMN: array[0..6] of string = ('
\83X
\83\8c\83b
\83h
\96¼', '
\83J
\83E
\83\93\83g', '
\8eæ
\93¾', '
\90V
\92\85',
1956 '
\96¢
\93Ç', '
\8f\84\89ñ
\97\
\96ñ', '
\8eæ
\93¾
\93ú
\8e\9e');
1957 COLUMN_ALIGNMENT: array[0..6] of TAlignment = (taLeftJustify, taRightJustify,
1958 taRightJustify, taRightJustify,
1959 taRightJustify, taLeftJustify,
1961 //No,
\83X
\83\8c\83b
\83h
\96¼,
\83J
\83E
\83\93\83g,
\8f\84\89ñ
\97\
\96ñ,
\8eæ
\93¾
\93ú
\8e\9e
1963 ListColumn: TListColumn;
1966 ListView.Items.BeginUpdate;
1968 Screen.Cursor := crHourGlass;
1970 //
\83`
\83\89\82Â
\82«
\96h
\8e~
\82Ì
\82½
\82ß
\81A
\95Ï
\8dX
\82³
\82ê
\82Ä
\82¢
\82é
\8fê
\8d\87\82Ì
\82Ý
1971 //
\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Ó
1972 if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
1974 ListView.Columns.Clear;
1975 for i := 0 to Length(COLUMN) - 1 do begin
1976 ListColumn := ListView.Columns.Add;
1977 ListColumn.Caption := COLUMN[i];
1978 ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
1979 ListColumn.Alignment := COLUMN_ALIGNMENT[i];
1983 ListView.Items.Count := 0;
1984 ListView.Items.Clear;
1986 case GikoForm.ViewType of
1987 gvtAll: ListView.Items.Count := Board.Count;
1988 gvtLog: ListView.Items.Count := Board.GetLogThreadCount;
1989 gvtNew: ListView.Items.Count := Board.GetNewThreadCount;
1990 gvtUser: ListView.Items.Count := Board.GetUserThreadCount;
1993 ListNameLabel.Caption := Board.Title;
1994 FolderImage.Picture := nil;
1995 ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap);
1998 FSortOrder := False;
1999 ListViewColumnClick(nil, ListView.Column[0]);
2001 Result := Board.Count;
2003 Screen.Cursor := crDefault;
2004 ListView.Items.EndUpdate;
2008 procedure TGikoForm.TreeViewChange(Sender: TObject; Node: TTreeNode);
2012 if FTreeType = gttHistory then begin
2013 // SetContent(TThreadItem(Node.Data));
2014 InsertBrowserTab(TThreadItem(Node.Data));
2018 ListView.Selected := nil;
2019 ListView.Items.Count := 0;
2020 ListView.Items.Clear;
2021 // ListView.Columns.Clear;
2023 Caption := CAPTION_NAME;
2024 //Application.Title := CAPTION_NAME;
2027 if GetActiveList is TBBS2ch then begin
2028 for i := 0 to ListView.Columns.Count - 1 do
2029 GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
2030 end else if GetActiveList is TCategory then begin
2031 for i := 0 to ListView.Columns.Count - 1 do
2032 GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
2033 end else if GetActiveList is TBoard then begin
2034 for i := 0 to ListView.Columns.Count - 1 do
2035 GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
2038 if TObject(Node.Data) is TBBS2ch then begin
2039 SetActiveList(Node.data);
2040 end else if TObject(Node.Data) is TCategory then begin
2041 SetActiveList(Node.data);
2042 end else if TObject(Node.Data) is TBoard then begin
2043 if not TBoard(Node.Data).IsThreadDatRead then begin
2044 Screen.Cursor := crHourGlass;
2046 GikoSys.ReadSubjectFile(TBoard(Node.Data));
2048 Screen.Cursor := crDefault;
2051 SetActiveList(Node.data);
2055 procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem);
2057 // FileName: string;
2058 // DateTime: TDateTime;
2061 Category: TCategory;
2063 ThreadItem: TThreadItem;
2066 if ActiveList is TBBS2ch then begin
2067 BBS := TBBS2ch(ActiveList);
2069 ListView.StateImages := nil;
2071 if BBS = nil then Exit;
2072 if BBS.Count <= 0 then Exit;
2073 if Item = nil then Exit;
2074 if Item.Index > BBS.Count then Exit;
2075 if ListView.Items.Count = 0 then Exit;
2077 if not (BBS.Items[Item.Index] is TCategory) then Exit;
2078 Category := TCategory(BBS.Items[Item.Index]);
2080 if Category = nil then Exit;
2082 if ListNumberVisibleAction.Checked then
2083 Item.Caption := IntToStr(Category.No) + ': ' + Category.Title
2085 Item.Caption := Category.Title;
2087 Item.ImageIndex := ITEM_ICON_CATEGORY1;
2088 Item.Data := Category;
2089 end else if ActiveList is TCategory then begin
2090 Category := TCategory(ActiveList);
2092 ListView.StateImages := nil;
2094 if Category = nil then Exit;
2095 if Category.Count <= 0 then Exit;
2096 if Item = nil then Exit;
2097 if Item.Index >= Category.Count then Exit;
2098 if ListView.Items.Count = 0 then Exit;
2100 if not (Category.Items[Item.Index] is TBoard) then Exit;
2101 Board := TBoard(Category.Items[Item.Index]);
2103 if Board = nil then Exit;
2105 if ListNumberVisibleAction.Checked then
2106 Item.Caption := IntToStr(Board.No) + ': ' + Board.Title
2108 Item.Caption := Board.Title;
2110 if Item.SubItems.Count <> 2 then begin
2111 Item.SubItems.Clear;
2112 Item.SubItems.Add('');
2113 Item.SubItems.Add('');
2116 Item.ImageIndex := ITEM_ICON_BOARD1;
2119 Item.SubItems[0] := Board.RoundName // '
\97\
\96ñ'
2121 Item.SubItems[0] := '';
2123 if Board.RoundDate = ZERO_DATE then begin
2124 Item.SubItems[1] := '';
2126 Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
2128 end else if ActiveList is TBoard then begin
2129 Board := TBoard(ActiveList);
2131 if GikoSys.Setting.ListIconVisible then
2132 ListView.StateImages := StateIconImageList
2134 ListView.StateImages := nil;
2136 case GikoForm.ViewType of
2137 gvtAll: BoardCnt := Board.Count;
2138 gvtLog: BoardCnt := Board.GetLogThreadCount;
2139 gvtNew: BoardCnt := Board.GetNewThreadCount;
2140 gvtUser: BoardCnt := Board.GetUserThreadCount;
2145 // if Board = nil then Exit;
2146 if BoardCnt <= 0 then Exit;
2147 if Item = nil then Exit;
2148 if Item.Index > BoardCnt then Exit;
2149 if ListView.Items.Count = 0 then Exit;
2151 // if not (Board.Items[Item.Index] is TThreadItem) then Exit;
2154 case GikoForm.ViewType of
2155 gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]);
2156 gvtLog: ThreadItem := Board.GetLogThread(Item.Index);
2157 gvtNew: ThreadItem := Board.GetNewThread(Item.Index);
2158 gvtUser: ThreadItem := Board.GetUserThread(Item.Index);
2161 if ThreadItem = nil then Exit;
2163 // if ListNumberVisibleAction.Checked then
2164 // RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title
2166 RepStr := ThreadItem.Title;
2167 //RepStr := StringReplace(RepStr, '&', '&', [rfReplaceAll]);
2168 RepStr := StringReplace(RepStr, '<', '<', [rfReplaceAll]);
2169 RepStr := StringReplace(RepStr, '>', '>', [rfReplaceAll]);
2170 RepStr := StringReplace(RepStr, '"', '"', [rfReplaceAll]);
2171 RepStr := StringReplace(RepStr, '&', '&', [rfReplaceAll]);
2172 //RepStr := StringReplace(RepStr, '
\81\97\81M', ',', [rfReplaceAll]);
2174 if Item.SubItems.Count <> 6 then begin
2175 Item.SubItems.Clear;
2176 Item.SubItems.Add('');
2177 Item.SubItems.Add('');
2178 Item.SubItems.Add('');
2179 Item.SubItems.Add('');
2180 Item.SubItems.Add('');
2181 Item.SubItems.Add('');
2184 if ListNumberVisibleAction.Checked then
2185 Item.Caption := IntToStr(ThreadItem.No) + ': ' + RepStr
2187 Item.Caption := RepStr;
2189 case ThreadItem.AgeSage of
2190 gasNone: Item.StateIndex := -1;
2191 gasNew: Item.StateIndex := 0;
2192 gasAge: Item.StateIndex := 1;
2193 gasSage: Item.StateIndex := 2;
2196 if ThreadItem.IsLogFile then begin
2197 Item.ImageIndex := ITEM_ICON_THREADLOG1;
2198 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2199 Item.SubItems[1] := IntToStr(ThreadItem.Count);
2200 if ThreadItem.NewResCount = 0 then
2201 Item.SubItems[2] := ''
2203 Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
2204 Item.SubItems[3] := '';
2205 if ThreadItem.Round then
2206 Item.SubItems[4] := ThreadItem.RoundName
2208 Item.SubItems[4] := '';
2209 if ThreadItem.RoundDate = ZERO_DATE then begin
2210 Item.SubItems[5] := '';
2212 Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
2213 if ThreadItem.NewArrival then
2214 Item.ImageIndex := ITEM_ICON_THREADNEW1;
2216 Item.ImageIndex := ITEM_ICON_THREAD1;
2217 Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
2218 Item.SubItems[1] := '';
2219 Item.SubItems[2] := '';
2220 Item.SubItems[3] := '';
2221 Item.SubItems[4] := '';
2222 Item.SubItems[5] := '';
2224 Item.Data := ThreadItem;
2228 procedure TGikoForm.ListViewDataFind(Sender: TObject; Find: TItemFind;
2229 const FindString: String; const FindPosition: TPoint; FindData: Pointer;
2230 StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean;
2231 var Index: Integer);
2236 procedure TGikoForm.ListViewDataHint(Sender: TObject; StartIndex,
2242 procedure TGikoForm.ListViewDataStateChange(Sender: TObject; StartIndex,
2243 EndIndex: Integer; OldState, NewState: TItemStates);
2248 procedure TGikoForm.BrowserStatusTextChange(Sender: TObject; const Text: WideString);
2263 ActiveFileName: string;
2270 if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin
2271 if LowerCase(OleVariant(IHTMLDocument2(Browser.Document)).charset) <> 'shift_jis' then
2272 OleVariant(IHTMLDocument2(Browser.Document)).charset := 'shift_jis';
2278 if PreviewTimer.Enabled then
2279 PreviewTimer.Enabled := False;
2280 Application.CancelHint;
2281 if GetActiveContent <> nil then
2282 ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '')
2284 ActiveFileName := '';
2286 StatusBar.Panels[1].Text := Text;
2288 if FHint <> nil then begin
2289 FHint.ReleaseHandle;
2292 if FPreviewBrowser <> nil then
2293 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2295 if not GikoSys.Setting.UnActivePopup then
2296 if not GikoForm.Active then
2299 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10
2300 //file:///C:/Borland/Projects/gikoNavi/test/read.cgi/qa/990576336/10-15
2303 Ext := AnsiLowerCase(ExtractFileExt(Text));
2304 if (Pos('http://', Text) = 1) and (GikoSys.Setting.PreviewVisible) and
2305 ((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) then begin
2306 if FPreviewBrowser = nil then begin
2307 FPreviewBrowser := TPreviewBrowser.Create(Self);
2308 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2309 TOleControl(FPreviewBrowser).Parent := nil;
2311 FPreviewBrowser.Navigate('about:blank');//
\91O
\89ñ
\82Ì
\83v
\83\8c\83r
\83\85\81[
\89æ
\91\9c\8fÁ
\8b\8e\97p
2312 FPreviewURL := Text;
2313 PreviewTimer.Interval := GikoSys.Setting.PreviewWait;
2314 PreviewTimer.Enabled := True;
2315 end else if (Pos('about:blank', Text) = 1) or (Pos('http://', Text) = 1) or (Pos('mailto:', Text) = 1) then begin
2316 if Pos('mailto:', Text) = 1 then begin
2317 s := StringReplace(Text, 'mailto:', '', [rfIgnoreCase]);
2318 //
\83M
\83R
\83i
\83r
\83X
\83\8c \83p
\81[
\83g3
\82Ì466
\8e\81\82É
\8a´
\8eÓ
2320 p.x := p.x - TWebBrowser(Sender).ClientOrigin.x;
2321 p.y := p.y - TWebBrowser(Sender).ClientOrigin.y;
2322 e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y);
2323 if (Assigned(e)) then begin
2324 tmp2 := GikoSys.ZenToHan(e.Get_outerText);
2325 if (GikoSys.IsNumeric(tmp2)) then begin
2326 //
\82\93\82Í
\83\8c\83X
\94Ô
\8d\86\82Á
\82Û
\82¢
\82Á
\82·
\81B
2327 wkBBS := GetActiveContent.ParentBoard.BBSID;
2328 wkKey := ChangeFileExt(GetActiveContent.FileName, '');
2329 wkIntSt := StrToInt(tmp2);
2330 wkIntTo := StrToInt(tmp2);
2331 //s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2332 FHint.PopupType := gptThread;
2333 SetResPopupText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False);
2335 FHint.PopupType := gptRaw;
2342 if Pos('about:blank..', URL) = 1 then
2343 URL := StringReplace(URL, 'about:blank..', 'http://www.2ch.net', []);
2345 PathRec := Gikosys.Parse2chURL2(URL);
2347 if PathRec.FDone then begin
2349 wkIntSt := PathRec.FSt;
2350 wkIntTo := PathRec.FTo;
2352 if (wkIntSt = 0) and (wkIntTo = 0) then begin
2355 end else if (wkIntSt = 0) and (wkIntTo > 0) then begin
2357 end else if (wkIntSt > 0) and (wkIntTo = 0) then begin
2359 end else if wkIntSt > wkIntTo then begin
2364 //if wkIntSt = 0 then
2366 //if wkINtTo = 0 then
2368 //if PathRec.FFirst then
2370 if PathRec.FStBegin then
2372 if PathRec.FToEnd then
2375 ATitle := ActiveFileName <> PathRec.FKey;
2377 //HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2378 FHint.PopupType := gptThread;
2379 SetResPopupText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst);
2384 // ShowTextPopup(s);
2385 if FHint.PopupType = gptRaw then begin
2386 if FHint.Caption <> '' then
2389 if (FHint.ResCount <> 0) or (FHint.Title <> '') then
2395 procedure TGikoForm.BrowserTitleChange(Sender: TObject;
2396 const Text: WideString);
2400 if (Text = BLANK_HTML) or (Text = GikoSys.GetHtmlTempFileName) then
2401 Title := CAPTION_NAME
2403 Title := CAPTION_NAME + ' - [' + Text + ']';
2405 //Application.Title := Title;
2408 procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean);
2411 //SysMenuApp: HMenu;
2413 FEnabledCloseButton := Enabled;
2414 SysMenu := GetSystemMenu(Handle, False);
2415 //SysMenuApp := GetSystemMenu(Application.Handle, False);
2417 if Enabled then begin
2418 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2419 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
2421 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2422 //EnableMenuItem(SysMenuApp, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);
2425 DrawMenuBar(Handle);
2426 //DrawMenuBar(Application.Handle);
2429 procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode;
2430 var AllowChange: Boolean);
2432 if FTreeType = gtt2ch then
2436 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
2437 Shift: TShiftState);
2439 if Key = VK_BACK then begin
2440 // UpFolderButtonClick(Sender);
2441 end else if Key = VK_SPACE then begin
2443 end else if Key = VK_RETURN then begin
2448 function TGikoForm.GetHttpState: Boolean;
2450 Result := FHttpState;
2453 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
2454 Column: TListColumn);
2458 wkCategory: TCategory;
2461 if FSortIndex = Column.Index then
2462 FSortOrder := not FSortOrder
2464 FSortOrder := False;
2466 for i := 0 to ListView.Columns.Count - 1 do
2467 ListView.Column[i].ImageIndex := -1;
2469 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
2471 ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
2473 Sort.SortNoFlag := ListNumberVisibleAction.Checked;
2475 if TObject(TreeView.Selected.Data) is TBBS2ch then begin
2476 wkBBS := TBBS2ch(TreeView.Selected.Data);
2477 Sort.SortOrder := FSortOrder;
2478 Sort.SortIndex := Column.Index;
2479 wkBBS.Sort(CategorySortProc);
2481 end else if TObject(TreeView.Selected.Data) is TCategory then begin
2482 wkCategory := TCategory(TreeView.Selected.Data);
2483 Sort.SortOrder := FSortOrder;
2484 Sort.SortIndex := Column.Index;
2485 wkCategory.Sort(BoardSortProc);
2487 end else if TObject(TreeView.Selected.Data) is TBoard then begin
2488 wkBoard := TBoard(TreeView.Selected.Data);
2489 Sort.SortOrder := FSortOrder;
2490 Sort.SortIndex := Column.Index;
2491 wkBoard.Sort(ThreadItemSortProc);
2494 FSortIndex := Column.Index;
2497 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
2498 Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean);
2502 DefaultDraw := True;
2504 DefaultDraw := False;
2505 if (cdsSelected in State) or (cdsHot in State) then begin
2506 Sender.Canvas.Brush.Color := clHighlight;
2507 Sender.Canvas.Font.Color := clHighlightText;
2509 Sender.Canvas.Brush.Color := clBtnFace;
2510 Sender.Canvas.Font.Color := clBtnText;
2512 ARect := Rect(Button.Left, Button.Top, Button.Left + Button.Width, Button.Top + Button.Height);
2513 Sender.Canvas.FillRect(ARect);
2514 DrawText(Sender.Canvas.Handle, PChar(Button.Caption), -1, ARect, DT_SINGLELINE or DT_VCENTER or DT_CENTER);
2517 function TGikoForm.GetTreeNode(Data: TObject): TTreeNode;
2522 Nodes := TreeView.Items;
2524 for i := 0 to Nodes.Count - 1 do begin
2525 if Nodes.Item[i].Data = Data then begin
2526 Result := Nodes.Item[i];
2533 procedure TGikoForm.BrowserBeforeNavigate2(Sender: TObject;
2534 const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
2535 Headers: OleVariant; var Cancel: WordBool);
2540 kMenuName: string = 'menu:';
2543 if Pos(kMenuName, URL) <> 0 then begin
2544 sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) );
2546 if not GikoSys.IsNumeric(sNo) then Exit;
2550 KokoPopupMenu.Tag := StrToInt(sNo);
2551 KokoPopupMenu.Popup(p.x, p.y);
2552 end else if Pos('mailto', LowerCase(URL)) <> 0 then begin
2553 Cancel := not GikoSys.Setting.OpenMailer;
2558 procedure TGikoForm.ListViewAdvancedCustomDrawItem(Sender: TCustomListView;
2559 Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage;
2560 var DefaultDraw: Boolean);
2562 ThreadItem: TThreadItem;
2565 // TListView(Sender).Canvas.Font.Style := [];
2566 if TObject(Item.Data) is TThreadItem then begin
2567 ThreadItem := TThreadItem(Item.Data);
2568 if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
2569 ListView.Canvas.Brush.Color := FOddColor;
2571 ListView.Canvas.Brush.Color := FListViewBackGroundColor;
2573 // if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
2574 if ThreadItem.UnRead then
2575 TListView(Sender).Canvas.Font.Style := [fsBold];
2579 procedure TGikoForm.AppFormDeactivate(Sender: TObject);
2581 if Application.Terminated then
2583 if PreviewTimer.Enabled then
2584 PreviewTimer.Enabled := False;
2585 //
\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
2586 if FHint <> nil then begin
2587 FHint.ReleaseHandle;
2592 if FPreviewBrowser <> nil then
2593 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
2597 procedure TGikoForm.TreeViewCustomDraw(Sender: TCustomTreeView;
2598 const ARect: TRect; var DefaultDraw: Boolean);
2602 IsBoardNode: Boolean;
2608 Category: TCategory;
2612 DefaultDraw := True;
2614 if FTreeType = gttHistory then Exit;
2616 TreeView.Canvas.Font.Color := clBlue;
2617 IsBoardNode := False;
2619 for i := 0 to TreeView.Items.Count - 1 do begin
2621 if not TreeView.Items[i].IsVisible then
2624 if TObject(TreeView.Items[i].Data) is TCategory then begin
2625 if TreeView.Items[i].Expanded then
2628 IsBoardNode := False;
2629 Category := TCategory(TreeView.Items[i].Data);
2630 for j := 0 to Category.Count - 1 do begin
2631 Board := Category.Items[j];
2632 if Board <> nil then begin
2633 if Board.UnRead > 0 then begin
2641 end else if TObject(TreeView.Items[i].Data) is TBoard then begin
2642 IsBoardNode := True;
2643 Board := TBoard(TreeView.Items[i].Data);
2644 Cnt := Board.UnRead;
2650 Bitmap := TBitmap.Create;
2652 Bitmap.Canvas.Font.Assign(TreeView.Canvas.Font);
2653 Bitmap.Canvas.Font.Style := [fsBold];
2654 NodeWidth := Bitmap.Canvas.TextWidth(TreeView.Items[i].Text);
2659 NodeRect := TreeView.Items[i].DisplayRect(True);
2662 CntText := '(' + IntToStr(Cnt) + ')'
2663 else if Cnt = 1 then
2667 TextWidth := TreeView.Canvas.TextWidth(CntText);
2669 TextRect := Rect(NodeRect.Left + NodeWidth + 8,
2671 NodeRect.Left + NodeWidth + TextWidth + 8,
2673 DrawText(TreeView.Canvas.Handle,
2677 DT_SINGLELINE or DT_VCENTER);
2679 TreeViewCustomDrawItem(nil, nil, [], DefaultDraw);
2682 procedure TGikoForm.TreeViewCustomDrawItem(Sender: TCustomTreeView;
2683 Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
2686 Category: TCategory;
2689 DefaultDraw := True;
2691 if FTreeType = gttHistory then Exit;
2693 TreeView.Canvas.Font.Style := [];
2694 if Node <> nil then begin
2695 if TObject(Node.Data) is TCategory then begin
2696 Category := TCategory(Node.Data);
2697 for i := 0 to Category.Count - 1 do begin
2698 Board := Category.Items[i];
2699 if Board <> nil then begin
2700 if Board.UnRead > 0 then begin
2701 TreeView.Canvas.Font.Style := [fsBold];
2706 end else if TObject(Node.Data) is TBoard then begin
2707 Board := TBoard(Node.Data);
2708 if Board.UnRead > 0 then
2709 TreeView.Canvas.Font.Style := [fsBold];
2714 procedure TGikoForm.TreeViewExpanded(Sender: TObject; Node: TTreeNode);
2716 TreeView.Invalidate;
2718 if TObject(Node.Data) is TBBS2ch then begin
2719 TBBS2ch(Node.Data).NodeExpand := True;
2720 end else if TObject(Node.Data) is TCategory then begin
2721 TCategory(Node.Data).NodeExpand := True;
2722 end else if TObject(Node.Data) is TBoard then begin
2723 TBoard(Node.Data).NodeExpand := True;
2727 {procedure TGikoForm.CabinetPanelVisible(PanelVisible: Boolean);
2729 TreeSplitter.Visible := PanelVisible;
2730 CabinetPanel.Visible := PanelVisible;
2731 CabinetToolButton.Down := PanelVisible;
2734 procedure TGikoForm.ListViewAllSelect;
2740 procedure TGikoForm.TreeViewDblClick(Sender: TObject);
2743 ThreadItem: TThreadItem;
2747 GetCursorPos(APoint);
2748 APoint := TreeView.ScreenToClient(APoint);
2749 HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y);
2750 if not (htOnLabel in HitTest) then Exit;
2751 if TreeView.Selected = nil then Exit;
2753 if FTreeType = gtt2ch then begin
2754 if not (TObject(TreeView.Selected.Data) is TBoard) then Exit;
2755 Board := TBoard(TreeView.Selected.Data);
2756 DownloadList(Board);
2757 end else if FTreeType = gttHistory then begin
2758 if not (TObject(TreeView.Selected.Data) is TThreadItem) then Exit;
2759 ThreadItem := TThreadItem(TreeView.Selected.Data);
2760 DownloadContent(ThreadItem);
2764 procedure TGikoForm.FavoriteTreeViewClick(Sender: TObject);
2767 FavoriteClick( TObject( FavoriteTreeView.Selected ) );
2771 procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
2773 AddMessageList(Msg, nil, Icon);
2776 procedure TGikoForm.DownloadEnd(Sender: TObject; Item: TDownloadItem);
2782 if Item.DownType = gdtBoard then
2783 ATitle := Item.Board.Title
2785 ATitle := Item.ThreadItem.Title;
2787 ATitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j';
2789 if Item.State in [gdsComplete, gdsDiffComplete] then begin
2791 if Item.DownType = gdtBoard then begin
2794 AddMessageList(ATitle + ' [
\83X
\83\8c\88ê
\97\97\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
2795 if GetActiveList = Item.Board then
2796 SetActiveList(Item.Board);
2797 Item.Board.Modified := True;
2798 Item.Board.IsThreadDatRead := True;
2800 end else if Item.DownType = gdtThread then begin
2803 Item.ThreadItem.NewArrival := True;
2804 if AddHistory(Item.ThreadItem) then begin
2805 if GetActiveContent = Item.ThreadItem then
2806 InsertBrowserTab(Item.ThreadItem)
2808 InsertBrowserTab(Item.ThreadItem, False);
2811 if Item.State = gdsComplete then begin
2813 AddMessageList(ATitle + ' [
\83X
\83\8c\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
2815 PlaySound('NewDiff');
2816 AddMessageList(ATitle + ' [
\83X
\83\8c\8d·
\95ª
\8eæ
\93¾
\8a®
\97¹]', nil, gmiOK);
2819 //
\8f\84\89ñ
\82 \82è
\82Ì
\8fê
\8d\87\81\95\82P
\82O
\82O
\82O
\92´
\82Í
\8f\84\89ñ
\8dí
\8f\9c
2820 if (Item.ThreadItem.Round) and (Item.ThreadItem.Count > 1000) then begin
2821 Item.ThreadItem.Round := False;
2822 Item.ThreadItem.RoundName := '';
2823 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);
2829 end else if Item.State = gdsNotModify then begin
2831 { if (Item.DownType = gdtThread) and (AddHistory(Item.ThreadItem)) then begin
2832 //SetContent(Item.ThreadItem);
2833 InsertBrowserTab(Item.ThreadItem);
2835 AddMessageList(ATitle + ' [
\96¢
\8dX
\90V]', nil, gmiSAD);
2836 PlaySound('NoChange');
2837 Screen.Cursor := crDefault;
2838 end else if Item.State = gdsAbort then begin
2840 AddMessageList(ATitle + ' [
\92\86\92f]', nil, gmiSAD);
2841 end else if Item.State = gdsError then begin
2846 AddMessageList(ATitle + ' [
\83G
\83\89\81[(' + IntToStr(Item.ResponseCode) + s + ')]', nil, gmiNG);
2847 // if Item.ResponseCode = 302 then
2848 // 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);
2854 if FWorkCount < 0 then FWorkCount := 0;
2855 if FWorkCount = 0 then begin
2857 Animate.Active := False;
2859 Screen.Cursor := crDefault;
2866 procedure TGikoForm.WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer);
2868 // SetProgressValue(Number, 0, AWorkCountMax);
2869 // ProgressBar.Visible := True;
2870 ProgressBar.Position := 0;
2871 ProgressBar.Max := AWorkCountMax;
2872 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ð
\8aJ
\8en
\82µ
\82Ü
\82·';
2873 FDownloadMax := AWorkCountMax;
2876 procedure TGikoForm.WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
2878 // ProgressBar.Visible := False;
2879 ProgressBar.Position := 0;
2880 // SetProgressValue(Number, 0);
2881 if FDownloadMax <> 0 then
2882 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\82ª
\8a®
\97¹
\82µ
\82Ü
\82µ
\82½';
2885 procedure TGikoForm.Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
2887 ProgressBar.Position := AWorkCount;
2888 // SetProgressValue(Number, AWorkCount);
2889 StatusBar.Panels[1].Text := FDownloadTitle + ' -
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86 (' + IntToStr(AWorkCount) + '/' + IntToStr(FDownloadMax) + ')';
2893 procedure TGikoForm.SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1);
2895 Component: TComponent;
2897 Component := FindComponent('ProgressBar' + IntToStr(Number + 1));
2898 if Component <> nil then begin
2899 if not (Component is TProgressBar) then Exit;
2901 TProgressBar(Component).Max := Max;
2902 TProgressBar(Component).Position := Value;
2907 procedure TGikoForm.AddMessageList(ACaption: string; AObject: TObject; Icon: TGikoMessageIcon);
2909 ListItem: TListItem;
2911 MessageListView.Items.BeginUpdate;
2913 ListItem := MessageListView.Items.Add;
2914 ListItem.Caption := ACaption;
2915 ListItem.Data := AObject;
2916 ListItem.MakeVisible(False);
2918 gmiOK: ListItem.ImageIndex := 0;
2919 gmiSAD: ListItem.ImageIndex := 1;
2920 gmiNG: ListItem.ImageIndex := 2;
2921 gmiWhat: ListItem.ImageIndex := 3;
2924 MessageListView.Items.EndUpdate;
2928 {procedure TGikoForm.BrowserTabChange(Sender: TObject);
2931 ThreadItem: TThreadItem;
2933 ThreadItem := GetActiveContent;
2934 if ThreadItem <> nil then begin
2935 SetContent(ThreadItem);
2939 procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
2942 // OldIndex: Integer;
2944 if ThreadItem.IsLogFile then begin
2945 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
2946 if TObject(BrowserTab.Tabs.Objects[i]) is TThreadItem then begin
2947 if TThreadItem(BrowserTab.Tabs.Objects[i]) = ThreadItem then begin
2948 if ActiveTab then begin
2949 //OldIndex := BrowserTab.TabIndex;
2950 BrowserTab.TabIndex := i;
2951 // if OldIndex <> i then
2952 BrowserTab.OnChange(nil);
2959 if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin
2960 BrowserTab.Tabs.Insert(0, GikoSys.GetShortName(ThreadItem.Title, 20));
2961 BrowserTab.Tabs.Objects[0] := ThreadItem;
2963 BrowserTab.TabIndex := 0;
2965 i := BrowserTab.Tabs.Add(GikoSys.GetShortName(ThreadItem.Title, 20));
2966 BrowserTab.Tabs.Objects[i] := ThreadItem;
2968 BrowserTab.TabIndex := i;
2970 if ActiveTab then begin
2971 BrowserTab.OnChange(nil);
2972 BrowserNullTab := nil;
2975 //OldIndex := BrowserTab.TabIndex;
2976 BrowserNullTab := ThreadItem;
2977 BrowserTab.TabIndex := -1;
2978 // if OldIndex = -1 then
2979 BrowserTab.OnChange(nil);
2982 if GikoSys.Setting.URLDisplay then
2983 AddressComboBox.Text := GikoSys.GetURL(ThreadItem.ParentBoard.BBSID, ThreadItem.FileName);
2986 procedure TGikoForm.SetContent(ThreadItem: TThreadItem);
2991 // HtmlName: string;
2997 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
2998 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
2999 Application.ProcessMessages;
3002 if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin
3006 Application.ProcessMessages;
3007 FActiveContent.ScrollTop := OleVariant(IHTMLDocument2(Browser.Document)).Body.ScrollTop;
3010 MsgBox(Handle, E.Message, 'SetContent[<-ScrollTop]', 0);
3016 FActiveContent := ThreadItem;
3018 if ThreadItem = nil then begin
3019 Browser.Navigate(BLANK_HTML);
3020 BrowserBoardNameLabel.Caption := '';
3021 ItemBoardImage.Picture := nil;
3022 BrowserNameLabel.Caption := '';
3023 ItemImage.Picture := nil;
3024 FActiveContent := nil;
3028 BBSID := ThreadItem.ParentBoard.BBSID;
3029 FileName := ThreadItem.FileName;
3031 if GetCapture = ListView.Handle then
3034 //OldCursor := Screen.Cursor;
3035 Screen.Cursor := crHourGlass;
3037 if ThreadItem.UnRead then begin
3038 ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
3039 if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0;
3043 if not ThreadItem.IsLogFile then begin
3045 if (not Assigned(Browser.Document)) then begin
3046 Browser.Navigate('about:blank');
3047 while (not Assigned(Browser.Document)) do begin
3048 Application.ProcessMessages;
3052 s := '<HTML><BODY><CENTER>
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Í
\8eæ
\93¾
\82µ
\82Ä
\82¢
\82Ü
\82¹
\82ñ</CENTER></BODY></HTML>';
3053 doc := Browser.Document;
3055 doc.charset := 'Shift_JIS';
3061 //Application.ProcessMessages;
3062 GikoSys.CreateHTML2(Browser.Document, ThreadItem, sTitle);
3063 while (Browser.ReadyState <> READYSTATE_COMPLETE) and
3064 (Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
3065 Application.ProcessMessages;
3068 Application.ProcessMessages;
3070 if ThreadItem.UnRead then
3071 BrowserMovement('new');
3074 if (ThreadItem.ScrollTop <> 0) and (not ThreadItem.UnRead) then begin
3078 doc := Browser.Document;
3079 doc.Body.ScrollTop := ThreadItem.ScrollTop;
3082 MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
3087 ThreadItem.UnRead := False;
3091 BrowserBoardNameLabel.Caption := ThreadItem.ParentBoard.Title;
3092 ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
3093 BrowserNameLabel.Caption := ThreadItem.Title;
3094 ItemImage.Picture := nil;
3095 if ThreadItem.IsLogFile then
3096 if ThreadItem.NewArrival then
3097 ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap)
3099 ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap)
3101 ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap);
3103 ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8;
3104 BrowserNameLabel.Left := ItemImage.Left + 20;
3106 //if Screen.Cursor <> crDefault then
3107 // Screen.Cursor := OldCursor
3109 Screen.Cursor := crDefault;
3113 function TGikoForm.GetActiveContent: TThreadItem;
3118 if BrowserTab.TabIndex = -1 then begin
3119 Result := BrowserNullTab;
3122 Index := BrowserTab.TabIndex;
3123 if BrowserTab.Tabs.Objects[Index] is TThreadItem then
3124 Result := TThreadItem(BrowserTab.Tabs.Objects[Index]);
3126 // Result := FActiveContent;
3129 procedure TGikoForm.SetActiveList(Obj: TObject);
3135 if Obj is TBBS2ch then begin
3136 for i := 0 to ListView.Columns.Count - 1 do
3137 ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i];
3138 SetCategoryListItem(TBBS2ch(Obj));
3139 end else if Obj is TCategory then begin
3140 for i := 0 to ListView.Columns.Count - 1 do
3141 ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i];
3142 SetBoardListItem(TCategory(Obj));
3143 end else if Obj is TBoard then begin
3144 // SetThreadListItem
\8cÄ
\82Ô
\82È
\82ç
\82¢
\82ç
\82È
\82¢
\82ñ
\82¶
\82á
\82Ë
\82¥
\81H
3146 for i := 0 to ListView.Columns.Count - 1 do
3147 ListView.Column[i].Width := GikoSys.Setting.BoardColumnWidth[i];
3149 SetThreadListItem(TBoard(Obj));
3154 //
\81\9a\81\9a\83q
\83\8d\83\86\83L
\83\81\83\82
3155 //
\82»
\82Ì
\82¤
\82¿interface
\82ð
\8eg
\82¤
3156 function TGikoForm.GetActiveList: TObject;
3158 Result := FActiveList;
3161 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType);
3163 SetListViewType(AViewType, '', False);
3166 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
3170 if ActiveList is TBoard then begin
3171 Board := TBoard(ActiveList);
3173 Board.ParentCategory.ParentBBS2ch.SelectText := SelectText;
3174 Board.ParentCategory.ParentBBS2ch.KubetsuChk := KubetsuChk;
3175 // Board.SelectText := SelectText;
3176 // Board.KubetsuChk := KubetsuChk;
3177 ViewType := AViewType;
3178 SetActiveList(Board);
3179 SetThreadListItem(Board);
3183 procedure TGikoForm.ListViewCustomDraw(Sender: TCustomListView;
3184 const ARect: TRect; var DefaultDraw: Boolean);
3190 if ListView.Items.Count = 0 then begin
3191 DefaultDraw := True;
3193 ListView.Canvas.Brush.Color := ListView.Color;
3194 ListView.Canvas.FillRect(ARect);
3198 ListView.Canvas.Font.Color := clWindowText;
3199 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3202 ListView.Canvas.Font.Color := clBlue;
3203 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';
3206 ListView.Canvas.Font.Color := clGreen;
3207 s := '
\82±
\82Ì
\83r
\83\85\81[
\82É
\82Í
\90V
\92\85\83A
\83C
\83e
\83\80\82ª
\82 \82è
\82Ü
\82¹
\82ñ
\81B';
3210 ListView.Canvas.Font.Color := clNavy;
3211 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';
3212 if GetActiveList is TBoard then
3213 s := Format(s, [TBoard(GetActiveList).ParentCategory.ParentBBS2ch.SelectText]);
3221 p := Point((ListView.ClientWidth div 2) - (ListView.Canvas.TextWidth(s) div 2),
3222 (ListView.ClientHeight div 2) - (ListView.Canvas.TextHeight(s) div 2));
3223 ListView.Canvas.TextOut(p.X, p.Y, s);
3225 DefaultDraw := True;
3229 procedure TGikoForm.DownloadList(Board: TBoard);
3231 Item: TDownloadItem;
3233 if Board.Title = '' then
3234 FDownloadTitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j'
3236 FDownloadTitle := Board.Title;
3238 if not Board.IsThreadDatRead then
3239 GikoSys.ReadSubjectFile(Board);
3240 Item := TDownloadItem.Create;
3242 Item.Board := Board;
3243 Item.DownType := gdtBoard;
3244 // AbortToolButton.Enabled := True;
3245 // Animate.Active := True;
3246 // FDownload.Add(Item);
3247 FControlThread.AddItem(Item);
3248 // Animate.Active := False;
3249 // AbortToolButton.Enabled := False;
3250 if FWorkCount = 0 then begin
3252 Animate.Active := True;
3255 Screen.Cursor := crAppStart;
3263 procedure TGikoForm.DownloadContent(ThreadItem: TThreadItem);
3265 Item: TDownloadItem;
3267 if ThreadItem.Title = '' then
3268 FDownloadTitle := '
\81i
\96¼
\8fÌ
\95s
\96¾
\81j'
3270 FDownloadTitle := ThreadItem.Title;
3271 Item := TDownloadItem.Create;
3273 Item.ThreadItem := ThreadItem;
3274 Item.DownType := gdtThread;
3275 // AbortToolButton.Enabled := True;
3276 // Animate.Active := True;
3277 // FDownload.Add(Item);
3278 FControlThread.AddItem(Item);
3279 // Animate.Active := False;
3280 // AbortToolButton.Enabled := False;
3281 if FWorkCount = 0 then begin
3283 Animate.Active := True;
3286 Screen.Cursor := crAppStart;
3294 procedure TGikoForm.PlaySound(SoundEventName: string);
3298 FileName := GikoSys.Setting.FindSoundFileName(SoundEventName);
3299 if FileExists(FileName) then begin
3300 if not sndPlaySound(PChar(FileName), SND_ASYNC or SND_NOSTOP) then begin
3301 sndPlaySound(nil, SND_SYNC);
3302 Application.ProcessMessages;
3304 sndPlaySound(PChar(FileName), SND_ASYNC);
3309 function TGikoForm.AddHistory(ThreadItem: TThreadItem): Boolean;
3316 // if (GetActiveContent = ThreadItem) and
3317 // (ThreadItem.Count <= ThreadItem.Kokomade) then
3319 // if GetActiveContent = ThreadItem then
3324 for i := 0 to FHistoryList.Count - 1 do begin
3325 if TObject(FHistoryList[i]) is TThreadItem then begin
3326 Item := TThreadItem(FHistoryList[i]);
3327 if Item = ThreadItem then begin
3328 // SetContent(ThreadItem);
3329 FHistoryList.Move(i, 0);
3334 FHistoryList.Add(ThreadItem);
3335 // SetContent(ThreadItem);
3337 if FTreeType = gttHistory then begin
3338 Node := TreeView.Items.Add(nil, ThreadItem.Title);
3339 if Item.NewArrival then begin
3340 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3341 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3343 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3344 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3346 Node.Data := ThreadItem;
3350 procedure TGikoForm.DeleteHistory(ThreadItem: TThreadItem);
3354 for i := 0 to FHistoryList.Count - 1 do begin
3355 if ThreadItem = FHistoryList.Items[i] then begin
3356 FHistoryList.Delete(i);
3362 procedure TGikoForm.ClearHistory;
3367 procedure TGikoForm.Show2chTree;
3371 GikoSys.Setting.CabinetIndex := 0;
3373 FavoriteTreeView.Visible := False;
3374 FavoriteToolBar.Hide;
3375 TreeView.Visible := True;
3377 CabinetSelectToolButton.Caption := '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é';
3379 Cabinet2chAction.Checked := True;
3380 CabinetHistoryAction.Checked := False;
3381 CabinetFavoriteAction.Checked := False;
3383 if FTreeType <> gtt2ch then begin
3384 FTreeType := gtt2ch;
3385 HistoryToolBar.Hide;
3387 TreeView.TopItem.Expanded := True; //
\83c
\83\8a\81[
\83g
\83b
\83v
\8d\80\96Ú
\82¾
\82¯
\82ð
\8aJ
\82
3388 //TreeView.Selected := TreeView.Items[0]; //
\83c
\83\8a\81[
\82Ì
\83g
\83b
\83v
\8d\80\96Ú
\82ð
\91I
\91ð
\82·
\82é
3389 if GetActiveList = nil then
3390 TreeView.Selected := TreeView.Items[0]
3392 for i := 0 to TreeView.Items.Count - 1 do begin
3393 if TreeView.Items[i].Data = GetActiveList then
3394 TreeView.Selected := TreeView.Items[i];
3400 procedure TGikoForm.ShowHistoryTree;
3402 GikoSys.Setting.CabinetIndex := 1;
3404 FavoriteTreeView.Visible := False;
3405 TreeView.Visible := True;
3407 Cabinet2chAction.Checked := False;
3408 CabinetHistoryAction.Checked := True;
3409 CabinetFavoriteAction.Checked := False;
3411 if FTreeType <> gttHistory then begin
3412 FTreeType := gttHistory;
3413 HistoryToolBar.Show;
3414 FavoriteToolBar.Hide;
3416 CabinetSelectToolButton.Caption := '
\97\9a\97ð
\83\8a\83X
\83g';
3420 procedure TGikoForm.SetHistoryTreeNode;
3426 TreeView.Items.BeginUpdate;
3428 TreeView.Items.Clear;
3429 for i := 0 to FHistoryList.Count - 1 do begin
3430 Item := TThreadItem(FHistoryList[i]);
3431 Node := TreeView.Items.Add(nil, Item.Title);
3433 if Item.NewArrival then begin
3434 Node.ImageIndex := ITEM_ICON_THREADNEW1;
3435 Node.SelectedIndex := ITEM_ICON_THREADNEW2;
3437 Node.ImageIndex := ITEM_ICON_THREADLOG1;
3438 Node.SelectedIndex := ITEM_ICON_THREADLOG2;
3443 TreeView.Items.EndUpdate;
3447 procedure TGikoForm.SelectTreeNode(Item: TObject; CallEvent: Boolean);
3449 ChangeEvent: TTVChangedEvent;
3450 ChangingEvent: TTVChangingEvent;
3454 ChangingEvent := nil;
3456 if not CallEvent then begin
3457 ChangeEvent := TreeView.OnChange;
3458 ChangingEvent := TreeView.OnChanging;
3461 if not CallEvent then begin
3462 TreeView.OnChange := nil;
3463 TreeView.OnChanging := nil;
3465 Application.ProcessMessages;
3466 for i := 0 to TreeView.Items.Count - 1 do begin
3467 if TreeView.Items[i].Data = Item then begin
3468 TreeView.Items[i].Selected := True;
3470 TreeViewChange(TreeView, TreeView.Items[i]);
3474 Application.ProcessMessages;
3476 if not CallEvent then begin
3477 TreeView.OnChange := ChangeEvent;
3478 TreeView.OnChanging := ChangingEvent;
3483 procedure TGikoForm.ListViewMouseDown(Sender: TObject;
3484 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
3488 { if ssDouble in Shift then begin
3489 DoubleClickOccurred[Button] := True;
3491 DoubleClickOccurred[Button] := False;
3492 t := GetTickCount+GetDoubleClickTime;
3493 while GetTickCount < t do begin
3494 Application.ProcessMessages;
3495 if DoubleClickOccurred[Button] then
3500 if ssDouble in Shift then begin
3502 mbLeft: ListDoubleClick;
3515 procedure TGikoForm.ListClick;
3517 ListItem: TListItem;
3518 ThreadItem: TThreadItem;
3520 if ListView.SelCount <> 1 then Exit;
3521 ListItem := ListView.Selected;
3522 if ListItem = nil then Exit;
3523 if not (TObject(ListItem.Data) is TThreadItem) then Exit;
3525 ThreadItem := TThreadItem(ListItem.Data);
3526 if ThreadItem.IsLogFile then begin
3527 // if AddHistory(ThreadItem) then
3528 // SetContent(ThreadItem);
3529 InsertBrowserTab(ThreadItem);
3530 ListView.UpdateItems(ListItem.Index, ListItem.Index);
3532 // SetContent(ThreadItem);
3533 InsertBrowserTab(ThreadItem);
3537 procedure TGikoForm.ListDoubleClick;
3539 ThreadItem: TThreadItem;
3541 // PostMessage(ListView.Handle, WM_CANCELMODE, 0, 0);
3543 if ListView.Selected = nil then Exit;
3544 // if TreeView.Selected = nil then Exit;
3546 if TObject(ListView.Selected.Data) is TCategory then begin
3547 SelectTreeNode(ListView.Selected.Data, True);
3548 // TreeView.Selected.Expanded := True;
3549 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
3550 //TreeViewChange(nil, TreeView.Selected);
3551 end else if TObject(ListView.Selected.Data) is TBoard then begin
3552 SelectTreeNode(ListView.Selected.Data, True);
3553 // TreeView.Selected.Expanded := True;
3554 // TreeView.Selected.Item[ListView.Selected.Index].Selected := True;
3555 //TreeViewChange(nil, TreeView.Selected);
3556 end else if TObject(ListView.Selected.Data) is TThreadItem then begin
3557 //if TObject(ListView.Selected.Data) is TThreadItem then begin
3558 ThreadItem := TThreadItem(ListView.Selected.Data);
3559 DownloadContent(ThreadItem);
3564 procedure TGikoForm.BrowserMovement(AName: string);
3568 // OleVariant(Browser.Document).parentWindow.location.hash := AName;
3571 OleVariant(Browser.Document as IHTMLDocument2).body.scrollTop :=
3572 OleVariant(Browser.Document as IHTMLDocument2).anchors.item(nm).offsetTop;
3577 procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode);
3579 if TObject(Node.Data) is TBBS2ch then begin
3580 TBBS2ch(Node.Data).NodeExpand := False;
3581 end else if TObject(Node.Data) is TCategory then begin
3582 TCategory(Node.Data).NodeExpand := False;
3583 end else if TObject(Node.Data) is TBoard then begin
3584 TBoard(Node.Data).NodeExpand := False;
3588 procedure TGikoForm.MessageListViewResize(Sender: TObject);
3590 // MessageListView.Column[0].Width := MessageListView.ClientWidth - 16;
3593 procedure TGikoForm.SelectListItem(List: TList);
3595 // TmpTreeNode: TTreeNode;
3596 TmpListItem: TListItem;
3599 TmpListItem := ListView.Selected;
3600 while TmpListItem <> nil do begin
3601 List.Add(TmpListItem.Data);
3602 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
3606 procedure TGikoForm.ExitActionExecute(Sender: TObject);
3611 procedure TGikoForm.AllSelectActionExecute(Sender: TObject);
3616 procedure TGikoForm.StdToolBarVisibleActionExecute(Sender: TObject);
3618 CoolBand: TCoolBand;
3620 CoolBand := GetCoolBand(MainCoolBar, StdToolBar);
3621 if CoolBand = nil then
3623 GikoSys.Setting.StdToolBarVisible := StdToolBarVisibleAction.Checked;
3624 CoolBand.Visible := GikoSys.Setting.StdToolBarVisible;
3625 // StdToolBar.Visible := StdToolBarVisibleAction.Checked;
3626 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
3628 //StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
3629 StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible;
3632 procedure TGikoForm.AddressBarVisibleActionExecute(Sender: TObject);
3634 CoolBand: TCoolBand;
3636 CoolBand := GetCoolBand(MainCoolBar, AddressToolBar);
3637 if CoolBand = nil then
3639 GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked;
3640 CoolBand.Visible := GikoSys.Setting.AddressBarVisible;
3641 //AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
3642 AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible;
3645 procedure TGikoForm.LinkBarVisibleActionExecute(Sender: TObject);
3647 CoolBand: TCoolBand;
3649 CoolBand := GetCoolBand(MainCoolBar, LinkToolBar);
3650 if CoolBand = nil then
3652 GikoSys.Setting.LinkBarVisible := LinkBarVisibleAction.Checked;
3653 CoolBand.Visible := GikoSys.Setting.LinkBarVisible;
3654 //LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
3655 LinkToolBarVisiblePMenu.Checked := GikoSys.Setting.LinkBarVisible;
3658 procedure TGikoForm.ListToolBarVisibleActionExecute(Sender: TObject);
3660 CoolBand: TCoolBand;
3662 CoolBand := GetCoolBand(ListCoolBar, ListToolBar);
3663 if CoolBand = nil then
3665 CoolBand.Visible := ListToolBarVisibleAction.Checked;
3666 // ListToolBar.Visible := ListToolBarVisibleAction.Checked;
3667 // AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible;
3668 GikoSys.Setting.ListToolBarVisible := ListToolBarVisibleAction.Checked;
3671 procedure TGikoForm.ListNameBarVisibleActionExecute(Sender: TObject);
3673 CoolBand: TCoolBand;
3675 CoolBand := GetCoolBand(ListCoolBar, ListNameToolBar);
3676 if CoolBand = nil then
3678 CoolBand.Visible := ListNameBarVisibleAction.Checked;
3679 GikoSys.Setting.ListNameBarVisible := ListNameBarVisibleAction.Checked;
3682 procedure TGikoForm.BrowserToolBarVisibleActionExecute(Sender: TObject);
3684 CoolBand: TCoolBand;
3686 CoolBand := GetCoolBand(BrowserCoolBar, BrowserToolBar);
3687 if CoolBand = nil then
3689 CoolBand.Visible := BrowserToolBarVisibleAction.Checked;
3690 // BrowserToolBar.Visible := BrowserToolBarVisibleAction.Checked;
3691 GikoSys.Setting.BrowserToolBarVisible := BrowserToolBarVisibleAction.Checked;
3694 procedure TGikoForm.BrowserNameBarVisibleActionExecute(Sender: TObject);
3696 CoolBand: TCoolBand;
3698 CoolBand := GetCoolBand(BrowserCoolBar, BrowserNameToolBar);
3699 if CoolBand = nil then
3701 CoolBand.Visible := BrowserNameBarVisibleAction.Checked;
3702 GikoSys.Setting.BrowserNameBarVisible := BrowserNameBarVisibleAction.Checked;
3705 procedure TGikoForm.MsgBarVisibleActionExecute(Sender: TObject);
3707 MessageSplitter.Visible := MsgBarVisibleAction.Checked;
3708 MessagePanel.Top := MessageSplitter.Top + MessageSplitter.Height;
3709 MessageSplitter.Top := MessagePanel.Top + 1;
3710 MessagePanel.Visible := MsgBarVisibleAction.Checked;
3711 GikoSys.Setting.MessageBarVisible := MsgBarVisibleAction.Checked;
3714 procedure TGikoForm.StatusBarVisibleActionExecute(Sender: TObject);
3716 StatusBar.Visible := StatusBarVisibleAction.Checked;
3717 GikoSys.Setting.StatusBarVisible := StatusBarVisibleAction.Checked;
3720 procedure TGikoForm.IconStyleExecute(Sender: TObject);
3722 case ListView.ViewStyle of
3723 vsIcon: SmallIconAction.Execute;
3724 vsSmallIcon: ListIconAction.Execute;
3725 vsList: DetailIconAction.Execute;
3726 vsReport: LargeIconAction.Execute;
3730 procedure TGikoForm.LargeIconActionExecute(Sender: TObject);
3732 ListView.ViewStyle := vsIcon;
3733 LargeIconAction.Checked := True;
3736 procedure TGikoForm.SmallIconActionExecute(Sender: TObject);
3738 ListView.ViewStyle := vsSmallIcon;
3739 SmallIconAction.Checked := True;
3742 procedure TGikoForm.ListIconActionExecute(Sender: TObject);
3744 ListView.ViewStyle := vsList;
3745 ListIconAction.Checked := True;
3748 procedure TGikoForm.DetailIconActionExecute(Sender: TObject);
3750 ListView.ViewStyle := vsReport;
3751 DetailIconAction.Checked := True;
3754 procedure TGikoForm.SearchActionExecute(Sender: TObject);
3759 if FSearchDialog = nil then begin
3760 if (GikoForm.GetActiveList is TCategory) or (GikoForm.GetActiveList is TBoard) then
3761 chk := GikoForm.GetActiveList
3765 FSearchDialog := TSearchDialog.Create(Self, chk);
3766 FSearchDialog.SearchComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
3776 procedure TGikoForm.OptionActionExecute(Sender: TObject);
3780 Dlg := TOptionDialog.Create(Self);
3788 procedure TGikoForm.GikoNaviWebPageActionExecute(Sender: TObject);
3790 URL_GIKONAVI: string = 'http://gikonavi.sourceforge.jp/';
3792 GikoSys.OpenBrowser(URL_GIKONAVI, gbtAuto);
3795 procedure TGikoForm.MonazillaWebPageActionExecute(Sender: TObject);
3797 URL_MONAZILLA: string = 'http://www.monazilla.org/';
3799 GikoSys.OpenBrowser(URL_MONAZILLA, gbtAuto);
3802 procedure TGikoForm.BBS2chWebPageActionExecute(Sender: TObject);
3804 URL_2ch: string = 'http://www.2ch.net/';
3806 GikoSys.OpenBrowser(URL_2ch, gbtAuto);
3809 procedure TGikoForm.GikoFolderOpenActionExecute(Sender: TObject);
3811 // GikoSys.OpenBrowser(GikoSys.GetAppDir, gbtIE);
3812 GikoSys.CreateProcess('explorer.exe', '/e,"' + GikoSys.GetAppDir + '"');
3815 procedure TGikoForm.AboutActionExecute(Sender: TObject);
3819 Dlg := TAboutDialog.Create(Self);
3827 procedure TGikoForm.Cabinet2chActionExecute(Sender: TObject);
3832 procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject);
3837 procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject);
3839 TreeSplitter.Visible := CabinetVisibleAction.Checked;
3840 CabinetPanel.Visible := CabinetVisibleAction.Checked;
3843 procedure TGikoForm.AllItemActionExecute(Sender: TObject);
3846 if ViewType <> gvtAll then
3847 SetListViewType(gvtAll);
3848 AllItemAction.Checked := True;
3849 LogItemAction.Checked := False;
3850 NewItemAction.Checked := False;
3851 //SelectItemAction.Checked := False;
3852 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
3854 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
3855 if SelectComboBox.Parent <> nil then begin
3856 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
3857 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
3864 procedure TGikoForm.LogItemActionExecute(Sender: TObject);
3867 if ViewType <> gvtLog then
3868 SetListViewType(gvtLog);
3869 AllItemAction.Checked := False;
3870 LogItemAction.Checked := True;
3871 NewItemAction.Checked := False;
3872 //SelectItemAction.Checked := False;
3873 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
3875 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
3876 if SelectComboBox.Parent <> nil then begin
3877 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
3878 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
3885 procedure TGikoForm.NewItemActionExecute(Sender: TObject);
3889 if ViewType <> gvtNew then
3890 SetListViewType(gvtNew);
3891 AllItemAction.Checked := False;
3892 LogItemAction.Checked := False;
3893 NewItemAction.Checked := True;
3894 //SelectItemAction.Checked := False;
3895 // SelectComboBox
\82Ì
\97\9a\97ð
\82ð
\8dX
\90V
\82µ
\82Ä
\82¨
\82
3897 // SelectComboBox
\82Ì
\92l
\82ð
\83N
\83\8a\83A
3898 if SelectComboBox.Parent <> nil then begin
3899 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
3900 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
3907 procedure TGikoForm.SelectItemActionExecute(Sender: TObject);
3910 Dlg: TListSelectDialog;
3913 if SelectComboBox.Parent <> nil then begin
3914 if SelectComboBox.Left + SelectComboBox.Width < ListToolBar.Width then begin
3915 // SelectComboBox
\82ª
\82 \82é
\8fê
\8d\87\82Í
\83t
\83H
\81[
\83J
\83X
\82ð
\88Ú
\82·
3916 SelectComboBox.SetFocus;
3923 if SelectComboBox.Text = SELECTCOMBOBOX_NAME then begin
3924 SelectComboBox.Text := '';
3925 SelectComboBox.Color := clWindow;
3928 AllItemAction.Checked := False;
3929 LogItemAction.Checked := False;
3930 NewItemAction.Checked := False;
3931 //SelectItemAction.Checked := True;
3933 Dlg := TListSelectDialog.Create(Self);
3935 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
3936 Dlg.SelectComboBox.Text := SelectComboBox.Text;
3938 if Dlg.ModalResult = mrCancel then begin
3939 if Length( SelectComboBox.Text ) = 0 then begin
3940 AllItemAction.Checked := True;
3941 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
3942 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
3945 if GetActiveList is TBoard then
3946 SetListViewType(gvtUser, TBoard(GetActiveList).ParentCategory.ParentBBS2ch.SelectText , Dlg.KubetsuCheckBox.Checked);
3948 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
3950 GikoSys.Setting.SelectTextList.Delete(idx);
3951 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
3952 while Dlg.SelectComboBox.Items.Count > 100 do begin
3953 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
3956 if Length( Dlg.SelectComboBox.Text ) = 0 then begin
3957 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
3958 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
3960 SelectComboBox.Text := Dlg.SelectComboBox.Text;
3961 SelectComboBox.Color := clWindow;
3963 SetListViewType(gvtUser, Dlg.SelectComboBox.Text, Dlg.KubetsuCheckBox.Checked);
3970 procedure TGikoForm.ListNumberVisibleActionExecute(Sender: TObject);
3972 GikoSys.Setting.ListViewNo := ListNumberVisibleAction.Checked;
3976 procedure TGikoForm.UpFolderActionExecute(Sender: TObject);
3978 if GetActiveList is TBoard then begin
3979 if FTreeType = gtt2ch then
3980 SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
3981 //SetActiveList(TBoard(GetActiveList).ParentCategory);
3982 end else if GetActiveList is TCategory then begin
3983 if FTreeType = gtt2ch then
3984 SelectTreeNode(TCategory(GetActiveList).ParentBBS2ch, True);
3985 //SetActiveList(TCategory(GetActiveList).ParentBBS2ch);
3987 // if TreeView.Selected = nil then Exit;
3988 // if TreeView.Selected.Level = 0 then Exit;
3989 // TreeView.Selected.Parent.Selected := True;
3992 procedure TGikoForm.RoundActionExecute(Sender: TObject);
3996 Dlg := TRoundDialog.Create(Self);
4004 procedure TGikoForm.StopActionExecute(Sender: TObject);
4006 FControlThread.DownloadAbort;
4007 if FWorkCount <> 0 then FWorkCount := 0;
4009 Animate.Active := False;
4012 Screen.Cursor := crDefault;
4015 procedure TGikoForm.MsgBarCloseActionExecute(Sender: TObject);
4017 // MessagePanel.Visible := False;
4018 // MessageSplitter.Visible := False;
4019 // MsgBarVisibleAction.Checked := False;
4020 MsgBarVisibleAction.Execute;
4023 procedure TGikoForm.BrowserMaxActionExecute(Sender: TObject);
4025 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4026 case GikoSys.Setting.ListWidthState of
4028 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4029 ViewPanel.Width := FBrowserSizeWidth;
4030 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4031 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4032 GikoSys.Setting.ListWidthState := glsNormal;
4034 glsMin, glsNormal: begin
4035 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4036 if GikoSys.Setting.ListWidthState = glsNormal then
4037 FBrowserSizeWidth := ViewPanel.Width;
4038 ViewPanel.Width := 1;
4039 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4040 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4041 GikoSys.Setting.ListWidthState := glsMax;
4045 case GikoSys.Setting.ListHeightState of
4047 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4048 ViewPanel.Height := FBrowserSizeHeight;
4049 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4050 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4051 GikoSys.Setting.ListHeightState := glsNormal;
4053 glsMin, glsNormal: begin
4054 //
\8dÅ
\91å
\95\
\8e¦
\82É
\82·
\82é
4055 if GikoSys.Setting.ListHeightState = glsNormal then
4056 FBrowserSizeHeight := ViewPanel.Height;
4057 ViewPanel.Height := 1;
4058 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4059 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4060 GikoSys.Setting.ListHeightState := glsMax;
4064 // Mouse.CursorPos := BrowserSizeButton.ClientToScreen(Point(
4065 // System.Round(BrowserToolBar.ButtonWidth div 2),
4066 // System.Round(BrowserToolBar.ButtonHeight div 2)));
4069 procedure TGikoForm.BrowserMinActionExecute(Sender: TObject);
4071 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4072 case GikoSys.Setting.ListWidthState of
4073 glsMax, glsNormal: begin
4074 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4075 if GikoSys.Setting.ListWidthState = glsNormal then
4076 FBrowserSizeWidth := ViewPanel.Width;
4077 ViewPanel.Width := ThreadMainPanel.Width - 80;
4078 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4079 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4080 GikoSys.Setting.ListWidthState := glsMin;
4083 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4084 ViewPanel.Width := FBrowserSizeWidth;
4085 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4086 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4087 GikoSys.Setting.ListWidthState := glsNormal;
4091 case GikoSys.Setting.ListHeightState of
4092 glsMax, glsNormal: begin
4093 //
\8dÅ
\8f¬
\95\
\8e¦
\82É
\82·
\82é
4094 if GikoSys.Setting.ListHeightState = glsNormal then
4095 FBrowserSizeHeight := ViewPanel.Height;
4096 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
4097 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4098 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4099 GikoSys.Setting.ListHeightState := glsMin;
4102 //
\92Ê
\8fí
\95\
\8e¦
\82É
\82·
\82é
4103 ViewPanel.Height := FBrowserSizeHeight;
4104 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
4105 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4106 GikoSys.Setting.ListHeightState := glsNormal;
4112 procedure TGikoForm.ScrollTopActionExecute(Sender: TObject);
4114 BrowserMovement('top');
4117 procedure TGikoForm.ScrollLastActionExecute(Sender: TObject);
4119 BrowserMovement('bottom');
4122 procedure TGikoForm.ScrollNewActionExecute(Sender: TObject);
4124 BrowserMovement('new');
4127 procedure TGikoForm.ScrollKokoActionExecute(Sender: TObject);
4129 BrowserMovement('koko');
4132 procedure TGikoForm.EditorActionExecute(Sender: TObject);
4134 Editor: TEditorForm;
4138 Item := GetActiveContent;
4139 if Item = nil then Exit;
4141 if Item.Count >= 1000 then begin
4142 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
4143 + '
\90V
\83X
\83\8c\83b
\83h
\82ð
\92T
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
4144 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin
4148 Editor := TEditorForm.Create(Self);
4149 Editor.SetThreadItem(Item);
4151 Editor.BodyEdit.SetFocus;
4154 procedure TGikoForm.IEActionExecute(Sender: TObject);
4156 ShowThreadAction.Execute;
4159 procedure TGikoForm.ShowThreadActionExecute(Sender: TObject);
4161 ThreadItem: TThreadItem;
4163 ThreadItem := GetActiveContent;
4164 if ThreadItem = nil then Exit;
4165 GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
4168 procedure TGikoForm.ShowBoardActionExecute(Sender: TObject);
4170 ThreadItem: TThreadItem;
4172 ThreadItem := GetActiveContent;
4173 if ThreadItem = nil then Exit;
4174 GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto);
4177 //(Thread)URL
\82ð
\83R
\83s
\81[
4178 procedure TGikoForm.URLCopyActionExecute(Sender: TObject);
4183 if TObject(GetActiveContent) is TBoard then
4184 s := s + TBoard(GetActiveContent).URL + #13#10
4185 else if TObject(GetActiveContent) is TThreadItem then
4186 s := s + TThreadItem(GetActiveContent).URL + #13#10;
4188 Clipboard.AsText := s;
4191 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ð
\83R
\83s
\81[
4192 procedure TGikoForm.NameCopyActionExecute(Sender: TObject);
4197 if TObject(GetActiveContent) is TBoard then
4198 s := s + TBoard(GetActiveContent).Title + #13#10
4199 else if TObject(GetActiveContent) is TThreadItem then
4200 s := s + TThreadItem(GetActiveContent).Title + #13#10;
4202 Clipboard.AsText := s;
4205 //(Thread)
\83X
\83\8c\83b
\83h
\96¼
\82ÆURL
\82ð
\83R
\83s
\81[
4206 procedure TGikoForm.NameURLCopyActionExecute(Sender: TObject);
4211 if TObject(GetActiveContent) is TBoard then
4212 s := s + TBoard(GetActiveContent).Title + #13#10 + TBoard(GetActiveContent).URL + #13#10
4213 else if TObject(GetActiveContent) is TThreadItem then
4214 s := s + TThreadItem(GetActiveContent).Title + #13#10 + TThreadItem(GetActiveContent).URL + #13#10;
4216 Clipboard.AsText := s;
4219 procedure TGikoForm.ItemReloadActionExecute(Sender: TObject);
4221 ThreadItem: TThreadItem;
4223 ThreadItem := GetActiveContent;
4224 if ThreadItem <> nil then
4225 DownloadContent(ThreadItem);
4228 procedure TGikoForm.SelectListReloadActionExecute(Sender: TObject);
4234 if GetActiveList is TCategory then begin
4235 List := TList.Create;
4237 SelectListItem(List);
4238 if List.Count > 5 then begin
4239 msg := '5
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
4240 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
4241 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
4244 for i := 0 to List.Count - 1 do begin
4245 if TObject(List[i]) is TBoard then
4246 DownloadList(TBoard(List[i]));
4251 end else if GetActiveList is TBoard then begin
4252 DownloadList(TBoard(GetActiveList));
4256 procedure TGikoForm.SelectThreadReloadActionExecute(Sender: TObject);
4262 List := TList.Create;
4264 SelectListItem(List);
4265 if List.Count > 10 then begin
4266 msg := '10
\8cÂ
\88È
\8fã
\82Í
\8ew
\92è
\82Å
\82«
\82Ü
\82¹
\82ñ' + #13#10
4267 + '
\82Q
\82¿
\82á
\82ñ
\82Ë
\82é
\95\89\89×
\8cy
\8c¸
\82É
\82²
\8b¦
\97Í
\82
\82¾
\82³
\82¢';
4268 MsgBox(Handle, msg, '
\8cx
\8d\90', MB_ICONEXCLAMATION);
4271 for i := 0 to List.Count - 1 do begin
4272 if TObject(List[i]) is TThreadItem then
4273 DownloadContent(TThreadItem(List[i]));
4280 procedure TGikoForm.SelectListReloadActionUpdate(Sender: TObject);
4282 if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
4283 SelectListReloadAction.Enabled := True
4284 else if GetActiveList is TBoard then
4285 SelectListReloadAction.Enabled := True
4287 SelectListReloadAction.Enabled := False;
4290 procedure TGikoForm.SelectThreadReloadActionUpdate(Sender: TObject);
4292 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
4293 SelectThreadReloadAction.Enabled := True
4295 SelectThreadReloadAction.Enabled := False;
4298 procedure TGikoForm.AllItemActionUpdate(Sender: TObject);
4300 AllItemAction.Enabled := (GetActiveList is TBoard);
4303 procedure TGikoForm.LogItemActionUpdate(Sender: TObject);
4305 LogItemAction.Enabled := (GetActiveList is TBoard);
4308 procedure TGikoForm.NewItemActionUpdate(Sender: TObject);
4310 NewItemAction.Enabled := (GetActiveList is TBoard);
4313 procedure TGikoForm.SelectItemActionUpdate(Sender: TObject);
4315 SelectItemAction.Enabled := (GetActiveList is TBoard);
4318 procedure TGikoForm.UpFolderActionUpdate(Sender: TObject);
4320 UpFolderAction.Enabled := not (GetActiveList is TBBS2ch);
4323 procedure TGikoForm.ThreadEditorActionUpdate(Sender: TObject);
4325 ThreadEditorAction.Enabled := (GetActiveList is TBoard);
4328 procedure TGikoForm.FormResize(Sender: TObject);
4330 MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
4331 MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
4334 procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject);
4336 ScrollTopAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
4339 procedure TGikoForm.ScrollLastActionUpdate(Sender: TObject);
4341 ScrollLastAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
4344 procedure TGikoForm.ScrollNewActionUpdate(Sender: TObject);
4346 ScrollNewAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
4349 procedure TGikoForm.ScrollKokoActionUpdate(Sender: TObject);
4351 ScrollKokoAction.Enabled := (GetActiveContent <> nil)
4352 and (GetActiveContent.IsLogFile)
4353 and (GetActiveContent.Kokomade <> -1);
4357 procedure TGikoForm.EditorActionUpdate(Sender: TObject);
4359 EditorAction.Enabled := GetActiveContent <> nil;
4362 procedure TGikoForm.IEActionUpdate(Sender: TObject);
4364 IEAction.Enabled := GetActiveContent <> nil;
4367 procedure TGikoForm.ShowThreadActionUpdate(Sender: TObject);
4369 ShowThreadAction.Enabled := GetActiveContent <> nil;
4372 procedure TGikoForm.ShowBoardActionUpdate(Sender: TObject);
4374 ShowBoardAction.Enabled := GetActiveContent <> nil;
4377 procedure TGikoForm.ItemReloadActionUpdate(Sender: TObject);
4379 ItemReloadAction.Enabled := GetActiveContent <> nil;
4382 procedure TGikoForm.URLCopyActionUpdate(Sender: TObject);
4384 URLCopyAction.Enabled := GetActiveContent <> nil;
4387 procedure TGikoForm.NameCopyActionUpdate(Sender: TObject);
4389 NameCopyAction.Enabled := GetActiveContent <> nil;
4392 procedure TGikoForm.NameURLCopyActionUpdate(Sender: TObject);
4394 NameURLCopyAction.Enabled := GetActiveContent <> nil;
4397 procedure TGikoForm.BrowserTabCloseActionUpdate(Sender: TObject);
4399 BrowserTabCloseAction.Enabled := GetActiveContent <> nil;
4402 procedure TGikoForm.NotSelectTabCloseActionUpdate(Sender: TObject);
4404 NotSelectTabCloseAction.Enabled := GetActiveContent <> nil;
4407 procedure TGikoForm.AllTabCloseActionUpdate(Sender: TObject);
4409 AllTabCloseAction.Enabled := GetActiveContent <> nil;
4412 procedure TGikoForm.ActiveLogDeleteActionUpdate(Sender: TObject);
4414 ActiveLogDeleteAction.Enabled := GetActiveContent <> nil;
4417 procedure TGikoForm.ListViewSelectItem(Sender: TObject; Item: TListItem;
4420 SelectTimer.Enabled := False;
4422 SelectTimer.Enabled := True;
4425 procedure TGikoForm.SelectTimerTimer(Sender: TObject);
4427 SelectTimer.Enabled := False;
4431 procedure TGikoForm.ListViewDblClick(Sender: TObject);
4436 procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
4438 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';
4439 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
4441 ThreadItem: TThreadItem;
4442 TmpListItem: TListItem;
4446 List := TList.Create;
4448 TmpListItem := ListView.Selected;
4449 while TmpListItem <> nil do begin
4450 if TObject(TmpListItem.Data) is TThreadItem then begin
4451 ThreadItem := TThreadItem(TmpListItem.Data);
4452 if ThreadItem.IsLogFile then
4453 List.Add(ThreadItem);
4455 TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]);
4458 if GikoSys.Setting.DeleteMsg and (List.Count > 0) then begin
4459 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
4463 for i := 0 to List.Count - 1 do begin
4464 ThreadItem := TThreadItem(List[i]);
4465 DeleteHistory(ThreadItem);
4466 DeleteTab(ThreadItem);
4467 ThreadItem.DeleteLogFile;
4475 procedure TGikoForm.DeleteTab(ThreadItem: TThreadItem);
4479 FTabHintIndex := -1;
4480 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
4481 if TThreadItem(BrowserTab.Tabs.Objects[i]) = ThreadItem then begin
4482 BrowserTab.Tabs.Delete(i);
4483 if i > (BrowserTab.Tabs.Count - 1) then
4484 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1
4486 BrowserTab.TabIndex := i;
4487 if BrowserTab.Tabs.Count = 0 then
4489 else if BrowserTab.TabIndex <> -1 then
4490 SetContent(TThreadItem(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]));
4496 procedure TGikoForm.KokomadeActionExecute(Sender: TObject);
4499 ThreadItem: TThreadItem;
4504 No := KokoPopupMenu.Tag;
4505 if No = 0 then Exit;
4506 ThreadItem := GetActiveContent;
4507 if ThreadItem = nil then Exit;
4508 ThreadItem.Kokomade := No;
4509 doc := Browser.Document;
4510 ScrollTop := doc.Body.ScrollTop;
4512 GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
4513 // HtmlName := GikoSys.CreateHTML(ThreadItem, sTitle) + '#koko';
4515 // Browser.Navigate(HtmlName, Flags);
4517 Application.ProcessMessages;
4518 doc.Body.ScrollTop := ScrollTop;
4521 procedure TGikoForm.ZenbuActionExecute(Sender: TObject);
4523 ThreadItem: TThreadItem;
4528 ThreadItem := GetActiveContent;
4529 if ThreadItem = nil then Exit;
4530 ThreadItem.Kokomade := -1;
4531 doc := Browser.Document;
4532 ScrollTop := doc.Body.ScrollTop;
4533 GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
4534 // HtmlName := GikoSys.CreateHTML(ThreadItem, sTitle) + '#koko';
4536 // Browser.Navigate(HtmlName, Flags);
4538 Application.ProcessMessages;
4539 doc.Body.ScrollTop := ScrollTop;
4542 function TGikoForm.Hook(var Message: TMessage): Boolean;
4545 if Message.Msg = CM_APPKEYDOWN then Result := True;
4548 procedure TGikoForm.KokoResActionExecute(Sender: TObject);
4550 Editor: TEditorForm;
4555 Number := KokoPopupMenu.Tag;
4556 if Number = 0 then Exit;
4557 Item := GetActiveContent;
4558 if Item = nil then Exit;
4560 if Item.Count >= 1000 then begin
4561 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
4562 + '
\90V
\83X
\83\8c\83b
\83h
\82ð
\92T
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
4563 if MsgBox(Handle, msg, '
\8cx
\8d\90', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin
4567 Editor := TEditorForm.Create(Self);
4568 Editor.SetThreadItem(Item);
4569 Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
4571 Editor.BodyEdit.SetFocus;
4574 procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
4576 ItemRoundPMenu.Visible := (GetActiveList is TBoard);
4577 ItemReservPMenu.Visible := (GetActiveList is TBoard);
4578 LPMSep01.Visible := (GetActiveList is TBoard);
4579 ListRoundPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
4580 ListReservPMenu.Visible := (GetActiveList is TCategory);// or (GetActiveList is TBoard);
4581 LPMSep02.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4582 KidokuPMenu.Visible := (GetActiveList is TBoard);
4583 MidokuPMenu.Visible := (GetActiveList is TBoard);
4584 UrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4585 NameUrlCopyPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4586 AllSelectPMenu.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4587 LPMSep05.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4588 DeletePMenu.Visible := (GetActiveList is TBoard);
4589 LPMSep06.Visible := (GetActiveList is TCategory) or (GetActiveList is TBoard);
4591 BoardFavoriteAddMenu.Visible := (GetActiveList is TCategory);
4592 ThreadFavoriteAddMenu.Visible := (GetActiveList is TBoard);
4594 AddRoundNameMenu(ItemReservPMenu);
4595 AddRoundNameMenu(ListReservPMenu);
4598 procedure TGikoForm.BoardIEActionExecute(Sender: TObject);
4602 if GetActiveList is TBoard then begin
4603 URL := TBoard(GetActiveList).URL;
4604 GikoSys.OpenBrowser(URL, gbtAuto);
4608 procedure TGikoForm.SelectItemURLCopyActionExecute(Sender: TObject);
4615 List := TList.Create;
4617 SelectListItem(List);
4618 for i := 0 to List.Count - 1 do begin
4619 if TObject(List[i]) is TBoard then
4620 s := s + TBoard(List[i]).URL + #13#10
4621 else if TObject(List[i]) is TThreadItem then
4622 s := s + TThreadItem(List[i]).URL + #13#10;
4625 Clipboard.AsText := s;
4631 procedure TGikoForm.SelectItemNameCopyActionExecute(Sender: TObject);
4638 List := TList.Create;
4640 SelectListItem(List);
4641 for i := 0 to List.Count - 1 do begin
4642 if TObject(List[i]) is TBoard then
4643 s := s + TBoard(List[i]).Title + #13#10
4644 else if TObject(List[i]) is TThreadItem then
4645 s := s + TThreadItem(List[i]).Title + #13#10;
4648 Clipboard.AsText := s;
4654 procedure TGikoForm.SelectItemNameURLCopyActionExecute(Sender: TObject);
4661 List := TList.Create;
4663 SelectListItem(List);
4664 for i := 0 to List.Count - 1 do begin
4665 if TObject(List[i]) is TBoard then
4666 s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10
4667 else if TObject(List[i]) is TThreadItem then
4668 s := s + TThreadItem(List[i]).Title + #13#10 + TThreadItem(List[i]).URL + #13#10;
4671 Clipboard.AsText := s;
4677 procedure TGikoForm.BoardIEActionUpdate(Sender: TObject);
4679 if GetActiveList is TBoard then
4680 BoardIEAction.Enabled := True
4682 BoardIEAction.Enabled := False;
4685 procedure TGikoForm.SelectItemURLCopyActionUpdate(Sender: TObject);
4687 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
4688 SelectItemURLCopyAction.Enabled := True
4690 SelectItemURLCopyAction.Enabled := False;
4693 procedure TGikoForm.SelectItemNameCopyActionUpdate(Sender: TObject);
4695 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
4696 SelectItemNameCopyAction.Enabled := True
4698 SelectItemNameCopyAction.Enabled := False;
4701 procedure TGikoForm.SelectItemNameURLCopyActionUpdate(Sender: TObject);
4703 if ((GetActiveList is TBoard) or (GetActiveList is TCategory))and (ListView.SelCount > 0) then
4704 SelectItemNameURLCopyAction.Enabled := True
4706 SelectItemNameURLCopyAction.Enabled := False;
4709 procedure TGikoForm.AllSelectActionUpdate(Sender: TObject);
4711 if ListView.SelCount > 0 then
4712 AllSelectAction.Enabled := True
4714 AllSelectAction.Enabled := False;
4717 procedure TGikoForm.LogDeleteActionUpdate(Sender: TObject);
4719 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then
4720 LogDeleteAction.Enabled := True
4722 LogDeleteAction.Enabled := False;
4725 procedure TGikoForm.BrowserTabCloseActionExecute(Sender: TObject);
4728 ThreadItem: TThreadItem;
4730 idx := BrowserTab.TabIndex;
4731 if idx <> -1 then begin
4732 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
4733 DeleteTab(ThreadItem);
4737 procedure TGikoForm.NotSelectTabCloseActionExecute(Sender: TObject);
4741 for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
4742 if BrowserTab.TabIndex <> i then begin
4743 BrowserTab.Tabs.Delete(i);
4748 procedure TGikoForm.AllTabCloseActionExecute(Sender: TObject);
4752 for i := BrowserTab.Tabs.Count - 1 downto 0 do
4753 BrowserTab.Tabs.Delete(i);
4757 procedure TGikoForm.TreeSelectBoradReloadExecute(Sender: TObject);
4760 TmpTreeNode: TTreeNode;
4762 TmpTreeNode := FClickNode;
4763 TreeView.Selected := FClickNode;
4764 if TObject(TmpTreeNode.Data) is TBoard then begin
4765 Board := TBoard(TmpTreeNode.Data);
4766 DownloadList(Board);
4770 procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject);
4772 ThreadItem: TThreadItem;
4773 TmpTreeNode: TTreeNode;
4775 TmpTreeNode := FClickNode;
4776 TreeView.Selected := FClickNode;
4777 if TObject(TmpTreeNode.Data) is TThreadItem then begin
4778 ThreadItem := TThreadItem(TmpTreeNode.Data);
4779 DownloadContent(ThreadItem);
4783 procedure TGikoForm.TreeSelectURLCopyExecute(Sender: TObject);
4785 TmpTreeNode: TTreeNode;
4788 TmpTreeNode := FClickNode;
4789 TreeView.Selected := FClickNode;
4790 if TObject(TmpTreeNode.Data) is TBoard then begin
4791 s := TBoard(TmpTreeNode.Data).URL + #13#10;
4792 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
4793 s := TThreadItem(TmpTreeNode.Data).URL + #13#10;
4795 Clipboard.AsText := s;
4798 procedure TGikoForm.TreeSelectNameURLCopyExecute(Sender: TObject);
4800 TmpTreeNode: TTreeNode;
4803 TmpTreeNode := FClickNode;
4804 TreeView.Selected := FClickNode;
4805 if TObject(TmpTreeNode.Data) is TBoard then begin
4806 s := TBoard(TmpTreeNode.Data).Title + #13#10 + TBoard(TmpTreeNode.Data).URL + #13#10;
4807 end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin
4808 s := TThreadItem(TmpTreeNode.Data).Title + #13#10 + TThreadItem(TmpTreeNode.Data).URL + #13#10;
4810 Clipboard.AsText := s;
4814 procedure TGikoForm.TreePopupMenuPopup(Sender: TObject);
4816 FClickNode := TreeView.Selected;
4817 if FClickNode = nil then begin
4818 TreeSelectThreadPupupMenu.Visible := False;
4819 TreeSelectBoardPupupMenu.Visible := False;
4820 TPMSep01.Visible := False;
4821 TreeSelectURLPupupMenu.Visible := False;
4822 TreeSelectNameURLPupupMenu.Visible := False;
4823 TreeSelectFavoriteAddPupupMenu.Visible := False;
4824 end else if TObject(FClickNode.Data) is TBoard then begin
4825 TreeSelectThreadPupupMenu.Visible := False;
4826 TreeSelectBoardPupupMenu.Visible := True;
4827 TPMSep01.Visible := True;
4828 TreeSelectURLPupupMenu.Visible := True;
4829 TreeSelectNameURLPupupMenu.Visible := True;
4830 TreeSelectFavoriteAddPupupMenu.Visible := True;
4831 end else if (TObject(FClickNode.Data) is TThreadItem) then begin
4832 TreeSelectThreadPupupMenu.Visible := True;
4833 TreeSelectBoardPupupMenu.Visible := False;
4834 TPMSep01.Visible := True;
4835 TreeSelectURLPupupMenu.Visible := True;
4836 TreeSelectNameURLPupupMenu.Visible := True;
4837 TreeSelectFavoriteAddPupupMenu.Visible := True;
4839 TreeSelectThreadPupupMenu.Visible := False;
4840 TreeSelectBoardPupupMenu.Visible := False;
4841 TPMSep01.Visible := False;
4842 TreeSelectURLPupupMenu.Visible := False;
4843 TreeSelectNameURLPupupMenu.Visible := False;
4844 TreeSelectFavoriteAddPupupMenu.Visible := False;
4848 procedure TGikoForm.BrowserNewWindow2(Sender: TObject;
4849 var ppDisp: IDispatch; var Cancel: WordBool);
4855 Protocol, Host, Path, Document, Port, Bookmark: string;
4859 ThreadItem: TThreadItem;
4863 //shift ->
\90Ý
\92è
\83u
\83\89\83E
\83U
\81i
\96³
\82¯
\82ê
\82ÎIE
\81j
4865 ShiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
4866 CtrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
4869 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
4870 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
4871 Html := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
4873 URL := GikoSys.GetHRefText(Html);
4874 URL := GikoSys.HTMLDecode(URL);
4876 GikoSys.ParseURI(URL, Protocol, Host, Path, Document, Port, Bookmark);
4879 //
\83A
\83h
\83\8c\83X
\83o
\81[
\82Ì
\97\9a\97ð
4880 if GikoSys.Setting.LinkAddAddressBar then begin
4881 idx := AddressComboBox.Items.IndexOf(URL);
4882 if idx = -1 then begin
4883 AddressComboBox.Items.Insert(0, URL);
4884 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
4885 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
4887 AddressComboBox.Items.Delete(idx);
4888 AddressComboBox.Items.Insert(0, URL);
4892 if GikoSys.Is2chHost(Host) and GikoSys.Parse2chURL(URL, Path, Document, BBSID, BBSKey) then begin
4893 Board := BBS2ch.FindBBSID(BBSID);
4894 if Board = nil then begin
4895 GikoSys.OpenBrowser(URL, gbtAuto);
4898 if not Board.IsThreadDatRead then
4899 GikoSys.ReadSubjectFile(Board);
4900 ThreadItem := Board.Find(ChangeFileExt(BBSKey, '.dat'));
4901 if ThreadItem = nil then begin
4903 GikoSys.OpenBrowser(URL, gbtUserApp)
4904 else if CtrlDown then
4905 GikoSys.OpenBrowser(URL, gbtIE)
4907 ThreadItem := TThreadItem.Create;
4908 ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
4909 if AnsiPos(Host, Board.URL) = 0 then
4910 ThreadItem.DownloadHost := Host
4912 ThreadItem.DownloadHost := '';
4913 Board.Insert(0, ThreadItem);
4914 if ActiveList is TBoard then begin
4915 if TBoard(ActiveList) = Board then
4916 ListView.Items.Count := ListView.Items.Count + 1;
4917 InsertBrowserTab(ThreadItem);
4918 DownloadContent(ThreadItem);
4923 GikoSys.OpenBrowser(URL, gbtUserApp)
4924 else if CtrlDown then
4925 GikoSys.OpenBrowser(URL, gbtIE)
4927 if ThreadItem.IsLogFile then
4928 InsertBrowserTab(ThreadItem)
4930 if AnsiPos(Host, Board.URL) = 0 then
4931 ThreadItem.DownloadHost := Host
4933 ThreadItem.DownloadHost := '';
4934 InsertBrowserTab(ThreadItem);
4935 DownloadContent(ThreadItem);
4940 GikoSys.OpenBrowser(URL, gbtAuto);
4944 { ShiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
4945 CtrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
4948 Memo1.Lines.Add('ShiftDown');
4950 Memo1.Lines.Add('CtrlDown');
4952 if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin
4953 Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText;
4954 Url := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML;
4958 URL := GetHRefText(URL);
4960 ParseURI(URL, Protocol, Host, path, Document, Port, Bookmark);
4962 b := Parse2chURL(path, document, bbs, num);
4963 memo1.Lines.Add('bbs: ' + bbs);
4964 memo1.Lines.Add('key: ' + num);
4966 Memo1.Lines.Add('Parse2chURL: True')
4968 Memo1.Lines.Add('Parse2chURL: False');
4970 // AppPath := 'C:\Borland\Projects\Test\TestBrowser\TestBrowser.exe';
4975 procedure TGikoForm.ListSplitterCanResize(Sender: TObject;
4976 var NewSize: Integer; var Accept: Boolean);
4978 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
4979 if ViewPanel.Width < 2 then begin
4980 ViewPanel.Width := 1;
4981 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4982 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4983 GikoSys.Setting.ListWidthState := glsMax;
4984 end else if ViewPanel.Width > (ThreadMainPanel.Width - 80) then begin
4985 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4986 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
4987 GikoSys.Setting.ListWidthState := glsMin;
4989 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
4990 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
4991 GikoSys.Setting.ListWidthState := glsNormal;
4994 if ViewPanel.Height < 2 then begin
4995 ViewPanel.Height := 1;
4996 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
4997 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
4998 GikoSys.Setting.ListHeightState := glsMax;
4999 end else if ViewPanel.Height > (ThreadMainPanel.Height - BrowserCoolBar.Height - 7) then begin
5000 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5001 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5002 GikoSys.Setting.ListHeightState := glsMin;
5004 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5005 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5006 GikoSys.Setting.ListHeightState := glsNormal;
5011 procedure TGikoForm.ListSplitterMoved(Sender: TObject);
5013 if Mouse.Capture <> 0 then
5015 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5016 if (ViewPanel.Width > 1) and (ViewPanel.Width <= (ThreadMainPanel.Width - 80)) then
5017 FBrowserSizeWidth := ViewPanel.Width;
5019 if (ViewPanel.Height > 1) and (ViewPanel.Height <= (ThreadMainPanel.Height - BrowserCoolBar.Height)) then
5020 FBrowserSizeHeight := ViewPanel.Height;
5022 { if (Mouse.Capture = 0) and (ViewPanel.Height > 1) and (not ArrangeAction.Checked) then
5023 FBrowserSizeHeight := ViewPanel.Height
5024 else if (Mouse.Capture = 0) and (ViewPanel.Width > 1) and (ArrangeAction.Checked) then
5025 FBrowserSizeWidth := ViewPanel.Width;}
5028 procedure TGikoForm.BrowserTabChange(Sender: TObject);
5031 ThreadItem: TThreadItem;
5034 // if NewTab = -1 then
5035 if not BrowserTab.Dragging then begin
5036 FTabHintIndex := -1;
5037 BrowserTab.Hint := '';
5038 idx := BrowserTab.TabIndex;
5040 SetContent(BrowserNullTab)
5041 else if BrowserTab.Tabs.Objects[idx] is TThreadItem then begin
5042 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5043 SetContent(ThreadItem);
5044 if GikoSys.Setting.URLDisplay then
5045 AddressComboBox.Text := GikoSys.GetURL(ThreadItem.ParentBoard.BBSID, ThreadItem.FileName);
5049 procedure TGikoForm.BrowserTabClick(Sender: TObject);
5052 ThreadItem: TThreadItem;
5054 // if NewTab = -1 then
5055 FTabHintIndex := -1;
5056 BrowserTab.Hint := '';
5057 idx := BrowserTab.TabIndex;
5059 SetContent(BrowserNullTab)
5060 else if BrowserTab.Tabs.Objects[idx] is TThreadItem then begin
5061 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5062 SetContent(ThreadItem);
5063 if GikoSys.Setting.URLDisplay then
5064 AddressComboBox.Text := GikoSys.GetURL(ThreadItem.ParentBoard.BBSID, ThreadItem.FileName);
5068 procedure TGikoForm.BrowserTabMouseDown(Sender: TObject;
5069 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
5076 if Button = mbMiddle then begin
5077 //
\83}
\83E
\83X
\92\86\83{
\83^
\83\93
5080 p := BrowserTab.ScreenToClient(p);
5081 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
5082 if idx <> -1 then begin
5083 OldIndex := BrowserTab.TabIndex;
5084 BrowserTab.Tabs.Delete(idx);
5085 if idx = OldIndex then begin
5086 if BrowserTab.Tabs.Count > idx then
5087 BrowserTab.TabIndex := idx
5088 else if BrowserTab.Tabs.Count = idx then
5089 BrowserTab.TabIndex := idx - 1
5090 else if BrowserTab.Tabs.Count > 0 then
5091 BrowserTab.TabIndex := 0;
5092 BrowserTab.OnChange(nil);
5095 end else if Button = mbRight then begin
5096 //
\83}
\83E
\83X
\89E
\83{
\83^
\83\93
5099 // GetCursorPos(p2);
5100 p := BrowserTab.ScreenToClient(p);
5101 // idx := BrowserTab.ItemAtPos(p);
5102 idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
5103 if idx <> -1 then begin
5104 OldIndex := BrowserTab.TabIndex;
5105 BrowserTab.TabIndex := idx;
5106 if OldIndex <> idx then
5107 BrowserTab.OnChange(nil);
5108 BrowserTabPopupMenu.Tag := idx;
5109 BrowserTabPopupMenu.Popup(p2.X, p2.Y);
5111 {end else if BUtton = mbLeft then begin
5112 FDragWFirst := true;
5118 procedure TGikoForm.SetBrowserTabState;
5121 CoolBand: TCoolBand;
5123 BrowserBottomPanel.AutoSize := False;
5124 if GikoSys.Setting.BrowserTabVisible then begin
5125 if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
5126 BrowserTab.Style := tsTabs;
5127 if GikoSys.Setting.BrowserTabPosition = gtpTop then
5128 BrowserTab.TabPosition := tpTop
5130 BrowserTab.TabPosition := tpBottom;
5131 end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
5132 BrowserTab.TabPosition := tpTop;
5133 BrowserTab.Style := tsButtons;
5135 BrowserTab.TabPosition := tpTop;
5136 BrowserTab.Style := tsFlatButtons
5139 if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
5140 BrowserTab.Parent := BrowserTabToolBar;
5141 BrowserBottomPanel.Hide;
5142 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
5143 if CoolBand <> nil then
5144 CoolBand.Visible := True;
5145 // BrowserTab.Parent := BrowserTopPanel;
5146 // BrowserTab.Parent := BrowserCoolBar;
5147 // BrowserTab.Top := 26;
5148 // BrowserTopPanel.Height := 44;
5151 BrowserTab.Parent := BrowserBottomPanel;
5152 BrowserTab.Top := 0;
5153 BrowserTab.Left := 0;
5154 BrowserBottomPanel.Show;
5155 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
5156 if CoolBand <> nil then
5157 CoolBand.Visible := False;
5158 // BrowserTopPanel.Height := 26;
5162 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
5163 if CoolBand <> nil then
5164 CoolBand.Visible := False;
5165 BrowserBottomPanel.Visible := False;
5166 // BrowserTab.Visible := False;
5167 // BrowserTopPanel.Height := 26;
5171 procedure TGikoForm.BrowserTabDragOver(Sender, Source: TObject; X,
5172 Y: Integer; State: TDragState; var Accept: Boolean);
5176 idx := BrowserTab.IndexOfTabAt(X, Y);
5177 Accept := (Source = BrowserTab) and (BrowserTab.TabIndex <> idx);
5180 procedure TGikoForm.BrowserTabDragDrop(Sender, Source: TObject; X,
5185 idx := BrowserTab.IndexOfTabAt(X, Y);
5187 BrowserTab.Tabs.Move(BrowserTab.TabIndex, idx);
5190 procedure TGikoForm.BrowserTabMouseMove(Sender: TObject;
5191 Shift: TShiftState; X, Y: Integer);
5194 ThreadItem: TThreadItem;
5197 TabIdx := BrowserTab.IndexOfTabAt(x, y);
5199 if ( ssLeft in Shift )then begin
5200 if FDragWFirst = false then begin
5201 // FDragWFirst := true;
5203 BrowserTab.EndDrag(false);
5204 BrowserTab.BeginDrag(false, DandD_THRESHOLD);
5205 FDragWFirst := false;
5209 BrowserTab.EndDrag(false);
5210 FDragWFirst := false;
5214 if (FTabHintIndex <> TabIdx) and (TabIdx <> -1) then begin
5215 Application.CancelHint;
5216 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[TabIdx]);
5217 if ThreadItem.Title <> BrowserTab.Tabs[TabIdx] then begin
5218 BrowserTab.Hint := ThreadItem.Title;
5219 Application.ShowHint := True;
5221 BrowserTab.Hint := '';
5222 Application.ShowHint := True;
5224 FTabHintIndex := TabIdx;
5229 procedure TGikoForm.BrowserDocumentComplete(Sender: TObject;
5230 const pDisp: IDispatch; var URL: OleVariant);
5232 FDispHtmlDocument: DispHTMLDocument;
5234 // AddMessageList('DocumentComplete', nil);
5235 FBrowserComplete := True;
5236 if FEvent <> nil then
5238 FDispHtmlDocument := Browser.Document as DispHTMLDocument;
5239 FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2);
5240 FEvent.OnContextMenu := OnDocumentContextMenu;
5244 procedure TGikoForm.SelectReservActionUpdate(Sender: TObject);
5249 if (GetActiveList is TBoard) and (ListView.SelCount > 0) then begin
5250 List := TList.Create;
5252 SelectListItem(List);
5253 for i := 0 to List.Count - 1 do begin
5254 if TObject(List[i]) is TThreadItem then begin
5255 if TThreadItem(List[i]).IsLogFile then begin
5256 SelectReservAction.Enabled := True;
5261 SelectReservAction.Enabled := False;
5265 end else if (GetActiveList is TCategory) and (ListView.SelCount > 0) then
5266 SelectReservAction.Enabled := True
5268 SelectReservAction.Enabled := False;
5271 procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
5273 AddRoundNameMenu(RoundNamePopupMenu.Items);
5276 procedure TGikoForm.AddRoundNameMenu(MenuItem: TMenuItem);
5282 Item := TMenuItem.Create(Self);
5283 Item.Caption := '
\90V
\82µ
\82¢
\96¼
\91O
\82Å
\8f\84\89ñ
\97\
\96ñ(&N)...';
5284 Item.OnClick := SelectNewRoundNameExecute;
5286 Item := TMenuItem.Create(Self);
5287 Item.Caption := '
\8f\84\89ñ
\83\8a\83X
\83g
\82©
\82ç
\8dí
\8f\9c(&D)';
5288 Item.OnClick := SelectDeleteRoundExecute;
5290 Item := TMenuItem.Create(Self);
5291 Item.Caption := '-';
5293 for i := 0 to RoundList.RoundNameList.Count - 1 do begin
5294 Item := TMenuItem.Create(Self);
5295 Item.Caption := RoundList.RoundNameList[i];
5296 Item.OnClick := SetSelectRoundName;
5301 procedure TGikoForm.SelectNewRoundNameExecute(Sender: TObject);
5304 Dlg: TRoundNameDialog;
5306 Dlg := TRoundNameDialog.Create(Self);
5309 if Dlg.ModalResult <> mrCancel then begin
5310 s := Trim(Dlg.RoundNameEdit.Text);
5311 RoundList.RoundNameList.Add(s);
5312 SetSelectItemRound(True, s);
5320 procedure TGikoForm.SetSelectItemRound(RoundFlag: Boolean; RoundName: string);
5325 List := TList.Create;
5327 SelectListItem(List);
5328 for i := 0 to List.Count - 1 do begin
5329 if TObject(List[i]) is TBoard then begin
5330 TBoard(List[i]).RoundName := RoundName;
5331 TBoard(List[i]).Round := RoundFlag;
5332 end else if TObject(List[i]) is TThreadItem then begin
5333 if TThreadItem(List[i]).IsLogFile then begin
5334 TThreadItem(List[i]).RoundName := RoundName;
5335 TThreadItem(List[i]).Round := RoundFlag;
5344 procedure TGikoForm.SelectDeleteRoundExecute(Sender: TObject);
5346 SetSelectItemRound(False, '');
5350 procedure TGikoForm.SelectReservActionExecute(Sender: TObject);
5352 //
\82±
\82Ì
\83R
\83\81\83\93\83g
\8dí
\8f\9c\82µ
\82Ä
\82Í
\91Ê
\96Ú
5355 procedure TGikoForm.SetSelectRoundName(Sender: TObject);
5357 MenuItem: TMenuItem;
5359 if Sender is TMenuItem then begin
5360 MenuItem := TMenuItem(Sender);
5361 SetSelectItemRound(True, StripHotKey(MenuItem.Caption));
5366 procedure TGikoForm.NewBoardActionExecute(Sender: TObject);
5368 Dlg: TNewBoardDialog;
5372 for i := 0 to Screen.CustomFormCount - 1 do begin
5373 if TObject(Screen.CustomForms[i]) is TEditorForm then begin
5374 Msg := '
\83\8c\83X
\83G
\83f
\83B
\83^
\82ð
\91S
\82Ä
\95Â
\82¶
\82Ä
\82
\82¾
\82³
\82¢';
5375 MsgBox(Handle, Msg, '
\83G
\83\89\81[', MB_OK or MB_ICONSTOP);
5379 Dlg := TNewBoardDialog.Create(Self);
5387 procedure TGikoForm.LoginActionExecute(Sender: TObject);
5391 if GikoSys.Dolib.Connected then begin
5392 //
\83\8d\83O
\83A
\83E
\83g
5393 GikoSys.Dolib.Disconnect;
5394 LoginAction.Checked := False;
5395 AddMessageList('
\83\8d\83O
\83A
\83E
\83g
\82µ
\82Ü
\82µ
\82½', nil, gmiOK);
5396 LoginAction.Caption := '
\83\8d\83O
\83C
\83\93(&L)';
5398 TmpCursor := Screen.Cursor;
5399 Screen.Cursor := crHourGlass;
5401 GikoSys.Dolib.ClientUA := 'gikoNavi/1.00';
5402 GikoSys.Dolib.UserName := GikoSys.Setting.UserID;
5403 GikoSys.Dolib.Password := GikoSys.Setting.Password;
5404 if GikoSys.Setting.ReadProxy then begin
5405 GikoSys.Dolib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
5406 GikoSys.Dolib.ProxyPort := GikoSys.Setting.ReadProxyPort;
5408 GikoSys.Dolib.ProxyAddress := '';
5409 GikoSys.Dolib.ProxyPort := 0;
5411 if GikoSys.Dolib.Connect then begin
5412 LoginAction.Checked := True;
5413 AddMessageList('
\83\8d\83O
\83C
\83\93\82µ
\82Ü
\82µ
\82½ - ' + GikoSys.Setting.UserID, nil, gmiOK);
5414 LoginAction.Caption := '
\83\8d\83O
\83A
\83E
\83g(&L)';
5416 // 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);
5417 AddMessageList(GikoSys.Dolib.ErrorMsg, nil, gmiNG);
5419 LoginAction.Checked := False;
5420 LoginToolButton.Down := False;
5423 Screen.Cursor := TmpCursor;
5428 procedure TGikoForm.KeySettingActionExecute(Sender: TObject);
5430 Dlg: TKeySettingForm;
5432 Dlg := TKeySettingForm.Create(Self);
5434 if Dlg.ShowModal = mrOk then
5435 GikoSys.SaveKeySetting(ActionList);
5441 procedure TGikoForm.ArrangeActionExecute(Sender: TObject);
5443 if ArrangeAction.Checked then begin
5445 ViewPanel.Align := alNone;
5446 ListSplitter.Align := alNone;
5447 ThreadPanel.Align := alNone;
5449 ViewPanel.Width := FBrowserSizeWidth;
5450 ViewPanel.Align := alLeft;
5452 ListSplitter.Width := 5;
5453 ListSplitter.Align := alLeft;
5455 ViewPanel.Left := -10;
5457 ThreadPanel.Align := alClient;
5459 GikoSys.Setting.ListOrientation := gloHorizontal;
5460 case GikoSys.Setting.ListWidthState of
5462 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5463 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5464 ViewPanel.Width := 1;
5467 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5468 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
5471 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5472 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
5473 ViewPanel.Width := ThreadMainPanel.Width - 80;
5478 ViewPanel.Align := alNone;
5479 ListSplitter.Align := alNone;
5480 ThreadPanel.Align := alNone;
5482 ViewPanel.Height := FBrowserSizeHeight;
5483 ViewPanel.Align := alTop;
5485 ListSplitter.Height := 5;
5486 ListSplitter.Align := alTop;
5488 ViewPanel.Top := -10;
5490 ThreadPanel.Align := alClient;
5491 GikoSys.Setting.ListOrientation := gloVertical;
5492 case GikoSys.Setting.ListHeightState of
5494 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5495 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5496 ViewPanel.Height := 1;
5499 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5500 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
5503 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5504 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
5505 ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
5512 procedure TGikoForm.PaneInitActionExecute(Sender: TObject);
5514 CabinetPanel.Width := 150;
5515 MessagePanel.Height := 40;
5517 FBrowserSizeWidth := 200;
5518 FBrowserSizeHeight := 200;
5519 if ArrangeAction.Checked then begin
5520 ViewPanel.Width := FBrowserSizeWidth;
5522 ViewPanel.Height := FBrowserSizeHeight;
5524 if GikoSys.Setting.ListOrientation = gloHorizontal then begin
5525 if GikoSys.Setting.ListHeightState = glsMax then begin
5526 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
5527 GikoSys.Setting.ListHeightState := glsNormal;
5530 if GikoSys.Setting.ListWidthState = glsMax then begin
5531 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
5532 GikoSys.Setting.ListWidthState := glsNormal;
5537 procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
5539 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';
5540 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
5543 ThreadItem: TThreadItem;
5545 idx := BrowserTab.TabIndex;
5546 if idx <> -1 then begin
5547 if GikoSys.Setting.DeleteMsg then
5548 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
5550 ThreadItem := TThreadItem(BrowserTab.Tabs.Objects[idx]);
5551 DeleteTab(ThreadItem);
5552 ThreadItem.DeleteLogFile;
5553 if ThreadItem.ParentBoard = FActiveList then
5558 function TGikoForm.GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand;
5563 if CoolBar = nil then
5565 for i := 0 to CoolBar.Bands.Count - 1 do begin
5566 if CoolBar.Bands[i].Control = Control then begin
5567 Result := CoolBar.Bands[i];
5573 procedure TGikoForm.BrowserTabToolBarResize(Sender: TObject);
5575 if BrowserTab.Parent = BrowserTabToolBar then
5576 BrowserTab.Width := BrowserTabToolBar.Width;
5579 procedure TGikoForm.SelectTextClearActionExecute(Sender: TObject);
5581 GikoSys.Setting.SelectTextList.Clear;
5582 SelectComboBox.Items.Clear;
5583 SelectComboBox.Text := '';
5584 SetListViewType( gvtAll );
5587 procedure TGikoForm.NameTextClearActionExecute(Sender: TObject);
5591 GikoSys.Setting.NameList.Clear;
5592 for i := 0 to Screen.CustomFormCount - 1 do begin
5593 if TObject(Screen.CustomForms[i]) is TEditorForm then
5594 TEditorForm(Screen.CustomForms[i]).NameComboBox.Items.Clear;
5598 procedure TGikoForm.MailTextClearActionExecute(Sender: TObject);
5602 GikoSys.Setting.MailList.Clear;
5603 for i := 0 to Screen.CustomFormCount - 1 do begin
5604 if TObject(Screen.CustomForms[i]) is TEditorForm then
5605 TEditorForm(Screen.CustomForms[i]).MailComboBox.Items.Clear;
5609 procedure TGikoForm.LeftmostTabSelectActionExecute(Sender: TObject);
5611 if BrowserTab.Tabs.Count > 0 then begin
5612 BrowserTab.TabIndex := 0;
5613 BrowserTab.OnChange(nil);
5617 procedure TGikoForm.LeftTabSelectActionExecute(Sender: TObject);
5619 if BrowserTab.Tabs.Count > 0 then begin
5620 if BrowserTab.TabIndex = -1 then begin
5621 BrowserTab.TabIndex := 0;
5622 BrowserTab.OnChange(nil);
5623 end else if BrowserTab.TabIndex > 0 then begin
5624 BrowserTab.TabIndex := BrowserTab.TabIndex - 1;
5625 BrowserTab.OnChange(nil);
5630 procedure TGikoForm.RightTabSelectActionExecute(Sender: TObject);
5632 if BrowserTab.Tabs.Count > 0 then begin
5633 if BrowserTab.TabIndex = -1 then begin
5634 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5635 BrowserTab.OnChange(nil);
5636 end else if BrowserTab.TabIndex < (BrowserTab.Tabs.Count - 1) then begin
5637 BrowserTab.TabIndex := BrowserTab.TabIndex + 1;
5638 BrowserTab.OnChange(nil);
5643 procedure TGikoForm.RightmostTabSelectActionExecute(Sender: TObject);
5645 if BrowserTab.Tabs.Count > 0 then begin
5646 BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
5647 BrowserTab.OnChange(nil);
5651 procedure TGikoForm.LeftmostTabSelectActionUpdate(Sender: TObject);
5653 LeftmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
5656 procedure TGikoForm.LeftTabSelectActionUpdate(Sender: TObject);
5658 LeftTabSelectAction.Enabled := (BrowserTab.TabIndex <> 0) and (BrowserTab.Tabs.Count > 0);
5661 procedure TGikoForm.RightTabSelectActionUpdate(Sender: TObject);
5663 RightTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
5666 procedure TGikoForm.RightmostTabSelectActionUpdate(Sender: TObject);
5668 RightmostTabSelectAction.Enabled := (BrowserTab.TabIndex <> BrowserTab.Tabs.Count - 1) and (BrowserTab.Tabs.Count > 0);
5671 procedure TGikoForm.WMSettingChange(var Message: TWMWinIniChange);
5676 procedure TGikoForm.SetMenuFont;
5678 // GikoSys.MenuFont(MenuToolBar.Font);
5679 // MenuToolBar.Buttons[0].AutoSize := False;
5680 // MenuToolBar.Buttons[0].AutoSize := True;
5681 // MenuToolBar.Font.Color := clMenuText;
5682 GikoSys.MenuFont(MainCoolBar.Font);
5683 MenuToolBar.Buttons[0].AutoSize := False;
5684 MenuToolBar.Buttons[0].AutoSize := True;
5685 MainCoolBar.AutoSize := False;
5686 MainCoolBar.AutoSize := True;
5688 GikoSys.MenuFont(ListCoolBar.Font);
5689 GikoSys.MenuFont(BrowserCoolBar.Font);
5690 // MenuToolBar.Font.Color := clMenuText;
5693 procedure TGikoForm.FavoriteMenuClick(Sender: TObject);
5699 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\92Ç
\89Á
5700 NewMenu := TMenuItem.Create(MainMenu);
5701 NewMenu.Action := FavoriteAddAction;
5702 FavoriteMenu.Add(NewMenu);
5703 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\90®
\97\9d
5704 NewMenu := TMenuItem.Create(FavoriteMenu);
5705 NewMenu.Action := FavoriteArrangeAction;
5706 FavoriteMenu.Add(NewMenu);
5707 //
\83Z
\83p
\83\8c\81[
\83^
5708 NewMenu := TMenuItem.Create(FavoriteMenu);
5709 NewMenu.Caption := '-';
5710 FavoriteMenu.Add(NewMenu);
5712 CreateFavMenu(FavoriteDM.TreeView.Items.GetFirstNode, FavoriteMenu);
5715 procedure TGikoForm.CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem);
5720 for i := 0 to Node.Count - 1 do begin
5721 NewMenu := TFavoriteMenuItem.Create(Self);
5722 NewMenu.AutoHotkeys := maAutomatic;
5723 NewMenu.Caption := StringReplace(Node.Item[i].Text, '&', '&&', [rfReplaceAll]);
5724 TFavoriteMenuItem(NewMenu).Data := Node.Item[i].Data;
5725 MenuItem.Add(NewMenu);
5727 if TObject(Node.Item[i].Data) is TFavoriteFolder then begin
5728 NewMenu.ImageIndex := TOOL_ICON_FAV_FOLDER;
5729 CreateFavMenu(Node.Item[i], NewMenu);
5730 end else if TObject(Node.Item[i].Data) is TFavoriteBoardItem then begin
5731 NewMenu.ImageIndex := TOOL_ICON_FAV_BOARD;
5732 NewMenu.OnClick := FavoriteClick;
5733 end else if TObject(Node.Item[i].Data) is TFavoriteThreadItem then begin
5734 NewMenu.ImageIndex := TOOL_ICON_FAV_THREAD;
5735 NewMenu.OnClick := FavoriteClick;
5740 procedure TGikoForm.ShowFavoriteAddDialog( Item : TObject );
5742 Dlg: TFavoriteAddDialog;
5744 ThreadItem: TThreadItem;
5746 FavThread: TFavoriteThreadItem;
5747 FavBoard: TFavoriteBoardItem;
5750 b := FavoriteTreeView.Items.Count - 1;
5751 if Item is TBoard then begin
5752 for i := 0 to b do begin
5753 if TObject(FavoriteTreeView.Items.Item[ i ].Data) is TFavoriteBoardItem then begin
5754 FavBoard := TFavoriteBoardItem( FavoriteTreeView.Items.Item[ i ].Data );
5755 Board := BBS2ch.FindBBSID(FavBoard.BBSID);
5757 if Board = Item then begin
5758 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
5765 Dlg := TFavoriteAddDialog.Create(Self);
5767 Dlg.SetBoard( TBoard(Item) );
5772 end else if Item is TThreadItem then begin
5773 for i := 0 to b do begin
5774 if TObject(FavoriteTreeView.Items.Item[ i ].Data) is TFavoriteThreadItem then begin
5775 FavThread := TFavoriteThreadItem( FavoriteTreeView.Items.Item[ i ].Data );
5776 Board := BBS2ch.FindBBSID(FavThread.BBSID);
5777 if Board <> nil then
5778 if not Board.IsThreadDatRead then
5779 GikoSys.ReadSubjectFile(Board);
5780 ThreadItem := BBS2ch.FindThreadItem(FavThread.BBSID, FavThread.ThreadID);
5782 if ThreadItem = Item then begin
5783 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
5790 Dlg := TFavoriteAddDialog.Create(Self);
5792 Dlg.SetThreadItem( TThreadItem(Item) );
5803 procedure TGikoForm.FavoriteAddActionExecute(Sender: TObject);
5805 ShowFavoriteAddDialog(GetActiveContent);
5808 procedure TGikoForm.FavoriteClick(Sender: TObject);
5811 FavoriteClick( Sender, True );
5814 procedure TGikoForm.FavoriteClick(Sender: TObject; ActiveTab: Boolean);
5817 ThreadItem: TThreadItem;
5818 FavBoard: TFavoriteBoardItem;
5819 FavThread: TFavoriteThreadItem;
5823 if Sender is TFavoriteMenuItem then
5824 Item := TFavoriteMenuItem(Sender).Data
5825 else if Sender is TLinkToolButton then
5826 Item := TLinkToolButton(Sender).Data
5827 else if Sender is TTreeNode then
5828 Item := TTreeNode( Sender ).Data
5832 if TObject(Item) is TFavoriteBoardItem then begin
5833 FavBoard := TFavoriteBoardItem(Item);
5834 Board := BBS2ch.FindBBSID(FavBoard.BBSID);
5835 if Board <> nil then begin
5836 if not Board.IsThreadDatRead then
5837 GikoSys.ReadSubjectFile(Board);
5838 SelectTreeNode(Board, True);
5840 end else if TObject(Item) is TFavoriteThreadItem then begin
5841 FavThread := TFavoriteThreadItem(Item);
5842 Board := BBS2ch.FindBBSID(FavThread.BBSID);
5843 if Board <> nil then
5844 if not Board.IsThreadDatRead then
5845 GikoSys.ReadSubjectFile(Board);
5846 ThreadItem := BBS2ch.FindThreadItem(FavThread.BBSID, FavThread.ThreadID);
5847 if ThreadItem <> nil then
5848 InsertBrowserTab(ThreadItem, ActiveTab);
5852 procedure TGikoForm.FavoriteAddActionUpdate(Sender: TObject);
5854 FavoriteAddAction.Enabled := (GetActiveContent <> nil);
5857 procedure TGikoForm.BoardFavoriteAddActionExecute(Sender: TObject);
5859 if TObject(ListView.Selected.Data) is TBoard then
5860 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
5863 procedure TGikoForm.BoardFavoriteAddActionUpdate(Sender: TObject);
5865 BoardFavoriteAddAction.Enabled := (GetActiveList is TCategory) and (ListView.SelCount > 0);
5868 procedure TGikoForm.ThreadFavoriteAddActionExecute(Sender: TObject);
5870 if TObject(ListView.Selected.Data) is TThreadItem then
5871 ShowFavoriteAddDialog(TObject(ListView.Selected.Data));
5874 procedure TGikoForm.ThreadFavoriteAddActionUpdate(Sender: TObject);
5876 ThreadFavoriteAddAction.Enabled := (GetActiveList is TBoard) and (ListView.SelCount > 0);
5879 procedure TGikoForm.TreeSelectFavoriteAddActionExecute(Sender: TObject);
5881 ShowFavoriteAddDialog(TObject(TreeView.Selected.Data));
5884 procedure TGikoForm.FavoriteArrangeActionExecute(Sender: TObject);
5886 Dlg: TFavoriteArrangeDialog;
5888 Dlg := TFavoriteArrangeDialog.Create(Self);
5897 procedure TGikoForm.MainCoolBarResize(Sender: TObject);
5899 TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
5902 procedure TGikoForm.MoveToActionExecute(Sender: TObject);
5907 URL := Trim(AddressComboBox.Text);
5910 idx := AddressComboBox.Items.IndexOf(URL);
5911 if idx = -1 then begin
5912 AddressComboBox.Items.Insert(0, URL);
5913 if AddressComboBox.Items.Count > GikoSys.Setting.AddressHistoryCount then
5914 AddressComboBox.Items.Delete(AddressComboBox.Items.Count - 1);
5916 AddressComboBox.Items.Delete(idx);
5917 AddressComboBox.Items.Insert(0, URL);
5921 procedure TGikoForm.MoveToURL(URL: string);
5923 Protocol, Host, Path, Document, Port, Bookmark: string;
5927 ThreadItem: TThreadItem;
5930 tmpThread : TThreadItem;
5933 //=====
\83v
\83\89\83O
\83C
\83\93
5935 bi := High( BoardPlugIns );
5936 for i := Low( BoardPlugIns ) to bi do begin
5937 if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
5938 if BoardPlugIns[ i ].AcceptURL( URL ) then begin
5939 tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL );
5940 boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
5941 Board := BBS2ch.FindBoardFromURL( boardURL );
5942 if Board = nil then begin
5943 Board := TBoard.Create( tmpThread.BoardPlugIn, boardURL );
5944 //
\88È
\89º
\82â
\82è
\95û
\82ª
\95ª
\82©
\82ç
\82È
\82¢
\82©
\82ç
\95Û
\97¯
5945 //Category.Add( Board );
5946 //BBS2ch.Add( Category );
5948 if not Board.IsThreadDatRead then
5949 GikoSys.ReadSubjectFile( Board );
5952 ThreadItem := Board.Find( tmpThread.FileName );
5953 if ThreadItem = nil then begin
5954 ThreadItem := tmpThread;
5955 Board.Insert( 0, ThreadItem );
5956 if ActiveList is TBoard then begin
5957 if TBoard(ActiveList) = Board then
5958 ListView.Items.Count := ListView.Items.Count + 1;
5959 InsertBrowserTab(ThreadItem);
5960 DownloadContent(ThreadItem);
5964 InsertBrowserTab( ThreadItem );
5965 if not ThreadItem.IsLogFile then
5966 DownloadContent( ThreadItem );
5975 // 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¢
5978 GikoSys.ParseURI(URL, Protocol, Host, Path, Document, Port, Bookmark);
5980 if GikoSys.Is2chHost(Host) and GikoSys.Parse2chURL(URL, Path, Document, BBSID, BBSKey) then begin
5981 Board := BBS2ch.FindBBSID(BBSID);
5982 if Board = nil then begin
5983 GikoSys.OpenBrowser(URL, gbtAuto);
5986 if Trim(BBSKey) = '' then begin
5987 GikoSys.OpenBrowser(URL, gbtAuto);
5990 if not Board.IsThreadDatRead then
5991 GikoSys.ReadSubjectFile(Board);
5992 ThreadItem := Board.Find(ChangeFileExt(BBSKey, '.dat'));
5993 if ThreadItem = nil then begin
5994 ThreadItem := TThreadItem.Create;
5995 ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
5996 if AnsiPos(Host, Board.URL) = 0 then
5997 ThreadItem.DownloadHost := Host
5999 ThreadItem.DownloadHost := '';
6000 Board.Insert(0, ThreadItem);
6001 if ActiveList is TBoard then begin
6002 if TBoard(ActiveList) = Board then
6003 ListView.Items.Count := ListView.Items.Count + 1;
6004 InsertBrowserTab(ThreadItem);
6005 DownloadContent(ThreadItem);
6008 if ThreadItem.IsLogFile then
6009 InsertBrowserTab(ThreadItem)
6011 if AnsiPos(Host, Board.URL) = 0 then
6012 ThreadItem.DownloadHost := Host
6014 ThreadItem.DownloadHost := '';
6015 InsertBrowserTab(ThreadItem);
6016 DownloadContent(ThreadItem);
6020 GikoSys.OpenBrowser(URL, gbtAuto);
6024 procedure TGikoForm.AddressToolBarResize(Sender: TObject);
6026 AddressComboBox.Width := AddressToolBar.Width - MoveToToolButton.Width - 10;
6029 procedure TGikoForm.AddressComboBoxKeyDown(Sender: TObject; var Key: Word;
6030 Shift: TShiftState);
6032 if Key = VK_RETURN then
6033 MoveToAction.Execute;
6036 procedure TGikoForm.BrowserEnter(Sender: TObject);
6038 Browser.DoObjectVerb(OLEIVERB_UIACTIVATE);
6041 procedure TGikoForm.WMCopyData(var Message: TWMCopyData);
6043 CDS:PCopyDataStruct;
6047 CDS := Message.CopyDataStruct;
6048 GetMem(PC, CDS^.cbData);
6050 lstrcpy(PC,CDS^.lpData);
6051 SetString(sURL, PC,lstrlen(PC));
6056 Message.Result := 1;
6059 procedure TGikoForm.WndProc(var Message: TMessage);
6061 if (Message.Msg = CM_DIALOGCHAR) then
6062 if not (ssAlt in KeyDataToShiftState(TWMChar(Message).KeyData)) then
6067 procedure TGikoForm.FormShortCut(var Msg: TWMKey; var Handled: Boolean);
6069 hComboEdit: THandle;
6070 // KeyData: Integer;
6073 if AddressComboBox.Focused or SelectComboBox.Focused then begin
6074 if Msg.CharCode in [VK_BACK] then begin
6075 hComboEdit := GetFocus;
6076 if hComboEdit <> 0 then
6077 SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, Msg.KeyData);
6078 // SendMessage(hComboEdit, WM_CHAR, Msg.CharCode, $000E0001);
6081 if Msg.CharCode in [VK_INSERT, VK_DELETE, VK_HOME, VK_END, VK_PRIOR, VK_NEXT] then begin
6082 hComboEdit := GetFocus;
6083 if hComboEdit <> 0 then
6084 SendMessage(hComboEdit, WM_KEYDOWN, Msg.CharCode, Msg.KeyData);
6088 //
\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ð
6089 KeyData := Msg.KeyData;
6090 if (KeyData and $20000000) = 0 then begin
6091 if Msg.CharCode in [Ord('F'), Ord('V'), Ord('B'), Ord('R'),
6092 Ord('A'), Ord('T'), Ord('H')] then begin
6093 if not ActionList.IsShortCut(Msg) then begin
6101 procedure TGikoForm.BrowserTabVisibleActionExecute(Sender: TObject);
6103 GikoSys.Setting.BrowserTabVisible := BrowserTabVisibleAction.Checked;
6107 procedure TGikoForm.BrowserTabTopActionExecute(Sender: TObject);
6109 BrowserTabBottomAction.Checked := False;
6110 BrowserTabTopAction.Checked := True;
6111 GikoSys.Setting.BrowserTabPosition := gtpTop;
6115 procedure TGikoForm.BrowserTabBottomActionExecute(Sender: TObject);
6117 BrowserTabTopAction.Checked := False;
6118 BrowserTabBottomAction.Checked := True;
6119 GikoSys.Setting.BrowserTabPosition := gtpBottom;
6123 procedure TGikoForm.BrowserTabTabStyleActionExecute(Sender: TObject);
6125 BrowserTabButtonStyleAction.Checked := False;
6126 BrowserTabFlatStyleAction.Checked := False;
6127 BrowserTabTabStyleAction.Checked := True;
6128 GikoSys.Setting.BrowserTabStyle := gtsTab;
6132 procedure TGikoForm.BrowserTabButtonStyleActionExecute(Sender: TObject);
6134 BrowserTabTabStyleAction.Checked := False;
6135 BrowserTabFlatStyleAction.Checked := False;
6136 BrowserTabButtonStyleAction.Checked := True;
6137 GikoSys.Setting.BrowserTabStyle := gtsButton;
6141 procedure TGikoForm.BrowserTabFlatStyleActionExecute(Sender: TObject);
6143 BrowserTabFlatStyleAction.Checked := True;
6144 BrowserTabTabStyleAction.Checked := False;
6145 BrowserTabButtonStyleAction.Checked := False;
6146 GikoSys.Setting.BrowserTabStyle := gtsFlat;
6150 procedure TGikoForm.PreviewTimerTimer(Sender: TObject);
6156 HtmlFileName: string;
6160 TargetFrameName: OleVariant;
6161 PostData: OleVariant;
6162 Headers: OleVariant;
6163 WindowHeight: Integer;
6164 WindowWidth: Integer;
6168 Protocol, Host, Path, Document, Port, Bookmark: string;
6170 PreviewTimer.Enabled := False;
6174 case GikoSys.Setting.PreviewSize of
6181 WindowHeight := 192;
6185 WindowHeight := 384;
6189 WindowHeight := 480;
6191 else begin //gpsMedium
6193 WindowHeight := 288;
6197 ARect := Rect(0, 0, WindowWidth, WindowHeight);
6199 case GikoSys.Setting.PopupPosition of
6200 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6201 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6202 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
6203 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
6204 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
6205 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
6206 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6207 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6208 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Ó
6211 html := '<html><head>'#13#10
6213 + 'function init() {'#13#10
6214 + ' if ((document.body.clientHeight >= Image1.height) && (document.body.clientWidth >= Image1.width)) {'#13#10
6216 + ' var dh, ih;'#13#10
6217 + ' dh = document.body.clientWidth / document.body.clientHeight;'#13#10
6218 + ' ih = Image1.width / Image1.height;'#13#10
6219 + ' if (document.body.clientWidth < document.body.clientHeight) {'#13#10
6220 + ' if (ih > dh)'#13#10
6221 + ' Image1.width = document.body.clientWidth;'#13#10
6223 + ' Image1.height = document.body.clientHeight;'#13#10
6225 + ' if (ih < dh)'#13#10
6226 + ' Image1.height = document.body.clientHeight;'#13#10
6228 + ' Image1.width = document.body.clientWidth;'#13#10
6231 + ' Message.style.display = "none";'#13#10
6235 + '<body topmargin="0" leftmargin="0" style="border-width: 1px; overflow:hidden; border-style: solid;" onLoad="init()">'#13#10
6236 + '<div align="center" id="Message">
\83v
\83\8c\83r
\83\85\81[
\8dì
\90¬
\92\86</div>'#13#10
6237 + '<div align="center"><img name="Image1" border="0" src="%ImageURL%"></div>'#13#10
6239 sl := TStringList.Create;
6242 HtmlFileName := GikoSys.GetAppDir + HTML_FILE_NAME;
6243 sl.Text := AnsiReplaceStr(html, '%ImageURL%', FPreviewURL);
6244 sl.SaveToFile(HtmlFileName);
6251 NavURL := HtmlFileName;
6253 TargetFrameName := '';
6256 GikoSys.ParseURI(FPreviewURL, Protocol, Host, Path, Document, Port, Bookmark);
6257 Referer := Protocol + '://' + Host;
6259 Referer := Referer + ':' + Port;
6260 Referer := Referer + Path;
6261 Headers := 'Referer: ' + Referer;
6263 FPreviewBrowser.Navigate(NavURL, Flags, TargetFrameName, PostData, Headers);
6265 if ARect.Top + WindowHeight > Screen.DesktopHeight then
6266 ARect.Top := Screen.DesktopHeight - WindowHeight;
6267 if ARect.Left + WindowWidth > Screen.DesktopWidth then
6268 ARect.Left := Screen.DesktopWidth - WindowWidth;
6269 if ARect.Left < Screen.DesktopLeft then ARect.Left := Screen.DesktopLeft;
6270 if ARect.Bottom < Screen.DesktopTop then ARect.Bottom := Screen.DesktopTop;
6272 SetWindowPos(FPreviewBrowser.Handle, HWND_TOPMOST, ARect.Left, ARect.Top, WindowWidth, WindowHeight, SWP_NOACTIVATE or SWP_HIDEWINDOW);
6273 ShowWindow(FPreviewBrowser.Handle, SW_SHOWNOACTIVATE);
6275 // Style := GetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE);
6276 // SetWindowLong(FPreviewBrowser.Handle, GWL_EXSTYLE, Style xor WS_EX_APPWINDOW);
6280 procedure TGikoForm.WMSetCursor(var Message: TWMSetCursor);
6282 if PreviewTimer.Enabled then
6283 PreviewTimer.Enabled := False;
6284 if (FHint <> nil) and (IsWindowVisible(FHint.Handle)) then begin
6285 FHint.ReleaseHandle;
6288 if (FPreviewBrowser <> nil) and (IsWindowVisible(FPreviewBrowser.Handle)) then
6289 ShowWindow(FPreviewBrowser.Handle, SW_HIDE);
6290 Message.Result := 1;
6294 procedure TGikoForm.MessageHideButtonClick(Sender: TObject);
6296 MsgBarCloseAction.Execute;
6299 function TGikoForm.OnDocumentContextMenu(Sender: TObject): WordBool;
6301 Doc: IHtmlDocument2;
6302 Range: IHTMLTxtRange;
6305 ThreadItem: TThreadItem;
6307 Doc := Browser.Document as IHtmlDocument2;
6308 Range := Doc.selection.createRange as IHTMLTxtRange;
6309 s := StringReplace(Range.text, '
\81@', ' ', [rfReplaceAll]);
6310 s := GikoSys.ZenToHan(Trim(s));
6311 if GikoSys.IsNumeric(s) then begin
6313 ThreadItem := GetActiveContent;
6314 if ThreadItem <> nil then begin
6316 FHint.PopupType := gptThread;
6317 SetResPopupText(ThreadItem.ParentBoard.BBSID, ChangeFileExt(ThreadItem.FileName, ''), Num, Num, False, False);
6318 if FHint.ResCount <> 0 then
6328 procedure TGikoForm.SetResPopupText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean);
6339 ThreadItem: TThreadItem;
6346 if StNum > ToNum then begin
6352 if (sBoard <> '') and (sThread <> '') then begin
6353 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
6354 if StNum + 10 < ToNum then
6355 ToNum := StNum + 10;
6357 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
6359 Board := BBS2ch.FindBBSID(sBoard);
6360 if Board <> nil then begin
6361 if not Board.IsThreadDatRead then
6362 GikoSys.ReadSubjectFile(Board);
6363 ThreadItem := Board.Find(sThread + '.dat');
6364 if ThreadItem <> nil then
6365 FHint.Title := ThreadItem.Title;
6369 for i := StNum to ToNum do begin
6371 FileName := IncludeTrailingPathDelimiter(BBS2ch.GetLogFolder + sBoard) + sThread + '.dat';
6372 tmp := GikoSys.ReadThreadFile(FileName, Line);
6374 if (tmp <> '') And ( not GikoSys.FAbon.CheckAbonPopupRes(tmp) And( not GikoSys.FAbon.CheckIndividualAbonList(line))) then begin
6375 Res := GikoSys.DivideStrLine(tmp);
6377 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
6379 Body := StringReplace(Res.FBody, '<br> ', #10, [rfIgnoreCase, rfReplaceAll]);
6380 Body := StringReplace(Body, '<br>', #10, [rfIgnoreCase, rfReplaceAll]);
6381 Body := StringReplace(Body, '</a>', '', [rfIgnoreCase, rfReplaceAll]);
6382 Body := GikoSys.DeleteLink(Body);
6383 Body := StringReplace(Body, '<', '<', [rfReplaceAll]);
6384 Body := StringReplace(Body, '>', '>', [rfReplaceAll]);
6385 Body := StringReplace(Body, '"', '"', [rfReplaceAll]);
6386 Body := StringReplace(Body, '&', '&', [rfReplaceAll]);
6387 FHint.Add(Header, Body);
6388 // s := StringReplace(s, '&', '&', [rfReplaceAll]);
6389 // s := StringReplace(s, '
\81\97\81M', ',', [rfReplaceAll]);
6397 {function TGikoForm.GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string;
6409 ActiveFileName: string;
6411 ThreadItem: TThreadItem;
6416 HintData := THintData.Create;
6417 SList := TStringList.Create;
6420 if StNum > ToNum then begin
6426 if (sBoard <> '') and (sThread <> '') then begin
6428 //
\8dÅ
\91å10
\83\8c\83X
\82Ü
\82Å
\95\
\8e¦
6429 if StNum + 10 < ToNum then
6430 ToNum := StNum + 10;
6432 //
\83^
\83C
\83g
\83\8b\95\
\8e¦
6434 Board := BBS2ch.FindBBSID(sBoard);
6435 if Board <> nil then begin
6436 if not Board.IsThreadDatRead then
6437 GikoSys.ReadSubjectFile(Board);
6438 ThreadItem := Board.Find(sThread + '.dat');
6439 //ThreadItem := BBS2ch.FindThreadItem(sBoard, sThread + '.dat');
6440 if ThreadItem <> nil then
6441 HintData.Title := ThreadItem.Title;
6442 //s := s + ThreadItem.Title;
6446 for i := StNum to ToNum do begin
6448 FileName := IncludeTrailingPathDelimiter(BBS2ch.GetLogFolder + sBoard) + sThread + '.dat';
6449 tmp := GikoSys.ReadThreadFile(FileName, Line);
6450 if tmp <> '' then begin
6451 Res := GikoSys.DivideStrLine(tmp);
6455 //s := s + IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime + #10 + #10;
6456 //s := s + ' ' + StringReplace(Res.FBody, '<br>', #10, [rfIgnoreCase, rfReplaceAll]);
6457 Header := IntToStr(Line) + '
\96¼
\91O
\81F ' + Res.FName + '
\93\8a\8de
\93ú
\81F ' + Res.FDateTime;
6459 s := StringReplace(Res.FBody, '<br> ', #10, [rfIgnoreCase, rfReplaceAll]);
6460 s := StringReplace(s, '<br>', #10, [rfIgnoreCase, rfReplaceAll]);
6461 s := StringReplace(s, '</a>', '', [rfIgnoreCase, rfReplaceAll]);
6462 s := GikoSys.DeleteLink(s);
6463 s := StringReplace(s, '<', '<', [rfReplaceAll]);
6464 s := StringReplace(s, '>', '>', [rfReplaceAll]);
6465 s := StringReplace(s, '"', '"', [rfReplaceAll]);
6466 s := StringReplace(s, '&', '&', [rfReplaceAll]);
6468 HintData.Add(Header, Body);
6469 // s := StringReplace(s, '&', '&', [rfReplaceAll]);
6470 // s := StringReplace(s, '
\81\97\81M', ',', [rfReplaceAll]);
6481 procedure TGikoForm.ShowTextPopup;
6486 // if Trim(s) = '' then
6489 FHint.Font.Name := GikoSys.Setting.HintFontName;
6490 FHint.Font.Size := GikoSys.Setting.HintFontSize;
6491 FHint.Font.Color := GikoSys.Setting.HintFontColor;
6492 FHint.Color := GikoSys.Setting.HintBackColor;
6493 FHint.HeaderBold := GikoSys.Setting.ResPopupHeaderBold;
6495 if FHint.PopupType = gptRaw then
6496 ARect := FHint.CalcHintRect(Screen.Width, FHint.Caption, nil)
6498 ARect := FHint.CalcHintRect(Screen.Width, '', nil);
6499 case GikoSys.Setting.PopupPosition of
6500 gppRightTop: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6501 gppRight: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6502 gppRightBottom: OffsetRect(ARect, p.x - (ARect.Right - ARect.Left) - 15, p.y + 15);
6503 gppTop: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - (ARect.Bottom - ARect.Top) - 15);
6504 gppCenter: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y - ((ARect.Bottom - ARect.Top) div 2));
6505 gppBottom: OffsetRect(ARect, p.x - ((ARect.Right - ARect.Left) div 2), p.y + 15);
6506 gppLeftTop: OffsetRect(ARect, p.x + 15, p.y - (ARect.Bottom - ARect.Top) - 15);
6507 gppLeft: OffsetRect(ARect, p.x + 15, p.y - ((ARect.Bottom - ARect.Top) div 2));
6508 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Ó
6510 //FHint.ActivateHint(ARect, s);
6511 if FHint.PopupType = gptRaw then
6512 FHint.ActivateHint(ARect, FHint.Caption)
6514 FHint.ActivateHint(ARect, '');
6516 FHint.ReleaseHandle;
6521 procedure TGikoForm.GikoHelpActionExecute(Sender: TObject);
6525 FileName := GikoSys.GetAppDir + 'batahlp.chm';
6526 if not FileExists(FileName) then begin
6529 '
\83w
\83\8b\83v
\82ª
\8c©
\82Â
\82©
\82è
\82Ü
\82¹
\82ñ
\82Å
\82µ
\82½' + #13#10 +
6530 '
\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 +
6531 '
\83w
\83\8b\83v
\82Í
\83M
\83R
\83i
\83r
\82Ì
\83T
\83C
\83g
\82É
\92u
\82¢
\82Ä
\82 \82è
\82Ü
\82·',
6536 ShellExecute(Handle, 'open', PChar(FileName), '', PChar(GikoSys.GetAppDir), SW_SHOW);
6539 procedure TGikoForm.ToolButton18Click(Sender: TObject);
6541 if FTreeType = gttHistory then begin
6543 TreeView.Items.Clear;
6547 procedure TGikoForm.KotehanActionExecute(Sender: TObject);
6549 Dlg: TKotehanDialog;
6551 Dlg := TKotehanDialog.Create(Self);
6559 procedure TGikoForm.SetLinkBar;
6563 ToolButton: TLinkToolButton;
6564 MenuItem: TMenuItem;
6566 MainCoolBar.Bands.BeginUpdate;
6568 LinkBarPopupMenu.Items.Clear;
6569 for i := LinkToolBar.ButtonCount - 1 downto 0 do
6570 LinkToolBar.RemoveControl(LinkToolBar.Buttons[i]);
6571 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
6572 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
6573 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
6574 ToolButton := TLinkToolButton.Create(LinkToolBar);
6575 if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteFolder then begin
6576 MenuItem := TMenuItem.Create(Self);
6577 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], MenuItem);
6578 LinkBarPopupMenu.Items.Add(MenuItem);
6579 ToolButton.MenuItem := MenuItem;
6580 ToolButton.ImageIndex := TOOL_ICON_FAV_FOLDER;
6581 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteBoardItem then begin
6582 ToolButton.ImageIndex := TOOL_ICON_FAV_BOARD;
6583 ToolButton.OnClick := FavoriteClick;
6584 end else if TObject(FavoriteTreeView.Items[i].Item[j].Data) is TFavoriteThreadItem then begin
6585 ToolButton.ImageIndex := TOOL_ICON_FAV_THREAD;
6586 ToolButton.OnClick := FavoriteClick;
6588 ToolButton.Caption := FavoriteTreeView.Items[i].Item[j].Text;
6589 ToolButton.Left := 10000;
6590 ToolButton.Data := FavoriteTreeView.Items[i].Item[j].Data;
6591 ToolButton.AutoSize := True;
6592 ToolButton.OnDragDrop := LinkToolButtonDragDrop;
6593 ToolButton.OnDragOver := FavoriteDragOver;
6594 ToolButton.OnMouseDown := LinkToolButtonOnMouseDown;
6595 ToolButton.OnMouseMove := LinkToolButtonOnMouseMove;
6596 ToolButton.OnMouseUp := LinkToolButtonOnMouseUp;
6597 ToolButton.OnStartDrag := LinkToolButtonStartDrag;
6598 //ToolButton.DragMode := dmAutomatic;
6599 ToolButton.DragMode := dmManual;
6600 ToolButton.PopupMenu := FavoriteTreePopupMenu;
6602 LinkToolBar.InsertControl(ToolButton);
6607 { if LinkToolBar.ButtonCount = 0 then begin
6608 ToolButton := TLinkToolButton.Create(LinkToolBar);
6609 ToolButton.Style := tbsButton;
6610 ToolButton.ImageIndex := -1;
6611 ToolButton.Caption := '';
6612 LinkToolBar.InsertControl(ToolButton);
6615 MainCoolBar.Bands.EndUpdate;
6619 procedure TGikoForm.FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
6627 if Sender = FavoriteTreeView then begin
6628 Node := FavoriteTreeView.GetNodeAt(X, Y);
6633 bound := Node.DisplayRect( False );
6634 height := bound.Bottom - bound.Top;
6635 if (bound.Top + height / 2) <= Y then
6636 Node := FavoriteTreeView.GetNodeAt(X, Y + height);
6641 if Node.IsFirstNode then
6646 if FDropSpaceNode <> nil then
6647 if FDropSpaceNode.AbsoluteIndex = Node.AbsoluteIndex then
6650 if Change then begin
6651 if FDropSpaceNode <> nil then
6652 FDropSpaceNode.Free;
6654 FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil );
6655 FDropSpaceNode.MoveTo( Node, naInsert );
6656 FDropSpaceNode.ImageIndex := -1;
6657 FDropSpaceNode.SelectedIndex := -1;
6661 if Source = FavoriteTreeView then begin
6662 if FavoriteTreeView.Selected = FavoriteTreeView.Items.GetFirstNode then begin
6667 end else if Source = BrowserTab then
6669 else if Source = ListView then
6671 else if Source is TLinkToolButton then
6673 else if Source = TreeView then
6679 procedure TGikoForm.FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);
6682 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
6685 procedure TGikoForm.LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject);
6687 // FDragging := true;
6690 procedure TGikoForm.LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer);
6692 SenderNode: TTreeNode;
6693 LinkToolButton: TLinkToolButton;
6696 LinkToolButton := TLinkToolButton( Sender );
6697 SenderNode := TreeNodeDataFind( FavoriteTreeView.TopItem, LinkToolButton.Data );
6699 FavoriteDragDrop( SenderNode, Source );
6703 procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
6707 procedure TGikoForm.LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
6711 TToolButton( Sender ).DragMode := dmManual;
6712 if ssLeft in Shift then begin
6713 TToolButton( Sender ).Down := true;
6714 if FDragTime = 0 then begin
6715 FDragTime := GetTickCount();
6717 Now := GetTickCount();
6718 if (Now - FDragTime) > 500 then begin
6719 if FDragButton <> TToolButton( Sender ) then begin
6721 FDragButton := TToolButton( Sender );
6722 TToolButton(Sender).BeginDrag(false ,5);
6725 {$IF Defined(debug)}
6726 ShowMessage('Error');
6737 procedure TGikoForm.LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
6742 function TGikoForm.GetWidthAllToolButton(ToolBar: TToolBar): Integer;
6747 for i := 0 to ToolBar.ButtonCount - 1 do
6748 Result := Result + ToolBar.Buttons[i].Width;
6751 procedure TGikoForm.MainCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
6753 Control: TWinControl;
6755 Control := FindControl(BandInfo^.hwndChild);
6756 if (Control = MenuToolBar) or (Control = StdToolBar) or (Control = LinkToolBar) then begin
6757 BandInfo^.fMask := BandInfo.fMask or RBBIM_STYLE or RBBIM_IDEALSIZE;
6758 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
6759 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
6763 procedure TGikoForm.MainCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
6769 ChevronPopupMenu.Items.Clear;
6771 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
6772 if MainCoolBar.Bands[ i ].Visible then begin
6773 if Idx = Int64(RebarChevron^.uBand) then begin
6780 if (Idx >= 0) and (MainCoolBar.Bands.Count > Idx) then begin
6781 if MainCoolBar.Bands[Idx].Control = MenuToolbar then begin
6783 end else if MainCoolBar.Bands[Idx].Control = StdToolbar then begin
6784 ToolBarChevronMenu(StdToolBar);
6785 end else if MainCoolBar.Bands[Idx].Control = LinkToolbar then begin
6789 p := MainCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
6790 ChevronPopupMenu.Popup(p.x, p.y);
6794 procedure TGikoForm.MenuBarChevronMenu;
6795 procedure SetSubMenu(MenuItem: TMenuItem; PopupItem: TMenuItem);
6801 for i := 0 to MenuItem.Count - 1 do begin
6803 if MenuItem[i] is TFavoriteMenuItem then begin
6804 Item := TFavoriteMenuItem.Create(Self);
6805 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(MenuItem[i]).Data;
6807 Item := TMenuItem.Create(Self);
6808 Item.Caption := MenuItem[i].Caption;
6809 Item.Action := MenuItem[i].Action;
6810 Item.ImageIndex := MenuItem[i].ImageIndex;
6811 Item.OnClick := MenuItem[i].OnClick;
6812 PopupItem.Add(Item);
6813 if MenuItem[i].Count > 0 then
6814 SetSubMenu(MenuItem[i], Item);
6823 ChevronPopupMenu.Items.Clear;
6824 ChevronPopupMenu.Images := MainMenu.Images;
6825 bw := GetWidthAllToolButton(MenuToolBar);
6826 if MenuToolBar.Width < bw then begin
6828 for i := 0 to MenuToolBar.ButtonCount - 1 do begin
6829 w := w + MenuToolBar.Buttons[i].Width;
6830 if MenuToolBar.Width <= w then begin
6831 Item := TMenuItem.Create(Self);
6832 Item.Caption := MenuToolBar.Buttons[i].MenuItem.Caption;
6833 //Item.Action := MenuToolBar.Buttons[i].MenuItem.Action;
6834 ChevronPopupMenu.Items.Add(Item);
6835 SetSubMenu(MenuToolbar.Buttons[i].MenuItem, Item);
6841 procedure TGikoForm.ToolBarChevronMenu(ToolBar: TToolBar);
6842 procedure SetSubMenu(PopupMenu: TPopupMenu; PopupItem: TMenuItem);
6847 if Assigned(PopupMenu.OnPopup) then
6848 PopupMenu.OnPopup(nil);
6849 for i := 0 to PopupMenu.Items.Count - 1 do begin
6851 if PopupMenu.Items[i] is TFavoriteMenuItem then begin
6852 Item := TFavoriteMenuItem.Create(Self);
6853 TFavoriteMenuItem(Item).Data := TFavoriteMenuItem(PopupMenu.Items[i]).Data;
6855 Item := TMenuItem.Create(Self);
6856 Item.Caption := PopupMenu.Items[i].Caption;
6857 Item.Action := PopupMenu.Items[i].Action;
6858 Item.ImageIndex := PopupMenu.Items[i].ImageIndex;
6859 Item.OnClick := PopupMenu.Items[i].OnClick;
6860 PopupItem.Add(Item);
6869 ChevronPopupMenu.Items.Clear;
6870 ChevronPopupMenu.Images := ToolBar.HotImages;
6871 bw := GetWidthAllToolButton(ToolBar);
6872 if ToolBar.Width < bw then begin
6874 for i := 0 to ToolBar.ButtonCount - 1 do begin
6875 w := w + ToolBar.Buttons[i].Width;
6876 if ToolBar.Width <= w then begin
6877 Case ToolBar.Buttons[i].Tag of
6880 Item := TMenuItem.Create(Self);
6881 if ToolBar.Buttons[i].Style = tbsSeparator then
6884 Item.Caption := ToolBar.Buttons[i].Caption;
6885 Item.Action := ToolBar.Buttons[i].Action;
6886 //Item.Visible := True;
6888 ChevronPopupMenu.Items.Add(Item);
6889 if ToolBar.Buttons[i].DropdownMenu <> nil then begin
6891 Item.OnClick := nil;
6892 SetSubMenu(ToolBar.Buttons[i].DropdownMenu, Item);
6896 //
\8f«
\97\88\82Ì
\82½
\82ß
\82Ì
\97\
\96ñ
6903 procedure TGikoForm.LinkBarChevronMenu;
6908 Item: TFavoriteMenuItem;
6910 Button: TLinkToolButton;
6912 ChevronPopupMenu.Items.Clear;
6913 ChevronPopupMenu.Images := LinkToolBar.Images;
6914 bw := GetWidthAllToolButton(LinkToolBar);
6915 if LinkToolBar.Width < bw then begin
6917 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
6918 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
6919 for j := 0 to FavoriteTreeView.Items[i].Count - 1 do begin
6920 w := w + LinkToolBar.Buttons[j].Width;
6921 if LinkToolBar.Width <= w then begin
6922 if LinkToolBar.Buttons[j] is TLinkToolButton then begin
6923 Button := TLinkToolButton(LinkToolBar.Buttons[j]);
6924 Item := TFavoriteMenuItem.Create(Self);
6925 if TObject(Button.Data) is TFavoriteFolder then begin
6926 CreateFavMenu(FavoriteTreeView.Items[i].Item[j], Item);
6927 end else if TObject(Button.Data) is TFavoriteBoardItem then begin
6928 Item.OnClick := FavoriteClick;
6929 end else if TObject(Button.Data) is TFavoriteThreadItem then begin
6930 Item.OnClick := FavoriteClick;
6932 Item.Data := Button.Data;
6933 Item.Caption := LinkToolBar.Buttons[j].Caption;
6934 Item.ImageIndex := LinkToolBar.Buttons[j].ImageIndex;
6935 ChevronPopupMenu.Items.Add(Item);
6945 procedure TGikoForm.ListCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
6947 Control: TWinControl;
6949 Control := FindControl(BandInfo^.hwndChild);
6950 if Control = ListToolBar then begin
6951 BandInfo^.fMask := BandInfo.fMask or RBBIM_STYLE or RBBIM_IDEALSIZE;
6952 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
6953 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
6957 procedure TGikoForm.ListCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
6962 ChevronPopupMenu.Items.Clear;
6963 Idx := RebarChevron^.uBand;
6964 if (Idx >= 0) and (ListCoolBar.Bands.Count > Idx) then begin
6965 if ListCoolBar.Bands[Idx].Control = ListToolBar then begin
6966 ToolBarChevronMenu(ListToolBar);
6969 p := ListCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
6970 ChevronPopupMenu.Popup(p.x, p.y);
6974 procedure TGikoForm.BrowserCoolBarBandInfo(Sender: TObject; var BandInfo: PReBarBandInfoA);
6976 Control: TWinControl;
6978 Control := FindControl(BandInfo^.hwndChild);
6979 if Control = BrowserToolBar then begin
6980 BandInfo^.fMask := BandInfo.fMask or RBBIM_STYLE or RBBIM_IDEALSIZE;
6981 BandInfo^.fStyle := BandInfo.fStyle or RBBS_USECHEVRON;
6982 BandInfo^.cxIdeal := GetWidthAllToolButton(TToolBar(Control));
6986 procedure TGikoForm.BrowserCoolBarChevronClick(Sender: TObject; RebarChevron: PNMRebarChevron);
6991 ChevronPopupMenu.Items.Clear;
6992 Idx := RebarChevron^.uBand;
6993 if (Idx >= 0) and (BrowserCoolBar.Bands.Count > Idx) then begin
6994 if BrowserCoolBar.Bands[Idx].Control = BrowserToolBar then
6995 ToolBarChevronMenu(BrowserToolBar)
6998 p := BrowserCoolBar.ClientToScreen(Point(RebarChevron^.rc.left, RebarChevron^.rc.bottom));
6999 ChevronPopupMenu.Popup(p.x, p.y);
7003 procedure TGikoForm.ListViewColumnInfo(Sender: TObject; var Column: PLVColumnA);
7005 if Column^.iImage = -1 then begin
7006 Column^.mask := Column^.mask or LVCF_FMT;
7008 Column^.mask := Column^.mask or LVCF_FMT or LVCF_IMAGE;
7009 Column^.fmt := Column^.fmt or LVCFMT_IMAGE or LVCFMT_BITMAP_ON_RIGHT;
7013 procedure TGikoForm.ThreadEditorActionExecute(Sender: TObject);
7015 Editor: TEditorForm;
7017 if not (GetActiveList is TBoard) then
7019 Editor := TEditorForm.Create(Self);
7020 Editor.SetBoard(TBoard(GetActiveList));
7022 Editor.BodyEdit.SetFocus;
7025 procedure TGikoForm.ToolBarSettingActionExecute(Sender: TObject);
7027 Dlg: TToolBarSettingDialog;
7029 //Component: TComponent;
7031 Dlg := TToolBarSettingDialog.Create(Self, ActionList);
7033 Dlg.AddToolBar(StdToolBar, gttStandard);
7034 Dlg.AddToolBar(ListToolBar, gttList);
7035 Dlg.AddToolBar(BrowserToolBar, gttBrowser);
7037 if ToolBarSettingAction.ActionComponent.GetParentComponent is TPopupMenu then begin
7038 Component := TPopupMenu( ToolBarSettingAction.ActionComponent.GetParentComponent ).PopupComponent;
7040 if Component = MainCoolBar then
7041 Dlg.ToolBarComboBox.ItemIndex := 0
7042 else if Component = ListCoolBar then
7043 Dlg.ToolBarComboBox.ItemIndex := 1
7044 else if Component = BrowserCoolBar then
7045 Dlg.ToolBarComboBox.ItemIndex := 2;
7048 if Dlg.ShowModal = mrOK then begin
7051 //
\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é
7052 for i := 0 to MainCoolBar.Bands.Count - 1 do begin
7053 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth + 1;
7054 MainCoolBar.Bands[i].MinWidth := MainCoolBar.Bands[i].MinWidth - 1;
7056 for i := 0 to ListCoolBar.Bands.Count - 1 do begin
7057 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth + 1;
7058 ListCoolBar.Bands[i].MinWidth := ListCoolBar.Bands[i].MinWidth - 1;
7060 for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin
7061 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth + 1;
7062 BrowserCoolBar.Bands[i].MinWidth := BrowserCoolBar.Bands[i].MinWidth - 1;
7064 SaveToolBarSetting(StdToolBar);
7065 SaveToolBarSetting(ListToolBar);
7066 for i := ListToolBar.ControlCount - 1 downto 0 do
7068 if ListToolBar.Controls[ i ].Action = SelectItemAction then
7070 //
\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·
7071 if (i + 1) < ListToolBar.ControlCount then
7072 if ListToolBar.Controls[ i + 1 ] is TToolButton then
7073 if TToolButton( ListToolBar.Controls[ i + 1 ] ).Style = tbsSeparator then
7074 ListToolBar.Controls[ i + 1 ].Visible := False;
7076 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83{
\83^
\83\93\82ð
\89B
\82·
7077 ListToolBar.Controls[ i ].Visible := False;
7078 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\83t
\83B
\81[
\83\8b\83h
\82ð
\91}
\93ü
7079 SelectComboBox.Left := ListToolBar.Controls[ i ].Left;
7080 SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth;
7081 SelectComboBox.Parent := ListToolBar;
7082 //
\83X
\83\8c\83b
\83h
\8di
\8d\9e\97p
\93Æ
\8e©
\83Z
\83p
\83\8c\81[
\83^
\82ð
\91}
\93ü
7083 SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width;
7084 SelectComboBoxSplitter.Parent := ListToolBar;
7089 SaveToolBarSetting(BrowserToolBar);
7096 procedure TGikoForm.SetToolBarPopup;
7100 for i := 0 to StdToolBar.ButtonCount - 1 do begin
7102 for i := 0 to ListToolBar.ButtonCount - 1 do begin
7103 if ListToolBar.Buttons[i].Action = IconStyle then
7104 ListToolBar.Buttons[i].DropdownMenu := ListIconPopupMenu;
7105 if ListToolBar.Buttons[i].Action = SelectReservAction then
7106 ListToolBar.Buttons[i].DropdownMenu := RoundNamePopupMenu;
7108 for i := 0 to BrowserToolBar.ButtonCount - 1 do begin
7109 if BrowserToolBar.Buttons[i].Action = IEAction then
7110 BrowserToolBar.Buttons[i].DropdownMenu := BrowserPopupMenu;
7114 procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState;
7115 WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
7122 Wnd := WindowFromPoint(MousePos);
7124 if WheelDelta > 0 then
7129 if (Wnd = BrowserTab.Handle) or
7130 (Wnd = BrowserTab.Parent.Handle) then begin
7131 BrowserTab.ScrollTabs(Delta);
7132 end else if Wnd = ListView.Handle then begin
7133 if ListView.ViewStyle = vsList then
7134 ListView.Scroll( Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ), 0 )
7136 ListView.Scroll( 0, Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) );
7143 procedure TGikoForm.SelectComboBoxChange(Sender: TObject);
7145 if Length( SelectComboBox.Text ) = 0 then
7147 AllItemAction.Checked := True;
7148 LogItemAction.Checked := False;
7149 NewItemAction.Checked := False;
7151 //
\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é
7152 if AllItemAction.Checked then
7153 AllItemAction.Checked := False;
7154 if LogItemAction.Checked then
7155 LogItemAction.Checked := False;
7156 if NewItemAction.Checked then
7157 NewItemaction.Checked := False;
7160 if Length( SelectComboBox.Text ) = 0 then
7161 SetListViewType( gvtAll )
7163 SetListViewType( gvtUser, SelectComboBox.Text, false);
7166 procedure TGikoForm.SelectComboBoxKeyDown(Sender: TObject; var Key: Word;
7167 Shift: TShiftState);
7170 if Key = VK_Return then
7173 end else if Length( SelectComboBox.Text ) = 0 then
7175 AllItemAction.Checked := True;
7176 LogItemAction.Checked := False;
7177 NewItemAction.Checked := False;
7179 //
\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é
7180 if AllItemAction.Checked then
7181 AllItemAction.Checked := False;
7182 if LogItemAction.Checked then
7183 LogItemAction.Checked := False;
7184 if NewItemAction.Checked then
7185 NewItemaction.Checked := False;
7190 procedure TGikoForm.SelectComboBoxExit(Sender: TObject);
7195 if Length( SelectComboBox.Text ) = 0 then
7197 SelectComboBox.Text := SELECTCOMBOBOX_NAME;
7198 SelectComboBox.Color := SELECTCOMBOBOX_COLOR;
7203 //
\8di
\82è
\8d\9e\82Ý
\8c\9f\8dõ
\82Ì
\97\9a\97ð
\8dX
\90V
7204 procedure TGikoForm.ModifySelectList;
7211 if SelectComboBox.Parent = nil then
7214 if Length( SelectComboBox.Text ) > 0 then
7216 oldText := SelectComboBox.Text;
7217 idx := GikoSys.Setting.SelectTextList.IndexOf( oldText );
7219 GikoSys.Setting.SelectTextList.Delete( idx );
7220 idx := SelectComboBox.Items.IndexOf( oldText );
7222 SelectComboBox.Items.Delete( idx );
7223 GikoSys.Setting.SelectTextList.Insert( 0, oldText );
7224 SelectComboBox.Items.Insert( 0, oldText );
7225 SelectComboBox.Text := oldText;
7232 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\95Ò
\8fW
\82·
\82é
\82½
\82ß
\82É
\8aJ
\82
7233 procedure TGikoForm.NG1Click(Sender: TObject);
7235 GikoSys.FAbon.EditNGwords;
7237 //NG
\83\8f\81[
\83h
\83t
\83@
\83C
\83\8b\82ð
\8dÄ
\93Ç
\82Ý
\8d\9e\82Ý
\82·
\82é
7238 procedure TGikoForm.SelectResActionExecute(Sender: TObject);
7240 Dlg: TListSelectDialog;
7241 ThreadItem : TThreadItem;
7242 FilterList : TStringList;
7245 Dlg := TListSelectDialog.Create(Self);
7247 Dlg.SelectComboBox.Items.Assign(GikoSys.Setting.SelectTextList);
7248 Dlg.SelectComboBox.Text := '';
7250 if (Dlg.ModalResult = mrCancel) or (Length( Dlg.SelectComboBox.Text ) = 0) then begin
7251 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
7252 AllResAction.Checked := True;
7253 SelectResAction.Checked := False;
7255 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
7256 FilterList := TStringList.Create;
7258 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
7259 GikoSys.FSelectResFilter.Reverse := False;
7264 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
7265 AllResAction.Checked := False;
7266 SelectResAction.Checked := True;
7268 //
\8c\9f\8dõ
\97\9a\97ð
\82Ì
\8dX
\90V
7269 idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text);
7271 GikoSys.Setting.SelectTextList.Delete(idx);
7272 GikoSys.Setting.SelectTextList.Insert(0, Dlg.SelectComboBox.Text);
7273 while Dlg.SelectComboBox.Items.Count > 100 do begin
7274 Dlg.SelectComboBox.Items.Delete(Dlg.SelectComboBox.Items.Count - 1);
7278 if SelectComboBox.Parent <> nil then
7279 SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList );
7283 //
\83t
\83B
\83\8b\83^
\82Ì
\90Ý
\92è
7284 FilterList := TStringList.Create;
7286 GikoSys.FSelectResFilter.Reverse := True;
7287 FilterList.Delimiter := ' '; //
\8bæ
\90Ø
\82è
\8eq
\82ð
\94¼
\8ap
\83X
\83y
\81[
\83X
\82É
\90Ý
\92è
7288 FilterList.DelimitedText := Dlg.SelectComboBox.Text;
7290 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
7296 //
\83X
\83\8c\83b
\83h
\82Ì
\8dÄ
\95`
\89æ
7297 ThreadItem := GetActiveContent;
7298 if ThreadItem <> nil then
7299 SetContent( ThreadItem );
7306 procedure TGikoForm.SelectResActionUpdate(Sender: TObject);
7308 SelectResAction.Enabled := GetActiveContent <> nil;
7311 procedure TGikoForm.FormKeyDown(Sender: TObject; var Key: Word;
7312 Shift: TShiftState);
7316 Doc: IHtmlDocument2;
7317 // Range: IHTMLTxtRange;
7320 ThreadItem: TThreadItem;
7324 ThreadItem := GetActiveContent;
7325 if ThreadItem <> nil then begin
7326 if ssCtrl in Shift then begin
7327 if ssAlt in Shift then begin
7328 Doc := Browser.Document as IHtmlDocument2;
7329 s := IntToStr(Fkeynum);
7330 if GikoSys.IsNumeric(s) then begin
7331 ThreadItem := GetActiveContent;
7332 if ThreadItem <> nil then begin
7334 FHint.PopupType := gptThread;
7335 SetResPopupText(ThreadItem.ParentBoard.BBSID, ChangeFileExt(ThreadItem.FileName, ''), Num, Num, False, False);
7336 if FHint.ResCount <> 0 then begin
7343 if Fkeynum = 0 then begin
7344 if (Key >= $60) and (Key <= $69) then begin
7345 Fkeynum := Key - $60;
7348 if (Key >= $60) and (Key <= $69) then begin
7349 Fkeynum := Fkeynum * 10 + Key - $60;
7355 if FHint <> nil then begin
7356 FHint.ReleaseHandle;
7365 procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;
7366 Shift: TShiftState);
7369 if Key = $11 then begin
7371 if FHint <> nil then begin
7372 FHint.ReleaseHandle;
7380 //
\91S
\82Ä
\82Ì
\83\8c\83X
\82ð
\95\
\8e¦
7381 procedure TGikoForm.AllResActionExecute(Sender: TObject);
7383 ThreadItem : TThreadItem;
7384 FilterList : TStringList;
7386 //
\83{
\83^
\83\93\82Ì
\8dX
\90V
7387 AllResAction.Checked := True;
7388 SelectResAction.Checked := False;
7390 //
\83t
\83B
\83\8b\83^
\95¶
\8e\9a\97ñ
\82ð
\8bó
\82É
\82·
\82é
7391 FilterList := TStringList.Create;
7393 GikoSys.FSelectResFilter.LoadFromStringList( FilterList );
7394 GikoSys.FSelectResFilter.Reverse := False;
7399 //
\83X
\83\8c\83b
\83h
\82ð
\8dÄ
\95`
\89æ
7400 ThreadItem := GetActiveContent;
7401 if ThreadItem <> nil then
7402 SetContent( ThreadItem );
7405 procedure TGikoForm.AllResActionUpdate(Sender: TObject);
7407 AllResAction.Enabled := GetActiveContent <> nil;
7410 procedure TGikoForm.ReloadClick(Sender: TObject);
7412 ThreadItem : TThreadItem;
7414 if GikoSys.FAbon.ReLoadFromNGwordFile =false then begin
7415 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);
7417 ThreadItem := GetActiveContent;
7418 if ThreadItem <> nil then
7419 SetContent( ThreadItem );
7424 procedure TGikoForm.GoBackClick(Sender: TObject);
7426 ThreadItem : TThreadItem;
7429 if GikoSys.FAbon.GoForward =false then begin
7430 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);
7432 s := GikoSys.FAbon.NGwordname;
7433 StatusBar.Panels.Items[2].Text := s;
7434 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
7435 StatusBarResize(Sender);
7436 ThreadItem := GetActiveContent;
7437 if ThreadItem <> nil then
7438 SetContent( ThreadItem );
7443 procedure TGikoForm.GoFowardClick(Sender: TObject);
7445 ThreadItem : TThreadItem;
7448 if GikoSys.FAbon.GoBack =false then begin
7449 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);
7451 s := GikoSys.FAbon.NGwordname;
7452 StatusBar.Panels.Items[2].Text := s;
7453 StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100);
7454 StatusBarResize(Sender);
7455 ThreadItem := GetActiveContent;
7456 if ThreadItem <> nil then
7457 SetContent( ThreadItem );
7462 procedure TGikoForm.SelectComboBoxSplitterMouseMove(Sender: TObject;
7463 Shift: TShiftState; X, Y: Integer);
7468 If (SelectComboBox.Parent <> nil) and (IsDraggingSelectComboBox) Then begin
7471 pos := SelectComboBoxSplitter.ClientToScreen( pos );
7472 w := SelectComboBox.Width + (pos.X - DraggingSelectComboBoxPosition.X);
7474 If w <= 50 Then Begin
7475 //
\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
7476 //
\81u
\8e~
\82Ü
\82Á
\82½(50pixel)
\88Ê
\92u
\81v
\82É
\82È
\82é
\82æ
\82¤
\82É
7477 pos.X := pos.X + (50 - w);
7479 //
\8f¬
\82³
\82
\82È
\82è
\82·
\82¬
\82È
\82¢
\82æ
\82¤
\82É
7483 //
\83`
\83\89\82Â
\82«
\8cy
\8c¸
\82Ì
\88×
7484 If SelectComboBox.Width <> w Then Begin
7485 SelectComboBox.Width := w;
7486 GikoSys.Setting.SelectComboBoxWidth := w;
7487 DraggingSelectComboBoxPosition := pos;
7492 procedure TGikoForm.SelectComboBoxSplitterMouseDown(Sender: TObject;
7493 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7497 IsDraggingSelectComboBox := True;
7500 DraggingSelectComboBoxPosition := SelectComboBoxSplitter.ClientToScreen( pos );
7503 procedure TGikoForm.SelectComboBoxSplitterMouseUp(Sender: TObject;
7504 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
7506 IsDraggingSelectComboBox := False;
7509 procedure TGikoForm.StatusBarResize(Sender: TObject);
7511 StatusBar.Panels[1].Width := StatusBar.Width -
7512 StatusBar.Panels[0].Width -
7513 StatusBar.Panels[2].Width;
7515 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\92Ê
\8fí
\81v
7516 procedure TGikoForm.IndividualAbon1Click(Sender: TObject);
7518 ThreadItem : TThreadItem;
7520 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,1);
7521 ThreadItem := GetActiveContent;
7522 if ThreadItem <> nil then
7523 SetContent( ThreadItem );
7525 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\81u
\93§
\96¾
\81v
7526 procedure TGikoForm.IndividualAbon2Click(Sender: TObject);
7528 ThreadItem : TThreadItem;
7530 GikoSys.FAbon.AddIndividualAbon(KokoPopupMenu.Tag,0);
7531 ThreadItem := GetActiveContent;
7532 if ThreadItem <> nil then
7533 SetContent( ThreadItem );
7535 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c\81i
\81j
7536 procedure TGikoForm.AntiIndividualAbonClick(Sender: TObject);
7538 ThreadItem : TThreadItem;
7541 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
7542 GikoSys.FAbon.DeleteIndividualAbon(KokoPopupMenu.Tag);
7543 ThreadItem := GetActiveContent;
7544 if ThreadItem <> nil then
7545 SetContent( ThreadItem );
7547 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
7548 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
7551 //
\8cÂ
\95Ê
\82 \82Ú
\81[
\82ñ
\89ð
\8f\9c
7552 procedure TGikoForm.N42Click(Sender: TObject);
7554 IndividualForm :TIndividualAbonForm;
7555 ThreadItem : TThreadItem;
7559 IndividualForm := TIndividualAbonForm.Create(Self);
7561 if GikoSys.FAbon.GetAbonResCount <> 0 then begin
7562 for i :=0 to GikoSys.FAbon.GetAbonResCount-1 do begin
7563 IndividualForm.ComboBox1.Items.Add(GikoSys.FAbon.GetAbonResString(i));
7565 if IndividualForm.ShowModal = mrOK then begin
7566 GikoSys.FAbon.DeleteIndividualAbon(IndividualForm.ResNumber);
7568 ThreadItem := GetActiveContent;
7569 if ThreadItem <> nil then
7570 SetContent( ThreadItem );
7572 msg := '
\82±
\82Ì
\83X
\83\8c\83b
\83h
\82Å
\82Í
\8cÂ
\95Ê
\82 \82Ú
\81`
\82ñ
\82ð
\8ds
\82Á
\82Ä
\82Ü
\82¹
\82ñ';
7573 MsgBox(Handle, msg, '
\83\81\83b
\83Z
\81[
\83W', MB_OK);
7576 IndividualForm.Free;
7580 procedure TGikoForm.SelectComboBoxEnter(Sender: TObject);
7583 if (Length( SelectComboBox.Text ) = 0) or
7584 (SelectComboBox.Text = SELECTCOMBOBOX_NAME) then
7586 SelectComboBox.Text := '';
7587 SelectComboBox.Color := clWindow;
7592 procedure TGikoForm.N51Click(Sender: TObject);
7596 //
\94Â
\96¼
\8c\9f\8dõ
7597 procedure TGikoForm.TreeSelectSearchBoardNameExecute(Sender: TObject);
7601 CurItem : TTreeNode;
7604 if InputQuery('
\94Â
\96¼
\8c\9f\8dõ','
\94Â
\96¼
\82Ì
\93ü
\97Í',s) then begin
7607 if TreeView.Selected = nil then
7608 CurItem := TreeView.Items.GetFirstNode
7610 CurItem := TreeView.Selected.GetNext;
7611 if CurItem = nil then
7612 CurItem := TreeView.Items.GetFirstNode;
7614 while CurItem <> nil do begin
7615 if (CurItem.ImageIndex <> 2) and (AnsiPos(s,CurItem.Text) <> 0) then begin
7618 CurItem := CurItem.GetNext;
7621 if CurItem = nil then begin
7622 msg := '
\90æ
\93ª
\82É
\96ß
\82è
\82Ü
\82·
\82©
\81H';
7623 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
7624 CurItem := TreeView.Items.GetFirstNode;
7628 TreeView.Select(CurItem);
7631 TreeView.Select(CurItem);
7633 msg := '
\8e\9f\82É
\8ds
\82«
\82Ü
\82·
\82©
\81H';
7634 if MsgBox(Handle, msg, '', MB_YESNO or MB_ICONEXCLAMATION) = mrYes then begin
7648 procedure TGikoForm.CabinetFavoriteActionExecute(Sender: TObject);
7651 GikoSys.Setting.CabinetIndex := 2;
7653 //
\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Ö
7654 HistoryToolBar.Hide;
7655 FavoriteToolBar.Show;
7656 TreeView.Visible := False;
7657 FavoriteTreeView.Visible := True;
7659 CabinetSelectToolButton.Caption := '
\82¨
\8bC
\82É
\93ü
\82è';
7661 //
\83\81\83j
\83\85\81[
\8by
\82Ñ
\83{
\83^
\83\93\82Ì
\83`
\83F
\83b
\83N
\82ð
\90Ý
\92è
7662 Cabinet2chAction.Checked := False;
7663 CabinetHistoryAction.Checked := False;
7664 CabinetFavoriteAction.Checked := True;
7666 //
\82¨
\8bC
\82É
\93ü
\82è
\82Ì
\83c
\83\8a\81[
\82ð
\93W
\8aJ
7667 FavoriteTreeView.TopItem.Expanded := True;
7671 procedure TGikoForm.FavoriteMoveTo( SenderNode, SourceNode: TTreeNode );
7674 if (SenderNode = nil) or (SourceNode = nil) or (SenderNode = SourceNode) then
7677 if TObject(SenderNode.Data) is TFavoriteFolder then
7678 SourceNode.MoveTo(SenderNode, naAddChild)
7680 SourceNode.MoveTo(SenderNode, naInsert);
7684 procedure TGikoForm.FavoriteAddTo( SenderNode: TTreeNode; Source: TObject );
7688 FavoBoardItem: TFavoriteBoardItem;
7689 FavoThreadItem: TFavoriteThreadItem;
7691 ThreadItem: TThreadItem;
7694 if (SenderNode = nil) or (Source = nil) then
7697 if not (TObject(SenderNode.Data) is TFavoriteFolder) then
7698 FavNode := SenderNode.Parent
7700 FavNode := SenderNode;
7702 if Source is TBoard then begin
7703 Board := TBoard( Source );
7704 FavoBoardItem := TFavoriteBoardItem.Create;
7705 FavoBoardItem.BBSID := Board.BBSID;
7706 FavoBoardItem.BoardName := Board.Title;
7707 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, FavoBoardItem);
7708 Node.ImageIndex := 15;
7709 Node.SelectedIndex := 15;
7710 end else if Source is TFavoriteBoardItem then begin
7711 FavoBoardItem := TFavoriteBoardItem( Source );
7712 Board := BBS2ch.FindBBSID( FavoBoardItem.BBSID );
7713 if Board <> nil then
7714 if not Board.IsThreadDatRead then
7715 GikoSys.ReadSubjectFile(Board);
7716 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, Board.Title, Source);
7717 Node.ImageIndex := 15;
7718 Node.SelectedIndex := 15;
7719 end else if Source is TThreadItem then begin
7720 ThreadItem := TThreadItem( Source );
7721 FavoThreadItem := TFavoriteThreadItem.Create;
7722 FavoThreadItem.BBSID := ThreadItem.ParentBoard.BBSID;
7723 FavoThreadItem.ThreadID := ThreadItem.FileName;
7724 FavoThreadItem.ThreadName := ThreadItem.Title;
7725 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, FavoThreadItem);
7726 Node.ImageIndex := 16;
7727 Node.SelectedIndex := 16;
7728 end else if Source is TFavoriteThreadItem then begin
7729 FavoThreadItem := TFavoriteThreadItem( Source );
7730 Board := BBS2ch.FindBBSID( FavoThreadItem.BBSID );
7731 if Board <> nil then
7732 if not Board.IsThreadDatRead then
7733 GikoSys.ReadSubjectFile(Board);
7734 ThreadItem := BBS2ch.FindThreadItem( FavoThreadItem.BBSID, FavoThreadItem.ThreadID );
7735 Node := FavoriteDM.TreeView.Items.AddChildObject(FavNode, ThreadItem.Title, Source);
7736 Node.ImageIndex := 16;
7737 Node.SelectedIndex := 16;
7742 procedure TGikoForm.FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject );
7745 SourceNode: TTreeNode;
7746 LinkToolButton: TLinkToolButton;
7749 if SenderNode = nil then
7752 if not (TObject( SenderNode.Data ) is TFavoriteFolder) then
7753 if FDropSpaceNode <> nil then
7754 SenderNode := FDropSpaceNode;
7756 if Source = FavoriteTreeView then begin
7758 SourceNode := FavoriteTreeView.Selected;
7759 FavoriteMoveTo( SenderNode, SourceNode );
7761 end else if Source is TLinkToolButton then begin
7763 LinkToolButton := TLinkToolButton( Source );
7764 //ShowMessage(LinkToolButton.Text);
7765 SourceNode := TreeNodeDataFind( FavoriteTreeView.TopItem, LinkToolButton.Data );
7766 FavoriteMoveTo( SenderNode, SourceNode );
7768 end else if Source = BrowserTab then begin
7770 idx := BrowserTab.TabIndex;
7771 FavoriteAddTo( SenderNode, BrowserTab.Tabs.Objects[idx] );
7773 end else if Source = ListView then begin
7775 FavoriteAddTo( SenderNode, ListView.Selected.Data );
7777 end else if Source = TreeView then begin
7779 FavoriteAddTo( SenderNode, TreeView.Selected.Data );
7787 procedure TGikoForm.FavoriteTreeViewDragDrop(Sender, Source: TObject; X,
7790 SenderNode: TTreeNode;
7793 SenderNode := FavoriteTreeView.GetNodeAt(X, Y);
7794 if SenderNode <> nil then begin
7795 FavoriteDragDrop( SenderNode, Source );
7800 procedure TGikoForm.FavoriteTreeViewEdited(Sender: TObject;
7801 Node: TTreeNode; var S: String);
7804 FavoriteTreeView.ReadOnly := True;
7809 procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
7810 Shift: TShiftState);
7816 FClickNode := FavoriteTreeView.Selected;
7817 FavoriteTreeViewRenameActionExecute( Sender );
7821 FClickNode := FavoriteTreeView.Selected;
7822 FavoriteTreeViewDeleteActionExecute( Sender );
7828 procedure TGikoForm.FavoriteTreePopupMenuPopup(Sender: TObject);
7831 LinkToolButton: TLinkToolButton;
7834 if FavoriteTreePopupMenu.PopupComponent = FavoriteTreeView then begin
7836 FClickNode := FavoriteTreeView.Selected;
7838 end else if FavoriteTreePopupMenu.PopupComponent is TLinkToolButton then begin
7840 LinkToolButton := TLinkToolButton( FavoriteTreePopupMenu.PopupComponent );
7841 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
7842 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
7843 FClickNode := FavoriteTreeView.Items[i];
7847 for i := 0 to FClickNode.Count - 1 do begin
7848 if FClickNode.Item[i].Data = LinkToolButton.Data then begin
7849 FClickNode := FClickNode.Item[i];
7856 if FClickNode = nil then begin
7857 FavoriteTreeBrowseFolderPopupMenu.Enabled := False;
7858 FavoriteTreeDeletePopupMenu.Enabled := False;
7859 FavoriteTreeRenamePopupMenu.Enabled := False;
7860 FavoriteTreeNewFolderPopupMenu.Enabled := False;
7861 FavoriteTreeReloadPopupMenu.Enabled := False;
7862 FavoriteTreeURLCopyPopupMenu.Enabled := False;
7863 FavoriteTreeNameCopyPopupMenu.Enabled := False;
7864 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
7865 FavoriteTreeLogDeletePopupMenu.Enabled := False;
7866 end else if FClickNode.IsFirstNode then begin
7867 FavoriteTreeBrowseFolderPopupMenu.Enabled := True;
7868 FavoriteTreeDeletePopupMenu.Enabled := False;
7869 FavoriteTreeRenamePopupMenu.Enabled := False;
7870 FavoriteTreeNewFolderPopupMenu.Enabled := True;
7871 FavoriteTreeReloadPopupMenu.Enabled := False;
7872 FavoriteTreeURLCopyPopupMenu.Enabled := False;
7873 FavoriteTreeNameCopyPopupMenu.Enabled := False;
7874 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
7875 FavoriteTreeLogDeletePopupMenu.Enabled := False;
7876 end else if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
7877 FavoriteTreeBrowseFolderPopupMenu.Enabled := True;
7878 FavoriteTreeDeletePopupMenu.Enabled := True;
7879 FavoriteTreeRenamePopupMenu.Enabled := False;
7880 FavoriteTreeNewFolderPopupMenu.Enabled := True;
7881 FavoriteTreeReloadPopupMenu.Enabled := False;
7882 FavoriteTreeURLCopyPopupMenu.Enabled := False;
7883 FavoriteTreeNameCopyPopupMenu.Enabled := False;
7884 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
7885 FavoriteTreeLogDeletePopupMenu.Enabled := False;
7886 end else if TObject(FClickNode.Data) is TFavoriteFolder then begin
7887 FavoriteTreeBrowseFolderPopupMenu.Enabled := True;
7888 FavoriteTreeDeletePopupMenu.Enabled := True;
7889 FavoriteTreeRenamePopupMenu.Enabled := True;
7890 FavoriteTreeNewFolderPopupMenu.Enabled := True;
7891 FavoriteTreeReloadPopupMenu.Enabled := False;
7892 FavoriteTreeURLCopyPopupMenu.Enabled := False;
7893 FavoriteTreeNameCopyPopupMenu.Enabled := False;
7894 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
7895 FavoriteTreeLogDeletePopupMenu.Enabled := False;
7896 end else if TObject(FClickNode.Data) is TFavoriteThreadItem then begin
7897 FavoriteTreeBrowseFolderPopupMenu.Enabled := False;
7898 FavoriteTreeDeletePopupMenu.Enabled := True;
7899 FavoriteTreeRenamePopupMenu.Enabled := True;
7900 FavoriteTreeNewFolderPopupMenu.Enabled := True;
7901 FavoriteTreeReloadPopupMenu.Enabled := True;
7902 FavoriteTreeURLCopyPopupMenu.Enabled := True;
7903 FavoriteTreeNameCopyPopupMenu.Enabled := True;
7904 FavoriteTreeNameURLCopyPopupMenu.Enabled := True;
7905 FavoriteTreeLogDeletePopupMenu.Enabled := True;
7906 end else if TObject(FClickNode.Data) is TFavoriteBoardItem then begin
7907 FavoriteTreeBrowseFolderPopupMenu.Enabled := False;
7908 FavoriteTreeDeletePopupMenu.Enabled := True;
7909 FavoriteTreeRenamePopupMenu.Enabled := True;
7910 FavoriteTreeNewFolderPopupMenu.Enabled := True;
7911 FavoriteTreeReloadPopupMenu.Enabled := True;
7912 FavoriteTreeURLCopyPopupMenu.Enabled := True;
7913 FavoriteTreeNameCopyPopupMenu.Enabled := True;
7914 FavoriteTreeNameURLCopyPopupMenu.Enabled := True;
7915 FavoriteTreeLogDeletePopupMenu.Enabled := False;
7917 FavoriteTreeBrowseFolderPopupMenu.Enabled := False;
7918 FavoriteTreeDeletePopupMenu.Enabled := False;
7919 FavoriteTreeRenamePopupMenu.Enabled := False;
7920 FavoriteTreeNewFolderPopupMenu.Enabled := False;
7921 FavoriteTreeReloadPopupMenu.Enabled := False;
7922 FavoriteTreeURLCopyPopupMenu.Enabled := False;
7923 FavoriteTreeNameCopyPopupMenu.Enabled := False;
7924 FavoriteTreeNameURLCopyPopupMenu.Enabled := False;
7925 FavoriteTreeLogDeletePopupMenu.Enabled := False;
7930 procedure TGikoForm.FavoriteTreeViewDeleteActionExecute(Sender: TObject);
7933 if FClickNode = nil then
7935 if FClickNode.IsFirstNode then
7937 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then begin
7938 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
7942 //FDeleteList.Add(FClickNode.Data);
7943 //SetDeleteItemList(FClickNode);
7951 procedure TGikoForm.FavoriteTreeViewRenameActionExecute(Sender: TObject);
7954 if FClickNode = nil then
7956 if FClickNode.IsFirstNode then
7958 if FClickNode.Text = Favorite.FAVORITE_LINK_NAME then
7960 FavoriteTreeView.ReadOnly := False;
7961 FClickNode.EditText;
7967 procedure TGikoForm.FavoriteTreeViewNewFolderActionExecute(
7970 NewFavFolder: TFavoriteFolder;
7974 if FClickNode = nil then
7978 if not (TObject(FClickNode.Data) is TFavoriteFolder) then begin
7979 FavoriteTreeView.Selected := FClickNode.Parent;
7980 FClickNode := FClickNode.Parent;
7983 NewFavFolder := TFavoriteFolder.Create;
7984 Node := FavoriteTreeView.Items.AddChildObject(FClickNode, '
\90V
\82µ
\82¢
\83t
\83H
\83\8b\83_', NewFavFolder);
7985 Node.ImageIndex := 14;
7986 Node.SelectedIndex := 14;
7987 // FClickNode.Selected.Expanded := True;
7988 FavoriteTreeView.Selected := Node;
7990 FavoriteTreeViewRenameAction.Execute;
7996 procedure TGikoForm.ToolButton19Click(Sender: TObject);
7999 FavoriteArrangeActionExecute( nil );
8003 procedure TGikoForm.FavoriteBrowseFolder( node: TTreeNode );
8008 if not (TObject(node.Data) is TFavoriteFolder) then
8011 for i := 0 to node.Count - 1 do
8013 if TObject(node.Item[i].Data) is TFavoriteFolder then
8014 FavoriteBrowseFolder( node.Item[i] )
8015 else if TObject(node.Item[i].Data) is TFavoriteThreadItem then
8016 FavoriteClick( node.Item[i], False );
8021 procedure TGikoForm.FavoriteTreeViewBrowseFolderActionExecute(
8025 FavoriteBrowseFolder( FClickNode );
8026 BrowserTab.OnChange(nil);
8030 procedure TGikoForm.FavoriteTreeViewChange(Sender: TObject;
8034 if not Mouse.IsDragging then
8035 FavoriteClick( Node );
8039 procedure TGikoForm.FavoriteTreeViewDblClick(Sender: TObject);
8042 FClickNode := FavoriteTreeView.Selected;
8043 FavoriteTreeViewReloadActionExecute( Sender );
8047 procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
8050 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';
8051 DEL_TITLE = '
\8dí
\8f\9c\8am
\94F';
8053 ThreadItem: TThreadItem;
8054 FavThread: TFavoriteThreadItem;
8058 if FClickNode = nil then Exit;
8059 if not (TObject(FClickNode.Data) is TFavoriteThreadItem) then Exit;
8061 FavThread := TFavoriteThreadItem( FClickNode.Data );
8062 Board := BBS2ch.FindBBSID(FavThread.BBSID);
8063 if Board <> nil then
8064 if not Board.IsThreadDatRead then
8065 GikoSys.ReadSubjectFile(Board);
8066 ThreadItem := BBS2ch.FindThreadItem(FavThread.BBSID, FavThread.ThreadID);
8069 if GikoSys.Setting.DeleteMsg then begin
8070 if MsgBox(Handle, DEL_MSG, DEL_TITLE, MB_YESNO or MB_ICONQUESTION or MB_DEFBUTTON2) <> IDYES then
8074 DeleteHistory(ThreadItem);
8075 DeleteTab(ThreadItem);
8076 ThreadItem.DeleteLogFile;
8084 procedure TGikoForm.FavoriteTreeViewReloadActionExecute(Sender: TObject);
8086 ThreadItem: TThreadItem;
8087 FavThread: TFavoriteThreadItem;
8089 FavBoard: TFavoriteBoardItem;
8092 if FClickNode = nil then Exit;
8094 if TObject( FClickNode.Data ) is TFavoriteThreadItem then begin
8095 FavThread := TFavoriteThreadItem( FClickNode.Data );
8096 Board := BBS2ch.FindBBSID(FavThread.BBSID);
8097 if Board <> nil then
8098 if not Board.IsThreadDatRead then
8099 GikoSys.ReadSubjectFile(Board);
8100 ThreadItem := BBS2ch.FindThreadItem(FavThread.BBSID, FavThread.ThreadID);
8101 if ThreadItem <> nil then
8102 DownloadContent(ThreadItem);
8103 end else if TObject( FClickNode.Data ) is TFavoriteBoardItem then begin
8104 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8105 Board := BBS2ch.GetBoardFromBBSID( FavBoard.BBSID );
8106 DownloadList(Board);
8111 procedure TGikoForm.FavoriteTreeViewURLCopyActionExecute(Sender: TObject);
8113 ThreadItem: TThreadItem;
8114 FavThread: TFavoriteThreadItem;
8116 FavBoard: TFavoriteBoardItem;
8120 if FClickNode = nil then Exit;
8122 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8124 FavThread := TFavoriteThreadItem( FClickNode.Data );
8125 Board := BBS2ch.FindBBSID(FavThread.BBSID);
8126 if Board <> nil then
8127 if not Board.IsThreadDatRead then
8128 GikoSys.ReadSubjectFile(Board);
8129 ThreadItem := BBS2ch.FindThreadItem(FavThread.BBSID, FavThread.ThreadID);
8132 s := ThreadItem.URL + #13#10;
8134 Clipboard.AsText := s;
8138 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8140 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8141 Board := BBS2ch.FindBBSID(FavBoard.BBSID);
8142 if Board <> nil then
8143 if not Board.IsThreadDatRead then
8144 GikoSys.ReadSubjectFile(Board);
8147 s := Board.URL + #13#10;
8149 Clipboard.AsText := s;
8157 procedure TGikoForm.FavoriteTreeViewNameCopyActionExecute(Sender: TObject);
8159 ThreadItem: TThreadItem;
8160 FavThread: TFavoriteThreadItem;
8162 FavBoard: TFavoriteBoardItem;
8166 if FClickNode = nil then Exit;
8168 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8170 FavThread := TFavoriteThreadItem( FClickNode.Data );
8171 Board := BBS2ch.FindBBSID(FavThread.BBSID);
8172 if Board <> nil then
8173 if not Board.IsThreadDatRead then
8174 GikoSys.ReadSubjectFile(Board);
8175 ThreadItem := BBS2ch.FindThreadItem(FavThread.BBSID, FavThread.ThreadID);
8178 s := ThreadItem.Title + #13#10;
8180 Clipboard.AsText := s;
8184 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8186 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8187 Board := BBS2ch.FindBBSID(FavBoard.BBSID);
8188 if Board <> nil then
8189 if not Board.IsThreadDatRead then
8190 GikoSys.ReadSubjectFile(Board);
8193 s := Board.Title + #13#10;
8195 Clipboard.AsText := s;
8203 procedure TGikoForm.FavoriteTreeViewNameURLCopyActionExecute(
8206 ThreadItem: TThreadItem;
8207 FavThread: TFavoriteThreadItem;
8209 FavBoard: TFavoriteBoardItem;
8213 if FClickNode = nil then Exit;
8215 if (TObject(FClickNode.Data) is TFavoriteThreadItem) then begin
8217 FavThread := TFavoriteThreadItem( FClickNode.Data );
8218 Board := BBS2ch.FindBBSID(FavThread.BBSID);
8219 if Board <> nil then
8220 if not Board.IsThreadDatRead then
8221 GikoSys.ReadSubjectFile(Board);
8222 ThreadItem := BBS2ch.FindThreadItem(FavThread.BBSID, FavThread.ThreadID);
8225 s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10;
8227 Clipboard.AsText := s;
8231 end else if (TObject(FClickNode.Data) is TFavoriteBoardItem) then begin
8233 FavBoard := TFavoriteBoardItem( FClickNode.Data );
8234 Board := BBS2ch.FindBBSID(FavBoard.BBSID);
8235 if Board <> nil then
8236 if not Board.IsThreadDatRead then
8237 GikoSys.ReadSubjectFile(Board);
8240 s := Board.URL + #13#10 + Board.Title + #13#10;
8242 Clipboard.AsText := s;
8250 function TGikoForm.TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode;
8256 for i := 0 to Node.Count - 1 do begin
8257 if Node.Item[i].Data = FindPointer then begin
8258 Result := Node.Item[i];
8260 end else if Node.Item[i].Count > 0 then begin
8261 Found := TreeNodeDataFind( Node.Item[i], FindPointer );
8262 if Found <> nil then begin
8273 procedure TGikoForm.LinkToolBarDragDrop(Sender, Source: TObject; X,
8277 SenderNode: TTreeNode;
8281 for i := 0 to FavoriteTreeView.Items.Count - 1 do begin
8282 if FavoriteTreeView.Items[i].Text = Favorite.FAVORITE_LINK_NAME then begin
8283 SenderNode := FavoriteTreeView.Items[i];
8288 FavoriteDragDrop( SenderNode, Source );
8292 procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
8293 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
8295 if FDragWFirst <> true then begin
8296 FDragWFirst := false;
8300 procedure TGikoForm.LinkToolBarDragOver(Sender, Source: TObject; X,
8301 Y: Integer; State: TDragState; var Accept: Boolean);
8304 FavoriteDragOver( Sender, Source, X, Y, State, Accept );
8308 procedure TGikoForm.OnlyAHundredResExecute(Sender: TObject);
8310 ThreadItem : TThreadItem;
8312 GikoSys.OnlyAHundredRes := OnlyAHundredRes.Checked;
8313 ThreadItem := GetActiveContent;
8314 if ThreadItem <> nil then
8315 SetContent( ThreadItem );
8318 procedure TGikoForm.FavoriteTreeViewEndDrag(Sender, Target: TObject; X,
8322 if FDropSpaceNode <> nil then begin
8323 FDropSpaceNode.Free;
8324 FDropSpaceNode := nil;
8330 procedure TGikoForm.ListCoolBarContextPopup(Sender: TObject;
8331 MousePos: TPoint; var Handled: Boolean);
8334 MousePos := ListCoolBar.ClientToScreen( MousePos );
8335 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
8339 procedure TGikoForm.MainCoolBarContextPopup(Sender: TObject;
8340 MousePos: TPoint; var Handled: Boolean);
8343 MousePos := MainCoolBar.ClientToScreen( MousePos );
8344 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
8348 procedure TGikoForm.BrowserCoolBarContextPopup(Sender: TObject;
8349 MousePos: TPoint; var Handled: Boolean);
8352 MousePos := BrowserCoolBar.ClientToScreen( MousePos );
8353 MainCoolBarPopupMenu.Popup( MousePos.X, MousePos.Y );
8356 procedure TGikoForm.ExportFavoriteFileAccept(Sender: TObject);
8358 if FavoriteDM.SaveFavoriteFile( ExportFavoriteFile.Dialog.FileName ) Then begin
8359 ShowMessage('
\83t
\83@
\83C
\83\8b\82ð
\8fo
\97Í
\82µ
\82Ü
\82µ
\82½');
8361 ShowMessage('
\83t
\83@
\83C
\83\8b\82Ì
\8fo
\97Í
\82É
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½');
8364 procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
8366 if FListViewBackGroundColor <> value then begin
8367 FListViewBackGroundColor := value;
8368 ListView.Color := FListViewBackGroundColor;
8371 procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
8373 ExportFavoriteFile.Dialog.FileName := FavoriteDM.GetFavoriteFilePath;