Example #1
0
        public string AutocompletarenCobros(MetroFramework.Controls.MetroTextBox pbarrabuscar)
        {
            con = generarConexion();

            con.Open();


            string consulta = "SELECT CONCAT(PER_NOMBRE, ', ', PER_APELLIDO, ' (', PER_DOCUMENTO, ')') NOMBRE  " +
                              "FROM T_PERSONAS " +
                              "WHERE PER_TPE_ID = '2'";

            cmd = new SqlCommand(consulta, con);

            dr = cmd.ExecuteReader();


            while (dr.Read())
            {
                pbarrabuscar.AutoCompleteCustomSource.Add(dr["NOMBRE"].ToString());
            }
            dr.Close();

            con.Close();
            return(consulta);
        }
Example #2
0
        private void NewMethod(MetroFramework.Controls.MetroTextBox txb, string placeholdertext = "hello")
        {
            if (string.IsNullOrWhiteSpace(txb.Text.Trim()) == true)
            {
                txb.Focus();
                txb.Text = placeholdertext;
                //If not focus TextBox forecolor to gray
                txb.ForeColor = Color.Black;
                txb.BackColor = Color.WhiteSmoke;

                errorProvider1.SetError(txb, "Text input cant be empty");
                errorProvider1.SetIconAlignment(txb, ErrorIconAlignment.MiddleRight);
            }
            else if (txb.Text.Trim() == placeholdertext)
            {
                // txt_token.Text = "Enter Token....";
                txb.Focus();
                //If not focus TextBox forecolor to gray
                txb.ForeColor = Color.Black;
                txb.BackColor = Color.WhiteSmoke;

                errorProvider1.SetError(txb, "Text input cant be same as placeholder");
                errorProvider1.SetIconAlignment(txb, ErrorIconAlignment.MiddleRight);
            }
            else
            {
                errorProvider1.SetError(txb, "");
                errorProvider1.SetIconAlignment(txb, ErrorIconAlignment.MiddleRight);
            }
        }
Example #3
0
        private void txtLotNo_TextChanged(object sender, EventArgs e)
        {
            MetroFramework.Controls.MetroTextBox cb = (MetroFramework.Controls.MetroTextBox)sender;

            if (!cb.Focused)
            {
                return;
            }


            if (txtLotNo.Text == "")
            {
                txtGardenName.Text    = "";
                txtGrade.Text         = "";
                txtGardenName.Enabled = true;
                txtGrade.Enabled      = true;
                return;
            }


            dt = new DAO().SearchLotNo(int.Parse(txtLotNo.Text));

            if (dt != null)
            {
                AsUpdateQty obj = new AsUpdateQty();
                obj.Show();
            }
            else
            {
                txtGardenName.Text    = "";
                txtGrade.Text         = "";
                txtGardenName.Enabled = true;
                txtGrade.Enabled      = true;
            }
        }
Example #4
0
        //========================Função para Pesquisa de Livros
        public DataTable PesquisarDadosLivros(MetroFramework.Controls.MetroTextBox txtPesquisa)
        {
            string           NewConexao = ClienteDAL.BancoDs;
            SQLiteConnection Conexao    = new SQLiteConnection(NewConexao);

            string sql = "SELECT ID, TITULO, AUTOR, CATEGORIA, LANCAMENTO, EXEMPLARES FROM LIVROS WHERE TITULO LIKE '" + txtPesquisa.Text + "%'";

            using (SQLiteConnection connection = new SQLiteConnection(Conexao))
            {
                Conexao.Open();
                using (SQLiteDataAdapter da = new SQLiteDataAdapter(sql, Conexao))
                {
                    try
                    {
                        DataTable dt = new DataTable();
                        da.Fill(dt);
                        return(dt);
                    }
                    catch (SQLiteException ex)
                    {
                        throw ex;
                    }
                    finally
                    {
                        Conexao.Close();
                    }
                }
            }
        }
        private void dtgAlumno_CellMouseClick_1(object sender, DataGridViewCellMouseEventArgs e)
        {
            int posicionFila;

            if (e.RowIndex < 0)
            {
                posicionFila = 0;
            }
            else
            {
                posicionFila = e.RowIndex;
            }

            try
            {
                indice             = int.Parse(dtgAlumno.Rows[posicionFila].Cells[0].Value.ToString());
                txtID.Text         = dtgAlumno.Rows[posicionFila].Cells[0].Value.ToString();
                txtNombre.Text     = dtgAlumno.Rows[posicionFila].Cells[1].Value.ToString();
                txtsemestre.Text   = dtgAlumno.Rows[posicionFila].Cells[2].Value.ToString();
                txtUsuario.Text    = dtgAlumno.Rows[posicionFila].Cells[3].Value.ToString();
                txtContrasena.Text = dtgAlumno.Rows[posicionFila].Cells[4].Value.ToString();
                ID      = txtID;
                Usuario = txtUsuario;
            }
            catch
            {
            }

            if (usando == true)
            {
                this.Hide();
            }
        }
Example #6
0
        /// <summary>
        /// catches the controller of the RightsWindow
        /// </summary>
        private void catchControllers()
        {
            btnSave   = (MetroFramework.Controls.MetroButton)parRightsWindow.Controls.Find("mBtnSave", true).First();
            btnCancel = (MetroFramework.Controls.MetroButton)parRightsWindow.Controls.Find("mBtnCancel", true).First();

            comboboxAllGroups = (MetroFramework.Controls.MetroComboBox)parRightsWindow.Controls.Find("mCmbBxAllGroups", true).First();
            textboxGroupName  = (MetroFramework.Controls.MetroTextBox)parRightsWindow.Controls.Find("mTxtBxGroupName", true).First();
            labelGroupName    = (MetroFramework.Controls.MetroLabel)parRightsWindow.Controls.Find("mLblGroup", true).First();

            comboboxR6Accidents = (MetroFramework.Controls.MetroComboBox)parRightsWindow.Controls.Find("mCmbBxAccidents", true).First();
            comboboxR4Users     = (MetroFramework.Controls.MetroComboBox)parRightsWindow.Controls.Find("mCmbBxUsers", true).First();
            comboboxR5Rights    = (MetroFramework.Controls.MetroComboBox)parRightsWindow.Controls.Find("mCmbBxRights", true).First();
            comboboxR7Store     = (MetroFramework.Controls.MetroComboBox)parRightsWindow.Controls.Find("mCmbBxStore", true).First();
            comboboxR8Request   = (MetroFramework.Controls.MetroComboBox)parRightsWindow.Controls.Find("mCmbBxRequest", true).First();
            comboboxR9Order     = (MetroFramework.Controls.MetroComboBox)parRightsWindow.Controls.Find("mCmbBxOrder", true).First();
            comboboxR10Subcontr = (MetroFramework.Controls.MetroComboBox)parRightsWindow.Controls.Find("mCmbBxSubcontr", true).First();

            comboboxR2LocalAccid   = (MetroFramework.Controls.MetroComboBox)parRightsWindow.Controls.Find("mCmbBxAccidLocal", true).First();
            comboboxR3LocalUser    = (MetroFramework.Controls.MetroComboBox)parRightsWindow.Controls.Find("mCmbBxUsersLocal", true).First();
            comboboxR1LocalRequest = (MetroFramework.Controls.MetroComboBox)parRightsWindow.Controls.Find("mCmbBxRequestLocal", true).First();

            tileNew    = (MetroFramework.Controls.MetroTile)parRightsWindow.Controls.Find("mTileNew", true).First();
            tileModify = (MetroFramework.Controls.MetroTile)parRightsWindow.Controls.Find("mTileModify", true).First();
            tileDelete = (MetroFramework.Controls.MetroTile)parRightsWindow.Controls.Find("mTileDelete", true).First();
        }
