private void progBut_Click(object sender, RoutedEventArgs e) { var button = sender as RadioButton; var butVal = button.Tag; int butNum = Convert.ToInt32(butVal); if (m_mixEffectBlock1 != null) { m_mixEffectBlock1.SetInt(_BMDSwitcherMixEffectBlockPropertyId.bmdSwitcherMixEffectBlockPropertyIdProgramInput, butNum); } }
private void Indev_ChannelMessageReceived(object sender, ChannelMessageEventArgs e) { if (isMapping) { ((MixerInput)mappingList.SelectedValue).mapping = new MixerInput.MidiMapping(e.Message.Command, e.Message.Data1); stopMapping(); } else { foreach (MixerInput inpt in inputList) { if (inpt.mapping != null && inpt.mapping.Command == e.Message.Command && inpt.mapping.Data1 == e.Message.Data1) { long id; inpt.input.GetInputId(out id); mixEffectBlock1.SetInt(_BMDSwitcherMixEffectBlockPropertyId.bmdSwitcherMixEffectBlockPropertyIdPreviewInput, id); } } } if (e.Message.Command == ChannelCommand.Controller && e.Message.Data1 == 0) { float val = ((float)e.Message.Data2) / 127f; if (invertSlider) { val = 1.0f - val; } if (val == 1.0f) { invertSlider = !invertSlider; } mixEffectBlock1.SetFloat(_BMDSwitcherMixEffectBlockPropertyId.bmdSwitcherMixEffectBlockPropertyIdTransitionPosition, val); } }
private void SetProgramInput(StringObjectPair <long> program) { if (m_mixEffectBlock1 != null) { if (!this.CurrentProgram.Equals(program)) { m_mixEffectBlock1.SetInt(_BMDSwitcherMixEffectBlockPropertyId.bmdSwitcherMixEffectBlockPropertyIdProgramInput, program.value); this.CurrentProgram = program; } } }