Beispiel #1
0
 private void OnLogin(object sender, RoutedEventArgs e)
 {
     if (!ErrorHandler.isError(102))
     {
         if (ProfileSettings.ListExists())
         {
             if (ProfileSettings.CheckLoginApprove(LoginEmail.Text, LoginPassword.Text))
             {
                 //LoggedProfile = new ProfileSettings(Path.Combine(laucherSettings.GetServerLocation(), "data/profiles/" + ProfileSettings.GetProfile(LoginEmail.Text, LoginPassword.Text).ToString()));
                 Set_LoginToken(LoginEmail.Text, LoginPassword.Text, true, 0);
                 Characters = new ProfileCharacters(laucherSettings.GetServerLocation() + "/data/profiles/character_" + ProfileSettings.GetProfile(LoginToken.email, LoginToken.password) + ".json");
                 HideAllGrids();
                 AccountSettingsGrid.Visibility = Visibility.Visible;
                 LoadAccountSettings();
                 ErrorHandler.RemoveError(ErrorType.error_noUserLikeThis);
                 //LoggedIn = true;
             }
             else
             {
                 ErrorHandler.AddError(ErrorType.error_noUserLikeThis);
             }
             ErrorHandler.RemoveError(ErrorType.error_Server_noLocation);
         }
         else
         {
             ErrorHandler.AddError(ErrorType.error_Server_noLocation);
         }
     }
     DisplayErrors();
 }
Beispiel #2
0
 private void OnLogin(object sender, RoutedEventArgs e)
 {
     if (ProfileSettings.ListExists())
     {
         if (ProfileSettings.CheckLoginApprove(LoginEmail.Text, LoginPassword.Text))
         {
             HideAllGrids();
             AccountSettingsGrid.Visibility = Visibility.Visible;
             LoadAccountSettings();
             ErrorHandler.RemoveError(100, "No Such User");
             LoggedIn = true;
         }
         else
         {
             ErrorHandler.AddError(100, "No Such User");
         }
         ErrorHandler.RemoveError(101, "Unable to find proper file; Check Server location.");
     }
     else
     {
         ErrorHandler.AddError(101, "Unable to find proper file; Check Server location.");
     }
     DisplayErrors();
 }