示例#1
0
 public CameraViewModel(CameraController cameraController)
 {
     CameraController = cameraController;
     PtzCameraCommand = new PtzCameraCommand(this);
     StatusViewModels.Add(new ViewModels.Status.Ptz(CameraController));
     ConfigViewModels.Add(new ViewModels.Config.Ptz(CameraController));
 }
        public ActionResult Index(ConfigViewModels Config)
        {
            if (ModelState.IsValid)
            {
                AppConfig.LineGroupToken    = Config.LineGroupToken;
                AppConfig.LineToken         = Config.LineToken;
                AppConfig.LineRetornMessage = Config.LineRetornMessage;
                AppConfig.SaveConfig();
                return(RedirectToAction("Index"));
            }

            return(View(Config));
        }