private void toolStripButton1_Click(object sender, EventArgs e) { CarView f = new CarView(this); f.MdiParent = this; f.ReloadData(cars); f.Show(); }
private void addToolStripMenuItem_Click(object sender, EventArgs e) { CarView f = new CarView(this); f.MdiParent = this; f.ReloadData(cars); f.Show(); }
public ParentView() { InitializeComponent(); cars = new List <Car>(); cars.Add(new PAIN_Forms.Car(1, "Mazda", 180, 1999, CarType.Personal)); cars.Add(new Car(2, "Tesla", 300, 2017, CarType.Truck)); cars.Add(new Car(3, "Rower miejski", 15, 2017, CarType.Bike)); CarView f = new CarView(this); f.MdiParent = this; f.ReloadData(cars); f.Show(); }