Exemplo n.º 1
0
        public LilypondViewModel(MainViewModel mainViewModel, MusicLoader musicLoader)
        {
            // TODO: Can we use some sort of eventing system so the managers layer doesn't have to know the viewmodel layer and viewmodels don't know each other?
            // And viewmodels don't
            _mainViewModel = mainViewModel;
            _musicLoader   = musicLoader;
            _musicLoader.LilypondViewModel = this;

            _text           = new LilypondText();
            _caretaker      = new LilypondTextCaretaker(_text);
            _movedInHistory = false;

            LilypondText = "Your lilypond text will appear here.";
            _caretaker.change();
            UndoCommand.RaiseCanExecuteChanged();
            RedoCommand.RaiseCanExecuteChanged();
        }
Exemplo n.º 2
0
 public LilypondTextCaretaker(LilypondText originator)
 {
     this.originator = originator;
     reset();
 }