Beispiel #1
0
        public static FeatureMain LoadAllRules(string path, FeatureRegister _register)
        {
            var main = new FeatureMain(_register);

            var ModelNames = _register.ModelLicenses.Select(m => m.License.Name).ToList();

            foreach (var ModelName in ModelNames)
            {
                main.AddModelRules(path, ModelName);
            }
            main.RemoveDoubles();
            return(main);
        }
Beispiel #2
0
        public static FeatureMain LoadPhysicalModelRules(string path, string pmtoload, FeatureRegister _register)
        {
            var main = new FeatureMain(_register);

            _register.ModelLicenses = _register.ModelLicenses.Where(m => m.Model.PhModId == Int32.Parse(pmtoload)).ToList();

            var ModelNames = _register.ModelLicenses.Select(m => m.License.Name).ToList();

            foreach (var ModelName in ModelNames)
            {
                main.AddModelRules(path, ModelName);
            }
            main.RemoveDoubles();
            return(main);
        }
Beispiel #3
0
        public static FeatureMain LoadswPackRules(string path, string swpack, FeatureRegister _register)
        {
            var main = new FeatureMain(_register);
            var selectedSettingsFamiliesIds = _register.SettingsFamilies.Where(sf => sf.SwpackId == Int32.Parse(swpack)).Select(x => x.Id).ToList();

            _register.ModelLicenses = _register.ModelLicenses.Where(m => m.Model.SettingsFamilyId != null &&
                                                                    selectedSettingsFamiliesIds.Contains((int)m.Model.SettingsFamilyId)).ToList();

            var ModelNames = _register.ModelLicenses.Select(m => m.License.Name).ToList();

            foreach (var ModelName in ModelNames)
            {
                main.AddModelRules(path, ModelName);
            }
            main.RemoveDoubles();
            return(main);
        }