//---------Event Hands. implementation---------

        private void updateInpSignal_radio(object sender, EventArgs e)
        {
            MaterialRadioButton sendButton = sender as MaterialRadioButton;

            tagClicked = sendButton.Text;
            inSig.init(tagClicked, mBar.Value, fBar.Value, sBar.Value);
        }
Пример #2
0
        private void BuildMinors()
        {
            string jsonMinors = rest.getRESTDataJSON("/minors/");

            minors = JToken.Parse(jsonMinors).ToObject <Minors>();

            int y = 50;

            Label minorsLabel = new Label();

            minorsLabel.Text     = "Minors";
            minorsLabel.Location = new Point(20, 20);
            minorsList.Controls.Add(minorsLabel);

            foreach (UgMinor minor in minors.UgMinors)
            {
                MaterialRadioButton radio = new MaterialRadioButton();
                radio.Text            = minor.name;
                radio.AutoSize        = false;
                radio.Size            = new Size(110, 20);
                radio.CheckedChanged += new System.EventHandler(minorChanged);
                radio.Location        = new Point(20, y);
                y += 30;

                minorsList.Controls.Add(radio);
            }
        }
Пример #3
0
        private void _infoWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            _infoResult = _infoWorker.Manager;
            _infoWorker.RunWorkerCompleted -= _infoWorker_RunWorkerCompleted;
            _infoWorker = null;

            int i = 0;

            foreach (var streamInfo in _infoResult.Streams)
            {
                var radio = new MaterialRadioButton();
                radio.Text            = streamInfo.ToString();
                radio.Size            = new Size(250, 18);
                radio.Location        = new Point(20, 122 + i * 20);
                radio.CheckedChanged += Radio_CheckedChanged;
                tabPage1.Controls.Add(radio);
                i++;
                _streamButtons.Add(radio, streamInfo);
            }

            if (_streamButtons.Count > 0)
            {
                txtFilename.Text = _infoResult.GetValidFileName(_infoResult.Streams.Last());
                pictureBox.Image = _infoResult.PosterImage;
                _streamButtons.Last().Key.Checked = true;
                btnStartDownload.Visible = true;
            }
            else
            {
                lblStatus.Text = "Status: Could not find stream";
            }
        }
Пример #4
0
        /// <summary>
        /// Cette méthode crée des contrôles de type CheckBox ou RadioButton dans un contrôle de type Panel.
        /// Elle va chercher les données dans la base de données et crée autant de contrôles (les uns en-dessous des autres)
        /// qu'il y a de lignes renvoyées par la base de données.
        /// </summary>
        /// <param name="unForm">Le formulaire concerné</param>
        /// <param name="uneConnexion">L'objet connexion à utiliser pour la connexion à la BD</param>
        /// <param name="pUneTable">Le nom de la source de données qui va fournir les données. Il s'agit en fait d'une vue de type
        /// VXXXXOn ou XXXX représente le nom de la table à partir de laquelle la vue est créée. n représente un numéro de séquence</param>
        /// <param name="pPrefixe">les noms des contrôles sont standards : NomControle_XX
        ///                                         où XX est l'ID de l'enregistrement récupéré dans la vue qui
        ///                                         sert de source de données</param>
        /// <param name="UnPanel">Panel ou GroupBox dans lequel on va créer les contrôles</param>
        /// <param name="unTypeControle">Type de contrôle à créer : CheckBox ou RadioButton</param>
        public static void CreerDesControles(Form unForm, Bdd uneConnexion, string pUneTable, string pPrefixe, ScrollableControl UnPanel, string unTypeControle)
        {
            DataTable uneTable = new DataTable();

            switch (pUneTable)
            {
            case "restauration":
                uneTable = uneConnexion.FindRestauration();
                break;

            default:
                throw new Exception("Entité Innexistante");
            }

            //// On va récupérer les statuts dans un DataTable puis on va parcourir les lignes (rows) de ce DataTable pour
            //// construire dynamiquement les boutons radio pour le statut de l'intervenant dans son atelier.
            short i = 0;

            foreach (DataRow uneLigne in uneTable.Rows)
            {
                if (unTypeControle == "CheckBox")
                {
                    MaterialCheckBox UnControle = new MaterialCheckBox();
                    AffecterControle(unForm, UnPanel, UnControle, pPrefixe, uneLigne, i++);
                }
                else if (unTypeControle == "RadioButton")
                {
                    MaterialRadioButton UnControle = new MaterialRadioButton();
                    AffecterControle(unForm, UnPanel, UnControle, pPrefixe, uneLigne, i++);
                }
                i++;
            }

            UnPanel.Height = 20 * i + 5;
        }
Пример #5
0
        /// <summary>
        /// Populates the panel containing radio buttons in 'Create' tab.
        /// </summary>
        private void populatePanel(FlowLayoutPanel panel)
        {
            MaterialRadioButton radioBtn;

            string[] cardGroups = Directory.GetDirectories(this.cardDir);

            for (int i = 0; i < cardGroups.Length; i++)
            {
                radioBtn                         = new MaterialRadioButton();
                radioBtn.AutoSize                = true;
                radioBtn.Depth                   = 0;
                radioBtn.Font                    = new System.Drawing.Font("Roboto", 10F);
                radioBtn.Location                = new System.Drawing.Point(3, 3);
                radioBtn.Margin                  = new System.Windows.Forms.Padding(0);
                radioBtn.MouseLocation           = new System.Drawing.Point(-1, -1);
                radioBtn.MouseState              = MaterialSkin.MouseState.HOVER;
                radioBtn.Name                    = "radioBtnRadiobutton";
                radioBtn.Ripple                  = true;
                radioBtn.Size                    = new System.Drawing.Size(163, 30);
                radioBtn.TabIndex                = 0;
                radioBtn.TabStop                 = true;
                cardGroups[i]                    = cardGroups[i].Replace(this.cardDir, "");
                radioBtn.Text                    = cardGroups[i];
                radioBtn.UseVisualStyleBackColor = true;
                panel.Controls.Add(radioBtn);
            }
        }
