示例#1
0
        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 void ShowModeless_LoadXmlFromFile(string fileName)
        {
            ThreadStart threadDelegate = delegate
            {
                using (Visualizer visualizer = new Visualizer(false))
                {
                    visualizer.LoadXmlFromFile(fileName);
                    visualizer.Show();
                }
            };

            Thread thread = new Thread(threadDelegate);

            thread.SetApartmentState(ApartmentState.STA);
            thread.Start();
        }
示例#4
0
        public static void ShowModeless_LoadXmlFromFile(string fileName)
        {
            ThreadStart threadDelegate = delegate
            {
                using (Visualizer visualizer = new Visualizer(false))
                {
                    visualizer.LoadXmlFromFile(fileName);
                    visualizer.Show();
                }
            };

            Thread thread = new Thread(threadDelegate);
            thread.SetApartmentState(ApartmentState.STA);
            thread.Start();
        }