//show form to edit piece private void selectedPieceToolStripMenuItem_Click(object sender, EventArgs e) { if (addeditPiece == null || addeditPiece.IsDisposed) { addeditPiece = new NewPiece(this, pieces[selectedPiece]); } this.Enabled = false; addeditPiece.Show(); }
//show form to add a piece private void newPieceToolStripMenuItem_Click(object sender, EventArgs e) { if (addeditPiece == null || addeditPiece.IsDisposed) { addeditPiece = new NewPiece(this, new CatalogPiece()); } this.Enabled = false; addeditPiece.Show(); }