Ejemplo n.º 1
0
        private void buttonAddCharacter_Click(object sender, RoutedEventArgs e)
        {
            EVECharacter       newCharacter = new EVECharacter();
            AddCharacterWindow acw          = new AddCharacterWindow(newCharacter);

            acw.ShowDialog();

            if (acw.DialogResult.HasValue && acw.DialogResult.Value)
            {
                // user clicked Go
                EVECharacter existing = App.Settings.FindEVECharacter(acw.UseSingularity, acw.CharacterName);
                if (existing != null)
                {
                    existing.EVEAccount = acw.Account;
                }
                else
                {
                    // no existing.
                    App.Settings.Characters.Add(newCharacter);
                }

                App.Settings.Store();
            }
        }
 public AddCharacterWindow(EVECharacter editCharacter)
 {
     Character = editCharacter;
     InitializeComponent();
 }