コード例 #1
0
        public OXPanel(CustomFonts customFonts) : base(customFonts)
        {
            this.Size = new System.Drawing.Size(645, 45);

            answer = 1;
            Type   = 0;

            oButton           = new Button();
            oButton.Text      = "○";
            oButton.BackColor = Color.Black;
            oButton.ForeColor = Color.White;
            oButton.Location  = new System.Drawing.Point(460, 8);
            oButton.Size      = new System.Drawing.Size(30, 28);
            oButton.FlatAppearance.BorderSize = 0;
            oButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            oButton.Font      = customFonts.TextBoxFont();
            this.Controls.Add(oButton);
            oButton.Click += oButton_Click_1;

            xButton          = new Button();
            xButton.Text     = "✕";
            xButton.Location = new System.Drawing.Point(490, 8);
            xButton.Size     = new System.Drawing.Size(30, 28);
            xButton.FlatAppearance.BorderSize = 0;
            xButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            xButton.Font      = customFonts.LabelFont();
            this.Controls.Add(xButton);
            xButton.Click += xButton_Click_1;

            QuestionTextBox.Size       = new System.Drawing.Size(450, 45);
            QuestionTextBox.LostFocus += questionTextBox_LostFocus_1;

            QuestionLabel.MaximumSize = new System.Drawing.Size(450, 0);
            QuestionLabel.Click      += questionLabel_Click_1;
        }
コード例 #2
0
        private void StudentLectureEditView_Load(object sender, EventArgs e)
        {
            selectedID  = new List <string>();
            myLectureID = new List <string>();
            // 테이블 행 추가
            lectureTable.ColumnCount        = 6;
            lectureTable.Columns[5].Name    = "id";
            lectureTable.Columns[5].Visible = false;

            myLectureTable.ColumnCount        = 5;
            myLectureTable.Columns[4].Name    = "id";
            myLectureTable.Columns[4].Visible = false;

            setAllLectrues();
            setMyLectures();

            // 이미지
            lecturePictureBox.SizeMode = PictureBoxSizeMode.StretchImage;
            lecturePictureBox.Image    = System.Drawing.Image.FromFile("./src/Assets/Images/lecture.png");

            // 폰트
            CustomFonts customFonts = new CustomFonts();

            // NormalFont : 10f
            // LabelFont : 13f
            // TextBoxFont : 12f
            // SmallFont : 8f
            // TitleFont: 20f
            // SubTitleFont : 17f

            minimizeButton.Font = customFonts.LabelFont();
            exitButton.Font     = customFonts.LabelFont();

            professorNameLbl.Font = customFonts.LabelFont();
            lectureNameLbl.Font   = customFonts.LabelFont();

            myLectureLbl.Font = customFonts.SubTitleFont();

            lectureNameTxtBox.Font   = customFonts.TextBoxFont();
            professorNameTxtBox.Font = customFonts.TextBoxFont();

            //상단바
            this.topBarPanel          = new TopBarPanel(customFonts);
            this.topBarPanel.Location = new Point(0, 0);
            this.Controls.Add(topBarPanel);
        }
コード例 #3
0
        private void initFont(CustomFonts customFonts)
        {
            lectureTable.Font = customFonts.NormalFont();

            univLabel.Font  = customFonts.LabelFont();
            nameLabel.Font  = customFonts.LabelFont();
            emailLabel.Font = customFonts.LabelFont();

            editBirthLabel.Font         = customFonts.LabelFont();
            editEmailLabel.Font         = customFonts.LabelFont();
            editNameLabel.Font          = customFonts.LabelFont();
            editPasswordCheckLabel.Font = customFonts.LabelFont();
            editPasswordLabel.Font      = customFonts.LabelFont();
            editUnivLabel.Font          = customFonts.LabelFont();

            editUnivTextBox.Font          = customFonts.TextBoxFont();
            editNameTextBox.Font          = customFonts.TextBoxFont();
            editEmailTextBox.Font         = customFonts.TextBoxFont();
            editPasswordTextBox.Font      = customFonts.TextBoxFont();
            editPasswordCheckTextBox.Font = customFonts.TextBoxFont();
            editBirthPicker.Font          = customFonts.TextBoxFont();

            testInfoLectureLbl.Font  = customFonts.TitleFont();
            testInfoTestNameLbl.Font = customFonts.SubTitleFont();
            testInfoProfNameLbl.Font = customFonts.LabelFont();
            testInfoDayLbl.Font      = customFonts.LabelFont();
            testInfoTimeLbl.Font     = customFonts.LabelFont();
        }
