private void btnNieuwChauffeur_Click(object sender, EventArgs e) { frmChauffeur = new Form(); frmChauffeur.Height = 625; frmChauffeur.Width = 760; frmChauffeur.Text = "Chauffeur Beheer"; frmChauffeur.StartPosition = FormStartPosition.CenterScreen; frmChauffeur.FormBorderStyle = FormBorderStyle.FixedSingle; frmChauffeur.AutoScroll = true; frmChauffeur.FormClosing += new FormClosingEventHandler(frmChauffeur_FormClosing); ucChauffeur ucChauffeur = new ucChauffeur(); frmChauffeur.Controls.Add(ucChauffeur); using (frmChauffeur) { if (frmChauffeur.ShowDialog() == DialogResult.OK) { cbbChauffeur.DataSource = ChauffeurManagement.getChauffeurs(); } frmChauffeur.Dispose(); } }
public frm_AddChauffeur(SplashScreenManager spl, ucChauffeur personne, object[] data = null) { InitializeComponent(); this.spl = spl; this.personne = personne; if (data != null) { this.data = data; } }