protected internal static DiscountForm Instance() { if (_instance == null) { _instance = new DiscountForm(); } return(_instance); }
private void btnDiscount_Click(object sender, EventArgs e) { if (!panel3.Controls.Contains(DiscountForm.Instance())) { panel3.Controls.Add(DiscountForm._instance); DiscountForm._instance.Dock = DockStyle.Fill; DiscountForm._instance.BringToFront(); DiscountForm._instance.Visible = true; } DiscountForm._instance.BringToFront(); DiscountForm._instance.Visible = true; }