예제 #1
0
        public bool CreateConfig(Form parentForm, out string configXmlString)
        {
            configXmlString = "";
            FormSchemaValidatorConfig frm = new FormSchemaValidatorConfig(_param, null);

            if (frm.ShowDialog(parentForm) != DialogResult.OK)
            {
                return(false);
            }
            configXmlString = frm.Config.ToXMLString();
            return(true);
        }
예제 #2
0
        public bool EditConfig(Form parentForm, ref string configXmlString)
        {
            SchemaValidatorConfig cfg = XObjectManager.CreateObject <SchemaValidatorConfig>(configXmlString);

            if (cfg == null)
            {
                WriteLog(LogType.Error, "Deserialize configuration object failed.");
                return(false);
            }
            else
            {
                FormSchemaValidatorConfig frm = new FormSchemaValidatorConfig(_param, cfg);
                if (frm.ShowDialog(parentForm) != DialogResult.OK)
                {
                    return(false);
                }
                configXmlString = frm.Config.ToXMLString();
                return(true);
            }
        }