Example #1
0
        private void ButtonChoiceTechnique_Click(object sender, RoutedEventArgs e)
        {
            Technique technique = (sender as Button)?.DataContext as Technique;

            ChoiceWindow dlg = new ChoiceWindow();

            dlg.Type = ChoiceWindow.eType.eTechnique;
            dlg.ID   = technique.ID;
            dlg.ShowDialog();

            if (dlg.ID == technique.ID)
            {
                return;
            }

            technique.Learning = false;
            technique.ID       = dlg.ID;
            technique.Learning = true;
        }
Example #2
0
        private void ButtonChoiceMagic_Click(object sender, RoutedEventArgs e)
        {
            Magic magic = (sender as Button)?.DataContext as Magic;

            ChoiceWindow dlg = new ChoiceWindow();

            dlg.Type = ChoiceWindow.eType.eMagic;
            dlg.ID   = magic.ID;
            dlg.ShowDialog();

            if (dlg.ID == magic.ID)
            {
                return;
            }

            magic.Learning = false;
            magic.ID       = dlg.ID;
            magic.Learning = true;
        }
Example #3
0
        private void ItemChoice(Item item, ChoiceWindow.eType type)
        {
            if (item == null)
            {
                return;
            }
            ChoiceWindow dlg = new ChoiceWindow();

            dlg.Type = type;
            dlg.ID   = item.ID;
            dlg.ShowDialog();

            if (dlg.ID == item.ID)
            {
                return;
            }

            item.Count = 0;
            item.ID    = dlg.ID;
            item.Count = 1;
        }