This commit is contained in:
@@ -48,11 +48,14 @@ namespace Config
|
||||
listIni_EleName.Add("procedurelisttabstops");
|
||||
|
||||
// proc.ini
|
||||
listIni_EleName.Add("rodefaults");
|
||||
//listIni_EleName.Add("rodefaults");
|
||||
listIni_EleName.Add("display");
|
||||
listIni_EleName.Add("backgrounddefaults");
|
||||
listIni_EleName.Add("unit");
|
||||
|
||||
// roapp.ini
|
||||
listIni_EleName.Add("roapp");
|
||||
|
||||
// <user>.cfg
|
||||
listIni_EleName.Add("spelldictionary");
|
||||
// listIni_EleName.Add("wordprocessor"); - already in here.
|
||||
@@ -92,9 +95,9 @@ namespace Config
|
||||
listIni_AttrName.Add("proceduretitletab");
|
||||
|
||||
// proc.ini
|
||||
listIni_AttrName.Add("setpoint");
|
||||
listIni_AttrName.Add("graphics");
|
||||
listIni_AttrName.Add("ropath");
|
||||
//listIni_AttrName.Add("setpoint");
|
||||
//listIni_AttrName.Add("graphics");
|
||||
//listIni_AttrName.Add("ropath");
|
||||
listIni_AttrName.Add("display");
|
||||
listIni_AttrName.Add("sectiontitle");
|
||||
listIni_AttrName.Add("sectionnumber");
|
||||
@@ -109,6 +112,8 @@ namespace Config
|
||||
listIni_AttrName.Add("procedurenumber");
|
||||
|
||||
|
||||
// roapp.ini
|
||||
listIni_AttrName.Add("extention"); // NOTE MIS-SPELLING was in 16-bit program!
|
||||
|
||||
// <user>.cfg
|
||||
listIni_AttrName.Add("custom");
|
||||
@@ -126,10 +131,9 @@ namespace Config
|
||||
public ConfigFile()
|
||||
{
|
||||
}
|
||||
public void LoadUsrCfg(User user)
|
||||
public void LoadUsrCfg(User user, string vepromspath)
|
||||
{
|
||||
string cmdline = System.Environment.CommandLine;
|
||||
string cfgpath = cmdline.Substring(1, cmdline.LastIndexOf("\\") - 1) + "\\config";
|
||||
string cfgpath = vepromspath + "\\config";
|
||||
if (!Directory.Exists(cfgpath))
|
||||
{
|
||||
log.Info("No user cfgs found in config directory - did not migrate any user cfgs");
|
||||
@@ -179,10 +183,9 @@ namespace Config
|
||||
}
|
||||
}
|
||||
|
||||
public XmlDocument LoadSystemIni()
|
||||
public XmlDocument LoadSystemIni(string vepromspath)
|
||||
{
|
||||
string cmdline = System.Environment.CommandLine;
|
||||
string inipath = cmdline.Substring(1, cmdline.LastIndexOf("\\") - 1) + "\\veproms.ini";
|
||||
string inipath = vepromspath + "\\veproms.ini";
|
||||
if (!File.Exists(inipath))
|
||||
{
|
||||
log.InfoFormat("Did not migrate {0} - file not found", inipath);
|
||||
@@ -208,6 +211,17 @@ namespace Config
|
||||
return d;
|
||||
}
|
||||
|
||||
public XmlDocument LoadRoAppIni(string ropath)
|
||||
{
|
||||
string inipath = ropath + "\\roapp.ini";
|
||||
// not an error if it does not exist - just return null.
|
||||
if (!File.Exists(inipath)) return null;
|
||||
|
||||
XmlDocument d = IniToXml(inipath);
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
public XmlDocument IniToXml(string path)
|
||||
{
|
||||
FileInfo fi = new FileInfo(path);
|
||||
|
Reference in New Issue
Block a user