Inheritance: MetroControlBase
 public override void Clear()
 {
     base.Clear();
     m_textBox = null;
     m_info = null;
     m_isValidNumber = false;
 }
Exemple #2
0
 public void PresupuestosSelect(MetroFramework.Controls.MetroTextBox idtext, MetroFramework.Controls.MetroTextBox descrip, MetroFramework.Controls.MetroTextBox idtext1, MetroFramework.Controls.MetroTextBox idtext2, MetroFramework.Controls.MetroTextBox idtext3, MetroFramework.Controls.MetroTextBox idtext4, MetroFramework.Controls.MetroTextBox idtext5, MetroFramework.Controls.MetroTextBox idtext6, int id)
 {
     using (PLMContext db = new PLMContext())
     {
         try
         {
             var datos = db.Presupuestos.Where(x => x.id == id).Select(x => x).FirstOrDefault();
             if (datos != null)
             {
                 idtext.Text  = datos.IdPresupuesto.ToString();
                 descrip.Text = datos.Diario.ToString();
                 idtext1.Text = datos.Mo.ToString();
                 idtext2.Text = datos.Prestaciones.ToString();
                 idtext3.Text = datos.Admon.ToString();
                 idtext4.Text = datos.Prod.ToString();
                 idtext5.Text = datos.Ventas.ToString();
                 idtext6.Text = datos.Varios.ToString();
             }
         }
         catch (Exception ex)
         {
             Dialogs.Show(ex.Message, DialogsType.Error);
         }
     }
 }
        public override void Initialize(PropertiesModel.Property property)
        {
            base.Initialize(property);
            Resize += PlayCanvas_Vector_PropertyEditor_Resize;

            m_xTextBox = new MetroTextBox();
            MetroSkinManager.ApplyMetroStyle(m_xTextBox);
            m_xTextBox.Width = 0;
            m_xTextBox.TextChanged += m_xTextBox_TextChanged;
            m_xTextBox.CustomPaintForeground += m_xTextBox_CustomPaintForeground;
            m_xTextBox.Leave += m_textBox_Leave;
            Content.Controls.Add(m_xTextBox);

            m_yTextBox = new MetroTextBox();
            MetroSkinManager.ApplyMetroStyle(m_yTextBox);
            m_yTextBox.Width = 0;
            m_yTextBox.TextChanged += m_yTextBox_TextChanged;
            m_yTextBox.CustomPaintForeground += m_yTextBox_CustomPaintForeground;
            m_yTextBox.Leave += m_textBox_Leave;
            Content.Controls.Add(m_yTextBox);

            m_zTextBox = new MetroTextBox();
            MetroSkinManager.ApplyMetroStyle(m_zTextBox);
            m_zTextBox.Width = 0;
            m_zTextBox.TextChanged += m_zTextBox_TextChanged;
            m_zTextBox.CustomPaintForeground += m_zTextBox_CustomPaintForeground;
            m_zTextBox.Leave += m_textBox_Leave;
            Content.Controls.Add(m_zTextBox);

            UpdateEditor();
            m_xTextBox.Refresh();
            m_yTextBox.Refresh();
            m_zTextBox.Refresh();
        }
 public override void Clear()
 {
     base.Clear();
     m_colorBox = null;
     m_alphaTrack = null;
     m_alphaTextBox = null;
     m_preventUpdateEditor = false;
     m_isAlphaValidNumber = false;
 }
        //private MainForm mainForm;
        public SingleTextboxForm()
        {
            //this.mainForm = mainForm;
            InitializeComponent();

            textBox = metroTextBox1;
            label = metroLabel1;
            btn = metroButton1;

            metroButton1.Click += MetroButton1_Click;
        }
Exemple #6
0
        private void TbxIP_Leave(object sender, System.EventArgs e)
        {
            MetroFramework.Controls.MetroTextBox tbx = (MetroFramework.Controls.MetroTextBox)sender;
            bool validIP = IPAddress.TryParse(tbx.Text, out IPAddress IP);

            if (!validIP)
            {
                tbx.Text       = "";
                lblHelpIP.Text = "Please, write a valid IP Address.";
            }
        }
 public override void Clear()
 {
     base.Clear();
     m_xTextBox = null;
     m_yTextBox = null;
     m_zTextBox = null;
     m_isValidNumberX = false;
     m_isValidNumberY = false;
     m_isValidNumberZ = false;
     m_preventUpdateEditor = false;
 }
Exemple #8
0
        public Boolean MatchPassword(MetroFramework.Controls.MetroTextBox Password, MetroFramework.Controls.MetroTextBox ConfirmPassword)
        {
            if (Password.Text.Equals(ConfirmPassword.Text))
            {
                return(true);
            }

            else
            {
                ConfirmPassword.Clear();
                return(false);
            }
        }
        public override void Initialize(PropertiesModel.Property property)
        {
            base.Initialize(property);

            m_textBox = new MetroTextBox();
            MetroSkinManager.ApplyMetroStyle(m_textBox);
            m_textBox.Width = 0;
            m_textBox.Dock = DockStyle.Top;
            m_textBox.TextChanged += m_textBox_TextChanged;
            m_textBox.Leave += m_textBox_Leave;
            Content.Controls.Add(m_textBox);

            UpdateEditor();
        }
Exemple #10
0
        public MetroPromptBox()
        {
            MetroSkinManager.ApplyMetroStyle(this);
            Size = DEFAULT_SIZE;
            Padding = new Padding(DEFAULT_SEPARATOR, 0, DEFAULT_SEPARATOR, DEFAULT_SEPARATOR);
            ControlBox = false;
            ShowInTaskbar = false;
            Resizable = false;
            DialogResult = DialogResult.None;

            m_buttonsPanel = new MetroPanel();
            MetroSkinManager.ApplyMetroStyle(m_buttonsPanel);
            m_buttonsPanel.Height = DEFAULT_BUTTON_HEIGHT + DEFAULT_SEPARATOR;
            m_buttonsPanel.Padding = new Padding(0, DEFAULT_SEPARATOR, 0, 0);
            m_buttonsPanel.Dock = DockStyle.Top;
            Controls.Add(m_buttonsPanel);

            MetroButton button = new MetroButton();
            MetroSkinManager.ApplyMetroStyle(button);
            button.Text = "&OK";
            button.Tag = DialogResult.OK;
            button.Dock = DockStyle.Left;
            button.Click += new EventHandler(button_Click);
            m_buttonsPanel.Controls.Add(button);

            button = new MetroButton();
            MetroSkinManager.ApplyMetroStyle(button);
            button.Text = "&Cancel";
            button.Tag = DialogResult.Cancel;
            button.Dock = DockStyle.Right;
            button.Click += new EventHandler(button_Click);
            m_buttonsPanel.Controls.Add(button);

            m_valueTextBox = new MetroTextBox();
            MetroSkinManager.ApplyMetroStyle(m_valueTextBox);
            m_valueTextBox.Text = "";
            m_valueTextBox.Dock = DockStyle.Top;
            Controls.Add(m_valueTextBox);

            m_messageLabel = new MetroLabel();
            MetroSkinManager.ApplyMetroStyle(m_messageLabel);
            m_messageLabel.Text = "";
            m_messageLabel.Dock = DockStyle.Top;
            Controls.Add(m_messageLabel);

            UpdateLayout();
        }
Exemple #11
0
        private void ValidateNumber_Leave(object sender, System.EventArgs e)
        {
            MetroFramework.Controls.MetroTextBox tbx = (MetroFramework.Controls.MetroTextBox)sender;
            bool isNumber = int.TryParse(tbx.Text, out int n);

            if (!isNumber)
            {
                tbx.Text = "0";
                if (tbx.Name == "tbxLoginPort")
                {
                    tbx.Text = "9958";
                }
                if (tbx.Name == "tbxGamePort")
                {
                    tbx.Text = "5816";
                }
            }
        }
        public override void Initialize(PropertiesModel.Property property)
        {
            base.Initialize(property);

            m_info = property.EditorAdditionalData<NumberInfo>();

            m_textBox = new MetroTextBox();
            MetroSkinManager.ApplyMetroStyle(m_textBox);
            m_textBox.Width = 0;
            m_textBox.Dock = DockStyle.Top;
            m_textBox.TextChanged += m_textBox_TextChanged;
            m_textBox.CustomPaintForeground += m_textBox_CustomPaintForeground;
            m_textBox.Leave += m_textBox_Leave;
            Content.Controls.Add(m_textBox);

            UpdateEditor();
            m_textBox.Refresh();
        }
Exemple #13
0
 public void BodySelect(MetroFramework.Controls.MetroTextBox idtext, MetroFramework.Controls.MetroTextBox descrip, int id)
 {
     using (PLMContext db = new PLMContext())
     {
         try
         {
             var datos = db.Body.Where(x => x.id == id).Select(x => x).FirstOrDefault();
             if (datos != null)
             {
                 idtext.Text  = datos.IdBody.ToString();
                 descrip.Text = datos.Descripción.ToString();
             }
         }
         catch (Exception ex)
         {
             Dialogs.Show(ex.Message, DialogsType.Error);
         }
     }
 }
