Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
ComCtrls, StdCtrls, ExtCtrls, Dialogs, FileCtrl, MMSystem,
GikoSystem, GikoUtil, Buttons, UrlMon, Menus, ImgList, OleCtrls,
- SHDocVw_TLB;
+ SHDocVw_TLB, BoardGroup;
type
TOptionDialog = class(TForm)
RloCheckBox: TCheckBox;
ReplaceulCheckBox: TCheckBox;
PopUpAbonCheckBox: TCheckBox;
- CSSWebBrowser: TWebBrowser;
+ CSSBrowser: TWebBrowser;
CSSFontCheckBox: TCheckBox;
CSSBackColorCheckBox: TCheckBox;
CSSFontButton: TButton;
private
{ Private \90é\8c¾ }
FClose: Boolean;
+ FCSSFont: TFont;
+ FCSSBackColor: TColor;
function GetMemoText(font: TFont; text: string): string;
// function GetFontText(Font: TFont; Text: string): string;
procedure SetValue;
procedure SaveSetting;
procedure SettingApply;
function CheckFolder: Boolean;
- procedure SetAbonpropertys;
+ procedure SetAbonpropertys;
+ procedure CSSSetContent(Content: string);
+ procedure CSSPreview;
public
{ Public \90é\8c¾ }
end;
Tora3URLLabel.Cursor := 5;
lblSFont.Caption := '\81\9a\8fd\97v\81\9a'#13#10#13#10
+ '\83X\83\8c\83b\83h\95\\8e¦\83G\83\8a\83A\82Ì\83t\83H\83\93\83g\95Ï\8dX\82Í\81A'#13#10
- + '\81u\83X\83^\83C\83\8b\83V\81[\83g\81v\83^\83u\82Å\90Ý\92è\8fo\97\88\82Ü\82·';
+ + '\81uCSS \82Æ\83X\83L\83\93\81v\83^\83u\82Å\90Ý\92è\8fo\97\88\82Ü\82·';
CSSCheckBoxClick(Sender);
PostTimeCheckBoxClick(Sender);
+
+ CSSBrowser.Navigate('about:blank');
+ CSSPreview;
end;
procedure TOptionDialog.FormDestroy(Sender: TObject);
EditorMemo.Color := GikoSys.Setting.EditorBackColor;
//CSS\95\\8e¦
CSSCheckBox.Checked := GikoSys.Setting.UseCSS;
+ FCSSFont := TFont.Create;
+ if (GikoSys.Setting.BrowserFontName <> '') or
+ (GikoSys.Setting.BrowserFontSize <> 0) or
+ (GikoSys.Setting.BrowserFontBold <> 0) or
+ (GikoSys.Setting.BrowserFontItalic <> 0) or
+ (GikoSys.Setting.BrowserFontColor <> -1 ) then begin
+ CSSFontCheckBox.Checked := True;
+
+ FCSSFont.Name := GikoSys.Setting.BrowserFontName;
+ FCSSFont.Size := GikoSys.Setting.BrowserFontSize;
+ FCSSFont.Style := [];
+ if GikoSys.Setting.BrowserFontBold = 1 then
+ FCSSFont.Style := FCSSFont.Style + [fsBold];
+ if GikoSys.Setting.BrowserFontItalic = 1 then
+ FCSSFont.Style := FCSSFont.Style + [fsItalic];
+ i := GikoSys.Setting.BrowserFontColor;
+ i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
+ FCSSFont.Color := i;
+ end;
+ if GikoSys.Setting.BrowserBackColor <> -1 then begin
+ CSSBackColorCheckBox.Checked := True;
+
+ i := GikoSys.Setting.BrowserBackColor;
+ i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
+ FCSSBackColor := i;
+ end;
//
//\83X\83^\83C\83\8b\83V\81[\83g\83t\83@\83C\83\8b\96¼\88ê\97\97
FileList := TStringList.Create;
except
end;
end;
+ // CSS \82Ì\83t\83H\83\93\83g\8ew\92è
+ if CSSFontCheckBox.Checked then begin
+ GikoSys.Setting.BrowserFontName := FCSSFont.Name;
+ GikoSys.Setting.BrowserFontSize := FCSSFont.Size;
+ if fsBold in FCSSFont.Style then
+ GikoSys.Setting.BrowserFontBold := 1
+ else
+ GikoSys.Setting.BrowserFontBold := -1;
+ if fsItalic in FCSSFont.Style then
+ GikoSys.Setting.BrowserFontItalic := 1
+ else
+ GikoSys.Setting.BrowserFontItalic := -1;
+ i := ColorToRGB( FCSSFont.Color );
+ GikoSys.Setting.BrowserFontColor := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
+ end else begin
+ GikoSys.Setting.BrowserFontName := '';
+ GikoSys.Setting.BrowserFontSize := 0;
+ GikoSys.Setting.BrowserFontBold := 0;
+ GikoSys.Setting.BrowserFontItalic := 0;
+ GikoSys.Setting.BrowserFontColor := -1;
+ end;
+ if CSSBackColorCheckBox.Checked then begin
+ i := ColorToRGB( FCSSBackColor );
+ GikoSys.Setting.BrowserBackColor := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
+ end else begin
+ GikoSys.Setting.BrowserBackColor := -1;
+ end;
//Mail\97\93\95\\8e¦
GikoSys.Setting.ShowMail := ShowMailCheckBox.Checked;
begin
FontDialog.Options := [fdAnsiOnly, fdEffects];
- FontDialog.Font.Assign(CabinetMemo.Font);
+ FontDialog.Font.Assign(FCSSFont);
if FontDialog.Execute then begin
FontDialog.Font.Style := FontDialog.Font.Style - [fsUnderline] - [fsStrikeout];
- {
- CabinetMemo.Font.Assign(FontDialog.Font);
- CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET);
- CabinetMemo.Font.Charset := SHIFTJIS_CHARSET;
- }
+ FCSSFont := FontDialog.Font;
end;
end;
procedure TOptionDialog.CSSBackColorButtonClick(Sender: TObject);
begin
- ColorDialog.Color := CabinetMemo.Color;
+ ColorDialog.Color := FCSSBackColor;
if ColorDialog.Execute then begin
- //CabinetMemo.Color := ColorDialog.Color;
+ FCSSBackColor := ColorDialog.Color;
end;
end;
end;
+procedure TOptionDialog.CSSSetContent(Content: string);
+var
+ doc : Variant;
+begin
+ doc := CSSBrowser.Document;
+ doc.Clear;
+ doc.open;
+ doc.charset := 'Shift_JIS';
+ doc.Write(Content);
+ doc.Close;
+end;
+
+procedure TOptionDialog.CSSPreview;
+var
+ ThreadItem: TThreadItem;
+ doc: Variant;
+ html: string;
+ sTitle: string;
+begin
+
+ {
+ ThreadItem := TThreadItem.Create;
+ ThreadItem.FileName := GikoSys.GetAppDir + 'Sample.dat';
+ ThreadItem.AllResCount := 5;
+
+ sTitle := '\83T\83\93\83v\83\8b\83v\83\8c\83r\83\85\81[';
+
+ doc := CSSBrowser.Document;
+ doc.Clear;
+
+ GikoSys.CreateHTML2( doc, ThreadItem, sTitle );
+ }
+
+end;
+
end.