private static void OnAcceptHousehold(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { CASPuck ths = CASPuck.Instance; Sims3.UI.Function f = null; if (!ths.mUiBusy && !ths.mAttemptingToAddSim) { ths.mUiBusy = true; if (f == null) { f = delegate { CASController.Singleton.SetCurrentState(CASState.Summary); if (ths.ShowRequiredItemsDialogTask()) { ths.AcceptHouseholdCallback(); } else { ths.mUiBusy = false; } }; } Simulator.AddObject(new Sims3.UI.OneShotFunctionTask(f)); } eventArgs.Handled = true; } catch (Exception e) { Common.Exception("OnAcceptHousehold", e); } }
public static void OnAcceptHousehold(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { CASPuck ths = CASPuck.Instance; if (!ths.UiBusy && !ths.mAttemptingToAddSim) { Sims.CASBase.StoreChanges(); ths.UiBusy = true; Common.FunctionTask.Perform(delegate { if (Responder.Instance.CASModel.Species == CASAgeGenderFlags.Human) { CASController.Singleton.SetCurrentState(CASState.Summary); } else { CASController.Singleton.SetCurrentState(CASState.PetSummary); } if (ShowRequiredItemsDialogTask(ths)) { ths.AcceptHouseholdCallback(); } else { ths.UiBusy = false; } /* * // Custom * if (ShowRequiredItemsDialogTask(ths)) * { * AcceptHouseholdCallback(ths); * } * else * { * ths.UiBusy = false; * } */ }); } eventArgs.Handled = true; } catch (Exception exception) { Common.Exception("OnAcceptHousehold", exception); } }