Exemple #1
0
        public void XmlSettingsLoad(XmlSettings aSettings, string aCategory)
        {
            Clear();
            //
            int count = aSettings.Load(aCategory, "__Count", 0);

            for (int i = 0; i < count; i++)
            {
                try
                {
                    // Create category name and try to obtain it...
                    string             entityCategory = string.Format("DbgEntity_{0:d5}", i);
                    XmlSettingCategory category       = aSettings[entityCategory];
                    if (category != null)
                    {
                        // Make a new entity object based upon the type
                        DbgEntityDescriptorManager descManager = Engine.DescriptorManager;
                        DbgEntity entity = descManager.Create(category);
                        if (entity != null)
                        {
                            SaveEntity(entity);
                        }
                    }
                }
                catch (Exception)
                {
                }
            }
        }
Exemple #2
0
        public DbgEntity Add(FSEntity aFSEntity)
        {
            DbgEntityDescriptorManager descManager = Engine.DescriptorManager;
            //
            DbgEntity entity = descManager.Create(aFSEntity);

            if (entity != null)
            {
                SaveEntity(entity);
            }
            //
            return(entity);
        }