Пример #1
0
        /// <summary>
        /// Saves a graph to a file.
        /// </summary>
        private void SaveGraph()
        {
            string path = this.FileSelector.GetFileNameForSaving();

            if (!string.IsNullOrEmpty(path))
            {
                try
                {
                    var graph = this.GraphViewModel.Graph;
                    GraphSerializer.SaveAsXmlFile(graph, path);
                }
                catch (GraphSerializationException ex)
                {
                    Logger.Error("Saving graph to path '" + path + "' failed.", ex);
                    this.MessageHandler.ShowError(ex.Message);
                }
            }
        }