private void editToolStripMenuItem_Click(object sender, EventArgs e) { AddProduct p = new AddProduct(MyProduct); p.ShowDialog(); UpdateProduct?.Invoke(this, EventArgs.Empty); //button1.BackColor = Color.Aqua; }
private void AddBTN_Click(object sender, EventArgs e) { AddProduct AddProduct = new AddProduct(); var result = AddProduct.ShowDialog(); if (result == DialogResult.OK) { flowLayoutPanel1.Controls.Clear(); initializeProductsToUi(); } //this.Close(); }