Esempio n. 1
0
        void ChangeSceneState(DmxFramework.Scene.Scene pScene, DmxFramework.Scene.SceneState pState)
        {
            switch (pState)
            {
            case SceneState.Nothing:
                this.BackColor     = Color.White;
                this.btn_Add.Text  = "Add";
                this.btn_Play.Text = "Play";
                break;

            case SceneState.Pause:
                this.BackColor     = Color.Orange;
                this.btn_Add.Text  = "Add";
                this.btn_Play.Text = "Play";
                break;

            case SceneState.PlayingExclusive:
                this.BackColor     = Color.Tomato;
                this.btn_Add.Text  = "Add";
                this.btn_Play.Text = "Stop";
                break;

            case SceneState.Playing:
                this.BackColor     = Color.LightGreen;
                this.btn_Add.Text  = "Remove";
                this.btn_Play.Text = "Play";
                break;

            case SceneState.Waiting:
                this.BackColor     = Color.LightBlue;
                this.btn_Add.Text  = "Remove";
                this.btn_Play.Text = "Play";
                break;
            }
        }
Esempio n. 2
0
 void mScene_OnSceneStateChanged(DmxFramework.Scene.Scene pScene, DmxFramework.Scene.SceneState pState)
 {
     mCOntext.Post(new SendOrPostCallback(
                       delegate
     {
         ChangeSceneState(pScene, pState);
     }), null);
 }
Esempio n. 3
0
 void mScene_OnScenePlayed(DmxFramework.Scene.Scene pScene)
 {
     //if (mRecievedValue != 127)
     //{
     //    SendValueToMidi(127);
     //    mRecievedValue = 127;
     //}
 }
Esempio n. 4
0
 void mScene_OnSceneRemoved(DmxFramework.Scene.Scene pScene)
 {
     //if (mRecievedValue != 0)
     //{
     //    SendValueToMidi(0);
     //    mRecievedValue = 0;
     //}
 }
Esempio n. 5
0
        public SceneButton(DmxFramework.Scene.Scene pScene)
        {
            mScene = pScene;

            InitializeComponent();
            mCOntext             = SynchronizationContext.Current;
            this.label1.Text     = pScene.Name;
            this.trackBar1.Value = pScene.Ratio;
            this.label2.Text     = pScene.Ratio.ToString();
            mScene_OnSceneStateChanged(mScene, mScene.State);
            mScene.OnSceneStateChanged += new DmxFramework.Scene.OnSceneStateChangeHandler(mScene_OnSceneStateChanged);
            mScene.OnSceneRatioChanged += new OnSceneRatioChangedHandler(mScene_OnSceneRatioChanged);
            if (mScene.Steps.Count < 2)
            {
                this.tableLayoutPanel1.RowStyles[2].Height = 0;
            }
            //mScene.o
        }
Esempio n. 6
0
        private void removeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.treeView1.SelectedNode == null || this.treeView1.SelectedNode.Tag == null)
            {
                return;
            }


            DialogResult res = MessageBox.Show("Are you sur to delete " + this.treeView1.SelectedNode.FullPath + " ??3", "Confirmation", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);

            if (res == DialogResult.OK)
            {
                DmxFramework.Scene.Scene scene = (DmxFramework.Scene.Scene) this.treeView1.SelectedNode.Tag;

                mFixture.Manager.Scenes.Remove(scene);
                mCurrentScene = null;
                RefreshTree();
            }
        }
Esempio n. 7
0
 void mScene_OnSceneStateChanged(DmxFramework.Scene.Scene pScene, SceneState pState)
 {
     if (pState == SceneState.Playing || pState == SceneState.PlayingExclusive)
     {
         if (mRecievedValue != 127)
         {
             SendValueToMidi(127);
             mRecievedValue = 127;
         }
     }
     else
     {
         if (mRecievedValue != 0)
         {
             SendValueToMidi(0);
             mRecievedValue = 0;
         }
     }
 }