public Form1()
        {
            InitializeComponent();
            // Setting strings that represent boost types and versions
            boost_type_dict["Pocket_detector"]         = boost_type.POCKET_DETECTOR;
            boost_type_dict["Smart_cue"]               = boost_type.SMART_CUE;
            boost_version_dict["Pocket_detector#1.00"] = boost_version.POCKET_DETECTOR_v_1_00;
            boost_version_dict["Smart_cue#0.10"]       = boost_version.SMART_CUE_v_0_10;
            // open OSC over UDP
            udpPacket = new UdpPacket();
            udpPacket.RemoteHostName = "127.0.0.1";
            udpPacket.RemotePort     = 7000;
            udpPacket.LocalPort      = 9000;
            udpPacket.Open();
            oscUdp = new Osc(udpPacket);

            String[] serialport_names;
            serialport_names = SerialPort.GetPortNames();
            comport_box_PD.Items.Clear();
            comport_PD              = null;
            debug_mode_PD           = false;
            debug_mode_PD_requested = false;
            comport_box_SC.Items.Clear();
            comport_SC              = null;
            debug_mode_SC           = false;
            debug_mode_SC_requested = false;
            comport_scan_worker.RunWorkerAsync();
        }
    MCTest()
    {
        mct = new MCTestForm(this);

        //usbPacket = new UsbWin32Packet();
        usbPacket = new UsbPacket();
        usbPacket.Open();
        if (usbPacket.IsOpen())
        {
            mct.SetUsbPortName(usbPacket.Name);
        }
        oscUsb = null;
        oscUsb = new Osc(usbPacket);
        oscUsb.SetAllMessageHandler(UsbMessages);

        udpPacket = new UdpPacket();
        udpPacket.RemoteHostName = mct.GetUdpRemoteHostName();
        udpPacket.RemotePort     = mct.GetUdpRemotePort();
        udpPacket.LocalPort      = mct.GetUdpLocalPort();
        udpPacket.Open();
        oscUdp = new Osc(udpPacket);
        oscUdp.SetAllMessageHandler(UdpMessages);
        oscUdp.SetAddressHandler("/analogin/0/value", AIn0Message);

        Application.Run(mct);
    }
Exemple #3
0
 public Form1()
 {
     udpPacket = new UdpPacket();
     udpPacket.RemoteHostName = "127.0.0.1";
     udpPacket.RemotePort     = 9000;
     udpPacket.LocalPort      = 7000;
     udpPacket.Open();
     oscUdp = new Osc(udpPacket);
     InitializeComponent();
     Console.Write("get");
     backgroundWorker1.RunWorkerAsync();
 }