unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ExtCtrls, SaveListBox, ComCtrls, SaveComboBox, SaveRadioGroup,
  checklst, SCheckListBox, SaveCheckBox, SaveForm, SGListsContrl,
  AMNAboutDlg, AMNChangeIconDlg, ShellAPI, AMNSelFolder, AMNOpenWith,
  AMNSysInfo, Menus, AMNShellPopup, FileCtrl, AMNAppButton, AMNCPUBench,
  AMNMovePanel, AMNFileVersion, AmnMessageBx, AMNSysSound, AMNEdit,
  AMNLabel;

type
  TForm1 = class(TForm)
    PageControl1: TPageControl;
    TabSheet1: TTabSheet;
    TabSheet2: TTabSheet;
    TabSheet3: TTabSheet;
    TabSheet4: TTabSheet;
    TabSheet5: TTabSheet;
    Bevel1: TBevel;
    SaveListBox1: TSaveListBox;
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Button4: TButton;
    Edit1: TEdit;
    RadioGroup1: TRadioGroup;
    Edit2: TEdit;
    Button5: TButton;
    Button6: TButton;
    Button7: TButton;
    Button8: TButton;
    RadioGroup2: TRadioGroup;
    Bevel2: TBevel;
    Edit3: TEdit;
    Button9: TButton;
    Button10: TButton;
    Button11: TButton;
    Button12: TButton;
    RadioGroup3: TRadioGroup;
    Bevel3: TBevel;
    Edit4: TEdit;
    Button13: TButton;
    Button14: TButton;
    Button15: TButton;
    Button16: TButton;
    RadioGroup4: TRadioGroup;
    Bevel4: TBevel;
    Button18: TButton;
    Button20: TButton;
    RadioGroup5: TRadioGroup;
    Bevel5: TBevel;
    TabSheet6: TTabSheet;
    TabSheet7: TTabSheet;
    TabSheet8: TTabSheet;
    Button22: TButton;
    Button24: TButton;
    RadioGroup6: TRadioGroup;
    Bevel6: TBevel;
    Edit7: TEdit;
    Button25: TButton;
    Button26: TButton;
    Button27: TButton;
    Button28: TButton;
    RadioGroup7: TRadioGroup;
    Bevel7: TBevel;
    Edit8: TEdit;
    Button29: TButton;
    Button30: TButton;
    Button31: TButton;
    Button32: TButton;
    RadioGroup8: TRadioGroup;
    Bevel8: TBevel;
    SaveComboBox1: TSaveComboBox;
    SaveRadioGroup1: TSaveRadioGroup;
    SCheckListBox1: TSCheckListBox;
    SaveCheckBox1: TSaveCheckBox;
    SaveForm1: TSaveForm;
    SGComboBox1: TSGComboBox;
    SGListBox1: TSGListBox;
    ImageList1: TImageList;
    TabSheet9: TTabSheet;
    SGListBox2: TSGListBox;
    Button17: TButton;
    GroupBox1: TGroupBox;
    CheckBox1: TCheckBox;
    CheckBox2: TCheckBox;
    CheckBox3: TCheckBox;
    CheckBox4: TCheckBox;
    CheckBox5: TCheckBox;
    ImageList2: TImageList;
    AMNAboutDlg1: TAMNAboutDlg;
    TabSheet10: TTabSheet;
    AMNChangeIconDlg1: TAMNChangeIconDlg;
    Label1: TLabel;
    GroupBox2: TGroupBox;
    Button23: TButton;
    Edit5: TEdit;
    Image1: TImage;
    GroupBox3: TGroupBox;
    Edit6: TEdit;
    Button33: TButton;
    AMNSelectFolder1: TAMNSelectFolder;
    AMNOpenWith1: TAMNOpenWith;
    GroupBox4: TGroupBox;
    Edit9: TEdit;
    Button34: TButton;
    Button35: TButton;
    AMNSysInfo1: TAMNSysInfo;
    TabSheet11: TTabSheet;
    DirectoryListBox1: TDirectoryListBox;
    AMNShellPopup1: TAMNShellPopup;
    Label2: TLabel;
    AMNAppButton1: TAMNAppButton;
    AMNCPUSpeed1: TAMNCPUSpeed;
    Button36: TButton;
    Button37: TButton;
    AMNPropDlg1: TAMNPropDlg;
    TabSheet12: TTabSheet;
    AMNMovePanel1: TAMNMovePanel;
    Button38: TButton;
    Button39: TButton;
    CheckBox6: TCheckBox;
    TabSheet13: TTabSheet;
    AMNFileVersion1: TAMNFileVersion;
    ListBox1: TListBox;
    Edit10: TEdit;
    Button40: TButton;
    OpenDialog1: TOpenDialog;
    Button41: TButton;
    TabSheet14: TTabSheet;
    AmnMessageBx1: TAmnMessageBx;
    Button42: TButton;
    Label3: TLabel;
    Memo1: TMemo;
    Edit11: TEdit;
    TabSheet15: TTabSheet;
    AMNSysSound1: TAMNSysSound;
    Button43: TButton;
    RadioGroup9: TRadioGroup;
    AMNLabel1: TAMNLabel;
    AMNEdit1: TAMNEdit;
    Panel1: TPanel;
    Panel2: TPanel;
    Button19: TButton;
    Button21: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button5Click(Sender: TObject);
    procedure Button6Click(Sender: TObject);
    procedure Button8Click(Sender: TObject);
    procedure Button7Click(Sender: TObject);
    procedure Button9Click(Sender: TObject);
    procedure Button10Click(Sender: TObject);
    procedure Button11Click(Sender: TObject);
    procedure Button12Click(Sender: TObject);
    procedure Button13Click(Sender: TObject);
    procedure Button14Click(Sender: TObject);
    procedure Button15Click(Sender: TObject);
    procedure Button16Click(Sender: TObject);
    procedure Button18Click(Sender: TObject);
    procedure Button20Click(Sender: TObject);
    procedure Button22Click(Sender: TObject);
    procedure Button24Click(Sender: TObject);
    procedure Button25Click(Sender: TObject);
    procedure Button26Click(Sender: TObject);
    procedure Button27Click(Sender: TObject);
    procedure Button28Click(Sender: TObject);
    procedure Button29Click(Sender: TObject);
    procedure Button30Click(Sender: TObject);
    procedure Button32Click(Sender: TObject);
    procedure Button31Click(Sender: TObject);
    procedure Button17Click(Sender: TObject);
    procedure Button19Click(Sender: TObject);
    procedure Button21Click(Sender: TObject);
    procedure Button23Click(Sender: TObject);
    procedure Button33Click(Sender: TObject);
    procedure Button34Click(Sender: TObject);
    procedure Button35Click(Sender: TObject);
    procedure AMNShellPopup1Popup(Sender: TObject);
    procedure Button36Click(Sender: TObject);
    procedure Button37Click(Sender: TObject);
    procedure Button38Click(Sender: TObject);
    procedure Button39Click(Sender: TObject);
    procedure CheckBox6Click(Sender: TObject);
    procedure Button40Click(Sender: TObject);
    procedure Button41Click(Sender: TObject);
    procedure Button42Click(Sender: TObject);
    procedure Button43Click(Sender: TObject);
    procedure AMNLabel1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
