예제 #1
0
 private void OnSeeResultsClicked(object sender, RoutedEventArgs e)
 {
     if (selectedTag != null)
     {
         if (selectedTag.GameIndex == -2)
         {
             if (resultsWindow != null && !resultsWindow.IsClosed)
             {
                 resultsWindow.ShowResults(pokemonHoldingItem);
             }
             else
             {
                 resultsWindow = PokemonSearchResults.Show(PokeManager.ManagerWindow, pokemonHoldingItem);
             }
         }
         else if (!decorationMode)
         {
             PokeManager.ManagerWindow.GotoItem(selectedTag.GameIndex, selectedTag.ItemType, selectedItemID);
         }
         else
         {
             PokeManager.ManagerWindow.GotoDecoration(selectedTag.GameIndex, selectedTag.DecorationType, (byte)selectedItemID);
         }
     }
 }
예제 #2
0
        public static PokemonSearchResults Show(Window owner, List <IPokemon> results)
        {
            PokemonSearchResults window = new PokemonSearchResults();

            window.results = results;
            window.Owner   = owner;
            //results.Sort((p1, p2) => (((int)p2.HPIV + p2.AttackIV + p2.DefenseIV + p2.SpAttackIV + p2.SpDefenseIV + p2.SpeedIV) - ((int)p1.HPIV + p1.AttackIV + p1.DefenseIV + p1.SpAttackIV + p1.SpDefenseIV + p1.SpeedIV)));

            window.PopulateResults(results);
            window.Show();
            return(window);
        }
        private void OnSearchClicked(object sender, RoutedEventArgs e)
        {
            PokemonSearch searcher = new PokemonSearch();

            searcher.Search  = search;
            searcher.Results = results;
            searcher.SearchPokemon();
            if (ResultsWindow != null && !ResultsWindow.IsClosed)
            {
                ResultsWindow.ShowResults(searcher.Results);
            }
            else
            {
                ResultsWindow = PokemonSearchResults.Show(Owner, searcher.Results);
            }
        }
 private void OnSeeResultsClicked(object sender, RoutedEventArgs e)
 {
     if (selectedGameSave != null)
     {
         GamePokemonSearchResults results = GetMirageResults(selectedGameSave.GameSave);
         if (results != null)
         {
             if (resultsWindow != null && !resultsWindow.IsClosed)
             {
                 resultsWindow.ShowResults(results.ValidPokemon);
             }
             else
             {
                 resultsWindow = PokemonSearchResults.Show(Owner, results.ValidPokemon);
             }
         }
     }
 }
 private void OnSeeResultsClicked(object sender, RoutedEventArgs e)
 {
     if (selectedGameSave != null) {
         GamePokemonSearchResults results = GetMirageResults(selectedGameSave.GameSave);
         if (results != null) {
             if (resultsWindow != null && !resultsWindow.IsClosed)
                 resultsWindow.ShowResults(results.ValidPokemon);
             else
                 resultsWindow = PokemonSearchResults.Show(Owner, results.ValidPokemon);
         }
     }
 }
 private void OnSeeResultsClicked(object sender, RoutedEventArgs e)
 {
     if (selectedTag != null) {
         if (selectedTag.GameIndex == -2) {
             if (resultsWindow != null && !resultsWindow.IsClosed)
                 resultsWindow.ShowResults(pokemonHoldingItem);
             else
                 resultsWindow = PokemonSearchResults.Show(PokeManager.ManagerWindow, pokemonHoldingItem);
         }
         else if (!decorationMode) {
             PokeManager.ManagerWindow.GotoItem(selectedTag.GameIndex, selectedTag.ItemType, selectedItemID);
         }
         else {
             PokeManager.ManagerWindow.GotoDecoration(selectedTag.GameIndex, selectedTag.DecorationType, (byte)selectedItemID);
         }
     }
 }
        public static PokemonSearchResults Show(Window owner, List<IPokemon> results)
        {
            PokemonSearchResults window = new PokemonSearchResults();
            window.results = results;
            window.Owner = owner;
            //results.Sort((p1, p2) => (((int)p2.HPIV + p2.AttackIV + p2.DefenseIV + p2.SpAttackIV + p2.SpDefenseIV + p2.SpeedIV) - ((int)p1.HPIV + p1.AttackIV + p1.DefenseIV + p1.SpAttackIV + p1.SpDefenseIV + p1.SpeedIV)));

            window.PopulateResults(results);
            window.Show();
            return window;
        }