{ Private \90é\8c¾ }
BbsNmList: TStringList;
BbsIdList: TStringList;
+ CmPath: String;
+ CmUrl: String;
procedure AddHistory;
function KWEncode(const KWSrc: String): String;
{$R *.dfm}
procedure TThreadSrch.FormCreate(Sender: TObject);
+var
+ PathLen: Integer;
+ Sep: Integer;
begin
BbsNmList := TStringList.Create;
BbsIdList := TStringList.Create;
ResultList.Column[2].Width := GikoSys.Setting.ThrdSrchCol3W;
ResultList.Column[3].Width := GikoSys.Setting.ThrdSrchCol4W;
CmbKW.Items.AddStrings(GikoSys.Setting.ThrdSrchHistory);
+
+ SetLength(CmPath, 1024);
+ PathLen := GetTempPath(1024, PAnsiChar(CmPath));
+ if (PathLen > 0) then begin
+ SetLength(CmPath, PathLen);
+ if (CmPath[PathLen] <> '\') then
+ CmPath := CmPath + '\';
+ CmPath := CmPath + 'gikonavi';
+ ForceDirectories(CmPath);
+ CmPath := CmPath + '\cm.html';
+ CmUrl := CmPath;
+ while (True) do begin
+ Sep := Pos('\', CmUrl);
+ if (Sep < 1) then
+ Break;
+ CmUrl[Sep] := '/';
+ end;
+ while (True) do begin
+ Sep := Pos(' ', CmUrl);
+ if (Sep < 1) then
+ Break;
+ Delete(CmUrl, Sep, 1);
+ Insert('%20', CmUrl, Sep);
+ end;
+ CmUrl := 'file://' + CmUrl;
+ end else begin
+ CmPath := '';
+ end;
end;
procedure TThreadSrch.BtnSearchClick(Sender: TObject);
Board: String;
begin
ResultList.Clear;
- CmBrowser.Navigate('about:blank');
+// CmBrowser.Navigate('about:blank');
Screen.Cursor := crHourGlass;
procedure TThreadSrch.SetCm(Content: string);
var
- doc: OleVariant;
+// doc: OleVariant;
+ Html: TStringList;
begin
+(*
if Assigned(CmBrowser.ControlInterface.Document) then begin
doc := OleVariant(CmBrowser.Document);
doc.Clear;
end else begin
MessageList.Items.Add('CM\95\\8e¦\83G\83\89\81[\94\90¶');
end;
+*)
+ if (CmPath = '') then begin
+ MessageList.Items.Add('CM\95\\8e¦\83G\83\89\81[\94\90¶\81F\88ê\8e\9e\83p\83X\8eæ\93¾\8e¸\94s');
+ end else begin
+ Html := TStringList.Create;
+ try
+ Html.Text := Content;
+ Html.SaveToFile(CmPath);
+ CmBrowser.Navigate(CmUrl);
+ except
+ on E: Exception do begin
+ MessageList.Items.Add('CM\95\\8e¦\83G\83\89\81[\94\90¶\81F' + E.Message);
+ end;
+ end;
+ Html.Free;
+ end;
end;
function TThreadSrch.HTMLEncode(const HTML: string): String;
ChkBbsClick(ChkBbs);
PnlBbsName.Caption := '';
PnlBbsId.Caption := '';
- CmBrowser.Navigate('about:blank');
+// CmBrowser.Navigate('about:blank');
PopMenuBbs.Items.Clear;
BbsNmList.Clear;