92 lines
1.9 KiB
ObjectPascal
92 lines
1.9 KiB
ObjectPascal
unit frmVyberCinnostiStroje;
|
|
|
|
interface
|
|
|
|
uses
|
|
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
|
|
Vcl.Controls, Vcl.Forms, Vcl.Dialogs,
|
|
ddPlugin_TLB, Vcl.StdCtrls, Vcl.ExtCtrls;
|
|
|
|
type
|
|
TformVyberCinnostiStroje = class(TForm)
|
|
rgCinnost: TRadioGroup;
|
|
btnOK: TButton;
|
|
btnStorno: TButton;
|
|
rBtn1: TRadioButton;
|
|
rBtn2: TRadioButton;
|
|
rBtn3: TRadioButton;
|
|
rBtn4: TRadioButton;
|
|
rBtn5: TRadioButton;
|
|
rBtnK: TRadioButton;
|
|
procedure btnStornoClick(Sender: TObject);
|
|
procedure btnOKClick(Sender: TObject);
|
|
procedure FormShow(Sender: TObject);
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
private
|
|
public
|
|
Helios: IHelios;
|
|
mrVal: integer;
|
|
stroj, cinnost: string;
|
|
end;
|
|
|
|
var
|
|
formVyberCinnostiStroje: TformVyberCinnostiStroje;
|
|
|
|
implementation
|
|
uses System.StrUtils, System.DateUtils,
|
|
datMod, helTabsBIDs;
|
|
|
|
{$R *.dfm}
|
|
|
|
procedure TformVyberCinnostiStroje.btnOKClick (Sender: TObject);
|
|
begin
|
|
mrVal:= 10;
|
|
Close;
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TformVyberCinnostiStroje.btnStornoClick (Sender: TObject);
|
|
begin
|
|
mrVal:= 0;
|
|
Close;
|
|
end;
|
|
|
|
|
|
|
|
procedure TformVyberCinnostiStroje.FormClose (Sender: TObject; var Action: TCloseAction);
|
|
begin
|
|
cinnost:= '';
|
|
if (mrVal=10) then
|
|
begin
|
|
if (rBtn1.Checked) then
|
|
cinnost:= rBtn1.Caption
|
|
else
|
|
if (rBtn2.Checked) then
|
|
cinnost:= rBtn2.Caption
|
|
else
|
|
if (rBtn3.Checked) then
|
|
cinnost:= rBtn3.Caption
|
|
else
|
|
if (rBtn4.Checked) then
|
|
cinnost:= rBtn4.Caption
|
|
else
|
|
if (rBtn5.Checked) then
|
|
cinnost:= rBtn5.Caption
|
|
else
|
|
if (rBtnK.Checked) then
|
|
cinnost:= '';
|
|
end;
|
|
Action:= TCloseAction.caFree;
|
|
end;
|
|
|
|
|
|
|
|
procedure TformVyberCinnostiStroje.FormShow (Sender: TObject);
|
|
begin
|
|
self.Caption:= 'Výběr činnosti pro ' + stroj;
|
|
end;
|
|
|
|
end.
|