Example #1
0
        private void PlaceHouseholdEx(UIBinInfo householdInfo, ulong lotId)
        {
            try
            {
                if (householdInfo != null)
                {
                    if ((!Mover.Settings.mFreeRealEstate) && (!EditTownModelEx.PayForLot(mModel as EditTownModel, householdInfo, lotId)))
                    {
                        WarnInsufficientFunds(householdInfo);
                        return;
                    }

                    if (mFrom == InfoSource.Clipboard)
                    {
                        EditTownModelEx.PlaceFromGameBin(mModel as EditTownModel, householdInfo, lotId, PlaceAction.MoveIn);
                    }
                    else
                    {
                        EditTownModelEx.PlaceFromExportBin(mModel as EditTownModel, householdInfo, lotId, PlaceAction.MoveIn);
                    }
                    mModel.SetCurrentSelection(null, InfoSource.Unknown);
                }

                EditTownTool.CurrentTool = EditTownDefaultTool.Instance;
            }
            catch (Exception e)
            {
                Common.Exception("PlaceHouseholdEx", e);
            }
        }
Example #2
0
 private void PlaceHouseholdTaskEx(object lotInfoParam)
 {
     try
     {
         UIBinInfo info = lotInfoParam as UIBinInfo;
         if ((info != null) && (info.LotId != ulong.MaxValue))
         {
             EditTownModelEx.PlaceFromExportBin(mModel as EditTownModel, mInfo, info.LotId, PlaceAction.MoveIn);
             mModel.SetCurrentSelection(null, InfoSource.Unknown);
             mPlacing = false;
             EditTownTool.CurrentTool = EditTownDefaultTool.Instance;
         }
         else
         {
             mPlacing = false;
         }
     }
     catch (Exception e)
     {
         Common.Exception("PlaceHouseholdTaskEx", e);
     }
 }