Subversion Repositories Code-Repo

Compare Revisions

Ignore whitespace Rev 56 → Rev 57

/SWAT Office App/trunk/SWAT Office App/Settings_Form.cs
14,6 → 14,7
public partial class Settings_Form : Form
{
// Global static variables
private static string settingsLogLocation = "Settings.xml";
public static string globalAdminPassword = "tr33b3@rd";
public static bool defaultSettings { get; set; }
public static bool showFileSizes { get; set; }
70,10 → 71,10
// Imports settings from Settings.xml
try
{
if (File.Exists("Settings.xml"))
if (File.Exists(settingsLogLocation))
{
// XML Parsing using System.XML.Linq
XElement Settings = XElement.Load("Settings.xml");
XElement Settings = XElement.Load(settingsLogLocation);
 
showFileSizes = bool.Parse(Settings.Element("ProgramSettings").Element("ShowFileSizes").Value);
 
142,7 → 143,7
try
{
// XML Parsing using System.XML.Linq
XElement Settings = XElement.Load("Settings.xml");
XElement Settings = XElement.Load(settingsLogLocation);
 
string tempString = "";
foreach (string str in systemAccounts)
189,7 → 190,7
new XElement("DockDrivesToIgnore", "C:\\")
)
);
Settings.Save("Settings.xml");
Settings.Save(settingsLogLocation);
}
catch (Exception e)
{
225,7 → 226,7
{
if (MessageBox.Show("Reset configurations to the default settings?", "", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
File.Delete("Settings.xml");
File.Delete(settingsLogLocation);
WriteDefaultConfigFile();
ImportSettings();
OpenUpdateSettings();