home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 August / Chip_1999-08_cd.bin / tema / Ozogan / RUNTIME / APLIKACE.EXE / BANKOMAT / PROGRAM / CODE01.KL3 < prev    next >
Text File  |  1999-04-13  |  1KB  |  55 lines

  1. Program code01;
  2.  
  3. procedure TForm.FormCreate(Sender: TObject);
  4. begin
  5.   Form.Left:=(SysVarGet('fleft')+(SysVarGet('fwidth')/2 ))-(Form.Width/2);
  6.   Form.Top :=(SysVarGet('ftop') +(SysVarGet('fheight')/2))-(Form.Height/2);
  7.   DateTimePicker1.Date:=Date;
  8.   If Form.Left<=0 Then Begin
  9.     Form.Left:=0;Form.Top:=0;
  10.   End;
  11.   If SysVarGet("op")=1 Then Begin
  12.     Form.Caption:="Vlo₧enφ novΘho zßznamu";
  13.   End
  14.   Else Begin
  15.     Form.Caption:="Oprava vlo₧enΘho zßznamu";
  16.     DateTimePicker1.Date:=StrToDate(SysVarGet("datu"));
  17.     Edit1.Text:=Trim(RealToStr(Abs(SysVarGet("cena")),15,2));
  18.     Edit2.Text:=Trim(SysVarGet("pozn"));
  19.   End;
  20.   If SysVarGet("oper")=-1 Then Begin
  21.     RadioGroup1.ItemIndex:=1;
  22.     RadioGroup1.Tag:=-1;
  23.   End
  24.   Else Begin
  25.     RadioGroup1.ItemIndex:=0;
  26.     RadioGroup1.Tag:=1;
  27.   End;
  28.   //  Panel1.Tag:=1;
  29. end;
  30.  
  31. procedure TForm.RadioGroup1Click(Sender: TObject);
  32. Var
  33.   exit:Boolean;
  34. begin
  35.   exit:=False;
  36.   If RadioGroup1.ItemIndex=1 Then Begin
  37.     RadioGroup1.Tag:=-1;
  38.   End;
  39.   If RadioGroup1.ItemIndex=0 Then Begin
  40.     RadioGroup1.Tag:=1;
  41.   End;
  42. end;
  43.  
  44. procedure TForm.Button1Click(Sender: TObject);
  45. begin
  46.   SysVarSet("rest",1);
  47.   SysVarSet("datu",DateToStr(DateTimePicker1.Date));
  48.   SysVarSet("cena",Abs(StrToReal(Edit1.Text)));
  49.   SysVarSet("pozn",Edit2.Text);
  50.   SysVarSet("oper",RadioGroup1.Tag);
  51.   Form.Close;
  52. end;
  53.  
  54. end.
  55.