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 (); } }); }
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(); } }); }