Пример #1
0
        public IActionCommand buildCommand()
        {
            var command = new MultipleActionCommand();

            command.AddCommand(new AddMeasureToPartCom(attributes.Part, attributes.Measure));
            command.AddCommand(new AddChordToMeasureCom(attributes.Measure, attributes.Chord));
            return(command);
        }
Пример #2
0
        public IActionCommand buildCommand()
        {
            var command = new MultipleActionCommand();

            command.AddCommand(new RemoveChordFromMeasureCom(attributes.FirstMeasure, attributes.Chord));
            command.AddCommand(new ChangeChordPositionCom(attributes.Chord, (int)attributes.Position));
            command.AddCommand(new AddChordToMeasureCom(attributes.SecondMeasure, attributes.Chord));
            return(command);
        }
Пример #3
0
        public IActionCommand buildCommand()
        {
            var command = new MultipleActionCommand();

            command.AddCommand(new RemoveMeasureFromPartCom(attributes.Part, attributes.Measure));
            command.AddCommand(new ChangeMeasurePositionCom(attributes.Measure, (int)attributes.Position));
            command.AddCommand(new AddMeasureToPartCom(attributes.Part, attributes.Measure));
            return(command);
        }
Пример #4
0
        public IActionCommand buildCommand()
        {
            var command = new MultipleActionCommand();

            foreach (Measure measure in attributes.Measures)
            {
                command.AddCommand(new RemoveMeasureFromPartCom(attributes.Part, measure));
            }
            return(command);
        }
Пример #5
0
        public IActionCommand buildCommand()
        {
            var command = new MultipleActionCommand();

            foreach (Chord chord in attributes.Chords)
            {
                command.AddCommand(new ChangeChordLengthCom(attributes.Measure, chord, attributes.Length));
            }
            return(command);
        }
Пример #6
0
        public IActionCommand buildCommand()
        {
            var command = new MultipleActionCommand();

            foreach (Chord chord in attributes.Chords)
            {
                command.AddCommand(new RemoveChordFromMeasureCom(attributes.Measure, chord));
            }
            return(command);
        }
Пример #7
0
        public IActionCommand buildCommand()
        {
            if (attributes.Chord.ModelCollection.Count() == 1)
            {
                var command = new MultipleActionCommand();
                command.AddCommand(new RemoveNoteFromChordCom(attributes.Chord, attributes.Note));
                command.AddCommand(new RemoveChordFromMeasureCom(attributes.Measure, attributes.Chord));
                return(command);
            }

            return(new RemoveNoteFromChordCom(attributes.Chord, attributes.Note));
        }
Пример #8
0
        public IActionCommand buildCommand()
        {
            var command = new MultipleActionCommand();

            command.AddCommand(new RemoveNoteFromChordCom(attributes.FirstChord, attributes.Note));
            if (attributes.FirstChord.ModelCollection.Count() == 1)
            {
                command.AddCommand(new RemoveChordFromMeasureCom(attributes.FirstMeasure, attributes.FirstChord));
            }
            command.AddCommand(new ChangeNoteStringCom(attributes.Note, (int)attributes.NoteString));
            command.AddCommand(new AddChordToMeasureCom(attributes.SecondMeasure, attributes.SecondChord));
            command.AddCommand(new AddNoteToChordCom(attributes.SecondChord, attributes.Note));
            return(command);
        }
Пример #9
0
        public IActionCommand buildCommand()
        {
            var command = new MultipleActionCommand();

            foreach (Note note in attributes.Notes)
            {
                command.AddCommand(new RemoveNoteFromChordCom(attributes.Chord, note));
            }
            if (attributes.Chord.ModelCollection.Count() == attributes.Notes.Count)
            {
                command.AddCommand(new RemoveChordFromMeasureCom(attributes.Measure, attributes.Chord));
            }
            return(command);
        }
Пример #10
0
        public IActionCommand buildCommand()
        {
            var command = new MultipleActionCommand();

            command.AddCommand(new RemoveMultipleMeasuresFromPartCom(attributes.Part, attributes.Measures));

            int curr_position = (int)attributes.Position;

            foreach (Measure measure in attributes.Measures)
            {
                command.AddCommand(new ChangeMeasurePositionCom(measure, curr_position));
                curr_position++;
            }

            command.AddCommand(new AddMultipleMeasuresToPartCom(attributes.Part, attributes.Measures));
            return(command);
        }
Пример #11
0
        public IActionCommand buildCommand()
        {
            var command = new MultipleActionCommand();

            command.AddCommand(new RemoveMultipleChordsFromMeasureCom(attributes.FirstMeasure, attributes.Chords));

            int curr_position = (int)attributes.Position;

            foreach (Chord chord in attributes.Chords)
            {
                command.AddCommand(new ChangeChordPositionCom(chord, curr_position));
                curr_position++;
            }

            command.AddCommand(new AddMultipleChordsToMeasureCom(attributes.SecondMeasure, attributes.Chords));
            return(command);
        }