This repository has been archived by the owner on Mar 31, 2022. It is now read-only.
/
Program.cs
81 lines (71 loc) · 2.16 KB
/
Program.cs
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
69
70
71
72
73
74
75
76
77
78
79
80
81
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
namespace ARCO1500_Uploader
{
class Program
{
#if DEBUG
public static bool debug = true;
#else
public static bool debug = false;
#endif
static void Main(string[] args)
{
Console.SetWindowSize(80, 40);
Console.SetBufferSize(80, 40);
Console.Beep(1500, 500);
// print nice ASCI logo
string title = @"
_____ _____ ____ _ ___ __ __
/\ | __ \ / ____/ __ \ / | __|/ \ / \
/ \ | |__) | | | | | | | |__ \ () | () |
/ /\ \ | _ /| | | | | | |_|___/\__/ \__/
/ ____ \| | \ \| |___| |__| |
/_/ \_\_| \_\\_____\____/
";
//Console.WriteLine(title);
int i = 0;
foreach (char l in title)
{
if (i <= 32)
{
Console.ForegroundColor = ConsoleColor.Cyan;
} else
{
Console.ForegroundColor = ConsoleColor.Magenta;
}
Console.Write(l);
i++;
if (i > 50)
{
i = 0;
}
}
Console.ForegroundColor = ConsoleColor.Cyan;
Console.WriteLine(" __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ ");
Console.WriteLine();
// COM ports
COMPort comPorts = new COMPort();
comPorts.printCOMPorts();
int comPort = comPorts.selectCOMPort();
// Games
Games games = new Games();
bool isFolderOk = games.printGames();
if (!isFolderOk)
{
return;
}
string game = games.selectGame();
// Upload
Uploader uploader = new Uploader();
uploader.upload(game, comPort);
Console.ReadLine();
}
}
}