Esempio n. 1
0
        private void ContextRemoveItemFromUpgradeList_Click(object sender, RoutedEventArgs e)
        {
            UpgradesComparison uc = MainPage.Instance.DG_UpgradesComparison;

            if (uc == null)
            {
                NameGrid_MouseLeftButtonUp(null, null); return;
            }
            foreach (CharacterSlot slot in Character.EquippableCharacterSlots)
            {
                // Fix it each of the slot calcs
                if (slot == CharacterSlot.Finger2 || slot == CharacterSlot.Trinket2 || slot == CharacterSlot.Tabard || slot == CharacterSlot.Shirt)
                {
                    continue;
                }
                string key = "Gear." + slot.ToString();
                List <Optimizer.ComparisonCalculationUpgrades> list = uc.itemCalculations[key].ToList();
                list.RemoveAll(gg => gg.ItemInstance == this.ItemInstance);
                uc.itemCalculations[key] = list.ToArray();
            }
            {
                // Fix it in the All calcs
                string key = "Gear.All";
                List <Optimizer.ComparisonCalculationUpgrades> list = uc.itemCalculations[key].ToList();
                list.RemoveAll(gg => gg.ItemInstance == this.ItemInstance);
                uc.itemCalculations[key] = list.ToArray();
            }
            uc.UpdateGraph();
        }
Esempio n. 2
0
 private void optimizer_ComputeUpgradesCompleted(object sender, ComputeUpgradesCompletedEventArgs e)
 {
     if (e.Cancelled)
     {
         ControlsEnabled(true);
     }
     else
     {
         AltProgress.Value = MainProgress.Value = 100;
         UpgradesComparison upgrades = new UpgradesComparison(e.Upgrades, null);
         Close();
         upgrades.Show();
     }
 }
Esempio n. 3
0
		void batchTools_UpgradeListCompleted(object sender, EventArgs e)
		{
			UpgradesComparison upgrades = new UpgradesComparison(batchTools.Upgrades, batchTools.CustomSubpoints);
			upgrades.Show();
		}
Esempio n. 4
0
        void batchTools_UpgradeListCompleted(object sender, EventArgs e)
        {
            UpgradesComparison upgrades = new UpgradesComparison(batchTools.Upgrades, batchTools.CustomSubpoints);

            upgrades.Show();
        }
 private void optimizer_ComputeUpgradesCompleted(object sender, ComputeUpgradesCompletedEventArgs e)
 {
     if (e.Cancelled) ControlsEnabled(true);
     else
     {
         AltProgress.Value = MainProgress.Value = 100;
         UpgradesComparison upgrades = new UpgradesComparison(e.Upgrades, null);
         Close();
         upgrades.Show();
     }
 }
Esempio n. 6
0
        private void OpenSavedUpgradeList(object sender, RoutedEventArgs args)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = "Rawr Upgrade List Files|*.xml";
            if (ofd.ShowDialog().GetValueOrDefault())
            {
                DG_UpgradesComparison = new UpgradesComparison
#if SILVERLIGHT
                    (ofd.File.OpenText());
#else
                    (new StreamReader(ofd.OpenFile()));
#endif
                DG_UpgradesComparison.Closed += new EventHandler(DG_UpgradesComparison_Closed);
                DG_UpgradesComparison.Show();
            }
        }