Пример #6
0
 private void btnCheck_ClickAnimationFinished(object sender)
 {
     if (btnCheck.Text == "Check")
     {
         MaterialRadioButton rb = null;
         foreach (Control c in Controls)
         {
             MaterialRadioButton r = c as MaterialRadioButton;
             if (r != null)
             {
                 if (r.Checked == true)
                 {
                     rb = r;
                 }
             }
         }
         if (rb == null)
         {
             return;
         }
         if (rb.Text == question.CorrectAns)
         {
             lblAnsResult.Text = "Correct";
             int boxOffset = rb.Height / 2;
             ChangePrimary(true, rb.Location + new Size(boxOffset, boxOffset));
             OnAnswered?.Invoke(this, true);
         }
         else
         {
             lblAnsResult.Text = "Wrong";
             foreach (Control c in Controls)
             {
                 MaterialRadioButton r = c as MaterialRadioButton;
                 if (r != null)
                 {
                     if (r.Text == question.CorrectAns)
                     {
                         r.Enabled = true;
                     }
                     else
                     {
                         r.Enabled = false;
                     }
                 }
             }
             OnAnswered?.Invoke(this, false);
         }
         btnCheck.Text = "Close";
     }
     else
     {
         Height = 0;
         OnClosed?.Invoke(this);
     }
 }
Пример #7
0
 private void baudRadioButton_Click(object sender, EventArgs e)
 {
     if (portaSerial.isOpen())
     {
         MaterialRadioButton radio = new MaterialRadioButton();
         radio = (MaterialRadioButton)sender;
         String baudRate = radio.Text;
         String portName = portaSerial.getPort().PortName;
         portaSerial.getPort().Close();
         portaSerial = new PortaSerial(serialPort_DataReceived, Convert.ToInt32(baudRate));
         portaSerial.conectar(portName);
     }
 }
Пример #8
0
        private void BuildDegrees()
        {
            string jsonDegrees = rest.getRESTDataJSON("/degrees/");

            degrees = JToken.Parse(jsonDegrees).ToObject <Degrees>();

            int y = 50;

            MaterialLabel undergraduteLabel = new MaterialLabel();

            undergraduteLabel.Size = new Size(undergraduteLabel.Size.Width + 20, undergraduteLabel.Size.Height);
            undergraduteLabel.Text = "Undergraduate";

            undergraduteLabel.Location = new Point(20, 20);
            degreesRadioButtons.Controls.Add(undergraduteLabel);


            foreach (Undergraduate degree in degrees.undergraduate)
            {
                MaterialRadioButton radio = new MaterialRadioButton();
                radio.Text            = degree.degreeName;
                radio.AutoSize        = false;
                radio.Size            = new Size(230, 20);
                radio.CheckedChanged += new System.EventHandler(degreeChanged);
                radio.Location        = new Point(20, y);
                y += 30;

                degreesRadioButtons.Controls.Add(radio);
            }

            MaterialLabel graduateLabel = new MaterialLabel();

            graduateLabel.Text     = "Graduate";
            graduateLabel.Location = new Point(20, y);
            degreesRadioButtons.Controls.Add(graduateLabel);

            y += 30;

            foreach (Graduate degree in degrees.graduate)
            {
                MaterialRadioButton radio = new MaterialRadioButton();
                radio.Text            = degree.degreeName;
                radio.AutoSize        = false;
                radio.Size            = new Size(230, 20);
                radio.CheckedChanged += new System.EventHandler(degreeChanged);
                radio.Location        = new Point(20, y);
                y += 30;

                degreesRadioButtons.Controls.Add(radio);
            }
        }
Пример #9
0
        private void buttonBotDiff_Click(object sender, EventArgs e)
        {
            MaterialRadioButton btn = (MaterialRadioButton)sender;

            int id = (int)btn.Tag;

            mainformSetting.botDiff = id;

            botTextRebuild();

            /*for (int i = 0; i < 4; i++)
             * {
             *  if (i != id)
             *      radioButtonBotDiff[i].Checked = false;
             * }*/
        }
Пример #10
0
        private void minorChanged(object sender, EventArgs e)
        {
            MaterialRadioButton button = (MaterialRadioButton)sender;
            string  ugMinorName        = button.Text;
            UgMinor ugMinor            = null;

            foreach (UgMinor minor in minors.UgMinors)
            {
                if (minor.name == ugMinorName)
                {
                    ugMinor = minor;
                    break;
                }
            }

            minorName.Visible = true;
            minorName.Font    = new Font(degreeTitle.Font.FontFamily, 10, FontStyle.Bold);
            minorName.Text    = ugMinor.title;

            minorDescription.Visible = true;
            minorDescription.Text    = ugMinor.description;

            minorCourses.Visible = true;
            minorCourses.Font    = new Font(minorCourses.Font.FontFamily, 10, FontStyle.Bold);

            int x = 10;

            courses.Controls.Clear();

            foreach (string course in ugMinor.courses)
            {
                LinkLabel courseLabel = new LinkLabel();
                courseLabel.Text         = course;
                courseLabel.Location     = new Point(x, 0);
                courseLabel.Size         = new Size(70, 30);
                courseLabel.LinkClicked += new LinkLabelLinkClickedEventHandler(courseClicked);
                x += 70;

                courses.Controls.Add(courseLabel);
            }
        }
Пример #11
0
        private void checkQuestion()
        {
            MaterialRadioButton rb = groupBox1.Controls.OfType <MaterialRadioButton>().FirstOrDefault(element => element.Checked);

            if (rb != null)
            {
                if (rb.Text == Questions[curr - 1].correct_ans)
                {
                    correct++;
                    MessageBox.Show("You got it right");
                }
                else
                {
                    MessageBox.Show("oops, You failed!");
                }
                //Change Button text to submit
                if (curr == Questions.Length - 1)
                {
                    btnStartQuiz.Text = "Submit";
                }

                // finalize result

                if (curr == Questions.Length)
                {
                    MessageBox.Show("Completed In a Grand style, You Scored " + Math.Floor(((correct / Questions.Length) * 100)) + "% on the Quiz");
                }
                else
                {
                    rb.Checked = false;
                    nextQuestion();
                }
            }
            else
            {
                MessageBox.Show("You Dint answer any Question");
                checkQuestion();
            }
        }
Пример #12
0
        MaterialRadioButton NewModuleType(int i, Type module)
        {
            //TODO: Maybe heavycost
            var factory = ( Module )Activator.CreateInstance(module);
            MaterialRadioButton button = new MaterialRadioButton();

            button.AutoSize                = true;
            button.Depth                   = 0;
            button.Font                    = new System.Drawing.Font("Roboto", 10F);
            button.Location                = new Point(10, 10 + 31 * i);
            button.Margin                  = new System.Windows.Forms.Padding(0);
            button.MouseLocation           = new System.Drawing.Point(-1, -1);
            button.MouseState              = MaterialSkin.MouseState.HOVER;
            button.Text                    = factory.ModuleName + " : " + factory.ModuleDescription;
            button.Ripple                  = true;
            button.Size                    = new System.Drawing.Size(163, 30);
            button.TabIndex                = 10;
            button.TabStop                 = true;
            button.Name                    = module.Name;
            button.UseVisualStyleBackColor = true;
            return(button);
        }
