private void RenderColorLine(string totalSize, string output) { if (totalSize.Contains("GB")) { UIConsole.WriteColorLine(ConsoleColor.Red, output); } else if (totalSize.Contains("MB")) { UIConsole.WriteColorLine(ConsoleColor.Yellow, output); } else { UIConsole.WriteLine(output); } }
private void Render(KeyValuePair <string, Size> directory) { var output = $"{directory.Key,PATH_COLUMN_WIDTH}{directory.Value,SIZE_COLUMN_WIDTH}"; if (directory.Value.SizeType == SizeType.Gigabytes) { UIConsole.WriteColorLine(ConsoleColor.Red, output); } else if (directory.Value.SizeType == SizeType.Megabytes) { UIConsole.WriteColorLine(ConsoleColor.Yellow, output); } else { UIConsole.WriteLine(output); } }