コード例 #1
0
        public RotaryEncoderTrainer(RotaryEncoderRecognizer recognizer)
        {
            InitializeComponent();
            this.recognizer = recognizer;

            incrementsTrackBar.Value = recognizer.Increments;
        }
コード例 #2
0
 public void SetRecognizerByName(string name)
 {
     if (name == CircularSliderRecognizer.FreindlyName)
     {
         Recognizer = new CircularSliderRecognizer();
     }
     else if (name == PedalButtonRecognizer.FreindlyName)
     {
         Recognizer = new PedalButtonRecognizer();
     }
     else if (name == DialRecognizer.FreindlyName)
     {
         Recognizer = new DialRecognizer();
     }
     else if (name == RotaryEncoderRecognizer.FreindlyName)
     {
         Recognizer = new RotaryEncoderRecognizer();
     }
     else if (name == MovementRecognizer.FreindlyName)
     {
         Recognizer = new MovementRecognizer();
     }
     else if (name == PushButtonRecognizer.FreindlyName)
     {
         Recognizer = new PushButtonRecognizer();
     }
 }
コード例 #3
0
        public RotaryEncoderControl(RotaryEncoderRecognizer recognizer)
        {
            InitializeComponent();

            this.recognizer = recognizer;
            recognizer.RotaryEncoderClockwise += recognizer_RotaryEncoderClockwise;
            recognizer.RotaryEncoderAntiClockwise += recognizer_RotaryEncoderAntiClockwise;
        }