Bug fixes, added Output Directory option

This commit is contained in:
Pablu23
2020-06-25 17:49:20 +02:00
parent 759ecdd113
commit 0c5382e78a
6 changed files with 12 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ using Newtonsoft.Json.Serialization;
* Email : pablu23@gmx.de
* Erstelldatum : 25.06.2020
* Last change : 25.06.2020
* GitHub : https://github.com/Pablu23/16x16Converter
* GitHub : https://github.com/Pablu23/ConvertTo16x16
*
* TODO : Add comments, bug fixes. Add Background removal. Finish Project.
*
@@ -47,6 +47,7 @@ namespace ConvertTo16x16
public int PixelAnzahl { get; set; }
public bool RmBackground { get; set; }
public Color BackgroundCol { get; set; }
public string OutputDir { get; set; }
}
class Program
@@ -111,6 +112,13 @@ namespace ConvertTo16x16
Console.SetCursorPosition(25, Console.CursorTop - 2);
}
settings.FileDir = Console.ReadLine();
Console.Write("\nGeben sie den Output Pfad an : ");
if (settings.OutputDir != null)
{
Console.WriteLine($"\nPfad : {settings.OutputDir}");
Console.SetCursorPosition(32, Console.CursorTop - 2);
}
settings.OutputDir = Console.ReadLine();
Console.Write("\nGeben sie an Wieviele Pixel sie wollen (Empfohlen: 16 | 32) : ");
if (settings.PixelAnzahl > 15)
{
@@ -133,7 +141,7 @@ namespace ConvertTo16x16
{
case "t":
settings.RmBackground = true;
Console.WriteLine("Which Color should be removed");
Console.WriteLine("\n\n\nWhich Color should be removed");
Console.Write("Red : ");
int red = Convert.ToInt32(Console.ReadLine());
Console.Write("Green : ");
@@ -262,8 +270,8 @@ namespace ConvertTo16x16
}
}
outcome.Save($@"{settings.FileDir}\16x16{bildName}");
outcome.Save($@"{settings.OutputDir}\16x16{bildName}");
bmp.Dispose();
}
}