| 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, Variants, ExtActns,IdTCPConnection, IdBaseComponent, |
| 25 |
|
IdTCPClient; |
| 26 |
|
|
| 27 |
type |
type |
| 28 |
TGikoTreeType = (gttNone, gtt2ch, gttHistory); |
TGikoTreeType = (gttNone, gtt2ch, gttHistory, gttFavorite); |
| 29 |
|
TToolBarSettingSenderType = (tssNone, tssMain, tssList, tssBrowser); |
| 30 |
|
TMinimizeType = (mtNone, mtMinimizing, mtMinimized); |
| 31 |
|
|
| 32 |
|
TBrowserRecord = class; |
| 33 |
|
|
| 34 |
TGikoForm = class(TForm) |
TGikoForm = class(TForm) |
| 35 |
StatusBar: TStatusBar; |
StatusBar: TStatusBar; |
| 43 |
ViewPanel: TPanel; |
ViewPanel: TPanel; |
| 44 |
ListView: TGikoListView; |
ListView: TGikoListView; |
| 45 |
ThreadPanel: TPanel; |
ThreadPanel: TPanel; |
|
Browser: TWebBrowser; |
|
| 46 |
MessagePanel: TPanel; |
MessagePanel: TPanel; |
| 47 |
MessageBar: TPanel; |
MessageBar: TPanel; |
| 48 |
MessageHideButton: TSpeedButton; |
MessageHideButton: TSpeedButton; |
| 74 |
SmallIconAction: TAction; |
SmallIconAction: TAction; |
| 75 |
ListIconAction: TAction; |
ListIconAction: TAction; |
| 76 |
DetailIconAction: TAction; |
DetailIconAction: TAction; |
| 77 |
Cabinet2chAction: TAction; |
CabinetBBSAction: TAction; |
| 78 |
CabinetHistoryAction: TAction; |
CabinetHistoryAction: TAction; |
| 79 |
CabinetVisibleAction: TAction; |
CabinetVisibleAction: TAction; |
| 80 |
MidokuAction: TAction; |
MidokuAction: TAction; |
| 97 |
ViewMenu: TMenuItem; |
ViewMenu: TMenuItem; |
| 98 |
StdToolBarMenu: TMenuItem; |
StdToolBarMenu: TMenuItem; |
| 99 |
CabinetMenu: TMenuItem; |
CabinetMenu: TMenuItem; |
|
N6: TMenuItem; |
|
| 100 |
H1: TMenuItem; |
H1: TMenuItem; |
| 101 |
N4: TMenuItem; |
N4: TMenuItem; |
| 102 |
CabinetVisibleMenu: TMenuItem; |
CabinetVisibleMenu: TMenuItem; |
| 187 |
N15: TMenuItem; |
N15: TMenuItem; |
| 188 |
SelectListReloadAction: TAction; |
SelectListReloadAction: TAction; |
| 189 |
SelectThreadReloadAction: TAction; |
SelectThreadReloadAction: TAction; |
|
SelectTimer: TTimer; |
|
| 190 |
KokoPopupMenu: TPopupMenu; |
KokoPopupMenu: TPopupMenu; |
| 191 |
KokomadePMenu: TMenuItem; |
KokomadePMenu: TMenuItem; |
| 192 |
AllPMenu: TMenuItem; |
AllPMenu: TMenuItem; |
| 219 |
B3: TMenuItem; |
B3: TMenuItem; |
| 220 |
BrowserBottomPanel: TGikoPanel; |
BrowserBottomPanel: TGikoPanel; |
| 221 |
CabinetSelectPopupMenu: TPopupMenu; |
CabinetSelectPopupMenu: TPopupMenu; |
|
N17: TMenuItem; |
|
| 222 |
H2: TMenuItem; |
H2: TMenuItem; |
| 223 |
ItemReservPMenu: TMenuItem; |
ItemReservPMenu: TMenuItem; |
| 224 |
RoundNamePopupMenu: TPopupMenu; |
RoundNamePopupMenu: TPopupMenu; |
| 233 |
K2: TMenuItem; |
K2: TMenuItem; |
| 234 |
AllTabCloseAction: TAction; |
AllTabCloseAction: TAction; |
| 235 |
A5: TMenuItem; |
A5: TMenuItem; |
|
N18: TMenuItem; |
|
| 236 |
A6: TMenuItem; |
A6: TMenuItem; |
| 237 |
C1: TMenuItem; |
C1: TMenuItem; |
| 238 |
V1: TMenuItem; |
V1: TMenuItem; |
| 239 |
N19: TMenuItem; |
N19: TMenuItem; |
| 240 |
D1: TMenuItem; |
D1: TMenuItem; |
| 241 |
D2: TMenuItem; |
D2: TMenuItem; |
|
N20: TMenuItem; |
|
| 242 |
MessageImageList: TImageList; |
MessageImageList: TImageList; |
| 243 |
ProgressBar: TProgressBar; |
ProgressBar: TProgressBar; |
| 244 |
ArrangeAction: TAction; |
ArrangeAction: TAction; |
| 251 |
N21: TMenuItem; |
N21: TMenuItem; |
| 252 |
URLC3: TMenuItem; |
URLC3: TMenuItem; |
| 253 |
URLN2: TMenuItem; |
URLN2: TMenuItem; |
|
N22: TMenuItem; |
|
| 254 |
N23: TMenuItem; |
N23: TMenuItem; |
| 255 |
ListCoolBar: TGikoCoolBar; |
ListCoolBar: TGikoCoolBar; |
| 256 |
ListToolBar: TToolBar; |
ListToolBar: TToolBar; |
| 288 |
ItemImage: TImage; |
ItemImage: TImage; |
| 289 |
BrowserNameLabel: TLabel; |
BrowserNameLabel: TLabel; |
| 290 |
ActiveLogDeleteAction: TAction; |
ActiveLogDeleteAction: TAction; |
|
N24: TMenuItem; |
|
| 291 |
D3: TMenuItem; |
D3: TMenuItem; |
| 292 |
N25: TMenuItem; |
N25: TMenuItem; |
| 293 |
N26: TMenuItem; |
N26: TMenuItem; |
| 346 |
StdToolBar: TToolBar; |
StdToolBar: TToolBar; |
| 347 |
RoundToolButton: TToolButton; |
RoundToolButton: TToolButton; |
| 348 |
ToolButton6: TToolButton; |
ToolButton6: TToolButton; |
|
CabinetToolButton: TToolButton; |
|
| 349 |
ToolButton4: TToolButton; |
ToolButton4: TToolButton; |
| 350 |
ToolButton13: TToolButton; |
ToolButton13: TToolButton; |
| 351 |
AbortToolButton: TToolButton; |
AbortToolButton: TToolButton; |
| 446 |
SelectResAction: TAction; |
SelectResAction: TAction; |
| 447 |
ToolButton16: TToolButton; |
ToolButton16: TToolButton; |
| 448 |
AllResAction: TAction; |
AllResAction: TAction; |
|
AllResToolButton: TToolButton; |
|
| 449 |
N50: TMenuItem; |
N50: TMenuItem; |
| 450 |
A11: TMenuItem; |
A11: TMenuItem; |
| 451 |
S5: TMenuItem; |
S5: TMenuItem; |
| 452 |
Reload: TMenuItem; |
Reload: TMenuItem; |
| 453 |
GoBack: TMenuItem; |
GoBack: TMenuItem; |
| 454 |
GoFoward: TMenuItem; |
GoFoward: TMenuItem; |
| 455 |
EditAction: TAction; |
EditNGAction: TAction; |
| 456 |
ReloadAction: TAction; |
ReloadAction: TAction; |
| 457 |
GoFowardAction: TAction; |
GoFowardAction: TAction; |
| 458 |
GoBackAction: TAction; |
GoBackAction: TAction; |
| 468 |
N52: TMenuItem; |
N52: TMenuItem; |
| 469 |
N53: TMenuItem; |
N53: TMenuItem; |
| 470 |
SearchBoardName: TMenuItem; |
SearchBoardName: TMenuItem; |
| 471 |
N55: TMenuItem; |
TreeSelectLogDeleteSeparator: TMenuItem; |
| 472 |
TreeSelectSearchBoardName: TAction; |
TreeSelectSearchBoardName: TAction; |
| 473 |
CabinetFavoriteAction: TAction; |
CabinetFavoriteAction: TAction; |
| 474 |
N54: TMenuItem; |
N54: TMenuItem; |
| 475 |
A13: TMenuItem; |
A13: TMenuItem; |
| 476 |
FavoriteTreePopupMenu: TPopupMenu; |
FavoriteTreePopupMenu: TPopupMenu; |
| 477 |
FavoriteTreeViewRenameAction: TAction; |
FavoriteTreeViewRenameAction: TAction; |
| 478 |
FavoriteTreeRenamePopupMenu: TMenuItem; |
FavoriteTreeRenamePopupMenu: TMenuItem; |
| 479 |
FavoriteTreeViewNewFolderAction: TAction; |
FavoriteTreeViewNewFolderAction: TAction; |
| 480 |
FavoriteTreeNewFolderPopupMenu: TMenuItem; |
FavoriteTreeNewFolderPopupMenu: TMenuItem; |
| 481 |
N56: TMenuItem; |
N56: TMenuItem; |
| 482 |
FavoriteTreeViewDeleteAction: TAction; |
FavoriteTreeViewDeleteAction: TAction; |
| 483 |
FavoriteTreeDeletePopupMenu: TMenuItem; |
FavoriteTreeDeletePopupMenu: TMenuItem; |
| 484 |
FavoriteToolBar: TToolBar; |
FavoriteToolBar: TToolBar; |
| 485 |
ToolButton17: TToolButton; |
ToolButton17: TToolButton; |
| 486 |
ToolButton19: TToolButton; |
ToolButton19: TToolButton; |
| 487 |
FavoriteTreeViewBrowseFolderAction: TAction; |
FavoriteTreeViewBrowseFolderAction: TAction; |
| 488 |
FavoriteTreeBrowseFolderPopupMenu: TMenuItem; |
FavoriteTreeBrowseFolderPopupMenu: TMenuItem; |
| 489 |
N57: TMenuItem; |
N57: TMenuItem; |
| 490 |
FavoriteTreeReloadPopupMenu: TMenuItem; |
FavoriteTreeReloadPopupMenu: TMenuItem; |
| 491 |
N58: TMenuItem; |
N58: TMenuItem; |
| 492 |
FavoriteTreeURLCopyPopupMenu: TMenuItem; |
FavoriteTreeURLCopyPopupMenu: TMenuItem; |
| 493 |
FavoriteTreeNameCopyPopupMenu: TMenuItem; |
FavoriteTreeNameCopyPopupMenu: TMenuItem; |
| 494 |
FavoriteTreeLogDeletePopupMenu: TMenuItem; |
FavoriteTreeLogDeletePopupMenu: TMenuItem; |
| 495 |
N59: TMenuItem; |
N59: TMenuItem; |
| 496 |
FavoriteTreeNameURLCopyPopupMenu: TMenuItem; |
FavoriteTreeNameURLCopyPopupMenu: TMenuItem; |
| 497 |
FavoriteTreeViewReloadAction: TAction; |
FavoriteTreeViewReloadAction: TAction; |
| 498 |
FavoriteTreeViewURLCopyAction: TAction; |
FavoriteTreeViewURLCopyAction: TAction; |
| 499 |
FavoriteTreeViewNameCopyAction: TAction; |
FavoriteTreeViewNameCopyAction: TAction; |
| 500 |
FavoriteTreeViewNameURLCopyAction: TAction; |
FavoriteTreeViewNameURLCopyAction: TAction; |
| 501 |
FavoriteTreeViewLogDeleteAction: TAction; |
FavoriteTreeViewLogDeleteAction: TAction; |
| 502 |
OnlyAHundredRes: TAction; |
ResRangeAction: TAction; |
| 503 |
ToolButton20: TToolButton; |
ToolButton20: TToolButton; |
| 504 |
AHundredResButton: TToolButton; |
ResRangeButton: TToolButton; |
| 505 |
N60: TMenuItem; |
N60: TMenuItem; |
| 506 |
procedure FormCreate(Sender: TObject); |
ExportFavoriteFileAction1: TMenuItem; |
| 507 |
|
ExportFavoriteFile: TFileSaveAs; |
| 508 |
|
ToolButton21: TToolButton; |
| 509 |
|
CabinetBBSToolButton: TToolButton; |
| 510 |
|
ToolButton23: TToolButton; |
| 511 |
|
ToolButton24: TToolButton; |
| 512 |
|
N6: TMenuItem; |
| 513 |
|
N17: TMenuItem; |
| 514 |
|
FavoriteTreeViewBrowseBoardAction: TAction; |
| 515 |
|
FavoriteTreeViewBrowseThreadAction: TAction; |
| 516 |
|
UpBoardAction: TAction; |
| 517 |
|
N18: TMenuItem; |
| 518 |
|
N20: TMenuItem; |
| 519 |
|
N24: TMenuItem; |
| 520 |
|
N62: TMenuItem; |
| 521 |
|
N61: TMenuItem; |
| 522 |
|
N63: TMenuItem; |
| 523 |
|
KoreCopy: TAction; |
| 524 |
|
N64: TMenuItem; |
| 525 |
|
dummy1: TMenuItem; |
| 526 |
|
TreeSelectLogDeletePopupMenu: TMenuItem; |
| 527 |
|
N65: TMenuItem; |
| 528 |
|
BBSSelectPopupMenu: TPopupMenu; |
| 529 |
|
PlugInMenu: TMenuItem; |
| 530 |
|
TmpToolBar: TToolBar; |
| 531 |
|
TreeSelectNameCopy: TAction; |
| 532 |
|
TreeSelectNamePupupMenu: TMenuItem; |
| 533 |
|
BrowserPanel: TPanel; |
| 534 |
|
SetFocusForBrowserAction: TAction; |
| 535 |
|
SetFocusForThreadListAction: TAction; |
| 536 |
|
SetFocusForCabinetAction: TAction; |
| 537 |
|
FileRun1: TFileRun; |
| 538 |
|
ThreadlistMaxAndFocusAction: TAction; |
| 539 |
|
BrowserMaxAndFocusAction: TAction; |
| 540 |
|
UpBoardButton: TToolButton; |
| 541 |
|
SelectTimer: TTimer; |
| 542 |
|
SelectThreadSave: TMenuItem; |
| 543 |
|
SelectItemSaveForHTML: TAction; |
| 544 |
|
FileSaveAs1: TFileSaveAs; |
| 545 |
|
N55: TMenuItem; |
| 546 |
|
N66: TMenuItem; |
| 547 |
|
dat1: TMenuItem; |
| 548 |
|
SelectItemSaveForDat: TAction; |
| 549 |
|
LogFolderOpenAction: TAction; |
| 550 |
|
OpenLogFolder: TMenuItem; |
| 551 |
|
Browser: TWebBrowser; |
| 552 |
|
TabSave: TMenuItem; |
| 553 |
|
TabOpen: TMenuItem; |
| 554 |
|
TabsSaveAction: TAction; |
| 555 |
|
TabsOpenAction: TAction; |
| 556 |
|
ResRangePopupMenu: TPopupMenu; |
| 557 |
|
N1001: TMenuItem; |
| 558 |
|
N501: TMenuItem; |
| 559 |
|
N22: TMenuItem; |
| 560 |
|
OnlyAHundredResAction: TAction; |
| 561 |
|
OnlyNewResAction: TAction; |
| 562 |
|
OnlyKokoResAction: TAction; |
| 563 |
|
A14: TMenuItem; |
| 564 |
|
BrowsBoradHeadAction: TAction; |
| 565 |
|
BrowsBoradHeadAction1: TMenuItem; |
| 566 |
|
ThreadRangeAction: TAction; |
| 567 |
|
ThreadRangePopupMenu: TPopupMenu; |
| 568 |
|
A15: TMenuItem; |
| 569 |
|
L8: TMenuItem; |
| 570 |
|
N67: TMenuItem; |
| 571 |
|
N68: TMenuItem; |
| 572 |
|
S6: TMenuItem; |
| 573 |
|
N69: TMenuItem; |
| 574 |
|
S7: TMenuItem; |
| 575 |
|
ThreadRangeButton: TToolButton; |
| 576 |
|
TabAutoSaveAction: TAction; |
| 577 |
|
TabAutoLoadAction: TAction; |
| 578 |
|
procedure FormCreate(Sender: TObject); |
| 579 |
procedure FormDestroy(Sender: TObject); |
procedure FormDestroy(Sender: TObject); |
| 580 |
procedure CabinetPanelHide(Sender: TObject); |
procedure CabinetPanelHide(Sender: TObject); |
| 581 |
procedure FormClose(Sender: TObject; var Action: TCloseAction); |
procedure FormClose(Sender: TObject; var Action: TCloseAction); |
|
procedure TreeViewChange(Sender: TObject; Node: TTreeNode); |
|
| 582 |
procedure ListViewData(Sender: TObject; Item: TListItem); |
procedure ListViewData(Sender: TObject; Item: TListItem); |
| 583 |
procedure ListViewDataFind(Sender: TObject; Find: TItemFind; |
procedure ListViewDataFind(Sender: TObject; Find: TItemFind; |
| 584 |
const FindString: String; const FindPosition: TPoint; |
const FindString: String; const FindPosition: TPoint; |
| 590 |
EndIndex: Integer; OldState, NewState: TItemStates); |
EndIndex: Integer; OldState, NewState: TItemStates); |
| 591 |
procedure BrowserStatusTextChange(Sender: TObject; |
procedure BrowserStatusTextChange(Sender: TObject; |
| 592 |
const Text: WideString); |
const Text: WideString); |
|
procedure BrowserTitleChange(Sender: TObject; const Text: WideString); |
|
| 593 |
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
| 594 |
procedure TreeViewChanging(Sender: TObject; Node: TTreeNode; |
procedure TreeViewChanging(Sender: TObject; Node: TTreeNode; |
| 595 |
var AllowChange: Boolean); |
var AllowChange: Boolean); |
| 596 |
procedure ListViewKeyDown(Sender: TObject; var Key: Word; |
procedure ListViewKeyDown(Sender: TObject; var Key: Word; |
| 597 |
Shift: TShiftState); |
Shift: TShiftState); |
| 598 |
procedure ListViewColumnClick(Sender: TObject; Column: TListColumn); |
procedure ListViewColumnClick(Sender: TObject; Column: TListColumn); |
| 599 |
|
procedure ListViewSort(Sender: TObject; Column: TListColumn); |
| 600 |
procedure MenuToolBarCustomDrawButton(Sender: TToolBar; |
procedure MenuToolBarCustomDrawButton(Sender: TToolBar; |
| 601 |
Button: TToolButton; State: TCustomDrawState; |
Button: TToolButton; State: TCustomDrawState; |
| 602 |
var DefaultDraw: Boolean); |
var DefaultDraw: Boolean); |
| 612 |
Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean); |
Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean); |
| 613 |
procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode); |
procedure TreeViewExpanded(Sender: TObject; Node: TTreeNode); |
| 614 |
procedure TreeViewDblClick(Sender: TObject); |
procedure TreeViewDblClick(Sender: TObject); |
|
procedure FavoriteTreeViewClick(Sender: TObject); |
|
| 615 |
procedure ListViewCustomDraw(Sender: TCustomListView; |
procedure ListViewCustomDraw(Sender: TCustomListView; |
| 616 |
const ARect: TRect; var DefaultDraw: Boolean); |
const ARect: TRect; var DefaultDraw: Boolean); |
| 617 |
procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton; |
procedure ListViewMouseDown(Sender: TObject; Button: TMouseButton; |
| 631 |
procedure OptionActionExecute(Sender: TObject); |
procedure OptionActionExecute(Sender: TObject); |
| 632 |
procedure GikoNaviWebPageActionExecute(Sender: TObject); |
procedure GikoNaviWebPageActionExecute(Sender: TObject); |
| 633 |
procedure AboutActionExecute(Sender: TObject); |
procedure AboutActionExecute(Sender: TObject); |
|
procedure Cabinet2chActionExecute(Sender: TObject); |
|
| 634 |
procedure CabinetHistoryActionExecute(Sender: TObject); |
procedure CabinetHistoryActionExecute(Sender: TObject); |
| 635 |
|
procedure CabinetVisible( isVisible : Boolean ); |
| 636 |
procedure CabinetVisibleActionExecute(Sender: TObject); |
procedure CabinetVisibleActionExecute(Sender: TObject); |
| 637 |
procedure AllItemActionExecute(Sender: TObject); |
procedure AllItemActionExecute(Sender: TObject); |
| 638 |
procedure LogItemActionExecute(Sender: TObject); |
procedure LogItemActionExecute(Sender: TObject); |
| 673 |
procedure ShowThreadActionUpdate(Sender: TObject); |
procedure ShowThreadActionUpdate(Sender: TObject); |
| 674 |
procedure ShowBoardActionUpdate(Sender: TObject); |
procedure ShowBoardActionUpdate(Sender: TObject); |
| 675 |
procedure SelectThreadReloadActionUpdate(Sender: TObject); |
procedure SelectThreadReloadActionUpdate(Sender: TObject); |
|
procedure ListViewSelectItem(Sender: TObject; Item: TListItem; |
|
|
Selected: Boolean); |
|
|
procedure SelectTimerTimer(Sender: TObject); |
|
| 676 |
procedure ItemReloadActionUpdate(Sender: TObject); |
procedure ItemReloadActionUpdate(Sender: TObject); |
|
procedure ListViewDblClick(Sender: TObject); |
|
| 677 |
procedure LogDeleteActionExecute(Sender: TObject); |
procedure LogDeleteActionExecute(Sender: TObject); |
| 678 |
procedure KokomadeActionExecute(Sender: TObject); |
procedure KokomadeActionExecute(Sender: TObject); |
| 679 |
procedure ZenbuActionExecute(Sender: TObject); |
procedure ZenbuActionExecute(Sender: TObject); |
| 804 |
procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word; |
procedure SelectComboBoxKeyDown(Sender: TObject; var Key: Word; |
| 805 |
Shift: TShiftState); |
Shift: TShiftState); |
| 806 |
procedure SelectComboBoxExit(Sender: TObject); |
procedure SelectComboBoxExit(Sender: TObject); |
|
procedure NG1Click(Sender: TObject); |
|
| 807 |
procedure SelectResActionExecute(Sender: TObject); |
procedure SelectResActionExecute(Sender: TObject); |
| 808 |
procedure SelectResActionUpdate(Sender: TObject); |
procedure SelectResActionUpdate(Sender: TObject); |
|
procedure FormKeyDown(Sender: TObject; var Key: Word; |
|
|
Shift: TShiftState); |
|
| 809 |
procedure FormKeyUp(Sender: TObject; var Key: Word; |
procedure FormKeyUp(Sender: TObject; var Key: Word; |
| 810 |
Shift: TShiftState); |
Shift: TShiftState); |
| 811 |
procedure AllResActionExecute(Sender: TObject); |
procedure AllResActionExecute(Sender: TObject); |
| 827 |
procedure AntiIndividualAbonClick(Sender: TObject); |
procedure AntiIndividualAbonClick(Sender: TObject); |
| 828 |
procedure N51Click(Sender: TObject); |
procedure N51Click(Sender: TObject); |
| 829 |
procedure TreeSelectSearchBoardNameExecute(Sender: TObject); |
procedure TreeSelectSearchBoardNameExecute(Sender: TObject); |
| 830 |
procedure CabinetFavoriteActionExecute(Sender: TObject); |
procedure CabinetFavoriteActionExecute(Sender: TObject); |
| 831 |
procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X, |
procedure FavoriteTreeViewDragDrop(Sender, Source: TObject; X, |
| 832 |
Y: Integer); |
Y: Integer); |
| 833 |
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); |
| 834 |
procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode; |
procedure FavoriteTreeViewEdited(Sender: TObject; Node: TTreeNode; |
| 835 |
var S: String); |
var S: String); |
| 836 |
procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word; |
procedure FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word; |
| 837 |
Shift: TShiftState); |
Shift: TShiftState); |
| 838 |
procedure FavoriteTreePopupMenuPopup(Sender: TObject); |
procedure FavoriteTreePopupMenuPopup(Sender: TObject); |
| 839 |
procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject); |
procedure FavoriteTreeViewDeleteActionExecute(Sender: TObject); |
| 840 |
procedure FavoriteTreeViewRenameActionExecute(Sender: TObject); |
procedure FavoriteTreeViewRenameActionExecute(Sender: TObject); |
| 841 |
procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject); |
procedure FavoriteTreeViewNewFolderActionExecute(Sender: TObject); |
| 842 |
procedure ToolButton19Click(Sender: TObject); |
procedure ToolButton19Click(Sender: TObject); |
| 843 |
procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject); |
procedure FavoriteTreeViewBrowseFolderActionExecute(Sender: TObject); |
| 844 |
procedure FavoriteTreeViewChange(Sender: TObject; Node: TTreeNode); |
procedure FavoriteTreeViewDblClick(Sender: TObject); |
| 845 |
procedure FavoriteTreeViewDblClick(Sender: TObject); |
procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject); |
| 846 |
procedure FavoriteTreeViewLogDeleteActionExecute(Sender: TObject); |
procedure FavoriteTreeViewReloadActionExecute(Sender: TObject); |
| 847 |
procedure FavoriteTreeViewReloadActionExecute(Sender: TObject); |
procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject); |
| 848 |
procedure FavoriteTreeViewURLCopyActionExecute(Sender: TObject); |
procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject); |
| 849 |
procedure FavoriteTreeViewNameCopyActionExecute(Sender: TObject); |
procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject); |
| 850 |
procedure FavoriteTreeViewNameURLCopyActionExecute(Sender: TObject); |
procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer); |
| 851 |
procedure LinkToolBarDragDrop(Sender, Source: TObject; X, Y: Integer); |
procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton; |
| 852 |
procedure BrowserTabMouseUp(Sender: TObject; Button: TMouseButton; |
Shift: TShiftState; X, Y: Integer); |
| 853 |
Shift: TShiftState; X, Y: Integer); |
procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer; |
| 854 |
procedure LinkToolBarDragOver(Sender, Source: TObject; X, Y: Integer; |
State: TDragState; var Accept: Boolean); |
| 855 |
State: TDragState; var Accept: Boolean); |
procedure ResRangeActionExecute(Sender: TObject); |
| 856 |
procedure OnlyAHundredResExecute(Sender: TObject); |
procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X, |
| 857 |
procedure FavoriteTreeViewEndDrag(Sender, Target: TObject; X, |
Y: Integer); |
| 858 |
Y: Integer); |
procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint; |
| 859 |
procedure ListCoolBarContextPopup(Sender: TObject; MousePos: TPoint; |
var Handled: Boolean); |
| 860 |
var Handled: Boolean); |
procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint; |
| 861 |
procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint; |
var Handled: Boolean); |
| 862 |
var Handled: Boolean); |
procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint; |
| 863 |
procedure BrowserCoolBarContextPopup(Sender: TObject; MousePos: TPoint; |
var Handled: Boolean); |
| 864 |
|
procedure ExportFavoriteFileAccept(Sender: TObject); |
| 865 |
|
procedure ExportFavoriteFileBeforeExecute(Sender: TObject); |
| 866 |
|
procedure CabinetBBSActionExecute(Sender: TObject); |
| 867 |
|
procedure FavoriteTreeViewBrowseThreadActionExecute(Sender: TObject); |
| 868 |
|
procedure FavoriteTreeBrowseBoardPopupMenuClick(Sender: TObject); |
| 869 |
|
procedure UpBoardActionExecute(Sender: TObject); |
| 870 |
|
procedure UpBoardActionUpdate(Sender: TObject); |
| 871 |
|
procedure BrowserTabContextPopup(Sender: TObject; MousePos: TPoint; |
| 872 |
var Handled: Boolean); |
var Handled: Boolean); |
| 873 |
|
procedure KoreCopyExecute(Sender: TObject); |
| 874 |
|
procedure BrowserTabPopupMenuPopup(Sender: TObject); |
| 875 |
|
procedure MenuToolBarResize(Sender: TObject); |
| 876 |
|
procedure StdToolBarResize(Sender: TObject); |
| 877 |
|
procedure LinkToolBarResize(Sender: TObject); |
| 878 |
|
procedure ListNameToolBarResize(Sender: TObject); |
| 879 |
|
procedure ListToolBarResize(Sender: TObject); |
| 880 |
|
procedure BrowserNameToolBarResize(Sender: TObject); |
| 881 |
|
procedure BrowserToolBarResize(Sender: TObject); |
| 882 |
|
procedure BrowserTabResize(Sender: TObject); |
| 883 |
|
procedure TreeViewClick(Sender: TObject); |
| 884 |
|
procedure TreeViewKeyDown(Sender: TObject; var Key: Word; |
| 885 |
|
Shift: TShiftState); |
| 886 |
|
procedure FavoriteTreeViewMouseDown(Sender: TObject; |
| 887 |
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
| 888 |
|
procedure MessagePanelResize(Sender: TObject); |
| 889 |
|
procedure OnResized; |
| 890 |
|
procedure TreeSelectNameCopyExecute(Sender: TObject); |
| 891 |
|
procedure FavoriteTreeViewMouseUp(Sender: TObject; |
| 892 |
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
| 893 |
|
procedure ResRangeActionUpdate(Sender: TObject); |
| 894 |
|
procedure SetFocusForBrowserActionExecute(Sender: TObject); |
| 895 |
|
procedure SetFocusForBrowserActionUpdate(Sender: TObject); |
| 896 |
|
procedure SetFocusForThreadListActionExecute(Sender: TObject); |
| 897 |
|
procedure SetFocusForCabinetActionExecute(Sender: TObject); |
| 898 |
|
procedure BrowserMaxAndFocusActionExecute(Sender: TObject); |
| 899 |
|
procedure BrowserMaxAndFocusActionUpdate(Sender: TObject); |
| 900 |
|
procedure ThreadlistMaxAndFocusActionExecute(Sender: TObject); |
| 901 |
|
procedure ListViewExit(Sender: TObject); |
| 902 |
|
procedure SetFocusForCabinetActionUpdate(Sender: TObject); |
| 903 |
|
procedure ListViewSelectItem(Sender: TObject; Item: TListItem; |
| 904 |
|
Selected: Boolean); |
| 905 |
|
procedure SelectTimerTimer(Sender: TObject); |
| 906 |
|
procedure SelectItemSaveForHTMLExecute(Sender: TObject); |
| 907 |
|
procedure KidokuActionExecute(Sender: TObject); |
| 908 |
|
procedure MidokuActionExecute(Sender: TObject); |
| 909 |
|
procedure SelectItemSaveForDatExecute(Sender: TObject); |
| 910 |
|
procedure BrowserPanelCanResize(Sender: TObject; var NewWidth, |
| 911 |
|
NewHeight: Integer; var Resize: Boolean); |
| 912 |
|
procedure LogFolderOpenActionExecute(Sender: TObject); |
| 913 |
|
procedure LogFolderOpenActionUpdate(Sender: TObject); |
| 914 |
|
procedure TabsSaveActionExecute(Sender: TObject); |
| 915 |
|
procedure TabsOpenActionExecute(Sender: TObject); |
| 916 |
|
procedure TabsSaveToFileActionExecute(Sender: TObject); |
| 917 |
|
procedure TabsOpenFromFileActionExecute(Sender: TObject); |
| 918 |
|
procedure OnlyAHundredResActionExecute(Sender: TObject); |
| 919 |
|
procedure OnlyKokoResActionExecute(Sender: TObject); |
| 920 |
|
procedure OnlyNewResActionExecute(Sender: TObject); |
| 921 |
|
procedure BrowsBoradHeadActionExecute(Sender: TObject); |
| 922 |
|
procedure BrowsBoradHeadActionUpdate(Sender: TObject); |
| 923 |
|
procedure EditNGActionExecute(Sender: TObject); |
| 924 |
|
procedure ThreadRangeActionUpdate(Sender: TObject); |
| 925 |
|
procedure ThreadRangeActionExecute(Sender: TObject); |
| 926 |
|
procedure TabAutoSaveActionExecute(Sender: TObject); |
| 927 |
|
procedure TabAutoLoadActionExecute(Sender: TObject); |
| 928 |
private |
private |
| 929 |
{ Private 宣言 } |
{ Private 宣言 } |
| 930 |
|
//RoundList : TRoundList; |
| 931 |
FSortIndex: Integer; |
FSortIndex: Integer; |
| 932 |
FSortOrder: Boolean; |
FSortOrder: Boolean; |
| 933 |
|
|
| 944 |
FBrowserSizeWidth: Integer; |
FBrowserSizeWidth: Integer; |
| 945 |
|
|
| 946 |
// FFavorite: TFavorite; |
// FFavorite: TFavorite; |
|
FBrowserComplete: Boolean; |
|
| 947 |
FTabHintIndex: Integer; |
FTabHintIndex: Integer; |
| 948 |
FListStyle: TViewStyle; //リストアイコンスタイル |
FListStyle: TViewStyle; //リストアイコンスタイル |
| 949 |
FItemNoVisible: Boolean; //リスト番号表示フラグ |
FItemNoVisible: Boolean; //リスト番号表示フラグ |
| 950 |
FViewType: TGikoViewType; //リストアイテム表示タイプ |
FViewType: TGikoViewType; //リストアイテム表示タイプ |
| 951 |
FActiveList: TObject; |
FActiveList: TObject; |
| 952 |
FActiveContent: TThreadItem; // |
FActiveContent: TBrowserRecord; // |
| 953 |
|
FActiveBBS : TBBS; |
| 954 |
FHistoryList: TList; //ヒストリリスト |
FHistoryList: TList; //ヒストリリスト |
| 955 |
FTreeType: TGikoTreeType; |
FTreeType: TGikoTreeType; |
| 956 |
FWorkCount: Integer; |
FWorkCount: Integer; |
| 957 |
FNameCookie: string; |
FNameCookie: string; |
| 958 |
FMailCookie: string; |
FMailCookie: string; |
| 959 |
// FLastRoundTime: TDateTime; |
// FLastRoundTime: TDateTime; |
| 960 |
BrowserNullTab: TThreadItem; |
BrowserNullTab: TBrowserRecord; |
| 961 |
// DoubleClickOccurred: array [TMouseButton] of Boolean; |
// DoubleClickOccurred: array [TMouseButton] of Boolean; |
| 962 |
FDownloadTitle: string; //ダウンロード中のタイトル名 |
FDownloadTitle: string; //ダウンロード中のタイトル名 |
| 963 |
FDownloadMax: Integer; //ダウンロード中の最大サイズ |
FDownloadMax: Integer; //ダウンロード中の最大サイズ |
| 964 |
FEvent: THTMLDocumentEventSink;//ブラウザドキュメントイベント |
FEvent: THTMLDocumentEventSink;//ブラウザドキュメントイベント |
| 965 |
|
|
| 966 |
Fkeynum : Integer; //キーボードレスポップアップ用 |
// Fkeynum : Integer; //キーボードレスポップアップ用 |
| 967 |
|
|
| 968 |
IsDraggingSelectComboBox : Boolean; |
IsDraggingSelectComboBox : Boolean; |
| 969 |
DraggingSelectComboBoxPosition : TPoint; |
DraggingSelectComboBoxPosition : TPoint; |
| 970 |
|
|
| 971 |
FSearchDialog: TSearchDialog; |
FSearchDialog: TSearchDialog; |
| 972 |
|
|
| 973 |
FDropSpaceNode: TTreeNode; |
FDropSpaceNode: TTreeNode; |
|
|
|
| 974 |
|
|
| 975 |
FDragTime : Cardinal; //リンクのD&D用 |
FDragTime : Cardinal; //リンクのD&D用 |
| 976 |
FDragButton : TToolButton; //リンクのD&D用にDragしてるButton保存 |
FDragButton : TToolButton; //リンクのD&D用にDragしてるButton保存 |
| 977 |
FDragWFirst : Boolean; //WebTabのD&D用 |
FDragWFirst : Boolean; //WebTabのD&D用 |
| 978 |
|
|
| 979 |
procedure SetBoardTreeNode; |
FListViewBackGroundColor : TColor; //ListViewのBackGroundColor |
| 980 |
function SetCategoryListItem(ABBS2ch: TBBS2ch): Integer; |
FUseOddResOddColor : Boolean; //取得レス数とスレッドのレス数が違ったときに他の色で表示 |
| 981 |
|
FOddColor : TColor; //その色 |
| 982 |
|
|
| 983 |
|
FSelectResWord : string; // レス絞込ワード |
| 984 |
|
FIsIgnoreResize : Boolean; // リサイズイベントを無視するかどうか |
| 985 |
|
FIsMinimize : TMinimizeType; // 最小化している最中か |
| 986 |
|
FOldFormWidth : Integer; // 直前のウィンドウの幅 |
| 987 |
|
FToolBarSettingSender : TToolBarSettingSenderType; // ツールバー設定をクリックしたクールバー |
| 988 |
|
FMouseDownPos : TPoint; // ブラウザタブでマウスを押したときの座標 |
| 989 |
|
FBrowsers: TList; |
| 990 |
|
FResRangeMenuSelect : Longint; ///< ResRangeButton で選択されている項目 (フォーマットは ResRange 互換) |
| 991 |
|
procedure SetBoardTreeNode( inBBS : TBBS ); |
| 992 |
|
function SetCategoryListItem(ABBS2ch: TBBS): Integer; |
| 993 |
function SetBoardListItem(Category: TCategory): Integer; |
function SetBoardListItem(Category: TCategory): Integer; |
| 994 |
function SetThreadListItem(Board: TBoard): Integer; |
function SetThreadListItem(Board: TBoard): Integer; |
| 995 |
// function GetRoundName(index: integer): string; |
// function GetRoundName(index: integer): string; |
| 996 |
|
|
| 997 |
procedure DownloadEnd(Sender: TObject; Item: TDownloadItem); |
procedure DownloadEnd(Sender: TObject; Item: TDownloadItem); |
| 998 |
procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon); |
procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon); |
| 999 |
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); |
| 1000 |
procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer); |
procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer); |
| 1001 |
procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer); |
procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer); |
| 1002 |
|
|
| 1003 |
procedure SetActiveList(Obj: TObject); |
procedure SetActiveList(Obj: TObject); |
| 1004 |
procedure ListClick; |
procedure ListClick; |
| 1005 |
procedure ListDoubleClick; |
procedure ListDoubleClick(Shift: TShiftState); |
| 1006 |
procedure BrowserMovement(AName: string); |
procedure BrowserMovement(const AName: string); overload; |
| 1007 |
|
procedure BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord); overload; |
| 1008 |
procedure SelectListItem(List: TList); |
procedure SelectListItem(List: TList); |
| 1009 |
// procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1); |
// procedure SetProgressValue(Number: Integer; Value: Integer; Max: Integer = -1); |
| 1010 |
procedure DeleteTab(ThreadItem: TThreadItem); |
procedure DeleteTab(ThreadItem: TThreadItem); overload; |
| 1011 |
|
procedure DeleteTab(BrowserRecord: TBrowserRecord); overload; |
| 1012 |
function Hook(var Message: TMessage): Boolean; |
function Hook(var Message: TMessage): Boolean; |
| 1013 |
procedure AddRoundNameMenu(MenuItem: TMenuItem); |
procedure AddRoundNameMenu(MenuItem: TMenuItem); |
| 1014 |
procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); |
procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string); overload; |
| 1015 |
|
procedure SetSelectItemRound(RoundFlag: Boolean; RoundName: string; ParentName: string); overload; |
| 1016 |
procedure SetSelectRoundName(Sender: TObject); |
procedure SetSelectRoundName(Sender: TObject); |
| 1017 |
function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand; |
function GetCoolBand(CoolBar: TCoolBar; Control: TWinControl): TCoolBand; |
| 1018 |
|
|
| 1021 |
procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem); |
procedure CreateFavMenu(Node: TTreeNode; MenuItem: TMenuItem); |
| 1022 |
procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload; |
procedure FavoriteClick(Sender: TObject; ActiveTab: Boolean); overload; |
| 1023 |
procedure FavoriteClick(Sender: TObject); overload; |
procedure FavoriteClick(Sender: TObject); overload; |
| 1024 |
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); |
| 1025 |
procedure SelectTreeNode(Item: TObject; CallEvent: Boolean); |
procedure SelectTreeNode(Item: TObject; CallEvent: Boolean); |
| 1026 |
function OnDocumentContextMenu(Sender: TObject): WordBool; |
function OnDocumentContextMenu(Sender: TObject): WordBool; |
| 1027 |
// 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; |
| 1028 |
procedure SetResPopupText(sBoard: string; sThread: string; StNum, ToNum: Integer; Title, First: Boolean); |
procedure SetResPopupText(ThreadItem : TThreadItem; StNum, ToNum: Integer; Title, First: Boolean); |
| 1029 |
procedure ShowTextPopup; |
procedure ShowTextPopup; |
| 1030 |
//procedure ShowTextPopup(HintData: THintData); |
//procedure ShowTextPopup(HintData: THintData); |
| 1031 |
// procedure SetStdToolBar; |
// procedure SetStdToolBar; |
| 1036 |
procedure LinkBarChevronMenu; |
procedure LinkBarChevronMenu; |
| 1037 |
procedure ToolBarChevronMenu(ToolBar: TToolBar); |
procedure ToolBarChevronMenu(ToolBar: TToolBar); |
| 1038 |
procedure ModifySelectList; |
procedure ModifySelectList; |
| 1039 |
procedure FavoriteBrowseFolder( node: TTreeNode ); |
procedure FavoriteBrowseFolder( node: TTreeNode ); |
| 1040 |
procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer); |
procedure LinkToolButtonDragDrop(Sender, Source: TObject; X, Y: Integer); |
| 1041 |
procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
procedure LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
| 1042 |
procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); |
procedure LinkToolButtonOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); |
| 1043 |
procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
procedure LinkToolButtonOnMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); |
| 1044 |
procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject); |
procedure LinkToolButtonStartDrag(Sender: TObject; var DragObject: TDragObject); |
| 1045 |
function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode; |
function TreeNodeDataFind(Node: TTreeNode; FindPointer: Pointer): TTreeNode; |
| 1046 |
procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode ); |
procedure FavoriteMoveTo( SenderNode, SourceNode: TTreeNode ); |
| 1047 |
procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject ); |
procedure FavoriteAddTo( SenderNode: TTreeNode; Source: TObject ); |
| 1048 |
procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject ); |
procedure FavoriteDragDrop( SenderNode: TTreeNode; Source: TObject ); |
| 1049 |
// |
// |
| 1050 |
procedure BrowserTabClick(Sender: TObject); |
procedure SetListViewBackGroundColor(value: TColor); |
| 1051 |
|
procedure BBSMenuItemOnClick( Sender : TObject ); |
| 1052 |
|
// |
| 1053 |
|
procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean); |
| 1054 |
|
// CoolBar の設定を変数に保存 |
| 1055 |
|
procedure SaveCoolBarSettings; |
| 1056 |
|
// CoolBar の設定を変数から復元 |
| 1057 |
|
procedure LoadCoolBarSettings; |
| 1058 |
|
// 最小化される |
| 1059 |
|
procedure OnMinimize; |
| 1060 |
|
// 最小化された |
| 1061 |
|
procedure OnMinimized; |
| 1062 |
|
// CoolBar がサイズ変更された |
| 1063 |
|
procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar); |
| 1064 |
|
// TreeView がクリックされた |
| 1065 |
|
procedure TreeClick( Node : TTreeNode ); |
| 1066 |
|
// TreeView がダブルクリックされた |
| 1067 |
|
procedure TreeDoubleClick( Node : TTreeNode ); |
| 1068 |
|
// ギコナビのメッセージループを横取りします |
| 1069 |
|
procedure HandleAppMessage(var Msg: TMsg; var Handled: Boolean); |
| 1070 |
|
// ブラウザのキーダウンイベント |
| 1071 |
|
// イベントを取り扱った場合は True を返す |
| 1072 |
|
function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean; |
| 1073 |
|
// 各所にあるキャビネット・ BBS メニューをセット/更新 |
| 1074 |
|
procedure SetBBSMenu; |
| 1075 |
|
function WebBrowserClick(Sender: TObject): WordBool; |
| 1076 |
|
procedure SkinorCSSFilesCopy(path: string); |
| 1077 |
|
// タブ取得 |
| 1078 |
|
function GetTabURLs(AStringList: TStringList) : Boolean; |
| 1079 |
|
// タブ保存 |
| 1080 |
|
function SaveTabURLs : Boolean; |
| 1081 |
|
// タブ読み出し |
| 1082 |
|
function LoadTabURLs : Boolean; |
| 1083 |
|
// バンド幅を再計算・再設定する |
| 1084 |
|
procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar ); |
| 1085 |
protected |
protected |
| 1086 |
procedure CreateParams(var Params: TCreateParams); override; |
procedure CreateParams(var Params: TCreateParams); override; |
| 1087 |
procedure WndProc(var Message: TMessage); override; |
procedure WndProc(var Message: TMessage); override; |
| 1088 |
procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR; |
procedure WMSetCursor(var Message: TWMSetCursor); message WM_SETCURSOR; |
| 1089 |
procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE; |
procedure WMSettingChange(var Message: TWMWinIniChange); message WM_SETTINGCHANGE; |
| 1090 |
procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA; |
procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA; |
| 1091 |
|
|
| 1092 |
public |
public |
| 1093 |
{ Public 宣言 } |
{ Public 宣言 } |
| 1094 |
// FDownload: TDownload; |
// FDownload: TDownload; |
| 1110 |
property NameCookie: string read FNameCookie write FNameCookie; |
property NameCookie: string read FNameCookie write FNameCookie; |
| 1111 |
property MailCookie: string read FMailCookie write FMailCookie; |
property MailCookie: string read FMailCookie write FMailCookie; |
| 1112 |
|
|
| 1113 |
procedure SetContent(ThreadItem: TThreadItem); |
procedure SetContent(inThread: TBrowserRecord); |
| 1114 |
function GetActiveContent: TThreadItem; |
function GetActiveContent: TThreadItem; |
| 1115 |
function GetActiveList: TObject; |
function GetActiveList: TObject; |
| 1116 |
|
|
| 1119 |
|
|
| 1120 |
procedure SetListViewType(AViewType: TGikoViewType); overload; |
procedure SetListViewType(AViewType: TGikoViewType); overload; |
| 1121 |
procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload; |
procedure SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean); overload; |
| 1122 |
procedure DownloadContent(ThreadItem: TThreadItem); |
procedure DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False); |
| 1123 |
procedure DownloadList(Board: TBoard); |
procedure DownloadList(Board: TBoard; ForceDownload: Boolean = False); |
| 1124 |
procedure PlaySound(SoundEventName: string); |
procedure PlaySound(SoundEventName: string); |
| 1125 |
|
|
| 1126 |
function AddHistory(ThreadItem: TThreadItem): Boolean; |
function AddHistory( FavItem: TFavoriteThreadItem ): Boolean; |
| 1127 |
procedure DeleteHistory(ThreadItem: TThreadItem); |
procedure DeleteHistory( threadItem: TThreadItem ); |
| 1128 |
procedure ClearHistory; |
procedure ClearHistory; |
| 1129 |
procedure Show2chTree; |
procedure SaveHistory; |
| 1130 |
|
procedure LoadHistory; |
| 1131 |
|
procedure ShowBBSTree( inBBS : TBBS ); |
| 1132 |
|
procedure ShowBBSTreeOld( inBBS : TBBS ); |
| 1133 |
procedure ShowHistoryTree; |
procedure ShowHistoryTree; |
| 1134 |
procedure SetHistoryTreeNode; |
procedure SetHistoryTreeNode; |
| 1135 |
// procedure SelectTreeNode(Item: TObject); |
// procedure SelectTreeNode(Item: TObject); |
| 1137 |
procedure SetBrowserTabState; |
procedure SetBrowserTabState; |
| 1138 |
// property Favorite: TFavorite read FFavorite write FFavorite; |
// property Favorite: TFavorite read FFavorite write FFavorite; |
| 1139 |
procedure SetToolBarPopup; |
procedure SetToolBarPopup; |
| 1140 |
|
procedure ShowFavoriteAddDialog( Item : TObject ); |
| 1141 |
|
procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList); |
| 1142 |
|
procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList); |
| 1143 |
|
property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor; |
| 1144 |
|
property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor; |
| 1145 |
|
property OddColor : TColor read FOddColor write FOddColor; |
| 1146 |
|
|
| 1147 |
|
function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton; |
| 1148 |
|
procedure OnPlugInMenuItem( Sender : TObject ); |
| 1149 |
|
procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList); |
| 1150 |
|
|
| 1151 |
published |
published |
| 1152 |
property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton; |
property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton; |
| 1153 |
end; |
end; |
| 1159 |
property Data: Pointer read FData write FData; |
property Data: Pointer read FData write FData; |
| 1160 |
end; |
end; |
| 1161 |
|
|
| 1162 |
|
TBBSMenuItem = class(TMenuItem) |
| 1163 |
|
private |
| 1164 |
|
FData : Pointer; |
| 1165 |
|
public |
| 1166 |
|
property Data: Pointer read FData write FData; |
| 1167 |
|
end; |
| 1168 |
|
|
| 1169 |
TLinkToolButton = class(TToolButton) |
TLinkToolButton = class(TToolButton) |
| 1170 |
private |
private |
| 1171 |
FData : Pointer; |
FData : Pointer; |
| 1173 |
property Data: Pointer read FData write FData; |
property Data: Pointer read FData write FData; |
| 1174 |
end; |
end; |
| 1175 |
|
|
| 1176 |
|
TBrowserRecord = class( TObject ) |
| 1177 |
|
private |
| 1178 |
|
FBrowser : TWebBrowser; |
| 1179 |
|
FEvent: THTMLDocumentEventSink;//ブラウザドキュメントイベント |
| 1180 |
|
FThread : TThreadItem; |
| 1181 |
|
FLastSize : Integer; |
| 1182 |
|
FRepaint : Boolean; |
| 1183 |
|
// FOnlyHundred: Boolean; |
| 1184 |
|
public |
| 1185 |
|
destructor Destroy; override; |
| 1186 |
|
property Browser : TWebBrowser read FBrowser write FBrowser; |
| 1187 |
|
property Thread : TThreadItem read FThread write FThread; |
| 1188 |
|
property LastSize : Integer read FLastSize write FLastSize; |
| 1189 |
|
property Repaint : Boolean read FRepaint write FRepaint; |
| 1190 |
|
// property OnlyHundred : Boolean read FOnlyHundred write FOnlyHundred; |
| 1191 |
|
end; |
| 1192 |
|
|
| 1193 |
var |
var |
| 1194 |
GikoForm: TGikoForm; |
GikoForm: TGikoForm; |
| 1195 |
|
|
| 1197 |
|
|
| 1198 |
uses |
uses |
| 1199 |
About, Option, Round, Splash, Sort, ListSelect, |
About, Option, Round, Splash, Sort, ListSelect, |
| 1200 |
NewBoard; |
NewBoard, MojuUtils,Clipbrd; |
| 1201 |
|
|
| 1202 |
const |
const |
| 1203 |
CAPTION_NAME: string = 'ギコナビ'; |
CAPTION_NAME: string = 'ギコナビ'; |
| 1204 |
BLANK_HTML: string = 'about:blank'; |
BLANK_HTML: string = 'about:blank'; |
| 1205 |
SELECTCOMBOBOX_NAME: string = ''; // 'スレッド絞込検索'; |
SELECTCOMBOBOX_NAME: string = ''; // 'スレッド絞込検索'; |
| 1206 |
SELECTCOMBOBOX_COLOR: TColor = clWindow; |
SELECTCOMBOBOX_COLOR: TColor = clWindow; |
| 1207 |
//D&D閾値 |
//D&D閾値 |
| 1208 |
DandD_THRESHOLD = 5; //D&Dの閾値(pixcel) |
DandD_THRESHOLD = 5; //D&Dの閾値(pixcel) |
| 1209 |
//ツリー・リストアイコン |
//ツリー・リストアイコン |
| 1210 |
ITEM_ICON_2CH1 = 0; //2chアイコン |
ITEM_ICON_2CH1 = 0; //2chアイコン |
| 1211 |
ITEM_ICON_2CH2 = 1; //2chアイコン |
ITEM_ICON_2CH2 = 1; //2chアイコン |
| 1212 |
ITEM_ICON_CATEGORY1 = 2; //カテゴリアイコン |
ITEM_ICON_CATEGORY1 = 2; //カテゴリアイコン |
| 1213 |
ITEM_ICON_CATEGORY2 = 3; //カテゴリアイコン |
ITEM_ICON_CATEGORY2 = 3; //カテゴリアイコン |
| 1214 |
|
ITEM_ICON_BOARD_NOSUBJECT = 3; //読み込まれていない板アイコン |
| 1215 |
ITEM_ICON_BOARD1 = 4; //板アイコン |
ITEM_ICON_BOARD1 = 4; //板アイコン |
| 1216 |
ITEM_ICON_BOARD2 = 5; //板アイコン |
ITEM_ICON_BOARD2 = 5; //板アイコン |
| 1217 |
ITEM_ICON_THREADLOG1 = 6; //スレアイコン(ログあり) |
ITEM_ICON_THREADLOG1 = 6; //スレアイコン(ログあり) |
| 1222 |
ITEM_ICON_THREADNEW2 = 11; //スレアイコン(新着) |
ITEM_ICON_THREADNEW2 = 11; //スレアイコン(新着) |
| 1223 |
ITEM_ICON_SORT1 = 12; //ソートアイコン |
ITEM_ICON_SORT1 = 12; //ソートアイコン |
| 1224 |
ITEM_ICON_SORT2 = 13; //ソートアイコン |
ITEM_ICON_SORT2 = 13; //ソートアイコン |
| 1225 |
|
ITEM_ICON_BOARD_LOG = 17; //スレログあり板アイコン |
| 1226 |
|
ITEM_ICON_BOARD_NEW = 18; //スレ新着板アイコン |
| 1227 |
|
|
| 1228 |
//ツールバーアイコン |
//ツールバーアイコン |
| 1229 |
TOOL_ICON_HEIGHT_MAX = 16; //高さ最大アイコン |
TOOL_ICON_HEIGHT_MAX = 16; //高さ最大アイコン |
| 1234 |
TOOL_ICON_WIDTH_NORMAL = 21; //幅標準アイコン |
TOOL_ICON_WIDTH_NORMAL = 21; //幅標準アイコン |
| 1235 |
|
|
| 1236 |
TOOL_ICON_FAV_FOLDER = 30; //お気に入りフォルダアイコン |
TOOL_ICON_FAV_FOLDER = 30; //お気に入りフォルダアイコン |
| 1237 |
TOOL_ICON_FAV_BOARD = 31; //お気に入り板アイコン |
TOOL_ICON_FAV_BOARD = 31; //お気に入り板アイコン |
| 1238 |
TOOL_ICON_FAV_THREAD = 32; //お気に入りスレアイコン |
TOOL_ICON_FAV_THREAD = 32; //お気に入りスレアイコン |
| 1239 |
|
|
| 1240 |
HTML_FILE_NAME = 'temp_preview.html'; |
HTML_FILE_NAME = 'temp_preview.html'; |
| 1241 |
|
|
| 1242 |
|
WM_XBUTTONDOWN = $020B; |
| 1243 |
|
WM_XBUTTONUP = $020C; |
| 1244 |
|
WM_XBUTTONDBLCLK = $020D; |
| 1245 |
|
XBUTTON1 = $0001; |
| 1246 |
|
XBUTTON2 = $0002; |
| 1247 |
|
USER_TREECLICK = WM_USER + 2000; |
| 1248 |
|
USER_RESIZED = WM_USER + 2001; |
| 1249 |
|
USER_MINIMIZED = WM_USER + 2002; |
| 1250 |
|
USER_SETLINKBAR = WM_USER + 2003; |
| 1251 |
|
SELECTTIME_INTERBAL = 110; |
| 1252 |
|
|
| 1253 |
|
BROWSER_COUNT = 5; //ブラウザの数 |
| 1254 |
{$R *.DFM} |
{$R *.DFM} |
| 1255 |
|
|
| 1256 |
procedure TGikoForm.CreateParams(var Params: TCreateParams); |
procedure TGikoForm.CreateParams(var Params: TCreateParams); |
| 1274 |
i: Integer; |
i: Integer; |
| 1275 |
wp: TWindowPlacement; |
wp: TWindowPlacement; |
| 1276 |
s: string; |
s: string; |
| 1277 |
|
newbrowser: TWebBrowser; |
| 1278 |
begin |
begin |
| 1279 |
{$IFDEF DEBUG} |
{$IFDEF DEBUG} |
| 1280 |
AllocConsole; |
AllocConsole; |
| 1288 |
Application.OnDeactivate := AppFormDeactivate; |
Application.OnDeactivate := AppFormDeactivate; |
| 1289 |
Self.OnDeactivate := AppFormDeactivate; |
Self.OnDeactivate := AppFormDeactivate; |
| 1290 |
Application.HookMainWindow(Hook); |
Application.HookMainWindow(Hook); |
| 1291 |
|
Application.OnMessage := HandleAppMessage; //なんか無くても大丈夫になった by もじゅ |
| 1292 |
|
Self.DoubleBuffered := true; |
| 1293 |
FTreeType := gttNone; |
FTreeType := gttNone; |
| 1294 |
|
|
| 1295 |
FSearchDialog := nil; |
FSearchDialog := nil; |
| 1296 |
|
BrowserNullTab := TBrowserRecord.Create; |
| 1297 |
|
BrowserNullTab.Browser := Browser; |
| 1298 |
|
BrowserNullTab.Browser.Navigate(BLANK_HTML); |
| 1299 |
|
FBrowsers := TList.Create; |
| 1300 |
|
for i := 0 to BROWSER_COUNT -1 do begin |
| 1301 |
|
FBrowsers.Add(TWebBrowser.Create(nil)); |
| 1302 |
|
newBrowser := FBrowsers[FBrowsers.Count - 1]; |
| 1303 |
|
TOleControl(newBrowser).Parent := BrowserPanel; |
| 1304 |
|
newBrowser.Align := alNone; |
| 1305 |
|
newBrowser.Left := 0; |
| 1306 |
|
newBrowser.Top := 0; |
| 1307 |
|
//newBrowser.DoubleBuffered := true; |
| 1308 |
|
newBrowser.OnDocumentComplete := BrowserDocumentComplete; |
| 1309 |
|
newBrowser.OnBeforeNavigate2 := BrowserBeforeNavigate2; |
| 1310 |
|
newBrowser.OnEnter := BrowserEnter; |
| 1311 |
|
newBrowser.OnNewWindow2 := BrowserNewWindow2; |
| 1312 |
|
newBrowser.OnStatusTextChange := BrowserStatusTextChange; |
| 1313 |
|
//newBrowser.OnTitleChange := BrowserTitleChange; |
| 1314 |
|
newBrowser.Navigate(BLANK_HTML); |
| 1315 |
|
ShowWindow(newBrowser.Handle, SW_HIDE); |
| 1316 |
|
|
| 1317 |
|
end; |
| 1318 |
|
BrowserNullTab.Browser.BringToFront; |
| 1319 |
|
ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW); |
| 1320 |
|
|
| 1321 |
|
// 起動時に保存されてしまう対策 |
| 1322 |
|
FIsIgnoreResize := True; |
| 1323 |
|
|
| 1324 |
//手のカーソル |
//手のカーソル |
| 1325 |
Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND'); |
Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND'); |
| 1326 |
|
|
| 1327 |
|
|
| 1328 |
|
//アドレス履歴読み込み |
| 1329 |
|
AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount); |
| 1330 |
|
|
| 1331 |
|
// 外部板プラグインをロード(ReadBoardFile, LoadHistory より先に行うこと) |
| 1332 |
|
InitializeBoardPlugIns; |
| 1333 |
|
|
| 1334 |
|
EnabledCloseButton := True; |
| 1335 |
|
|
| 1336 |
|
|
| 1337 |
//巡回データ読み込み |
//巡回データ読み込み |
| 1338 |
RoundList := TRoundList.Create; |
RoundList := TRoundList.Create; |
| 1339 |
RoundList.LoadRoundFile; |
RoundList.LoadRoundBoardFile; |
| 1340 |
|
|
| 1341 |
//BBS作成 |
// ボードファイル列挙(ReadFavorite より先に行うこと) |
| 1342 |
BBS2ch := TBBS2ch.Create(GikoSys.Setting.LogFolder); |
GikoSys.ListBoardFile; |
| 1343 |
|
|
| 1344 |
|
RoundList.LoadRoundThreadFile; |
| 1345 |
|
|
| 1346 |
|
if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then |
| 1347 |
|
GikoSys.ListBoardFile; |
| 1348 |
|
|
| 1349 |
|
// メニューに追加 |
| 1350 |
|
SetBBSMenu; |
| 1351 |
|
|
| 1352 |
|
// ヒストリリスト(LoadHistory よりも先に行うこと) |
| 1353 |
|
FHistoryList := TList.Create; |
| 1354 |
|
|
| 1355 |
|
// 履歴読み込み |
| 1356 |
|
LoadHistory; |
| 1357 |
|
|
| 1358 |
//お気に入り読み込み |
//お気に入り読み込み |
| 1359 |
// FFavorite := TFavorite.Create(FavoriteTreeView); |
// FFavorite := TFavorite.Create(FavoriteTreeView); |
| 1360 |
FavoriteDM.SetFavTreeView(FavoriteTreeView); |
FavoriteDM.SetFavTreeView(FavoriteTreeView); |
| 1361 |
FavoriteDM.ReadFavorite; |
FavoriteDM.ReadFavorite; |
| 1362 |
|
|
|
//アドレス履歴読み込み |
|
|
AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount); |
|
|
|
|
|
EnabledCloseButton := True; |
|
|
BoardGroup.BBS2ch.ReadBoardFile; //ボードファイル読込 |
|
|
// SetBoardTreeNode; //ツリーにボード追加 |
|
|
|
|
| 1363 |
//リストスタイル |
//リストスタイル |
| 1364 |
ListView.ViewStyle := GikoSys.Setting.ListStyle; |
ListView.ViewStyle := GikoSys.Setting.ListStyle; |
| 1365 |
|
|
| 1374 |
//各種可視状態など設定 |
//各種可視状態など設定 |
| 1375 |
|
|
| 1376 |
//キャビネット |
//キャビネット |
|
CabinetVisibleAction.Checked := not GikoSys.Setting.CabinetVisible; |
|
|
CabinetVisibleAction.Execute; |
|
| 1377 |
CabinetPanel.Width := GikoSys.Setting.CabinetWidth; |
CabinetPanel.Width := GikoSys.Setting.CabinetWidth; |
| 1378 |
|
|
| 1379 |
//メッセージバー |
//メッセージバー |
| 1387 |
|
|
| 1388 |
//フォント・色設定 |
//フォント・色設定 |
| 1389 |
TreeView.Items.BeginUpdate; |
TreeView.Items.BeginUpdate; |
| 1390 |
FavoriteTreeView.Items.BeginUpdate; |
FavoriteTreeView.Items.BeginUpdate; |
| 1391 |
ListView.Items.BeginUpdate; |
ListView.Items.BeginUpdate; |
| 1392 |
try |
try |
| 1393 |
TreeView.Font.Name := GikoSys.Setting.CabinetFontName; |
TreeView.Font.Name := GikoSys.Setting.CabinetFontName; |
| 1403 |
ListView.Font.Name := GikoSys.Setting.ListFontName; |
ListView.Font.Name := GikoSys.Setting.ListFontName; |
| 1404 |
ListView.Font.Size := GikoSys.Setting.ListFontSize; |
ListView.Font.Size := GikoSys.Setting.ListFontSize; |
| 1405 |
ListView.Font.Color := GikoSys.Setting.ListFontColor; |
ListView.Font.Color := GikoSys.Setting.ListFontColor; |
| 1406 |
ListView.Color := GikoSys.Setting.ListBackColor; |
//ListView.Color := GikoSys.Setting.ListBackColor; |
| 1407 |
|
ListViewBackGroundColor := GikoSys.Setting.ListBackColor; |
| 1408 |
|
FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum; |
| 1409 |
|
FOddColor := GikoSys.Setting.OddColor; |
| 1410 |
|
|
| 1411 |
finally |
finally |
| 1412 |
TreeView.Items.EndUpdate; |
TreeView.Items.EndUpdate; |
| 1413 |
FavoriteTreeView.Items.EndUpdate; |
FavoriteTreeView.Items.EndUpdate; |
| 1414 |
ListView.Items.EndUpdate; |
ListView.Items.EndUpdate; |
| 1415 |
end; |
end; |
| 1416 |
//ViewNoButton.Down := GikoSys.Setting.ListViewNo; |
//ViewNoButton.Down := GikoSys.Setting.ListViewNo; |
| 1419 |
//ブラウザタブフォント |
//ブラウザタブフォント |
| 1420 |
BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName; |
BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName; |
| 1421 |
BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize; |
BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize; |
| 1422 |
FDragWFirst := false; |
FDragWFirst := false; |
| 1423 |
|
SetContent(BrowserNullTab); //ブラウザを空白表示 |
| 1424 |
// TreeView.TopItem.Expanded := True; //ツリートップ項目だけを開く |
// TreeView.TopItem.Expanded := True; //ツリートップ項目だけを開く |
| 1425 |
// TreeView.Selected := TreeView.Items[0]; //ツリーのトップ項目を選択する |
// TreeView.Selected := TreeView.Items[0]; //ツリーのトップ項目を選択する |
| 1426 |
SetContent(nil); //ブラウザを空白表示 |
|
| 1427 |
|
|
| 1428 |
//最大化・ウィンドウ位置復元 |
//最大化・ウィンドウ位置復元 |
| 1429 |
wp.length := sizeof(wp); |
wp.length := sizeof(wp); |
| 1437 |
// SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop, |
// SetBounds(GikoSys.Setting.WindowLeft, GikoSys.Setting.WindowTop, |
| 1438 |
// GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight); |
// GikoSys.Setting.WindowWidth, GikoSys.Setting.WindowHeight); |
| 1439 |
if GikoSys.Setting.WindowMax then |
if GikoSys.Setting.WindowMax then |
| 1440 |
WindowState := wsMaximized; |
WindowState := wsMaximized; |
| 1441 |
|
|
| 1442 |
//ギコアニメ |
//ギコアニメ |
| 1443 |
try |
try |
| 1446 |
Animate.FileName := FileName; |
Animate.FileName := FileName; |
| 1447 |
except |
except |
| 1448 |
end; |
end; |
|
// AnimePanel.Height := 26; |
|
|
// AnimePanel.Width := 39; |
|
|
// AnimePanel.Top := 2; |
|
|
// AnimePanel.Left := Width - 48; |
|
| 1449 |
|
|
| 1450 |
//クッキー |
//クッキー |
| 1451 |
FNameCookie := ''; |
FNameCookie := ''; |
| 1453 |
|
|
| 1454 |
//スレ全部表示ボタンを押された状態にする |
//スレ全部表示ボタンを押された状態にする |
| 1455 |
AllItemAction.Checked := True; |
AllItemAction.Checked := True; |
| 1456 |
AllResAction.Checked := True; |
AllResAction.Checked := True; |
| 1457 |
|
|
| 1458 |
//TreeViewの邪魔臭いToolTipを非表示 |
//TreeViewの邪魔臭いToolTipを非表示 |
| 1459 |
Style := GetWindowLong(TreeView.Handle, GWL_STYLE); |
Style := GetWindowLong(TreeView.Handle, GWL_STYLE); |
| 1493 |
BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN; |
BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN; |
| 1494 |
end; |
end; |
| 1495 |
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; |
|
| 1496 |
end else begin |
end else begin |
| 1497 |
case GikoSys.Setting.ListHeightState of |
case GikoSys.Setting.ListHeightState of |
| 1498 |
glsMax: begin |
glsMax: begin |
| 1511 |
BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN; |
BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN; |
| 1512 |
end; |
end; |
| 1513 |
end; |
end; |
|
// if GikoSys.Setting.ListHeightState = glsMax then begin |
|
|
// end else begin |
|
|
// ViewPanel.Height := GikoSys.Setting.ListHeight; |
|
|
// BrowserSizeAction.ImageIndex := ICON_HEIGHT_MAX; |
|
|
// end; |
|
| 1514 |
end; |
end; |
| 1515 |
|
|
| 1516 |
//プログレスバーの初期化 |
//プログレスバーの初期化 |
| 1522 |
ProgressBar.Height := StatusBar.Height - 2; |
ProgressBar.Height := StatusBar.Height - 2; |
| 1523 |
ProgressBar.Position := 0; |
ProgressBar.Position := 0; |
| 1524 |
|
|
|
//ツールバー表示 |
|
|
//formshow()に移動 |
|
|
|
|
|
//ダウンロードオブジェクト |
|
|
// FDownload := TDownload.Create; |
|
|
// FDownload.OnDownloadEnd := OnDonloadEnd; |
|
|
// FDownload.OnWork := Work; |
|
|
// FDownload.OnWorkBegin := WorkBegin; |
|
|
// FDownload.OnWorkEnd := WorkEnd; |
|
|
|
|
| 1525 |
//ダウンロードオブジェクト |
//ダウンロードオブジェクト |
| 1526 |
FControlThread := TThreadControl.Create(True); |
FControlThread := TThreadControl.Create(True); |
| 1527 |
FControlThread.MaxThreadCount := 1; |
FControlThread.MaxThreadCount := 1; |
| 1533 |
FControlThread.OnWorkEnd := WorkEnd; |
FControlThread.OnWorkEnd := WorkEnd; |
| 1534 |
// ProgressPanel.Width := FControlThread.MaxThreadCount * 12; |
// ProgressPanel.Width := FControlThread.MaxThreadCount * 12; |
| 1535 |
|
|
|
//ヒストリリスト |
|
|
FHistoryList := TList.Create; |
|
|
|
|
| 1536 |
// 絞込検索履歴 |
// 絞込検索履歴 |
| 1537 |
SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList ); |
SelectComboBox.Items.Assign( GikoSys.Setting.SelectTextList ); |
| 1538 |
|
|
| 1543 |
BrowserNameLabel.Caption := ''; |
BrowserNameLabel.Caption := ''; |
| 1544 |
FWorkCount := 0; |
FWorkCount := 0; |
| 1545 |
|
|
|
// DetailIconAction.Execute; |
|
|
|
|
|
// FBrowserSizeHeight := ViewPanel.Height; |
|
| 1546 |
FTabHintIndex := -1; |
FTabHintIndex := -1; |
| 1547 |
|
|
|
//ログフォルダが存在しない場合は作成する |
|
|
// if not GikoSys.DirectoryExistsEx(BBS2ch.GetLogFolder) then begin |
|
|
// GikoSys.ForceDirectoriesEx(BBS2ch.GetLogFolder); |
|
|
// end; |
|
|
// FormResize(Sender); |
|
|
// MainCoolBarResize(Sender); |
|
|
// Application.ProcessMessages; |
|
|
|
|
| 1548 |
//リンクバー |
//リンクバー |
| 1549 |
SetLinkBar; |
SetLinkBar; |
| 1550 |
|
|
| 1555 |
ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable; |
ListToolBar.Wrapable := GikoSys.Setting.ListToolBarWrapable; |
| 1556 |
BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable; |
BrowserToolBar.Wrapable := GikoSys.Setting.BrowserToolBarWrapable; |
| 1557 |
|
|
| 1558 |
|
KeepDefaultToolButton(StdToolBar, TmpToolBar); |
| 1559 |
|
KeepDefaultToolButton(ListToolBar, TmpToolBar); |
| 1560 |
|
KeepDefaultToolButton(BrowserToolBar, TmpToolBar); |
| 1561 |
|
|
| 1562 |
|
MakeDefaultINIFile(); |
| 1563 |
//ツールボタン読み込み |
//ツールボタン読み込み |
| 1564 |
ReadToolBarSetting(ActionList, StdToolBar); |
ReadToolBarSetting(ActionList, StdToolBar); |
| 1565 |
ReadToolBarSetting(ActionList, ListToolBar); |
ReadToolBarSetting(ActionList, ListToolBar); |
| 1577 |
// スレッド絞込ボタンを隠す |
// スレッド絞込ボタンを隠す |
| 1578 |
ListToolBar.Controls[ i ].Visible := False; |
ListToolBar.Controls[ i ].Visible := False; |
| 1579 |
// スレッド絞込フィールドを挿入 |
// スレッド絞込フィールドを挿入 |
| 1580 |
|
SelectComboBox.Parent := ListToolBar; |
| 1581 |
SelectComboBox.Left := ListToolBar.Controls[ i ].Left; |
SelectComboBox.Left := ListToolBar.Controls[ i ].Left; |
| 1582 |
SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth; |
SelectComboBox.Width := GikoSys.Setting.SelectComboBoxWidth; |
|
SelectComboBox.Parent := ListToolBar; |
|
| 1583 |
// スレッド絞込用独自セパレータを挿入 |
// スレッド絞込用独自セパレータを挿入 |
|
SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width; |
|
| 1584 |
SelectComboBoxSplitter.Parent := ListToolBar; |
SelectComboBoxSplitter.Parent := ListToolBar; |
| 1585 |
|
SelectComboBoxSplitter.Left := SelectComboBox.Left + SelectComboBox.Width; |
| 1586 |
|
|
| 1587 |
break; |
break; |
| 1588 |
end; |
end; |
| 1591 |
end; |
end; |
| 1592 |
ReadToolBarSetting(ActionList, BrowserToolBar); |
ReadToolBarSetting(ActionList, BrowserToolBar); |
| 1593 |
SetToolBarPopup; |
SetToolBarPopup; |
| 1594 |
OnlyAHundredRes.Checked := GikoSys.Setting.OnlyAHundredRes; |
|
| 1595 |
|
// レス表示範囲 |
| 1596 |
|
FResRangeMenuSelect := GikoSys.ResRange; |
| 1597 |
|
case GikoSys.ResRange of |
| 1598 |
|
Ord( grrAll ): |
| 1599 |
|
begin |
| 1600 |
|
AllResAction.Execute; |
| 1601 |
|
end; |
| 1602 |
|
Ord( grrSelect ): |
| 1603 |
|
begin |
| 1604 |
|
SelectComboBox.Text := SelectComboBox.Items[ 1 ]; |
| 1605 |
|
SelectResAction.Checked := True; |
| 1606 |
|
end; |
| 1607 |
|
else |
| 1608 |
|
// ResRangeAction.Execute; |
| 1609 |
|
case FResRangeMenuSelect of |
| 1610 |
|
Ord( grrKoko ): OnlyKokoResAction.Checked := True; |
| 1611 |
|
Ord( grrNew ): OnlyNewResAction.Checked := True; |
| 1612 |
|
100: OnlyAHundredResAction.Checked := True; |
| 1613 |
|
end; |
| 1614 |
|
end; |
| 1615 |
|
|
| 1616 |
|
// スレッド一覧表示範囲 |
| 1617 |
|
// ThreadRangeAction.Execute; |
| 1618 |
|
case GikoSys.Setting.ThreadRange of |
| 1619 |
|
gtrAll: |
| 1620 |
|
begin |
| 1621 |
|
AllItemAction.Checked := True; |
| 1622 |
|
ViewType := gvtAll; |
| 1623 |
|
end; |
| 1624 |
|
gtrLog: |
| 1625 |
|
begin |
| 1626 |
|
LogItemAction.Checked := True; |
| 1627 |
|
ViewType := gvtLog; |
| 1628 |
|
end; |
| 1629 |
|
gtrNew: |
| 1630 |
|
begin |
| 1631 |
|
NewItemAction.Checked := True; |
| 1632 |
|
ViewType := gvtNew; |
| 1633 |
|
end; |
| 1634 |
|
end; |
| 1635 |
|
|
| 1636 |
//アドレスバー |
//アドレスバー |
| 1637 |
AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop; |
AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop; |
| 1638 |
|
|
| 1656 |
//ResHint |
//ResHint |
| 1657 |
FHint := TResPopup.Create(Self); |
FHint := TResPopup.Create(Self); |
| 1658 |
|
|
| 1659 |
// 2ちゃんねるキャビネットの状態復元(未実装) |
// 最後に選択されたキャビネットの復元 |
| 1660 |
// およびスレ一覧ペインの状態復元(未実装、現在は初期表示用) |
CabinetVisible( False ); |
| 1661 |
i := GikoSys.Setting.CabinetIndex; |
if GikoSys.Setting.CabinetVisible then begin |
| 1662 |
Cabinet2chAction.Execute; |
i := CabinetSelectPopupMenu.Items.Count - 1; |
| 1663 |
GikoSys.Setting.CabinetIndex := i; |
if GikoSys.Setting.CabinetIndex = i - 1 then |
| 1664 |
|
CabinetHistoryAction.Execute |
| 1665 |
// 最後に選択されたキャビネットの復元 |
else if GikoSys.Setting.CabinetIndex = i then |
| 1666 |
Case GikoSys.Setting.CabinetIndex of |
CabinetFavoriteAction.Execute |
| 1667 |
0: Cabinet2chAction.Execute; |
else begin |
| 1668 |
1: CabinetHistoryAction.Execute; |
if GikoSys.Setting.CabinetIndex < Length( BBSs ) then |
| 1669 |
2: CabinetFavoriteAction.Execute; |
ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] ); |
| 1670 |
end; |
// 起動時に保存されてしまう対策 2 |
| 1671 |
|
FIsIgnoreResize := True; |
| 1672 |
|
CabinetBBSAction.Execute; |
| 1673 |
|
end; |
| 1674 |
|
end else begin |
| 1675 |
|
ShowBBSTreeOld( BBSs[ 0 ] ); |
| 1676 |
|
PostMessage( Handle, USER_TREECLICK, 0, 0 ); |
| 1677 |
|
end; |
| 1678 |
|
|
| 1679 |
|
// 起動時に保存されてしまう対策 3 |
| 1680 |
|
FIsIgnoreResize := True; |
| 1681 |
|
|
| 1682 |
//オートログイン |
//オートログイン |
| 1683 |
if GikoSys.Setting.AutoLogin then |
if GikoSys.Setting.AutoLogin then |
| 1694 |
StatusBar.Panels[2].Text := s; |
StatusBar.Panels[2].Text := s; |
| 1695 |
StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100); |
StatusBar.Panels[2].Width := Max(StatusBar.Canvas.TextWidth(s), 100); |
| 1696 |
StatusBarResize(Sender); |
StatusBarResize(Sender); |
| 1697 |
|
|
| 1698 |
|
dummy1.Caption := ItemReservPMenu.Caption; |
| 1699 |
|
dummy1.Hint := ItemReservPMenu.Hint; |
| 1700 |
|
|
| 1701 |
|
//Samba24のファイルチェック |
| 1702 |
|
GikoSys.SambaFileExists(); |
| 1703 |
|
|
| 1704 |
|
//タブ自動読み込み (AV発生のため一時封印) |
| 1705 |
|
end; |
| 1706 |
|
|
| 1707 |
|
// CoolBar の設定を変数に保存 |
| 1708 |
|
procedure TGikoForm.SaveCoolBarSettings; |
| 1709 |
|
var |
| 1710 |
|
i : Integer; |
| 1711 |
|
CoolSet : TCoolSet; |
| 1712 |
|
begin |
| 1713 |
|
|
| 1714 |
|
if IsIconic( Handle ) or FIsIgnoreResize then |
| 1715 |
|
Exit; |
| 1716 |
|
|
| 1717 |
|
//クールバー保存(Main) |
| 1718 |
|
for i := 0 to MAIN_COOLBAND_COUNT - 1 do begin |
| 1719 |
|
CoolSet.FCoolID := MainCoolBar.Bands[i].ID; |
| 1720 |
|
CoolSet.FCoolWidth := MainCoolBar.Bands[i].Width; |
| 1721 |
|
CoolSet.FCoolBreak := MainCoolBar.Bands[i].Break; |
| 1722 |
|
GikoSys.Setting.MainCoolSet[i] := CoolSet; |
| 1723 |
|
end; |
| 1724 |
|
//クールバー保存(Board) |
| 1725 |
|
for i := 0 to LIST_COOLBAND_COUNT - 1 do begin |
| 1726 |
|
CoolSet.FCoolID := ListCoolBar.Bands[i].ID; |
| 1727 |
|
CoolSet.FCoolWidth := ListCoolBar.Bands[i].Width; |
| 1728 |
|
CoolSet.FCoolBreak := ListCoolBar.Bands[i].Break; |
| 1729 |
|
GikoSys.Setting.ListCoolSet[i] := CoolSet; |
| 1730 |
|
end; |
| 1731 |
|
//クールバー保存(Browser) |
| 1732 |
|
for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin |
| 1733 |
|
CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID; |
| 1734 |
|
CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width; |
| 1735 |
|
CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break; |
| 1736 |
|
GikoSys.Setting.BrowserCoolSet[i] := CoolSet; |
| 1737 |
|
end; |
| 1738 |
|
|
| 1739 |
|
end; |
| 1740 |
|
|
| 1741 |
|
// CoolBar の設定を変数から復元 |
| 1742 |
|
procedure TGikoForm.LoadCoolBarSettings; |
| 1743 |
|
var |
| 1744 |
|
i : Integer; |
| 1745 |
|
CoolSet : TCoolSet; |
| 1746 |
|
begin |
| 1747 |
|
|
| 1748 |
|
//クールバー復元(Main) |
| 1749 |
|
MainCoolBar.Bands.BeginUpdate; |
| 1750 |
|
try |
| 1751 |
|
// for i := 0 to MainCoolBar.Bands.Count - 1 do begin |
| 1752 |
|
for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin |
| 1753 |
|
CoolSet := GikoSys.Setting.MainCoolSet[i]; |
| 1754 |
|
if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin |
| 1755 |
|
FIsIgnoreResize := False; |
| 1756 |
|
SaveCoolBarSettings; |
| 1757 |
|
Exit; |
| 1758 |
|
end; |
| 1759 |
|
MainCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i; |
| 1760 |
|
MainCoolBar.Bands[i].Break := CoolSet.FCoolBreak; |
| 1761 |
|
MainCoolBar.Bands[i].Width := CoolSet.FCoolWidth; |
| 1762 |
|
end; |
| 1763 |
|
finally |
| 1764 |
|
MainCoolBar.Bands.EndUpdate; |
| 1765 |
|
end; |
| 1766 |
|
|
| 1767 |
|
//クールバー復元(Board) |
| 1768 |
|
ListCoolBar.Bands.BeginUpdate; |
| 1769 |
|
try |
| 1770 |
|
// for i := 0 to ListCoolBar.Bands.Count - 1 do begin |
| 1771 |
|
for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin |
| 1772 |
|
CoolSet := GikoSys.Setting.ListCoolSet[i]; |
| 1773 |
|
if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin |
| 1774 |
|
FIsIgnoreResize := False; |
| 1775 |
|
SaveCoolBarSettings; |
| 1776 |
|
Exit; |
| 1777 |
|
end; |
| 1778 |
|
ListCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i; |
| 1779 |
|
ListCoolBar.Bands[i].Break := CoolSet.FCoolBreak; |
| 1780 |
|
ListCoolBar.Bands[i].Width := CoolSet.FCoolWidth; |
| 1781 |
|
end; |
| 1782 |
|
finally |
| 1783 |
|
ListCoolBar.Bands.EndUpdate; |
| 1784 |
|
end; |
| 1785 |
|
|
| 1786 |
|
//クールバー復元(Browser) |
| 1787 |
|
BrowserCoolBar.Bands.BeginUpdate; |
| 1788 |
|
try |
| 1789 |
|
// for i := 0 to BrowserCoolBar.Bands.Count - 1 do begin |
| 1790 |
|
for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin |
| 1791 |
|
CoolSet := GikoSys.Setting.BrowserCoolSet[i]; |
| 1792 |
|
if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin |
| 1793 |
|
FIsIgnoreResize := False; |
| 1794 |
|
SaveCoolBarSettings; |
| 1795 |
|
Exit; |
| 1796 |
|
end; |
| 1797 |
|
BrowserCoolBar.Bands.FindItemID(CoolSet.FCoolID).Index := i; |
| 1798 |
|
BrowserCoolBar.Bands[i].Break := CoolSet.FCoolBreak; |
| 1799 |
|
BrowserCoolBar.Bands[i].Width := CoolSet.FCoolWidth; |
| 1800 |
|
end; |
| 1801 |
|
finally |
| 1802 |
|
BrowserCoolBar.Bands.EndUpdate; |
| 1803 |
|
end; |
| 1804 |
|
|
| 1805 |
end; |
end; |
| 1806 |
|
|
| 1807 |
// |
// |
| 1808 |
// |
// |
| 1809 |
// |
// |
| 1810 |
procedure TGikoForm.FormShow(Sender: TObject); |
procedure TGikoForm.FormShow(Sender: TObject); |
|
var |
|
|
i: Integer; |
|
|
CoolSet: TCoolSet; |
|
| 1811 |
begin |
begin |
| 1812 |
ShowWindow(Application.Handle, SW_HIDE); |
ShowWindow(Application.Handle, SW_HIDE); |
| 1813 |
|
|
| 1851 |
BrowserTabFlatStyleActionExecute(nil); |
BrowserTabFlatStyleActionExecute(nil); |
| 1852 |
end; |
end; |
| 1853 |
|
|
| 1854 |
|
// CoolBar 復元 |
| 1855 |
|
LoadCoolBarSettings; |
| 1856 |
|
|
| 1857 |
//クールバー復元(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; |
|
| 1858 |
|
|
| 1859 |
//クールバー復元(Board) |
//TabAutoLoad |
| 1860 |
ListCoolBar.Bands.BeginUpdate; |
//FormCreteから移動。 |
| 1861 |
try |
if GikoSys.Setting.TabAutoLoadSave then begin |
| 1862 |
for i := 0 to ListCoolBar.Bands.Count - 1 do begin |
TabAutoLoadAction.Execute; |
|
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; |
|
| 1863 |
end; |
end; |
| 1864 |
|
|
| 1865 |
end; |
end; |
| 1866 |
{ |
|
| 1867 |
procedure TGikoForm.SetStdToolBar; |
procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
|
var |
|
|
i: Integer; |
|
|
FileName: string; |
|
|
ini: TMemIniFile; |
|
|
s: string; |
|
|
Action: TContainedAction; |
|
|
ToolButton: TToolButton; |
|
| 1868 |
begin |
begin |
| 1869 |
exit; |
// if GikoForm.WindowState <> wsMinimized then |
| 1870 |
for i := StdToolBar.ButtonCount - 1 downto 0 do begin |
// SaveCoolBarSettings; |
| 1871 |
StdToolBar.RemoveControl(StdToolBar.Buttons[i]); |
if ( GikoSys.Setting.ShowDialogForEnd ) and |
| 1872 |
//StdToolBar.Buttons[i].Free; |
(MessageDlg('ギコナビを終了してよろしいですか?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin |
| 1873 |
end; |
CanClose := false; |
| 1874 |
FileName := GikoSys.GetConfigDir + 'ToolBar.ini'; |
Exit; |
| 1875 |
ini := TMemIniFile.Create(FileName); |
end else begin |
| 1876 |
i := 0; |
CanClose := True; |
| 1877 |
while true do begin |
if GikoSys.Setting.TabAutoLoadSave then begin |
| 1878 |
s := ini.ReadString('StdToolBar', IntToStr(i), ''); |
TabAutoSaveAction.Execute; |
|
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; |
|
| 1879 |
end; |
end; |
|
Inc(i); |
|
| 1880 |
end; |
end; |
| 1881 |
|
//Application.HookMainWindow(Hook); |
| 1882 |
|
Application.UnhookMainWindow(Hook); |
| 1883 |
|
Application.Terminate; |
| 1884 |
end; |
end; |
| 1885 |
} |
|
| 1886 |
{function TGikoForm.GetAction(ActionName: string): TContainedAction; |
procedure TGikoForm.FormDestroy(Sender: TObject); |
| 1887 |
var |
var |
| 1888 |
i: Integer; |
i : Integer; |
| 1889 |
begin |
// CoolSet: TCoolSet; |
| 1890 |
for i := 0 to ActionList.ActionCount - 1 do begin |
wp : TWindowPlacement; |
| 1891 |
if ActionList.Actions[i].Name = ActionName then begin |
tmpBool : Boolean; |
| 1892 |
Result := ActionList.Actions[i]; |
begin |
| 1893 |
Exit; |
// Application.OnDeactivate := nil; |
| 1894 |
|
// Self.OnDeactivate := nil; |
| 1895 |
|
try |
| 1896 |
|
//column幅 |
| 1897 |
|
if GetActiveList is TBBS then begin |
| 1898 |
|
for i := 0 to ListView.Columns.Count - 1 do |
| 1899 |
|
GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width; |
| 1900 |
|
end else if GetActiveList is TCategory then begin |
| 1901 |
|
for i := 0 to ListView.Columns.Count - 1 do |
| 1902 |
|
GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width; |
| 1903 |
|
end else if GetActiveList is TBoard then begin |
| 1904 |
|
for i := 0 to ListView.Columns.Count - 1 do |
| 1905 |
|
GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width; |
| 1906 |
end; |
end; |
| 1907 |
|
except |
| 1908 |
end; |
end; |
| 1909 |
Result := nil; |
try |
| 1910 |
end;} |
//最大化・ウィンドウ位置保存 |
| 1911 |
|
wp.length := sizeof(wp); |
| 1912 |
procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
GetWindowPlacement(Handle, @wp); |
| 1913 |
var |
GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top; |
| 1914 |
i: Integer; |
GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left; |
| 1915 |
CoolSet: TCoolSet; |
GikoSys.Setting.WindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top; |
| 1916 |
wp: TWindowPlacement; |
GikoSys.Setting.WindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left; |
| 1917 |
begin |
GikoSys.Setting.WindowMax := WindowState = wsMaximized; |
| 1918 |
if ( GikoSys.Setting.ShowDialogForEnd ) and |
|
| 1919 |
(MessageDlg('ギコナビを終了してよろしいですか?', mtConfirmation,[mbOk, mbCancel], 0) = mrCancel ) then begin |
GikoSys.Setting.ListStyle := ListView.ViewStyle; |
| 1920 |
CanClose := false; |
GikoSys.Setting.CabinetVisible := CabinetVisibleAction.Checked; |
| 1921 |
Exit; |
GikoSys.Setting.CabinetWidth := CabinetPanel.Width; |
| 1922 |
end else begin |
GikoSys.Setting.ListHeight := FBrowserSizeHeight; |
| 1923 |
CanClose := True; |
GikoSys.Setting.ListWidth := FBrowserSizeWidth; |
| 1924 |
end; |
if ArrangeAction.Checked then |
| 1925 |
Application.OnDeactivate := nil; |
GikoSys.Setting.ListOrientation := gloVertical |
| 1926 |
Self.OnDeactivate := nil; |
else |
| 1927 |
|
GikoSys.Setting.ListOrientation := gloHorizontal; |
| 1928 |
//column幅 |
GikoSys.Setting.MessegeBarHeight := MessagePanel.Height; |
| 1929 |
if GetActiveList is TBBS2ch then begin |
except |
|
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; |
|
| 1930 |
end; |
end; |
| 1931 |
|
|
| 1932 |
//最大化・ウィンドウ位置保存 |
try |
| 1933 |
wp.length := sizeof(wp); |
// レス表示範囲 |
| 1934 |
GetWindowPlacement(Handle, @wp); |
if not GikoSys.Setting.ResRangeHold then |
| 1935 |
GikoSys.Setting.WindowTop := wp.rcNormalPosition.Top; |
GikoSys.Setting.ResRange := FResRangeMenuSelect; |
| 1936 |
GikoSys.Setting.WindowLeft := wp.rcNormalPosition.Left; |
except |
|
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; |
|
|
end; |
|
|
//クールバー保存(Browser) |
|
|
for i := 0 to BROWSER_COOLBAND_COUNT - 1 do begin |
|
|
CoolSet.FCoolID := BrowserCoolBar.Bands[i].ID; |
|
|
CoolSet.FCoolWidth := BrowserCoolBar.Bands[i].Width; |
|
|
CoolSet.FCoolBreak := BrowserCoolBar.Bands[i].Break; |
|
|
GikoSys.Setting.BrowserCoolSet[i] := CoolSet; |
|
| 1937 |
end; |
end; |
| 1938 |
|
|
| 1939 |
GikoSys.Setting.WriteWindowSettingFile; |
// リアルタイムに保存されるので、また、ウィンドウサイズが CoolBar より |
| 1940 |
GikoSys.Setting.WriteNameMailSettingFile; |
// 小さくなっているときに保存すると値が上書きされてしまうのでここでは保存しない |
| 1941 |
|
{ |
| 1942 |
//お気に入り保存 |
// ↑FormDestroy中に移動したので、ここで保存しないといけないと思う。(もじゅ 2004/04/09) |
| 1943 |
|
// CoolBar 保存 |
| 1944 |
|
if GikoForm.WindowState <> wsMinimized then |
| 1945 |
|
SaveCoolBarSettings; |
| 1946 |
|
} |
| 1947 |
try |
try |
| 1948 |
FavoriteDM.WriteFavorite; |
GikoSys.Setting.WriteWindowSettingFile; |
| 1949 |
|
GikoSys.Setting.WriteNameMailSettingFile; |
| 1950 |
except |
except |
| 1951 |
end; |
end; |
|
// Favorite.Free; |
|
| 1952 |
|
|
| 1953 |
|
//お気に入り保存 |
| 1954 |
try |
try |
| 1955 |
//タブクローズ |
//FavoriteDMは自動生成フォームなので、解放は自動的にされる |
| 1956 |
NotSelectTabCloseAction.Execute; |
FavoriteDM.WriteFavorite; |
| 1957 |
if BrowserTab.Tabs.Count >= 1 then begin |
FavoriteDM.Clear; |
|
DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0])); |
|
|
end; |
|
| 1958 |
except |
except |
| 1959 |
end; |
end; |
| 1960 |
|
|
|
//巡回リスト保存&破棄 |
|
| 1961 |
try |
try |
| 1962 |
RoundList.SaveRoundFile; |
//タブクローズ |
| 1963 |
|
tmpBool := GikoSys.Setting.ShowDialogForAllTabClose; |
| 1964 |
|
GikoSys.Setting.ShowDialogForAllTabClose := false; |
| 1965 |
|
AllTabCloseAction.Execute; |
| 1966 |
|
GikoSys.Setting.ShowDialogForAllTabClose := tmpBool; |
| 1967 |
except |
except |
| 1968 |
end; |
end; |
| 1969 |
try |
try |
| 1970 |
RoundList.Clear; |
LockWindowUpdate(Self.Handle); |
| 1971 |
except |
for i := FBrowsers.Count - 1 downto 0 do begin |
| 1972 |
|
TWebBrowser(FBrowsers[i]).Free; |
| 1973 |
|
end; |
| 1974 |
|
FBrowsers.Clear; |
| 1975 |
|
FBrowsers.Capacity := 0; |
| 1976 |
|
finally |
| 1977 |
|
FBrowsers.Free; |
| 1978 |
end; |
end; |
| 1979 |
try |
try |
| 1980 |
RoundList.Free; |
if BrowserNullTab <> nil then begin |
| 1981 |
|
BrowserNullTab.Browser := nil; {*BrowserNullTabのBrowserは設計時に貼り付けてる奴 |
| 1982 |
|
*なのでここでFreeされると困るのではずしてしまう。 |
| 1983 |
|
*} |
| 1984 |
|
BrowserNullTab.Free; |
| 1985 |
|
end; |
| 1986 |
except |
except |
| 1987 |
end; |
end; |
| 1988 |
|
LockWindowUpdate(0); |
|
//ヒストリリスト |
|
| 1989 |
try |
try |
| 1990 |
FHistoryList.Free; |
TreeView.Items.BeginUpdate; |
| 1991 |
|
TreeView.Items.GetFirstNode.Free; |
| 1992 |
|
TreeView.Items.Clear; |
| 1993 |
|
TreeView.Items.EndUpdate; |
| 1994 |
except |
except |
| 1995 |
end; |
end; |
| 1996 |
|
|
| 1997 |
//アドレス履歴保存 |
//アドレス履歴保存 |
| 1998 |
try |
try |
| 1999 |
|
//AddressHistoryDMは自動生成フォームなので、解放は自動的にされる。 |
| 2000 |
AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount); |
AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount); |
| 2001 |
except |
except |
| 2002 |
end; |
end; |
| 2003 |
|
|
| 2004 |
|
//ヒストリリスト保存 |
| 2005 |
try |
try |
| 2006 |
FControlThread.Terminate; |
SaveHistory; |
| 2007 |
except |
except |
| 2008 |
end; |
end; |
| 2009 |
|
try |
| 2010 |
|
try |
| 2011 |
|
ClearHistory; |
| 2012 |
|
except |
| 2013 |
|
end; |
| 2014 |
|
finally |
| 2015 |
|
FHistoryList.Free; |
| 2016 |
|
end; |
| 2017 |
|
|
| 2018 |
// FDownload.Free; |
//巡回リスト保存&破棄 |
| 2019 |
try |
try |
| 2020 |
SetActiveList(nil); |
RoundList.SaveRoundFile; |
| 2021 |
except |
except |
| 2022 |
end; |
end; |
|
//TreeViewクリア(BBS2ch.Freeの後にクリアするとXPスタイル時にエラー出る) |
|
|
Sleep(10); |
|
| 2023 |
try |
try |
| 2024 |
TreeView.Items.Clear; |
try |
| 2025 |
except |
RoundList.Clear; |
| 2026 |
|
except |
| 2027 |
|
end; |
| 2028 |
|
finally |
| 2029 |
|
RoundList.Free; |
| 2030 |
|
end; |
| 2031 |
|
|
| 2032 |
|
try |
| 2033 |
|
try |
| 2034 |
|
FControlThread.Terminate; |
| 2035 |
|
FControlThread.WaitFor; |
| 2036 |
|
except |
| 2037 |
|
end; |
| 2038 |
|
finally |
| 2039 |
|
FControlThread.Free; |
| 2040 |
end; |
end; |
| 2041 |
|
|
| 2042 |
|
// TBBS は保持している TCategory, TBoard, TThreadItem すべてを開放する |
| 2043 |
|
// TBoard, TThreadItem のデストラクタはプラグインに破棄を伝えるので |
| 2044 |
|
// BoardPluteIns の開放より先に行うこと |
| 2045 |
try |
try |
| 2046 |
if FavoriteDM <> nil then |
for i := Length( BBSs ) - 1 downto 0 do begin |
| 2047 |
FavoriteDM.Free; |
if BBSs[ i ] <> nil then |
| 2048 |
FavoriteDM := nil; |
BBSs[ i ].Free; |
| 2049 |
if AddressHistoryDM <> nil then |
BBSs[ i ] := nil; |
| 2050 |
AddressHistoryDM.Free; |
end; |
|
AddressHistoryDM := nil; |
|
| 2051 |
except |
except |
| 2052 |
end; |
end; |
| 2053 |
|
|
| 2054 |
try |
try |
| 2055 |
if BBS2ch <> nil then |
for i := Length( BoardPlugIns ) - 1 downto 0 do begin |
| 2056 |
BBS2ch.Free; |
if BoardPlugIns[ i ] <> nil then |
| 2057 |
BBS2ch := nil; |
BoardPlugIns[ i ].Free; |
| 2058 |
|
BoardPlugIns[ i ] := nil; |
| 2059 |
|
end; |
| 2060 |
except |
except |
| 2061 |
end; |
end; |
| 2062 |
|
|
| 2063 |
try |
try |
| 2064 |
|
if FEvent <> nil then |
| 2065 |
|
FEvent.Free; |
| 2066 |
|
|
| 2067 |
//Hint破棄 |
//Hint破棄 |
| 2068 |
if FHint <> nil then begin |
if FHint <> nil then begin |
| 2069 |
FHint.ReleaseHandle; |
FHint.ReleaseHandle; |
| 2077 |
end; |
end; |
| 2078 |
except |
except |
| 2079 |
end; |
end; |
|
end; |
|
|
|
|
|
procedure TGikoForm.FormDestroy(Sender: TObject); |
|
|
//var |
|
|
// wp: TWindowPlacement; |
|
|
begin |
|
|
{ //ヒストリリスト |
|
|
FHistoryList.Free; |
|
|
|
|
|
//最大化・ウィンドウ位置保存 |
|
|
wp.length := sizeof(wp); |
|
|
GetWindowPlacement(Handle, @wp); |
|
| 2080 |
|
|
|
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;} |
|
| 2081 |
end; |
end; |
| 2082 |
|
|
| 2083 |
//フォームクローズ |
//フォームクローズ |
| 2084 |
procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction); |
procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction); |
| 2085 |
begin |
begin |
|
Application.Terminate; |
|
|
Action := caFree; |
|
| 2086 |
end; |
end; |
|
|
|
| 2087 |
//キャビネット×ボタンクリック |
//キャビネット×ボタンクリック |
| 2088 |
procedure TGikoForm.CabinetPanelHide(Sender: TObject); |
procedure TGikoForm.CabinetPanelHide(Sender: TObject); |
| 2089 |
begin |
begin |
| 2091 |
// CabinetPanelVisible(false); |
// CabinetPanelVisible(false); |
| 2092 |
end; |
end; |
| 2093 |
|
|
| 2094 |
|
// 各所にあるキャビネット・ BBS メニューをセット/更新 |
| 2095 |
|
procedure TGikoForm.SetBBSMenu; |
| 2096 |
|
var |
| 2097 |
|
i : Integer; |
| 2098 |
|
item : TBBSMenuItem; |
| 2099 |
|
begin |
| 2100 |
|
|
| 2101 |
|
// メニューを削除 |
| 2102 |
|
for i := CabinetSelectPopupMenu.Items.Count - 1 downto 0 do begin |
| 2103 |
|
try |
| 2104 |
|
if CabinetSelectPopupMenu.Items[ i ] is TBBSMenuItem then begin |
| 2105 |
|
CabinetSelectPopupMenu.Items[ i ].Free; |
| 2106 |
|
CabinetMenu.Items[ i ].Free; |
| 2107 |
|
BBSSelectPopupMenu.Items[ i ].Free; |
| 2108 |
|
end; |
| 2109 |
|
except |
| 2110 |
|
end; |
| 2111 |
|
end; |
| 2112 |
|
|
| 2113 |
|
// メニューを設定 |
| 2114 |
|
for i := Length( BBSs ) - 1 downto 0 do begin |
| 2115 |
|
try |
| 2116 |
|
item := TBBSMenuItem.Create( PopupMenu ); |
| 2117 |
|
item.Caption := BBSs[ i ].Title; |
| 2118 |
|
item.Data := BBSs[ i ]; |
| 2119 |
|
item.OnClick := BBSMenuItemOnClick; |
| 2120 |
|
CabinetSelectPopupMenu.Items.Insert( 0, item ); |
| 2121 |
|
item := TBBSMenuItem.Create( PopupMenu ); |
| 2122 |
|
item.Caption := BBSs[ i ].Title; |
| 2123 |
|
item.Data := BBSs[ i ]; |
| 2124 |
|
item.OnClick := BBSMenuItemOnClick; |
| 2125 |
|
CabinetMenu.Insert( 0, item ); |
| 2126 |
|
item := TBBSMenuItem.Create( PopupMenu ); |
| 2127 |
|
item.Caption := BBSs[ i ].Title; |
| 2128 |
|
item.Data := BBSs[ i ]; |
| 2129 |
|
item.OnClick := BBSMenuItemOnClick; |
| 2130 |
|
BBSSelectPopupMenu.Items.Insert( 0, Item ); |
| 2131 |
|
except |
| 2132 |
|
end; |
| 2133 |
|
end; |
| 2134 |
|
|
| 2135 |
|
end; |
| 2136 |
|
|
| 2137 |
procedure TGikoForm.ReloadBBS; |
procedure TGikoForm.ReloadBBS; |
| 2138 |
|
var |
| 2139 |
|
i : Integer; |
| 2140 |
|
tmpBool: Boolean; |
| 2141 |
begin |
begin |
| 2142 |
//タブクローズ |
//タブクローズ |
| 2143 |
NotSelectTabCloseAction.Execute; |
tmpBool := GikoSys.Setting.ShowDialogForAllTabClose; |
| 2144 |
if BrowserTab.Tabs.Count >= 1 then |
GikoSys.Setting.ShowDialogForAllTabClose := false; |
| 2145 |
DeleteTab(TThreadItem(BrowserTab.Tabs.Objects[0])); |
AllTabCloseAction.Execute; |
| 2146 |
//ヒストリリスト |
GikoSys.Setting.ShowDialogForAllTabClose := tmpBool; |
| 2147 |
FHistoryList.Clear; |
|
| 2148 |
|
SetContent(BrowserNullTab); |
| 2149 |
//TreeViewクリア(BBS2ch.Freeの後にクリアするとXPスタイル時にエラー出る) |
//TreeViewクリア(BBS2ch.Freeの後にクリアするとXPスタイル時にエラー出る) |
| 2150 |
TreeView.Items.Clear; |
TreeView.Items.Clear; |
| 2151 |
|
|
| 2152 |
//BBS破棄 |
//BBS破棄 |
| 2153 |
BBS2ch.Free; |
try |
| 2154 |
|
for i := Length( BBSs ) - 1 downto 0 do begin |
| 2155 |
|
if BBSs[ i ] <> nil then |
| 2156 |
|
BBSs[ i ].Free; |
| 2157 |
|
BBSs[ i ] := nil; |
| 2158 |
|
end; |
| 2159 |
|
except |
| 2160 |
|
end; |
| 2161 |
|
|
| 2162 |
SetActiveList(nil); |
ActiveList := nil; |
| 2163 |
|
|
| 2164 |
FTreeType := gttNone; |
FTreeType := gttNone; |
| 2165 |
|
|
| 2166 |
//BBS作成 |
GikoSys.ListBoardFile; //ボードファイル読込 |
| 2167 |
BBS2ch := TBBS2ch.Create(GikoSys.Setting.LogFolder); |
|
| 2168 |
|
// BBS メニューの更新 |
| 2169 |
|
SetBBSMenu; |
| 2170 |
|
|
| 2171 |
|
ShowBBSTree( BBSs[ 0 ] ); |
| 2172 |
|
|
| 2173 |
|
// 履歴読み込み |
| 2174 |
|
SaveHistory; |
| 2175 |
|
ClearHistory; |
| 2176 |
|
LoadHistory; |
| 2177 |
|
|
| 2178 |
|
//お気に入り読み込み |
| 2179 |
|
FavoriteDM.WriteFavorite; |
| 2180 |
|
FavoriteDM.Clear; |
| 2181 |
|
FavoriteDM.ReadFavorite; |
| 2182 |
|
|
| 2183 |
|
SetLinkBar; |
| 2184 |
|
|
|
BBS2ch.ReadBoardFile; //ボードファイル読込 |
|
|
Show2chTree; |
|
| 2185 |
end; |
end; |
| 2186 |
|
|
| 2187 |
//ボードツリー設定 |
//ボードツリー設定 |
| 2188 |
procedure TGikoForm.SetBoardTreeNode; |
procedure TGikoForm.SetBoardTreeNode( |
| 2189 |
|
inBBS : TBBS |
| 2190 |
|
); |
| 2191 |
var |
var |
| 2192 |
i, j: integer; |
i, j, k: integer; |
| 2193 |
Root: TTreeNode; |
Root: TTreeNode; |
| 2194 |
CategoryNode: TTreeNode; |
CategoryNode: TTreeNode; |
| 2195 |
BoardNode: TTreeNode; |
BoardNode: TTreeNode; |
| 2196 |
Category: TCategory; |
Category: TCategory; |
| 2197 |
Board: TBoard; |
Board: TBoard; |
| 2198 |
begin |
begin |
| 2199 |
|
// 板リストの設定 |
| 2200 |
|
FActiveBBS := inBBS; |
| 2201 |
TreeView.Items.BeginUpdate; |
TreeView.Items.BeginUpdate; |
| 2202 |
TreeView.Items.Clear; |
TreeView.Items.Clear; |
| 2203 |
try |
try |
| 2204 |
Root := TreeView.Items.Add(nil, BBS2ch.Title); |
if not inBBS.IsBoardFileRead then |
| 2205 |
Root.ImageIndex := ITEM_ICON_2CH1; |
GikoSys.ReadBoardFile( inBBS ); |
| 2206 |
Root.SelectedIndex := ITEM_ICON_2CH2; |
try |
| 2207 |
Root.Data := BBS2ch; |
if SplashWindow <> nil then |
| 2208 |
if SplashWindow <> nil then |
SplashWindow.ProgressBar.Max := inBBS.Count; |
| 2209 |
SplashWindow.ProgressBar.Max := BoardGroup.BBS2ch.Count; |
except |
| 2210 |
|
end; |
| 2211 |
|
|
| 2212 |
|
// キャビネット表示前に再ソート |
| 2213 |
|
if ( GikoSys.Setting.BBSSortIndex <> 0 ) or ( GikoSys.Setting.BBSSortOrder <> true ) then begin |
| 2214 |
|
Sort.SortOrder := true; |
| 2215 |
|
Sort.SortIndex := 0; |
| 2216 |
|
Sort.SortNoFlag := true; |
| 2217 |
|
inBBS.Sort(CategorySortProc); |
| 2218 |
|
end; |
| 2219 |
|
|
| 2220 |
for i := 0 to BoardGroup.BBS2ch.Count - 1 do begin |
Root := TreeView.Items.Add( nil, inBBS.Title ); |
| 2221 |
Category := TCategory(BoardGroup.BBS2ch.Items[i]); |
Root.ImageIndex := ITEM_ICON_2CH1; |
| 2222 |
|
Root.SelectedIndex := ITEM_ICON_2CH2; |
| 2223 |
|
Root.Data := inBBS; |
| 2224 |
|
for i := 0 to inBBS.Count - 1 do begin |
| 2225 |
|
Category := TCategory(inBBS.Items[i]); |
| 2226 |
CategoryNode := TreeView.Items.AddChild(Root, Category.Title); |
CategoryNode := TreeView.Items.AddChild(Root, Category.Title); |
| 2227 |
CategoryNode.Data := Category; |
CategoryNode.Data := Category; |
| 2228 |
CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1; |
CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1; |
| 2229 |
CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2; |
CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2; |
| 2230 |
|
|
| 2231 |
|
// キャビネット表示前に再ソート |
| 2232 |
|
if ( GikoSys.Setting.CategorySortIndex <> 0 ) or ( GikoSys.Setting.CategorySortOrder <> true ) then begin |
| 2233 |
|
Sort.SortOrder := true; |
| 2234 |
|
Sort.SortIndex := 0; |
| 2235 |
|
Sort.SortNoFlag := true; |
| 2236 |
|
Category.CustomSort(BoardSortProc); |
| 2237 |
|
end; |
| 2238 |
|
|
| 2239 |
for j := 0 to Category.Count - 1 do begin |
for j := 0 to Category.Count - 1 do begin |
| 2240 |
Board := TBoard(Category.Items[j]); |
Board := TBoard(Category.Items[j]); |
| 2241 |
Board.BeginUpdate; |
Board.BeginUpdate; |
| 2242 |
BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title); |
BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title); |
| 2243 |
BoardNode.Data := Board; |
BoardNode.Data := Board; |
| 2244 |
BoardNode.ImageIndex := ITEM_ICON_BOARD1; |
//if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin |
| 2245 |
BoardNode.SelectedIndex := ITEM_ICON_BOARD2; |
if not Board.IsLogFile then begin |
| 2246 |
Board.LoadSettings; |
BoardNode.ImageIndex := ITEM_ICON_BOARD_NOSUBJECT; |
| 2247 |
|
BoardNode.SelectedIndex := ITEM_ICON_BOARD_NOSUBJECT; |
| 2248 |
|
end else begin |
| 2249 |
|
BoardNode.ImageIndex := ITEM_ICON_BOARD1; |
| 2250 |
|
BoardNode.SelectedIndex := ITEM_ICON_BOARD2; |
| 2251 |
|
for k := 0 to Board.Count - 1 do begin |
| 2252 |
|
if Board.Items[ k ].IsLogFile then begin |
| 2253 |
|
BoardNode.ImageIndex := ITEM_ICON_BOARD_LOG; |
| 2254 |
|
BoardNode.SelectedIndex := ITEM_ICON_BOARD_LOG; |
| 2255 |
|
|
| 2256 |
|
Break; |
| 2257 |
|
end; |
| 2258 |
|
end; |
| 2259 |
|
end; |
| 2260 |
Board.EndUpdate; |
Board.EndUpdate; |
| 2261 |
end; |
end; |
| 2262 |
|
|
| 2266 |
SplashWindow.ProgressBar.StepIt; |
SplashWindow.ProgressBar.StepIt; |
| 2267 |
Application.ProcessMessages; |
Application.ProcessMessages; |
| 2268 |
end; |
end; |
|
|
|
| 2269 |
end; |
end; |
| 2270 |
finally |
finally |
| 2271 |
TreeView.Items.EndUpdate; |
TreeView.Items.EndUpdate; |
| 2272 |
end; |
end; |
| 2273 |
end; |
end; |
| 2274 |
|
|
| 2275 |
function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS2ch): Integer; |
function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer; |
| 2276 |
const |
const |
| 2277 |
COLUMN: array[0..0] of string = ('カテゴリ名'); |
COLUMN: array[0..0] of string = ('カテゴリ名'); |
| 2278 |
var |
var |
| 2307 |
FolderImage.Picture := nil; |
FolderImage.Picture := nil; |
| 2308 |
ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap); |
ItemIcon16.GetBitmap(1, FolderImage.Picture.Bitmap); |
| 2309 |
|
|
| 2310 |
FSortIndex := 0; |
FSortIndex := GikoSys.Setting.BBSSortIndex; |
| 2311 |
FSortOrder := False; |
FSortOrder := GikoSys.Setting.BBSSortOrder; |
| 2312 |
ListViewColumnClick(nil, ListView.Column[0]); |
if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then |
| 2313 |
|
ListViewSort(nil, ListView.Column[FSortIndex]); |
| 2314 |
|
|
| 2315 |
Result := ABBS2ch.Count; |
Result := ABBS2ch.Count; |
| 2316 |
finally |
finally |
| 2354 |
FolderImage.Picture := nil; |
FolderImage.Picture := nil; |
| 2355 |
ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap); |
ItemIcon16.GetBitmap(3, FolderImage.Picture.Bitmap); |
| 2356 |
|
|
| 2357 |
FSortIndex := 0; |
FSortIndex := GikoSys.Setting.CategorySortIndex; |
| 2358 |
FSortOrder := False; |
FSortOrder := GikoSys.Setting.CategorySortOrder; |
| 2359 |
ListViewColumnClick(nil, ListView.Column[0]); |
if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then |
| 2360 |
|
ListViewSort(nil, ListView.Column[FSortIndex]); |
| 2361 |
|
|
| 2362 |
Result := Category.Count; |
Result := Category.Count; |
| 2363 |
finally |
finally |
| 2368 |
|
|
| 2369 |
function TGikoForm.SetThreadListItem(Board: TBoard): Integer; |
function TGikoForm.SetThreadListItem(Board: TBoard): Integer; |
| 2370 |
const |
const |
| 2371 |
COLUMN: array[0..6] of string = ('スレッド名', 'カウント', '取得', '新着', |
COLUMN: array[0..7] of string = ('スレッド名', 'カウント', '取得', '新着', |
| 2372 |
'未読', '巡回予約', '取得日時'); |
'未読', '巡回予約', '取得日時', 'スレ作成日時'); |
| 2373 |
COLUMN_ALIGNMENT: array[0..6] of TAlignment = (taLeftJustify, taRightJustify, |
COLUMN_NONACQUIREDCOUNT: string = '未取得'; |
| 2374 |
|
COLUMN_ALIGNMENT: array[0..7] of TAlignment = (taLeftJustify, taRightJustify, |
| 2375 |
taRightJustify, taRightJustify, |
taRightJustify, taRightJustify, |
| 2376 |
taRightJustify, taLeftJustify, |
taRightJustify, taLeftJustify, |
| 2377 |
taLeftJustify); |
taLeftJustify, taLeftJustify); |
| 2378 |
//No, スレッド名, カウント, 巡回予約, 取得日時 |
//No, スレッド名, カウント, 巡回予約, 取得日時 |
| 2379 |
var |
var |
| 2380 |
ListColumn: TListColumn; |
ListColumn: TListColumn; |
| 2396 |
ListColumn.Alignment := COLUMN_ALIGNMENT[i]; |
ListColumn.Alignment := COLUMN_ALIGNMENT[i]; |
| 2397 |
end; |
end; |
| 2398 |
end; |
end; |
| 2399 |
|
if GikoSys.Setting.NonAcquiredCount then |
| 2400 |
|
ListView.Columns[2].Caption := COLUMN_NONACQUIREDCOUNT |
| 2401 |
|
else |
| 2402 |
|
ListView.Columns[2].Caption := COLUMN[2]; |
| 2403 |
|
|
| 2404 |
ListView.Items.Count := 0; |
ListView.Items.Count := 0; |
| 2405 |
ListView.Items.Clear; |
ListView.Items.Clear; |
| 2415 |
FolderImage.Picture := nil; |
FolderImage.Picture := nil; |
| 2416 |
ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap); |
ItemIcon16.GetBitmap(5, FolderImage.Picture.Bitmap); |
| 2417 |
|
|
| 2418 |
FSortIndex := 0; |
FSortIndex := GikoSys.Setting.BoardSortIndex; |
| 2419 |
FSortOrder := False; |
FSortOrder := GikoSys.Setting.BoardSortOrder; |
| 2420 |
ListViewColumnClick(nil, ListView.Column[0]); |
if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then |
| 2421 |
|
ListViewSort(nil, ListView.Column[FSortIndex]); |
| 2422 |
|
|
| 2423 |
Result := Board.Count; |
Result := Board.Count; |
| 2424 |
finally |
finally |
| 2427 |
end; |
end; |
| 2428 |
end; |
end; |
| 2429 |
|
|
|
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; |
|
|
|
|
| 2430 |
procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem); |
procedure TGikoForm.ListViewData(Sender: TObject; Item: TListItem); |
| 2431 |
var |
var |
| 2432 |
// FileName: string; |
// FileName: string; |
| 2433 |
// DateTime: TDateTime; |
// DateTime: TDateTime; |
| 2434 |
BoardCnt: Integer; |
BoardCnt: Integer; |
| 2435 |
BBS: TBBS2ch; |
BBS: TBBS; |
| 2436 |
Category: TCategory; |
Category: TCategory; |
| 2437 |
Board: TBoard; |
Board: TBoard; |
| 2438 |
ThreadItem: TThreadItem; |
ThreadItem: TThreadItem; |
| 2439 |
RepStr: string; |
RepStr: string; |
| 2440 |
|
ActivListObj : TObject; |
| 2441 |
begin |
begin |
| 2442 |
if ActiveList is TBBS2ch then begin |
ActivListObj := ActiveList; |
| 2443 |
BBS := TBBS2ch(ActiveList); |
if ActivListObj is TBBS then begin |
| 2444 |
|
BBS := TBBS(ActivListObj); |
| 2445 |
|
|
| 2446 |
ListView.StateImages := nil; |
ListView.StateImages := nil; |
| 2447 |
|
|
| 2448 |
if BBS = nil then Exit; |
if BBS = nil then Exit; |
| 2449 |
if BBS.Count <= 0 then Exit; |
if BBS.Count <= 0 then Exit; |
| 2450 |
if Item = nil then Exit; |
if Item = nil then Exit; |
| 2451 |
if Item.Index > BBS.Count then Exit; |
if Item.Index >= BBS.Count then Exit; |
| 2452 |
if ListView.Items.Count = 0 then Exit; |
if ListView.Items.Count = 0 then Exit; |
| 2453 |
|
|
| 2454 |
if not (BBS.Items[Item.Index] is TCategory) then Exit; |
if not (BBS.Items[Item.index] is TCategory) then Exit; |
| 2455 |
Category := TCategory(BBS.Items[Item.Index]); |
Category := TCategory(BBS.Items[Item.index]); |
| 2456 |
|
|
| 2457 |
if Category = nil then Exit; |
if Category = nil then Exit; |
| 2458 |
|
|
| 2463 |
|
|
| 2464 |
Item.ImageIndex := ITEM_ICON_CATEGORY1; |
Item.ImageIndex := ITEM_ICON_CATEGORY1; |
| 2465 |
Item.Data := Category; |
Item.Data := Category; |
| 2466 |
end else if ActiveList is TCategory then begin |
end else if ActivListObj is TCategory then begin |
| 2467 |
Category := TCategory(ActiveList); |
Category := TCategory(ActivListObj); |
| 2468 |
|
|
| 2469 |
ListView.StateImages := nil; |
ListView.StateImages := nil; |
| 2470 |
|
|
| 2502 |
end else |
end else |
| 2503 |
Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate); |
Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate); |
| 2504 |
Item.Data := Board; |
Item.Data := Board; |
| 2505 |
end else if ActiveList is TBoard then begin |
end else if ActivListObj is TBoard then begin |
| 2506 |
Board := TBoard(ActiveList); |
Board := TBoard(ActivListObj); |
| 2507 |
|
|
| 2508 |
if GikoSys.Setting.ListIconVisible then |
if GikoSys.Setting.ListIconVisible then |
| 2509 |
ListView.StateImages := StateIconImageList |
ListView.StateImages := StateIconImageList |
| 2529 |
|
|
| 2530 |
ThreadItem := nil; |
ThreadItem := nil; |
| 2531 |
case GikoForm.ViewType of |
case GikoForm.ViewType of |
| 2532 |
gvtAll: ThreadItem := TThreadItem(Board.Items[Item.Index]); |
gvtAll: if Item.Index >= Board.Count then Exit else |
| 2533 |
gvtLog: ThreadItem := Board.GetLogThread(Item.Index); |
ThreadItem := TThreadItem(Board.Items[Item.Index]); |
| 2534 |
gvtNew: ThreadItem := Board.GetNewThread(Item.Index); |
gvtLog: ThreadItem := Board.GetLogThread(Item.Index); |
| 2535 |
gvtUser: ThreadItem := Board.GetUserThread(Item.Index); |
gvtNew: ThreadItem := Board.GetNewThread(Item.Index); |
| 2536 |
|
gvtUser: ThreadItem := Board.GetUserThread(Item.Index); |
| 2537 |
end; |
end; |
| 2538 |
|
|
| 2539 |
if ThreadItem = nil then Exit; |
if ThreadItem = nil then Exit; |
| 2542 |
// RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title |
// RepStr := IntToStr(ThreadItem.No) + ': ' + ThreadItem.Title |
| 2543 |
// else |
// else |
| 2544 |
RepStr := ThreadItem.Title; |
RepStr := ThreadItem.Title; |
| 2545 |
//RepStr := StringReplace(RepStr, '&', '&', [rfReplaceAll]); |
RepStr := CustomStringReplace(RepStr, '<', '<' ); |
| 2546 |
RepStr := StringReplace(RepStr, '<', '<', [rfReplaceAll]); |
RepStr := CustomStringReplace(RepStr, '>', '>' ); |
| 2547 |
RepStr := StringReplace(RepStr, '>', '>', [rfReplaceAll]); |
RepStr := CustomStringReplace(RepStr, '"', '"' ); |
| 2548 |
RepStr := StringReplace(RepStr, '"', '"', [rfReplaceAll]); |
RepStr := CustomStringReplace(RepStr, '&', '&' ); |
|
RepStr := StringReplace(RepStr, '&', '&', [rfReplaceAll]); |
|
| 2549 |
//RepStr := StringReplace(RepStr, '@`', ',', [rfReplaceAll]); |
//RepStr := StringReplace(RepStr, '@`', ',', [rfReplaceAll]); |
| 2550 |
|
|
| 2551 |
if Item.SubItems.Count <> 6 then begin |
if Item.SubItems.Count <> 7 then begin |
| 2552 |
Item.SubItems.Clear; |
Item.SubItems.Clear; |
| 2553 |
Item.SubItems.Add(''); |
Item.SubItems.Add(''); |
| 2554 |
Item.SubItems.Add(''); |
Item.SubItems.Add(''); |
| 2556 |
Item.SubItems.Add(''); |
Item.SubItems.Add(''); |
| 2557 |
Item.SubItems.Add(''); |
Item.SubItems.Add(''); |
| 2558 |
Item.SubItems.Add(''); |
Item.SubItems.Add(''); |
| 2559 |
|
Item.SubItems.Add(''); |
| 2560 |
end; |
end; |
| 2561 |
|
|
| 2562 |
if ListNumberVisibleAction.Checked then |
if ListNumberVisibleAction.Checked then |
| 2574 |
if ThreadItem.IsLogFile then begin |
if ThreadItem.IsLogFile then begin |
| 2575 |
Item.ImageIndex := ITEM_ICON_THREADLOG1; |
Item.ImageIndex := ITEM_ICON_THREADLOG1; |
| 2576 |
Item.SubItems[0] := IntToStr(ThreadItem.AllResCount); |
Item.SubItems[0] := IntToStr(ThreadItem.AllResCount); |
| 2577 |
Item.SubItems[1] := IntToStr(ThreadItem.Count); |
if GikoSys.Setting.NonAcquiredCount then |
| 2578 |
|
Item.SubItems[1] := IntToStr(ThreadItem.AllResCount - ThreadItem.Count) |
| 2579 |
|
else |
| 2580 |
|
Item.SubItems[1] := IntToStr(ThreadItem.Count); |
| 2581 |
if ThreadItem.NewResCount = 0 then |
if ThreadItem.NewResCount = 0 then |
| 2582 |
Item.SubItems[2] := '' |
Item.SubItems[2] := '' |
| 2583 |
else |
else |
| 2593 |
Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate); |
Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate); |
| 2594 |
if ThreadItem.NewArrival then |
if ThreadItem.NewArrival then |
| 2595 |
Item.ImageIndex := ITEM_ICON_THREADNEW1; |
Item.ImageIndex := ITEM_ICON_THREADNEW1; |
| 2596 |
|
if ThreadItem.CreateDate = ZERO_DATE then begin |
| 2597 |
|
Item.SubItems[6] := ''; |
| 2598 |
|
end else |
| 2599 |
|
Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate); |
| 2600 |
|
|
| 2601 |
end else begin |
end else begin |
| 2602 |
Item.ImageIndex := ITEM_ICON_THREAD1; |
Item.ImageIndex := ITEM_ICON_THREAD1; |
| 2603 |
Item.SubItems[0] := IntToStr(ThreadItem.AllResCount); |
Item.SubItems[0] := IntToStr(ThreadItem.AllResCount); |
| 2606 |
Item.SubItems[3] := ''; |
Item.SubItems[3] := ''; |
| 2607 |
Item.SubItems[4] := ''; |
Item.SubItems[4] := ''; |
| 2608 |
Item.SubItems[5] := ''; |
Item.SubItems[5] := ''; |
| 2609 |
|
if not GikoSys.Setting.CreationTimeLogs then |
| 2610 |
|
if ThreadItem.CreateDate = ZERO_DATE then |
| 2611 |
|
Item.SubItems[6] := '' |
| 2612 |
|
else |
| 2613 |
|
Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate); |
| 2614 |
|
|
| 2615 |
end; |
end; |
| 2616 |
|
|
| 2617 |
Item.Data := ThreadItem; |
Item.Data := ThreadItem; |
| 2618 |
end; |
end; |
| 2619 |
end; |
end; |
| 2623 |
StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean; |
StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean; |
| 2624 |
var Index: Integer); |
var Index: Integer); |
| 2625 |
begin |
begin |
| 2626 |
|
|
| 2627 |
// |
// |
| 2628 |
end; |
end; |
| 2629 |
|
|
| 2647 |
URL: string; |
URL: string; |
| 2648 |
ATitle: Boolean; |
ATitle: Boolean; |
| 2649 |
|
|
| 2650 |
wkBBS: string; |
threadItem : TThreadItem; |
| 2651 |
wkKey: string; |
board : TBoard; |
| 2652 |
|
Protocol, Host, Path, Document, Port, Bookmark: string; |
| 2653 |
|
|
| 2654 |
//wkInt: Integer; |
wkInt: Integer; |
| 2655 |
wkIntSt: Integer; |
wkIntSt: Integer; |
| 2656 |
wkIntTo: Integer; |
wkIntTo: Integer; |
|
|
|
| 2657 |
ActiveFileName: string; |
ActiveFileName: string; |
| 2658 |
e: IHTMLElement; |
e: IHTMLElement; |
| 2659 |
Ext: string; |
Ext: string; |
| 2660 |
|
buf: string; |
| 2661 |
PathRec: TPathRec; |
PathRec: TPathRec; |
| 2662 |
begin |
begin |
| 2663 |
|
if not( TObject(Sender) is TWebBrowser )then |
| 2664 |
|
Exit; |
| 2665 |
try |
try |
| 2666 |
try |
try |
| 2667 |
if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin |
if (TWebBrowser(Sender) <> nil) and (not TWebBrowser(Sender).Busy) and (Assigned(TWebBrowser(Sender).Document)) then begin |
| 2668 |
if LowerCase(OleVariant(IHTMLDocument2(Browser.Document)).charset) <> 'shift_jis' then |
if LowerCase(OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset) <> 'shift_jis' then begin |
| 2669 |
OleVariant(IHTMLDocument2(Browser.Document)).charset := 'shift_jis'; |
OleVariant(IHTMLDocument2(TWebBrowser(Sender).Document)).charset := 'shift_jis'; |
| 2670 |
|
end; |
| 2671 |
end; |
end; |
| 2672 |
except |
except |
| 2673 |
end; |
end; |
| 2676 |
if PreviewTimer.Enabled then |
if PreviewTimer.Enabled then |
| 2677 |
PreviewTimer.Enabled := False; |
PreviewTimer.Enabled := False; |
| 2678 |
Application.CancelHint; |
Application.CancelHint; |
| 2679 |
if GetActiveContent <> nil then |
try |
| 2680 |
ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '') |
if GetActiveContent <> nil then |
| 2681 |
else |
ActiveFileName := ChangeFileExt(ExtractFileName(GetActiveContent.FileName), '') |
| 2682 |
ActiveFileName := ''; |
else |
| 2683 |
|
ActiveFileName := ''; |
| 2684 |
|
except |
| 2685 |
|
FActiveContent := nil; |
| 2686 |
|
Exit; |
| 2687 |
|
end; |
| 2688 |
|
|
| 2689 |
StatusBar.Panels[1].Text := Text; |
StatusBar.Panels[1].Text := Text; |
| 2690 |
|
|
| 2711 |
ShowWindow(FPreviewBrowser.Handle, SW_HIDE); |
ShowWindow(FPreviewBrowser.Handle, SW_HIDE); |
| 2712 |
TOleControl(FPreviewBrowser).Parent := nil; |
TOleControl(FPreviewBrowser).Parent := nil; |
| 2713 |
end; |
end; |
| 2714 |
FPreviewBrowser.Navigate('about:blank');//前回のプレビュー画像消去用 |
FPreviewBrowser.Navigate(BLANK_HTML);//前回のプレビュー画像消去用 |
| 2715 |
FPreviewURL := Text; |
FPreviewURL := Text; |
| 2716 |
PreviewTimer.Interval := GikoSys.Setting.PreviewWait; |
PreviewTimer.Interval := GikoSys.Setting.PreviewWait; |
| 2717 |
PreviewTimer.Enabled := True; |
PreviewTimer.Enabled := True; |
| 2724 |
p.y := p.y - TWebBrowser(Sender).ClientOrigin.y; |
p.y := p.y - TWebBrowser(Sender).ClientOrigin.y; |
| 2725 |
e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y); |
e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y); |
| 2726 |
if (Assigned(e)) then begin |
if (Assigned(e)) then begin |
| 2727 |
tmp2 := GikoSys.ZenToHan(e.Get_outerText); |
tmp2 := ZenToHan(e.Get_outerText); |
| 2728 |
if (GikoSys.IsNumeric(tmp2)) then begin |
if (GikoSys.IsNumeric(tmp2)) then begin |
| 2729 |
//sはレス番号っぽいっす。 |
//sはレス番号っぽいっす。 |
|
wkBBS := GetActiveContent.ParentBoard.BBSID; |
|
|
wkKey := ChangeFileExt(GetActiveContent.FileName, ''); |
|
| 2730 |
wkIntSt := StrToInt(tmp2); |
wkIntSt := StrToInt(tmp2); |
| 2731 |
wkIntTo := StrToInt(tmp2); |
wkIntTo := StrToInt(tmp2); |
| 2732 |
//s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False); |
//s := GetThreadText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False); |
| 2733 |
FHint.PopupType := gptThread; |
FHint.PopupType := gptThread; |
| 2734 |
SetResPopupText(wkBBS, wkKey, wkIntSt, wkIntTo, False, False); |
SetResPopupText(GetActiveContent, wkIntSt, wkIntTo, False, False); |
| 2735 |
end else begin |
end else begin |
| 2736 |
FHint.PopupType := gptRaw; |
FHint.PopupType := gptRaw; |
| 2737 |
FHint.Caption := s; |
FHint.Caption := s; |
| 2738 |
end; |
end; |
| 2739 |
end; |
end; |
| 2740 |
end else begin |
end else begin |
| 2741 |
URL := Text; |
threadItem := GetActiveContent; |
| 2742 |
|
if Pos('about:blank..', Text) = 1 then begin |
| 2743 |
if Pos('about:blank..', URL) = 1 then |
if (AnsiPos('http://jbbs.livedoor.com/', threadItem.URL) <> 0) then begin |
| 2744 |
URL := StringReplace(URL, 'about:blank..', 'http://www.2ch.net', []); |
URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL)); |
| 2745 |
|
Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo); |
| 2746 |
|
if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then |
| 2747 |
|
buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo) |
| 2748 |
|
else if( PathRec.FSt <> 0 ) then |
| 2749 |
|
buf := IntToStr(PathRec.FSt); |
| 2750 |
|
end else if AnsiPos('machi.to/bbs/', threadItem.URL) <> 0 then begin |
| 2751 |
|
URL := threaditem.URL; |
| 2752 |
|
buf := Copy(Text,AnsiPos('&st=',Text),Length(Text)-AnsiPos('&st=',Text) + 1); |
| 2753 |
|
end else begin |
| 2754 |
|
URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL)); |
| 2755 |
|
buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text)); |
| 2756 |
|
end; |
| 2757 |
|
URL := URL + buf; |
| 2758 |
|
end else begin |
| 2759 |
|
URL := Text; |
| 2760 |
|
end; |
| 2761 |
PathRec := Gikosys.Parse2chURL2(URL); |
PathRec := Gikosys.Parse2chURL2(URL); |
| 2762 |
|
if (PathRec.FNoParam) then begin |
| 2763 |
|
PathRec.FSt := 1; |
| 2764 |
|
PathRec.FTo := 1; |
| 2765 |
|
end else |
| 2766 |
|
Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo); |
| 2767 |
|
GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark ); |
| 2768 |
|
|
| 2769 |
if PathRec.FDone then begin |
if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin |
| 2770 |
|
|
| 2771 |
|
URL := GikoSys.GetBrowsableThreadURL( URL ); |
| 2772 |
wkIntSt := PathRec.FSt; |
wkIntSt := PathRec.FSt; |
| 2773 |
wkIntTo := PathRec.FTo; |
wkIntTo := PathRec.FTo; |
| 2774 |
|
|
| 2780 |
end else if (wkIntSt > 0) and (wkIntTo = 0) then begin |
end else if (wkIntSt > 0) and (wkIntTo = 0) then begin |
| 2781 |
wkIntTo := wkIntSt; |
wkIntTo := wkIntSt; |
| 2782 |
end else if wkIntSt > wkIntTo then begin |
end else if wkIntSt > wkIntTo then begin |
| 2783 |
//wkInt := wkIntTo; |
wkInt := wkIntTo; |
| 2784 |
wkIntTo := wkIntSt; |
wkIntTo := wkIntSt; |
| 2785 |
wkIntSt := wkIntTo; |
wkIntSt := wkInt; |
| 2786 |
end; |
end; |
| 2787 |
//if wkIntSt = 0 then |
//if wkIntSt = 0 then |
| 2788 |
// wkIntSt := 1; |
// wkIntSt := 1; |
| 2795 |
if PathRec.FToEnd then |
if PathRec.FToEnd then |
| 2796 |
wkIntTo := 9999; |
wkIntTo := 9999; |
| 2797 |
|
|
| 2798 |
ATitle := ActiveFileName <> PathRec.FKey; |
//ATitle := ActiveFileName <> PathRec.FKey; |
| 2799 |
|
if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then |
| 2800 |
|
ATitle := false |
| 2801 |
|
else |
| 2802 |
|
ATitle := true; |
| 2803 |
|
|
| 2804 |
|
threadItem := BBSsFindThreadFromURL( URL ); |
| 2805 |
|
|
| 2806 |
//HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst); |
if (threadItem = nil) and GikoSys.Is2chHost( Host ) then begin |
| 2807 |
FHint.PopupType := gptThread; |
board := BBSs[ 0 ].FindBBSID( PathRec.FBBS ); |
| 2808 |
SetResPopupText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst); |
if board <> nil then begin |
| 2809 |
|
if not board.IsThreadDatRead then |
| 2810 |
|
GikoSys.ReadSubjectFile( board ); |
| 2811 |
|
threadItem := board.FindThreadFromFileName( PathRec.FKey + '.dat' ); |
| 2812 |
|
end; |
| 2813 |
|
end; |
| 2814 |
|
|
| 2815 |
|
if threadItem <> nil then begin |
| 2816 |
|
//HintData := GetThreadText(PathRec.FBBS, PathRec.FKey, wkIntSt, wkIntTo, ATitle, PathRec.FFirst); |
| 2817 |
|
FHint.PopupType := gptThread; |
| 2818 |
|
SetResPopupText( threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst ); |
| 2819 |
|
end; |
| 2820 |
end; |
end; |
| 2821 |
end; |
end; |
| 2822 |
|
|
| 2832 |
end; |
end; |
| 2833 |
end; |
end; |
| 2834 |
|
|
|
procedure TGikoForm.BrowserTitleChange(Sender: TObject; |
|
|
const Text: WideString); |
|
|
var |
|
|
Title: string; |
|
|
begin |
|
|
if (Text = BLANK_HTML) or (Text = GikoSys.GetHtmlTempFileName) then |
|
|
Title := CAPTION_NAME |
|
|
else |
|
|
Title := CAPTION_NAME + ' - [' + Text + ']'; |
|
|
Caption := Title; |
|
|
//Application.Title := Title; |
|
|
end; |
|
|
|
|
| 2835 |
procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean); |
procedure TGikoForm.SetEnabledCloseButton(Enabled: Boolean); |
| 2836 |
var |
var |
| 2837 |
SysMenu: HMenu; |
SysMenu: HMenu; |
| 2856 |
procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode; |
procedure TGikoForm.TreeViewChanging(Sender: TObject; Node: TTreeNode; |
| 2857 |
var AllowChange: Boolean); |
var AllowChange: Boolean); |
| 2858 |
begin |
begin |
| 2859 |
if FTreeType = gtt2ch then |
//ソート順を保存するようにしたので削除 |
| 2860 |
FSortIndex := -1; |
// if FTreeType = gtt2ch then |
| 2861 |
|
// FSortIndex := -1; |
| 2862 |
end; |
end; |
| 2863 |
|
|
| 2864 |
procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word; |
procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word; |
| 2865 |
Shift: TShiftState); |
Shift: TShiftState); |
| 2866 |
begin |
begin |
| 2867 |
if Key = VK_BACK then begin |
if GetActiveList is TBoard then begin |
| 2868 |
|
if Key = VK_BACK then begin |
| 2869 |
// UpFolderButtonClick(Sender); |
// UpFolderButtonClick(Sender); |
| 2870 |
end else if Key = VK_SPACE then begin |
end else if Key = VK_SPACE then begin |
| 2871 |
// ListClick; |
ListDoubleClick(Shift); |
| 2872 |
end else if Key = VK_RETURN then begin |
end else if Key = VK_RETURN then begin |
| 2873 |
ListDoubleClick; |
ListClick; |
| 2874 |
|
end; |
| 2875 |
|
end else begin // TBBS, TCategory |
| 2876 |
|
if Key = VK_BACK then begin |
| 2877 |
|
// UpFolderButtonClick(Sender); |
| 2878 |
|
end else if Key = VK_SPACE then begin |
| 2879 |
|
ListClick; |
| 2880 |
|
end else if Key = VK_RETURN then begin |
| 2881 |
|
ListDoubleClick(Shift); |
| 2882 |
|
end; |
| 2883 |
end; |
end; |
| 2884 |
end; |
end; |
| 2885 |
|
|
| 2890 |
|
|
| 2891 |
procedure TGikoForm.ListViewColumnClick(Sender: TObject; |
procedure TGikoForm.ListViewColumnClick(Sender: TObject; |
| 2892 |
Column: TListColumn); |
Column: TListColumn); |
|
var |
|
|
i: Integer; |
|
|
wkBBS: TBBS2ch; |
|
|
wkCategory: TCategory; |
|
|
wkBoard: TBoard; |
|
| 2893 |
begin |
begin |
| 2894 |
if FSortIndex = Column.Index then |
if FSortIndex = Column.Index then |
| 2895 |
FSortOrder := not FSortOrder |
FSortOrder := not FSortOrder |
| 2896 |
else |
else |
| 2897 |
FSortOrder := False; |
FSortOrder := False; |
| 2898 |
|
ListViewSort(Sender, Column); |
| 2899 |
|
end; |
| 2900 |
|
|
| 2901 |
|
procedure TGikoForm.ListViewSort(Sender: TObject; Column: TListColumn); |
| 2902 |
|
var |
| 2903 |
|
i: Integer; |
| 2904 |
|
wkBBS: TBBS; |
| 2905 |
|
wkCategory: TCategory; |
| 2906 |
|
wkBoard: TBoard; |
| 2907 |
|
begin |
| 2908 |
for i := 0 to ListView.Columns.Count - 1 do |
for i := 0 to ListView.Columns.Count - 1 do |
| 2909 |
ListView.Column[i].ImageIndex := -1; |
ListView.Column[i].ImageIndex := -1; |
| 2910 |
if FSortOrder then |
if FSortOrder then |
| 2914 |
|
|
| 2915 |
Sort.SortNoFlag := ListNumberVisibleAction.Checked; |
Sort.SortNoFlag := ListNumberVisibleAction.Checked; |
| 2916 |
|
|
| 2917 |
if TObject(TreeView.Selected.Data) is TBBS2ch then begin |
//if TObject(TreeView.Selected.Data) is TBBS then begin |
| 2918 |
wkBBS := TBBS2ch(TreeView.Selected.Data); |
if TObject( FActiveList ) is TBBS then begin |
| 2919 |
|
//wkBBS := TBBS(TreeView.Selected.Data); |
| 2920 |
|
wkBBS := TBBS( FActiveList ); |
| 2921 |
Sort.SortOrder := FSortOrder; |
Sort.SortOrder := FSortOrder; |
| 2922 |
Sort.SortIndex := Column.Index; |
Sort.SortIndex := Column.Index; |
| 2923 |
|
GikoSys.Setting.BBSSortIndex := Column.Index; |
| 2924 |
|
GikoSys.Setting.BBSSortOrder := FSortOrder; |
| 2925 |
wkBBS.Sort(CategorySortProc); |
wkBBS.Sort(CategorySortProc); |
| 2926 |
ListView.Refresh; |
ListView.Refresh; |
| 2927 |
end else if TObject(TreeView.Selected.Data) is TCategory then begin |
//end else if TObject(TreeView.Selected.Data) is TCategory then begin |
| 2928 |
wkCategory := TCategory(TreeView.Selected.Data); |
end else if TObject( FActiveList ) is TCategory then begin |
| 2929 |
|
//wkCategory := TCategory(TreeView.Selected.Data); |
| 2930 |
|
wkCategory := TCategory( FActiveList ); |
| 2931 |
Sort.SortOrder := FSortOrder; |
Sort.SortOrder := FSortOrder; |
| 2932 |
Sort.SortIndex := Column.Index; |
Sort.SortIndex := Column.Index; |
| 2933 |
wkCategory.Sort(BoardSortProc); |
GikoSys.Setting.CategorySortIndex := Column.Index; |
| 2934 |
|
GikoSys.Setting.CategorySortOrder := FSortOrder; |
| 2935 |
|
wkCategory.CustomSort(BoardSortProc); |
| 2936 |
ListView.Refresh; |
ListView.Refresh; |
| 2937 |
end else if TObject(TreeView.Selected.Data) is TBoard then begin |
//end else if TObject(TreeView.Selected.Data) is TBoard then begin |
| 2938 |
wkBoard := TBoard(TreeView.Selected.Data); |
end else if TObject( FActiveList ) is TBoard then begin |
| 2939 |
|
//wkBoard := TBoard(TreeView.Selected.Data); |
| 2940 |
|
wkBoard := TBoard( FActiveList ); |
| 2941 |
Sort.SortOrder := FSortOrder; |
Sort.SortOrder := FSortOrder; |
| 2942 |
Sort.SortIndex := Column.Index; |
Sort.SortIndex := Column.Index; |
| 2943 |
wkBoard.Sort(ThreadItemSortProc); |
Sort.SortNonAcquiredCountFlag := GikoSys.Setting.NonAcquiredCount; |
| 2944 |
|
GikoSys.Setting.BoardSortIndex := Column.Index; |
| 2945 |
|
GikoSys.Setting.BoardSortOrder := FSortOrder; |
| 2946 |
|
wkBoard.CustomSort(ThreadItemSortProc); |
| 2947 |
ListView.Refresh; |
ListView.Refresh; |
| 2948 |
end; |
end; |
| 2949 |
FSortIndex := Column.Index; |
FSortIndex := Column.Index; |
| 2996 |
begin |
begin |
| 2997 |
|
|
| 2998 |
if Pos(kMenuName, URL) <> 0 then begin |
if Pos(kMenuName, URL) <> 0 then begin |
| 2999 |
sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) ); |
sNo := Copy( URL, Pos( kMenuName, URL ) + Length( kMenuName ), Length( URL ) ); |
| 3000 |
|
|
| 3001 |
if not GikoSys.IsNumeric(sNo) then Exit; |
if not GikoSys.IsNumeric(sNo) then Exit; |
| 3002 |
|
|
| 3003 |
Cancel := True; |
Cancel := True; |
| 3016 |
var |
var |
| 3017 |
ThreadItem: TThreadItem; |
ThreadItem: TThreadItem; |
| 3018 |
begin |
begin |
|
DefaultDraw := True; |
|
| 3019 |
// TListView(Sender).Canvas.Font.Style := []; |
// TListView(Sender).Canvas.Font.Style := []; |
| 3020 |
if TObject(Item.Data) is TThreadItem then begin |
if TObject(Item.Data) is TThreadItem then begin |
| 3021 |
ThreadItem := TThreadItem(Item.Data); |
ThreadItem := TThreadItem(Item.Data); |
| 3022 |
|
if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin |
| 3023 |
|
ListView.Canvas.Brush.Color := FOddColor; |
| 3024 |
|
end else begin |
| 3025 |
|
ListView.Canvas.Brush.Color := FListViewBackGroundColor; |
| 3026 |
|
end; |
| 3027 |
// if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then |
// if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then |
| 3028 |
if ThreadItem.UnRead then |
if ThreadItem.UnRead then |
| 3029 |
TListView(Sender).Canvas.Font.Style := [fsBold]; |
TListView(Sender).Canvas.Font.Style := [fsBold]; |
| 3032 |
|
|
| 3033 |
procedure TGikoForm.AppFormDeactivate(Sender: TObject); |
procedure TGikoForm.AppFormDeactivate(Sender: TObject); |
| 3034 |
begin |
begin |
| 3035 |
|
Application.ProcessMessages; |
| 3036 |
if Application.Terminated then |
if Application.Terminated then |
| 3037 |
Exit; |
Exit; |
| 3038 |
if PreviewTimer.Enabled then |
if PreviewTimer.Enabled then |
| 3070 |
|
|
| 3071 |
TreeView.Canvas.Font.Color := clBlue; |
TreeView.Canvas.Font.Color := clBlue; |
| 3072 |
IsBoardNode := False; |
IsBoardNode := False; |
|
|
|
| 3073 |
for i := 0 to TreeView.Items.Count - 1 do begin |
for i := 0 to TreeView.Items.Count - 1 do begin |
| 3074 |
Cnt := 0; |
Cnt := 0; |
| 3075 |
if not TreeView.Items[i].IsVisible then |
if not TreeView.Items[i].IsVisible then |
| 3169 |
begin |
begin |
| 3170 |
TreeView.Invalidate; |
TreeView.Invalidate; |
| 3171 |
|
|
| 3172 |
if TObject(Node.Data) is TBBS2ch then begin |
if TObject(Node.Data) is TBBS then begin |
| 3173 |
TBBS2ch(Node.Data).NodeExpand := True; |
TBBS(Node.Data).NodeExpand := True; |
| 3174 |
end else if TObject(Node.Data) is TCategory then begin |
end else if TObject(Node.Data) is TCategory then begin |
| 3175 |
TCategory(Node.Data).NodeExpand := True; |
TCategory(Node.Data).NodeExpand := True; |
| 3176 |
end else if TObject(Node.Data) is TBoard then begin |
end else if TObject(Node.Data) is TBoard then begin |
| 3193 |
|
|
| 3194 |
procedure TGikoForm.TreeViewDblClick(Sender: TObject); |
procedure TGikoForm.TreeViewDblClick(Sender: TObject); |
| 3195 |
var |
var |
|
Board: TBoard; |
|
|
ThreadItem: TThreadItem; |
|
| 3196 |
APoint: TPoint; |
APoint: TPoint; |
| 3197 |
HitTest: THitTests; |
HitTest: THitTests; |
| 3198 |
begin |
begin |
| 3200 |
APoint := TreeView.ScreenToClient(APoint); |
APoint := TreeView.ScreenToClient(APoint); |
| 3201 |
HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y); |
HitTest := TreeView.GetHitTestInfoAt(APoint.x, APoint.y); |
| 3202 |
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 ) ); |
|
| 3203 |
|
|
| 3204 |
|
TreeDoubleClick( TreeView.Selected ); |
| 3205 |
end; |
end; |
| 3206 |
|
|
| 3207 |
procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon); |
procedure TGikoForm.DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon); |
| 3213 |
var |
var |
| 3214 |
ATitle: string; |
ATitle: string; |
| 3215 |
s: string; |
s: string; |
| 3216 |
|
boardPlugIn : TBoardPlugIn; |
| 3217 |
|
i: Integer; |
| 3218 |
begin |
begin |
| 3219 |
try |
try |
| 3220 |
if Item.DownType = gdtBoard then |
if Item.DownType = gdtBoard then |
| 3230 |
//板 |
//板 |
| 3231 |
Item.SaveListFile; |
Item.SaveListFile; |
| 3232 |
AddMessageList(ATitle + ' [スレ一覧取得完了]', nil, gmiOK); |
AddMessageList(ATitle + ' [スレ一覧取得完了]', nil, gmiOK); |
| 3233 |
if GetActiveList = Item.Board then |
if GetActiveList = Item.Board then begin |
| 3234 |
|
FActiveList := nil; |
| 3235 |
SetActiveList(Item.Board); |
SetActiveList(Item.Board); |
| 3236 |
|
end; |
| 3237 |
Item.Board.Modified := True; |
Item.Board.Modified := True; |
| 3238 |
Item.Board.IsThreadDatRead := True; |
Item.Board.IsThreadDatRead := True; |
| 3239 |
PlaySound('New'); |
PlaySound('New'); |
| 3241 |
//スレ |
//スレ |
| 3242 |
Item.SaveItemFile; |
Item.SaveItemFile; |
| 3243 |
Item.ThreadItem.NewArrival := True; |
Item.ThreadItem.NewArrival := True; |
| 3244 |
if AddHistory(Item.ThreadItem) then begin |
if (Item.ThreadItem.IsBoardPlugInAvailable) and (Item.ThreadItem.Title = '') then begin |
| 3245 |
|
boardPlugIn := Item.ThreadItem.BoardPlugIn; |
| 3246 |
|
Item.ThreadItem.Title := GikoSys.DivideStrLine(boardPlugIn.GetDat( DWORD( Item.ThreadItem ), 1 )).FTitle; |
| 3247 |
|
ATitle := Item.ThreadItem.Title; |
| 3248 |
|
end else if ATitle = '(名称不明)' then begin |
| 3249 |
|
ATitle := GikoSys.DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1)).FTitle; |
| 3250 |
|
end; |
| 3251 |
|
for i := BrowserTab.Tabs.Count - 1 downto 0 do begin |
| 3252 |
|
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then |
| 3253 |
|
TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true; |
| 3254 |
|
end; |
| 3255 |
|
if GikoSys.Setting.BrowserTabVisible then begin |
| 3256 |
if GetActiveContent = Item.ThreadItem then |
if GetActiveContent = Item.ThreadItem then |
| 3257 |
InsertBrowserTab(Item.ThreadItem) |
InsertBrowserTab(Item.ThreadItem) |
| 3258 |
|
else if (ListView.Selected <> nil ) and ( TObject(ListView.Selected.Data) is TThreadItem ) and ( Item.ThreadItem = TThreadItem(ListView.Selected.Data)) then |
| 3259 |
|
InsertBrowserTab(Item.ThreadItem, True) |
| 3260 |
else |
else |
| 3261 |
InsertBrowserTab(Item.ThreadItem, False); |
InsertBrowserTab(Item.ThreadItem, False); |
| 3262 |
|
end else begin |
| 3263 |
|
if (GetActiveContent = Item.ThreadItem) or (FActiveContent = nil) or(FActiveContent.Browser = BrowserNullTab.Browser) then |
| 3264 |
|
InsertBrowserTab(Item.ThreadItem); |
| 3265 |
end; |
end; |
| 3266 |
|
|
| 3267 |
if Item.State = gdsComplete then begin |
if Item.State = gdsComplete then begin |
| 3290 |
end;} |
end;} |
| 3291 |
AddMessageList(ATitle + ' [未更新]', nil, gmiSAD); |
AddMessageList(ATitle + ' [未更新]', nil, gmiSAD); |
| 3292 |
PlaySound('NoChange'); |
PlaySound('NoChange'); |
| 3293 |
Screen.Cursor := crDefault; |
Screen.Cursor := crDefault; |
| 3294 |
end else if Item.State = gdsAbort then begin |
end else if Item.State = gdsAbort then begin |
| 3295 |
//中断 |
//中断 |
| 3296 |
AddMessageList(ATitle + ' [中断]', nil, gmiSAD); |
AddMessageList(ATitle + ' [中断]', nil, gmiSAD); |
| 3311 |
if FWorkCount = 0 then begin |
if FWorkCount = 0 then begin |
| 3312 |
try |
try |
| 3313 |
Animate.Active := False; |
Animate.Active := False; |
| 3314 |
except |
finally |
| 3315 |
Screen.Cursor := crDefault; |
Screen.Cursor := crDefault; |
| 3316 |
end; |
end; |
| 3317 |
end; |
end; |
| 3318 |
|
|
| 3319 |
end; |
end; |
| 3320 |
end; |
end; |
| 3321 |
|
|
| 3322 |
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); |
| 3323 |
begin |
begin |
| 3324 |
// SetProgressValue(Number, 0, AWorkCountMax); |
// SetProgressValue(Number, 0, AWorkCountMax); |
| 3325 |
// ProgressBar.Visible := True; |
// ProgressBar.Visible := True; |
| 3326 |
ProgressBar.Position := 0; |
ProgressBar.Position := 0; |
| 3327 |
ProgressBar.Max := AWorkCountMax; |
ProgressBar.Max := AWorkCountMax; |
| 3328 |
|
FDownloadTitle := AWorkTitle; |
| 3329 |
StatusBar.Panels[1].Text := FDownloadTitle + ' - ダウンロードを開始します'; |
StatusBar.Panels[1].Text := FDownloadTitle + ' - ダウンロードを開始します'; |
| 3330 |
FDownloadMax := AWorkCountMax; |
FDownloadMax := AWorkCountMax; |
| 3331 |
end; |
end; |
| 3332 |
|
|
| 3333 |
procedure TGikoForm.WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer); |
procedure TGikoForm.WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer); |
| 3334 |
begin |
begin |
|
// ProgressBar.Visible := False; |
|
| 3335 |
ProgressBar.Position := 0; |
ProgressBar.Position := 0; |
|
// SetProgressValue(Number, 0); |
|
| 3336 |
if FDownloadMax <> 0 then |
if FDownloadMax <> 0 then |
| 3337 |
StatusBar.Panels[1].Text := FDownloadTitle + ' - ダウンロードが完了しました'; |
StatusBar.Panels[1].Text := FDownloadTitle + ' - ダウンロードが完了しました'; |
| 3338 |
end; |
end; |
| 3392 |
end;} |
end;} |
| 3393 |
|
|
| 3394 |
procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True); |
procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True); |
| 3395 |
|
|
| 3396 |
var |
var |
| 3397 |
i: Integer; |
i, j, idx: Integer; |
| 3398 |
// OldIndex: Integer; |
favItem : TFavoriteThreadItem; |
| 3399 |
|
newBrowser : TBrowserRecord; |
| 3400 |
begin |
begin |
| 3401 |
|
|
| 3402 |
|
if Threaditem = nil then Exit; |
| 3403 |
|
|
| 3404 |
if ThreadItem.IsLogFile then begin |
if ThreadItem.IsLogFile then begin |
| 3405 |
|
//お気に入りの全て開くとかやると、今開いてるスレのbrowserを付け替える恐れがある |
| 3406 |
|
//常に4番目にActiveのブラウザが来ないように移動させる |
| 3407 |
|
if (FActiveContent <> nil) and (FActiveContent.FBrowser <> nil) and |
| 3408 |
|
(FActiveContent.FBrowser <> BrowserNullTab.Browser)then begin |
| 3409 |
|
j := FBrowsers.IndexOf(FActiveContent.FBrowser); |
| 3410 |
|
if j = BROWSER_COUNT - 1 then |
| 3411 |
|
FBrowsers.Move(BROWSER_COUNT - 1, 0); |
| 3412 |
|
end; |
| 3413 |
|
favItem := TFavoriteThreadItem.Create(ThreadItem.URL, ThreadItem.Title ); |
| 3414 |
|
if not AddHistory( favItem ) then |
| 3415 |
|
favItem.Free; |
| 3416 |
|
|
| 3417 |
for i := 0 to BrowserTab.Tabs.Count - 1 do begin |
for i := 0 to BrowserTab.Tabs.Count - 1 do begin |
| 3418 |
if TObject(BrowserTab.Tabs.Objects[i]) is TThreadItem then begin |
if TObject(BrowserTab.Tabs.Objects[i]) is TBrowserRecord then begin |
| 3419 |
if TThreadItem(BrowserTab.Tabs.Objects[i]) = ThreadItem then begin |
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin |
| 3420 |
|
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = nil then begin |
| 3421 |
|
for j := BrowserTab.Tabs.Count - 1 downto 0 do begin |
| 3422 |
|
if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin |
| 3423 |
|
TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil; |
| 3424 |
|
if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin |
| 3425 |
|
TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free; |
| 3426 |
|
TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil; |
| 3427 |
|
end; |
| 3428 |
|
break; |
| 3429 |
|
end; |
| 3430 |
|
end; |
| 3431 |
|
TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]); |
| 3432 |
|
TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true; |
| 3433 |
|
FBrowsers.Move(BROWSER_COUNT - 1, 0); |
| 3434 |
|
end; |
| 3435 |
if ActiveTab then begin |
if ActiveTab then begin |
|
//OldIndex := BrowserTab.TabIndex; |
|
| 3436 |
BrowserTab.TabIndex := i; |
BrowserTab.TabIndex := i; |
|
// if OldIndex <> i then |
|
| 3437 |
BrowserTab.OnChange(nil); |
BrowserTab.OnChange(nil); |
| 3438 |
BrowserTab.Repaint; |
BrowserTab.Repaint; |
| 3439 |
end; |
end; |
| 3441 |
end; |
end; |
| 3442 |
end; |
end; |
| 3443 |
end; |
end; |
| 3444 |
|
idx := BrowserTab.TabIndex; |
| 3445 |
if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin |
if GikoSys.Setting.BrowserTabAppend = gtaFirst then begin |
| 3446 |
BrowserTab.Tabs.Insert(0, GikoSys.GetShortName(ThreadItem.Title, 20)); |
newBrowser := TBrowserRecord.Create; |
| 3447 |
BrowserTab.Tabs.Objects[0] := ThreadItem; |
for j := BrowserTab.Tabs.Count - 1 downto 0 do begin |
| 3448 |
if ActiveTab then |
if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin |
| 3449 |
|
TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil; |
| 3450 |
|
if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin |
| 3451 |
|
TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free; |
| 3452 |
|
TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil; |
| 3453 |
|
end; |
| 3454 |
|
break; |
| 3455 |
|
end; |
| 3456 |
|
end; |
| 3457 |
|
newBrowser.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]); |
| 3458 |
|
FBrowsers.Move(BROWSER_COUNT - 1, 0); |
| 3459 |
|
//newBrowser.Browser.Navigate(BLANK_HTML); |
| 3460 |
|
newBrowser.thread := ThreadItem; |
| 3461 |
|
newBrowser.Repaint := true; |
| 3462 |
|
// newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes; |
| 3463 |
|
|
| 3464 |
|
BrowserTab.Tabs.InsertObject(0, GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser); |
| 3465 |
|
if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 1) then begin |
| 3466 |
|
DeleteTab( TBrowserRecord( BrowserTab.Tabs.Objects[ 1 ] ) ); |
| 3467 |
|
end;// else begin |
| 3468 |
|
//end; |
| 3469 |
|
BrowserTab.Repaint; |
| 3470 |
|
if ActiveTab then begin |
| 3471 |
BrowserTab.TabIndex := 0; |
BrowserTab.TabIndex := 0; |
| 3472 |
|
end; |
| 3473 |
|
|
| 3474 |
end else begin |
end else begin |
| 3475 |
i := BrowserTab.Tabs.Add(GikoSys.GetShortName(ThreadItem.Title, 20)); |
newBrowser := TBrowserRecord.Create; |
| 3476 |
BrowserTab.Tabs.Objects[i] := ThreadItem; |
for j := BrowserTab.Tabs.Count - 1 downto 0 do begin |
| 3477 |
if ActiveTab then |
if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin |
| 3478 |
BrowserTab.TabIndex := i; |
TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser := nil; |
| 3479 |
|
if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent <> nil then begin |
| 3480 |
|
TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent.Free; |
| 3481 |
|
TBrowserRecord(BrowserTab.Tabs.Objects[j]).FEvent := nil; |
| 3482 |
|
end; |
| 3483 |
|
break; |
| 3484 |
|
end; |
| 3485 |
|
end; |
| 3486 |
|
newBrowser.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]); |
| 3487 |
|
FBrowsers.Move(BROWSER_COUNT - 1, 0); |
| 3488 |
|
//newBrowser.Browser.Navigate(BLANK_HTML); |
| 3489 |
|
newBrowser.thread := ThreadItem; |
| 3490 |
|
// newBrowser.OnlyHundred := GikoSys.OnlyAHundredRes; |
| 3491 |
|
newBrowser.Repaint := true; |
| 3492 |
|
|
| 3493 |
|
i := BrowserTab.Tabs.AddObject(GikoSys.GetShortName(ThreadItem.Title, 20), newBrowser); |
| 3494 |
|
if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 1) then begin |
| 3495 |
|
DeleteTab( TBrowserRecord( BrowserTab.Tabs.Objects[ 0 ] ) ); |
| 3496 |
|
end; |
| 3497 |
|
//end; |
| 3498 |
|
BrowserTab.Repaint; |
| 3499 |
|
if ActiveTab then begin |
| 3500 |
|
if (not GikoSys.Setting.BrowserTabVisible) and (BrowserTab.Tabs.Count > 0) then |
| 3501 |
|
BrowserTab.TabIndex := 0 |
| 3502 |
|
else |
| 3503 |
|
BrowserTab.TabIndex := i; |
| 3504 |
|
end; |
| 3505 |
end; |
end; |
| 3506 |
if ActiveTab then begin |
if(ActiveTab) or (idx = -1) then begin |
| 3507 |
BrowserTab.OnChange(nil); |
BrowserTab.OnChange(nil); |
|
BrowserNullTab := nil; |
|
| 3508 |
end; |
end; |
| 3509 |
end else begin |
end else begin |
| 3510 |
//OldIndex := BrowserTab.TabIndex; |
if BrowserNullTab = nil then begin |
| 3511 |
BrowserNullTab := ThreadItem; |
BrowserNullTab := TBrowserRecord.Create; |
| 3512 |
|
BrowserNullTab.Browser := Browser; |
| 3513 |
|
end; |
| 3514 |
|
BrowserNullTab.thread := ThreadItem; |
| 3515 |
BrowserTab.TabIndex := -1; |
BrowserTab.TabIndex := -1; |
| 3516 |
// if OldIndex = -1 then |
SetContent(BrowserNullTab); |
|
BrowserTab.OnChange(nil); |
|
| 3517 |
end; |
end; |
| 3518 |
BrowserTab.Repaint; |
|
| 3519 |
if GikoSys.Setting.URLDisplay then |
if GikoSys.Setting.URLDisplay then |
| 3520 |
AddressComboBox.Text := GikoSys.GetURL(ThreadItem.ParentBoard.BBSID, ThreadItem.FileName); |
AddressComboBox.Text := ThreadItem.URL; |
| 3521 |
|
|
| 3522 |
end; |
end; |
| 3523 |
|
|
| 3524 |
procedure TGikoForm.SetContent(ThreadItem: TThreadItem); |
procedure TGikoForm.SetContent(inThread : TBrowserRecord); |
| 3525 |
var |
var |
| 3526 |
BBSID: string; |
BBSID: string; |
| 3527 |
FileName: string; |
FileName: string; |
| 3528 |
sTitle: string; |
sTitle: string; |
| 3529 |
// HtmlName: string; |
// HtmlName: string; |
| 3530 |
doc: Variant; |
doc: Variant; |
| 3531 |
s: string; |
s: string; |
| 3532 |
OldCursor: TCursor; |
// OldCursor: TCursor; |
| 3533 |
//i: Integer; |
i: Integer; |
| 3534 |
|
url: OleVariant; |
| 3535 |
|
idx: Integer; |
| 3536 |
|
ThreadItem: TThreadItem; |
| 3537 |
|
Thread: TBrowserRecord; |
| 3538 |
|
ThreadTitle, ThreadPTitle: string; |
| 3539 |
|
ThreadScrollTop: Integer; |
| 3540 |
|
ThreadIsLog, ThreadUnRead, ThreadNewArraical: boolean; |
| 3541 |
begin |
begin |
| 3542 |
while (Browser.ReadyState <> READYSTATE_COMPLETE) and |
Thread := inThread; |
| 3543 |
(Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin |
idx := BrowserTab.TabIndex; |
| 3544 |
Application.ProcessMessages; |
if (FActiveContent <> nil) and |
| 3545 |
end; |
(FActiveContent.Thread <> Thread.Thread) and |
| 3546 |
|
(Assigned(FActiveContent.Browser.Document)) then begin |
|
if (FActiveContent <> nil) and (Assigned(Browser.Document)) then begin |
|
| 3547 |
try |
try |
| 3548 |
try |
try |
| 3549 |
Sleep(1); |
Sleep(1); |
| 3550 |
Application.ProcessMessages; |
//Application.ProcessMessages; |
| 3551 |
FActiveContent.ScrollTop := OleVariant(IHTMLDocument2(Browser.Document)).Body.ScrollTop; |
FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document).Body).ScrollTop; |
| 3552 |
|
//if FActiveContent.Browser <> BrowserNullTab.Browser then |
| 3553 |
|
// TOleControl(FActiveContent.Browser).Visible := false; |
| 3554 |
except |
except |
| 3555 |
on E: Exception do |
on E: Exception do |
| 3556 |
MsgBox(Handle, E.Message, 'SetContent[<-ScrollTop]', 0); |
MsgBox(Handle, E.Message, 'SetContent[<-ScrollTop]', 0); |
| 3558 |
finally |
finally |
| 3559 |
end; |
end; |
| 3560 |
end; |
end; |
| 3561 |
|
if not (Assigned(Thread)) or (Thread.Thread = nil) then begin |
| 3562 |
FActiveContent := ThreadItem; |
Thread.Browser.Navigate(BLANK_HTML); |
|
|
|
|
if ThreadItem = nil then begin |
|
|
Browser.Navigate(BLANK_HTML); |
|
| 3563 |
BrowserBoardNameLabel.Caption := ''; |
BrowserBoardNameLabel.Caption := ''; |
| 3564 |
ItemBoardImage.Picture := nil; |
ItemBoardImage.Picture := nil; |
| 3565 |
BrowserNameLabel.Caption := ''; |
BrowserNameLabel.Caption := ''; |
| 3566 |
ItemImage.Picture := nil; |
ItemImage.Picture := nil; |
| 3567 |
|
BrowserNullTab.Thread := nil; |
| 3568 |
|
//TOleControl(BrowserNullTab.Browser).Visible := true; |
| 3569 |
|
ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW); |
| 3570 |
FActiveContent := nil; |
FActiveContent := nil; |
| 3571 |
Exit; |
Exit; |
| 3572 |
|
end else if Thread.Browser = nil then begin |
| 3573 |
|
if FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then |
| 3574 |
|
FBrowsers.Move(BROWSER_COUNT - 1, 0); |
| 3575 |
|
for i := BrowserTab.Tabs.Count - 1 downto 0 do begin |
| 3576 |
|
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin |
| 3577 |
|
TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser := nil; |
| 3578 |
|
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent <> nil then begin |
| 3579 |
|
TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent.Free; |
| 3580 |
|
TBrowserRecord(BrowserTab.Tabs.Objects[i]).FEvent := nil; |
| 3581 |
|
end; |
| 3582 |
|
break; |
| 3583 |
|
end; |
| 3584 |
|
end; |
| 3585 |
|
Thread.Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]); |
| 3586 |
|
FBrowsers.Move(BROWSER_COUNT - 1, 0); |
| 3587 |
end; |
end; |
| 3588 |
|
ThreadTitle := Thread.Thread.Title; |
| 3589 |
|
ThreadPTitle := Thread.Thread.ParentBoard.Title; |
| 3590 |
|
ThreadScrollTop := Thread.Thread.ScrollTop; |
| 3591 |
|
ThreadIsLog := Thread.Thread.IsLogFile; |
| 3592 |
|
ThreadItem := Thread.Thread; |
| 3593 |
|
ThreadNewArraical := Thread.Thread.NewArrival; |
| 3594 |
|
ThreadUnRead := Thread.Thread.UnRead; |
| 3595 |
BBSID := ThreadItem.ParentBoard.BBSID; |
BBSID := ThreadItem.ParentBoard.BBSID; |
| 3596 |
FileName := ThreadItem.FileName; |
FileName := ThreadItem.FileName; |
| 3597 |
|
|
| 3598 |
if GetCapture = ListView.Handle then |
if GetCapture = ListView.Handle then |
| 3599 |
ReleaseCapture; |
ReleaseCapture; |
| 3600 |
|
|
|
//OldCursor := Screen.Cursor; |
|
| 3601 |
Screen.Cursor := crHourGlass; |
Screen.Cursor := crHourGlass; |
| 3602 |
|
|
| 3603 |
|
|
| 3604 |
try |
try |
| 3605 |
if ThreadItem.UnRead then begin |
if ThreadItem.UnRead then begin |
| 3606 |
ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1; |
ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1; |
| 3607 |
if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0; |
if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0; |
| 3608 |
TreeView.Refresh; |
TreeView.Refresh; |
| 3609 |
end; |
end; |
| 3610 |
|
// LockWindowUpdate(Self.Handle); |
| 3611 |
if not ThreadItem.IsLogFile then begin |
if(FActiveContent <> nil) and (FActiveContent <> Thread) then begin |
| 3612 |
|
if (FActiveContent.Browser <> BrowserNullTab.Browser) then |
| 3613 |
if (not Assigned(Browser.Document)) then begin |
ShowWindow(FActiveContent.Browser.Handle, SW_HIDE); |
| 3614 |
Browser.Navigate('about:blank'); |
end; |
| 3615 |
while (not Assigned(Browser.Document)) do begin |
ShowWindow(Thread.FBrowser.Handle, SW_SHOW); |
| 3616 |
Application.ProcessMessages; |
//LockWindowUpdate(0); |
| 3617 |
end; |
if (not Assigned(Thread.Browser.Document)) then begin |
| 3618 |
|
Thread.Browser.Navigate('about:blank'); |
| 3619 |
|
end; |
| 3620 |
|
FActiveContent := Thread; |
| 3621 |
|
while (Thread.Browser.ReadyState <> READYSTATE_COMPLETE) and |
| 3622 |
|
(Thread.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin |
| 3623 |
|
Application.ProcessMessages; |
| 3624 |
|
if idx <> BrowserTab.TabIndex then begin |
| 3625 |
|
Exit; |
| 3626 |
end; |
end; |
| 3627 |
|
end; |
| 3628 |
|
if not ThreadIsLog then begin |
| 3629 |
|
Self.Caption := CAPTION_NAME ; |
| 3630 |
try |
try |
| 3631 |
s := '<HTML><BODY><CENTER>このスレッドは取得していません</CENTER></BODY></HTML>'; |
s := '<HTML><BODY><CENTER>このスレッドは取得していません</CENTER></BODY></HTML>'; |
| 3632 |
doc := Browser.Document; |
doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2; |
| 3633 |
doc.open; |
doc.open; |
| 3634 |
doc.charset := 'Shift_JIS'; |
doc.charset := 'Shift_JIS'; |
| 3635 |
doc.Write(s); |
doc.Write(s); |
| 3637 |
finally |
finally |
| 3638 |
end; |
end; |
| 3639 |
end else begin |
end else begin |
| 3640 |
//Application.ProcessMessages; |
Self.Caption := CAPTION_NAME + ' - [' + ThreadTitle + ']'; |
| 3641 |
GikoSys.CreateHTML2(Browser.Document, ThreadItem, sTitle); |
//Thread.Repaintは、スキン等の設定を変更したとき、Threadをダウンロードしたとき |
| 3642 |
while (Browser.ReadyState <> READYSTATE_COMPLETE) and |
//新規にThreadを開いたときに真になっている。 |
| 3643 |
(Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin |
// if(Thread.Repaint) or (Thread.OnlyHundred <> GikoSys.OnlyAHundredRes)then begin |
| 3644 |
Application.ProcessMessages; |
if Thread.Repaint then begin |
| 3645 |
end; |
//Thread.LastSize := ThreadItem.Size; |
| 3646 |
//Sleep(1); |
Thread.Repaint := false; |
|
Application.ProcessMessages; |
|
|
try |
|
|
if ThreadItem.UnRead then |
|
|
BrowserMovement('new'); |
|
|
except |
|
|
end; |
|
|
if (ThreadItem.ScrollTop <> 0) and (not ThreadItem.UnRead) then begin |
|
|
//i := 0; |
|
| 3647 |
try |
try |
| 3648 |
|
Thread.Browser.OnStatusTextChange := nil; |
| 3649 |
|
doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2; |
| 3650 |
|
GikoSys.CreateHTML2(doc, ThreadItem, sTitle); |
| 3651 |
|
|
| 3652 |
|
// if (Assigned(Thread.Browser)) and (Thread.Browser <> nil) then |
| 3653 |
|
Thread.Browser.OnStatusTextChange := BrowserStatusTextChange; |
| 3654 |
|
//なぜかここで明示的にDocumentCompleteを呼ばないとうまくいかない |
| 3655 |
|
//追記 200406/19 |
| 3656 |
|
//VisibleのときしかDocumentCompleteは呼ばれないらしい |
| 3657 |
|
Thread.FBrowser.OnDocumentComplete(Thread.FBrowser, Thread.FBrowser.Parent, url); |
| 3658 |
|
// Thread.OnlyHundred := GikoSys.OnlyAHundredRes; |
| 3659 |
|
Application.ProcessMessages; |
| 3660 |
|
//ここでApplication.ProcessMessagesを呼ぶことによってWebBrowserを更新させる。 |
| 3661 |
|
//相しないと一画面分しか描画できてないのでそれ以上のスクロール量を指定しても無効になる |
| 3662 |
|
// byもじゅ(2004/01/20) |
| 3663 |
try |
try |
| 3664 |
doc := Browser.Document; |
//if (Assigned(Thread)) and (Assigned(ThreadItem))then begin |
| 3665 |
doc.Body.ScrollTop := ThreadItem.ScrollTop; |
if(Thread <> nil) and (ThreadItem <>nil) then begin |
| 3666 |
|
if ThreadUnRead then |
| 3667 |
|
BrowserMovement('new', Thread) |
| 3668 |
|
else if ThreadScrollTop <> 0 then begin |
| 3669 |
|
try |
| 3670 |
|
doc.Body.ScrollTop := ThreadScrollTop; |
| 3671 |
|
except |
| 3672 |
|
on E: Exception do |
| 3673 |
|
MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0); |
| 3674 |
|
end; |
| 3675 |
|
end; |
| 3676 |
|
// end; |
| 3677 |
|
end else begin |
| 3678 |
|
FActiveContent := nil; |
| 3679 |
|
BrowserTab.Repaint; |
| 3680 |
|
Exit; |
| 3681 |
|
end; |
| 3682 |
except |
except |
| 3683 |
on E: Exception do |
FActiveContent := nil; |
| 3684 |
MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0); |
BrowserTab.Repaint; |
| 3685 |
|
Exit; |
| 3686 |
end; |
end; |
| 3687 |
finally |
finally |
| 3688 |
|
// Application.ProcessMessages; |
| 3689 |
end; |
end; |
| 3690 |
end; |
end; |
| 3691 |
ThreadItem.UnRead := False; |
ThreadItem.UnRead := False; |
| 3692 |
ListView.Refresh; |
ListView.Refresh; |
| 3693 |
end; |
end; |
| 3694 |
|
if (Assigned(Thread)) and (Assigned(Thread.Thread)) and (Thread <> nil) and (ThreadItem <>nil) then begin |
| 3695 |
|
//FActiveContent := Thread; |
| 3696 |
|
|
| 3697 |
BrowserBoardNameLabel.Caption := ThreadItem.ParentBoard.Title; |
BrowserBoardNameLabel.Caption := ThreadPTitle; |
| 3698 |
ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap); |
ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap); |
| 3699 |
BrowserNameLabel.Caption := ThreadItem.Title; |
BrowserNameLabel.Caption := ThreadTitle; |
| 3700 |
ItemImage.Picture := nil; |
ItemImage.Picture := nil; |
| 3701 |
if ThreadItem.IsLogFile then |
if ThreadIsLog then |
| 3702 |
if ThreadItem.NewArrival then |
if ThreadNewArraical then |
| 3703 |
ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap) |
ItemImageList.GetBitmap(2, ItemImage.Picture.Bitmap) |
| 3704 |
|
else |
| 3705 |
|
ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap) |
| 3706 |
else |
else |
| 3707 |
ItemImageList.GetBitmap(0, ItemImage.Picture.Bitmap) |
ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap); |
|
else |
|
|
ItemImageList.GetBitmap(1, ItemImage.Picture.Bitmap); |
|
| 3708 |
|
|
| 3709 |
ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8; |
ItemImage.Left := BrowserBoardNameLabel.Left + BrowserBoardNameLabel.Width + 8; |
| 3710 |
BrowserNameLabel.Left := ItemImage.Left + 20; |
BrowserNameLabel.Left := ItemImage.Left + 20; |
| 3711 |
|
end else begin |
| 3712 |
|
FActiveContent := nil; |
| 3713 |
|
end; |
| 3714 |
finally |
finally |
| 3715 |
//if Screen.Cursor <> crDefault then |
Screen.Cursor := crDefault; |
|
// Screen.Cursor := OldCursor |
|
|
//else |
|
|
Screen.Cursor := crDefault; |
|
| 3716 |
end; |
end; |
| 3717 |
end; |
end; |
| 3718 |
|
|
| 3719 |
function TGikoForm.GetActiveContent: TThreadItem; |
function TGikoForm.GetActiveContent: TThreadItem; |
|
var |
|
|
Index: Integer; |
|
| 3720 |
begin |
begin |
| 3721 |
Result := nil; |
try |
| 3722 |
if BrowserTab.TabIndex = -1 then begin |
if( Assigned(FActiveContent) ) and (Assigned(FActiveContent.Thread)) |
| 3723 |
Result := BrowserNullTab; |
and (FActiveContent <> nil) and (FActiveContent.Thread <> nil) then |
| 3724 |
Exit; |
Result := FActiveContent.Thread |
| 3725 |
|
else begin |
| 3726 |
|
FActiveContent := nil; |
| 3727 |
|
Result := nil; |
| 3728 |
|
end; |
| 3729 |
|
except |
| 3730 |
|
FActiveContent := nil; |
| 3731 |
|
Result := nil; |
| 3732 |
end; |
end; |
|
Index := BrowserTab.TabIndex; |
|
|
if BrowserTab.Tabs.Objects[Index] is TThreadItem then |
|
|
Result := TThreadItem(BrowserTab.Tabs.Objects[Index]); |
|
|
|
|
|
// Result := FActiveContent; |
|
| 3733 |
end; |
end; |
| 3734 |
|
|
| 3735 |
procedure TGikoForm.SetActiveList(Obj: TObject); |
procedure TGikoForm.SetActiveList(Obj: TObject); |
| 3736 |
var |
var |
| 3737 |
i: Integer; |
i : Integer; |
| 3738 |
|
idx : Integer; |
| 3739 |
begin |
begin |
| 3740 |
FActiveList := Obj; |
// if FActiveList <> Obj then begin |
| 3741 |
|
FActiveList := Obj; |
| 3742 |
|
|
| 3743 |
if Obj is TBBS2ch then begin |
if ListView.Selected <> nil then |
| 3744 |
for i := 0 to ListView.Columns.Count - 1 do |
idx := ListView.Selected.Index |
| 3745 |
ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i]; |
else |
| 3746 |
SetCategoryListItem(TBBS2ch(Obj)); |
idx := -1; |
| 3747 |
end else if Obj is TCategory then begin |
ListView.Items.Count := 0; |
| 3748 |
for i := 0 to ListView.Columns.Count - 1 do |
ListView.Items.Clear; |
| 3749 |
ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i]; |
ListView.Selected := nil; |
| 3750 |
SetBoardListItem(TCategory(Obj)); |
// ListView.Columns.Clear; |
| 3751 |
end else if Obj is TBoard then begin |
|
| 3752 |
// SetThreadListItem 呼ぶならいらないんじゃねぇ? |
Self.Caption := CAPTION_NAME; |
| 3753 |
{ |
//Application.Title := CAPTION_NAME; |
| 3754 |
for i := 0 to ListView.Columns.Count - 1 do |
|
| 3755 |
ListView.Column[i].Width := GikoSys.Setting.BoardColumnWidth[i]; |
if Obj is TBBS then begin |
| 3756 |
} |
for i := 0 to ListView.Columns.Count - 1 do |
| 3757 |
SetThreadListItem(TBoard(Obj)); |
ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i]; |
| 3758 |
end; |
SetCategoryListItem(TBBS(Obj)); |
| 3759 |
|
end else if Obj is TCategory then begin |
| 3760 |
|
for i := 0 to ListView.Columns.Count - 1 do |
| 3761 |
|
ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i]; |
| 3762 |
|
SetBoardListItem(TCategory(Obj)); |
| 3763 |
|
end else if Obj is TBoard then begin |
| 3764 |
|
SetThreadListItem(TBoard(Obj)); |
| 3765 |
|
end; |
| 3766 |
|
|
| 3767 |
|
if idx >= 0 then begin |
| 3768 |
|
ListView.ItemIndex := idx; |
| 3769 |
|
ListView.ItemFocused := ListView.Items.Item[ idx ]; |
| 3770 |
|
end; |
| 3771 |
|
// end; |
| 3772 |
end; |
end; |
| 3773 |
|
|
| 3774 |
|
|
| 3791 |
if ActiveList is TBoard then begin |
if ActiveList is TBoard then begin |
| 3792 |
Board := TBoard(ActiveList); |
Board := TBoard(ActiveList); |
| 3793 |
|
|
| 3794 |
Board.ParentCategory.ParentBBS2ch.SelectText := SelectText; |
Board.ParentCategory.ParenTBBS.SelectText := SelectText; |
| 3795 |
Board.ParentCategory.ParentBBS2ch.KubetsuChk := KubetsuChk; |
Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk; |
| 3796 |
// Board.SelectText := SelectText; |
// Board.SelectText := SelectText; |
| 3797 |
// Board.KubetsuChk := KubetsuChk; |
// Board.KubetsuChk := KubetsuChk; |
| 3798 |
ViewType := AViewType; |
ViewType := AViewType; |
| 3831 |
ListView.Canvas.Font.Color := clNavy; |
ListView.Canvas.Font.Color := clNavy; |
| 3832 |
s := 'このビューにはタイトルが「%s」を含むアイテムがありません。'; |
s := 'このビューにはタイトルが「%s」を含むアイテムがありません。'; |
| 3833 |
if GetActiveList is TBoard then |
if GetActiveList is TBoard then |
| 3834 |
s := Format(s, [TBoard(GetActiveList).ParentCategory.ParentBBS2ch.SelectText]); |
s := Format(s, [TBoard(GetActiveList).ParentCategory.ParenTBBS.SelectText]); |
| 3835 |
// SelectText]); |
// SelectText]); |
| 3836 |
end; |
end; |
| 3837 |
else begin |
else begin |
| 3847 |
end; |
end; |
| 3848 |
end; |
end; |
| 3849 |
|
|
| 3850 |
procedure TGikoForm.DownloadList(Board: TBoard); |
procedure TGikoForm.DownloadList(Board: TBoard; ForceDownload: Boolean = False); |
| 3851 |
var |
var |
| 3852 |
Item: TDownloadItem; |
Item: TDownloadItem; |
| 3853 |
begin |
begin |
|
if Board.Title = '' then |
|
|
FDownloadTitle := '(名称不明)' |
|
|
else |
|
|
FDownloadTitle := Board.Title; |
|
|
|
|
| 3854 |
if not Board.IsThreadDatRead then |
if not Board.IsThreadDatRead then |
| 3855 |
GikoSys.ReadSubjectFile(Board); |
GikoSys.ReadSubjectFile(Board); |
| 3856 |
Item := TDownloadItem.Create; |
Item := TDownloadItem.Create; |
| 3857 |
try |
try |
| 3858 |
Item.Board := Board; |
Item.Board := Board; |
| 3859 |
Item.DownType := gdtBoard; |
Item.DownType := gdtBoard; |
| 3860 |
|
Item.ForceDownload := ForceDownload; |
| 3861 |
// AbortToolButton.Enabled := True; |
// AbortToolButton.Enabled := True; |
| 3862 |
// Animate.Active := True; |
// Animate.Active := True; |
| 3863 |
// FDownload.Add(Item); |
// FDownload.Add(Item); |
| 3877 |
end; |
end; |
| 3878 |
end; |
end; |
| 3879 |
|
|
| 3880 |
procedure TGikoForm.DownloadContent(ThreadItem: TThreadItem); |
procedure TGikoForm.DownloadContent(ThreadItem: TThreadItem; ForceDownload: Boolean = False); |
| 3881 |
var |
var |
| 3882 |
Item: TDownloadItem; |
Item: TDownloadItem; |
| 3883 |
begin |
begin |
|
if ThreadItem.Title = '' then |
|
|
FDownloadTitle := '(名称不明)' |
|
|
else |
|
|
FDownloadTitle := ThreadItem.Title; |
|
| 3884 |
Item := TDownloadItem.Create; |
Item := TDownloadItem.Create; |
| 3885 |
try |
try |
| 3886 |
Item.ThreadItem := ThreadItem; |
Item.ThreadItem := ThreadItem; |
| 3887 |
Item.DownType := gdtThread; |
Item.DownType := gdtThread; |
| 3888 |
|
Item.ForceDownload := ForceDownload; |
| 3889 |
// AbortToolButton.Enabled := True; |
// AbortToolButton.Enabled := True; |
| 3890 |
// Animate.Active := True; |
// Animate.Active := True; |
| 3891 |
// FDownload.Add(Item); |
// FDownload.Add(Item); |
| 3920 |
end; |
end; |
| 3921 |
end; |
end; |
| 3922 |
|
|
| 3923 |
function TGikoForm.AddHistory(ThreadItem: TThreadItem): Boolean; |
function TGikoForm.AddHistory( favItem : TFavoriteThreadItem ): Boolean; |
| 3924 |
var |
var |
| 3925 |
i: Integer; |
i: Integer; |
| 3926 |
Item: TThreadItem; |
Item: TFavoriteThreadItem; |
| 3927 |
Node: TTreeNode; |
Node: TTreeNode; |
| 3928 |
begin |
begin |
| 3929 |
// Result := False; |
// Result := False; |
| 3934 |
// Exit; |
// Exit; |
| 3935 |
|
|
| 3936 |
Result := True; |
Result := True; |
| 3937 |
item := nil; |
if FTreeType = gttHistory then |
| 3938 |
|
TreeView.Selected := nil; |
| 3939 |
|
|
| 3940 |
for i := 0 to FHistoryList.Count - 1 do begin |
for i := 0 to FHistoryList.Count - 1 do begin |
| 3941 |
if TObject(FHistoryList[i]) is TThreadItem then begin |
if TObject(FHistoryList[i]) is TFavoriteThreadItem then begin |
| 3942 |
Item := TThreadItem(FHistoryList[i]); |
Item := TFavoriteThreadItem(FHistoryList[i]); |
| 3943 |
if Item = ThreadItem then begin |
if Item.URL = favItem.URL then begin |
| 3944 |
// SetContent(ThreadItem); |
// SetContent(ThreadItem); |
| 3945 |
FHistoryList.Move(i, 0); |
FHistoryList.Move(i, 0); |
| 3946 |
|
if FTreeType = gttHistory then |
| 3947 |
|
if TreeView.Items.GetFirstNode <> TreeView.Items[ i ] then |
| 3948 |
|
TreeView.Items[ i ].MoveTo( TreeView.Items.GetFirstNode, naInsert ); |
| 3949 |
|
Result := false; |
| 3950 |
Exit; |
Exit; |
| 3951 |
end; |
end; |
| 3952 |
end; |
end; |
| 3953 |
end; |
end; |
| 3954 |
FHistoryList.Add(ThreadItem); |
|
| 3955 |
|
if FHistoryList.Count > 0 then |
| 3956 |
|
FHistoryList.Insert( 0, favItem ) |
| 3957 |
|
else |
| 3958 |
|
FHistoryList.Add( favItem ); |
| 3959 |
// SetContent(ThreadItem); |
// SetContent(ThreadItem); |
| 3960 |
|
|
| 3961 |
if FTreeType = gttHistory then begin |
if FTreeType = gttHistory then begin |
| 3962 |
Node := TreeView.Items.Add(nil, ThreadItem.Title); |
Node := TreeView.Items.Add( nil, favItem.Title ); |
| 3963 |
if Item.NewArrival then begin |
Node.MoveTo( TreeView.Items.GetFirstNode, naInsert ); |
| 3964 |
|
{ |
| 3965 |
|
if favItem.NewArrival then begin |
| 3966 |
Node.ImageIndex := ITEM_ICON_THREADNEW1; |
Node.ImageIndex := ITEM_ICON_THREADNEW1; |
| 3967 |
Node.SelectedIndex := ITEM_ICON_THREADNEW2; |
Node.SelectedIndex := ITEM_ICON_THREADNEW2; |
| 3968 |
end else begin |
end else begin |
| 3969 |
Node.ImageIndex := ITEM_ICON_THREADLOG1; |
Node.ImageIndex := ITEM_ICON_THREADLOG1; |
| 3970 |
Node.SelectedIndex := ITEM_ICON_THREADLOG2; |
Node.SelectedIndex := ITEM_ICON_THREADLOG2; |
| 3971 |
end; |
end; |
| 3972 |
Node.Data := ThreadItem; |
} |
| 3973 |
|
// 負荷をかけたくないので NewArrival のチェックを行わない |
| 3974 |
|
// ※favItem.Item プロパティは dat の読み込みを必要とする |
| 3975 |
|
Node.ImageIndex := ITEM_ICON_THREADLOG1; |
| 3976 |
|
Node.SelectedIndex := ITEM_ICON_THREADLOG2; |
| 3977 |
|
Node.Data := favItem; |
| 3978 |
end; |
end; |
| 3979 |
end; |
end; |
| 3980 |
|
|
| 3981 |
procedure TGikoForm.DeleteHistory(ThreadItem: TThreadItem); |
procedure TGikoForm.DeleteHistory( threadItem: TThreadItem ); |
| 3982 |
var |
var |
| 3983 |
i: Integer; |
i: Integer; |
| 3984 |
begin |
begin |
|