Example #7
0
        private void create_new_task(int x, int y, Panel pn)
        {
            Bunifu.Framework.UI.BunifuCards card = new Bunifu.Framework.UI.BunifuCards();
            card.color     = Color.Purple;
            card.BackColor = Color.FromArgb(64, 64, 64);

            Panel layout = new Panel();

            MetroFramework.Controls.MetroCheckBox check = new MetroFramework.Controls.MetroCheckBox();
            check.Style = MetroFramework.MetroColorStyle.Green;
            check.Theme = MetroFramework.MetroThemeStyle.Dark;

            MetroFramework.Controls.MetroTextBox title_task = new MetroFramework.Controls.MetroTextBox();
            title_task.FontSize   = MetroFramework.MetroTextBoxSize.Tall;
            title_task.FontWeight = MetroFramework.MetroTextBoxWeight.Bold;
            title_task.Theme      = MetroFramework.MetroThemeStyle.Dark;
            title_task.Multiline  = true;

            layout.Controls.Add(check);
            check.SetBounds(4, 20, 30, 15);
            layout.Controls.Add(title_task);
            title_task.SetBounds(40, 12, 275, 31);

            card.Controls.Add(layout);
            layout.SetBounds(3, 3, 413, 61);

            pn.Controls.Add(card);
            card.SetBounds(x, y, 421, 67);
        }
Example #8
0
        //=====================Função para Pesquisa de Alunos
        public DataTable PesquisarDadosAlunos(MetroFramework.Controls.MetroTextBox txtPesquisa2)
        {
            string           NewConexao = ClienteDAL.BancoDs;
            SQLiteConnection Conexao    = new SQLiteConnection(NewConexao);

            string sql = "SELECT ID, NOME, SERIE, SALA FROM ALUNOS WHERE NOME LIKE '" + txtPesquisa2.Text + "%'";

            using (SQLiteConnection connection = new SQLiteConnection(Conexao))
            {
                Conexao.Open();
                using (SQLiteDataAdapter da = new SQLiteDataAdapter(sql, Conexao))
                {
                    try
                    {
                        DataTable dt = new DataTable();
                        da.Fill(dt);
                        return(dt);
                    }
                    catch (SQLiteException ex)
                    {
                        throw ex;
                    }
                    finally
                    {
                        Conexao.Close();
                    }
                }
            }
        }
Example #9
0
        void getFile(MetroFramework.Controls.MetroTextBox textBox, Panel panel, string fileType)
        {
            OpenFileDialog openABK = new OpenFileDialog();

            openABK.Filter           = fileType.ToUpper() + " Files | *." + fileType;
            openABK.FilterIndex      = 1;
            openABK.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
            openABK.Title            = "Cylops' ABK Replacer -|- Select " + fileType.ToUpper() + " File";
            openABK.Multiselect      = false;
            if (openABK.ShowDialog() == DialogResult.OK)
            {
                textBox.Text  = openABK.FileName;
                panel.Enabled = true;
                abkSelected.Start();
                if (fileType == "abk")
                {
                    AbkName = openABK.SafeFileName;
                }
            }
            else
            {
                MetroFramework.MetroMessageBox.Show(this, "Please Insert a Valid " + fileType.ToUpper() + " File.", "ABK Replacer by Cylops", MessageBoxButtons.OK, MessageBoxIcon.Error, 100);
            }
            //if(openABK.DialogResult)
        }
Example #10
0
 private void ToggleTextbox(MetroFramework.Controls.MetroTextBox obj, bool status, String type = "hide")
 {
     try
     {
         if (obj.InvokeRequired)
         {
             this.Invoke((MethodInvoker) delegate {
                 if (type == "hide")
                 {
                     obj.Visible = status;
                 }
                 else
                 {
                     obj.Enabled = status;
                 }
             });
         }
         else
         {
             if (type == "hide")
             {
                 obj.Visible = status;
             }
             else
             {
                 obj.Enabled = status;
             }
         }
     }
     catch (Exception e)
     {
         ErrorHandler.logError("Error Hiding Textbox", "Error while hiding the textbox " + obj.Name.ToString(), "error", false);
     }
 }
Example #11
0
        protected bool validarComponentes()
        {
            foreach (var c in this.Controls)
            {
                if (c is MetroFramework.Controls.MetroTextBox)
                {
                    MetroFramework.Controls.MetroTextBox t = new MetroFramework.Controls.MetroTextBox();
                    t = (MetroFramework.Controls.MetroTextBox)c;

                    if (t.Name != txtSearch.Name && t.Name != txtEmail.Name)
                    {
                        if (t.Text == "")
                        {
                            errorProvider1.SetError(t, "Campo Obrigatório");
                            Error = true;
                        }
                        else if (Error != true)
                        {
                            Error = false;
                        }
                    }
                }
            }

            if (cbxApartamento.SelectedValue == null)
            {
                errorProvider1.SetError(cbxApartamento, "Selecione um apartamento");
                Error = true;
            }
            return(Error);
        }
        //Слайдер полей, когда пользователь нажимает на поле чтобы его редактировать, второй раз чтобы сохранить
        private void sliderField(MetroFramework.Controls.MetroTextBox field, Label txtEdit, PictureBox btnEdit, bool foo, int speed)
        {
            Timer timer = new Timer(); // создаём таймер

            timer.Interval = 1;        // задаём интервал
            timer.Start();             // стартуем
            timer.Tick += (s, e) =>    // это обработчик того, что произойдёт после интервала
            {
                if (foo)
                {
                    field.Left -= speed;
                    if (field.Left <= 90)
                    {
                        timer.Stop();
                        txtEdit.Visible = true;
                        btnEdit.Image   = Properties.Resources.okay;
                        field.ReadOnly  = false;
                    }
                }
                else
                {
                    field.Left += speed;
                    if (field.Left >= 160)
                    {
                        timer.Stop();
                        txtEdit.Visible = false;
                        btnEdit.Image   = Properties.Resources.forward;
                        field.ReadOnly  = true;
                    }
                }
            };
        }
