本文整理汇总了C#中System.Windows.Input.MouseEventArgs.ToTEMouseArgs方法的典型用法代码示例。如果您正苦于以下问题:C# MouseEventArgs.ToTEMouseArgs方法的具体用法?C# MouseEventArgs.ToTEMouseArgs怎么用?C# MouseEventArgs.ToTEMouseArgs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Input.MouseEventArgs
的用法示例。
在下文中一共展示了MouseEventArgs.ToTEMouseArgs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetParseTree
/*
/// <summary>
/// Sets the current parsetree and updates the overlay.
/// </summary>
/// <param name="t">The new parsetree.</param>
/// <param name="tBB">The new bounding box.</param>
public void SetParseTree(Tikz_ParseTree t, Rect tBB)
{
BB = tBB;
ParseTree = t;
//curSel = null; //curDragged = null;
Resolution = Resolution; // to recalc size
ActivateDefaultTool(); // to reset current tool
RedrawObjects();
} */
#region Events forwarded to Current tool
private void canvas1_MouseMove(object sender, MouseEventArgs e)
{
Point mousep = e.GetPosition(canvas1);
// convert to bottom left coordinates
Point p = new Point(mousep.X, Height - mousep.Y);
TEMouseArgs ee = e.ToTEMouseArgs();
TheModel.CurrentTool.OnMouseMove(p, ee);
e.Handled = ee.Handled;
// display the current mouse position
/* p.Y /= Resolution;
p.X /= Resolution;
p.X += BB.X;
p.Y += BB.Y;
String s = "(" + String.Format("{0:f1}", p.X) + "; " + String.Format("{0:f1}", p.Y) + ")";
((MainWindow)Application.Current.Windows[0]).AddStatusBarCoordinate(s);
*/
}