public void CloseLoadingDialog()
 {
     if (_dialog != null)
     {
         _dialog.Close();
         _dialog = null;
         _vm     = null;
     }
 }
 public void OpenLoadingDialog()
 {
     if (_dialog == null)
     {
         _vm     = new LoadingDialogViewModel();
         _dialog = new LoadingDialogWindow()
         {
             DataContext = _vm
         };
         _dialog.ShowDialog();
     }
 }