Example #1
1
 public MessageParser(Socket serverSocket, Messaging parent)
 {
     this.threadSocket = serverSocket;
     this.parent = parent;
     Thread messageParserThread = new Thread(RunThread);
     messageParserThread.Start();
 }
Example #2
0
 public Actor(Messaging msgSys)
 {
     this.msgSys = msgSys;
     msgSys.UnrealMsg += new Messaging.UnrealMsgHandler(this.UnrealCallback);
 }
Example #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (gis == null)
            {
                gis = new XmlDocument();
                gis.Load("GIS.xml");
            }
            if (selectedES == 0)
            {
                expert = new PrologES();
                expert.init("Actions.xml");
                expert.setThreshold(0.9d);
            }
            else
            {
                expert = new BeliefNetworkES();
                expert.init(Directory.GetFiles(Directory.GetCurrentDirectory() + "\\BNModels"));
                expert.setThreshold(0.8d);
            }
            progressBar1.Value = 50;
            setProgressColor();
            try
            {
                closeAll(false);
                imageParser = new ImageParser(imgServerHost.Text, imgPort.Text, pictureBox1, bmvs);
                msgSys = new Messaging(serverHost.Text, serverPort.Text);
                actor = new Actor(msgSys);
                actor.initVehicle();

                // common sensory handler
                msgSys.UnrealMsg += new Messaging.UnrealMsgHandler(this.UnrealCallback);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error Occured:" + ex.Message);
                return;
            }
        }