Subversion Repositories Code-Repo

Rev

Rev 41 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 41 Rev 45
Line 21... Line 21...
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
 
24
 
25
        private static Settings_Form _Settings_Form = null;
25
        private static Settings_Form _Settings_Form = null;
26
        // Singleton instance
26
        // Singleton instance so the settings file isnt loaded every time
27
        public static Settings_Form settings_Form_Instance
27
        public static Settings_Form settings_Form_Instance
28
        {
28
        {
29
            set
29
            set
30
            {
30
            {
31
                _Settings_Form = value;
31
                _Settings_Form = value;
Line 58... Line 58...
58
        {
58
        {
59
            settings_Form_Instance.btn_HiddenRemove.Enabled = true;
59
            settings_Form_Instance.btn_HiddenRemove.Enabled = true;
60
        }
60
        }
61
        public static void ImportSettings()
61
        public static void ImportSettings()
62
        {
62
        {
-
 
63
            // Imports settings from Settings.xml
63
            try
64
            try
64
            {
65
            {
65
                if (File.Exists("Settings.xml"))
66
                if (File.Exists("Settings.xml"))
66
                {
67
                {
67
                    // XML Parsing using System.XML.Linq
68
                    // XML Parsing using System.XML.Linq
Line 116... Line 117...
116
            usbMasterx32CopyLocation = settings_Form_Instance.txt_USBMasterCopyLocation_x32.Text;
117
            usbMasterx32CopyLocation = settings_Form_Instance.txt_USBMasterCopyLocation_x32.Text;
117
            usbMasterx64CopyLocation = settings_Form_Instance.txt_USBMasterCopyLocation_x64.Text;
118
            usbMasterx64CopyLocation = settings_Form_Instance.txt_USBMasterCopyLocation_x64.Text;
118
        }
119
        }
119
        private static void ExportSettings()
120
        private static void ExportSettings()
120
        {
121
        {
-
 
122
            // Exports all settings to Settings.xml
121
            try
123
            try
122
            {
124
            {
123
                // XML Parsing using System.XML.Linq
125
                // XML Parsing using System.XML.Linq
124
                XElement Settings = XElement.Load("Settings.xml");
126
                XElement Settings = XElement.Load("Settings.xml");
125
 
127
 
Line 171... Line 173...
171
                MessageBox.Show(e.ToString());
173
                MessageBox.Show(e.ToString());
172
            }
174
            }
173
        }
175
        }
174
        private static void PaintListBox()
176
        private static void PaintListBox()
175
        {
177
        {
176
            // Paints&Refreshes the listbox of system accounts
178
            // Paints & Refreshes the listbox of system accounts
177
            settings_Form_Instance.listBox_SystemAccounts.Items.Clear();
179
            settings_Form_Instance.listBox_SystemAccounts.Items.Clear();
178
            foreach (string user in systemAccounts)
180
            foreach (string user in systemAccounts)
179
                settings_Form_Instance.listBox_SystemAccounts.Items.Add(user);
181
                settings_Form_Instance.listBox_SystemAccounts.Items.Add(user);
180
            settings_Form_Instance.listBox_HiddenAccounts.Items.Clear();
182
            settings_Form_Instance.listBox_HiddenAccounts.Items.Clear();
181
            foreach (string user in hiddenAccounts)
183
            foreach (string user in hiddenAccounts)