Ejemplo n.º 1
0
 /// <summary>
 /// Displays a failed to connect message and asks the user if to keep trying.
 /// </summary>
 /// <param name="attemptCount">Number of unsuccessful attempts</param>
 /// <returns>True if the user wants to continue. False if the user does not.</returns>
 private static bool ConfirmContinue(int attemptCount)
 {
     return(MessageBox.Show($"Connecting to the database failed {attemptCount} times.\n" +
                            "Details can be found in \n" +
                            $"{LogFunctions.GetLogFileName()}\n" +
                            "Would you like to keep trying?",
                            "Connection to Database Failed",
                            MessageBoxButtons.YesNo) == DialogResult.Yes);
 }