예제 #1
0
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            EditPowerWindow window = new EditPowerWindow(null);

            window.SetPowerType(PowerType);

            if (window.ShowDialog(Application.Current.MainWindow))
            {
                Power power = new Power(Player);

                window.UpdatePower(power);

                Player.Powers.Add(power);
            }
        }
예제 #2
0
        private void EditSelectedItem()
        {
            Power power = (lvMain.SelectedItem as Power);

            if (power == null)
            {
                return;
            }

            EditPowerWindow window = new EditPowerWindow(power);

            if (window.ShowDialog(Application.Current.MainWindow))
            {
                window.UpdatePower(power);
            }
        }