コード例 #1
0
        private void btnAddResistance_Click(object sender, RoutedEventArgs e)
        {
            AddResistanceValueWindow window = new AddResistanceValueWindow(null);

            if (window.ShowDialog(Application.Current.MainWindow))
            {
                player.Resistances.Add(window.Resistance);
            }
        }
コード例 #2
0
        private void EditSelectedResistance()
        {
            ResistanceValue resistance = (lvResistances.SelectedItem as ResistanceValue);

            if (resistance == null)
            {
                return;
            }

            AddResistanceValueWindow window = new AddResistanceValueWindow(resistance);

            if (window.ShowDialog(Application.Current.MainWindow))
            {
                resistance.Modifier    = window.Resistance.Modifier;
                resistance.DamageType  = window.Resistance.DamageType;
                resistance.Description = window.Resistance.Description;
            }
        }