private void button1_Click(object sender, EventArgs e) { PrintTicketForm PT = this.Owner as PrintTicketForm; CreateTicket?.Invoke(this, new ShowTicketOnScreenEventArgs(printedTicket)); MessageBox.Show("Талон распечатан", "Готово", MessageBoxButtons.OK, MessageBoxIcon.Information); Close(); }
private void PrintTicketBtn_Click(object sender, EventArgs e) { PrintTicketForm PT = new PrintTicketForm(); PT.Owner = this; IPrintTicketViewRef = PT; PrintTicket_Click?.Invoke(this, EventArgs.Empty); PT.Show(); }
private void ShowTicketOnScreen_FormClosing(object sender, FormClosingEventArgs e) { PrintTicketForm PT = this.Owner as PrintTicketForm; PT.Visible = true; }