private void CRReceiptButton_Click(object sender, EventArgs e) { if (receipt == null) { receipt = new ReceiptForm(); receipt.MdiParent = this; receipt.Dock = DockStyle.Fill; receipt.Show(); receipt.FormClosed += Receipt_FormClosed; } else { receipt.Activate(); } }
private void Receipt_FormClosed(object sender, FormClosedEventArgs e) { receipt = null; }