private void CreateApplicationCertificateBTN_Click(object sender, EventArgs e)
{
try
{
// get application.
ManagedApplication application = ApplicationToManageCTRL.GetSelectedApplication();;
if (application == null)
{
return;
}
// load the configuration.
application.Reload();
// can't set application certificate for non-sdk apps.
if (!application.IsSdkCompatible)
{
return;
}
// create the certificate.
CertificateIdentifier certificate = new CreateCertificateDlg().ShowDialog(application.Application);
if (certificate == null)
{
return;
}
// save the configuration.
CertificateStoreIdentifier store = new CertificateStoreIdentifier();
store.StorePath = certificate.StorePath;
store.StoreType = certificate.StoreType;
m_currentStore = store;
UpdateApplicationCertificate(application.Application, store, certificate.Certificate);
}
catch (Exception exception)
{
GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
}
}