| 1 |
unit Option; |
| 2 |
|
| 3 |
interface |
| 4 |
|
| 5 |
uses |
| 6 |
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, |
| 7 |
ComCtrls, StdCtrls, ExtCtrls, Dialogs, FileCtrl, MMSystem, |
| 8 |
GikoSystem, GikoUtil, Buttons, UrlMon, Menus, ImgList; |
| 9 |
|
| 10 |
type |
| 11 |
TOptionDialog = class(TForm) |
| 12 |
OkBotton: TButton; |
| 13 |
CancelBotton: TButton; |
| 14 |
OptionTab: TPageControl; |
| 15 |
ConnectSheet: TTabSheet; |
| 16 |
Font1Sheet: TTabSheet; |
| 17 |
ApplyButton: TButton; |
| 18 |
FontDialog: TFontDialog; |
| 19 |
ColorDialog: TColorDialog; |
| 20 |
ReadProxyGroupBox: TGroupBox; |
| 21 |
ReadAddressLabel: TLabel; |
| 22 |
ReadPortLabel: TLabel; |
| 23 |
ReadProxyCheck: TCheckBox; |
| 24 |
ReadProxyAddressEdit: TEdit; |
| 25 |
ReadPortEdit: TEdit; |
| 26 |
ReadProxyUserIDEdit: TEdit; |
| 27 |
ReadProxyPasswordEdit: TEdit; |
| 28 |
ReadUserIDLabel: TLabel; |
| 29 |
ReadPasswordLabel: TLabel; |
| 30 |
FolderSheet: TTabSheet; |
| 31 |
FolderGroupBox: TGroupBox; |
| 32 |
LogFolderEdit: TEdit; |
| 33 |
LogFolderButton: TButton; |
| 34 |
Label1: TLabel; |
| 35 |
Label2: TLabel; |
| 36 |
ThreadSheet: TTabSheet; |
| 37 |
SoundSheet: TTabSheet; |
| 38 |
SoundEventGroupBox: TGroupBox; |
| 39 |
SoundListView: TListView; |
| 40 |
SoundReferButton: TButton; |
| 41 |
SoundFileEdit: TEdit; |
| 42 |
OpenDialog: TOpenDialog; |
| 43 |
WriteProxyGroupBox: TGroupBox; |
| 44 |
WriteAddressLabel: TLabel; |
| 45 |
WritePortLabel: TLabel; |
| 46 |
WriteUserIDLabel: TLabel; |
| 47 |
WritePasswordLabel: TLabel; |
| 48 |
WriteProxyCheck: TCheckBox; |
| 49 |
WriteProxyAddressEdit: TEdit; |
| 50 |
WritePortEdit: TEdit; |
| 51 |
WriteProxyUserIDEdit: TEdit; |
| 52 |
WriteProxyPasswordEdit: TEdit; |
| 53 |
BoardSheet: TTabSheet; |
| 54 |
GroupBox4: TGroupBox; |
| 55 |
BoardURL2chEdit: TEdit; |
| 56 |
Label13: TLabel; |
| 57 |
UserIDSheet: TTabSheet; |
| 58 |
GroupBox3: TGroupBox; |
| 59 |
Label9: TLabel; |
| 60 |
Label10: TLabel; |
| 61 |
UserIDEdit: TEdit; |
| 62 |
PasswordEdit: TEdit; |
| 63 |
SoundPlayButton: TBitBtn; |
| 64 |
AutoLoginCheckBox: TCheckBox; |
| 65 |
Tora3URLLabel: TLabel; |
| 66 |
Label12: TLabel; |
| 67 |
Label5: TLabel; |
| 68 |
GroupBox5: TGroupBox; |
| 69 |
ComboBox1: TComboBox; |
| 70 |
Label6: TLabel; |
| 71 |
Label7: TLabel; |
| 72 |
Label8: TLabel; |
| 73 |
ComboBox2: TComboBox; |
| 74 |
ComboBox3: TComboBox; |
| 75 |
Label4: TLabel; |
| 76 |
Edit1: TEdit; |
| 77 |
Button1: TButton; |
| 78 |
CabinetFontBotton: TButton; |
| 79 |
CabinetColorBotton: TButton; |
| 80 |
CabinetDefaultButton: TButton; |
| 81 |
CabinetMemo: TMemo; |
| 82 |
ListMemo: TMemo; |
| 83 |
ListFontBotton: TButton; |
| 84 |
ListColorBotton: TButton; |
| 85 |
ListDefaultBotton: TButton; |
| 86 |
HintFontButton: TButton; |
| 87 |
HintBackButton: TButton; |
| 88 |
HintDefaultButton: TButton; |
| 89 |
HintMemo: TMemo; |
| 90 |
EditorMemo: TMemo; |
| 91 |
EditorFontBotton: TButton; |
| 92 |
EditorColorBotton: TButton; |
| 93 |
EditorDefaultBotton: TButton; |
| 94 |
BrowserTabMemo: TMemo; |
| 95 |
BruwserTabFontButton: TButton; |
| 96 |
BrowserTabDefaultButton: TButton; |
| 97 |
Bevel1: TBevel; |
| 98 |
Bevel2: TBevel; |
| 99 |
GroupBox1: TGroupBox; |
| 100 |
GroupBox2: TGroupBox; |
| 101 |
URLAppCheckBox: TCheckBox; |
| 102 |
AppFolderLabel: TLabel; |
| 103 |
AppFolderEdit: TEdit; |
| 104 |
AppFolderButton: TButton; |
| 105 |
OpenMailerCheckBox: TCheckBox; |
| 106 |
TabSheet1: TTabSheet; |
| 107 |
PopupPositionRadioGroup: TRadioGroup; |
| 108 |
TabAddRadioGroup: TRadioGroup; |
| 109 |
TabSheet2: TTabSheet; |
| 110 |
GroupBox7: TGroupBox; |
| 111 |
URLDisplayCheckBox: TCheckBox; |
| 112 |
Label3: TLabel; |
| 113 |
Label11: TLabel; |
| 114 |
TabStopAddressBarCheckBox: TCheckBox; |
| 115 |
AddressHistoryCountEdit: TEdit; |
| 116 |
LinkAddCheckBox: TCheckBox; |
| 117 |
GroupBox8: TGroupBox; |
| 118 |
PreviewVisibleCheckBox: TCheckBox; |
| 119 |
PreviewSizeComboBox: TComboBox; |
| 120 |
Label14: TLabel; |
| 121 |
Label15: TLabel; |
| 122 |
PreviewWaitEdit: TEdit; |
| 123 |
Label16: TLabel; |
| 124 |
ShowMailCheckBox: TCheckBox; |
| 125 |
TabSheet3: TTabSheet; |
| 126 |
GroupBox9: TGroupBox; |
| 127 |
ThreadListIconCheckBox: TCheckBox; |
| 128 |
GroupBox6: TGroupBox; |
| 129 |
LogDeleteMessageCheckBox: TCheckBox; |
| 130 |
GroupBox10: TGroupBox; |
| 131 |
UnActivePopupCheckBox: TCheckBox; |
| 132 |
GroupBox11: TGroupBox; |
| 133 |
RecvBufferSize: TEdit; |
| 134 |
Label17: TLabel; |
| 135 |
ProxyProtocolCheckBox: TCheckBox; |
| 136 |
ProtocolCheckBox: TCheckBox; |
| 137 |
Label18: TLabel; |
| 138 |
Label19: TLabel; |
| 139 |
Bevel5: TBevel; |
| 140 |
Label20: TLabel; |
| 141 |
Label21: TLabel; |
| 142 |
Label22: TLabel; |
| 143 |
Label23: TLabel; |
| 144 |
TabSheet4: TTabSheet; |
| 145 |
lblSFont: TLabel; |
| 146 |
GroupBox12: TGroupBox; |
| 147 |
CSSCheckBox: TCheckBox; |
| 148 |
CSSListLabel: TLabel; |
| 149 |
CSSListView: TListView; |
| 150 |
GroupBox13: TGroupBox; |
| 151 |
PostTimeCheckBox: TCheckBox; |
| 152 |
Label24: TLabel; |
| 153 |
Label25: TLabel; |
| 154 |
PostTimeEdit: TEdit; |
| 155 |
PostTimeLabel: TLabel; |
| 156 |
Label27: TLabel; |
| 157 |
PutPostTimeRadioButton: TRadioButton; |
| 158 |
BackPostTimeRadioButton: TRadioButton; |
| 159 |
ResPopupBoldCheckBox: TCheckBox; |
| 160 |
NGwordSheet: TTabSheet; |
| 161 |
GroupBox14: TGroupBox; |
| 162 |
RloCheckBox: TCheckBox; |
| 163 |
ReplaceulCheckBox: TCheckBox; |
| 164 |
PopUpAbonCheckBox: TCheckBox; |
| 165 |
CutOffLabeledEdit: TLabeledEdit; |
| 166 |
Label26: TLabel; |
| 167 |
Label28: TLabel; |
| 168 |
procedure FormCreate(Sender: TObject); |
| 169 |
procedure FormDestroy(Sender: TObject); |
| 170 |
procedure ApplyButtonClick(Sender: TObject); |
| 171 |
procedure CabinetFontBottonClick(Sender: TObject); |
| 172 |
procedure CabinetColorBottonClick(Sender: TObject); |
| 173 |
procedure EditorFontBottonClick(Sender: TObject); |
| 174 |
procedure OkBottonClick(Sender: TObject); |
| 175 |
procedure ReadProxyCheckClick(Sender: TObject); |
| 176 |
procedure ListFontBottonClick(Sender: TObject); |
| 177 |
procedure ListColorBottonClick(Sender: TObject); |
| 178 |
procedure EditorColorBottonClick(Sender: TObject); |
| 179 |
procedure CabinetDefaultButtonClick(Sender: TObject); |
| 180 |
procedure ReadPortEditExit(Sender: TObject); |
| 181 |
procedure ListDefaultBottonClick(Sender: TObject); |
| 182 |
procedure EditorDefaultBottonClick(Sender: TObject); |
| 183 |
procedure HintFontButtonClick(Sender: TObject); |
| 184 |
procedure HintBackButtonClick(Sender: TObject); |
| 185 |
procedure HintDefaultButtonClick(Sender: TObject); |
| 186 |
procedure LogFolderButtonClick(Sender: TObject); |
| 187 |
procedure FormClose(Sender: TObject; var Action: TCloseAction); |
| 188 |
procedure SoundReferButtonClick(Sender: TObject); |
| 189 |
procedure SoundPlayButtonClick(Sender: TObject); |
| 190 |
procedure SoundListViewChanging(Sender: TObject; Item: TListItem; |
| 191 |
Change: TItemChange; var AllowChange: Boolean); |
| 192 |
procedure SoundFileEditChange(Sender: TObject); |
| 193 |
procedure OptionTabChange(Sender: TObject); |
| 194 |
procedure AppFolderButtonClick(Sender: TObject); |
| 195 |
procedure WriteProxyCheckClick(Sender: TObject); |
| 196 |
procedure WritePortEditExit(Sender: TObject); |
| 197 |
procedure Tora3URLLabelClick(Sender: TObject); |
| 198 |
procedure HotKeyEnter(Sender: TObject); |
| 199 |
procedure HotKeyExit(Sender: TObject); |
| 200 |
procedure URLAppCheckBoxClick(Sender: TObject); |
| 201 |
procedure BruwserTabFontButtonClick(Sender: TObject); |
| 202 |
procedure BrowserTabDefaultButtonClick(Sender: TObject); |
| 203 |
procedure AddressHistoryCountEditExit(Sender: TObject); |
| 204 |
procedure PreviewWaitEditExit(Sender: TObject); |
| 205 |
procedure RecvBufferSizeExit(Sender: TObject); |
| 206 |
procedure CSSCheckBoxClick(Sender: TObject); |
| 207 |
procedure PostTimeEditExit(Sender: TObject); |
| 208 |
procedure PostTimeCheckBoxClick(Sender: TObject); |
| 209 |
private |
| 210 |
{ Private 鐃緒申鐃緒申 } |
| 211 |
FClose: Boolean; |
| 212 |
function GetMemoText(font: TFont; text: string): string; |
| 213 |
// function GetFontText(Font: TFont; Text: string): string; |
| 214 |
procedure SetValue; |
| 215 |
procedure SaveSetting; |
| 216 |
procedure SettingApply; |
| 217 |
function CheckFolder: Boolean; |
| 218 |
procedure SetAbonpropertys; |
| 219 |
public |
| 220 |
{ Public 鐃緒申鐃緒申 } |
| 221 |
end; |
| 222 |
|
| 223 |
var |
| 224 |
OptionDialog: TOptionDialog; |
| 225 |
|
| 226 |
implementation |
| 227 |
|
| 228 |
uses |
| 229 |
Giko, Editor, Setting, ActnList; |
| 230 |
|
| 231 |
const |
| 232 |
FONT_TEXT: string = '%s %d pt'; |
| 233 |
MEMO_CABINET: string = '鐃?鐃緒申鐃?鐃?鐃?鐃?'; |
| 234 |
MEMO_THREAD: string = '鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?'; |
| 235 |
MEMO_BROWSERPOPUP: string = '鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?'; |
| 236 |
MEMO_BROWSERTAB: string = '鐃?鐃緒申鐃?鐃?鐃?鐃?'; |
| 237 |
MEMO_EDITOR: string = '鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?'; |
| 238 |
DEFAULT_FONT_NAME: string = '鐃?鐃? 鐃?鐃?鐃?鐃?鐃?'; |
| 239 |
DEFAULT_FONT_SIZE: Integer = 9; |
| 240 |
DEFAULT_TABFONT_NAME: string = '鐃?鐃? 鐃?鐃?鐃?鐃?鐃?'; |
| 241 |
DEFAULT_TABFONT_SIZE: Integer = 9; |
| 242 |
URL_TORA3: WideString = 'http://2ch.tora3.net/'; |
| 243 |
|
| 244 |
{$R *.DFM} |
| 245 |
|
| 246 |
procedure TOptionDialog.FormCreate(Sender: TObject); |
| 247 |
begin |
| 248 |
FClose := True; |
| 249 |
|
| 250 |
OptionTab.ActivePage := ConnectSheet; |
| 251 |
SetValue; |
| 252 |
|
| 253 |
CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET); |
| 254 |
ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD); |
| 255 |
HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP); |
| 256 |
BrowserTabMemo.Text := GetMemoText(BrowserTabMemo.Font, MEMO_BROWSERTAB); |
| 257 |
EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR); |
| 258 |
|
| 259 |
Tora3URLLabel.Cursor := 5; |
| 260 |
lblSFont.Caption := '鐃緒申鐃?鐃?鐃緒申'#13#10#13#10 |
| 261 |
+ '鐃?鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃?'#13#10 |
| 262 |
+ '鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申'; |
| 263 |
CSSCheckBoxClick(Sender); |
| 264 |
PostTimeCheckBoxClick(Sender); |
| 265 |
end; |
| 266 |
|
| 267 |
procedure TOptionDialog.FormDestroy(Sender: TObject); |
| 268 |
begin |
| 269 |
sndPlaySound(nil, SND_ASYNC); |
| 270 |
end; |
| 271 |
|
| 272 |
procedure TOptionDialog.OkBottonClick(Sender: TObject); |
| 273 |
begin |
| 274 |
FClose := True; |
| 275 |
RecvBufferSizeExit(Sender); |
| 276 |
ReadPortEditExit(Sender); |
| 277 |
WritePortEditExit(Sender); |
| 278 |
AddressHistoryCountEditExit(Sender); |
| 279 |
PreviewWaitEditExit(Sender); |
| 280 |
PostTimeEditExit(Sender); |
| 281 |
|
| 282 |
if not CheckFolder then begin |
| 283 |
FClose := False; |
| 284 |
Exit; |
| 285 |
end; |
| 286 |
SaveSetting; |
| 287 |
SettingApply; |
| 288 |
SetAbonpropertys; |
| 289 |
end; |
| 290 |
|
| 291 |
procedure TOptionDialog.ApplyButtonClick(Sender: TObject); |
| 292 |
begin |
| 293 |
RecvBufferSizeExit(Sender); |
| 294 |
ReadPortEditExit(Sender); |
| 295 |
WritePortEditExit(Sender); |
| 296 |
AddressHistoryCountEditExit(Sender); |
| 297 |
PreviewWaitEditExit(Sender); |
| 298 |
PostTimeEditExit(Sender); |
| 299 |
|
| 300 |
if not CheckFolder then begin |
| 301 |
FClose := False; |
| 302 |
Exit; |
| 303 |
end; |
| 304 |
SaveSetting; |
| 305 |
SettingApply; |
| 306 |
SetAbonpropertys; |
| 307 |
FClose := False; |
| 308 |
end; |
| 309 |
|
| 310 |
//function TOptionDialog.GetFontText(Font: TFont; Text: string): string; |
| 311 |
//begin |
| 312 |
// result := Format(Text, [Font.Name, Font.Size]); |
| 313 |
//end; |
| 314 |
|
| 315 |
function TOptionDialog.GetMemoText(font: TFont; text: string): string; |
| 316 |
var |
| 317 |
s: string; |
| 318 |
begin |
| 319 |
s := ''; |
| 320 |
if font <> nil then |
| 321 |
s := Format(FONT_TEXT, [Font.Name, Font.Size]) + #13#10; |
| 322 |
Result := s + text; |
| 323 |
end; |
| 324 |
|
| 325 |
//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申 |
| 326 |
procedure TOptionDialog.CabinetFontBottonClick(Sender: TObject); |
| 327 |
begin |
| 328 |
FontDialog.Options := [fdAnsiOnly, fdEffects]; |
| 329 |
FontDialog.Font.Assign(CabinetMemo.Font); |
| 330 |
if FontDialog.Execute then begin |
| 331 |
FontDialog.Font.Style := FontDialog.Font.Style - [fsUnderline] - [fsStrikeout]; |
| 332 |
CabinetMemo.Font.Assign(FontDialog.Font); |
| 333 |
CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET); |
| 334 |
CabinetMemo.Font.Charset := SHIFTJIS_CHARSET; |
| 335 |
end; |
| 336 |
end; |
| 337 |
|
| 338 |
//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申 |
| 339 |
procedure TOptionDialog.CabinetColorBottonClick(Sender: TObject); |
| 340 |
begin |
| 341 |
ColorDialog.Color := CabinetMemo.Color; |
| 342 |
if ColorDialog.Execute then begin |
| 343 |
CabinetMemo.Color := ColorDialog.Color; |
| 344 |
end; |
| 345 |
end; |
| 346 |
|
| 347 |
//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申 |
| 348 |
procedure TOptionDialog.CabinetDefaultButtonClick(Sender: TObject); |
| 349 |
begin |
| 350 |
CabinetMemo.Font.Name := DEFAULT_FONT_NAME; |
| 351 |
CabinetMemo.Font.Size := DEFAULT_FONT_SIZE; |
| 352 |
CabinetMemo.Font.Color := clWindowText; |
| 353 |
CabinetMemo.Font.Style := []; |
| 354 |
CabinetMemo.Color := clWindow; |
| 355 |
CabinetMemo.Text := GetMemoText(CabinetMemo.Font, MEMO_CABINET); |
| 356 |
end; |
| 357 |
|
| 358 |
//鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申 |
| 359 |
procedure TOptionDialog.ListFontBottonClick(Sender: TObject); |
| 360 |
begin |
| 361 |
FontDialog.Options := [fdAnsiOnly, fdEffects]; |
| 362 |
FontDialog.Font.Assign(ListMemo.Font); |
| 363 |
if FontDialog.Execute then begin |
| 364 |
ListMemo.Font.Assign(FontDialog.Font); |
| 365 |
ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD); |
| 366 |
ListMemo.Font.Charset := SHIFTJIS_CHARSET; |
| 367 |
end; |
| 368 |
end; |
| 369 |
|
| 370 |
//鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申 |
| 371 |
procedure TOptionDialog.ListColorBottonClick(Sender: TObject); |
| 372 |
begin |
| 373 |
ColorDialog.Color := ListMemo.Color; |
| 374 |
if ColorDialog.Execute then begin |
| 375 |
ListMemo.Color := ColorDialog.Color; |
| 376 |
end; |
| 377 |
end; |
| 378 |
|
| 379 |
//鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申 |
| 380 |
procedure TOptionDialog.ListDefaultBottonClick(Sender: TObject); |
| 381 |
begin |
| 382 |
ListMemo.Font.Name := DEFAULT_FONT_NAME; |
| 383 |
ListMemo.Font.Size := DEFAULT_FONT_SIZE; |
| 384 |
ListMemo.Font.Color := clWindowText; |
| 385 |
ListMemo.Font.Style := []; |
| 386 |
ListMemo.Color := clWindow; |
| 387 |
ListMemo.Text := GetMemoText(ListMemo.Font, MEMO_THREAD); |
| 388 |
end; |
| 389 |
|
| 390 |
//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申 |
| 391 |
procedure TOptionDialog.HintFontButtonClick(Sender: TObject); |
| 392 |
begin |
| 393 |
FontDialog.Options := [fdAnsiOnly, fdEffects]; |
| 394 |
FontDialog.Font.Assign(HintMemo.Font); |
| 395 |
if FontDialog.Execute then begin |
| 396 |
HintMemo.Font.Assign(FontDialog.Font); |
| 397 |
HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP); |
| 398 |
HintMemo.Font.Charset := SHIFTJIS_CHARSET; |
| 399 |
end; |
| 400 |
end; |
| 401 |
|
| 402 |
//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申 |
| 403 |
procedure TOptionDialog.HintBackButtonClick(Sender: TObject); |
| 404 |
begin |
| 405 |
ColorDialog.Color := HintMemo.Color; |
| 406 |
if ColorDialog.Execute then begin |
| 407 |
HintMemo.Color := ColorDialog.Color; |
| 408 |
end; |
| 409 |
end; |
| 410 |
|
| 411 |
//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申 |
| 412 |
procedure TOptionDialog.HintDefaultButtonClick(Sender: TObject); |
| 413 |
begin |
| 414 |
HintMemo.Font.Name := DEFAULT_FONT_NAME; |
| 415 |
HintMemo.Font.Size := DEFAULT_FONT_SIZE; |
| 416 |
HintMemo.Font.Color := clWindowText; |
| 417 |
HintMemo.Font.Style := []; |
| 418 |
HintMemo.Color := clInfoBk; |
| 419 |
HintMemo.Text := GetMemoText(HintMemo.Font, MEMO_BROWSERPOPUP); |
| 420 |
end; |
| 421 |
|
| 422 |
//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申 |
| 423 |
procedure TOptionDialog.BruwserTabFontButtonClick(Sender: TObject); |
| 424 |
begin |
| 425 |
FontDialog.Options := [fdAnsiOnly]; |
| 426 |
FontDialog.Font.Assign(BrowserTabMemo.Font); |
| 427 |
if FontDialog.Execute then begin |
| 428 |
BrowserTabMemo.Font.Assign(FontDialog.Font); |
| 429 |
BrowserTabMemo.Text := GetMemoText(FontDialog.Font, MEMO_BROWSERTAB); |
| 430 |
BrowserTabMemo.Font.Charset := SHIFTJIS_CHARSET; |
| 431 |
end; |
| 432 |
end; |
| 433 |
|
| 434 |
//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申 |
| 435 |
procedure TOptionDialog.BrowserTabDefaultButtonClick(Sender: TObject); |
| 436 |
begin |
| 437 |
BrowserTabMemo.Font.Name := DEFAULT_TABFONT_NAME; |
| 438 |
BrowserTabMemo.Font.Size := DEFAULT_TABFONT_SIZE; |
| 439 |
BrowserTabMemo.Font.Color := clWindowText; |
| 440 |
BrowserTabMemo.Font.Style := []; |
| 441 |
BrowserTabMemo.Color := clBtnFace; |
| 442 |
BrowserTabMemo.Text := GetMemoText(BrowserTabMemo.Font, MEMO_BROWSERTAB); |
| 443 |
end; |
| 444 |
|
| 445 |
//鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申 |
| 446 |
procedure TOptionDialog.EditorFontBottonClick(Sender: TObject); |
| 447 |
begin |
| 448 |
FontDialog.Options := [fdAnsiOnly, fdEffects]; |
| 449 |
FontDialog.Font.Assign(EditorMemo.Font); |
| 450 |
if FontDialog.Execute then begin |
| 451 |
EditorMemo.Font.Assign(FontDialog.Font); |
| 452 |
EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR); |
| 453 |
EditorMemo.Font.Charset := SHIFTJIS_CHARSET; |
| 454 |
end; |
| 455 |
end; |
| 456 |
|
| 457 |
//鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申 |
| 458 |
procedure TOptionDialog.EditorColorBottonClick(Sender: TObject); |
| 459 |
begin |
| 460 |
ColorDialog.Color := EditorMemo.Font.Color; |
| 461 |
if ColorDialog.Execute then begin |
| 462 |
EditorMemo.Color := ColorDialog.Color; |
| 463 |
end; |
| 464 |
end; |
| 465 |
|
| 466 |
//鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃緒申 |
| 467 |
procedure TOptionDialog.EditorDefaultBottonClick(Sender: TObject); |
| 468 |
begin |
| 469 |
EditorMemo.Font.Name := DEFAULT_FONT_NAME; |
| 470 |
EditorMemo.Font.Size := DEFAULT_FONT_SIZE; |
| 471 |
EditorMemo.Font.Color := clWindowText; |
| 472 |
EditorMemo.Font.Style := []; |
| 473 |
EditorMemo.Color := clWindow; |
| 474 |
EditorMemo.Text := GetMemoText(EditorMemo.Font, MEMO_EDITOR); |
| 475 |
end; |
| 476 |
|
| 477 |
procedure TOptionDialog.SetValue; |
| 478 |
var |
| 479 |
i: Integer; |
| 480 |
Item: TListItem; |
| 481 |
s: string; |
| 482 |
idx: Integer; |
| 483 |
FileList: TStringList; |
| 484 |
begin |
| 485 |
//鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃? |
| 486 |
RecvBufferSize.Text := IntToStr(Gikosys.Setting.RecvBufferSize); |
| 487 |
//HTTP1.1鐃?鐃? |
| 488 |
ProtocolCheckBox.Checked := GikoSys.Setting.Protocol; |
| 489 |
//鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申HTTP1.1鐃?鐃? |
| 490 |
ProxyProtocolCheckBox.Checked := Gikosys.Setting.ProxyProtocol; |
| 491 |
|
| 492 |
//鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃? |
| 493 |
ReadProxyCheck.Checked := GikoSys.Setting.ReadProxy; |
| 494 |
ReadProxyCheckClick(nil); |
| 495 |
ReadProxyAddressEdit.Text := GikoSys.Setting.ReadProxyAddress; |
| 496 |
ReadPortEdit.Text := IntToStr(GikoSys.Setting.ReadProxyPort); |
| 497 |
ReadProxyUserIDEdit.Text := GikoSys.Setting.ReadProxyUserID; |
| 498 |
ReadProxyPasswordEdit.Text := GikoSys.Setting.ReadProxyPassword; |
| 499 |
//鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃?鐃? |
| 500 |
WriteProxyCheck.Checked := GikoSys.Setting.WriteProxy; |
| 501 |
WriteProxyCheckClick(nil); |
| 502 |
WriteProxyAddressEdit.Text := GikoSys.Setting.WriteProxyAddress; |
| 503 |
WritePortEdit.Text := IntToStr(GikoSys.Setting.WriteProxyPort); |
| 504 |
WriteProxyUserIDEdit.Text := GikoSys.Setting.WriteProxyUserID; |
| 505 |
WriteProxyPasswordEdit.Text := GikoSys.Setting.WriteProxyPassword; |
| 506 |
//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃? |
| 507 |
CabinetMemo.Font.Name := GikoSys.Setting.CabinetFontName; |
| 508 |
CabinetMemo.Font.Size := GikoSys.Setting.CabinetFontSize; |
| 509 |
CabinetMemo.Font.Color := GikoSys.Setting.CabinetFontColor; |
| 510 |
CabinetMemo.Color := GikoSys.Setting.CabinetBackColor; |
| 511 |
//鐃?鐃緒申鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃緒申鐃? |
| 512 |
ListMemo.Font.Name := GikoSys.Setting.ListFontName; |
| 513 |
ListMemo.Font.Size := GikoSys.Setting.ListFontSize; |
| 514 |
ListMemo.Font.Color := GikoSys.Setting.ListFontColor; |
| 515 |
ListMemo.Color := GikoSys.Setting.ListBackColor; |
| 516 |
//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃? |
| 517 |
HintMemo.Font.Name := GikoSys.Setting.HintFontName; |
| 518 |
HintMemo.Font.Size := GikoSys.Setting.HintFontSize; |
| 519 |
HintMemo.Font.Color := GikoSys.Setting.HintFontColor; |
| 520 |
HintMemo.Color := GikoSys.Setting.HintBackColor; |
| 521 |
//鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃? |
| 522 |
BrowserTabMemo.Font.Name := GikoSys.Setting.BrowserTabFontName; |
| 523 |
BrowserTabMemo.Font.Size := GikoSys.Setting.BrowserTabFontSize; |
| 524 |
BrowserTabMemo.Font.Style := []; |
| 525 |
if GikoSys.Setting.BrowserTabFontBold then |
| 526 |
BrowserTabMemo.Font.Style := BrowserTabMemo.Font.Style + [fsBold]; |
| 527 |
if GikoSys.Setting.BrowserTabFontItalic then |
| 528 |
BrowserTabMemo.Font.Style := BrowserTabMemo.Font.Style + [fsItalic]; |
| 529 |
//鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃緒申鐃? |
| 530 |
EditorMemo.Font.Name := GikoSys.Setting.EditorFontName; |
| 531 |
EditorMemo.Font.Size := GikoSys.Setting.EditorFontSize; |
| 532 |
EditorMemo.Font.Color := GikoSys.Setting.EditorFontColor; |
| 533 |
EditorMemo.Color := GikoSys.Setting.EditorBackColor; |
| 534 |
//CSS鐃?鐃緒申 |
| 535 |
CSSCheckBox.Checked := GikoSys.Setting.UseCSS; |
| 536 |
// |
| 537 |
//鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申鐃緒申 |
| 538 |
FileList := TStringList.Create; |
| 539 |
try |
| 540 |
GikoSys.GetFileList(GikoSys.GetStyleSheetDir, '*.css', FileList, True, True); |
| 541 |
|
| 542 |
Idx := Length(GikoSys.GetStyleSheetDir); |
| 543 |
for i := 0 to FileList.Count - 1 do |
| 544 |
FileList[i] := Copy(FileList[i], Idx + 1, Length(FileList[i])); |
| 545 |
FileList.Sort; |
| 546 |
for i := 0 to FileList.Count - 1 do begin |
| 547 |
//s := ExtractFileName(FileList[i]); |
| 548 |
if LowerCase(FileList[i]) = 'default.css' then |
| 549 |
Item := CSSListView.Items.Insert(0) |
| 550 |
else |
| 551 |
Item := CSSListView.Items.Add; |
| 552 |
Item.Caption := ChangeFileExt(FileList[i], ''); |
| 553 |
if LowerCase(FileList[i]) = LowerCase(GikoSys.Setting.CSSFileName) then |
| 554 |
Item.Selected := True; |
| 555 |
end; |
| 556 |
finally |
| 557 |
FileList.Free; |
| 558 |
end; |
| 559 |
if (CSSListView.ItemIndex = -1) and (CSSListView.Items.Count > 0) then |
| 560 |
CSSListView.Items[0].Selected := True; |
| 561 |
|
| 562 |
//Mail鐃緒申鐃?鐃緒申 |
| 563 |
ShowMailCheckBox.Checked := GikoSys.Setting.ShowMail; |
| 564 |
//鐃?鐃?鐃緒申鐃緒申鐃緒申鐃? |
| 565 |
TabAddRadioGroup.ItemIndex := Ord(GikoSys.Setting.BrowserTabAppend); |
| 566 |
//鐃緒申鐃?鐃?URL |
| 567 |
BoardURL2chEdit.Text := GikoSys.Setting.BoardURL2ch; |
| 568 |
//鐃?鐃緒申 |
| 569 |
UserIDEdit.Text := GikoSys.Setting.UserID; |
| 570 |
PasswordEdit.Text := GikoSys.Setting.Password; |
| 571 |
AutoLoginCheckBox.Checked := GikoSys.Setting.AutoLogin; |
| 572 |
//鐃緒申鐃?鐃?鐃?鐃緒申鐃? |
| 573 |
if GikoSys.Setting.NewLogFolder = '' then |
| 574 |
LogFolderEdit.Text := GikoSys.Setting.LogFolder |
| 575 |
else |
| 576 |
LogFolderEdit.Text := GikoSys.Setting.NewLogFolder; |
| 577 |
//鐃?鐃?鐃緒申鐃? |
| 578 |
for i := 0 to GikoSys.Setting.GetSoundCount - 1 do begin |
| 579 |
Item := SoundListView.Items.Add; |
| 580 |
Item.Caption := GikoSys.Setting.SoundViewName[i]; |
| 581 |
if FileExists(GikoSys.Setting.SoundFileName[i]) then |
| 582 |
Item.SubItems.Add(GikoSys.Setting.SoundFileName[i]) |
| 583 |
else |
| 584 |
Item.SubItems.Add(''); |
| 585 |
end; |
| 586 |
//URL鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申 |
| 587 |
URLAppCheckBox.Checked := GikoSys.Setting.URLApp; |
| 588 |
URLAppCheckBoxClick(nil); |
| 589 |
AppFolderEdit.Text := GikoSys.Setting.URLAppFile; |
| 590 |
|
| 591 |
//mailto鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申 |
| 592 |
OpenMailerCheckBox.Checked := GikoSys.Setting.OpenMailer; |
| 593 |
|
| 594 |
//鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃? |
| 595 |
LogDeleteMessageCheckBox.Checked := GikoSys.Setting.DeleteMsg; |
| 596 |
|
| 597 |
//鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃? |
| 598 |
case GikoSys.Setting.PopupPosition of |
| 599 |
gppRightTop: PopupPositionRadioGroup.ItemIndex := 0; |
| 600 |
gppRight: PopupPositionRadioGroup.ItemIndex := 1; |
| 601 |
gppRightBottom: PopupPositionRadioGroup.ItemIndex := 2; |
| 602 |
gppTop: PopupPositionRadioGroup.ItemIndex := 3; |
| 603 |
gppCenter: PopupPositionRadioGroup.ItemIndex := 4; |
| 604 |
gppBottom: PopupPositionRadioGroup.ItemIndex := 5; |
| 605 |
gppLeftTop: PopupPositionRadioGroup.ItemIndex := 6; |
| 606 |
gppLeft: PopupPositionRadioGroup.ItemIndex := 7; |
| 607 |
gppLeftBottom: PopupPositionRadioGroup.ItemIndex := 8; |
| 608 |
end; |
| 609 |
|
| 610 |
//鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申 |
| 611 |
UnActivePopupCheckBox.Checked := GikoSys.Setting.UnActivePopup; |
| 612 |
//鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申 |
| 613 |
ResPopupBoldCheckBox.Checked := GikoSys.Setting.ResPopupHeaderBold; |
| 614 |
|
| 615 |
//鐃?鐃?鐃緒申鐃?鐃?鐃? |
| 616 |
URLDisplayCheckBox.Checked := GikoSys.Setting.URLDisplay; |
| 617 |
TabStopAddressBarCheckBox.Checked := GikoSys.Setting.AddressBarTabStop; |
| 618 |
LinkAddCheckBox.Checked := GikoSys.Setting.LinkAddAddressBar; |
| 619 |
AddressHistoryCountEdit.Text := IntToStr(GikoSys.Setting.AddressHistoryCount); |
| 620 |
|
| 621 |
//HTML鐃?鐃緒申鐃?鐃緒申鐃? |
| 622 |
PreviewVisibleCheckBox.Checked := GikoSys.Setting.PreviewVisible; |
| 623 |
PreviewWaitEdit.Text := IntToStr(GikoSys.Setting.PreviewWait); |
| 624 |
PreviewSizeComboBox.ItemIndex := 2; |
| 625 |
case GikoSys.Setting.PreviewSize of |
| 626 |
gpsXLarge: PreviewSizeComboBox.ItemIndex := 4; |
| 627 |
gpsLarge: PreviewSizeComboBox.ItemIndex := 3; |
| 628 |
gpsMedium: PreviewSizeComboBox.ItemIndex := 2; |
| 629 |
gpsSmall: PreviewSizeComboBox.ItemIndex := 1; |
| 630 |
gpsXSmall: PreviewSizeComboBox.ItemIndex := 0; |
| 631 |
end; |
| 632 |
|
| 633 |
//鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申 |
| 634 |
ThreadListIconCheckBox.Checked := GikoSys.Setting.ListIconVisible; |
| 635 |
|
| 636 |
//鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申 |
| 637 |
PostTimeCheckBox.Checked := GikoSys.Setting.UseMachineTime; |
| 638 |
PostTimeEdit.Text := IntToStr(GikoSys.Setting.TimeAdjustSec); |
| 639 |
if GikoSys.Setting.TimeAdjust then |
| 640 |
PutPostTimeRadioButton.Checked := True |
| 641 |
else |
| 642 |
BackPostTimeRadioButton.Checked := True; |
| 643 |
//鐃緒申鐃緒申鐃?鐃緒申 |
| 644 |
RloCheckBox.Checked := GikoSys.Setting.AbonDeleterlo; |
| 645 |
ReplaceulCheckBox.Checked := GikoSys.Setting.AbonReplaceul; |
| 646 |
PopUpAbonCheckBox.Checked := GikoSys.Setting.PopUpAbon; |
| 647 |
CutOfflabeledEdit.Text := IntToStr(GikoSys.Setting.AbonCutoffNum); |
| 648 |
|
| 649 |
end; |
| 650 |
|
| 651 |
procedure TOptionDialog.SaveSetting; |
| 652 |
var |
| 653 |
i: Integer; |
| 654 |
// Item: TListItem; |
| 655 |
begin |
| 656 |
//鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃? |
| 657 |
Gikosys.Setting.RecvBufferSize := StrToInt(RecvBufferSize.Text); |
| 658 |
//HTTP1.1鐃?鐃? |
| 659 |
GikoSys.Setting.Protocol := ProtocolCheckBox.Checked; |
| 660 |
//鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申HTTP1.1鐃?鐃? |
| 661 |
Gikosys.Setting.ProxyProtocol := ProxyProtocolCheckBox.Checked; |
| 662 |
|
| 663 |
GikoSys.Setting.ReadProxy := ReadProxyCheck.Checked; |
| 664 |
GikoSys.Setting.ReadProxyAddress := ReadProxyAddressEdit.Text; |
| 665 |
GikoSys.Setting.ReadProxyPort := StrToInt(ReadPortEdit.Text); |
| 666 |
GikoSys.Setting.ReadProxyUserID := ReadProxyUserIDEdit.Text; |
| 667 |
GikoSys.Setting.ReadProxyPassword := ReadProxyPasswordEdit.Text; |
| 668 |
|
| 669 |
GikoSys.Setting.WriteProxy := WriteProxyCheck.Checked; |
| 670 |
GikoSys.Setting.WriteProxyAddress := WriteProxyAddressEdit.Text; |
| 671 |
GikoSys.Setting.WriteProxyPort := StrToInt(WritePortEdit.Text); |
| 672 |
GikoSys.Setting.WriteProxyUserID := WriteProxyUserIDEdit.Text; |
| 673 |
GikoSys.Setting.WriteProxyPassword := WriteProxyPasswordEdit.Text; |
| 674 |
|
| 675 |
GikoSys.Setting.CabinetFontName := CabinetMemo.Font.Name; |
| 676 |
GikoSys.Setting.CabinetFontSize := CabinetMemo.Font.Size; |
| 677 |
GikoSys.Setting.CabinetFontColor := CabinetMemo.Font.Color; |
| 678 |
GikoSys.Setting.CabinetBackColor := CabinetMemo.Color; |
| 679 |
|
| 680 |
GikoSys.Setting.ListFontName := ListMemo.Font.Name; |
| 681 |
GikoSys.Setting.ListFontSize := ListMemo.Font.Size; |
| 682 |
GikoSys.Setting.ListFontColor := ListMemo.Font.Color; |
| 683 |
GikoSys.Setting.ListBackColor := ListMemo.Color; |
| 684 |
|
| 685 |
GikoSys.Setting.HintFontName := HintMemo.Font.Name; |
| 686 |
GikoSys.Setting.HintFontSize := HintMemo.Font.Size; |
| 687 |
GikoSys.Setting.HintFontColor := HintMemo.Font.Color; |
| 688 |
GikoSys.Setting.HintBackColor := HintMemo.Color; |
| 689 |
|
| 690 |
GikoSys.Setting.BrowserTabFontName := BrowserTabMemo.Font.Name; |
| 691 |
GikoSys.Setting.BrowserTabFontSize := BrowserTabMemo.Font.Size; |
| 692 |
|
| 693 |
GikoSys.Setting.EditorFontName := EditorMemo.Font.Name; |
| 694 |
GikoSys.Setting.EditorFontSize := EditorMemo.Font.Size; |
| 695 |
GikoSys.Setting.EditorFontColor := EditorMemo.Font.Color; |
| 696 |
GikoSys.Setting.EditorBackColor := EditorMemo.Color; |
| 697 |
//CSS鐃?鐃緒申 |
| 698 |
GikoSys.Setting.UseCSS := CSSCheckBox.Checked; |
| 699 |
//CSS鐃?鐃?鐃?鐃緒申鐃緒申 |
| 700 |
GikoSys.Setting.CSSFileName := 'default.css'; |
| 701 |
if CSSListView.Items.Count > 0 then begin |
| 702 |
try |
| 703 |
GikoSys.Setting.CSSFileName := CSSListView.Items[CSSListView.ItemIndex].Caption + '.css' |
| 704 |
except |
| 705 |
end; |
| 706 |
end; |
| 707 |
|
| 708 |
//Mail鐃緒申鐃?鐃緒申 |
| 709 |
GikoSys.Setting.ShowMail := ShowMailCheckBox.Checked; |
| 710 |
|
| 711 |
GikoSys.Setting.BrowserTabAppend := TGikoTabAppend(TabAddRadioGroup.ItemIndex); |
| 712 |
|
| 713 |
GikoSys.Setting.BoardURL2ch := BoardURL2chEdit.Text; |
| 714 |
|
| 715 |
GikoSys.Setting.UserID := UserIDEdit.Text; |
| 716 |
GikoSys.Setting.Password := PasswordEdit.Text; |
| 717 |
GikoSys.Setting.AutoLogin := AutoLoginCheckBox.Checked; |
| 718 |
|
| 719 |
GikoSys.Setting.URLApp := URLAppCheckBox.Checked; |
| 720 |
GikoSys.Setting.URLAppFile := AppFolderEdit.Text; |
| 721 |
|
| 722 |
GikoSys.Setting.OpenMailer := OpenMailerCheckBox.Checked; |
| 723 |
GikoSys.Setting.DeleteMsg := LogDeleteMessageCheckBox.Checked; |
| 724 |
|
| 725 |
//鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃? |
| 726 |
case PopupPositionRadioGroup.ItemIndex of |
| 727 |
0: GikoSys.Setting.PopupPosition := gppRightTop; |
| 728 |
1: GikoSys.Setting.PopupPosition := gppRight; |
| 729 |
2: GikoSys.Setting.PopupPosition := gppRightBottom; |
| 730 |
3: GikoSys.Setting.PopupPosition := gppTop; |
| 731 |
4: GikoSys.Setting.PopupPosition := gppCenter; |
| 732 |
5: GikoSys.Setting.PopupPosition := gppBottom; |
| 733 |
6: GikoSys.Setting.PopupPosition := gppLeftTop; |
| 734 |
7: GikoSys.Setting.PopupPosition := gppLeft; |
| 735 |
8: GikoSys.Setting.PopupPosition := gppLeftBottom; |
| 736 |
end; |
| 737 |
|
| 738 |
//鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申 |
| 739 |
GikoSys.Setting.UnActivePopup := UnActivePopupCheckBox.Checked; |
| 740 |
//鐃緒申鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申 |
| 741 |
GikoSys.Setting.ResPopupHeaderBold := ResPopupBoldCheckBox.Checked; |
| 742 |
|
| 743 |
//鐃?鐃?鐃緒申鐃?鐃?鐃? |
| 744 |
GikoSys.Setting.URLDisplay := URLDisplayCheckBox.Checked; |
| 745 |
GikoSys.Setting.AddressBarTabStop := TabStopAddressBarCheckBox.Checked; |
| 746 |
GikoSys.Setting.LinkAddAddressBar := LinkAddCheckBox.Checked; |
| 747 |
if GikoSys.IsNumeric(AddressHistoryCountEdit.Text) then |
| 748 |
GikoSys.Setting.AddressHistoryCount := StrToInt(AddressHistoryCountEdit.Text) |
| 749 |
else |
| 750 |
GikoSys.Setting.AddressHistoryCount := 100; |
| 751 |
|
| 752 |
//HTML鐃?鐃緒申鐃?鐃緒申鐃? |
| 753 |
GikoSys.Setting.PreviewVisible := PreviewVisibleCheckBox.Checked; |
| 754 |
if GikoSys.IsNumeric(PreviewWaitEdit.Text) then |
| 755 |
GikoSys.Setting.PreviewWait := StrToInt(PreviewWaitEdit.Text) |
| 756 |
else |
| 757 |
GikoSys.Setting.PreviewWait := 500; |
| 758 |
case PreviewSizeComboBox.ItemIndex of |
| 759 |
0: GikoSys.Setting.PreviewSize := gpsXSmall; |
| 760 |
1: GikoSys.Setting.PreviewSize := gpsSmall; |
| 761 |
2: GikoSys.Setting.PreviewSize := gpsMedium; |
| 762 |
3: GikoSys.Setting.PreviewSize := gpsLarge; |
| 763 |
4: GikoSys.Setting.PreviewSize := gpsXLarge; |
| 764 |
end; |
| 765 |
|
| 766 |
//鐃?鐃緒申鐃?鐃?鐃緒申鐃緒申鐃?鐃?鐃?鐃?鐃?鐃緒申 |
| 767 |
GikoSys.Setting.ListIconVisible := ThreadListIconCheckBox.Checked; |
| 768 |
|
| 769 |
//鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申鐃緒申鐃?鐃?鐃緒申鐃緒申 |
| 770 |
GikoSys.Setting.UseMachineTime := PostTimeCheckBox.Checked; |
| 771 |
if GikoSys.IsNumeric(PostTimeEdit.Text) then |
| 772 |
GikoSys.Setting.TimeAdjustSec := StrToInt(PostTimeEdit.Text) |
| 773 |
else |
| 774 |
GikoSys.Setting.TimeAdjustSec := 0; |
| 775 |
GikoSys.Setting.TimeAdjust := PutPostTimeRadioButton.Checked; |
| 776 |
|
| 777 |
|
| 778 |
GikoSys.Setting.WriteSystemSettingFile; |
| 779 |
// GikoForm.SetBrowserTabState; |
| 780 |
|
| 781 |
if LogFolderEdit.Text <> '' then begin |
| 782 |
GikoSys.Setting.NewLogFolder := LogFolderEdit.Text; |
| 783 |
GikoSys.Setting.WriteFolderSettingFile; |
| 784 |
end; |
| 785 |
|
| 786 |
for i := 0 to SoundListView.Items.Count - 1 do begin |
| 787 |
if FileExists(SoundListView.Items[i].SubItems[0]) then |
| 788 |
GikoSys.Setting.SoundFileName[i] := SoundListView.Items[i].SubItems[0] |
| 789 |
else |
| 790 |
GikoSys.Setting.SoundFileName[i] := ''; |
| 791 |
end; |
| 792 |
|
| 793 |
//鐃緒申鐃緒申鐃?鐃緒申 |
| 794 |
GikoSys.Setting.AbonDeleterlo := RloCheckBox.Checked; |
| 795 |
GikoSys.Setting.AbonReplaceul := ReplaceulCheckBox.Checked; |
| 796 |
GikoSys.Setting.PopUpAbon := PopUpAbonCheckBox.Checked; |
| 797 |
try |
| 798 |
if StrToInt(CutOfflabeledEdit.Text) > 0 then begin |
| 799 |
GikoSys.Setting.AbonCutoffNum := StrToInt(CutOfflabeledEdit.Text); |
| 800 |
end else begin |
| 801 |
GikoSys.Setting.AbonCutoffNum := 0; |
| 802 |
end; |
| 803 |
except |
| 804 |
GikoSys.Setting.AbonCutoffNum := 0; |
| 805 |
end; |
| 806 |
end; |
| 807 |
|
| 808 |
procedure TOptionDialog.SettingApply; |
| 809 |
var |
| 810 |
i: Integer; |
| 811 |
begin |
| 812 |
GikoForm.TreeView.Items.BeginUpdate; |
| 813 |
GikoForm.ListView.Items.BeginUpdate; |
| 814 |
try |
| 815 |
GikoForm.TreeView.Font.Name := GikoSys.Setting.CabinetFontName; |
| 816 |
GikoForm.TreeView.Font.Size := GikoSys.Setting.CabinetFontSize; |
| 817 |
GikoForm.TreeView.Font.Color := GikoSys.Setting.CabinetFontColor; |
| 818 |
GikoForm.TreeView.Color := GikoSys.Setting.CabinetBackColor; |
| 819 |
|
| 820 |
GikoForm.ListView.Font.Name := GikoSys.Setting.ListFontName; |
| 821 |
GikoForm.ListView.Font.Size := GikoSys.Setting.ListFontSize; |
| 822 |
GikoForm.ListView.Font.Color := GikoSys.Setting.ListFontColor; |
| 823 |
GikoForm.ListView.Color := GikoSys.Setting.ListBackColor; |
| 824 |
|
| 825 |
GikoForm.BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName; |
| 826 |
GikoForm.BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize; |
| 827 |
// GikoForm.BrowserTab.Height := (GikoSys.Setting.BrowserTabFontSize * 2) + 1; |
| 828 |
// GikoForm.BrowserBottomPanel.Height := GikoForm.BrowserTab.Height; |
| 829 |
|
| 830 |
for i := 0 to Screen.CustomFormCount - 1 do begin |
| 831 |
if TObject(Screen.CustomForms[i]) is TEditorForm then begin |
| 832 |
TEditorForm(Screen.CustomForms[i]).SetFont; |
| 833 |
end; |
| 834 |
end; |
| 835 |
|
| 836 |
finally |
| 837 |
GikoForm.TreeView.Items.EndUpdate; |
| 838 |
GikoForm.ListView.Items.EndUpdate; |
| 839 |
end; |
| 840 |
|
| 841 |
//鐃?鐃?鐃緒申鐃?鐃?鐃? |
| 842 |
for i := GikoForm.AddressComboBox.Items.Count - 1 downto 0 do begin |
| 843 |
if GikoSys.Setting.AddressHistoryCount >= GikoForm.AddressComboBox.Items.Count then |
| 844 |
Break; |
| 845 |
GikoForm.AddressComboBox.Items.Delete(i); |
| 846 |
end; |
| 847 |
GikoForm.AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop; |
| 848 |
end; |
| 849 |
|
| 850 |
procedure TOptionDialog.ReadProxyCheckClick(Sender: TObject); |
| 851 |
begin |
| 852 |
ReadProxyAddressEdit.Enabled := ReadProxyCheck.Checked; |
| 853 |
ReadPortEdit.Enabled := ReadProxyCheck.Checked; |
| 854 |
ReadProxyUserIDEdit.Enabled := ReadProxyCheck.Checked; |
| 855 |
ReadProxyPasswordEdit.Enabled := ReadProxyCheck.Checked; |
| 856 |
|
| 857 |
ReadAddressLabel.Enabled := ReadProxyCheck.Checked; |
| 858 |
ReadPortLabel.Enabled := ReadProxyCheck.Checked; |
| 859 |
ReadUserIDLabel.Enabled := ReadProxyCheck.Checked; |
| 860 |
ReadPasswordLabel.Enabled := ReadProxyCheck.Checked; |
| 861 |
end; |
| 862 |
|
| 863 |
procedure TOptionDialog.ReadPortEditExit(Sender: TObject); |
| 864 |
begin |
| 865 |
if not GikoSys.IsNumeric(ReadPortEdit.Text) then |
| 866 |
ReadPortEdit.Text := '0'; |
| 867 |
end; |
| 868 |
|
| 869 |
procedure TOptionDialog.LogFolderButtonClick(Sender: TObject); |
| 870 |
var |
| 871 |
Root: WideString; |
| 872 |
Dir: string; |
| 873 |
begin |
| 874 |
Root := ''; |
| 875 |
if SelectDirectory('鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃?鐃緒申', Root, Dir) then begin |
| 876 |
LogFolderEdit.Text := Dir; |
| 877 |
end; |
| 878 |
end; |
| 879 |
|
| 880 |
function TOptionDialog.CheckFolder: Boolean; |
| 881 |
begin |
| 882 |
if Trim(LogFolderEdit.Text) = '' then |
| 883 |
LogFolderEdit.Text := ExtractFilePath(Application.ExeName) + 'Log'; |
| 884 |
|
| 885 |
if DirectoryExists(LogFolderEdit.Text) then begin |
| 886 |
Result := True; |
| 887 |
end else begin |
| 888 |
if MsgBox(Handle, '鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?', '鐃?鐃?鐃?鐃?', MB_YESNO or MB_ICONQUESTION) = IDYES then begin |
| 889 |
//鐃?鐃?鐃緒申鐃?鐃緒申鐃緒申鐃緒申 |
| 890 |
try |
| 891 |
GikoSys.ForceDirectoriesEx(LogFolderEdit.Text); |
| 892 |
Result := True |
| 893 |
except |
| 894 |
MsgBox(Handle, '鐃緒申鐃?鐃?鐃?鐃緒申鐃?鐃緒申鐃?鐃緒申鐃緒申鐃?鐃緒申鐃緒申鐃緒申鐃?', '鐃?鐃緒申鐃?', MB_OK or MB_ICONSTOP); |
| 895 |
OptionTab.ActivePage := FolderSheet; |
| 896 |
LogFolderEdit.SetFocus; |
| 897 |
Result := False; |
| 898 |
end; |
| 899 |
end else |
| 900 |
Result := False; |
| 901 |
end; |
| 902 |
end; |
| 903 |
|
| 904 |
procedure TOptionDialog.FormClose(Sender: TObject; var Action: TCloseAction); |
| 905 |
begin |
| 906 |
if not FClose then |
| 907 |
Action := caNone; |
| 908 |
FClose := True; |
| 909 |
end; |
| 910 |
|
| 911 |
procedure TOptionDialog.SoundReferButtonClick(Sender: TObject); |
| 912 |
begin |
| 913 |
OpenDialog.Filter := '鐃?鐃?鐃緒申鐃? (*.wav)|*.wav|鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申 (*.*)|*.*'; |
| 914 |
sndPlaySound(nil, SND_ASYNC); |
| 915 |
if OpenDialog.Execute then begin |
| 916 |
SoundFileEdit.Text := OpenDialog.FileName; |
| 917 |
end; |
| 918 |
end; |
| 919 |
|
| 920 |
procedure TOptionDialog.SoundPlayButtonClick(Sender: TObject); |
| 921 |
begin |
| 922 |
if not FileExists(SoundFileEdit.Text) then begin |
| 923 |
MsgBox(Handle, '鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申鐃緒申鐃緒申', '鐃?鐃緒申鐃?', MB_ICONSTOP or MB_OK); |
| 924 |
SoundFileEdit.Text := ''; |
| 925 |
Exit; |
| 926 |
end; |
| 927 |
if not sndPlaySound(PChar(SoundFileEdit.Text), SND_ASYNC or SND_NOSTOP) then begin |
| 928 |
sndPlaySound(nil, SND_ASYNC); |
| 929 |
end; |
| 930 |
end; |
| 931 |
|
| 932 |
procedure TOptionDialog.SoundListViewChanging(Sender: TObject; |
| 933 |
Item: TListItem; Change: TItemChange; var AllowChange: Boolean); |
| 934 |
begin |
| 935 |
if Item.SubItems.Count > 0 then |
| 936 |
SoundFileEdit.Text := Item.SubItems[0]; |
| 937 |
end; |
| 938 |
|
| 939 |
procedure TOptionDialog.SoundFileEditChange(Sender: TObject); |
| 940 |
var |
| 941 |
Item: TListItem; |
| 942 |
begin |
| 943 |
sndPlaySound(nil, SND_ASYNC); |
| 944 |
Item := SoundListView.Selected; |
| 945 |
if Item = nil then Exit; |
| 946 |
|
| 947 |
if FileExists(SoundFileEdit.Text) then |
| 948 |
Item.SubItems[0] := SoundFileEdit.Text; |
| 949 |
if Trim(SoundFileEdit.Text) = '' then |
| 950 |
Item.SubItems[0] := ''; |
| 951 |
end; |
| 952 |
|
| 953 |
procedure TOptionDialog.OptionTabChange(Sender: TObject); |
| 954 |
begin |
| 955 |
sndPlaySound(nil, SND_ASYNC); |
| 956 |
end; |
| 957 |
|
| 958 |
procedure TOptionDialog.AppFolderButtonClick(Sender: TObject); |
| 959 |
begin |
| 960 |
OpenDialog.Filter := '鐃緒申鐃?鐃?鐃?鐃?鐃緒申 (*.exe)|*.exe|鐃緒申鐃緒申鐃緒申鐃緒申鐃?鐃?鐃?鐃緒申 (*.*)|*.*'; |
| 961 |
if OpenDialog.Execute then |
| 962 |
AppFolderEdit.Text := OpenDialog.FileName; |
| 963 |
end; |
| 964 |
|
| 965 |
procedure TOptionDialog.WriteProxyCheckClick(Sender: TObject); |
| 966 |
begin |
| 967 |
WriteProxyAddressEdit.Enabled := WriteProxyCheck.Checked; |
| 968 |
WritePortEdit.Enabled := WriteProxyCheck.Checked; |
| 969 |
WriteProxyUserIDEdit.Enabled := WriteProxyCheck.Checked; |
| 970 |
WriteProxyPasswordEdit.Enabled := WriteProxyCheck.Checked; |
| 971 |
|
| 972 |
WriteAddressLabel.Enabled := WriteProxyCheck.Checked; |
| 973 |
WritePortLabel.Enabled := WriteProxyCheck.Checked; |
| 974 |
WriteUserIDLabel.Enabled := WriteProxyCheck.Checked; |
| 975 |
WritePasswordLabel.Enabled := WriteProxyCheck.Checked; |
| 976 |
end; |
| 977 |
|
| 978 |
procedure TOptionDialog.WritePortEditExit(Sender: TObject); |
| 979 |
begin |
| 980 |
if not GikoSys.IsNumeric(WritePortEdit.Text) then |
| 981 |
WritePortEdit.Text := '0'; |
| 982 |
end; |
| 983 |
|
| 984 |
procedure TOptionDialog.Tora3URLLabelClick(Sender: TObject); |
| 985 |
begin |
| 986 |
GikoSys.OpenBrowser(URL_TORA3, gbtAuto); |
| 987 |
end; |
| 988 |
|
| 989 |
procedure TOptionDialog.HotKeyEnter(Sender: TObject); |
| 990 |
begin |
| 991 |
OkBotton.Default := False; |
| 992 |
CancelBotton.Cancel := False; |
| 993 |
end; |
| 994 |
|
| 995 |
procedure TOptionDialog.HotKeyExit(Sender: TObject); |
| 996 |
begin |
| 997 |
OkBotton.Default := True; |
| 998 |
CancelBotton.Cancel := True; |
| 999 |
end; |
| 1000 |
|
| 1001 |
procedure TOptionDialog.URLAppCheckBoxClick(Sender: TObject); |
| 1002 |
begin |
| 1003 |
AppFolderLabel.Enabled := URLAppCheckBox.Checked; |
| 1004 |
AppFolderEdit.Enabled := URLAppCheckBox.Checked; |
| 1005 |
AppFolderButton.Enabled := URLAppCheckBox.Checked; |
| 1006 |
end; |
| 1007 |
|
| 1008 |
procedure TOptionDialog.AddressHistoryCountEditExit(Sender: TObject); |
| 1009 |
begin |
| 1010 |
if not GikoSys.IsNumeric(AddressHistoryCountEdit.Text) then |
| 1011 |
AddressHistoryCountEdit.Text := '100'; |
| 1012 |
end; |
| 1013 |
|
| 1014 |
procedure TOptionDialog.PreviewWaitEditExit(Sender: TObject); |
| 1015 |
begin |
| 1016 |
if not GikoSys.IsNumeric(PreviewWaitEdit.Text) then |
| 1017 |
PreviewWaitEdit.Text := '500'; |
| 1018 |
if StrToInt(PreviewWaitEdit.Text) < 500 then |
| 1019 |
PreviewWaitEdit.Text := '500'; |
| 1020 |
if StrToInt(PreviewWaitEdit.Text) > 9999 then |
| 1021 |
PreviewWaitEdit.Text := '9999'; |
| 1022 |
end; |
| 1023 |
|
| 1024 |
procedure TOptionDialog.RecvBufferSizeExit(Sender: TObject); |
| 1025 |
begin |
| 1026 |
if not GikoSys.IsNumeric(RecvBufferSize.Text) then |
| 1027 |
RecvBufferSize.Text := '4096'; |
| 1028 |
if StrToInt(RecvBufferSize.Text) < 256 then |
| 1029 |
RecvBufferSize.Text := '4096'; |
| 1030 |
end; |
| 1031 |
|
| 1032 |
procedure TOptionDialog.CSSCheckBoxClick(Sender: TObject); |
| 1033 |
begin |
| 1034 |
CSSListLabel.Enabled := CSSCheckBox.Checked; |
| 1035 |
CSSListView.Enabled := CSSCheckBox.Checked; |
| 1036 |
end; |
| 1037 |
|
| 1038 |
procedure TOptionDialog.PostTimeEditExit(Sender: TObject); |
| 1039 |
begin |
| 1040 |
if not GikoSys.IsNumeric(PostTimeEdit.Text) then |
| 1041 |
PostTimeEdit.Text := '0'; |
| 1042 |
end; |
| 1043 |
|
| 1044 |
procedure TOptionDialog.PostTimeCheckBoxClick(Sender: TObject); |
| 1045 |
begin |
| 1046 |
PostTimeLabel.Enabled := PostTimeCheckBox.Checked; |
| 1047 |
PostTimeEdit.Enabled := PostTimeCheckBox.Checked; |
| 1048 |
PutPostTimeRadioButton.Enabled := PostTimeCheckBox.Checked; |
| 1049 |
BackPostTimeRadioButton.Enabled := PostTimeCheckBox.Checked; |
| 1050 |
end; |
| 1051 |
procedure TOptionDialog.SetAbonpropertys; |
| 1052 |
begin |
| 1053 |
//鐃緒申鐃緒申鐃?鐃緒申 |
| 1054 |
GikoSys.FAbon.Deleterlo := RloCheckBox.Checked; |
| 1055 |
GikoSys.FAbon.Replaceul := ReplaceulCheckBox.Checked; |
| 1056 |
GikoSys.FAbon.AbonPopupRes := PopUpAbonCheckBox.Checked; |
| 1057 |
try |
| 1058 |
if StrToInt(CutOfflabeledEdit.Text) > 0 then begin |
| 1059 |
GikoSys.FAbon.SetCutoffNum(StrToInt(CutOfflabeledEdit.Text)); |
| 1060 |
end else begin |
| 1061 |
GikoSys.FAbon.SetCutoffNum(0); |
| 1062 |
end; |
| 1063 |
except |
| 1064 |
GikoSys.FAbon.SetCutoffNum(0); |
| 1065 |
end; |
| 1066 |
|
| 1067 |
end; |
| 1068 |
end. |
| 1069 |
|