private void UpdateCurrentProgressBar(int value) { if (value < 0) value = 0; if (value > 100) value = 100; progressBar.Value = value; }