- October 24, 2011
- 261
- 207
- 43
Can someone please explain this code to me?
Why is the volume slider being referenced to update the progress bar? What does videoProgress have to do with volume?
Code:
private void SetVideoProgress()
{
if (g_Player.Playing)
{
// double fPercentage=g_Player.CurrentPosition / g_Player.Duration;
// GUIProgressControl pControl = (GUIProgressControl)GetControl((int)Controls.OSD_VIDEOPROGRESS);
// if (null!=pControl) pControl.Percentage=(int)(100*fPercentage); // Update our progress bar accordingly ...
int iValue = g_Player.Volume;
GUISliderControl pSlider = GetControl((int)Controls.OSD_VOLUMESLIDER) as GUISliderControl;
if (null != pSlider)
{
pSlider.Percentage = iValue; // Update our progress bar accordingly ...
}
}
}
Why is the volume slider being referenced to update the progress bar? What does videoProgress have to do with volume?