Ejemplo n.º 1
0
        private void AddFile(string e)
        {
            MusicService musicservice = new MusicService();
            var          _music       = musicservice.AddTestMusic(e);

            this.musics.Add(_music);
        }
Ejemplo n.º 2
0
        public PlayButtonListViewModel()
        {
            BASS.BASS_Init(-1, 44100, BASSInitFlags.BASS_DEVICE_DEFAULTS, IntPtr.Zero);
            this.musics = new ObservableCollection <Music>();

            _eventAggregator.GetEvent <MusicAddFileEvent>().Subscribe(e => AddFile(e));


            MusicService musicservice = new MusicService();
            var          _music       = musicservice.AddTestMusic(@"D:\CodeBase\音效软件\Win32\Debug\单车.mp3");

            this.musics.Add(_music);

            _music = musicservice.AddTestMusic(@"D:\CodeBase\音效软件\Win32\Debug\苦瓜.mp3");
            this.musics.Add(_music);
        }