Пример #1
0
 public ExecuteCommandViewLogs(IBasicActivateItems activator, ExternalDatabaseServer loggingServer, LogViewerFilter filter) : base(activator)
 {
     _filter         = filter ?? new LogViewerFilter(LoggingTables.DataLoadTask);
     _loggingServers = new ExternalDatabaseServer[] { loggingServer };
 }
Пример #2
0
 /// <summary>
 /// Constructor for explicitly specifying the container to import
 /// </summary>
 /// <param name="activator"></param>
 /// <param name="into"></param>
 /// <param name="explicitChoice"></param>
 public ExecuteCommandImportFilterContainerTree(IBasicActivateItems activator, IRootFilterContainerHost into, IContainer explicitChoice) : this(activator, into)
 {
     _explicitChoice = explicitChoice;
 }
Пример #3
0
 public ExecuteCommandAddNewCatalogueItem(IBasicActivateItems activator, Catalogue catalogue, ColumnInfoCombineable colInfo) : this(activator, catalogue, colInfo.ColumnInfos)
 {
 }
Пример #4
0
 public ExecuteCommandRename(IBasicActivateItems activator, INamed nameable, string newValue) : this(activator, nameable)
 {
     _newValue = newValue;
     _explicitNewValuePassed = true;
 }
Пример #5
0
        public ConsoleGuiRunPipeline(IBasicActivateItems activator, IPipelineUseCase useCase, IPipeline pipeline)
        {
            Modal          = true;
            this.activator = activator;
            this._useCase  = useCase;
            this._pipeline = pipeline;

            ColorScheme          = ConsoleMainWindow.ColorScheme;
            _compatiblePipelines = useCase.FilterCompatiblePipelines(activator.RepositoryLocator.CatalogueRepository.GetAllObjects <Pipeline>()).ToArray();

            Width  = Dim.Fill();
            Height = Dim.Fill();

            if (pipeline == null && _compatiblePipelines.Length == 1)
            {
                this._pipeline = _compatiblePipelines[0];
            }

            Add(_lblPipeline = new Label("Pipeline:" + (this._pipeline?.Name ?? "<<NOT SELECTED>>"))
            {
                Width = Dim.Fill() - 20
            });

            var btnChoose = new Button("Choose Pipeline")
            {
                X = Pos.Right(_lblPipeline)
            };

            btnChoose.Clicked += BtnChoose_Clicked;
            Add(btnChoose);

            var btnRun = new Button("Run")
            {
                Y = 1
            };

            btnRun.Clicked += BtnRun_Clicked;
            Add(btnRun);

            var btnCancel = new Button("Cancel")
            {
                Y = 1, X = Pos.Right(btnRun)
            };

            btnCancel.Clicked += BtnCancel_Clicked;
            Add(btnCancel);

            var btnClose = new Button("Close")
            {
                Y = 1, X = Pos.Right(btnCancel)
            };

            btnClose.Clicked += () => Application.RequestStop();
            Add(btnClose);

            Add(_tableView = new TableView()
            {
                Y = 2, Width = Dim.Fill(), Height = 7
            });
            _tableView.Style.ShowHorizontalHeaderOverline  = false;
            _tableView.Style.AlwaysShowHeaders             = true;
            _tableView.Style.ShowVerticalCellLines         = true;
            _tableView.Style.ShowHorizontalHeaderUnderline = false;

            progressDataTable = new DataTable();
            progressDataTable.Columns.Add("Name");
            progressDataTable.Columns.Add("Progress", typeof(int));

            _tableView.Table = progressDataTable;

            Add(_results = new ListView(this)
            {
                Y = Pos.Bottom(_tableView), Width = Dim.Fill(), Height = Dim.Fill()
            });
            _results.KeyPress += Results_KeyPress;
        }
