Пример #1
0
        public void InvokeNearestPointChanged(NearestPointEventArgs e)
        {
            EventHandler <NearestPointEventArgs> handler = NearestPointChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Пример #2
0
        private void InvokePointClicked(NearestPointEventArgs e)
        {
            EventHandler <NearestPointEventArgs> handler = PointClicked;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Пример #3
0
        private void canvas_MouseMove(object sender, MouseEventArgs e)
        {
            NearestPointEventArgs nearestPointEventArgs = GetNearestPoint(e);

            pointMarker.Visibility = Visibility.Visible;
            var point = myLine.Points[nearestPointEventArgs.PointIndex];

            Canvas.SetTop(pointMarker, point.Y - pointMarker.Height / 2);
            Canvas.SetLeft(pointMarker, point.X - pointMarker.Width / 2);
            InvokeNearestPointChanged(nearestPointEventArgs);
        }
Пример #4
0
        private void canvas_MouseDown(object sender, MouseEventArgs e)
        {
            NearestPointEventArgs nearestPointEventArgs = GetNearestPoint(e);

            InvokePointClicked(nearestPointEventArgs);
        }
Пример #5
0
 public void InvokeNearestPointChanged(NearestPointEventArgs e)
 {
     EventHandler<NearestPointEventArgs> handler = NearestPointChanged;
     if (handler != null) handler(this, e);
 }
Пример #6
0
 private void InvokePointClicked(NearestPointEventArgs e)
 {
     EventHandler<NearestPointEventArgs> handler = PointClicked;
     if (handler != null) handler(this, e);
 }