コード例 #4
0
 private void initFont()
 {
     this.examNameLabel.Font           = customFonts.LabelFont();
     this.examNameTextBox.Font         = customFonts.TextBoxFont();
     this.examLectureNameLabel.Font    = customFonts.LabelFont();
     this.examLectureNameComboBox.Font = customFonts.LabelFont();
     this.examPercentLabel.Font        = customFonts.LabelFont();
     this.examPercentLabel2.Font       = customFonts.LabelFont();
     this.examPercentTextBox.Font      = customFonts.TextBoxFont();
     this.examPeriodLabel.Font         = customFonts.LabelFont();
     this.startDateTimePicker.Font     = customFonts.TextBoxFont();
     this.endDateTimePicker.Font       = customFonts.TextBoxFont();
     this.startDateTimeLabel.Font      = customFonts.TextBoxFont();
     this.endDateTimeLabel.Font        = customFonts.TextBoxFont();
     this.saveButton.Font        = customFonts.LabelFont();
     this.cancelButton.Font      = customFonts.LabelFont();
     this.examShortCutLabel.Font = customFonts.LabelFont();
 }
コード例 #5
0
        // 로그인 뷰 로드
        private void LoginView_Load_1(object sender, EventArgs e)
        {
            emailTextBox.Text    = "*****@*****.**";
            passwordTextBox.Text = "**********";
            loginButton.Focus();

            // Font setting
            customFonts = new CustomFonts();

            //상단바
            this.topBarPanel          = new TopBarPanel(customFonts, true);
            this.topBarPanel.Location = new Point(0, 0);
            this.Controls.Add(topBarPanel);

            //Image panel backgroundimage setting
            string backgroundImageRoute = "./src/Assets/Images/Login.jpg";

            System.IO.FileInfo backgroundImage = new System.IO.FileInfo(backgroundImageRoute);
            if (backgroundImage.Exists)
            {
                imagePanel.BackgroundImage       = Bitmap.FromFile(backgroundImageRoute);
                imagePanel.BackgroundImageLayout = ImageLayout.Stretch;
            }
            else
            {
                MessageBox.Show("LoginView 배경 이미지가 존재하지 않습니다.");
            }


            emailLabel.Font      = customFonts.LabelFont();
            emailTextBox.Font    = customFonts.TextBoxFont();
            passwordLabel.Font   = customFonts.LabelFont();
            passwordTextBox.Font = customFonts.TextBoxFont();
            loginButton.Font     = customFonts.LabelFont();
            registerButton.Font  = customFonts.LabelFont();
            copyrightLabel.Font  = customFonts.CopyRightFont();

            // 회원가입 패널 폰트 설정

            // 학교
            signupUnivLabel.Font   = customFonts.LabelFont();
            signupUnivTextBox.Font = customFonts.TextBoxFont();
            signupUnivButton.Font  = customFonts.TextBoxFont();

            // 학번
            signupStdNumLabel.Font   = customFonts.LabelFont();
            signupStdNumTextBox.Font = customFonts.TextBoxFont();

            // 이름
            signupNameLabel.Font   = customFonts.LabelFont();
            signupNameTextBox.Font = customFonts.TextBoxFont();

            // 이메일
            signupEmailLabel.Font   = customFonts.LabelFont();
            signupEmailTextBox.Font = customFonts.TextBoxFont();

            // 비밀번호
            signupPasswordLabel.Font   = customFonts.LabelFont();
            signupPasswordTextBox.Font = customFonts.TextBoxFont();

            // 비밀번호 확인
            signupPasswordCheckLabel.Font   = customFonts.LabelFont();
            signupPasswordCheckTextBox.Font = customFonts.TextBoxFont();

            // 생년월일
            signupBirthLabel.Font  = customFonts.LabelFont();
            signupBirthPicker.Font = customFonts.TextBoxFont();

            // 구분
            signupPositionLabel.Font    = customFonts.LabelFont();
            signupPositionComboBox.Font = customFonts.NormalFont();

            // 버튼
            signupButton.Font       = customFonts.TextBoxFont();
            signupCancelButton.Font = customFonts.TextBoxFont();

            // 라디오 버튼
            studentRadioBtn.Font   = customFonts.NormalFont();
            professorRadioBtn.Font = customFonts.NormalFont();

            // ComboBox setting
            signupPositionComboBox.Items.Clear();
            signupPositionComboBox.Items.Add("학생");
            signupPositionComboBox.Items.Add("교수");
        }
