Example #1
0
 public Animation(AllData TheData, Rower rower, Boolean autoRepat = true)
 {
     // TODO: Complete member initialization
     this.TheData = TheData;
     AutoRepeat = autoRepat;
     this.rower = rower;
 }
Example #2
0
        public Profiler(AllData data, Canvas canvas, Rower rower)
        {
            Canvas = canvas;
            Data = data;
            Rower = rower;

            canvas.Children.Clear();
            Animator = new Animation(Data, rower, false);

            Polyline pl;

            pl = new Polyline();
            pl.Stroke = Data.ControlParameters[0].Brush;
            canvas.Children.Add(pl);
            driveLines[0] = pl;

            pl = new Polyline();
            pl.Stroke = Data.ControlParameters[1].Brush;
            canvas.Children.Add(pl);
            driveLines[1] = pl;

            pl = new Polyline();
            pl.Stroke = Data.ControlParameters[2].Brush;
            canvas.Children.Add(pl);
            driveLines[2] = pl;

            pl = new Polyline();
            pl.Stroke = Brushes.Black;
            canvas.Children.Add(pl);
            driveLines[3] = pl;

            pl = new Polyline();
            pl.Stroke = Data.ControlParameters[0].Brush;
            canvas.Children.Add(pl);
            recoverLines[0] = pl;

            pl = new Polyline();
            pl.Stroke = Data.ControlParameters[1].Brush;
            canvas.Children.Add(pl);
            recoverLines[1] = pl;

            pl = new Polyline();
            pl.Stroke = Data.ControlParameters[2].Brush;
            canvas.Children.Add(pl);
            recoverLines[2] = pl;

            pl = new Polyline();
            pl.Stroke = Brushes.Black;
            canvas.Children.Add(pl);
            recoverLines[3] = pl;

            pl = new Polyline();
            pl.Stroke = Brushes.Black;
            pl.Points.Add(new Point(XNormalize(XMin), YNormalize(0)));
            pl.Points.Add(new Point(XNormalize(XMax), YNormalize(0)));
            canvas.Children.Add(pl);

            Animator.TimeChanged += DoFrameTick;
            Animator.BeginAnimation(Canvas);
            Animator.Pause(Canvas);
            DoFrameTick(null, null);
            Animator.Stop(Canvas);
        }