unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, XPMan, StdCtrls, iniFiles, ComCtrls, DKLang;

type
  TForm2 = class(TForm)
    XPManifest1: TXPManifest;
    Button2: TButton;
    Button3: TButton;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    DKLanguageController1: TDKLanguageController;
    procedure Button3Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Déclarations privées }
  public
    { Déclarations publiques }
  end;

var
  Form2: TForm2;

implementation

uses Main;

{$R *.dfm}

procedure TForm2.Button1Click(Sender: TObject);
begin
Form1.radiogroup1.ItemIndex:=0;
end;

procedure TForm2.Button2Click(Sender: TObject);
begin
if Label3.Caption='OK' then
begin
Form2.hide;
CreateProcess(Nil,PAnsiChar(Application.ExeName),Nil,Nil,False,0,Nil,Nil,StartInfo,ProcessInfo);
Application.Terminate;
end
else
Form2.Hide; 
end;

procedure TForm2.Button3Click(Sender: TObject);
begin
DeleteFile(ExtractFilePath(Form1.Edit14.Text)+'Aircraft\kneeboard_keys.htm');
CopyFile(Pchar(ExtractFilePath(Form1.Edit14.Text)+'Aircraft\MultiConfig_original_kneeboard_keys.htm'),Pchar(ExtractFilePath(Form1.Edit14.Text)+'Aircraft\kneeboard_keys.htm'),FALSE);
if Form2.Label3.Caption='OK' then
begin
Form2.hide;
CreateProcess(Nil,PAnsiChar(Application.ExeName),Nil,Nil,False,0,Nil,Nil,StartInfo,ProcessInfo);
Application.Terminate;
end
else
Form2.Hide;
end;

end.
