示例#1
0
        /// <summary>
        /// Save the graph onto xml file
        /// </summary>
        private void SaveToFile()
        {
            SaveFileDialog dialog = new SaveFileDialog();

            dialog.Filter = "XML file (*.xml) | *.xml";

            if (dialog.ShowDialog() == true)
            {
                CanvasGraphXML output = new CanvasGraphXML();
                output.Save(dialog.FileName, graph);
            }
        }
示例#2
0
        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            // TODO
            //string xmlFileContents = "Some testing string";
            SaveFileDialog dialog = new SaveFileDialog();

            dialog.Filter = "XML file (*.xml) | *.xml";

            if (dialog.ShowDialog() == true)
            {
                CanvasGraphXML output   = new CanvasGraphXML();
                string         savePath = System.IO.Path.GetDirectoryName(dialog.FileName);
                // Save to file
                output.Save(savePath, CGraph);
            }
        }