Esempio n. 1
0
        private void EvaluateUpgrade(object sender, RoutedEventArgs e)
        {
            OptimizeWindow optimizer = new OptimizeWindow(Character);

            optimizer.Show();
            optimizer.EvaluateUpgrades(ItemInstance.Item);
        }
Esempio n. 2
0
        private void EvaluateUpgrade(object sender, RoutedEventArgs e)
        {
            OptimizeWindow optimizer = new OptimizeWindow(Character);

            optimizer.Show();
            optimizer.EvaluateUpgrades(new Optimizer.SuffixItem()
            {
                Item = SelectedItemInstance.Item, RandomSuffixId = SelectedItemInstance.RandomSuffixId
            });
        }
Esempio n. 3
0
        private void ContextList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ListBoxItem contextItem = ContextList.SelectedItem as ListBoxItem;

            if (ContextList.SelectedIndex > 1)
            {
                if (contextItem == ContextEdit)
                {
                    new ItemEditor()
                    {
                        CurrentItem = SelectedItemInstance.Item
                    }.Show();
                }
                else if (contextItem == ContextEquip)
                {
                    Character[Slot] = SelectedItemInstance;
                }

                /*else if (contextItem == ContextOpenWowhead)
                 * {
                 *  System.Windows.Browser.HtmlPage.Window.Navigate(new Uri("http://www.wowhead.com/?item=" + SelectedItemInstance.Id), "_blank");
                 * }*/
                else if (contextItem == ContextAddCustom)
                {
                    CustomItemInstance custom = new CustomItemInstance(Character, SelectedItemInstance);
                    custom.Closed += new EventHandler(custom_Closed);
                    custom.Show();
                }
                else if (contextItem == ContextRefreshArmory)
                {
                    Item.LoadFromId(SelectedItemInstance.Id, true, true, false, false);
                }
                else if (contextItem == ContextRefreshWowhead)
                {
                    Item.LoadFromId(SelectedItemInstance.Id, true, true, true, false);
                }
                else if (contextItem == ContextDeleteCustom)
                {
                    Character.CustomItemInstances.Remove(selectedItemInstance);
                    ItemCache.OnItemsChanged();
                }
                else if (contextItem == ContextEvaluateUpgrade)
                {
                    OptimizeWindow optimizer = new OptimizeWindow(Character);
                    optimizer.Show();
                    optimizer.EvaluateUpgrades(new Optimizer.SuffixItem()
                    {
                        Item = SelectedItemInstance.Item, RandomSuffixId = SelectedItemInstance.RandomSuffixId
                    });
                }
                IsOpen = false;
            }
        }
Esempio n. 4
0
        private void EvaluateUpgrade(object sender, RoutedEventArgs e)
        {
#if SILVERLIGHT
            OptimizeWindow optimizer = new OptimizeWindow(Character);
            optimizer.Show();
            optimizer.EvaluateUpgrades(new Optimizer.SuffixItem()
            {
                Item = ItemInstance.Item, RandomSuffixId = ItemInstance.RandomSuffixId
            });
#else
            // in WPF show blocks until window is closed
            OptimizeWindow optimizer = new OptimizeWindow(Character);
            optimizer.EvaluateUpgrades(new Optimizer.SuffixItem()
            {
                Item = ItemInstance.Item, RandomSuffixId = ItemInstance.RandomSuffixId
            });
            optimizer.Show();
#endif
        }
 private void EvaluateUpgrade(object sender, RoutedEventArgs e)
 {
     OptimizeWindow optimizer = new OptimizeWindow(Character);
     optimizer.Show();
     optimizer.EvaluateUpgrades(new Optimizer.SuffixItem() { Item = SelectedItemInstance.Item, RandomSuffixId = SelectedItemInstance.RandomSuffixId });
 }
 private void ContextList_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     ListBoxItem contextItem = ContextList.SelectedItem as ListBoxItem;
     if (ContextList.SelectedIndex > 1)
     {
         if (contextItem == ContextEdit)
         {
             new ItemEditor() { CurrentItem = SelectedItemInstance.Item }.Show();
         }
         else if (contextItem == ContextEquip)
         {
             Character[Slot] = SelectedItemInstance;
         }
         /*else if (contextItem == ContextOpenWowhead)
         {
             System.Windows.Browser.HtmlPage.Window.Navigate(new Uri("http://www.wowhead.com/?item=" + SelectedItemInstance.Id), "_blank");
         }*/
         else if (contextItem == ContextAddCustom)
         {
             CustomItemInstance custom = new CustomItemInstance(Character, SelectedItemInstance);
             custom.Closed += new EventHandler(custom_Closed);
             custom.Show();
         }
         else if (contextItem == ContextRefreshArmory)
         {
             Item.LoadFromId(SelectedItemInstance.Id, true, true, false, false);
         }
         else if (contextItem == ContextRefreshWowhead)
         {
             Item.LoadFromId(SelectedItemInstance.Id, true, true, true, false);
         }
         else if (contextItem == ContextDeleteCustom)
         {
             Character.CustomItemInstances.Remove(selectedItemInstance);
             ItemCache.OnItemsChanged();
         }
         else if (contextItem == ContextEvaluateUpgrade)
         {
             OptimizeWindow optimizer = new OptimizeWindow(Character);
             optimizer.Show();
             optimizer.EvaluateUpgrades(new Optimizer.SuffixItem() { Item = SelectedItemInstance.Item, RandomSuffixId = SelectedItemInstance.RandomSuffixId });
         }
         IsOpen = false;
     }
 }
        private void EvaluateUpgrade(object sender, RoutedEventArgs e)
        {
#if SILVERLIGHT
            OptimizeWindow optimizer = new OptimizeWindow(Character);
            optimizer.Show();
            optimizer.EvaluateUpgrades(new Optimizer.SuffixItem() { Item = ItemInstance.Item, RandomSuffixId = ItemInstance.RandomSuffixId });
#else
            // in WPF show blocks until window is closed
            OptimizeWindow optimizer = new OptimizeWindow(Character);
            optimizer.EvaluateUpgrades(new Optimizer.SuffixItem() { Item = ItemInstance.Item, RandomSuffixId = ItemInstance.RandomSuffixId });
            optimizer.Show();
#endif
        }