unit Unit2;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls,
FMX.Layouts, FMX.ListBox, Registry,
WinApi.Windows;
type
TForm2 =
class(TForm)
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure WriteReg(lang:
String);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form2: TForm2;
implementation
uses
Unit1;
{$R *.fmx}
procedure Tform2.WriteReg(lang:
string);
var reg: TRegistry;
begin
reg := TRegistry.Create;
try
reg.RootKey := HKEY_CURRENT_USER;
reg.OpenKey('
Software\Lukas\multilang', true);
reg.WriteString('
lang', lang);
finally
end;
end;
procedure TForm2.Button1Click(Sender: TObject);
begin
WriteReg('
en');
ShowMessage('
The software must restart. It will hapen automatical when you click OK.');
Application.Terminate;
end;
procedure TForm2.Button2Click(Sender: TObject);
begin
WriteReg('
de');
ShowMessage('
Die Software muss neugestartet werden, dies wird passieren nach dem Sie OK geklickt haben.');
Application.Terminate;
end;
end.