private void CleanUp()
{
if (_nativeProgressDialog != null)
{
if (_state != ProgressDialogState.Stopped)
{
try {
_nativeProgressDialog.StopProgressDialog();
}
catch { }
}
Marshal.FinalReleaseComObject(_nativeProgressDialog);
_nativeProgressDialog = null;
}
_state = ProgressDialogState.Stopped;
}