Пример #1
0
 public static string GetSearchServiceAddress(this DeviceClient device,
                                              FeaturesList features)
 {
     return(device.GetServiceAddress(features,
                                     CapabilityCategory.All,
                                     (capabilities) =>
     {
         if (capabilities.Extension != null)
         {
             if (capabilities.Extension.Search != null)
             {
                 return capabilities.Extension.Search.XAddr;
             }
         }
         return string.Empty;
     }, OnvifService.SEARCH));
 }
Пример #2
0
 public static string GetReceiverServiceAddress(this DeviceClient device,
                                                FeaturesList features)
 {
     return(device.GetServiceAddress(features,
                                     CapabilityCategory.All,
                                     (capabilities) =>
     {
         if (capabilities.Extension != null)
         {
             if (capabilities.Extension.Receiver != null)
             {
                 return capabilities.Extension.Receiver.XAddr;
             }
         }
         return string.Empty;
     }, OnvifService.RECEIVER));
 }
Пример #3
0
 public static string GetPtzServiceAddress(this DeviceClient device,
                                           FeaturesList features)
 {
     return(device.GetServiceAddress(
                features,
                CapabilityCategory.PTZ,
                (capabilities) =>
     {
         if (capabilities.PTZ != null)
         {
             return capabilities.PTZ.XAddr;
         }
         else
         {
             return string.Empty;
         }
     }, OnvifService.PTZ));
 }
Пример #4
0
 public static string GetMediaServiceAddress(this DeviceClient device,
                                             FeaturesList features)
 {
     return(device.GetServiceAddress(features,
                                     CapabilityCategory.Media,
                                     (capabilities) =>
     {
         if (capabilities.Media != null)
         {
             return capabilities.Media.XAddr;
         }
         else
         {
             return string.Empty;
         }
     },
                                     OnvifService.MEDIA));
 }
Пример #5
0
 public static string GetEventServiceAddress(this DeviceClient device,
                                             FeaturesList features)
 {
     return(device.GetServiceAddress(features,
                                     CapabilityCategory.Events,
                                     (capabilities) =>
     {
         if (capabilities.Events != null)
         {
             return capabilities.Events.XAddr;
         }
         else
         {
             return string.Empty;
         }
     },
                                     OnvifService.EVENTS));
 }
Пример #6
0
 public static string GetImagingServiceAddress(this DeviceClient device,
                                               FeaturesList features)
 {
     return(device.GetServiceAddress(
                features,
                CapabilityCategory.Imaging,
                (capabilities) =>
     {
         if (capabilities.Imaging != null)
         {
             return capabilities.Imaging.XAddr;
         }
         else
         {
             return string.Empty;
         }
     }, OnvifService.IMAGING));
 }
Пример #7
0
        public static string GetServiceAddress(this DeviceClient device,
                                               FeaturesList features,
                                               CapabilityCategory category,
                                               Func <Capabilities, string> addressSelector,
                                               string serviceNs)
        {
            string address = string.Empty;

            if (features.Contains(Feature.GetServices))
            {
                address = device.GetServiceAddress(serviceNs);
            }
            else
            {
                address = device.GetServiceAddress(category, addressSelector);
            }
            return(address);
        }
Пример #8
0
        private void BindProductFeatures()
        {
            var features = new List <string>();

            features.Add(ValidationHelper.GetString(DocumentContext.CurrentDocument["Feature1"], string.Empty));
            features.Add(ValidationHelper.GetString(DocumentContext.CurrentDocument["Feature2"], string.Empty));
            features.Add(ValidationHelper.GetString(DocumentContext.CurrentDocument["Feature3"], string.Empty));
            features.Add(ValidationHelper.GetString(DocumentContext.CurrentDocument["Feature4"], string.Empty));
            features.Add(ValidationHelper.GetString(DocumentContext.CurrentDocument["Feature5"], string.Empty));
            features.Add(ValidationHelper.GetString(DocumentContext.CurrentDocument["Feature6"], string.Empty));
            features.Add(ValidationHelper.GetString(DocumentContext.CurrentDocument["Feature7"], string.Empty));
            features.Add(ValidationHelper.GetString(DocumentContext.CurrentDocument["Feature8"], string.Empty));
            features.Add(ValidationHelper.GetString(DocumentContext.CurrentDocument["Feature9"], string.Empty));
            features.Add(ValidationHelper.GetString(DocumentContext.CurrentDocument["Feature10"], string.Empty));
            features = features.Where(s => !string.IsNullOrWhiteSpace(s)).ToList();

            FeaturesList.DataSource = features;
            FeaturesList.DataBind();
        }
