Esempio n. 1
0
        public MusicLoader(string syncDir, string token, long userId)
        {
            DependencyUtility.BuildUp(this);

            syncDirectory = syncDir;
            this.userId = userId;

            api = new VkApi();
            api.Authorize(token, userId);
            api.Invoke("stats.trackVisitor", new Dictionary<string, string>(), true); // статистика посещаемости приложения

            remoteAudioSizeHelper = new RemoteAudioSizeHelper(Path.Combine(AppPaths.SettingsPath, "sizes.dat"));

            tracks = new ConcurrentSortedList<int, Track>();

            int key = 0;
            foreach (var track in TrackRepository.GetTracks())
                tracks.Add(key++, track);
        }
Esempio n. 2
0
        public MusicLoader(string syncDir, string token, long userId)
        {
            DependencyUtility.BuildUp(this);

            syncDirectory = syncDir;
            this.userId   = userId;

            api = new VkApi();
            api.Authorize(token, userId);
            api.Invoke("stats.trackVisitor", new Dictionary <string, string>(), true); // статистика посещаемости приложения

            remoteAudioSizeHelper = new RemoteAudioSizeHelper(Path.Combine(AppPaths.SettingsPath, "sizes.dat"));

            tracks = new ConcurrentSortedList <int, Track>();

            int key = 0;

            foreach (var track in TrackRepository.GetTracks())
            {
                tracks.Add(key++, track);
            }
        }