Example #1
0
 private void repertuarToolStripMenuItem_Click(object sender, EventArgs e)
 {
     bookingsListControl.Visible = false;
     chooseDateControl.Visible   = true;
     showingsListControl.Visible = false;
     RequestShowingsDates?.Invoke();
 }
        private void InitializeMainForm(string username)
        {
            mainForm = new MainForm();
            mainForm.RequestLogOut        += () => RequestLogOut?.Invoke();
            mainForm.RequestBookingsList  += () => RequestBookingsList?.Invoke();
            mainForm.RequestShowingsList  += (DateTime date) => RequestShowingsList?.Invoke(date);
            mainForm.RequestSeatsList     += (int showingId) => RequestSeatsList.Invoke(showingId);
            mainForm.RequestShowingsDates += () => RequestShowingsDates?.Invoke();
            mainForm.RequestBookShowing   += (BookSeatsRequest request) => RequestBookShowing?.Invoke(request);

            mainForm.FormClosing += (object sender, FormClosingEventArgs e) => activeForm = null;

            mainForm.SetLoggedUser(username);
        }
Example #3
0
        public MainForm()
        {
            bookingsListControl = new BookingsList();
            chooseDateControl   = new DateControl();
            showingsListControl = new ShowingsListBox();
            seatsViewControl    = new SeatsView();

            InitializeControl(bookingsListControl);
            InitializeControl(chooseDateControl);
            InitializeControl(showingsListControl);
            InitializeControl(seatsViewControl);
            InitializeComponent();

            chooseDateControl.RequestShowingsDates += () => RequestShowingsDates?.Invoke();
            chooseDateControl.RequestShowingsList  += (DateTime date) => RequestShowingsList?.Invoke(date);
            showingsListControl.RequestSeatsList   += (int id) => RequestSeatsList?.Invoke(id);
            seatsViewControl.RequestBookShowing    += (BookSeatsRequest request) => RequestBookShowing?.Invoke(request);
        }
Example #4
0
 private void DateControl_Load(object sender, EventArgs e)
 {
     RequestShowingsDates?.Invoke();
 }