Esempio n. 1
0
        public FileType(ICommandHandler commands, IAppName appName, IFileHandler fileHandler, IPersist persist)
        {
            Commands          = commands;
            AppName           = appName;
            FileHandler       = fileHandler;
            Persist           = persist;
            _data             = new Dictionary <string, string>();
            _tplFile          = new Dictionary <string, string>();
            _pathToSaveFile   = new Dictionary <string, string>();
            _currentDirectory = Directory.GetCurrentDirectory();

            Build();
        }
Esempio n. 2
0
        public StartSpotify(IAppName _appname, ISettingsProvider settingsProvider)
        {
            var settings = settingsProvider.GetSettings();

            Spotify.Initialize();
            if (!Spotify.Login(_appname.Name, settings.SpotifyUsername, settings.SpotifyPassword))
            {
                throw new Exception("Login failure");
            }

            while (!Spotify.Ready())
            {
                Thread.Sleep(100);
            }

            Spotify.SetBitrate(settings.Bitrate);

            if (settings.Normalization)
            {
                Spotify.Normalization = settings.Normalization;
            }
        }
 public AppDataLocationProvider(IAppName appname)
 {
     _appname = appname.Name;
 }
Esempio n. 4
0
 public ConfigureFileType(ICommandHandler commands, IAppName appName, IFileHandler fileHandler, IPersist persist)
     : base(commands, appName, fileHandler, persist)
 {
 }