Ejemplo n.º 1
0
        private void BSignIn_Click(object sender, EventArgs e)
        {
            Intent i = new Intent(this, typeof(IssueActivity.IssueActivity));

            try
            {
                RedMineManager rm = new RedMineManager(ETUsername.Text, ETPassword.Text);
                //Save login and password
                if (CBRememberMe.Checked)
                {
                    CredentialsStore.Save(ETUsername.Text, ETPassword.Text);
                }
                StartActivity(i);
            }
            catch (System.Net.WebException o)
            {
                Toast.MakeText(this, o.Message, ToastLength.Short).Show();
            }
        }
Ejemplo n.º 2
0
 protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     SetContentView(Resource.Layout.login_layout);
     ETUsername   = FindViewById <EditText>(Resource.Id.login);
     ETPassword   = FindViewById <EditText>(Resource.Id.password);
     ETDomen      = FindViewById <EditText>(Resource.Id.domen);
     CBRememberMe = FindViewById <CheckBox>(Resource.Id.remember);
     BSignIn      = FindViewById <Button>(Resource.Id.sign_in);
     BRegister    = FindViewById <TextView>(Resource.Id.register);
     //Retrieve login and password
     try
     {
         ETUsername.Text = CredentialsStore.Load()[0];
         ETPassword.Text = CredentialsStore.Load()[1];
         new RedMineManager(ETUsername.Text, ETPassword.Text);
         BSignIn_Click(null, null);
     }
     catch
     {
     }
     BSignIn.Click   += BSignIn_Click;
     BRegister.Click += BRegister_Click;
 }