BF2Statistics.ProgressBarExtensions.ValueFast C# (CSharp) Method

ValueFast() public static method

Hack method to make the progress bar immediately update to the desired position
public static ValueFast ( this progressBar, int value ) : void
progressBar this
value int
return void
        public static void ValueFast(this ProgressBar progressBar, int value)
        {
            progressBar.Value = value;

            if (value > 0)    // prevent ArgumentException error on value = 0
            {
                progressBar.Value = value - 1;
                progressBar.Value = value;
            }
        }
ProgressBarExtensions