/// <summary>
        /// Store the current user settings in the database
        /// </summary>
        private static void StoreSettings()
        {
            if (_settings.Changed)
            {
                EMMADataSet.UserSettingsDataTable settingsTable = new EMMADataSet.UserSettingsDataTable();
                userSettingsTableAdapter.FillByName(settingsTable, _name);
                if (settingsTable.Count == 0)
                {
                    EMMADataSet.UserSettingsRow newRow = settingsTable.NewUserSettingsRow();
                    newRow.AccountName = _name;
                    // Just make this blank temporarilly so we are allowed to add it to the table.
                    newRow.Settings = "";
                    settingsTable.AddUserSettingsRow(newRow);
                }
                settingsTable[0].Settings = _settings.Xml.InnerXml;

                userSettingsTableAdapter.Update(settingsTable);
                _settings.Changed = false;
            }
        }
 /// <summary>
 /// Initialise the settings object based upon the current account name
 /// </summary>
 private static void InitSettings()
 {
     EMMADataSet.UserSettingsDataTable settingsTable = new EMMADataSet.UserSettingsDataTable();
     userSettingsTableAdapter.FillByName(settingsTable, _name);
     if (settingsTable.Count > 0)
     {
         XmlDocument settingsDoc = new XmlDocument();
         settingsDoc.LoadXml(settingsTable[0].Settings);
         _settings = new UserSettings(settingsDoc);
     }
     else
     {
         _settings = new UserSettings(_name);
     }
 }