internal ProgressDialogController(ProgressDialog dialog, Func<Task> closeCallBack)
{
this.WrappedDialog = dialog;
this.CloseCallback = closeCallBack;
this.IsOpen = dialog.IsVisible;
this.WrappedDialog.Invoke(() => { this.WrappedDialog.PART_NegativeButton.Click += this.PART_NegativeButton_Click; });
dialog.CancellationToken.Register(() => { this.PART_NegativeButton_Click(null, new RoutedEventArgs()); });
}