コード例 #6
0
        private void VideoView_Load(object sender, EventArgs e)
        {
            // 폰트
            CustomFonts customFonts = new CustomFonts();

            // NormalFont : 10f
            // LabelFont : 13f
            // TextBoxFont : 12f
            // SmallFont : 8f
            // TitleFont: 20f
            // SubTitleFont : 17f

            status = false;

            bookMarkLbl.Font   = customFonts.SubTitleFont();
            exitBtn.Font       = customFonts.TextBoxFont();
            bookMarkTable.Font = customFonts.NormalFont();


            // 이미지
            bookMarkPictureBox.SizeMode = PictureBoxSizeMode.StretchImage;
            bookMarkPictureBox.Image    = System.Drawing.Image.FromFile("./src/Assets/Images/face.png");

            // 상단바
            this.topBarPanel          = new TopBarPanel(customFonts);
            this.topBarPanel.Location = new Point(0, 0);
            this.Controls.Add(topBarPanel);

            // 테이블 Sample

            /*
             * bookMarkTable.Rows.Add("17011484", "백인창", "2020-12-01 00:57:04", "Audio");
             * bookMarkTable.Rows.Add("17011484", "백인창", "2020-12-01 00:57:14", "Audio");
             * bookMarkTable.Rows.Add("17011484", "백인창", "2020-12-01 00:57:27", "Audio");
             * bookMarkTable.Rows.Add("17011484", "백인창", "2020-12-01 00:57:40", "Audio");
             * bookMarkTable.Rows.Add("17011484", "백인창", "2020-12-01 00:57:43", "Audio");
             * bookMarkTable.Rows.Add("17011484", "백인창", "2020-12-01 00:57:48", "Gaze");
             * bookMarkTable.Rows.Add("17011484", "백인창", "2020-12-01 00:58:01", "Audio");
             * bookMarkTable.Rows.Add("17011484", "백인창", "2020-12-01 00:58:07", "Gaze");
             * //string time = "2020-11-29 15-54-18";
             * //startTime = setTime(time);
             *
             * //initBookmarkVideo();
             *
             * try
             * {
             *  Core.Initialize();
             *  libVLC = new LibVLCSharp.Shared.LibVLC();
             *  videoView = new LibVLCSharp.WinForms.VideoView();
             *  videoView.MediaPlayer = new LibVLCSharp.Shared.MediaPlayer(libVLC);
             *  videoView.MediaPlayer.Play(new Media(libVLC, "http://localhost:8080/2020-11-29_15-54-18_28b1d3f4-ec2c-4787-a187-a2e4a91bc630.mp4", FromType.FromLocation));
             *  bookMarkPanel.Controls.Add(videoView);
             *  videoView.BringToFront();
             *  videoView.Dock = DockStyle.Fill;
             *  status = true;
             * }
             * catch (Exception error)
             * {
             *  Console.WriteLine(error);
             * }
             */

            bookMarkTable.ScrollBars = ScrollBars.Vertical;

            loadStudentBookMark();
            loadStudentExamVideo();
        }