begin
SaveListBox1.Items.Add(Edit1.Text);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
case RadioGroup1.ItemIndex of
0: SaveListBox1.Options.UseRegistry:= False;
1: SaveListBox1.Options.UseRegistry:= True;
end;
SaveListBox1.Save;
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
case RadioGroup1.ItemIndex of
0: SaveListBox1.Options.UseRegistry:= False;
1: SaveListBox1.Options.UseRegistry:= True;
end;
SaveListBox1.Restore;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
SaveListBox1.Items.Clear;
end;

procedure TForm1.Button5Click(Sender: TObject);
begin
SaveComboBox1.Items.Add(Edit2.Text);
SaveComboBox1.ItemIndex:= SaveComboBox1.Items.Count -1;
end;

procedure TForm1.Button6Click(Sender: TObject);
begin
case RadioGroup2.ItemIndex of
0: SaveComboBox1.Options.UseRegistry:= False;
1: SaveComboBox1.Options.UseRegistry:= True;
end;
SaveComboBox1.Save;
end;

procedure TForm1.Button8Click(Sender: TObject);
begin
case RadioGroup2.ItemIndex of
0: SaveComboBox1.Options.UseRegistry:= False;
1: SaveComboBox1.Options.UseRegistry:= True;
end;
SaveComboBox1.Items.Clear;
SaveComboBox1.Restore;
end;

procedure TForm1.Button7Click(Sender: TObject);
begin
SaveComboBox1.Items.Clear;
SaveComboBox1.Text:= '';
end;

procedure TForm1.Button9Click(Sender: TObject);
begin
SaveRadioGroup1.Items.Add(Edit3.Text);
end;

