예제 #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));
        }
예제 #2
0
 private void modelessButton_Click(object sender, EventArgs e)
 {
     Thread thread = new Thread(delegate(object textObject)
     {
         Visualizer v = new Visualizer();
         v.OnDisposeEvent += v_OnDisposeEvent;
         v.LoadXmlFromString(textObject.ToString());
         v.Show();
         v.Dispose();
     });
     thread.SetApartmentState(ApartmentState.STA);
     thread.Start("<xml>test</xml>");
 }
예제 #3
0
        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);
        }
예제 #4
0
        public static string ShowModal_LoadXmlFromString(string xml)
        {
            string modifiedXml;

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

            return(modifiedXml);
        }
예제 #5
0
        public static void ShowModeless_LoadXmlFromString(string xml)
        {
            ThreadStart threadDelegate = delegate
            {
                using (Visualizer visualizer = new Visualizer(false))
                {
                    visualizer.LoadXmlFromString(xml);
                    visualizer.Show();
                }
            };

            Thread thread = new Thread(threadDelegate);

            thread.SetApartmentState(ApartmentState.STA);
            thread.Start();
        }
예제 #6
0
        public static string ShowModal_LoadXmlFromString(string xml)
        {
            string modifiedXml;

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

            return modifiedXml;
        }
예제 #7
0
        public static void ShowModeless_LoadXmlFromString(string xml)
        {
            ThreadStart threadDelegate = delegate
            {
                using (Visualizer visualizer = new Visualizer(false))
                {
                    visualizer.LoadXmlFromString(xml);
                    visualizer.Show();
                }
            };

            Thread thread = new Thread(threadDelegate);
            thread.SetApartmentState(ApartmentState.STA);
            thread.Start();
        }
예제 #8
0
        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;
        }