日期:2014-05-17 浏览次数:20876 次
public static void OnlyOneSelectAndCray(CheckBox p1, CheckBox p2, CheckBox p3, CheckBox p4)
{
OnlyOneSelectAndCray(p1, p2);
OnlyOneSelectAndCray(p3, p2);
OnlyOneSelectAndCray(p3, p1);
OnlyOneSelectAndCray(p4, p1);
OnlyOneSelectAndCray(p4, p2);
OnlyOneSelectAndCray(p4, p3);
}
public static void OnlyOneSelectAndCray(CheckBox p1, CheckBox p2, CheckBox p3, CheckBox p4, CheckBox p5)
{
OnlyOneSelectAndCray(p1, p2);
OnlyOneSelectAndCray(p3, p2);
OnlyOneSelectAndCray(p3, p1);
OnlyOneSelectAndCray(p4, p1);
OnlyOneSelectAndCray(p4, p2);
OnlyOneSelectAndCray(p4, p3);
OnlyOneSelectAndCray(p5, p1);
OnlyOneSelectAndCray(p5, p2);
OnlyOneSelectAndCray(p5, p3);
OnlyOneSelectAndCray(p5, p4);
}
public static void OnlyOneSelectAndCray(params CheckBox[] p1)
{
for (int i = 0; i < p1.Length; i++)
{
for (int j = i + 1; j < p1.Length; j++)
{
OnlyOneSelectAndCray(p1[i], p1[j]);
}
}
}