Opc.Ua.Configuration.ManageSslBindingsDlg.ShowDialog C# (CSharp) Method

ShowDialog() public method

Displays the dialog.
public ShowDialog ( CertificateStoreIdentifier defaultStore ) : bool
defaultStore CertificateStoreIdentifier
return bool
        public bool ShowDialog(CertificateStoreIdentifier defaultStore)
        {
            // save the default store (used when creating new bindings).
            m_defaultStore = defaultStore;

            if (m_defaultStore == null)
            {
                m_defaultStore = new CertificateStoreIdentifier();
                m_defaultStore.StoreType = Utils.DefaultStoreType;
                m_defaultStore.StorePath = Utils.DefaultStorePath;
            }

            // populate the grid.
            foreach (SslCertificateBinding binding in HttpAccessRule.GetSslCertificateBindings())
            {
                AddRow(binding);
            }

            m_dataset.AcceptChanges();
            BindingsDV.DataSource = m_dataset.Tables[0].DefaultView;

            if (base.ShowDialog() == DialogResult.Cancel)
            {
                return false;
            }

            return true;
        }
        #endregion