コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: BraidDisplay.xaml.cs プロジェクト: hamlertools/OTWB
        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);
        }
コード例 #3
0
ファイル: LatticeDisplay.xaml.cs プロジェクト: dolkensp/OTWB
 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);
 }
コード例 #4
0
ファイル: BraidDisplay.xaml.cs プロジェクト: dolkensp/OTWB
 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);
 }