public MapViewModel() { model = new CamerasModel(); LandmarkLayers = new ObservableCollection <MapLayer>(); this.AddCamerasLayer(); }
public void Initialize(CamerasModel cameras, List <ITrackerService> trackerServices) { _cameras = cameras; TrackerServices = trackerServices; foreach (CameraModel cameraModel in _cameras.Cameras) { //TrackerServices[_cameras.Cameras.IndexOf(cameraModel)].OnImageReady += TrackerService_OnImageReady; } _positionHistory = new Vector3[5]; }
/// <summary> /// Initializes a new instance of the CameraPositioningCalibrationViewModel class. /// </summary> public CameraPositioningCalibrationViewModel(CamerasModel camerasModel) { if (IsInDesignMode) { CamerasModel = camerasModel; SettingsService = new JsonSettingsService(); } else { CamerasModel = camerasModel; PositioningService = new CameraPositioningCalibrationService(camerasModel.Cameras); SettingsService = SimpleIoc.Default.GetInstance <ISettingsService>(); } }
public async Task AddCamera(NewCameraViewModel newCamera) { double latitude, longitude; if (newCamera == null) { throw new ArgumentNullException(nameof(newCamera)); } var camera = new Camera() { City = newCamera.CameraCity, Country = newCamera.CameraCountry, RtspAddress = newCamera.RtspAddress }; if (!string.IsNullOrWhiteSpace(newCamera.Latitude) && double.TryParse(newCamera.Latitude, out latitude)) { camera.Latitude = latitude; } else { await CamerasModel.GetLatitude(camera); } if (!string.IsNullOrWhiteSpace(newCamera.Longitude) && double.TryParse(newCamera.Longitude, out longitude)) { camera.Longitude = longitude; } else { await CamerasModel.GetLongitude(camera); } model.AddCamera(camera); cameras.Add(new CameraViewModel(camera)); }
public CamerasViewModel() { model = new CamerasModel(); this.cameras = new ObservableCollection <CameraViewModel>(); }
public void Initialize(IConsoleService consoleService, ServerModel server, CamerasModel cameras) { base.Initialize(consoleService, server); _cameras = cameras; }
public ServerService(IConsoleService consoleService, ServerModel server, CamerasModel cameras) { Initialize(consoleService, server, cameras); }
public MultipleViewsService(CamerasModel cameras, List <ITrackerService> trackerServices) { Initialize(cameras, trackerServices); }
public NewCameraViewModel() { model = new CamerasModel(); }
public UnknownCameraViewModel() { model = new CamerasModel(); }