Reordered methods to avoid compiler warnings

This commit is contained in:
Peter Kirmeier 2020-09-20 14:31:17 +02:00
parent 713ae57f70
commit f2c20c5a5e

View file

@ -154,6 +154,24 @@ namespace SystemTrayMenu.Properties
SaveValuesToFile();
}
/// <summary>
/// Creates an empty user.config file...looks like the one MS creates.
/// This could be overkill a simple key/value pairing would probably do.
/// </summary>
private static void CreateEmptyConfig()
{
var doc = new XDocument();
var declaration = new XDeclaration("1.0", "utf-8", "true");
var config = new XElement(Config);
var userSettings = new XElement(UserSettings);
var group = new XElement(typeof(Properties.Settings).FullName);
userSettings.Add(group);
config.Add(userSettings);
doc.Add(config);
doc.Declaration = declaration;
doc.Save(UserConfigPath);
}
/// <summary>
/// Loads the values of the file into memory.
/// </summary>
@ -185,24 +203,6 @@ namespace SystemTrayMenu.Properties
}
}
/// <summary>
/// Creates an empty user.config file...looks like the one MS creates.
/// This could be overkill a simple key/value pairing would probably do.
/// </summary>
private void CreateEmptyConfig()
{
var doc = new XDocument();
var declaration = new XDeclaration("1.0", "utf-8", "true");
var config = new XElement(Config);
var userSettings = new XElement(UserSettings);
var group = new XElement(typeof(Properties.Settings).FullName);
userSettings.Add(group);
config.Add(userSettings);
doc.Add(config);
doc.Declaration = declaration;
doc.Save(UserConfigPath);
}
/// <summary>
/// Saves the in memory dictionary to the user config file.
/// </summary>