public override void ViewDidLoad() { base.ViewDidLoad(); UsernameText.Text = UserDataManager.getUserName(); //PasswordText.Text = UserDataManager.getUserPassword (); PasswordText.Text = "Nobody can know"; }
public override void ViewDidLoad() { base.ViewDidLoad(); UIGraphics.BeginImageContext(this.View.Frame.Size); UIImage i = UIImage.FromFile(@"BackgroundImages/bg3.jpg"); i = i.Scale(this.View.Frame.Size); this.View.BackgroundColor = UIColor.FromPatternImage(i); ProfileButton.SetTitle(String.Format("{0}", UserDataManager.getDisplayName()), UIControlState.Normal); NavigationItem.SetHidesBackButton(true, false); }
partial void LoginButtonClick(UIButton sender) { string result = tryLogin(UsernameText.Text, PasswordText.Text); if (result == "0") { ErrorText.Text = "Log In Failed"; } else { ErrorText.Text = "Logged In"; UserDataManager.SetData(result); UserDataManager.SetPassword(PasswordText.Text); UserDataManager.SaveCredentials(); GoToMainMenu(); } }
private void trySubmit(string email, string username, string password, string firstname, string lastname) { string result = trySignUp(email, username, password, String.Format("{0} {1}", firstname, lastname)); if (result == "0") { ErrorText.Text = "Submission Failed"; } else if (result == "-1") { ErrorText.Text = "This email is already in use"; } else { ErrorText.Text = "New User Created"; UserDataManager.SetData(result); UserDataManager.SetPassword(password); UserDataManager.SaveCredentials(); GoToMainMenu(); } }
private void InitializeUserDataManager() { UserDataManager.Initialize(); }