private void displayAllocationDetails(string TANFileContent, string configFileContent) { var allocations = TaskAllocationFileParser.GetAllocations(TANFileContent); foreach (var allocation in allocations) { float allocationRuntime = AllocationService.GetAllocationRuntime(configFileContent, allocation.Value); string allocationRuntimeErrorMsg = AllocationService.IsAllocationRuntimeValid(configFileContent, allocationRuntime); displayAllocation(allocation); if (allocationRuntimeErrorMsg == "") { float energyConsumed = AllocationService.GetTotalEnergyConsumed(configFileContent, allocation.Value); mainFormTextBox.AppendText($"Time = {allocationRuntime}, Energy = {energyConsumed}"); } else { mainFormTextBox.AppendText(allocationRuntimeErrorMsg); } mainFormTextBox.AppendText(Environment.NewLine); mainFormTextBox.AppendText(Environment.NewLine); } }