Ejemplo n.º 1
0
        public FormKfz(Car car)
        {
            InitializeComponent();
            this.car = car;
            this.comboBoxMarke.Text           = car.Marke;
            this.textBoxModell.Text           = car.Modell;
            this.textBoxKennzeichen.Text      = car.KfzKennzeichen;
            this.dateTimePickerZulassung.Text = car.DatumZulassung.ToShortDateString();
            this.textBoxKW.Text                = Convert.ToString(car.LeistungKW);
            this.textBoxPS.Text                = Convert.ToString(car.LeistungPS);
            this.textBoxFarbe.Text             = car.Farbe;
            this.textBoxFarbe.BackColor        = ColorTranslator.FromHtml(car.FarbeBackground);
            this.textBoxWartungsintervall.Text = Convert.ToString(car.Wartungsintervall);

            GetLogo(this.comboBoxMarke.Text);

            UserControlCost uc = null;

            foreach (Cost cost in car.Costs)
            {
                uc = new UserControlCost(cost);
                this.panelListCosts.Controls.Add(uc);
            }
        }
Ejemplo n.º 2
0
        private void buttonAddUserControlCosts_Click(object sender, EventArgs e)
        {
            UserControlCost uc = new UserControlCost();

            this.panelListCosts.Controls.Add(uc);
        }