Compare commits
No commits in common. "b040419e126f0e244d25ffc1549e772742b1b5a7" and "e499062fd5741824c465bf030af1408999610552" have entirely different histories.
b040419e12
...
e499062fd5
@ -8,18 +8,12 @@ public static class Tranga_Cli
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string folderPath = Directory.GetCurrentDirectory();
|
||||
string settingsPath = Path.Join(Directory.GetCurrentDirectory(), "lastPath.setting");
|
||||
if (File.Exists(settingsPath))
|
||||
folderPath = File.ReadAllText(settingsPath);
|
||||
|
||||
Console.WriteLine($"Output folder path [{folderPath}]:");
|
||||
string? tmpPath = Console.ReadLine();
|
||||
while(tmpPath is null)
|
||||
tmpPath = Console.ReadLine();
|
||||
if(tmpPath.Length > 0)
|
||||
folderPath = tmpPath;
|
||||
File.WriteAllText(settingsPath, folderPath);
|
||||
Console.WriteLine("Output folder path [standard D:]:");
|
||||
string? folderPath = Console.ReadLine();
|
||||
while(folderPath is null )
|
||||
folderPath = Console.ReadLine();
|
||||
if (folderPath.Length < 1)
|
||||
folderPath = "D:";
|
||||
|
||||
Console.Write("Mode (D: Interactive only, T: TaskManager):");
|
||||
ConsoleKeyInfo mode = Console.ReadKey();
|
||||
@ -112,11 +106,12 @@ public static class Tranga_Cli
|
||||
int taskRunningCount = taskManager.GetAllTasks().Count(task => task.isBeingExecuted);
|
||||
Console.Clear();
|
||||
Console.WriteLine($"Download Folder: {folderPath} Tasks (Running/Total): {taskRunningCount}/{taskCount}");
|
||||
Console.WriteLine("Select Option:");
|
||||
Console.WriteLine("L: List tasks");
|
||||
Console.WriteLine("C: Create Task");
|
||||
Console.WriteLine("D: Delete Task");
|
||||
Console.WriteLine("E: Execute Task now");
|
||||
Console.WriteLine("Q: Exit");
|
||||
Console.WriteLine("Q: Exit with saving");
|
||||
ConsoleKey selection = Console.ReadKey().Key;
|
||||
Console.WriteLine();
|
||||
return selection;
|
||||
@ -136,15 +131,9 @@ public static class Tranga_Cli
|
||||
private static void ExecuteTask(TaskManager taskManager)
|
||||
{
|
||||
TrangaTask[] tasks = taskManager.GetAllTasks();
|
||||
if (tasks.Length < 1)
|
||||
{
|
||||
Console.Clear();
|
||||
Console.WriteLine("There are no available Tasks.");
|
||||
return;
|
||||
}
|
||||
PrintTasks(tasks);
|
||||
|
||||
Console.WriteLine($"Select Task (0-{tasks.Length}):");
|
||||
Console.WriteLine($"Select Task (0-{tasks.Length - 1}):");
|
||||
|
||||
string? selectedTask = Console.ReadLine();
|
||||
while(selectedTask is null || selectedTask.Length < 1)
|
||||
@ -157,15 +146,9 @@ public static class Tranga_Cli
|
||||
private static void RemoveTask(TaskManager taskManager)
|
||||
{
|
||||
TrangaTask[] tasks = taskManager.GetAllTasks();
|
||||
if (tasks.Length < 1)
|
||||
{
|
||||
Console.Clear();
|
||||
Console.WriteLine("There are no available Tasks.");
|
||||
return;
|
||||
}
|
||||
PrintTasks(tasks);
|
||||
|
||||
Console.WriteLine($"Select Task (0-{tasks.Length}):");
|
||||
Console.WriteLine($"Select Task (0-{tasks.Length - 1}):");
|
||||
|
||||
string? selectedTask = Console.ReadLine();
|
||||
while(selectedTask is null || selectedTask.Length < 1)
|
||||
@ -184,7 +167,7 @@ public static class Tranga_Cli
|
||||
Console.WriteLine("Available Tasks:");
|
||||
foreach (string taskName in taskNames)
|
||||
Console.WriteLine($"{tIndex++}: {taskName}");
|
||||
Console.WriteLine($"Select Task (0-{taskNames.Length}):");
|
||||
Console.WriteLine($"Select Task (0-{taskNames.Length - 1}):");
|
||||
|
||||
string? selectedTask = Console.ReadLine();
|
||||
while(selectedTask is null || selectedTask.Length < 1)
|
||||
|
Loading…
Reference in New Issue
Block a user