Пример #1
0
 internal void RemoveFixture(Fixtures.Fixture pFixture)
 {
     foreach (Channel chan in pFixture.Channels)
     {
         RemoveChannel(chan);
     }
 }
Пример #2
0
        public Scene(Fixtures.Fixture pFixture, XmlNode pNode)
        {
            mFixture      = pFixture;
            mChannelNames = new ArrayList();
            mChannels     = new ArrayList();
            mSteps        = new ArrayList();
            mName         = pNode.Attributes["Name"].Value;
            mCategory     = pNode.Attributes["Category"].Value;
            mStepTime     = Convert.ToInt32(pNode.Attributes["StepTime"].Value);
            mWaitingTime  = Convert.ToInt32(pNode.Attributes["WaitingTime"].Value);

            if (pNode.Attributes["Ratio"] != null)
            {
                mCurrentSpeedRatio = Convert.ToInt32(pNode.Attributes["Ratio"].Value);
            }

            if (pNode.Attributes["btn_x"] != null)
            {
                mBtnX = Convert.ToInt32(pNode.Attributes["btn_x"].Value);
                mBtnY = Convert.ToInt32(pNode.Attributes["btn_y"].Value);
            }
            else
            {
                mBtnX = -1;
                mBtnY = -1;
            }

            if (pNode.Attributes["Loop"] != null)
            {
                mLoop = Convert.ToBoolean(pNode.Attributes["Loop"].InnerText);
            }

            if (pNode.Attributes["AutoStart"] != null)
            {
                mAutoStart = Convert.ToBoolean(pNode.Attributes["AutoStart"].InnerText);
            }

            if (pNode.Attributes["MusicBeat"] != null)
            {
                mMusicBeat = Convert.ToBoolean(pNode.Attributes["MusicBeat"].InnerText);
            }

            if (pNode.Attributes["KeyBeat"] != null)
            {
                mKeyBeat = Convert.ToBoolean(pNode.Attributes["KeyBeat"].InnerText);
            }

            XmlNode ChannelsNode = pNode.ChildNodes[0];

            foreach (XmlNode node in ChannelsNode.ChildNodes)
            {
                this.mChannelNames.Add(node.Attributes["ChannelName"].InnerText);
                this.mChannels.Add(pFixture.GetChannel(node.Attributes["ChannelName"].InnerText));
            }

            XmlNode StepNode = pNode.ChildNodes[1];

            foreach (XmlNode node in StepNode.ChildNodes)
            {
                //this.mSteps.Add(new Step(this.mChannels, mChannelNames, node));
                this.mSteps.Add(new Step(node));
            }
            mState = SceneState.Nothing;
        }