public void CreateConfig(string[] parameters, string rootFolder)
        {
            Parameters = parameters;
            _root      = rootFolder;
            ConfigJson js = new ConfigJson
            {
                Parameters = parameters,
                RootFolder = rootFolder
            };

            _dl  = new DeserializerLogic(_root);
            _sl  = new SerializerLogic(_root);
            _pl  = new PatientLogic(_sl, _root, _dl);
            _dtl = new DateLogic(_sl, _root, _dl);
            _el  = new EyeLogic(_sl, _root, _dl);
            _sl.SaveConfig(js, IsConfigPresent);
        }
Beispiel #2
0
        public TemplateLogic(string root, SerializerLogic sl, DeserializerLogic dl)
        {
            _sl   = sl;
            _dl   = dl;
            _root = root + "\\Templates";
            _file = _root + "\\templates.json";
            if (!Directory.Exists(_root))
            {
                Directory.CreateDirectory(_root);
            }

            _names   = new List <string>();
            _paths   = new List <string>();
            _aliases = new Dictionary <string, string>();

            LoadTemplateList();
        }
 private ConfigLogic()
 {
     IsConfigPresent = Directory.GetFiles(Directory.GetCurrentDirectory()).Contains(_path);
     _dl             = new DeserializerLogic();
     if (IsConfigPresent)
     {
         (var pars, string root) = _dl.ReadConfig(_path);
         Parameters = pars;
         _root      = root;
         _sl        = new SerializerLogic(_root);
         _tl        = new TemplateLogic(_root, _sl, _dl);
         _tl.InitParams(Parameters);
         _pl  = new PatientLogic(_sl, _root, _dl);
         _dtl = new DateLogic(_sl, _root, _dl);
         _el  = new EyeLogic(_sl, _root, _dl);
     }
     IsAdding = true;
 }
 public PatientLogic(SerializerLogic sl, string root, DeserializerLogic dl)
 {
     _sl   = sl;
     _root = root;
     _dl   = dl;
 }