procedure TForm1.Button10Click(Sender: TObject);
begin
case RadioGroup3.ItemIndex of
0: SaveRadioGroup1.Options.UseRegistry:= False;
1: SaveRadioGroup1.Options.UseRegistry:= True;
end;
SaveRadioGroup1.Save;
end;

procedure TForm1.Button11Click(Sender: TObject);
begin
SaveRadioGroup1.Items.Clear;
end;

procedure TForm1.Button12Click(Sender: TObject);
begin
case RadioGroup3.ItemIndex of
0: SaveRadioGroup1.Options.UseRegistry:= False;
1: SaveRadioGroup1.Options.UseRegistry:= True;
end;
SaveRadioGroup1.Items.Clear;
SaveRadioGroup1.Restore;
end;

procedure TForm1.Button13Click(Sender: TObject);
begin
SCheckListBox1.Items.Add(Edit4.Text);
end;

procedure TForm1.Button14Click(Sender: TObject);
begin
case RadioGroup4.ItemIndex of
0: SCheckListBox1.Options.UseRegistry:= False;
1: SCheckListBox1.Options.UseRegistry:= True;
end;
SCheckListBox1.Save;
end;

procedure TForm1.Button15Click(Sender: TObject);
begin
SCheckListBox1.Items.Clear;
end;

procedure TForm1.Button16Click(Sender: TObject);
begin
case RadioGroup4.ItemIndex of
0: SCheckListBox1.Options.UseRegistry:= False;
1: SCheckListBox1.Options.UseRegistry:= True;
end;
SCheckListBox1.Items.Clear;
SCheckListBox1.Restore;
end;

procedure TForm1.Button18Click(Sender: TObject);
begin
case RadioGroup5.ItemIndex of
0: SaveCheckBox1.Options.UseRegistry:= False;
1: SaveCheckBox1.Options.UseRegistry:= True;
end;
SaveCheckBox1.Save;
end;

procedure TForm1.Button20Click(Sender: TObject);
begin
SaveCheckBox1.Restore;
end;

procedure TForm1.Button22Click(Sender: TObject);
begin
case RadioGroup6.ItemIndex of
0: SaveForm1.Options.UseRegistry:= False;
1: SaveForm1.Options.UseRegistry:= True;
end;
SaveForm1.Save;
end;

procedure TForm1.Button24Click(Sender: TObject);
begin
case RadioGroup6.ItemIndex of
0: SaveForm1.Options.UseRegistry:= False;
1: SaveForm1.Options.UseRegistry:= True;
end;
SaveForm1.Restore;
end;

procedure TForm1.Button25Click(Sender: TObject);
begin
SGComboBox1.Items.Add(Edit7.Text);
SGComboBox1.ItemIndex:= SGComboBox1.Items.Count -1;
end;

procedure TForm1.Button26Click(Sender: TObject);
begin
case RadioGroup7.ItemIndex of
0: SGComboBox1.Options.UseRegistry:= False;
1: SGComboBox1.Options.UseRegistry:= True;
end;
SGComboBox1.Save;
end;

procedure TForm1.Button27Click(Sender: TObject);
begin
SGComboBox1.Items.Clear;
end;

procedure TForm1.Button28Click(Sender: TObject);
begin
case RadioGroup7.ItemIndex of
0: SGComboBox1.Options.UseRegistry:= False;
1: SGComboBox1.Options.UseRegistry:= True;
end;
SGComboBox1.Items.Clear;
SGComboBox1.Restore;
end;

procedure TForm1.Button29Click(Sender: TObject);
begin
SGListBox1.Items.Add(Edit8.Text);
end;

procedure TForm1.Button30Click(Sender: TObject);
begin
case RadioGroup8.ItemIndex of
0: SGListBox1.Options.UseRegistry:= False;
1: SGListBox1.Options.UseRegistry:= True;
end;
SGListBox1.Save;
end;

procedure TForm1.Button32Click(Sender: TObject);
begin
case RadioGroup8.ItemIndex of
0: SGListBox1.Options.UseRegistry:= False;
1: SGListBox1.Options.UseRegistry:= True;
end;
SGListBox1.Restore;
end;

procedure TForm1.Button31Click(Sender: TObject);
begin
SGListBox1.Items.Clear;
end;

procedure TForm1.Button17Click(Sender: TObject);
begin
SGListBox2.Items.Clear;
ImageList2.Clear;
SGListBox2.GetDrvEx(CheckBox1.Checked, CheckBox4.Checked, CheckBox5.Checked, CheckBox3.Checked, CheckBox2.Checked);
end;