Example #13
0
        private void Preco(ref MetroFramework.Controls.MetroTextBox txt)
        {
            string n = string.Empty;
            double v = 0;

            try
            {
                n = txt.Text.Replace(",", "").Replace(".", "");
                if (n.Equals(""))
                {
                    n = "";
                }

                n = n.PadLeft(3, '0');
                if (n.Length > 3 & n.Substring(0, 1) == "0")
                {
                    n = n.Substring(1, n.Length - 1);
                }
                v                  = Convert.ToDouble(n) / 100;
                txt.Text           = string.Format("{0:N}", v);
                txt.SelectionStart = txt.Text.Length;
            }
            catch (Exception ex)
            {
                //MetroFramework.MetroMessageBox.Show(this, ex.Message, "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #14
0
 //an intermediate isPresent check
 public static bool IsPresent(MetroFramework.Controls.MetroTextBox textBox)
 {
     if (textBox.Text == "")
     {
         return(false);
     }
     return(true);
 }
Example #15
0
        private void load_list(Lista list)
        {
            string[] tasks = list.tasks.Split(';');

            Panel list_pn = (Panel)List_cr_pn.Controls[0];

            list_pn.Controls.Clear();

            MetroFramework.Controls.MetroTextBox title_list = (MetroFramework.Controls.MetroTextBox)List_cr_pn.Controls[3];
            title_list.Text = list.title;

            int y = 3;

            for (int i = 0; i < tasks.Length; i++)
            {
                string text = tasks[i].Split('@')[0];
                if (text == "")
                {
                    break;
                }
                bool is_checked = false;
                if (tasks[i].Split('@')[1] == "True")
                {
                    is_checked = true;
                }

                Bunifu.Framework.UI.BunifuCards card = new Bunifu.Framework.UI.BunifuCards();
                card.color     = Color.Purple;
                card.BackColor = Color.FromArgb(64, 64, 64);

                Panel layout = new Panel();

                MetroFramework.Controls.MetroCheckBox check = new MetroFramework.Controls.MetroCheckBox();
                check.Style   = MetroFramework.MetroColorStyle.Green;
                check.Theme   = MetroFramework.MetroThemeStyle.Dark;
                check.Checked = is_checked;

                MetroFramework.Controls.MetroTextBox title_task = new MetroFramework.Controls.MetroTextBox();
                title_task.FontSize   = MetroFramework.MetroTextBoxSize.Tall;
                title_task.FontWeight = MetroFramework.MetroTextBoxWeight.Bold;
                title_task.Theme      = MetroFramework.MetroThemeStyle.Dark;
                title_task.Multiline  = true;
                title_task.Text       = text;

                layout.Controls.Add(check);
                check.SetBounds(4, 20, 30, 15);
                layout.Controls.Add(title_task);
                title_task.SetBounds(40, 12, 275, 31);

                card.Controls.Add(layout);
                layout.SetBounds(3, 3, 413, 61);

                list_pn.Controls.Add(card);
                card.SetBounds(3, y, 421, 67);
                y += 73;
            }
        }
Example #16
0
        public string ExtraerDni(MetroFramework.Controls.MetroTextBox pbarrabuscao)

        {
            string info = pbarrabuscao.Text;

            string[] extraccion = info.Split('(', ')');

            return(extraccion[1]);
        }
Example #17
0
 private void check(object sender, EventArgs e)
 {
     MetroFramework.Controls.MetroTextBox hexBox = (MetroFramework.Controls.MetroTextBox)sender;
     if (hexBox.Text.Length != 7)
     {
         //TODO
         valid = false;
     }
 }
Example #18
0
 public static bool IsPositive(MetroFramework.Controls.MetroTextBox textbox, string name)
 {
     if (Convert.ToDecimal(textbox.Text) < 0)
     {
         MessageBox.Show(name + " must be positive");
         return(false);
     }
     return(true);
 }
Example #19
0
 public static bool IsPresent(MetroFramework.Controls.MetroTextBox textBox, string name)
 {
     if (textBox.Text == "")
     {
         MessageBox.Show(name + " is a required field.", "Entry Error");
         textBox.Focus();
         return(false);
     }
     return(true);
 }
Example #20
0
        public static void CreateNumberBinding(MetroFramework.Controls.MetroTextBox txtBox, object one, string propiedad)
        {
            //// Creates the binding first. The OrderAmount is a Decimal type.
            Binding b = new Binding
                            ("Text", one, propiedad, true, DataSourceUpdateMode.OnPropertyChanged);

            // Add the delegates to the event.
            b.Format += new ConvertEventHandler(StringDoubleToFormat);
            b.Parse  += new ConvertEventHandler(StringFormatToDouble);
            txtBox.DataBindings.Add(b);
        }
Example #21
0
        private void dblC1(object sender, EventArgs e)
        {
            MetroFramework.Controls.MetroTextBox TB = (MetroFramework.Controls.MetroTextBox)sender;
            string text = TB.Text;

            if (text != "")
            {
                Clipboard.SetText(text);
            }
            System.Media.SystemSounds.Hand.Play();
        }
Example #22
0
        public void CalnetProc(MetroFramework.Controls.MetroTextBox abc, MetroFramework.Controls.MetroToggle tg, NotifyIcon nf)
        {
            PerformanceCounterCategory performanceCounterCategory = new PerformanceCounterCategory("Network Interface");

            string[] instances = performanceCounterCategory.GetInstanceNames();

            List <PerformanceCounter> pcarr1 = new List <PerformanceCounter>();
            List <PerformanceCounter> pcarr2 = new List <PerformanceCounter>();

            foreach (string name in instances)
            {
                PerformanceCounter performanceCounterSent     = new PerformanceCounter("Network Interface", "Bytes Sent/sec", name);
                PerformanceCounter performanceCounterReceived = new PerformanceCounter("Network Interface", "Bytes Received/sec", name);
                pcarr1.Add(performanceCounterSent);
                pcarr2.Add(performanceCounterReceived);
            }

            double sum_s    = 0;
            double sum_r    = 0;
            string return_s = "";
            int    sum_s_i  = 0;
            int    sum_r_i  = 0;

            while (true)
            {
                if (tg.Checked == false)
                {
                    abc.Text = "NETWORK DETECTION OFF";
                    Thread.CurrentThread.Interrupt();
                    Thread.CurrentThread.Abort();
                    break;
                }
                sum_s = 0;
                sum_r = 0;
                foreach (PerformanceCounter instance in pcarr1)
                {
                    sum_s += instance.NextValue();
                }
                foreach (PerformanceCounter instance in pcarr2)
                {
                    sum_r += instance.NextValue();
                }
                sum_s_i = (int)(sum_s / 1024);
                sum_r_i = (int)(sum_r / 1024);
                if (sum_s_i > 1024)
                {
                    nf.ShowBalloonTip(2000, "WARNING", "Send data over 1MB", ToolTipIcon.Warning);
                }
                return_s = "sent: " + (sum_s_i).ToString() + "KB \nreceived: " + (sum_r_i).ToString() + "KB";
                abc.Text = return_s;
                System.Threading.Thread.Sleep(1000);
            }
        }
Example #23
0
 private void textBox_PastaEnvioXML_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == System.Windows.Forms.MouseButtons.Left)
     {
         MetroFramework.Controls.MetroTextBox control = (MetroFramework.Controls.MetroTextBox)sender;
         int x = control.ClientRectangle.Width - control.Icon.Size.Width;
         if (e.Location.X >= x)  // a imagem foi pressionada?
         {
             selectxmlenvio(sender);
         }
     }
 }
Example #24
0
        public static void AutoCompleta(DataTable Tabela, MetroFramework.Controls.MetroTextBox textobox)
        {
            var source = new AutoCompleteStringCollection();

            for (int i = 0; i < Tabela.Rows.Count; i++)
            {
                source.Add(Tabela.Rows[i][0].ToString());
            }

            textobox.AutoCompleteCustomSource = source;
            textobox.AutoCompleteMode         = AutoCompleteMode.SuggestAppend;
            textobox.AutoCompleteSource       = AutoCompleteSource.CustomSource;
        }
Example #25
0
        private void txtCep_KeyPress(object sender, KeyPressEventArgs e)
        {
            MetroFramework.Controls.MetroTextBox t = sender as MetroFramework.Controls.MetroTextBox; // ou text Box
            if (char.IsNumber(e.KeyChar) || char.IsPunctuation(e.KeyChar))
            {
                t.SelectionStart = t.Text.Length + 1;

                if (t.Text.Length == 5)
                {
                    t.Text          += '-';
                    t.SelectionStart = t.Text.Length + 1;
                }
            }
        }
Example #26
0
 /// <summary>
 /// Ajusta o diretório no componente informado para o diretório base
 /// respeitando o último nome de diretório informado
 /// </summary>
 /// <param name="textBox">Componente do tipo TextBox que será modificado</param>
 /// <param name="baseDir">diretório base para substituir no componente</param>
 private void SetNewDir(MetroFramework.Controls.MetroTextBox textBox, string baseDir, string subfolder)
 {
     string[] dirs = textBox.Text.Split(new char[] { '\\' });
     if (dirs.Length > 0 && !String.IsNullOrEmpty(textBox.Text))
     {
         string dir = dirs[dirs.Length - 1];
         textBox.Text = String.Format("{0}\\{1}", baseDir, dir);
     }
     else
     {
         textBox.Text = String.Format("{0}\\{1}", baseDir, subfolder);
     }
     __oldvalues[textBox] = textBox.Text;
 }
Example #27
0
        public static bool IsWithinRange(MetroFramework.Controls.MetroTextBox textBox, string name,
                                         decimal min, decimal max)
        {
            decimal number = Convert.ToDecimal(textBox.Text);

            if (number < min || number > max)
            {
                MessageBox.Show(name + " must be between " + min
                                + " and " + max + ".", "Entry Error");
                textBox.Focus();
                return(false);
            }
            return(true);
        }
Example #28
0
        private void ReadRestBtn_Click(object sender, EventArgs e)
        {
            Read_Restrictions();
            foreach (Control txtbox in this.Restrictions.Controls)
            {
                MetroFramework.Controls.MetroTextBox tb = txtbox as MetroFramework.Controls.MetroTextBox;

                if (null != tb)
                {
                    txtbox.Text = Rest_dic[tb.Name.ToString()].ToString();
                    //txtbox.Text = Properties.Settings.Default[tb.Name.ToString()].ToString();
                }
            }
        }
        // Added functions
        public void SetNumbersOnly(MetroFramework.Controls.MetroTextBox txt, KeyPressEventArgs e)
        {
            if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar) && e.KeyChar != '.' && e.KeyChar != '*')
            {
                e.Handled = true;
            }

            // only allow one decimal point
            if (e.KeyChar == '.' &&
                txt.Text.IndexOf('.') > -1)
            {
                e.Handled = true;
            }
        }
