Esempio n. 1
0
        protected override bool Run(SimDescription me, bool singleSelection)
        {
            PerformanceCareer performer = me.OccupationAsPerformanceCareer;

            if (performer != null)
            {
                //me.OccupationAsPerformanceCareer.GivePerformerName (me.CreatedSim, false);
                string text2;
                if (string.IsNullOrEmpty(performer.StageName))
                {
                    string localizedString = StringTable.GetLocalizedString((!me.IsFemale) ? (performer.MaleGivenNameKeyBase + RandomUtil.GetInt(performer.GetNumberOfMaleGivenNames - 1).ToString()) : (performer.FemaleGivenNameKeyBase + RandomUtil.GetInt(performer.GetNumberFemaleGivenNames - 1).ToString()));
                    string text            = Common.LocalizeEAString(me.IsFemale, performer.FamilyNameKeyBase + RandomUtil.GetInt(performer.GetNumberOfFamilyNames - 1).ToString());
                    if (StringTable.GetLocale() == "ja-jp")
                    {
                        text2 = text + " " + localizedString;
                    }
                    else
                    {
                        text2 = localizedString + " " + text;
                    }
                }
                else
                {
                    text2 = performer.StageName;
                }
                string text3 = StringInputDialogRandom.Show(Common.LocalizeEAString("Ui/CreateNameUI:Title"), me.FullName + " (" + performer.CareerName + ")", text2, 27, StringInputDialog.Validation.TextOnly, false, new StringInputDialogRandom.RandomDelegate(performer.GetRandomStageName));
                if (!string.IsNullOrEmpty(text3))
                {
                    me.OccupationAsPerformanceCareer.StageName = text3;
                    me.CareerManager.UpdateCareerUI();
                    return(true);
                }
            }
            return(false);
        }
Esempio n. 2
0
        public static bool GetWindows(out Window newWindow, out Window oldWindow)
        {
            CASDresserSheet ths = CASDresserSheet.gSingleton;

            if (ths == null)
            {
                newWindow = null;
                oldWindow = null;
                return(false);
            }

            CASDresserSheet.ControlIDs newDS, oldDS;
            if (StringTable.GetLocale() != "en-us")
            {
                newDS = CASDresserSheet.ControlIDs.BackPanelBigLong;
                oldDS = CASDresserSheet.ControlIDs.BackPanelBig;
            }
            else
            {
                newDS = CASDresserSheet.ControlIDs.BackPanelSmallLong;
                oldDS = CASDresserSheet.ControlIDs.BackPanelSmall;
            }

            newWindow = ths.GetChildByID((uint)newDS, true) as Window;
            oldWindow = ths.GetChildByID((uint)oldDS, true) as Window;
            return(true);
        }