private void btnCancel_Click(object sender, EventArgs e) { var vehicleListing = new ManageVehicleListing(); vehicleListing.MdiParent = this.MdiParent; vehicleListing.Show(); this.Close(); }
private void manageVehicleListingToolStripMenuItem_Click(object sender, EventArgs e) { ManageVehicleListing mvl = new ManageVehicleListing(); mvl.MdiParent = this; mvl.WindowState = FormWindowState.Maximized; mvl.Show(); }
private void manageVehicleListingToolStripMenuItem_Click(object sender, EventArgs e) { if (!Utils.FormIsOpen("ManageVehicleListing")) { var vehicleListing = new ManageVehicleListing(); vehicleListing.MdiParent = this; vehicleListing.Show(); } }
private void manageVehicleListingToolStripMenuItem_Click(object sender, EventArgs e) { var OpenForms = Application.OpenForms.Cast <Form>(); var isOpen = OpenForms.Any(q => q.Name == "ManageVehicleListing"); if (!isOpen) { var vehicleListing = new ManageVehicleListing(); vehicleListing.MdiParent = this; vehicleListing.Show(); } }