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();
    }
Пример #2
0
	private void FinishInit(){
		MonitorSerialPorts();

		u = new UDPMsgBox(9450);
		u.SetParent(this);
		u.My_Thread.Start();
	}
Пример #3
0
 private void UdpListen()
 {
     try {
         u = new UDPMsgBox(9450, this.asyncUDP);
         u.SetParent(this);
         u.My_Thread.Start();
     } catch (Exception ex) {
         Magellan.LogMessage(ex.ToString());
         Console.WriteLine("Failed to start UDP server");
         Console.WriteLine(ex);
     }
 }
Пример #4
0
    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();
    }
Пример #5
0
 private void UdpListen()
 {
     u = new UDPMsgBox(9450);
     u.SetParent(this);
     u.My_Thread.Start();
 }