private void itemToolStripMenuItem_Click(object sender, EventArgs e) { frmItem item = new frmItem(); item.MdiParent = this; item.Show(); }
private void btnEditItem_Click(object sender, EventArgs e) { if (itemID != 0) { frmItem form = new frmItem(itemID, this); form.Show(); } else { MessageBox.Show("Please Select Item to Edit"); } }
private void itemToolStripMenuItem_Click(object sender, EventArgs e) { if (!itemFormOpen) { frmItem item = new frmItem(); item.MdiParent = this; item.StartPosition = FormStartPosition.CenterScreen; item.WindowState = FormWindowState.Maximized; item.Show(); itemFormOpen = true; } else { if (Application.OpenForms.OfType <frmItem>().Count() == 1) { Application.OpenForms.OfType <frmItem>().First().BringToFront(); } } }
private void btnCreateItem_Click(object sender, EventArgs e) { frmItem form = new frmItem(0, this); form.Show(); }