private void Ticket_Click(object sender, EventArgs e) { if (IsNotClosed(Ticket)) { var tf = new TicketForm(this); tf.ShowDialog(); } }
private void BtnCreateTicket_Click(object sender, EventArgs e) { using (var TF = new TicketForm()) { if (TF.ShowDialog() == DialogResult.OK) { TicketsList.Insert(0, TF.Ticket); if (btnShowAll.Checked || btnShowOpened.Checked) { InsertTicketPanelAt0(TF.Ticket); } } } }