Example #1
0
        private void btnPauseEffect_Click(object sender, EventArgs e)
        {
            DInputHandler dih = GetDInputHandler();

            if (dih == null)
            {
                return;
            }

            int idx = cboxEffSlots.SelectedIndex;

            if (dih.GetEffectState(idx) == DInputHandler.EffectState.PAUSED)
            {
                if (dih.ResumeOneEffect(idx))
                {
                    MarkActiveSlot();
                }
            }
            else if (dih.GetEffectState(idx) == DInputHandler.EffectState.ACTIVE)
            {
                if (dih.PauseOneEffect(idx))
                {
                    MarkPausedSlot();
                }
            }
        }
Example #2
0
 /// <summary>
 /// Marks the effect indicators accordingly to the states of the effects
 /// </summary>
 /// <param name="dih"></param>
 private void MarkAllSlots(DInputHandler dih)
 {
     for (int i = 0; i < 8; i++)
     {
         if (dih.GetEffectState(i) == DInputHandler.EffectState.OFF)
         {
             effectSlotIndicators[i].BackColor = Control.DefaultBackColor;
             effectSlotIndicators[i].ForeColor = Control.DefaultForeColor;
         }
         else if (dih.GetEffectState(i) == DInputHandler.EffectState.PAUSED)
         {
             effectSlotIndicators[i].BackColor = Color.Yellow;
             effectSlotIndicators[i].ForeColor = Color.Black;
         }
         else
         {
             effectSlotIndicators[i].BackColor = Color.Green;
             effectSlotIndicators[i].ForeColor = Color.White;
         }
     }
 }
Example #3
0
        private void cboxEffSlots_SelectedIndexChanged(object sender, EventArgs e)
        {
            DInputHandler dih = GetDInputHandler();

            if (dih == null)
            {
                return;
            }

            if (dih.GetEffectState(cboxEffSlots.SelectedIndex) == DInputHandler.EffectState.ACTIVE)
            {
                btnPauseEffect.Text = "Pause effect";
            }
            else if (dih.GetEffectState(cboxEffSlots.SelectedIndex) == DInputHandler.EffectState.PAUSED)
            {
                btnPauseEffect.Text = "Resume effect";
            }
            else
            {
                btnPauseEffect.Text = "(no effect)";
            }
        }
Example #4
0
 /// <summary>
 /// Marks the effect indicators accordingly to the states of the effects
 /// </summary>
 /// <param name="dih"></param>
 private void MarkAllSlots(DInputHandler dih)
 {
     for (int i = 0; i < 8; i++)
     {
         if (dih.GetEffectState(i) == DInputHandler.EffectState.OFF)
         {
             effectSlotIndicators[i].BackColor = Control.DefaultBackColor;
             effectSlotIndicators[i].ForeColor = Control.DefaultForeColor;
         }
         else if (dih.GetEffectState(i) == DInputHandler.EffectState.PAUSED)
         {
             effectSlotIndicators[i].BackColor = Color.Yellow;
             effectSlotIndicators[i].ForeColor = Color.Black;
         }
         else
         {
             effectSlotIndicators[i].BackColor = Color.Green;
             effectSlotIndicators[i].ForeColor = Color.White;
         }
     }
 }