/// <summary> /// Creates the MainCtlr, which handles the MainMenu functionality and form /// </summary> public MainController(DBConnector dbc, User user, MasterForm mf) { Console.WriteLine("MainController created."); this.mf = mf; this.dbc = dbc; curUser = user; sectlr = new SelectEmployeeController(dbc, this, mf); aactlr = new AlterAvailabilityController(dbc, this, mf); gsctlr = new GenerateScheduleController(dbc, this, mf); dsctlr = new DisplayScheduleController(dbc, this, mf); mmform = new MainMenuForm(curUser, this, mf); }//end MainController constructor
public DisplayScheduleForm(DisplayScheduleController dsctlr, MasterForm mf) { Console.WriteLine("DisplayScheduleForm created."); // form properties this.mf = mf; this.dsctlr = dsctlr; mf.Text += " - Display Schedule"; this.Size = new Size(375, 340); mf.Size = new Size(375, 340); //title label titleLabel = new Label(); titleLabel.Size = new Size(195, 30); titleLabel.Location = new Point(5, 5); titleLabel.Text = "Display Schedule"; titleLabel.Font = new Font("Areil", 16); titleLabel.ForeColor = System.Drawing.Color.Orange; this.Controls.Add(titleLabel); // displayScheduleLabel displayScheduleLabel = new Label(); displayScheduleLabel.Size = new Size(290, 260); displayScheduleLabel.Location = new Point(50, 10); displayScheduleLabel.Font = new Font("Arial", 11); this.Controls.Add(displayScheduleLabel); // back button back = new Button(); back.Size = new Size(75, 30); back.Location = new Point(50, 275); back.Text = "Back"; this.Controls.Add(back); back.Click += new EventHandler(backButtonHandler); back.BackColor = System.Drawing.Color.Orange; back.ForeColor = System.Drawing.Color.White; back.FlatStyle = FlatStyle.Flat; back.Font = new Font("Arial", 11, FontStyle.Bold); back.TextAlign = ContentAlignment.MiddleCenter; // add panel to MasterForm mf.Controls.Add(this); }//end DisplayScheduleForm constructor