示例#1
0
        public LightBoard()
        {
            _com = new VComWrapper();

            var ports = System.IO.Ports.SerialPort.GetPortNames();
            _com.initPro(ports.First());
        }
示例#2
0
        public static void getWidgetList()
        {
            //setup the dummy Com Port
            System.IO.Ports.SerialPort temp = new System.IO.Ports.SerialPort();
            temp.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(temp_DataReceived);
            temp.Encoding      = Encoding.UTF8;

            //try to send a get widget parameters to each port.
            string [] possiblePorts = System.IO.Ports.SerialPort.GetPortNames();
            foreach (string p in possiblePorts)
            {
                temp.PortName = p;
                temp.Open();
                VComWrapper.sendMsg(temp, DMXProMsgLabel.GET_WIDGET_PARAMETERS_REQUEST, new byte[2] {
                    0, 0
                });
            }
        }
示例#3
0
        public Form1()
        {
            SliderGroup.Labels = Settings.Default.Labels.Split(',');
            SliderGroup.LabelChanged += new EventHandler<LabelChangedArgs>(SliderGroup_LabelChanged);

            InitializeComponent();
            mCList = new CueList();
            mCList.nextCueChanged += new EventHandler(mCList_nextCueChanged);
            mCList.currentCueChanged += new EventHandler(mCList_currentCueChanged);
            mCList.NextCueNumber = 0;

            loadCueIntoBlind(0);
            blindCue.channelLevelsChanged += new EventHandler(blindCue_channelLevelsChanged);

            com = new VComWrapper();
            com.SerialNumberReceived += new EventHandler<SerialNumberArgs>(com_SerialNumberReceived);
            com.WidgetParametersReceived += new EventHandler<WidgetParameterArgs>(com_WidgetParametersReceived);

            comboBox1.Items.AddRange(System.IO.Ports.SerialPort.GetPortNames());
            comboBox1.SelectedIndex = 0;
        }