示例#1
0
 protected override void OnAppearing()
 {
     NickField.Focus();
 }
 private async void SaveContact()
 {
     if (NameField == null || NickField == null || NameField.Replace(" ", "") == "" || NickField.Replace(" ", "") == "")
     {
         string text = Resources.Resource.AddEditProfilePage_Alert;
         await UserDialogs.Instance.AlertAsync(text);
     }
     else
     {
         int userId = CrossSettings.Current.GetValueOrDefault("UserId", -1);
         _profileService.AddOrEditContact(NameField ?? "", NickField ?? "", DescriptionField ?? "", ImageSource, userId, _contact);
         await NavigationService.GoBackAsync();
     }
 }