Ejemplo n.º 1
0
        public int FetchInt(string groupName, string elementName)
        {
            int value = (int)ContainerElement.Descendants(groupName).First().Element(elementName);

            ProfileCache.Store(elementName, value.ToString());
            return(value);
        }
Ejemplo n.º 2
0
        public bool FetchBool(string groupName, string elementName)
        {
            bool value = (bool)ContainerElement.Descendants(groupName).First().Element(elementName);

            ProfileCache.Store(elementName, value.ToString());
            return(value);
        }
Ejemplo n.º 3
0
        public string Fetch(string groupName, string elementName)
        {
            string value = (string)ContainerElement.Descendants(groupName).First().Element(elementName);

            value = Substitute(value);
            ProfileCache.Store(elementName, value);
            return(value);
        }
Ejemplo n.º 4
0
 public ProfileManager()
 {
     ProfileCache       = new ProfileCache();
     ApplicationProfile = new ApplicationProfile(ProfileCache);
     SystemProfile      = new SystemProfile(ProfileCache);
     UserSettings       = new UserSettings(ProfileCache);
     UserSettings.Load(SystemProfile.CurrentUserSettings, SystemProfile.MasterUserSettings);
     Interrupt = new Differenti8Engine.Interrupt("OK");
 }
Ejemplo n.º 5
0
 public void Load()
 {
     XDoc             = XDocument.Load(ProfileCache.Fetch("SystemProfileXml"));
     XmlProfileHelper = new XmlProfileHelper(ProfileCache, XDoc.Root);
     XmlProfileHelper.FetchAll("Parameters");
     XmlProfileHelper.FetchAll("Directories");
     XmlProfileHelper.FetchAll("Files");
     XmlProfileHelper.FetchAll("Includes");
     XmlProfileHelper.FetchAll("Programs");
 }
Ejemplo n.º 6
0
 public ApplicationProfile(ProfileCache profileCache)
 {
     _profileCache    = profileCache;
     _startupPath     = Application.StartupPath.Trim();
     _userName        = System.Environment.UserName;
     _AssemblyVersion = GetAssemblyVersion();
     _profileCache.Store("DataPath", DataPath);
     _profileCache.Store("SystemProfileXml", SystemProfileXml);
     _profileCache.Store("UserName", UserName);
     _profileCache.Store("Version", Version);
 }
Ejemplo n.º 7
0
        public string Substitute(string original)
        {
            string value = ProfileCache.Substitute(original);

            return(value);
        }
Ejemplo n.º 8
0
 public XmlProfileHelper(ProfileCache profileCache, XElement containerElement)
 {
     ProfileCache     = profileCache;
     ContainerElement = containerElement;
 }
Ejemplo n.º 9
0
 public SystemProfile(ProfileCache profileCache)
 {
     ProfileCache = profileCache;
     Load();
 }
Ejemplo n.º 10
0
 public UserSettings(string fileSpec, ProfileCache profileCache)
     : base("Profile", "UserSettings", "UserSetting", "Key", fileSpec, null)
 {
     ProfileCache = profileCache;
 }
Ejemplo n.º 11
0
 public UserSettings(ProfileCache profileCache)
     : this(null, profileCache)
 {
 }