Esempio n. 1
0
 public StudentCell(Student student, RollcallStudent.State state) : this()
 {
     this.student              = student;
     this.studentIdTxt.Text    = student.studentId;
     this.absentReasonTxt.Text = "";
     this.studentNameTxt.Text  = student.name;
     this.ipTxt.Text           = student.ip;
     this.studentPicture.Image = Properties.Resources.anonymous;
     this.state = state;
     Anchor     = AnchorStyles.None;
     remainCentralized();
 }
        public void addStudent(Student student, RollcallStudent.State state,
                               bool autoRowAndColl = true)
        {
            StudentCell studentCell = new StudentCell(student, state);

            if (cellTable.ContainsKey(student))
            {
                var cell = cellTable[student];
                cell.state = state;
            }
            else
            {   // cells can be observable if the listener set
                studentCell.onStudentCellRightClicked += this.onStudentCellClicked;
                studentCell.onStudentCellMouseMove    += this.onStudentCellMouseMove;
                studentCell.onStudentCellMouseLeave   += this.onStudentCellMouseLeave;
                Controls.Add(studentCell);
                cellTable[student] = studentCell;
            }

            if (autoRowAndColl)
            {
                alterRowAndColumnCount();
            }
        }
Esempio n. 3
0
 public void updateStudentState(Student student, RollcallStudent.State state)
 {
     studentsInfoTableLayoutPanel.addStudent(student, state);
 }