Esempio n. 1
0
 public NodeRuntimeApplication SetDeviceConfiguration(NodeDeviceConfiguration NewDeviceConfiguration)
 {
     if (NewDeviceConfiguration == null)
     {
         throw new ArgumentNullException(m_DeviceConfigurationName);
     }
     return(m_DeviceConfiguration.Set(NewDeviceConfiguration));
 }
Esempio n. 2
0
        public static NodeRuntimeApplication BuildWith(
            FieldIdentifier Code, FieldGuid TypeId, FieldGuid RuntimeId,
            FieldString Address, FieldBase64 Configuration, FieldBool ExecuteOnStartup,
            NodePageCollection Logic, NodeDeviceConfiguration DeviceConfiguration)
        {
            var rta = NodeRuntimeApplication.BuildWith(
                Code, TypeId, RuntimeId, Address, Configuration, ExecuteOnStartup);

            rta = rta.SetLogic(Logic);
            return(rta.SetDeviceConfiguration(DeviceConfiguration));
        }
        public DeviceConfigurationItem(RuntimeApplicationItem runtimeApplicationItem, 
            NodeDeviceConfiguration deviceConfiguration)
            : base(runtimeApplicationItem, Resources.Strings.Solution_Pad_DeviceConfigurationItem_Header)
        {
            if (runtimeApplicationItem == null)
            {
                throw new ArgumentNullException();
            }
            m_runtimeApplicationItem = runtimeApplicationItem;

            ContextMenu = extensionService.Sort(contextMenu);
            DeviceConfiguration = deviceConfiguration;

            SetIconFromBitmap(Resources.Images.DeviceConfiguration);
        }
Esempio n. 4
0
        public static NodeRuntimeApplication BuildWith(
            FieldIdentifier Code, FieldGuid TypeId, FieldGuid RuntimeId,
            FieldString Address, FieldBase64 Configuration, FieldBool ExecuteOnStartup)
        {
            //build fields
            Dictionary <FieldIdentifier, FieldBase> mutableFields =
                new Dictionary <FieldIdentifier, FieldBase>();

            mutableFields.Add(new FieldIdentifier(m_CodeName), Code);
            mutableFields.Add(new FieldIdentifier(m_TypeIdName), TypeId);
            mutableFields.Add(new FieldIdentifier(m_RuntimeIdName), RuntimeId);
            mutableFields.Add(new FieldIdentifier(m_AddressName), Address);
            mutableFields.Add(new FieldIdentifier(m_ConfigurationName), Configuration);
            mutableFields.Add(new FieldIdentifier(m_ExecuteOnStartupName), ExecuteOnStartup);
            mutableFields.Add(new FieldIdentifier(m_TryModeName), new FieldBool(false));
            //Add Fields here: mutableFields.Add(new FieldIdentifier("Code"), Code);

            //build children
            KeyedNodeCollection <NodeBase> mutableChildren =
                new KeyedNodeCollection <NodeBase>();
            var pc = NodePageCollection.BuildWith(
                new FieldPageCollectionName(m_LogicName)
                );

            pc = pc.SetLogicRoot(new FieldBool(true));
            mutableChildren.Add(pc);
            mutableChildren.Add(
                NodeDeviceConfiguration.BuildWith(
                    new ReadOnlyCollection <NodeDriver>(new Collection <NodeDriver>())
                    ));
            //Add Children here: mutableChildren.Add(SomeChild);

            //build node
            NodeRuntimeApplication Builder = new NodeRuntimeApplication(
                new ReadOnlyDictionary <FieldIdentifier, FieldBase>(mutableFields),
                new ReadOnlyCollection <NodeBase>(mutableChildren));

            return(Builder);
        }
Esempio n. 5
0
        public static NodeDeviceConfiguration BuildWith(ReadOnlyCollection <NodeDriver> drivers)
        {
            //build fields
            Dictionary <FieldIdentifier, FieldBase> mutableFields =
                new Dictionary <FieldIdentifier, FieldBase>();
            //Add Fields here: mutableFields.Add(new FieldIdentifier(m_CodeName), Code);

            //build children
            KeyedNodeCollection <NodeBase> mutableChildren =
                new KeyedNodeCollection <NodeBase>();

            foreach (var driver in drivers)
            {
                mutableChildren.Add(driver);
            }
            //Add Children here: mutableChildren.Add(SomeChild);

            //build node
            NodeDeviceConfiguration Builder = new NodeDeviceConfiguration(
                new ReadOnlyDictionary <FieldIdentifier, FieldBase>(mutableFields),
                new ReadOnlyCollection <NodeBase>(mutableChildren));

            return(Builder);
        }
 public NodeRuntimeApplication SetDeviceConfiguration(NodeDeviceConfiguration NewDeviceConfiguration)
 {
     if (NewDeviceConfiguration == null)
     {
         throw new ArgumentNullException(m_DeviceConfigurationName);
     }
     return m_DeviceConfiguration.Set(NewDeviceConfiguration);
 }
 public static NodeRuntimeApplication BuildWith(
     FieldIdentifier Code, FieldGuid TypeId, FieldGuid RuntimeId,
     FieldString Address, FieldBase64 Configuration, FieldBool ExecuteOnStartup,
     NodePageCollection Logic, NodeDeviceConfiguration DeviceConfiguration)
 {
     var rta = NodeRuntimeApplication.BuildWith(
             Code, TypeId, RuntimeId, Address, Configuration, ExecuteOnStartup);
     rta = rta.SetLogic(Logic);
     return rta.SetDeviceConfiguration(DeviceConfiguration);
 }
        public static NodeDeviceConfiguration BuildWith(ReadOnlyCollection<NodeDriver> drivers)
        {
            //build fields
            Dictionary<FieldIdentifier, FieldBase> mutableFields =
                new Dictionary<FieldIdentifier, FieldBase>();
            //Add Fields here: mutableFields.Add(new FieldIdentifier(m_CodeName), Code);

            //build children
            KeyedNodeCollection<NodeBase> mutableChildren =
                new KeyedNodeCollection<NodeBase>();
            foreach (var driver in drivers)
            {
                mutableChildren.Add(driver);
            }
            //Add Children here: mutableChildren.Add(SomeChild);

            //build node
            NodeDeviceConfiguration Builder = new NodeDeviceConfiguration(
                new ReadOnlyDictionary<FieldIdentifier, FieldBase>(mutableFields),
                new ReadOnlyCollection<NodeBase>(mutableChildren));

            return Builder;
        }