日期:2014-05-18 浏览次数:21186 次
private void Frm_Report_MouseMove(object sender, MouseEventArgs e)
{
if (isClick)
{
if (count == 1)
{
if (e.Y >= 10)
{
p1.Y = e.Y;
p2.Y = e.Y;
}
else
{
p1.Y = 10;
p2.Y = 10;
}
if (e.Y <= Height / 2 - 40)
{
p1.Y = e.Y;
p2.Y = e.Y;
}
else
{
p1.Y = Height / 2 - 40;
p2.Y = Height / 2 - 40;
}
this.Refresh();
}
if (count == 2)
{
if (e.Y <= Height - 10)
{
p3.Y = e.Y;
p4.Y = e.Y;
}
else
{
p3.Y = Height - 10;
p4.Y = Height - 10;
}
if (e.Y >= Height / 2 + 40)
{
p3.Y = e.Y;
p4.Y = e.Y;
}
else
{
p3.Y = Height / 2 + 40;
p4.Y = Height / 2 + 40;
}
this.Refresh();
}
if (count == 3)
{
if (e.X >= 10)
{
p5.X = e.X;
p6.X = e.X;
}
else
{
p5.X = 10;
p6.X = 10;
}
if (e.X <= Width / 2 - 40)
{
p5.X = e.X;
p6.X = e.X;
}
else
{
p5.X = Width / 2 - 40;
p6.X = Width / 2 - 40;
}
this.Refresh();
}
if (count == 4)
{
if (e.X <= Width - 10)
{
p7.X = e.X;
p8.X = e.X;
}
else
{
p7.X = Width - 10;
p8.X = Width - 10;
}
if (e.X >= Width / 2 + 40)
{
p7.X = e.X;
p8.X = e.X;
}
else
{
p7.X = Width / 2 + 40;
p8.X = Width / 2 + 40;
}
this.Refresh();
}
}
}