Example #1
0
        private static void WriteMain(FeatureRegister register, List <NormalRule> AllRules, string ModelName, string OutXmlPath)
        {
            FeatureMain main = new FeatureMain(register);

            main.FillFromDB(AllRules, ModelName);
            WriteFile(main, OutXmlPath, ModelName);
        }
Example #2
0
        public static void WriteFile(FeatureMain Fmain, string path, string modelName)
        {
            var FullFileName    = BuildXmlFileName(path, modelName);
            var FullKeyFileName = BuildXmlKeyFileName(path, modelName);

            Provider.WriteFile <FeatureMain>(Fmain, FullFileName, FullKeyFileName);
        }
Example #3
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);
        }
Example #4
0
 private static Boolean CheckFiles(string extractPath)
 {
     try
     {
         var FRegister = FeatureRegister.LoadFromFile(extractPath);
         var FMain     = FeatureMain.LoadAllRules(extractPath, FRegister);
     }
     catch (Exception ex)
     {
         var message = "Input Database cannote be porperly loaded: " + ex.Message;
         Catcher(message, extractPath);
         return(false);
     }
     return(true);
 }
Example #5
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);
        }
Example #6
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);
        }