private void PromptForLinkedInterpretations(ReportingWorklistItemSummary item, out List <ReportingWorklistItemSummary> linkedItems, out List <ReportingWorklistItemSummary> candidateItems)
        {
            linkedItems    = new List <ReportingWorklistItemSummary>();
            candidateItems = new List <ReportingWorklistItemSummary>();

            // query server for link candidates
            var anonCandidates = new List <ReportingWorklistItemSummary>();             // cannot use out param in anonymous delegate.

            Platform.GetService <IProtocollingWorkflowService>(service =>
            {
                var linkableProtocolsResponse = service.GetLinkableProtocols(new GetLinkableProtocolsRequest(item.ProcedureStepRef));
                anonCandidates = linkableProtocolsResponse.ProtocolItems;
            });
            candidateItems.AddRange(anonCandidates);

            // if there are no candidates just return
            if (candidateItems.Count <= 0)
            {
                return;
            }

            // otherwise, prompt the user to select
            ResetChildComponents();

            var linkProceduresComponent = new LinkProceduresComponent(
                item, candidateItems, SR.TextLinkProtocolInstructions, SR.TextLinkProtocolHeading);

            if (LaunchAsDialog(this.Host.DesktopWindow, linkProceduresComponent, SR.TitleLinkProcedures) ==
                ApplicationComponentExitCode.Accepted)
            {
                linkedItems.AddRange(linkProceduresComponent.CheckedItems);
            }
        }
        /// <summary>
        /// Constructor
        /// </summary>
        public LinkProceduresComponentControl(LinkProceduresComponent component)
            : base(component)
        {
            InitializeComponent();

            _component = component;
            _sourceWorklistItem.Table = _component.SourceTable;
            _worklistItemTableView.Table = _component.CandidateTable;

            _instructionsLabel.Text = _component.Instructions;
            _heading.Text = _component.Heading;
        }
Example #3
0
        /// <summary>
        /// Constructor
        /// </summary>
        public LinkProceduresComponentControl(LinkProceduresComponent component)
            : base(component)
        {
            InitializeComponent();

            _component = component;
            _sourceWorklistItem.Table    = _component.SourceTable;
            _worklistItemTableView.Table = _component.CandidateTable;

            _instructionsLabel.Text = _component.Instructions;
            _heading.Text           = _component.Heading;
        }
        /// <summary>
        /// Constructor
        /// </summary>
        public LinkProceduresComponentControl(LinkProceduresComponent component)
            : base(component)
        {
            InitializeComponent();

            _component = component;
            _sourceWorklistItem.Table    = _component.SourceTable;
            _worklistItemTableView.Table = _component.CandidateTable;
            _worklistItemTableView.DataBindings.Add("Selection", _component, "CandidateTableSelection", true, DataSourceUpdateMode.OnPropertyChanged);

            _makePrimaryButton.DataBindings.Add("Enabled", _component, "MakePrimaryEnabled", true, DataSourceUpdateMode.OnPropertyChanged);

            _instructionsLabel.Text = _component.Instructions;
            _heading.Text           = _component.Heading;
        }
        /// <summary>
        /// Constructor
        /// </summary>
        public LinkProceduresComponentControl(LinkProceduresComponent component)
            : base(component)
        {
            InitializeComponent();

            _component = component;
            _sourceWorklistItem.Table = _component.SourceTable;
            _worklistItemTableView.Table = _component.CandidateTable;
            _worklistItemTableView.DataBindings.Add("Selection", _component, "CandidateTableSelection", true, DataSourceUpdateMode.OnPropertyChanged);

            _makePrimaryButton.DataBindings.Add("Enabled", _component, "MakePrimaryEnabled", true, DataSourceUpdateMode.OnPropertyChanged);

            _instructionsLabel.Text = _component.Instructions;
            _heading.Text = _component.Heading;
        }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (LinkProceduresComponent)component;
 }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (LinkProceduresComponent)component;
 }