Exemple #14
0
 public void SegmentoSelect(MetroFramework.Controls.MetroTextBox idtext, MetroFramework.Controls.MetroTextBox descrip, MetroFramework.Controls.MetroTextBox SecuenciaSegmento, MetroFramework.Controls.MetroTextBox TiempoDeRespuesta, int id)
 {
     using (PLMContext db = new PLMContext())
     {
         try
         {
             var datos = db.Segmentos.Where(x => x.id == id).Select(x => x).FirstOrDefault();
             if (datos != null)
             {
                 idtext.Text            = datos.IdSegmento.ToString();
                 descrip.Text           = datos.Descripción.ToString();
                 TiempoDeRespuesta.Text = datos.TiempoDeRespuesta.ToString();
                 SecuenciaSegmento.Text = datos.SecuenciaSegmento.ToString();
             }
         }
         catch (Exception ex)
         {
             Dialogs.Show(ex.Message, DialogsType.Error);
         }
     }
 }
 public void SegundasSelect(MetroFramework.Controls.MetroTextBox descrip, MetroFramework.Controls.MetroTextBox idtext1, MetroFramework.Controls.MetroTextBox idtext2, MetroFramework.Controls.MetroTextBox idtext3, MetroFramework.Controls.MetroTextBox idtext4, MetroFramework.Controls.MetroTextBox idtext5, MetroFramework.Controls.MetroTextBox idtext6, int id)
 {
     using (PLMContext db = new PLMContext())
     {
         try
         {
             var datos = db.Segundas.Where(x => x.id == id).Select(x => x).FirstOrDefault();
             if (datos != null)
             {
                 descrip.Text = datos.Cliente.ToString();
                 idtext1.Text = datos.Tela.ToString();
                 idtext2.Text = datos.Conf.ToString();
                 idtext3.Text = datos.Lavado.ToString();
                 idtext4.Text = datos.proc.ToString();
                 idtext5.Text = datos.avios.ToString();
                 idtext6.Text = datos.faltantes.ToString();
             }
         }
         catch (Exception ex)
         {
             Dialogs.Show(ex.Message, DialogsType.Error);
         }
     }
 }
        public override void Initialize(PropertiesModel.Property property)
        {
            base.Initialize(property);

            m_colorBox = new Panel();
            m_colorBox.Cursor = Cursors.Hand;
            m_colorBox.Width = 0;
            m_colorBox.Height = 48;
            m_colorBox.Dock = DockStyle.Top;
            m_colorBox.Click += m_colorBox_Click;
            m_colorBox.Paint += m_colorBox_Paint;

            m_alphaTrack = new MetroTrackBar();
            MetroSkinManager.ApplyMetroStyle(m_alphaTrack);
            m_alphaTrack.Width = 0;
            m_alphaTrack.Height = 16;
            m_alphaTrack.Dock = DockStyle.Top;
            m_alphaTrack.Maximum = 255;
            m_alphaTrack.Value = 255;
            m_alphaTrack.ValueChanged += m_alphaTrack_ValueChanged;

            m_alphaTextBox = new MetroTextBox();
            MetroSkinManager.ApplyMetroStyle(m_alphaTextBox);
            m_alphaTextBox.Width = 0;
            m_alphaTextBox.Dock = DockStyle.Top;
            m_alphaTextBox.TextChanged += m_alphaTextBox_TextChanged;
            m_alphaTextBox.CustomPaintForeground += m_alphaTextBox_CustomPaintForeground;
            m_alphaTextBox.Leave += m_alphaTextBox_Leave;

            Content.Controls.Add(m_alphaTrack);
            Content.Controls.Add(m_alphaTextBox);
            Content.Controls.Add(m_colorBox);

            UpdateEditor();
            m_alphaTextBox.Refresh();
        }
        /// <summary>
        /// Creates a new panel including base category and skill boxes
        /// </summary>
        private void CreateNewPanel()
        {
            var newPanel = new MetroPanel();
            var newDeleteBtn = new MetroButton();
            var newCatBox = new MetroTextBox();
            var newSkillBox = new MetroTextBox();
            var newResponseBox = new MetroTextBox();
            var addSkillBtn = new MetroButton();

            this.uniqueId = new Random();

            var id = this.uniqueId.Next(9000, 9999);
            this.panelId++;

            //Panel
            newPanel.Size = new Size(659, 45);
            newPanel.Location = new Point(this.nextPanelLocation.X, this.nextPanelLocation.Y + DistBetweenPanel);
            newPanel.Name = "panel" + id + this.panelId;
            //Debug
            newPanel.CustomBackground = true;
            newPanel.BackColor = Color.Red;

            //DeleteBtn
            newDeleteBtn.Size = new Size(26, 23);
            newDeleteBtn.Location = new Point(38, 12);
            newDeleteBtn.Name = "delbtn" + id + this.skillId;
            newDeleteBtn.Text = @"-";
            newDeleteBtn.Click += DeleteCategory;

            //CategoryBox
            newCatBox.Size = new Size(101, 23);
            newCatBox.Location = new Point(70, 12);
            newCatBox.Name = "catbox" + id + this.skillId;
            newCatBox.Text += @"Category";

            //SkillsBox
            newSkillBox.Size = new Size(121, 23);
            newSkillBox.Location = new Point(177, 12);
            newSkillBox.Name = "skillbox" + id + this.skillId;
            newSkillBox.Text = @"Skill";

            //ResponseBox
            newResponseBox.Size = new Size(286, 23);
            newResponseBox.Location = new Point(304, 12);
            newResponseBox.Name = "responsebox" + id + this.skillId;
            newResponseBox.Text = @"Response";

            //AddSkillBtn
            addSkillBtn.Size = new Size(26, 23);
            addSkillBtn.Location = new Point(596, 12);
            addSkillBtn.Name = "skillbtn" + id + this.skillId;
            addSkillBtn.Text = @"+";
            addSkillBtn.Click += this.AddSkillToPanel;

            this.CVTab.Controls.Add(newPanel);
            newPanel.Controls.Add(newDeleteBtn);
            newPanel.Controls.Add(newCatBox);
            newPanel.Controls.Add(newSkillBox);
            newPanel.Controls.Add(newResponseBox);
            newPanel.Controls.Add(addSkillBtn);

            this.nextPanelLocation = newPanel.Location;
            this.skillId++;


            //Debug
            Console.WriteLine(@"Panel: {0} | {1} | {2}", newPanel.Location, newPanel.Name.Substring(5, 4), newPanel.Name.Substring(9));
            Console.WriteLine(@"Delbtn: {0} | {1}", newDeleteBtn.Location, newDeleteBtn.Name.Substring(newDeleteBtn.Name.Length - 4));
            Console.WriteLine(@"CatBox: {0} | {1}", newCatBox.Location, newCatBox.Name.Substring(newCatBox.Name.Length - 4));
            Console.WriteLine(@"SkillBox: {0} | {1}", newSkillBox.Location, newSkillBox.Name.Substring(newSkillBox.Name.Length - 4));
            Console.WriteLine(@"ResponseBox: {0} | {1}", newResponseBox.Location, newResponseBox.Name.Substring(newResponseBox.Name.Length - 4));
            Console.WriteLine(@"SkillBtn: {0} | {1}", addSkillBtn.Location, addSkillBtn.Name.Substring(addSkillBtn.Name.Length - 4));
            Console.WriteLine(@"----------------------------------------------");
        }
