public bool ReadBoolean(string Sections, string Key, bool DefaultValue)
{
return bool.Parse(this.ReadString(Sections, Key, DefaultValue.ToString()));
}
public byte[] ReadByteArray(string Key, int Length)
{
return this.ReadByteArray(this.Sections, Key, Length);
}
public byte[] ReadByteArray(string Sections, string Key, int Length)
{
byte[] buffer1;
if (Length > 0)
{
try
{
byte[] buffer2 = new byte[(Length - 1) + 1];
if (INIManage.GetPrivateProfileStruct(Sections, Key, buffer2, buffer2.Length, this.Filename) == 0)
{
return null;
}
return buffer2;
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
buffer1 = null;
ProjectData.ClearProjectError();
return buffer1;
}
}
else
{
return null;
}
}
public int ReadInteger(string Key)
{
return this.ReadInteger(Key, 0);
}
public int ReadInteger(string Key, int DefaultValue)
{
return this.ReadInteger(this.Sections, Key, DefaultValue);
}
public int ReadInteger(string Sections, string Key)
{
return this.ReadInteger(Sections, Key, 0);
}
public int ReadInteger(string Sections, string Key, int DefaultValue)
{
int num1;
try
{
num1 = INIManage.GetPrivateProfileInt(Sections, Key, DefaultValue, this.Filename);
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
num1 = DefaultValue;
ProjectData.ClearProjectError();
return num1;
}
return num1;
}
public long ReadLong(string Key)
{
return this.ReadLong(Key, (long) 0);
}
public long ReadLong(string Key, long DefaultValue)
{
return this.ReadLong(this.Sections, Key, DefaultValue);
}
public long ReadLong(string Sections, string Key)
{
return this.ReadLong(Sections, Key, 0);
}
public long ReadLong(string Sections, string Key, long DefaultValue)
{
return long.Parse(this.ReadString(Sections, Key, DefaultValue.ToString()));
}
public string ReadString(string Key)
{
return this.ReadString(this.Sections, Key);
}
public string ReadString(string Sections, string Key)
{
return this.ReadString(Sections, Key, "");
}