Exemple #1
0
        private void modalButton_Click(object sender, EventArgs e)
        {
            Visualizer v = new Visualizer();
            v.LoadXmlFromString("<xml>test</xml>");
            string modifiedXml = v.ShowDialog();

            MessageBox.Show(string.Format("Returned from Xml Visualizer v.2:\r\n{0}", modifiedXml));
        }
        public static string ShowModal_LoadXmlFromFile(string fileName)
        {
            string modifiedXml;

            using (Visualizer visualizer = new Visualizer(false))
            {
                visualizer.LoadXmlFromFile(fileName);
                visualizer.ShowDialog();
                modifiedXml = visualizer.GetModifiedXml();
            }

            return modifiedXml;
        }
        public static string ShowModal_LoadXmlFromFile(string fileName)
        {
            string modifiedXml;

            using (Visualizer visualizer = new Visualizer(false))
            {
                visualizer.LoadXmlFromFile(fileName);
                visualizer.ShowDialog();
                modifiedXml = visualizer.GetModifiedXml();
            }

            return(modifiedXml);
        }
        public static string ShowModal_LoadXmlFromString(string xml, bool replaceable, bool debugMode)
        {
            string modifiedXml;

            using (Visualizer visualizer = new Visualizer(debugMode))
            {
                visualizer.LoadXmlFromString(xml, replaceable);
                visualizer.ShowDialog();
                modifiedXml = visualizer.GetModifiedXml();
            }

            return(modifiedXml);
        }
        public static string ShowModal_LoadXmlFromString(string xml, bool replaceable, bool debugMode)
        {
            string modifiedXml;

            using (Visualizer visualizer = new Visualizer(debugMode))
            {
                visualizer.LoadXmlFromString(xml, replaceable);
                visualizer.ShowDialog();
                modifiedXml = visualizer.GetModifiedXml();
            }

            return modifiedXml;
        }