Beispiel #1
0
        public override void Execute()
        {
            var instrument = InstrumentsModel.GetEditedInstrument();

            instrument.NoteRowDefs.Remove(EditedRowId);
            instrument.NoteRowDefs[NewRowDef.Note.Id] = NewRowDef;

            InstrumentNoteRowDefsChangedSignal.Dispatch();
        }
        public override void Execute()
        {
            var instrument = InstrumentsModel.GetEditedInstrument();

            if (instrument == null)
            {
                Debug.LogError($"<color=\"aqua\">DeleteNoteRowCommand.Execute() : NO EDITED INSTRUMENT</color>");
                return;
            }

            instrument.NoteRowDefs.Remove(Note.Id);

            InstrumentNoteRowDefsChangedSignal.Dispatch();
        }
        public override void Execute()
        {
            var editedInstrument = InstrumentsModel.GetEditedInstrument();

            // TODO noterow exists, overwrite? dialog
            if (editedInstrument.NoteRowDefs.ContainsKey(NoteDef.Note.Id))
            {
                Debug.LogError($"<color=\"aqua\">AddNoteDefCommand.Execute() : NoteDef {NoteDef.Note.Id} already exists!</color>");
                return;
            }
            //var noteId = NoteStringHelper.GetNoteIndex(NoteDef.Note);
            editedInstrument.NoteRowDefs[NoteDef.Note.Id] = NoteDef;

            InstrumentNoteRowDefsChangedSignal.Dispatch();
        }