상속: GalaSoft.MvvmLight.ObservableObject
        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"); });
        }
        public TrackToolbarViewModel(CurrentSongService currentSongService)
        {
            this.currentSongService = currentSongService;

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