| 741 |
procedure IndividualAbonID(Atype : Integer); |
procedure IndividualAbonID(Atype : Integer); |
| 742 |
//このレスあぼ〜ん |
//このレスあぼ〜ん |
| 743 |
procedure IndividualAbon(Atag, Atype : Integer); |
procedure IndividualAbon(Atag, Atype : Integer); |
|
//IDアンカー追加 |
|
|
procedure IDAnchorPopup(Abody :string); |
|
| 744 |
//ブラウザの再描画 true:全てのタブ false:アクティブなタブのみ |
//ブラウザの再描画 true:全てのタブ false:アクティブなタブのみ |
| 745 |
procedure RepaintAllTabsBrowser(); |
procedure RepaintAllTabsBrowser(); |
| 746 |
//リンクバー設定 |
//リンクバー設定 |
| 756 |
procedure DeleteTab(ThreadItem: TThreadItem); overload; |
procedure DeleteTab(ThreadItem: TThreadItem); overload; |
| 757 |
procedure DeleteTab(BrowserRecord: TBrowserRecord); overload; |
procedure DeleteTab(BrowserRecord: TBrowserRecord); overload; |
| 758 |
//現在表示しているスレッドをスクロール |
//現在表示しているスレッドをスクロール |
| 759 |
procedure BrowserMovement(const AName: string); overload; |
procedure BrowserMovement(const AName: string); |
|
//指定したブラウザをスクロール |
|
|
procedure BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord); overload; |
|
| 760 |
//ApplicationのMainFormを取得する |
//ApplicationのMainFormを取得する |
| 761 |
function GetMainForm(): TComponent; |
function GetMainForm(): TComponent; |
| 762 |
procedure SelectTreeNode(Item: TObject; CallEvent: Boolean); |
procedure SelectTreeNode(Item: TObject; CallEvent: Boolean); |
| 3485 |
end; |
end; |
| 3486 |
end; |
end; |
| 3487 |
end; |
end; |
|
procedure TGikoForm.BrowserMovement(const AName: string; BrowserRecord: TBrowserRecord); |
|
|
var |
|
|
top: Integer; |
|
|
item: OleVariant; |
|
|
nm: OleVariant; |
|
|
activeBrower :TWebBrowser; |
|
|
begin |
|
|
// |
|
|
while (BrowserRecord.Browser.ReadyState <> READYSTATE_COMPLETE) and |
|
|
(BrowserRecord.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin |
|
|
Sleep(1); |
|
|
Application.ProcessMessages; |
|
|
end; |
|
|
|
|
|
// Access Violation が起きる事があるので今後要チェック |
|
|
if(BrowserRecord <> nil) and (BrowserRecord.Browser <> nil) then begin |
|
|
activeBrower := BrowserRecord.Browser; |
|
|
try |
|
|
top := 0; |
|
|
nm := AName; |
|
|
item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm); |
|
|
item.focus(); |
|
|
repeat |
|
|
top := top + item.offsetTop; |
|
|
item := item.offsetParent; |
|
|
until AnsiCompareText(item.tagName, 'body' ) = 0; |
|
|
OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top; |
|
|
except |
|
|
end; |
|
|
end; |
|
|
end; |
|
| 3488 |
|
|
| 3489 |
procedure TGikoForm.BrowserMovement(const AName: string); |
procedure TGikoForm.BrowserMovement(const AName: string); |
|
var |
|
|
top: Integer; |
|
|
item: OleVariant; |
|
|
nm: OleVariant; |
|
|
activeBrower :TWebBrowser; |
|
| 3490 |
begin |
begin |
| 3491 |
// Access Violation が起きる事があるので今後要チェック |
// Access Violation が起きる事があるので今後要チェック |
| 3492 |
if(BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex >= 0) then begin |
if(BrowserTab.Tabs.Count > 0) and (BrowserTab.TabIndex >= 0) |
| 3493 |
activeBrower := FActiveContent.Browser; |
and (FActiveContent <> nil) then begin |
| 3494 |
try |
FActiveContent.Move(AName); |
|
top := 0; |
|
|
nm := AName; |
|
|
item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm); |
|
|
item.focus(); |
|
|
repeat |
|
|
top := top + item.offsetTop; |
|
|
item := item.offsetParent; |
|
|
until AnsiCompareText(item.tagName, 'body' ) = 0; |
|
|
|
|
|
OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top; |
|
|
except |
|
|
end; |
|
| 3495 |
end; |
end; |
| 3496 |
end; |
end; |
| 3497 |
|
|
| 3819 |
if(AnsiPos('>>', Text) = 1) or (AnsiPos('>', Text) = 1) |
if(AnsiPos('>>', Text) = 1) or (AnsiPos('>', Text) = 1) |
| 3820 |
or (AnsiPos('>>', Text) = 1) or (AnsiPos('>', Text) = 1) then begin |
or (AnsiPos('>>', Text) = 1) or (AnsiPos('>', Text) = 1) then begin |
| 3821 |
if GikoSys.Setting.ResAnchorJamp then begin |
if GikoSys.Setting.ResAnchorJamp then begin |
| 3822 |
Text := ZenToHan(Text); |
Text := ZenToHan(Trim(Text)); |
| 3823 |
|
|
| 3824 |
if(AnsiPos('>>', Text) = 1) then begin |
if(AnsiPos('>>', Text) = 1) then begin |
| 3825 |
//Text := Copy(Text, 3, Length(Text) - 2); |
//Text := Copy(Text, 3, Length(Text) - 2); |
| 3828 |
//Text := Copy(Text, 2, Length(Text) - 1); |
//Text := Copy(Text, 2, Length(Text) - 1); |
| 3829 |
Delete(Text, 1, 1); |
Delete(Text, 1, 1); |
| 3830 |
end; |
end; |
| 3831 |
|
|
| 3832 |
if AnsiPos('-', Text) <> 0 then begin |
if AnsiPos('-', Text) <> 0 then begin |
| 3833 |
wkIntSt := StrToIntDef(Copy(Text, 1, AnsiPos('-', Text) - 1), 0); |
wkIntSt := StrToIntDef(Copy(Text, 1, AnsiPos('-', Text) - 1), 0); |
| 3834 |
Text := Copy(Text, AnsiPos('-', Text) + 1, Length(Text)); |
Text := Copy(Text, AnsiPos('-', Text) + 1, Length(Text)); |
| 3835 |
wkIntTo := StrToIntDef(Text, 0); |
wkIntTo := StrToIntDef(Text, 0); |
| 3836 |
if wkIntTo < wkIntSt then |
if wkIntTo < wkIntSt then |
| 3837 |
wkIntSt := wkIntTo; |
wkIntSt := wkIntTo; |
| 3838 |
end else |
end else begin |
| 3839 |
wkIntSt := StrToIntDef(Text, 0); |
wkIntSt := StrToIntDef(Text, 0); |
| 3840 |
|
end; |
| 3841 |
|
|
| 3842 |
if wkIntSt <> 0 then begin |
if wkIntSt <> 0 then begin |
| 3843 |
document := FActiveContent.Browser.Document as IHTMLDocument2; |
FActiveContent.IDAnchorPopup(''); |
|
IDAnchorPopup(''); |
|
| 3844 |
BrowserMovement(IntToStr(wkIntSt)); |
BrowserMovement(IntToStr(wkIntSt)); |
| 3845 |
end; |
end; |
| 3846 |
|
|
| 4172 |
TreeView.Refresh; |
TreeView.Refresh; |
| 4173 |
ListView.Refresh; |
ListView.Refresh; |
| 4174 |
end; |
end; |
| 4175 |
BrowserMovement( BrowserRecord.Movement, BrowserRecord ); |
BrowserRecord.Move(BrowserRecord.Movement); |
| 4176 |
BrowserRecord.Movement := ''; |
BrowserRecord.Movement := ''; |
| 4177 |
end else if threadItem.UnRead then begin |
end else if threadItem.UnRead then begin |
| 4178 |
threadItem.UnRead := False; |
threadItem.UnRead := False; |
| 4179 |
threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1; |
threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1; |
| 4180 |
if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0; |
if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0; |
| 4181 |
TreeView.Refresh; |
TreeView.Refresh; |
| 4182 |
BrowserMovement( 'new', BrowserRecord ); |
BrowserRecord.Move('new'); |
| 4183 |
ListView.Refresh; |
ListView.Refresh; |
| 4184 |
end else if threadItem.ScrollTop <> 0 then begin |
end else if threadItem.ScrollTop <> 0 then begin |
| 4185 |
try |
try |
| 4586 |
browserRec := InsertBrowserTab( ThreadItem ); |
browserRec := InsertBrowserTab( ThreadItem ); |
| 4587 |
if ThreadItem.IsLogFile then begin |
if ThreadItem.IsLogFile then begin |
| 4588 |
if (browserRec <> nil) and (stRes > 0) then |
if (browserRec <> nil) and (stRes > 0) then |
| 4589 |
BrowserMovement( IntToStr( stRes ), browserRec ); |
browserRec.Move(IntToStr( stRes )); |
| 4590 |
end else begin |
end else begin |
| 4591 |
if (browserRec <> nil) and (stRes > 0) then |
if (browserRec <> nil) and (stRes > 0) then |
| 4592 |
browserRec.Movement := IntToStr( stRes ); |
browserRec.Movement := IntToStr( stRes ); |
| 4981 |
ThreadItem: TThreadItem; |
ThreadItem: TThreadItem; |
| 4982 |
begin |
begin |
| 4983 |
Result := False; |
Result := False; |
| 4984 |
IDAnchorPopup(''); |
FactiveContent.IDAnchorPopup(''); |
| 4985 |
Doc := FactiveContent.Browser.Document as IHtmlDocument2; |
Doc := FactiveContent.Browser.Document as IHtmlDocument2; |
| 4986 |
if Assigned(Doc) then begin |
if Assigned(Doc) then begin |
| 4987 |
Range := Doc.selection.createRange as IHTMLTxtRange; |
Range := Doc.selection.createRange as IHTMLTxtRange; |
| 6797 |
rc := GikoUtil.MsgBox(Handle, |
rc := GikoUtil.MsgBox(Handle, |
| 6798 |
'20個以上ありますが、すべて表示しますか?', |
'20個以上ありますが、すべて表示しますか?', |
| 6799 |
'IDポップアップ警告', |
'IDポップアップ警告', |
| 6800 |
MB_YESNO or MB_ICONQUESTION); |
MB_YESNO or MB_ICONQUESTION); |
| 6801 |
limited := rc <> ID_YES; |
limited := rc <> ID_YES; |
| 6802 |
end; |
end; |
| 6803 |
body := GikoSys.GetSameIDResAnchor(AID, FActiveContent.Thread, limited); |
body := GikoSys.GetSameIDResAnchor(AID, FActiveContent.Thread, limited); |
| 6804 |
IDAnchorPopup(body); |
FActiveContent.IDAnchorPopup(body); |
| 6805 |
end; |
end; |
| 6806 |
end; |
end; |
| 6807 |
except |
except |
| 6810 |
end; |
end; |
| 6811 |
end; |
end; |
| 6812 |
|
|
|
|
|
|
|
|
| 6813 |
//スレッド一覧を最大化してフォーカスを当てる |
//スレッド一覧を最大化してフォーカスを当てる |
| 6814 |
procedure TGikoForm.SelectTimerTimer(Sender: TObject); |
procedure TGikoForm.SelectTimerTimer(Sender: TObject); |
| 6815 |
begin |
begin |
| 7288 |
CoolBarResized( Sender, BrowserCoolBar ); |
CoolBarResized( Sender, BrowserCoolBar ); |
| 7289 |
end; |
end; |
| 7290 |
|
|
|
//IDアンカー追加 |
|
|
procedure TGikoForm.IDAnchorPopup(Abody :string); |
|
|
var |
|
|
firstElement: IHTMLElement; |
|
|
document: IHTMLDocument2; |
|
|
docAll: IHTMLElementCollection; |
|
|
doc : Variant; |
|
|
nCSS : string; |
|
|
begin |
|
|
try |
|
|
document := FActiveContent.Browser.Document as IHTMLDocument2; |
|
|
|
|
|
if Assigned(document) then begin |
|
|
docAll := document.all; |
|
|
firstElement := docAll.item('idSearch', 0) as IHTMLElement; |
|
|
if (Assigned(firstElement)) then begin |
|
|
if Length(Abody) > 0 then begin |
|
|
doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2; |
|
|
nCSS := '<p id="idSearch" style="position:absolute;top:' + IntToStr(doc.Body.ScrollTop + 10) + 'px;right:5px;' // |
|
|
+ 'background-color:window; border:outset 1px infobackground; z-index:10; overflow-y:auto; border-top:none">' |
|
|
+ Abody + '</p>'; |
|
|
firstElement.outerHTML := nCSS; |
|
|
firstElement.style.visibility := 'visible'; |
|
|
end else begin |
|
|
firstElement.outerHTML := '<p id="idSearch"></p>'; |
|
|
firstElement.style.visibility := 'hidden'; |
|
|
end; |
|
|
end else if (Assigned(firstElement)) then begin |
|
|
firstElement.outerHTML := '<p id="idSearch"></p>'; |
|
|
firstElement.style.visibility := 'hidden'; |
|
|
end; |
|
|
end; |
|
|
except |
|
|
end; |
|
|
end; |
|
|
|
|
| 7291 |
//このレスあぼ〜ん |
//このレスあぼ〜ん |
| 7292 |
procedure TGikoForm.IndividualAbon(Atag, Atype : Integer); |
procedure TGikoForm.IndividualAbon(Atag, Atype : Integer); |
| 7293 |
var |
var |