/// <summary>
        ///     Gets the active connection's icon. A connection might have more than one Icon defined.
        /// </summary>
        private static ConnectionImage GetProtocolImage(FavoriteConfigurationElement favorite)
        {
            Connection connection = GetCachedConnection(favorite.Protocol);

            // This might happen if the user is not allowed to
            // use all available connections e.g.
            // if the user has a freeware version.
            if (connection == null)
            {
                return(UnknownConnectionIcon);
            }

            ConnectionImage image = favorite.CustomImage;

            // If a custom icon has been set use it, otherwise ...
            if (image != null)
            {
                // Add the image to the image list if it hasn't been loaded.
                if (!imageList.Images.ContainsKey(image.Name))
                {
                    imageList.Images.Add(image.Name, image.Image);
                }

                return(image);
            }

            connection.Favorite = favorite;

            // ... return either the connection specific image or the image for unknown types.
            return(connection.Image ?? UnknownConnectionIcon);
        }
Exemple #2
0
        void ReleaseDesignerOutlets()
        {
            if (ActivityInProgressView != null)
            {
                ActivityInProgressView.Dispose();
                ActivityInProgressView = null;
            }

            if (SDKVersionLabel != null)
            {
                SDKVersionLabel.Dispose();
                SDKVersionLabel = null;
            }

            if (ChannelNameEdit != null)
            {
                ChannelNameEdit.Dispose();
                ChannelNameEdit = null;
            }

            if (ConnectingLabel != null)
            {
                ConnectingLabel.Dispose();
                ConnectingLabel = null;
            }

            if (ConnectionImage != null)
            {
                ConnectionImage.Dispose();
                ConnectionImage = null;
            }

            if (EncryptionKeyEdit != null)
            {
                EncryptionKeyEdit.Dispose();
                EncryptionKeyEdit = null;
            }

            if (JoinButton != null)
            {
                JoinButton.Dispose();
                JoinButton = null;
            }

            if (OpacityLayerView != null)
            {
                OpacityLayerView.Dispose();
                OpacityLayerView = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (AgoraVersionLabel != null)
            {
                AgoraVersionLabel.Dispose();
                AgoraVersionLabel = null;
            }

            if (ChannelNameEdit != null)
            {
                ChannelNameEdit.Dispose();
                ChannelNameEdit = null;
            }

            if (ConnectingLabel != null)
            {
                ConnectingLabel.Dispose();
                ConnectingLabel = null;
            }

            if (ConnectionImage != null)
            {
                ConnectionImage.Dispose();
                ConnectionImage = null;
            }

            if (EncryptionKeyEdit != null)
            {
                EncryptionKeyEdit.Dispose();
                EncryptionKeyEdit = null;
            }

            if (JoinButton != null)
            {
                JoinButton.Dispose();
                JoinButton = null;
            }

            if (UserNameLabel != null)
            {
                UserNameLabel.Dispose();
                UserNameLabel = null;
            }
        }
        /// <summary>
        ///     Gets the icon file name by icons defined in FavoritesTreeView imageListIcons
        /// </summary>
        public static string GetTreeviewImageListKey(FavoriteConfigurationElement favorite)
        {
            ConnectionImage image = GetProtocolImage(favorite);

            return(image.Name);
        }
Exemple #5
0
        private void KeepListening()
        {
            // While the server is running
            while (ServRunning == true)
            {
                // Accept a pending connection
                tcpClient = tlsClient.AcceptTcpClient();

                // Create a new instance of Connection
                ConnectionImage newConnection = new ConnectionImage(tcpClient);
            }
        }