请问下面的一些代码有什么作用...
窗体的代码.....
namespace Test4_1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
this.trackBar1.Value = (int)this.numericUpDown1.Value;
}
private void trackBar1_Scroll(object sender, EventArgs e)
{
this.numericUpDown1.Value = this.trackBar1.Value;
}
private void numericUpDown1_MouseDown(object sender, MouseEventArgs e)
{
this.trackBar1.Value = (int)this.numericUpDown1.Value;
}
}
}
但是下面的代码也可以实现上面窗口....
namespace Test4_1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
this.trackBar1.Value = (int)this.numericUpDown1.Value;
}
private void trackBar1_Scroll(object sender, EventArgs e)
{
this.numericUpDown1.Value = this.trackBar1.Value;
}
}
}
请问红色部分的代码是什么意思...有什么作用的啊!