Exemplo n.º 1
0
 public void RemoveProvider(AbstractPuttySessionsProvider providerToRemove)
 {
     if (!_providers.Contains(providerToRemove)) return;
     _providers.Remove(providerToRemove);
     providerToRemove.PuttySessionsCollectionChanged -= RaisePuttySessionCollectionChangedEvent;
     RaiseSessionProvidersCollectionChangedEvent(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, providerToRemove));
 }
Exemplo n.º 2
0
 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));
 }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 8
0
 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;
 }
Exemplo n.º 9
0
        private void AddSessionsFromProvider(AbstractPuttySessionsProvider provider)
        {
            var rootTreeNode = provider.RootInfo;
            provider.GetSessions();

            if (!RootPuttySessionsNodes.Contains(rootTreeNode) && rootTreeNode.HasChildren())
                RootPuttySessionsNodes.Add(rootTreeNode);
            rootTreeNode.SortRecursive();
        }