private void CaptureSign(AreaGrab AG, int currentLetterProgress, char cl) { SignInfo sign = AG.getSign(); SetTextInstruction("Sign Captured"); DialogResult dialogResult = MessageBox.Show("Store this sign?", "Sign Validation", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { Sign.AddSign(sign); if (currentLetterProgress >= 10) //checks if the current letter is complete { if (this.CurrentLetter == 'Z') { MessageBox.Show("Training Complete!"); //ends training at Z AG.reset(); this.Close(); } else { cl++; User.SetProgress(UserName, cl); //Updates user progress SetTextLetter(Char.ToString(cl)); } } } SetTextInstruction("Hold up an open hand in front of the kinect"); }
private void TestSign(AreaGrab AG, char CurrentLetter) { SignInfo sign = AG.getSign(); SetTextInstruction("Sign Captured"); if (sign.CheckSign()) { MessageBox.Show("Correct!"); Sign.AddSign(sign); //adds correct signs to make it more accurate } else { MessageBox.Show("Incorrect"); } SetTextInstruction("Hold up an open hand in front of the kinect"); }