public PlayerViewModel( AudioPlayerHelper helper, ICollectionService service, IAppSettingsHelper appSettingsHelper) { _helper = helper; _service = service; _appSettingsHelper = appSettingsHelper; if (!IsInDesignMode) { helper.TrackChanged += HelperOnTrackChanged; helper.PlaybackStateChanged += HelperOnPlaybackStateChanged; helper.Shutdown += HelperOnShutdown; _nextRelayCommand = new RelayCommand(NextSong); _prevRelayCommand = new RelayCommand(PrevSong); _playPauseRelayCommand = new RelayCommand(PlayPauseToggle); _timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1) }; _timer.Tick += TimerOnTick; } else { CurrentQueue = service.PlaybackQueue.FirstOrDefault(); PlayPauseIcon = Symbol.Play; } }
public CollectionService( ISqlService sqlService, ISqlService bgSqlService, IAppSettingsHelper appSettingsHelper, IDispatcherHelper dispatcher, IBitmapFactory bitmapFactory, IBitmapImage missingArtwork, string localFilePrefix, string artworkFilePath, string artistArtworkFilePath) { _bgSqlService = bgSqlService; _sqlService = sqlService; _dispatcher = dispatcher; _appSettingsHelper = appSettingsHelper; _bitmapFactory = bitmapFactory; _missingArtwork = missingArtwork; _localFilePrefix = localFilePrefix; _artworkFilePath = artworkFilePath; _artistArtworkFilePath = artistArtworkFilePath; Songs = new OptimizedObservableCollection <Song>(); Artists = new OptimizedObservableCollection <Artist>(); Albums = new OptimizedObservableCollection <Album>(); Playlists = new OptimizedObservableCollection <Playlist>(); PlaybackQueue = new OptimizedObservableCollection <QueueSong>(); ShufflePlaybackQueue = new OptimizedObservableCollection <QueueSong>(); }
/// <summary> /// Initializes a new instance of the <see cref="AuthnStateController"/> class. /// </summary> public AuthnStateController(AuthenticationClient client, IAppSettingsHelper appSettingsHelper, string userName) { this.authnClient = client; this.appSettingsHelper = appSettingsHelper; this.username = userName; this.signOnPolicyRegistryHelper = new SignOnPolicyRegistryHelper(); }
public AudioticaService( ICredentialHelper credentialHelper, IAppSettingsHelper appSettingsHelper, IDispatcherHelper dispatcherHelper, INotificationManager notificationManager) { _credentialHelper = credentialHelper; _appSettingsHelper = appSettingsHelper; _dispatcherHelper = dispatcherHelper; _notificationManager = notificationManager; var cred = _credentialHelper.GetCredentials("AudioticaCloud"); if (cred == null) { return; } AuthenticationToken = cred.GetPassword(); CurrentUser = _appSettingsHelper.ReadJsonAs <AudioticaUser>("AudioticaCloudUser"); var refreshCred = _credentialHelper.GetCredentials("AudioticaCloudRefreshToken"); if (refreshCred == null) { return; } _refreshToken = refreshCred.GetPassword(); }
public CollectionService( ISqlService sqlService, ISqlService bgSqlService, IAppSettingsHelper appSettingsHelper, IDispatcherHelper dispatcher, IBitmapFactory bitmapFactory, IBitmapImage missingArtwork, string localFilePrefix, string artworkFilePath, string artistArtworkFilePath) { _bgSqlService = bgSqlService; _sqlService = sqlService; _dispatcher = dispatcher; _appSettingsHelper = appSettingsHelper; _bitmapFactory = bitmapFactory; _missingArtwork = missingArtwork; _localFilePrefix = localFilePrefix; _artworkFilePath = artworkFilePath; _artistArtworkFilePath = artistArtworkFilePath; Songs = new OptimizedObservableCollection<Song>(); Artists = new OptimizedObservableCollection<Artist>(); Albums = new OptimizedObservableCollection<Album>(); Playlists = new OptimizedObservableCollection<Playlist>(); PlaybackQueue = new OptimizedObservableCollection<QueueSong>(); ShufflePlaybackQueue = new OptimizedObservableCollection<QueueSong>(); }
public PlayerViewModel( AudioPlayerHelper helper, ICollectionService service, IAppSettingsHelper appSettingsHelper) { _helper = helper; _service = service; _appSettingsHelper = appSettingsHelper; if (!IsInDesignMode) { helper.TrackChanged += HelperOnTrackChanged; helper.PlaybackStateChanged += HelperOnPlaybackStateChanged; helper.Shutdown += HelperOnShutdown; _nextRelayCommand = new RelayCommand(NextSong); _prevRelayCommand = new RelayCommand(PrevSong); _playPauseRelayCommand = new RelayCommand(PlayPauseToggle); _timer = new DispatcherTimer {Interval = TimeSpan.FromSeconds(1)}; _timer.Tick += TimerOnTick; } else { CurrentQueue = service.PlaybackQueue.FirstOrDefault(); PlayPauseIcon = Symbol.Play; } }
public QueueManager(IAppSettingsHelper appSettingsHelper) { _appSettingsHelper = appSettingsHelper; BackgroundMediaPlayer.Current.MediaOpened += Current_MediaOpened; BackgroundMediaPlayer.Current.MediaFailed += Current_MediaFailed; BackgroundMediaPlayer.Current.MediaEnded += Current_MediaEnded; }
public Mp3MatchEngine(IAppSettingsHelper settingsHelper, IAudioticaService audioticaService, INotificationManager notificationManager, IDispatcherHelper dispatcherHelper) { _audioticaService = audioticaService; _notificationManager = notificationManager; _dispatcherHelper = dispatcherHelper; _service = new Mp3SearchService(settingsHelper); }
public SettingViewModel(IAppSettingsHelper _helper, ICredentialHelper credential) { _appSettingsHelper = _helper; _credential = credential; //LoginClickRelay = new Command(LoginButtonClicked); Glyph = "\uE1E2"; LoginAsync(); }
public AudioticaCloudViewModel(IAudioticaService service, IAppSettingsHelper appSettingsHelper) { _appSettingsHelper = appSettingsHelper; this.Service = service; this.SignInCommand = new RelayCommand(this.SignInExecute); this.SignUpCommand = new RelayCommand(this.SignUpExecute); this.SubscribeCommand = new RelayCommand(this.SubscribeExecute); this.LogoutCommand = new RelayCommand(this.LogoutExecute); }
public DatabaseHelper( IDispatcherHelper dispatcher, IAppSettingsHelper appSettingsHelper, IBitmapFactory bitmapFactory) { _dispatcher = dispatcher; _appSettingsHelper = appSettingsHelper; _bitmapFactory = bitmapFactory; folderPath = Windows.Storage.ApplicationData.Current.LocalFolder.Path; }
public SiteSearchService(BaseLuceneSearcher searcher, NameValueCollection entryIndexSets = null, IAppSettingsHelper configHelper = null, IUmbracoTreeTraverser umbracoTree = null) { _searcher = entryIndexSets != null ? InitMultiIndexSearcher(searcher, entryIndexSets) : searcher; _configHelper = configHelper ?? new AppSettingsHelper(); _umbracoTree = umbracoTree ?? new UmbracoTreeTraverser(); }
public DbContext(IAppSettingsHelper helper) { if (helper == null) { throw new ArgumentNullException(nameof(helper)); } _settings = helper.Settings.MongoDB; _dbClient = new MongoClient(connectionString: _settings.ConnectionString); }
public Form1() { InitializeComponent(); userName = UserNameTextBox.Text; password = PasswordTextBox.Text; this.securityHelper = new SecurityHelper(userName, password); this.appSettingsHelper = new RegistryAppSettingsHelper(this.securityHelper); this.client = AuthenticationClientUtils.CreateAuthenticationClient(this.appSettingsHelper); this.stateController = new AuthnStateController(this.client, this.appSettingsHelper, userName); }
public QueueManager(IAppSettingsHelper appSettingsHelper, SystemMediaTransportControls transportControls) { _appSettingsHelper = appSettingsHelper; _transportControls = transportControls; UpdateScrobblerInstance(); _mediaPlayer = BackgroundMediaPlayer.Current; _mediaPlayer.MediaOpened += MediaPlayer_MediaOpened; _mediaPlayer.MediaEnded += MediaPlayer_MediaEnded; _mediaPlayer.CurrentStateChanged += mediaPlayer_CurrentStateChanged; _mediaPlayer.MediaFailed += mediaPlayer_MediaFailed; }
public CloudSyncService( MobileServiceClient mobileServiceClient, ICollectionService collectionService, IAppSettingsHelper appSettingsHelper, ISqlService sqlService, IDispatcherHelper dispatcherHelper) { _mobileServiceClient = mobileServiceClient; _collectionService = collectionService; _appSettingsHelper = appSettingsHelper; _sqlService = sqlService; _dispatcherHelper = dispatcherHelper; }
public SettingsViewModel(IScrobblerService service, ICredentialHelper credentialHelper, IAppSettingsHelper appSettingsHelper) { _service = service; _appSettingsHelper = appSettingsHelper; LoginClickRelay = new RelayCommand(LoginButtonClicked); DeveloperModeClickRelay = new RelayCommand(DeveloperModeExecute); var creds = credentialHelper.GetCredentials("lastfm"); if (creds == null) return; LastFmUsername = creds.GetUsername(); LastFmPassword = creds.GetPassword(); IsLoggedIn = true; }
public ClientService(IHostingHelper hostingHelper, IStringHelper stringHelper, IAppSettingsHelper appSettingsHelper) { this.appSettingsHelper = appSettingsHelper; this.stringHelper = stringHelper; validationItems = new Dictionary <string, List <ValidationItem> >(); pathToFile = hostingHelper.GetRootPath("App_Data\\clients.json"); using (TextReader reader = new StreamReader(pathToFile, Encoding.UTF8)) { clientItems = JsonConvert.DeserializeObject <Dictionary <string, ClientItem> >(reader.ReadToEnd()); } }
public PlayerViewModel(AudioPlayerHelper helper, ICollectionService service, RootViewModel root, SettingViewModel settingViewModel, Helpers.CollectionCommandHelper commands, IAppSettingsHelper appSettingsHelper, NowPlayingViewModel _nowPlaying) { _helper = helper; _service = service; _root = root; _commands = commands; _appSettingsHelper = appSettingsHelper; SettingViewModel = settingViewModel; NowPlaying = _nowPlaying; Add(); }
public AudioticaFactory( IDispatcherHelper dispatcher, IAppSettingsHelper appSettingsHelper, IBitmapFactory bitmapFactory) { this.dispatcher = dispatcher; this.appSettingsHelper = appSettingsHelper; this.bitmapFactory = bitmapFactory; #if __ANDROID__ folderPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal); #elif WINRT this.folderPath = Windows.Storage.ApplicationData.Current.LocalFolder.Path; #endif }
public SettingsViewModel(IScrobblerService service, ICredentialHelper credentialHelper, IAppSettingsHelper appSettingsHelper) { _service = service; _appSettingsHelper = appSettingsHelper; LoginClickRelay = new RelayCommand(LoginButtonClicked); DeveloperModeClickRelay = new RelayCommand(DeveloperModeExecute); var creds = credentialHelper.GetCredentials("lastfm"); if (creds == null) { return; } LastFmUsername = creds.GetUsername(); LastFmPassword = creds.GetPassword(); IsLoggedIn = true; }
public static CustomAuthnClient CreateAuthenticationClient(IAppSettingsHelper appSettingsHelper) { string urlDetails = appSettingsHelper.GetBaseUrl(); if (urlDetails != null) { OktaClientConfiguration oktaClientConfiguration = new OktaClientConfiguration { OktaDomain = urlDetails, }; var customClientParams = GetDefaultCustomClientParams(oktaClientConfiguration); CustomAuthnClient customAuthnClient = new CustomAuthnClient(customClientParams.Item1, customClientParams.Item2, customClientParams.Item3); return(customAuthnClient); } else { throw new Exception("Could not reach out registry to get okta base URL"); } }
public AudioticaService( ICredentialHelper credentialHelper, IAppSettingsHelper appSettingsHelper) : this(credentialHelper, appSettingsHelper, null, null) { }
public ManualMatchViewModel(IAppSettingsHelper appSettingsHelper, IDispatcherHelper dispatcherHelper) { this.dispatcherHelper = dispatcherHelper; searchService = new Mp3SearchService(appSettingsHelper); MessengerInstance.Register<Song>(this, "manual-match", ReceiveSong); }
public ManualMatchViewModel(IAppSettingsHelper appSettingsHelper, IDispatcherHelper dispatcherHelper) { this.dispatcherHelper = dispatcherHelper; searchService = new Mp3SearchService(appSettingsHelper); MessengerInstance.Register <Song>(this, "manual-match", ReceiveSong); }
public EventoReadOnlyRepository(IAppSettingsHelper appSettingsHelper) : base(appSettingsHelper) { }
public NHibernateBlogRepository(IAppSettingsHelper appSettingsHelper) { appSettings = appSettingsHelper; }
public ScrobblerHelper(IAppSettingsHelper appSettingsHelper, IScrobblerService scrobblerService) { _appSettingsHelper = appSettingsHelper; _service = scrobblerService; }
public AudioPlayerHelper(IAppSettingsHelper appSettings) { _appSettings = appSettings; }
public UsuarioReadOnlyRepository(IAppSettingsHelper appSettingsHelper) : base(appSettingsHelper) { }
public NHibernateConfigurator(IAppSettingsHelper appSettingsHelper) { this.appSettingsHelper = appSettingsHelper; }
public CaprimulgidaeContext() { appSettingsHelper = new AppSettingsHelper(); }
public AppVersionHelper(IAppSettingsHelper settingsHelper) { _appSettingsHelper = settingsHelper; }
public ReadOnlyRepository(IAppSettingsHelper appSettingsHelper) : base(appSettingsHelper.GetConnectionString()) { }
public FrameworkService(IHostingHelper hostingHelper, IAppSettingsHelper appSettingsHelper) { this.hostingHelper = hostingHelper; this.appSettingsHelper = appSettingsHelper; }
public Mp3SearchService(IAppSettingsHelper appSettingsHelper) { this._appSettingsHelper = appSettingsHelper; HtmlNode.ElementsFlags.Remove("form"); }
public CredentialHelper(IAppSettingsHelper appSettingsHelper) { _appSettingsHelper = appSettingsHelper; }
public DapperBlogRepository(IAppSettingsHelper appSettingsHelper) { appSettings = appSettingsHelper; }