unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, AHMSystemClass, AHMTSystemManager, Buttons, ExtCtrls;

type
  TForm1 = class(TForm)
    AHMSystemManager1: TAHMSystemManager;
    CheckBox1: TCheckBox;
    Button1: TButton;
    Button2: TButton;
    CheckBox2: TCheckBox;
    CheckBox3: TCheckBox;
    Button3: TButton;
    Button4: TButton;
    Label1: TLabel;
    Timer1: TTimer;
    SysB1: TSpeedButton;
    SysB2: TSpeedButton;
    SysB3: TSpeedButton;
    CheckBox5: TCheckBox;
    CheckBox6: TCheckBox;
    CheckBox7: TCheckBox;
    Label2: TLabel;
    procedure FormActivate(Sender: TObject);
    procedure ReadValues;
    procedure SysB1Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
    procedure CheckBox1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormActivate(Sender: TObject);
begin
  ReadValues;
end;

procedure TForm1.ReadValues;
begin
 with AHMSystemManager1 do
 begin
   with SystemKeys do
   begin
     SysB1.Down:=Capslock;
     SysB2.Down:=Numlock;
     SysB3.Down:=Scrolllock;
   end;
   with Properties do
   begin
     Checkbox1.Checked:=pAnimation;
     Checkbox2.Checked:=pDragFullWindows;
     Checkbox3.Checked:=pFontSmoothing;
   end;
 end;
end;

procedure TForm1.SysB1Click(Sender: TObject);
begin
   with AHMSystemManager1.SystemKeys do
   begin
     Capslock:=SysB1.Down;
     Numlock:=SysB2.Down;
     Scrolllock:=SysB3.Down;
   end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  AHMSystemManager1.Properties.pDoMinimizeAll:=True;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  AHMSystemManager1.EmptyBin(true,true,true);
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
  ReadValues;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
  AHMSystemManager1.CallScreenSaver;
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
  AHMSystemManager1.CallShutdown;
end;

procedure TForm1.CheckBox1Click(Sender: TObject);
begin
   with AHMSystemManager1.Properties do
   begin
     pAnimation:=Checkbox1.Checked;
     pDragFullWindows:=Checkbox2.Checked;
     pFontSmoothing:=Checkbox3.Checked;
     pIcons:=Checkbox5.Checked;
     pTaskbar:=Checkbox6.Checked;
     pOfficeBar:=Checkbox7.Checked;
   end;
end;

end.
