public VMCertStoreServerNode(VMCertStoreServerDTO dto) { ServerDTO = dto; IsLoggedIn = false; IsDetailsLoaded = false; StoresInfo = new Dictionary <string, CertBagItem> (); }
public async void ConnectToServer(string server) { var serverDTO = VMCertStoreServerDTO.CreateInstance(); Servernode = new VMCertStoreServerNode(serverDTO); ProgressWindowController pwc = new ProgressWindowController(); IntPtr session = new IntPtr(0); string[] servers = VMCertStoreSnapInEnvironment.Instance.LocalData.GetServerArray(); LoginWindowController lwc = new LoginWindowController(servers); NSApplication.SharedApplication.BeginSheet(lwc.Window, this.Window, () => { }); nint result = NSApplication.SharedApplication.RunModalForWindow(lwc.Window); try { if (result == (nint)VMIdentityConstants.DIALOGOK) { Servernode.ServerDTO.Server = lwc.Server; Servernode.ServerDTO.DomainName = lwc.DomainName; Servernode.ServerDTO.UserName = lwc.UserName; Servernode.ServerDTO.Password = lwc.Password; NSApplication.SharedApplication.BeginSheet(pwc.Window, this.Window as NSWindow, () => { }); session = NSApplication.SharedApplication.BeginModalSession(pwc.Window); await Servernode.ServerDTO.LogintoServer(lwc.UserName, lwc.Password, lwc.DomainName); if (Servernode.ServerDTO.IsLoggedIn == true) { InitialiseViews(); NSNotificationCenter.DefaultCenter.PostNotificationName("ReloadOutlineView", this); Task.Run(() => Servernode.FillServerInfo()); } else { UIErrorHelper.ShowAlert("Please check the login details or the user permissions.", "Unable to Login"); } } } catch (Exception e) { UIErrorHelper.ShowAlert("", e.Message); } finally { if (pwc.ProgressBar != null) { pwc.ProgressBar.StopAnimation(pwc.Window); pwc.Window.Close(); NSApplication.SharedApplication.EndModalSession(session); } Window.EndSheet(lwc.Window); lwc.Dispose(); } }
public VecsTrustedCertsNode(VMCertStoreServerDTO dto, string storeName) : base(dto, storeName) { ImageIndex = SelectedImageIndex = (int)VMCertStoreImageIndex.TrustedCert; this.EnabledStandardVerbs = StandardVerbs.Refresh; DisplayName = "Trusted Certs"; this.Tag = storeName; InitConsole(); }
public VecsPrivateKeysNode(VMCertStoreServerDTO dto, string storeName) : base(dto, storeName) { ImageIndex = SelectedImageIndex = (int)VMCertStoreImageIndex.PrivateEntities; DisplayName = "Private Entities"; this.Tag = storeName; this.EnabledStandardVerbs = StandardVerbs.Refresh; InitConsole(); }
public void RefreshMethod(VMCertStoreServerDTO dto) { if (dto == null) { RefreshAll(); } else { AddServerNode(dto); } }
public VecsStoresNode(VMCertStoreServerDTO dto) { ServerDTO = dto; DisplayName = "Vecs Stores"; ImageIndex = SelectedImageIndex = (int)VMCertStoreImageIndex.CertificateStore; this.EnabledStandardVerbs = StandardVerbs.Refresh; RefreshStores(); this.ActionsPaneItems.Add( new Microsoft.ManagementConsole.Action( "Create Store", "Create Store", -1, ACTION_CREATE_STORE)); }
public VMCertStoreServerNode(VMCertStoreServerDTO dto) : base() { ServerDTO = dto; DisplayName = ServerDTO.Server; this.ImageIndex = this.SelectedImageIndex = (int)VMCertStoreImageIndex.Server; this.EnabledStandardVerbs = StandardVerbs.Delete | StandardVerbs.Refresh; this.ActionsPaneItems.Add(new Microsoft.ManagementConsole.Action("Login", "Login", -1, ACTION_LOGIN)); this.ActionsPaneItems.Add(new Microsoft.ManagementConsole.Action("Check connectivity", "Check connectivity", -1, ACTION_CHECK_CONNECTIVITY)); PopulateChildren(); }
public VecsStoreNode(VMCertStoreServerDTO dto, string storeName) { DisplayName = storeName; StoreName = storeName; ServerDTO = dto; ImageIndex = SelectedImageIndex = (int)VMCertStoreImageIndex.Store; if (MiscUtilsService.IsSystemStore(StoreName)) { this.EnabledStandardVerbs = StandardVerbs.Refresh; } else { this.EnabledStandardVerbs = StandardVerbs.Refresh | StandardVerbs.Delete; } InitConsole(); }
async void AddServer() { try { var ServerDTO = VMCertStoreServerDTO.CreateInstance(); ServerDTO.Server = ""; var node = new VMCertStoreServerNode(ServerDTO); await node.DoLogin(); if (node.ServerDTO.IsLoggedIn) { VMCertStoreSnapInEnvironment.Instance.LocalData.AddServer(node.ServerDTO); this.Children.Add(node); } } catch (Exception e) { MMCDlgHelper.ShowException(e); } }
public CertificateDetailsListView(List <CertDTO> certList, VMCertStoreServerDTO dto, String store) { Entries = certList; ServerDto = dto; Store = store; }
public NodesListView(List <ScopeNode> nodesList, VMCertStoreServerDTO dto) { Entries = nodesList; ServerDTO = dto; }
public VecsStoreEntriesNode(VMCertStoreServerDTO dto, string storeName) { StoreName = storeName; ServerDTO = dto; this.EnabledStandardVerbs = StandardVerbs.Refresh; }
public void AddServer(VMCertStoreServerDTO dto) { ServerList.Add(dto); }
public SecretKeysListView(List <CertDTO> certList, VMCertStoreServerDTO dto, String store) { Entries = certList; ServerDto = dto; Store = store; }
void AddServerNode(VMCertStoreServerDTO dto) { var node = new VMCertStoreServerNode(dto); this.Children.Add(node); }