コード例 #1
0
    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
ファイル: Magellan.cs プロジェクト: 42burritos/PFC_CORE
	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
ファイル: Magellan.cs プロジェクト: tinavas/IS4C
 private void UdpListen()
 {
     u = new UDPMsgBox(9450);
     u.SetParent(this);
     u.My_Thread.Start();
 }