コード例 #1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            if (e.Parameter is AccelerScroll)
            {
                ACS = ( AccelerScroll )e.Parameter;

                // This will ensure the SV lambda swapping triggered in ReaderContent
                ACS.Delta(0);

                ODelta    = ACS.Delta;
                ACS.Delta = a => ODelta(AccTest.Accelerate(a));

                ForceBrake.IsChecked      = ACS.ForceBrake;
                TrackAutoAnchor.IsChecked = ACS.TrackAutoAnchor;
                Brake.Value             = ACS.Brake;
                BrakingForce.Value      = ACS.BrakingForce;
                TerminalVelocity.Value  = ACS.TerminalVelocity;
                BrakeOffset.Value       = ACS.BrakeOffset;
                AccelerMultiplier.Value = ACS.AccelerMultiplier;
                AccTest.Accelerate(0);
                AccTest.Brake(ACS.BrakeOffset, ACS.Brake);

                ACS.StartCallibrate();

                // Update by slider
                if (!ACS.Available)
                {
                    AccelerReadings.Value      = ACS.BrakeOffset + 0.5 * Brake.Value;
                    AccelerReadings.Visibility = Visibility.Visible;
                    Stage.Draw += Stage_Draw;
                }
            }
        }
コード例 #2
0
 private void Stage_Draw(ICanvasAnimatedControl sender, CanvasAnimatedDrawEventArgs args)
 {
     ACS.Delta(_a);
 }