unit main;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  KsItems, KsSkinItems, KsMenus, KsSkinMenus, KsHooks, KsForms,
  KsSkinForms, KsSkinEngine, KsTrackBars, KsSkinTrackBars, StdCtrls,
  KsGroupBoxs, KsSkinGroupBoxs, KsControls, KsButtons, KsSkinButtons,
  ExtCtrls, KsScrollBars, KsSkinScrollBars, KsSpinButtons,
  KsSkinSpinButtons, ComCtrls, KsSpeedButtons, KsSkinSpeedButtons;

type
  TfrmMain = class(TForm)
    SeSkinEngine1: TSeSkinEngine;
    NgButton1: TSeSkinButton;
    NgButton2: TSeSkinButton;
    NgButton3: TSeSkinButton;
    NgButton4: TSeSkinButton;
    NgGroupBox1: TSeSkinGroupBox;
    NgGroupBox2: TSeSkinGroupBox;
    NgTrackBar1: TSeSkinTrackBar;
    SeSkinForm1: TSeSkinForm;
    SeSkinMenuBar1: TSeSkinMenuBar;
    CustomItem10: TSeSkinItem;
    CustomItem11: TSeSkinItem;
    CustomItem12: TSeSkinItem;
    CustomItem13: TSeSkinItem;
    CustomItem14: TSeSkinItem;
    CustomItem15: TSeSkinItem;
    CustomItem16: TSeSkinItem;
    CustomItem17: TSeSkinItem;
    CustomItem18: TSeSkinItem;
    SeSkinButton1: TSeSkinButton;
    OpenDialog1: TOpenDialog;
    SeSkinButton2: TSeSkinButton;
    Label1: TLabel;
    SeSkinButton3: TSeSkinButton;
    SeSkinButton4: TSeSkinButton;
    SeSkinButton5: TSeSkinButton;
    SeSkinButton6: TSeSkinButton;
    SeSkinButton7: TSeSkinButton;
    SeSkinButton8: TSeSkinButton;
    procedure FormCreate(Sender: TObject);
    procedure CustomItem7Click(Sender: TObject);
    procedure CustomItem9Click(Sender: TObject);
    procedure KsBlendButton1MouseEnter(Sender: TObject);
    procedure KsBlendButton2MouseEnter(Sender: TObject);
    procedure KsBlendButton3MouseEnter(Sender: TObject);
    procedure KsBlendButton5MouseEnter(Sender: TObject);
    procedure CustomItem10Click(Sender: TObject);
    procedure CustomItem11Click(Sender: TObject);
    procedure CustomItem12Click(Sender: TObject);
    procedure CustomItem14Click(Sender: TObject);
    procedure CustomItem15Click(Sender: TObject);
    procedure CustomItem16Click(Sender: TObject);
    procedure NgTrackBar1Change(Sender: TObject);
    procedure SeSkinButton1Click(Sender: TObject);
    procedure SeSkinButton1MouseEnter(Sender: TObject);
    procedure SeSkinButton2MouseEnter(Sender: TObject);
    procedure SeSkinButton2Click(Sender: TObject);
    procedure SeSkinButton3MouseEnter(Sender: TObject);
    procedure SeSkinButton3Click(Sender: TObject);
    procedure SeSkinButton4MouseEnter(Sender: TObject);
    procedure SeSkinButton5MouseEnter(Sender: TObject);
    procedure SeSkinButton6MouseEnter(Sender: TObject);
    procedure SeSkinButton6Click(Sender: TObject);
    procedure SeSkinButton4Click(Sender: TObject);
    procedure SeSkinButton5Click(Sender: TObject);
    procedure SeSkinButton7MouseEnter(Sender: TObject);
    procedure SeSkinButton7Click(Sender: TObject);
    procedure SeSkinButton8MouseEnter(Sender: TObject);
    procedure SeSkinButton8Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmMain: TfrmMain;

implementation

uses KsSkinVersion, KsSkinSource, ShellAPI, menu, ctrls, ctrls2, about, Form,
  formani, ctrls3, shadow, hints, msgs, tbdemo, edits;

{$R *.DFM}

procedure TfrmMain.FormCreate(Sender: TObject);
begin
  Caption := 'SkinEngine MegaDemo v. ' + sSeSkinVersion;

  OpenDialog1.Filter := GetDialogFilter;
end;

procedure TfrmMain.CustomItem7Click(Sender: TObject);
begin
  ShellExecute(0, 'open', 'http://www.ksdev.com', nil, nil, SW_SHOWNORMAL);
end;

procedure TfrmMain.CustomItem9Click(Sender: TObject);
begin
  { About }
  frmAbout := TfrmAbout.Create(Self);
  frmAbout.ShowModal;
  frmAbout.Free;
end;

procedure TfrmMain.SeSkinButton1MouseEnter(Sender: TObject);
begin
  Label1.Caption := 'Use the OpenDialog to select new skin file...';
end;

procedure TfrmMain.KsBlendButton1MouseEnter(Sender: TObject);
begin
  Label1.Caption := 'Demonstation of the menubar, popupmenu, menu blend, animation, shadow and more...';
