public void RemoveProvider(AbstractPuttySessionsProvider providerToRemove) { if (!_providers.Contains(providerToRemove)) return; _providers.Remove(providerToRemove); providerToRemove.PuttySessionsCollectionChanged -= RaisePuttySessionCollectionChangedEvent; RaiseSessionProvidersCollectionChangedEvent(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, providerToRemove)); }
public void AddProvider(AbstractPuttySessionsProvider newProvider) { if (_providers.Contains(newProvider)) return; _providers.Add(newProvider); newProvider.PuttySessionsCollectionChanged += RaisePuttySessionCollectionChangedEvent; RaiseSessionProvidersCollectionChangedEvent(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, newProvider)); }
public void RemoveProvider(AbstractPuttySessionsProvider providerToRemove) { if (!_providers.Contains(providerToRemove)) { return; } _providers.Remove(providerToRemove); providerToRemove.PuttySessionsCollectionChanged -= RaisePuttySessionCollectionChangedEvent; RaiseSessionProvidersCollectionChangedEvent(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, providerToRemove)); }
public void AddProvider(AbstractPuttySessionsProvider newProvider) { if (_providers.Contains(newProvider)) { return; } _providers.Add(newProvider); newProvider.PuttySessionsCollectionChanged += RaisePuttySessionCollectionChangedEvent; RaiseSessionProvidersCollectionChangedEvent(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, newProvider)); }
private void AddSessionsFromProvider(AbstractPuttySessionsProvider provider) { var rootTreeNode = provider.RootInfo; provider.GetSessions(); if (!RootPuttySessionsNodes.Contains(rootTreeNode) && rootTreeNode.HasChildren()) { RootPuttySessionsNodes.Add(rootTreeNode); } rootTreeNode.SortRecursive(); }
private void AddSessionsFromProvider(AbstractPuttySessionsProvider puttySessionProvider) { puttySessionProvider.ThrowIfNull(nameof(puttySessionProvider)); var rootTreeNode = puttySessionProvider.RootInfo; puttySessionProvider.GetSessions(); if (!RootPuttySessionsNodes.Contains(rootTreeNode) && rootTreeNode.HasChildren()) { RootPuttySessionsNodes.Add(rootTreeNode); } rootTreeNode.SortRecursive(); }
private bool IsProviderEnabled(AbstractPuttySessionsProvider puttySessionsProvider) { var enabled = true; if (PuttyTypeDetector.GetPuttyType() == PuttyTypeDetector.PuttyType.Xming) { if (puttySessionsProvider is PuttySessionsRegistryProvider) { enabled = false; } } else { if (puttySessionsProvider is PuttySessionsXmingProvider) { enabled = false; } } return(enabled); }
private bool IsProviderEnabled(AbstractPuttySessionsProvider puttySessionsProvider) { var enabled = true; if (PuttyTypeDetector.GetPuttyType() == PuttyTypeDetector.PuttyType.Xming) { if (puttySessionsProvider is PuttySessionsRegistryProvider) enabled = false; } else { if (puttySessionsProvider is PuttySessionsXmingProvider) enabled = false; } return enabled; }
private void AddSessionsFromProvider(AbstractPuttySessionsProvider provider) { var rootTreeNode = provider.RootInfo; provider.GetSessions(); if (!RootPuttySessionsNodes.Contains(rootTreeNode) && rootTreeNode.HasChildren()) RootPuttySessionsNodes.Add(rootTreeNode); rootTreeNode.SortRecursive(); }