コード例 #1
0
 public PlaceDetailPage(Place place)
 {
     _place             = place;
     _parse             = DependencyService.Get <IParse> ();
     _user              = _parse.GetCurrentUser();
     _reviewsCollection = new ObservableCollection <Review> ();
     InitializeComponents();
     LoadData().ConfigureAwait(false);
 }
コード例 #2
0
ファイル: LoginPage.cs プロジェクト: jovelbarrera/Starving
 public async void FacebookLoginCallback(bool success)
 {
     if (success)
     {
         User currentUser = _parseService.GetCurrentUser();
         App.Current.MainPage = new MainPage();
     }
     else
     {
         EnableControls();
         await DisplayAlert(AppConfig.ApplicationName, "Facebook acount was not linked", "OK");
     }
 }
コード例 #3
0
        protected override void OnBindingContextChanged()
        {
            base.OnBindingContextChanged();

            Place place = this.BindingContext as Place;

            _place = place;

            if (_place == null)
            {
                return;
            }

            _parse = DependencyService.Get <IParse> ();
            _user  = _parse.GetCurrentUser();

            _nameLabel.Text     = _place.Name;
            _vicinityLabel.Text = _place.Vicinity;
            LoadData().ConfigureAwait(false);
        }