private void PropiedadesTextBox(Bunifu.Framework.UI.BunifuMetroTextbox Element, bool Alert) { try { Color BackNormal = SystemColors.Control; Color BackAlerta = Color.FromArgb(253, 238, 135); Color BorderNormal = Color.FromArgb(211, 162, 25); Color BorderAlerta = Color.FromArgb(91, 91, 91); if (Alert) { Element.BackColor = BackAlerta; Element.BorderColorFocused = BorderAlerta; Element.BorderColorMouseHover = BorderAlerta; } else { Element.BackColor = BackNormal; Element.BorderColorFocused = BorderNormal; Element.BorderColorMouseHover = BorderNormal; } } catch { } }
//validation public void Regexp(string re, Bunifu.Framework.UI.BunifuMetroTextbox tb, PictureBox pc, string s) { ToolTip n = new ToolTip(); Regex regex = new Regex(re); if (!regex.IsMatch(tb.Text)) { pc.Image = inventory.Properties.Resources.invalid; //leaving form n.SetToolTip(pictureBox18, "Please include only Integer values"); //employee management n.SetToolTip(pictureBox11, "Please include your full name"); n.SetToolTip(pictureBox12, "Please include your name with initial "); n.SetToolTip(pictureBox13, "Please include your address"); n.SetToolTip(pictureBox8, "Please include only integer values with correct length in your phone"); n.SetToolTip(pictureBox8, "Please include only integer values with correct length in your phone"); n.SetToolTip(pictureBox10, "Please include correct values in your NIC"); n.SetToolTip(pictureBox1, "Please include @ , . in your email."); //salary n.SetToolTip(pictureBox21, "Please include employee id"); n.SetToolTip(pictureBox22, "Please include position"); cat = false; } else { pc.Image = null; } }
public Form1() { InitializeComponent(); // // bunifuMetroTextbox1 // txtprueba = new Bunifu.Framework.UI.BunifuMetroTextbox(); txtprueba.BorderColorFocused = System.Drawing.Color.Blue; txtprueba.BorderColorIdle = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); txtprueba.BorderColorMouseHover = System.Drawing.Color.Blue; txtprueba.BorderThickness = 3; txtprueba.Cursor = System.Windows.Forms.Cursors.IBeam; txtprueba.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); txtprueba.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); txtprueba.isPassword = false; txtprueba.Location = new System.Drawing.Point(53, 156); txtprueba.Margin = new System.Windows.Forms.Padding(4); txtprueba.Name = "bunifuMetroTextbox1"; txtprueba.Size = new System.Drawing.Size(370, 64); txtprueba.TabIndex = 5; txtprueba.Text = "s"; txtprueba.TextAlign = System.Windows.Forms.HorizontalAlignment.Left; // this.Controls.Add(this.txtprueba); }
private void bmt_sifre_Leave(object sender, EventArgs e) { string isim = ""; Bunifu.Framework.UI.BunifuMetroTextbox gelen = (sender as Bunifu.Framework.UI.BunifuMetroTextbox); isim = gelen.Name; if (gelen.Text == "") { if (gelen.Name == "bmt_sifre") { bmt_sifre.Text = "Personel Şifreniz"; bmt_sifre.isPassword = false; } else if (gelen.Name == "bmt_eposta") { bmt_eposta.Text = "E-posta Adresiniz"; } else if (gelen.Name == "bmt_personelsifre") { bmt_yoneticisifre.Text = "Şifreniz"; bmt_yoneticisifre.isPassword = false; } } }
private void setTextboxText(Bunifu.Framework.UI.BunifuMetroTextbox tb, string txt) { tb.Invoke((MethodInvoker)(() => { tb.Text = txt; })); }
public static void AddPlaceHolderB(Bunifu.Framework.UI.BunifuMetroTextbox tb, string placeHolderText) { if (tb.Text == "" || tb.Text == null) { tb.ForeColor = Color.DarkGray; tb.Text = placeHolderText; } }
public static void RemovePlaceHolderB(Bunifu.Framework.UI.BunifuMetroTextbox tb, string placeHolderText) { if (tb.Text != null && tb.Text == placeHolderText) { tb.Text = ""; tb.ForeColor = Color.Black; } }
public void checkLenght(Bunifu.Framework.UI.BunifuMetroTextbox txt, int maxlenght) { if (txt.Text.Length >= maxlenght) { txt.Enabled = false; txt.Enabled = true; } }
private void Txb_Leave(object sender, EventArgs e) { Bunifu.Framework.UI.BunifuMetroTextbox textbox = sender as Bunifu.Framework.UI.BunifuMetroTextbox; if (textbox.Text == string.Empty) { textbox.Text = textbox.Tag as string; } }
private void bmt_personelad_Enter(object sender, EventArgs e) { Bunifu.Framework.UI.BunifuMetroTextbox gelen = (sender as Bunifu.Framework.UI.BunifuMetroTextbox); string isim = gelen.Name; if (gelen.Name == "Personel Adı") { gelen.Name = ""; } }
private void bmt_masasayisi_Enter(object sender, EventArgs e) { Bunifu.Framework.UI.BunifuMetroTextbox gelen = (sender as Bunifu.Framework.UI.BunifuMetroTextbox); string isim = gelen.Name; if (gelen.Text == "Masa Sayısı") { gelen.Text = ""; } }
public FLOV(Form F, string TN, AltoControls.AltoTextBox TShow, Bunifu.Framework.UI.BunifuMetroTextbox Tid, string OD, string[] col, string cs) { columnsearch = cs; TableName = TN; OrderBy = OD; FormCall = F; TextboxShow2 = TShow; TextboxID = Tid; column = col; InitializeComponent(); }
/* * METODO * Vaida si los TextBox contienen algo dentro */ private bool Validadcion(Bunifu.Framework.UI.BunifuMetroTextbox Box) { if (Box.Text == "" || Box.Text == " " || Box.Text == null) { return(false); } else { return(true); } }
private void BarcodeInputLeave(object sender, EventArgs e) { if (sender.GetType() == typeof(Bunifu.Framework.UI.BunifuMetroTextbox)) { Bunifu.Framework.UI.BunifuMetroTextbox textBox = (Bunifu.Framework.UI.BunifuMetroTextbox)sender; if (textBox.Tag.GetType() == typeof(int)) { BarcodeScanned(textBox.Text, (int)textBox.Tag); } } }
public void SetMaximumLength(Bunifu.Framework.UI.BunifuMetroTextbox metroTextbox, int maximumLength) { foreach (Control ctl in metroTextbox.Controls) { if (ctl.GetType() == typeof(TextBox)) { var txt = (TextBox)ctl; txt.MaxLength = maximumLength; } } }
public static void BunifuBoxHide(Form frm, Bunifu.Framework.UI.BunifuMetroTextbox ctrl, bool text) { if (frm.InvokeRequired) { BunifuBox d = new BunifuBox(BunifuBoxHide); frm.Invoke(d, new object[] { frm, ctrl, text }); } else { ctrl.Visible = text; } }
public static void metrotext(Form frm, Bunifu.Framework.UI.BunifuMetroTextbox ctrl, string text) { if (ctrl.InvokeRequired) { settextmetro d = new settextmetro(metrotext); frm.Invoke(d, new object[] { frm, ctrl, text }); } else { ctrl.Text = text; } }
// function in setting maximum length in copyright year // since bunifu dont support direct maxlength control private void SetMaximumLength(Bunifu.Framework.UI.BunifuMetroTextbox metroTextbox, int maximumLength) { foreach (Control ctl in metroTextbox.Controls) { if (ctl.GetType() == typeof(TextBox)) { var txt = (TextBox)ctl; txt.MaxLength = maximumLength; // Set other properties & events here... } } }
private void bmt_personelad_Leave(object sender, EventArgs e) { Bunifu.Framework.UI.BunifuMetroTextbox gelen = (sender as Bunifu.Framework.UI.BunifuMetroTextbox); string isim = gelen.Name; if (gelen.Text == "") { if (gelen.Name == "bmt_adi") { bmt_personelad.Text = "Personel Adı"; } } }
string collumnSearch;//= "a.Items_Name"; public LOVForm(string SQL, Form F, AltoControls.AltoTextBox TShow, Bunifu.Framework.UI.BunifuMetroTextbox Tid, string cs, string[] coll, string Order) { sql = SQL; formcall = F; text_show = TShow; textId = Tid; collumnSearch = cs; ordercolumn = Order; for (int i = 0; i < coll.Length; i++) { columns[i] = coll[i]; } InitializeComponent(); }
private void bmt_masasayisi_Leave(object sender, EventArgs e) { string isim = ""; Bunifu.Framework.UI.BunifuMetroTextbox gelen = (sender as Bunifu.Framework.UI.BunifuMetroTextbox); isim = gelen.Name; if (gelen.Text == "") { if (gelen.Name == "bmt_sifre") { bmt_masasayisi.Text = "Masa Sayısı"; } } }
public void Regexp4(string re, Bunifu.Framework.UI.BunifuMetroTextbox tb, PictureBox pc, string s) { ToolTip n = new ToolTip(); Regex regex = new Regex(re); if (!regex.IsMatch(tb.Text)) { pc.Image = inventory.Properties.Resources.invalid; n.SetToolTip(picphon, "Phone number should have exactly 10 digits"); c = -99; } else { pc.Image = null; c = 0; } }
public void Regexp1(string re, Bunifu.Framework.UI.BunifuMetroTextbox tb, PictureBox pc, string s) { ToolTip n = new ToolTip(); Regex regex = new Regex(re); if (!regex.IsMatch(tb.Text)) { pc.Image = inventory.Properties.Resources.invalid; n.SetToolTip(p1, "Email Should have @ , . Symbols"); a = -99; } else { pc.Image = null; a = 0; } }
public void Regexp2(string re, Bunifu.Framework.UI.BunifuMetroTextbox tb, PictureBox pc, string s) { ToolTip n = new ToolTip(); Regex regex = new Regex(re); if (!regex.IsMatch(tb.Text)) { pc.Image = inventory.Properties.Resources.invalid; n.SetToolTip(picerror, "NIC should have 9 digits followed with v or x"); a = -99; } else { pc.Image = null; a = 0; } }
public void Regexp(string re, Bunifu.Framework.UI.BunifuMetroTextbox tb, PictureBox pc, string s) { ToolTip buttonToolTip = new ToolTip(); ToolTip n = new ToolTip(); Regex regex = new Regex(re); if (!regex.IsMatch(tb.Text)) { pc.Image = Properties.Resources.invalid; n.SetToolTip(pc, s); status = false; } else { pc.Image = null; } }
//SET TEXTBOX MAXLENGHT private void SetMaxLength(Bunifu.Framework.UI.BunifuMetroTextbox metroTextbox, int maxLength) { try { foreach (Control ctl in metroTextbox.Controls) { if (ctl.GetType() == typeof(TextBox)) { var txt = (TextBox)ctl; txt.MaxLength = maxLength; } } } catch (Exception ex) { MessageBox.Show(ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public void Regexp(string re, Bunifu.Framework.UI.BunifuMetroTextbox tb, PictureBox pc, string s) { ToolTip buttonToolTip = new ToolTip(); ToolTip n = new ToolTip(); Regex regex = new Regex(re); if (!regex.IsMatch(tb.Text)) { pc.Image = inventory.Properties.Resources.invalid; n.SetToolTip(pc, s); z = -99; } else { pc.Image = null; // n.SetToolTip(pc, "valid entry"); z = 1; } }
public void Regexp(string re, Bunifu.Framework.UI.BunifuMetroTextbox tb, PictureBox pc, string s) { ToolTip buttonToolTip = new ToolTip(); ToolTip n = new ToolTip(); Regex regex = new Regex(re); if (regex.IsMatch(tb.Text)) { pc.Image = null; } else { pc.Image = inventory.Properties.Resources.delete_icon; n.SetToolTip(pictureBox1, "Please enter a ten digit phone number."); n.SetToolTip(pictureBox2, "Please include numbers in your nic."); n.SetToolTip(pictureBox3, "Please enter a ten digit phone number."); cat = false; } }
private void bmt_sifre_Enter(object sender, EventArgs e) { Bunifu.Framework.UI.BunifuMetroTextbox gelen = (sender as Bunifu.Framework.UI.BunifuMetroTextbox); string isim = gelen.Name; if (gelen.Text == "Personel Şifreniz") { gelen.Text = ""; bmt_sifre.isPassword = true; } else if (gelen.Text == "E-posta Adresiniz") { gelen.Text = ""; } else if (gelen.Text == "Şifreniz") { gelen.Text = ""; bmt_yoneticisifre.isPassword = true; } }
public void viewCarDetails(Bunifu.Framework.UI.BunifuMetroTextbox box1, Bunifu.Framework.UI.BunifuMetroTextbox box2, Bunifu.Framework.UI.BunifuMetroTextbox box3, Bunifu.Framework.UI.BunifuMetroTextbox box4, ComboBox combobox, PictureBox pBox) { bool check = false; SqlConnection con = new SqlConnection("Data Source=FCIS;Initial Catalog=CarRentalSystem;Integrated Security=True"); con.Open(); SqlCommand cmd = new SqlCommand("select * from Car", con); SqlDataReader rd = cmd.ExecuteReader(); while (rd.Read()) { if (rd[0].ToString() == combobox.SelectedItem.ToString()) { check = true; box1.Text = rd[1].ToString(); box2.Text = rd[2].ToString(); box3.Text = rd[3].ToString(); box4.Text = rd[4].ToString(); if (rd[5] != DBNull.Value) { byte[] img = (byte[])(rd[5]); MemoryStream ms = new MemoryStream(img); pBox.Image = Image.FromStream(ms); } else { pBox = null; } } } if (check == false) { box1.Text = ""; box2.Text = ""; box3.Text = ""; box4.Text = ""; MessageBox.Show("ID does not exise"); } }