Example #1
0
        public ConnectDialog(string ip, int portNr)
        {
            InitializeComponent();

            tbServer.Text = Utilities.IPOnlyNumbersAndDots(ip) ? ip : Utilities.GetLocalIP();
            tbPort.Text   = portNr.ToString();
        }
Example #2
0
 private void localIPCheckBox_CheckedChanged(object sender, EventArgs e)
 {
     if (this.UseLocalIP())
     {
         tbServer.Text    = Utilities.GetLocalIP();
         tbServer.Enabled = false;
     }
     else
     {
         tbServer.Enabled = true;
     }
 }
Example #3
0
        public ConnectDialog(bool useLocalIp, string ip, int portNr)
        {
            InitializeComponent();

            localIPCheckBox.Checked = useLocalIp;
            tbServer.Text           = !useLocalIp && Utilities.IPOnlyNumbersAndDots(ip) ? ip : Utilities.GetLocalIP();
            tbServer.Enabled        = !useLocalIp;
            tbPort.Text             = portNr.ToString();
        }