private void SaveGraph(object sender, RoutedEventArgs e) { SaveFileDialog dialog = new SaveFileDialog(); dialog.Filter = "graph files (*.graph)|*.graph|All files (*.*)|*.*"; dialog.ShowDialog(); if (dialog.FileName.Length > 0) { GraphLoader.Save(dialog.FileName); } }
private void LoadGraph(object sender, RoutedEventArgs e) { OpenFileDialog dialog = new OpenFileDialog(); dialog.Filter = "graph files (*.graph)|*.graph|All files (*.*)|*.*"; dialog.ShowDialog(); if (dialog.CheckFileExists && dialog.FileName.Length > 0) { GraphLoader.Load(dialog.FileName); } }