static void ConvertLocationNumeralToAbbreviated() { Console.WriteLine("-Please enter a location numeral. All of the letters are supposed to be within a ~ z in lower case. You can use connector '-' to connect different part of the location numeral."); string locationNumeral = Console.ReadLine(); if (CheckLocationNumeralWithinAZ(locationNumeral)) { string ret = LocationNumeralsConverter.ConverLocationNumeralsToAbbreviation(locationNumeral); Console.WriteLine(ret); Console.WriteLine("Conversion completed. Press any key to continue..."); Console.ReadKey(); } else { Console.WriteLine("Input invalid, back to main menu. Press any key to continue..."); Console.ReadKey(); } }
static void ConvertIntegerToLocationNumeral() { Console.WriteLine("-Please enter a positive number. Negative number and 0 are not supported."); UInt64 number = 0; UInt64.TryParse(Console.ReadLine(), out number); if (number <= 0) { Console.WriteLine("Input invalid, back to main menu. Press any key to continue..."); Console.ReadKey(); } else { string ret = LocationNumeralsConverter.ConverIntegerToLocationNumerals(number); Console.WriteLine(ret); Console.WriteLine("Conversion completed. Press any key to continue..."); Console.ReadKey(); } }