예제 #1
0
        private void startButton_Click(object sender, EventArgs e)
        {
            Classes.HostConnection server;

            if (server2IPTextbox.Text.Equals(String.Empty))
            {
                server = new Classes.HostConnection(
                    deviceDropDown.SelectedIndex,
                    server1IPTextbox.Text,
                    Convert.ToInt32(msgCountTextbox.Text),
                    Convert.ToInt32(paceTextbox.Text));
            }
            else
            {
                    server = new Classes.HostConnection(
                    deviceDropDown.SelectedIndex,
                    server1IPTextbox.Text,
                    server2IPTextbox.Text,
                    Convert.ToInt32(msgCountTextbox.Text),
                    Convert.ToInt32(paceTextbox.Text));
            }

            testDataTextbox.Text += "Starting Server";
            server.Start();
            testDataTextbox.Text += "Server started";
        }
예제 #2
0
        private void startButton_Click(object sender, EventArgs e)
        {
            Classes.HostConnection server;

            if (server2IPTextbox.Text.Equals(String.Empty))
            {
                server = new Classes.HostConnection(
                    deviceDropDown.SelectedIndex,
                    server1IPTextbox.Text,
                    Convert.ToInt32(msgCountTextbox.Text),
                    Convert.ToInt32(paceTextbox.Text));
            }
            else
            {
                server = new Classes.HostConnection(
                    deviceDropDown.SelectedIndex,
                    server1IPTextbox.Text,
                    server2IPTextbox.Text,
                    Convert.ToInt32(msgCountTextbox.Text),
                    Convert.ToInt32(paceTextbox.Text));
            }

            testDataTextbox.Text += "Starting Server";
            server.Start();
            testDataTextbox.Text += "Server started";
        }