Esempio n. 1
0
 public MainForm()
 {
     InitializeComponent();
     textBoxMODAServer.Text = Constants.DEFAULT_IP;
     Connection             = null;
     Phx = null;
 }
Esempio n. 2
0
        private void buttonConnect_Click(object sender, EventArgs e)
        {
            if (textBoxMODAServer.Text.Length != 0)
            {
                if (Connection != null)
                {
                    //close the current connection
                    Connection.Disconnect();
                    Connection = null;
                    Phx        = null;
                }

                Connection = new Moda.Connection(true);
                if (Connection.Connect(textBoxMODAServer.Text))
                {
                    Phx = Connection.QueryRobotPHX(Constants.ROBOT_PHX);
                    if (Phx == null)
                    {
                        MessageBox.Show("Connected to MODA server " + textBoxMODAServer.Text + ", /phx0 not found");
                    }
                    else
                    {
                        buttonConnect.Enabled = false;
                        buttonConnect.Text    = "Connected";
                        buttonStart.Enabled   = true;
                    }
                }
                else
                {
                    MessageBox.Show("Unable to connected to MODA server " + textBoxMODAServer.Text);
                }
            }
            else
            {
                MessageBox.Show("Unable to connected to MODA server " + textBoxMODAServer.Text);
            }
        }
Esempio n. 3
0
 public Worker(AbstractRobot robot, Moda.Connection connection)
 {
     Robot      = robot;
     Connection = connection;
     Statistics = new EvaluationStatistics();
 }
Esempio n. 4
0
 public EvolutionThread WithConnection(Moda.Connection connection)
 {
     Connection = connection;
     return(this);
 }