public static ZoneOverlayEntryJsModel CreateFromDomainModel(ZoneOverlayEntry zoneDomain) { var model = new ZoneOverlayEntryJsModel { Alias = zoneDomain.Alias, FixedCameraEnhancementId = zoneDomain.FixedCameraEnhancementId.HasValue ? zoneDomain.FixedCameraEnhancementId.Value.Id : null, Points = zoneDomain.Points, MetadataSetId = zoneDomain.MetadataSetId.HasValue ? zoneDomain.MetadataSetId.Value.Id : null, View = zoneDomain.View }; BaseOverlayEntryJsModel.MapBasePropertiesFromDomainModel(zoneDomain, model); return(model); }
public static MapOverlayJsModel CreateFromDomainModel(MapOverlay domainModel) { var model = new MapOverlayJsModel(); model.Id = domainModel.Id; model.Name = domainModel.Name; model.Zones = domainModel.Entries.Where(e => e is ZoneOverlayEntry).Cast <ZoneOverlayEntry>().Select(z => ZoneOverlayEntryJsModel.CreateFromDomainModel(z)).ToList(); model.Circles = domainModel.Entries.Where(e => e is CircleOverlayEntry).Cast <CircleOverlayEntry>().Select(z => CircleOverlayEntryJsModel.CreateFromDomainModel(z)).ToList(); model.Cameras = domainModel.Entries.Where(e => e is CameraOverlayEntry).Cast <CameraOverlayEntry>().Select(z => CameraOverlayEntryJsModel.CreateFromDomainModel(z)).ToList(); return(model); }
public async Task RemoveTagCirclesForZone(JsModel.ZoneOverlayEntryJsModel zone, SvgComponentEvent e) { await Vm.RemoveTagCirclesForZone(zone.Id); }
public async Task UpdateZone(JsModel.ZoneOverlayEntryJsModel zone, SvgComponentEvent e) { await Vm.UpdateZone(zone); }
public async Task OpenSvgControlProps(JsModel.ZoneOverlayEntryJsModel zone, SvgComponentEvent e) { this.Vm.OpenSvgControlProps(zone.Id); }
public async Task <JsModel.ZoneOverlayEntryJsModel> AddNewZoneToVm(JsModel.ZoneOverlayEntryJsModel zone) { zone = Vm.AddNewZoneToVm(zone); return(zone); }
public async Task UnselectZone(JsModel.ZoneOverlayEntryJsModel zone, SvgComponentEvent e) { Vm.UnselectZone(zone); }
public async Task SelectZone(JsModel.ZoneOverlayEntryJsModel zone, SvgComponentEvent e) { Vm.SelectZone(zone); this.StateHasChanged(); }
public async Task DeleteZone(JsModel.ZoneOverlayEntryJsModel zone, SvgComponentEvent e) { await this.Vm.DeleteZone(zone); }