示例#1
0
 private void btnAddPokemon_Click(object sender, RoutedEventArgs e)
 {
     WindowAddPoke w = new WindowAddPoke();
     w.Owner = this;
     w.WindowStartupLocation = WindowStartupLocation.CenterOwner;
     w.ShowDialog();
     Pokemon p = w.SelectedPokemon;
     if (p != null)
     {
         PokeTab pt = new PokeTab(p);
         tcMain.Items.Add(pt);
         tcMain.SelectedItem = pt;
     }
 }
示例#2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            tcMain.Items.Clear();
            Program.FreeConsole();
            FocusManager.SetIsFocusScope(this, true);
            FocusManager.SetFocusedElement(this, this);

            #if DEBUG
            PokeTab pt = new PokeTab(Pokemon.FromContainedInternalName("eevee"));
                tcMain.Items.Add(pt);
                tcMain.SelectedItem = pt;
            #endif
        }