コード例 #1
0
 public void Play()
 {
     selectedList = new PlayList(0, null);
     if (selectedModels.Count == 0)
         selectedList = playlist;
     else
     {
         foreach(Composition comp in selectedModels)
         {
             selectedList.AddComposition(comp);
         }
     }
    // ButtonEnabled = false;
     selectedList.IsStop = false;
     NotifyPropertyChanged("ButtonEnabled");
     selectedList.Complete += Stop;
     selectedList.GetProcessLength += Process;
     selectedList.Step += Step;
     selectedList.Reset += Reset;
     thread = new Thread(selectedList.Play);
     thread.IsBackground = true;
     thread.Start();
     PlayCommand = new Command(action => Pause());
     NotifyPropertyChanged("PlayCommand");
     PlayButtonContent = "Pause";
     NotifyPropertyChanged("PlayButtonContent");
 }
コード例 #2
0
 public CompositionLoader(ObservableCollection<Composition> library,ObservableCollection<BaseViewModel> viewModel)
 {
     AddCommand = new Command(action => Add());
     DeleteCommand = new Command(action => Delete());
     AddPlayListCommand = new Command(action => AddPlayList());
     this.library = library;
     this.viewModels = viewModel;
     header = "Library";
 }
コード例 #3
0
 private void Stop(bool stop)
 {
     // ButtonEnabled = true;
     PlayCommand = new Command(action => Play());
     NotifyPropertyChanged("PlayCommand");
     PlayButtonContent = "Play";
     NotifyPropertyChanged("PlayButtonContent");
     thread.Abort();
 }
コード例 #4
0
 public PlayListViewModel(PlayList playList,string name)
 {
     Maximum = 5;
     
     ButtonEnabled = true;
     PlayCommand = new Command(action => Play());
     StopCommand = new Command(action => Stop());
     PlayButtonContent = "Play";
     this.playlist = playList;
     header = name;
 }
コード例 #5
0
 private void Resume()
 {
     selectedList.IsPause = false;
     PlayCommand = new Command(action => Pause());
     NotifyPropertyChanged("PlayCommand");
     PlayButtonContent = "Pause";
     NotifyPropertyChanged("PlayButtonContent");
 }