Example #30
0
        //Show Login credentials
        private void ShowLoginInfo(MetroFramework.Controls.MetroTextBox txtUserId, MetroFramework.Controls.MetroTextBox txtPassword)
        {
            txtUserId.Text = this.UserId;

            MessageBox.Show(@"Your Login credentials: " + "\n\n"
                            + "Username: "******"\n"
                            + "Password: " + txtPassword.Text);

            //Take back to login page
            this.Visible = false;
            FormLogin fl = new FormLogin(this.UserId);

            fl.Visible = true;
        }
 private void InitializeComponent()
 {
     this.metroTextBox1 = new MetroFramework.Controls.MetroTextBox();
     this.metroButton1 = new MetroFramework.Controls.MetroButton();
     this.SuspendLayout();
     //
     // metroTextBox1
     //
     this.metroTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.metroTextBox1.Lines = new string[] {
     "metroTextBox1"};
     this.metroTextBox1.Location = new System.Drawing.Point(24, 64);
     this.metroTextBox1.MaxLength = 32767;
     this.metroTextBox1.Multiline = true;
     this.metroTextBox1.Name = "metroTextBox1";
     this.metroTextBox1.PasswordChar = '\0';
     this.metroTextBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;
     this.metroTextBox1.SelectedText = "";
     this.metroTextBox1.Size = new System.Drawing.Size(453, 364);
     this.metroTextBox1.TabIndex = 0;
     this.metroTextBox1.Text = "metroTextBox1";
     this.metroTextBox1.UseSelectable = true;
     //
     // metroButton1
     //
     this.metroButton1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.metroButton1.Location = new System.Drawing.Point(23, 434);
     this.metroButton1.Name = "metroButton1";
     this.metroButton1.Size = new System.Drawing.Size(454, 37);
     this.metroButton1.TabIndex = 1;
     this.metroButton1.Text = "Save Settings";
     this.metroButton1.UseSelectable = true;
     this.metroButton1.Click += new System.EventHandler(this.metroButton1_Click);
     //
     // EditForm
     //
     this.ClientSize = new System.Drawing.Size(500, 494);
     this.Controls.Add(this.metroButton1);
     this.Controls.Add(this.metroTextBox1);
     this.Name = "EditForm";
     this.Text = "Edit";
     this.ResumeLayout(false);
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmDerivacion));
     this.dgvDerivaciones = new MetroFramework.Controls.MetroGrid();
     this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
     this.txtPaciente = new MetroFramework.Controls.MetroTextBox();
     this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
     this.metroLabel3 = new MetroFramework.Controls.MetroLabel();
     this.metroLabel4 = new MetroFramework.Controls.MetroLabel();
     this.metroLabel5 = new MetroFramework.Controls.MetroLabel();
     this.txtHistoria = new MetroFramework.Controls.MetroTextBox();
     this.gbDerivacion = new System.Windows.Forms.GroupBox();
     this.btnCancelar = new MetroFramework.Controls.MetroButton();
     this.btnGuardar = new MetroFramework.Controls.MetroButton();
     this.dtpFecha = new MetroFramework.Controls.MetroDateTime();
     this.metroLabel6 = new MetroFramework.Controls.MetroLabel();
     this.txtCie = new MetroFramework.Controls.MetroTextBox();
     this.metroTextBox1 = new MetroFramework.Controls.MetroTextBox();
     this.txtEspecialidad = new MetroFramework.Controls.MetroTextBox();
     this.txtEESS = new MetroFramework.Controls.MetroTextBox();
     this.txtdcie = new MetroFramework.Controls.MetroTextBox();
     this.metroLabel7 = new MetroFramework.Controls.MetroLabel();
     this.btnNuevo = new MetroFramework.Controls.MetroButton();
     this.btnSalir = new MetroFramework.Controls.MetroButton();
     this.mtFiltro = new MetroFramework.Controls.MetroGrid();
     ((System.ComponentModel.ISupportInitialize)(this.dgvDerivaciones)).BeginInit();
     this.gbDerivacion.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.mtFiltro)).BeginInit();
     this.SuspendLayout();
     //
     // dgvDerivaciones
     //
     this.dgvDerivaciones.AllowUserToResizeRows = false;
     this.dgvDerivaciones.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     this.dgvDerivaciones.BorderStyle = System.Windows.Forms.BorderStyle.None;
     this.dgvDerivaciones.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
     this.dgvDerivaciones.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
     dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219)))));
     dataGridViewCellStyle1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
     dataGridViewCellStyle1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219)))));
     dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
     dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
     this.dgvDerivaciones.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
     this.dgvDerivaciones.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     dataGridViewCellStyle2.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
     dataGridViewCellStyle2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(136)))), ((int)(((byte)(136)))), ((int)(((byte)(136)))));
     dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219)))));
     dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
     dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
     this.dgvDerivaciones.DefaultCellStyle = dataGridViewCellStyle2;
     this.dgvDerivaciones.EnableHeadersVisualStyles = false;
     this.dgvDerivaciones.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
     this.dgvDerivaciones.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     this.dgvDerivaciones.Location = new System.Drawing.Point(24, 107);
     this.dgvDerivaciones.Name = "dgvDerivaciones";
     this.dgvDerivaciones.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
     dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219)))));
     dataGridViewCellStyle3.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
     dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219)))));
     dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
     dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
     this.dgvDerivaciones.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
     this.dgvDerivaciones.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
     this.dgvDerivaciones.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
     this.dgvDerivaciones.Size = new System.Drawing.Size(508, 305);
     this.dgvDerivaciones.TabIndex = 2;
     //
     // metroLabel2
     //
     this.metroLabel2.AutoSize = true;
     this.metroLabel2.FontWeight = MetroFramework.MetroLabelWeight.Bold;
     this.metroLabel2.Location = new System.Drawing.Point(24, 70);
     this.metroLabel2.Name = "metroLabel2";
     this.metroLabel2.Size = new System.Drawing.Size(130, 19);
     this.metroLabel2.TabIndex = 0;
     this.metroLabel2.Text = "N° Historia Clínica";
     //
     // txtPaciente
     //
     this.txtPaciente.Lines = new string[0];
     this.txtPaciente.Location = new System.Drawing.Point(159, 71);
     this.txtPaciente.MaxLength = 32767;
     this.txtPaciente.Name = "txtPaciente";
     this.txtPaciente.PasswordChar = '\0';
     this.txtPaciente.ScrollBars = System.Windows.Forms.ScrollBars.None;
     this.txtPaciente.SelectedText = "";
     this.txtPaciente.Size = new System.Drawing.Size(170, 23);
     this.txtPaciente.TabIndex = 3;
     this.txtPaciente.UseSelectable = true;
     //
     // metroLabel1
     //
     this.metroLabel1.AutoSize = true;
     this.metroLabel1.FontWeight = MetroFramework.MetroLabelWeight.Bold;
     this.metroLabel1.Location = new System.Drawing.Point(11, 35);
     this.metroLabel1.Name = "metroLabel1";
     this.metroLabel1.Size = new System.Drawing.Size(82, 19);
     this.metroLabel1.TabIndex = 0;
     this.metroLabel1.Text = "N° Historia";
     //
     // metroLabel3
     //
     this.metroLabel3.AutoSize = true;
     this.metroLabel3.FontWeight = MetroFramework.MetroLabelWeight.Bold;
     this.metroLabel3.Location = new System.Drawing.Point(11, 156);
     this.metroLabel3.Name = "metroLabel3";
     this.metroLabel3.Size = new System.Drawing.Size(92, 19);
     this.metroLabel3.TabIndex = 0;
     this.metroLabel3.Text = "Especialidad";
     //
     // metroLabel4
     //
     this.metroLabel4.AutoSize = true;
     this.metroLabel4.FontWeight = MetroFramework.MetroLabelWeight.Bold;
     this.metroLabel4.Location = new System.Drawing.Point(11, 79);
     this.metroLabel4.Name = "metroLabel4";
     this.metroLabel4.Size = new System.Drawing.Size(88, 19);
     this.metroLabel4.TabIndex = 0;
     this.metroLabel4.Text = "Diagnóstico";
     //
     // metroLabel5
     //
     this.metroLabel5.AutoSize = true;
     this.metroLabel5.FontWeight = MetroFramework.MetroLabelWeight.Bold;
     this.metroLabel5.Location = new System.Drawing.Point(11, 118);
     this.metroLabel5.Name = "metroLabel5";
     this.metroLabel5.Size = new System.Drawing.Size(99, 19);
     this.metroLabel5.TabIndex = 0;
     this.metroLabel5.Text = "Centro Salud ";
     //
     // txtHistoria
     //
     this.txtHistoria.Lines = new string[0];
     this.txtHistoria.Location = new System.Drawing.Point(117, 35);
     this.txtHistoria.MaxLength = 32767;
     this.txtHistoria.Name = "txtHistoria";
     this.txtHistoria.PasswordChar = '\0';
     this.txtHistoria.ScrollBars = System.Windows.Forms.ScrollBars.None;
     this.txtHistoria.SelectedText = "";
     this.txtHistoria.Size = new System.Drawing.Size(118, 23);
     this.txtHistoria.TabIndex = 4;
     this.txtHistoria.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
     this.txtHistoria.UseSelectable = true;
     //
     // gbDerivacion
     //
     this.gbDerivacion.Controls.Add(this.btnCancelar);
     this.gbDerivacion.Controls.Add(this.btnGuardar);
     this.gbDerivacion.Controls.Add(this.dtpFecha);
     this.gbDerivacion.Controls.Add(this.metroLabel6);
     this.gbDerivacion.Controls.Add(this.txtCie);
     this.gbDerivacion.Controls.Add(this.metroTextBox1);
     this.gbDerivacion.Controls.Add(this.txtEspecialidad);
     this.gbDerivacion.Controls.Add(this.txtEESS);
     this.gbDerivacion.Controls.Add(this.txtdcie);
     this.gbDerivacion.Controls.Add(this.txtHistoria);
     this.gbDerivacion.Controls.Add(this.metroLabel1);
     this.gbDerivacion.Controls.Add(this.metroLabel7);
     this.gbDerivacion.Controls.Add(this.metroLabel3);
     this.gbDerivacion.Controls.Add(this.metroLabel5);
     this.gbDerivacion.Controls.Add(this.metroLabel4);
     this.gbDerivacion.Font = new System.Drawing.Font("Lucida Console", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.gbDerivacion.Location = new System.Drawing.Point(538, 54);
     this.gbDerivacion.Name = "gbDerivacion";
     this.gbDerivacion.Size = new System.Drawing.Size(511, 358);
     this.gbDerivacion.TabIndex = 5;
     this.gbDerivacion.TabStop = false;
     this.gbDerivacion.Text = "DERIVACION";
     //
     // btnCancelar
     //
     this.btnCancelar.BackgroundImage = global::SeguroIntegral.Escritorio.Properties.Resources.cancel;
     this.btnCancelar.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
     this.btnCancelar.FontSize = MetroFramework.MetroButtonSize.Medium;
     this.btnCancelar.Location = new System.Drawing.Point(378, 295);
     this.btnCancelar.Name = "btnCancelar";
     this.btnCancelar.Size = new System.Drawing.Size(119, 31);
     this.btnCancelar.TabIndex = 6;
     this.btnCancelar.Text = "&CANCELAR";
     this.btnCancelar.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.btnCancelar.UseSelectable = true;
     //
     // btnGuardar
     //
     this.btnGuardar.BackgroundImage = global::SeguroIntegral.Escritorio.Properties.Resources.save;
     this.btnGuardar.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
     this.btnGuardar.FontSize = MetroFramework.MetroButtonSize.Medium;
     this.btnGuardar.Location = new System.Drawing.Point(11, 295);
     this.btnGuardar.Name = "btnGuardar";
     this.btnGuardar.Size = new System.Drawing.Size(107, 31);
     this.btnGuardar.TabIndex = 6;
     this.btnGuardar.Text = "&GRABAR";
     this.btnGuardar.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.btnGuardar.UseSelectable = true;
     //
     // dtpFecha
     //
     this.dtpFecha.FontWeight = MetroFramework.MetroDateTimeWeight.Bold;
     this.dtpFecha.Format = System.Windows.Forms.DateTimePickerFormat.Short;
     this.dtpFecha.Location = new System.Drawing.Point(312, 29);
     this.dtpFecha.MinimumSize = new System.Drawing.Size(0, 29);
     this.dtpFecha.Name = "dtpFecha";
     this.dtpFecha.Size = new System.Drawing.Size(151, 29);
     this.dtpFecha.TabIndex = 6;
     //
     // metroLabel6
     //
     this.metroLabel6.AutoSize = true;
     this.metroLabel6.FontWeight = MetroFramework.MetroLabelWeight.Bold;
     this.metroLabel6.Location = new System.Drawing.Point(259, 35);
     this.metroLabel6.Name = "metroLabel6";
     this.metroLabel6.Size = new System.Drawing.Size(47, 19);
     this.metroLabel6.TabIndex = 5;
     this.metroLabel6.Text = "Fecha";
     //
     // txtCie
     //
     this.txtCie.Lines = new string[0];
     this.txtCie.Location = new System.Drawing.Point(117, 75);
     this.txtCie.MaxLength = 32767;
     this.txtCie.Name = "txtCie";
     this.txtCie.PasswordChar = '\0';
     this.txtCie.ScrollBars = System.Windows.Forms.ScrollBars.None;
     this.txtCie.SelectedText = "";
     this.txtCie.Size = new System.Drawing.Size(62, 23);
     this.txtCie.TabIndex = 4;
     this.txtCie.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
     this.txtCie.UseSelectable = true;
     this.txtCie.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtCie_KeyDown);
     //
     // metroTextBox1
     //
     this.metroTextBox1.Lines = new string[0];
     this.metroTextBox1.Location = new System.Drawing.Point(117, 190);
     this.metroTextBox1.MaxLength = 32767;
     this.metroTextBox1.Multiline = true;
     this.metroTextBox1.Name = "metroTextBox1";
     this.metroTextBox1.PasswordChar = '\0';
     this.metroTextBox1.ScrollBars = System.Windows.Forms.ScrollBars.None;
     this.metroTextBox1.SelectedText = "";
     this.metroTextBox1.Size = new System.Drawing.Size(380, 84);
     this.metroTextBox1.TabIndex = 4;
     this.metroTextBox1.UseSelectable = true;
     //
     // txtEspecialidad
     //
     this.txtEspecialidad.Lines = new string[0];
     this.txtEspecialidad.Location = new System.Drawing.Point(117, 152);
     this.txtEspecialidad.MaxLength = 32767;
     this.txtEspecialidad.Name = "txtEspecialidad";
     this.txtEspecialidad.PasswordChar = '\0';
     this.txtEspecialidad.ScrollBars = System.Windows.Forms.ScrollBars.None;
     this.txtEspecialidad.SelectedText = "";
     this.txtEspecialidad.Size = new System.Drawing.Size(380, 23);
     this.txtEspecialidad.TabIndex = 4;
     this.txtEspecialidad.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
     this.txtEspecialidad.UseSelectable = true;
     //
     // txtEESS
     //
     this.txtEESS.Lines = new string[0];
     this.txtEESS.Location = new System.Drawing.Point(117, 114);
     this.txtEESS.MaxLength = 32767;
     this.txtEESS.Name = "txtEESS";
     this.txtEESS.PasswordChar = '\0';
     this.txtEESS.ScrollBars = System.Windows.Forms.ScrollBars.None;
     this.txtEESS.SelectedText = "";
     this.txtEESS.Size = new System.Drawing.Size(380, 23);
     this.txtEESS.TabIndex = 4;
     this.txtEESS.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
     this.txtEESS.UseSelectable = true;
     //
     // txtdcie
     //
     this.txtdcie.Lines = new string[0];
     this.txtdcie.Location = new System.Drawing.Point(185, 75);
     this.txtdcie.MaxLength = 32767;
     this.txtdcie.Name = "txtdcie";
     this.txtdcie.PasswordChar = '\0';
     this.txtdcie.ScrollBars = System.Windows.Forms.ScrollBars.None;
     this.txtdcie.SelectedText = "";
     this.txtdcie.Size = new System.Drawing.Size(312, 23);
     this.txtdcie.TabIndex = 4;
     this.txtdcie.UseSelectable = true;
     //
     // metroLabel7
     //
     this.metroLabel7.AutoSize = true;
     this.metroLabel7.FontWeight = MetroFramework.MetroLabelWeight.Bold;
     this.metroLabel7.Location = new System.Drawing.Point(11, 190);
     this.metroLabel7.Name = "metroLabel7";
     this.metroLabel7.Size = new System.Drawing.Size(107, 19);
     this.metroLabel7.TabIndex = 0;
     this.metroLabel7.Text = "Observaciones";
     //
     // btnNuevo
     //
     this.btnNuevo.BackgroundImage = global::SeguroIntegral.Escritorio.Properties.Resources._new;
     this.btnNuevo.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
     this.btnNuevo.FontSize = MetroFramework.MetroButtonSize.Medium;
     this.btnNuevo.Location = new System.Drawing.Point(335, 63);
     this.btnNuevo.Name = "btnNuevo";
     this.btnNuevo.Size = new System.Drawing.Size(86, 31);
     this.btnNuevo.TabIndex = 6;
     this.btnNuevo.Text = "&NUEVO";
     this.btnNuevo.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.btnNuevo.UseSelectable = true;
     this.btnNuevo.Click += new System.EventHandler(this.btnNuevo_Click);
     //
     // btnSalir
     //
     this.btnSalir.BackgroundImage = global::SeguroIntegral.Escritorio.Properties.Resources.close;
     this.btnSalir.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
     this.btnSalir.FontSize = MetroFramework.MetroButtonSize.Medium;
     this.btnSalir.Location = new System.Drawing.Point(443, 63);
     this.btnSalir.Name = "btnSalir";
     this.btnSalir.Size = new System.Drawing.Size(89, 31);
     this.btnSalir.TabIndex = 6;
     this.btnSalir.Text = "&SALIR";
     this.btnSalir.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     this.btnSalir.UseSelectable = true;
     //
     // mtFiltro
     //
     this.mtFiltro.AllowUserToResizeRows = false;
     this.mtFiltro.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     this.mtFiltro.BorderStyle = System.Windows.Forms.BorderStyle.None;
     this.mtFiltro.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
     this.mtFiltro.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
     dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219)))));
     dataGridViewCellStyle4.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
     dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219)))));
     dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
     dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
     this.mtFiltro.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
     this.mtFiltro.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     dataGridViewCellStyle5.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
     dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(136)))), ((int)(((byte)(136)))), ((int)(((byte)(136)))));
     dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219)))));
     dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
     dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
     this.mtFiltro.DefaultCellStyle = dataGridViewCellStyle5;
     this.mtFiltro.EnableHeadersVisualStyles = false;
     this.mtFiltro.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
     this.mtFiltro.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     this.mtFiltro.Location = new System.Drawing.Point(538, 446);
     this.mtFiltro.Name = "mtFiltro";
     this.mtFiltro.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
     dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219)))));
     dataGridViewCellStyle6.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
     dataGridViewCellStyle6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(219)))));
     dataGridViewCellStyle6.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
     dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
     this.mtFiltro.RowHeadersDefaultCellStyle = dataGridViewCellStyle6;
     this.mtFiltro.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
     this.mtFiltro.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
     this.mtFiltro.Size = new System.Drawing.Size(491, 150);
     this.mtFiltro.TabIndex = 7;
     //
     // frmDerivacion
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
     this.BackImage = global::SeguroIntegral.Escritorio.Properties.Resources.GitHub_Mark;
     this.BackImagePadding = new System.Windows.Forms.Padding(350, 15, 0, 0);
     this.BackMaxSize = 45;
     this.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle;
     this.ClientSize = new System.Drawing.Size(1067, 456);
     this.Controls.Add(this.mtFiltro);
     this.Controls.Add(this.btnSalir);
     this.Controls.Add(this.btnNuevo);
     this.Controls.Add(this.txtPaciente);
     this.Controls.Add(this.dgvDerivaciones);
     this.Controls.Add(this.metroLabel2);
     this.Controls.Add(this.gbDerivacion);
     this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.MaximizeBox = false;
     this.Name = "frmDerivacion";
     this.Text = "DERIVACION  PACIENTE EE.SS";
     ((System.ComponentModel.ISupportInitialize)(this.dgvDerivaciones)).EndInit();
     this.gbDerivacion.ResumeLayout(false);
     this.gbDerivacion.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.mtFiltro)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     this.secretCodeField = new MetroFramework.Controls.MetroTextBox();
     this.step1Label = new MetroFramework.Controls.MetroLabel();
     this.okButton = new MetroFramework.Controls.MetroButton();
     this.cancelButton = new MetroFramework.Controls.MetroButton();
     this.nameLabel = new MetroFramework.Controls.MetroLabel();
     this.nameField = new MetroFramework.Controls.MetroTextBox();
     this.step2Label = new MetroFramework.Controls.MetroLabel();
     this.verifyButton = new MetroFramework.Controls.MetroButton();
     this.codeProgress = new System.Windows.Forms.ProgressBar();
     this.codeField = new WinAuth.SecretTextBox();
     this.step4Label = new MetroFramework.Controls.MetroLabel();
     this.timer = new System.Windows.Forms.Timer(this.components);
     this.step3Label = new MetroFramework.Controls.MetroLabel();
     this.timeBasedRadio = new MetroFramework.Controls.MetroRadioButton();
     this.counterBasedRadio = new MetroFramework.Controls.MetroRadioButton();
     this.timeBasedPanel = new System.Windows.Forms.Panel();
     this.counterBasedPanel = new System.Windows.Forms.Panel();
     this.verifyCounterButton = new MetroFramework.Controls.MetroButton();
     this.counterField = new MetroFramework.Controls.MetroTextBox();
     this.step3CounterLabel = new MetroFramework.Controls.MetroLabel();
     this.secretCodeButton = new MetroFramework.Controls.MetroButton();
     this.timeBasedPanel.SuspendLayout();
     this.counterBasedPanel.SuspendLayout();
     this.SuspendLayout();
     //
     // secretCodeField
     //
     this.secretCodeField.AllowDrop = true;
     this.secretCodeField.CausesValidation = false;
     this.secretCodeField.Location = new System.Drawing.Point(43, 171);
     this.secretCodeField.MaxLength = 32767;
     this.secretCodeField.Name = "secretCodeField";
     this.secretCodeField.PasswordChar = '\0';
     this.secretCodeField.ScrollBars = System.Windows.Forms.ScrollBars.None;
     this.secretCodeField.SelectedText = "";
     this.secretCodeField.Size = new System.Drawing.Size(311, 22);
     this.secretCodeField.TabIndex = 1;
     this.secretCodeField.UseSelectable = true;
     //
     // step1Label
     //
     this.step1Label.Location = new System.Drawing.Point(25, 120);
     this.step1Label.Name = "step1Label";
     this.step1Label.Size = new System.Drawing.Size(425, 48);
     this.step1Label.TabIndex = 1;
     this.step1Label.Text = "1. Enter the Secret Code for your authenticator. Spaces don\'t matter. If you have a Q" +
     "R code, you can paste the URL of the image instead.\r\n";
     //
     // okButton
     //
     this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
     this.okButton.Location = new System.Drawing.Point(292, 470);
     this.okButton.Name = "okButton";
     this.okButton.Size = new System.Drawing.Size(75, 23);
     this.okButton.TabIndex = 6;
     this.okButton.Text = "OK";
     this.okButton.UseSelectable = true;
     this.okButton.Click += new System.EventHandler(this.okButton_Click);
     //
     // cancelButton
     //
     this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     this.cancelButton.Location = new System.Drawing.Point(373, 470);
     this.cancelButton.Name = "cancelButton";
     this.cancelButton.Size = new System.Drawing.Size(75, 23);
     this.cancelButton.TabIndex = 7;
     this.cancelButton.Text = "Cancel";
     this.cancelButton.UseSelectable = true;
     this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
     //
     // nameLabel
     //
     this.nameLabel.AutoSize = true;
     this.nameLabel.Location = new System.Drawing.Point(23, 70);
     this.nameLabel.Name = "nameLabel";
     this.nameLabel.Size = new System.Drawing.Size(48, 19);
     this.nameLabel.TabIndex = 3;
     this.nameLabel.Text = "Name:";
     //
     // nameField
     //
     this.nameField.Location = new System.Drawing.Point(77, 67);
     this.nameField.MaxLength = 32767;
     this.nameField.Name = "nameField";
     this.nameField.PasswordChar = '\0';
     this.nameField.ScrollBars = System.Windows.Forms.ScrollBars.None;
     this.nameField.SelectedText = "";
     this.nameField.Size = new System.Drawing.Size(371, 22);
     this.nameField.TabIndex = 0;
     this.nameField.UseSelectable = true;
     //
     // step2Label
     //
     this.step2Label.Location = new System.Drawing.Point(25, 213);
     this.step2Label.Name = "step2Label";
     this.step2Label.Size = new System.Drawing.Size(423, 49);
     this.step2Label.TabIndex = 10;
     this.step2Label.Text = "2. Choose if this is a time-based or a counter-based authenticator. If you don\'t " +
     "know, it\'s likely time-based, so just leave the default choice.";
     //
     // verifyButton
     //
     this.verifyButton.Location = new System.Drawing.Point(122, 43);
     this.verifyButton.Name = "verifyButton";
     this.verifyButton.Size = new System.Drawing.Size(158, 23);
     this.verifyButton.TabIndex = 0;
     this.verifyButton.Text = "Verify Authenticator";
     this.verifyButton.UseSelectable = true;
     this.verifyButton.Click += new System.EventHandler(this.verifyButton_Click);
     //
     // codeProgress
     //
     this.codeProgress.Location = new System.Drawing.Point(124, 433);
     this.codeProgress.Maximum = 30;
     this.codeProgress.Minimum = 1;
     this.codeProgress.Name = "codeProgress";
     this.codeProgress.Size = new System.Drawing.Size(158, 8);
     this.codeProgress.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
     this.codeProgress.TabIndex = 13;
     this.codeProgress.Value = 1;
     this.codeProgress.Visible = false;
     //
     // codeField
     //
     this.codeField.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F);
     this.codeField.Location = new System.Drawing.Point(124, 405);
     this.codeField.Multiline = true;
     this.codeField.Name = "codeField";
     this.codeField.SecretMode = false;
     this.codeField.Size = new System.Drawing.Size(158, 26);
     this.codeField.SpaceOut = 3;
     this.codeField.TabIndex = 5;
     //
     // step4Label
     //
     this.step4Label.AutoSize = true;
     this.step4Label.Location = new System.Drawing.Point(25, 373);
     this.step4Label.Name = "step4Label";
     this.step4Label.Size = new System.Drawing.Size(293, 19);
     this.step4Label.TabIndex = 11;
     this.step4Label.Text = "4. Verify the following code matches your service.";
     //
     // timer
     //
     this.timer.Enabled = true;
     this.timer.Interval = 500;
     this.timer.Tick += new System.EventHandler(this.timer_Tick);
     //
     // step3Label
     //
     this.step3Label.Location = new System.Drawing.Point(23, 12);
     this.step3Label.Name = "step3Label";
     this.step3Label.Size = new System.Drawing.Size(423, 28);
     this.step3Label.TabIndex = 10;
     this.step3Label.Text = "3. Click the Verify button to check the first code.";
     //
     // timeBasedRadio
     //
     this.timeBasedRadio.AutoSize = true;
     this.timeBasedRadio.Checked = true;
     this.timeBasedRadio.Location = new System.Drawing.Point(43, 265);
     this.timeBasedRadio.Name = "timeBasedRadio";
     this.timeBasedRadio.Size = new System.Drawing.Size(86, 15);
     this.timeBasedRadio.TabIndex = 3;
     this.timeBasedRadio.TabStop = true;
     this.timeBasedRadio.Text = "Time-based";
     this.timeBasedRadio.UseSelectable = true;
     this.timeBasedRadio.CheckedChanged += new System.EventHandler(this.timeBasedRadio_CheckedChanged);
     //
     // counterBasedRadio
     //
     this.counterBasedRadio.AutoSize = true;
     this.counterBasedRadio.Location = new System.Drawing.Point(146, 265);
     this.counterBasedRadio.Name = "counterBasedRadio";
     this.counterBasedRadio.Size = new System.Drawing.Size(102, 15);
     this.counterBasedRadio.TabIndex = 4;
     this.counterBasedRadio.Text = "Counter-based";
     this.counterBasedRadio.UseSelectable = true;
     this.counterBasedRadio.CheckedChanged += new System.EventHandler(this.counterBasedRadio_CheckedChanged);
     //
     // timeBasedPanel
     //
     this.timeBasedPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.timeBasedPanel.Controls.Add(this.step3Label);
     this.timeBasedPanel.Controls.Add(this.verifyButton);
     this.timeBasedPanel.Location = new System.Drawing.Point(2, 286);
     this.timeBasedPanel.Name = "timeBasedPanel";
     this.timeBasedPanel.Size = new System.Drawing.Size(464, 84);
     this.timeBasedPanel.TabIndex = 15;
     //
     // counterBasedPanel
     //
     this.counterBasedPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.counterBasedPanel.Controls.Add(this.verifyCounterButton);
     this.counterBasedPanel.Controls.Add(this.counterField);
     this.counterBasedPanel.Controls.Add(this.step3CounterLabel);
     this.counterBasedPanel.Location = new System.Drawing.Point(2, 286);
     this.counterBasedPanel.Name = "counterBasedPanel";
     this.counterBasedPanel.Size = new System.Drawing.Size(464, 84);
     this.counterBasedPanel.TabIndex = 16;
     this.counterBasedPanel.Visible = false;
     //
     // verifyCounterButton
     //
     this.verifyCounterButton.Location = new System.Drawing.Point(207, 58);
     this.verifyCounterButton.Name = "verifyCounterButton";
     this.verifyCounterButton.Size = new System.Drawing.Size(158, 23);
     this.verifyCounterButton.TabIndex = 1;
     this.verifyCounterButton.Text = "Verify Authenticator";
     this.verifyCounterButton.UseSelectable = true;
     this.verifyCounterButton.Click += new System.EventHandler(this.verifyButton_Click);
     //
     // counterField
     //
     this.counterField.AllowDrop = true;
     this.counterField.CausesValidation = false;
     this.counterField.Location = new System.Drawing.Point(122, 58);
     this.counterField.MaxLength = 32767;
     this.counterField.Name = "counterField";
     this.counterField.PasswordChar = '\0';
     this.counterField.ScrollBars = System.Windows.Forms.ScrollBars.None;
     this.counterField.SelectedText = "";
     this.counterField.Size = new System.Drawing.Size(74, 20);
     this.counterField.TabIndex = 0;
     this.counterField.UseSelectable = true;
     //
     // step3CounterLabel
     //
     this.step3CounterLabel.Location = new System.Drawing.Point(23, 12);
     this.step3CounterLabel.Name = "step3CounterLabel";
     this.step3CounterLabel.Size = new System.Drawing.Size(423, 43);
     this.step3CounterLabel.TabIndex = 10;
     this.step3CounterLabel.Text = "3. Enter the initial counter value if known. Click the Verify button that will sh" +
     "ow the last code that was used.";
     //
     // secretCodeButton
     //
     this.secretCodeButton.Location = new System.Drawing.Point(360, 171);
     this.secretCodeButton.Name = "secretCodeButton";
     this.secretCodeButton.Size = new System.Drawing.Size(75, 23);
     this.secretCodeButton.TabIndex = 2;
     this.secretCodeButton.Text = "Decode";
     this.secretCodeButton.UseSelectable = true;
     this.secretCodeButton.Click += new System.EventHandler(this.secretCodeButton_Click);
     //
     // AddAuthenticator
     //
     this.AcceptButton = this.okButton;
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle;
     this.CancelButton = this.cancelButton;
     this.ClientSize = new System.Drawing.Size(471, 516);
     this.Controls.Add(this.secretCodeButton);
     this.Controls.Add(this.counterBasedPanel);
     this.Controls.Add(this.timeBasedPanel);
     this.Controls.Add(this.counterBasedRadio);
     this.Controls.Add(this.timeBasedRadio);
     this.Controls.Add(this.codeProgress);
     this.Controls.Add(this.codeField);
     this.Controls.Add(this.step4Label);
     this.Controls.Add(this.step2Label);
     this.Controls.Add(this.cancelButton);
     this.Controls.Add(this.okButton);
     this.Controls.Add(this.secretCodeField);
     this.Controls.Add(this.nameLabel);
     this.Controls.Add(this.nameField);
     this.Controls.Add(this.step1Label);
     this.MaximizeBox = false;
     this.Name = "AddAuthenticator";
     this.Resizable = false;
     this.ShowIcon = false;
     this.Text = "Add Authenticator";
     this.Load += new System.EventHandler(this.AddAuthenticator_Load);
     this.timeBasedPanel.ResumeLayout(false);
     this.counterBasedPanel.ResumeLayout(false);
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Example #34
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
     this.txtVertice = new MetroFramework.Controls.MetroTextBox();
     this.btnCancelar = new MetroFramework.Controls.MetroButton();
     this.btnAceptar = new MetroFramework.Controls.MetroButton();
     this.VerticeStyleManager = new MetroFramework.Components.MetroStyleManager(this.components);
     ((System.ComponentModel.ISupportInitialize)(this.VerticeStyleManager)).BeginInit();
     this.SuspendLayout();
     //
     // metroLabel1
     //
     this.metroLabel1.AutoSize = true;
     this.metroLabel1.FontSize = MetroFramework.MetroLabelSize.Tall;
     this.metroLabel1.Location = new System.Drawing.Point(23, 67);
     this.metroLabel1.Name = "metroLabel1";
     this.metroLabel1.Size = new System.Drawing.Size(162, 25);
     this.metroLabel1.TabIndex = 12;
     this.metroLabel1.Text = "Valor nuevo vertice:";
     this.metroLabel1.UseStyleColors = true;
     //
     // txtVertice
     //
     //
     //
     //
     this.txtVertice.CustomButton.Image = null;
     this.txtVertice.CustomButton.Location = new System.Drawing.Point(71, 2);
     this.txtVertice.CustomButton.Name = "";
     this.txtVertice.CustomButton.Size = new System.Drawing.Size(23, 23);
     this.txtVertice.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
     this.txtVertice.CustomButton.TabIndex = 1;
     this.txtVertice.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
     this.txtVertice.CustomButton.UseSelectable = true;
     this.txtVertice.CustomButton.Visible = false;
     this.txtVertice.FontSize = MetroFramework.MetroTextBoxSize.Tall;
     this.txtVertice.Lines = new string[0];
     this.txtVertice.Location = new System.Drawing.Point(189, 65);
     this.txtVertice.MaxLength = 32767;
     this.txtVertice.Name = "txtVertice";
     this.txtVertice.PasswordChar = '\0';
     this.txtVertice.PromptText = "#";
     this.txtVertice.ScrollBars = System.Windows.Forms.ScrollBars.None;
     this.txtVertice.SelectedText = "";
     this.txtVertice.SelectionLength = 0;
     this.txtVertice.SelectionStart = 0;
     this.txtVertice.ShortcutsEnabled = true;
     this.txtVertice.Size = new System.Drawing.Size(97, 28);
     this.txtVertice.TabIndex = 11;
     this.txtVertice.UseSelectable = true;
     this.txtVertice.UseStyleColors = true;
     this.txtVertice.WaterMark = "#";
     this.txtVertice.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
     this.txtVertice.WaterMarkFont = new System.Drawing.Font("Segoe UI", 14.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.txtVertice.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtVertice_KeyDown);
     //
     // btnCancelar
     //
     this.btnCancelar.FontSize = MetroFramework.MetroButtonSize.Tall;
     this.btnCancelar.Highlight = true;
     this.btnCancelar.Location = new System.Drawing.Point(186, 114);
     this.btnCancelar.Name = "btnCancelar";
     this.btnCancelar.Size = new System.Drawing.Size(100, 23);
     this.btnCancelar.TabIndex = 10;
     this.btnCancelar.Text = "Cancelar";
     this.btnCancelar.UseSelectable = true;
     this.btnCancelar.UseStyleColors = true;
     this.btnCancelar.Click += new System.EventHandler(this.btnCancelar_Click);
     //
     // btnAceptar
     //
     this.btnAceptar.FontSize = MetroFramework.MetroButtonSize.Tall;
     this.btnAceptar.Highlight = true;
     this.btnAceptar.Location = new System.Drawing.Point(23, 114);
     this.btnAceptar.Name = "btnAceptar";
     this.btnAceptar.Size = new System.Drawing.Size(100, 23);
     this.btnAceptar.TabIndex = 9;
     this.btnAceptar.Text = "Aceptar";
     this.btnAceptar.UseSelectable = true;
     this.btnAceptar.UseStyleColors = true;
     this.btnAceptar.Click += new System.EventHandler(this.btnAceptar_Click);
     //
     // VerticeStyleManager
     //
     this.VerticeStyleManager.Owner = this;
     this.VerticeStyleManager.Theme = MetroFramework.MetroThemeStyle.Dark;
     //
     // Vertice
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(309, 158);
     this.Controls.Add(this.metroLabel1);
     this.Controls.Add(this.txtVertice);
     this.Controls.Add(this.btnCancelar);
     this.Controls.Add(this.btnAceptar);
     this.MaximizeBox = false;
     this.MinimizeBox = false;
     this.Name = "Vertice";
     this.Resizable = false;
     this.Text = "Agregar nuevo vertice";
     this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Vertice_FormClosing);
     this.Load += new System.EventHandler(this.Vertice_Load);
     this.Shown += new System.EventHandler(this.Vertice_Shown);
     ((System.ComponentModel.ISupportInitialize)(this.VerticeStyleManager)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Example #35
0
 public void ShowSteamInfo(SteamBot.Bot bot, ulong steamId)
 {
     var steamInfo = new MetroForm();
     var steamInfoTextBox = new MetroFramework.Controls.MetroTextBox();
     steamInfoTextBox.Multiline = true;
     steamInfoTextBox.Dock = DockStyle.Fill;
     steamInfoTextBox.Text = Util.GetSteamIDInfo(bot, steamId);
     steamInfoTextBox.Theme = this.StyleManager.Theme;
     steamInfoTextBox.Style = this.StyleManager.Style;
     steamInfo.Icon = MistClient.Properties.Resources.Icon;
     steamInfo.Width = 435;
     steamInfo.Height = 155;
     steamInfo.MaximizeBox = false;
     steamInfo.MinimizeBox = false;
     steamInfo.Resizable = false;
     steamInfo.Text = "Steam Info";
     steamInfo.Theme = this.StyleManager.Theme;
     steamInfo.Style = this.StyleManager.Style;
     steamInfo.ShadowType = MetroFormShadowType.DropShadow;
     steamInfo.Controls.Add(steamInfoTextBox);
     steamInfo.ShowDialog();
 }
        private void btnAutonomous_Click(object sender, EventArgs e)
        {
            if (lstboxAutonomousChooser.SelectedItem == null || lstboxAutonomousChooser.SelectedItem.ToString().Length == 0) return;
            MetroFramework.Forms.MetroForm autoForm = new MetroFramework.Forms.MetroForm();
            MetroFramework.Controls.MetroPanel p = new MetroFramework.Controls.MetroPanel();
            p.Name = "panel";

            string[] autoParams = autonomousDict[lstboxAutonomousChooser.SelectedItem.ToString()];
            if (autoParams.Length < 2) return;
            for (int i = 1; i < autoParams.Length; i++)
            {
                MetroFramework.Controls.MetroLabel lbl = new MetroFramework.Controls.MetroLabel();
                lbl.Text = autoParams[i].Substring(0, autoParams[i].IndexOf(":"));
                lbl.Location = new Point(10, 30 + 30 * i);
                p.Controls.Add(lbl);
                Control c;
                string ControlText = autoParams[i].Substring(autoParams[i].IndexOf(":") + 1);
                switch (ControlText)
                {
                    case "TextBox":
                        c = new MetroFramework.Controls.MetroTextBox();
                        c.Size = new Size(100, lbl.Height);
                        break;
                    case "CheckBox":
                        c = new MetroFramework.Controls.MetroCheckBox();
                        break;
                    default:
                        MessageBox.Show("Unsupported Control");
                        return;
                }
                c.Location = new Point(10 + lbl.Width, 30 + 30 * i);
                p.Controls.Add(c);
            }
            p.Top = 55;
            p.Width = autoForm.Width;
            p.Height = autoForm.Height - p.Top;
            autoForm.Controls.Add(p);
            autoForm.Text = lstboxAutonomousChooser.SelectedItem.ToString();
            autoForm.PerformLayout();
            autoForm.Show();
            autoForm.FormClosing += autoForm_FormClosing;
        }