Пример #9
0
        public override void AddCustomElements()
        {
            if (ListCustomElements.Count > 0)
            {
#if DEBUG
                logger.Debug($"ThemeModifier [Ignored] - CustomElements allready insert - {ListCustomElements.Count}");
#endif
                return;
            }

            FrameworkElement PART_TmFeaturesList = null;

            try
            {
                PART_TmFeaturesList = IntegrationUI.SearchElementByName("PART_TmFeaturesList", false, true);
            }
            catch (Exception ex)
            {
                Common.LogError(ex, "ThemeModifier", $"Error on find custom element");
            }

            if (PART_TmFeaturesList != null)
            {
                PART_TmFeaturesList = new FeaturesList();
                try
                {
                    ui.AddElementInCustomTheme(PART_TmFeaturesList, "PART_TmFeaturesList");
                    ListCustomElements.Add(new CustomElement {
                        ParentElementName = "PART_TmFeaturesList", Element = PART_TmFeaturesList
                    });
                }
                catch (Exception ex)
                {
                    Common.LogError(ex, "ThemeModifier", "Error on AddCustomElements()");
                }
            }
            else
            {
#if DEBUG
                logger.Debug($"ThemeModifier [Ignored] - PART_TmFeaturesList not find");
#endif
            }
        }
Пример #10
0
        public override void AddSpDescription()
        {
            if (PART_SpDescription != null)
            {
#if DEBUG
                logger.Debug($"ThemeModifier [Ignored] - PART_SpDescription allready insert");
#endif
                return;
            }

            try
            {
                FeaturesList SpDescription = new FeaturesList();
                SpDescription.Name = SpDescriptionName;

                ui.AddElementInGameSelectedDescription(SpDescription, true);
                PART_SpDescription = IntegrationUI.SearchElementByName(SpDescriptionName);
            }
            catch (Exception ex)
            {
                Common.LogError(ex, "ThemeModifier");
            }
        }
Пример #11
0
        public override void AddBtActionBar()
        {
            if (PART_BtActionBar != null)
            {
#if DEBUG
                logger.Debug($"ThemeModifier [Ignored] - PART_BtActionBar allready insert");
#endif
                return;
            }

            try
            {
                FeaturesList featuresList = new FeaturesList();
                featuresList.Name = BtActionBarName;

                ui.AddButtonInGameSelectedActionBarButtonOrToggleButton(featuresList);
                PART_BtActionBar = IntegrationUI.SearchElementByName(BtActionBarName);
            }
            catch (Exception ex)
            {
                Common.LogError(ex, "ThemeModifier");
            }
        }
Пример #12
0
 /// <summary>
 ///index of feautre in data - the column in data
 /// </summary>
 private int getNameIndex(string name)
 {
     return(FeaturesList.IndexOf(name));
 }
Пример #13
0
 public static string GetAccessRulesServiceAddress(this IDeviceService s, FeaturesList featureList)
 {
     return(s.GetServiceAddress(OnvifService.ACCESS_RULES_SERVICE));
 }
Пример #14
0
 public void Bind(FeaturesList view)
 {
     this.View           = view;
     View.BindingContext = this;
 }
Пример #15
0
 public static string GetCredentialServiceAddress(this IDeviceService s, FeaturesList featureList)
 {
     return(s.GetServiceAddress(OnvifService.CREDENTIAL_SERVICE));
 }
Пример #16
0
 public static string GetAccessControlServiceAddress(this IDeviceService s, FeaturesList featureList)
 {
     return(s.GetServiceAddress(OnvifService.ACCESSCONTROL));
 }
Пример #17
0
 public static string GetScheduleServiceAddress(this IDeviceService s, FeaturesList featureList)
 {
     return(s.GetServiceAddress(OnvifService.SCHEDULE_SERVICE));
 }
Пример #18
0
 public void Retrieve(FeaturesList features)
 {
     Address = RetrievalMethod(features);
 }
Пример #19
0
 public Enumerator(FeaturesList list)
 {
     _list = list;
 }