internal static FormsConfig CreateFromXML(string xml) { FormsConfig config = null; if (!string.IsNullOrWhiteSpace(xml)) { try { config = OptionsSerializer.LoadXML <FormsConfig>(xml); } catch (Exception ex) { Loger.SendMess(ex, $"Ошибка загрузки параметров форм из строки"); xml = null; } } if (string.IsNullOrWhiteSpace(xml)) { config = new FormsConfig(); } return(config); }