Ejemplo n.º 1
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     bookingsListControl.Visible = true;
     chooseDateControl.Visible   = false;
     showingsListControl.Visible = true;
     RequestBookingsList?.Invoke();
 }
Ejemplo n.º 2
0
 private void mojeRezerwacjeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     bookingsListControl.Visible = true;
     chooseDateControl.Visible   = false;
     showingsListControl.Visible = false;
     RequestBookingsList?.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);
        }