void AddRootCertificate() { MMCActionHelper.CheckedExec(delegate() { var dto = new AddCertificateDTO { PrivateKey = new PrivateKeyDTO() }; var frm = new FormAddRootCert(dto); if (MMCDlgHelper.ShowForm(frm)) { var cert = File.ReadAllText(dto.Certificate); ServerDTO.VMCAClient.AddRootCertificate(cert, "", dto.PrivateKey.ToString()); } }); }
public void AddRootCertificate() { UIErrorHelper.CheckedExec(delegate() { var dto = new AddCertificateDTO { PrivateKey = new PrivateKeyDTO() }; AddCertificateWindowController cwc = new AddCertificateWindowController(dto); nint result = NSApplication.SharedApplication.RunModalForWindow(cwc.Window); if (result == (int)Constants.DIALOGOK) { var cert = File.ReadAllText(dto.Certificate); ServerDTO.VMCAClient.AddRootCertificate(cert, "", dto.PrivateKey.ToString()); } }); }
// Call to load from the XIB/NIB file public AddCertificateWindowController(AddCertificateDTO dto) : base("AddCertificateWindow") { AddCertificateDto = dto; }
public FormAddRootCert(AddCertificateDTO certDTO) { this.certDTO = certDTO; this.certDTO.PrivateKey = new PrivateKeyDTO(); InitializeComponent(); }