Exemplo n.º 1
0
 public override void ViewDidLoad()
 {
     base.ViewDidLoad();
     UsernameText.Text = UserDataManager.getUserName();
     //PasswordText.Text = UserDataManager.getUserPassword ();
     PasswordText.Text = "Nobody can know";
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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();
            }
        }
Exemplo n.º 4
0
        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();
            }
        }
Exemplo n.º 5
0
 private void InitializeUserDataManager()
 {
     UserDataManager.Initialize();
 }