Пример #6
0
        public ExecuteCommandMakePatientIndexTableIntoRegularCohortIdentificationSetAgain(IBasicActivateItems activator, AggregateConfigurationCombineable sourceAggregateCommand, CohortAggregateContainer targetCohortAggregateContainer) : base(activator)
        {
            _sourceAggregateCommand         = sourceAggregateCommand;
            _targetCohortAggregateContainer = targetCohortAggregateContainer;

            if (!_sourceAggregateCommand.CohortIdentificationConfigurationIfAny.Equals(_targetCohortAggregateContainer.GetCohortIdentificationConfiguration()))
            {
                SetImpossible("Aggregate belongs to a different CohortIdentificationConfiguration");
            }

            if (_sourceAggregateCommand.JoinableUsersIfAny.Any())
            {
                SetImpossible("The following Cohort Set(s) use this PatientIndex table:" + string.Join(",", _sourceAggregateCommand.JoinableUsersIfAny.Select(j => j.ToString())));
            }

            if (_targetCohortAggregateContainer.ShouldBeReadOnly(out string reason))
            {
                SetImpossible(reason);
            }
        }
Пример #7
0
 public ExecuteCommandAddAggregateConfigurationToCohortIdentificationSetContainer(IBasicActivateItems activator, AggregateConfigurationCombineable aggregateConfigurationCommand, CohortAggregateContainer targetCohortAggregateContainer) : base(activator)
 {
     _aggregateConfigurationCombineable = aggregateConfigurationCommand;
     _targetCohortAggregateContainer    = targetCohortAggregateContainer;
 }
        public ExecuteCommandViewFilterMatchData(IBasicActivateItems activator, IContainer container, ViewType viewType = ViewType.TOP_100) : this(activator, viewType)
        {
            _container = container;

            PopulateCandidates(container.GetCatalogueIfAny(), container);
        }
 protected ExecuteCommandViewFilterMatchData(IBasicActivateItems activator, ViewType viewType) : base(activator)
 {
     _viewType = viewType;
 }
Пример #10
0
 public ExampleDatasetsCreation(IBasicActivateItems activator, IRDMPPlatformRepositoryServiceLocator repos)
 {
     this._repos = repos;
     _activator  = activator;
 }
 /// <summary>
 /// Prepares checking of the given <paramref name="config"/>
 /// </summary>
 /// <param name="activator"></param>
 /// <param name="config"></param>
 public ExtractionConfigurationChecker(IBasicActivateItems activator, IExtractionConfiguration config)
 {
     _config    = config;
     _activator = activator;
 }
 /// <summary>
 /// Command for running a console gui UI.
 /// </summary>
 /// <param name="activator"></param>
 /// <param name="windowConstructor">Called only when/if the command is executed</param>
 public ExecuteCommandRunConsoleGuiView(IBasicActivateItems activator, Func <Window> windowConstructor) : base(activator)
 {
     this.windowConstructor = windowConstructor;
 }
Пример #13
0
 public ExecuteCommandAddCatalogueToCohortIdentificationAsPatientIndexTable(IBasicActivateItems activator, CohortIdentificationConfiguration configuration) : base(activator)
 {
     _configuration = configuration;
 }
 public ExecuteCommandCloneCohortIdentificationConfiguration(IBasicActivateItems activator) : base(activator)
 {
 }
 public ExecuteCommandCreateNewExtractionConfigurationForProject(IBasicActivateItems activator, Project project) : base(activator)
 {
     _project = project;
 }
 public ExecuteCommandCreateNewCatalogueByExecutingAnAggregateConfiguration(IBasicActivateItems activator, AggregateConfiguration ac) : base(activator)
 {
     _aggregateConfiguration = ac;
 }
Пример #17
0
 public ExecuteCommandFreezeCohortIdentificationConfiguration(IBasicActivateItems activator, CohortIdentificationConfiguration cic, bool desiredFreezeState) : base(activator)
 {
     _cic = cic;
     _desiredFreezeState = desiredFreezeState;
 }
Пример #18
0
 public ExecuteCommandSetGlobalDleIgnorePattern(IBasicActivateItems activator, string pattern) : base(activator)
 {
     this._pattern = pattern;
     //if pattern is null but this constructor is used then we shouldn't ask them again what they want
     _explicitPatternProvided = true;
 }
Пример #19
0
 public ExecuteCommandDescribeCommand(IBasicActivateItems activator,
                                      [DemandsInitialization("Command to describe", TypeOf = typeof(IAtomicCommand))]
                                      Type commandType) : base(activator)
 {
     _commandType = commandType;
 }
