private void loadCartToolStripMenuItem_Click(object sender, EventArgs e) { using (СartForm cartForm = new СartForm(Manager, true)) { this.Hide(); cartForm.ShowDialog(); this.Show(); } }
private void viewCartToolStripMenuItem_Click(object sender, EventArgs e) { if (Manager.userCart.Items.Count > 0) { using (СartForm cartForm = new СartForm(Manager, false)) { this.Hide(); cartForm.ShowDialog(); this.Show(); } } else { MessageBox.Show("There are no items in the cart"); } }