public bool SaveSettings() { var settings = new DBSettings(); settings.DBServer = txtDBHost.Text; settings.DBUser = txtDBUser.Text; settings.DBPassword = CryptoSystem.Encrypt(txtDBPassword.Text); return(XMLConfigHandler.SaveConfig(settings)); }
public static bool Initialise() { settings = (DBSettings)XMLConfigHandler.ReadConfig(typeof(DBSettings)); if (settings == null) { MessageLogger.Add("Error ready DBSettings.XML", MessageLogger.MsgLevel.error); return(false); } return(true); }
public DBSettingsCntrl() { InitializeComponent(); DBSettings s = (DBSettings)XMLConfigHandler.ReadConfig(typeof(DBSettings)); if (s != null) { txtDBHost.Text = s.DBServer; txtDBUser.Text = s.DBUser; txtDBPassword.Text = CryptoSystem.Decrypt(s.DBPassword); } }