Beispiel #1
0
        public Alarm(HomePage _homePage, Mysql_Connect connect, Form1 _form1)
        {
            InitializeComponent();
            string[] _Hour    = new string[24];
            string[] _minutes = new string[60];
            form1             = _form1;
            _connect          = connect;
            homePage          = _homePage;
            _emergencyRequest = new Request_Emergency(_connect, form1);

            for (int i = 0; i < _Hour.Length; i++)
            {
                _Hour[i] = i.ToString();
            }
            for (int i = 0; i < _minutes.Length; i++)
            {
                _minutes[i] = i.ToString();
            }

            this.Hour_Box.Items.AddRange(_Hour);
            this.Minute_Box.Items.AddRange(_minutes);
            button1.BackgroundImageLayout = ImageLayout.Stretch;
            // Load current alarms the user has already
            Display_Alarms();
        }
Beispiel #2
0
 public Shower(HomePage _homePage, Mysql_Connect _connect, Form1 _form1)
 {
     _hour    = "";
     _minute  = "";
     _time    = "";
     _type    = "";
     form1    = _form1;
     homePage = _homePage;
     connect  = _connect;
     InitializeComponent();
     _emergencyRequest = new Request_Emergency(_connect, form1);
     string[] _hours = new string[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24" };
     this.comboBox1.Items.AddRange(_hours);
     string[] _minutes = new string[] { "05", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55" };
     this.comboBox2.Items.AddRange(_minutes);
     button1.BackgroundImageLayout = ImageLayout.Stretch;
     toolTip1.SetToolTip(button3, "Request Emergency");
 }
Beispiel #3
0
        public HomePage(Form1 form1, Mysql_Connect connect)
        {
            this.form1 = form1;
            InitializeComponent();
            _connect          = connect;
            _emergencyRequest = new Request_Emergency(_connect, form1);

            ////Initialize button icons to fit button size
            BreakFast_Button.BackgroundImageLayout = ImageLayout.Stretch;
            LunchButton.BackgroundImageLayout      = ImageLayout.Stretch;
            Dinner_Button.BackgroundImageLayout    = ImageLayout.Stretch;
            button9.BackgroundImageLayout          = ImageLayout.Stretch;
            button4.BackgroundImageLayout          = ImageLayout.Stretch;
            button5.BackgroundImageLayout          = ImageLayout.Stretch;
            button6.BackgroundImageLayout          = ImageLayout.Stretch;

            button8.BackgroundImageLayout  = ImageLayout.Stretch;
            button10.BackgroundImageLayout = ImageLayout.Stretch;
        }
        public Order_Food(HomePage _homePage, Mysql_Connect connect, Form1 _form1, Request_Emergency request_emerg, string mealType)
        {
            InitializeComponent();
            form1 = _form1;
            _connect = connect;
            homePage = _homePage;
            _request_emerg = request_emerg;
            button1.BackgroundImageLayout = ImageLayout.Stretch;

            // Set meal type depending on what button the user clicked on the home page
            _mealType = mealType;

            // Change the text of the header so that it matches what meal the
            // user wants (Breakfast, lunch, dinner, etc)
            MealType_Header.Text = mealType;

            // Start off with one checkbox checked so that some meals are already shown
            ColdCheckbox.Checked = true;
            Update_ComboxBox();
        }
Beispiel #5
0
        public Visitor(HomePage _homePage, Mysql_Connect connect, Form1 _form1)
        {
            InitializeComponent();
            this._homePage    = _homePage;
            this._connect     = connect;
            this.form1        = _form1;
            _firstName        = "";
            _lastName         = "";
            _hour             = "";
            _minute           = "";
            _date             = "";
            _time             = "";
            _emergencyRequest = new Request_Emergency(_connect, form1);

            string[] _hours = new string[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24" };
            this.comboBox1.Items.AddRange(_hours);
            string[] _minutes = new string[] { "05", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55" };
            this.comboBox2.Items.AddRange(_minutes);
            button1.BackgroundImageLayout = ImageLayout.Stretch;
            button3.BackgroundImageLayout = ImageLayout.Stretch;
        }