Beispiel #1
0
 /// <summary>
 /// Prints generalized error message for use when user is prompted with try again/abort.
 /// Parameters for specifying error message.
 /// </summary>
 /// <param name="input1"></param>
 /// <param name="input2"></param>
 /// <returns>string</returns>
 public static string ErrorAbort(string input1 = "", string input2 = "")
 {
     Console.Clear();
     Console.WriteLine($"Something went wrong when {input1}! Either your session timed out and you have to log in again, \n" +
                       $"or {input2}");
     return(Prompts.Abort());
 }
Beispiel #2
0
 /// <summary>
 /// Specialized error message when API.BuyBook method returns false.
 /// </summary>
 /// <returns>string</returns>
 public static string Error()
 {
     Console.Clear();
     Console.WriteLine("Something went wrong with the purchase! Either your session timed out and you have to log in again, \n" +
                       "or the book is out of stock. Are you sure you entered the correct book Id?");
     return(Prompts.Abort());
 }
 /// <summary>
 /// Prints message indicating that registration was unsuccessful.
 /// </summary>
 /// <returns>string</returns>
 public static string Error()
 {
     Console.Clear();
     Console.WriteLine("Something went wrong! Either the user name is already taken, or the password verification failed.");
     return(Prompts.Abort());
 }
Beispiel #4
0
 /// <summary>
 /// Prints error message when API.Login returns false.
 /// </summary>
 /// <returns>string</returns>
 public static string Error()
 {
     Console.Clear();
     Console.WriteLine("Something went wrong! Are you sure you typed in your user name and password correctly?");
     return(Prompts.Abort());
 }