public string ReadString(string Sections, string Key, string DefaultValue)
{
string text1;
try
{
StringBuilder builder1 = new StringBuilder(MAX_ENTRY);
int num1 = INIManage.GetPrivateProfileString(Sections, Key, DefaultValue, builder1, MAX_ENTRY, this.Filename);
text1 = builder1.ToString();
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
text1 = DefaultValue;
ProjectData.ClearProjectError();
return text1;
}
return text1;
}
#endregion
#region" INI操作类的Write相关方法 "
public bool Write(string Key, bool Value)
{
return this.Write(this.Sections, Key, Value);
}
public bool Write(string Key, byte[] Value)
{
return this.Write(this.Sections, Key, Value);
}
public bool Write(string Key, string Value)
{
return this.Write(this.Sections, Key, Value);
}
public bool Write(string Key, int Value)
{
return this.Write(this.Sections, Key, Value);
}
public bool Write(string Key, long Value)
{
return this.Write(this.Sections, Key, Value);
}
public bool Write(string Sections, string Key, byte[] Value)
{
bool flag1;
try
{
flag1 = INIManage.WritePrivateProfileStruct(Sections, Key, Value, Value.Length, this.Filename) != 0;
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
flag1 = false;
ProjectData.ClearProjectError();
return flag1;
}
return flag1;
}
public bool Write(string Sections, string Key, bool Value)
{
return this.Write(Sections, Key, Value.ToString());
}
public bool Write(string Sections, string Key, int Value)
{
bool flag1;
try
{
flag1 = INIManage.WritePrivateProfileString(Sections, Key, Value.ToString(), this.Filename) != 0;
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
flag1 = false;
ProjectData.ClearProjectError();
return flag1;
}
return flag1;
}
public bool Write(string Sections, string Key, long Value)
{
return this.Write(Sections, Key, Value.ToString());
}
public bool Write(string Sections, string Key, string Value)
{
bool flag1;
try
{
flag1 = INIManage.WritePrivateProfileString(Sections, Key, Value, this.Filename) != 0;
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
flag1 = false;
ProjectData.ClearProjectError();
return flag1;
}
return flag1;
}
#endregion
#region" INI操作类的Delete相关方法 "