Пример #1
0
        public TrackListingViewModel(SongCollection songCollection, CurrentSongService currentSongService)
        {
            SongCollection          = songCollection;
            this.currentSongService = currentSongService;

            Messenger.Default.Register <bool>(this, "IsLoading", OnLoadingChange);
        }
Пример #2
0
        public MainToolbarViewModel(SongLoader songLoader, CurrentSongService currentSongService, PrintService printService, ExportImageService saveService)
        {
            LoadState               = new LoadState();
            this.printService       = printService;
            this.saveService        = saveService;
            this.currentSongService = currentSongService;

            SelectedGuitarPath = currentSongService.GuitarPath.Name;

            OpenFileCommand       = new RelayCommand(songLoader.OpenFile);
            LoadDiskTracksCommand = new RelayCommand(songLoader.LoadDiskTracks);
            LoadDLCTracksCommand  = new RelayCommand(songLoader.LoadDLCTracks);
            PrintCommand          = new RelayCommand <TabControl>(PrintTab);
            SaveCommand           = new RelayCommand <TabControl>(SaveTabImage);

            Messenger.Default.Register <SongChange>(this, (SongChange c) => { if (c == SongChange.Score)
                                                                              {
                                                                                  RaisePropertyChanged("IsATrackLoaded");
                                                                              }
                                                    });
        }
Пример #3
0
        public MainViewModel(CurrentSongService currentSongService)
        {
            this.currentSongService = currentSongService;

            Messenger.Default.Register <SongChange>(this, OnTrackChange);
        }