コード例 #1
0
 public void RemoveProvider(AbstractPuttySessionsProvider providerToRemove)
 {
     if (!_providers.Contains(providerToRemove)) return;
     _providers.Remove(providerToRemove);
     providerToRemove.PuttySessionsCollectionChanged -= RaisePuttySessionCollectionChangedEvent;
     RaiseSessionProvidersCollectionChangedEvent(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, providerToRemove));
 }
コード例 #2
0
 public void AddProvider(AbstractPuttySessionsProvider newProvider)
 {
     if (_providers.Contains(newProvider)) return;
     _providers.Add(newProvider);
     newProvider.PuttySessionsCollectionChanged += RaisePuttySessionCollectionChangedEvent;
     RaiseSessionProvidersCollectionChangedEvent(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, newProvider));
 }
コード例 #3
0
 public void RemoveProvider(AbstractPuttySessionsProvider providerToRemove)
 {
     if (!_providers.Contains(providerToRemove))
     {
         return;
     }
     _providers.Remove(providerToRemove);
     providerToRemove.PuttySessionsCollectionChanged -= RaisePuttySessionCollectionChangedEvent;
     RaiseSessionProvidersCollectionChangedEvent(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, providerToRemove));
 }
コード例 #4
0
 public void AddProvider(AbstractPuttySessionsProvider newProvider)
 {
     if (_providers.Contains(newProvider))
     {
         return;
     }
     _providers.Add(newProvider);
     newProvider.PuttySessionsCollectionChanged += RaisePuttySessionCollectionChangedEvent;
     RaiseSessionProvidersCollectionChangedEvent(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, newProvider));
 }
コード例 #5
0
        private void AddSessionsFromProvider(AbstractPuttySessionsProvider provider)
        {
            var rootTreeNode = provider.RootInfo;

            provider.GetSessions();

            if (!RootPuttySessionsNodes.Contains(rootTreeNode) && rootTreeNode.HasChildren())
            {
                RootPuttySessionsNodes.Add(rootTreeNode);
            }
            rootTreeNode.SortRecursive();
        }
コード例 #6
0
        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();
        }
コード例 #7
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);
        }
コード例 #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;
 }
コード例 #9
0
        private void AddSessionsFromProvider(AbstractPuttySessionsProvider provider)
        {
            var rootTreeNode = provider.RootInfo;
            provider.GetSessions();

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