Exemplo n.º 1
0
        public bool validateAction()
        {
            if (measure is null || chords is null || !chords.Any() || length is null)
            {
                return(false);
            }
            if (length is TupleLength && !validateTuple(length as TupleLength))
            {
                return(false);
            }
            foreach (Chord chord in chords)
            {
                if (!measure.ModelCollection.Contains(chord))
                {
                    return(false);
                }
            }

            if (getSpaceTaken() > measure.getTotalSpace())
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 2
0
 public bool validateAction()
 {
     if (measure == null || chords == null || chords.Count <= 1 || new_lengths == null || !new_lengths.Any() || type == TupletType.None)
     {
         return(false);
     }
     if (chords.Count != new_lengths.Count)
     {
         return(false);
     }
     foreach (Chord chord in chords)
     {
         if (!measure.ModelCollection.Contains(chord))
         {
             return(false);
         }
     }
     if (!canCreateTuple())
     {
         return(false);
     }
     if (measure.getSpaceTaken() - getPreivousLength() + getNextLength() > measure.getTotalSpace())
     {
         return(false);
     }
     return(true);
 }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
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);
 }
Exemplo n.º 5
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);
        }
Exemplo n.º 6
0
 public bool validateAction()
 {
     if (part == null || measure == null || chord == null)
     {
         return(false);
     }
     if (chord.Length.getLength() >= measure.getTotalSpace())
     {
         return(false);
     }
     return(true);
 }
Exemplo n.º 7
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);
 }
Exemplo n.º 8
0
        public bool validateAction()
        {
            if (measure is null || chord is null || length is null)
            {
                return(false);
            }
            if (length is TupleLength && !validateTuple(length as TupleLength))
            {
                return(false);
            }

            if (measure.getSpaceTaken() - chord.Length.getLength() + length.getLength() > measure.getTotalSpace())
            {
                return(false);
            }
            return(true);
        }