void l_PointerPressed(object sender, PointerRoutedEventArgs e) { Line l = (sender as Line); Point pntrposn = e.GetCurrentPoint(LatticeCanvas).Position; if (distance(l.X1, l.Y1, pntrposn.X, pntrposn.Y) < 0.2) { movepoint = MOVEDPOINT.START; } else if (distance(l.X2, l.Y2, pntrposn.X, pntrposn.Y) < 0.2) { movepoint = MOVEDPOINT.END; } else { movepoint = MOVEDPOINT.MIDDLE; } Tuple <double, double> t = ScaleFactors; l.CapturePointer(e.Pointer); pointerPosition = new Point(); pointerPosition.X = pntrposn.X; // t.Item1; pointerPosition.Y = pntrposn.Y; // t.Item2; Hilight(l.Name, true); }
void l_PointerPressed(object sender, PointerRoutedEventArgs e) { Line l = (sender as Line); Point pntrposn = e.GetCurrentPoint(BraidCanvas).Position; movepoint = MOVEDPOINT.END; Tuple <double, double> t = ScaleFactors; l.CapturePointer(e.Pointer); pointerPosition = new Point(); pointerPosition.X = Math.Round(pntrposn.X); // t.Item1; pointerPosition.Y = Math.Round(pntrposn.Y); // t.Item2; Hilight(l.Name, true); }
void l_PointerPressed(object sender, PointerRoutedEventArgs e) { Line l = (sender as Line); Point pntrposn = e.GetCurrentPoint(LatticeCanvas).Position; if ( distance(l.X1, l.Y1, pntrposn.X, pntrposn.Y) < 0.2 ) movepoint = MOVEDPOINT.START; else if ( distance(l.X2,l.Y2, pntrposn.X, pntrposn.Y) < 0.2) movepoint = MOVEDPOINT.END; else movepoint = MOVEDPOINT.MIDDLE; Tuple<double, double> t = ScaleFactors; l.CapturePointer(e.Pointer); pointerPosition = new Point(); pointerPosition.X = pntrposn.X; // t.Item1; pointerPosition.Y = pntrposn.Y; // t.Item2; Hilight(l.Name, true); }
void l_PointerPressed(object sender, PointerRoutedEventArgs e) { Line l = (sender as Line); Point pntrposn = e.GetCurrentPoint(BraidCanvas).Position; movepoint = MOVEDPOINT.END; Tuple<double, double> t = ScaleFactors; l.CapturePointer(e.Pointer); pointerPosition = new Point(); pointerPosition.X = Math.Round(pntrposn.X); // t.Item1; pointerPosition.Y = Math.Round(pntrposn.Y); // t.Item2; Hilight(l.Name, true); }