private void OnCellContentClick_ConnServices(object sender, DataGridViewCellEventArgs e) { if (m_MessageProcessor == null && e.ColumnIndex == colCSettings.Index && e.RowIndex >= 0 && e.RowIndex < m_ConnServiceHosts.Count) { ILogonControl aILogonControl = m_ConnServiceHosts[e.RowIndex].Host.LogonControl; if (aILogonControl is UserControl) { DlgLogonSettings dlg = new DlgLogonSettings(); dlg.Init(aILogonControl); aILogonControl.Settings = m_ConnServiceHosts[e.RowIndex].Parameters; if (dlg.ShowDialog() == DialogResult.OK) { m_ConnServiceHosts[e.RowIndex].Parameters = aILogonControl.Settings; } m_ConnServiceHosts[e.RowIndex].Save(); } else { MessageBox.Show("The connection service does not support functionality to update settings", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
public void Init(ILogonControl aSettings) { m_Settings = aSettings; }