Пример #13
0
        private void BotInit()
        {
            checkBoxBotAmxx.Checked = mainformSetting.botAmxxControl;
            textFieldBotNum.Text    = mainformSetting.botNum.ToString();

            SuspendLayout();

            for (int i = 0; i < 4; i++)
            {
                radioButtonBotDiff[i] = new MaterialRadioButton();

                radioButtonBotDiff[i].Location   = new System.Drawing.Point(135, 62 + 30 * i);
                radioButtonBotDiff[i].Name       = "btnAdd";
                radioButtonBotDiff[i].TabIndex   = i;
                radioButtonBotDiff[i].Text       = botDiff[i];
                radioButtonBotDiff[i].Tag        = i;
                radioButtonBotDiff[i].AutoSize   = true;
                radioButtonBotDiff[i].Depth      = 0;
                radioButtonBotDiff[i].MouseState = MaterialSkin.MouseState.HOVER;

                if (i == mainformSetting.botDiff)
                {
                    radioButtonBotDiff[i].Checked = true;
                }

                radioButtonBotDiff[i].Click += new System.EventHandler(this.buttonBotDiff_Click);

                tabPageGameBot.Controls.Add(radioButtonBotDiff[i]);
            }

            ResumeLayout(false);

            botBtnInit = true;
            botPanelCheck();

            botTextRebuild();
        }
