Beispiel #1
0
        public override void mouseDragRelease(ReleaseClick click)
        {
            if (click.multipleMeasures() && !click.anyChord())
            {
                MeasurePositionClick pos_click = performMousePositionCheck(click);
                executor.executeChangeMultipleMeasurePosition(click, pos_click);
            }
            else if (click.anyMeasure() && !click.anyChord())
            {
                MeasurePositionClick pos_click = performMousePositionCheck(click);
                executor.executeChangeMeasurePosition(click, pos_click);
            }

            invokeClickDelegate(click);

            if (click.anyNote())
            {
                executor.executeChangeNotePositionNewMeasure(click);
            }
            else if (click.multipleChords())
            {
                executor.executeChangeMultipleChordPositionNewMeasure(click);
            }
            else if (click.anyChord())
            {
                executor.executeChangeChordPositionNewMeasure(click);
            }
        }
Beispiel #2
0
        public MeasurePositionClick performMousePositionCheck(MouseClick click)
        {
            var n_click = new MeasurePositionClick(click.Point);

            invokeClickDelegate(n_click);
            return(n_click);
        }
        public void executeAddMeasureToPart(NodeClick click, MeasurePositionClick pos_click)
        {
            //in the future, add selected bpm and time sig controls that auto update the selections, but for now,
            // simply use the part's
            Part part = click.PartNode.getPart();

            selections.BPM      = part.DefaultBPM;
            selections.NumBeats = part.TimeSignature.NumberOfBeats;
            selections.BeatType = part.TimeSignature.BeatType;
            selections.Position = (pos_click.MeasureSet) ? pos_click.Position : part.ModelCollection.Count();

            executeCommandBase(click, CommandType.AddMeasureToPart, UpdateType.UpdateMeasuresAtAndAfter, false, true);
        }
Beispiel #4
0
        public override void mouseClick(StandardClick click)
        {
            if (click.matchesSelectionType(Selection.Add_Measure))
            {
                MeasurePositionClick pos_click = performMousePositionCheck(click);
                executor.executeAddMeasureToPart(click, pos_click);
            }

            invokeClickDelegate(click);

            if (click.matchesSelectionType(Selection.Add_Rest))
            {
                executor.executeAddRestChordToPart(click);
            }
            else if (click.matchesSelectionType(Selection.Add_Note))
            {
                executor.executeAddNoteToPart(click);
            }
        }
        public void executeChangeMultipleMeasurePosition(NodeClick click, MeasurePositionClick pos_click)
        {
            selections.Position = (pos_click.MeasureSet) ? pos_click.Position : click.PartNode.getPart().ModelCollection.Count();

            executeCommandBase(click, CommandType.ChangeMultipleMeasurePosition, UpdateType.UpdatePart, true, true);
        }