Ejemplo n.º 1
0
 public bool validateAction()
 {
     if (chord is null || first_measure is null || second_measure is null || position == null)
     {
         return(false);
     }
     if (first_measure.Equals(second_measure))
     {
         if (chord.Position.Index == position)
         {
             return(false);
         }
         if (position > second_measure.getLastChordPosition())
         {
             return(false);
         }
     }
     else
     {
         if (position > second_measure.getLastChordPosition() + 1)
         {
             return(false);
         }
         if (second_measure.getSpaceTaken() + chord.Length.getLength() > second_measure.getTotalSpace())
         {
             return(false);
         }
     }
     return(true);
 }
Ejemplo n.º 2
0
        public bool validateAction()
        {
            if (home_measure is null || dest_measure is null || chords is null || !chords.Any() || position is null)
            {
                return(false);
            }
            foreach (Chord chord in chords)
            {
                if (!home_measure.ModelCollection.Contains(chord))
                {
                    return(false);
                }
            }

            if (position > dest_measure.getLastChordPosition() + 1)
            {
                return(false);
            }
            if (getNewSpaceTaken() > dest_measure.getTotalSpace())
            {
                return(false);
            }

            return(true);
        }
Ejemplo n.º 3
0
        public bool validateAction()
        {
            if (first_measure == null || second_measure == null || first_chord == null || second_chord == null || note == null || note_string == null)
            {
                return(false);
            }
            if (!first_measure.ModelCollection.Contains(first_chord))
            {
                return(false);
            }
            if (!first_chord.ModelCollection.Contains(note))
            {
                return(false);
            }
            if (second_chord.Position.Index < 0 || second_chord.Position.Index > second_measure.getLastChordPosition())
            {
                return(false);
            }
            if (second_measure.getSpaceTaken() + second_chord.Length.getLength() > second_measure.getTotalSpace())
            {
                return(false);
            }

            return(true);
        }
Ejemplo n.º 4
0
 public bool validateAction()
 {
     if (chord is null || measure is null)
     {
         return(false);
     }
     if (chord.Position.Index < 0 || chord.Position.Index > measure.getLastChordPosition() + 1)
     {
         return(false);
     }
     if (measure.getSpaceTaken() + chord.Length.getLength() > measure.getTotalSpace())
     {
         return(false);
     }
     return(true);
 }