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); }
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); }
public void Delete(int column, int row) { NotesKey note = GetNotesKey(column, row); Notes.Remove(note); }