| 1299 |
Writeln('============================================================'); |
Writeln('============================================================'); |
| 1300 |
{$ENDIF} |
{$ENDIF} |
| 1301 |
FStartUp := true; |
FStartUp := true; |
| 1302 |
|
LockWindowUpdate(Self.Handle); |
| 1303 |
//Application.OnDeactivate := AppFormDeactivate; |
//Application.OnDeactivate := AppFormDeactivate; |
| 1304 |
Self.OnDeactivate := AppFormDeactivate; |
Self.OnDeactivate := AppFormDeactivate; |
| 1305 |
Application.HookMainWindow(Hook); |
Application.HookMainWindow(Hook); |
| 1746 |
if GikoSys.Setting.GestureEnabled then |
if GikoSys.Setting.GestureEnabled then |
| 1747 |
MouseGesture.SetHook( Handle ); |
MouseGesture.SetHook( Handle ); |
| 1748 |
|
|
| 1749 |
//2ch言語読み出し |
//2ch言語読み出し |
| 1750 |
if GikoSys.Setting.GengoSupport then begin |
if GikoSys.Setting.GengoSupport then begin |
| 1751 |
if GikoSys.Setting.Gengo = nil then |
if GikoSys.Setting.Gengo = nil then |
| 1752 |
GikoSys.Setting.Gengo := TStringList.Create; |
GikoSys.Setting.Gengo := TStringList.Create; |
| 1753 |
if FileExists(GikoSys.GetConfigDir + 'language.ini') then |
if FileExists(GikoSys.GetConfigDir + 'language.ini') then |
| 1754 |
GikoSys.Setting.Gengo.LoadFromFile(GikoSys.GetConfigDir + 'language.ini') |
GikoSys.Setting.Gengo.LoadFromFile(GikoSys.GetConfigDir + 'language.ini') |
| 1755 |
else |
else |
| 1756 |
GikoSys.Setting.GengoSupport := false; |
GikoSys.Setting.GengoSupport := false; |
| 1757 |
end; |
end; |
| 1758 |
|
LockWindowUpdate(0); |
| 1759 |
end; |
end; |
| 1760 |
|
|
| 1761 |
// CoolBar の設定を変数に保存 |
// CoolBar の設定を変数に保存 |
| 2014 |
GikoSys.Setting.ResRange := FResRangeMenuSelect; |
GikoSys.Setting.ResRange := FResRangeMenuSelect; |
| 2015 |
except |
except |
| 2016 |
end; |
end; |
| 2017 |
|
if WindowState <> wsNormal then |
| 2018 |
|
WindowState := wsNormal; |
| 2019 |
|
SaveCoolBarSettings; |
| 2020 |
|
try |
| 2021 |
|
GikoSys.Setting.WriteWindowSettingFile; |
| 2022 |
|
GikoSys.Setting.WriteNameMailSettingFile; |
| 2023 |
|
except |
| 2024 |
|
end; |
| 2025 |
// リアルタイムに保存されるので、また、ウィンドウサイズが CoolBar より |
// リアルタイムに保存されるので、また、ウィンドウサイズが CoolBar より |
| 2026 |
// 小さくなっているときに保存すると値が上書きされてしまうのでここでは保存しない |
// 小さくなっているときに保存すると値が上書きされてしまうのでここでは保存しない |
| 2027 |
|
|
| 2028 |
// ↑FormDestroy中に移動したので、ここで保存しないといけないと思う。(もじゅ 2004/04/09) |
// ↑FormDestroy中に移動したので、ここで保存しないといけないと思う。(もじゅ 2004/04/09) |
| 2029 |
// CoolBar 保存 |
// CoolBar 保存 |
| 2030 |
//if (GikoForm.WindowState <> wsMinimized) and (GikoForm.WindowState <> wsMaximized) then |
//if (GikoForm.WindowState <> wsMinimized) and (GikoForm.WindowState <> wsMaximized) then |
| 2031 |
SaveCoolBarSettings; |
|
|
|
|
|
try |
|
|
GikoSys.Setting.WriteWindowSettingFile; |
|
|
GikoSys.Setting.WriteNameMailSettingFile; |
|
|
except |
|
|
end; |
|
| 2032 |
|
|
| 2033 |
//お気に入り保存 |
//お気に入り保存 |
| 2034 |
try |
try |
| 2037 |
FavoriteDM.Clear; |
FavoriteDM.Clear; |
| 2038 |
except |
except |
| 2039 |
end; |
end; |
| 2040 |
|
LockWindowUpdate(Self.Handle); |
| 2041 |
try |
try |
| 2042 |
//タブクローズ |
//タブクローズ |
| 2043 |
tmpBool := GikoSys.Setting.ShowDialogForAllTabClose; |
tmpBool := GikoSys.Setting.ShowDialogForAllTabClose; |
| 2044 |
GikoSys.Setting.ShowDialogForAllTabClose := false; |
GikoSys.Setting.ShowDialogForAllTabClose := false; |
| 2045 |
AllTabCloseAction.Execute; |
AllTabCloseAction.Execute; |
| 2046 |
GikoSys.Setting.ShowDialogForAllTabClose := tmpBool; |
GikoSys.Setting.ShowDialogForAllTabClose := tmpBool; |
| 2047 |
except |
except |
| 2048 |
end; |
end; |
| 2049 |
try |
try |
|
LockWindowUpdate(Self.Handle); |
|
| 2050 |
for i := FBrowsers.Count - 1 downto 0 do begin |
for i := FBrowsers.Count - 1 downto 0 do begin |
| 2051 |
TWebBrowser(FBrowsers[i]).Free; |
TWebBrowser(FBrowsers[i]).Free; |
| 2052 |
end; |
end; |
| 2064 |
end; |
end; |
| 2065 |
except |
except |
| 2066 |
end; |
end; |
| 2067 |
LockWindowUpdate(0); |
|
| 2068 |
try |
try |
| 2069 |
TreeView.Items.BeginUpdate; |
TreeView.Items.BeginUpdate; |
| 2070 |
TreeView.Items.GetFirstNode.Free; |
TreeView.Items.GetFirstNode.Free; |
| 2156 |
end; |
end; |
| 2157 |
except |
except |
| 2158 |
end; |
end; |
| 2159 |
|
LockWindowUpdate(0); |
| 2160 |
end; |
end; |
| 2161 |
|
|
| 2162 |
//キャビネット×ボタンクリック |
//キャビネット×ボタンクリック |
| 2569 |
|
|
| 2570 |
ListView.StateImages := nil; |
ListView.StateImages := nil; |
| 2571 |
|
|
| 2572 |
if BBS = nil then Exit; |
if (BBS = nil) or (BBS.Count <= 0) or (Item = nil) |
| 2573 |
if BBS.Count <= 0 then Exit; |
or (Item.Index >= BBS.Count) or (ListView.Items.Count = 0) |
| 2574 |
if Item = nil then Exit; |
or (not (BBS.Items[Item.index] is TCategory)) then Exit; |
| 2575 |
if Item.Index >= BBS.Count then Exit; |
//if BBS.Count <= 0 then Exit; |
| 2576 |
if ListView.Items.Count = 0 then Exit; |
//if Item = nil then Exit; |
| 2577 |
|
//if Item.Index >= BBS.Count then Exit; |
| 2578 |
|
//if ListView.Items.Count = 0 then Exit; |
| 2579 |
|
|
| 2580 |
if not (BBS.Items[Item.index] is TCategory) then Exit; |
//if not (BBS.Items[Item.index] is TCategory) then Exit; |
| 2581 |
Category := TCategory(BBS.Items[Item.index]); |
Category := TCategory(BBS.Items[Item.index]); |
| 2582 |
|
|
| 2583 |
if Category = nil then Exit; |
if Category = nil then Exit; |
| 2597 |
|
|
| 2598 |
ListView.StateImages := nil; |
ListView.StateImages := nil; |
| 2599 |
|
|
| 2600 |
if Category = nil then Exit; |
if (Category = nil) or (Category.Count <= 0) or (Item = nil) |
| 2601 |
if Category.Count <= 0 then Exit; |
or (Item.Index >= Category.Count) or (ListView.Items.Count = 0) |
| 2602 |
if Item = nil then Exit; |
or (not (Category.Items[Item.Index] is TBoard)) then Exit; |
| 2603 |
if Item.Index >= Category.Count then Exit; |
//if Category.Count <= 0 then Exit; |
| 2604 |
if ListView.Items.Count = 0 then Exit; |
//if Item = nil then Exit; |
| 2605 |
|
//if Item.Index >= Category.Count then Exit; |
| 2606 |
|
//if ListView.Items.Count = 0 then Exit; |
| 2607 |
|
|
| 2608 |
if not (Category.Items[Item.Index] is TBoard) then Exit; |
//if not (Category.Items[Item.Index] is TBoard) then Exit; |
| 2609 |
Board := TBoard(Category.Items[Item.Index]); |
Board := TBoard(Category.Items[Item.Index]); |
| 2610 |
|
|
| 2611 |
if Board = nil then Exit; |
if Board = nil then Exit; |
| 2617 |
|
|
| 2618 |
if Item.SubItems.Count <> ListView.Columns.Count then begin |
if Item.SubItems.Count <> ListView.Columns.Count then begin |
| 2619 |
Item.SubItems.Clear; |
Item.SubItems.Clear; |
| 2620 |
|
Item.SubItems.Capacity := GikoSys.Setting.CategoryColumnOrder.Count; |
| 2621 |
for i := GikoSys.Setting.CategoryColumnOrder.Count - 1 downto 1 do |
for i := GikoSys.Setting.CategoryColumnOrder.Count - 1 downto 1 do |
| 2622 |
Item.SubItems.Add(''); |
Item.SubItems.Add(''); |
| 2623 |
end; |
end; |
| 2670 |
end; |
end; |
| 2671 |
|
|
| 2672 |
// if Board = nil then Exit; |
// if Board = nil then Exit; |
| 2673 |
if BoardCnt <= 0 then Exit; |
if (BoardCnt <= 0) or (Item = nil) or (Item.Index > BoardCnt) |
| 2674 |
if Item = nil then Exit; |
or (ListView.Items.Count = 0) or (not (Board.Items[Item.Index] is TThreadItem)) then Exit; |
| 2675 |
if Item.Index > BoardCnt then Exit; |
//if Item = nil then Exit; |
| 2676 |
if ListView.Items.Count = 0 then Exit; |
//if Item.Index > BoardCnt then Exit; |
| 2677 |
|
//if ListView.Items.Count = 0 then Exit; |
| 2678 |
|
|
| 2679 |
// if not (Board.Items[Item.Index] is TThreadItem) then Exit; |
// if not (Board.Items[Item.Index] is TThreadItem) then Exit; |
| 2680 |
|
|
| 2701 |
|
|
| 2702 |
if Item.SubItems.Count <> ListView.Columns.Count then begin |
if Item.SubItems.Count <> ListView.Columns.Count then begin |
| 2703 |
Item.SubItems.Clear; |
Item.SubItems.Clear; |
| 2704 |
|
Item.SubItems.Capacity := GikoSys.Setting.BoardColumnOrder.Count; |
| 2705 |
for i := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 1 do |
for i := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 1 do |
| 2706 |
Item.SubItems.Add(''); |
Item.SubItems.Add(''); |
| 2707 |
end; |
end; |
| 3331 |
if FHint <> nil then begin |
if FHint <> nil then begin |
| 3332 |
FHint.ReleaseHandle; |
FHint.ReleaseHandle; |
| 3333 |
FHint.ClearAllRes; |
FHint.ClearAllRes; |
|
// FHint.Free; |
|
|
// FHint := nil; |
|
| 3334 |
end; |
end; |
| 3335 |
if FPreviewBrowser <> nil then |
if FPreviewBrowser <> nil then |
| 3336 |
ShowWindow(FPreviewBrowser.Handle, SW_HIDE); |
ShowWindow(FPreviewBrowser.Handle, SW_HIDE); |
| 3675 |
end; |
end; |
| 3676 |
end; |
end; |
| 3677 |
|
|
|
{procedure TGikoForm.BrowserTabChange(Sender: TObject); |
|
|
var |
|
|
index: Integer; |
|
|
ThreadItem: TThreadItem; |
|
|
begin |
|
|
ThreadItem := GetActiveContent; |
|
|
if ThreadItem <> nil then begin |
|
|
SetContent(ThreadItem); |
|
|
end; |
|
|
end;} |
|
| 3678 |
|
|
| 3679 |
function TGikoForm.InsertBrowserTab( |
function TGikoForm.InsertBrowserTab( |
| 3680 |
ThreadItem : TThreadItem; |
ThreadItem : TThreadItem; |
| 4772 |
|
|
| 4773 |
while (BrowserRecord.Browser.ReadyState <> READYSTATE_COMPLETE) and |
while (BrowserRecord.Browser.ReadyState <> READYSTATE_COMPLETE) and |
| 4774 |
(BrowserRecord.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin |
(BrowserRecord.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin |
| 4775 |
|
Sleep(1); |
| 4776 |
Application.ProcessMessages; |
Application.ProcessMessages; |
| 4777 |
end; |
end; |
| 4778 |
|
|
| 6375 |
end; |
end; |
| 6376 |
end; |
end; |
| 6377 |
|
|
|
{ ShiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001); |
|
|
CtrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001); |
|
|
|
|
|
if ShiftDown then |
|
|
Memo1.Lines.Add('ShiftDown'); |
|
|
if CtrlDown then |
|
|
Memo1.Lines.Add('CtrlDown'); |
|
|
|
|
|
if (IHTMLDocument2(TWebBrowser(Sender).Document).activeElement <> nil) then begin |
|
|
Text := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerText; |
|
|
Url := IHTMLDocument2(TWebBrowser(Sender).Document).activeElement.Get_outerHTML; |
|
|
|
|
|
|
|
|
|
|
|
URL := GetHRefText(URL); |
|
|
|
|
|
ParseURI(URL, Protocol, Host, path, Document, Port, Bookmark); |
|
|
|
|
|
b := Parse2chURL(path, document, bbs, num); |
|
|
memo1.Lines.Add('bbs: ' + bbs); |
|
|
memo1.Lines.Add('key: ' + num); |
|
|
if b then |
|
|
Memo1.Lines.Add('Parse2chURL: True') |
|
|
else |
|
|
Memo1.Lines.Add('Parse2chURL: False'); |
|
|
|
|
|
// AppPath := 'C:\Borland\Projects\Test\TestBrowser\TestBrowser.exe'; |
|
|
|
|
|
end;} |
|
| 6378 |
end; |
end; |
| 6379 |
|
|
| 6380 |
procedure TGikoForm.ListSplitterMoved(Sender: TObject); |
procedure TGikoForm.ListSplitterMoved(Sender: TObject); |
| 8954 |
else |
else |
| 8955 |
Handled := False; |
Handled := False; |
| 8956 |
|
|
| 8957 |
{ |
end; |
|
// if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin |
|
|
// TWebBrowser の Handle と比較しても一致しないので座標で TWebBrowser かどうか判定 |
|
|
browserPos.X := 0; |
|
|
browserPos.Y := 0; |
|
|
Windows.ClientToScreen( Browser.Handle, browserPos ); |
|
|
if (Longword(Mouse.CursorPos.X - browserPos.X) >= Browser.Width) |
|
|
or (Longword(Mouse.CursorPos.Y - browserPos.Y) >= Browser.Height) |
|
|
or (Longword(Mouse.CursorPos.Y - browserPos.Y) < 0) |
|
|
or (Longword(Mouse.CursorPos.Y - browserPos.Y) < 0) then begin |
|
|
// or not FActiveContent.Browser.Focused then |
|
|
// TWebBrowser は無限ループするのでそれ以外ならコントロールに送信 |
|
|
if (Wnd <> BrowserToolBar.Handle) and (Wnd <> BrowserNameToolBar.Handle) then |
|
|
SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (Mouse.CursorPos.X shl 16) or Mouse.CursorPos.Y ) |
|
|
else |
|
|
Handled := False; |
|
|
end else begin |
|
|
Handled := False; |
|
|
end; |
|
|
// end else begin |
|
|
// SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (MousePos.X shl 16) or MousePos.Y ); |
|
|
// end; |
|
|
} end; |
|
| 8958 |
end; |
end; |
| 8959 |
end; |
end; |
| 8960 |
|
|