private void PostureAnalyzerOnPostureDetected(object sender, PostureEventArgs args) { if (args.Posture == PosturesEnum.LeftHello) { _leftHello = true; } }
private void PostureAnalyzerOnPostureDetected(object sender, PostureEventArgs args) { if (args.Posture == PosturesEnum.RightHello) { HelloCounter++; HelloDetected(this, HelloCounter); } }
private void AlgorithmicPostureDetectorOnPostureDetected(object sender, PostureEventArgs args) { switch (args.Posture) { case PosturesEnum.LeftHandOverHead: { //IsHandNavigationMode = !IsHandNavigationMode; } break; case PosturesEnum.LeftHello: { //IsHeadNavigationMode = !IsHeadNavigationMode; } break; } }
private void PostureAnalyzerOnPostureDetected(object sender, PostureEventArgs args) { switch (args.Posture) { case PosturesEnum.RightHandOverHead: { var city = Cities[SelectedIndex]; _mapDefinition.Markers.Add(new GMapMarker(Utils.GetPositionByKeywords(city)) { ZIndex = int.MaxValue, Shape = new Label() { Width = 100, Content = city, Background = new SolidColorBrush(Color.FromArgb(255, 0, 0, 255)) } }); } break; } }
private void PostureAnalyzerOnPostureDetected(object sender, PostureEventArgs args) { switch (args.Posture) { case PosturesEnum.LeftHello: { PointLatLng pos; if (Marker != null) { pos = new PointLatLng(Marker.Position.Lat, Marker.Position.Lng); } else { pos = new PointLatLng(GMapControl.Position.Lat, GMapControl.Position.Lng); } GMapMarker flag = new GMapMarker(new PointLatLng()) { Position = pos, ZIndex = int.MaxValue }; flag.Shape = new CustomMarkerDemo(flag, "FLAG"); GMapControl.Markers.Add(flag); } break; case PosturesEnum.RightHandOverHead: { Configuration.maxHandLength = 0.4; Configuration.activeHandDistance = 0.25; LogString.Log("Restoring defaults"); } break; case PosturesEnum.LeftHandOverHead: { LogString.Log("LeftOverHead"); if (GMapControl.Markers.Any()) { var marker = GMapControl.Markers.Last(); marker.Shape = null; GMapControl.Markers.Remove(marker); } } break; case PosturesEnum.HandsJoined: { CursorMarkerExists = false; if (Marker != null) { GMapControl.Markers.Remove(Marker); Marker = null; //LogString.Log(Marker.ToString()); } if (GMapControl.Markers.Count == 0) { return; } var mRoute = new GMapMarker(GMapControl.Markers[0].Position); { mRoute.Route.AddRange(GMapControl.Markers.Select(a => new PointLatLng(a.Position.Lat - 100, a.Position.Lng))); var gMapControl = GMapControl.Markers[0].Map; mRoute.RegenerateRouteShape(gMapControl); mRoute.ZIndex = -1; } GMapControl.Markers.Add(mRoute); } break; } }