private void AssignControls(StatusLabel label, CustomProgressBar bar, State state) { label.UpdateContent(state); if (bar != null) { bar.Value = state.DownloadProgress; } }