/// <summary> /// converts SkeletonPose enum into spoken words /// </summary> /// <param name="pose"></param> /// <returns></returns> private string SkeletonPoseToSpokenString(SkeletonPose pose) { // split CamelCase into words: string sPose = pose.ToString(); Regex upperCaseRegex = new Regex(@"[A-Z]{1}[a-z]*"); MatchCollection matches = upperCaseRegex.Matches(sPose); List <string> words = new List <string>(); foreach (Match match in matches) { words.Add(match.Value); } return(string.Join(" ", words.ToArray())); }
/// <summary> /// converts SkeletonPose enum into spoken words /// </summary> /// <param name="pose"></param> /// <returns></returns> private string SkeletonPoseToSpokenString(SkeletonPose pose) { // split CamelCase into words: string sPose = pose.ToString(); Regex upperCaseRegex = new Regex(@"[A-Z]{1}[a-z]*"); MatchCollection matches = upperCaseRegex.Matches(sPose); List<string> words = new List<string>(); foreach (Match match in matches) { words.Add(match.Value); } return string.Join(" ", words.ToArray()); }