Exemple #18
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(JakklConfig));
     this.contextMenu        = new System.Windows.Forms.ContextMenu();
     this.menuItemConfigure  = new System.Windows.Forms.MenuItem();
     this.menuItemVwr        = new System.Windows.Forms.MenuItem();
     this.menuItem2          = new System.Windows.Forms.MenuItem();
     this.menuItemExit       = new System.Windows.Forms.MenuItem();
     this.SaveButton         = new MetroFramework.Controls.MetroButton();
     this.cancelButton       = new MetroFramework.Controls.MetroButton();
     this.metroLabel1        = new MetroFramework.Controls.MetroLabel();
     this.metroLabel2        = new MetroFramework.Controls.MetroLabel();
     this.runOnStartup       = new MetroFramework.Controls.MetroToggle();
     this.metroLabel3        = new MetroFramework.Controls.MetroLabel();
     this._saveSettings      = new MetroFramework.Controls.MetroRadioButton();
     this.cbFilter           = new System.Windows.Forms.ComboBox();
     this.cbLogs             = new System.Windows.Forms.ComboBox();
     this.checkBoxROS        = new System.Windows.Forms.CheckBox();
     this._saveSettingsLabel = new MetroFramework.Controls.MetroLabel();
     this._saveSettings1     = new MetroFramework.Controls.MetroToggle();
     this.metroLabel4        = new MetroFramework.Controls.MetroLabel();
     this.syslogServer       = new MetroFramework.Controls.MetroTextBox();
     this.syslogPortLabel    = new MetroFramework.Controls.MetroLabel();
     this._syslogPort        = new MetroFramework.Controls.MetroTextBox();
     this.pictureBox1        = new System.Windows.Forms.PictureBox();
     this.testConnButton     = new MetroFramework.Controls.MetroButton();
     this.logsSelectedBox    = new MetroFramework.Controls.MetroTextBox();
     this.logsCheckBox       = new System.Windows.Forms.ListBox();
     this.metroButton1       = new FontAwesome.Sharp.IconPictureBox();
     this.iconPictureBox1    = new FontAwesome.Sharp.IconPictureBox();
     this.filterTextBox      = new MetroFramework.Controls.MetroTextBox();
     this._eventFilter       = new System.Windows.Forms.ListBox();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.metroButton1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.iconPictureBox1)).BeginInit();
     this.SuspendLayout();
     //
     // contextMenu
     //
     this.contextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuItemConfigure,
         this.menuItemVwr,
         this.menuItem2,
         this.menuItemExit
     });
     //
     // menuItemConfigure
     //
     this.menuItemConfigure.DefaultItem = true;
     this.menuItemConfigure.Index       = 0;
     this.menuItemConfigure.Text        = "Configure...";
     this.menuItemConfigure.Click      += new System.EventHandler(this.menuItemConfigure_Click);
     //
     // menuItemVwr
     //
     this.menuItemVwr.Index  = 1;
     this.menuItemVwr.Text   = "Event Viewer";
     this.menuItemVwr.Click += new System.EventHandler(this.menuItemVwr_Click);
     //
     // menuItem2
     //
     this.menuItem2.Index = 2;
     this.menuItem2.Text  = "-";
     //
     // menuItemExit
     //
     this.menuItemExit.Index  = 3;
     this.menuItemExit.Text   = "Exit";
     this.menuItemExit.Click += new System.EventHandler(this.menuItemExit_Click);
     //
     // SaveButton
     //
     this.SaveButton.Location = new System.Drawing.Point(182, 350);
     this.SaveButton.Name     = "SaveButton";
     this.SaveButton.Size     = new System.Drawing.Size(82, 23);
     this.SaveButton.TabIndex = 2;
     this.SaveButton.Text     = "Apply";
     this.SaveButton.Click   += new System.EventHandler(this.SaveButton_Click);
     //
     // cancelButton
     //
     this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     this.cancelButton.Location     = new System.Drawing.Point(23, 350);
     this.cancelButton.Name         = "cancelButton";
     this.cancelButton.Size         = new System.Drawing.Size(75, 23);
     this.cancelButton.TabIndex     = 3;
     this.cancelButton.Text         = "Cancel";
     this.cancelButton.Click       += new System.EventHandler(this.cancelButton_Click);
     //
     // metroLabel1
     //
     this.metroLabel1.AutoSize = true;
     this.metroLabel1.Location = new System.Drawing.Point(23, 61);
     this.metroLabel1.Name     = "metroLabel1";
     this.metroLabel1.Size     = new System.Drawing.Size(115, 19);
     this.metroLabel1.TabIndex = 7;
     this.metroLabel1.Text     = "Log(s) to monitor:";
     //
     // metroLabel2
     //
     this.metroLabel2.AutoSize = true;
     this.metroLabel2.Location = new System.Drawing.Point(23, 126);
     this.metroLabel2.Name     = "metroLabel2";
     this.metroLabel2.Size     = new System.Drawing.Size(128, 19);
     this.metroLabel2.TabIndex = 8;
     this.metroLabel2.Text     = "Filter by event types:";
     //
     // runOnStartup
     //
     this.runOnStartup.AutoSize   = true;
     this.runOnStartup.Checked    = true;
     this.runOnStartup.CheckState = System.Windows.Forms.CheckState.Checked;
     this.runOnStartup.FlatStyle  = System.Windows.Forms.FlatStyle.Flat;
     this.runOnStartup.Location   = new System.Drawing.Point(183, 273);
     this.runOnStartup.Name       = "runOnStartup";
     this.runOnStartup.Size       = new System.Drawing.Size(80, 17);
     this.runOnStartup.TabIndex   = 8;
     this.runOnStartup.Text       = "On";
     this.runOnStartup.UseVisualStyleBackColor = true;
     this.runOnStartup.CheckedChanged         += new System.EventHandler(this.MetroToggle1_CheckedChanged);
     //
     // metroLabel3
     //
     this.metroLabel3.AutoSize = true;
     this.metroLabel3.Location = new System.Drawing.Point(23, 273);
     this.metroLabel3.Name     = "metroLabel3";
     this.metroLabel3.Size     = new System.Drawing.Size(103, 19);
     this.metroLabel3.TabIndex = 11;
     this.metroLabel3.Text     = "Run On Startup:";
     //
     // _saveSettings
     //
     this._saveSettings.Location = new System.Drawing.Point(0, 0);
     this._saveSettings.Name     = "_saveSettings";
     this._saveSettings.Size     = new System.Drawing.Size(104, 24);
     this._saveSettings.TabIndex = 0;
     //
     // cbFilter
     //
     this.cbFilter.Location = new System.Drawing.Point(0, 0);
     this.cbFilter.Name     = "cbFilter";
     this.cbFilter.Size     = new System.Drawing.Size(121, 21);
     this.cbFilter.TabIndex = 0;
     //
     // cbLogs
     //
     this.cbLogs.Location = new System.Drawing.Point(0, 0);
     this.cbLogs.Name     = "cbLogs";
     this.cbLogs.Size     = new System.Drawing.Size(121, 21);
     this.cbLogs.TabIndex = 0;
     //
     // checkBoxROS
     //
     this.checkBoxROS.Location = new System.Drawing.Point(0, 0);
     this.checkBoxROS.Name     = "checkBoxROS";
     this.checkBoxROS.Size     = new System.Drawing.Size(104, 24);
     this.checkBoxROS.TabIndex = 0;
     //
     // _saveSettingsLabel
     //
     this._saveSettingsLabel.AutoSize = true;
     this._saveSettingsLabel.Location = new System.Drawing.Point(23, 305);
     this._saveSettingsLabel.Name     = "_saveSettingsLabel";
     this._saveSettingsLabel.Size     = new System.Drawing.Size(88, 19);
     this._saveSettingsLabel.TabIndex = 12;
     this._saveSettingsLabel.Text     = "Save Settings:";
     //
     // _saveSettings1
     //
     this._saveSettings1.AutoSize   = true;
     this._saveSettings1.Checked    = true;
     this._saveSettings1.CheckState = System.Windows.Forms.CheckState.Checked;
     this._saveSettings1.FlatStyle  = System.Windows.Forms.FlatStyle.Flat;
     this._saveSettings1.Location   = new System.Drawing.Point(183, 307);
     this._saveSettings1.Name       = "_saveSettings1";
     this._saveSettings1.Size       = new System.Drawing.Size(80, 17);
     this._saveSettings1.TabIndex   = 13;
     this._saveSettings1.Text       = "On";
     this._saveSettings1.UseVisualStyleBackColor = true;
     //
     // metroLabel4
     //
     this.metroLabel4.AutoSize = true;
     this.metroLabel4.Location = new System.Drawing.Point(23, 195);
     this.metroLabel4.Name     = "metroLabel4";
     this.metroLabel4.Size     = new System.Drawing.Size(92, 19);
     this.metroLabel4.TabIndex = 14;
     this.metroLabel4.Text     = "Syslog Server:";
     //
     // syslogServer
     //
     this.syslogServer.CustomBackground = true;
     this.syslogServer.Location         = new System.Drawing.Point(26, 217);
     this.syslogServer.Name             = "syslogServer";
     this.syslogServer.Size             = new System.Drawing.Size(125, 23);
     this.syslogServer.TabIndex         = 15;
     this.syslogServer.Text             = "0.0.0.0";
     this.syslogServer.Click           += new System.EventHandler(this.MetroTextBox1_Click);
     //
     // syslogPortLabel
     //
     this.syslogPortLabel.AutoSize = true;
     this.syslogPortLabel.Location = new System.Drawing.Point(161, 195);
     this.syslogPortLabel.Name     = "syslogPortLabel";
     this.syslogPortLabel.Size     = new System.Drawing.Size(37, 19);
     this.syslogPortLabel.TabIndex = 16;
     this.syslogPortLabel.Text     = "Port:";
     this.syslogPortLabel.Click   += new System.EventHandler(this.SyslogPort_Click);
     //
     // _syslogPort
     //
     this._syslogPort.BackColor        = System.Drawing.SystemColors.Window;
     this._syslogPort.CustomBackground = true;
     this._syslogPort.Location         = new System.Drawing.Point(161, 217);
     this._syslogPort.Name             = "_syslogPort";
     this._syslogPort.Size             = new System.Drawing.Size(43, 23);
     this._syslogPort.TabIndex         = 17;
     this._syslogPort.Text             = "514";
     //
     // pictureBox1
     //
     this.pictureBox1.Image        = global::Jakkl.Properties.Resources.Jakkl_sm;
     this.pictureBox1.InitialImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.InitialImage")));
     this.pictureBox1.Location     = new System.Drawing.Point(202, 7);
     this.pictureBox1.Name         = "pictureBox1";
     this.pictureBox1.Size         = new System.Drawing.Size(74, 76);
     this.pictureBox1.SizeMode     = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
     this.pictureBox1.TabIndex     = 18;
     this.pictureBox1.TabStop      = false;
     //
     // testConnButton
     //
     this.testConnButton.Location = new System.Drawing.Point(210, 217);
     this.testConnButton.Name     = "testConnButton";
     this.testConnButton.Size     = new System.Drawing.Size(54, 23);
     this.testConnButton.TabIndex = 20;
     this.testConnButton.Text     = "Test";
     this.testConnButton.Click   += new System.EventHandler(this.testConnButton_Click);
     //
     // logsSelectedBox
     //
     this.logsSelectedBox.FontWeight = MetroFramework.MetroTextBoxWeight.Light;
     this.logsSelectedBox.Location   = new System.Drawing.Point(26, 85);
     this.logsSelectedBox.Name       = "logsSelectedBox";
     this.logsSelectedBox.Size       = new System.Drawing.Size(209, 23);
     this.logsSelectedBox.TabIndex   = 22;
     this.logsSelectedBox.Click     += new System.EventHandler(this.metroTextBox1_Click_1);
     //
     // logsCheckBox
     //
     this.logsCheckBox.FormattingEnabled = true;
     this.logsCheckBox.Location          = new System.Drawing.Point(26, 114);
     this.logsCheckBox.Name          = "logsCheckBox";
     this.logsCheckBox.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
     this.logsCheckBox.Size          = new System.Drawing.Size(237, 95);
     this.logsCheckBox.Sorted        = true;
     this.logsCheckBox.TabIndex      = 25;
     this.logsCheckBox.Visible       = false;
     this.logsCheckBox.MouseLeave   += new System.EventHandler(this.Close_ListBox);
     //
     // metroButton1
     //
     this.metroButton1.BackColor             = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     this.metroButton1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     this.metroButton1.ForeColor             = System.Drawing.SystemColors.ControlText;
     this.metroButton1.IconChar    = FontAwesome.Sharp.IconChar.None;
     this.metroButton1.IconColor   = System.Drawing.SystemColors.ControlText;
     this.metroButton1.IconSize    = 23;
     this.metroButton1.Location    = new System.Drawing.Point(241, 85);
     this.metroButton1.Name        = "metroButton1";
     this.metroButton1.Size        = new System.Drawing.Size(23, 23);
     this.metroButton1.TabIndex    = 26;
     this.metroButton1.TabStop     = false;
     this.metroButton1.Click      += new System.EventHandler(this.ShowLogsCheckBox);
     this.metroButton1.MouseHover += new System.EventHandler(this.ShowLogsCheckBox);
     //
     // iconPictureBox1
     //
     this.iconPictureBox1.BackColor             = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     this.iconPictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     this.iconPictureBox1.ForeColor             = System.Drawing.SystemColors.ControlText;
     this.iconPictureBox1.IconChar    = FontAwesome.Sharp.IconChar.None;
     this.iconPictureBox1.IconColor   = System.Drawing.SystemColors.ControlText;
     this.iconPictureBox1.IconSize    = 23;
     this.iconPictureBox1.Location    = new System.Drawing.Point(241, 148);
     this.iconPictureBox1.Name        = "iconPictureBox1";
     this.iconPictureBox1.Size        = new System.Drawing.Size(23, 23);
     this.iconPictureBox1.TabIndex    = 28;
     this.iconPictureBox1.TabStop     = false;
     this.iconPictureBox1.MouseHover += new System.EventHandler(this.ShoweventFilters);
     //
     // filterTextBox
     //
     this.filterTextBox.FontWeight = MetroFramework.MetroTextBoxWeight.Light;
     this.filterTextBox.Location   = new System.Drawing.Point(28, 148);
     this.filterTextBox.Name       = "filterTextBox";
     this.filterTextBox.Size       = new System.Drawing.Size(207, 23);
     this.filterTextBox.TabIndex   = 27;
     //
     // _eventFilter
     //
     this._eventFilter.FormattingEnabled = true;
     this._eventFilter.Items.AddRange(new object[] {
         "All Event Types",
         "Error",
         "FailureAudit",
         "Information",
         "SuccessAudit",
         "Warning"
     });
     this._eventFilter.Location      = new System.Drawing.Point(28, 177);
     this._eventFilter.Name          = "_eventFilter";
     this._eventFilter.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
     this._eventFilter.Size          = new System.Drawing.Size(235, 69);
     this._eventFilter.Sorted        = true;
     this._eventFilter.TabIndex      = 29;
     this._eventFilter.Visible       = false;
     this._eventFilter.MouseLeave   += new System.EventHandler(this.Close_FiltersListBox);
     //
     // JakklConfig
     //
     this.AcceptButton      = this.SaveButton;
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.CancelButton      = this.cancelButton;
     this.ClientSize        = new System.Drawing.Size(293, 388);
     this.ContextMenu       = this.contextMenu;
     this.ControlBox        = false;
     this.Controls.Add(this.logsCheckBox);
     this.Controls.Add(this._eventFilter);
     this.Controls.Add(this.iconPictureBox1);
     this.Controls.Add(this.filterTextBox);
     this.Controls.Add(this.metroButton1);
     this.Controls.Add(this.logsSelectedBox);
     this.Controls.Add(this.testConnButton);
     this.Controls.Add(this.pictureBox1);
     this.Controls.Add(this._syslogPort);
     this.Controls.Add(this.syslogPortLabel);
     this.Controls.Add(this.syslogServer);
     this.Controls.Add(this.metroLabel4);
     this.Controls.Add(this._saveSettings1);
     this.Controls.Add(this._saveSettingsLabel);
     this.Controls.Add(this.metroLabel3);
     this.Controls.Add(this.runOnStartup);
     this.Controls.Add(this.metroLabel2);
     this.Controls.Add(this.metroLabel1);
     this.Controls.Add(this.cancelButton);
     this.Controls.Add(this.SaveButton);
     this.Icon          = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.MaximizeBox   = false;
     this.Name          = "JakklConfig";
     this.ShowInTaskbar = false;
     this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
     this.Text          = "Jakkl Config";
     this.Load         += new System.EventHandler(this.Config_Load);
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.metroButton1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.iconPictureBox1)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Exemple #19
0
 public void BtnControlMetro(MetroTextBox txt, String frm)
 {
     NewBtn.Size = new Size(25, txt.ClientSize.Height + 2);
     NewBtn.Location = new Point(txt.ClientSize.Width - NewBtn.Width, -1);
     NewBtn.Cursor = Cursors.Default;
     NewBtn.Image = Properties.Resources.serach;
     txt.Controls.Add(NewBtn);
     NewFrm = frm;
     NewBtn.Click += new System.EventHandler(btn_Click);
     NewTxt = txt;
     NewTxt.SizeChanged += new System.EventHandler(txt_SizeChanged);
     NewTxt.KeyDown += new System.Windows.Forms.KeyEventHandler(txt_KeyDown);
 }
