示例#1
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;
 }