Beispiel #1
0
        private void testStartBtn_Click(object sender, EventArgs e)
        {
            // 연동 화면 열기

            /*
             * cameraPanel.Visible = true;
             * testPanel.Enabled = false;
             * testInfoPanel.Enabled = false;
             */
            if (selectedID == "")
            {
                MessageBox.Show("시험을 선택해주세요.", "시험 선택 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            if (!doesExistImage)
            {
                MessageBox.Show("본인을 식별할 수 있는 얼굴 이미지를 먼저 등록해주세요.", "이미지 등록", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            DateTime date             = DateTime.Now;
            double   diffTotalSeconds = (selectedTime - date).TotalSeconds;

            Console.WriteLine(diffTotalSeconds);
            if (diffTotalSeconds > 60 * 5)
            {
                MessageBox.Show("시험 5분 전부터 입장가능합니다.", "입장 불가", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            ExamView examView = new ExamView(mainController, selectedID, mainController.Me.ID, true);

            mainController.moveToNextForm(examView);
        }
        private void studentScoreTable_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex < 0)
                {
                    return;
                }

                if (MessageBox.Show("예: 학생 성적 수정\n아니오: 학생 북마크 확인", "학생 시험 정보", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    string   student_id = studentScoreTable.Rows[e.RowIndex].Cells[0].Value.ToString();
                    ExamView examView   = new ExamView(mainController, room_id, student_id, false);
                    mainController.moveToNextForm(examView);
                }
                else
                {
                    string student_id   = studentScoreTable.Rows[e.RowIndex].Cells[0].Value.ToString();
                    string student_name = studentScoreTable.Rows[e.RowIndex].Cells[1].Value.ToString();
                    //string student_name = "손조나단";
                    //string student_id = "17011445";

                    BookMarkView bookMarkView = new BookMarkView(mainController, student_id, room_id, student_name);
                    mainController.moveToNextForm(bookMarkView);
                }
            }
            catch (Exception error)
            {
                Console.WriteLine(error);
            }
        }