private string WriteLog() { var sb = new StringBuilder(); var array = new Hands[PointCount]; ; _history.CopyTo(array, 0); foreach (Hands p in array) { if (p != null) { sb.AppendLine(p.ToString()); } } return(sb.ToString()); }
public void AddPoints(Hands hand) { if (DoubleClap != null) { ////Do some work for double clap _history.Enqueue(hand); ////Do some work for single clap bool clap = hand.DetectClap(); if (clap && _doubleClapCheck < 0) { _doubleClapCheck = PointCount; } else if (_doubleClapCheck == 0) { ////TODO: remove call to camera and use OnSingleclap Camera.Instance.OnKinectEventHandlerEvent(SingleClap); _doubleClapCheck--; } else if (_doubleClapCheck >= 0) { if (CheckForDoubleClap()) { _doubleClapCheck = -1; } else { _doubleClapCheck--; } } } else { ////Do some work for single clap if (hand.DetectClap() && _doubleClapCheck < 0) { _doubleClapCheck = 10; } else if (_doubleClapCheck >= 0) { _doubleClapCheck--; } } }
private string WriteLog() { var sb = new StringBuilder(); var array = new Hands[PointCount]; ; _history.CopyTo(array, 0); foreach (Hands p in array) { if (p != null) { sb.AppendLine(p.ToString()); } } return sb.ToString(); }