예제 #1
0
파일: FormOptions.cs 프로젝트: Pumpet/Robin
        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);
        }