Beispiel #1
0
 private void Rotary_Rotated(IRotaryEncoder sender, RotaryEncoderRotatedEventArgs args)
 {
     Dispatcher.Run(() =>
     {
         AddOutput(string.Format("Rotary rotated {0}", args.Direction));
     });
 }
Beispiel #2
0
        void EncoderOnRotated(IRotaryEncoder sender, RotaryEncoderRotatedEventArgs args)
        {
            if (args.Direction == RotationDirection.Clockwise)
            {
                _counter++;
            }
            else
            {
                _counter--;
            }

            Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => EncoderValue.Text = _counter.ToString());
        }