public void setProfile(ModelBengkel bengkel) { this.Dispatcher.Invoke(() => { nameTxtBox.setText(bengkel.name); string number = ""; if (bengkel.phone_number != null) { number = bengkel.phone_number.Substring(bengkel.phone_number.IndexOf('2') + 1); } phoneTxtBox.setText(number); emailTxtBox.setText(bengkel.email); addressTxtBox.setText(bengkel.address); if (bengkel.profile_picture != null) { picture.Source = new BitmapImage(new Uri(ApiConstant.BASE_URL + bengkel.profile_picture)); } }); }
public void setProfile(ModelBengkel bengkel) { this.Dispatcher.Invoke((Action)(() => { bengkelNameTxtBlock.setText(bengkel.name); bengkelEmailTxtBlock.setText(bengkel.email); if (bengkel.phone_number != null) { bengkelTelephoneTxtBlock.setText("+" + bengkel.phone_number); } else { bengkelTelephoneTxtBlock.setText("-"); } bengkelAddressTxtBlock.setText(bengkel.address); if (bengkel.profile_picture != null) { bengkelPicture.ImageSource = new BitmapImage(new Uri(ApiConstant.BASE_URL + bengkel.profile_picture)); } })); }