private void lnkSetCredentials_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { var prov = _service.CurrentConnection.FeatureService.GetFeatureProvider(_fs.Provider); var connProps = new List <string>(); foreach (var p in prov.ConnectionProperties) { if (!p.Enumerable) { connProps.Add(p.Name); } } using (var diag = new SetCredentialsDialog(connProps.ToArray())) { if (diag.ShowDialog() == DialogResult.OK) { _fs.SetConnectionProperty(diag.UserProperty, StringConstants.MgUsernamePlaceholder); _fs.SetConnectionProperty(diag.PasswordProperty, StringConstants.MgPasswordPlaceholder); _fs.SetEncryptedCredentials(_service.CurrentConnection, diag.Username, diag.Password); _service.SyncSessionCopy(); InitGrid(); resDataCtrl.Init(_service); } } }
private void lnkSetCredentials_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { var prov = _service.FeatureService.GetFeatureProvider(_fs.Provider); var connProps = new List<string>(); foreach (var p in prov.ConnectionProperties) { if (!p.Enumerable) connProps.Add(p.Name); } using (var diag = new SetCredentialsDialog(connProps.ToArray())) { if (diag.ShowDialog() == DialogResult.OK) { _fs.SetConnectionProperty(diag.UserProperty, StringConstants.MgUsernamePlaceholder); _fs.SetConnectionProperty(diag.PasswordProperty, StringConstants.MgPasswordPlaceholder); _fs.SetEncryptedCredentials(diag.Username, diag.Password); _service.SyncSessionCopy(); InitGrid(); resDataCtrl.Init(_service); } } }