private void DataSetLoaderOnModelLoaded(object sender, PendingDataSet pendingDataSet)
 {
     PendingDataSets.Remove(pendingDataSet);
     if (pendingDataSet.Cancel == false)
     {
         DataSetModels.Add(pendingDataSet.Model);
         if (SelectedDataSet == null)
         {
             SelectedDataSet = DataSetModels.FirstOrDefault();
         }
     }
     else if (pendingDataSet.OutOfMemory)
     {
         NotifyUser.NotifyUserByNotification(new Notification()
         {
             Title     = "Ooops!",
             Message   = $"Your dataset '{pendingDataSet.DataSetName}' caused OutOfMemory exception. Please try to load smaller dataset of try load images in dataset in smaller scale.",
             Exception = pendingDataSet.ExceptionDescription
         });
     }
     else if (pendingDataSet.Exception)
     {
         NotifyUser.NotifyUserByMessage($"Something happend during loading {pendingDataSet.DataSetName} dataset.", pendingDataSet.ExceptionDescription);
     }
     OnPropertyChanged(nameof(AnyPendingDataSets));
     OnPropertyChanged(nameof(AnyLoadedDataSets));
 }
        public void LoadDataSet(IEnumerable <Dir> paDirs, DataSetModel paModel)
        {
            var pending = new PendingDataSet(paDirs, paModel);

            PendingDataSets.Add(pending);
            _dataSetLoader.RegisterDataSet(pending);
            OnPropertyChanged(nameof(AnyPendingDataSets));
        }
 public void CancelDataSetLoades(PendingDataSet paDataSet)
 {
     paDataSet.CancelLoading();
     OnPropertyChanged(nameof(AnyPendingDataSets));
 }