Exemple #1
0
        private void TimeBarChangedByUser(object sender, AnnotationPositionChangingEventArgs e)
        {
            Debug.Assert(m_line == e.Annotation);
            m_rect.AnchorX = e.NewLocationX;
            EventHandler <TimeCursorMovedArgs> handler = TimeCursorMoved;

            handler?.Invoke(this, new TimeCursorMovedArgs(e.NewLocationX));
        }
        private void chart_AnnotationPositionChanging(object sender, AnnotationPositionChangingEventArgs e)
        {
            int classIndex = (int)e.Annotation.Tag;

            double[] thresholds = Content.Model.Thresholds.ToArray();
            thresholds[classIndex] = e.NewLocationY;
            Array.Sort(thresholds);
            Content.Model.SetThresholdsAndClassValues(thresholds, Content.Model.ClassValues);
        }
Exemple #3
0
        private void chart1_AnnotationPositionChanging(object sender, AnnotationPositionChangingEventArgs e)
        {
            // move the rectangle with the line
            if (sender == v1)
            {
                r1.X = v1.X - r1.Width / 2;
            }

            // display the current Y-value
            int    pt1    = (int)e.NewLocationX;
            double step   = (S1.Points[pt1 + 1].YValues[0] - S1.Points[pt1].YValues[0]);
            double deltaX = e.NewLocationX - S1.Points[pt1].XValue;
            double val    = S1.Points[pt1].YValues[0] + step * deltaX;

            chart1.Titles[0].Text = String.Format(
                "X = {0:0.00}   Y = {1:0.00}", e.NewLocationX, val);
            r1.Text = String.Format("{0:0.00}", val);
            chart1.Update();
        }
        private void chart_AnnotationPositionChanging(object sender, AnnotationPositionChangingEventArgs e)
        {
            var    step        = (trainingMax - trainingMin) / drawingSteps;
            double newLocation = step * (long)Math.Round(e.NewLocationX / step);
            var    axisX       = chart.ChartAreas[0].AxisX;

            if (newLocation >= axisX.Maximum)
            {
                newLocation = axisX.Maximum - step;
            }
            if (newLocation <= axisX.Minimum)
            {
                newLocation = axisX.Minimum + step;
            }

            e.NewLocationX = newLocation;

            UpdateCursor();
        }
Exemple #5
0
 private void ch_live_feed_AnnotationPositionChanging(object sender, AnnotationPositionChangingEventArgs e)
 {
     //ch_live_feed.Update();
 }