private void OnLedMatrixDisplayed() { OutputTextBox.Text = new StringBuilder(OutputTextBox.Text) .Append("The matrix you have sent has been displayed." + "\n") .ToString(); OutputTextBox.ScrollToBottom(); }
private void OnNuimoGestureEvent(NuimoGestureEvent nuimoGestureEvent) { OutputTextBox.Text = new StringBuilder(OutputTextBox.Text) .Append("NuimoGesture: ") .Append(nuimoGestureEvent.Gesture) .Append(" value: ") .Append(nuimoGestureEvent.Value + "\n") .ToString(); OutputTextBox.ScrollToBottom(); }
private void OnNuimoGestureEventAsync(NuimoGestureEvent nuimoGestureEvent) { OutputTextBox.Text = new StringBuilder(OutputTextBox.Text) .Append("NuimoGesture: ") .Append(nuimoGestureEvent.Gesture) .Append(" value: ") .Append(nuimoGestureEvent.Value + "\n") .ToString(); try { if (nuimoGestureEvent.Gesture == NuimoGesture.ButtonPress) { TriggerApp(_profile.ButtonPress); } if (nuimoGestureEvent.Gesture == NuimoGesture.ButtonRelease) { TriggerApp(_profile.ButtonRelease); } if (nuimoGestureEvent.Gesture == NuimoGesture.SwipeUp) { TriggerApp(_profile.SwipeUp); } if (nuimoGestureEvent.Gesture == NuimoGesture.SwipeDown) { TriggerApp(_profile.SwipeDown); } if (nuimoGestureEvent.Gesture == NuimoGesture.SwipeLeft) { TriggerApp(_profile.SwipeLeft); } if (nuimoGestureEvent.Gesture == NuimoGesture.SwipeRight) { TriggerApp(_profile.SwipeRight); } if (nuimoGestureEvent.Gesture == NuimoGesture.Rotate && nuimoGestureEvent.Value > _settings.rotateThreshold) { TriggerApp(_profile.RotateRight); } if (nuimoGestureEvent.Gesture == NuimoGesture.Rotate && nuimoGestureEvent.Value < (-1 * _settings.rotateThreshold)) { TriggerApp(_profile.RotateLeft); } if (nuimoGestureEvent.Gesture == NuimoGesture.FlyUpDown && nuimoGestureEvent.Value >= 135) { TriggerApp(_profile.FlyUp); } if (nuimoGestureEvent.Gesture == NuimoGesture.FlyUpDown && nuimoGestureEvent.Value <= 115 && nuimoGestureEvent.Value > 1) { TriggerApp(_profile.FlyDown); } if (nuimoGestureEvent.Gesture == NuimoGesture.FlyLeft) { TriggerApp(_profile.FlyLeft); } if (nuimoGestureEvent.Gesture == NuimoGesture.FlyRight) { TriggerApp(_profile.FlyRight); } if (ProfileTextBox != null) { ProfileTextBox.ScrollToBottom(); } if (OutputTextBox != null) { OutputTextBox.ScrollToBottom(); } } catch (Exception ex) { OutputTextBox.Text = new StringBuilder(OutputTextBox.Text) .Append("Exception : ") .Append(ex.Message) .Append("\n") .Append(ex.StackTrace) .Append("\n") .ToString(); } }