Exemple #20
0
        /// <summary>
        /// Evento para validar la introduccion de caracteres de tipo numero y punto dentro de una caja de texto del tipo metroTexbox.
        /// </summary>
        /// <param name="tb">MaskedTextBox que se desea validar.</param>
        /// <param name="e">Objeto de argumentos del evento de presionado de tecla.</param>
        /// <param name="sender">MaskedTextBox que se desea validar.</param>
        public static void keyPressNumerosSinDecimales(MetroTextBox tb, KeyPressEventArgs e, object sender)
        {
            if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar))
            {
                e.Handled = true;
            }

            // only allow one decimal point
            //if ((e.KeyChar == '.') && ((sender as TextBox).Text.IndexOf('.') > -1))
            //{
            //    e.Handled = true;
            //}
        }
Exemple #21
0
 public static bool validarMetroTextBox(MetroTextBox mtb)
 {
     bool val = String.IsNullOrEmpty(mtb.Text);
     mtb.BackColor = val ? Color.Pink : SystemColors.MenuBar;
     return !val;
 }
 public void consoleAddLine(MetroTextBox txtbx, string str)
 {
     if (txtbx.InvokeRequired)
     {
         String name = str;
         txtbx.Invoke(new MethodInvoker(delegate { txtbx.AppendText(name + "\n"); }));
     }
 }
Exemple #23
0
 private void SetColorWaterMarkDefault(MetroTextBox textbox)
 {
     textbox.WaterMark = "Input barcode here";
     textbox.WaterMarkColor = Color.FromArgb(109, 109, 109);
     txtBarcode.Focus();
 }
Exemple #24
0
 private void SetColorWaterMark(MetroTextBox textbox, string messageText)
 {
     textbox.WaterMark = messageText;
     textbox.WaterMarkColor = Color.Crimson;
     txtBarcode.Focus();
 }
 public void changeTextBox(MetroTextBox txtbx, string str)
 {
     if (txtbx.InvokeRequired)
     {
         String name = str;
         txtbx.Invoke(new MethodInvoker(delegate { txtbx.Text = name; }));
     }
 }
Exemple #26
0
        private MetroPanel MakeTagBox()
        {
            MetroPanel panel = new MetroPanel();
            panel.AutoSize = true;
            panel.Dock = DockStyle.Fill;

            MetroTextBox box = new MetroTextBox();
            box.Dock = DockStyle.Fill;
            box.TextAlign = HorizontalAlignment.Center;
            box.Location = new System.Drawing.Point(5, 5);
            box.PromptText = "+";
            box.KeyDown += new KeyEventHandler(textBox_KeyDown);

            panel.Controls.Add(box);

            MetroButton deleteBtn = new MetroButton();
            deleteBtn.Text = "x";
            deleteBtn.Anchor = AnchorStyles.Right;
            deleteBtn.AutoSize = true;
            deleteBtn.Width = 20;
            deleteBtn.Height = 30;
            deleteBtn.Visible = false;
            deleteBtn.Enabled = false;
            deleteBtn.Dock = DockStyle.Right;
            deleteBtn.Click += new System.EventHandler(this.TagDelete_Click);
            panel.Controls.Add(deleteBtn);
            return panel;
        }
        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);
        }
