>using System; >using AMS.Profile; > > >namespace OrderPro >{ > /// <summary> > /// Summary description for AppStartUp. > /// </summary> > public class AppStartUp > { > public AppStartUp() > { > // > // TODO: Add constructor logic here > // > } > > public struct AppDefaults > { > public static string server = ""; > public static string dataBase = ""; > > public static string adminPath = ""; > public static string sqlConn = ""; > } > > public static void SetAppDefaults() > { > Registry profile = new Registry(); > AppDefaults.server = profile.GetValue("DBSettings","DBServer",""); > AppDefaults.dataBase = profile.GetValue("DBSettings","DBName",""); > > AppDefaults.adminPath = "c:\vsdevelop"; > AppDefaults.sqlConn = "SERVER=" + AppDefaults.server.ToUpper().Trim() + ";UID=uid;PWD=pwd;DATABASE=database"; > } > > public static void LoadProgramSettings() > { > SetAppDefaults(); > } > } >} >