public override void Start()
        {
            _delaySelectionTimer = new Timer(state => SetSelectedOrder(state as EntityRef), _initialSelectedOrderRef, 250);

            _orderDetailComponent   = new BiographyOrderDetailViewComponent();
            _visitDetailComponent   = new BiographyVisitDetailViewComponent();
            _orderReportsComponent  = new BiographyOrderReportsComponent();
            _orderDocumentComponent = new AttachedDocumentPreviewComponent(true, AttachmentSite.Order);

            _rightHandComponentContainer = new TabComponentContainer();
            _rightHandComponentContainer.Pages.Add(new TabPage("Order Details", _orderDetailComponent));

            if (new WorkflowConfigurationReader().EnableVisitWorkflow)
            {
                _rightHandComponentContainer.Pages.Add(new TabPage("Visit Details", _visitDetailComponent));
            }

            _rightHandComponentContainer.Pages.Add(new TabPage("Reports", _orderReportsComponent));
            _rightHandComponentContainer.Pages.Add(new TabPage("Order Attachments", _orderDocumentComponent));

            // instantiate all extension pages
            _extensionPages = new List <IBiographyOrderHistoryPage>();
            foreach (IBiographyOrderHistoryPageProvider pageProvider in new BiographyOrderHistoryPageProviderExtensionPoint().CreateExtensions())
            {
                _extensionPages.AddRange(pageProvider.GetPages(new BiographyOrderHistoryContext(this)));
            }

            // add extension pages to container and set initial context
            // the container will start those components if the user goes to that page
            foreach (var page in _extensionPages)
            {
                _rightHandComponentContainer.Pages.Add(new TabPage(page.Path, page.GetComponent()));
            }

            _rightHandComponentContainerHost = new ChildComponentHost(this.Host, _rightHandComponentContainer);
            _rightHandComponentContainerHost.StartComponent();

            LoadOrders();

            base.Start();
        }
Exemplo n.º 2
0
 internal BiographyOrderReportsToolContext(BiographyOrderReportsComponent component)
 {
     _component = component;
 }