Ejemplo n.º 1
0
        public void AddDef(DetailCategory cat)
        {
            Def    newDef  = ParseHelper.MakeTypedObject(cat.subclassType) as Def;
            string newName = "0000NewDefPleaseChange";

            newDef.defName     = newName;
            newDef.label       = newName;
            newDef.description = newName;
            ParseHelper.AddToDefDatabase(newDef);
            ProfileManager.AddCommand("".Push().New(cat.subclassType));
            ProfileManager.AddCommand("".Push().Pop().Set(new { newDef.defName }).Find(newDef.defName));
            ProfileManager.AddCommand("".Push().Pop().Set(new { newDef.label }).Find(newDef.label));
            ProfileManager.AddCommand("".Push().Pop().Set(new { newDef.description }).Find(newDef.description));
            ProfileManager.AddCommand("".Add().Pop());
            AddNewDefToCat(newDef, cat);
            //cat.Recache();
        }