Esempio n. 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);
        }
Esempio n. 2
0
 public RealFixture()
     : base(null, FixtureType.Real)
 {
     mLightName        = "";
     mLightConstructor = "";
     mImage            = "";
     mStartAddress     = 0;
     mPoursuit         = new Poursuit();
 }
Esempio n. 3
0
        public RealFixture(string pConstructor, string pLightName)
            : base(null, FixtureType.Real)
        {
            DirectoryInfo Root = new DirectoryInfo(DmxFramework.Framework.FixtureDir);

            mFixtureFileName = Root.FullName + "\\" + pConstructor + "\\" + pLightName + "\\fixture.xml";
            if (File.Exists(mFixtureFileName))
            {
                XmlDocument doc = new XmlDocument();

                doc.Load(mFixtureFileName);

                mName = "";
                XmlNode FixNode = doc.ChildNodes[0].ChildNodes[0];
                mLightName        = FixNode.Attributes["PRODUCT"].InnerText;
                mLightConstructor = FixNode.Attributes["Constructor"].InnerText;
                mImage            = FixNode.Attributes["img"].InnerText;
                mPoursuit         = null;
                mLevel            = 0;
                mPath             = mFixtureFileName;
                if (FixNode.ChildNodes != null && FixNode.ChildNodes.Count != 0)
                {
                    XmlNode ChannelNode = FixNode.ChildNodes[0];
                    foreach (XmlNode node in ChannelNode)
                    {
                        this.mChannels.Add(new Channels.RealChannel(node, 0, null, mPoursuit));
                    }
                    foreach (Channels.RealChannel chan in this.mChannels)
                    {
                        chan.Fixture = this;
                    }
                }
            }
            else
            {
                mLightConstructor = pConstructor;
                mLightName        = pLightName;
                mImage            = "";
            }
        }
Esempio n. 4
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;
            }
        }
Esempio n. 5
0
        public RealFixture(string pFileName)
            : base(null, FixtureType.Real)
        {
            XmlDocument doc = new XmlDocument();

            doc.Load(pFileName);
            mName = "";
            XmlNode FixNode = doc.ChildNodes[0].ChildNodes[0];

            mLightName        = FixNode.Attributes["PRODUCT"].InnerText;
            mLightConstructor = FixNode.Attributes["Constructor"].InnerText;
            mImage            = FixNode.Attributes["img"].InnerText;
            mPoursuit         = null;
            mLevel            = 0;
            mPath             = pFileName;
            if (FixNode.ChildNodes != null && FixNode.ChildNodes.Count != 0)
            {
                XmlNode ChannelNode = FixNode.ChildNodes[0];
                foreach (XmlNode node in ChannelNode)
                {
                    this.mChannels.Add(new Channels.RealChannel(node, 0, null, mPoursuit));
                }
            }
        }