public Magellan()
    {
        MsgDelegate = new MsgRecv(this.MsgRecvMethod);
        this.FormClosing += new FormClosingEventHandler(FormClosingMethod);

        ArrayList conf = ReadConfig();
        sph = new SerialPortHandler[conf.Count];
        for(int i = 0; i < conf.Count; i++){
            string port = ((string[])conf[i])[0];
            string module = ((string[])conf[i])[1];

            Type t = Type.GetType("SPH."+module+", SPH, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null");

            sph[i] = (SerialPortHandler)Activator.CreateInstance(t, new Object[]{ port });
            sph[i].SetParent(this);
        }
        MonitorSerialPorts();

        browser_window = Process.Start("iexplore.exe",
                "http://localhost/");

        u = new UDPMsgBox(9450);
        u.SetParent(this);
        u.My_Thread.Start();
    }
    private void FinishInit(){
        MonitorSerialPorts();

        u = new UDPMsgBox(9450);
        u.SetParent(this);
        u.My_Thread.Start();

        w = new WebSocketServer(new IPEndPoint(IPAddress.Any, 8888));
        WsThread = new Thread(new ThreadStart(w.Run));
        WsThread.Start();
    }
Exemple #3
0
    private void FinishInit()
    {
        MonitorSerialPorts();

        u = new UDPMsgBox(9450);
        u.SetParent(this);
        u.My_Thread.Start();
    }
Exemple #4
0
 private void UdpListen()
 {
     u = new UDPMsgBox(9450);
     u.SetParent(this);
     u.My_Thread.Start();
 }