Beispiel #1
0
        public DetailsViewModel(IDataService dataService, INavigationService navigationService, IMapLauncher mapLauncher, IShareSource shareSource)
        {
            this.dataService       = dataService;
            this.navigationService = navigationService;
            this.mapLauncher       = mapLauncher;
            this.shareSource       = shareSource;
            this.Photos            = new ObservableCollection <PhotoViewModel>();
            this.Reviews           = new ObservableCollection <ReviewViewModel>();
            this.ShowDirections    = new RelayCommand(this.OnShowDirectionsExecuted);
            this.NavigateToMap     = new RelayCommand(this.OnNavigateToMapExecuted);
            this.Share             = new ShareCafeCommand(this.shareSource);
            new ReviewViewModel(this.dataService);

#if DEBUG
            if (this.IsInDesignMode)
            {
                this.cafeId = "2";
                this.Populate();
            }
#endif
        }
        public DetailsViewModel(IDataService dataService, INavigationService navigationService, IIdentityService identityService, IMapLauncher mapLauncher, IShareSource shareSource)
        {
            this.dataService = dataService;
            this.navigationService = navigationService;
            this.identityService = identityService;
            this.mapLauncher = mapLauncher;
            this.shareSource = shareSource;
            this.Photos = new ObservableCollection<PhotoViewModel>();
            this.Reviews = new ObservableCollection<ReviewViewModel>();
            this.AuthenticateUsingWindows = new RelayCommand(this.OnAuthenticateUsingWindowsExecuted);
            this.ShowDirections = new RelayCommand(this.OnShowDirectionsExecuted);
            this.NavigateToMap = new RelayCommand(this.OnNavigateToMapExecuted);
            this.Share = new ShareCafeCommand(this.shareSource);
            this.CurrentIdentityReview = new ReviewViewModel(this.dataService, this.identityService);

#if DEBUG
            if (this.IsInDesignMode)
            {
                this.cafeId = "2";
                this.Populate();
            }
#endif
        }
 public ShareCafeCommand(IShareSource shareSource)
 {
     this.shareSource = shareSource;
 }
 public ShareCafeCommand(IShareSource shareSource)
 {
     this.shareSource = shareSource;
 }