示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            GetCameraInfo TestGet = new GetCameraInfo();

            TestGet.TryGetConnect(DeviceType.GigE, out DeviceNum, out AllCameraInfo, out ErrorMessage);
            textBox1.Text = DeviceNum.ToString();
            textBox2.Text = ErrorMessage;
            for (int i = 0; i < DeviceNum; i++)
            {
                comboBox1.Items.Insert(i, AllCameraInfo[i].ToString());
            }
            if (DeviceNum > 0)
            {
                comboBox1.SelectedIndex = 0;
            }
        }
示例#2
0
 public IActionResult Post([FromBody] GetCameraInfo cameraInfo)
 {
     try
     {
         var user = _unitOfWork.UserRepository.Get(a => a.UserName == cameraInfo.UserName & a.Password == cameraInfo.Password);
         if (user.Any())
         {
             var Camerainfo = _unitOfWork.CameraInfoRepository.Get(a => a.CameraId == Convert.ToInt32(cameraInfo.CameraId)).ToList();
             return(new ObjectResult(Camerainfo));
         }
         else
         {
             return(StatusCode((int)HttpStatusCode.Unauthorized, "Login Faild"));
         }
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
示例#3
0
        //public static ICameraInfo ChosenCameraInfo;

        public void GetCameraNum()
        {
            GetCameraInfo TestGet = new GetCameraInfo();

            TestGet.TryGetConnect(DeviceType.GigE, out CameraNum, out AllCameraInfo, out ErrorMessage);
        }