Пример #20
0
 /// <summary>
 /// Constructor for when we should prompt user in Gui for what the pattern should be if/when command is executed
 /// </summary>
 /// <param name="activator"></param>
 public ExecuteCommandSetGlobalDleIgnorePattern(IBasicActivateItems activator) : base(activator)
 {
 }
Пример #21
0
        /// <summary>
        /// Shortlists the output of <see cref="ScoreMatches(Dictionary{IMapsDirectlyToDatabaseTable, DescendancyList}, string, CancellationToken, List{Type})"/>
        /// producing a list of results up to the supplied length (<paramref name="take"/>).
        /// </summary>
        /// <param name="scores"></param>
        /// <param name="take"></param>
        /// <param name="activator"></param>
        /// <returns></returns>
        public List <IMapsDirectlyToDatabaseTable> ShortList(Dictionary <KeyValuePair <IMapsDirectlyToDatabaseTable, DescendancyList>, int> scores, int take, IBasicActivateItems activator)
        {
            var favourites = activator.FavouritesProvider.CurrentFavourites;

            return(scores.Where(score => score.Value > 0)
                   .OrderByDescending(score => score.Value)
                   .ThenByDescending(kvp => favourites.Any(f => f.IsReferenceTo(kvp.Key.Key))) // favour favourites
                   .ThenBy(kvp => kvp.Key.Key.ToString())                                      // sort ties alphabetically
                   .Take(take)
                   .Select(score => score.Key.Key)
                   .ToList());
        }
 public ExecuteCommandAddNewSupportingDocument(IBasicActivateItems activator, Catalogue catalogue) : base(activator)
 {
     _targetCatalogue = catalogue;
 }
Пример #23
0
 public BasicCommandExecution(IBasicActivateItems basicActivator)
 {
     this.BasicActivator = basicActivator;
 }
Пример #24
0
 public RunDataQualityEngineWindow(IBasicActivateItems activator, Catalogue c)
     : base(activator, () => GetCommand(c))
 {
 }
Пример #25
0
 /// <summary>
 /// Constructor for importing into a sub container
 /// </summary>
 /// <param name="activator"></param>
 /// <param name="into"></param>
 /// <param name="explicitChoice"></param>
 public ExecuteCommandImportFilterContainerTree(IBasicActivateItems activator, IContainer into, IContainer explicitChoice) : this(activator)
 {
     _intoSubContainer = into;
     _explicitChoice   = explicitChoice;
 }
        public ExecuteCommandAddAggregateConfigurationToCohortIdentificationSetContainer(IBasicActivateItems activator, AggregateConfigurationCombineable aggregateConfigurationCommand, CohortAggregateContainer targetCohortAggregateContainer) : base(activator)
        {
            _aggregateConfigurationCombineable = aggregateConfigurationCommand;
            _targetCohortAggregateContainer    = targetCohortAggregateContainer;

            if (targetCohortAggregateContainer.ShouldBeReadOnly(out string reason))
            {
                SetImpossible(reason);
            }
        }
 public FromActivateItemsToCheckNotifier(IBasicActivateItems basicActivator)
 {
     this.basicActivator = basicActivator;
 }
 public ExecuteCommandImportCatalogueItemDescription(IBasicActivateItems activator, CatalogueItem toPopulate) : base(activator)
 {
     _toPopulate = toPopulate;
 }
Пример #29
0
 /// <summary>
 /// Lazy constructor where the object to navigate to is not fetched until the command is definetly for sure running (see <see cref="Execute"/>)
 /// </summary>
 /// <param name="activator"></param>
 /// <param name="getObjectsFunc"></param>
 public ExecuteCommandShow(IBasicActivateItems activator, Func <IEnumerable <IMapsDirectlyToDatabaseTable> > getObjectsFunc) : base(activator)
 {
     _getObjectsFunc = getObjectsFunc;
 }
Пример #30
0
 public ExecuteCommandViewLogs(IBasicActivateItems activator) : this(activator, new LogViewerFilter(LoggingTables.DataLoadTask))
 {
 }