private void PortWatcher_EraseProgress(object sender, EraseProgressEventArgs e)
 {
     this.Dispatcher.Invoke(() =>
     {
         progressBar.Value = e.Progress;
     });
 }
        protected virtual void OnEraseProgress(EraseProgressEventArgs e)
        {
            EventHandler <EraseProgressEventArgs> eventHandler = EraseProgress;

            eventHandler?.Invoke(this, e);
        }