public PedalButtonTrainer(PedalButtonRecognizer recognizer) { InitializeComponent(); this.recognizer = recognizer; sensitivityTrackBar.Value = (int)((float)recognizer.Sensitivity * (float)sensitivityTrackBar.Maximum); }
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 PedalButtonControl(PedalButtonRecognizer recognizer) { this.recognizer = recognizer; recognizer.PedalButtonPressed += recognizer_PedalButtonPressed; recognizer.PedalButtonReleased += recognizer_PedalButtonReleased; InitializeComponent(); }