Exemplo n.º 1
0
        private void newConnectionToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            _newConnectionForm = new ConnectionForm()
            {
                TopLevel = true
            };
            if (_newConnectionForm.ShowDialog() == DialogResult.OK)
            {
                var ip   = NetworkOps.GetIpString(_newConnectionForm.textBoxUri.Text);
                var port = NetworkOps.GetPort(_newConnectionForm.textBoxPort.Text);

                var connected = NetworkOps.SetUpClientConnectionConfig(ip, port, _ip, _port);
                if (!connected)
                {
                    MessageBox.Show("Cannot establish connection to network. Please try again.\r\n");
                }
            }
        }
Exemplo n.º 2
0
        private void newConnectionToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            _newConnectionForm = new ConnectionForm() { TopLevel = true };
            if (_newConnectionForm.ShowDialog() == DialogResult.OK)
            {
                var ip = NetworkOps.GetIpString(_newConnectionForm.textBoxUri.Text);
                var port = NetworkOps.GetPort(_newConnectionForm.textBoxPort.Text);

                var connected = NetworkOps.SetUpClientConnectionConfig(ip, port, _ip, _port);
                if (!connected)
                {
                    MessageBox.Show("Cannot establish connection to network. Please try again.\r\n");
                }
            }
        }