Inheritance: System.Windows.Forms.ComboBox, IMetroControl
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.label1 = new System.Windows.Forms.Label();
     this.label2 = new System.Windows.Forms.Label();
     this.label3 = new System.Windows.Forms.Label();
     this.label4 = new System.Windows.Forms.Label();
     this.user_name = new System.Windows.Forms.TextBox();
     this.pass_word = new System.Windows.Forms.TextBox();
     this.confirm_password = new System.Windows.Forms.TextBox();
     this.role = new MetroFramework.Controls.MetroComboBox();
     this.changeloginCredentials = new MetroFramework.Controls.MetroButton();
     this.email_textbox = new System.Windows.Forms.TextBox();
     this.phone_textbox = new System.Windows.Forms.TextBox();
     this.label5 = new System.Windows.Forms.Label();
     this.label6 = new System.Windows.Forms.Label();
     this.SuspendLayout();
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Font = new System.Drawing.Font("Trebuchet MS", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label1.ForeColor = System.Drawing.SystemColors.AppWorkspace;
     this.label1.Location = new System.Drawing.Point(77, 60);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(66, 18);
     this.label1.TabIndex = 0;
     this.label1.Text = "Username";
     this.label1.Click += new System.EventHandler(this.label1_Click);
     //
     // label2
     //
     this.label2.AutoSize = true;
     this.label2.Font = new System.Drawing.Font("Trebuchet MS", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label2.ForeColor = System.Drawing.SystemColors.AppWorkspace;
     this.label2.Location = new System.Drawing.Point(82, 235);
     this.label2.Name = "label2";
     this.label2.Size = new System.Drawing.Size(61, 18);
     this.label2.TabIndex = 1;
     this.label2.Text = "Password";
     //
     // label3
     //
     this.label3.AutoSize = true;
     this.label3.Font = new System.Drawing.Font("Trebuchet MS", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label3.ForeColor = System.Drawing.SystemColors.AppWorkspace;
     this.label3.Location = new System.Drawing.Point(31, 286);
     this.label3.Name = "label3";
     this.label3.Size = new System.Drawing.Size(112, 18);
     this.label3.TabIndex = 2;
     this.label3.Text = "Confirm Password";
     //
     // label4
     //
     this.label4.AutoSize = true;
     this.label4.Font = new System.Drawing.Font("Trebuchet MS", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label4.ForeColor = System.Drawing.SystemColors.AppWorkspace;
     this.label4.Location = new System.Drawing.Point(111, 194);
     this.label4.Name = "label4";
     this.label4.Size = new System.Drawing.Size(32, 18);
     this.label4.TabIndex = 3;
     this.label4.Text = "Role";
     this.label4.Click += new System.EventHandler(this.label4_Click);
     //
     // user_name
     //
     this.user_name.Font = new System.Drawing.Font("Trebuchet MS", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.user_name.Location = new System.Drawing.Point(181, 54);
     this.user_name.Name = "user_name";
     this.user_name.Size = new System.Drawing.Size(211, 26);
     this.user_name.TabIndex = 4;
     this.user_name.TextChanged += new System.EventHandler(this.user_name_TextChanged);
     //
     // pass_word
     //
     this.pass_word.Font = new System.Drawing.Font("Trebuchet MS", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.pass_word.Location = new System.Drawing.Point(181, 235);
     this.pass_word.Name = "pass_word";
     this.pass_word.PasswordChar = '*';
     this.pass_word.Size = new System.Drawing.Size(211, 26);
     this.pass_word.TabIndex = 5;
     //
     // confirm_password
     //
     this.confirm_password.Font = new System.Drawing.Font("Trebuchet MS", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.confirm_password.Location = new System.Drawing.Point(181, 280);
     this.confirm_password.Name = "confirm_password";
     this.confirm_password.PasswordChar = '*';
     this.confirm_password.Size = new System.Drawing.Size(211, 26);
     this.confirm_password.TabIndex = 6;
     //
     // role
     //
     this.role.FormattingEnabled = true;
     this.role.ItemHeight = 23;
     this.role.Items.AddRange(new object[] {
     "Admin",
     "Normal User"});
     this.role.Location = new System.Drawing.Point(181, 194);
     this.role.Name = "role";
     this.role.PromptText = "Admin";
     this.role.Size = new System.Drawing.Size(212, 29);
     this.role.TabIndex = 7;
     this.role.UseSelectable = true;
     this.role.SelectedIndexChanged += new System.EventHandler(this.metroComboBox1_SelectedIndexChanged);
     //
     // changeloginCredentials
     //
     this.changeloginCredentials.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     this.changeloginCredentials.Cursor = System.Windows.Forms.Cursors.Hand;
     this.changeloginCredentials.Location = new System.Drawing.Point(216, 321);
     this.changeloginCredentials.Name = "changeloginCredentials";
     this.changeloginCredentials.Size = new System.Drawing.Size(132, 32);
     this.changeloginCredentials.TabIndex = 19;
     this.changeloginCredentials.Text = "Create";
     this.changeloginCredentials.UseSelectable = true;
     this.changeloginCredentials.Click += new System.EventHandler(this.changeloginCredentials_Click);
     //
     // email_textbox
     //
     this.email_textbox.Font = new System.Drawing.Font("Trebuchet MS", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.email_textbox.Location = new System.Drawing.Point(182, 97);
     this.email_textbox.Name = "email_textbox";
     this.email_textbox.Size = new System.Drawing.Size(211, 26);
     this.email_textbox.TabIndex = 20;
     //
     // phone_textbox
     //
     this.phone_textbox.Font = new System.Drawing.Font("Trebuchet MS", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.phone_textbox.Location = new System.Drawing.Point(182, 149);
     this.phone_textbox.Name = "phone_textbox";
     this.phone_textbox.Size = new System.Drawing.Size(211, 26);
     this.phone_textbox.TabIndex = 21;
     //
     // label5
     //
     this.label5.AutoSize = true;
     this.label5.Font = new System.Drawing.Font("Trebuchet MS", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label5.ForeColor = System.Drawing.SystemColors.AppWorkspace;
     this.label5.Location = new System.Drawing.Point(103, 103);
     this.label5.Name = "label5";
     this.label5.Size = new System.Drawing.Size(40, 18);
     this.label5.TabIndex = 22;
     this.label5.Text = "email";
     //
     // label6
     //
     this.label6.AutoSize = true;
     this.label6.Font = new System.Drawing.Font("Trebuchet MS", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label6.ForeColor = System.Drawing.SystemColors.AppWorkspace;
     this.label6.Location = new System.Drawing.Point(52, 157);
     this.label6.Name = "label6";
     this.label6.Size = new System.Drawing.Size(91, 18);
     this.label6.TabIndex = 23;
     this.label6.Text = "Phone Number";
     //
     // AddNewUserForm
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(506, 362);
     this.Controls.Add(this.label6);
     this.Controls.Add(this.label5);
     this.Controls.Add(this.phone_textbox);
     this.Controls.Add(this.email_textbox);
     this.Controls.Add(this.changeloginCredentials);
     this.Controls.Add(this.role);
     this.Controls.Add(this.confirm_password);
     this.Controls.Add(this.pass_word);
     this.Controls.Add(this.user_name);
     this.Controls.Add(this.label4);
     this.Controls.Add(this.label3);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.label1);
     this.Name = "AddNewUserForm";
     this.Text = "Add New User";
     this.Theme = MetroFramework.MetroThemeStyle.Dark;
     this.Load += new System.EventHandler(this.AddNewUser_Load);
     this.ResumeLayout(false);
     this.PerformLayout();
 }
        //Add new movie to the database.
        public bool addMovie(Movie movie, MetroComboBox cmbMovieRating)
        {
            //Inserts information to movie.
            string DDL = "insert into Movie(Movie_Name, Movie_Rating) values('" + movie.getSetMovieName + "','" + movie.getSetMovieRating + "')";
            OleDbCommand command = new OleDbCommand(DDL, database.getSetCon());

            //Validates the variables first.
            if (validateName(movie) && validateRating(cmbMovieRating) && validateListing())
            {
                database.runCommand(command); //Executes the SQL statement - adds new movie
                return true;
            }
            //Validation failed
            else
            {
                return false;
            }

        }
        public SceneViewAssetsControl(SceneViewPageControl owner)
        {
            MetroSkinManager.ApplyMetroStyle(this);
            m_owner = owner;
            m_backImage = Bitmap.FromFile("resources/icons/appbar.arrow.left.png");
            m_dirImage = Bitmap.FromFile("resources/icons/appbar.folder.png");
            m_fileImage = Bitmap.FromFile("resources/icons/appbar.page.png");
            m_fileCodeImage = Bitmap.FromFile("resources/icons/appbar.page.code.png");
            m_fileImageImage = Bitmap.FromFile("resources/icons/appbar.page.image.png");
            m_fileMusicImage = Bitmap.FromFile("resources/icons/appbar.page.music.png");
            m_fileTextImage = Bitmap.FromFile("resources/icons/appbar.page.text.png");
            m_fileDataImage = Bitmap.FromFile("resources/icons/appbar.page.xml.png");
            Resize += SceneViewAssetsControl_Resize;

            m_toolbarPanel = new MetroPanel();
            MetroSkinManager.ApplyMetroStyle(m_toolbarPanel);
            m_toolbarPanel.Dock = DockStyle.Top;
            m_toolbarPanel.Height = DEFAULT_SIZE;

            m_menuAddTile = new MetroTileIcon();
            MetroSkinManager.ApplyMetroStyle(m_menuAddTile);
            m_menuAddTile.Top = 2;
            m_menuAddTile.Width = DEFAULT_SIZE - 4;
            m_menuAddTile.Height = DEFAULT_SIZE - 4;
            m_menuAddTile.Image = Bitmap.FromFile("resources/icons/appbar.add.png");
            m_menuAddTile.IsImageScaled = true;
            m_menuAddTile.ImageScale = new PointF(0.5f, 0.5f);
            m_menuAddTile.MouseUp += m_menuAddTile_MouseUp;
            m_toolbarPanel.Controls.Add(m_menuAddTile);

            m_menuTypeCombobox = new MetroComboBox();
            MetroSkinManager.ApplyMetroStyle(m_menuTypeCombobox);
            m_menuTypeCombobox.Left = m_menuAddTile.Right + DEFAULT_SEPARATOR;
            m_menuTypeCombobox.Width = 100;
            m_menuTypeCombobox.Height = DEFAULT_SIZE;
            m_menuTypeCombobox.BindingContext = new BindingContext();
            m_menuTypeCombobox.DataSource = ASSET_TYPES;
            m_menuTypeCombobox.SelectedValueChanged += m_menuTypeCombobox_SelectedValueChanged;
            m_toolbarPanel.Controls.Add(m_menuTypeCombobox);

            m_menuSearchTextbox = new MetroTextBox();
            MetroSkinManager.ApplyMetroStyle(m_menuSearchTextbox);
            m_menuSearchTextbox.Left = m_menuTypeCombobox.Right + DEFAULT_SEPARATOR;
            m_menuSearchTextbox.Width = 250;
            m_menuSearchTextbox.Height = DEFAULT_SIZE;
            m_menuSearchTextbox.Text = "";
            m_menuSearchTextbox.TextChanged += m_menuSearchTextbox_TextChanged;
            m_toolbarPanel.Controls.Add(m_menuSearchTextbox);

            m_menuPathLabel = new MetroLabel();
            MetroSkinManager.ApplyMetroStyle(m_menuPathLabel);
            m_menuPathLabel.Left = m_menuSearchTextbox.Right + DEFAULT_SEPARATOR;
            m_menuPathLabel.Width = 0;
            m_menuPathLabel.Height = 0;
            m_menuPathLabel.Text = "";
            m_menuPathLabel.AutoSize = true;
            m_toolbarPanel.Controls.Add(m_menuPathLabel);

            m_filesListPanel = new MetroPanel();
            MetroSkinManager.ApplyMetroStyle(m_filesListPanel);
            m_filesListPanel.Dock = DockStyle.Fill;

            m_filesListScrollbar = new MetroScrollBar(MetroScrollOrientation.Horizontal);
            MetroSkinManager.ApplyMetroStyle(m_filesListScrollbar);
            m_filesListScrollbar.Dock = DockStyle.Bottom;
            m_filesListScrollbar.Scroll += m_filesListScrollbar_Scroll;

            Controls.Add(m_filesListPanel);
            Controls.Add(m_toolbarPanel);
            Controls.Add(m_filesListScrollbar);

            UpdateScrollbar();
        }
 //Adds items to the combo box
 public void addItemsToCmb(MetroComboBox comboBox)
 {
     foreach(DateTime showTime in getAllShowTimes()) //Loops through each item in the list.
     {
         comboBox.Items.Add(showTime); //Adds the date and time.
     }
 }
            public CurveEditDialog(PlayCanvas_Curve_PropertyEditor propertyEditor)
            {
                if (propertyEditor == null)
                    throw new ArgumentNullException("`propertyEditor` argument cannot be null!");

                m_activeCurve = -1;
                m_activeKey = -1.0f;
                m_zoomOut = 1.0f;
                m_propertyEditor = propertyEditor;
                m_info = m_propertyEditor.Info == null ? new PlayCanvas_Curve_PropertyEditor.CurveInfo() : m_propertyEditor.Info;
                if (m_info.Curves != null && m_info.Curves.Length > 0)
                {
                    m_curveSet = m_propertyEditor.PropertyModel.Data<PlayCanvas.CurveSet>();
                    if (m_curveSet == null)
                        m_curveSet = new PlayCanvas.CurveSet();
                    if (m_curveSet.CurvesList.Count < m_info.Curves.Length)
                        for (int i = m_curveSet.CurvesList.Count; i < m_info.Curves.Length; ++i)
                            m_curveSet.CurvesList.Add(new PlayCanvas.Curve(new float[] { 0.0f, 0.0f }));
                }
                else
                {
                    m_curve = m_propertyEditor.PropertyModel.Data<PlayCanvas.Curve>();
                    if (m_curve == null)
                        m_curve = new PlayCanvas.Curve();
                    if (m_curve.KeyFrames.Count == 0)
                        m_curve.KeyFrames.Add(0.0f, 0.0f);
                    float diff = Math.Max(Math.Abs(m_info.Max), Math.Abs(m_info.Min));
                    while (m_zoomOut < diff)
                        m_zoomOut *= 2.0f;
                }
                ValidateCurve();

                MetroSkinManager.ApplyMetroStyle(this);
                Size = new Size(640, 480);
                MinimumSize = new Size(480, 320);
                Text = (m_curve == null ? "Edit curve set: " : "Edit curve: ") + propertyEditor.PropertyModel.Name;
                FormClosed += CurveEditDialog_FormClosed;

                m_editPictureBox = new PictureBox();
                m_editPictureBox.Dock = DockStyle.Fill;
                m_editPictureBox.BackColor = Color.FromArgb(255, 64, 64, 64);
                m_editPictureBox.Resize += m_editPictureBox_Resize;
                m_editPictureBox.Paint += m_editPictureBox_Paint;
                m_editPictureBox.MouseEnter += m_editPictureBox_MouseEnter;
                m_editPictureBox.MouseDown += m_editPictureBox_MouseDown;
                m_editPictureBox.MouseUp += m_editPictureBox_MouseUp;
                m_editPictureBox.MouseMove += m_editPictureBox_MouseMove;
                m_editPictureBox.MouseWheel += m_editPictureBox_MouseWheel;
                Controls.Add(m_editPictureBox);
                m_editPictureBox.Refresh();

                MetroPanel topToolbar = new MetroPanel();
                MetroSkinManager.ApplyMetroStyle(topToolbar);
                topToolbar.Width = 0;
                topToolbar.Height = 30;
                topToolbar.Dock = DockStyle.Top;
                Controls.Add(topToolbar);

                MetroLabel typeLabel = new MetroLabel();
                MetroSkinManager.ApplyMetroStyle(typeLabel);
                typeLabel.Width = 0;
                typeLabel.Height = 0;
                typeLabel.AutoSize = true;
                typeLabel.Dock = DockStyle.Left;
                typeLabel.Text = "Type:";

                if (m_curveSet != null)
                {
                    m_curvesCheckBoxes = new List<MetroCheckBox>();
                    foreach (var name in m_info.Curves)
                    {
                        MetroCheckBox checkBox = new MetroCheckBox();
                        MetroSkinManager.ApplyMetroStyle(checkBox);
                        checkBox.Width = 0;
                        checkBox.AutoSize = true;
                        checkBox.Checked = true;
                        checkBox.Text = name;
                        checkBox.Dock = DockStyle.Right;
                        checkBox.CheckedChanged += checkBox_CheckedChanged;
                        topToolbar.Controls.Add(checkBox);
                        m_curvesCheckBoxes.Add(checkBox);
                    }
                }

                m_typeComboBox = new MetroComboBox();
                MetroSkinManager.ApplyMetroStyle(m_typeComboBox);
                m_typeComboBox.Dock = DockStyle.Left;
                m_typeComboBox.BindingContext = new BindingContext();
                m_typeComboBox.DataSource = Enum.GetNames(typeof(PlayCanvas.Curve.CurveType));
                if (m_curve != null)
                    m_typeComboBox.SelectedItem = Enum.GetName(typeof(PlayCanvas.Curve.CurveType), m_curve.Type);
                else if (m_curveSet != null)
                    m_typeComboBox.SelectedItem = Enum.GetName(typeof(PlayCanvas.Curve.CurveType), m_curveSet.Type);
                m_typeComboBox.SelectedValueChanged += m_typeComboBox_SelectedValueChanged;

                topToolbar.Controls.Add(m_typeComboBox);
                topToolbar.Controls.Add(typeLabel);

                MetroPanel bottomToolbar = new MetroPanel();
                MetroSkinManager.ApplyMetroStyle(bottomToolbar);
                bottomToolbar.Width = 0;
                bottomToolbar.Height = 24;
                bottomToolbar.Dock = DockStyle.Bottom;
                Controls.Add(bottomToolbar);

                MetroLabel keyLabel = new MetroLabel();
                MetroSkinManager.ApplyMetroStyle(keyLabel);
                keyLabel.Width = 0;
                keyLabel.Height = 0;
                keyLabel.AutoSize = true;
                keyLabel.Dock = DockStyle.Left;
                keyLabel.Text = "Key frame:";

                m_keyTextBox = new MetroTextBox();
                MetroSkinManager.ApplyMetroStyle(m_keyTextBox);
                m_keyTextBox.Width = 100;
                m_keyTextBox.Dock = DockStyle.Left;
                m_keyTextBox.TextChanged += m_keyTextBox_TextChanged;
                m_keyTextBox.CustomPaintForeground += m_keyTextBox_CustomPaintForeground;
                m_keyTextBox.Leave += m_keyTextBox_Leave;

                MetroLabel valueLabel = new MetroLabel();
                MetroSkinManager.ApplyMetroStyle(valueLabel);
                valueLabel.Width = 0;
                valueLabel.Height = 0;
                valueLabel.AutoSize = true;
                valueLabel.Dock = DockStyle.Left;
                valueLabel.Text = "Value:";

                m_valueTextBox = new MetroTextBox();
                MetroSkinManager.ApplyMetroStyle(m_valueTextBox);
                m_valueTextBox.Width = 100;
                m_valueTextBox.Dock = DockStyle.Left;
                m_valueTextBox.TextChanged += m_valueTextBox_TextChanged;
                m_valueTextBox.CustomPaintForeground += m_valueTextBox_CustomPaintForeground;
                m_valueTextBox.Leave += m_valueTextBox_Leave;

                MetroButton resetButton = new MetroButton();
                MetroSkinManager.ApplyMetroStyle(resetButton);
                resetButton.Width = 0;
                resetButton.AutoSize = true;
                resetButton.Dock = DockStyle.Right;
                resetButton.Text = m_curve == null ? "Reset visible curves" : "Reset curve";
                resetButton.Click += resetButton_Click;

                bottomToolbar.Controls.Add(resetButton);
                bottomToolbar.Controls.Add(m_valueTextBox);
                bottomToolbar.Controls.Add(valueLabel);
                bottomToolbar.Controls.Add(m_keyTextBox);
                bottomToolbar.Controls.Add(keyLabel);
            }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.changeUserRole = new MetroFramework.Controls.MetroButton();
     this.role = new MetroFramework.Controls.MetroComboBox();
     this.user_name = new System.Windows.Forms.TextBox();
     this.label4 = new System.Windows.Forms.Label();
     this.label1 = new System.Windows.Forms.Label();
     this.SuspendLayout();
     //
     // changeUserRole
     //
     this.changeUserRole.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     this.changeUserRole.Cursor = System.Windows.Forms.Cursors.Hand;
     this.changeUserRole.Location = new System.Drawing.Point(253, 136);
     this.changeUserRole.Name = "changeUserRole";
     this.changeUserRole.Size = new System.Drawing.Size(121, 32);
     this.changeUserRole.TabIndex = 24;
     this.changeUserRole.Text = "Change";
     this.changeUserRole.UseSelectable = true;
     this.changeUserRole.Click += new System.EventHandler(this.changeUserRole_Click);
     //
     // role
     //
     this.role.FormattingEnabled = true;
     this.role.ItemHeight = 23;
     this.role.Items.AddRange(new object[] {
     "Admin",
     "Normal User"});
     this.role.Location = new System.Drawing.Point(198, 101);
     this.role.Name = "role";
     this.role.PromptText = "Admin";
     this.role.Size = new System.Drawing.Size(212, 29);
     this.role.TabIndex = 23;
     this.role.UseSelectable = true;
     //
     // user_name
     //
     this.user_name.Font = new System.Drawing.Font("Trebuchet MS", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.user_name.Location = new System.Drawing.Point(199, 63);
     this.user_name.Name = "user_name";
     this.user_name.ReadOnly = true;
     this.user_name.Size = new System.Drawing.Size(211, 26);
     this.user_name.TabIndex = 22;
     this.user_name.TextChanged += new System.EventHandler(this.user_name_TextChanged);
     //
     // label4
     //
     this.label4.AutoSize = true;
     this.label4.Font = new System.Drawing.Font("Trebuchet MS", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label4.ForeColor = System.Drawing.SystemColors.AppWorkspace;
     this.label4.Location = new System.Drawing.Point(155, 101);
     this.label4.Name = "label4";
     this.label4.Size = new System.Drawing.Size(33, 18);
     this.label4.TabIndex = 21;
     this.label4.Text = "Role";
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Font = new System.Drawing.Font("Trebuchet MS", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label1.ForeColor = System.Drawing.SystemColors.AppWorkspace;
     this.label1.Location = new System.Drawing.Point(121, 69);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(67, 18);
     this.label1.TabIndex = 20;
     this.label1.Text = "UserName";
     //
     // ChangeUserTypeDialog
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(531, 262);
     this.Controls.Add(this.changeUserRole);
     this.Controls.Add(this.role);
     this.Controls.Add(this.user_name);
     this.Controls.Add(this.label4);
     this.Controls.Add(this.label1);
     this.Name = "ChangeUserTypeDialog";
     this.Text = "Change User Role";
     this.Theme = MetroFramework.MetroThemeStyle.Dark;
     this.Load += new System.EventHandler(this.ChangeUserTypeDialog_Load);
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Example #7
0
 private void PopulateAccountSettings(MetroComboBox control)
 {
     control.Items.Clear();
     foreach (string component in ComponentManager.Singleton.GetEnabledAccountSettingsComponentNames())
     {
         control.Items.Add(component);
     }
     if (control.Items.Count > 0)
     {
         control.SelectedIndex = 0;
     }
 }
Example #8
0
        private void InitializeContents()
        {
            MetroLabel versionLabel = new MetroLabel();
            MetroSkinManager.ApplyMetroStyle(versionLabel);
            versionLabel.Size = new Size();
            versionLabel.AutoSize = true;
            versionLabel.Text = "Editor version: " + Assembly.GetExecutingAssembly().GetName().Version.ToString() + "\nAuthor: Patryk 'PsichiX' BudzyƄski";
            versionLabel.FontWeight = MetroLabelWeight.Bold;
            versionLabel.Location = new Point(DEFAULT_SEPARATOR, DEFAULT_SEPARATOR);
            Controls.Add(versionLabel);

            MetroLabel sceneViewerPortLabel = new MetroLabel();
            MetroSkinManager.ApplyMetroStyle(sceneViewerPortLabel);
            sceneViewerPortLabel.Size = new Size();
            sceneViewerPortLabel.AutoSize = true;
            sceneViewerPortLabel.Text = "Scene viewer HTTP server port:";
            sceneViewerPortLabel.Location = new Point(DEFAULT_SEPARATOR, versionLabel.Bottom + DEFAULT_SEPARATOR);
            Controls.Add(sceneViewerPortLabel);

            MetroTextBox sceneViewerPortTextBox = new MetroTextBox();
            MetroSkinManager.ApplyMetroStyle(sceneViewerPortTextBox);
            sceneViewerPortTextBox.Location = new Point(DEFAULT_SEPARATOR, sceneViewerPortLabel.Bottom);
            sceneViewerPortTextBox.Width = 64;
            sceneViewerPortTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left;
            sceneViewerPortTextBox.Text = m_settingsModel.SceneViewerHttpServerPort.ToString();
            sceneViewerPortTextBox.TextChanged += new EventHandler(textBox_TextChanged_sceneViewerPort);
            Controls.Add(sceneViewerPortTextBox);

            MetroLabel runnerPortLabel = new MetroLabel();
            MetroSkinManager.ApplyMetroStyle(runnerPortLabel);
            runnerPortLabel.Size = new Size();
            runnerPortLabel.AutoSize = true;
            runnerPortLabel.Text = "Runner HTTP server port:";
            runnerPortLabel.Location = new Point(DEFAULT_SEPARATOR, sceneViewerPortTextBox.Bottom + DEFAULT_SEPARATOR);
            Controls.Add(runnerPortLabel);

            MetroTextBox runnerPortTextBox = new MetroTextBox();
            MetroSkinManager.ApplyMetroStyle(runnerPortTextBox);
            runnerPortTextBox.Location = new Point(DEFAULT_SEPARATOR, runnerPortLabel.Bottom);
            runnerPortTextBox.Width = 64;
            runnerPortTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left;
            runnerPortTextBox.Text = m_settingsModel.RunnerHttpServerPort.ToString();
            runnerPortTextBox.TextChanged += new EventHandler(textBox_TextChanged_runnerPort);
            Controls.Add(runnerPortTextBox);

            MetroLabel styleLabel = new MetroLabel();
            MetroSkinManager.ApplyMetroStyle(styleLabel);
            styleLabel.Size = new Size();
            styleLabel.AutoSize = true;
            styleLabel.Text = "Application Style:";
            styleLabel.Location = new Point(DEFAULT_SEPARATOR, runnerPortTextBox.Bottom + DEFAULT_SEPARATOR);
            Controls.Add(styleLabel);

            m_styleComboBox = new MetroComboBox();
            MetroSkinManager.ApplyMetroStyle(m_styleComboBox);
            m_styleComboBox.Location = new Point(DEFAULT_SEPARATOR, styleLabel.Bottom);
            Controls.Add(m_styleComboBox);

            MetroLabel themeLabel = new MetroLabel();
            MetroSkinManager.ApplyMetroStyle(themeLabel);
            themeLabel.Size = new Size();
            themeLabel.AutoSize = true;
            themeLabel.Text = "Application Theme:";
            themeLabel.Location = new Point(DEFAULT_SEPARATOR, m_styleComboBox.Bottom + DEFAULT_SEPARATOR);
            Controls.Add(themeLabel);

            m_themeComboBox = new MetroComboBox();
            MetroSkinManager.ApplyMetroStyle(m_themeComboBox);
            m_themeComboBox.Location = new Point(DEFAULT_SEPARATOR, themeLabel.Bottom);
            Controls.Add(m_themeComboBox);
        }