本文整理匯總了C#中System.Windows.Forms.TextBox.Equals方法的典型用法代碼示例。如果您正苦於以下問題:C# TextBox.Equals方法的具體用法?C# TextBox.Equals怎麽用?C# TextBox.Equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Forms.TextBox
的用法示例。
在下文中一共展示了TextBox.Equals方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: checkData
private bool checkData(TextBox textBox, Label label)
{
label.Text = "";
if (!textBox.Text.Equals(""))
{
if (textBox.Name.Equals("txtUsuarioModificarNombre") || textBox.Equals("txtUsuarioModificarContrasenia"))
{
if (!Util.todasLetras(textBox.Text))
{
label.Text = "Valor Incorrecto";
return false;
}
}
}
else
{
label.Text = "Vacio";
return false;
}
return true;
}
示例2: txtTime_Click
private void txtTime_Click(object sender, EventArgs e)
{
textBoxCurrent = sender as System.Windows.Forms.TextBox;
if (textBoxCurrent.Equals(txtHour))
{
ucTimeSelector.Items = hours;
}
else if (textBoxCurrent.Equals(txtMinute))
{
ucTimeSelector.Items = minutes;
}
else if (textBoxCurrent.Equals(txtSecond))
{
ucTimeSelector.Items = seconds;
}
else
{
return;
}
popUpControl.Show(textBoxCurrent, false);
textBoxCurrent.Focus();
if (!string.IsNullOrEmpty(textBoxCurrent.Text))
{
ucTimeSelector.SelectedValue = int.Parse(textBoxCurrent.Text);
}
}
示例3: TextBox_Click
private void TextBox_Click(object sender, EventArgs e)
{
m_cCurrentControl = (TextBox)sender;
if (m_cCurrentControl.Equals(PasswordTextBox) || m_cCurrentControl.Equals(ConfirmPassTextBox)) m_bInPassBox = true;
else m_bInPassBox = false;
m_pCursorPosition = Cursor.Current.HotSpot;
m_iSelectionIndex = m_cCurrentControl.SelectionStart;
}