本文整理匯總了C#中System.Windows.Forms.CheckBox.Equals方法的典型用法代碼示例。如果您正苦於以下問題:C# CheckBox.Equals方法的具體用法?C# CheckBox.Equals怎麽用?C# CheckBox.Equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Forms.CheckBox
的用法示例。
在下文中一共展示了CheckBox.Equals方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: checkBox_CheckedChanged
/*
* this method will analysis the results in check box groups
* and do ccessory calculation for different situation.
*/
private void checkBox_CheckedChanged(object sender, EventArgs e)
{
chekBox = (CheckBox)sender;
if (chekBox.Equals(checkBoxAPP))
{
if (checkBoxAPP.Checked)
accessoriesPrice += ProtectionPlan;
else
{
accessoriesPrice -= ProtectionPlan;
}
}
else if (chekBox.Equals(checkBoxSP))
{
if (checkBoxSP.Checked)
{
accessoriesPrice += ScreenProtector;
}
else
{
accessoriesPrice -= ScreenProtector;
}
}
else if (chekBox.Equals(checkBoxLC))
{
if (checkBoxLC.Checked)
{
accessoriesPrice += LeatherCase;
}
else
{
accessoriesPrice -= LeatherCase;
}
}
else
{
// do nothing
}
}
示例2: OnlyOneCheck
public void OnlyOneCheck(CheckBox[] ckbList, CheckBox ckb)
{
int num2;
int length = ckbList.Length;
bool flag = false;
for (num2 = 0; num2 < length; num2++)
{
if (ckb.Equals(ckbList[num2]))
{
flag = true;
}
}
if (ckb.Checked && flag)
{
for (num2 = 0; num2 < length; num2++)
{
if (!ckb.Equals(ckbList[num2]))
{
ckbList[num2].Checked = false;
ckbList[num2].Enabled = true;
}
}
}
}