Beispiel #1
0
        private bool CanNoteBeAddedToRight(int column, int row)
        {
            NotesKey notesKeyOnLeft = GetNotesKeyOnleft(column, row);

            if (notesKeyOnLeft == null)
            {
                return(true);
            }

            Note noteOnLeft = GetNote(notesKeyOnLeft.Column, notesKeyOnLeft.Row);

            return(row >= noteOnLeft.Row + noteOnLeft.Duration - 1);
        }
Beispiel #2
0
        public int CompareTo(object obj)
        {
            int result;

            NotesKey otherNotesKey = obj as NotesKey;

            if (Column == otherNotesKey.Column)
            {
                result = Row < otherNotesKey.Row ? -1 : 1;
            }

            else
            {
                result = Column < otherNotesKey.Column ? -1 : 1;
            }

            return(result);
        }
Beispiel #3
0
        public void Delete(int column, int row)
        {
            NotesKey note = GetNotesKey(column, row);

            Notes.Remove(note);
        }