Guest User

Untitled

a guest
Jan 7th, 2019
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.43 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Net;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Documents;
  8. using System.Windows.Input;
  9. using System.Windows.Media;
  10. using System.Windows.Media.Animation;
  11. using System.Windows.Shapes;
  12. using Microsoft.Phone.Controls;
  13. using System.Diagnostics;
  14.  
  15. namespace Initial_Wave
  16. {
  17. public partial class Register : PhoneApplicationPage
  18. {
  19. string fullname;
  20. string username;
  21. string password;
  22. string email;
  23.  
  24. public Register()
  25. {
  26. InitializeComponent();
  27. }
  28.  
  29. public string Fullname
  30. {
  31. get { return fullname; }
  32. set { fullname = value; }
  33. }
  34. public string Username
  35. {
  36. get { return username; }
  37. set { username = value; }
  38. }
  39. public string Password
  40. {
  41. get { return password; }
  42. set { password = value; }
  43. }
  44. public string EmailAdd
  45. {
  46. get { return email; }
  47. set { email = value; }
  48. }
  49.  
  50. private void registerButton_Click2(object sender, RoutedEventArgs e)
  51. {
  52. if (fullnameBox.Text == "") { MessageBox.Show("Please enter your fullname"); }
  53. if (usernameBox.Text == "") { MessageBox.Show("Please enter your username"); }
  54. if (passwordBox.Password == "") { MessageBox.Show("Please enter your Password"); }
  55. if (emailBox.Text == "") { MessageBox.Show("Please enter your e-mail address"); }
  56.  
  57. Fullname = fullnameBox.Text;
  58. Username = usernameBox.Text;
  59. Password = passwordBox.Password;
  60. EmailAdd = emailBox.Text;
  61.  
  62. ServiceReference1.operationsSoapClient client = new ServiceReference1.operationsSoapClient();
  63.  
  64. client.UserRegisterCompleted += new EventHandler<ServiceReference1.UserRegisterCompletedEventArgs>((s, a) =>
  65. {
  66. if (a.Error == null)
  67. {
  68. //this.IsAuthenticated = a.Result;
  69. Debug.WriteLine("Result = " + a.Result.ToString());
  70.  
  71. }
  72. });
  73.  
  74. client.UserRegisterAsync(Fullname, Username, Password, EmailAdd);
  75. Debug.WriteLine("Username: " + Username + " email: " + EmailAdd);
  76.  
  77. }
  78.  
  79. }
  80. }
Add Comment
Please, Sign In to add comment