public Let(double duztr, Avion a, bool inc, List <Putnik> niz) { duzinaTrajanja = duztr; airplane = a; desioSeIncident = inc; this.nizPutnika = new List <Putnik>(niz); }
public Let() { duzinaTrajanja = 0; nizPutnika = null; airplane = new Avion(); desioSeIncident = false; }
public Let(Let l) { duzinaTrajanja = l.duzinaTrajanja; airplane = l.airplane; desioSeIncident = l.desioSeIncident; this.nizPutnika = new List <Putnik>(l.nizPutnika); }
public Avion(Avion a) { cena = a.cena; brputnika = a.brputnika; brstjuardesa = a.brstjuardesa; brpilota = a.brpilota; maksdist = a.maksdist; dim = a.dim; brzina = a.brzina; }
private void izborAviona_SelectedIndexChanged(object sender, EventArgs e) { int dosad = 0; for (int i = 0; i < izborAviona.Items.Count; i++) { CheckState st = izborAviona.GetItemCheckState(izborAviona.Items.IndexOf(i)); if (st == CheckState.Checked) { if (dosad >= 2) { avioni_ok = false; } else { izabAvioni[dosad] = new Avion(main.Players[main.CurrentPlayer].Avioni[i]); dosad++; } } } if (!drom_ok) { duzinaPuta.Text = ""; validSve.Text = "Ne"; trajanjeLeta.Text = ""; return; } int duzPut = (int)(izabDrom[0].Rastojanje(izabDrom[1])); duzinaPuta.Text = duzPut.toString(); if (!avioni_ok) { duzinaPuta.Text = duzPut.ToString(); validSve.Text = "Ne"; trajanjeLeta.Text = ""; return; } int duzina1 = (int)(duzPut / izabAvioni[0].Brzina); int duzina2 = (int)(duzPut / izabAvioni[1].Brzina); int duzina = (duzina1 + duzina2) / 2; if (duzina == 0) { duzina = 1; } trajanjeLeta.Text = duzina.ToString(); validSve.Text = "Da"; }
private void Form2_Load(object sender, EventArgs e) { while (!sr.EndOfStream) { string s = sr.ReadLine(); string[] st = new string[100]; st = s.Split(';'); string[] d = new string[3]; string str = s[6].ToString(); d = str.Split('*'); Avion a = new Avion(st[0], Convert.ToDouble(st[1]), Convert.ToInt32(st[2]), Convert.ToInt32(st[3]), Convert.ToInt32(st[4]), Convert.ToDouble(st[5]), Convert.ToDouble(d[0]), Convert.ToDouble(d[1]), Convert.ToDouble(d[2]), Convert.ToDouble(st[7])); avioni.Add(a); } }