本文整理汇总了C#中System.Windows.Forms.UserControl.Refresh方法的典型用法代码示例。如果您正苦于以下问题:C# UserControl.Refresh方法的具体用法?C# UserControl.Refresh怎么用?C# UserControl.Refresh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.UserControl
的用法示例。
在下文中一共展示了UserControl.Refresh方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnMouseMove
public void OnMouseMove(UserControl canvas, MouseEventArgs e)
{
if (triangle == null || e.Button != MouseButtons.Left)
return;
triangle.EndPoint = e.Location;
canvas.Refresh();
}
示例2: OnMouseMove
public void OnMouseMove(UserControl canvas, MouseEventArgs e)
{
if (curve == null || e.Button != MouseButtons.Left)
return;
curve.AddPoint(e.Location);
canvas.Refresh();
}
示例3: OnMouseMove
public void OnMouseMove(UserControl canvas, MouseEventArgs e)
{
if (line == null || e.Button != MouseButtons.Left)
return;
line.ChangeEndPoint(e.Location);
canvas.Refresh();
}
示例4: OnMouseMove
public void OnMouseMove(UserControl canvas, MouseEventArgs e)
{
if (selectedShape == null || e.Button != MouseButtons.Left)
return;
if (pointerMode == PointerMode.Move) // режим перемещения
{
int deltaX = e.X - startPoint.X;
int deltaY = e.Y - startPoint.Y;
startPoint = e.Location;
selectedShape.Move(deltaX, deltaY); // перемещаем фигуру
}
if(pointerMode == PointerMode.Resize)
{
selectedShape.MoveKeyPoint(keyPointNumber, e.Location); // перемещаем опорную точку
}
canvas.Refresh();
}