public void initAccountScreenView() { accountScreenView=new AccountScreenView (); accountScreenView.name.Text = String.Format ("{0} {1}", Global.accountInfo.first_name, Global.accountInfo.last_name); accountScreenView.address.Text = Global.accountInfo.mail_address_line_1 + "\n" + Global.accountInfo.mail_address_line_2+ "\n"+Global.accountInfo.mail_city+", "+Global.accountInfo.mail_prov_state+", "+Global.accountInfo.mail_postal; accountScreenView.mobile.Text = Global.accountInfo.phone_mobile; accountScreenView.email.Text = Global.accountInfo.email; try{ accountScreenView.DOB.Text = DateTime.ParseExact (Global.accountInfo.user_birthdate.Substring (0, 19), "yyyy-MM-ddTHH:mm:ss", null).ToString ("yyyy-MMM-dd"); } catch { accountScreenView.DOB.Text = ""; } accountScreenView.logoutBtn.TouchUpInside+=(s,e)=> { logoutClick(); }; accountScreenView.logoutSocialBtn.TouchUpInside+=(s,e)=> { logoutSocialClick(); }; accountScreenView.facebookLikeBtn.TouchUpInside += (s, e) => { facebookLikeClick(); }; accountScreenView.ResetPWDBtn.TouchUpInside += (s, e) => { ResetPWDClick(); }; View.Add (accountScreenView); }
public void initAccountScreenView() { accountScreenView=new AccountScreenView (); accountScreenView.name.Text = String.Format ("{0} {1}", Global.accountInfo.first_name, Global.accountInfo.last_name); accountScreenView.address.Text = Global.accountInfo.mail_address_line_1 + "\n" + Global.accountInfo.mail_address_line_2+ "\n"+Global.accountInfo.mail_city+", "+Global.accountInfo.mail_prov_state+", "+Global.accountInfo.mail_postal; accountScreenView.mobile.Text = Global.accountInfo.phone_mobile; accountScreenView.email.Text = Global.accountInfo.email; try{ accountScreenView.DOB.Text = DateTime.ParseExact (Global.accountInfo.user_birthdate.Substring (0, 19), "yyyy-MM-ddTHH:mm:ss", null).ToString ("yyyy-MMM-dd"); } catch { accountScreenView.DOB.Text = ""; } accountScreenView.logoutBtn.TouchUpInside+=(s,e)=> { logoutClick(); }; accountScreenView.logoutSocialBtn.TouchUpInside+=(s,e)=> { logoutSocialClick(); }; /* if(accountScreenView.loginButton.TitleLabel.Text.Contains("in")){ accountScreenView.facebookLikeBtn.Hidden = true; accountScreenView.loginButton.Hidden = false; }else{ accountScreenView.facebookLikeBtn.Hidden = false; accountScreenView.loginButton.Hidden = true; } // Handle actions once the user is logged in accountScreenView.loginButton.Completed += (sender, e) => { if (e.Error != null) { // Handle if there was an error new UIAlertView ("Login", e.Error.Description, null, "Ok", null).Show (); return; } if (e.Result.IsCancelled) { // Handle if the user cancelled the login request new UIAlertView ("Login", "The user cancelled the login", null, "Ok", null).Show (); return; } // Handle your successful login new UIAlertView ("Login", "Success!!", null, "Ok", null).Show (); accountScreenView.facebookLikeBtn.Hidden = false; accountScreenView.loginButton.Hidden = true; }; // Handle actions once the user is logged out accountScreenView.loginButton.LoggedOut += (sender, e) => { // Handle your logout accountScreenView.facebookLikeBtn.Hidden = true; accountScreenView.loginButton.Hidden = false; }; */ accountScreenView.facebookLikeBtn.TouchUpInside += (s, e) => { facebookLikeClick(); }; View.Add (accountScreenView); }