Code cleanup

This commit is contained in:
pointfeev 2021-08-09 07:02:53 -05:00
parent 36e5d510bc
commit 84a321112b

View file

@ -27,7 +27,7 @@ namespace CreamInstaller
private int CompleteOperationsCount; private int CompleteOperationsCount;
public void UpdateProgress(int progress) public void UpdateProgress(int progress)
{ {
int value = (int)((float)((float)CompleteOperationsCount / (float)OperationsCount) * 100) + (progress / OperationsCount); int value = (int)((float)(CompleteOperationsCount / (float)OperationsCount) * 100) + (progress / OperationsCount);
if (value < userProgressBar.Value) { return; } if (value < userProgressBar.Value) { return; }
userProgressBar.Value = value; userProgressBar.Value = value;
} }
@ -45,7 +45,7 @@ namespace CreamInstaller
logTextBox.AppendText(userInfoLabel.Text, color); logTextBox.AppendText(userInfoLabel.Text, color);
} }
} }
private async Task OperateFor(ProgramSelection selection) private async Task OperateFor(ProgramSelection selection)
{ {
UpdateProgress(0); UpdateProgress(0);