public void Pause()
{
// Throw if we are not running
if (_state == ProgressDialogState.Stopped)
throw new InvalidOperationException("Timer is not running.");
// Pause the timer
if (_state == ProgressDialogState.Running)
{
_nativeProgressDialog.Timer(PDTIMER.Pause, null);
_state = ProgressDialogState.Paused;
}
}