procedure TForm1.Button19Click(Sender: TObject);
begin
Close;
end;

procedure TForm1.Button21Click(Sender: TObject);
begin
AMNAboutDlg1.Execute;
end;

procedure TForm1.Button23Click(Sender: TObject);
begin
if AMNChangeIconDlg1.Execute then
Image1.picture.Icon.Handle:= ExtractIcon(Handle, PChar(AMNChangeIconDlg1.FileName), AMNChangeIconDlg1.IconIndex);
Edit5.Text:= AMNChangeIconDlg1.FileName;
Label1.Caption:= 'Icon index :  ' + intToStr(AMNChangeIconDlg1.IconIndex);
end;

procedure TForm1.Button33Click(Sender: TObject);
begin
if AMNSelectFolder1.Execute
then Edit6.Text:= AMNSelectFolder1.SelectedDirectory;
end;

procedure TForm1.Button34Click(Sender: TObject);
begin
AMNOpenWith1.FileName:= Edit9.Text;
AMNOpenWith1.Execute;
end;

procedure TForm1.Button35Click(Sender: TObject);
begin
AMNSysInfo1.Execute(Application.Handle);
end;

procedure TForm1.AMNShellPopup1Popup(Sender: TObject);
begin
AMNShellPopup1.ShellItem:= DirectoryListBox1.Directory;
end;

procedure TForm1.Button36Click(Sender: TObject);
begin
Button36.Caption:= AMNCPUSpeed1.CPUSpeed;
end;

procedure TForm1.Button37Click(Sender: TObject);
begin
AMNPropDlg1.ShellItem:= DirectoryListBox1.Directory;
AMNPropDlg1.Execute;
end;

procedure TForm1.Button38Click(Sender: TObject);
begin
AMNMovePanel1.Save;
end;

procedure TForm1.Button39Click(Sender: TObject);
begin
AMNMovePanel1.Restore;
end;

procedure TForm1.CheckBox6Click(Sender: TObject);
begin
if CheckBox6.Checked = True then
AMNMovePanel1.Moveable:= True
else
AMNMovePanel1.Moveable:= False;
end;

procedure TForm1.Button40Click(Sender: TObject);

begin
if OpenDialog1.Execute then
begin
ListBox1.Clear;
Edit10.Text:= OpenDialog1.FileName;
AMNFileVersion1.FileName:= OpenDialog1.FileName;
ListBox1.Items.Add('Comments : ' + AMNFileVersion1.Comments);
ListBox1.Items.Add('CompanyName : ' + AMNFileVersion1.CompanyName);
ListBox1.Items.Add('FileDescription : ' + AMNFileVersion1.FileDescription);
ListBox1.Items.Add('FileVersion : ' + AMNFileVersion1.FileVersion);
ListBox1.Items.Add('ProductName : ' + AMNFileVersion1.ProductName);
ListBox1.Items.Add('LegalCopyright : ' + AMNFileVersion1.LegalCopyright);
ListBox1.Items.Add('InternalName : ' + AMNFileVersion1.InternalName);
ListBox1.Items.Add('LegalTrademarks : ' + AMNFileVersion1.LegalTrademarks);
ListBox1.Items.Add('OriginalFilename : ' + AMNFileVersion1.OriginalFilename);
ListBox1.Items.Add('ProductVersion : ' + AMNFileVersion1.ProductVersion);

end;
end;

procedure TForm1.Button41Click(Sender: TObject);
begin
AMNFileVersion1.AllInfo;
end;

procedure TForm1.Button42Click(Sender: TObject);
begin
AmnMessageBx1.Caption:= Edit11.Text;
AmnMessageBx1.Text.AddStrings(Memo1.Lines);
AmnMessageBx1.Execute;
end;

procedure TForm1.Button43Click(Sender: TObject);
begin
case RadioGroup9.ItemIndex of
0: AMNSysSound1.Sound:= SystemAsterisk;
1: AMNSysSound1.Sound:= SystemExclamation;
2: AMNSysSound1.Sound:= SystemHand;
3: AMNSysSound1.Sound:= SystemQuestion;
4: AMNSysSound1.Sound:= SystemDefault;
end;
AMNSysSound1.Play;
end;
procedure TForm1.AMNLabel1Click(Sender: TObject);
begin
  ShellExecute(Handle, nil, PChar('mailto:amnsoft@angelfire.com'), nil, nil,
    SW_NORMAL);
end;

end.
