Exemple #1
0
 private void simpleButton1_Click(object sender, EventArgs e)
 {
     labelX4.ResetText();
     if ((E_VIDEO_ANALYZE_TYPE)comboBoxAnalyseType.SelectedValue == E_VIDEO_ANALYZE_TYPE.E_ANALYZE_NOUSE)
     {
         labelX4.Text = "请选择需要转发的算法类型";
         return;
     }
     try
     {
         bool ret = m_viewModel.AddTransEvent(
             TaskId,
             0,
             (E_TRANCE_STORE_TYPE)comboBoxStoreType.SelectedValue,
             ipAddressInputServerIp.Value,
             (uint)integerInputServerPort.Value,
             (E_TRANS_PROTOCOL_TYPE)comboBoxProtocolType.SelectedValue,
             (E_VIDEO_ANALYZE_TYPE)comboBoxAnalyseType.SelectedValue);
         DialogResult = System.Windows.Forms.DialogResult.OK;
     }
     catch (SDKCallException ex)
     {
         labelX4.Text = "转发参数添加失败 [" + ex.ErrorCode + "] " + ex.Message;
     }
 }