unit frmMain;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, AdvGlowButton, System.ImageList,
  Vcl.ImgList, Vcl.ExtCtrls, AdvSmoothPanel, AdvPanel,
  AdvGDIP, Vcl.ComCtrls, AdvPageControl {für gtVertical};

type
  TForm1 = class(TForm)
    IL_Menue: TImageList;
    Glow_Sprache: TAdvGlowButton;
    Glow_Home: TAdvGlowButton;
    Glow_Einstellungen: TAdvGlowButton;
    IL70: TImageList;
    Panel1: TPanel;
    spBackground: TAdvSmoothPanel;
    AdvPanelStyler1: TAdvPanelStyler;
    sp_Main_Head: TAdvSmoothPanel;
    Glow_Close: TAdvGlowButton;
    pgcntrlMain: TAdvPageControl;
    tbsht_Start: TAdvTabSheet;
    procedure FormShow(Sender: TObject);
    procedure Glow_CloseClick(Sender: TObject);
  private
    { Private-Deklarationen }
    procedure Design_smthpnlBody(smthpnlBody: TAdvSmoothPanel);
    procedure Design_smthpnlHeader(smthpnlHeader: TAdvSmoothPanel);
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

{ TForm1 }

procedure TForm1.Design_smthpnlBody(smthpnlBody: TAdvSmoothPanel);
begin
   smthpnlBody.Align := alClient;
   smthpnlBody.AlignWithMargins := True;
   smthpnlBody.Margins.Top:= 0;
   smthpnlBody.Margins.Left:= 3;
   smthpnlBody.Margins.Right:= 3;
   smthpnlBody.Margins.Bottom:= 3;
   smthpnlBody.Fill.GradientType := gtVertical;
   smthpnlBody.Fill.Color := $00F4F1EE;     // oben hell
   smthpnlBody.Fill.ColorTo := $00E3DFDB;   // unten etwas dunkler
   smthpnlBody.Fill.BorderColor := clNone;
   smthpnlBody.Fill.Rounding := 25;          // weiche Außenkanten

   {smthpnlBody.Fill.GradientType := gtVertical;
   smthpnlBody.Fill.Color := RGB(245,242,239);
   smthpnlBody.Fill.ColorTo := RGB(221,217,212);}

   {smthpnlBody.Fill.GradientType := gtRadial;
   smthpnlBody.Fill.Color := $00F5F2EF;
   smthpnlBody.Fill.ColorTo := $00D9D4CF;}
end;

procedure TForm1.Design_smthpnlHeader(smthpnlHeader: TAdvSmoothPanel);
begin
   smthpnlHeader.Align := alTop;
   smthpnlHeader.AlignWithMargins := True;
   smthpnlHeader.Margins.Top:= 3;
   smthpnlHeader.Margins.Left:= 3;
   smthpnlHeader.Margins.Right:= 3;
   smthpnlHeader.Margins.Bottom:= 0;
   smthpnlHeader.Fill.Color := RGB(221,217,212);
   smthpnlHeader.Fill.BorderColor := clNone;
   smthpnlHeader.Fill.Rounding := 25;          // weiche Außenkanten

   smthpnlHeader.Caption.Font.Name:= 'Segoe UI';
   smthpnlHeader.Caption.Font.Height:= -32;
   smthpnlHeader.Caption.Font.Style := [fsBold];
   smthpnlHeader.Caption.Font.Color:= $00202020;
   smthpnlHeader.Caption.Location:= plCenterCenter;
   smthpnlHeader.Caption.Line:= false;

   //sp_Main_Head.Caption.HTMLText := '<div align="center"><b><font face="Segoe UI" size="5" color="#202020">Besucher-Anmeldung</font></b></div>';
end;

procedure TForm1.FormShow(Sender: TObject);
begin
   sp_Main_Head.Caption.Text:= 'Besucher-Anmeldung';
   Design_smthpnlHeader(sp_Main_Head);
   Design_smthpnlBody(spBackground);

   tbsht_Start.TabVisible:= false;
   {tbsht_Start.BorderWidth:= 0;
   tbsht_Start.Color:= clWhite;
   tbsht_Start.ColorTo:= clWhite;}

   //pgcntrlMain.Visible:= false;
   {pgcntrlMain.TabBorderColor:= clNone;
   pgcntrlMain.TabBackGroundColor:= clNone;
   pgcntrlMain.TabBorder3D:= false;}
   pgcntrlMain.TabBorderColor:= spBackground.Fill.ColorTo;
   pgcntrlMain.TabBackGroundColor:= spBackground.Fill.ColorTo;
end;

procedure TForm1.Glow_CloseClick(Sender: TObject);
begin
   //if MessageDlg('Soll die App geschlossen werden?', mtConfirmation, [mbYes, mbNo], 0) = mrYes then begin
   if Application.MessageBox('Soll die App geschlossen werden?', 'Bestätigen', MB_YESNO or MB_ICONQUESTION) = IDYES then begin
      Close;
   end
   else begin
      Exit;
   end;
end;

end.