Пример #14
0
        //WATEVER MAY HAPEN PLIZ DO NAT TACH DIZ AREA OF CODE IF YOU DONT WANA DAY



        private void InitializeComponent()
        {
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
            this.rdoAdmin            = new MaterialSkin.Controls.MaterialRadioButton();
            this.groupBox1           = new System.Windows.Forms.GroupBox();
            this.rdoStudent          = new MaterialSkin.Controls.MaterialRadioButton();
            this.rdoTeacher          = new MaterialSkin.Controls.MaterialRadioButton();
            this.txtID               = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
            this.materialLabel1      = new MaterialSkin.Controls.MaterialLabel();
            this.txtFirstName        = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
            this.txtMiddleName       = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
            this.txtLastName         = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
            this.txtAddress          = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
            this.txtEmail            = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
            this.groupBox2           = new System.Windows.Forms.GroupBox();
            this.dtpBirthdate        = new System.Windows.Forms.DateTimePicker();
            this.bunifuCustomLabel3  = new Bunifu.Framework.UI.BunifuCustomLabel();
            this.materialLabel5      = new MaterialSkin.Controls.MaterialLabel();
            this.materialLabel6      = new MaterialSkin.Controls.MaterialLabel();
            this.materialLabel7      = new MaterialSkin.Controls.MaterialLabel();
            this.materialLabel8      = new MaterialSkin.Controls.MaterialLabel();
            this.materialLabel9      = new MaterialSkin.Controls.MaterialLabel();
            this.groupBox3           = new System.Windows.Forms.GroupBox();
            this.materialLabel3      = new MaterialSkin.Controls.MaterialLabel();
            this.txtUsername         = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
            this.materialLabel10     = new MaterialSkin.Controls.MaterialLabel();
            this.materialLabel11     = new MaterialSkin.Controls.MaterialLabel();
            this.txtConfirmPassword  = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
            this.txtPassword         = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
            this.groupBox4           = new System.Windows.Forms.GroupBox();
            this.drpSecurityQuestion = new ComponentFactory.Krypton.Toolkit.KryptonComboBox();
            this.materialLabel12     = new MaterialSkin.Controls.MaterialLabel();
            this.materialLabel13     = new MaterialSkin.Controls.MaterialLabel();
            this.txtSecurityAnswer   = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
            this.bunifuCustomLabel1  = new Bunifu.Framework.UI.BunifuCustomLabel();
            this.bunifuCustomLabel2  = new Bunifu.Framework.UI.BunifuCustomLabel();
            this.dgvView             = new DevComponents.DotNetBar.Controls.DataGridViewX();
            this.btnEdit             = new ComponentFactory.Krypton.Toolkit.KryptonButton();
            this.txtSearch           = new MaterialSkin.Controls.MaterialSingleLineTextField();
            this.btnInsert           = new ComponentFactory.Krypton.Toolkit.KryptonButton();
            this.btnDelete           = new ComponentFactory.Krypton.Toolkit.KryptonButton();
            this.btnClear            = new ComponentFactory.Krypton.Toolkit.KryptonButton();
            this.groupBox1.SuspendLayout();
            this.groupBox2.SuspendLayout();
            this.groupBox3.SuspendLayout();
            this.groupBox4.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.drpSecurityQuestion)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.dgvView)).BeginInit();
            this.SuspendLayout();
            //
            // rdoAdmin
            //
            this.rdoAdmin.AutoSize                = true;
            this.rdoAdmin.Depth                   = 0;
            this.rdoAdmin.Font                    = new System.Drawing.Font("Roboto", 10F);
            this.rdoAdmin.Location                = new System.Drawing.Point(2, 13);
            this.rdoAdmin.Margin                  = new System.Windows.Forms.Padding(0);
            this.rdoAdmin.MouseLocation           = new System.Drawing.Point(-1, -1);
            this.rdoAdmin.MouseState              = MaterialSkin.MouseState.HOVER;
            this.rdoAdmin.Name                    = "rdoAdmin";
            this.rdoAdmin.Ripple                  = true;
            this.rdoAdmin.Size                    = new System.Drawing.Size(114, 30);
            this.rdoAdmin.TabIndex                = 2;
            this.rdoAdmin.Text                    = "Administrator";
            this.rdoAdmin.UseVisualStyleBackColor = true;
            this.rdoAdmin.CheckedChanged         += new System.EventHandler(this.rdoAdmin_CheckedChanged);
            //
            // groupBox1
            //
            this.groupBox1.BackColor = System.Drawing.SystemColors.Window;
            this.groupBox1.Controls.Add(this.rdoStudent);
            this.groupBox1.Controls.Add(this.rdoTeacher);
            this.groupBox1.Controls.Add(this.rdoAdmin);
            this.groupBox1.Font     = new System.Drawing.Font("Roboto", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.groupBox1.Location = new System.Drawing.Point(16, 98);
            this.groupBox1.Name     = "groupBox1";
            this.groupBox1.Size     = new System.Drawing.Size(280, 51);
            this.groupBox1.TabIndex = 1;
            this.groupBox1.TabStop  = false;
            this.groupBox1.Text     = "User Type";
            //
            // rdoStudent
            //
            this.rdoStudent.AutoSize                = true;
            this.rdoStudent.Depth                   = 0;
            this.rdoStudent.Font                    = new System.Drawing.Font("Roboto", 10F);
            this.rdoStudent.Location                = new System.Drawing.Point(195, 13);
            this.rdoStudent.Margin                  = new System.Windows.Forms.Padding(0);
            this.rdoStudent.MouseLocation           = new System.Drawing.Point(-1, -1);
            this.rdoStudent.MouseState              = MaterialSkin.MouseState.HOVER;
            this.rdoStudent.Name                    = "rdoStudent";
            this.rdoStudent.Ripple                  = true;
            this.rdoStudent.Size                    = new System.Drawing.Size(77, 30);
            this.rdoStudent.TabIndex                = 4;
            this.rdoStudent.Text                    = "Student";
            this.rdoStudent.UseVisualStyleBackColor = true;
            this.rdoStudent.CheckedChanged         += new System.EventHandler(this.rdoStudent_CheckedChanged);
            //
            // rdoTeacher
            //
            this.rdoTeacher.AutoSize                = true;
            this.rdoTeacher.Depth                   = 0;
            this.rdoTeacher.Font                    = new System.Drawing.Font("Roboto", 10F);
            this.rdoTeacher.Location                = new System.Drawing.Point(116, 13);
            this.rdoTeacher.Margin                  = new System.Windows.Forms.Padding(0);
            this.rdoTeacher.MouseLocation           = new System.Drawing.Point(-1, -1);
            this.rdoTeacher.MouseState              = MaterialSkin.MouseState.HOVER;
            this.rdoTeacher.Name                    = "rdoTeacher";
            this.rdoTeacher.Ripple                  = true;
            this.rdoTeacher.Size                    = new System.Drawing.Size(79, 30);
            this.rdoTeacher.TabIndex                = 3;
            this.rdoTeacher.Text                    = "Teacher";
            this.rdoTeacher.UseVisualStyleBackColor = true;
            this.rdoTeacher.CheckedChanged         += new System.EventHandler(this.rdoTeacher_CheckedChanged);
            //
            // txtID
            //
            this.txtID.Enabled  = false;
            this.txtID.Location = new System.Drawing.Point(86, 163);
            this.txtID.Name     = "txtID";
            this.txtID.Size     = new System.Drawing.Size(210, 23);
            this.txtID.TabIndex = 4;
            //
            // materialLabel1
            //
            this.materialLabel1.AutoSize   = true;
            this.materialLabel1.BackColor  = System.Drawing.SystemColors.Window;
            this.materialLabel1.Depth      = 0;
            this.materialLabel1.Font       = new System.Drawing.Font("Roboto", 11F);
            this.materialLabel1.ForeColor  = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.materialLabel1.Location   = new System.Drawing.Point(14, 74);
            this.materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
            this.materialLabel1.Name       = "materialLabel1";
            this.materialLabel1.Size       = new System.Drawing.Size(111, 19);
            this.materialLabel1.TabIndex   = 0;
            this.materialLabel1.Text       = "Register a User";
            //
            // txtFirstName
            //
            this.txtFirstName.Location = new System.Drawing.Point(145, 24);
            this.txtFirstName.Name     = "txtFirstName";
            this.txtFirstName.Size     = new System.Drawing.Size(233, 23);
            this.txtFirstName.TabIndex = 2;
            //
            // txtMiddleName
            //
            this.txtMiddleName.Location = new System.Drawing.Point(145, 53);
            this.txtMiddleName.Name     = "txtMiddleName";
            this.txtMiddleName.Size     = new System.Drawing.Size(233, 23);
            this.txtMiddleName.TabIndex = 3;
            //
            // txtLastName
            //
            this.txtLastName.Location = new System.Drawing.Point(145, 82);
            this.txtLastName.Name     = "txtLastName";
            this.txtLastName.Size     = new System.Drawing.Size(233, 23);
            this.txtLastName.TabIndex = 4;
            //
            // txtAddress
            //
            this.txtAddress.Location = new System.Drawing.Point(145, 111);
            this.txtAddress.Name     = "txtAddress";
            this.txtAddress.Size     = new System.Drawing.Size(233, 23);
            this.txtAddress.TabIndex = 5;
            //
            // txtEmail
            //
            this.txtEmail.Location = new System.Drawing.Point(145, 167);
            this.txtEmail.Name     = "txtEmail";
            this.txtEmail.Size     = new System.Drawing.Size(233, 23);
            this.txtEmail.TabIndex = 7;
            //
            // groupBox2
            //
            this.groupBox2.BackColor = System.Drawing.SystemColors.Window;
            this.groupBox2.Controls.Add(this.dtpBirthdate);
            this.groupBox2.Controls.Add(this.bunifuCustomLabel3);
            this.groupBox2.Controls.Add(this.txtEmail);
            this.groupBox2.Controls.Add(this.txtFirstName);
            this.groupBox2.Controls.Add(this.materialLabel5);
            this.groupBox2.Controls.Add(this.txtAddress);
            this.groupBox2.Controls.Add(this.materialLabel6);
            this.groupBox2.Controls.Add(this.txtLastName);
            this.groupBox2.Controls.Add(this.materialLabel7);
            this.groupBox2.Controls.Add(this.txtMiddleName);
            this.groupBox2.Controls.Add(this.materialLabel8);
            this.groupBox2.Controls.Add(this.materialLabel9);
            this.groupBox2.Location = new System.Drawing.Point(12, 192);
            this.groupBox2.Name     = "groupBox2";
            this.groupBox2.Size     = new System.Drawing.Size(384, 199);
            this.groupBox2.TabIndex = 18;
            this.groupBox2.TabStop  = false;
            this.groupBox2.Text     = "User Details";
            this.groupBox2.Enter   += new System.EventHandler(this.groupBox2_Enter);
            //
            // dtpBirthdate
            //
            this.dtpBirthdate.CalendarTitleBackColor    = System.Drawing.SystemColors.ControlLightLight;
            this.dtpBirthdate.CalendarTrailingForeColor = System.Drawing.SystemColors.WindowFrame;
            this.dtpBirthdate.Location = new System.Drawing.Point(145, 136);
            this.dtpBirthdate.Name     = "dtpBirthdate";
            this.dtpBirthdate.Size     = new System.Drawing.Size(233, 25);
            this.dtpBirthdate.TabIndex = 6;
            this.dtpBirthdate.Value    = new System.DateTime(2018, 7, 6, 7, 41, 9, 0);
            //
            // bunifuCustomLabel3
            //
            this.bunifuCustomLabel3.AutoSize  = true;
            this.bunifuCustomLabel3.BackColor = System.Drawing.SystemColors.Window;
            this.bunifuCustomLabel3.Font      = new System.Drawing.Font("Roboto", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.bunifuCustomLabel3.Location  = new System.Drawing.Point(48, 24);
            this.bunifuCustomLabel3.Name      = "bunifuCustomLabel3";
            this.bunifuCustomLabel3.Size      = new System.Drawing.Size(91, 19);
            this.bunifuCustomLabel3.TabIndex  = 24;
            this.bunifuCustomLabel3.Text      = "First Name :";
            //
            // materialLabel5
            //
            this.materialLabel5.AutoSize   = true;
            this.materialLabel5.BackColor  = System.Drawing.SystemColors.Window;
            this.materialLabel5.Depth      = 0;
            this.materialLabel5.Font       = new System.Drawing.Font("Roboto", 11F);
            this.materialLabel5.ForeColor  = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.materialLabel5.Location   = new System.Drawing.Point(34, 53);
            this.materialLabel5.MouseState = MaterialSkin.MouseState.HOVER;
            this.materialLabel5.Name       = "materialLabel5";
            this.materialLabel5.Size       = new System.Drawing.Size(106, 19);
            this.materialLabel5.TabIndex   = 8;
            this.materialLabel5.Text       = "Middle Name :";
            //
            // materialLabel6
            //
            this.materialLabel6.AutoSize   = true;
            this.materialLabel6.BackColor  = System.Drawing.SystemColors.Window;
            this.materialLabel6.Depth      = 0;
            this.materialLabel6.Font       = new System.Drawing.Font("Roboto", 11F);
            this.materialLabel6.ForeColor  = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.materialLabel6.Location   = new System.Drawing.Point(51, 82);
            this.materialLabel6.MouseState = MaterialSkin.MouseState.HOVER;
            this.materialLabel6.Name       = "materialLabel6";
            this.materialLabel6.Size       = new System.Drawing.Size(90, 19);
            this.materialLabel6.TabIndex   = 9;
            this.materialLabel6.Text       = "Last Name :";
            //
            // materialLabel7
            //
            this.materialLabel7.AutoSize   = true;
            this.materialLabel7.BackColor  = System.Drawing.SystemColors.Window;
            this.materialLabel7.Depth      = 0;
            this.materialLabel7.Font       = new System.Drawing.Font("Roboto", 11F);
            this.materialLabel7.ForeColor  = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.materialLabel7.Location   = new System.Drawing.Point(67, 111);
            this.materialLabel7.MouseState = MaterialSkin.MouseState.HOVER;
            this.materialLabel7.Name       = "materialLabel7";
            this.materialLabel7.Size       = new System.Drawing.Size(72, 19);
            this.materialLabel7.TabIndex   = 10;
            this.materialLabel7.Text       = "Address :";
            //
            // materialLabel8
            //
            this.materialLabel8.AutoSize   = true;
            this.materialLabel8.BackColor  = System.Drawing.SystemColors.Window;
            this.materialLabel8.Depth      = 0;
            this.materialLabel8.Font       = new System.Drawing.Font("Roboto", 11F);
            this.materialLabel8.ForeColor  = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.materialLabel8.Location   = new System.Drawing.Point(64, 140);
            this.materialLabel8.MouseState = MaterialSkin.MouseState.HOVER;
            this.materialLabel8.Name       = "materialLabel8";
            this.materialLabel8.Size       = new System.Drawing.Size(77, 19);
            this.materialLabel8.TabIndex   = 11;
            this.materialLabel8.Text       = "Birthdate :";
            //
            // materialLabel9
            //
            this.materialLabel9.AutoSize   = true;
            this.materialLabel9.BackColor  = System.Drawing.SystemColors.Window;
            this.materialLabel9.Depth      = 0;
            this.materialLabel9.Font       = new System.Drawing.Font("Roboto", 11F);
            this.materialLabel9.ForeColor  = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.materialLabel9.Location   = new System.Drawing.Point(25, 167);
            this.materialLabel9.MouseState = MaterialSkin.MouseState.HOVER;
            this.materialLabel9.Name       = "materialLabel9";
            this.materialLabel9.Size       = new System.Drawing.Size(114, 19);
            this.materialLabel9.TabIndex   = 12;
            this.materialLabel9.Text       = "Email Address :";
            //
            // groupBox3
            //
            this.groupBox3.BackColor = System.Drawing.SystemColors.Window;
            this.groupBox3.Controls.Add(this.materialLabel3);
            this.groupBox3.Controls.Add(this.txtUsername);
            this.groupBox3.Controls.Add(this.materialLabel10);
            this.groupBox3.Controls.Add(this.materialLabel11);
            this.groupBox3.Controls.Add(this.txtConfirmPassword);
            this.groupBox3.Controls.Add(this.txtPassword);
            this.groupBox3.Location = new System.Drawing.Point(16, 397);
            this.groupBox3.Name     = "groupBox3";
            this.groupBox3.Size     = new System.Drawing.Size(380, 117);
            this.groupBox3.TabIndex = 19;
            this.groupBox3.TabStop  = false;
            this.groupBox3.Text     = "Account Details";
            //
            // materialLabel3
            //
            this.materialLabel3.AutoSize   = true;
            this.materialLabel3.BackColor  = System.Drawing.SystemColors.Window;
            this.materialLabel3.Depth      = 0;
            this.materialLabel3.Font       = new System.Drawing.Font("Roboto", 11F);
            this.materialLabel3.ForeColor  = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.materialLabel3.Location   = new System.Drawing.Point(57, 21);
            this.materialLabel3.MouseState = MaterialSkin.MouseState.HOVER;
            this.materialLabel3.Name       = "materialLabel3";
            this.materialLabel3.Size       = new System.Drawing.Size(85, 19);
            this.materialLabel3.TabIndex   = 7;
            this.materialLabel3.Text       = "Username :"******"txtUsername";
            this.txtUsername.Size     = new System.Drawing.Size(226, 23);
            this.txtUsername.TabIndex = 8;
            //
            // materialLabel10
            //
            this.materialLabel10.AutoSize   = true;
            this.materialLabel10.BackColor  = System.Drawing.SystemColors.Window;
            this.materialLabel10.Depth      = 0;
            this.materialLabel10.Font       = new System.Drawing.Font("Roboto", 11F);
            this.materialLabel10.ForeColor  = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.materialLabel10.Location   = new System.Drawing.Point(59, 51);
            this.materialLabel10.MouseState = MaterialSkin.MouseState.HOVER;
            this.materialLabel10.Name       = "materialLabel10";
            this.materialLabel10.Size       = new System.Drawing.Size(83, 19);
            this.materialLabel10.TabIndex   = 8;
            this.materialLabel10.Text       = "Password :"******"Roboto", 11F);
            this.materialLabel11.ForeColor  = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.materialLabel11.Location   = new System.Drawing.Point(1, 80);
            this.materialLabel11.MouseState = MaterialSkin.MouseState.HOVER;
            this.materialLabel11.Name       = "materialLabel11";
            this.materialLabel11.Size       = new System.Drawing.Size(141, 19);
            this.materialLabel11.TabIndex   = 9;
            this.materialLabel11.Text       = "Confirm Password :"******"txtConfirmPassword";
            this.txtConfirmPassword.PasswordChar          = '●';
            this.txtConfirmPassword.Size                  = new System.Drawing.Size(226, 23);
            this.txtConfirmPassword.TabIndex              = 10;
            this.txtConfirmPassword.UseSystemPasswordChar = true;
            //
            // txtPassword
            //
            this.txtPassword.Location              = new System.Drawing.Point(148, 51);
            this.txtPassword.Name                  = "txtPassword";
            this.txtPassword.PasswordChar          = '●';
            this.txtPassword.Size                  = new System.Drawing.Size(226, 23);
            this.txtPassword.TabIndex              = 8;
            this.txtPassword.UseSystemPasswordChar = true;
            //
            // groupBox4
            //
            this.groupBox4.BackColor = System.Drawing.SystemColors.Window;
            this.groupBox4.Controls.Add(this.drpSecurityQuestion);
            this.groupBox4.Controls.Add(this.materialLabel12);
            this.groupBox4.Controls.Add(this.materialLabel13);
            this.groupBox4.Controls.Add(this.txtSecurityAnswer);
            this.groupBox4.Location = new System.Drawing.Point(18, 520);
            this.groupBox4.Name     = "groupBox4";
            this.groupBox4.Size     = new System.Drawing.Size(378, 90);
            this.groupBox4.TabIndex = 20;
            this.groupBox4.TabStop  = false;
            this.groupBox4.Text     = "Account Recovery";
            //
            // drpSecurityQuestion
            //
            this.drpSecurityQuestion.DropDownStyle     = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.drpSecurityQuestion.DropDownWidth     = 224;
            this.drpSecurityQuestion.InputControlStyle = ComponentFactory.Krypton.Toolkit.InputControlStyle.Ribbon;
            this.drpSecurityQuestion.Items.AddRange(new object[] {
                "In what city were you born?",
                "What high school did you attend?",
                "What is the first and last name of your first boyfriend or girlfriend?",
                "What is the name of your favorite pet?",
                "What is the name of your first grade teacher?",
                "What is the name of your first school?",
                "What is your father\'s middle name?",
                "What is your favorite color?",
                "what is your favorite forum",
                "What is your favorite movie?",
                "what is your favorite online platform",
                "what is your favorite social media website",
                "what is your favorite website",
                "What is your mother\'s maiden name?",
                "What street did you grow up on?",
                "What was the make of your first car?",
                "What was your favorite place to visit as a child?",
                "What was your high school mascot?",
                "When is your anniversary?",
                "Which is your favorite web browser?",
                "Which phone number do you remember most from your childhood?",
                "Who is your favorite actor, musician, or artist?"
            });
            this.drpSecurityQuestion.Location    = new System.Drawing.Point(148, 21);
            this.drpSecurityQuestion.Name        = "drpSecurityQuestion";
            this.drpSecurityQuestion.PaletteMode = ComponentFactory.Krypton.Toolkit.PaletteMode.Office2010Black;
            this.drpSecurityQuestion.Size        = new System.Drawing.Size(224, 21);
            this.drpSecurityQuestion.TabIndex    = 11;
            //
            // materialLabel12
            //
            this.materialLabel12.AutoSize   = true;
            this.materialLabel12.BackColor  = System.Drawing.SystemColors.Window;
            this.materialLabel12.Depth      = 0;
            this.materialLabel12.Font       = new System.Drawing.Font("Roboto", 11F);
            this.materialLabel12.ForeColor  = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.materialLabel12.Location   = new System.Drawing.Point(7, 21);
            this.materialLabel12.MouseState = MaterialSkin.MouseState.HOVER;
            this.materialLabel12.Name       = "materialLabel12";
            this.materialLabel12.Size       = new System.Drawing.Size(135, 19);
            this.materialLabel12.TabIndex   = 7;
            this.materialLabel12.Text       = "Security Question :";
            //
            // materialLabel13
            //
            this.materialLabel13.AutoSize   = true;
            this.materialLabel13.BackColor  = System.Drawing.SystemColors.Window;
            this.materialLabel13.Depth      = 0;
            this.materialLabel13.Font       = new System.Drawing.Font("Roboto", 11F);
            this.materialLabel13.ForeColor  = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.materialLabel13.Location   = new System.Drawing.Point(17, 51);
            this.materialLabel13.MouseState = MaterialSkin.MouseState.HOVER;
            this.materialLabel13.Name       = "materialLabel13";
            this.materialLabel13.Size       = new System.Drawing.Size(125, 19);
            this.materialLabel13.TabIndex   = 8;
            this.materialLabel13.Text       = "Security Answer :";
            //
            // txtSecurityAnswer
            //
            this.txtSecurityAnswer.Location = new System.Drawing.Point(148, 51);
            this.txtSecurityAnswer.Name     = "txtSecurityAnswer";
            this.txtSecurityAnswer.Size     = new System.Drawing.Size(224, 23);
            this.txtSecurityAnswer.TabIndex = 12;
            //
            // bunifuCustomLabel1
            //
            this.bunifuCustomLabel1.AutoSize  = true;
            this.bunifuCustomLabel1.BackColor = System.Drawing.SystemColors.Window;
            this.bunifuCustomLabel1.Font      = new System.Drawing.Font("Roboto Medium", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.bunifuCustomLabel1.Location  = new System.Drawing.Point(17, 163);
            this.bunifuCustomLabel1.Name      = "bunifuCustomLabel1";
            this.bunifuCustomLabel1.Size      = new System.Drawing.Size(66, 20);
            this.bunifuCustomLabel1.TabIndex  = 23;
            this.bunifuCustomLabel1.Text      = "User ID :";
            //
            // bunifuCustomLabel2
            //
            this.bunifuCustomLabel2.AutoSize  = true;
            this.bunifuCustomLabel2.BackColor = System.Drawing.SystemColors.Window;
            this.bunifuCustomLabel2.Font      = new System.Drawing.Font("Roboto", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.bunifuCustomLabel2.Location  = new System.Drawing.Point(931, 75);
            this.bunifuCustomLabel2.Name      = "bunifuCustomLabel2";
            this.bunifuCustomLabel2.Size      = new System.Drawing.Size(63, 19);
            this.bunifuCustomLabel2.TabIndex  = 24;
            this.bunifuCustomLabel2.Text      = "Search :";
            //
            // dgvView
            //
            this.dgvView.AllowUserToAddRows          = false;
            this.dgvView.AllowUserToDeleteRows       = false;
            this.dgvView.AllowUserToOrderColumns     = true;
            this.dgvView.AllowUserToResizeColumns    = false;
            this.dgvView.AllowUserToResizeRows       = false;
            this.dgvView.BackgroundColor             = System.Drawing.SystemColors.InactiveCaption;
            this.dgvView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            dataGridViewCellStyle3.Alignment         = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle3.BackColor         = System.Drawing.SystemColors.Window;
            dataGridViewCellStyle3.Font               = new System.Drawing.Font("Roboto Light", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            dataGridViewCellStyle3.ForeColor          = System.Drawing.SystemColors.ControlText;
            dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
            dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText;
            dataGridViewCellStyle3.WrapMode           = System.Windows.Forms.DataGridViewTriState.False;
            this.dgvView.DefaultCellStyle             = dataGridViewCellStyle3;
            this.dgvView.EditMode  = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
            this.dgvView.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229)))));
            this.dgvView.Location  = new System.Drawing.Point(402, 103);
            this.dgvView.Name      = "dgvView";
            this.dgvView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders;
            this.dgvView.SelectionMode           = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
            this.dgvView.Size     = new System.Drawing.Size(790, 536);
            this.dgvView.TabIndex = 25;
            this.dgvView.CellContentDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvView_CellContentDoubleClick);
            //
            // btnEdit
            //
            this.btnEdit.Location    = new System.Drawing.Point(210, 614);
            this.btnEdit.Name        = "btnEdit";
            this.btnEdit.Size        = new System.Drawing.Size(90, 25);
            this.btnEdit.TabIndex    = 26;
            this.btnEdit.Values.Text = "Edit User";
            //
            // txtSearch
            //
            this.txtSearch.Depth                 = 0;
            this.txtSearch.Hint                  = "";
            this.txtSearch.Location              = new System.Drawing.Point(991, 75);
            this.txtSearch.MouseState            = MaterialSkin.MouseState.HOVER;
            this.txtSearch.Name                  = "txtSearch";
            this.txtSearch.PasswordChar          = '\0';
            this.txtSearch.SelectedText          = "";
            this.txtSearch.SelectionLength       = 0;
            this.txtSearch.SelectionStart        = 0;
            this.txtSearch.Size                  = new System.Drawing.Size(201, 23);
            this.txtSearch.TabIndex              = 28;
            this.txtSearch.UseSystemPasswordChar = false;
            this.txtSearch.Click                += new System.EventHandler(this.txtSearch_Click);
            this.txtSearch.TextChanged          += new System.EventHandler(this.txtSearch_TextChanged);
            //
            // btnInsert
            //
            this.btnInsert.Location    = new System.Drawing.Point(306, 614);
            this.btnInsert.Name        = "btnInsert";
            this.btnInsert.Size        = new System.Drawing.Size(90, 25);
            this.btnInsert.TabIndex    = 29;
            this.btnInsert.Values.Text = "Add User";
            this.btnInsert.Click      += new System.EventHandler(this.btnInsert_Click);
            //
            // btnDelete
            //
            this.btnDelete.Location    = new System.Drawing.Point(114, 614);
            this.btnDelete.Name        = "btnDelete";
            this.btnDelete.Size        = new System.Drawing.Size(90, 25);
            this.btnDelete.TabIndex    = 30;
            this.btnDelete.Values.Text = "Delete User";
            //
            // btnClear
            //
            this.btnClear.Location    = new System.Drawing.Point(18, 614);
            this.btnClear.Name        = "btnClear";
            this.btnClear.Size        = new System.Drawing.Size(90, 25);
            this.btnClear.TabIndex    = 31;
            this.btnClear.Values.Text = "Clear";
            this.btnClear.Click      += new System.EventHandler(this.btnClear_Click);
            //
            // UserRegistration
            //
            this.ClientSize = new System.Drawing.Size(1204, 670);
            this.Controls.Add(this.btnClear);
            this.Controls.Add(this.btnDelete);
            this.Controls.Add(this.btnInsert);
            this.Controls.Add(this.txtSearch);
            this.Controls.Add(this.btnEdit);
            this.Controls.Add(this.dgvView);
            this.Controls.Add(this.bunifuCustomLabel2);
            this.Controls.Add(this.bunifuCustomLabel1);
            this.Controls.Add(this.groupBox4);
            this.Controls.Add(this.groupBox3);
            this.Controls.Add(this.groupBox2);
            this.Controls.Add(this.txtID);
            this.Controls.Add(this.groupBox1);
            this.Controls.Add(this.materialLabel1);
            this.Font          = new System.Drawing.Font("Roboto Light", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Name          = "UserRegistration";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text          = "User Registration";
            this.Load         += new System.EventHandler(this.UserRegistration_Load_2);
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            this.groupBox2.ResumeLayout(false);
            this.groupBox2.PerformLayout();
            this.groupBox3.ResumeLayout(false);
            this.groupBox3.PerformLayout();
            this.groupBox4.ResumeLayout(false);
            this.groupBox4.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.drpSecurityQuestion)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.dgvView)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
        }
