unit LogSetupFrm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls,
  ULObju, ExeLogu, CheckListFrm;

type
  TLogSetupForm = class(TForm)
    LogFilePeriod: TRadioGroup;
    GroupBox1: TGroupBox;
    DebugLog: TCheckBox;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
  private
    { Private declarations }
    procedure FormToComp;
    procedure CompToForm;
  public
    { Public declarations }
  end;

var
  LogSetupForm: TLogSetupForm;

implementation

{$R *.dfm}

procedure TLogSetupForm.Button1Click(Sender: TObject);
begin
  FormToComp;
end;

procedure TLogSetupForm.FormActivate(Sender: TObject);
begin
  CompToForm;
end;

procedure TLogSetupForm.FormToComp;
begin
  DebugLogging := DebugLog.Checked;
  ExeLog.FileNameTimeKind := TFileNameTimeKind(LogFilePeriod.ItemIndex);
end;

procedure TLogSetupForm.CompToForm;
begin
  DebugLog.Checked := DebugLogging;
  LogFilePeriod.ItemIndex := ord(ExeLog.FileNameTimeKind);
end;

end.
