예제 #1
0
 /// <summary>
 /// Set active program error
 /// </summary>
 /// <param name="error"></param>
 /// <param name="comment"></param>
 public static void Error(XFILES_ERROR error, string comment)
 {
     c_CurrentError = error;
     AddToLog(error, comment);
     // prompt user of error
     if (c_bDisplayWindow) ErrorPrompt(error, comment);
 }
예제 #2
0
 /// <summary>
 /// Add a error entry to log
 /// </summary>
 /// <param name="entry"></param>
 private static void AddToLog(XFILES_ERROR error, string comment)
 {
     c_sErrorLog += System.DateTime.Now.ToString() + "\r\n";
     c_sErrorLog += "Error #" + c_iErrorCount++ + ":  " + error.ToString() + "\r\n";
     c_sErrorLog += comment + "\r\n";
 }
예제 #3
0
 /// <summary>
 /// Display message box containing error and comment
 /// </summary>
 /// <param name="error"></param>
 /// <param name="comment"></param>
 private static void ErrorPrompt(XFILES_ERROR error, string comment)
 {
     string sError = "Error - " + error.ToString() + "\r\n" + comment;
     System.Windows.Forms.MessageBox.Show(sError, error.ToString());
 }