private void ButtonMirage_Click(object sender, RoutedEventArgs e) { var charactor = ListBoxCharactor.SelectedItem as Charactor; if (charactor == null) { return; } var window = new ChoiceWindow(); window.Type = ChoiceWindow.eType.mirage; window.ID = charactor.ID; window.ShowDialog(); if (charactor.ID != window.ID) { Util.InitCharactor(charactor.Address); charactor.Clear(); } charactor.ID = window.ID; }
private void ButtonItem_Click(object sender, RoutedEventArgs e) { Item item = (sender as Button)?.DataContext as Item; if (item == null) { return; } var window = new ChoiceWindow(); window.ID = item.ID; window.ShowDialog(); item.ID = window.ID; if (item.ID == Util.NONE) { item.Count = 0; } else if (item.Count == 0) { item.Count = 1; } }
private void ButtonJewel_Click(object sender, RoutedEventArgs e) { Jewel jewel = (sender as Button)?.DataContext as Jewel; if (jewel == null) { return; } var window = new ChoiceWindow(); window.Type = ChoiceWindow.eType.jewel; window.ID = jewel.ID; window.ShowDialog(); jewel.ID = window.ID; if (jewel.ID == Util.NONE) { jewel.Count = 0; } else if (jewel.Count == 0) { jewel.Count = 1; } }