예제 #1
0
 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());
         }
     });
 }
예제 #2
0
 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;
 }
예제 #4
0
 public FormAddRootCert(AddCertificateDTO certDTO)
 {
     this.certDTO            = certDTO;
     this.certDTO.PrivateKey = new PrivateKeyDTO();
     InitializeComponent();
 }