unit Unit6;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, ExtCtrls,Unit7,Unit8, StdCtrls;
type
TForm6 = class(TForm)
MainMenu1: TMainMenu;
Timer1: TTimer;
Info1: TMenuItem;
Programm1: TMenuItem;
N1: TMenuItem;
schlieen1: TMenuItem;
Hilfe1: TMenuItem;
BackupZeit1: TMenuItem;
N7Tage1: TMenuItem;
N14Tage1: TMenuItem;
Label1: TLabel;
Button1: TButton;
Button2: TButton;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Timer2: TTimer;
Edit1: TEdit;
Speichern1: TMenuItem;
Einstellen1: TMenuItem;
Button3: TButton;
procedure Button3Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Timer2Timer(Sender: TObject);
procedure andereEingabe1Click(Sender: TObject);
procedure schlieen1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure N14Tage1Click(Sender: TObject);
procedure N7Tage1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form6: TForm6;
Timeleft : integer;
implementation
{$R *.dfm}
procedure TForm6.N7Tage1Click(Sender: TObject);
begin
Timer1.Interval := (168)*1000*60*60 ;
end;
procedure TForm6.N14Tage1Click(Sender: TObject);
begin
Timer1.Interval := (336)*1000*60*60 ;
end;
procedure TForm6.Button2Click(Sender: TObject);
begin
Timer2.Enabled := false;
Label2.Caption:=('---');
Timer1.Enabled := false;
Label4.caption:=('Backup abgebrochen!!');
Label4.Color:=clred;
end;
procedure TForm6.Button1Click(Sender: TObject);
begin
Timer1.Interval := strtoint(Edit1.Text)*1000 ;
Timeleft := GetTickCount ;
Timer1.Enabled := True ;
Timer2.Enabled := True ;
Label4.caption:=('Backup gestartet!!');
Label4.Color:=clLime;
end;
procedure TForm6.schlieen1Click(Sender: TObject);
begin
close;
end;
procedure TForm6.andereEingabe1Click(Sender: TObject);
begin
Form7.Show;
end;
procedure TForm6.Timer2Timer(Sender: TObject);
begin
Label2.caption := inttostr(Timer2.Interval-(GetTickCount-Timeleft)div 1000 )+ ' seconds' ;
end;
procedure TForm6.FormCreate(Sender: TObject);
begin
Timer2.Enabled := false;
Label2.Caption:=('---');
Timer1.Enabled := false;
Label4.caption:=('nicht gestartet!!');
Label4.Color:=clAqua;
end;
procedure TForm6.Timer1Timer(Sender: TObject);
begin
Showmessage('Back Up File Routine') ;
end;
procedure TForm6.Button3Click(Sender: TObject);
begin
Form8.show;
end;
end.