static void Main(string[] args) { string rootApp = Assembly.GetEntryAssembly().GetName().CodeBase.ToString(); Menu menu = new Menu(); Gnew test2 = new Gnew(); MapLoader mapl = new MapLoader(); String[] argus = new string[2]; if (Environment.GetCommandLineArgs().Length == 1) { argus[0] = Environment.GetCommandLineArgs()[0]; argus[1] = null; } else if (Environment.GetCommandLineArgs().Length == 2) { argus = Environment.GetCommandLineArgs(); } if (argus[1] == "--help" || argus[1] == "-h" || argus[1] == "-?") { menu.help(); Environment.Exit(0); } else if (argus[1] == null) { menu.menu(); Environment.Exit(0); } else { WriteLine("Neplatný argument: {0}", argus[1]); menu.help(); Environment.Exit(0); } }
public void menu() { WriteLine("{0} v{1}Alpha\n" + "by KoleckOLP, HorseArmored Inc (C){2}\n", name, ver, year); while (true) { Gnew test2 = new Gnew(); char choice; WriteLine("1. New Game\n" + "2. Custom Levels\n" + "3. Load Game\n" + "4. About & Credits\n" + "5. Quit"); Write("#"); choice = ReadKey().KeyChar; if (choice == '1') { test2.Story(); Clear(); } else if (choice == '2') { test2.Map(); Clear(); } else if (choice == '3') { Clear(); WriteLine("Loading is not yet implemented\n"); } else if (choice == '4') { Clear(); help(); } else if (choice == '5') { Environment.Exit(0); } else { Clear(); WriteLine("Chice is 1-4\n"); } } }