/// <summary> /// Update the value of the volume slider and numeric. /// </summary> /// <seealso cref="UpdateAll"/> private void UpdatePreamp() { if (trackbar_volume.InvokeRequired) { // thread-safe callback DeferredEmptyCallback d = new DeferredEmptyCallback(UpdatePreamp); this.Invoke(d, new object[] { }); } else { trackbar_volume.Value = eqAPI.PreAmp; numeric_volume.Value = eqAPI.PreAmp; } }
/// <summary> /// Update the playback button to be either a play or pause button, /// according the the current <see cref="ZuneAPI.IsPlaying"/> state. /// </summary> private void UpdatePlaybackButton() { if (button_play_pause.InvokeRequired) { // thread-safe callback DeferredEmptyCallback d = new DeferredEmptyCallback(UpdatePlaybackButton); this.Invoke(d, new object[] { }); } else { if (zuneAPI.IsPlaying()) { button_play_pause.Text = "Pause"; } else { button_play_pause.Text = "Play"; } } }