예제 #1
0
        private void UserControlKfz_MouseDoubleClick(object sender, EventArgs e)
        {
            FormKfz kfzForm = new FormKfz(this.Car);

            if (kfzForm.ShowDialog() == DialogResult.OK)
            {
                this.labelMarke.Text          = this.Car.Marke;
                this.labelModell.Text         = this.Car.Modell;
                this.labelKennzeichen.Text    = this.Car.KfzKennzeichen;
                this.labelDatumZulassung.Text = this.Car.DatumZulassung.ToShortDateString();
                this.labelGesamtkosten.Text   = Convert.ToString(this.Car.Gesamtkosten);
            }
        }
예제 #2
0
        private void menuItemNewKfz_Click(object sender, EventArgs e)
        {
            menuItemNewKfz.FlatAppearance.BorderColor = Color.FromArgb(0, 39, 50, 56); // get rid of border when unfocused
            PositioningNavigationPanel(this.menuItemNewKfz);
            if (panelList.Controls.Contains(pictureBoxHere))
            {
                panelList.Controls.Clear();
            }

            if (this.securedFile == null)
            {
                this.securedFile = new FileManager();
                this.securedFile.CreationDate = DateTime.Now;
            }

            FormKfz kfzForm = new FormKfz();

            if (kfzForm.ShowDialog() == DialogResult.OK)
            {
                LoadUserControl(kfzForm.Car);
            }
        }