Exemplo n.º 1
0
        private void Note_LeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            var BoxItem = (sender as ListBoxItem);
            var item    = BoxItem.Content as Note;

            if (item.isActive)
            {
                return;
            }

            var notelist = CurrentTrack.GetNotesRef(item.Key, item.Direction);
            var index    = CurrentTrack.GetNotesRef(item.Key, item.Direction).IndexOf(item);

            var newNote = new Note(item.Key, item.Direction)
            {
                Position = index,
                isActive = true
            };

            notelist[index] = newNote;

            UpdateTitle(true);

            e.Handled = true;
        }