Пример #1
0
        public MainViewModel()
        {
            model = new Model.MainModel(appByJOChKey);
            DatosDeConfiguracionModificados = false;

            AppCloseCommand    = new Extras.RelayCommand(CloseMainWindows, param => CanCloseWindows);
            AppMaximizeCommand = new Extras.RelayCommand(MaximizeMainWindows, param => CanCloseWindows);
            AppMinimizeCommand = new Extras.RelayCommand(MinimizeMainWindows, param => CanCloseWindows);

            OpenExeFFMPEGCommand = new Extras.RelayCommand(OpenExeFile, param => CanStartGrabaciones);
            OpenDataCommand      = new Extras.RelayCommand(OpenDataDir, param => CanStartGrabaciones);

            AgregarCamaraCommand = new Extras.RelayCommand(AgregarCamara, param => CanStartGrabaciones);

            GuardarLosCambiosCommand = new Extras.RelayCommand(GuardarLosCambios, param => DatosDeConfiguracionModificados);

            IniciarGrabacionesCommand = new Extras.RelayCommand(IniciarGrabaciones, param => CanStartGrabaciones);
            DetenerGrabacionesCommand = new Extras.RelayCommand(DetenerGrabaciones, param => CanStopGrabaciones);

            TiempoDeGrabacionesCommand = new Extras.RelayCommand(TiempoDeGrabaciones, param => CanStartGrabaciones);

            LimpiarLogDeActividadCommand = new Extras.RelayCommand(LimpiarLogDeActividad, param => CanCloseWindows);

            //ListaDeCamaras = new List<Extras.DescriptorDeCamara>();
            //ListaDeCamaras.Add(new Extras.DescriptorDeCamara { activa = true, grabar = false, nombre = "camara 01", url = "192.168.0.90", conexion = "none", portRtsp = 554, portHttp = 80, usuario = "admin", password = "******" });
            //ListaDeCamaras.Add(new Extras.DescriptorDeCamara { activa = true, grabar = false, nombre = "camara 02", url = "192.168.0.91", conexion = "none", portRtsp = 554, portHttp = 80, usuario = "admin", password = "******" });
            //ListaDeCamaras.Add(new Extras.DescriptorDeCamara { activa = true, grabar = false, nombre = "camara 03", url = "192.168.0.92", conexion = "none", portRtsp = 554, portHttp = 80, usuario = "admin", password = "******" });

            LogDeActividad += $"Inicializando la app: {DateTime.Now.ToString("dd.MM.yyyy HH:mm:ss")} con {ListaDeCamaras.Count} camaras.\r\n";
        }
Пример #2
0
        public MainViewModel()
        {
            model = new Model.MainModel(appByJOChKey);
            DatosDeConfiguracionModificados = false;

            AppCloseCommand    = new Extras.RelayCommand(CloseMainWindows, param => CanCloseWindows);
            AppMaximizeCommand = new Extras.RelayCommand(MaximizeMainWindows, param => CanCloseWindows);
            AppMinimizeCommand = new Extras.RelayCommand(MinimizeMainWindows, param => CanCloseWindows);

            OpenExeFFMPEGCommand = new Extras.RelayCommand(OpenExeFile, param => CanCloseWindows);

            OpenPairsBinFileCommand = new Extras.RelayCommand(OpenPairsBinFile, param => CanCloseWindows);
        }
 public AgregarEditarCamaraViewModel()
 {
     GuardarAgregarCamaraCommand    = new Extras.RelayCommand(GuardarAgregarCamara, param => CanOperate);
     CancelarCamaraCommand          = new Extras.RelayCommand(CancelarCamara, param => CanOperate);
     AgregarStringDeConexionCommand = new Extras.RelayCommand(AgregarStringDeConexion, param => CanOperate);
 }