public bool DeleteKey(string Key)
{
bool flag1;
try
{
flag1 = INIManage.WritePrivateProfileString(this.Sections, Key, null, this.Filename) != 0;
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
flag1 = false;
ProjectData.ClearProjectError();
return flag1;
}
return flag1;
}
public bool DeleteKey(string Section, string Key)
{
bool flag1;
try
{
flag1 = INIManage.WritePrivateProfileString(Sections, Key, null, this.Filename) != 0;
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
flag1 = false;
ProjectData.ClearProjectError();
return flag1;
}
return flag1;
}
public bool DeleteSections(string Section)
{
bool flag1;
try
{
flag1 = INIManage.WritePrivateProfileSections(Sections, null, this.Filename) != 0;
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
flag1 = false;
ProjectData.ClearProjectError();
return flag1;
}
return flag1;
}
#endregion
public ArrayList GetSectionsNames()
{
int num1;
ArrayList list1 = new ArrayList();
byte[] buffer1 = new byte[MAX_ENTRY];
int num2 = 0;
try
{
num1 = INIManage.GetPrivateProfileSectionsNames(buffer1, MAX_ENTRY, this.Filename);
}
catch (Exception exception1)
{
ProjectData.SetProjectError(exception1);
ProjectData.ClearProjectError();
return list1;
}
ASCIIEncoding encoding1 = new ASCIIEncoding();
if (num1 > 0)
{
string text1 = encoding1.GetString(buffer1);
num1 = 0;
num2 = -1;
while (true)
{
num1 = text1.IndexOf('\0', (int) (num2 + 1));
if (((num1 - num2) == 1) || (num1 == -1))
{
return list1;
}
try
{
list1.Add(text1.Substring(num2 + 1, num1 - num2));
}
catch (Exception exception2)
{
ProjectData.SetProjectError(exception2);
ProjectData.ClearProjectError();
}
num2 = num1;
}
}
return list1;
}