private void RemoveClicked(object sender, RoutedEventArgs e) { //Sim.SetStepSetting(Settings.CurrentStep, null); DialogResult = false; Close(); Sim.ExecuteActions(); }
private void ApplyClicked(object sender, RoutedEventArgs e) { DialogResult = true; //Sim.SetStepSetting(Settings.CurrentStep, Settings); Close(); Sim.ExecuteActions(); }
private void ApplyFoodBuffs() { Sim.CraftsmanshipBuff = 0; Sim.ControlBuff = 0; Sim.MaxCPBuff = 0; int currentCraftsmanship = Sim.Craftsmanship; int currentControl = Sim.Control; int currentMaxCP = Sim.MaxCP; if (CheckBoxIsSpecialist.IsChecked == true) { Sim.CraftsmanshipBuff += 20; Sim.ControlBuff += 20; Sim.MaxCPBuff += 15; } if (SelectedFood != null) { Dispatcher.Invoke(() => ButtonFood.Content = (FoodIsHQ ? "HQ" : "NQ") + ' ' + SelectedFood.Name); Sim.CraftsmanshipBuff += SelectedFood.FoodInfo.GetCraftsmanshipBuff(currentCraftsmanship, FoodIsHQ); Sim.ControlBuff += SelectedFood.FoodInfo.GetControlBuff(currentControl, FoodIsHQ); Sim.MaxCPBuff += SelectedFood.FoodInfo.GetMaxCPBuff(currentMaxCP, FoodIsHQ); } else { Dispatcher.Invoke(() => ButtonFood.Content = "None"); } if (SelectedTea != null) { Dispatcher.Invoke(() => ButtonTea.Content = (TeaIsHQ ? "HQ" : "NQ") + ' ' + SelectedTea.Name); Sim.CraftsmanshipBuff += SelectedTea.FoodInfo.GetCraftsmanshipBuff(currentCraftsmanship, TeaIsHQ); Sim.ControlBuff += SelectedTea.FoodInfo.GetControlBuff(currentControl, TeaIsHQ); Sim.MaxCPBuff += SelectedTea.FoodInfo.GetMaxCPBuff(currentMaxCP, TeaIsHQ); } else { Dispatcher.Invoke(() => ButtonTea.Content = "None"); } Sim.ExecuteActions(); }