private void StudentScoreCheckView_Load(object sender, EventArgs e)
        {
            // Font setting
            CustomFonts customFonts = new CustomFonts();

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

            lectureTable.Font    = customFonts.NormalFont();
            scoreCheckLabel.Font = customFonts.TitleFont();

            // PictureBox Setting
            scorePictureBox.SizeMode = PictureBoxSizeMode.StretchImage;
            scorePictureBox.Image    = System.Drawing.Image.FromFile("./src/Assets/Images/score.png");


            // 테이블 Sample 값 추가

            lectureTable.Rows.Add("운영체제", "중간고사", "2020/4/27 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("데이터베이스", "기말고사", "2020/6/29 13:00~14:30", "56 / 100", "67", "35%");
            lectureTable.Rows.Add("Unix프로그래밍", "중간고사", "2020/4/25 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("컴퓨터구조", "중간고사", "2020/4/27 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("운영체제", "중간고사", "2020/4/27 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("데이터베이스", "기말고사", "2020/6/29 13:00~14:30", "56 / 100", "67", "35%");
            lectureTable.Rows.Add("Unix프로그래밍", "중간고사", "2020/4/25 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("컴퓨터구조", "중간고사", "2020/4/27 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("운영체제", "중간고사", "2020/4/27 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("데이터베이스", "기말고사", "2020/6/29 13:00~14:30", "56 / 100", "67", "35%");
            lectureTable.Rows.Add("Unix프로그래밍", "중간고사", "2020/4/25 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("컴퓨터구조", "중간고사", "2020/4/27 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("운영체제", "퀴즈1", "2020/4/27 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("데이터베이스", "기말고사", "2020/6/29 13:00~14:30", "56 / 100", "67", "35%");
            lectureTable.Rows.Add("Unix프로그래밍", "중간고사", "2020/4/25 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("컴퓨터구조", "중간고사", "2020/4/27 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("운영체제", "중간고사", "2020/4/27 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("데이터베이스", "퀴즈5", "2020/6/29 13:00~14:30", "56 / 100", "67", "35%");
            lectureTable.Rows.Add("Unix프로그래밍", "중간고사", "2020/4/25 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("컴퓨터구조", "퀴즈3", "2020/4/27 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("운영체제", "중간고사", "2020/4/27 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("데이터베이스", "기말고사", "2020/6/29 13:00~14:30", "56 / 100", "67", "35%");
            lectureTable.Rows.Add("Unix프로그래밍", "중간고사", "2020/4/25 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("컴퓨터구조", "퀴즈4", "2020/4/27 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("운영체제", "중간고사", "2020/4/27 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("데이터베이스", "기말고사", "2020/6/29 13:00~14:30", "56 / 100", "67", "35%");
            lectureTable.Rows.Add("Unix프로그래밍", "중간고사", "2020/4/25 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("컴퓨터구조", "중간고사", "2020/4/27 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("운영체제", "퀴즈1", "2020/4/27 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("데이터베이스", "기말고사", "2020/6/29 13:00~14:30", "56 / 100", "67", "35%");
            lectureTable.Rows.Add("Unix프로그래밍", "중간고사", "2020/4/25 16:00~17:30", "78 / 100", "65", "30%");
            lectureTable.Rows.Add("컴퓨터구조", "중간고사", "2020/4/27 16:00~17:30", "78 / 100", "65", "30%");

            //상단바
            this.topBarPanel          = new TopBarPanel(customFonts);
            this.topBarPanel.Location = new Point(0, 0);
            this.Controls.Add(topBarPanel);
        }
        public void SetFont(Font font)
        {
            // Configuring the default style with properties
            // we have common to every lexer style saves time.
            StyleResetDefault();

            Font = CustomFonts.GetFontFromFont(font);
            _autocompleteMenu.Font     = CustomFonts.GetFontFromFont(font);
            Styles[Style.Default].Font = CustomFonts.GetFontFromFont(font).Name;
            Styles[Style.Default].Size = (int)CustomFonts.GetFontFromFont(font).SizeInPoints;

            StyleClearAll();

            // Configure the CPP (C#) lexer styles
            Styles[Style.Cpp.Default].ForeColor        = Color.Silver;              /////////////////////
            Styles[Style.Cpp.Comment].ForeColor        = Color.FromArgb(0, 128, 0); // Green
            Styles[Style.Cpp.CommentLine].ForeColor    = Color.FromArgb(0, 128, 0); // Green
            Styles[Style.Cpp.CommentLineDoc].ForeColor = Color.FromArgb(128, 128, 128);
            // Gray
            Styles[Style.Cpp.Number].ForeColor       = Color.Olive;
            Styles[Style.Cpp.Word].ForeColor         = Color.Blue;
            Styles[Style.Cpp.Word2].ForeColor        = Color.Teal;
            Styles[Style.Cpp.String].ForeColor       = Color.FromArgb(163, 21, 21); // Red
            Styles[Style.Cpp.Character].ForeColor    = Color.FromArgb(163, 21, 21); // Red
            Styles[Style.Cpp.Verbatim].ForeColor     = Color.FromArgb(163, 21, 21); // Red
            Styles[Style.Cpp.StringEol].BackColor    = Color.Pink;
            Styles[Style.Cpp.Operator].ForeColor     = Color.Purple;
            Styles[Style.Cpp.Preprocessor].ForeColor = Color.Maroon;
            Styles[Style.BraceLight].BackColor       = Color.LightGray;
            Styles[Style.BraceLight].ForeColor       = Color.BlueViolet;
            Styles[Style.BraceBad].ForeColor         = Color.Red;
            //this.Styles[Style.Cpp.CommentDoc]

            Lexer = Lexer.Cpp;
        }
        private void LabelInitialize()
        {
            this.verificationCodeHeaderLabel             = new Label();
            this.verificationCodeHeaderLabel.Text        = this.headingString;
            this.verificationCodeHeaderLabel.Font        = CustomFonts.SmallBold;
            this.verificationCodeHeaderLabel.TextAlign   = ContentAlignment.MiddleCenter;
            this.verificationCodeHeaderLabel.ForeColor   = Color.FromArgb(77, 77, 77);
            this.verificationCodeHeaderLabel.BorderStyle = BorderStyle.None;
            this.Controls.Add(verificationCodeHeaderLabel);

            this.verificationCodeHintLabel             = new Label();
            this.verificationCodeHintLabel.Text        = "A verification code is sent to your email.\r\nIt will expire after 60 minutes.";
            this.verificationCodeHintLabel.Font        = CustomFonts.New(CustomFonts.SmallerSize, 'i');
            this.verificationCodeHintLabel.TextAlign   = ContentAlignment.MiddleCenter;
            this.verificationCodeHintLabel.ForeColor   = Color.FromArgb(77, 77, 77);
            this.verificationCodeHintLabel.BorderStyle = BorderStyle.None;
            this.Controls.Add(verificationCodeHintLabel);

            this.verificationCodeLabel             = new Label();
            this.verificationCodeLabel.Text        = "Verification Code";
            this.verificationCodeLabel.Font        = CustomFonts.SmallBold;
            this.verificationCodeLabel.ForeColor   = Color.FromArgb(77, 77, 77);
            this.verificationCodeLabel.BorderStyle = BorderStyle.None;
            this.Controls.Add(verificationCodeLabel);

            this.errorLabel = new Label();
        }
Beispiel #4
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;
        }
Beispiel #5
0
        private void ProfessorScoreCheckView_Load(object sender, EventArgs e)
        {
            // Font setting
            CustomFonts customFonts = new CustomFonts();

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

            lectureTable.Font    = customFonts.NormalFont();
            scoreCheckLabel.Font = customFonts.TitleFont();

            // PictureBox Setting
            scorePictureBox.SizeMode = PictureBoxSizeMode.StretchImage;
            scorePictureBox.Image    = System.Drawing.Image.FromFile("./src/Assets/Images/score.png");

            loadAllExamResults();

            //상단바
            this.topBarPanel          = new TopBarPanel(customFonts);
            this.topBarPanel.Location = new Point(0, 0);
            this.Controls.Add(topBarPanel);
        }
Beispiel #6
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();
        }
 public void SetFont(Font font)
 {
     _codeEditor.SetFont(font);
     _autocompleteMenu.Font = font.FontFamily.Name == "Cambria"
         ? CustomFonts.GetMathFont(font.Size)
         : font;
 }
 private void setupAutocomplete()
 {
     if (!DesignMode)
     {
         Font = CustomFonts.GetMathFont(18); //new Font("Cambria", 18.0F, GraphicsUnit.Point);
     }
     //GlobalConfig.mathFont;
     ImageList            = null;
     TargetControlWrapper = null;
     //AllowsTabKey = true;
     //CaptureFocus = true;
     ToolTipDuration   = 4000;
     MinFragmentLength = 1;
     ImageList         = new ImageList {
         TransparentColor = Color.Transparent
     };
     ImageList.Images.Add(Resources.Real);
     ImageList.Images.Add(Resources.Complex);
     ImageList.Images.Add(Resources.Natural);
     ImageList.Images.Add(Resources.Integer);
     ImageList.Images.Add(Resources.Rational);
     ImageList.Images.Add(Resources.Matrix);
     ImageList.Images.SetKeyName(0, "Real.png");
     ImageList.Images.SetKeyName(1, "Complex.png");
 }
Beispiel #9
0
        public void Reset()
        {
            Language = new CultureInfo("en");

            CodeEditor = (CodeEditorType)Enum.GetValues(typeof(CodeEditorType)).GetValue(0);

            FunctionsOrder = FunctionsOrder.Default;
            TooltipType    = TooltipType.Default;

            ExpressionFont = CustomFonts.GetMathFont(15.75F);
            ScriptingFont  = CustomFonts.GetScriptingFont(12);

            ShowReturnTypeInExpression     = false;
            ShowParametersTypeInExpression = true;

            ShowReturnTypeInScripting     = true;
            ShowParametersTypeInScripting = true;

            NumericalOutputNotation = NumericalOutputNotationType.MathematicalNotation;

            ScriptingDirectory       = DefaultScriptingDirectory;
            CustomFunctionsDirectory = DefaultCustomFunctionsDirectory;

            CalculationsErrors = CalculationsErrors.ReturnNAN;

            WorkingDirectory = DefaultWorkingDirectory;
        }
        private static void NuntiasLocalDeletionWorks(long nuntiasId)
        {
            SyncAssets.NuntiasInfoPanelSortedList[nuntiasId].Dispose();
            SyncAssets.NuntiasOptionPanelSortedList[nuntiasId].Dispose();

            SyncAssets.NuntiasInfoPanelSortedList[nuntiasId]   = null;
            SyncAssets.NuntiasOptionPanelSortedList[nuntiasId] = null;

            LinkLabel showedNuntiasLinkLabel = SyncAssets.ShowedNuntiasLabelSortedList[nuntiasId];

            showedNuntiasLinkLabel.BackColor = System.Drawing.Color.Transparent;
            showedNuntiasLinkLabel.ForeColor = System.Drawing.Color.FromArgb(102, 51, 0);
            showedNuntiasLinkLabel.Font      = CustomFonts.New(CustomFonts.SmallerSize, 'i');
            showedNuntiasLinkLabel.LinkArea  = new LinkArea(0, 0);
            if (showedNuntiasLinkLabel.Image != null)
            {
                showedNuntiasLinkLabel.Image.Dispose();
                showedNuntiasLinkLabel.Image = null;
            }
            showedNuntiasLinkLabel.BorderStyle = BorderStyle.FixedSingle;
            if (SyncAssets.NuntiasSortedList[nuntiasId].SenderId == Consumer.LoggedIn.Id)
            {
                showedNuntiasLinkLabel.Left += showedNuntiasLinkLabel.Width - showedNuntiasLinkLabel.PreferredWidth;
            }

            showedNuntiasLinkLabel.Size = showedNuntiasLinkLabel.PreferredSize;

            SyncAssets.ShowedNuntiasLabelSortedList[nuntiasId] = null;
            SyncAssets.NuntiasSortedList[nuntiasId]            = null;
        }
Beispiel #11
0
 private ScriptingView()
 {
     InitializeComponent();
     if (!DesignMode)
     {
         consoleOutputTextBox.Font = CustomFonts.GetMathFont(consoleOutputTextBox.Font.Size);
     }
 }
 private void OnLostFocus(Object sender, EventArgs e)
 {
     if (sender == this.searchBox)
     {
         this.searchBox.Text      = "Search friends";
         this.searchBox.ForeColor = Color.FromArgb(150, 150, 150);
         this.searchBox.Font      = CustomFonts.New(CustomFonts.SmallSize, 'I');
     }
 }
Beispiel #13
0
 private void OnLostFocus(object sender, EventArgs e)
 {
     if (sender == this.searchBox && this.searchBox.Text.Length == 0)
     {
         this.searchBox.Text      = "Search Users";
         this.searchBox.ForeColor = Color.FromArgb(150, 150, 150);
         this.searchBox.Font      = CustomFonts.New(CustomFonts.SmallSize, 'I');
     }
 }
Beispiel #14
0
        public static Typeface GetTypeface(Context context, CustomFonts font)
        {
            if ((int)font > _loadedTypefaces.Length)
            {
                LoadTypefaces(context);
            }

            return(_loadedTypefaces[(int)font]);
        }
        public void SetFont(Font font)
        {
            var newFont = CustomFonts.GetFontFromFont(font);

            FontFamily = new FontFamily(newFont.FontFamily.Name);
            FontSize   = newFont.Size;
            //this.FontWeight =  FontWeights.
            FontStyle = ConvertFontStyle(CreateFontStyle(newFont));
        }
 private void somethingBeingTypedLabelInitialize()
 {
     this.somethingBeingTypedLabel           = new Label();
     this.somethingBeingTypedLabel.Font      = CustomFonts.New(12, 'i');
     this.somethingBeingTypedLabel.TextAlign = ContentAlignment.MiddleLeft;
     this.somethingBeingTypedLabel.ForeColor = Color.FromArgb(80, 80, 80);
     this.somethingBeingTypedLabel.Width     = this.Width;
     this.somethingBeingTypedLabel.Padding   = new Padding(30, 5, 30, 5);
     this.somethingBeingTypedLabel.Left      = (this.Width - this.somethingBeingTypedLabel.Width) / 2;
     this.Controls.Add(this.somethingBeingTypedLabel);
 }
Beispiel #17
0
        private void ProfessorExamView_Load(object sender, EventArgs e)
        {
            // 폰트
            customFonts = new CustomFonts();

            studentScreenList = new List <StudentWebRTCPanel>();

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

            loadExam();

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

            this.noticePanel          = new ChatPanel(customFonts, "공지사항 전송", "");
            this.noticePanel.Location = new Point(18, 242);
            this.noticePanel.BringToFront();
            this.noticePanel.SendButton.Click += noticeSendButton_Click_1;
            this.studentListPanel.Controls.Add(this.noticePanel);

            this.chatPanelList = new List <ChatPanel>();
            this.nowChatPanel  = noticePanel;

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

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

            setCheatTypePanels();

            chatQueue   = new Queue <Chat>();
            studentList = new List <Student>();
            enterQueue  = new Queue <Student>();
            exitQueue   = new Queue <Student>();
            doubtQueue  = new Queue <Doubt>();

            connectWebsocket();

            exitBtn.Click       += exitBtn_Click_1;
            sendNoticeBtn.Click += sendNoticeBtn_Click_1;
        }
        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();
        }
Beispiel #19
0
        private void InitializeProfileInfo()
        {
            profileIconLabel       = new Label();
            profileIconLabel.Image = new Bitmap(this.consumer.ProfileImage, new Size(50, 50));
            profileIconLabel.Size  = profileIconLabel.Image.Size;
            this.Controls.Add(profileIconLabel);
            profileIconLabel.Click += (s, e) => { this.Visible = false; };

            nameLabel           = new Label();
            nameLabel.Text      = consumer.Name;
            nameLabel.Font      = CustomFonts.SmallerBold;
            nameLabel.Size      = nameLabel.PreferredSize;
            nameLabel.ForeColor = Color.FromArgb(234, 234, 234);
            this.Controls.Add(nameLabel);

            usernameLabel           = new Label();
            usernameLabel.Text      = consumer.Username;
            usernameLabel.Font      = CustomFonts.New(CustomFonts.SmallerSize, 'i');
            usernameLabel.Size      = usernameLabel.PreferredSize;
            usernameLabel.ForeColor = Color.FromArgb(234, 234, 234);
            this.Controls.Add(usernameLabel);

            int maxLabelWidth = Math.Max(nameLabel.PreferredWidth, usernameLabel.PreferredWidth);

            this.Width = maxLabelWidth + (maxLabelWidth / 3);

            blockFriendButton             = new Label();
            blockFriendButton.Text        = "🛇";
            blockFriendButton.TextAlign   = ContentAlignment.MiddleCenter;
            blockFriendButton.BackColor   = this.BackColor;
            blockFriendButton.ForeColor   = Color.FromArgb(234, 234, 234);
            blockFriendButton.Font        = CustomFonts.Smaller;
            blockFriendButton.Size        = blockFriendButton.PreferredSize;
            blockFriendButton.MouseEnter += (s, e) => { blockFriendButton.BackColor = Color.FromArgb(160, 0, 0); };
            blockFriendButton.MouseLeave += (s, e) => { blockFriendButton.BackColor = this.BackColor; };
            this.Controls.Add(blockFriendButton);

            unfriendButton = new Label();
            this.CheckifyFriend();
            unfriendButton.Click += (s, e) =>
            {
                this.UnfriendifyFriend();
            };
            unfriendButton.TextAlign   = ContentAlignment.MiddleCenter;
            unfriendButton.BackColor   = this.BackColor;
            unfriendButton.ForeColor   = Color.FromArgb(234, 234, 234);
            unfriendButton.Font        = CustomFonts.Smallest;
            unfriendButton.Height      = blockFriendButton.Height;
            unfriendButton.MouseEnter += (sm, me) => { unfriendButton.BackColor = Color.FromArgb(160, 0, 0); };
            unfriendButton.MouseLeave += (sm, me) => { unfriendButton.BackColor = this.BackColor; };
            this.Controls.Add(unfriendButton);
        }
 public void SetFont(Font font)
 {
     if (font.FontFamily.Name == "Cambria" && !IsInDesignMode)
     {
         Font = CustomFonts.GetMathFont(font.Size);
         _autocompleteMenu.Font = CustomFonts.GetMathFont(font.Size);
     }
     else
     {
         Font = font;
         _autocompleteMenu.Font = font;
     }
 }
        public NumericalCalculationsView()
        {
            InitializeComponent();
            if (DesignMode)
            {
                return;
            }
            function.DefaultCellStyle.Font = CustomFonts.GetMathFont(function.DefaultCellStyle.Font.Size);
            result.DefaultCellStyle.Font   = CustomFonts.GetMathFont(result.DefaultCellStyle.Font.Size);

            resultNumericalCalculationsTextBox.Font =
                CustomFonts.GetMathFont(resultNumericalCalculationsTextBox.Font.Size);
        }
        private void MakeExamView_Load1(object sender, EventArgs e)
        {
            // 폰트
            customFonts = new CustomFonts();

            initFont();
            initLectureComboBox();

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

            this.examPageNavigationPanel          = new ExamPageNavigationPanel(customFonts);
            this.examPageNavigationPanel.Location = new System.Drawing.Point(0, 612);
            this.mainPanel.Controls.Add(this.examPageNavigationPanel);

            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.examPageNavigationPanel.AddPageButton.Click        += addPageButton_Click_1;
            this.examPageNavigationPanel.RemovePageButton.Click     += removePageButton_Click_1;

            this.startDateTimePicker.CustomFormat = "yyyy-MM-dd HH:mm:ss";
            this.startDateTimePicker.Format       = DateTimePickerFormat.Custom;
            this.endDateTimePicker.CustomFormat   = "yyyy-MM-dd HH:mm:ss";
            this.endDateTimePicker.Format         = DateTimePickerFormat.Custom;

            this.saveButton.Click   += saveButton_Click_1;
            this.cancelButton.Click += cancelButton_Click_1;

            this.examPercentTextBox.KeyPress += percentTextBox_KeyPress_1;

            this.mainQuestionPanelList = new List <MainQuestionPanel>();
            this.shortCutButtonList    = new List <ShortCutButton>();

            questionCount = 0;
            if (room_id == "")
            {
                this.mainQuestionPanelList.Add(new MainQuestionPanel(customFonts));
                this.mainQuestionPanelList[0].Location = new Point(30, 30);
                this.mainQuestionPanelList[0].AddQuestionButton.Click += addSubQuestionButton_Click;
                this.examPanel.Controls.Add(this.mainQuestionPanelList[0]);
            }
            else
            {
                setSavedExam();
            }
        }
 private void ShowErrorMessage(string errorMessage)
 {
     if (errorMessage.Length > 0)
     {
         VisualizingTools.HideWaitingAnimation();
         this.errorLabel.Text      = errorMessage;
         this.errorLabel.Font      = CustomFonts.New(CustomFonts.SmallerSize, 'i');
         this.errorLabel.TextAlign = ContentAlignment.MiddleCenter;
         this.errorLabel.ForeColor = Color.Red;
         this.errorLabel.Size      = this.errorLabel.PreferredSize;
         this.errorLabel.Location  = new Point((this.Width - this.errorLabel.PreferredWidth) / 2, this.backButton.Bottom + 15);
         this.Controls.Add(this.errorLabel);
     }
 }
 public void SetFont(Font font)
 {
     if (font.FontFamily.Name == "Cambria")
     {
         Font = CustomFonts.GetMathFont(font.Size);
     }
     else if (font.FontFamily.Name == "Consolas")
     {
         Font = CustomFonts.GetScriptingFont(font.Size);
     }
     else
     {
         Font = font;
     }
 }
Beispiel #25
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);
        }
        public BenchmarkForm()
        {
            InitializeComponent();

            benchmark = new Benchmark();


            functionsTestBackgroundWorker.DoWork             += benchmark.mathFunctionsCalculationSpeedTest;
            functionsTestBackgroundWorker.ProgressChanged    += FunctionsTestBackgroundWorker_ProgressChanged;
            functionsTestBackgroundWorker.RunWorkerCompleted += FunctionsTestBackgroundWorker_RunWorkerCompleted;

            memoryTestBackgroundWorker.DoWork             += benchmark.memoryAllocationSpeedTest;
            memoryTestBackgroundWorker.ProgressChanged    += memoryTestBackgroundWorker_ProgressChanged;
            memoryTestBackgroundWorker.RunWorkerCompleted += memoryTestBackgroundWorker_RunWorkerCompleted;
            this.Icon = GraphicsResources.computator_net_icon;
            this.memoryTestRichTextBox.Font    = CustomFonts.GetScriptingFont(10.2F);
            this.functionsTestRichTextBox.Font = CustomFonts.GetScriptingFont(10.2F);
        }
 public void SetFont(Font font)
 {
     if (font.FontFamily.Name == "Cambria")
     {
         FontFamily = new FontFamily(CustomFonts.GetMathFont(font.Size).FontFamily.Name);
     }
     else if (font.FontFamily.Name == "Consolas")
     {
         FontFamily = new FontFamily(CustomFonts.GetScriptingFont(font.Size).FontFamily.Name);
     }
     else
     {
         FontFamily = new FontFamily(font.FontFamily.Name);
     }
     FontSize = font.Size;
     //this.FontWeight =  FontWeights.
     FontStyle = ConvertFontStyle(CreateFontStyle(font));
 }
Beispiel #28
0
        private void UserViewPanelInitialize()
        {
            this.userViewPanel           = new Panel();
            this.userViewPanel.BackColor = Color.FromArgb(0, 0, 80);
            this.userViewPanel.Width     = this.Width - 4;
            this.userViewPanel.Location  = new Point(2, 2);

            this.AddIconsToUserView();

            userProfilePictureLabel                   = new Label();
            userProfilePictureLabel.Image             = this.ResizedProfileImage;
            userProfilePictureLabel.Location          = new Point((this.userViewPanel.Width - userProfilePictureLabel.Image.Width) / 2, userViewIcons[0].Bottom + 20);
            userProfilePictureLabel.Size              = userProfilePictureLabel.Image.Size;
            userProfilePictureLabel.MouseHover       += delegate(Object sender, EventArgs e) { userProfilePictureLabel.Image = GraphicsStudio.Overlap(userProfilePictureLabel.Image, new Bitmap(FileResources.Picture("pictureChangeHint.png"), userProfilePictureLabel.Image.Size)); };
            userProfilePictureLabel.MouseLeave       += delegate(Object sender, EventArgs e) { userProfilePictureLabel.Image = this.ResizedProfileImage; };
            userProfilePictureLabel.MouseDoubleClick += delegate(Object sender, MouseEventArgs e) { ((SlidebarPanel)this.parent).ChangeProfilePicture(); };
            this.userViewPanel.Controls.Add(userProfilePictureLabel);

            fullnameTextBox           = new TextBox();
            fullnameTextBox.Text      = this.UserProfileName;
            fullnameTextBox.Font      = CustomFonts.SmallBold;
            fullnameTextBox.Height    = fullnameTextBox.PreferredHeight;
            fullnameTextBox.TextAlign = HorizontalAlignment.Center;
            fullnameTextBox.Width     = this.Width * 3 / 4;
            fullnameTextBox.BackColor = Color.FromArgb(userViewPanel.BackColor.R + 50, userViewPanel.BackColor.G + 50, userViewPanel.BackColor.B + 50);
            fullnameTextBox.Location  = new Point((this.userViewPanel.Width - fullnameTextBox.Width) / 2, userProfilePictureLabel.Bottom + 20);
            fullnameTextBox.ForeColor = Color.FromArgb(240, 240, 240);
            this.userViewPanel.Controls.Add(fullnameTextBox);

            dragengerUsernameTextBox             = new TextBox();
            dragengerUsernameTextBox.Text        = "@" + User.LoggedIn.Username;
            dragengerUsernameTextBox.ReadOnly    = true;
            dragengerUsernameTextBox.Font        = CustomFonts.New(13.0f, 'i');
            dragengerUsernameTextBox.Width       = fullnameTextBox.Width;
            dragengerUsernameTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
            dragengerUsernameTextBox.TextAlign   = HorizontalAlignment.Center;
            dragengerUsernameTextBox.BackColor   = Color.FromArgb(userViewPanel.BackColor.R + 20, userViewPanel.BackColor.G + 20, userViewPanel.BackColor.B + 20);
            dragengerUsernameTextBox.Location    = new Point((this.userViewPanel.Width - dragengerUsernameTextBox.Width) / 2, fullnameTextBox.Bottom + 5);
            dragengerUsernameTextBox.ForeColor   = Color.FromArgb(240, 240, 240);
            this.userViewPanel.Controls.Add(dragengerUsernameTextBox);

            this.userViewPanel.Height = this.userViewPanel.PreferredSize.Height + 20;
            this.Controls.Add(this.userViewPanel);
        }
        public ScriptingView()
        {
            InitializeComponent();

            var codeEditor = new CodeEditorControlWrapper {
                Dock = DockStyle.Fill
            };

            splitContainer2.Panel1.Controls.Add(codeEditor);
            splitContainer1.Panel2.Controls.Add(SolutionExplorerView as Control);
            splitContainer1.Panel2.Controls[1].BringToFront();
            CodeEditorView = codeEditor;


            if (!DesignMode)
            {
                consoleOutputTextBox.Font = CustomFonts.GetMathFont(consoleOutputTextBox.Font.Size);
            }
        }
        public CalculationsView()
        {
            InitializeComponent();

            if (!DesignMode)
            {
                calculationValueTextBox.Font = CustomFonts.GetMathFont(calculationValueTextBox.Font.Size);

                calculationsHistoryDataGridView.Columns[0].DefaultCellStyle.Font =
                    CustomFonts.GetMathFont(calculationsHistoryDataGridView.Columns[0].DefaultCellStyle.Font.Size);

                calculationsHistoryDataGridView.Columns[calculationsHistoryDataGridView.Columns.Count - 1]
                .DefaultCellStyle
                .Font =
                    CustomFonts.GetMathFont(
                        calculationsHistoryDataGridView.Columns[calculationsHistoryDataGridView.Columns.Count - 1]
                        .DefaultCellStyle.Font.Size);
            }
        }