Exemple #1
0
        void ListenAgv()
        {
            asm              = AgvServerManager.Instance;
            asm.ShowMessage += ShowMsg;
            //  asm.ReLoad += ReInitialSystem;
            //asm.DataMessage += TransmitToTask;

            asm.StartServer(Convert.ToInt32(listPort.Text));
            ShowMsg(string.Format("监听端口{0}中......", listPort.Text));
        }
        void InitServer()
        {
            gm              = GuiServerManager.Instance;
            gm.ShowMessage += OnShowMessageWithPicBox;
            gm.ReLoad      += ReInitialSystem;
            gm.DataMessage += OnTransmitToTask;
            gm.StartServer(Convert.ToInt32(txtPort.Text));

            tm              = TaskServerManager.Instance;
            tm.ShowMessage += OnShowMessageWithPicBox;
            tm.DataMessage += ReceveTask;
            tm.StartServer(Convert.ToInt32(txtPort.Text) + 1);

            am              = AgvServerManager.Instance;
            am.ShowMessage += OnShowMessageWithPicBox;
            //am.ReLoad += ReInitialSystem;
            //am.DataMessage +=OnAgvDone ;
            am.StartServer(ConstDefine.AGV_PORT_ADRESS);
        }