unit UOptions;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Spin;

type
  TFOptions = class(TForm)
    SpinEdit1: TSpinEdit;
    Label1: TLabel;
    Label2: TLabel;
    GroupBox1: TGroupBox;
    CBMenu: TCheckBox;
    CBPanels: TCheckBox;
    ComboBox1: TComboBox;
    Button1: TButton;
    Button2: TButton;
    CBFile: TCheckBox;
    procedure ComboBox1Change(Sender: TObject);
    procedure SpinEdit1Change(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FOptions: TFOptions;

implementation

uses UMenu, UMSetup;

{$R *.DFM}

procedure TFOptions.ComboBox1Change(Sender: TObject);
begin
 Form1.RichEdit1.DefAttributes.Name := ComboBox1.Text;
 Form1.ComboBox1.ItemIndex := ComboBox1.ItemIndex;
end;

procedure TFOptions.SpinEdit1Change(Sender: TObject);
begin
 Form1.RichEdit1.SelAttributes.Size := SpinEdit1.Value;
end;

procedure TFOptions.Button1Click(Sender: TObject);
var F:File;
begin
 // Удаление файла .ini
 AssignFile(F, SFileIni);
 Erase(F);
 ShowMessage('Вызовите снова программу,' +
          #13'чтобы она восприняла'#13'установки по умолчанию');
 Application.Terminate;         
end;

procedure TFOptions.Button2Click(Sender: TObject);
begin
 Close;
end;

end.