コード例 #7
0
        private void StudentHomeView_Load(object sender, EventArgs e)
        {
            CustomFonts customFonts = new CustomFonts();

            lectureTable.ColumnCount        = 6;
            lectureTable.Columns[5].Name    = "id";
            lectureTable.Columns[5].Visible = false;
            // 테이블 행 높이 설정
            lectureTable.RowTemplate.Height = 35;

            // 테이블 행 추가
            // Sample

            univLabel.Text   = "세종대학교";
            stuNumLabel.Text = "123456";
            nameLabel.Text   = "홍길동";
            emailLabel.Text  = "*****@*****.**";


            // 이미지
            pictureBox.SizeMode       = PictureBoxSizeMode.StretchImage;
            pictureBox.Image          = System.Drawing.Image.FromFile("./src/Assets/Images/user.png");
            cameraPictureBox.SizeMode = PictureBoxSizeMode.StretchImage;
            cameraPictureBox.Image    = System.Drawing.Image.FromFile("./src/Assets/Images/LinkImage.png");

            // 폰트

            // NormalFont : 10f
            // LabelFont : 13f
            // TextBoxFont : 12f
            // SmallFont : 8f
            // TitleFont: 20f
            // SubTitleFont : 17f

            lectureTable.Font = customFonts.NormalFont();

            //testInfoMinimizeBtn.Font = customFonts.LabelFont();
            //testInfoExitBtn.Font = customFonts.LabelFont();

            univLabel.Font   = customFonts.LabelFont();
            stuNumLabel.Font = customFonts.LabelFont();
            nameLabel.Font   = customFonts.LabelFont();
            emailLabel.Font  = customFonts.LabelFont();

            editBirthLabel.Font         = customFonts.LabelFont();
            editEmailLabel.Font         = customFonts.LabelFont();
            editNameLabel.Font          = customFonts.LabelFont();
            editPasswordCheckLabel.Font = customFonts.LabelFont();
            editPasswordLabel.Font      = customFonts.LabelFont();
            editStdNumLabel.Font        = customFonts.LabelFont();
            editUnivLabel.Font          = customFonts.LabelFont();

            editUnivTextBox.Font          = customFonts.TextBoxFont();
            editStdNumTextBox.Font        = customFonts.TextBoxFont();
            editNameTextBox.Font          = customFonts.TextBoxFont();
            editEmailTextBox.Font         = customFonts.TextBoxFont();
            editPasswordTextBox.Font      = customFonts.TextBoxFont();
            editPasswordCheckTextBox.Font = customFonts.TextBoxFont();
            editBirthPicker.Font          = customFonts.TextBoxFont();

            testInfoLectureLbl.Font  = customFonts.TitleFont();
            testInfoTestNameLbl.Font = customFonts.SubTitleFont();
            testInfoProfNameLbl.Font = customFonts.LabelFont();
            testInfoDayLbl.Font      = customFonts.LabelFont();
            testInfoTimeLbl.Font     = customFonts.LabelFont();

            cameraLabel.Font = customFonts.LabelFont();

            //상단바
            this.topBarPanel          = new TopBarPanel(customFonts);
            this.topBarPanel.Location = new Point(0, 0);
            this.Controls.Add(topBarPanel);

            editButton.Click += editButton_Click;
            setUserInfo();
            setUserExam();
            selectedID = "";
        }
コード例 #8
0
        private void ExamView_Load1(object sender, EventArgs e)
        {
            // 폰트
            customFonts = new CustomFonts();

            shortCutButtonList = new List <ShortCutButton>();

            this.examLectureLabel.Font = customFonts.LabelFont();
            this.examNameLabel.Font    = customFonts.LabelFont();
            this.examPercentLabel.Font = customFonts.LabelFont();

            this.exitButton = new ExitButton(customFonts);
            this.examInfoPanel.Controls.Add(this.exitButton);
            this.exitButton.Location = new System.Drawing.Point(349, 0);
            this.exitButton.Click   += new System.EventHandler(this.exitButton_Click_1);

            this.minimizeButton = new MinimizeButton(customFonts);
            this.examInfoPanel.Controls.Add(this.minimizeButton);
            this.minimizeButton.Location = new System.Drawing.Point(319, 0);
            this.minimizeButton.Click   += new System.EventHandler(this.minimizeButton_Click_1);

            this.examPageNavigationPanel          = new ExamPageNavigationPanel(customFonts);
            this.examPageNavigationPanel.Location = new System.Drawing.Point(0, 640);
            this.mainPanel.Controls.Add(this.examPageNavigationPanel);
            this.examPageNavigationPanel.AddPageButton.Visible    = false;
            this.examPageNavigationPanel.RemovePageButton.Visible = false;

            this.endExamButton.Font     = customFonts.LabelFont();
            this.examTimeLabel.Font     = customFonts.TimeLabelFont();
            this.examShortCutLabel.Font = customFonts.TextBoxFont();

            this.examMainQuestionPanelList = new List <ExamMainQuestionPanel>();

            this.examPageNavigationPanel.PageLeftButton.Click       += pageLeftButton_Click_1;
            this.examPageNavigationPanel.PageRightButton.Click      += pageRightButton_Click_1;
            this.examPageNavigationPanel.NowPageTextBox.KeyPress    += nowPageTextBox_KeyPress_1;
            this.examPageNavigationPanel.NowPageTextBox.LostFocus   += nowPageTextBox_LostFocus_1;
            this.examPageNavigationPanel.NowPageTextBox.TextChanged += nowPageTextBox_TextChanged_1;

            this.noticePanel          = new NoticePanel(customFonts);
            this.noticePanel.Location = new Point(100, 150);
            this.noticePanel.Visible  = false;
            this.Controls.Add(this.noticePanel);

            this.examPageNavigationPanel.Controls.Add(this.openChatBoxPanel);

            if (isStudent)
            {
                this.examPanel.BringToFront();
                this.chatPanel          = new ChatPanel(customFonts);
                this.chatPanel.Location = new Point(30, 240);
                this.mainPanel.Controls.Add(this.chatPanel);
                this.chatPanel.BringToFront();
                this.chatPanel.Visible            = false;
                this.chatPanel.MinimizeBtn.Click += chatPanelMinimizeButton_Click_1;
                this.chatPanel.SendButton.Click  += chatPanelSendButton_Click_1;

                this.openChatBoxPanel.Click += openChatBoxPanel_Click_1;
                this.openChatBoxLabel.Click += openChatBoxPanel_Click_1;

                this.openChatBoxLabel.Font   = customFonts.NormalFont();
                this.openChatAlertLabel.Font = customFonts.SmallFont();

                this.BackColor = Color.DarkGray;
                // 프로그램 중앙에 메인패널 위치
                //this.mainPanel.BackColor = Color.WhiteSmoke;
                //this.mainPanel.Location = new System.Drawing.Point((this.Width - this.mainPanel.Width) / 2, (this.Height - this.mainPanel.Height) / 2);

                exitButton.Visible     = false;
                minimizeButton.Visible = false;

                // 프로세스 제어
                this.processController = new ProcessController(mainController, room_id);
                processController.CheckProcess();
                processController.KillProcess();

                // 키보드 후킹
                SetHook();

                timer          = new System.Windows.Forms.Timer();
                timer.Interval = 1000;
                timer.Tick    += timer_Tick_1;
                timer.Start();

                webrtcConnectCount = 0;
                initwebrtc();
                connectWebsocket();
            }

            isScoredList = new List <Boolean>();

            loadExam();
            initShortCutButton();

            if (!isStudent)
            {
                this.examPanel.BringToFront();
                this.examTimePanel.Visible    = false;
                this.openChatBoxPanel.Visible = false;
                this.endExamButton.Text       = "채점 종료";
                loadStudentAllAnswers();
            }

            this.endExamButton.Click += endExamButton_Click_1;
        }
