/// <summary> /// Sets the button images (Panel) to indicate their enabled/disabled state.. /// </summary> private void SetButtonImages() { btnPlay.BackgroundImage = // play button image.. btnPlay.Enabled ? Properties.Resources.play : UtilsMisc.MakeGrayscale3(Properties.Resources.play); btnSeekStart.BackgroundImage = // jump to the beginning button image.. btnSeekStart.Enabled ? Properties.Resources.previous : UtilsMisc.MakeGrayscale3(Properties.Resources.previous); btnSeekEnd.BackgroundImage = // jump to the end button image.. btnSeekEnd.Enabled ? Properties.Resources.next : UtilsMisc.MakeGrayscale3(Properties.Resources.next); btnWindBackward.BackgroundImage = // jump to the end button image.. btnWindBackward.Enabled ? Properties.Resources.wind_back : UtilsMisc.MakeGrayscale3(Properties.Resources.wind_back); btnWindForward.BackgroundImage = // wind forward button image.. btnWindForward.Enabled ? Properties.Resources.wind_forward : UtilsMisc.MakeGrayscale3(Properties.Resources.wind_forward); btnSelectSubtitle.BackgroundImage = // wind forward button image.. btnSelectSubtitle.Enabled ? Properties.Resources.subtitle : UtilsMisc.MakeGrayscale3(Properties.Resources.subtitle); btnVolume.BackgroundImage = // volume button image.. btnVolume.Enabled ? (muted ? Properties.Resources.volume_off : Properties.Resources.volume) : UtilsMisc.MakeGrayscale3(Properties.Resources.volume); }
/// <summary> /// Sets the button images (Panel) to indicate their enabled/disabled state.. /// </summary> private void SetButtonImages() { btnBack.BackgroundImage = // browser back button image.. btnBack.Enabled ? Properties.Resources.back : UtilsMisc.MakeGrayscale3(Properties.Resources.back); btnForward.BackgroundImage = // browser forward button image.. btnForward.Enabled ? Properties.Resources.forward : UtilsMisc.MakeGrayscale3(Properties.Resources.forward); }
/// <summary> /// Sets the button images (Panel) to indicate their enabled/disabled state.. /// </summary> private void SetButtonImages() { btnPervious.BackgroundImage = // navigation back button image.. btnPervious.Enabled ? Properties.Resources.back : // the button is enabled.. UtilsMisc.MakeGrayscale3(Properties.Resources.back); // the button is disabled.. btnNext.BackgroundImage = // navigation forward button image.. btnNext.Enabled ? Properties.Resources.forward : // the button is enabled.. UtilsMisc.MakeGrayscale3(Properties.Resources.forward); // the button is disabled.. }