public RotaryEncoderTrainer(RotaryEncoderRecognizer recognizer) { InitializeComponent(); this.recognizer = recognizer; incrementsTrackBar.Value = recognizer.Increments; }
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(); } }
public RotaryEncoderControl(RotaryEncoderRecognizer recognizer) { InitializeComponent(); this.recognizer = recognizer; recognizer.RotaryEncoderClockwise += recognizer_RotaryEncoderClockwise; recognizer.RotaryEncoderAntiClockwise += recognizer_RotaryEncoderAntiClockwise; }