Exemplo n.º 1
0
 public void DeleteKey(IniSection section, IniKey key)
 {
     lock (_obj)
     {
         WritePrivateProfileString(section.ToString(), key.ToString(), null, FilePath);
     }
 }
Exemplo n.º 2
0
 public void Write(IniSection section, IniKey key, string value)
 {
     lock (_obj)
     {
         WritePrivateProfileString(section.ToString(), key.ToString(), value, FilePath);
     }
 }
Exemplo n.º 3
0
        public string ReadForeignIni(string filepath, IniSection section, IniKey key)
        {
            StringBuilder temp = new StringBuilder(255);

            if (GetPrivateProfileString(section.ToString(), key.ToString(), "", temp, 255, filepath) != 0)
            {
                return(temp.ToString());
            }
            return(null);
        }
Exemplo n.º 4
0
        public string Read(IniSection section, IniKey key, string defaultValue)
        {
            lock (_obj)
            {
                StringBuilder temp = new StringBuilder(255);
                if (GetPrivateProfileString(section.ToString(), key.ToString(), "", temp, 255, FilePath) != 0)
                {
                    return(temp.ToString());
                }

                Write(section, key, defaultValue);
                return(defaultValue);
            }
        }
Exemplo n.º 5
0
 public static void Set(IniSection section, string sectionSuffix, IniKey key, string value)
 {
     Settings.Set(section.ToString() + "." + sectionSuffix, key.ToString(), value);
 }
Exemplo n.º 6
0
 public static string Get(IniSection section, string sectionSuffix, IniKey key)
 {
     return(Settings.Get(section.ToString() + "." + sectionSuffix, key.ToString()));
 }
Exemplo n.º 7
0
 public static string Get(IniSection section, IniKey key)
 {
     return(Settings.Get(section.ToString(), key.ToString()));
 }