private void CRTotalSalesButton_Click(object sender, EventArgs e) { if (totalSales == null) { totalSales = new totalsalesform(); totalSales.MdiParent = this; totalSales.Dock = DockStyle.Fill; totalSales.Show(); totalSales.FormClosed += TotalSales_FormClosed; } else { totalSales.Activate(); } }
private void TotalSales_FormClosed(object sender, FormClosedEventArgs e) { totalSales = null; }