Example #1
0
        public ZoneOverlayEntry ToDomainModel()
        {
            var domain = new ZoneOverlayEntry();

            BaseOverlayEntryJsModel.MapBasePropertiesToDomainModel(domain, this);

            domain.Points        = this.Points;
            domain.Alias         = this.Alias;
            domain.MetadataSetId = this.MetadataSetId != null?HyperDocumentId.Create <HyperMetadataSet>(this.MetadataSetId) : (HyperDocumentId?)null;

            domain.FixedCameraEnhancementId = this.FixedCameraEnhancementId != null?HyperDocumentId.Create <FixedCameraEnhancedData>(this.FixedCameraEnhancementId) : (HyperDocumentId?)null;

            domain.View = this.View;
            return(domain);
        }
        private void Vm_ZoneSelected(ZoneOverlayEntry zone)
        {
            var filter = this.DashboardVm.ObtainFilterGroup(this.Widget.FilterGroup);

            if (filter == null)
            {
                return;
            }

            if (string.IsNullOrEmpty(zone.View) == false && filter.View != zone.View)
            {
                filter.View = zone.View;
                var t = this.DashboardVm.UpdateDynamicWidgetsFilteringAsync();
            }
        }
Example #3
0
        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);
        }