repo base: use new config scheme to get the user name's and email

This commit is contained in:
Hylke Bons 2011-05-26 01:44:10 +01:00
parent f4fe759994
commit 2e075959c4

View file

@ -452,16 +452,7 @@ namespace SparkleLib {
protected string UserName protected string UserName
{ {
get { get {
string global_config_file_path = Path.Combine (SparklePaths.SparkleConfigPath, "config.xml"); return SparkleConfig.DefaultConfig.UserName;
if (!File.Exists (global_config_file_path))
return "";
XmlDocument xml = new XmlDocument();
xml.Load (global_config_file_path);
XmlNode node = xml.SelectSingleNode("//user/name/text()");
return node.Value;
} }
} }
@ -469,16 +460,7 @@ namespace SparkleLib {
protected string UserEmail protected string UserEmail
{ {
get { get {
string global_config_file_path = Path.Combine (SparklePaths.SparkleConfigPath, "config.xml"); return SparkleConfig.DefaultConfig.UserEmail;
if (!File.Exists (global_config_file_path))
return "";
XmlDocument xml = new XmlDocument();
xml.Load (global_config_file_path);
XmlNode node = xml.SelectSingleNode("//user/email/text()");
return node.Value;
} }
} }