代码节选:
private void hScrollBar2_Scroll(object sender, ScrollEventArgs e)
{
month.Text = "月份:"+e.NewValue.ToString()+"个月";
aa = this.hScrollBar1.Value + this.hScrollBar1.Value * this.hScrollBar2.Value * this.hScrollBar3.Value * 0.01;
result.Text = aa.ToString();
}
//radiobutton
//修改字体大小
private void radioButton6_CheckedChanged(object sender, EventArgs e)
{
tB.Font = new Font(tB.Font.FontFamily, 16, tB.Font.Style);
}
//修改字体类型
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
tB.Font = new Font("楷体",tB.Font.Size, tB.Font.Style);
}
//checkBox
private void checkBox3_CheckedChanged(object sender, EventArgs e)
{
if (checkBox3.Checked)
tB.Font = new Font(tB.Font, tB.Font.Style | FontStyle.Bold);
else
{
tB.Font = new Font(tB.Font, tB.Font.Style ^ FontStyle.Bold);
}
}
private void checkBox2_CheckedChanged(object sender, EventArgs e)
{
if (checkBox2.Checked)
tB.Font = new Font(tB.Font, tB.Font.Style | FontStyle.Italic);
else
{
tB.Font = new Font(tB.Font, tB.Font.Style ^ FontStyle.Italic);
}
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Checked)
tB.Font = new Font(tB.Font, tB.Font.Style | FontStyle.Underline);
else
{
tB.Font = new Font(tB.Font, tB.Font.Style ^ FontStyle.Underline);
}
}
//改颜色
private void radioButton8_CheckedChanged(object sender, EventArgs e)
{
tB.ForeColor = Color.Blue;
}