public int Hypotest
{
get
{
if (this.chkHypotest.Checked == false)
{
return 1;
}
else
{
if (this.rdo1.Checked)
{
return 3;
}
else if (this.rdo2.Checked)
{
return 4;
}
return 2;
}
}
set
{
if (value <= 1)//if (value == 1)
{
this.chkHypotest.Checked = false;
tPage = this.tabPage2;
if (this.tabControl1.TabPages.Contains(this.tabPage2))
this.tabControl1.TabPages.Remove(this.tabPage2);
else if (this.tabControl1.TabPages.Contains(tPage))
this.tabControl1.TabPages.Remove(tPage);
}
else
{
if (this.tabControl1.TabPages.Count == 1)
{
this.tabControl1.TabPages.Add(tPage);
}
this.chkHypotest.Checked = true;
if (value == 3)
{
this.rdo1.Checked = true;
}
else if (value == 4)
{
this.rdo2.Checked = true;
}
}
}
}
C#根据属性判断是否显示tabControls里的page页
最新推荐文章于 2024-05-07 10:23:53 发布