Пример #1
0
 public ImportProcessor(ImportFromBitmapComponent parent, IEnumerable <string> paths)
 {
     _parent = parent;
     _paths  = paths;
     _waitShowProgressLock = new object();
     _showProgress         = false;
 }
        internal static void Launch(IDesktopWindow parent, IEnumerable <string> paths)
        {
            try
            {
                if (_activeProcessor != null)
                {
                    parent.ShowMessageBox(SR.MessageImportAlreadyRunning, MessageBoxActions.Ok);
                    return;
                }

                if (!LocalDataStoreActivityMonitor.IsConnected)
                {
                    parent.ShowMessageBox(SR.MessageLocalDataStoreServiceMustBeRunning, MessageBoxActions.Ok);
                    return;
                }

                if (null == CollectionUtils.FirstElement(GetFiles(paths)))
                {
                    parent.ShowMessageBox(SR.MessageNothingToImport, MessageBoxActions.Ok);
                    return;
                }

                ImportFromBitmapComponent component = new ImportFromBitmapComponent();
                if (ApplicationComponentExitCode.Accepted != LaunchAsDialog(parent, component, SR.TitleImportNonDicom))
                {
                    return;
                }

                _activeProcessor = new ImportProcessor(component, paths);
                _activeProcessor.Run();
            }
            catch (Exception e)
            {
                ExceptionHandler.Report(e, parent);
            }
        }
Пример #3
0
 public void Apply()
 {
     ImportFromBitmapComponent.Launch(this.Context.DesktopWindow, this.Context.SelectedPaths);
 }