Пример #1
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            CarView f = new CarView(this);

            f.MdiParent = this;
            f.ReloadData(cars);
            f.Show();
        }
Пример #2
0
        private void addToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CarView f = new CarView(this);

            f.MdiParent = this;
            f.ReloadData(cars);
            f.Show();
        }
Пример #3
0
        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();
        }