Exemple #28
0
 private void InitializeComponent()
 {
     ChartArea item = new ChartArea();
     Legend legend = new Legend();
     ComponentResourceManager manager = new ComponentResourceManager(typeof(Form2));
     this.metroButton1 = new MetroButton();
     this.urname = new MetroTextBox();
     this.urscore = new MetroTextBox();
     this.metroLabel1 = new MetroLabel();
     this.metroLabel2 = new MetroLabel();
     this.panel1 = new Panel();
     this.pid = new MetroTextBox();
     this.tstname = new MetroTextBox();
     this.metroLabel13 = new MetroLabel();
     this.metroProgressSpinner1 = new MetroProgressSpinner();
     this.chart1 = new Chart();
     this.backgroundWorker1 = new BackgroundWorker();
     this.dg1 = new DataGridView();
     this.metroLabel3 = new MetroLabel();
     this.metroLabel4 = new MetroLabel();
     this.metroLabel5 = new MetroLabel();
     this.metroLabel6 = new MetroLabel();
     this.metroLabel7 = new MetroLabel();
     this.metroLabel8 = new MetroLabel();
     this.metroLabel9 = new MetroLabel();
     this.metroLabel10 = new MetroLabel();
     this.metroLabel11 = new MetroLabel();
     this.metroLabel12 = new MetroLabel();
     this.metroLabel14 = new MetroLabel();
     this.panel2 = new Panel();
     this.pictureBox2 = new PictureBox();
     this.metroLabel15 = new MetroLabel();
     this.metroLabel16 = new MetroLabel();
     this.metroLabel17 = new MetroLabel();
     this.metroLabel18 = new MetroLabel();
     this.metroLabel19 = new MetroLabel();
     this.metroLabel20 = new MetroLabel();
     this.button1 = new Button();
     this.pictureBox3 = new PictureBox();
     this.pictureBox1 = new PictureBox();
     this.metroButton2 = new MetroButton();
     this.pictureBox4 = new PictureBox();
     this.panel1.SuspendLayout();
     this.chart1.BeginInit();
     ((ISupportInitialize) this.dg1).BeginInit();
     this.panel2.SuspendLayout();
     ((ISupportInitialize) this.pictureBox2).BeginInit();
     ((ISupportInitialize) this.pictureBox3).BeginInit();
     ((ISupportInitialize) this.pictureBox1).BeginInit();
     ((ISupportInitialize) this.pictureBox4).BeginInit();
     base.SuspendLayout();
     this.metroButton1.Highlight = true;
     this.metroButton1.Location = new Point(0x6f, 0x97);
     this.metroButton1.Name = "metroButton1";
     this.metroButton1.Size = new Size(0xc7, 0x24);
     this.metroButton1.Style = MetroColorStyle.Blue;
     this.metroButton1.TabIndex = 0;
     this.metroButton1.Text = "Submit";
     this.metroButton1.Theme = MetroThemeStyle.Dark;
     this.metroButton1.UseSelectable = true;
     this.metroButton1.Click += new EventHandler(this.metroButton1_Click);
     this.urname.Lines = new string[0];
     this.urname.Location = new Point(0x6f, 0x1b);
     this.urname.MaxLength = 0x7fff;
     this.urname.Name = "urname";
     this.urname.PasswordChar = '\0';
     this.urname.ScrollBars = ScrollBars.None;
     this.urname.SelectedText = "";
     this.urname.Size = new Size(0xc7, 0x17);
     this.urname.Style = MetroColorStyle.Blue;
     this.urname.TabIndex = 1;
     this.urname.Theme = MetroThemeStyle.Dark;
     this.urname.UseSelectable = true;
     this.urname.UseStyleColors = true;
     this.urname.TextChanged += new EventHandler(this.urname_TextChanged);
     this.urscore.Enabled = false;
     this.urscore.Lines = new string[0];
     this.urscore.Location = new Point(0x6f, 0x58);
     this.urscore.MaxLength = 0x7fff;
     this.urscore.Name = "urscore";
     this.urscore.PasswordChar = '\0';
     this.urscore.ScrollBars = ScrollBars.None;
     this.urscore.SelectedText = "";
     this.urscore.Size = new Size(0xc7, 0x17);
     this.urscore.Style = MetroColorStyle.Blue;
     this.urscore.TabIndex = 2;
     this.urscore.Theme = MetroThemeStyle.Dark;
     this.urscore.UseSelectable = true;
     this.urscore.UseStyleColors = true;
     this.metroLabel1.AutoSize = true;
     this.metroLabel1.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel1.Location = new Point(0x17, 30);
     this.metroLabel1.Name = "metroLabel1";
     this.metroLabel1.Size = new Size(0x31, 0x13);
     this.metroLabel1.Style = MetroColorStyle.Blue;
     this.metroLabel1.TabIndex = 3;
     this.metroLabel1.Text = "Name";
     this.metroLabel1.Theme = MetroThemeStyle.Dark;
     this.metroLabel1.UseCustomBackColor = true;
     this.metroLabel1.UseStyleColors = true;
     this.metroLabel2.AutoSize = true;
     this.metroLabel2.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel2.Location = new Point(0x1a, 0x5b);
     this.metroLabel2.Name = "metroLabel2";
     this.metroLabel2.Size = new Size(0x2f, 0x13);
     this.metroLabel2.Style = MetroColorStyle.Blue;
     this.metroLabel2.TabIndex = 4;
     this.metroLabel2.Text = "Score";
     this.metroLabel2.Theme = MetroThemeStyle.Dark;
     this.metroLabel2.UseCustomBackColor = true;
     this.metroLabel2.UseStyleColors = true;
     this.panel1.BackColor = Color.Transparent;
     this.panel1.Controls.Add(this.pid);
     this.panel1.Controls.Add(this.tstname);
     this.panel1.Controls.Add(this.metroLabel13);
     this.panel1.Controls.Add(this.metroLabel1);
     this.panel1.Controls.Add(this.metroButton1);
     this.panel1.Controls.Add(this.metroLabel2);
     this.panel1.Controls.Add(this.urname);
     this.panel1.Controls.Add(this.urscore);
     this.panel1.Location = new Point(12, 0x2f);
     this.panel1.Name = "panel1";
     this.panel1.Size = new Size(330, 0xd0);
     this.panel1.TabIndex = 6;
     this.pid.Enabled = false;
     this.pid.Lines = new string[0];
     this.pid.Location = new Point(0x6f, 3);
     this.pid.MaxLength = 0x7fff;
     this.pid.Name = "pid";
     this.pid.PasswordChar = '\0';
     this.pid.ScrollBars = ScrollBars.None;
     this.pid.SelectedText = "";
     this.pid.Size = new Size(0xc7, 0x17);
     this.pid.Style = MetroColorStyle.Blue;
     this.pid.TabIndex = 8;
     this.pid.Theme = MetroThemeStyle.Dark;
     this.pid.UseSelectable = true;
     this.pid.UseStyleColors = true;
     this.pid.Visible = false;
     this.tstname.Lines = new string[0];
     this.tstname.Location = new Point(0x6f, 0x75);
     this.tstname.MaxLength = 0x7fff;
     this.tstname.Name = "tstname";
     this.tstname.PasswordChar = '\0';
     this.tstname.ScrollBars = ScrollBars.None;
     this.tstname.SelectedText = "";
     this.tstname.Size = new Size(0xc7, 0x17);
     this.tstname.Style = MetroColorStyle.Blue;
     this.tstname.TabIndex = 7;
     this.tstname.Theme = MetroThemeStyle.Dark;
     this.tstname.UseSelectable = true;
     this.tstname.UseStyleColors = true;
     this.tstname.Visible = false;
     this.metroLabel13.AutoSize = true;
     this.metroLabel13.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel13.Location = new Point(0x6f, 0x35);
     this.metroLabel13.Name = "metroLabel13";
     this.metroLabel13.Size = new Size(0, 0);
     this.metroLabel13.Style = MetroColorStyle.Red;
     this.metroLabel13.TabIndex = 6;
     this.metroLabel13.Theme = MetroThemeStyle.Dark;
     this.metroLabel13.UseCustomBackColor = true;
     this.metroLabel13.UseStyleColors = true;
     this.metroProgressSpinner1.Location = new Point(0x15, 0x112);
     this.metroProgressSpinner1.Maximum = 100;
     this.metroProgressSpinner1.Name = "metroProgressSpinner1";
     this.metroProgressSpinner1.Size = new Size(0x17, 0x17);
     this.metroProgressSpinner1.Style = MetroColorStyle.Blue;
     this.metroProgressSpinner1.TabIndex = 8;
     this.metroProgressSpinner1.Theme = MetroThemeStyle.Dark;
     this.metroProgressSpinner1.UseCustomBackColor = true;
     this.metroProgressSpinner1.UseSelectable = true;
     this.metroProgressSpinner1.Visible = false;
     item.Name = "ChartArea1";
     this.chart1.ChartAreas.Add(item);
     legend.Name = "Legend1";
     this.chart1.Legends.Add(legend);
     this.chart1.Location = new Point(0x26a, 0x2f);
     this.chart1.Name = "chart1";
     this.chart1.Size = new Size(0x15b, 0xd0);
     this.chart1.TabIndex = 7;
     this.chart1.Text = "chart1";
     this.backgroundWorker1.WorkerReportsProgress = true;
     this.backgroundWorker1.DoWork += new DoWorkEventHandler(this.backgroundWorker1_DoWork);
     this.backgroundWorker1.ProgressChanged += new ProgressChangedEventHandler(this.backgroundWorker1_ProgressChanged);
     this.backgroundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.backgroundWorker1_RunWorkerCompleted);
     this.dg1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     this.dg1.Location = new Point(12, 0x10a);
     this.dg1.Name = "dg1";
     this.dg1.Size = new Size(0x31, 0x12);
     this.dg1.TabIndex = 8;
     this.dg1.Visible = false;
     this.metroLabel3.AutoSize = true;
     this.metroLabel3.BackColor = Color.Transparent;
     this.metroLabel3.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel3.Location = new Point(0x4c, 0x36);
     this.metroLabel3.Name = "metroLabel3";
     this.metroLabel3.Size = new Size(15, 0x13);
     this.metroLabel3.Style = MetroColorStyle.Teal;
     this.metroLabel3.TabIndex = 6;
     this.metroLabel3.Text = "-";
     this.metroLabel3.Theme = MetroThemeStyle.Dark;
     this.metroLabel3.UseCustomBackColor = true;
     this.metroLabel3.UseStyleColors = true;
     this.metroLabel4.AutoSize = true;
     this.metroLabel4.BackColor = Color.Transparent;
     this.metroLabel4.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel4.Location = new Point(0x4c, 0x57);
     this.metroLabel4.Name = "metroLabel4";
     this.metroLabel4.Size = new Size(15, 0x13);
     this.metroLabel4.Style = MetroColorStyle.Yellow;
     this.metroLabel4.TabIndex = 9;
     this.metroLabel4.Text = "-";
     this.metroLabel4.Theme = MetroThemeStyle.Dark;
     this.metroLabel4.UseCustomBackColor = true;
     this.metroLabel4.UseStyleColors = true;
     this.metroLabel5.AutoSize = true;
     this.metroLabel5.BackColor = Color.Transparent;
     this.metroLabel5.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel5.Location = new Point(0x4c, 0x77);
     this.metroLabel5.Name = "metroLabel5";
     this.metroLabel5.Size = new Size(15, 0x13);
     this.metroLabel5.Style = MetroColorStyle.Orange;
     this.metroLabel5.TabIndex = 10;
     this.metroLabel5.Text = "-";
     this.metroLabel5.Theme = MetroThemeStyle.Dark;
     this.metroLabel5.UseCustomBackColor = true;
     this.metroLabel5.UseStyleColors = true;
     this.metroLabel6.AutoSize = true;
     this.metroLabel6.BackColor = Color.Transparent;
     this.metroLabel6.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel6.Location = new Point(0x4c, 0x97);
     this.metroLabel6.Name = "metroLabel6";
     this.metroLabel6.Size = new Size(15, 0x13);
     this.metroLabel6.Style = MetroColorStyle.Blue;
     this.metroLabel6.TabIndex = 11;
     this.metroLabel6.Text = "-";
     this.metroLabel6.Theme = MetroThemeStyle.Dark;
     this.metroLabel6.UseCustomBackColor = true;
     this.metroLabel6.UseStyleColors = true;
     this.metroLabel7.AutoSize = true;
     this.metroLabel7.BackColor = Color.Transparent;
     this.metroLabel7.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel7.Location = new Point(0x4c, 0xb7);
     this.metroLabel7.Name = "metroLabel7";
     this.metroLabel7.Size = new Size(15, 0x13);
     this.metroLabel7.Style = MetroColorStyle.Silver;
     this.metroLabel7.TabIndex = 12;
     this.metroLabel7.Text = "-";
     this.metroLabel7.Theme = MetroThemeStyle.Dark;
     this.metroLabel7.UseCustomBackColor = true;
     this.metroLabel7.UseStyleColors = true;
     this.metroLabel8.AutoSize = true;
     this.metroLabel8.BackColor = Color.Transparent;
     this.metroLabel8.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel8.Location = new Point(0xc7, 0x36);
     this.metroLabel8.Name = "metroLabel8";
     this.metroLabel8.Size = new Size(15, 0x13);
     this.metroLabel8.Style = MetroColorStyle.Teal;
     this.metroLabel8.TabIndex = 6;
     this.metroLabel8.Text = "-";
     this.metroLabel8.Theme = MetroThemeStyle.Dark;
     this.metroLabel8.UseCustomBackColor = true;
     this.metroLabel8.UseStyleColors = true;
     this.metroLabel9.AutoSize = true;
     this.metroLabel9.BackColor = Color.Transparent;
     this.metroLabel9.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel9.Location = new Point(0xc7, 0x57);
     this.metroLabel9.Name = "metroLabel9";
     this.metroLabel9.Size = new Size(15, 0x13);
     this.metroLabel9.Style = MetroColorStyle.Yellow;
     this.metroLabel9.TabIndex = 13;
     this.metroLabel9.Text = "-";
     this.metroLabel9.Theme = MetroThemeStyle.Dark;
     this.metroLabel9.UseCustomBackColor = true;
     this.metroLabel9.UseStyleColors = true;
     this.metroLabel10.AutoSize = true;
     this.metroLabel10.BackColor = Color.Transparent;
     this.metroLabel10.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel10.Location = new Point(0xc7, 0x77);
     this.metroLabel10.Name = "metroLabel10";
     this.metroLabel10.Size = new Size(15, 0x13);
     this.metroLabel10.Style = MetroColorStyle.Orange;
     this.metroLabel10.TabIndex = 14;
     this.metroLabel10.Text = "-";
     this.metroLabel10.Theme = MetroThemeStyle.Dark;
     this.metroLabel10.UseCustomBackColor = true;
     this.metroLabel10.UseStyleColors = true;
     this.metroLabel11.AutoSize = true;
     this.metroLabel11.BackColor = Color.Transparent;
     this.metroLabel11.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel11.Location = new Point(0xc7, 0x97);
     this.metroLabel11.Name = "metroLabel11";
     this.metroLabel11.Size = new Size(15, 0x13);
     this.metroLabel11.Style = MetroColorStyle.Blue;
     this.metroLabel11.TabIndex = 15;
     this.metroLabel11.Text = "-";
     this.metroLabel11.Theme = MetroThemeStyle.Dark;
     this.metroLabel11.UseCustomBackColor = true;
     this.metroLabel11.UseStyleColors = true;
     this.metroLabel12.AutoSize = true;
     this.metroLabel12.BackColor = Color.Transparent;
     this.metroLabel12.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel12.Location = new Point(0xc7, 0xb7);
     this.metroLabel12.Name = "metroLabel12";
     this.metroLabel12.Size = new Size(15, 0x13);
     this.metroLabel12.Style = MetroColorStyle.Silver;
     this.metroLabel12.TabIndex = 0x10;
     this.metroLabel12.Text = "-";
     this.metroLabel12.Theme = MetroThemeStyle.Dark;
     this.metroLabel12.UseCustomBackColor = true;
     this.metroLabel12.UseStyleColors = true;
     this.metroLabel14.AutoSize = true;
     this.metroLabel14.BackColor = Color.Transparent;
     this.metroLabel14.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel14.Location = new Point(0x68, 0x109);
     this.metroLabel14.Name = "metroLabel14";
     this.metroLabel14.Size = new Size(0, 0);
     this.metroLabel14.Style = MetroColorStyle.Green;
     this.metroLabel14.TabIndex = 0x11;
     this.metroLabel14.Theme = MetroThemeStyle.Dark;
     this.metroLabel14.UseCustomBackColor = true;
     this.metroLabel14.UseStyleColors = true;
     this.panel2.BackColor = Color.Transparent;
     this.panel2.Controls.Add(this.pictureBox2);
     this.panel2.Controls.Add(this.metroLabel15);
     this.panel2.Controls.Add(this.metroLabel16);
     this.panel2.Controls.Add(this.metroLabel17);
     this.panel2.Controls.Add(this.metroLabel18);
     this.panel2.Controls.Add(this.metroLabel19);
     this.panel2.Controls.Add(this.metroLabel8);
     this.panel2.Controls.Add(this.metroLabel3);
     this.panel2.Controls.Add(this.metroLabel4);
     this.panel2.Controls.Add(this.metroLabel5);
     this.panel2.Controls.Add(this.metroLabel12);
     this.panel2.Controls.Add(this.metroLabel6);
     this.panel2.Controls.Add(this.metroLabel11);
     this.panel2.Controls.Add(this.metroLabel7);
     this.panel2.Controls.Add(this.metroLabel10);
     this.panel2.Controls.Add(this.metroLabel9);
     this.panel2.Location = new Point(0x15c, 0x2f);
     this.panel2.Name = "panel2";
     this.panel2.Size = new Size(0x108, 0xd0);
     this.panel2.TabIndex = 0x12;
     this.panel2.Paint += new PaintEventHandler(this.panel2_Paint);
     this.pictureBox2.Image = Resources.RPT;
     this.pictureBox2.Location = new Point(0x15, 0x1b);
     this.pictureBox2.Name = "pictureBox2";
     this.pictureBox2.Size = new Size(240, 0x18);
     this.pictureBox2.SizeMode = PictureBoxSizeMode.StretchImage;
     this.pictureBox2.TabIndex = 0x16;
     this.pictureBox2.TabStop = false;
     this.metroLabel15.AutoSize = true;
     this.metroLabel15.BackColor = Color.Transparent;
     this.metroLabel15.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel15.Location = new Point(0x15, 0x36);
     this.metroLabel15.Name = "metroLabel15";
     this.metroLabel15.Size = new Size(0x1c, 0x13);
     this.metroLabel15.Style = MetroColorStyle.Teal;
     this.metroLabel15.TabIndex = 0x11;
     this.metroLabel15.Text = "1st";
     this.metroLabel15.Theme = MetroThemeStyle.Dark;
     this.metroLabel15.UseCustomBackColor = true;
     this.metroLabel15.UseStyleColors = true;
     this.metroLabel16.AutoSize = true;
     this.metroLabel16.BackColor = Color.Transparent;
     this.metroLabel16.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel16.Location = new Point(0x15, 0x57);
     this.metroLabel16.Name = "metroLabel16";
     this.metroLabel16.Size = new Size(0x22, 0x13);
     this.metroLabel16.Style = MetroColorStyle.Yellow;
     this.metroLabel16.TabIndex = 0x12;
     this.metroLabel16.Text = "2nd";
     this.metroLabel16.Theme = MetroThemeStyle.Dark;
     this.metroLabel16.UseCustomBackColor = true;
     this.metroLabel16.UseStyleColors = true;
     this.metroLabel17.AutoSize = true;
     this.metroLabel17.BackColor = Color.Transparent;
     this.metroLabel17.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel17.Location = new Point(0x15, 0x77);
     this.metroLabel17.Name = "metroLabel17";
     this.metroLabel17.Size = new Size(0x20, 0x13);
     this.metroLabel17.Style = MetroColorStyle.Orange;
     this.metroLabel17.TabIndex = 0x13;
     this.metroLabel17.Text = "3rd";
     this.metroLabel17.Theme = MetroThemeStyle.Dark;
     this.metroLabel17.UseCustomBackColor = true;
     this.metroLabel17.UseStyleColors = true;
     this.metroLabel18.AutoSize = true;
     this.metroLabel18.BackColor = Color.Transparent;
     this.metroLabel18.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel18.Location = new Point(0x15, 0x97);
     this.metroLabel18.Name = "metroLabel18";
     this.metroLabel18.Size = new Size(30, 0x13);
     this.metroLabel18.Style = MetroColorStyle.Blue;
     this.metroLabel18.TabIndex = 20;
     this.metroLabel18.Text = "4th";
     this.metroLabel18.Theme = MetroThemeStyle.Dark;
     this.metroLabel18.UseCustomBackColor = true;
     this.metroLabel18.UseStyleColors = true;
     this.metroLabel19.AutoSize = true;
     this.metroLabel19.BackColor = Color.Transparent;
     this.metroLabel19.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel19.Location = new Point(0x15, 0xb7);
     this.metroLabel19.Name = "metroLabel19";
     this.metroLabel19.Size = new Size(30, 0x13);
     this.metroLabel19.Style = MetroColorStyle.Silver;
     this.metroLabel19.TabIndex = 0x15;
     this.metroLabel19.Text = "5th";
     this.metroLabel19.Theme = MetroThemeStyle.Dark;
     this.metroLabel19.UseCustomBackColor = true;
     this.metroLabel19.UseStyleColors = true;
     this.metroLabel20.AutoSize = true;
     this.metroLabel20.FontWeight = MetroLabelWeight.Bold;
     this.metroLabel20.Location = new Point(0x3b, 0x116);
     this.metroLabel20.Name = "metroLabel20";
     this.metroLabel20.Size = new Size(0, 0);
     this.metroLabel20.Style = MetroColorStyle.Red;
     this.metroLabel20.TabIndex = 0x13;
     this.metroLabel20.Theme = MetroThemeStyle.Dark;
     this.metroLabel20.UseCustomBackColor = true;
     this.metroLabel20.UseStyleColors = true;
     this.button1.BackColor = Color.Transparent;
     this.button1.BackgroundImage = Resources.button_cancel;
     this.button1.BackgroundImageLayout = ImageLayout.Stretch;
     this.button1.FlatStyle = FlatStyle.Popup;
     this.button1.Location = new Point(940, -1);
     this.button1.Name = "button1";
     this.button1.Size = new Size(0x31, 0x20);
     this.button1.TabIndex = 0x62;
     this.button1.UseVisualStyleBackColor = true;
     this.button1.Click += new EventHandler(this.button1_Click);
     this.pictureBox3.BackColor = Color.Transparent;
     this.pictureBox3.BackgroundImage = Resources.services_accelerator_icon_growthbubble;
     this.pictureBox3.BackgroundImageLayout = ImageLayout.Stretch;
     this.pictureBox3.Location = new Point(0x26a, 0x2f);
     this.pictureBox3.Name = "pictureBox3";
     this.pictureBox3.Size = new Size(0x15b, 0xd0);
     this.pictureBox3.SizeMode = PictureBoxSizeMode.CenterImage;
     this.pictureBox3.TabIndex = 20;
     this.pictureBox3.TabStop = false;
     this.pictureBox3.Visible = false;
     this.pictureBox1.Image = Resources.mta;
     this.pictureBox1.Location = new Point(13, 0x100);
     this.pictureBox1.Name = "pictureBox1";
     this.pictureBox1.Size = new Size(0x29, 0x29);
     this.pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
     this.pictureBox1.TabIndex = 0x11;
     this.pictureBox1.TabStop = false;
     this.pictureBox1.Visible = false;
     this.metroButton2.Highlight = true;
     this.metroButton2.Location = new Point(0x7b, 0x112);
     this.metroButton2.Name = "metroButton2";
     this.metroButton2.Size = new Size(0xc7, 0x24);
     this.metroButton2.Style = MetroColorStyle.Blue;
     this.metroButton2.TabIndex = 9;
     this.metroButton2.Text = "Submit";
     this.metroButton2.Theme = MetroThemeStyle.Dark;
     this.metroButton2.UseSelectable = true;
     this.metroButton2.Visible = false;
     this.metroButton2.Click += new EventHandler(this.metroButton2_Click_1);
     this.pictureBox4.BackColor = Color.Transparent;
     this.pictureBox4.Image = Resources.iTSBw9qsqAVIt;
     this.pictureBox4.Location = new Point(12, 0x100);
     this.pictureBox4.Name = "pictureBox4";
     this.pictureBox4.Size = new Size(0x60, 0x36);
     this.pictureBox4.SizeMode = PictureBoxSizeMode.Zoom;
     this.pictureBox4.TabIndex = 0x63;
     this.pictureBox4.TabStop = false;
     this.pictureBox4.Visible = false;
     base.AutoScaleDimensions = new SizeF(6f, 13f);
     base.AutoScaleMode = AutoScaleMode.Font;
     this.BackColor = SystemColors.ActiveCaptionText;
     this.BackgroundImage = Resources.Mtabetabkofyop5;
     this.BackgroundImageLayout = ImageLayout.Stretch;
     base.ClientSize = new Size(0x3db, 0x16d);
     base.Controls.Add(this.pictureBox4);
     base.Controls.Add(this.metroLabel14);
     base.Controls.Add(this.metroButton2);
     base.Controls.Add(this.button1);
     base.Controls.Add(this.pictureBox3);
     base.Controls.Add(this.metroLabel20);
     base.Controls.Add(this.panel2);
     base.Controls.Add(this.pictureBox1);
     base.Controls.Add(this.metroProgressSpinner1);
     base.Controls.Add(this.dg1);
     base.Controls.Add(this.chart1);
     base.Controls.Add(this.panel1);
     this.DoubleBuffered = true;
     base.FormBorderStyle = FormBorderStyle.None;
     base.Icon = (Icon) manager.GetObject("$this.Icon");
     base.Name = "Form2";
     base.StartPosition = FormStartPosition.CenterScreen;
     this.Text = "Top 5";
     base.Load += new EventHandler(this.Form2_Load);
     base.MouseDown += new MouseEventHandler(this.Form2_MouseDown);
     this.panel1.ResumeLayout(false);
     this.panel1.PerformLayout();
     this.chart1.EndInit();
     ((ISupportInitialize) this.dg1).EndInit();
     this.panel2.ResumeLayout(false);
     this.panel2.PerformLayout();
     ((ISupportInitialize) this.pictureBox2).EndInit();
     ((ISupportInitialize) this.pictureBox3).EndInit();
     ((ISupportInitialize) this.pictureBox1).EndInit();
     ((ISupportInitialize) this.pictureBox4).EndInit();
     base.ResumeLayout(false);
     base.PerformLayout();
 }
