コード例 #1
0
        /// <summary>
        /// Sets the window's description and selects the tunnel server
        /// with the given address.
        /// </summary>
        /// <param name="description">The window description.</param>
        /// <param name="tunnelAddress">The address of the tunnel server to select.</param>
        public void Open(string description, string tunnelAddress = null)
        {
            lblDescription.Text   = description;
            originalTunnelAddress = tunnelAddress;

            if (!string.IsNullOrWhiteSpace(tunnelAddress))
            {
                lbTunnelList.SelectTunnel(tunnelAddress);
            }
            else
            {
                lbTunnelList.SelectedIndex = -1;
            }

            if (lbTunnelList.SelectedIndex > -1)
            {
                lbTunnelList.SetTopIndex(0);

                while (lbTunnelList.SelectedIndex > lbTunnelList.LastIndex)
                {
                    lbTunnelList.TopIndex++;
                }
            }

            btnApply.AllowClick = false;
            Enable();
        }
コード例 #2
0
        /// <summary>
        /// Sets the window's description and selects the tunnel server
        /// with the given address.
        /// </summary>
        /// <param name="description">The window description.</param>
        /// <param name="tunnelAddress">The address of the tunnel server to select.</param>
        public void Open(string description, string tunnelAddress = null)
        {
            lblDescription.Text = description;

            if (!string.IsNullOrWhiteSpace(tunnelAddress))
            {
                lbTunnelList.SelectTunnel(tunnelAddress);
            }
            else
            {
                lbTunnelList.SelectedIndex = -1;
            }

            Enable();
        }
コード例 #3
0
 /// <summary>
 /// Sets the window's description and selects the tunnel server
 /// with the given address.
 /// </summary>
 /// <param name="description">The window description.</param>
 /// <param name="tunnelAddress">The address of the tunnel server to select.</param>
 public void Open(string description, string tunnelAddress)
 {
     lblDescription.Text = description;
     lbTunnelList.SelectTunnel(tunnelAddress);
     Enable();
 }