Class ConsoleUtil
Utility class for handling console input and output. Provides methods for printing translated messages and retrieving user input.
Inherited Members
Namespace: EasySave_Project.Util
Assembly: .dll
Syntax
public static class ConsoleUtil
Methods
| Edit this page View SourceGetInputInt()
Reads a valid integer input from the console. Ensures that the user enters a numeric value before returning it.
Declaration
public static int GetInputInt()
Returns
Type | Description |
---|---|
int | A valid integer input from the user. |
GetInputJobSaveTypeEnum()
Displays a list of job save types and retrieves the user's choice. Ensures valid input before returning the selected enum value.
Declaration
public static JobSaveTypeEnum GetInputJobSaveTypeEnum()
Returns
Type | Description |
---|---|
JobSaveTypeEnum | The selected JobSaveTypeEnum value. |
GetInputString()
Reads a valid non-empty string input from the console. Repeats the prompt if the input is empty or invalid.
Declaration
public static string GetInputString()
Returns
Type | Description |
---|---|
string | A valid non-empty string. |
PrintTextconsole(string)
Prints a translated message to the console. If no translation is available, it prints the original text.
Declaration
public static void PrintTextconsole(string textKey)
Parameters
Type | Name | Description |
---|---|---|
string | textKey | The translation key to fetch the translated message. |