-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConsoleApp.cs
More file actions
68 lines (61 loc) · 2.4 KB
/
ConsoleApp.cs
File metadata and controls
68 lines (61 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
namespace SkinGenBot;
public class ConsoleApp
{
public static void Run()
{
if (!Program.ConsoleMode) return;
string prompt = "(C) Custom Hex\n(R) Random Hex\n(SC) SplitGen Custom\n(SR) SplitGen Random\n(G) Gradient Custom\n(GR) Gradient Random\n(E) End\n-> ";
string input = Input($"Console Mode Enabled.\n{prompt}").ToLower();
string hex = String.Empty;
string hex2 = String.Empty;
while (input != "e")
{
switch (input)
{
default:
hex = Input("Input Custom Hex: ");
Image.SolidGen(hex);
Image.SaveImage(hex);
break;
case "r":
hex = Colors.ColorToHex(Colors.GenerateRandomHex());
Image.SolidGen(hex);
Image.SaveImage(hex);
break;
case "sc":
hex = Input("Input SplitGen Hex 1: ");
hex2 = Input("Input SplitGen Hex 2: ");
Image.SplitGen(hex, hex2);
Image.SaveImageSplitGen(hex, hex2);
break;
case "sr":
hex = Colors.ColorToHex(Colors.GenerateRandomHex());
hex2 = Colors.ColorToHex(Colors.GenerateRandomHex());
Image.SplitGen(hex, hex2);
Image.SaveImageSplitGen(hex, hex2);
break;
case "g":
hex = Input("Input Gradient Hex 1: ");
hex2 = Input("Input Gradient Hex 2: ");
Image.GradientGen(hex, hex2);
Image.SaveImageGradient(hex, hex2);
break;
case "gr":
hex = Colors.ColorToHex(Colors.GenerateRandomHex());
hex2 = Colors.ColorToHex(Colors.GenerateRandomHex());
Image.GradientGen(hex, hex2);
Image.SaveImageGradient(hex, hex2);
break;
}
input = Input(prompt).ToLower();
}
Console.WriteLine("Console Operation ended.\nPress any key to close.");
Program.EndMainThread = true;
Console.ReadKey();
}
public static string Input(string prompt)
{
Console.Write(prompt);
return Console.ReadLine();
}
}