Пример #15
0
        private void degreeChanged(object sender, EventArgs e)
        {
            MaterialRadioButton button        = (MaterialRadioButton)sender;
            string        degreeName          = button.Text;
            Undergraduate undergraduateDegree = null;
            Graduate      graduateDegree      = null;

            foreach (Undergraduate degree in degrees.undergraduate)
            {
                if (degree.degreeName == degreeName)
                {
                    undergraduateDegree = degree;
                    break;
                }
            }

            foreach (Graduate degree in degrees.graduate)
            {
                if (degree.degreeName == degreeName)
                {
                    graduateDegree = degree;
                    break;
                }
            }

            degreeTitle.Visible = true;
            degreeTitle.Font    = new Font(degreeTitle.Font.FontFamily, 10, FontStyle.Bold);

            degreeDescription.Visible = true;

            string list = "";

            if (undergraduateDegree != null)
            {
                degreeTitle.Text       = undergraduateDegree.title;
                degreeDescription.Text = undergraduateDegree.description;

                list = "Concentrations: \n";
                foreach (string concentration in undergraduateDegree.concentrations)
                {
                    list += "    - " + concentration + "\n";
                }
                degreeList.Visible = true;
            }
            else if (graduateDegree != null && graduateDegree.availableCertificates == null)
            {
                degreeTitle.Text       = graduateDegree.title;
                degreeDescription.Text = graduateDegree.description;
                list = "Concentrations: \n";
                foreach (string concentration in graduateDegree.concentrations)
                {
                    list += "    - " + concentration + "\n";
                }
                degreeList.Visible = true;
            }
            else
            {
                degreeTitle.Text = graduateDegree.degreeName;
                string description = "";
                foreach (string certificate in graduateDegree.availableCertificates)
                {
                    description += "    - " + certificate + "\n";
                }
                degreeDescription.Text = description;
            }

            degreeList.Text = list;

            degreeInfo.Controls.Add(degreeTitle);
        }
