public void AddConnection() { var newConn = new ConnectionString(NewServerURL, NewUsername, null, NewPort, NewDatabaseName) { ConnectionName = NewConnectionName, }; StaticElements.Settings.Local.ConnectionStrings.Add(newConn); StaticElements.Settings.SaveSettings(); DbConnections.Add(newConn); OnDatasourceChanged(); }