using System.Text;
using Microsoft.Win32;
namespace wsWin
{
#region [ *.ini file ]
public class InI
{
public string path;
public InI(string INIPath)
{
path = INIPath;
}
public InI()
{
path = ".\\Config.ini";
}
public void WriteValue(string Section, string Key, string Value)
{
Win32.WritePrivateProfileString(Section, Key, Value, this.path);
}
public string ReadValue(string Section, string Key)
{
StringBuilder temp = new StringBuilder(255);
int i = Win32.GetPrivateProfileString(Section, Key, "", temp,
255, this.path);
return temp.ToString();
}
}
#endregion
public class csReg
{
public static void Set(string KeyPath, string KeyName, string KeyValue)
{
Registry.SetValue(KeyPath, KeyName, KeyValue);
}
public static string Get(string KeyPath, string KeyName)
{
return Registry.GetValue(KeyPath, KeyName, string.Empty).ToString();
}
}
}
ini, Reg
最新推荐文章于 2025-03-24 14:14:37 发布