Exemple #29
0
 private void NullifyTextBox(MetroTextBox box)
 {
     box.Enabled = false;
     box.BackColor = System.Drawing.Color.AliceBlue;
     box.UseCustomBackColor = true;
     MetroButton del = (MetroButton)box.Parent.Controls[3];
     del.Visible = true;
     del.UseCustomBackColor = true;
     del.Enabled = true;
     del.BackColor = System.Drawing.Color.AliceBlue;
 }
            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);
            }
 void ReturnFocus( MetroTextBox txt )
 {
     if ( ! this.InvokeRequired )
     {
         txt.Focus();
     }
     else
     {
         ReturnFocusToInput inp = new ReturnFocusToInput( ReturnFocus );
         this.Invoke( inp, new object[] { txt } );
     }
 }
        private void SetItem(ComboBox combo, MetroTextBox cost, PictureBox pic, bool target = true)
        {
            ItemStat item = (ItemStat)combo.SelectedItem;
            cost.Text = item.Cost.ToString(CultureInfo.InvariantCulture);
            string name = item.Name.Replace(" ", "-").Replace("\'", "").ToLower();
            pic.ImageLocation = "images/" + name + ".png";

            if(target) {
                targetWarlockStacks.Enabled = calculations.TargetItems.Any(i => i != null && i.Name == "Warlock's Sash");
                if(!targetWarlockStacks.Enabled) calculations.TargetWarlockStacks = 0;

                targetUrchinStacks.Enabled = calculations.TargetItems.Any(i => i != null && i.Name == "Hide of the Urchin");
                if(!targetUrchinStacks.Enabled) calculations.TargetUrchinStacks = 0;

                CalculateTarget();
            } else {
                selfDevoStacks.Enabled = calculations.SelfItems.Any(i => i != null && i.Name == "Devourer's Gauntlet");
                if(!selfDevoStacks.Enabled) calculations.SelfDevourerStacks = 0;

                selfTransStacks.Enabled = calculations.SelfItems.Any(i => i != null && i.Name == "Transcendence");
                if(!selfTransStacks.Enabled) calculations.SelfTranscendenceStacks = 0;

                selfHeartStacks.Enabled = calculations.SelfItems.Any(i => i != null && i.Name == "Heartseeker");
                if(!selfHeartStacks.Enabled) calculations.SelfHeartseekerStacks = 0;

                selfDoomStacks.Enabled = calculations.SelfItems.Any(i => i != null && i.Name == "Doom Orb");
                if(!selfDoomStacks.Enabled) calculations.SelfDoomOrbStacks = 0;

                selfThothStacks.Enabled = calculations.SelfItems.Any(i => i != null && i.Name == "Book of Thoth");
                if(!selfThothStacks.Enabled) calculations.SelfThothStacks = 0;

                selfWarlockStacks.Enabled = calculations.SelfItems.Any(i => i != null && i.Name == "Warlock's Sash");
                if(!selfWarlockStacks.Enabled) calculations.SelfWarlockStacks = 0;

                selfAncileStacks.Enabled = calculations.SelfItems.Any(i => i != null && i.Name == "Ancile");
                if(!selfAncileStacks.Enabled) calculations.SelfAncileStacks = 0;

                CalculateSelf();
            }
        }