コード例 #9
0
        private void ProfessorLectureEditView_Load(object sender, EventArgs e)
        {
            // 콤보박스 설정
            setYearComboBox(1990, 2021);
            setSemesterComboBox();

            // 이미지
            lecturePictureBox.SizeMode = PictureBoxSizeMode.StretchImage;
            lecturePictureBox.Image    = System.Drawing.Image.FromFile("./src/Assets/Images/lecture.png");

            // 폰트
            CustomFonts customFonts = new CustomFonts();

            // NormalFont : 10f
            // LabelFont : 13f
            // TextBoxFont : 12f
            // SmallFont : 8f
            // TitleFont: 20f
            // SubTitleFont : 17f

            myLectureLbl.Font   = customFonts.LabelFont();
            myLectureTable.Font = customFonts.TextBoxFont();

            lectureNameLbl.Font             = customFonts.LabelFont();
            lectureNameTextBox.Font         = customFonts.TextBoxFont();
            lectureTimeLbl.Font             = customFonts.LabelFont();
            lectureTimeTextBox.Font         = customFonts.TextBoxFont();
            lectureTotalStuentLbl.Font      = customFonts.LabelFont();
            lectureTotalStudentTextBox.Font = customFonts.TextBoxFont();
            lectureSemesterLbl.Font         = customFonts.LabelFont();
            backButton.Font    = customFonts.TextBoxFont();
            confirmBtn.Font    = customFonts.TextBoxFont();
            addLectureBtn.Font = customFonts.TextBoxFont();
            deleteBtn.Font     = customFonts.TextBoxFont();
            editBtn.Font       = customFonts.TextBoxFont();
            infoLbl.Font       = customFonts.NormalFont();

            yearComboBox.Font     = customFonts.TextBoxFont();
            semesterComboBox.Font = customFonts.TextBoxFont();

            //상단바
            this.topBarPanel          = new TopBarPanel(customFonts);
            this.topBarPanel.Location = new System.Drawing.Point(0, 0);
            this.Controls.Add(topBarPanel);

            lectureTotalStudentTextBox.KeyPress   += textBox_KeyPress_1;
            this.myLectureTable.ColumnCount        = 5;
            this.myLectureTable.Columns[4].Name    = "id";
            this.myLectureTable.Columns[4].Visible = false;
            // Sample
            setMyLectureTable();
        }