Beispiel #1
0
 public BcfAction(string pDeviceName, string pCommand, int pMidiChannel, int pData1)
 {
     mDeviceName  = pDeviceName;
     mCommand     = pCommand;
     mMidiChannel = pMidiChannel;
     mData1       = pData1;
     mKey         = Action.GetKey(mDeviceName, mCommand, mMidiChannel, mData1);
     mActionList  = new List <BcfActionList>();
     //mActionList.Add(new BcfActionList(this,));
 }
Beispiel #2
0
 public ActionList(string pDeviceName, string pCommand, int pMidiChannel, int pData1)
 {
     mDeviceName  = pDeviceName;
     mCommand     = pCommand;
     mMidiChannel = pMidiChannel;
     mData1       = pData1;
     mKey         = Action.GetKey(mDeviceName, mCommand, mMidiChannel, mData1);
     mDescription = "";
     mActionList  = new List <Action>();
 }
Beispiel #3
0
        internal BcfAction(XmlNode pElement)
        {
            mDeviceName  = pElement.Attributes["DeviceName"].InnerText;
            mCommand     = pElement.Attributes["Command"].InnerText;
            mMidiChannel = Convert.ToInt32(pElement.Attributes["MidiChannel"].InnerText);
            mData1       = Convert.ToInt32(pElement.Attributes["Data1"].InnerText);
            mKey         = Action.GetKey(mDeviceName, mCommand, mMidiChannel, mData1);

            mActionList = new List <BcfActionList>();

            int i = 0;

            foreach (XmlNode node in pElement.ChildNodes)
            {
                mActionList[i] = new BcfActionList(this, this.Device, node, i);
                i++;
            }
        }
Beispiel #4
0
        public void SetMidiConfiguration(string pDeviceName, string pCommand, int pMidiChannel, int pData1)
        {
            string oldestKey = "";

            if (!string.IsNullOrEmpty(mKey))
            {
                oldestKey = String.Copy(mKey);
            }



            mDeviceName  = pDeviceName;
            mCommand     = pCommand;
            mMidiChannel = pMidiChannel;
            mData1       = pData1;
            mKey         = Action.GetKey(mDeviceName, mCommand, mMidiChannel, mData1);

            Framework.Bcf2000.ChangeKey(oldestKey, this);
        }
Beispiel #5
0
        internal ActionList(XmlNode pElement)
        {
            mDeviceName  = pElement.Attributes["DeviceName"].InnerText;
            mCommand     = pElement.Attributes["Command"].InnerText;
            mMidiChannel = Convert.ToInt32(pElement.Attributes["MidiChannel"].InnerText);
            mData1       = Convert.ToInt32(pElement.Attributes["Data1"].InnerText);
            mKey         = Action.GetKey(mDeviceName, mCommand, mMidiChannel, mData1);
            mDescription = pElement.Attributes["Description"].InnerText;
            mActionList  = new List <Action>();

            foreach (XmlNode node in pElement.ChildNodes)
            {
                try
                {
                    if (node.Name == ChangeDmxValue.XmlElementName)
                    {
                        Action act = new ChangeDmxValue(node);
                        act.OnNewValueToSend += new OnNewValueToSendEvent(act_OnNewValueToSend);
                        mActionList.Add(act);
                    }
                    else if (node.Name == SceneMidiPlayer.XmlElementName)
                    {
                        Action act = new SceneMidiPlayer(node);
                        act.OnNewValueToSend += new OnNewValueToSendEvent(act_OnNewValueToSend);
                        mActionList.Add(act);
                    }
                    else if (node.Name == AutoPress.XmlElementName)
                    {
                        Action act = new AutoPress(node);
                        act.OnNewValueToSend += new OnNewValueToSendEvent(act_OnNewValueToSend);
                        mActionList.Add(act);
                    }
                    else if (node.Name == AutoSpeed.XmlElementName)
                    {
                        Action act = new AutoSpeed(node);
                        act.OnNewValueToSend += new OnNewValueToSendEvent(act_OnNewValueToSend);
                        mActionList.Add(act);
                    }
                }
                catch { }
            }
        }