Example #1
0
 protected static void MoveSubscriber(object sender, MoveArgs args)
 {
     raised++;
     moveargs = args;
 }
        private void MoveNote(object sender, MoveArgs args)
        {
            var note = (NoteViewModel)sender;
            var notes = note.Type == NoteType.Positive ? PositiveNotes : NegativeNotes;
            int index = notes.IndexOf(note);

            if (args.MoveDirection == MoveArgs.Direction.UP && index != 0)
                notes.UpdateNotePosition(index, --index);

            if (args.MoveDirection == MoveArgs.Direction.DOWN && index != notes.LastIndex())
                notes.UpdateNotePosition(index, ++index);
        }