private void MissionPlaySpeedChanged(object sender, Microsoft.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs e)
        {
            Slider sliderControl = (Slider)sender;

            // Return if timer not initialized yet
            if (_animationTimer == null)
            {
                return;
            }

            // Get the speed multiplier from the slider value
            double speedMultiplier = sliderControl.Value;

            // Stop the animation
            _animationTimer.Stop();

            // Update the animation speed
            _animationTimer.Interval = new TimeSpan(0, 0, 0, 0, (int)(60 / speedMultiplier));

            // Set the MissionPlayPause button back to the currently 'playing' state
            MissionPlayPause.Content = "Pause";

            // Restart the animation
            _animationTimer.Start();
        }
        private void MissionProgressOnSeek(object sender, Microsoft.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs e)
        {
            // Get a reference to the slider that sent the event
            Slider sliderControl = (Slider)sender;

            // Return if the user didn't change the progress
            //    (this event is also fired when the value is changed programmatically)
            if (sliderControl.FocusState == FocusState.Unfocused)
            {
                return;
            }

            // Stop the animation
            _animationTimer.Stop();

            // Get the new mission progress
            double missionProgress = sliderControl.Value;

            // Update the keyframe based on the progress
            _keyframe = (int)(missionProgress * _frameCount);

            // Set the MissionPlayPause button back to the currently 'playing' state
            MissionPlayPause.Content = "Pause";

            // Restart the animation
            _animationTimer.Start();
        }
 private void ChangeOpacity(object sender, Microsoft.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs e)
 {
     // Update the opacity of the image overlay.
     if (_imageOverlay != null)
     {
         _imageOverlay.Opacity = e.NewValue / 100;
     }
 }
 private void ZValueChanged(object sender, Microsoft.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs e)
 {
     foreach (GraphicsOverlay overlay in MySceneView.GraphicsOverlays)
     {
         foreach (Graphic graphic in overlay.Graphics)
         {
             graphic.Geometry = GeometryEngine.SetZ(graphic.Geometry, e.NewValue);
         }
     }
 }
Exemplo n.º 5
0
        private void HeightSlider_ValueChanged(object sender, Microsoft.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs e)
        {
            // Update the height of the observer based on the slider value.

            // Constrain the min and max to 20 and 150 units.
            const double minHeight = 20;
            const double maxHeight = 150;

            // Scale the slider value; its default range is 0-100.
            double value = e.NewValue / 100;

            // Get the current point.
            MapPoint oldPoint = (MapPoint)_observerGraphic.Geometry;

            // Create a new point with the same (x,y) but updated z.
            MapPoint newPoint = new MapPoint(oldPoint.X, oldPoint.Y, (maxHeight - minHeight) * value + minHeight);

            // Apply the updated geometry to the observer point.
            _observerGraphic.Geometry = newPoint;
        }
Exemplo n.º 6
0
 private void MyTimeSlider_ValueChanged(object sender, Microsoft.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs e)
 {
     UpdateTimeExtent();
 }
Exemplo n.º 7
0
 private void ContrastMinSlider_ValueChanged(object sender, Microsoft.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs e)
 {
     CompleteFlyoutSelection(ContrastToggleSplitButton, false);
     ApplyEffects(false);
 }
 private void RotationSlider_ValueChanged(object sender, Microsoft.UI.Xaml.Controls.Primitives.RangeBaseValueChangedEventArgs e)
 {
     TryPerformInference();
 }