/// <summary> /// Handle checking or unchecking of the <see cref="checkbox_apply_equalizer"/>. /// Applies or doesn't apply the equalizer as given by the state of the checkbox. /// </summary> /// <param name="sender">N/A</param> /// <param name="e">N/A</param> /// <seealso cref="equalizerapo_api.ApplyEqualizer"/> private void checkbox_apply_equalizer_CheckedChanged(object sender, EventArgs e) { if (checkbox_apply_equalizer.InvokeRequired) { EventInvokeDelegate d = new EventInvokeDelegate(checkbox_apply_equalizer_CheckedChanged); this.Invoke(d, new object[] { sender, e }); } else { eqAPI.ApplyEqualizer(checkbox_apply_equalizer.Checked); messenger.Send(messageParser.CreateMessage( MessageParser.MESSAGE_TYPE.FILTER_APPLY), true); } }
/// <summary> /// Handles a change the <see cref="numeric_volume"/> value. /// Changes the equalizer preAmp (aka volume). /// </summary> /// <param name="sender">N/A</param> /// <param name="e">N/A</param> /// <seealso cref="equalizerapo_api.PreAmp"/> private void numeric_volume_ValueChanged(object sender, EventArgs e) { if (trackbar_volume.InvokeRequired) { // thread-safe callback EventInvokeDelegate d = new EventInvokeDelegate(trackbar_volume_ValueChanged); this.Invoke(d, new object[] { sender, e }); } else { eqAPI.PreAmp = trackbar_volume.Value; messenger.Send( messageParser.CreateMessage(MessageParser.MESSAGE_TYPE.VOLUME_CHANGED), true); } }
/// <summary> /// Handles a change to the <see cref="combobox_listening_port"/> selected value. /// Changes the IPv4 address that the client app connects to. /// </summary> /// <param name="sender">N/A</param> /// <param name="e">N/A</param> /// <seealso cref="Messenger.ChangeListeningAddress"/> private void combobox_listening_port_SelectedValueChanged(object sender, System.EventArgs e) { if (combobox_listening_port.InvokeRequired) { // thread-safe callback EventInvokeDelegate d = new EventInvokeDelegate(combobox_listening_port_SelectedValueChanged); this.Invoke(d, new object[] { sender, e }); } else { if (messenger == null) { return; } messenger.ChangeListeningAddress( combobox_listening_port.SelectedValue.ToString()); UpdateListenerDescription(); } }