Store last selected Folder-Path
This commit is contained in:
parent
e499062fd5
commit
8fcee6ca22
@ -8,12 +8,18 @@ public static class Tranga_Cli
|
|||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Output folder path [standard D:]:");
|
string folderPath = Directory.GetCurrentDirectory();
|
||||||
string? folderPath = Console.ReadLine();
|
string settingsPath = Path.Join(Directory.GetCurrentDirectory(), "lastPath.setting");
|
||||||
while(folderPath is null )
|
if (File.Exists(settingsPath))
|
||||||
folderPath = Console.ReadLine();
|
folderPath = File.ReadAllText(settingsPath);
|
||||||
if (folderPath.Length < 1)
|
|
||||||
folderPath = "D:";
|
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.Write("Mode (D: Interactive only, T: TaskManager):");
|
Console.Write("Mode (D: Interactive only, T: TaskManager):");
|
||||||
ConsoleKeyInfo mode = Console.ReadKey();
|
ConsoleKeyInfo mode = Console.ReadKey();
|
||||||
|
Loading…
Reference in New Issue
Block a user