public MapViewModel(ISettingsStore settingsStore, ILocationService locationService, ITootFMServiceClient serviceClient) { _serviceClient = () => serviceClient; _settingsStore = settingsStore; this._locationService = locationService; MapCenter = this._locationService.TryToGetCurrentLocation(); }
public LoginViewModel(ISettingsStore settingsStore, ITootFMServiceClient serviceClient) { _serviceClient = () => serviceClient; _settingsStore = settingsStore; ClickCommand = new RelayCommand(() => { BrowserVisibility = true; UrlPage = string.Format( "https://foursquare.com/oauth2/authenticate?client_id={0}&response_type=token&redirect_uri={1}", AppSettings.FoursquareClientId, HttpUtility.UrlEncode(AppSettings.FoursquareRedirectUrl)); }); }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(ISettingsStore settingsStore, ILocationService locationService, ITootFMServiceClient serviceClient) { BackgroundAudioPlayer.Instance.PlayStateChanged += Instance_PlayStateChanged; StartSyncCommand = new RelayCommand(StartSync, () => !this.IsSynchronizing && !this.SettingAreNotConfigured); StopCommand = new RelayCommand(Stop); PlayCommand = new RelayCommand <ObsTrack>(Play); MapCommand = new RelayCommand(Map); Messenger.Default.Register <int>(this, "Play", SyncPlay); Messenger.Default.Register <Venue>(this, "ChangeLocation", BindingCheckin); _serviceClient = () => serviceClient; _settingsStore = settingsStore; this._locationService = locationService; _locationService.StartWatcher(); this._settingsStore.UserChanged += SettingsStoreUserChanged; if (SettingAreConfigured) { Refresh(); } else { IsLoginPopupOpen = true; } }