unit _frmFirstStart;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, cxGraphics, cxLookAndFeels,
  cxLookAndFeelPainters, Vcl.Menus, cxControls, cxContainer, cxEdit, cxCheckBox,
  Vcl.StdCtrls, cxButtons, siComp, cxTextEdit, cxMaskEdit, cxDropDownEdit;

type
  TfrmFirstStart = class(TForm)
    cxButton1: TcxButton;
    chkShowAgain: TcxCheckBox;
    Label1: TLabel;
    siLang: TsiLang;
    Label2: TLabel;
    Label3: TLabel;
    cbLanguages: TcxComboBox;
    procedure FormShow(Sender: TObject);
    procedure cxButton1Click(Sender: TObject);
    procedure cbLanguagesPropertiesChange(Sender: TObject);
  private
    FShowAgain: Boolean;
    procedure SetShowAgain(const Value: Boolean);
    { Private-Deklarationen }
  public
    property ShowAgain: Boolean read FShowAgain write SetShowAgain;
  end;

var
  frmFirstStart: TfrmFirstStart;

implementation

{$R *.dfm}

uses _frmSmartWindows;

procedure TfrmFirstStart.cbLanguagesPropertiesChange(Sender: TObject);
begin
  frmSmartWindows.SetLanguage(cbLanguages.Text);
end;

procedure TfrmFirstStart.cxButton1Click(Sender: TObject);
begin
  ShowAgain := chkShowAgain.Checked;
  Close;
end;

procedure TfrmFirstStart.FormShow(Sender: TObject);
begin
  Top := frmSmartWindows.Top;
  Left := frmSmartWindows.Left;
  Height := frmSmartWindows.Height;
  Width := frmSmartWindows.Width;

  chkShowAgain.Checked := ShowAgain;

  cbLanguages.Properties.Items.Text := frmSmartWindows.siLangDispatcher.LangNames.Text;
  cbLanguages.ItemIndex := cbLanguages.Properties.Items.IndexOf(frmSmartWindows.siLangDispatcher.Language);
end;

procedure TfrmFirstStart.SetShowAgain(const Value: Boolean);
begin
  FShowAgain := Value;
end;

end.
