private void Monitor_GyroscopeChanged(object sender, MoveMonitorEventArgs <Vector3> e) { // Update every half seconds var now = DateTime.Now; if (now.Subtract(GyroscopeTime).TotalMilliseconds > updateTime) { GyroscopeTime = now; GyroscopeXLabel.Text = string.Format(format, "X", e.Value.X, e.Delta.X); GyroscopeYLabel.Text = string.Format(format, "Y", e.Value.Y, e.Delta.Y); GyroscopeZLabel.Text = string.Format(format, "Z", e.Value.Z, e.Delta.Z); } }
private void Monitor_AccelerometerChanged(object sender, MoveMonitorEventArgs <Vector3> e) { // Update every half seconds var now = DateTime.Now; if (now.Subtract(AccelerometerTime).TotalMilliseconds > updateTime) { AccelerometerTime = now; AccelerometerXLabel.Text = string.Format(format, "X", 180 * e.Value.X, 180 * e.Delta.X); AccelerometerYLabel.Text = string.Format(format, "Y", 180 * e.Value.Y, 180 * e.Delta.Y); AccelerometerZLabel.Text = string.Format(format, "Z", 180 * e.Value.Z, 180 * e.Delta.Z); } }
private void Monitor_OrientationChanged(object sender, MoveMonitorEventArgs <Vector4> e) { // Update every half seconds var now = DateTime.Now; if (now.Subtract(OrientationTime).TotalMilliseconds > updateTime) { OrientationTime = now; OrientationXLabel.Text = string.Format(format, "X", e.Value.X, e.Delta.X); OrientationYLabel.Text = string.Format(format, "Y", e.Value.Y, e.Delta.Y); OrientationZLabel.Text = string.Format(format, "Z", e.Value.Z, e.Delta.Z); OrientationWLabel.Text = string.Format(format, "W", e.Value.W, e.Delta.W); } }