예제 #1
0
        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);
            }
        }
예제 #2
0
        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);
            }
        }