protected override void OnFormClosed(FormClosedEventArgs e)
 {
     if (this.OverwriteDialog != null)
     {
         this.OverwriteDialog.Dispose();
     }
     this.OverwriteDialog = null;
     base.OnFormClosed(e);
 }
 private void BeforeCopyOverwritePrompt(object sender, BeforeCopyItemEventArgs e)
 {
     this.ChangeProgressState(ProgressState.Pause);
     this.ShowCopyItem();
     if (this.OverwriteDialog == null)
     {
         this.OverwriteDialog = new OverwritePromtDialog();
     }
     this.OverwriteDialog.Execute(this, e.Source, e.Dest);
     IOverwriteRule overwriteRule = this.OverwriteDialog.OverwriteRule;
     if (overwriteRule != null)
     {
         if (this.DefaultOverwriteRules == null)
         {
             this.DefaultOverwriteRules = new List<IOverwriteRule>();
         }
         this.DefaultOverwriteRules.Add(overwriteRule);
     }
     e.OverwriteResult = this.OverwriteDialog.OverwriteResult;
     e.NewName = this.OverwriteDialog.NewName;
     if (e.OverwriteResult != OverwriteDialogResult.Abort)
     {
         this.ChangeProgressState(ProgressState.Normal);
     }
 }