示例#1
0
文件: Program.cs 项目: yarivat/Admin
 static void backup_BackupEnded(object sender, BackupEndedEventArgs e)
 {
     if (backupArgs.WriteToConsole)
     {
         Console.WriteLine(e.ToString());
     }
     if (backupArgs.SendEmailOnSuccess && e.Success)
     {
         Send(backupArgs.Emails, "Backup Ended", e.ToString());
     }
     else if (backupArgs.SendEmailOnFailure && !e.Success)
     {
         Send(backupArgs.Emails, "Backup Ended with Failures", e.ToString() + Environment.NewLine + Environment.NewLine + e.GetExceptionsReport());
     }
 }
示例#2
0
 private void backup_BackupEnded(object sender, BackupEndedEventArgs e)
 {
     MessageBox.Show(e.ToString());
 }