Exemplo n.º 1
0
        private void ChangePortNumberMenuItem_Click(object sender, System.EventArgs e)
        {
            PortNumberForm pnf = new PortNumberForm(this.PortNumber);

            if (pnf.ShowDialog() == DialogResult.OK)
            {
                this.overrideIP = pnf.PublicIPAddress;
                PortNumber      = pnf.Port;
                gk.SwitchToPort(pnf.Port);
                gk.PublicIP         = pnf.PublicIPAddress;
                SharingOnLabel.Text = "Sharing on " + pnf.PublicIPAddress + " port " + PortNumber.ToString();
            }
            pnf.Dispose();
        }
Exemplo n.º 2
0
 private void ChangePortNumberMenuItem_Click(object sender, System.EventArgs e)
 {
     PortNumberForm pnf = new PortNumberForm(this.PortNumber);
     if(pnf.ShowDialog()==DialogResult.OK)
     {
         this.overrideIP = pnf.PublicIPAddress;
         PortNumber = pnf.Port;
         gk.SwitchToPort(pnf.Port);
         gk.PublicIP = pnf.PublicIPAddress;
         SharingOnLabel.Text = "Sharing on "+pnf.PublicIPAddress+" port " + PortNumber.ToString();
     }
     pnf.Dispose();
 }