Beispiel #1
0
 private void OnItemSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (comboBoxItems.SelectedIndex != -1 && comboBoxItems.SelectedIndex != 0)
     {
         selectedItemID = (ushort)((ComboBoxItem)comboBoxItems.SelectedItem).Tag;
         UpdateResults();
     }
     else
     {
         listViewResults.Items.Clear();
         selectedTag = null;
     }
     buttonSeeResults.IsEnabled = false;
 }
        public ItemSearchResultsWindow(bool decorationMode)
        {
            InitializeComponent();

            this.selectedTag = null;
            this.decorationMode = decorationMode;
            if (decorationMode)
                Title = "Search Decorations";

            this.listViewResults.Items.Clear();
            this.pokemonHoldingItem = new List<IPokemon>();
            if (!DesignerProperties.GetIsInDesignMode(this)) {
                UpdateDecorationMode();
            }
        }
Beispiel #3
0
        public ItemSearchResultsWindow(bool decorationMode)
        {
            InitializeComponent();

            this.selectedTag    = null;
            this.decorationMode = decorationMode;
            if (decorationMode)
            {
                Title = "Search Decorations";
            }


            this.listViewResults.Items.Clear();
            this.pokemonHoldingItem = new List <IPokemon>();
            if (!DesignerProperties.GetIsInDesignMode(this))
            {
                UpdateDecorationMode();
            }
        }
Beispiel #4
0
        private void OnSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            int newIndex = listViewResults.SelectedIndex;

            if (newIndex != -1)
            {
                selectedTag = (ItemPocketGameTag)((Control)listViewResults.SelectedItem).Tag;
                buttonSeeResults.IsEnabled = true;
                if (selectedTag.GameIndex == -2)
                {
                    buttonSeeResults.Content = "See Results";
                }
                else
                {
                    buttonSeeResults.Content = "Goto";
                }
            }
            else
            {
                selectedTag = null;
                buttonSeeResults.IsEnabled = false;
            }
        }
 private void OnSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     int newIndex = listViewResults.SelectedIndex;
     if (newIndex != -1) {
         selectedTag = (ItemPocketGameTag)((Control)listViewResults.SelectedItem).Tag;
         buttonSeeResults.IsEnabled = true;
         if (selectedTag.GameIndex == -2)
             buttonSeeResults.Content = "See Results";
         else
             buttonSeeResults.Content = "Goto";
     }
     else {
         selectedTag = null;
         buttonSeeResults.IsEnabled = false;
     }
 }
 private void OnItemSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (comboBoxItems.SelectedIndex != -1 && comboBoxItems.SelectedIndex != 0) {
         selectedItemID = (ushort)((ComboBoxItem)comboBoxItems.SelectedItem).Tag;
         UpdateResults();
     }
     else {
         listViewResults.Items.Clear();
         selectedTag = null;
     }
     buttonSeeResults.IsEnabled = false;
 }