| Line 19... |
Line 19... |
| 19 |
public static string sharedFolderLocation { get; set; }
|
19 |
public static string sharedFolderLocation { get; set; }
|
| 20 |
public static string usbMasterx32CopyLocation { get; set; }
|
20 |
public static string usbMasterx32CopyLocation { get; set; }
|
| 21 |
public static string usbMasterx64CopyLocation { get; set; }
|
21 |
public static string usbMasterx64CopyLocation { get; set; }
|
| 22 |
public static List<string> driveLoggerDockLabels = new List<string>();
|
22 |
public static List<string> driveLoggerDockLabels = new List<string>();
|
| 23 |
public static int driveLoggerRefreshInterval { get; set; }
|
23 |
public static int driveLoggerRefreshInterval { get; set; }
|
| - |
|
24 |
public static List<string> driveLoggerDrivesToIgnore = new List<string>();
|
| 24 |
|
25 |
|
| 25 |
private static Settings_Form _Settings_Form = null;
|
26 |
private static Settings_Form _Settings_Form = null;
|
| 26 |
// Singleton instance so the settings file isnt loaded every time
|
27 |
// Singleton instance so the settings file isnt loaded every time
|
| 27 |
public static Settings_Form settings_Form_Instance
|
28 |
public static Settings_Form settings_Form_Instance
|
| 28 |
{
|
29 |
{
|
| Line 42... |
Line 43... |
| 42 |
ImportSettings();
|
43 |
ImportSettings();
|
| 43 |
InitializeComponent();
|
44 |
InitializeComponent();
|
| 44 |
|
45 |
|
| 45 |
this.listBox_SystemAccounts.SelectedIndexChanged += new EventHandler(this.listBox_SystemAccounts_SelectedIndexChanged);
|
46 |
this.listBox_SystemAccounts.SelectedIndexChanged += new EventHandler(this.listBox_SystemAccounts_SelectedIndexChanged);
|
| 46 |
this.listBox_HiddenAccounts.SelectedIndexChanged += new EventHandler(this.listBox_HiddenAccounts_SelectedIndexChanged);
|
47 |
this.listBox_HiddenAccounts.SelectedIndexChanged += new EventHandler(this.listBox_HiddenAccounts_SelectedIndexChanged);
|
| - |
|
48 |
this.Load += new EventHandler(Settings_Form_Load);
|
| 47 |
}
|
49 |
}
|
| 48 |
private void Settings_Form_Load(object sender, EventArgs e)
|
50 |
private void Settings_Form_Load(object sender, EventArgs e)
|
| 49 |
{
|
51 |
{
|
| 50 |
OpenUpdateSettings();
|
52 |
OpenUpdateSettings();
|
| 51 |
settings_Form_Instance.btn_SystemRemove.Enabled = false;
|
53 |
settings_Form_Instance.btn_SystemRemove.Enabled = false;
|
| Line 86... |
Line 88... |
| 86 |
foreach (string str in tempStringArray)
|
88 |
foreach (string str in tempStringArray)
|
| 87 |
driveLoggerDockLabels.Add(str.Trim());
|
89 |
driveLoggerDockLabels.Add(str.Trim());
|
| 88 |
|
90 |
|
| 89 |
driveLoggerRefreshInterval = int.Parse(Settings.Element("ProgramSettings").Element("DockRefreshInterval").Value);
|
91 |
driveLoggerRefreshInterval = int.Parse(Settings.Element("ProgramSettings").Element("DockRefreshInterval").Value);
|
| 90 |
|
92 |
|
| - |
|
93 |
driveLoggerDrivesToIgnore.Clear();
|
| - |
|
94 |
string tempDrivesToIgnore = Settings.Element("ProgramSettings").Element("DockDrivesToIgnore").Value;
|
| - |
|
95 |
tempStringArray = tempDrivesToIgnore.Split(new char[] { ',' });
|
| - |
|
96 |
foreach (string str in tempStringArray)
|
| - |
|
97 |
driveLoggerDrivesToIgnore.Add(str.Trim());
|
| - |
|
98 |
|
| 91 |
sharedFolderLocation = Settings.Element("ProgramSettings").Element("SharedFolderLocation").Value;
|
99 |
sharedFolderLocation = Settings.Element("ProgramSettings").Element("SharedFolderLocation").Value;
|
| 92 |
usbMasterx32CopyLocation = Settings.Element("ProgramSettings").Element("USBMasterCopyx32Location").Value;
|
100 |
usbMasterx32CopyLocation = Settings.Element("ProgramSettings").Element("USBMasterCopyx32Location").Value;
|
| 93 |
usbMasterx64CopyLocation = Settings.Element("ProgramSettings").Element("USBMasterCopyx64Location").Value;
|
101 |
usbMasterx64CopyLocation = Settings.Element("ProgramSettings").Element("USBMasterCopyx64Location").Value;
|
| 94 |
}
|
102 |
}
|
| 95 |
else
|
103 |
else
|
| Line 161... |
Line 169... |
| 161 |
new XElement("HiddenAccounts", "Administrator,Guest"),
|
169 |
new XElement("HiddenAccounts", "Administrator,Guest"),
|
| 162 |
new XElement("SharedFolderLocation", "C:\\"),
|
170 |
new XElement("SharedFolderLocation", "C:\\"),
|
| 163 |
new XElement("USBMasterCopyx32Location", "C:\\"),
|
171 |
new XElement("USBMasterCopyx32Location", "C:\\"),
|
| 164 |
new XElement("USBMasterCopyx64Location", "C:\\"),
|
172 |
new XElement("USBMasterCopyx64Location", "C:\\"),
|
| 165 |
new XElement("DockLabels", "Dock 1,Dock 2,Dock 3,External USB"),
|
173 |
new XElement("DockLabels", "Dock 1,Dock 2,Dock 3,External USB"),
|
| 166 |
new XElement("DockRefreshInterval", 1000)
|
174 |
new XElement("DockRefreshInterval", 1000),
|
| - |
|
175 |
new XElement("DockDrivesToIgnore", "C:\\")
|
| 167 |
)
|
176 |
)
|
| 168 |
);
|
177 |
);
|
| 169 |
Settings.Save("Settings.xml");
|
178 |
Settings.Save("Settings.xml");
|
| 170 |
}
|
179 |
}
|
| 171 |
catch (Exception e)
|
180 |
catch (Exception e)
|