示例#1
0
        private void btn_Add_Click(object sender, EventArgs e)
        {
            DmxFramework.Midi.Action.Action NewAction = null;
            if (this.cmb_AddAction.SelectedIndex == 0)
            {
                NewAction = new ChangeDmxValue();
            }
            else if (this.cmb_AddAction.SelectedIndex == 1)
            {
                NewAction = new SceneMidiPlayer();
            }
            else if (this.cmb_AddAction.SelectedIndex == 2)
            {
                NewAction = new AutoSpeed();
            }
            else if (this.cmb_AddAction.SelectedIndex == 3)
            {
                NewAction = new AutoPress();
            }
            else if (this.cmb_AddAction.SelectedIndex == 4)
            {
                NewAction = new SceneSpeed();
            }

            if (NewAction != null)
            {
                mAction.Actions.Add(NewAction);
                this.list_Action.Items.Add(NewAction);
            }
        }
示例#2
0
 public void SetAction(ChangeDmxValue pValue)
 {
     mValue = pValue;
     this.fullTreeCtrl1.Reset();
     this.fullTreeCtrl1.SelectedChannel = mValue.Channel;
     this.fullTreeCtrl1.LoadTree();
     if (mValue.Channel != null)
     {
         this.txt_Path.Text = mValue.Channel.Path;
     }
     else
     {
         this.txt_Path.Text = "";
     }
     this.txt_DmxMin.Text  = mValue.MinDmx.ToString();
     this.txt_DmxMax.Text  = mValue.MaxDmx.ToString();
     this.txt_MidiMin.Text = mValue.MinMidi.ToString();
     this.txt_MidiMax.Text = mValue.MaxMidi.ToString();
 }