using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Windows.Forms; namespace SCJMapper_V2 { /// /// Provides some items that are user related - packed in one place.. /// class TheUser { /// /// Returns the name of the Personal Program folder in My Documents /// Creates the folder if needed /// /// Path to the Personal Program directory static public String UserDir { get { String docPath = Path.Combine( Environment.GetFolderPath( Environment.SpecialFolder.Personal ), Application.ProductName); if ( !Directory.Exists( docPath ) ) Directory.CreateDirectory( docPath ); return docPath; } } /// /// Returns the mapping file name + path into our user dir /// /// The mapping name /// A fully qualified filename static public String MappingFileName( String mapName ) { return Path.Combine( UserDir, mapName + ".xml" ); } } }