public OptionsViewModel(HistoryService historyService) { _historyService = historyService; _outputPath = Settings.Default.OutputPath; _musePath = Settings.Default.MuseScoreExe; SaveCommand = new DelegateCommand(SaveOptions); DeleteEntryCommand = new DelegateCommand(DeleteEntry, () => SelectedHistoryEntry != null); }
public MainWindowViewModel() { _historyService = new HistoryService(); LoadMusicXMLFileCommand = new DelegateCommand(LoadMusicXMLFile, () => !IsBusy); ConvertMusicXMLFileCommand = new DelegateCommand(ConvertMusicXMLFile, () => IsEditingAllowed); SaveCurrentDocumentCommand = new DelegateCommand(SaveCurrentDocument, () => IsEditingAllowed); ShowOptionsCommand = new DelegateCommand(ShowOptions); HistorySelectionChangedCommand = new DelegateCommand<SelectionChangedEventArgs>(HistorySelectionChangedHandler, e => CurrentDocument != null); }