Beispiel #1
0
		void OnAdd()
		{
			var cameraDetailsViewModel = new CameraDetailsViewModel();
			if (DialogService.ShowModalWindow(cameraDetailsViewModel))
			{
				FiresecManager.SystemConfiguration.Cameras.Add(cameraDetailsViewModel.Camera);
				var cameraViewModel = new CameraViewModel(cameraDetailsViewModel.Camera);
				Cameras.Add(cameraViewModel);
				SelectedCamera = cameraViewModel;
				ServiceFactory.SaveService.CamerasChanged = true;
			}
		}
Beispiel #2
0
		void OnEdit()
		{
			var cameraDetailsViewModel = new CameraDetailsViewModel(SelectedCamera.Camera);
			if (DialogService.ShowModalWindow(cameraDetailsViewModel))
			{
				SelectedCamera.Camera = cameraDetailsViewModel.Camera;
				SelectedCamera.Update();
				ServiceFactory.SaveService.CamerasChanged = true;
			}
		}