コード例 #1
0
 public void CreateStore ()
 {
     UIErrorHelper.CheckedExec (delegate() {
         CreateCertificateStoreWindowController cwc = new CreateCertificateStoreWindowController ();
         NSApplication.SharedApplication.BeginSheet (cwc.Window, VMCertStoreSnapInEnvironment.Instance.mainWindow, () => {
         });
         nint result = (nint)NSApplication.SharedApplication.RunModalForWindow (cwc.Window);
         try {
             if (result == VMIdentityConstants.DIALOGOK) {
                 var dto = cwc.CertStoreDTO;
                 ServerNode.ServerDTO.VecsClient.CreateStore (dto.StoreName, dto.Password);
                 RefreshStores ();
                 ServerNode.UpdateStoreInfo (dto.StoreName);
                 NSNotificationCenter.DefaultCenter.PostNotificationName ("ReloadOutlineView", this);
             }
         } finally {
             VMCertStoreSnapInEnvironment.Instance.mainWindow.EndSheet (cwc.Window);
             cwc.Dispose ();
         }
     });
 }
コード例 #2
0
ファイル: VecsStoresNode.cs プロジェクト: wfu8/lightwave
 public void CreateStore()
 {
     UIErrorHelper.CheckedExec(delegate() {
         CreateCertificateStoreWindowController cwc = new CreateCertificateStoreWindowController();
         NSApplication.SharedApplication.BeginSheet(cwc.Window, VMCertStoreSnapInEnvironment.Instance.mainWindow, () => {
         });
         nint result = (nint)NSApplication.SharedApplication.RunModalForWindow(cwc.Window);
         try {
             if (result == VMIdentityConstants.DIALOGOK)
             {
                 var dto = cwc.CertStoreDTO;
                 ServerNode.ServerDTO.VecsClient.CreateStore(dto.StoreName, dto.Password);
                 RefreshStores();
                 ServerNode.UpdateStoreInfo(dto.StoreName);
                 NSNotificationCenter.DefaultCenter.PostNotificationName("ReloadOutlineView", this);
             }
         } finally {
             VMCertStoreSnapInEnvironment.Instance.mainWindow.EndSheet(cwc.Window);
             cwc.Dispose();
         }
     });
 }