private void ticketTypeMenuItem_Click(object sender, EventArgs e) { if (!checkTab("ticketType")) { TicketTypeForm tf = new TicketTypeForm(); ControlDisposer disp = new ControlDisposer(tf, this, "ticketType"); tf.setDisposer(disp); addTab("Типы билетов", "ticketType", tf); tf.initialize(); } }
private void ticketsButton_Click(object sender, EventArgs e) { string selectedDate = this.dateBox.SelectedItem.ToString(); string selectedTime = this.hourBox.SelectedItem.ToString(); DateTime screeningDate = screeningService.GetDateTimeFromDateAndTime(selectedDate, selectedTime); TicketForm.Screening = screeningService.GetScreening(this._townName, this._cinemaName, this._movieName, screeningDate); TicketTypeForm ticketTypeForm = new TicketTypeForm(); ticketTypeForm.TopLevel = false; ticketTypeForm.AutoScroll = true; this.Parent.Controls.Add(ticketTypeForm); ticketTypeForm.Show(); this.Hide(); }