예제 #1
0
 private void signIn(object sender, RoutedEventArgs e)
 {
     ConnectionStatus.Visibility = Visibility.Visible;
     SignIn.Visibility           = Visibility.Hidden;
     StatusIndicator.Visibility  = Visibility.Hidden;
     if (model.CamInfo.isLoggedIn &&
         model.CamInfo.UserName != null && model.CamInfo.Password != null &&
         model.CamInfo.UserName != "" && model.CamInfo.Password != "")
     {
         model.getStreamUri();
         return;
     }
     model.CamInfo.UserName = UsernameBox.Text;
     model.CamInfo.Password = PasswordBox.Password;
     model.connect();
 }
예제 #2
0
 public void updateCamList(List <CameraInfo> list)
 {
     foreach (CameraVM item in CamList)
     {
         item.mjpegDecoder.StopStream();
         item.unSubscribe();
         item.mjpegDecoder = null;
     }
     CamList.Clear();
     for (int i = 0; i < camInfoList.Count; i++)
     {
         CameraVM vm = new CameraVM(camInfoList[i], cameraNameList, modeColors, _ea);
         if (camInfoList[i].IP != "" && camInfoList[i].IP != null &&
             camInfoList[i].UserName != null && camInfoList[i].Password != null &&
             camInfoList[i].UserName != "" && camInfoList[i].Password != "")
         {
             vm.connect();
         }
         CamList.Add(vm);
     }
 }