Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit Unit1;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, jpeg, ExtCtrls, StdCtrls;
- type
- TForm1 = class(TForm)
- ComboBox1: TComboBox;
- RadioGroup1: TRadioGroup;
- RadioGroup2: TRadioGroup;
- RadioGroup3: TRadioGroup;
- RadioGroup4: TRadioGroup;
- GroupBox1: TGroupBox;
- Image1: TImage;
- Image2: TImage;
- Image3: TImage;
- Image4: TImage;
- ComboBox2: TComboBox;
- RadioGroup5: TRadioGroup;
- Button1: TButton;
- GroupBox2: TGroupBox;
- Image5: TImage;
- Button2: TButton;
- Image6: TImage;
- Image7: TImage;
- Image8: TImage;
- Label1: TLabel;
- Label3: TLabel;
- Label2: TLabel;
- Button3: TButton;
- Label4: TLabel;
- Label5: TLabel;
- Label6: TLabel;
- Label7: TLabel;
- Panel1: TPanel;
- RadioGroup6: TRadioGroup;
- RadioGroup7: TRadioGroup;
- CheckBox1: TCheckBox;
- Label8: TLabel;
- Label9: TLabel;
- Label10: TLabel;
- Label11: TLabel;
- Label12: TLabel;
- Label13: TLabel;
- Label14: TLabel;
- Panel2: TPanel;
- Label15: TLabel;
- Label16: TLabel;
- Label17: TLabel;
- Label18: TLabel;
- Label19: TLabel;
- Label20: TLabel;
- Label21: TLabel;
- Panel3: TPanel;
- Label22: TLabel;
- Label23: TLabel;
- Label24: TLabel;
- Label25: TLabel;
- Label26: TLabel;
- Label27: TLabel;
- Label28: TLabel;
- CheckBox2: TCheckBox;
- Button4: TButton;
- Label29: TLabel;
- Label30: TLabel;
- procedure ComboBox1Change(Sender: TObject);
- procedure RadioGroup2Click(Sender: TObject);
- procedure RadioGroup3Click(Sender: TObject);
- procedure RadioGroup1Click(Sender: TObject);
- procedure RadioGroup4Click(Sender: TObject);
- procedure RadioGroup5Click(Sender: TObject);
- procedure Button1Click(Sender: TObject);
- procedure Button2Click(Sender: TObject);
- procedure Button3Click(Sender: TObject);
- procedure RadioGroup6Click(Sender: TObject);
- procedure RadioGroup7Click(Sender: TObject);
- procedure CheckBox1Click(Sender: TObject);
- procedure CheckBox2Click(Sender: TObject);
- procedure Button4Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- zv, zv1, zv2, da:real;
- x:string;
- i:integer;
- implementation
- {$R *.dfm}
- procedure TForm1.ComboBox1Change(Sender: TObject);
- begin
- Case ComboBox1.ItemIndex of
- 0: begin
- Label8.Caption:='';
- Label9.Caption:='';
- Label10.Caption:='';
- Label11.Caption:='';
- Label12.Caption:='';
- Label13.Caption:='';
- Label14.Caption:='';
- Label15.Caption:='';
- Label16.Caption:='';
- Label17.Caption:='';
- Label18.Caption:='';
- Label19.Caption:='';
- Label20.Caption:='';
- Label21.Caption:='';
- Label22.Caption:='';
- Label23.Caption:='';
- Label24.Caption:='';
- Label25.Caption:='';
- Label26.Caption:='';
- Label27.Caption:='';
- Label28.Caption:='';
- Image1.Visible:=false;
- Image2.Visible:=true;
- Image3.Visible:=false;
- Image4.Visible:=false;
- Image5.Visible:=false;
- Image6.Visible:=false;
- Image7.Visible:=false;
- Image8.Visible:=false;
- RadioGroup1.Visible:=true;
- RadioGroup2.Visible:=true;
- RadioGroup3.Visible:=false;
- RadioGroup4.Visible:=false;
- RadioGroup5.Visible:=false;
- ComboBox2.Top:=144;
- RadioGroup1.ItemIndex:=-1;
- RadioGroup2.ItemIndex:=-1;
- RadioGroup3.ItemIndex:=-1;
- RadioGroup4.ItemIndex:=-1;
- RadioGroup5.ItemIndex:=-1;
- Label1.Visible:=false;
- Label2.Visible:=false;
- Label3.Visible:=false;
- GroupBox2.Visible:=false;
- RadioGroup7.Visible:=false;
- end;
- 1: begin
- Label8.Caption:='';
- Label9.Caption:='';
- Label10.Caption:='';
- Label11.Caption:='';
- Label12.Caption:='';
- Label13.Caption:='';
- Label14.Caption:='';
- Label15.Caption:='';
- Label16.Caption:='';
- Label17.Caption:='';
- Label18.Caption:='';
- Label19.Caption:='';
- Label20.Caption:='';
- Label21.Caption:='';
- Label22.Caption:='';
- Label23.Caption:='';
- Label24.Caption:='';
- Label25.Caption:='';
- Label26.Caption:='';
- Label27.Caption:='';
- Label28.Caption:='';
- Image1.Visible:=true;
- Image2.Visible:=false;
- Image3.Visible:=false;
- Image4.Visible:=false;
- Image5.Visible:=false;
- Image6.Visible:=false;
- Image7.Visible:=false;
- Image8.Visible:=false;
- RadioGroup1.Visible:=true;
- RadioGroup2.Visible:=true;
- RadioGroup3.Visible:=false;
- RadioGroup4.Visible:=false;
- RadioGroup5.Visible:=false;
- ComboBox2.Top:=144;
- RadioGroup1.ItemIndex:=-1;
- RadioGroup2.ItemIndex:=-1;
- RadioGroup3.ItemIndex:=-1;
- RadioGroup4.ItemIndex:=-1;
- RadioGroup5.ItemIndex:=-1;
- Label1.Visible:=false;
- Label2.Visible:=false;
- Label3.Visible:=false;
- GroupBox2.Visible:=false;
- RadioGroup7.Visible:=false;
- end;
- 2: begin
- Label8.Caption:='';
- Label9.Caption:='';
- Label10.Caption:='';
- Label11.Caption:='';
- Label12.Caption:='';
- Label13.Caption:='';
- Label14.Caption:='';
- Label15.Caption:='';
- Label16.Caption:='';
- Label17.Caption:='';
- Label18.Caption:='';
- Label19.Caption:='';
- Label20.Caption:='';
- Label21.Caption:='';
- Label22.Caption:='';
- Label23.Caption:='';
- Label24.Caption:='';
- Label25.Caption:='';
- Label26.Caption:='';
- Label27.Caption:='';
- Label28.Caption:='';
- Image1.Visible:=false;
- Image2.Visible:=false;
- Image3.Visible:=true;
- Image4.Visible:=false;
- Image5.Visible:=false;
- Image6.Visible:=false;
- Image7.Visible:=false;
- Image8.Visible:=false;
- RadioGroup1.Visible:=true;
- RadioGroup2.Visible:=true;
- RadioGroup3.Visible:=false;
- RadioGroup4.Visible:=false;
- RadioGroup5.Visible:=false;
- ComboBox2.Top:=144;
- RadioGroup1.ItemIndex:=-1;
- RadioGroup2.ItemIndex:=-1;
- RadioGroup3.ItemIndex:=-1;
- RadioGroup4.ItemIndex:=-1;
- RadioGroup5.ItemIndex:=-1;
- Label1.Visible:=false;
- Label2.Visible:=false;
- Label3.Visible:=false;
- GroupBox2.Visible:=false;
- RadioGroup7.Visible:=false;
- end;
- 3: begin
- Label8.Caption:='';
- Label9.Caption:='';
- Label10.Caption:='';
- Label11.Caption:='';
- Label12.Caption:='';
- Label13.Caption:='';
- Label14.Caption:='';
- Label15.Caption:='';
- Label16.Caption:='';
- Label17.Caption:='';
- Label18.Caption:='';
- Label19.Caption:='';
- Label20.Caption:='';
- Label21.Caption:='';
- Label22.Caption:='';
- Label23.Caption:='';
- Label24.Caption:='';
- Label25.Caption:='';
- Label26.Caption:='';
- Label27.Caption:='';
- Label28.Caption:='';
- Image1.Visible:=false;
- Image2.Visible:=false;
- Image3.Visible:=false;
- Image4.Visible:=true;
- Image5.Visible:=false;
- Image6.Visible:=false;
- Image7.Visible:=false;
- Image8.Visible:=false;
- RadioGroup1.Visible:=false;
- RadioGroup2.Visible:=false;
- RadioGroup3.Visible:=false;
- RadioGroup4.Visible:=false;
- RadioGroup1.ItemIndex:=-1;
- RadioGroup2.ItemIndex:=-1;
- RadioGroup3.ItemIndex:=-1;
- RadioGroup4.ItemIndex:=-1;
- RadioGroup5.ItemIndex:=-1;
- ComboBox2.Top:=144;
- Label1.Visible:=false;
- Label2.Visible:=false;
- Label3.Visible:=false;
- GroupBox2.Visible:=false;
- RadioGroup7.Visible:=true;
- end;
- end;
- end;
- procedure TForm1.RadioGroup2Click(Sender: TObject);
- begin
- Label8.Caption:='00:45h';
- Label9.Caption:='05:00h';
- Label10.Caption:='06:45h';
- Label11.Caption:='12:00h';
- Label12.Caption:='18:00h';
- Label13.Caption:='21:00h';
- Label14.Caption:='23:30h';
- Case RadioGroup2.ItemIndex of
- 4,3,2: begin
- GroupBox2.Top:=256;
- Panel2.Visible:=true;
- Panel3.Visible:=false;
- Label15.Caption:='06:00h';
- Label16.Caption:='';
- Label17.Caption:='07:30h';
- Label18.Caption:='';
- Label19.Caption:='09:00h';
- Label20.Caption:='';
- Label21.Caption:='12:00h';
- Label22.Caption:='13:45h';
- Label23.Caption:='';
- Label24.Caption:='15:00h';
- Label25.Caption:='';
- Label26.Caption:='17:00h';
- Label27.Caption:='';
- Label28.Caption:='19:00h';
- end;
- 1, 0:begin
- GroupBox2.Top:=344;
- Panel2.Visible:=true;
- Panel3.Visible:=true;
- Label15.Caption:='06:00h';
- Label16.Caption:='06:30';
- Label17.Caption:='07:30h';
- Label18.Caption:='08:00h';
- Label19.Caption:='09:00h';
- Label20.Caption:='10:30h';
- Label21.Caption:='12:00h';
- Label22.Caption:='13:45h';
- Label23.Caption:='14:20h';
- Label24.Caption:='15:00h';
- Label25.Caption:='16:00h';
- Label26.Caption:='17:00h';
- Label27.Caption:='18:00h';
- Label28.Caption:='19:00h';
- end;
- 5,6,7,8,9,10:begin
- panel3.Visible:=false;
- Panel2.Visible:=true;
- GroupBox2.Top:=256;
- Label15.Caption:='';
- Label16.Caption:='';
- Label17.Caption:='';
- Label18.Caption:='';
- Label19.Caption:='';
- Label20.Caption:='';
- Label21.Caption:='';
- Label22.Caption:='';
- Label23.Caption:='';
- Label24.Caption:='';
- Label25.Caption:='';
- Label26.Caption:='';
- Label27.Caption:='';
- Label28.Caption:='';
- end;
- end;
- Case ComboBox1.ItemIndex of
- 0: begin
- case RadioGroup2.ItemIndex of
- 0: begin
- Label1.Caption:='Zvecan.';
- zv:=50;
- da:=3;
- end;
- 1: begin
- zv:=70;
- Label1.Caption:='Grabovac.';
- da:=4;
- end;
- 2: begin
- zv:=110;
- Label1.Caption:='Socanica.';
- da:=24;
- end;
- 3: begin
- zv:=200;
- Label1.Caption:='Leposavic.';
- da:=35;
- end;
- 4: begin
- zv:=240;
- Label1.Caption:='Lesak.';
- da:=40;
- end;
- 5: begin
- zv:=270;
- Label1.Caption:='Rudnica.';
- da:=50;
- end;
- 6: begin
- zv:=300;
- Label1.Caption:='Raska.';
- da:=61;
- end;
- 7: Begin
- zv:=350;
- Label1.Caption:='Selevac.';
- da:=67;
- end;
- 8: begin
- zv:=420;
- Label1.Caption:='Usce.';
- da:=90;
- end;
- 9: Begin
- zv:=450;
- Label1.Caption:='Usce stanica.';
- da:=94;
- end;
- 10: begin
- zv:=700;
- Label1.Caption:='Kraljevo.';
- da:=150;
- end;
- end;
- end;
- 1: begin
- case RadioGroup2.ItemIndex of
- 0: begin
- Label1.Caption:='Zvecan.';
- zv:=45;
- da:=3;
- end;
- 1: begin
- zv:=65;
- Label1.Caption:='Grabovac.';
- da:=4;
- end;
- 2: begin
- zv:=105;
- Label1.Caption:='Socanica.';
- da:=24;
- end;
- 3: begin
- zv:=190;
- Label1.Caption:='Leposavic.';
- da:=35;
- end;
- 4: begin
- zv:=220;
- Label1.Caption:='Lesak.';
- da:=40;
- end;
- 5: begin
- zv:=250;
- Label1.Caption:='Rudnica.';
- da:=50;
- end;
- 6: begin
- zv:=290;
- Label1.Caption:='Raska.';
- da:=61;
- end;
- 7: Begin
- zv:=330;
- Label1.Caption:='Selevac.';
- end;
- 8: begin
- zv:=380;
- Label1.Caption:='Usce.';
- end;
- 9: Begin
- zv:=420;
- Label1.Caption:='Usce stanica.';
- end;
- 10: begin
- zv:=690;
- Label1.Caption:='Kraljevo.';
- end;
- end;
- end;
- 2: begin
- case RadioGroup2.ItemIndex of
- 0: begin
- Label1.Caption:='Zvecan.';
- zv:=45;
- end;
- 1: begin
- zv:=65;
- Label1.Caption:='Grabovac.';
- end;
- 2: begin
- zv:=100;
- Label1.Caption:='Socanica.';
- end;
- 3: begin
- zv:=180;
- Label1.Caption:='Leposavic.';
- end;
- 4: begin
- zv:=210;
- Label1.Caption:='Lesak.';
- end;
- 5: begin
- zv:=240;
- Label1.Caption:='Rudnica.';
- end;
- 6: begin
- zv:=260;
- Label1.Caption:='Raska.';
- end;
- 7: Begin
- zv:=300;
- Label1.Caption:='Selevac.';
- da:=67;
- end;
- 8: begin
- zv:=400;
- Label1.Caption:='Usce.';
- da:=90;
- end;
- 9: Begin
- zv:=410;
- Label1.Caption:='Usce stanica.';
- da:=94;
- end;
- 10: begin
- zv:=680;
- Label1.Caption:='Kraljevo.';
- da:=150;
- end;
- end;
- end;
- end;
- end;
- procedure TForm1.RadioGroup3Click(Sender: TObject);
- begin
- GroupBox2.Top:=256;
- RadioGroup4.ItemIndex:=-1;
- RadioGroup2.ItemIndex:=-1;
- Label8.Caption:='03:00h';
- Label9.Caption:='';
- Label10.Caption:='08:00h';
- Label11.Caption:='';
- Label12.Caption:='16:00h';
- Label13.Caption:='';
- Label14.Caption:='18:35h';
- Case ComboBox1.ItemIndex of
- 0: begin
- Case RadioGroup3.ItemIndex of
- 0: begin
- zv:=1000;
- da:=170;
- end;
- 1:begin
- zv:=1150;
- da:=235;
- end;
- 2:begin
- zv:=1250;
- da:=270;
- end;
- 3:begin
- zv:=1400;
- da:=345;
- end;
- end;
- case RadioGroup3.ItemIndex of
- 0: Label1.Caption:='Kragujevac.';
- 1: Label1.Caption:='Batocina.';
- 2: Label1.Caption:='Smederevo.';
- 3: Label1.Caption:='Beograd.';
- end;
- end;
- 1: begin
- Case RadioGroup3.ItemIndex of
- 0: begin
- zv:=990;
- da:=170;
- end;
- 1:begin
- zv:=1130;
- da:=235;
- end;
- 2:begin
- zv:=1220;
- da:=270;
- end;
- 3:begin
- zv:=1370;
- da:=245;
- end;
- end;
- case RadioGroup3.ItemIndex of
- 0: Label1.Caption:='Kragujevac.';
- 1: Label1.Caption:='Batocina.';
- 2: Label1.Caption:='Smederevo.';
- 3: Label1.Caption:='Beograd.';
- end;
- end;
- 2: begin
- Case RadioGroup3.ItemIndex of
- 0: begin
- zv:=980;
- da:=170;
- end;
- 1:begin
- zv:=1120;
- da:=235;
- end;
- 2:begin
- zv:=1210;
- da:=270;
- end;
- 3:begin
- zv:=1350;
- da:=345;
- end;
- end;
- case RadioGroup3.ItemIndex of
- 0: Label1.Caption:='Kragujevac.';
- 1: Label1.Caption:='Batocina.';
- 2: Label1.Caption:='Smederevo.';
- 3: Label1.Caption:='Beograd.';
- end;
- end;
- end;
- end;
- procedure TForm1.RadioGroup1Click(Sender: TObject);
- begin
- If ComboBox1.ItemIndex=-1 then
- begin
- ShowMessage('Niste odabrali prevoznika, izaberite jednog od ponudjenih.');
- ComboBox1.SetFocus;
- end
- else
- Case RadioGroup1.ItemIndex of
- 0: begin
- RadioGroup3.Visible:=true;
- RadioGroup4.Visible:=false;
- Label7.Caption:='Autoput.';
- end;
- 1: begin
- RadioGroup3.Visible:=false;
- RadioGroup4.Visible:=true;
- Label7.Caption:='Ib.Mag.';
- end;
- end;
- end;
- procedure TForm1.RadioGroup4Click(Sender: TObject);
- begin
- RadioGroup2.ItemIndex:=-1;
- RadioGroup3.ItemIndex:=-1;
- begin
- GroupBox2.Top:=256;
- Label8.Caption:='00:45h';
- Label9.Caption:='05:00h';
- Label10.Caption:='06:45h';
- Label11.Caption:='12:00h';
- Label12.Caption:='18:00h';
- Label13.Caption:='21:00h';
- Case ComboBox1.ItemIndex of
- 0: begin
- case RadioGroup4.ItemIndex of
- 0:begin
- zv:=800;
- da:=160;
- end;
- 1:begin
- zv:=760;
- da:=180;
- end;
- 2:begin
- zv:=940;
- da:=210;
- end;
- 3:begin
- zv:=1000;
- da:=236;
- end;
- 4:begin
- zv:=1150;
- da:=260;
- end;
- 5:begin
- zv:=1250;
- da:=300;
- end;
- 6:begin
- zv:=1350;
- da:=350;
- end;
- end;
- case RadioGroup4.ItemIndex of
- 0: Label1.Caption:='Mrcajevci.';
- 1: Label1.Caption:='Preljina.';
- 2: Label1.Caption:='Gornji Milanovac.';
- 3: Label1.Caption:='Ljig.';
- 4: Label1.Caption:='Stepojevac.';
- 5: Label1.Caption:='Lazarevac.';
- 6: Label1.Caption:='Beograd.';
- end;
- end;
- 1: begin
- case RadioGroup4.ItemIndex of
- 0:begin
- zv:=740;
- end;
- 1:begin
- zv:=770;
- end;
- 2:begin
- zv:=910;
- end;
- 3:begin
- zv:=950;
- end;
- 4:begin
- zv:=1100;
- end;
- 5:begin
- zv:=1200;
- end;
- 6:begin
- zv:=1300;
- end;
- end;
- case RadioGroup4.ItemIndex of
- 0: Label1.Caption:='Mrcajevci.';
- 1: Label1.Caption:='Preljina.';
- 2: Label1.Caption:='Gornji Milanovac.';
- 3: Label1.Caption:='Ljig.';
- 4: Label1.Caption:='Stepojevac.';
- 5: Label1.Caption:='Lazarevac.';
- 6: Label1.Caption:='Beograd.';
- end;
- end;
- 3: begin
- case RadioGroup4.ItemIndex of
- 0:begin
- zv:=720;
- end;
- 1:begin
- zv:=760;
- end;
- 2:begin
- zv:=900;
- end;
- 3:begin
- zv:=960;
- end;
- 4:begin
- zv:=1100;
- end;
- 5:begin
- zv:=1190;
- end;
- 6:begin
- zv:=1290;
- end;
- end;
- case RadioGroup4.ItemIndex of
- 0: Label1.Caption:='Mrcajevci.';
- 1: Label1.Caption:='Preljina.';
- 2: Label1.Caption:='Gornji Milanovac.';
- 3: Label1.Caption:='Ljig.';
- 4: Label1.Caption:='Stepojevac.';
- 5: Label1.Caption:='Lazarevac.';
- 6: Label1.Caption:='Beograd.';
- end;
- end;
- end;
- end;
- end;
- procedure TForm1.RadioGroup5Click(Sender: TObject);
- begin
- Label8.Caption:='01:45h';
- Label9.Caption:='';
- Label10.Caption:='05:40h';
- Label11.Caption:='';
- Label12.Caption:='13:00h';
- Label13.Caption:='';
- case RadioGroup5.ItemIndex of
- 0: begin
- zv:=390;
- da:=70;
- end;
- 1: begin
- zv:=425;
- da:=85;
- end;
- 2: begin
- zv:=550;
- da:=90;
- end;
- 3: begin
- zv:=700;
- da:=110;
- end;
- end;
- case RadioGroup5.ItemIndex of
- 0: Label1.Caption:='Osojane.';
- 1: Label1.Caption:='Klina.';
- 2: Label1.Caption:='Gorazdevac.';
- 3: Label1.Caption:='Siga, Brestovik.';
- end;
- end;
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- Label8.Caption:='';
- Label9.Caption:='';
- Label10.Caption:='';
- Label11.Caption:='';
- Label12.Caption:='';
- Label13.Caption:='';
- Label14.Caption:='';
- Label15.Caption:='';
- Label16.Caption:='';
- Label17.Caption:='';
- Label18.Caption:='';
- Label19.Caption:='';
- Label20.Caption:='';
- Label21.Caption:='';
- Label22.Caption:='';
- Label23.Caption:='';
- Label24.Caption:='';
- Label25.Caption:='';
- Label26.Caption:='';
- Label27.Caption:='';
- Label28.Caption:='';
- Label29.Caption:='';
- Label30.Caption:='';
- ComboBox1.ItemIndex:=-1;
- ComboBox1.Text:='Odaberite prevoznika:';
- Image1.Visible:=false;
- Image2.Visible:=false;
- Image3.Visible:=false;
- Image4.Visible:=false;
- Image5.Visible:=false;
- Image6.Visible:=false;
- Image7.Visible:=false;
- Image8.Visible:=false;
- ComboBox2.ItemIndex:=-1;
- ComboBox2.Text:='Odaberite popust:';
- ComboBox2.Top:=144;
- RadioGroup1.ItemIndex:=-1;
- RadioGroup2.ItemIndex:=-1;
- RadioGroup3.ItemIndex:=-1;
- RadioGroup4.ItemIndex:=-1;
- RadioGroup5.ItemIndex:=-1;
- RadioGroup2.Visible:=false;
- RadioGroup3.Visible:=false;
- RadioGroup4.Visible:=false;
- RadioGroup5.Visible:=false;
- Label1.Visible:=false;
- Label2.Visible:=false;
- Label3.Visible:=false;
- GroupBox2.Visible:=false;
- ComboBox2.Visible:=true;
- CheckBox1.Checked:=false;
- end;
- procedure TForm1.Button2Click(Sender: TObject);
- var
- s,p, sb:string;
- sb1:integer;
- begin
- i:=random(51);
- i:=i+1;
- sb1:=random(36445);
- sb1:=sb1+291;
- if ComboBox1.ItemIndex=-1 then
- begin
- ShowMessage('Niste odabrali prevoznika, izaberite jednog od ponudjenih.');
- ComboBox1.SetFocus;
- end
- else
- Label8.Visible:=true;
- Label9.Visible:=true;
- Label10.Visible:=true;
- Label11.Visible:=true;
- Label12.Visible:=true;
- Label13.Visible:=true;
- Label14.Visible:=true;
- Label15.Visible:=true;
- Label16.Visible:=true;
- Label17.Visible:=true;
- Label18.Visible:=true;
- Label19.Visible:=true;
- Label20.Visible:=true;
- Label21.Visible:=true;
- Label22.Visible:=true;
- Label23.Visible:=true;
- Label24.Visible:=true;
- Label25.Visible:=true;
- Label26.Visible:=true;
- Label27.Visible:=true;
- Label28.Visible:=true;
- Label29.Visible:=true;
- Label30.Visible:=true;
- begin
- If ComboBox2.ItemIndex=-1 then
- zv1:=zv;
- Str(i, s);
- Label3.Caption:=s;
- str(sb1, sb);
- Label30.Caption:=sb;
- Str(da:4:0, p);
- Label4.Caption:=p;
- Label4.Visible:=true;
- Label1.Visible:=true;
- Label2.Visible:=true;
- Label3.Visible:=true;
- GroupBox2.Visible:=true;
- if CheckBox1.Checked=true then
- Begin
- zv1:=zv*2*0.80;
- Str(zv1:6:1, x);
- Label2.Caption:=x;
- end
- else
- begin
- case ComboBox2.ItemIndex of
- 0: begin
- zv1:=zv;
- end;
- 1: begin
- zv1:=zv*0.70;
- end;
- 2: begin
- zv1:=zv*0.70;
- end;
- 3: begin
- zv1:=zv*0.80;
- end;
- 4: begin
- zv1:=zv*0;
- end;
- end;
- end;
- Str(zv1:6:0, x);
- Label2.Caption:=x;
- case ComboBox1.ItemIndex of
- 0: begin
- Image5.Visible:=false;
- Image6.Visible:=true;
- Image7.Visible:=false;
- Image8.Visible:=false;
- Label1.Visible:=true;
- end;
- 1: begin
- Image5.Visible:=true;
- Image6.Visible:=false;
- Image7.Visible:=false;
- Image8.Visible:=false;
- Label1.Visible:=true;
- Label1.Visible:=true;
- end;
- 2: begin
- Image5.Visible:=false;
- Image6.Visible:=false;
- Image7.Visible:=true;
- Image8.Visible:=false;
- Label1.Visible:=true;
- end;
- 3: begin
- Image5.Visible:=false;
- Image6.Visible:=false;
- Image7.Visible:=false;
- Image8.Visible:=true;
- Label1.Visible:=true;
- end;
- end;
- if RadioGroup5.Visible=false then
- If RadioGroup1.ItemIndex=-1 then
- begin
- Label7.Caption:='Ib.Mag';
- end
- else
- Label7.Caption:='Ib.Mag';
- end;
- end;
- procedure TForm1.Button3Click(Sender: TObject);
- begin
- close;
- end;
- procedure TForm1.RadioGroup6Click(Sender: TObject);
- begin
- Label8.Caption:='00:00h';
- Label9.Caption:='02:00h';
- Label10.Caption:='08:45h';
- Label11.Caption:='12:30h';
- Label12.Caption:='14:20h';
- Label13.Caption:='16:15h';
- Label14.Caption:='18:00';
- GroupBox2.Top:=256;
- case RadioGroup6.ItemIndex of
- 0: begin
- zv:=100;
- da:=20;
- end;
- 1: begin
- zv:=180;
- da:=31;
- end;
- 2: begin
- zv:=360;
- da:=52;
- end;
- 3: begin
- zv:=680;
- da:=81;
- end;
- 4: begin
- zv:=730;
- da:=002;
- end;
- 5: begin
- zv:=890;
- da:=145;
- end;
- 6: begin
- zv:=1000;
- da:=173;
- end;
- end;
- case RadioGroup6.ItemIndex of
- 0: Label1.Caption:='Vucitrn.';
- 1: Label1.Caption:='Milosevo.';
- 2: Label1.Caption:='Pristina.';
- 3: Label1.Caption:='Porujevo.';
- 4: Label1.Caption:='Kursumlija.';
- 5: Label1.Caption:='Prokuplje.';
- 6: Label1.Caption:='Nis.';
- end;
- end;
- procedure TForm1.RadioGroup7Click(Sender: TObject);
- begin
- If ComboBox1.ItemIndex=-1 then
- begin
- ShowMessage('Niste odabrali prevoznika, izaberite jednog od ponudjenih.');
- ComboBox1.SetFocus;
- end
- else
- Case RadioGroup7.ItemIndex of
- 0: begin
- RadioGroup5.Visible:=true;
- RadioGroup6.Visible:=false;
- Label7.Caption:='Nis.';
- end;
- 1: begin
- RadioGroup5.Visible:=false;
- RadioGroup6.Visible:=true;
- Label7.Caption:='Brestovik.';
- end;
- end;
- end;
- procedure TForm1.CheckBox1Click(Sender: TObject);
- begin
- Case ComboBox1.ItemIndex of
- 0:begin
- If CheckBox1.Checked=true then
- begin
- ComboBox2.Visible:=false;
- RadioGroup2.Top:=144;
- RadioGroup4.Top:=360;
- RadioGroup3.Top:=360;
- ComboBox2.ItemIndex:=-1;
- ComboBox2.Text:='Odaberite destinaciju';
- end
- else
- begin
- CheckBox1.Visible:=true;
- ComboBox2.Visible:=true;
- RadioGroup2.Top:=168;
- RadioGroup4.Top:=384;
- RadioGroup3.Top:=384;
- end;
- end;
- 1:begin
- If CheckBox1.Checked=true then
- begin
- ComboBox2.Visible:=false;
- RadioGroup2.Top:=144;
- RadioGroup4.Top:=360;
- RadioGroup3.Top:=360;
- ComboBox2.ItemIndex:=-1;
- ComboBox2.Text:='Odaberite destinaciju';
- end
- else
- begin
- CheckBox1.Visible:=true;
- ComboBox2.Visible:=true;
- RadioGroup2.Top:=168;
- RadioGroup4.Top:=384;
- RadioGroup3.Top:=384;
- end;
- end;
- 2:begin
- If CheckBox1.Checked=true then
- begin
- ComboBox2.Visible:=false;
- RadioGroup2.Top:=144;
- RadioGroup4.Top:=360;
- RadioGroup3.Top:=360;
- ComboBox2.ItemIndex:=-1;
- ComboBox2.Text:='Odaberite destinaciju';
- end
- else
- begin
- CheckBox1.Visible:=true;
- ComboBox2.Visible:=true;
- RadioGroup2.Top:=168;
- RadioGroup4.Top:=384;
- RadioGroup3.Top:=384;
- end;
- end;
- 3: begin
- If CheckBox1.Checked=true then
- begin
- ComboBox2.Visible:=false;
- RadioGroup5.Top:=144;
- RadioGroup6.Top:=144;
- ComboBox2.ItemIndex:=-1;
- ComboBox2.Text:='Odaberite destinaciju';
- end
- else
- begin
- CheckBox1.Visible:=true;
- ComboBox2.Visible:=true;
- RadioGroup5.Top:=144;
- RadioGroup6.Top:=176;
- end;
- end;
- end;
- end;
- procedure TForm1.CheckBox2Click(Sender: TObject);
- begin
- If CheckBox2.Checked then
- Button4.Enabled:=true
- else
- Button4.Enabled:=false;
- end;
- procedure TForm1.Button4Click(Sender: TObject);
- begin
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement