コード例 #1
0
        // Public methods
        public void SaveChanges(FeatureModel model)
        {
            // Get the DataEntity
            XmlDAL.DataEntities.FeatureModel dataEntity = Mapper.Map<XmlDAL.DataEntities.FeatureModel>(model);

            // Save it
            new XmlDAL.XMLDataEntityManager(this.modelFolderPath).SaveChanges(dataEntity);
        }
コード例 #2
0
        // Public methods
        public ConfigurationInstance CreateConfigurationInstance(FeatureModel featureModel)
        {
            // Create the ConfigurationInstance from the FeatureModel
            ConfigurationInstance configInstance = new ConfigurationInstance(featureModel);

            // Create its RootFeature

            return configInstance;
        }
コード例 #3
0
 public FeatureModel SaveChanges(FeatureModel featureModel)
 {
     FeatureModelManager manager = new FeatureModelManager(modelFolderPath);
     manager.SaveChanges(featureModel);
     return null;
 }
コード例 #4
0
ファイル: BLOs.cs プロジェクト: dswingle/openconfigurator
 // Special static methods
 internal static FeatureModel CreateDefault()
 {
     FeatureModel newBLO = new FeatureModel()
     {
         Name = "Unnamed Model",
         UIOrientation = UIOrientationTypes.Vertical,
         ScaleModifier = 1
     };
     return newBLO;
 }
コード例 #5
0
ファイル: BLOs.cs プロジェクト: dswingle/openconfigurator
        public ConfigurationInstance(FeatureModel model)
        {
            this.FeatureModelName = model.Name;

            // Get the root feature
            Feature rootFeature = model.Features.Where(f => !model.Relations.Exists(r => r.ChildFeature == f) &&
                !model.GroupRelations.Exists(gr => gr.ChildFeatures.Contains(f))).SingleOrDefault();

            // root feature = feature which is not the child in any relations or any grouprelations
        }