Ejemplo n.º 1
0
 private void LoginButton_Click(object sender, RoutedEventArgs e)
 {
     LoginRegistrationWindow loginWindow = new LoginRegistrationWindow();
     if (MainPage != null)
     {
         MainPage.LoginAndGoHome();
     }
     else
     {
         loginWindow.Show();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// This method forces the user to login if she has not already logged in
 /// </summary>
 /// <param name="uri"></param>
 public void LoginAndGoHome()
 {
     if (WebContext.Current.User.IsAuthenticated == false)
     {
         LoginRegistrationWindow loginRegistrationWindow = new LoginRegistrationWindow();
         loginRegistrationWindow.Closed +=
             (s, e) =>
                 {
                     if(WebContext.Current.User.IsAuthenticated)
                     {
                         SetMenu();
                         GoHome();
                     }
                 };
         loginRegistrationWindow.Show();
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Sets the parent window for the current <see cref="LoginForm"/>.
 /// </summary>
 /// <param name="window">The window to use as the parent.</param>
 public void SetParentWindow(LoginRegistrationWindow window)
 {
     this.parentWindow = window;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Sets the parent window for the current <see cref="LoginForm"/>.
 /// </summary>
 /// <param name="window">The window to use as the parent.</param>
 public void SetParentWindow(LoginRegistrationWindow window)
 {
     this.parentWindow = window;
 }