Exemplo n.º 1
0
        private void button_open_Click(object sender, EventArgs e)
        {
            TransComChannel param = new TransComChannel();
            string          tempStr;

            tempStr        = this.comboBox_rate.Text.ToString();
            param.baudrate = Convert.ToUInt16(tempStr);
            tempStr        = this.comboBox_data.Text.ToString();
            param.databits = Convert.ToUInt16(tempStr);
            tempStr        = this.comboBox_stop.Text.ToString();
            param.stopbits = Convert.ToUInt16(tempStr);

            param.parity       = Convert.ToUInt16(this.comboBox_check.SelectedIndex);
            param.TransComType = SERIAL_TYPE.RS485;
            XMSDK.fTransComCallBack fcallback = new XMSDK.fTransComCallBack(MyCallBack);
            if (XMSDK.H264_DVR_OpenTransComChannel(lLoginID, ref param, fcallback, this.Handle))
            {
                MessageBox.Show(@"open ok");
            }
            else
            {
                MessageBox.Show(@"wrong");
            }
        }
        private void button_open_Click(object sender, EventArgs e)
        {
            TransComChannel param = new TransComChannel();
            string tempStr;
            tempStr = this.comboBox_rate.Text.ToString();
            param.baudrate = Convert.ToUInt16(tempStr);
            tempStr = this.comboBox_data.Text.ToString();
            param.databits = Convert.ToUInt16(tempStr);
            tempStr = this.comboBox_stop.Text.ToString();
            param.stopbits = Convert.ToUInt16(tempStr);

            param.parity = Convert.ToUInt16(this.comboBox_check.SelectedIndex);
            param.TransComType =SERIAL_TYPE.RS485;
            XMSDK.fTransComCallBack fcallback = new XMSDK.fTransComCallBack(MyCallBack);
            if (XMSDK.H264_DVR_OpenTransComChannel(lLoginID, ref param, fcallback, this.Handle))
            {
                MessageBox.Show(@"open ok");
            }
            else
            {
                MessageBox.Show(@"wrong");
            }
        }
Exemplo n.º 3
0
 public static extern bool H264_DVR_OpenTransComChannel(Int32 lLoginID, ref TransComChannel TransInfo, fTransComCallBack cbTransCom, IntPtr dwUser);
Exemplo n.º 4
0
 public static extern bool H264_DVR_OpenTransComChannel(Int32 lLoginID, ref TransComChannel TransInfo, fTransComCallBack cbTransCom, IntPtr dwUser);