private void ComboType_SelectedIndexChanged(object sender, EventArgs e) { NumCabel = pr.CabelExisting(ComboType.Text.Trim()); if (ComboType.Text.Contains("M")) { ODU.Size = new System.Drawing.Size(51, 20); label6.Text = "ODU"; label5.Text = "Msan"; ODU.Clear(); ODU.Focus(); } else { ODU.Clear(); ODU.Size = new System.Drawing.Size(0, 0); label6.Text = ""; label5.Text = "كابل"; CabinaCabel.Focus(); } }
private void ComboType_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter && ComboType.Text != string.Empty) { NumCabel = pr.CabelExisting(NumCentral.ToString() + ComboType.Text); if (ComboType.Text.Contains("M")) { ODU.Size = new System.Drawing.Size(51, 20); label6.Text = "ODU"; label5.Text = "Msan"; ODU.Focus(); } else { ODU.Size = new System.Drawing.Size(0, 0); label6.Text = ""; label5.Text = "كابل"; CabinaCabel.Focus(); } } }