private void Button_GripEvent(object sender, HandPointerEventArgs e) { textBoxRefresh(); YouNavigation.requestFrameChange(this, "YouAirPaint"); }
//event handlers private void Button_Click(object sender, RoutedEventArgs e) { var b = (KinectTileButton)e.OriginalSource; if (b.Name == "Send") { clear = true; if (sendEmailDois(Mail.GetLineText(0))) { //terá de ser substituido por algo que dê com a kinect(YouButton) //MessageBox.Show("email enviado com sucesso :)"); _mail = "Email enviado com sucesso :)"; textBoxRefresh(); Console.WriteLine("email enviado com sucesso,\n volte ao menu anterior"); return; //mudar ppara frama de desenho } else { _mail = "Email enviado com sucesso :)"; textBoxRefresh(); Console.WriteLine("email nao enviado, volte ao menu anterior"); //mudar ppara frama de desenho return; } } else if (b.Name == "Clear") { if (_mail != "") { if (clear == false) { _mail = _mail.Remove(_mail.Length - 1); } else { _mail = ""; clear = false; } textBoxRefresh(); } } else if (b.Name == "aarroba") { _mail += "@"; textBoxRefresh(); } else if (b.Name == "aponto") { _mail += "."; textBoxRefresh(); } else if (b.Name == "aunder") { _mail += "_"; textBoxRefresh(); } else if (b.Name == "atraco") { _mail += "-"; textBoxRefresh(); } else if (b.Name == "Numeros") { lettersOn = !lettersOn; if (lettersOn) { BitmapImage bitmapL = new BitmapImage(); Image imgL = new Image(); bitmapL.BeginInit(); bitmapL.UriSource = new Uri("/You_AirPaint;component/Images/Keyboard/simbols.png", UriKind.Relative); bitmapL.EndInit(); imgL.Stretch = Stretch.Fill; imgL.Source = bitmapL; Numeros.Content = imgL; Numeros.Background = new ImageBrush(bitmapL); setScrollLetters(); } else { BitmapImage bitmapT = new BitmapImage(); Image imgT = new Image(); bitmapT.BeginInit(); bitmapT.UriSource = new Uri("/You_AirPaint;component/Images/Keyboard/letras.png", UriKind.Relative); bitmapT.EndInit(); imgT.Stretch = Stretch.Fill; imgT.Source = bitmapT; Numeros.Content = imgT; Numeros.Background = new ImageBrush(bitmapT); setScrollNumbers(); } } else if (b.Name == "MainMenuButton") { _mail = ""; textBoxRefresh(); YouNavigation.requestFrameChange(this, "YouAirPaint"); } else { char[] x = b.Name.ToString().ToCharArray(); _mail += x[1]; textBoxRefresh(); } }