| 6 |
|
|
| 7 |
|
type |
| 8 |
|
TForm_Settings = class(TForm) |
| 9 |
– |
check_filesashex: TCheckBox; |
| 9 |
|
btn_ok: TButton; |
| 10 |
|
btn_cancel: TButton; |
| 11 |
|
label_charset: TLabel; |
| 14 |
|
check_reg_dat: TCheckBox; |
| 15 |
|
check_reg_oldb: TCheckBox; |
| 16 |
|
check_reg_opf: TCheckBox; |
| 17 |
+ |
check_reg_oni: TCheckBox; |
| 18 |
|
procedure btn_cancelClick(Sender: TObject); |
| 19 |
|
procedure btn_okClick(Sender: TObject); |
| 20 |
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
| 40 |
|
var |
| 41 |
|
ftr: TFileTypeRegistration; |
| 42 |
|
begin |
| 43 |
+ |
Result := True; |
| 44 |
|
ftr := TFileTypeRegistration.Create; |
| 45 |
|
if (ftr <> nil) then |
| 46 |
|
begin |
| 62 |
|
var |
| 63 |
|
ftr: TFileTypeRegistration; |
| 64 |
|
temps: String; |
| 64 |
– |
warnmsg: String; |
| 65 |
|
begin |
| 66 |
|
Result := -1; |
| 67 |
|
ftr := TFileTypeRegistration.Create; |
| 97 |
|
var |
| 98 |
|
temps: String; |
| 99 |
|
begin |
| 100 |
– |
AppSettings.FilenumbersAsHex := check_filesashex.Checked; |
| 100 |
|
AppSettings.CharSet := StrToInt( |
| 101 |
|
MidStr(combo_charset.Items.Strings[combo_charset.ItemIndex], Pos( |
| 102 |
|
' ', combo_charset.Items.Strings[combo_charset.ItemIndex]) + 3, Length( |
| 118 |
|
end else |
| 119 |
|
RegisterExtension('.dat', 2, False); |
| 120 |
|
|
| 121 |
+ |
if check_reg_oni.Checked then |
| 122 |
+ |
begin |
| 123 |
+ |
if ExtensionRegistered('.oni', temps) then |
| 124 |
+ |
begin |
| 125 |
+ |
if temps <> 'ONI.oni' then |
| 126 |
+ |
if MessageBox(Self.Handle, PChar('.oni-files already registered to "' + |
| 127 |
+ |
temps+'". Reregister?'), PChar('Reregister?'), |
| 128 |
+ |
MB_YESNO + MB_ICONQUESTION) = ID_YES then |
| 129 |
+ |
RegisterExtension('.oni', 2, True); |
| 130 |
+ |
end else |
| 131 |
+ |
RegisterExtension('.oni', 2, True); |
| 132 |
+ |
end else |
| 133 |
+ |
RegisterExtension('.oni', 2, False); |
| 134 |
+ |
|
| 135 |
|
if check_reg_oldb.Checked then |
| 136 |
|
begin |
| 137 |
|
if ExtensionRegistered('.oldb', temps) then |
| 185 |
|
else |
| 186 |
|
check_reg_dat.Checked := False; |
| 187 |
|
|
| 188 |
+ |
if ExtensionRegistered('.oni', temps) then |
| 189 |
+ |
check_reg_dat.Checked := temps = 'ONI.oni' |
| 190 |
+ |
else |
| 191 |
+ |
check_reg_dat.Checked := False; |
| 192 |
+ |
|
| 193 |
|
if ExtensionRegistered('.oldb', temps) then |
| 194 |
|
check_reg_oldb.Checked := temps = 'ONI.oldb' |
| 195 |
|
else |
| 200 |
|
else |
| 201 |
|
check_reg_opf.Checked := False; |
| 202 |
|
|
| 185 |
– |
check_filesashex.Checked := AppSettings.FilenumbersAsHex; |
| 203 |
|
check_hideunused.Checked := AppSettings.HideUnusedData; |
| 204 |
|
|
| 205 |
|
for i := 0 to combo_charset.Items.Count - 1 do |