partial void SaveButton_TouchUpInside(UIButton sender) { Lighthouse.LHPEUser user = new Lighthouse.LHPEUser(); user.Id = idText.Text; Dictionary <string, string> Profile = new Dictionary <string, string>(); Profile.Add("first_name", firstNameText.Text); Profile.Add("last_name", lastNameText.Text); user.Profile = Profile; Lighthouse.SetUserProfile(user); }
public override bool OnOptionsItemSelected(IMenuItem item) { switch (item.ItemId) { case Resource.Id.set_user: LayoutInflater layoutInflater = LayoutInflater.From(this); View view = layoutInflater.Inflate(Resource.Layout.user_form, null); Android.Support.V7.App.AlertDialog.Builder alertbuilder = new Android.Support.V7.App.AlertDialog.Builder(this); alertbuilder.SetView(view); var userid = view.FindViewById <EditText>(Resource.Id.userIdText); var firstName = view.FindViewById <EditText>(Resource.Id.firstNameText); var lastName = view.FindViewById <EditText>(Resource.Id.lastNameText); alertbuilder.SetCancelable(false) .SetPositiveButton("Submit", delegate { System.Diagnostics.Debug.WriteLine("Setting User: "******", " + firstName.Text + " " + lastName.Text); Lighthouse.LHPEUser user = new Lighthouse.LHPEUser(); user.Id = userid.Text; Dictionary <string, string> Profile = new Dictionary <string, string>(); Profile.Add("first_name", firstName.Text); Profile.Add("last_name", lastName.Text); user.Profile = Profile; Lighthouse.SetUserProfile(user); }) .SetNegativeButton("Cancel", delegate { alertbuilder.Dispose(); }); Android.Support.V7.App.AlertDialog dialog = alertbuilder.Create(); dialog.Show(); return(true); } return(base.OnOptionsItemSelected(item)); }