Exemple #1
0
 public static void saveGraphToXml
     (string filename, Netron.GraphLib.UI.GraphControl graphControl1, designGraph graph1)
 {
     graph1.updateFromGraphControl(graphControl1);
     graph1.checkForRepeatNames();
     saveGraphToXml(filename, graph1);
 }
 public static void saveGraphToXml
     (string filename, Netron.GraphLib.UI.GraphControl graphControl1, designGraph graph1)
 {
     graph1.updateFromGraphControl(graphControl1);
     graph1.checkForRepeatNames();
     saveGraphToXml(filename, graph1);
 }
 public static void saveGraphToXml(string filename, designGraph graph1)
 {
     graph1.checkForRepeatNames();
     StreamWriter graphWriter = null;
     try
     {
         graphWriter = new StreamWriter(filename);
         XmlSerializer graphSerializer = new XmlSerializer(typeof(designGraph));
         graphSerializer.Serialize(graphWriter, graph1);
     }
     catch (Exception ioe)
     {
         MessageBox.Show(ioe.ToString(), "XML Serialization Error", MessageBoxButtons.OK,
             MessageBoxIcon.Information);
     }
     finally
     {
         if (graphWriter != null) graphWriter.Close();
     }
 }
Exemple #4
0
        public static void saveGraphToXml(string filename, designGraph graph1)
        {
            graph1.checkForRepeatNames();
            StreamWriter graphWriter = null;

            try
            {
                graphWriter = new StreamWriter(filename);
                XmlSerializer graphSerializer = new XmlSerializer(typeof(designGraph));
                graphSerializer.Serialize(graphWriter, graph1);
            }
            catch (Exception ioe)
            {
                MessageBox.Show(ioe.ToString(), "XML Serialization Error", MessageBoxButtons.OK,
                                MessageBoxIcon.Information);
            }
            finally
            {
                if (graphWriter != null)
                {
                    graphWriter.Close();
                }
            }
        }