Пример #16
0
        public List <Control> CreateView()
        {
            List <Control>   controls = new List <Control>();
            var              font     = new Font(SystemFonts.DefaultFont, FontStyle.Bold);
            var              margin   = new Padding(10, 20, 10, 0);
            TableLayoutPanel content  = new TableLayoutPanel()
            {
                Name        = "tblAddReplace",
                ColumnCount = 3,
                AutoSize    = false,
                Size        = new Size(430, 60),
                RowStyles   =
                {
                    new RowStyle(SizeType.Absolute, 30f),
                    new RowStyle(SizeType.Absolute, 50f),
                    new RowStyle(SizeType.Absolute, 50f),
                },
                ColumnStyles =
                {
                    new ColumnStyle(SizeType.Percent, 30f),
                    new ColumnStyle(SizeType.Percent, 35f),
                    new ColumnStyle(SizeType.Percent, 35f)
                },
            };
            Label noBill = new Label()
            {
                Name      = "lblNoBill",
                Text      = "No.000000001",
                ForeColor = ColorManager.Primary,
                Font      = font,
            };

            content.Controls.Add(noBill, 0, 0);
            Label generationDate = new Label()
            {
                Name      = "lblGenerationDate",
                Text      = DateTime.Now.Date.ToString("dd - MM - yyyy"),
                ForeColor = ColorManager.Primary,
                Font      = font,
                Dock      = DockStyle.Right
            };

            content.Controls.Add(generationDate, 1, 0);

            content.SetColumnSpan(generationDate, 2);
            MaterialRadioButton rdoBill = new MaterialRadioButton()
            {
                Name = "rdoBill",
                Text = "Factura",
            };
            MaterialRadioButton rdoCredit = new MaterialRadioButton()
            {
                Name     = "rdoCredit",
                Text     = "Credito Fiscal",
                AutoSize = true
            };

            content.Controls.Add(rdoBill, 0, 1);
            content.Controls.Add(rdoCredit, 1, 1);
            content.SetColumnSpan(rdoCredit, 2);

            controls.Add(content);
            MaterialSingleLineTextField txtNit = new MaterialSingleLineTextField()
            {
                Name   = "txtNit",
                Hint   = "Ingresa el número de NIT",
                Dock   = DockStyle.Fill,
                Margin = margin
            };

            controls.Add(txtNit);

            MaterialSingleLineTextField txtClientName = new MaterialSingleLineTextField()
            {
                Name   = "txtClientName",
                Hint   = "Ingresa el nombre del Cliente",
                Dock   = DockStyle.Fill,
                Margin = margin
            };

            controls.Add(txtClientName);
            TableLayoutPanel contentMiddle = new TableLayoutPanel()
            {
                Name        = "tblAddReplaceMiddle",
                ColumnCount = 3,
                AutoSize    = false,
                Size        = new Size(430, 30),
                RowStyles   =
                {
                    new RowStyle(SizeType.Absolute, 30f)
                },
                ColumnStyles =
                {
                    new ColumnStyle(SizeType.Percent, 50f),
                    new ColumnStyle(SizeType.Percent, 25f),
                    new ColumnStyle(SizeType.Percent, 25f)
                },
                Margin = margin
            };

            MaterialSingleLineTextField txtSearchProduct = new MaterialSingleLineTextField()
            {
                Name = "txtSearchProduct",
                Hint = "Ingresa el nombre del Producto",
                Dock = DockStyle.Fill,
            };

            contentMiddle.Controls.Add(txtSearchProduct, 0, 0);

            MaterialSingleLineTextField txtPriceProduct = new MaterialSingleLineTextField()
            {
                Name = "txtPriceProduct",
                Hint = "$0.00",
                Dock = DockStyle.Fill,
            };

            contentMiddle.Controls.Add(txtPriceProduct, 1, 0);

            MaterialSingleLineTextField txtUnitProduct = new MaterialSingleLineTextField()
            {
                Name = "txtUnitProduct",
                Hint = "0",
                Dock = DockStyle.Fill,
            };

            contentMiddle.Controls.Add(txtUnitProduct, 2, 0);
            controls.Add(contentMiddle);
            DataGridView dgvProductSale = new DataGridView()
            {
                Dock     = DockStyle.Fill,
                AutoSize = false,
                Size     = new Size(400, 300)
            };

            controls.Add(dgvProductSale);



            Label lblTotal = new Label()
            {
                Name      = "lblTotal",
                Text      = "Total: $0.00",
                AutoSize  = true,
                ForeColor = ColorManager.Primary,
                Font      = new Font(FontFamily.GenericSansSerif, 20, FontStyle.Bold, GraphicsUnit.Point),
                Dock      = DockStyle.Fill,
                Margin    = new Padding(250, 10, 0, 0)
            };

            controls.Add(lblTotal);

            return(controls);
        }