| 4 |
|
|
| 5 |
uses |
uses |
| 6 |
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, |
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, |
| 7 |
OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils, |
OleCtrls, ComCtrls, ExtCtrls, Menus, StdCtrls, MMSystem, DateUtils, Math, |
| 8 |
{$IF Defined(DELPRO) } |
{$IF Defined(DELPRO) } |
| 9 |
SHDocVw, |
SHDocVw, |
| 10 |
MSHTML, |
MSHTML, |
| 12 |
SHDocVw_TLB, |
SHDocVw_TLB, |
| 13 |
MSHTML_TLB, |
MSHTML_TLB, |
| 14 |
{$IFEND} |
{$IFEND} |
| 15 |
IdHTTP, ActiveX, Clipbrd, Buttons, ToolWin, {HTTPApp,} YofUtils, IdComponent, |
IdHTTP, ActiveX, ActnList, ImgList, |
| 16 |
ShellAPI, ImgList, ActnList, UrlMon, Tabs, IdGlobal, StrUtils, |
ToolWin, Buttons, {Clipbrd,} {HTTPApp,} YofUtils, IdComponent, |
| 17 |
CommCtrl, IniFiles, |
ShellAPI, UrlMon, Tabs, IdGlobal, StrUtils, |
| 18 |
|
CommCtrl, IniFiles, Dialogs, |
| 19 |
GikoSystem, GikoUtil, Setting, BoardGroup, ThreadControl, ItemDownload, |
GikoSystem, GikoUtil, Setting, BoardGroup, ThreadControl, ItemDownload, |
| 20 |
Editor, RoundData, RoundName, KeySetting, GikoPanel, Favorite, FavoriteAdd, |
Editor, RoundData, RoundName, KeySetting, GikoPanel, Favorite, FavoriteAdd, |
| 21 |
FavoriteArrange, AddressHistory, Preview, HTMLDocumentEvent, Kotehan, |
FavoriteArrange, AddressHistory, Preview, HTMLDocumentEvent, Kotehan, |
| 22 |
HintWindow, GikoCoolBar, GikoListView, ToolBarSetting, ToolBarUtil, |
HintWindow, GikoCoolBar, GikoListView, ToolBarSetting, ToolBarUtil, |
| 23 |
IndividualAbon, Dialogs, Search; |
IndividualAbon, Search, ExternalBoardManager, ExternalBoardPlugInMain, |
| 24 |
|
StdActns, GikoXMLDoc; |
| 25 |
|
|
| 26 |
type |
type |
| 27 |
TGikoTreeType = (gttNone, gtt2ch, gttHistory); |
TGikoTreeType = (gttNone, gtt2ch, gttHistory, gttFavorite); |
| 28 |
|
TToolBarSettingSenderType = (tssNone, tssMain, tssList, tssBrowser); |
| 29 |
|
TMinimizeType = (mtNone, mtMinimizing, mtMinimized); |
| 30 |
|
|
| 31 |
TGikoForm = class(TForm) |
TGikoForm = class(TForm) |
| 32 |
StatusBar: TStatusBar; |
StatusBar: TStatusBar; |
| 40 |
ViewPanel: TPanel; |
ViewPanel: TPanel; |
| 41 |
ListView: TGikoListView; |
ListView: TGikoListView; |
| 42 |
ThreadPanel: TPanel; |
ThreadPanel: TPanel; |
|
Browser: TWebBrowser; |
|
| 43 |
MessagePanel: TPanel; |
MessagePanel: TPanel; |
| 44 |
MessageBar: TPanel; |
MessageBar: TPanel; |
| 45 |
MessageHideButton: TSpeedButton; |
MessageHideButton: TSpeedButton; |
| 71 |
SmallIconAction: TAction; |
SmallIconAction: TAction; |
| 72 |
ListIconAction: TAction; |
ListIconAction: TAction; |
| 73 |
DetailIconAction: TAction; |
DetailIconAction: TAction; |
| 74 |
Cabinet2chAction: TAction; |
CabinetBBSAction: TAction; |
| 75 |
CabinetHistoryAction: TAction; |
CabinetHistoryAction: TAction; |
| 76 |
CabinetVisibleAction: TAction; |
CabinetVisibleAction: TAction; |
| 77 |
MidokuAction: TAction; |
MidokuAction: TAction; |
| 94 |
ViewMenu: TMenuItem; |
ViewMenu: TMenuItem; |
| 95 |
StdToolBarMenu: TMenuItem; |
StdToolBarMenu: TMenuItem; |
| 96 |
CabinetMenu: TMenuItem; |
CabinetMenu: TMenuItem; |
|
N6: TMenuItem; |
|
| 97 |
H1: TMenuItem; |
H1: TMenuItem; |
| 98 |
N4: TMenuItem; |
N4: TMenuItem; |
| 99 |
CabinetVisibleMenu: TMenuItem; |
CabinetVisibleMenu: TMenuItem; |
| 184 |
N15: TMenuItem; |
N15: TMenuItem; |
| 185 |
SelectListReloadAction: TAction; |
SelectListReloadAction: TAction; |
| 186 |
SelectThreadReloadAction: TAction; |
SelectThreadReloadAction: TAction; |
|
SelectTimer: TTimer; |
|
| 187 |
KokoPopupMenu: TPopupMenu; |
KokoPopupMenu: TPopupMenu; |
| 188 |
KokomadePMenu: TMenuItem; |
KokomadePMenu: TMenuItem; |
| 189 |
AllPMenu: TMenuItem; |
AllPMenu: TMenuItem; |
| 216 |
B3: TMenuItem; |
B3: TMenuItem; |
| 217 |
BrowserBottomPanel: TGikoPanel; |
BrowserBottomPanel: TGikoPanel; |
| 218 |
CabinetSelectPopupMenu: TPopupMenu; |
CabinetSelectPopupMenu: TPopupMenu; |
|
N17: TMenuItem; |
|
| 219 |
H2: TMenuItem; |
H2: TMenuItem; |
| 220 |
ItemReservPMenu: TMenuItem; |
ItemReservPMenu: TMenuItem; |
| 221 |
RoundNamePopupMenu: TPopupMenu; |
RoundNamePopupMenu: TPopupMenu; |
| 230 |
K2: TMenuItem; |
K2: TMenuItem; |
| 231 |
AllTabCloseAction: TAction; |
AllTabCloseAction: TAction; |
| 232 |
A5: TMenuItem; |
A5: TMenuItem; |
|
N18: TMenuItem; |
|
| 233 |
A6: TMenuItem; |
A6: TMenuItem; |
| 234 |
C1: TMenuItem; |
C1: TMenuItem; |
| 235 |
V1: TMenuItem; |
V1: TMenuItem; |
| 236 |
N19: TMenuItem; |
N19: TMenuItem; |
| 237 |
D1: TMenuItem; |
D1: TMenuItem; |
| 238 |
D2: TMenuItem; |
D2: TMenuItem; |
|
N20: TMenuItem; |
|
| 239 |
MessageImageList: TImageList; |
MessageImageList: TImageList; |
| 240 |
ProgressBar: TProgressBar; |
ProgressBar: TProgressBar; |
| 241 |
ArrangeAction: TAction; |
ArrangeAction: TAction; |
| 286 |
ItemImage: TImage; |
ItemImage: TImage; |
| 287 |
BrowserNameLabel: TLabel; |
BrowserNameLabel: TLabel; |
| 288 |
ActiveLogDeleteAction: TAction; |
ActiveLogDeleteAction: TAction; |
|
N24: TMenuItem; |
|
| 289 |
D3: TMenuItem; |
D3: TMenuItem; |
| 290 |
N25: TMenuItem; |
N25: TMenuItem; |
| 291 |
N26: TMenuItem; |
N26: TMenuItem; |
| 344 |
StdToolBar: TToolBar; |
StdToolBar: TToolBar; |
| 345 |
RoundToolButton: TToolButton; |
RoundToolButton: TToolButton; |
| 346 |
ToolButton6: TToolButton; |
ToolButton6: TToolButton; |
|
CabinetToolButton: TToolButton; |
|
| 347 |
ToolButton4: TToolButton; |
ToolButton4: TToolButton; |
| 348 |
ToolButton13: TToolButton; |
ToolButton13: TToolButton; |
| 349 |
AbortToolButton: TToolButton; |
AbortToolButton: TToolButton; |
| 467 |
N52: TMenuItem; |
N52: TMenuItem; |
| 468 |
N53: TMenuItem; |
N53: TMenuItem; |
| 469 |
SearchBoardName: TMenuItem; |
SearchBoardName: TMenuItem; |
| 470 |
N55: TMenuItem; |
TreeSelectLogDeleteSeparator: TMenuItem; |
| 471 |
TreeSelectSearchBoardName: TAction; |
TreeSelectSearchBoardName: TAction; |
| 472 |
CabinetFavoriteAction: TAction; |
CabinetFavoriteAction: TAction; |
| 473 |
N54: TMenuItem; |
N54: TMenuItem; |
| 474 |
A13: TMenuItem; |
A13: TMenuItem; |
| 475 |
FavoriteTreePopupMenu: TPopupMenu; |
FavoriteTreePopupMenu: TPopupMenu; |
| 476 |
FavoriteTreeViewRenameAction: TAction; |
FavoriteTreeViewRenameAction: TAction; |
| 477 |
FavoriteTreeRenamePopupMenu: TMenuItem; |
FavoriteTreeRenamePopupMenu: TMenuItem; |
| 478 |
FavoriteTreeViewNewFolderAction: TAction; |
FavoriteTreeViewNewFolderAction: TAction; |
| 479 |
FavoriteTreeNewFolderPopupMenu: TMenuItem; |
FavoriteTreeNewFolderPopupMenu: TMenuItem; |
| 480 |
N56: TMenuItem; |
N56: TMenuItem; |
| 481 |
FavoriteTreeViewDeleteAction: TAction; |
FavoriteTreeViewDeleteAction: TAction; |
| 482 |
FavoriteTreeDeletePopupMenu: TMenuItem; |
FavoriteTreeDeletePopupMenu: TMenuItem; |
| 483 |
FavoriteToolBar: TToolBar; |
FavoriteToolBar: TToolBar; |
| 484 |
ToolButton17: TToolButton; |
ToolButton17: TToolButton; |
| 485 |
ToolButton19: TToolButton; |
ToolButton19: TToolButton; |
| 486 |
FavoriteTreeViewBrowseFolderAction: TAction; |
FavoriteTreeViewBrowseFolderAction: TAction; |
| 487 |
FavoriteTreeBrowseFolderPopupMenu: TMenuItem; |
FavoriteTreeBrowseFolderPopupMenu: TMenuItem; |
| 488 |
N57: TMenuItem; |
N57: TMenuItem; |
| 489 |
FavoriteTreeReloadPopupMenu: TMenuItem; |
FavoriteTreeReloadPopupMenu: TMenuItem; |
| 490 |
N58: TMenuItem; |
N58: TMenuItem; |
| 491 |
FavoriteTreeURLCopyPopupMenu: TMenuItem; |
FavoriteTreeURLCopyPopupMenu: TMenuItem; |
| 492 |
FavoriteTreeNameCopyPopupMenu: TMenuItem; |
FavoriteTreeNameCopyPopupMenu: TMenuItem; |
| 493 |
FavoriteTreeLogDeletePopupMenu: TMenuItem; |
FavoriteTreeLogDeletePopupMenu: TMenuItem; |
| 494 |
N59: TMenuItem; |
N59: TMenuItem; |
| 495 |
FavoriteTreeNameURLCopyPopupMenu: TMenuItem; |
FavoriteTreeNameURLCopyPopupMenu: TMenuItem; |
| 496 |
FavoriteTreeViewReloadAction: TAction; |
FavoriteTreeViewReloadAction: TAction; |
| 497 |
FavoriteTreeViewURLCopyAction: TAction; |
FavoriteTreeViewURLCopyAction: TAction; |
| 498 |
FavoriteTreeViewNameCopyAction: TAction; |
FavoriteTreeViewNameCopyAction: TAction; |
| 499 |
FavoriteTreeViewNameURLCopyAction: TAction; |
FavoriteTreeViewNameURLCopyAction: TAction; |
| 500 |
FavoriteTreeViewLogDeleteAction: TAction; |
FavoriteTreeViewLogDeleteAction: TAction; |
| 501 |
OnlyAHundredRes: TAction; |
OnlyAHundredRes: TAction; |
| 502 |
ToolButton20: TToolButton; |
ToolButton20: TToolButton; |
| 503 |
AHundredResButton: TToolButton; |
AHundredResButton: TToolButton; |
| 504 |
N60: TMenuItem; |
N60: TMenuItem; |
| 505 |
procedure FormCreate(Sender: TObject); |
ExportFavoriteFileAction1: TMenuItem; |
| 506 |
|
ExportFavoriteFile: TFileSaveAs; |
| 507 |
|
ToolButton21: TToolButton; |
| 508 |
|
CabinetBBSToolButton: TToolButton; |
| 509 |
|
ToolButton23: TToolButton; |
| 510 |
|
ToolButton24: TToolButton; |
| 511 |
|
N6: TMenuItem; |
| 512 |
|
N17: TMenuItem; |
| 513 |
|
FavoriteTreeViewBrowseBoardAction: TAction; |
| 514 |
|
FavoriteTreeViewBrowseThreadAction: TAction; |
| 515 |
|
UpBoardAction: TAction; |
| 516 |
|
N18: TMenuItem; |
| 517 |
|
N20: TMenuItem; |
| 518 |
|
N24: TMenuItem; |
| 519 |
|
N62: TMenuItem; |
| 520 |
|
N61: TMenuItem; |
| 521 |
|
N63: TMenuItem; |
| 522 |
|
KoreCopy: TAction; |
| 523 |
|
N64: TMenuItem; |
| 524 |
|
dummy1: TMenuItem; |
| 525 |
|
Browser: TWebBrowser; |
| 526 |
|
TreeSelectLogDeletePopupMenu: TMenuItem; |
| 527 |
|
N65: TMenuItem; |
| 528 |
|
BBSSelectPopupMenu: TPopupMenu; |
| 529 |
|
PlugInMenu: TMenuItem; |
| 530 |
|
TmpToolBar: TToolBar; |
| 531 |
|
TreeSelectNameCopy: TAction; |
| 532 |
|
TreeSelectNamePupupMenu: TMenuItem; |
| 533 |
|
procedure FormCreate(Sender: TObject); |
| 534 |
procedure FormDestroy(Sender: TObject); |
procedure FormDestroy(Sender: TObject); |
| 535 |
procedure CabinetPanelHide(Sender: TObject); |
procedure CabinetPanelHide(Sender: TObject); |
| 536 |
procedure FormClose(Sender: TObject; var Action: TCloseAction); |
procedure FormClose(Sender: TObject; var Action: TCloseAction); |
|
procedure TreeViewChange(Sender: TObject; Node: TTreeNode); |
|
| 537 |
procedure ListViewData(Sender: TObject; Item: TListItem); |
procedure ListViewData(Sender: TObject; Item: TListItem); |
| 538 |
procedure ListViewDataFind(Sender: TObject; Find: TItemFind; |
procedure ListViewDataFind(Sender: TObject; Find: TItemFind; |
| 539 |
const FindString: String; const FindPosition: TPoint; |
const FindString: String; const FindPosition: TPoint; |
| 567 |
Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean); |
Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean); |
| 568 |
procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode); |
procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode); |
| 569 |
procedure TreeViewDblClick(Sender: TObject); |
procedure TreeViewDblClick(Sender: TObject); |
|
procedure FavoriteTreeViewClick(Sender: TObject); |
|
| 570 |
procedure ListViewCustomDraw(Sender: TCustomListView; |
procedure ListViewCustomDraw(Sender: TCustomListView; |
| 571 |
const ARect: TRect; var DefaultDraw: Boolean); |
const ARect: TRect; var DefaultDraw: Boolean); |
| 572 |
procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton; |
procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton; |
| 586 |
procedure OptionActionExecute(Sender: TObject); |
procedure OptionActionExecute(Sender: TObject); |
| 587 |
procedure GikoNaviWebPageActionExecute(Sender: TObject); |
procedure GikoNaviWebPageActionExecute(Sender: TObject); |
| 588 |
procedure AboutActionExecute(Sender: TObject); |
procedure AboutActionExecute(Sender: TObject); |
|
procedure Cabinet2chActionExecute(Sender: TObject); |
|
| 589 |
procedure CabinetHistoryActionExecute(Sender: TObject); |
procedure CabinetHistoryActionExecute(Sender: TObject); |
| 590 |
|
procedure CabinetVisible( isVisible : Boolean ); |
| 591 |
procedure CabinetVisibleActionExecute(Sender: TObject); |
procedure CabinetVisibleActionExecute(Sender: TObject); |
| 592 |
procedure AllItemActionExecute(Sender: TObject); |
procedure AllItemActionExecute(Sender: TObject); |
| 593 |
procedure LogItemActionExecute(Sender: TObject); |
procedure LogItemActionExecute(Sender: TObject); |
| 628 |
procedure ShowThreadActionUpdate(Sender: TObject); |
procedure ShowThreadActionUpdate(Sender: TObject); |
| 629 |
procedure ShowBoardActionUpdate(Sender: TObject); |
procedure ShowBoardActionUpdate(Sender: TObject); |
| 630 |
procedure SelectThreadReloadActionUpdate(Sender: TObject); |
procedure SelectThreadReloadActionUpdate(Sender: TObject); |
|
procedure ListViewSelectItem(Sender: TObject; Item: TListItem; |
|
|
Selected: Boolean); |
|
|
procedure SelectTimerTimer(Sender: TObject); |
|
| 631 |
procedure ItemReloadActionUpdate(Sender: TObject); |
procedure ItemReloadActionUpdate(Sender: TObject); |
| 632 |
procedure ListViewDblClick(Sender: TObject); |
procedure ListViewDblClick(Sender: TObject); |
| 633 |
procedure LogDeleteActionExecute(Sender: TObject); |
procedure LogDeleteActionExecute(Sender: TObject); |
| 763 |
procedure NG1Click(Sender: TObject); |
procedure NG1Click(Sender: TObject); |
| 764 |
procedure SelectResActionExecute(Sender: TObject); |
procedure SelectResActionExecute(Sender: TObject); |
| 765 |
procedure SelectResActionUpdate(Sender: TObject); |
procedure SelectResActionUpdate(Sender: TObject); |
|
procedure FormKeyDown(Sender: TObject; var Key: Word; |
|
|
Shift: TShiftState); |
|
| 766 |
procedure FormKeyUp(Sender: TObject; var Key: Word; |
procedure FormKeyUp(Sender: TObject; var Key: Word; |
| 767 |
Shift: TShiftState); |
Shift: TShiftState); |
| 768 |
procedure AllResActionExecute(Sender: TObject); |
procedure AllResActionExecute(Sender: TObject); |
| 784 |
procedure AntiIndividualAbonClick(Sender: TObject); |
procedure AntiIndividualAbonClick(Sender: TObject); |
| 785 |
procedure N51Click(Sender: TObject); |
procedure N51Click(Sender: TObject); |
| 786 |
procedure TreeSelectSearchBoardNameExecute(Sender: TObject); |
procedure TreeSelectSearchBoardNameExecute(Sender: TObject); |
| 787 |
procedure CabinetFavoriteActionExecute(Sender: TObject); |
procedure CabinetFavoriteActionExecute(Sender: TObject); |
| 788 |
procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X, |
procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X, |
| 789 |
Y: Integer); |
Y: Integer); |
| 790 |
procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); |
procedure FavoriteTreeViewDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); |
| 791 |
procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode; |
procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode; |
| 792 |
var S: String); |
var S: String); |
| 793 |
procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word; |
procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word; |
| 794 |
Shift: TShiftState); |
Shift: TShiftState); |
| 795 |
procedure FavoriteTreePopupMenuPopup(Sender: TObject); |
procedure FavoriteTreePopupMenuPopup(Sender: TObject); |
| 796 |
procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject); |
procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject); |
| 797 |
procedure FavoriteTreeViewRenameActionExecute(Sender: TObject); |
procedure FavoriteTreeViewRenameActionExecute(Sender: TObject); |
| 798 |
procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject); |
procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject); |
| 799 |
procedure ToolButton19Click(Sender: TObject); |
procedure ToolButton19Click(Sender: TObject); |
| 800 |
procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject); |
procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject); |
| 801 |
procedure FavoriteTreeViewChange(Sender: TObject; Node: TTreeNode); |
procedure FavoriteTreeViewDblClick(Sender: TObject); |
| 802 |
procedure FavoriteTreeViewDblClick(Sender: TObject); |
procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject); |
| 803 |
procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject); |
procedure FavoriteTreeViewReloadActionExecute(Sender: TObject); |
| 804 |
procedure FavoriteTreeViewReloadActionExecute(Sender: TObject); |
procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject); |
| 805 |
procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject); |
procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject); |
| 806 |
procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject); |
procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject); |
| 807 |
procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject); |
procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer); |
| 808 |
procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer); |
procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton; |
| 809 |
procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton; |
Shift: TShiftState; X, Y: Integer); |
| 810 |
Shift: TShiftState; X, Y: Integer); |
procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer; |
| 811 |
procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer; |
State: TDragState; var Accept: Boolean); |
| 812 |
State: TDragState; var Accept: Boolean); |
procedure OnlyAHundredResExecute(Sender: TObject); |
| 813 |
procedure OnlyAHundredResExecute(Sender: TObject); |
procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X, |
| 814 |
procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X, |
Y: Integer); |
| 815 |
Y: Integer); |
procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint; |
| 816 |
procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint; |
var Handled: Boolean); |
| 817 |
var Handled: Boolean); |
procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint; |
| 818 |
procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint; |
var Handled: Boolean); |
| 819 |
var Handled: Boolean); |
procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint; |
| 820 |
procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint; |
var Handled: Boolean); |
| 821 |
|
procedure ExportFavoriteFileAccept(Sender: TObject); |
| 822 |
|
procedure ExportFavoriteFileBeforeExecute(Sender: TObject); |
| 823 |
|
procedure CabinetBBSActionExecute(Sender: TObject); |
| 824 |
|
procedure FavoriteTreeViewBrowseThreadActionExecute(Sender: TObject); |
| 825 |
|
procedure FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject); |
| 826 |
|
procedure UpBoardActionExecute(Sender: TObject); |
| 827 |
|
procedure UpBoardActionUpdate(Sender: TObject); |
| 828 |
|
procedure BrowserTabContextPopup(Sender: TObject; MousePos: TPoint; |
| 829 |
var Handled: Boolean); |
var Handled: Boolean); |
| 830 |
|
procedure KoreCopyExecute(Sender: TObject); |
| 831 |
|
procedure BrowserTabPopupMenuPopup(Sender: TObject); |
| 832 |
|
procedure MenuToolBarResize(Sender: TObject); |
| 833 |
|
procedure StdToolBarResize(Sender: TObject); |
| 834 |
|
procedure LinkToolBarResize(Sender: TObject); |
| 835 |
|
procedure ListNameToolBarResize(Sender: TObject); |
| 836 |
|
procedure ListToolBarResize(Sender: TObject); |
| 837 |
|
procedure BrowserNameToolBarResize(Sender: TObject); |
| 838 |
|
procedure BrowserToolBarResize(Sender: TObject); |
| 839 |
|
procedure BrowserTabResize(Sender: TObject); |
| 840 |
|
procedure ListViewClick(Sender: TObject); |
| 841 |
|
procedure TreeViewClick(Sender: TObject); |
| 842 |
|
procedure TreeViewKeyDown(Sender: TObject; var Key: Word; |
| 843 |
|
Shift: TShiftState); |
| 844 |
|
procedure FavoriteTreeViewMouseDown(Sender: TObject; |
| 845 |
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
| 846 |
|
procedure MessagePanelResize(Sender: TObject); |
| 847 |
|
procedure OnResized; |
| 848 |
|
procedure TreeSelectNameCopyExecute(Sender: TObject); |
| 849 |
|
procedure FavoriteTreeViewMouseUp(Sender: TObject; |
| 850 |
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
| 851 |
private |
private |
| 852 |
{ Private 宣言 } |
{ Private 宣言 } |
| 853 |
|
//RoundList : TRoundList; |
| 854 |
FSortIndex: Integer; |
FSortIndex: Integer; |
| 855 |
FSortOrder: Boolean; |
FSortOrder: Boolean; |
| 856 |
|
|
| 872 |
FListStyle: TViewStyle; //リストアイコンスタイル |
FListStyle: TViewStyle; //リストアイコンスタイル |
| 873 |
FItemNoVisible: Boolean; //リスト番号表示フラグ |
FItemNoVisible: Boolean; //リスト番号表示フラグ |
| 874 |
FViewType: TGikoViewType; //リストアイテム表示タイプ |
FViewType: TGikoViewType; //リストアイテム表示タイプ |
| 875 |
FActiveList: TObject; |
FActiveList: TObject; |
| 876 |
FActiveContent: TThreadItem; // |
FActiveContent: TThreadItem; // |
| 877 |
|
FActiveBBS : TBBS; |
| 878 |
FHistoryList: TList; //ヒストリリスト |
FHistoryList: TList; //ヒストリリスト |
| 879 |
FTreeType: TGikoTreeType; |
FTreeType: TGikoTreeType; |
| 880 |
FWorkCount: Integer; |
FWorkCount: Integer; |
| 887 |
FDownloadMax: Integer; //ダウンロード中の最大サイズ |
FDownloadMax: Integer; //ダウンロード中の最大サイズ |
| 888 |
FEvent: THTMLDocumentEventSink;//ブラウザドキュメントイベント |
FEvent: THTMLDocumentEventSink;//ブラウザドキュメントイベント |
| 889 |
|
|
| 890 |
Fkeynum : Integer; //キーボードレスポップアップ用 |
// Fkeynum : Integer; //キーボードレスポップアップ用 |
| 891 |
|
|
| 892 |
IsDraggingSelectComboBox : Boolean; |
IsDraggingSelectComboBox : Boolean; |
| 893 |
DraggingSelectComboBoxPosition : TPoint; |
DraggingSelectComboBoxPosition : TPoint; |
| 894 |
|
|
| 895 |
FSearchDialog: TSearchDialog; |
FSearchDialog: TSearchDialog; |
| 896 |
|
|
| 897 |
FDropSpaceNode: TTreeNode; |
FDropSpaceNode: TTreeNode; |
|
|
|
|
|
|
|
FDragTime : Cardinal; //リンクのD&D用 |
|
|
FDragButton : TToolButton; //リンクのD&D用にDragしてるButton保存 |
|
|
FDragWFirst : Boolean; //WebTabのD&D用 |
|
| 898 |
|
|
| 899 |
procedure SetBoardTreeNode; |
FDragTime : Cardinal; //リンクのD&D用 |
| 900 |
function SetCategoryListItem(ABBS2ch: TBBS2ch): Integer; |
FDragButton : TToolButton; //リンクのD&D用にDragしてるButton保存 |
| 901 |
|
FDragWFirst : Boolean; //WebTabのD&D用 |
| 902 |
|
|
| 903 |
|
FListViewBackGroundColor : TColor; //ListViewのBackGroundColor |
| 904 |
|
FUseOddResOddColor : Boolean; //取得レス数とスレッドのレス数が違ったときに他の色で表示 |
| 905 |
|
FOddColor : TColor; //その色 |
| 906 |
|
|
| 907 |
|
FSelectResWord : string; // レス絞込ワード |
| 908 |
|
FIsIgnoreResize : Boolean; // リサイズイベントを無視するかどうか |
| 909 |
|
FIsMinimize : TMinimizeType; // 最小化している最中か |
| 910 |
|
FOldFormWidth : Integer; // 直前のウィンドウの幅 |
| 911 |
|
FToolBarSettingSender : TToolBarSettingSenderType; // ツールバー設定をクリックしたクールバー |
| 912 |
|
FMouseDownPos : TPoint; // ブラウザタブでマウスを押したときの座標 |
| 913 |
|
procedure SetBoardTreeNode( inBBS : TBBS ); |
| 914 |
|
function SetCategoryListItem(ABBS2ch: TBBS): Integer; |
| 915 |
function SetBoardListItem(Category: TCategory): Integer; |
function SetBoardListItem(Category: TCategory): Integer; |
| 916 |
function SetThreadListItem(Board: TBoard): Integer; |
function SetThreadListItem(Board: TBoard): Integer; |
| 917 |
// function GetRoundName(index: integer): string; |
// function GetRoundName(index: integer): string; |
| 918 |
|
|
| 919 |
procedure DownloadEnd(Sender: TObject; Item: TDownloadItem); |
procedure DownloadEnd(Sender: TObject; Item: TDownloadItem); |
| 920 |
procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon); |
procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon); |
| 921 |
procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer); |
procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string); |
| 922 |
procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer); |
procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer); |
| 923 |
procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer); |
procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer); |
| 924 |
|
|
| 931 |
procedure DeleteTab(ThreadItem: TThreadItem); |
procedure DeleteTab(ThreadItem: TThreadItem); |
| 932 |
function Hook(var Message: TMessage): Boolean; |
function Hook(var Message: TMessage): Boolean; |
| 933 |
procedure AddRoundNameMenu(MenuItem: TMenuItem); |
procedure AddRoundNameMenu(MenuItem: TMenuItem); |
| 934 |
procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); |
procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload; |
| 935 |
|
procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload; |
| 936 |
procedure SetSelectRoundName(Sender: TObject); |
procedure SetSelectRoundName(Sender: TObject); |
| 937 |
function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand; |
function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand; |
| 938 |
|
|
| 941 |
procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem); |
procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem); |
| 942 |
procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload; |
procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload; |
| 943 |
procedure FavoriteClick(Sender: TObject); overload; |
procedure FavoriteClick(Sender: TObject); overload; |
| 944 |
procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); |
procedure FavoriteDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); |
| 945 |
procedure SelectTreeNode(Item: TObject; CallEvent: Boolean); |
procedure SelectTreeNode(Item: TObject; CallEvent: Boolean); |
| 946 |
function OnDocumentContextMenu(Sender: TObject): WordBool; |
function OnDocumentContextMenu(Sender: TObject): WordBool; |
| 947 |
// function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string; |
// function GetThreadText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean): string; |
| 948 |
procedure SetResPopupText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean); |
procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean); |
| 949 |
procedure ShowTextPopup; |
procedure ShowTextPopup; |
| 950 |
//procedure ShowTextPopup(HintData: THintData); |
//procedure ShowTextPopup(HintData: THintData); |
| 951 |
// procedure SetStdToolBar; |
// procedure SetStdToolBar; |
| 952 |
// function GetAction(ActionName: string): TContainedAction; |
// function GetAction(ActionName: string): TContainedAction; |
| 953 |
procedure SetLinkBar; |
procedure SetLinkBar; |
| 954 |
|
procedure ClearLinkBar; |
| 955 |
function GetWidthAllToolButton(ToolBar: TToolBar): Integer; |
function GetWidthAllToolButton(ToolBar: TToolBar): Integer; |
| 956 |
procedure MenuBarChevronMenu; |
procedure MenuBarChevronMenu; |
| 957 |
procedure LinkBarChevronMenu; |
procedure LinkBarChevronMenu; |
| 958 |
procedure ToolBarChevronMenu(ToolBar: TToolBar); |
procedure ToolBarChevronMenu(ToolBar: TToolBar); |
| 959 |
procedure ModifySelectList; |
procedure ModifySelectList; |
| 960 |
procedure FavoriteBrowseFolder( node: TTreeNode ); |
procedure FavoriteBrowseFolder( node: TTreeNode ); |
| 961 |
procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer); |
procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer); |
| 962 |
procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
| 963 |
procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); |
procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); |
| 964 |
procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
| 965 |
procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject); |
procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject); |
| 966 |
function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode; |
function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode; |
| 967 |
procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode ); |
procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode ); |
| 968 |
procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject ); |
procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject ); |
| 969 |
procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject ); |
procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject ); |
| 970 |
// |
// |
| 971 |
procedure BrowserTabClick(Sender: TObject); |
procedure BrowserTabClick(Sender: TObject); |
| 972 |
|
procedure SetListViewBackGroundColor(value: TColor); |
| 973 |
|
procedure BBSMenuItemOnClick( Sender : TObject ); |
| 974 |
|
// |
| 975 |
|
procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean); |
| 976 |
|
// CoolBar の設定を変数に保存 |
| 977 |
|
procedure SaveCoolBarSettings; |
| 978 |
|
// CoolBar の設定を変数から復元 |
| 979 |
|
procedure LoadCoolBarSettings; |
| 980 |
|
// 最小化される |
| 981 |
|
procedure OnMinimize; |
| 982 |
|
// 最小化された |
| 983 |
|
procedure OnMinimized; |
| 984 |
|
// CoolBar がサイズ変更された |
| 985 |
|
procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar); |
| 986 |
|
// TreeView がクリックされた |
| 987 |
|
procedure TreeClick( Node : TTreeNode ); |
| 988 |
|
// TreeView がダブルクリックされた |
| 989 |
|
procedure TreeDoubleClick( Node : TTreeNode ); |
| 990 |
|
// ギコナビのメッセージループを横取りします |
| 991 |
|
procedure HandleAppMessage(var Msg: TMsg; var Handled: Boolean); |
| 992 |
|
// ブラウザのキーダウンイベント |
| 993 |
|
// イベントを取り扱った場合は True を返す |
| 994 |
|
function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean; |
| 995 |
|
|
| 996 |
protected |
protected |
| 997 |
procedure CreateParams(var Params: TCreateParams); override; |
procedure CreateParams(var Params: TCreateParams); override; |
| 998 |
procedure WndProc(var Message: TMessage); override; |
procedure WndProc(var Message: TMessage); override; |
| 999 |
procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR; |
procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR; |
| 1000 |
procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE; |
procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE; |
| 1001 |
procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA; |
procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA; |
| 1002 |
|
|
| 1003 |
public |
public |
| 1004 |
{ Public 宣言 } |
{ Public 宣言 } |
| 1005 |
// FDownload: TDownload; |
// FDownload: TDownload; |
| 1034 |
procedure DownloadList(Board: TBoard); |
procedure DownloadList(Board: TBoard); |
| 1035 |
procedure PlaySound(SoundEventName: string); |
procedure PlaySound(SoundEventName: string); |
| 1036 |
|
|
| 1037 |
function AddHistory(ThreadItem: TThreadItem): Boolean; |
function AddHistory( FavItem: TFavoriteThreadItem ): Boolean; |
| 1038 |
procedure DeleteHistory(ThreadItem: TThreadItem); |
procedure DeleteHistory( threadItem: TThreadItem ); |
| 1039 |
procedure ClearHistory; |
procedure ClearHistory; |
| 1040 |
procedure Show2chTree; |
procedure SaveHistory; |
| 1041 |
|
procedure LoadHistory; |
| 1042 |
|
procedure ShowBBSTree( inBBS : TBBS ); |
| 1043 |
|
procedure ShowBBSTreeOld( inBBS : TBBS ); |
| 1044 |
procedure ShowHistoryTree; |
procedure ShowHistoryTree; |
| 1045 |
procedure SetHistoryTreeNode; |
procedure SetHistoryTreeNode; |
| 1046 |
// procedure SelectTreeNode(Item: TObject); |
// procedure SelectTreeNode(Item: TObject); |
| 1048 |
procedure SetBrowserTabState; |
procedure SetBrowserTabState; |
| 1049 |
// property Favorite: TFavorite read FFavorite write FFavorite; |
// property Favorite: TFavorite read FFavorite write FFavorite; |
| 1050 |
procedure SetToolBarPopup; |
procedure SetToolBarPopup; |
| 1051 |
procedure ShowFavoriteAddDialog( Item : TObject ); |
procedure ShowFavoriteAddDialog( Item : TObject ); |
| 1052 |
|
procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList); |
| 1053 |
|
procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList); |
| 1054 |
|
property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor; |
| 1055 |
|
property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor; |
| 1056 |
|
property OddColor : TColor read FOddColor write FOddColor; |
| 1057 |
|
|
| 1058 |
|
function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton; |
| 1059 |
|
procedure OnPlugInMenuItem( Sender : TObject ); |
| 1060 |
|
|
| 1061 |
published |
published |
| 1062 |
property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton; |
property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton; |
| 1063 |
end; |
end; |
| 1069 |
property Data: Pointer read FData write FData; |
property Data: Pointer read FData write FData; |
| 1070 |
end; |
end; |
| 1071 |
|
|
| 1072 |
|
TBBSMenuItem = class(TMenuItem) |
| 1073 |
|
private |
| 1074 |
|
FData : Pointer; |
| 1075 |
|
public |
| 1076 |
|
property Data: Pointer read FData write FData; |
| 1077 |
|
end; |
| 1078 |
|
|
| 1079 |
TLinkToolButton = class(TToolButton) |
TLinkToolButton = class(TToolButton) |
| 1080 |
private |
private |
| 1081 |
FData : Pointer; |
FData : Pointer; |
| 1090 |
|
|
| 1091 |
uses |
uses |
| 1092 |
About, Option, Round, Splash, Sort, ListSelect, |
About, Option, Round, Splash, Sort, ListSelect, |
| 1093 |
NewBoard; |
NewBoard, MojuUtils,Clipbrd; |
| 1094 |
|
|
| 1095 |
const |
const |
| 1096 |
CAPTION_NAME: string = 'ギコナビ'; |
CAPTION_NAME: string = 'ギコナビ'; |
| 1097 |
BLANK_HTML: string = 'about:blank'; |
BLANK_HTML: string = 'about:blank'; |
| 1098 |
SELECTCOMBOBOX_NAME: string = ''; // 'スレッド絞込検索'; |
SELECTCOMBOBOX_NAME: string = ''; // 'スレッド絞込検索'; |
| 1099 |
SELECTCOMBOBOX_COLOR: TColor = clWindow; |
SELECTCOMBOBOX_COLOR: TColor = clWindow; |
| 1100 |
//D&D閾値 |
//D&D閾値 |
| 1101 |
DandD_THRESHOLD = 5; //D&Dの閾値(pixcel) |
DandD_THRESHOLD = 5; //D&Dの閾値(pixcel) |
| 1102 |
//ツリー・リストアイコン |
//ツリー・リストアイコン |
| 1103 |
ITEM_ICON_2CH1 = 0; //2chアイコン |
ITEM_ICON_2CH1 = 0; //2chアイコン |
| 1104 |
ITEM_ICON_2CH2 = 1; //2chアイコン |
ITEM_ICON_2CH2 = 1; //2chアイコン |
| 1105 |
ITEM_ICON_CATEGORY1 = 2; //カテゴリアイコン |
ITEM_ICON_CATEGORY1 = 2; //カテゴリアイコン |
| 1106 |
ITEM_ICON_CATEGORY2 = 3; //カテゴリアイコン |
ITEM_ICON_CATEGORY2 = 3; //カテゴリアイコン |
| 1107 |
|
ITEM_ICON_BOARD_NOSUBJECT = 3; //読み込まれていない板アイコン |
| 1108 |
ITEM_ICON_BOARD1 = 4; //板アイコン |
ITEM_ICON_BOARD1 = 4; //板アイコン |
| 1109 |
ITEM_ICON_BOARD2 = 5; //板アイコン |
ITEM_ICON_BOARD2 = 5; //板アイコン |
| 1110 |
ITEM_ICON_THREADLOG1 = 6; //スレアイコン(ログあり) |
ITEM_ICON_THREADLOG1 = 6; //スレアイコン(ログあり) |
| 1115 |
ITEM_ICON_THREADNEW2 = 11; //スレアイコン(新着) |
ITEM_ICON_THREADNEW2 = 11; //スレアイコン(新着) |
| 1116 |
ITEM_ICON_SORT1 = 12; //ソートアイコン |
ITEM_ICON_SORT1 = 12; //ソートアイコン |
| 1117 |
ITEM_ICON_SORT2 = 13; //ソートアイコン |
ITEM_ICON_SORT2 = 13; //ソートアイコン |
| 1118 |
|
ITEM_ICON_BOARD_LOG = 17; //スレログあり板アイコン |
| 1119 |
|
ITEM_ICON_BOARD_NEW = 18; //スレ新着板アイコン |
| 1120 |
|
|
| 1121 |
//ツールバーアイコン |
//ツールバーアイコン |
| 1122 |
TOOL_ICON_HEIGHT_MAX = 16; //高さ最大アイコン |
TOOL_ICON_HEIGHT_MAX = 16; //高さ最大アイコン |
| 1127 |
TOOL_ICON_WIDTH_NORMAL = 21; //幅標準アイコン |
TOOL_ICON_WIDTH_NORMAL = 21; //幅標準アイコン |
| 1128 |
|
|
| 1129 |
TOOL_ICON_FAV_FOLDER = 30; //お気に入りフォルダアイコン |
TOOL_ICON_FAV_FOLDER = 30; //お気に入りフォルダアイコン |
| 1130 |
TOOL_ICON_FAV_BOARD = 31; //お気に入り板アイコン |
TOOL_ICON_FAV_BOARD = 31; //お気に入り板アイコン |
| 1131 |
TOOL_ICON_FAV_THREAD = 32; //お気に入りスレアイコン |
TOOL_ICON_FAV_THREAD = 32; //お気に入りスレアイコン |
| 1132 |
|
|
| 1133 |
HTML_FILE_NAME = 'temp_preview.html'; |
HTML_FILE_NAME = 'temp_preview.html'; |
| 1134 |
|
|
| 1135 |
|
WM_XBUTTONDOWN = $020B; |
| 1136 |
|
WM_XBUTTONUP = $020C; |
| 1137 |
|
WM_XBUTTONDBLCLK = $020D; |
| 1138 |
|
XBUTTON1 = $0001; |
| 1139 |
|
XBUTTON2 = $0002; |
| 1140 |
|
USER_TREECLICK = WM_USER + 2000; |
| 1141 |
|
USER_RESIZED = WM_USER + 2001; |
| 1142 |
|
USER_MINIMIZED = WM_USER + 2002; |
| 1143 |
|
USER_SETLINKBAR = WM_USER + 2003; |
| 1144 |
|
|
| 1145 |
{$R *.DFM} |
{$R *.DFM} |
| 1146 |
|
|
| 1147 |
procedure TGikoForm.CreateParams(var Params: TCreateParams); |
procedure TGikoForm.CreateParams(var Params: TCreateParams); |
| 1165 |
i: Integer; |
i: Integer; |
| 1166 |
wp: TWindowPlacement; |
wp: TWindowPlacement; |
| 1167 |
s: string; |
s: string; |
| 1168 |
|
item : TBBSMenuItem; |
| 1169 |
begin |
begin |
| 1170 |
{$IFDEF DEBUG} |
{$IFDEF DEBUG} |
| 1171 |
AllocConsole; |
AllocConsole; |
| 1179 |
Application.OnDeactivate := AppFormDeactivate; |
Application.OnDeactivate := AppFormDeactivate; |
| 1180 |
Self.OnDeactivate := AppFormDeactivate; |
Self.OnDeactivate := AppFormDeactivate; |
| 1181 |
Application.HookMainWindow(Hook); |
Application.HookMainWindow(Hook); |
| 1182 |
|
Application.OnMessage := HandleAppMessage; |
| 1183 |
|
|
| 1184 |
FTreeType := gttNone; |
FTreeType := gttNone; |
| 1185 |
|
|
| 1186 |
FSearchDialog := nil; |
FSearchDialog := nil; |
| 1187 |
|
|
| 1188 |
|
// 起動時に保存されてしまう対策 |
| 1189 |
|
FIsIgnoreResize := True; |
| 1190 |
|
|
| 1191 |
//手のカーソル |
//手のカーソル |
| 1192 |
Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND'); |
Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND'); |
| 1193 |
|
|
| 1194 |
|
|
| 1195 |
|
//アドレス履歴読み込み |
| 1196 |
|
AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount); |
| 1197 |
|
|
| 1198 |
|
// 外部板プラグインをロード(ReadBoardFile, LoadHistory より先に行うこと) |
| 1199 |
|
InitializeBoardPlugIns; |
| 1200 |
|
|
| 1201 |
|
EnabledCloseButton := True; |
| 1202 |
|
|
| 1203 |
|
|
| 1204 |
//巡回データ読み込み |
//巡回データ読み込み |
| 1205 |
RoundList := TRoundList.Create; |
RoundList := TRoundList.Create; |
| 1206 |
RoundList.LoadRoundFile; |
RoundList.LoadRoundBoardFile; |
| 1207 |
|
|
| 1208 |
|
// ボードファイル列挙(ReadFavorite より先に行うこと) |
| 1209 |
|
GikoSys.ListBoardFile; |
| 1210 |
|
|
| 1211 |
|
RoundList.LoadRoundThreadFile; |
| 1212 |
|
|
| 1213 |
|
if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then |
| 1214 |
|
GikoSys.ListBoardFile; |
| 1215 |
|
|
| 1216 |
|
// メニューに追加 |
| 1217 |
|
for i := Length( BBSs ) - 1 downto 0 do begin |
| 1218 |
|
try |
| 1219 |
|
item := TBBSMenuItem.Create( PopupMenu ); |
| 1220 |
|
item.Caption := BBSs[ i ].Title; |
| 1221 |
|
item.Data := BBSs[ i ]; |
| 1222 |
|
item.OnClick := BBSMenuItemOnClick; |
| 1223 |
|
CabinetSelectPopupMenu.Items.Insert( 0, item ); |
| 1224 |
|
item := TBBSMenuItem.Create( PopupMenu ); |
| 1225 |
|
item.Caption := BBSs[ i ].Title; |
| 1226 |
|
item.Data := BBSs[ i ]; |
| 1227 |
|
item.OnClick := BBSMenuItemOnClick; |
| 1228 |
|
CabinetMenu.Insert( 0, item ); |
| 1229 |
|
item := TBBSMenuItem.Create( PopupMenu ); |
| 1230 |
|
item.Caption := BBSs[ i ].Title; |
| 1231 |
|
item.Data := BBSs[ i ]; |
| 1232 |
|
item.OnClick := BBSMenuItemOnClick; |
| 1233 |
|
BBSSelectPopupMenu.Items.Insert( 0, Item ); |
| 1234 |
|
except |
| 1235 |
|
end; |
| 1236 |
|
end; |
| 1237 |
|
|
| 1238 |
|
|
| 1239 |
//BBS作成 |
// ヒストリリスト(LoadHistory よりも先に行うこと) |
| 1240 |
BBS2ch := TBBS2ch.Create(GikoSys.Setting.LogFolder); |
FHistoryList := TList.Create; |
| 1241 |
|
|
| 1242 |
|
// 履歴読み込み |
| 1243 |
|
LoadHistory; |
| 1244 |
|
|
| 1245 |
//お気に入り読み込み |
//お気に入り読み込み |
| 1246 |
// FFavorite := TFavorite.Create(FavoriteTreeView); |
// FFavorite := TFavorite.Create(FavoriteTreeView); |
| 1247 |
FavoriteDM.SetFavTreeView(FavoriteTreeView); |
FavoriteDM.SetFavTreeView(FavoriteTreeView); |
| 1248 |
FavoriteDM.ReadFavorite; |
FavoriteDM.ReadFavorite; |
| 1249 |
|
|
|
//アドレス履歴読み込み |
|
|
AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount); |
|
|
|
|
|
EnabledCloseButton := True; |
|
|
BoardGroup.BBS2ch.ReadBoardFile; //ボードファイル読込 |
|
|
// SetBoardTreeNode; //ツリーにボード追加 |
|
|
|
|
| 1250 |
//リストスタイル |
//リストスタイル |
| 1251 |
ListView.ViewStyle := GikoSys.Setting.ListStyle; |
ListView.ViewStyle := GikoSys.Setting.ListStyle; |
| 1252 |
|
|
| 1261 |
//各種可視状態など設定 |
//各種可視状態など設定 |
| 1262 |
|
|
| 1263 |
//キャビネット |
//キャビネット |
|
CabinetVisibleAction.Checked := not GikoSys.Setting.CabinetVisible; |
|
|
CabinetVisibleAction.Execute; |
|
| 1264 |
CabinetPanel.Width := GikoSys.Setting.CabinetWidth; |
CabinetPanel.Width := GikoSys.Setting.CabinetWidth; |
| 1265 |
|
|
| 1266 |
//メッセージバー |
//メッセージバー |
| 1274 |
|
|
| 1275 |
//フォント・色設定 |
//フォント・色設定 |
| 1276 |
TreeView.Items.BeginUpdate; |
TreeView.Items.BeginUpdate; |
| 1277 |
FavoriteTreeView.Items.BeginUpdate; |
FavoriteTreeView.Items.BeginUpdate; |
| 1278 |
ListView.Items.BeginUpdate; |
ListView.Items.BeginUpdate; |
| 1279 |
try |
try |
| 1280 |
TreeView.Font.Name := GikoSys.Setting.CabinetFontName; |
TreeView.Font.Name := GikoSys.Setting.CabinetFontName; |
| 1290 |
ListView.Font.Name := GikoSys.Setting.ListFontName; |
ListView.Font.Name := GikoSys.Setting.ListFontName; |
| 1291 |
ListView.Font.Size := GikoSys.Setting.ListFontSize; |
ListView.Font.Size := GikoSys.Setting.ListFontSize; |
| 1292 |
ListView.Font.Color := GikoSys.Setting.ListFontColor; |
ListView.Font.Color := GikoSys.Setting.ListFontColor; |
| 1293 |
ListView.Color := GikoSys.Setting.ListBackColor; |
//ListView.Color := GikoSys.Setting.ListBackColor; |
| 1294 |
|
ListViewBackGroundColor := GikoSys.Setting.ListBackColor; |
| 1295 |
|
FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum; |
| 1296 |
|
FOddColor := GikoSys.Setting.OddColor; |
| 1297 |
|
|
| 1298 |
finally |
finally |
| 1299 |
TreeView.Items.EndUpdate; |
TreeView.Items.EndUpdate; |
| 1300 |
FavoriteTreeView.Items.EndUpdate; |
FavoriteTreeView.Items.EndUpdate; |
| 1301 |
ListView.Items.EndUpdate; |
ListView.Items.EndUpdate; |
| 1302 |
end; |
end; |
| 1303 |
//ViewNoButton.Down := GikoSys.Setting.ListViewNo; |
//ViewNoButton.Down := GikoSys.Setting.ListViewNo; |
| 1306 |
//ブラウザタブフォント |
//ブラウザタブフォント |
| 1307 |
BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName; |
BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName; |
| 1308 |
BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize; |
BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize; |
| 1309 |
FDragWFirst := false; |
FDragWFirst := false; |
| 1310 |
|
|
| 1311 |
// TreeView.TopItem.Expanded := True; //ツリートップ項目だけを開く |
// TreeView.TopItem.Expanded := True; //ツリートップ項目だけを開く |
| 1312 |
// TreeView.Selected := TreeView.Items[0]; //ツリーのトップ項目を選択する |
// TreeView.Selected := TreeView.Items[0]; //ツリーのトップ項目を選択する |
| 1324 |
// SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop, |
// SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop, |
| 1325 |
// GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight); |
// GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight); |
| 1326 |
if GikoSys.Setting.WindowMax then |
if GikoSys.Setting.WindowMax then |
| 1327 |
WindowState := wsMaximized; |
WindowState := wsMaximized; |
| 1328 |
|
|
| 1329 |
//ギコアニメ |
//ギコアニメ |
| 1330 |
try |
try |
| 1333 |
Animate.FileName := FileName; |
Animate.FileName := FileName; |
| 1334 |
except |
except |
| 1335 |
end; |
end; |
|
// AnimePanel.Height := 26; |
|
|
// AnimePanel.Width := 39; |
|
|
// AnimePanel.Top := 2; |
|
|
// AnimePanel.Left := Width - 48; |
|
| 1336 |
|
|
| 1337 |
//クッキー |
//クッキー |
| 1338 |
FNameCookie := ''; |
FNameCookie := ''; |
| 1340 |
|
|
| 1341 |
//スレ全部表示ボタンを押された状態にする |
//スレ全部表示ボタンを押された状態にする |
| 1342 |
AllItemAction.Checked := True; |
AllItemAction.Checked := True; |
| 1343 |
AllResAction.Checked := True; |
AllResAction.Checked := True; |
| 1344 |
|
|
| 1345 |
//TreeViewの邪魔臭いToolTipを非表示 |
//TreeViewの邪魔臭いToolTipを非表示 |
| 1346 |
Style := GetWindowLong(TreeView.Handle, GWL_STYLE); |
Style := GetWindowLong(TreeView.Handle, GWL_STYLE); |
| 1380 |
BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN; |
BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN; |
| 1381 |
end; |
end; |
| 1382 |
end; |
end; |
|
// if GikoSys.Setting.ListWidthMax then begin |
|
|
// ViewPanel.Width := 1; |
|
|
// BrowserSizeAction.ImageIndex := ICON_WIDTH_MIN; |
|
|
// end else begin |
|
|
// ViewPanel.Width := GikoSys.Setting.ListWidth; |
|
|
// BrowserSizeAction.ImageIndex := ICON_WIDTH_MAX; |
|
|
// end; |
|
| 1383 |
end else begin |
end else begin |
| 1384 |
case GikoSys.Setting.ListHeightState of |
case GikoSys.Setting.ListHeightState of |
| 1385 |
glsMax: begin |
glsMax: begin |
| 1398 |
BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN; |
BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN; |
| 1399 |
end; |
end; |
| 1400 |
end; |
end; |
|
// if GikoSys.Setting.ListHeightState = glsMax then begin |
|
|
// end else begin |
|
|
// ViewPanel.Height := GikoSys.Setting.ListHeight; |
|
|
// BrowserSizeAction.ImageIndex := ICON_HEIGHT_MAX; |
|
|
// end; |
|
| 1401 |
end; |
end; |
| 1402 |
|
|
| 1403 |
//プログレスバーの初期化 |
//プログレスバーの初期化 |
| 1409 |
ProgressBar.Height := StatusBar.Height - 2; |
ProgressBar.Height := StatusBar.Height - 2; |
| 1410 |
ProgressBar.Position := 0; |
ProgressBar.Position := 0; |
| 1411 |
|
|
|
//ツールバー表示 |
|
|
//formshow()に移動 |
|
|
|
|
|
//ダウンロードオブジェクト |
|
|
// FDownload := TDownload.Create; |
|
|
// FDownload.OnDownloadEnd := OnDonloadEnd; |
|
|
// FDownload.OnWork := Work; |
|
|
// FDownload.OnWorkBegin := WorkBegin; |
|
|
// FDownload.OnWorkEnd := WorkEnd; |
|
|
|
|
| 1412 |
//ダウンロードオブジェクト |
//ダウンロードオブジェクト |
| 1413 |
FControlThread := TThreadControl.Create(True); |
FControlThread := TThreadControl.Create(True); |
| 1414 |
FControlThread.MaxThreadCount := 1; |
FControlThread.MaxThreadCount := 1; |
| 1420 |
FControlThread.OnWorkEnd := WorkEnd; |
FControlThread.OnWorkEnd := WorkEnd; |
| 1421 |
// ProgressPanel.Width := FControlThread.MaxThreadCount * 12; |
// ProgressPanel.Width := FControlThread.MaxThreadCount * 12; |
| 1422 |
|
|
|
//ヒストリリスト |
|
|
FHistoryList := TList.Create; |
|
|
|
|
| 1423 |
// 絞込検索履歴 |
// 絞込検索履歴 |
| 1424 |
SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList ); |
SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList ); |
| 1425 |
|
|
| 1430 |
BrowserNameLabel.Caption := ''; |
BrowserNameLabel.Caption := ''; |
| 1431 |
FWorkCount := 0; |
FWorkCount := 0; |
| 1432 |
|
|
|
// DetailIconAction.Execute; |
|
|
|
|
|
// FBrowserSizeHeight := ViewPanel.Height; |
|
| 1433 |
FTabHintIndex := -1; |
FTabHintIndex := -1; |
| 1434 |
|
|
|
//ログフォルダが存在しない場合は作成する |
|
|
// if not GikoSys.DirectoryExistsEx(BBS2ch.GetLogFolder) then begin |
|
|
// GikoSys.ForceDirectoriesEx(BBS2ch.GetLogFolder); |
|
|
// end; |
|
|
// FormResize(Sender); |
|
|
// MainCoolBarResize(Sender); |
|
|
// Application.ProcessMessages; |
|
|
|
|
| 1435 |
//リンクバー |
//リンクバー |
| 1436 |
SetLinkBar; |
SetLinkBar; |
| 1437 |
|
|
| 1442 |
ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable; |
ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable; |
| 1443 |
BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable; |
BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable; |
| 1444 |
|
|
| 1445 |
|
KeepDefaultToolButton(StdToolBar, TmpToolBar); |
| 1446 |
|
KeepDefaultToolButton(ListToolBar, TmpToolBar); |
| 1447 |
|
KeepDefaultToolButton(BrowserToolBar, TmpToolBar); |
| 1448 |
|
|
| 1449 |
|
MakeDefaultINIFile(); |
| 1450 |
//ツールボタン読み込み |
//ツールボタン読み込み |
| 1451 |
ReadToolBarSetting(ActionList, StdToolBar); |
ReadToolBarSetting(ActionList, StdToolBar); |
| 1452 |
ReadToolBarSetting(ActionList, ListToolBar); |
ReadToolBarSetting(ActionList, ListToolBar); |
| 1464 |
// スレッド絞込ボタンを隠す |
// スレッド絞込ボタンを隠す |
| 1465 |
ListToolBar.Controls[ i ].Visible := False; |
ListToolBar.Controls[ i ].Visible := False; |
| 1466 |
// スレッド絞込フィールドを挿入 |
// スレッド絞込フィールドを挿入 |
| 1467 |
|
SelectComboBox.Parent := ListToolBar; |
| 1468 |
SelectComboBox.Left := ListToolBar.Controls[ i ].Left; |
SelectComboBox.Left := ListToolBar.Controls[ i ].Left; |
| 1469 |
SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth; |
SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth; |
|
SelectComboBox.Parent := ListToolBar; |
|
| 1470 |
// スレッド絞込用独自セパレータを挿入 |
// スレッド絞込用独自セパレータを挿入 |
|
SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width; |
|
| 1471 |
SelectComboBoxSplitter.Parent := ListToolBar; |
SelectComboBoxSplitter.Parent := ListToolBar; |
| 1472 |
|
SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width; |
| 1473 |
|
|
| 1474 |
break; |
break; |
| 1475 |
end; |
end; |
| 1478 |
end; |
end; |
| 1479 |
ReadToolBarSetting(ActionList, BrowserToolBar); |
ReadToolBarSetting(ActionList, BrowserToolBar); |
| 1480 |
SetToolBarPopup; |
SetToolBarPopup; |
| 1481 |
OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes; |
OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes; |
| 1482 |
//アドレスバー |
//アドレスバー |
| 1483 |
AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop; |
AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop; |
| 1484 |
|
|
| 1502 |
//ResHint |
//ResHint |
| 1503 |
FHint := TResPopup.Create(Self); |
FHint := TResPopup.Create(Self); |
| 1504 |
|
|
| 1505 |
// 2ちゃんねるキャビネットの状態復元(未実装) |
// 最後に選択されたキャビネットの復元 |
| 1506 |
// およびスレ一覧ペインの状態復元(未実装、現在は初期表示用) |
CabinetVisible( False ); |
| 1507 |
i := GikoSys.Setting.CabinetIndex; |
if GikoSys.Setting.CabinetVisible then begin |
| 1508 |
Cabinet2chAction.Execute; |
i := CabinetSelectPopupMenu.Items.Count - 1; |
| 1509 |
GikoSys.Setting.CabinetIndex := i; |
if GikoSys.Setting.CabinetIndex = i - 1 then |
| 1510 |
|
CabinetHistoryAction.Execute |
| 1511 |
// 最後に選択されたキャビネットの復元 |
else if GikoSys.Setting.CabinetIndex = i then |
| 1512 |
Case GikoSys.Setting.CabinetIndex of |
CabinetFavoriteAction.Execute |
| 1513 |
0: Cabinet2chAction.Execute; |
else begin |
| 1514 |
1: CabinetHistoryAction.Execute; |
if GikoSys.Setting.CabinetIndex < Length( BBSs ) then |
| 1515 |
2: CabinetFavoriteAction.Execute; |
ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] ); |
| 1516 |
end; |
// 起動時に保存されてしまう対策 2 |
| 1517 |
|
FIsIgnoreResize := True; |
| 1518 |
|
CabinetBBSAction.Execute; |
| 1519 |
|
end; |
| 1520 |
|
end else begin |
| 1521 |
|
ShowBBSTreeOld( BBSs[ 0 ] ); |
| 1522 |
|
PostMessage( Handle, USER_TREECLICK, 0, 0 ); |
| 1523 |
|
end; |
| 1524 |
|
|
| 1525 |
|
// 起動時に保存されてしまう対策 3 |
| 1526 |
|
FIsIgnoreResize := True; |
| 1527 |
|
|
| 1528 |
//オートログイン |
//オートログイン |
| 1529 |
if GikoSys.Setting.AutoLogin then |
if GikoSys.Setting.AutoLogin then |
| 1540 |
StatusBar.Panels[2].Text := s; |
StatusBar.Panels[2].Text := s; |
| 1541 |
StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100); |
StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100); |
| 1542 |
StatusBarResize(Sender); |
StatusBarResize(Sender); |
| 1543 |
|
|
| 1544 |
|
dummy1.Caption := ItemReservPMenu.Caption; |
| 1545 |
|
dummy1.Hint := ItemReservPMenu.Hint; |
| 1546 |
|
|
| 1547 |
|
//Samba24のファイルチェック |
| 1548 |
|
GikoSys.SambaFileExists(); |
| 1549 |
|
end; |
| 1550 |
|
|
| 1551 |
|
// CoolBar の設定を変数に保存 |
| 1552 |
|
procedure TGikoForm.SaveCoolBarSettings; |
| 1553 |
|
var |
| 1554 |
|
i : Integer; |
| 1555 |
|
CoolSet : TCoolSet; |
| 1556 |
|
begin |
| 1557 |
|
|
| 1558 |
|
if IsIconic( Handle ) or FIsIgnoreResize then |
| 1559 |
|
Exit; |
| 1560 |
|
|
| 1561 |
|
//クールバー保存(Main) |
| 1562 |
|
for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin |
| 1563 |
|
CoolSet.FCoolID := MainCoolBar.Bands[i].ID; |
| 1564 |
|
CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width; |
| 1565 |
|
CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break; |
| 1566 |
|
GikoSys.Setting.MainCoolSet[i] := CoolSet; |
| 1567 |
|
end; |
| 1568 |
|
//クールバー保存(Board) |
| 1569 |
|
for i := 0 to LIST_COOLBAND_COUNT - 1 do begin |
| 1570 |
|
CoolSet.FCoolID := ListCoolBar.Bands[i].ID; |
| 1571 |
|
CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width; |
| 1572 |
|
CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break; |
| 1573 |
|
GikoSys.Setting.ListCoolSet[i] := CoolSet; |
| 1574 |
|
end; |
| 1575 |
|
//クールバー保存(Browser) |
| 1576 |
|
for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin |
| 1577 |
|
CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID; |
| 1578 |
|
CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width; |
| 1579 |
|
CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break; |
| 1580 |
|
GikoSys.Setting.BrowserCoolSet[i] := CoolSet; |
| 1581 |
|
end; |
| 1582 |
|
|
| 1583 |
|
end; |
| 1584 |
|
|
| 1585 |
|
// CoolBar の設定を変数から復元 |
| 1586 |
|
procedure TGikoForm.LoadCoolBarSettings; |
| 1587 |
|
var |
| 1588 |
|
i : Integer; |
| 1589 |
|
CoolSet : TCoolSet; |
| 1590 |
|
begin |
| 1591 |
|
|
| 1592 |
|
//クールバー復元(Main) |
| 1593 |
|
MainCoolBar.Bands.BeginUpdate; |
| 1594 |
|
try |
| 1595 |
|
// for i := 0 to MainCoolBar.Bands.Count - 1 do begin |
| 1596 |
|
for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin |
| 1597 |
|
CoolSet := GikoSys.Setting.MainCoolSet[i]; |
| 1598 |
|
if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin |
| 1599 |
|
FIsIgnoreResize := False; |
| 1600 |
|
SaveCoolBarSettings; |
| 1601 |
|
Exit; |
| 1602 |
|
end; |
| 1603 |
|
MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i; |
| 1604 |
|
MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak; |
| 1605 |
|
MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth; |
| 1606 |
|
end; |
| 1607 |
|
finally |
| 1608 |
|
MainCoolBar.Bands.EndUpdate; |
| 1609 |
|
end; |
| 1610 |
|
|
| 1611 |
|
//クールバー復元(Board) |
| 1612 |
|
ListCoolBar.Bands.BeginUpdate; |
| 1613 |
|
try |
| 1614 |
|
// for i := 0 to ListCoolBar.Bands.Count - 1 do begin |
| 1615 |
|
for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin |
| 1616 |
|
CoolSet := GikoSys.Setting.ListCoolSet[i]; |
| 1617 |
|
if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin |
| 1618 |
|
FIsIgnoreResize := False; |
| 1619 |
|
SaveCoolBarSettings; |
| 1620 |
|
Exit; |
| 1621 |
|
end; |
| 1622 |
|
ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i; |
| 1623 |
|
ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak; |
| 1624 |
|
ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth; |
| 1625 |
|
end; |
| 1626 |
|
finally |
| 1627 |
|
ListCoolBar.Bands.EndUpdate; |
| 1628 |
|
end; |
| 1629 |
|
|
| 1630 |
|
//クールバー復元(Browser) |
| 1631 |
|
BrowserCoolBar.Bands.BeginUpdate; |
| 1632 |
|
try |
| 1633 |
|
// for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin |
| 1634 |
|
for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin |
| 1635 |
|
CoolSet := GikoSys.Setting.BrowserCoolSet[i]; |
| 1636 |
|
if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin |
| 1637 |
|
FIsIgnoreResize := False; |
| 1638 |
|
SaveCoolBarSettings; |
| 1639 |
|
Exit; |
| 1640 |
|
end; |
| 1641 |
|
BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i; |
| 1642 |
|
BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak; |
| 1643 |
|
BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth; |
| 1644 |
|
end; |
| 1645 |
|
finally |
| 1646 |
|
BrowserCoolBar.Bands.EndUpdate; |
| 1647 |
|
end; |
| 1648 |
|
|
| 1649 |
end; |
end; |
| 1650 |
|
|
| 1651 |
// |
// |
| 1652 |
// |
// |
| 1653 |
// |
// |
| 1654 |
procedure TGikoForm.FormShow(Sender: TObject); |
procedure TGikoForm.FormShow(Sender: TObject); |
|
var |
|
|
i: Integer; |
|
|
CoolSet: TCoolSet; |
|
| 1655 |
begin |
begin |
| 1656 |
ShowWindow(Application.Handle, SW_HIDE); |
ShowWindow(Application.Handle, SW_HIDE); |
| 1657 |
|
|
| 1695 |
BrowserTabFlatStyleActionExecute(nil); |
BrowserTabFlatStyleActionExecute(nil); |
| 1696 |
end; |
end; |
| 1697 |
|
|
| 1698 |
|
// CoolBar 復元 |
| 1699 |
|
LoadCoolBarSettings; |
| 1700 |
|
|
| 1701 |
//クールバー復元(Main) |
FIsIgnoreResize := False; |
|
MainCoolBar.Bands.BeginUpdate; |
|
|
try |
|
|
for i := 0 to MainCoolBar.Bands.Count - 1 do begin |
|
|
CoolSet := GikoSys.Setting.MainCoolSet[i]; |
|
|
if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then |
|
|
Continue; |
|
|
MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i; |
|
|
MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak; |
|
|
MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth; |
|
|
end; |
|
|
finally |
|
|
MainCoolBar.Bands.EndUpdate; |
|
|
end; |
|
|
|
|
|
//クールバー復元(Board) |
|
|
ListCoolBar.Bands.BeginUpdate; |
|
|
try |
|
|
for i := 0 to ListCoolBar.Bands.Count - 1 do begin |
|
|
CoolSet := GikoSys.Setting.ListCoolSet[i]; |
|
|
if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then |
|
|
Continue; |
|
|
ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i; |
|
|
ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak; |
|
|
ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth; |
|
|
end; |
|
|
finally |
|
|
ListCoolBar.Bands.EndUpdate; |
|
|
end; |
|
|
|
|
|
//クールバー復元(Browser) |
|
|
BrowserCoolBar.Bands.BeginUpdate; |
|
|
try |
|
|
for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin |
|
|
CoolSet := GikoSys.Setting.BrowserCoolSet[i]; |
|
|
if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then |
|
|
Continue; |
|
|
BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i; |
|
|
BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak; |
|
|
BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth; |
|
|
end; |
|
|
finally |
|
|
BrowserCoolBar.Bands.EndUpdate; |
|
|
end; |
|
|
|
|
|
end; |
|
|
{ |
|
|
procedure TGikoForm.SetStdToolBar; |
|
|
var |
|
|
i: Integer; |
|
|
FileName: string; |
|
|
ini: TMemIniFile; |
|
|
s: string; |
|
|
Action: TContainedAction; |
|
|
ToolButton: TToolButton; |
|
|
begin |
|
|
exit; |
|
|
for i := StdToolBar.ButtonCount - 1 downto 0 do begin |
|
|
StdToolBar.RemoveControl(StdToolBar.Buttons[i]); |
|
|
//StdToolBar.Buttons[i].Free; |
|
|
end; |
|
|
FileName := GikoSys.GetConfigDir + 'ToolBar.ini'; |
|
|
ini := TMemIniFile.Create(FileName); |
|
|
i := 0; |
|
|
while true do begin |
|
|
s := ini.ReadString('StdToolBar', IntToStr(i), ''); |
|
|
if s = '' then |
|
|
Break; |
|
|
if s = '-' then begin |
|
|
ToolButton := TToolButton.Create(StdToolBar); |
|
|
ToolButton.Style := tbsSeparator; |
|
|
ToolButton.Width := 8; |
|
|
ToolButton.Left := 10000; |
|
|
StdToolBar.InsertControl(ToolButton); |
|
|
end else begin |
|
|
Action := GetAction(s); |
|
|
if Action <> nil then begin |
|
|
ToolButton := TToolButton.Create(StdToolBar); |
|
|
ToolButton.Action := Action; |
|
|
ToolButton.Left := 10000; |
|
|
StdToolBar.InsertControl(ToolButton); |
|
|
end; |
|
|
end; |
|
|
Inc(i); |
|
|
end; |
|
| 1702 |
end; |
end; |
| 1703 |
} |
|
| 1704 |
{function TGikoForm.GetAction(ActionName: string): TContainedAction; |
procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
|
var |
|
|
i: Integer; |
|
| 1705 |
begin |
begin |
| 1706 |
for i := 0 to ActionList.ActionCount - 1 do begin |
if ( GikoSys.Setting.ShowDialogForEnd ) and |
| 1707 |
if ActionList.Actions[i].Name = ActionName then begin |
(MessageDlg('ギコナビを終了してよろしいですか?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin |
| 1708 |
Result := ActionList.Actions[i]; |
CanClose := false; |
| 1709 |
Exit; |
Exit; |
| 1710 |
end; |
end else begin |
| 1711 |
|
CanClose := True; |
| 1712 |
end; |
end; |
| 1713 |
Result := nil; |
//Application.HookMainWindow(Hook); |
| 1714 |
end;} |
Application.UnhookMainWindow(Hook); |
| 1715 |
|
Application.Terminate; |
| 1716 |
|
end; |
| 1717 |
|
|
| 1718 |
procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
procedure TGikoForm.FormDestroy(Sender: TObject); |
| 1719 |
var |
var |
| 1720 |
i: Integer; |
i: Integer; |
| 1721 |
CoolSet: TCoolSet; |
// CoolSet: TCoolSet; |
| 1722 |
wp: TWindowPlacement; |
wp: TWindowPlacement; |
| 1723 |
begin |
begin |
| 1724 |
if ( GikoSys.Setting.ShowDialogForEnd ) and |
// Application.OnDeactivate := nil; |
| 1725 |
(MessageDlg('ギコナビを終了してよろしいですか?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin |
// Self.OnDeactivate := nil; |
| 1726 |
CanClose := false; |
try |
| 1727 |
Exit; |
//column幅 |
| 1728 |
end else begin |
if GetActiveList is TBBS then begin |
| 1729 |
CanClose := True; |
for i := 0 to ListView.Columns.Count - 1 do |
| 1730 |
end; |
GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width; |
| 1731 |
Application.OnDeactivate := nil; |
end else if GetActiveList is TCategory then begin |
| 1732 |
Self.OnDeactivate := nil; |
for i := 0 to ListView.Columns.Count - 1 do |
| 1733 |
|
GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width; |
| 1734 |
//column幅 |
end else if GetActiveList is TBoard then begin |
| 1735 |
if GetActiveList is TBBS2ch then begin |
for i := 0 to ListView.Columns.Count - 1 do |
| 1736 |
for i := 0 to ListView.Columns.Count - 1 do |
GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width; |
| 1737 |
GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width; |
end; |
| 1738 |
end else if GetActiveList is TCategory then begin |
except |
|
for i := 0 to ListView.Columns.Count - 1 do |
|
|
GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width; |
|
|
end else if GetActiveList is TBoard then begin |
|
|
for i := 0 to ListView.Columns.Count - 1 do |
|
|
GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width; |
|
|
end; |
|
|
|
|
|
//最大化・ウィンドウ位置保存 |
|
|
wp.length := sizeof(wp); |
|
|
GetWindowPlacement(Handle, @wp); |
|
|
GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top; |
|
|
GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left; |
|
|
GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top; |
|
|
GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left; |
|
|
GikoSys.Setting.WindowMax := WindowState = wsMaximized; |
|
|
|
|
|
GikoSys.Setting.ListStyle := ListView.ViewStyle; |
|
|
GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked; |
|
|
GikoSys.Setting.CabinetWidth := CabinetPanel.Width; |
|
|
GikoSys.Setting.ListHeight := FBrowserSizeHeight; |
|
|
GikoSys.Setting.ListWidth := FBrowserSizeWidth; |
|
|
if ArrangeAction.Checked then |
|
|
GikoSys.Setting.ListOrientation := gloVertical |
|
|
else |
|
|
GikoSys.Setting.ListOrientation := gloHorizontal; |
|
|
GikoSys.Setting.MessegeBarHeight := MessagePanel.Height; |
|
|
|
|
|
//クールバー保存(Main) |
|
|
for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin |
|
|
CoolSet.FCoolID := MainCoolBar.Bands[i].ID; |
|
|
CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width; |
|
|
CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break; |
|
|
GikoSys.Setting.MainCoolSet[i] := CoolSet; |
|
|
end; |
|
|
//クールバー保存(Board) |
|
|
for i := 0 to LIST_COOLBAND_COUNT - 1 do begin |
|
|
CoolSet.FCoolID := ListCoolBar.Bands[i].ID; |
|
|
CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width; |
|
|
CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break; |
|
|
GikoSys.Setting.ListCoolSet[i] := CoolSet; |
|
| 1739 |
end; |
end; |
| 1740 |
//クールバー保存(Browser) |
try |
| 1741 |
for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin |
//最大化・ウィンドウ位置保存 |
| 1742 |
CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID; |
wp.length := sizeof(wp); |
| 1743 |
CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width; |
GetWindowPlacement(Handle, @wp); |
| 1744 |
CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break; |
GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top; |
| 1745 |
GikoSys.Setting.BrowserCoolSet[i] := CoolSet; |
GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left; |
| 1746 |
|
GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top; |
| 1747 |
|
GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left; |
| 1748 |
|
GikoSys.Setting.WindowMax := WindowState = wsMaximized; |
| 1749 |
|
|
| 1750 |
|
GikoSys.Setting.ListStyle := ListView.ViewStyle; |
| 1751 |
|
GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked; |
| 1752 |
|
GikoSys.Setting.CabinetWidth := CabinetPanel.Width; |
| 1753 |
|
GikoSys.Setting.ListHeight := FBrowserSizeHeight; |
| 1754 |
|
GikoSys.Setting.ListWidth := FBrowserSizeWidth; |
| 1755 |
|
if ArrangeAction.Checked then |
| 1756 |
|
GikoSys.Setting.ListOrientation := gloVertical |
| 1757 |
|
else |
| 1758 |
|
GikoSys.Setting.ListOrientation := gloHorizontal; |
| 1759 |
|
GikoSys.Setting.MessegeBarHeight := MessagePanel.Height; |
| 1760 |
|
except |
| 1761 |
end; |
end; |
| 1762 |
|
|
| 1763 |
GikoSys.Setting.WriteWindowSettingFile; |
// リアルタイムに保存されるので、また、ウィンドウサイズが CoolBar より |
| 1764 |
GikoSys.Setting.WriteNameMailSettingFile; |
// 小さくなっているときに保存すると値が上書きされてしまうのでここでは保存しない |
| 1765 |
|
{ |
| 1766 |
|
// ↑FormDestroy中に移動したので、ここで保存しないといけないと思う。(もじゅ 2004/04/09) |
| 1767 |
|
// CoolBar 保存 |
| 1768 |
|
if GikoForm.WindowState <> wsMinimized then |
| 1769 |
|
SaveCoolBarSettings; |
| 1770 |
|
} |
| 1771 |
|
try |
| 1772 |
|
GikoSys.Setting.WriteWindowSettingFile; |
| 1773 |
|
GikoSys.Setting.WriteNameMailSettingFile; |
| 1774 |
|
except |
| 1775 |
|
end; |
| 1776 |
|
|
| 1777 |
//お気に入り保存 |
//お気に入り保存 |
| 1778 |
try |
try |
| 1779 |
|
//FavoriteDMは自動生成フォームなので、解放は自動的にされる |
| 1780 |
FavoriteDM.WriteFavorite; |
FavoriteDM.WriteFavorite; |
| 1781 |
|
FavoriteDM.Clear; |
| 1782 |
except |
except |
| 1783 |
end; |
end; |
|
// Favorite.Free; |
|
| 1784 |
|
|
| 1785 |
try |
try |
| 1786 |
//タブクローズ |
//タブクローズ |
| 1787 |
NotSelectTabCloseAction.Execute; |
//NotSelectTabCloseAction.Execute; |
| 1788 |
if BrowserTab.Tabs.Count >= 1 then begin |
{if BrowserTab.Tabs.Count >= 1 then begin |
| 1789 |
DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0])); |
DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0])); |
| 1790 |
end; |
end; |
| 1791 |
|
} |
| 1792 |
except |
except |
| 1793 |
end; |
end; |
| 1794 |
|
|
|
//巡回リスト保存&破棄 |
|
| 1795 |
try |
try |
| 1796 |
RoundList.SaveRoundFile; |
TreeView.Items.BeginUpdate; |
| 1797 |
|
for i := TreeView.Items.Count - 1 downto 0 do begin |
| 1798 |
|
TreeView.Items[i].Free; |
| 1799 |
|
end; |
| 1800 |
|
TreeView.Items.Clear; |
| 1801 |
|
TreeView.Items.EndUpdate; |
| 1802 |
except |
except |
| 1803 |
end; |
end; |
| 1804 |
|
|
| 1805 |
|
//アドレス履歴保存 |
| 1806 |
try |
try |
| 1807 |
RoundList.Clear; |
//AddressHistoryDMは自動生成フォームなので、解放は自動的にされる。 |
| 1808 |
|
AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount); |
| 1809 |
except |
except |
| 1810 |
end; |
end; |
| 1811 |
|
|
| 1812 |
|
//ヒストリリスト保存 |
| 1813 |
try |
try |
| 1814 |
RoundList.Free; |
SaveHistory; |
| 1815 |
except |
except |
| 1816 |
end; |
end; |
|
|
|
|
//ヒストリリスト |
|
| 1817 |
try |
try |
| 1818 |
|
try |
| 1819 |
|
ClearHistory; |
| 1820 |
|
except |
| 1821 |
|
end; |
| 1822 |
|
finally |
| 1823 |
FHistoryList.Free; |
FHistoryList.Free; |
|
except |
|
| 1824 |
end; |
end; |
| 1825 |
|
|
| 1826 |
//アドレス履歴保存 |
//巡回リスト保存&破棄 |
| 1827 |
try |
try |
| 1828 |
AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount); |
RoundList.SaveRoundFile; |
| 1829 |
except |
except |
| 1830 |
end; |
end; |
|
|
|
| 1831 |
try |
try |
| 1832 |
FControlThread.Terminate; |
try |
| 1833 |
except |
RoundList.Clear; |
| 1834 |
end; |
except |
| 1835 |
|
end; |
| 1836 |
|
finally |
| 1837 |
|
RoundList.Free; |
| 1838 |
|
end; |
| 1839 |
|
|
|
// FDownload.Free; |
|
|
try |
|
|
SetActiveList(nil); |
|
|
except |
|
|
end; |
|
|
//TreeViewクリア(BBS2ch.Freeの後にクリアするとXPスタイル時にエラー出る) |
|
|
Sleep(10); |
|
| 1840 |
try |
try |
| 1841 |
TreeView.Items.Clear; |
try |
| 1842 |
except |
FControlThread.Terminate; |
| 1843 |
|
FControlThread.WaitFor; |
| 1844 |
|
except |
| 1845 |
|
end; |
| 1846 |
|
finally |
| 1847 |
|
FControlThread.Free; |
| 1848 |
end; |
end; |
| 1849 |
|
|
| 1850 |
|
// TBBS は保持している TCategory, TBoard, TThreadItem すべてを開放する |
| 1851 |
|
// TBoard, TThreadItem のデストラクタはプラグインに破棄を伝えるので |
| 1852 |
|
// BoardPluteIns の開放より先に行うこと |
| 1853 |
try |
try |
| 1854 |
if FavoriteDM <> nil then |
for i := Length( BBSs ) - 1 downto 0 do begin |
| 1855 |
FavoriteDM.Free; |
if BBSs[ i ] <> nil then |
| 1856 |
FavoriteDM := nil; |
BBSs[ i ].Free; |
| 1857 |
if AddressHistoryDM <> nil then |
BBSs[ i ] := nil; |
| 1858 |
AddressHistoryDM.Free; |
end; |
|
AddressHistoryDM := nil; |
|
| 1859 |
except |
except |
| 1860 |
end; |
end; |
| 1861 |
|
|
| 1862 |
try |
try |
| 1863 |
if BBS2ch <> nil then |
for i := Length( BoardPlugIns ) - 1 downto 0 do begin |
| 1864 |
BBS2ch.Free; |
if BoardPlugIns[ i ] <> nil then |
| 1865 |
BBS2ch := nil; |
BoardPlugIns[ i ].Free; |
| 1866 |
|
BoardPlugIns[ i ] := nil; |
| 1867 |
|
end; |
| 1868 |
except |
except |
| 1869 |
end; |
end; |
| 1870 |
|
|
| 1871 |
try |
try |
| 1872 |
|
if FEvent <> nil then |
| 1873 |
|
FEvent.Free; |
| 1874 |
|
|
| 1875 |
//Hint破棄 |
//Hint破棄 |
| 1876 |
if FHint <> nil then begin |
if FHint <> nil then begin |
| 1877 |
FHint.ReleaseHandle; |
FHint.ReleaseHandle; |
| 1885 |
end; |
end; |
| 1886 |
except |
except |
| 1887 |
end; |
end; |
|
end; |
|
|
|
|
|
procedure TGikoForm.FormDestroy(Sender: TObject); |
|
|
//var |
|
|
// wp: TWindowPlacement; |
|
|
begin |
|
|
{ //ヒストリリスト |
|
|
FHistoryList.Free; |
|
|
|
|
|
//最大化・ウィンドウ位置保存 |
|
|
wp.length := sizeof(wp); |
|
|
GetWindowPlacement(Handle, @wp); |
|
| 1888 |
|
|
|
GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top; |
|
|
GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left; |
|
|
GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top; |
|
|
GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left; |
|
|
GikoSys.Setting.WindowMax := WindowState = wsMaximized; |
|
|
|
|
|
GikoSys.Setting.CabinetVisible := CabinetPanel.Visible; |
|
|
GikoSys.Setting.CabinetWidth := CabinetPanel.Width; |
|
|
|
|
|
GikoSys.Setting.WriteWindowSettingFile; |
|
|
GikoSys.Setting.WriteNameMailSettingFile; |
|
|
FDownload.Free; |
|
|
BBS2ch.Free;} |
|
| 1889 |
end; |
end; |
| 1890 |
|
|
| 1891 |
//フォームクローズ |
//フォームクローズ |
| 1892 |
procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction); |
procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction); |
| 1893 |
begin |
begin |
|
Application.Terminate; |
|
|
Action := caFree; |
|
| 1894 |
end; |
end; |
|
|
|
| 1895 |
//キャビネット×ボタンクリック |
//キャビネット×ボタンクリック |
| 1896 |
procedure TGikoForm.CabinetPanelHide(Sender: TObject); |
procedure TGikoForm.CabinetPanelHide(Sender: TObject); |
| 1897 |
begin |
begin |
| 1900 |
end; |
end; |
| 1901 |
|
|
| 1902 |
procedure TGikoForm.ReloadBBS; |
procedure TGikoForm.ReloadBBS; |
| 1903 |
|
var |
| 1904 |
|
i : Integer; |
| 1905 |
|
item : TBBSMenuItem; |
| 1906 |
begin |
begin |
| 1907 |
//タブクローズ |
//タブクローズ |
| 1908 |
NotSelectTabCloseAction.Execute; |
NotSelectTabCloseAction.Execute; |
| 1909 |
if BrowserTab.Tabs.Count >= 1 then |
if BrowserTab.Tabs.Count >= 1 then |
| 1910 |
DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0])); |
DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0])); |
|
//ヒストリリスト |
|
|
FHistoryList.Clear; |
|
| 1911 |
//TreeViewクリア(BBS2ch.Freeの後にクリアするとXPスタイル時にエラー出る) |
//TreeViewクリア(BBS2ch.Freeの後にクリアするとXPスタイル時にエラー出る) |
| 1912 |
TreeView.Items.Clear; |
TreeView.Items.Clear; |
| 1913 |
|
|
| 1914 |
//BBS破棄 |
//BBS破棄 |
| 1915 |
BBS2ch.Free; |
try |
| 1916 |
|
for i := Length( BBSs ) - 1 downto 0 do begin |
| 1917 |
|
if BBSs[ i ] <> nil then |
| 1918 |
|
BBSs[ i ].Free; |
| 1919 |
|
BBSs[ i ] := nil; |
| 1920 |
|
end; |
| 1921 |
|
except |
| 1922 |
|
end; |
| 1923 |
|
|
| 1924 |
SetActiveList(nil); |
ActiveList := nil; |
| 1925 |
|
|
| 1926 |
FTreeType := gttNone; |
FTreeType := gttNone; |
| 1927 |
|
|
| 1928 |
//BBS作成 |
GikoSys.ListBoardFile; //ボードファイル読込 |
| 1929 |
BBS2ch := TBBS2ch.Create(GikoSys.Setting.LogFolder); |
// メニューを削除 |
| 1930 |
|
for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin |
| 1931 |
|
try |
| 1932 |
|
if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin |
| 1933 |
|
CabinetSelectPopupMenu.Items[ i ].Free; |
| 1934 |
|
CabinetMenu.Items[ i ].Free; |
| 1935 |
|
end; |
| 1936 |
|
except |
| 1937 |
|
end; |
| 1938 |
|
end; |
| 1939 |
|
// メニューに追加 |
| 1940 |
|
for i := Length( BBSs ) - 1 downto 0 do begin |
| 1941 |
|
try |
| 1942 |
|
item := TBBSMenuItem.Create( PopupMenu ); |
| 1943 |
|
item.Caption := BBSs[ i ].Title; |
| 1944 |
|
item.Data := BBSs[ i ]; |
| 1945 |
|
item.OnClick := BBSMenuItemOnClick; |
| 1946 |
|
CabinetSelectPopupMenu.Items.Insert( 0, item ); |
| 1947 |
|
item := TBBSMenuItem.Create( PopupMenu ); |
| 1948 |
|
item.Caption := BBSs[ i ].Title; |
| 1949 |
|
item.Data := BBSs[ i ]; |
| 1950 |
|
item.OnClick := BBSMenuItemOnClick; |
| 1951 |
|
CabinetMenu.Insert( 0, item ); |
| 1952 |
|
except |
| 1953 |
|
end; |
| 1954 |
|
end; |
| 1955 |
|
ShowBBSTree( BBSs[ 0 ] ); |
| 1956 |
|
|
| 1957 |
|
// 履歴読み込み |
| 1958 |
|
SaveHistory; |
| 1959 |
|
ClearHistory; |
| 1960 |
|
LoadHistory; |
| 1961 |
|
|
| 1962 |
|
//お気に入り読み込み |
| 1963 |
|
FavoriteDM.WriteFavorite; |
| 1964 |
|
FavoriteDM.Clear; |
| 1965 |
|
FavoriteDM.ReadFavorite; |
| 1966 |
|
|
| 1967 |
|
SetLinkBar; |
| 1968 |
|
|
|
BBS2ch.ReadBoardFile; //ボードファイル読込 |
|
|
Show2chTree; |
|
| 1969 |
end; |
end; |
| 1970 |
|
|
| 1971 |
//ボードツリー設定 |
//ボードツリー設定 |
| 1972 |
procedure TGikoForm.SetBoardTreeNode; |
procedure TGikoForm.SetBoardTreeNode( |
| 1973 |
|
inBBS : TBBS |
| 1974 |
|
); |
| 1975 |
var |
var |
| 1976 |
i, j: integer; |
i, j, k: integer; |
| 1977 |
Root: TTreeNode; |
Root: TTreeNode; |
| 1978 |
CategoryNode: TTreeNode; |
CategoryNode: TTreeNode; |
| 1979 |
BoardNode: TTreeNode; |
BoardNode: TTreeNode; |
| 1980 |
Category: TCategory; |
Category: TCategory; |
| 1981 |
Board: TBoard; |
Board: TBoard; |
| 1982 |
begin |
begin |
| 1983 |
|
// 板リストの設定 |
| 1984 |
|
FActiveBBS := inBBS; |
| 1985 |
TreeView.Items.BeginUpdate; |
TreeView.Items.BeginUpdate; |
| 1986 |
TreeView.Items.Clear; |
TreeView.Items.Clear; |
| 1987 |
try |
try |
| 1988 |
Root := TreeView.Items.Add(nil, BBS2ch.Title); |
if not inBBS.IsBoardFileRead then |
| 1989 |
Root.ImageIndex := ITEM_ICON_2CH1; |
GikoSys.ReadBoardFile( inBBS ); |
| 1990 |
Root.SelectedIndex := ITEM_ICON_2CH2; |
try |
| 1991 |
Root.Data := BBS2ch; |
if SplashWindow <> nil then |
| 1992 |
if SplashWindow <> nil then |
SplashWindow.ProgressBar.Max := inBBS.Count; |
| 1993 |
SplashWindow.ProgressBar.Max := BoardGroup.BBS2ch.Count; |
except |
| 1994 |
|
end; |
| 1995 |
|
|
| 1996 |
for i := 0 to BoardGroup.BBS2ch.Count - 1 do begin |
Root := TreeView.Items.Add( nil, inBBS.Title ); |
| 1997 |
Category := TCategory(BoardGroup.BBS2ch.Items[i]); |
Root.ImageIndex := ITEM_ICON_2CH1; |
| 1998 |
|
Root.SelectedIndex := ITEM_ICON_2CH2; |
| 1999 |
|
Root.Data := inBBS; |
| 2000 |
|
for i := 0 to inBBS.Count - 1 do begin |
| 2001 |
|
Category := TCategory(inBBS.Items[i]); |
| 2002 |
CategoryNode := TreeView.Items.AddChild(Root, Category.Title); |
CategoryNode := TreeView.Items.AddChild(Root, Category.Title); |
| 2003 |
CategoryNode.Data := Category; |
CategoryNode.Data := Category; |
| 2004 |
CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1; |
CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1; |
| 2009 |
Board.BeginUpdate; |
Board.BeginUpdate; |
| 2010 |
BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title); |
BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title); |
| 2011 |
BoardNode.Data := Board; |
BoardNode.Data := Board; |
| 2012 |
BoardNode.ImageIndex := ITEM_ICON_BOARD1; |
//if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin |
| 2013 |
BoardNode.SelectedIndex := ITEM_ICON_BOARD2; |
if not Board.IsLogFile then begin |
| 2014 |
Board.LoadSettings; |
BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT; |
| 2015 |
|
BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT; |
| 2016 |
|
end else begin |
| 2017 |
|
BoardNode.ImageIndex := ITEM_ICON_BOARD1; |
| 2018 |
|
BoardNode.SelectedIndex := ITEM_ICON_BOARD2; |
| 2019 |
|
for k := 0 to Board.Count - 1 do begin |
| 2020 |
|
if Board.Items[ k ].IsLogFile then begin |
| 2021 |
|
BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG; |
| 2022 |
|
BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG; |
| 2023 |
|
|
| 2024 |
|
Break; |
| 2025 |
|
end; |
| 2026 |
|
end; |
| 2027 |
|
end; |
| 2028 |
Board.EndUpdate; |
Board.EndUpdate; |
| 2029 |
end; |
end; |
| 2030 |
|
|
| 2034 |
SplashWindow.ProgressBar.StepIt; |
SplashWindow.ProgressBar.StepIt; |
| 2035 |
Application.ProcessMessages; |
Application.ProcessMessages; |
| 2036 |
end; |
end; |
|
|
|
| 2037 |
end; |
end; |
| 2038 |
finally |
finally |
| 2039 |
TreeView.Items.EndUpdate; |
TreeView.Items.EndUpdate; |
| 2040 |
end; |
end; |
| 2041 |
end; |
end; |
| 2042 |
|
|
| 2043 |
function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS2ch): Integer; |
function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer; |
| 2044 |
const |
const |
| 2045 |
COLUMN: array[0..0] of string = ('カテゴリ名'); |
COLUMN: array[0..0] of string = ('カテゴリ名'); |
| 2046 |
var |
var |
| 2134 |
|
|
| 2135 |
function TGikoForm.SetThreadListItem(Board: TBoard): Integer; |
function TGikoForm.SetThreadListItem(Board: TBoard): Integer; |
| 2136 |
const |
const |
| 2137 |
COLUMN: array[0..6] of string = ('スレッド名', 'カウント', '取得', '新着', |
COLUMN: array[0..7] of string = ('スレッド名', 'カウント', '取得', '新着', |
| 2138 |
'未読', '巡回予約', '取得日時'); |
'未読', '巡回予約', '取得日時', 'スレ作成日時'); |
| 2139 |
COLUMN_ALIGNMENT: array[0..6] of TAlignment = (taLeftJustify, taRightJustify, |
COLUMN_ALIGNMENT: array[0..7] of TAlignment = (taLeftJustify, taRightJustify, |
| 2140 |
taRightJustify, taRightJustify, |
taRightJustify, taRightJustify, |
| 2141 |
taRightJustify, taLeftJustify, |
taRightJustify, taLeftJustify, |
| 2142 |
taLeftJustify); |
taLeftJustify, taLeftJustify); |
| 2143 |
//No, スレッド名, カウント, 巡回予約, 取得日時 |
//No, スレッド名, カウント, 巡回予約, 取得日時 |
| 2144 |
var |
var |
| 2145 |
ListColumn: TListColumn; |
ListColumn: TListColumn; |
| 2187 |
end; |
end; |
| 2188 |
end; |
end; |
| 2189 |
|
|
|
procedure TGikoForm.TreeViewChange(Sender: TObject; Node: TTreeNode); |
|
|
var |
|
|
i: Integer; |
|
|
begin |
|
|
if FTreeType = gttHistory then begin |
|
|
// SetContent(TThreadItem(Node.Data)); |
|
|
InsertBrowserTab(TThreadItem(Node.Data)); |
|
|
Exit; |
|
|
end; |
|
|
|
|
|
ListView.Selected := nil; |
|
|
ListView.Items.Count := 0; |
|
|
ListView.Items.Clear; |
|
|
// ListView.Columns.Clear; |
|
|
|
|
|
Caption := CAPTION_NAME; |
|
|
//Application.Title := CAPTION_NAME; |
|
|
|
|
|
|
|
|
if GetActiveList is TBBS2ch then begin |
|
|
for i := 0 to ListView.Columns.Count - 1 do |
|
|
GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width; |
|
|
end else if GetActiveList is TCategory then begin |
|
|
for i := 0 to ListView.Columns.Count - 1 do |
|
|
GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width; |
|
|
end else if GetActiveList is TBoard then begin |
|
|
for i := 0 to ListView.Columns.Count - 1 do |
|
|
GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width; |
|
|
end; |
|
|
|
|
|
if TObject(Node.Data) is TBBS2ch then begin |
|
|
SetActiveList(Node.data); |
|
|
end else if TObject(Node.Data) is TCategory then begin |
|
|
SetActiveList(Node.data); |
|
|
end else if TObject(Node.Data) is TBoard then begin |
|
|
if not TBoard(Node.Data).IsThreadDatRead then begin |
|
|
Screen.Cursor := crHourGlass; |
|
|
try |
|
|
GikoSys.ReadSubjectFile(TBoard(Node.Data)); |
|
|
finally |
|
|
Screen.Cursor := crDefault; |
|
|
end; |
|
|
end; |
|
|
SetActiveList(Node.data); |
|
|
end; |
|
|
end; |
|
|
|
|
| 2190 |
procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem); |
procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem); |
| 2191 |
var |
var |
| 2192 |
// FileName: string; |
// FileName: string; |
| 2193 |
// DateTime: TDateTime; |
// DateTime: TDateTime; |
| 2194 |
BoardCnt: Integer; |
BoardCnt: Integer; |
| 2195 |
BBS: TBBS2ch; |
BBS: TBBS; |
| 2196 |
Category: TCategory; |
Category: TCategory; |
| 2197 |
Board: TBoard; |
Board: TBoard; |
| 2198 |
ThreadItem: TThreadItem; |
ThreadItem: TThreadItem; |
| 2199 |
RepStr: string; |
RepStr: string; |
| 2200 |
|
ActivListObj : TObject; |
| 2201 |
begin |
begin |
| 2202 |
if ActiveList is TBBS2ch then begin |
ActivListObj := ActiveList; |
| 2203 |
BBS := TBBS2ch(ActiveList); |
if ActivListObj is TBBS then begin |
| 2204 |
|
BBS := TBBS(ActivListObj); |
| 2205 |
|
|
| 2206 |
ListView.StateImages := nil; |
ListView.StateImages := nil; |
| 2207 |
|
|
| 2211 |
if Item.Index > BBS.Count then Exit; |
if Item.Index > BBS.Count then Exit; |
| 2212 |
if ListView.Items.Count = 0 then Exit; |
if ListView.Items.Count = 0 then Exit; |
| 2213 |
|
|
| 2214 |
if not (BBS.Items[Item.Index] is TCategory) then Exit; |
if not (BBS.Items[Item.index] is TCategory) then Exit; |
| 2215 |
Category := TCategory(BBS.Items[Item.Index]); |
Category := TCategory(BBS.Items[Item.index]); |
| 2216 |
|
|
| 2217 |
if Category = nil then Exit; |
if Category = nil then Exit; |
| 2218 |
|
|
| 2223 |
|
|
| 2224 |
Item.ImageIndex := ITEM_ICON_CATEGORY1; |
Item.ImageIndex := ITEM_ICON_CATEGORY1; |
| 2225 |
Item.Data := Category; |
Item.Data := Category; |
| 2226 |
end else if ActiveList is TCategory then begin |
end else if ActivListObj is TCategory then begin |
| 2227 |
Category := TCategory(ActiveList); |
Category := TCategory(ActivListObj); |
| 2228 |
|
|
| 2229 |
ListView.StateImages := nil; |
ListView.StateImages := nil; |
| 2230 |
|
|
| 2262 |
end else |
end else |
| 2263 |
Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate); |
Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate); |
| 2264 |
Item.Data := Board; |
Item.Data := Board; |
| 2265 |
end else if ActiveList is TBoard then begin |
end else if ActivListObj is TBoard then begin |
| 2266 |
Board := TBoard(ActiveList); |
Board := TBoard(ActivListObj); |
| 2267 |
|
|
| 2268 |
if GikoSys.Setting.ListIconVisible then |
if GikoSys.Setting.ListIconVisible then |
| 2269 |
ListView.StateImages := StateIconImageList |
ListView.StateImages := StateIconImageList |
| 2289 |
|
|
| 2290 |
ThreadItem := nil; |
ThreadItem := nil; |
| 2291 |
case GikoForm.ViewType of |
case GikoForm.ViewType of |
| 2292 |
gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]); |
gvtAll: if Item.Index >= Board.Count then Exit else |
| 2293 |
gvtLog: ThreadItem := Board.GetLogThread(Item.Index); |
ThreadItem := TThreadItem(Board.Items[Item.Index]); |
| 2294 |
gvtNew: ThreadItem := Board.GetNewThread(Item.Index); |
gvtLog: ThreadItem := Board.GetLogThread(Item.Index); |
| 2295 |
gvtUser: ThreadItem := Board.GetUserThread(Item.Index); |
gvtNew: ThreadItem := Board.GetNewThread(Item.Index); |
| 2296 |
|
gvtUser: ThreadItem := Board.GetUserThread(Item.Index); |
| 2297 |
end; |
end; |
| 2298 |
|
|
| 2299 |
if ThreadItem = nil then Exit; |
if ThreadItem = nil then Exit; |
| 2302 |
// RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title |
// RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title |
| 2303 |
// else |
// else |
| 2304 |
RepStr := ThreadItem.Title; |
RepStr := ThreadItem.Title; |
| 2305 |
//RepStr := StringReplace(RepStr, '&', '&', [rfReplaceAll]); |
RepStr := CustomStringReplace(RepStr, '<', '<' ); |
| 2306 |
RepStr := StringReplace(RepStr, '<', '<', [rfReplaceAll]); |
RepStr := CustomStringReplace(RepStr, '>', '>' ); |
| 2307 |
RepStr := StringReplace(RepStr, '>', '>', [rfReplaceAll]); |
RepStr := CustomStringReplace(RepStr, '"', '"' ); |
| 2308 |
RepStr := StringReplace(RepStr, '"', '"', [rfReplaceAll]); |
RepStr := CustomStringReplace(RepStr, '&', '&' ); |
|
RepStr := StringReplace(RepStr, '&', '&', [rfReplaceAll]); |
|
| 2309 |
//RepStr := StringReplace(RepStr, '@`', ',', [rfReplaceAll]); |
//RepStr := StringReplace(RepStr, '@`', ',', [rfReplaceAll]); |
| 2310 |
|
|
| 2311 |
if Item.SubItems.Count <> 6 then begin |
if Item.SubItems.Count <> 7 then begin |
| 2312 |
Item.SubItems.Clear; |
Item.SubItems.Clear; |
| 2313 |
Item.SubItems.Add(''); |
Item.SubItems.Add(''); |
| 2314 |
Item.SubItems.Add(''); |
Item.SubItems.Add(''); |
| 2316 |
Item.SubItems.Add(''); |
Item.SubItems.Add(''); |
| 2317 |
Item.SubItems.Add(''); |
Item.SubItems.Add(''); |
| 2318 |
Item.SubItems.Add(''); |
Item.SubItems.Add(''); |
| 2319 |
|
Item.SubItems.Add(''); |
| 2320 |
end; |
end; |
| 2321 |
|
|
| 2322 |
if ListNumberVisibleAction.Checked then |
if ListNumberVisibleAction.Checked then |
| 2350 |
Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate); |
Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate); |
| 2351 |
if ThreadItem.NewArrival then |
if ThreadItem.NewArrival then |
| 2352 |
Item.ImageIndex := ITEM_ICON_THREADNEW1; |
Item.ImageIndex := ITEM_ICON_THREADNEW1; |
| 2353 |
|
if ThreadItem.CreateDate = ZERO_DATE then begin |
| 2354 |
|
Item.SubItems[6] := ''; |
| 2355 |
|
end else |
| 2356 |
|
Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate); |
| 2357 |
|
|
| 2358 |
end else begin |
end else begin |
| 2359 |
Item.ImageIndex := ITEM_ICON_THREAD1; |
Item.ImageIndex := ITEM_ICON_THREAD1; |
| 2360 |
Item.SubItems[0] := IntToStr(ThreadItem.AllResCount); |
Item.SubItems[0] := IntToStr(ThreadItem.AllResCount); |
| 2363 |
Item.SubItems[3] := ''; |
Item.SubItems[3] := ''; |
| 2364 |
Item.SubItems[4] := ''; |
Item.SubItems[4] := ''; |
| 2365 |
Item.SubItems[5] := ''; |
Item.SubItems[5] := ''; |
| 2366 |
|
if not GikoSys.Setting.CreationTimeLogs then |
| 2367 |
|
if ThreadItem.CreateDate = ZERO_DATE then |
| 2368 |
|
Item.SubItems[6] := '' |
| 2369 |
|
else |
| 2370 |
|
Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate); |
| 2371 |
|
|
| 2372 |
end; |
end; |
| 2373 |
|
|
| 2374 |
Item.Data := ThreadItem; |
Item.Data := ThreadItem; |
| 2375 |
end; |
end; |
| 2376 |
end; |
end; |
| 2380 |
StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean; |
StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean; |
| 2381 |
var Index: Integer); |
var Index: Integer); |
| 2382 |
begin |
begin |
| 2383 |
|
|
| 2384 |
// |
// |
| 2385 |
end; |
end; |
| 2386 |
|
|
| 2404 |
URL: string; |
URL: string; |
| 2405 |
ATitle: Boolean; |
ATitle: Boolean; |
| 2406 |
|
|
| 2407 |
wkBBS: string; |
threadItem : TThreadItem; |
| 2408 |
wkKey: string; |
board : TBoard; |
| 2409 |
|
Protocol, Host, Path, Document, Port, Bookmark: string; |
| 2410 |
|
|
| 2411 |
//wkInt: Integer; |
//wkInt: Integer; |
| 2412 |
wkIntSt: Integer; |
wkIntSt: Integer; |
| 2413 |
wkIntTo: Integer; |
wkIntTo: Integer; |
|
|
|
| 2414 |
ActiveFileName: string; |
ActiveFileName: string; |
| 2415 |
e: IHTMLElement; |
e: IHTMLElement; |
| 2416 |
Ext: string; |
Ext: string; |
| 2417 |
|
buf: string; |
| 2418 |
PathRec: TPathRec; |
PathRec: TPathRec; |
| 2419 |
begin |
begin |
| 2420 |
try |
try |
| 2476 |
tmp2 := GikoSys.ZenToHan(e.Get_outerText); |
tmp2 := GikoSys.ZenToHan(e.Get_outerText); |
| 2477 |
if (GikoSys.IsNumeric(tmp2)) then begin |
if (GikoSys.IsNumeric(tmp2)) then begin |
| 2478 |
//sはレス番号っぽいっす。 |
//sはレス番号っぽいっす。 |
|
wkBBS := GetActiveContent.ParentBoard.BBSID; |
|
|
wkKey := ChangeFileExt(GetActiveContent.FileName, ''); |
|
| 2479 |
wkIntSt := StrToInt(tmp2); |
wkIntSt := StrToInt(tmp2); |
| 2480 |
wkIntTo := StrToInt(tmp2); |
wkIntTo := StrToInt(tmp2); |
| 2481 |
//s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False); |
//s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False); |
| 2482 |
FHint.PopupType := gptThread; |
FHint.PopupType := gptThread; |
| 2483 |
SetResPopupText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False); |
SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False); |
| 2484 |
end else begin |
end else begin |
| 2485 |
FHint.PopupType := gptRaw; |
FHint.PopupType := gptRaw; |
| 2486 |
FHint.Caption := s; |
FHint.Caption := s; |
| 2487 |
end; |
end; |
| 2488 |
end; |
end; |
| 2489 |
end else begin |
end else begin |
| 2490 |
URL := Text; |
if Pos('about:blank..', Text) = 1 then begin |
| 2491 |
|
threadItem := GetActiveContent; |
| 2492 |
if Pos('about:blank..', URL) = 1 then |
if AnsiPos('http://jbbs.shitaraba.com/', threadItem.URL) <> 0 then begin |
| 2493 |
URL := StringReplace(URL, 'about:blank..', 'http://www.2ch.net', []); |
URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL)); |
| 2494 |
|
Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo); |
| 2495 |
|
if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then |
| 2496 |
|
buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo) |
| 2497 |
|
else if( PathRec.FSt <> 0 ) then |
| 2498 |
|
buf := IntToStr(PathRec.FSt); |
| 2499 |
|
end else if AnsiPos('machi.to/bbs/', threadItem.URL) <> 0 then begin |
| 2500 |
|
URL := threaditem.URL; |
| 2501 |
|
buf := Copy(Text,AnsiPos('&st=',Text),Length(Text)-AnsiPos('&st=',Text) + 1); |
| 2502 |
|
end else begin |
| 2503 |
|
URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL)); |
| 2504 |
|
buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text)); |
| 2505 |
|
end; |
| 2506 |
|
URL := URL + buf; |
| 2507 |
|
end else begin |
| 2508 |
|
URL := Text; |
| 2509 |
|
end; |
| 2510 |
PathRec := Gikosys.Parse2chURL2(URL); |
PathRec := Gikosys.Parse2chURL2(URL); |
| 2511 |
|
Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo); |
| 2512 |
|
GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark ); |
| 2513 |
|
|
| 2514 |
if PathRec.FDone then begin |
if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin |
| 2515 |
|
|
| 2516 |
|
URL := GikoSys.GetBrowsableThreadURL( URL ); |
| 2517 |
wkIntSt := PathRec.FSt; |
wkIntSt := PathRec.FSt; |
| 2518 |
wkIntTo := PathRec.FTo; |
wkIntTo := PathRec.FTo; |
| 2519 |
|
|
| 2540 |
if PathRec.FToEnd then |
if PathRec.FToEnd then |
| 2541 |
wkIntTo := 9999; |
wkIntTo := 9999; |
| 2542 |
|
|
| 2543 |
ATitle := ActiveFileName <> PathRec.FKey; |
//ATitle := ActiveFileName <> PathRec.FKey; |
| 2544 |
|
if GetActiveContent.URL = URL then |
| 2545 |
|
ATitle := false |
| 2546 |
|
else |
| 2547 |
|
ATitle := true; |
| 2548 |
|
|
| 2549 |
|
threadItem := BBSsFindThreadFromURL( URL ); |
| 2550 |
|
|
| 2551 |
//HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst); |
if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin |
| 2552 |
FHint.PopupType := gptThread; |
board := BBSs[ 0 ].FindBBSID( PathRec.FBBS ); |
| 2553 |
SetResPopupText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst); |
if board <> nil then begin |
| 2554 |
|
if not board.IsThreadDatRead then |
| 2555 |
|
GikoSys.ReadSubjectFile( board ); |
| 2556 |
|
threadItem := board.FindThreadFromFileName( PathRec.FKey + '.dat' ); |
| 2557 |
|
end; |
| 2558 |
|
end; |
| 2559 |
|
|
| 2560 |
|
if threadItem <> nil then begin |
| 2561 |
|
//HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst); |
| 2562 |
|
FHint.PopupType := gptThread; |
| 2563 |
|
SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst ); |
| 2564 |
|
end; |
| 2565 |
end; |
end; |
| 2566 |
end; |
end; |
| 2567 |
|
|
| 2621 |
procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word; |
procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word; |
| 2622 |
Shift: TShiftState); |
Shift: TShiftState); |
| 2623 |
begin |
begin |
| 2624 |
if Key = VK_BACK then begin |
if GetActiveList is TBoard then begin |
| 2625 |
|
if Key = VK_BACK then begin |
| 2626 |
// UpFolderButtonClick(Sender); |
// UpFolderButtonClick(Sender); |
| 2627 |
end else if Key = VK_SPACE then begin |
end else if Key = VK_SPACE then begin |
| 2628 |
// ListClick; |
ListDoubleClick; |
| 2629 |
end else if Key = VK_RETURN then begin |
end else if Key = VK_RETURN then begin |
| 2630 |
ListDoubleClick; |
ListClick; |
| 2631 |
|
end; |
| 2632 |
|
end else begin // TBBS, TCategory |
| 2633 |
|
if Key = VK_BACK then begin |
| 2634 |
|
// UpFolderButtonClick(Sender); |
| 2635 |
|
end else if Key = VK_SPACE then begin |
| 2636 |
|
ListClick; |
| 2637 |
|
end else if Key = VK_RETURN then begin |
| 2638 |
|
ListDoubleClick; |
| 2639 |
|
end; |
| 2640 |
end; |
end; |
| 2641 |
end; |
end; |
| 2642 |
|
|
| 2649 |
Column: TListColumn); |
Column: TListColumn); |
| 2650 |
var |
var |
| 2651 |
i: Integer; |
i: Integer; |
| 2652 |
wkBBS: TBBS2ch; |
wkBBS: TBBS; |
| 2653 |
wkCategory: TCategory; |
wkCategory: TCategory; |
| 2654 |
wkBoard: TBoard; |
wkBoard: TBoard; |
| 2655 |
begin |
begin |
| 2667 |
|
|
| 2668 |
Sort.SortNoFlag := ListNumberVisibleAction.Checked; |
Sort.SortNoFlag := ListNumberVisibleAction.Checked; |
| 2669 |
|
|
| 2670 |
if TObject(TreeView.Selected.Data) is TBBS2ch then begin |
//if TObject(TreeView.Selected.Data) is TBBS then begin |
| 2671 |
wkBBS := TBBS2ch(TreeView.Selected.Data); |
if TObject( FActiveList ) is TBBS then begin |
| 2672 |
|
//wkBBS := TBBS(TreeView.Selected.Data); |
| 2673 |
|
wkBBS := TBBS( FActiveList ); |
| 2674 |
Sort.SortOrder := FSortOrder; |
Sort.SortOrder := FSortOrder; |
| 2675 |
Sort.SortIndex := Column.Index; |
Sort.SortIndex := Column.Index; |
| 2676 |
wkBBS.Sort(CategorySortProc); |
wkBBS.Sort(CategorySortProc); |
| 2677 |
ListView.Refresh; |
ListView.Refresh; |
| 2678 |
end else if TObject(TreeView.Selected.Data) is TCategory then begin |
//end else if TObject(TreeView.Selected.Data) is TCategory then begin |
| 2679 |
wkCategory := TCategory(TreeView.Selected.Data); |
end else if TObject( FActiveList ) is TCategory then begin |
| 2680 |
|
//wkCategory := TCategory(TreeView.Selected.Data); |
| 2681 |
|
wkCategory := TCategory( FActiveList ); |
| 2682 |
Sort.SortOrder := FSortOrder; |
Sort.SortOrder := FSortOrder; |
| 2683 |
Sort.SortIndex := Column.Index; |
Sort.SortIndex := Column.Index; |
| 2684 |
wkCategory.Sort(BoardSortProc); |
wkCategory.CustomSort(BoardSortProc); |
| 2685 |
ListView.Refresh; |
ListView.Refresh; |
| 2686 |
end else if TObject(TreeView.Selected.Data) is TBoard then begin |
//end else if TObject(TreeView.Selected.Data) is TBoard then begin |
| 2687 |
wkBoard := TBoard(TreeView.Selected.Data); |
end else if TObject( FActiveList ) is TBoard then begin |
| 2688 |
|
//wkBoard := TBoard(TreeView.Selected.Data); |
| 2689 |
|
wkBoard := TBoard( FActiveList ); |
| 2690 |
Sort.SortOrder := FSortOrder; |
Sort.SortOrder := FSortOrder; |
| 2691 |
Sort.SortIndex := Column.Index; |
Sort.SortIndex := Column.Index; |
| 2692 |
wkBoard.Sort(ThreadItemSortProc); |
wkBoard.CustomSort(ThreadItemSortProc); |
| 2693 |
ListView.Refresh; |
ListView.Refresh; |
| 2694 |
end; |
end; |
| 2695 |
FSortIndex := Column.Index; |
FSortIndex := Column.Index; |
| 2742 |
begin |
begin |
| 2743 |
|
|
| 2744 |
if Pos(kMenuName, URL) <> 0 then begin |
if Pos(kMenuName, URL) <> 0 then begin |
| 2745 |
sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) ); |
sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) ); |
| 2746 |
|
|
| 2747 |
if not GikoSys.IsNumeric(sNo) then Exit; |
if not GikoSys.IsNumeric(sNo) then Exit; |
| 2748 |
|
|
| 2749 |
Cancel := True; |
Cancel := True; |
| 2762 |
var |
var |
| 2763 |
ThreadItem: TThreadItem; |
ThreadItem: TThreadItem; |
| 2764 |
begin |
begin |
| 2765 |
DefaultDraw := True; |
// |
| 2766 |
// TListView(Sender).Canvas.Font.Style := []; |
// TListView(Sender).Canvas.Font.Style := []; |
| 2767 |
if TObject(Item.Data) is TThreadItem then begin |
if TObject(Item.Data) is TThreadItem then begin |
| 2768 |
ThreadItem := TThreadItem(Item.Data); |
ThreadItem := TThreadItem(Item.Data); |
| 2769 |
|
if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin |
| 2770 |
|
ListView.Canvas.Brush.Color := FOddColor; |
| 2771 |
|
end else begin |
| 2772 |
|
ListView.Canvas.Brush.Color := FListViewBackGroundColor; |
| 2773 |
|
end; |
| 2774 |
// if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then |
// if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then |
| 2775 |
if ThreadItem.UnRead then |
if ThreadItem.UnRead then |
| 2776 |
TListView(Sender).Canvas.Font.Style := [fsBold]; |
TListView(Sender).Canvas.Font.Style := [fsBold]; |
| 2779 |
|
|
| 2780 |
procedure TGikoForm.AppFormDeactivate(Sender: TObject); |
procedure TGikoForm.AppFormDeactivate(Sender: TObject); |
| 2781 |
begin |
begin |
| 2782 |
|
Application.ProcessMessages; |
| 2783 |
if Application.Terminated then |
if Application.Terminated then |
| 2784 |
Exit; |
Exit; |
| 2785 |
if PreviewTimer.Enabled then |
if PreviewTimer.Enabled then |
| 2817 |
|
|
| 2818 |
TreeView.Canvas.Font.Color := clBlue; |
TreeView.Canvas.Font.Color := clBlue; |
| 2819 |
IsBoardNode := False; |
IsBoardNode := False; |
|
|
|
| 2820 |
for i := 0 to TreeView.Items.Count - 1 do begin |
for i := 0 to TreeView.Items.Count - 1 do begin |
| 2821 |
Cnt := 0; |
Cnt := 0; |
| 2822 |
if not TreeView.Items[i].IsVisible then |
if not TreeView.Items[i].IsVisible then |
| 2916 |
begin |
begin |
| 2917 |
TreeView.Invalidate; |
TreeView.Invalidate; |
| 2918 |
|
|
| 2919 |
if TObject(Node.Data) is TBBS2ch then begin |
if TObject(Node.Data) is TBBS then begin |
| 2920 |
TBBS2ch(Node.Data).NodeExpand := True; |
TBBS(Node.Data).NodeExpand := True; |
| 2921 |
end else if TObject(Node.Data) is TCategory then begin |
end else if TObject(Node.Data) is TCategory then begin |
| 2922 |
TCategory(Node.Data).NodeExpand := True; |
TCategory(Node.Data).NodeExpand := True; |
| 2923 |
end else if TObject(Node.Data) is TBoard then begin |
end else if TObject(Node.Data) is TBoard then begin |
| 2940 |
|
|
| 2941 |
procedure TGikoForm.TreeViewDblClick(Sender: TObject); |
procedure TGikoForm.TreeViewDblClick(Sender: TObject); |
| 2942 |
var |
var |
|
Board: TBoard; |
|
|
ThreadItem: TThreadItem; |
|
| 2943 |
APoint: TPoint; |
APoint: TPoint; |
| 2944 |
HitTest: THitTests; |
HitTest: THitTests; |
| 2945 |
begin |
begin |
| 2947 |
APoint := TreeView.ScreenToClient(APoint); |
APoint := TreeView.ScreenToClient(APoint); |
| 2948 |
HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y); |
HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y); |
| 2949 |
if not (htOnLabel in HitTest) then Exit; |
if not (htOnLabel in HitTest) then Exit; |
|
if TreeView.Selected = nil then Exit; |
|
|
|
|
|
if FTreeType = gtt2ch then begin |
|
|
if not (TObject(TreeView.Selected.Data) is TBoard) then Exit; |
|
|
Board := TBoard(TreeView.Selected.Data); |
|
|
DownloadList(Board); |
|
|
end else if FTreeType = gttHistory then begin |
|
|
if not (TObject(TreeView.Selected.Data) is TThreadItem) then Exit; |
|
|
ThreadItem := TThreadItem(TreeView.Selected.Data); |
|
|
DownloadContent(ThreadItem); |
|
|
end; |
|
|
end; |
|
|
|
|
|
procedure TGikoForm.FavoriteTreeViewClick(Sender: TObject); |
|
|
begin |
|
|
|
|
|
FavoriteClick( TObject( FavoriteTreeView.Selected ) ); |
|
| 2950 |
|
|
| 2951 |
|
TreeDoubleClick( TreeView.Selected ); |
| 2952 |
end; |
end; |
| 2953 |
|
|
| 2954 |
procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon); |
procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon); |
| 2960 |
var |
var |
| 2961 |
ATitle: string; |
ATitle: string; |
| 2962 |
s: string; |
s: string; |
| 2963 |
|
boardPlugIn : TBoardPlugIn; |
| 2964 |
begin |
begin |
| 2965 |
try |
try |
| 2966 |
if Item.DownType = gdtBoard then |
if Item.DownType = gdtBoard then |
| 2976 |
//板 |
//板 |
| 2977 |
Item.SaveListFile; |
Item.SaveListFile; |
| 2978 |
AddMessageList(ATitle + ' [スレ一覧取得完了]', nil, gmiOK); |
AddMessageList(ATitle + ' [スレ一覧取得完了]', nil, gmiOK); |
| 2979 |
if GetActiveList = Item.Board then |
if GetActiveList = Item.Board then begin |
| 2980 |
|
FActiveList := nil; |
| 2981 |
SetActiveList(Item.Board); |
SetActiveList(Item.Board); |
| 2982 |
|
end; |
| 2983 |
Item.Board.Modified := True; |
Item.Board.Modified := True; |
| 2984 |
Item.Board.IsThreadDatRead := True; |
Item.Board.IsThreadDatRead := True; |
| 2985 |
PlaySound('New'); |
PlaySound('New'); |
| 2987 |
//スレ |
//スレ |
| 2988 |
Item.SaveItemFile; |
Item.SaveItemFile; |
| 2989 |
Item.ThreadItem.NewArrival := True; |
Item.ThreadItem.NewArrival := True; |
| 2990 |
if AddHistory(Item.ThreadItem) then begin |
if (Item.ThreadItem.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin |
| 2991 |
if GetActiveContent = Item.ThreadItem then |
boardPlugIn := Item.ThreadItem.BoardPlugIn; |
| 2992 |
InsertBrowserTab(Item.ThreadItem) |
Item.ThreadItem.Title := GikoSys.DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 )).FTitle; |
| 2993 |
else |
ATitle := Item.ThreadItem.Title; |
|
InsertBrowserTab(Item.ThreadItem, False); |
|
| 2994 |
end; |
end; |
| 2995 |
|
if GetActiveContent = Item.ThreadItem then |
| 2996 |
|
InsertBrowserTab(Item.ThreadItem) |
| 2997 |
|
else if (ListView.Selected <> nil ) and ( TObject(ListView.Selected.Data) is TThreadItem ) and ( Item.ThreadItem = TThreadItem(ListView.Selected.Data)) then |
| 2998 |
|
InsertBrowserTab(Item.ThreadItem, True) |
| 2999 |
|
else |
| 3000 |
|
InsertBrowserTab(Item.ThreadItem, False); |
| 3001 |
|
|
| 3002 |
if Item.State = gdsComplete then begin |
if Item.State = gdsComplete then begin |
| 3003 |
PlaySound('New'); |
PlaySound('New'); |
| 3025 |
end;} |
end;} |
| 3026 |
AddMessageList(ATitle + ' [未更新]', nil, gmiSAD); |
AddMessageList(ATitle + ' [未更新]', nil, gmiSAD); |
| 3027 |
PlaySound('NoChange'); |
PlaySound('NoChange'); |
| 3028 |
Screen.Cursor := crDefault; |
Screen.Cursor := crDefault; |
| 3029 |
end else if Item.State = gdsAbort then begin |
end else if Item.State = gdsAbort then begin |
| 3030 |
//中断 |
//中断 |
| 3031 |
AddMessageList(ATitle + ' [中断]', nil, gmiSAD); |
AddMessageList(ATitle + ' [中断]', nil, gmiSAD); |
| 3046 |
if FWorkCount = 0 then begin |
if FWorkCount = 0 then begin |
| 3047 |
try |
try |
| 3048 |
Animate.Active := False; |
Animate.Active := False; |
| 3049 |
except |
finally |
| 3050 |
Screen.Cursor := crDefault; |
Screen.Cursor := crDefault; |
| 3051 |
end; |
end; |
| 3052 |
end; |
end; |
| 3053 |
|
|
| 3054 |
end; |
end; |
| 3055 |
end; |
end; |
| 3056 |
|
|
| 3057 |
procedure TGikoForm.WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer); |
procedure TGikoForm.WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string); |
| 3058 |
begin |
begin |
| 3059 |
// SetProgressValue(Number, 0, AWorkCountMax); |
// SetProgressValue(Number, 0, AWorkCountMax); |
| 3060 |
// ProgressBar.Visible := True; |
// ProgressBar.Visible := True; |
| 3061 |
ProgressBar.Position := 0; |
ProgressBar.Position := 0; |
| 3062 |
ProgressBar.Max := AWorkCountMax; |
ProgressBar.Max := AWorkCountMax; |
| 3063 |
|
FDownloadTitle := AWorkTitle; |
| 3064 |
StatusBar.Panels[1].Text := FDownloadTitle + ' - ダウンロードを開始します'; |
StatusBar.Panels[1].Text := FDownloadTitle + ' - ダウンロードを開始します'; |
| 3065 |
FDownloadMax := AWorkCountMax; |
FDownloadMax := AWorkCountMax; |
| 3066 |
end; |
end; |
| 3129 |
end;} |
end;} |
| 3130 |
|
|
| 3131 |
procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True); |
procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True); |
| 3132 |
|
|
| 3133 |
var |
var |
| 3134 |
i: Integer; |
i: Integer; |
| 3135 |
// OldIndex: Integer; |
// OldIndex: Integer; |
| 3136 |
|
favItem : TFavoriteThreadItem; |
| 3137 |
begin |
begin |
| 3138 |
|
if Threaditem = nil then Exit; |
| 3139 |
|
|
| 3140 |
if ThreadItem.IsLogFile then begin |
if ThreadItem.IsLogFile then begin |
| 3141 |
|
//favItem := TFavoriteThreadItem.CreateWithItem( ThreadItem ); |
| 3142 |
|
favItem := TFavoriteThreadItem.Create(ThreadItem.URL, ThreadItem.Title ); |
| 3143 |
|
if not AddHistory( favItem ) then |
| 3144 |
|
favItem.Free; |
| 3145 |
|
|
| 3146 |
|
|
| 3147 |
for i := 0 to BrowserTab.Tabs.Count - 1 do begin |
for i := 0 to BrowserTab.Tabs.Count - 1 do begin |
| 3148 |
if TObject(BrowserTab.Tabs.Objects[i]) is TThreadItem then begin |
if TObject(BrowserTab.Tabs.Objects[i]) is TThreadItem then begin |
| 3149 |
if TThreadItem(BrowserTab.Tabs.Objects[i]) = ThreadItem then begin |
if TThreadItem(BrowserTab.Tabs.Objects[i]) = ThreadItem then begin |
| 3158 |
end; |
end; |
| 3159 |
end; |
end; |
| 3160 |
end; |
end; |
| 3161 |
|
|
| 3162 |
if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin |
if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin |
| 3163 |
BrowserTab.Tabs.Insert(0, GikoSys.GetShortName(ThreadItem.Title, 20)); |
BrowserTab.Tabs.Insert(0, GikoSys.GetShortName(ThreadItem.Title, 20)); |
| 3164 |
BrowserTab.Tabs.Objects[0] := ThreadItem; |
BrowserTab.Tabs.Objects[0] := ThreadItem; |
| 3165 |
if ActiveTab then |
if ActiveTab then |
| 3166 |
BrowserTab.TabIndex := 0; |
BrowserTab.TabIndex := 0; |
| 3167 |
|
|
| 3168 |
end else begin |
end else begin |
| 3169 |
i := BrowserTab.Tabs.Add(GikoSys.GetShortName(ThreadItem.Title, 20)); |
i := BrowserTab.Tabs.Add(GikoSys.GetShortName(ThreadItem.Title, 20)); |
| 3170 |
BrowserTab.Tabs.Objects[i] := ThreadItem; |
BrowserTab.Tabs.Objects[i] := ThreadItem; |
| 3171 |
if ActiveTab then |
if ActiveTab then |
| 3172 |
BrowserTab.TabIndex := i; |
BrowserTab.TabIndex := i; |
| 3173 |
end; |
end; |
| 3174 |
if ActiveTab then begin |
if ( ActiveTab ) or ( BrowserTab.Tabs.Count = 1 ) then begin |
| 3175 |
BrowserTab.OnChange(nil); |
BrowserTab.OnChange(nil); |
| 3176 |
BrowserNullTab := nil; |
BrowserNullTab := nil; |
| 3177 |
end; |
end; |
| 3184 |
end; |
end; |
| 3185 |
BrowserTab.Repaint; |
BrowserTab.Repaint; |
| 3186 |
if GikoSys.Setting.URLDisplay then |
if GikoSys.Setting.URLDisplay then |
| 3187 |
AddressComboBox.Text := GikoSys.GetURL(ThreadItem.ParentBoard.BBSID, ThreadItem.FileName); |
AddressComboBox.Text := ThreadItem.URL; |
| 3188 |
end; |
end; |
| 3189 |
|
|
| 3190 |
procedure TGikoForm.SetContent(ThreadItem: TThreadItem); |
procedure TGikoForm.SetContent(ThreadItem: TThreadItem); |
| 3195 |
// HtmlName: string; |
// HtmlName: string; |
| 3196 |
doc: Variant; |
doc: Variant; |
| 3197 |
s: string; |
s: string; |
| 3198 |
OldCursor: TCursor; |
// OldCursor: TCursor; |
| 3199 |
//i: Integer; |
//i: Integer; |
| 3200 |
begin |
begin |
| 3201 |
while (Browser.ReadyState <> READYSTATE_COMPLETE) and |
while (Browser.ReadyState <> READYSTATE_COMPLETE) and |
| 3203 |
Application.ProcessMessages; |
Application.ProcessMessages; |
| 3204 |
end; |
end; |
| 3205 |
|
|
| 3206 |
if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin |
if (FActiveContent <> nil) and |
| 3207 |
|
(FActiveContent <> ThreadItem) and |
| 3208 |
|
(Assigned(Browser.Document)) then begin |
| 3209 |
try |
try |
| 3210 |
try |
try |
| 3211 |
Sleep(1); |
Sleep(1); |
| 3212 |
Application.ProcessMessages; |
//Application.ProcessMessages; |
| 3213 |
FActiveContent.ScrollTop := OleVariant(IHTMLDocument2(Browser.Document)).Body.ScrollTop; |
FActiveContent.ScrollTop := OleVariant(IHTMLDocument2(Browser.Document)).Body.ScrollTop; |
| 3214 |
except |
except |
| 3215 |
on E: Exception do |
on E: Exception do |
| 3264 |
finally |
finally |
| 3265 |
end; |
end; |
| 3266 |
end else begin |
end else begin |
|
//Application.ProcessMessages; |
|
| 3267 |
GikoSys.CreateHTML2(Browser.Document, ThreadItem, sTitle); |
GikoSys.CreateHTML2(Browser.Document, ThreadItem, sTitle); |
| 3268 |
|
{ |
| 3269 |
while (Browser.ReadyState <> READYSTATE_COMPLETE) and |
while (Browser.ReadyState <> READYSTATE_COMPLETE) and |
| 3270 |
(Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin |
(Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin |
| 3271 |
Application.ProcessMessages; |
Application.ProcessMessages; |
| 3272 |
end; |
end; |
| 3273 |
//Sleep(1); |
} |
| 3274 |
Application.ProcessMessages; |
try |
| 3275 |
try |
doc := Browser.Document; |
| 3276 |
if ThreadItem.UnRead then |
Application.ProcessMessages; |
| 3277 |
BrowserMovement('new'); |
//ここでApplication.ProcessMessagesを呼ぶことによってWebBrowserを更新させる。 |
| 3278 |
except |
//相しないと一画面分しか描画できてないのでそれ以上のスクロール量を指定しても無効になる |
| 3279 |
end; |
// byもじゅ(2004/01/20) |
| 3280 |
if (ThreadItem.ScrollTop <> 0) and (not ThreadItem.UnRead) then begin |
|
| 3281 |
//i := 0; |
if ThreadItem.UnRead then |
| 3282 |
try |
BrowserMovement('new') |
| 3283 |
try |
else if (ThreadItem.ScrollTop <> 0) and (not ThreadItem.UnRead) then begin |
| 3284 |
doc := Browser.Document; |
try |
| 3285 |
doc.Body.ScrollTop := ThreadItem.ScrollTop; |
doc.Body.ScrollTop := ThreadItem.ScrollTop; |
| 3286 |
except |
except |
| 3287 |
on E: Exception do |
on E: Exception do |
| 3288 |
MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0); |
MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0); |
| 3289 |
end; |
end; |
| 3290 |
finally |
end; |
| 3291 |
end; |
finally |
| 3292 |
end; |
// Application.ProcessMessages; |
| 3293 |
|
end; |
| 3294 |
|
|
| 3295 |
ThreadItem.UnRead := False; |
ThreadItem.UnRead := False; |
| 3296 |
ListView.Refresh; |
ListView.Refresh; |
| 3297 |
end; |
end; |
| 3336 |
|
|
| 3337 |
procedure TGikoForm.SetActiveList(Obj: TObject); |
procedure TGikoForm.SetActiveList(Obj: TObject); |
| 3338 |
var |
var |
| 3339 |
i: Integer; |
i : Integer; |
| 3340 |
|
idx : Integer; |
| 3341 |
begin |
begin |
| 3342 |
FActiveList := Obj; |
// if FActiveList <> Obj then begin |
| 3343 |
|
FActiveList := Obj; |
| 3344 |
|
|
| 3345 |
if Obj is TBBS2ch then begin |
if ListView.Selected <> nil then |
| 3346 |
for i := 0 to ListView.Columns.Count - 1 do |
idx := ListView.Selected.Index |
| 3347 |
ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i]; |
else |
| 3348 |
SetCategoryListItem(TBBS2ch(Obj)); |
idx := -1; |
| 3349 |
end else if Obj is TCategory then begin |
ListView.Items.Count := 0; |
| 3350 |
for i := 0 to ListView.Columns.Count - 1 do |
ListView.Items.Clear; |
| 3351 |
ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i]; |
ListView.Selected := nil; |
| 3352 |
SetBoardListItem(TCategory(Obj)); |
// ListView.Columns.Clear; |
| 3353 |
end else if Obj is TBoard then begin |
|
| 3354 |
// SetThreadListItem 呼ぶならいらないんじゃねぇ? |
Caption := CAPTION_NAME; |
| 3355 |
{ |
//Application.Title := CAPTION_NAME; |
| 3356 |
for i := 0 to ListView.Columns.Count - 1 do |
|
| 3357 |
ListView.Column[i].Width := GikoSys.Setting.BoardColumnWidth[i]; |
if Obj is TBBS then begin |
| 3358 |
} |
for i := 0 to ListView.Columns.Count - 1 do |
| 3359 |
SetThreadListItem(TBoard(Obj)); |
ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i]; |
| 3360 |
|
SetCategoryListItem(TBBS(Obj)); |
| 3361 |
|
end else if Obj is TCategory then begin |
| 3362 |
|
for i := 0 to ListView.Columns.Count - 1 do |
| 3363 |
|
ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i]; |
| 3364 |
|
SetBoardListItem(TCategory(Obj)); |
| 3365 |
|
end else if Obj is TBoard then begin |
| 3366 |
|
SetThreadListItem(TBoard(Obj)); |
| 3367 |
|
end; |
| 3368 |
|
|
| 3369 |
|
if idx >= 0 then begin |
| 3370 |
|
ListView.ItemIndex := idx; |
| 3371 |
|
ListView.ItemFocused := ListView.Items.Item[ idx ]; |
| 3372 |
|
end; |
| 3373 |
|
// end; |
| 3374 |
|
|
| 3375 |
|
if Obj is TBoard then begin |
| 3376 |
|
if GikoSys.Setting.ListOrientation = gloHorizontal then begin |
| 3377 |
|
if GikoSys.Setting.ListWidthState = glsMax then begin |
| 3378 |
|
BrowserMinAction.Execute; |
| 3379 |
|
if GikoForm.Visible then |
| 3380 |
|
ListView.SetFocus; |
| 3381 |
|
end; |
| 3382 |
|
end else begin |
| 3383 |
|
if GikoSys.Setting.ListHeightState = glsMax then begin |
| 3384 |
|
BrowserMinAction.Execute; |
| 3385 |
|
if GikoForm.Visible then |
| 3386 |
|
ListView.SetFocus; |
| 3387 |
|
end; |
| 3388 |
|
end; |
| 3389 |
end; |
end; |
| 3390 |
end; |
end; |
| 3391 |
|
|
| 3409 |
if ActiveList is TBoard then begin |
if ActiveList is TBoard then begin |
| 3410 |
Board := TBoard(ActiveList); |
Board := TBoard(ActiveList); |
| 3411 |
|
|
| 3412 |
Board.ParentCategory.ParentBBS2ch.SelectText := SelectText; |
Board.ParentCategory.ParenTBBS.SelectText := SelectText; |
| 3413 |
Board.ParentCategory.ParentBBS2ch.KubetsuChk := KubetsuChk; |
Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk; |
| 3414 |
// Board.SelectText := SelectText; |
// Board.SelectText := SelectText; |
| 3415 |
// Board.KubetsuChk := KubetsuChk; |
// Board.KubetsuChk := KubetsuChk; |
| 3416 |
ViewType := AViewType; |
ViewType := AViewType; |
| 3449 |
ListView.Canvas.Font.Color := clNavy; |
ListView.Canvas.Font.Color := clNavy; |
| 3450 |
s := 'このビューにはタイトルが「%s」を含むアイテムがありません。'; |
s := 'このビューにはタイトルが「%s」を含むアイテムがありません。'; |
| 3451 |
if GetActiveList is TBoard then |
if GetActiveList is TBoard then |
| 3452 |
s := Format(s, [TBoard(GetActiveList).ParentCategory.ParentBBS2ch.SelectText]); |
s := Format(s, [TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText]); |
| 3453 |
// SelectText]); |
// SelectText]); |
| 3454 |
end; |
end; |
| 3455 |
else begin |
else begin |
| 3469 |
var |
var |
| 3470 |
Item: TDownloadItem; |
Item: TDownloadItem; |
| 3471 |
begin |
begin |
|
if Board.Title = '' then |
|
|
FDownloadTitle := '(名称不明)' |
|
|
else |
|
|
FDownloadTitle := Board.Title; |
|
|
|
|
| 3472 |
if not Board.IsThreadDatRead then |
if not Board.IsThreadDatRead then |
| 3473 |
GikoSys.ReadSubjectFile(Board); |
GikoSys.ReadSubjectFile(Board); |
| 3474 |
Item := TDownloadItem.Create; |
Item := TDownloadItem.Create; |
| 3498 |
var |
var |
| 3499 |
Item: TDownloadItem; |
Item: TDownloadItem; |
| 3500 |
begin |
begin |
|
if ThreadItem.Title = '' then |
|
|
FDownloadTitle := '(名称不明)' |
|
|
else |
|
|
FDownloadTitle := ThreadItem.Title; |
|
| 3501 |
Item := TDownloadItem.Create; |
Item := TDownloadItem.Create; |
| 3502 |
try |
try |
| 3503 |
Item.ThreadItem := ThreadItem; |
Item.ThreadItem := ThreadItem; |
| 3536 |
end; |
end; |
| 3537 |
end; |
end; |
| 3538 |
|
|
| 3539 |
function TGikoForm.AddHistory(ThreadItem: TThreadItem): Boolean; |
function TGikoForm.AddHistory( favItem : TFavoriteThreadItem ): Boolean; |
| 3540 |
var |
var |
| 3541 |
i: Integer; |
i: Integer; |
| 3542 |
Item: TThreadItem; |
Item: TFavoriteThreadItem; |
| 3543 |
Node: TTreeNode; |
Node: TTreeNode; |
| 3544 |
begin |
begin |
| 3545 |
// Result := False; |
// Result := False; |
| 3550 |
// Exit; |
// Exit; |
| 3551 |
|
|
| 3552 |
Result := True; |
Result := True; |
| 3553 |
item := nil; |
if FTreeType = gttHistory then |
| 3554 |
|
TreeView.Selected := nil; |
| 3555 |
|
|
| 3556 |
for i := 0 to FHistoryList.Count - 1 do begin |
for i := 0 to FHistoryList.Count - 1 do begin |
| 3557 |
if TObject(FHistoryList[i]) is TThreadItem then begin |
if TObject(FHistoryList[i]) is TFavoriteThreadItem then begin |
| 3558 |
Item := TThreadItem(FHistoryList[i]); |
Item := TFavoriteThreadItem(FHistoryList[i]); |
| 3559 |
if Item = ThreadItem then begin |
if Item.URL = favItem.URL then begin |
| 3560 |
// SetContent(ThreadItem); |
// SetContent(ThreadItem); |
| 3561 |
FHistoryList.Move(i, 0); |
FHistoryList.Move(i, 0); |
| 3562 |
|
if FTreeType = gttHistory then |
| 3563 |
|
if TreeView.TopItem <> TreeView.Items[ i ] then |
| 3564 |
|
TreeView.Items[ i ].MoveTo( TreeView.TopItem, naInsert ); |
| 3565 |
|
Result := false; |
| 3566 |
Exit; |
Exit; |
| 3567 |
end; |
end; |
| 3568 |
end; |
end; |
| 3569 |
end; |
end; |
| 3570 |
FHistoryList.Add(ThreadItem); |
|
| 3571 |
|
if FHistoryList.Count > 0 then |
| 3572 |
|
FHistoryList.Insert( 0, favItem ) |
| 3573 |
|
else |
| 3574 |
|
FHistoryList.Add( favItem ); |
| 3575 |
// SetContent(ThreadItem); |
// SetContent(ThreadItem); |
| 3576 |
|
|
| 3577 |
if FTreeType = gttHistory then begin |
if FTreeType = gttHistory then begin |
| 3578 |
Node := TreeView.Items.Add(nil, ThreadItem.Title); |
Node := TreeView.Items.Add( nil, favItem.Title ); |
| 3579 |
if Item.NewArrival then begin |
Node.MoveTo( TreeView.TopItem, naInsert ); |
| 3580 |
|
{ |
| 3581 |
|
if favItem.NewArrival then begin |
| 3582 |
Node.ImageIndex := ITEM_ICON_THREADNEW1; |
Node.ImageIndex := ITEM_ICON_THREADNEW1; |
| 3583 |
Node.SelectedIndex := ITEM_ICON_THREADNEW2; |
Node.SelectedIndex := ITEM_ICON_THREADNEW2; |
| 3584 |
end else begin |
end else begin |
| 3585 |
Node.ImageIndex := ITEM_ICON_THREADLOG1; |
Node.ImageIndex := ITEM_ICON_THREADLOG1; |
| 3586 |
Node.SelectedIndex := ITEM_ICON_THREADLOG2; |
Node.SelectedIndex := ITEM_ICON_THREADLOG2; |
| 3587 |
end; |
end; |
| 3588 |
Node.Data := ThreadItem; |
} |
| 3589 |
|
// 負荷をかけたくないので NewArrival のチェックを行わない |
| 3590 |
|
// ※favItem.Item プロパティは dat の読み込みを必要とする |
| 3591 |
|
Node.ImageIndex := ITEM_ICON_THREADLOG1; |
| 3592 |
|
Node.SelectedIndex := ITEM_ICON_THREADLOG2; |
| 3593 |
|
Node.Data := favItem; |
| 3594 |
end; |
end; |
| 3595 |
end; |
end; |
| 3596 |
|
|
| 3597 |
procedure TGikoForm.DeleteHistory(ThreadItem: TThreadItem); |
procedure TGikoForm.DeleteHistory( threadItem: TThreadItem ); |
| 3598 |
var |
var |
| 3599 |
i: Integer; |
i: Integer; |
| 3600 |
begin |
begin |
| 3601 |
for i := 0 to FHistoryList.Count - 1 do begin |
for i := 0 to FHistoryList.Count - 1 do begin |
| 3602 |
if ThreadItem = FHistoryList.Items[i] then begin |
if threadItem.URL = TFavoriteThreadItem( FHistoryList.Items[i] ).URL then begin |
| 3603 |
|
TFavoriteThreadItem( FHistoryList.Items[ i ] ).Free; |
| 3604 |
FHistoryList.Delete(i); |
FHistoryList.Delete(i); |
| 3605 |
|
FHistoryList.Capacity := FHistoryList.Count; |
| 3606 |
Break; |
Break; |
| 3607 |
end; |
end; |
| 3608 |
end; |
end; |
| 3609 |
end; |
end; |
| 3610 |
|
|
| 3611 |
procedure TGikoForm.ClearHistory; |
procedure TGikoForm.ClearHistory; |
| 3612 |
|
var |
| 3613 |
|
i : Integer; |
| 3614 |
begin |
begin |
| 3615 |
|
//FHistoryList.Clear; |
| 3616 |
|
|
| 3617 |
|
try |
| 3618 |
|
for i := FHistoryList.Count - 1 downto 0 do begin |
| 3619 |
|
if TObject(FHistoryList[ i ]) is TFavoriteThreadItem then |
| 3620 |
|
TFavoriteThreadItem(FHistoryList[ i ]).Free |
| 3621 |
|
else if TObject(FHistoryList[ i ]) is TFavoriteBoardItem then |
| 3622 |
|
TFavoriteBoardItem(FHistoryList[ i ]).Free; |
| 3623 |
|
|
| 3624 |
|
//FHistoryList.Delete(i); |
| 3625 |
|
end; |
| 3626 |
|
except |
| 3627 |
|
end; |
| 3628 |
|
|
| 3629 |
FHistoryList.Clear; |
FHistoryList.Clear; |
| 3630 |
|
FHistoryList.Capacity := FHistoryList.Count; |
| 3631 |
|
|
| 3632 |
end; |
end; |
| 3633 |
|
|
| 3634 |
procedure TGikoForm.Show2chTree; |
procedure TGikoForm.SaveHistory; |
| 3635 |
var |
var |
| 3636 |
i: Integer; |
i, bound : Integer; |
| 3637 |
|
saveList : TstringList; |
| 3638 |
begin |
begin |
|
GikoSys.Setting.CabinetIndex := 0; |
|
| 3639 |
|
|
| 3640 |
FavoriteTreeView.Visible := False; |
saveList := TStringList.Create; |
| 3641 |
FavoriteToolBar.Hide; |
try |
| 3642 |
TreeView.Visible := True; |
FHistoryList.Pack; |
| 3643 |
|
FHistoryList.Capacity := FHistoryList.Count; |
| 3644 |
|
saveList.Add('<?xml version="1.0" encoding="Shift_JIS" standalone="yes"?>'); |
| 3645 |
|
saveList.Add('<address>'); |
| 3646 |
|
bound := FHistoryList.Count - 1; |
| 3647 |
|
for i := bound downto 0 do begin |
| 3648 |
|
// title は今のところ使っていない |
| 3649 |
|
saveList.Add( |
| 3650 |
|
'<history url="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).URL ) + '"' + |
| 3651 |
|
' title="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).Title ) + '"/>'); |
| 3652 |
|
end; |
| 3653 |
|
saveList.Add('</address>'); |
| 3654 |
|
saveList.SaveToFile( GikoSys.GetConfigDir + 'History.xml' ); |
| 3655 |
|
finally |
| 3656 |
|
saveList.Free; |
| 3657 |
|
end; |
| 3658 |
|
|
| 3659 |
CabinetSelectToolButton.Caption := '2ちゃんねる'; |
end; |
| 3660 |
|
|
| 3661 |
Cabinet2chAction.Checked := True; |
procedure TGikoForm.LoadHistory; |
| 3662 |
CabinetHistoryAction.Checked := False; |
var |
| 3663 |
CabinetFavoriteAction.Checked := False; |
i, bound : Integer; |
| 3664 |
|
fileName : string; |
| 3665 |
if FTreeType <> gtt2ch then begin |
XMLDoc : IXMLDocument; |
| 3666 |
FTreeType := gtt2ch; |
XMLNode : IXMLNode; |
| 3667 |
HistoryToolBar.Hide; |
HistoryNode : IXMLNode; |
| 3668 |
SetBoardTreeNode; |
s : string; |
| 3669 |
TreeView.TopItem.Expanded := True; //ツリートップ項目だけを開く |
favItem : TFavoriteThreadItem; |
| 3670 |
//TreeView.Selected := TreeView.Items[0]; //ツリーのトップ項目を選択する |
begin |
| 3671 |
if GetActiveList = nil then |
|
| 3672 |
TreeView.Selected := TreeView.Items[0] |
fileName := GikoSys.GetConfigDir + 'History.xml'; |
| 3673 |
else begin |
|
| 3674 |
for i := 0 to TreeView.Items.Count - 1 do begin |
if FileExists( fileName ) then begin |
| 3675 |
if TreeView.Items[i].Data = GetActiveList then |
try |
| 3676 |
TreeView.Selected := TreeView.Items[i]; |
XMLDoc := IXMLDocument.Create; |
| 3677 |
|
//XMLDoc := LoadXMLDocument(FileName); |
| 3678 |
|
LoadXMLDocument(FileName, XMLDoc); |
| 3679 |
|
try |
| 3680 |
|
XMLNode := XMLDoc.DocumentElement; |
| 3681 |
|
|
| 3682 |
|
if XMLNode.NodeName = 'address' then begin |
| 3683 |
|
bound := XMLNode.ChildNodes.Count - 1; |
| 3684 |
|
for i := 0 to bound do begin |
| 3685 |
|
HistoryNode := XMLNode.ChildNodes[i]; |
| 3686 |
|
if HistoryNode.NodeName = 'history' then begin |
| 3687 |
|
//if FReadCount >= sl.Count then begin |
| 3688 |
|
s := Trim(HistoryNode.Attributes['url']); |
| 3689 |
|
if s <> '' then begin |
| 3690 |
|
favItem := TFavoriteThreadItem.Create( |
| 3691 |
|
s, HistoryNode.Attributes[ 'title' ] ); |
| 3692 |
|
if not AddHistory( favItem ) then |
| 3693 |
|
favItem.Free; |
| 3694 |
|
end; |
| 3695 |
|
//end; |
| 3696 |
|
end; |
| 3697 |
|
end; |
| 3698 |
|
end; |
| 3699 |
|
finally |
| 3700 |
|
XMLDoc.Free; |
| 3701 |
|
end; |
| 3702 |
|
except |
| 3703 |
|
end; |
| 3704 |
|
end; |
| 3705 |
|
|
| 3706 |
|
end; |
| 3707 |
|
|
| 3708 |
|
procedure TGikoForm.ShowBBSTreeOld( |
| 3709 |
|
inBBS : TBBS |
| 3710 |
|
); |
| 3711 |
|
var |
| 3712 |
|
i, b : Integer; |
| 3713 |
|
item : TMenuItem; |
| 3714 |
|
begin |
| 3715 |
|
try |
| 3716 |
|
FavoriteTreeView.Visible := False; |
| 3717 |
|
FavoriteToolBar.Hide; |
| 3718 |
|
TreeView.Visible := True; |
| 3719 |
|
|
| 3720 |
|
b := CabinetSelectPopupMenu.Items.Count - 1; |
| 3721 |
|
for i := 0 to b do begin |
| 3722 |
|
item := CabinetSelectPopupMenu.Items[ i ]; |
| 3723 |
|
if item is TBBSMenuItem then begin |
| 3724 |
|
if TBBSMenuItem( item ).Data = inBBS then begin |
| 3725 |
|
item.Checked := True; |
| 3726 |
|
// CabinetMenu ?? CabinetSelectPopupMenu ?????????????? |
| 3727 |
|
CabinetMenu.Items[ i ].Checked := True; |
| 3728 |
|
GikoSys.Setting.CabinetIndex := i; |
| 3729 |
|
Continue; |
| 3730 |
|
end; |
| 3731 |
|
end; |
| 3732 |
|
item.Checked := False; |
| 3733 |
|
// CabinetMenu ?? CabinetSelectPopupMenu ?????????????? |
| 3734 |
|
CabinetMenu.Items[ i ].Checked := False; |
| 3735 |
|
end; |
| 3736 |
|
CabinetSelectToolButton.Caption := inBBS.Title; |
| 3737 |
|
|
| 3738 |
|
CabinetHistoryAction.Checked := False; |
| 3739 |
|
CabinetFavoriteAction.Checked := False; |
| 3740 |
|
|
| 3741 |
|
if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin |
| 3742 |
|
FTreeType := gtt2ch; |
| 3743 |
|
HistoryToolBar.Hide; |
| 3744 |
|
SetBoardTreeNode( inBBS ); |
| 3745 |
|
TreeView.TopItem.Expanded := True; //?c???[?g?b?v???????J?? |
| 3746 |
|
//?c???[??g?b?v?????I???? |
| 3747 |
|
if GetActiveList = nil then |
| 3748 |
|
TreeView.Selected := TreeView.Items[0] |
| 3749 |
|
else begin |
| 3750 |
|
for i := 0 to TreeView.Items.Count - 1 do begin |
| 3751 |
|
if TreeView.Items[i].Data = GetActiveList then begin |
| 3752 |
|
TreeView.Selected := TreeView.Items[i]; |
| 3753 |
|
Exit; |
| 3754 |
|
end; |
| 3755 |
|
end; |
| 3756 |
|
TreeView.Selected := TreeView.Items[0] |
| 3757 |
|
end; |
| 3758 |
|
end; |
| 3759 |
|
except |
| 3760 |
|
end; |
| 3761 |
|
|
| 3762 |
|
end; |
| 3763 |
|
|
| 3764 |
|
procedure TGikoForm.ShowBBSTree( |
| 3765 |
|
inBBS : TBBS |
| 3766 |
|
); |
| 3767 |
|
var |
| 3768 |
|
i, b : Integer; |
| 3769 |
|
item : TMenuItem; |
| 3770 |
|
begin |
| 3771 |
|
|
| 3772 |
|
try |
| 3773 |
|
FavoriteTreeView.Visible := False; |
| 3774 |
|
FavoriteToolBar.Hide; |
| 3775 |
|
TreeView.Visible := True; |
| 3776 |
|
|
| 3777 |
|
b := CabinetSelectPopupMenu.Items.Count - 1; |
| 3778 |
|
for i := 0 to b do begin |
| 3779 |
|
item := CabinetSelectPopupMenu.Items[ i ]; |
| 3780 |
|
if item is TBBSMenuItem then begin |
| 3781 |
|
if TBBSMenuItem( item ).Data = inBBS then begin |
| 3782 |
|
item.Checked := True; |
| 3783 |
|
// CabinetMenu は CabinetSelectPopupMenu と同じと決めうちしちゃう |
| 3784 |
|
CabinetMenu.Items[ i ].Checked := True; |
| 3785 |
|
GikoSys.Setting.CabinetIndex := i; |
| 3786 |
|
Continue; |
| 3787 |
|
end; |
| 3788 |
|
end; |
| 3789 |
|
item.Checked := False; |
| 3790 |
|
// CabinetMenu は CabinetSelectPopupMenu と同じと決めうちしちゃう |
| 3791 |
|
CabinetMenu.Items[ i ].Checked := False; |
| 3792 |
|
end; |
| 3793 |
|
CabinetSelectToolButton.Caption := inBBS.Title; |
| 3794 |
|
|
| 3795 |
|
CabinetHistoryAction.Checked := False; |
| 3796 |
|
CabinetFavoriteAction.Checked := False; |
| 3797 |
|
|
| 3798 |
|
if (FTreeType <> gtt2ch) or (FActiveBBS <> inBBS) then begin |
| 3799 |
|
FTreeType := gtt2ch; |
| 3800 |
|
HistoryToolBar.Hide; |
| 3801 |
|
SetBoardTreeNode( inBBS ); |
| 3802 |
|
TreeView.TopItem.Expanded := True; //ツリートップ項目だけを開く |
| 3803 |
|
//ツリーのトップ項目を選択する |
| 3804 |
|
if GetActiveList = nil then begin |
| 3805 |
|
try |
| 3806 |
|
TreeClick( TreeView.Items[0] ); |
| 3807 |
|
except |
| 3808 |
|
end; |
| 3809 |
|
end else begin |
| 3810 |
|
for i := 0 to TreeView.Items.Count - 1 do begin |
| 3811 |
|
if TreeView.Items[i].Data = GetActiveList then begin |
| 3812 |
|
TreeClick( TreeView.Items[i] ); |
| 3813 |
|
Exit; |
| 3814 |
|
end; |
| 3815 |
|
end; |
| 3816 |
|
TreeClick( TreeView.Items[0] ); |
| 3817 |
end; |
end; |
| 3818 |
end; |
end; |
| 3819 |
|
except |
| 3820 |
end; |
end; |
| 3821 |
|
|
| 3822 |
end; |
end; |
| 3823 |
|
|
| 3824 |
procedure TGikoForm.ShowHistoryTree; |
procedure TGikoForm.ShowHistoryTree; |
| 3825 |
|
var |
| 3826 |
|
i, b : Integer; |
| 3827 |
|
item : TMenuItem; |
| 3828 |
begin |
begin |
| 3829 |
GikoSys.Setting.CabinetIndex := 1; |
if CabinetPanel.Visible then begin |
| 3830 |
|
if FTreeType = gttHistory then begin |
| 3831 |
|
CabinetVisible( False ); |
| 3832 |
|
CabinetHistoryAction.Checked := False; |
| 3833 |
|
end else begin |
| 3834 |
|
CabinetHistoryAction.Checked := True; |
| 3835 |
|
end; |
| 3836 |
|
end else begin |
| 3837 |
|
CabinetVisible( True ); |
| 3838 |
|
CabinetHistoryAction.Checked := True; |
| 3839 |
|
end; |
| 3840 |
|
|
| 3841 |
|
// BBS...BBS, History, Favorite |
| 3842 |
|
GikoSys.Setting.CabinetIndex := CabinetSelectPopupMenu.Items.Count - 2; |
| 3843 |
|
|
| 3844 |
FavoriteTreeView.Visible := False; |
FavoriteTreeView.Visible := False; |
| 3845 |
TreeView.Visible := True; |
TreeView.Visible := True; |
| 3846 |
|
|
| 3847 |
|
CabinetBBSAction.Checked := False; |
| 3848 |
|
CabinetFavoriteAction.Checked := False; |
| 3849 |
|
|
|
Cabinet2chAction.Checked := False; |
|
|
CabinetHistoryAction.Checked := True; |
|
|
CabinetFavoriteAction.Checked := False; |
|
|
|
|
| 3850 |
if FTreeType <> gttHistory then begin |
if FTreeType <> gttHistory then begin |
| 3851 |
|
b := CabinetSelectPopupMenu.Items.Count - 1; |
| 3852 |
|
for i := 0 to b do begin |
| 3853 |
|
item := CabinetSelectPopupMenu.Items[ i ]; |
| 3854 |
|
if item is TBBSMenuItem then begin |
| 3855 |
|
item.Checked := False; |
| 3856 |
|
// CabinetMenu は CabinetSelectPopupMenu と同じと決めうちしちゃう |
| 3857 |
|
CabinetMenu.Items[ i ].Checked := False; |
| 3858 |
|
end; |
| 3859 |
|
end; |
| 3860 |
|
|
| 3861 |
FTreeType := gttHistory; |
FTreeType := gttHistory; |
| 3862 |
HistoryToolBar.Show; |
HistoryToolBar.Show; |
| 3863 |
FavoriteToolBar.Hide; |
FavoriteToolBar.Hide; |
| 3864 |
SetHistoryTreeNode; |
SetHistoryTreeNode; |
| 3865 |
CabinetSelectToolButton.Caption := '履歴リスト'; |
CabinetSelectToolButton.Caption := '履歴リスト'; |
| 3866 |
end; |
end; |
| 3870 |
var |
var |
| 3871 |
i: Integer; |
i: Integer; |
| 3872 |
Node: TTreeNode; |
Node: TTreeNode; |
| 3873 |
Item: TThreadItem; |
Item: TFavoriteThreadItem; |
| 3874 |
begin |
begin |
| 3875 |
TreeView.Items.BeginUpdate; |
TreeView.Items.BeginUpdate; |
| 3876 |
try |
try |
| 3877 |
TreeView.Items.Clear; |
TreeView.Items.Clear; |
| 3878 |
for i := 0 to FHistoryList.Count - 1 do begin |
for i := 0 to FHistoryList.Count - 1 do begin |
| 3879 |
Item := TThreadItem(FHistoryList[i]); |
Item := TFavoriteThreadItem(FHistoryList[i]); |
| 3880 |
Node := TreeView.Items.Add(nil, Item.Title); |
Node := TreeView.Items.Add(nil, Item.Title); |
| 3881 |
|
{ |
| 3882 |
if Item.NewArrival then begin |
if Item.Item.NewArrival then begin |
| 3883 |
Node.ImageIndex := ITEM_ICON_THREADNEW1; |
Node.ImageIndex := ITEM_ICON_THREADNEW1; |
| 3884 |
Node.SelectedIndex := ITEM_ICON_THREADNEW2; |
Node.SelectedIndex := ITEM_ICON_THREADNEW2; |
| 3885 |
end else begin |
end else begin |
| 3886 |
Node.ImageIndex := ITEM_ICON_THREADLOG1; |
Node.ImageIndex := ITEM_ICON_THREADLOG1; |
| 3887 |
Node.SelectedIndex := ITEM_ICON_THREADLOG2; |
Node.SelectedIndex := ITEM_ICON_THREADLOG2; |
| 3888 |
end; |
end; |
| 3889 |
|
} |
| 3890 |
|
// 負荷をかけたくないので NewArrival のチェックを行わない |
| 3891 |
|
// ※Item.Item プロパティは dat の読み込みを必要とする |
| 3892 |
|
Node.ImageIndex := ITEM_ICON_THREADLOG1; |
| 3893 |
|
Node.SelectedIndex := ITEM_ICON_THREADLOG2; |
| 3894 |
Node.Data := Item; |
Node.Data := Item; |
| 3895 |
end; |
end; |
| 3896 |
finally |
finally |
| 3903 |
ChangeEvent: TTVChangedEvent; |
ChangeEvent: TTVChangedEvent; |
| 3904 |
ChangingEvent: TTVChangingEvent; |
ChangingEvent: TTVChangingEvent; |
| 3905 |
i: Integer; |
i: Integer; |
| 3906 |
|
bbs : TBBS; |
| 3907 |
begin |
begin |
| 3908 |
ChangeEvent := nil; |
if Item is TCategory then |
| 3909 |
|
bbs := TCategory( Item ).ParenTBBS |
| 3910 |
|
else if Item is TBoard then |
| 3911 |
|
bbs := TBoard( Item ).ParentCategory.ParenTBBS |
| 3912 |
|
else |
| 3913 |
|
bbs := nil; |
| 3914 |
|
|
| 3915 |
|
if (FTreeType = gtt2ch) and (FActiveBBS = bbs) then begin |
| 3916 |
|
ChangeEvent := nil; |
| 3917 |
ChangingEvent := nil; |
ChangingEvent := nil; |
| 3918 |
|
|
|
if not CallEvent then begin |
|
|
ChangeEvent := TreeView.OnChange; |
|
|
ChangingEvent := TreeView.OnChanging; |
|
|
end; |
|
|
try |
|
| 3919 |
if not CallEvent then begin |
if not CallEvent then begin |
| 3920 |
TreeView.OnChange := nil; |
ChangeEvent := TreeView.OnChange; |
| 3921 |
TreeView.OnChanging := nil; |
ChangingEvent := TreeView.OnChanging; |
| 3922 |
end; |
end; |
| 3923 |
Application.ProcessMessages; |
try |
| 3924 |
for i := 0 to TreeView.Items.Count - 1 do begin |
if not CallEvent then begin |
| 3925 |
if TreeView.Items[i].Data = Item then begin |
TreeView.OnChange := nil; |
| 3926 |
TreeView.Items[i].Selected := True; |
TreeView.OnChanging := nil; |
| 3927 |
if CallEvent then |
end; |
| 3928 |
TreeViewChange(TreeView, TreeView.Items[i]); |
//Application.ProcessMessages; |
| 3929 |
Break; |
for i := 0 to TreeView.Items.Count - 1 do begin |
| 3930 |
|
if TreeView.Items[i].Data = Item then begin |
| 3931 |
|
TreeView.Items[i].Selected := True; |
| 3932 |
|
if CallEvent then |
| 3933 |
|
TreeClick(TreeView.Items[i]); |
| 3934 |
|
Break; |
| 3935 |
|
end; |
| 3936 |
|
end; |
| 3937 |
|
//Application.ProcessMessages; |
| 3938 |
|
finally |
| 3939 |
|
if not CallEvent then begin |
| 3940 |
|
TreeView.OnChange := ChangeEvent; |
| 3941 |
|
TreeView.OnChanging := ChangingEvent; |
| 3942 |
end; |
end; |
| 3943 |
end; |
end; |
| 3944 |
Application.ProcessMessages; |
end else begin |
| 3945 |
finally |
if GetActiveList is TBBS then begin |
| 3946 |
if not CallEvent then begin |
for i := 0 to ListView.Columns.Count - 1 do |
| 3947 |
TreeView.OnChange := ChangeEvent; |
GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width; |
| 3948 |
TreeView.OnChanging := ChangingEvent; |
end else if GetActiveList is TCategory then begin |
| 3949 |
|
for i := 0 to ListView.Columns.Count - 1 do |
| 3950 |
|
GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width; |
| 3951 |
|
end else if GetActiveList is TBoard then begin |
| 3952 |
|
for i := 0 to ListView.Columns.Count - 1 do |
| 3953 |
|
GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width; |
| 3954 |
|
end; |
| 3955 |
|
|
| 3956 |
|
if (Item is TBBS) or (Item is TCategory) then begin |
| 3957 |
|
ListView.Columns.Clear; |
| 3958 |
|
SetActiveList( Item ); |
| 3959 |
|
end else if Item is TBoard then begin |
| 3960 |
|
if not TBoard( Item ).IsThreadDatRead then begin |
| 3961 |
|
Screen.Cursor := crHourGlass; |
| 3962 |
|
try |
| 3963 |
|
if not TBoard( Item ).IsThreadDatRead then |
| 3964 |
|
GikoSys.ReadSubjectFile(TBoard( Item )); |
| 3965 |
|
finally |
| 3966 |
|
Screen.Cursor := crDefault; |
| 3967 |
|
end; |
| 3968 |
|
end; |
| 3969 |
|
SetActiveList( Item ); |
| 3970 |
end; |
end; |
| 3971 |
end; |
end; |
| 3972 |
end; |
end; |
| 3973 |
|
|
| 3974 |
procedure TGikoForm.ListViewMouseDown(Sender: TObject; |
procedure TGikoForm.ListViewMouseDown(Sender: TObject; |
| 3975 |
Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
| 3976 |
//var |
var |
| 3977 |
|
listItem : TListItem; |
| 3978 |
|
threadItem : TThreadItem; |
| 3979 |
// t: Cardinal; |
// t: Cardinal; |
| 3980 |
begin |
begin |
| 3981 |
|
case Button of |
| 3982 |
|
mbMiddle: |
| 3983 |
|
begin |
| 3984 |
|
if not (GetActiveList is TBoard) then Exit; |
| 3985 |
|
listItem := ListView.GetItemAt( X, Y ); |
| 3986 |
|
if listItem = nil then Exit; |
| 3987 |
|
if not (TObject(listItem.Data) is TThreadItem) then Exit; |
| 3988 |
|
|
| 3989 |
|
threadItem := TThreadItem(ListItem.Data); |
| 3990 |
|
InsertBrowserTab(threadItem); |
| 3991 |
|
if threadItem.IsLogFile then |
| 3992 |
|
ListView.UpdateItems(listItem.Index, listItem.Index); |
| 3993 |
|
end; |
| 3994 |
|
end; |
| 3995 |
{ if ssDouble in Shift then begin |
{ if ssDouble in Shift then begin |
| 3996 |
DoubleClickOccurred[Button] := True; |
DoubleClickOccurred[Button] := True; |
| 3997 |
end else begin |
end else begin |
| 4033 |
if ThreadItem.IsLogFile then begin |
if ThreadItem.IsLogFile then begin |
| 4034 |
// if AddHistory(ThreadItem) then |
// if AddHistory(ThreadItem) then |
| 4035 |
// SetContent(ThreadItem); |
// SetContent(ThreadItem); |
| 4036 |
InsertBrowserTab(ThreadItem); |
InsertBrowserTab(ListItem.Data); |
| 4037 |
ListView.UpdateItems(ListItem.Index, ListItem.Index); |
ListView.UpdateItems(ListItem.Index, ListItem.Index); |
| 4038 |
end else begin |
end else begin |
| 4039 |
// SetContent(ThreadItem); |
// SetContent(ThreadItem); |
| 4040 |
InsertBrowserTab(ThreadItem); |
InsertBrowserTab(ListItem.Data); |
| 4041 |
|
end; |
| 4042 |
|
|
| 4043 |
|
if ListView.Selected = nil then |
| 4044 |
|
Exit; |
| 4045 |
|
if ListView.Selected.Data = nil then |
| 4046 |
|
Exit; |
| 4047 |
|
if TThreadItem( ListView.Selected.Data ).IsLogFile then begin |
| 4048 |
|
if GikoSys.Setting.ListOrientation = gloHorizontal then begin |
| 4049 |
|
if GikoSys.Setting.ListWidthState = glsMin then begin |
| 4050 |
|
BrowserMaxAction.Execute; |
| 4051 |
|
if GikoForm.Visible then |
| 4052 |
|
Browser.SetFocus; |
| 4053 |
|
end; |
| 4054 |
|
end else begin |
| 4055 |
|
if GikoSys.Setting.ListHeightState = glsMin then begin |
| 4056 |
|
BrowserMaxAction.Execute; |
| 4057 |
|
if GikoForm.Visible then |
| 4058 |
|
Browser.SetFocus; |
| 4059 |
|
end; |
| 4060 |
|
end; |
| 4061 |
end; |
end; |
| 4062 |
end; |
end; |
| 4063 |
|
|
| 4082 |
//TreeViewChange(nil, TreeView.Selected); |
//TreeViewChange(nil, TreeView.Selected); |
| 4083 |
end else if TObject(ListView.Selected.Data) is TThreadItem then begin |
end else if TObject(ListView.Selected.Data) is TThreadItem then begin |
| 4084 |
//if TObject(ListView.Selected.Data) is TThreadItem then begin |
//if TObject(ListView.Selected.Data) is TThreadItem then begin |
| 4085 |
|
Application.ProcessMessages; |
| 4086 |
ThreadItem := TThreadItem(ListView.Selected.Data); |
ThreadItem := TThreadItem(ListView.Selected.Data); |
| 4087 |
DownloadContent(ThreadItem); |
DownloadContent(ThreadItem); |
| 4088 |
//end; |
//end; |
| 4091 |
|
|
| 4092 |
procedure TGikoForm.BrowserMovement(AName: string); |
procedure TGikoForm.BrowserMovement(AName: string); |
| 4093 |
var |
var |
| 4094 |
|
top: Integer; |
| 4095 |
|
item: OleVariant; |
| 4096 |
nm: OleVariant; |
nm: OleVariant; |
| 4097 |
begin |
begin |
| 4098 |
// OleVariant(Browser.Document).parentWindow.location.hash := AName; |
// OleVariant(Browser.Document).parentWindow.location.hash := AName; |
| 4099 |
nm := AName; |
{ |
| 4100 |
|
while (Browser.ReadyState <> READYSTATE_COMPLETE) and |
| 4101 |
|
(Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin |
| 4102 |
|
Application.ProcessMessages; |
| 4103 |
|
end; |
| 4104 |
|
} |
| 4105 |
|
// Access Violation が起きる事があるので今後要チェック |
| 4106 |
try |
try |
| 4107 |
OleVariant(Browser.Document as IHTMLDocument2).body.scrollTop := |
top := 0; |
| 4108 |
OleVariant(Browser.Document as IHTMLDocument2).anchors.item(nm).offsetTop; |
nm := AName; |
| 4109 |
|
item := OleVariant( Browser.Document as IHTMLDocument2).anchors.item(nm); |
| 4110 |
|
repeat |
| 4111 |
|
top := top + item.offsetTop; |
| 4112 |
|
item := item.offsetParent; |
| 4113 |
|
until AnsiCompareText(item.tagName, 'body' ) = 0; |
| 4114 |
|
|
| 4115 |
|
OleVariant(Browser.Document as IHTMLDocument2).body.scrollTop := top; |
| 4116 |
except |
except |
| 4117 |
end; |
end; |
| 4118 |
end; |
end; |
| 4119 |
|
|
| 4120 |
procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode); |
procedure TGikoForm.TreeViewCollapsed(Sender: TObject; Node: TTreeNode); |
| 4121 |
begin |
begin |
| 4122 |
if TObject(Node.Data) is TBBS2ch then begin |
if TObject(Node.Data) is TBBS then begin |
| 4123 |
TBBS2ch(Node.Data).NodeExpand := False; |
TBBS(Node.Data).NodeExpand := False; |
| 4124 |
end else if TObject(Node.Data) is TCategory then begin |
end else if TObject(Node.Data) is TCategory then begin |
| 4125 |
TCategory(Node.Data).NodeExpand := False; |
TCategory(Node.Data).NodeExpand := False; |
| 4126 |
end else if TObject(Node.Data) is TBoard then begin |
end else if TObject(Node.Data) is TBoard then begin |
| 4144 |
List.Add(TmpListItem.Data); |
List.Add(TmpListItem.Data); |
| 4145 |
TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]); |
TmpListItem := ListView.GetNextItem(TmpListItem, sdAll, [isSelected]); |
| 4146 |
end; |
end; |
| 4147 |
|
|
| 4148 |
end; |
end; |
| 4149 |
|
|
| 4150 |
procedure TGikoForm.ExitActionExecute(Sender: TObject); |
procedure TGikoForm.ExitActionExecute(Sender: TObject); |
| 4169 |
// StdToolBar.Visible := StdToolBarVisibleAction.Checked; |
// StdToolBar.Visible := StdToolBarVisibleAction.Checked; |
| 4170 |
// AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible; |
// AnimePanel.Visible := StdToolBar.Visible or ListToolBar.Visible; |
| 4171 |
|
|
| 4172 |
//StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible; |
//StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible; |
| 4173 |
StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible; |
StdToolBarVisiblePMenu.Checked := GikoSys.Setting.StdToolBarVisible; |
| 4174 |
end; |
end; |
| 4175 |
|
|
| 4176 |
procedure TGikoForm.AddressBarVisibleActionExecute(Sender: TObject); |
procedure TGikoForm.AddressBarVisibleActionExecute(Sender: TObject); |
| 4182 |
Exit; |
Exit; |
| 4183 |
GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked; |
GikoSys.Setting.AddressBarVisible := AddressBarVisibleAction.Checked; |
| 4184 |
CoolBand.Visible := GikoSys.Setting.AddressBarVisible; |
CoolBand.Visible := GikoSys.Setting.AddressBarVisible; |
| 4185 |
//AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible; |
//AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible; |
| 4186 |
AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible; |
AddressToolBarVisiblePMenu.Checked := GikoSys.Setting.AddressBarVisible; |
| 4187 |
end; |
end; |
| 4188 |
|
|
| 4189 |
procedure TGikoForm.LinkBarVisibleActionExecute(Sender: TObject); |
procedure TGikoForm.LinkBarVisibleActionExecute(Sender: TObject); |
| 4307 |
chk := nil; |
chk := nil; |
| 4308 |
|
|
| 4309 |
FSearchDialog := TSearchDialog.Create(Self, chk); |
FSearchDialog := TSearchDialog.Create(Self, chk); |
| 4310 |
FSearchDialog.SearchComboBox.Items.Assign( GikoSys.Setting.SelectTextList ); |
FSearchDialog.SearchComboBox.Items.Assign( GikoSys.Setting.SelectTextList ); |
| 4311 |
end; |
end; |
| 4312 |
|
|
| 4313 |
try |
try |
| 4368 |
end; |
end; |
| 4369 |
end; |
end; |
| 4370 |
|
|
| 4371 |
procedure TGikoForm.Cabinet2chActionExecute(Sender: TObject); |
procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject); |
| 4372 |
begin |
begin |
| 4373 |
Show2chTree; |
ShowHistoryTree; |
| 4374 |
end; |
end; |
| 4375 |
|
|
| 4376 |
procedure TGikoForm.CabinetHistoryActionExecute(Sender: TObject); |
procedure TGikoForm.CabinetVisible( isVisible : Boolean ); |
| 4377 |
begin |
begin |
| 4378 |
ShowHistoryTree; |
TreeSplitter.Visible := isVisible; |
| 4379 |
|
CabinetPanel.Visible := isVisible; |
| 4380 |
|
CabinetVisibleAction.Checked := isVisible; |
| 4381 |
end; |
end; |
| 4382 |
|
|
| 4383 |
procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject); |
procedure TGikoForm.CabinetVisibleActionExecute(Sender: TObject); |
| 4384 |
begin |
begin |
| 4385 |
TreeSplitter.Visible := CabinetVisibleAction.Checked; |
case FTreeType of |
| 4386 |
CabinetPanel.Visible := CabinetVisibleAction.Checked; |
gttHistory: CabinetHistoryAction.Execute; |
| 4387 |
|
gttFavorite: CabinetFavoriteAction.Execute; |
| 4388 |
|
else |
| 4389 |
|
CabinetBBSAction.Execute; |
| 4390 |
|
end; |
| 4391 |
end; |
end; |
| 4392 |
|
|
| 4393 |
procedure TGikoForm.AllItemActionExecute(Sender: TObject); |
procedure TGikoForm.AllItemActionExecute(Sender: TObject); |
| 4493 |
end; |
end; |
| 4494 |
|
|
| 4495 |
if GetActiveList is TBoard then |
if GetActiveList is TBoard then |
| 4496 |
SetListViewType(gvtUser, TBoard(GetActiveList).ParentCategory.ParentBBS2ch.SelectText , Dlg.KubetsuCheckBox.Checked); |
SetListViewType(gvtUser, TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText , Dlg.KubetsuCheckBox.Checked); |
| 4497 |
end else begin |
end else begin |
| 4498 |
idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text); |
idx := GikoSys.Setting.SelectTextList.IndexOf(Dlg.SelectComboBox.Text); |
| 4499 |
if idx <> -1 then |
if idx <> -1 then |
| 4526 |
procedure TGikoForm.UpFolderActionExecute(Sender: TObject); |
procedure TGikoForm.UpFolderActionExecute(Sender: TObject); |
| 4527 |
begin |
begin |
| 4528 |
if GetActiveList is TBoard then begin |
if GetActiveList is TBoard then begin |
| 4529 |
if FTreeType = gtt2ch then |
// if FTreeType = gtt2ch then |
| 4530 |
SelectTreeNode(TBoard(GetActiveList).ParentCategory, True); |
SelectTreeNode(TBoard(GetActiveList).ParentCategory, True); |
| 4531 |
//SetActiveList(TBoard(GetActiveList).ParentCategory); |
//SetActiveList(TBoard(GetActiveList).ParentCategory); |
| 4532 |
end else if GetActiveList is TCategory then begin |
end else if GetActiveList is TCategory then begin |
| 4533 |
if FTreeType = gtt2ch then |
// if FTreeType = gtt2ch then |
| 4534 |
SelectTreeNode(TCategory(GetActiveList).ParentBBS2ch, True); |
SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True); |
| 4535 |
//SetActiveList(TCategory(GetActiveList).ParentBBS2ch); |
//SetActiveList(TCategory(GetActiveList).ParenTBBS); |
| 4536 |
end; |
end; |
| 4537 |
// if TreeView.Selected = nil then Exit; |
// if TreeView.Selected = nil then Exit; |
| 4538 |
// if TreeView.Selected.Level = 0 then Exit; |
// if TreeView.Selected.Level = 0 then Exit; |
| 4697 |
end; |
end; |
| 4698 |
Editor := TEditorForm.Create(Self); |
Editor := TEditorForm.Create(Self); |
| 4699 |
Editor.SetThreadItem(Item); |
Editor.SetThreadItem(Item); |
| 4700 |
|
GikoSys.LoadEditorKeySetting(Editor.ActionList); |
| 4701 |
Editor.Show; |
Editor.Show; |
| 4702 |
Editor.BodyEdit.SetFocus; |
Editor.BodyEdit.SetFocus; |
| 4703 |
end; |
end; |
| 4710 |
procedure TGikoForm.ShowThreadActionExecute(Sender: TObject); |
procedure TGikoForm.ShowThreadActionExecute(Sender: TObject); |
| 4711 |
var |
var |
| 4712 |
ThreadItem: TThreadItem; |
ThreadItem: TThreadItem; |
|
URL: string; |
|
| 4713 |
begin |
begin |
| 4714 |
ThreadItem := GetActiveContent; |
ThreadItem := GetActiveContent; |
| 4715 |
if ThreadItem = nil then Exit; |
if ThreadItem = nil then Exit; |
| 4716 |
URL := GikoSys.GetURL(ThreadItem.ParentBoard.BBSID, ThreadItem.FileName); |
GikoSys.OpenBrowser(ThreadItem.URL, gbtAuto); |
|
GikoSys.OpenBrowser(URL, gbtAuto); |
|
| 4717 |
end; |
end; |
| 4718 |
|
|
| 4719 |
procedure TGikoForm.ShowBoardActionExecute(Sender: TObject); |
procedure TGikoForm.ShowBoardActionExecute(Sender: TObject); |
| 4720 |
var |
var |
| 4721 |
ThreadItem: TThreadItem; |
ThreadItem: TThreadItem; |
|
URL: string; |
|
| 4722 |
begin |
begin |
| 4723 |
ThreadItem := GetActiveContent; |
ThreadItem := GetActiveContent; |
| 4724 |
if ThreadItem = nil then Exit; |
if ThreadItem = nil then Exit; |
| 4725 |
URL := ThreadItem.ParentBoard.URL; |
GikoSys.OpenBrowser(ThreadItem.ParentBoard.URL, gbtAuto); |
|
GikoSys.OpenBrowser(URL, gbtAuto); |
|
| 4726 |
end; |
end; |
| 4727 |
|
|
| 4728 |
//(Thread)URLをコピー |
//(Thread)URLをコピー |
| 4734 |
if TObject(GetActiveContent) is TBoard then |
if TObject(GetActiveContent) is TBoard then |
| 4735 |
s := s + TBoard(GetActiveContent).URL + #13#10 |
s := s + TBoard(GetActiveContent).URL + #13#10 |
| 4736 |
else if TObject(GetActiveContent) is TThreadItem then |
else if TObject(GetActiveContent) is TThreadItem then |
| 4737 |
s := s + GikoSys.GetURL(TThreadItem(GetActiveContent).ParentBoard.BBSID, TThreadItem(GetActiveContent).FileName) + #13#10; |
s := s + TThreadItem(GetActiveContent).URL + #13#10; |
| 4738 |
if s <> '' then |
if s <> '' then |
| 4739 |
Clipboard.AsText := s; |
Clipboard.AsText := s; |
| 4740 |
end; |
end; |
| 4762 |
if TObject(GetActiveContent) is TBoard then |
if TObject(GetActiveContent) is TBoard then |
| 4763 |
s := s + TBoard(GetActiveContent).Title + #13#10 + TBoard(GetActiveContent).URL + #13#10 |
s := s + TBoard(GetActiveContent).Title + #13#10 + TBoard(GetActiveContent).URL + #13#10 |
| 4764 |
else if TObject(GetActiveContent) is TThreadItem then |
else if TObject(GetActiveContent) is TThreadItem then |
| 4765 |
s := s + TThreadItem(GetActiveContent).Title + #13#10 + GikoSys.GetURL(TThreadItem(GetActiveContent).ParentBoard.BBSID, TThreadItem(GetActiveContent).FileName) + #13#10; |
s := s + TThreadItem(GetActiveContent).Title + #13#10 + TThreadItem(GetActiveContent).URL + #13#10; |
| 4766 |
if s <> '' then |
if s <> '' then |
| 4767 |
Clipboard.AsText := s; |
Clipboard.AsText := s; |
| 4768 |
end; |
end; |
| 4868 |
|
|
| 4869 |
procedure TGikoForm.UpFolderActionUpdate(Sender: TObject); |
procedure TGikoForm.UpFolderActionUpdate(Sender: TObject); |
| 4870 |
begin |
begin |
| 4871 |
UpFolderAction.Enabled := not (GetActiveList is TBBS2ch); |
UpFolderAction.Enabled := not (GetActiveList is TBBS); |
| 4872 |
end; |
end; |
| 4873 |
|
|
| 4874 |
procedure TGikoForm.ThreadEditorActionUpdate(Sender: TObject); |
procedure TGikoForm.ThreadEditorActionUpdate(Sender: TObject); |
| 4877 |
end; |
end; |
| 4878 |
|
|
| 4879 |
procedure TGikoForm.FormResize(Sender: TObject); |
procedure TGikoForm.FormResize(Sender: TObject); |
| 4880 |
|
var |
| 4881 |
|
doc : Variant; |
| 4882 |
begin |
begin |
| 4883 |
MessageListView.Column[0].Width := MessageListView.ClientWidth - 32; |
MessageListView.Column[0].Width := MessageListView.ClientWidth - 32; |
| 4884 |
MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width; |
MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width; |
| 4885 |
|
|
| 4886 |
|
if GikoSys.Setting.ListOrientation = gloHorizontal then begin |
| 4887 |
|
if GikoSys.Setting.ListWidthState = glsMin then begin |
| 4888 |
|
// 最小表示にする |
| 4889 |
|
ViewPanel.Width := ThreadMainPanel.Width - 80; |
| 4890 |
|
end; |
| 4891 |
|
end else begin |
| 4892 |
|
if GikoSys.Setting.ListHeightState = glsMin then begin |
| 4893 |
|
// 最小表示にする |
| 4894 |
|
ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7; |
| 4895 |
|
end; |
| 4896 |
|
end; |
| 4897 |
|
|
| 4898 |
|
if FIsMinimize = mtMinimized then begin |
| 4899 |
|
if FActiveContent <> nil then begin |
| 4900 |
|
doc := Browser.Document; |
| 4901 |
|
doc.Body.ScrollTop := FActiveContent.ScrollTop; |
| 4902 |
|
FIsMinimize := mtNone; |
| 4903 |
|
end; |
| 4904 |
|
end; |
| 4905 |
|
|
| 4906 |
|
FIsIgnoreResize := True; |
| 4907 |
|
PostMessage( Handle, USER_RESIZED, 0, 0 ); |
| 4908 |
end; |
end; |
| 4909 |
|
|
| 4910 |
procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject); |
procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject); |
| 4990 |
ActiveLogDeleteAction.Enabled := GetActiveContent <> nil; |
ActiveLogDeleteAction.Enabled := GetActiveContent <> nil; |
| 4991 |
end; |
end; |
| 4992 |
|
|
|
procedure TGikoForm.ListViewSelectItem(Sender: TObject; Item: TListItem; |
|
|
Selected: Boolean); |
|
|
begin |
|
|
SelectTimer.Enabled := False; |
|
|
if Selected then |
|
|
SelectTimer.Enabled := True; |
|
|
end; |
|
|
|
|
|
procedure TGikoForm.SelectTimerTimer(Sender: TObject); |
|
|
begin |
|
|
SelectTimer.Enabled := False; |
|
|
ListClick; |
|
|
end; |
|
|
|
|
| 4993 |
procedure TGikoForm.ListViewDblClick(Sender: TObject); |
procedure TGikoForm.ListViewDblClick(Sender: TObject); |
| 4994 |
begin |
begin |
| 4995 |
ListDoubleClick; |
ListDoubleClick; |
| 5104 |
function TGikoForm.Hook(var Message: TMessage): Boolean; |
function TGikoForm.Hook(var Message: TMessage): Boolean; |
| 5105 |
begin |
begin |
| 5106 |
Result := False; |
Result := False; |
| 5107 |
if Message.Msg = CM_APPKEYDOWN then Result := True; |
case Message.Msg of |
| 5108 |
|
CM_APPKEYDOWN: |
| 5109 |
|
Result := True; |
| 5110 |
|
end; |
| 5111 |
end; |
end; |
| 5112 |
|
|
| 5113 |
procedure TGikoForm.KokoResActionExecute(Sender: TObject); |
procedure TGikoForm.KokoResActionExecute(Sender: TObject); |
| 5126 |
msg := 'このスレッドはレス数が1000を超えているので書込み出来ません。' + #13#10 |
msg := 'このスレッドはレス数が1000を超えているので書込み出来ません。' + #13#10 |
| 5127 |
+ '新スレッドを探してください。'; |
+ '新スレッドを探してください。'; |
| 5128 |
if MsgBox(Handle, msg, '警告', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin |
if MsgBox(Handle, msg, '警告', MB_YESNO or MB_ICONEXCLAMATION) <> 7 then begin |
| 5129 |
Exit; |
Exit; |
| 5130 |
end; |
end; |
| 5131 |
end; |
end; |
| 5132 |
Editor := TEditorForm.Create(Self); |
Editor := TEditorForm.Create(Self); |
| 5133 |
Editor.SetThreadItem(Item); |
Editor.SetThreadItem(Item); |
| 5184 |
if TObject(List[i]) is TBoard then |
if TObject(List[i]) is TBoard then |
| 5185 |
s := s + TBoard(List[i]).URL + #13#10 |
s := s + TBoard(List[i]).URL + #13#10 |
| 5186 |
else if TObject(List[i]) is TThreadItem then |
else if TObject(List[i]) is TThreadItem then |
| 5187 |
s := s + GikoSys.GetURL(TThreadItem(List[i]).ParentBoard.BBSID, TThreadItem(List[i]).FileName) + #13#10; |
s := s + TThreadItem(List[i]).URL + #13#10; |
| 5188 |
end; |
end; |
| 5189 |
if s <> '' then |
if s <> '' then |
| 5190 |
Clipboard.AsText := s; |
Clipboard.AsText := s; |
| 5230 |
if TObject(List[i]) is TBoard then |
if TObject(List[i]) is TBoard then |
| 5231 |
s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10 |
s := s + TBoard(List[i]).Title + #13#10 + TBoard(List[i]).URL + #13#10 |
| 5232 |
else if TObject(List[i]) is TThreadItem then |
else if TObject(List[i]) is TThreadItem then |
| 5233 |
s := s + TThreadItem(List[i]).Title + #13#10 + GikoSys.GetURL(TThreadItem(List[i]).ParentBoard.BBSID, TThreadItem(List[i]).FileName) + #13#10; |
s := s + TThreadItem(List[i]).Title + #13#10 + TThreadItem(List[i]).URL + #13#10; |
| 5234 |
end; |
end; |
| 5235 |
if s <> '' then |
if s <> '' then |
| 5236 |
Clipboard.AsText := s; |
Clipboard.AsText := s; |
| 5326 |
begin |
begin |
| 5327 |
TmpTreeNode := FClickNode; |
TmpTreeNode := FClickNode; |
| 5328 |
TreeView.Selected := FClickNode; |
TreeView.Selected := FClickNode; |
| 5329 |
if TObject(TmpTreeNode.Data) is TBoard then begin |
Board := nil; |
| 5330 |
Board := TBoard(TmpTreeNode.Data); |
|
| 5331 |
|
if TObject(TmpTreeNode.Data) is TBoard then |
| 5332 |
|
Board := TBoard(TmpTreeNode.Data) |
| 5333 |
|
else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then |
| 5334 |
|
Board := TFavoriteBoardItem(TmpTreeNode.Data).Item; |
| 5335 |
|
|
| 5336 |
|
if Board <> nil then |
| 5337 |
DownloadList(Board); |
DownloadList(Board); |
|
end; |
|
| 5338 |
end; |
end; |
| 5339 |
|
|
| 5340 |
procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject); |
procedure TGikoForm.TreeSelectThreadReloadExecute(Sender: TObject); |
| 5344 |
begin |
begin |
| 5345 |
TmpTreeNode := FClickNode; |
TmpTreeNode := FClickNode; |
| 5346 |
TreeView.Selected := FClickNode; |
TreeView.Selected := FClickNode; |
| 5347 |
if TObject(TmpTreeNode.Data) is TThreadItem then begin |
ThreadItem := nil; |
| 5348 |
ThreadItem := TThreadItem(TmpTreeNode.Data); |
|
| 5349 |
|
if TObject(TmpTreeNode.Data) is TThreadItem then |
| 5350 |
|
ThreadItem := TThreadItem(TmpTreeNode.Data) |
| 5351 |
|
else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then |
| 5352 |
|
ThreadItem := TFavoriteThreadItem(TmpTreeNode.Data).Item; |
| 5353 |
|
|
| 5354 |
|
if ThreadItem <> nil then |
| 5355 |
DownloadContent(ThreadItem); |
DownloadContent(ThreadItem); |
|
end; |
|
| 5356 |
end; |
end; |
| 5357 |
|
|
| 5358 |
procedure TGikoForm.TreeSelectURLCopyExecute(Sender: TObject); |
procedure TGikoForm.TreeSelectURLCopyExecute(Sender: TObject); |
| 5364 |
TreeView.Selected := FClickNode; |
TreeView.Selected := FClickNode; |
| 5365 |
if TObject(TmpTreeNode.Data) is TBoard then begin |
if TObject(TmpTreeNode.Data) is TBoard then begin |
| 5366 |
s := TBoard(TmpTreeNode.Data).URL + #13#10; |
s := TBoard(TmpTreeNode.Data).URL + #13#10; |
| 5367 |
|
end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin |
| 5368 |
|
s := TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10; |
| 5369 |
end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin |
end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin |
| 5370 |
s := GikoSys.GetURL(TThreadItem(TmpTreeNode.Data).ParentBoard.BBSID, TThreadItem(TmpTreeNode.Data).FileName) + #13#10; |
s := TThreadItem(TmpTreeNode.Data).URL + #13#10; |
| 5371 |
|
end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin |
| 5372 |
|
s := TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10; |
| 5373 |
end; |
end; |
| 5374 |
Clipboard.AsText := s; |
Clipboard.AsText := s; |
| 5375 |
end; |
end; |
| 5383 |
TreeView.Selected := FClickNode; |
TreeView.Selected := FClickNode; |
| 5384 |
if TObject(TmpTreeNode.Data) is TBoard then begin |
if TObject(TmpTreeNode.Data) is TBoard then begin |
| 5385 |
s := TBoard(TmpTreeNode.Data).Title + #13#10 + TBoard(TmpTreeNode.Data).URL + #13#10; |
s := TBoard(TmpTreeNode.Data).Title + #13#10 + TBoard(TmpTreeNode.Data).URL + #13#10; |
| 5386 |
|
end else if TObject(TmpTreeNode.Data) is TFavoriteBoardItem then begin |
| 5387 |
|
s := TFavoriteBoardItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteBoardItem(TmpTreeNode.Data).URL + #13#10; |
| 5388 |
end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin |
end else if (TObject(TmpTreeNode.Data) is TThreadItem) then begin |
| 5389 |
s := TThreadItem(TmpTreeNode.Data).Title + #13#10 + GikoSys.GetURL(TThreadItem(TmpTreeNode.Data).ParentBoard.BBSID, TThreadItem(TmpTreeNode.Data).FileName) + #13#10; |
s := TThreadItem(TmpTreeNode.Data).Title + #13#10 + TThreadItem(TmpTreeNode.Data).URL + #13#10; |
| 5390 |
|
end else if TObject(TmpTreeNode.Data) is TFavoriteThreadItem then begin |
| 5391 |
|
s := TFavoriteThreadItem(TmpTreeNode.Data).Item.Title + #13#10 + TFavoriteThreadItem(TmpTreeNode.Data).URL + #13#10; |
| 5392 |
end; |
end; |
| 5393 |
Clipboard.AsText := s; |
Clipboard.AsText := s; |
| 5394 |
end; |
end; |
| 5395 |
|
|
|
|
|
| 5396 |
procedure TGikoForm.TreePopupMenuPopup(Sender: TObject); |
procedure TGikoForm.TreePopupMenuPopup(Sender: TObject); |
| 5397 |
begin |
begin |
| 5398 |
FClickNode := TreeView.Selected; |
FClickNode := TreeView.Selected; |
| 5401 |
TreeSelectBoardPupupMenu.Visible := False; |
TreeSelectBoardPupupMenu.Visible := False; |
| 5402 |
TPMSep01.Visible := False; |
TPMSep01.Visible := False; |
| 5403 |
TreeSelectURLPupupMenu.Visible := False; |
&nbs
| |