end;

procedure TfrmMain.KsBlendButton2MouseEnter(Sender: TObject);
begin
  Label1.Caption := 'Demonstation of the SkinEngine''s controls such as Button, TrackBar, ProgressBar and more...';
end;

procedure TfrmMain.KsBlendButton3MouseEnter(Sender: TObject);
begin
  Label1.Caption := 'Demonstation of the SkinEngine''s controls such as Panel, TabControl and more...';
end;

procedure TfrmMain.SeSkinButton3MouseEnter(Sender: TObject);
begin
  Label1.Caption := 'Demonstation of the SkinEngine''s controls such as Edit, ComboBox, SpinButton and more...';
end;

procedure TfrmMain.KsBlendButton5MouseEnter(Sender: TObject);
begin
  Label1.Caption := 'Form with alpha-blending ...';
end;

procedure TfrmMain.SeSkinButton2MouseEnter(Sender: TObject);
begin
  Label1.Caption := 'Demonstation of the form animation...';
end;

procedure TfrmMain.CustomItem10Click(Sender: TObject);
begin
  { Menus }
  frmMenu := TfrmMenu.Create(Self);
  frmMenu.ShowModal;
  frmMenu.Free;
end;

procedure TfrmMain.CustomItem11Click(Sender: TObject);
begin
  { Controls 1 }
  frmControls := TfrmControls.Create(Self);
  frmControls.ShowModal;
  frmControls.Free;
end;

procedure TfrmMain.CustomItem12Click(Sender: TObject);
begin
  { Controls 2 }
  frmControls2 := TfrmControls2.Create(Self);
  frmControls2.ShowModal;
  frmControls2.Free;
end;

procedure TfrmMain.SeSkinButton3Click(Sender: TObject);
begin
  { Controls 3 }
  frmControls3 := TfrmControls3.Create(Self);
  frmControls3.ShowModal;
  frmControls3.Free;
end;

procedure TfrmMain.CustomItem14Click(Sender: TObject);
begin
  { Blend Form }
  frmForm := TfrmForm.Create(Self);
  frmForm.ShowModal;
  frmForm.Free;
end;

procedure TfrmMain.CustomItem15Click(Sender: TObject);
begin
  { Blend Controls }
end;

procedure TfrmMain.CustomItem16Click(Sender: TObject);
begin
  { animation }
end;

procedure TfrmMain.NgTrackBar1Change(Sender: TObject);
begin
  SeSkinEngine1.DeltaHue := NgTrackBar1.Position;
end;

procedure TfrmMain.SeSkinButton1Click(Sender: TObject);
begin
  { Load Skin }
  if OpenDialog1.Execute then
    SeSkinEngine1.SkinFile := OpenDialog1.FileName;
end;

procedure TfrmMain.SeSkinButton2Click(Sender: TObject);
begin
  { Animation }
  AniDemo := TAniDemo.Create(Self);
  AniDemo.ShowModal;
  AniDemo.Free;
end;

procedure TfrmMain.SeSkinButton4MouseEnter(Sender: TObject);
begin
  Label1.Caption := 'Demonstation of the SkinEngine''s hint system and SpeedButton controls ...';
end;

procedure TfrmMain.SeSkinButton5MouseEnter(Sender: TObject);
begin
  Label1.Caption := 'Demonstation of the SkinEngine''s message dialogs...';
end;

procedure TfrmMain.SeSkinButton6MouseEnter(Sender: TObject);
begin
  Label1.Caption := 'Demonstation of the SkinEngine''s real shadow...';
end;

procedure TfrmMain.SeSkinButton7MouseEnter(Sender: TObject);
begin
  Label1.Caption := 'Demonstation of the SkinEngine''s controlbar and toolbar controls...';
end;

procedure TfrmMain.SeSkinButton8MouseEnter(Sender: TObject);
begin
  Label1.Caption := 'Demonstation of the SkinEngine''s advanced edit controls...';
end;

procedure TfrmMain.SeSkinButton6Click(Sender: TObject);
begin
  frmShadow := TfrmShadow.Create(Self);
  frmShadow.ShowModal;
  frmShadow.Free;
end;

procedure TfrmMain.SeSkinButton4Click(Sender: TObject);
begin
  frmHint := TfrmHint.Create(Self);
  frmHint.ShowModal;
  frmHint.Free;
end;

procedure TfrmMain.SeSkinButton5Click(Sender: TObject);
begin
  frmMsg := TfrmMsg.Create(Self);
  frmMsg.ShowModal;
  frmMsg.Free;
end;

procedure TfrmMain.SeSkinButton7Click(Sender: TObject);
begin
  frmTBDemo := TfrmTBDemo.Create(Self);
  frmTBDemo.ShowModal;
  frmTBDemo.Free;
end;

procedure TfrmMain.SeSkinButton8Click(Sender: TObject);
begin
  frmEdits := TfrmEdits.Create(Self);
  frmEdits.ShowModal;
  frmEdits.Free;
end;

end.
