private void ButtonClick(object sender, RoutedEventArgs e)
 {
     var button = (Button)sender;
     switch (button.Name)
     {
         case "Retry":
             Result = new TransferErrorDialogResult(ErrorResolutionBehavior.Retry);
             break;
         case "Skip":
             Result = new TransferErrorDialogResult(ErrorResolutionBehavior.Skip);
             break;
         case "SkipAll":
             Result = new TransferErrorDialogResult(ErrorResolutionBehavior.Skip, CopyActionScope.All);
             break;
         case "Cancel":
             Result = new TransferErrorDialogResult(ErrorResolutionBehavior.Cancel);
             break;
     }
     DialogResult = true;
     Close();
 }
 private void ButtonClick(object sender, RoutedEventArgs e)
 {
     var button = (Button)sender;
     switch (button.Name)
     {
         case "Overwrite":
             Result = new TransferErrorDialogResult(ErrorResolutionBehavior.Retry, CopyActionScope.Current, CopyAction.Overwrite);
             break;
         case "OverwriteAll":
             Result = new TransferErrorDialogResult(ErrorResolutionBehavior.Retry, CopyActionScope.All, CopyAction.Overwrite);
             break;
         case "OverwriteAllOlder":
             Result = new TransferErrorDialogResult(ErrorResolutionBehavior.Retry, CopyActionScope.All, CopyAction.OverwriteOlder);
             break;
         case "Resume":
             Result = new TransferErrorDialogResult(ErrorResolutionBehavior.Retry, CopyActionScope.Current, CopyAction.Resume);
             break;
         case "ResumeAll":
             Result = new TransferErrorDialogResult(ErrorResolutionBehavior.Retry, CopyActionScope.All, CopyAction.Resume);
             break;
         case "Rename":
             Result = new TransferErrorDialogResult(ErrorResolutionBehavior.Rename);
             break;
         case "Skip":
             Result = new TransferErrorDialogResult(ErrorResolutionBehavior.Skip);
             break;
         case "SkipAll":
             Result = new TransferErrorDialogResult(ErrorResolutionBehavior.Skip, CopyActionScope.All);
             break;
         case "Cancel":
             Result = new TransferErrorDialogResult(ErrorResolutionBehavior.Cancel);
             break;
     }
     DialogResult = true;
     Close();
     _eventAggregator.GetEvent<ViewModelGeneratedEvent>().Unsubscribe(ViewModelGenerated);
 }