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); }
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; }