Example #1
0
        private void buttonStop_Click(object sender, EventArgs e)
        {
            if (0 == m_nLoginID)
            {
                return;
            }

            //Fill in stop request.
            SNAP_PARAMS snapparams = new SNAP_PARAMS();
            snapparams.mode = -1;
            snapparams.Channel = (UInt32)this.comboBoxChannel.SelectedIndex;
            snapparams.CmdSerial = UInt32.Parse(this.textBoxSerial.Text.ToString());

            bool b = DHClient.DHSnapPicture(m_nLoginID, snapparams);
            if (!b)
            {
                MessageBox.Show("停止抓图失败");
            }
            else
            {
                MessageBox.Show("停止抓图成功");
            }
        }
Example #2
0
 private static extern bool CLIENT_SnapPicture(Int32 lLoginID, SNAP_PARAMS par);
Example #3
0
        private void buttonStart_Click(object sender, EventArgs e)
        {
            if (0 != m_nLoginID)
            {
                if (m_snapmode == -1)
                {
                    //MessageBox(ConvertString("please select snap mode!"), ConvertString("prompt"));
                    return;
                }

                //Fill in request structure 
                SNAP_PARAMS snapparams = new SNAP_PARAMS();
                snapparams.Channel = (UInt32)this.comboBoxChannel.SelectedIndex;
                snapparams.mode = this.radioButtonOne.Checked?0:1;//m_snapmode>0?0:1;
                snapparams.CmdSerial = UInt32.Parse(this.textBoxSerial.Text.ToString());

                if (snapparams.mode == 1)
                {
                    //Time interval for scheduled snapshot. Use snapshot setup to configure.
                    snapparams.InterSnap = (UInt32)m_dicSnapSpace[this.comboBoxSnapSpace.Text.ToString()];
                }

                bool bRet = DHClient.DHSnapPicture(m_nLoginID, snapparams);
                if (!bRet)
                {
                    MessageBox.Show("抓图启动失败");
                }
                else
                {
                    MessageBox.Show("抓图启动成功");
                }
            }
        }
Example #4
0
 public static bool DHSnapPicture(Int32 lLoginID, SNAP_PARAMS par)
 {
     
     bool bReturn = false;
     try
     {
         bReturn = CLIENT_SnapPicture(lLoginID, par);
         VIDEOThrowLastError(bReturn);
     }
     catch (System.Exception ex)
     {
         VIDEOThrowLastError(bReturn);
         bReturn = false;
     }
     return bReturn;
 }