Exemple #33
0
 public TextBoxWriter(MetroTextBox textbox)
 {
     this.textbox = textbox;
 }
        private void UpdateWindowButtonPosition()
        {
            if (!ControlBox) return;

            Dictionary<int, WindowButtons> priorityOrder = new Dictionary<int, WindowButtons>(3) { {0, WindowButtons.Close}, {1, WindowButtons.Maximize}, {2, WindowButtons.Minimize} };

            Point firstButtonLocation = new Point(ClientRectangle.Width - borderWidth - 25, borderWidth);
            int lastDrawedButtonPosition = firstButtonLocation.X - 25;

            MetroFormButton firstButton = null;

            if (windowButtonList.Count == 1)
            {
                foreach (KeyValuePair<WindowButtons, MetroFormButton> button in windowButtonList)
                {
                    button.Value.Location = firstButtonLocation;
                }
            }
            else
            {
                foreach (KeyValuePair<int, WindowButtons> button in priorityOrder)
                {
                    bool buttonExists = windowButtonList.ContainsKey(button.Value);

                    if (firstButton == null && buttonExists)
                    {
                        firstButton = windowButtonList[button.Value];
                        firstButton.Location = firstButtonLocation;
                        continue;
                    }

                    if (firstButton == null || !buttonExists) continue;

                    windowButtonList[button.Value].Location = new Point(lastDrawedButtonPosition, borderWidth);
                    lastDrawedButtonPosition = lastDrawedButtonPosition - 25;
                }
            }

            Refresh();

            #region swdev
                txtLiveSearch = new MetroTextBox();
                txtLiveSearch.Size = new Size(146, 20);
                MetroFormButton btnMinimize;
                windowButtonList.TryGetValue(WindowButtons.Minimize, out btnMinimize);
                if (btnMinimize != null)
                {
                    txtLiveSearch.Location = new Point(btnMinimize.Left - txtLiveSearch.Width - 5, 12);
                    txtLiveSearch.Anchor = ((AnchorStyles)((AnchorStyles.Top | AnchorStyles.Right)));
                    txtLiveSearch.Name = "txtLiveSearch";
                    txtLiveSearch.TabIndex = 38;
                    txtLiveSearch.Text = "Search";
                    txtLiveSearch.Font = new Font("Segoe UI", 8.25F, FontStyle.Italic, GraphicsUnit.Point, ((byte)(0)));
                    txtLiveSearch.TextAlign = HorizontalAlignment.Right;
                    txtLiveSearch.Leave += txtLiveSearch_Leave;
                    txtLiveSearch.Enter += txtLiveSearch_Enter;
                    Controls.Add(txtLiveSearch);
                }
            #endregion
        }
        private void AddSkillToPanel(object sender, EventArgs e)
        {
            var addBtn = sender as Button;

            if (addBtn == null)
            {
                return;
            }
            var substring = addBtn.Name.Substring(addBtn.Name.Length - 5, 4);
            Console.WriteLine(@"AddSkillToPanel: addBtn = " + substring); //Debug

            var yCoord = addBtn.Location.Y + (DistBetweenSkills * this.numOfSkills);

            foreach (var item in this.CVTab.Controls.OfType<MetroPanel>())
            {
                if (!item.Name.Contains("panel" + substring))
                {
                    continue;
                }
                Console.WriteLine(@"PANEL FOUND @ " + item.Name); //Debug

                var newSkillBox = new MetroTextBox();
                var newResponseBox = new MetroTextBox();
                var newDeleteBtn = new MetroButton();

                //SkillBox
                newSkillBox.Size = new Size(121, 23);
                newSkillBox.Location = new Point(177, yCoord);
                newSkillBox.Name = "skillbox" + substring + this.skillId;
                newSkillBox.Text = @"Skill";
                Console.WriteLine(@"Created newSkillBox with the name: " + newSkillBox.Name);

                //ResponseBox
                newResponseBox.Size = new Size(286, 23);
                newResponseBox.Location = new Point(304, yCoord);
                newResponseBox.Name = "responsebox" + substring + this.skillId;
                newResponseBox.Text = @"Response";
                Console.WriteLine(@"Created newResponseBox with the name: " + newResponseBox.Name);

                //DeleteBtn
                newDeleteBtn.Size = new Size(26, 23);
                newDeleteBtn.Location = new Point(596, yCoord);
                newDeleteBtn.Name = "deletebtn" + substring + this.skillId;
                newDeleteBtn.Text = @"-";
                newDeleteBtn.Click += DeleteSkills;
                Console.WriteLine(@"Created newDeleteBtn with the name: " + newDeleteBtn.Name);

                item.Controls.Add(newSkillBox);
                item.Controls.Add(newResponseBox);
                item.Controls.Add(newDeleteBtn);
                this.numOfSkills++;
                this.skillId++;
                item.Height += DistBetweenSkills;
            }
        }
        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();
        }
 public override void Clear()
 {
     base.Clear();
     m_textBox = null;
 }
        private void UpdateDataGridView()
        {
            if (select_table != "")
            {
                cnn.DataAdapter(String.Format(query, select_table));

                var data_adapter = cnn.GetDataAdapter();

                DataSet ds = new DataSet();

                data_adapter.Fill(ds, select_table);

                ColumnsComboBox.Items.Clear();

                for (int i = 0; i < ds.Tables[0].Columns.Count; i++)
                {
                    ColumnsComboBox.Items.Add(ds.Tables[0].Columns[i].ColumnName);// .Add(ds.Tables[0].Columns[i].ColumnName);
                }

                TableDataGridView.DataSource = ds;
                TableDataGridView.DataMember = select_table;

                int _x = 3;
                int _y = 41;

                int _columns = 0;
                FormPanel.AutoScroll = true;
                FormPanel.Controls.Clear();

                MetroLabel label = new MetroLabel();
                label.Location = new Point(0, 0);
                label.Size = new Size(232, 19);
                label.MaximumSize = new Size(232, 19);
                label.Text = select_table;
                FormPanel.Controls.Add(label);

                foreach (DataGridViewColumn column in TableDataGridView.Columns)
                {
                    label = new MetroLabel();
                    label.Location = new Point(_x, 30 + (_y * _columns));
                    label.Size = new Size(232, 19);
                    label.MaximumSize = new Size(232, 19);
                    label.Text = column.Name;
                    FormPanel.Controls.Add(label);
                    MetroTextBox textbox = new MetroTextBox();
                    textbox.Location = new Point(_x, 50 + (_y * _columns));
                    textbox.Size = new Size(255, 23);
                    textbox.MaximumSize = new Size(255, 23);
                    textbox.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
                    textbox.Enabled =  Array.Exists(noEdit, element => element == column.Name) ? false : true;
                    textbox.FontSize = MetroFramework.MetroTextBoxSize.Medium;
                    FormPanel.Controls.Add(textbox);
                    _columns++;
                }

            }
        }