Click here to Skip to main content
15,896,201 members
Articles / Desktop Programming / WPF

Animation of graph algorithms with WPF 3D

Rate me:
Please Sign up or sign in to vote.
4.82/5 (13 votes)
20 Jan 2010Apache4 min read 50.1K   3.7K   39  
Overview of data structures and animations.
using System.Windows.Forms;

namespace Palmmedia.WpfGraph.UI.Interaction
{
    /// <summary>
    /// <see cref="IFileSelector"/> implementation using dialogs.
    /// </summary>
    internal class FormFileSelector : IFileSelector
    {
        /// <summary>
        /// Gets the file name for opening.
        /// </summary>
        /// <returns>The name of the file to open.</returns>
        public string GetFileNameForOpening()
        {
            using (var openFileDialog = new OpenFileDialog())
            {
                openFileDialog.Filter = "XML (*.xml)|*.xml";
                openFileDialog.ShowDialog();

                return openFileDialog.FileName;
            }            
        }

        /// <summary>
        /// Gets the file name for saving.
        /// </summary>
        /// <returns>The name of the file to save.</returns>
        public string GetFileNameForSaving()
        {
            using (var saveFileDialog = new SaveFileDialog())
            {
                saveFileDialog.Filter = "XML (*.xml)|*.xml";
                saveFileDialog.ShowDialog();

                return saveFileDialog.FileName;
            }
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Apache License, Version 2.0


Written By
Software Developer
Germany Germany
Blog: http://www.palmmedia.de

Comments and Discussions