// Essentially this method does what MobileControlSectionHandler.CreateDeviceConfig()
        // does, but use MobileControlsSection for retrieving config data instead
        private static IndividualDeviceConfig CreateDeviceConfig(ControlsConfig config, DeviceElement device) {
            String nameOfDeviceToInheritFrom = device.InheritsFrom;
            if (nameOfDeviceToInheritFrom != null && nameOfDeviceToInheritFrom.Length == 0) {
                nameOfDeviceToInheritFrom = null;
            }

            IndividualDeviceConfig.DeviceQualifiesDelegate predicateDelegate = null;
            if (device.PredicateClass != null) {
                // If a predicate class is specified, so must a method.
                // The checking is already done in MobileControlsSection
                Debug.Assert(!String.IsNullOrEmpty(device.PredicateMethod));
                predicateDelegate = device.GetDelegate();
            }

            return new IndividualDeviceConfig(config,
                                              device.Name,
                                              predicateDelegate,
                                              device.PageAdapter,
                                              nameOfDeviceToInheritFrom);
        }
 private static void AddControlAdapters(IndividualDeviceConfig deviceConfig, DeviceElement device) {
     foreach (ControlElement control in device.Controls) {
         deviceConfig.AddControl(control.Control, control.Adapter);
     }
 }
 public void Remove( DeviceElement deviceElement ) 
 { 
     BaseRemove( GetElementKey( deviceElement ) );
 }
 public void Add( DeviceElement deviceElement )
 {
     BaseAdd( deviceElement );
 }
        // Essentially this method does what MobileControlSectionHandler.CreateDeviceConfig()
        // does, but use MobileControlsSection for retrieving config data instead
        private static IndividualDeviceConfig CreateDeviceConfig(ControlsConfig config, DeviceElement device)
        {
            String nameOfDeviceToInheritFrom = device.InheritsFrom;

            if (nameOfDeviceToInheritFrom != null && nameOfDeviceToInheritFrom.Length == 0)
            {
                nameOfDeviceToInheritFrom = null;
            }

            IndividualDeviceConfig.DeviceQualifiesDelegate predicateDelegate = null;
            if (device.PredicateClass != null)
            {
                // If a predicate class is specified, so must a method.
                // The checking is already done in MobileControlsSection
                Debug.Assert(!String.IsNullOrEmpty(device.PredicateMethod));
                predicateDelegate = device.GetDelegate();
            }

            return(new IndividualDeviceConfig(config,
                                              device.Name,
                                              predicateDelegate,
                                              device.PageAdapter,
                                              nameOfDeviceToInheritFrom));
        }
Esempio n. 6
0
 public void Remove(DeviceElement deviceElement)
 {
     BaseRemove(GetElementKey(deviceElement));
 }
Esempio n. 7
0
 public void Add(DeviceElement deviceElement)
 {
     BaseAdd(deviceElement);
 }