示例#1
0
        private void AddedBossesList_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            ListBox listBox = (ListBox)sender;

            if (listBox.SelectedIndex < 0)
            {
                return;
            }

            TargetBosses.RemoveAt(listBox.SelectedIndex);
            listBox.Items.RemoveAt(listBox.SelectedIndex);
            listBox.SelectedIndex = -1;
            ListChanged();
        }
示例#2
0
        private void AvailableBossesList_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            ListBox listBox = (ListBox)sender;

            if (listBox.SelectedIndex < 0)
            {
                return;
            }

            Boss boss = CreateMapPrompt.Map.StoredBosses[listBox.SelectedIndex];

            TargetBosses.Add(boss);
            AddedBossesList.Items.Add(boss);
            listBox.SelectedIndex = -1;
            ListChanged();
        }