本文整理匯總了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();
}