private void CancelButton_Click(object sender, EventArgs e)
{
if (this.registrationData.CurrentOperation != null && this.registrationData.CurrentOperation.CanCancel)
{
this.registrationData.CurrentOperation.Cancel();
}
else
{
this.parentWindow.Close();
}
}
}