Exemple #1
0
        public RealFixture(Fixture pParent, XmlNode pNode, DmxOutput pOutput, int pLevel, string pPath)
            : base(pParent, FixtureType.Real)
        {
            mName             = pNode.Attributes["Name"].InnerText;
            mLightName        = pNode.Attributes["PRODUCT"].InnerText;
            mLightConstructor = pNode.Attributes["Constructor"].InnerText;
            mImage            = pNode.Attributes["img"].InnerText;
            mStartAddress     = Convert.ToInt32(pNode.Attributes["StartAddress"].InnerText);
            mPoursuit         = new Poursuit();
            mLevel            = pLevel;
            mPath             = pPath + mName;

            if (pNode.ChildNodes != null && pNode.ChildNodes.Count != 0)
            {
                XmlNode ChannelNode = pNode.ChildNodes[0];
                foreach (XmlNode node in ChannelNode)
                {
                    Channels.RealChannel chan = new Channels.RealChannel(node, mStartAddress, pOutput, mPoursuit);
                    chan.Fixture = this;
                    this.mChannels.Add(chan);
                }
            }
            DetectPanTiltChannel();

            Framework.RealFixtureList.Add(this);
        }
Exemple #2
0
 private void LoadFromXml(XmlNode pNode, DmxOutput pOutput, int pLevel, string pPath)
 {
     this.Name = pNode.Attributes["Name"].Value;
     mPath     = pPath + mName;
     LoadSubFixtureXml(pNode.SelectSingleNode("SubFixtures"), pOutput, pLevel);
     LoadChannelsXml(pNode.SelectSingleNode("Channels"));
 }
Exemple #3
0
 public VirtualFixture(Fixture pParent, XmlNode pnode, DmxOutput pOutput, int pLevel, string pPath)
     : base(pParent, FixtureType.Virtual)
 {
     mLevel      = pLevel;
     mSubFixture = new ArrayList();
     LoadFromXml(pnode, pOutput, pLevel + 1, pPath);
     DetectPanTiltChannel();
 }
Exemple #4
0
 public RealChannel(string pName, int pNum, int pAbsoluteNum, DmxOutput pOutput)
     : base(ChannelType.Real)
 {
     mOutput      = pOutput;
     mAbsoluteNum = pAbsoluteNum;
     mName        = pName;
     mNumber      = pNum;
     mAbsoluteNum = pAbsoluteNum;
 }
Exemple #5
0
        private void LoadSubFixtureXml(XmlNode pNode, DmxOutput pOutput, int pLevel)
        {
            if (pNode == null)
            {
                return;
            }

            foreach (XmlNode node in pNode.ChildNodes)
            {
                if (Fixture.GetTypeFromXmlNode(node) == FixtureType.Virtual)
                {
                    mSubFixture.Add(new VirtualFixture(this, node, pOutput, pLevel, mPath + "/"));
                }
                else
                {
                    mSubFixture.Add(new RealFixture(this, node, pOutput, pLevel, mPath + "/"));
                }
            }
        }
Exemple #6
0
        public RealChannel(XmlNode pNode, int pStartAddress, DmxOutput pOutput, Fixtures.Poursuit pPoursuit)
            : base(ChannelType.Real)
        {
            mOutput = pOutput;


            mName        = pNode.Attributes["Name"].InnerText;
            mNumber      = Convert.ToInt32(pNode.Attributes["Num"].InnerText);
            mAbsoluteNum = pStartAddress - 1 + mNumber;


            mFunction = Channel.StringToFunction(pNode.Attributes["Type"].InnerText);
            LoadButtons(pNode, null);

            if (this.mFunction == ChannelFunction.Pan || this.mFunction == ChannelFunction.Tilt)
            {
                mPoursuit = pPoursuit;
            }
            else
            {
                mPoursuit = null;
            }
        }