Beispiel #1
0
        public LabroomForm(LoginForm login)
        {
            InitializeComponent();

            // set various parameter and UI element values
            Login = login;
            labMember = Login.username;
            labmemberName = Login.name[0] + " " + Login.name[1];
            labmemberFillLabel.Text = labmemberName;
            loginTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            loginTimeFillLabel.Text = loginTime;
        }
Beispiel #2
0
        public LabroomForm(LoginForm login)
        {
            InitializeComponent();

            Login = login;

            labMember = Login.user;
            labmemberName = Login.name[0] + " " + Login.name[1];
            labmemberFillLabel.Text = labmemberName;
            loginTime = DateTime.Now;
            loginTimeFillLabel.Text = loginTime.ToShortTimeString() + " " + loginTime.ToLongDateString();
        }
Beispiel #3
0
        public LogForm(LabroomForm labroomForm, string labroom, LoginForm login)
        {
            InitializeComponent();

            this.Login = login;
            this.Labroom = labroomForm;
            this.labroom = labroom;

            labmemberFillLabel.Text = Login.name[0] + " " + Login.name[1];
            checkinFillLabel.Text = this.labroom + ", " + DateTime.Now.ToShortTimeString()
                                                 +  " " + DateTime.Now.ToLongDateString();
            // get monkey data from config
            Dictionary<string, Dictionary<string, string>> monkeys = Login.config.monkey_data;

            // get monkeys for this labroom
            var monks = from monkey in monkeys
                        where monkey.Value["room"].Equals(this.labroom)
                        orderby monkey.Value["station"] ascending
                        select monkey;

            int index = 0;
            numMonks = monks.ToArray().Length;
            int half = numMonks / 2;

            // GET ORDERING RIGHT
            foreach (var m in monks)
            {
                LogBox monkLogbox = new LogBox(m.Key, m.Value["station"], this.labroom, Login.config);

                //add half to left, half to right
                if (index < half)
                    this.leftLayoutPanel.Controls.Add(monkLogbox);
                else
                    this.rightLayoutPanel.Controls.Add(monkLogbox);
                index++;
            }
        }
Beispiel #4
0
        public LogForm(LabroomForm labroom, int roomNum, LoginForm login)
        {
            InitializeComponent();

            Login = login;
            Labroom = labroom;
            labroomNum = roomNum;

            labmemberFillLabel.Text = Login.name[0] + " " + Login.name[1];
            checkinFillLabel.Text = "Labroom " + labroomNum.ToString()
                + ", " + DateTime.Now.ToShortTimeString()
                + " " + DateTime.Now.ToLongDateString();

            PCRLLogbookDBDataSet1.MonkeyDataTable monkeys = this.monkeyTableAdapter.GetData();

            var monks =
                from monkey in monkeys
                where monkey.LabRoom.Equals(labroomNum)
                select monkey;

            int index = 0;
            numMonks = monks.ToArray().Length;
            int half = numMonks / 2;

            foreach (var m in monks)
            {
                LogBox monkLogbox = new LogBox(m.MID, Convert.ToInt16(m.Station), labroomNum);

                //add half to left, half to right
                if (index < half)
                    this.leftLayoutPanel.Controls.Add(monkLogbox);
                else
                    this.rightLayoutPanel.Controls.Add(monkLogbox);
                index++;
            }
        }
 public CreateAccountForm(LoginForm login)
 {
     InitializeComponent();
     Login = login;
 }