static void Main(string[] args) { if (args.Length == 2) { int first, second; if (!int.TryParse(args[0], out first) || !int.TryParse(args[1], out second)) { Console.WriteLine("Invalid arguments. Press any key to continue..."); Console.ReadKey(); Init(); return; } LogicGateWorker.CalculateGateWithAllMethods(Convert.ToString(first, 2), Convert.ToString(second, 2)); } else { if (args.Length == 0) { Init(); return; } else { Console.WriteLine("Invalid arguments. Press any key to continue..."); Console.ReadKey(); Init(); return; } } }
public static void Init() { ProgramSettings.GetProgramFunctions().Clear(); var x = new LogicGateWorker(); var e = new ExitFunction(); DoWelcomeScreen(); }