Beispiel #1
0
 public void LoadGraph(GraphControl graph, String filename)
 {
     try
     {
         using (StreamReader sr = new StreamReader(filename))
         {
             var tempFields = (CGraphFields)m_serializer.Deserialize(sr, typeof(CGraphFields));
             m_graphFields = tempFields;
         }
     }
     catch (Exception ex)
     {
         m_log.WriteLine("Could not load file " + filename + " : " + ex.Message + "\n" + ex.StackTrace);
         return;
     }
     rebuildGraph(graph);
     m_log.WriteLine("Loaded " + filename);
 }
Beispiel #2
0
        private void writeGraph(GraphControl graph, StreamWriter stream)
        {
            CGraphFields graphFields = new CGraphFields(graph, m_idGen);

            m_serializer.Serialize(stream, graphFields);
        }