コード例 #1
0
        /// <summary>
        /// Saves the diagram to file in XML format (XML serialization)
        /// </summary>
        /// <param name="filePath"></param>
        public void SaveGraphAs(string filePath)
        {
            XmlTextWriter   tw = new XmlTextWriter(filePath, System.Text.Encoding.Unicode);
            GraphSerializer g  = new GraphSerializer(this);

            g.Serialize(tw);
            tw.Close();
        }
コード例 #2
0
        /// <summary>
        /// Opens a diagram which was saved to XML previously (XML deserialization)
        /// </summary>
        /// <param name="filePath"></param>
        public void OpenGraph(string filePath)
        {
            XmlTextReader   reader = new XmlTextReader(filePath);
            GraphSerializer ser    = new GraphSerializer(this);

            graphAbstract = ser.Deserialize(reader) as GraphAbstract;
            reader.Close();
            DrawTree();
            Invalidate();
        }
コード例 #3
0
ファイル: LithiumControl.cs プロジェクト: gblosser/OpenNlp
		/// <summary>
		/// Opens a diagram which was saved to XML previously (XML deserialization)
		/// </summary>
		/// <param name="filePath"></param>
		public void OpenGraph(string filePath)
		{
			XmlTextReader reader = new XmlTextReader(filePath);
			GraphSerializer ser = new GraphSerializer(this);
			graphAbstract = ser.Deserialize(reader) as GraphAbstract;
			reader.Close();
			DrawTree();
			Invalidate();
		}
コード例 #4
0
ファイル: LithiumControl.cs プロジェクト: gblosser/OpenNlp
		/// <summary>
		/// Saves the diagram to file in XML format (XML serialization)
		/// </summary>
		/// <param name="filePath"></param>
		public void SaveGraphAs(string filePath)
		{
			XmlTextWriter tw = new XmlTextWriter(filePath,System.Text.Encoding.Unicode);
			GraphSerializer g = new GraphSerializer(this);
			g.Serialize(tw);
			tw.Close();
		}