/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="parentHost">The object that hosts the <paramref name="childComponent"/>'s parent component.</param>
		/// <param name="childComponent">The child application component being hosted.</param>
        public ChildComponentHost(IApplicationComponentHost parentHost, IApplicationComponent childComponent)
            : base(childComponent)
        {
            Platform.CheckForNullReference(parentHost, "parentHost");

            _parentHost = parentHost;
        }
Esempio n. 2
0
		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="path">The path to this page in the navigation tree.</param>
		/// <param name="component">The application component to be displayed by this page</param>
		public NavigatorPage(Path path, IApplicationComponent component)
			:base(component)
    	{
			Platform.CheckForNullReference(path, "path");

			_path = path;
    	}
Esempio n. 3
0
		/// <summary>
        /// Constructor.
        /// </summary>
		/// <param name="name">The name of the <see cref="SplitPane"/>.</param>
		/// <param name="component">The <see cref="IApplicationComponent"/> to be hosted.</param>
		/// <param name="initialWeight">The initial weighting factor for determing the <see cref="SplitPane"/>'s initial size.</param>
		public SplitPane(string name, IApplicationComponent component, float initialWeight)
        {
            _name = name;
            _component = component;
            _weight = initialWeight;
			_fixed = false;
        }
Esempio n. 4
0
		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="name">The name of the <see cref="SplitPane"/>.</param>
		/// <param name="component">The <see cref="IApplicationComponent"/> to be hosted.</param>
		/// <param name="fix">Whether or not the pane should be fixed (based on size).  Only one of the two <see cref="SplitPane"/>s can be fixed.</param>
		public SplitPane(string name, IApplicationComponent component, bool fix)
		{
			_name = name;
			_component = component;
			_weight = 0F;
			_fixed = fix;
		}
            /// <summary>
            /// Contruct the contained sub host with the <see cref="ApplicationComponentContainer"/>
            /// owner that will provide access to the real host.  The contained component is passed
            /// to the base <see cref="ApplicationComponentHost"/>.
            /// </summary>
            /// <param name="owner"></param>
            /// <param name="component"></param>
            public ContainedComponentHost(
                ApplicationComponentContainer owner,
                IApplicationComponent component)
                : base(component)
            {
                Platform.CheckForNullReference(owner, "owner");

                _owner = owner;
            }
Esempio n. 6
0
		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="name">The name of the page.</param>
		/// <param name="component">The <see cref="IApplicationComponent"/> to be hosted in this page.</param>
		/// <param name="title">The text to display on the title bar.</param>
		/// <param name="iconSet">The icon to display on the title bar.</param>
		/// <param name="fallbackResolver">Resource resolver to fall back on in case the default failed to find resources.</param>
		public StackTabPage(string name, 
			IApplicationComponent component, 
			string title, 
			IconSet iconSet,
			IResourceResolver fallbackResolver)
			: base(name, component)
		{
			_title = title;
			_iconSet = iconSet;
			_resourceResolver = new ApplicationThemeResourceResolver(typeof(StackTabPage).Assembly, fallbackResolver);
		}
Esempio n. 7
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="dialogBox"></param>
        /// <param name="owner"></param>
        protected internal DialogBoxView(DialogBox dialogBox, DesktopWindowView owner)
        {
            IApplicationComponentView componentView = dialogBox.ComponentView;

            // cache the app component - we'll need it later to get the ExitCode
            _component = (IApplicationComponent)dialogBox.Component;

            _form = CreateDialogBoxForm(dialogBox, (Control)componentView.GuiElement);
            _form.FormClosing += new FormClosingEventHandler(_form_FormClosing);

            _owner = owner.DesktopForm;
        }
Esempio n. 8
0
		/// <summary>
		/// Gets the concatenation of all error strings, based on the results of all
		/// <see cref="IValidationRule"/>s in the set.
		/// </summary>
		public string GetErrorsString(IApplicationComponent component)
		{
			List<IValidationRule> brokenRules = _rules.FindAll(
				delegate(IValidationRule r) { return r.GetResult(component).Success == false; });

			return StringUtilities.Combine(brokenRules, "\n",
				delegate(IValidationRule r)
				{
					return string.Format("{0}: {1}",
						r.PropertyName,
						StringUtilities.Combine(r.GetResult(component).Messages, ", "));
				});
		}
Esempio n. 9
0
        /// <summary>
        /// Constructor
        /// </summary>
        public HtmlComponentControl(IApplicationComponent component, ActiveTemplate template)
        {
            InitializeComponent();

            _component = component;
            _template = template;
#if DEBUG
            _webBrowser.IsWebBrowserContextMenuEnabled = true;
#else
            _webBrowser.IsWebBrowserContextMenuEnabled = false;
#endif

            _component.AllPropertiesChanged += AllPropertiesChangedEventHandler;
            this.Disposed += new EventHandler(DisposedEventHandler);
            ReloadPage();
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="component"></param>
        public ApplicationComponentUserControl(IApplicationComponent component)
        {
            InitializeComponent();

            _errorProvider.DataSource = component;
            component.ValidationVisibleChanged += ValidationVisibleChangedEventHandler;

            if (component is ApplicationComponent)
            {
                ActionModelNode menuModel = ((ApplicationComponent)component).MetaContextMenuModel;
                if (menuModel != null)
                {
                    ToolStripBuilder.BuildMenu(_contextMenu.Items, menuModel.ChildNodes);
                }
            }
        }
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (MemoryAnalysisComponent)component;
 }
Esempio n. 12
0
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (AIMSearchCriteriaComponent)component;
 }
Esempio n. 13
0
 public void SetComponent(IApplicationComponent component)
 {
     _component = (WorklistDetailEditorComponent)component;
 }
Esempio n. 14
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="args">Creation args for the dialog box.</param>
        /// <param name="desktopWindow">The <see cref="DesktopWindow"/> that owns the dialog box.</param>
        protected internal DialogBox(DialogBoxCreationArgs args, DesktopWindow desktopWindow)
            :base(args)
        {
            _component = args.Component;
            _dialogSize = args.SizeHint;
            _size = args.Size;
        	_allowUserResize = args.AllowUserResize;
            _desktopWindow = desktopWindow;

			_host = new Host(this, _component);
		}
 public void SetComponent(IApplicationComponent component)
 {
     _component = (ProcedureTypeGroupEditorComponent)component;
 }
      protected KdbAppComponent(IApplicationComponent director) : base(director)
      {

      }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (VolumeComponent)component;
 }
Esempio n. 18
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="path">The path to this page in the navigation tree.</param>
 /// <param name="component">The application component to be displayed by this page</param>
 public NavigatorPage(string path, IApplicationComponent component)
     : this(new Path(path, new ResourceResolver(new [] { component.GetType().Assembly })), component)
 {
 }
Esempio n. 19
0
 public void SetComponent(IApplicationComponent component)
 {
     _component = (SimpleComposerAdapterComponent)component;
 }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (PresetVoiLutOperationsComponentContainer)component;
 }
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (DepartmentEditorComponent)component;
 }
Esempio n. 22
0
        /// <summary>
        /// Called by the framework when the user clicks the "apply" menu item or toolbar button.
        /// </summary>
        public void SeriesQuery()
        {
            string            callingAE  = ServerTree.GetClientAETitle();
            List <SeriesItem> SeriesList = new List <SeriesItem>();

            #region remote datastore
            // If remote data store, need to query server for series level information
            if (!this.Context.SelectedServerGroup.IsLocalDatastore)
            {
                // Loop through all selected servers
                foreach (Server node in this.Context.SelectedServerGroup.Servers)
                {
                    DicomAttributeCollection dicomAttributeCollection = new DicomAttributeCollection();
                    // Query on "Series" Level
                    dicomAttributeCollection[DicomTags.QueryRetrieveLevel].SetStringValue("SERIES");

                    string studyUID = this.Context.SelectedStudies[0].StudyInstanceUid;
                    dicomAttributeCollection[DicomTags.StudyInstanceUid].SetStringValue(studyUID);
                    dicomAttributeCollection[DicomTags.SeriesDescription].SetNullValue();
                    dicomAttributeCollection[DicomTags.SeriesInstanceUid].SetNullValue();
                    dicomAttributeCollection[DicomTags.SeriesNumber].SetNullValue();
                    dicomAttributeCollection[DicomTags.Modality].SetNullValue();
                    dicomAttributeCollection[DicomTags.Date].SetNullValue();
                    dicomAttributeCollection[DicomTags.Time].SetNullValue();
                    dicomAttributeCollection[DicomTags.RepetitionTime].SetNullValue();

                    IList <DicomAttributeCollection> resultsList;
                    StudyRootFindScu findScu    = new StudyRootFindScu();
                    List <string>    seriesUIDs = new List <string>();

                    resultsList = findScu.Find(
                        callingAE,
                        node.AETitle,
                        node.Host,
                        node.Port,
                        dicomAttributeCollection);

                    findScu.CloseAssociation();
                    findScu.Dispose();

                    foreach (DicomAttributeCollection msg in resultsList)
                    {
                        string text = msg[DicomTags.SeriesInstanceUid];
                        Platform.Log(LogLevel.Info, text);

                        SeriesItem series = new SeriesItem();

                        series.SeriesNumber      = msg[DicomTags.SeriesNumber];
                        series.SeriesDescription = msg[DicomTags.SeriesDescription];
                        series.StudyInstanceUID  = msg[DicomTags.StudyInstanceUid];
                        series.SeriesInstanceUID = msg[DicomTags.SeriesInstanceUid];
                        series.Modality          = msg[DicomTags.Modality];
                        series.Date = msg[DicomTags.Date];
                        series.Time = msg[DicomTags.Time];
                        //series.NumberOfSeriesRelatedInstances = int.Parse(msg[DicomTags.NumberOfSeriesRelatedInstances].ToString());
                        SeriesList.Add(series);
                    }
                    _component     = new SeriesBrowserComponent(SeriesList, node);
                    _shelf         = ApplicationComponent.LaunchAsShelf(this.Context.DesktopWindow, _component, "Series Browser", ShelfDisplayHint.DockBottom | ShelfDisplayHint.DockAutoHide);
                    _shelf.Closed += Shelf_Closed;
                }
            }
            #endregion

            #region Local Datastore
            // If local datastore, can obtain series information by building study tree
            else
            {
                IImageViewer viewer    = new ImageViewerComponent();
                StudyTree    studyTree = viewer.StudyTree;

                // Add selected objects studies to study tree
                foreach (StudyItem selectedstudy in this.Context.SelectedStudies)
                {
                    string studyUID     = selectedstudy.StudyInstanceUid;
                    int    numberOfSops = LocalStudyLoader.Start(new StudyLoaderArgs(studyUID, null));
                    for (int i = 0; i < numberOfSops; ++i)
                    {
                        Sop imageSop = LocalStudyLoader.LoadNextSop();
                        studyTree.AddSop(imageSop);
                    }
                }

                foreach (Patient patient in studyTree.Patients)
                {
                    foreach (Study study in patient.Studies)
                    {
                        foreach (Series series in study.Series)
                        {
                            SeriesItem seriesitem = new SeriesItem();

                            seriesitem.SeriesNumber      = series.SeriesNumber.ToString();
                            seriesitem.SeriesDescription = series.SeriesDescription;
                            seriesitem.StudyInstanceUID  = study.StudyInstanceUid;
                            seriesitem.SeriesInstanceUID = series.SeriesInstanceUid;
                            seriesitem.Modality          = series.Modality;
                            seriesitem.Date = series.SeriesDate;
                            seriesitem.Time = series.SeriesTime;
                            //series.NumberOfSeriesRelatedInstances = int.Parse(msg[DicomTags.NumberOfSeriesRelatedInstances].ToString());
                            seriesitem.NumberOfSeriesRelatedInstances = series.Sops.Count.ToString();

                            SeriesList.Add(seriesitem);
                        }
                        _component     = new SeriesBrowserComponent(SeriesList, null);
                        _shelf         = ApplicationComponent.LaunchAsShelf(this.Context.DesktopWindow, _component, DicomDataFormatHelper.PersonNameFormatter(patient.PatientsName), ShelfDisplayHint.DockBottom | ShelfDisplayHint.DockAutoHide);
                        _shelf.Closed += Shelf_Closed;
                    }
                }
            }
            #endregion
        }
Esempio n. 23
0
 public void SetComponent(IApplicationComponent component)
 {
     _component = (UnmergeOrderComponent)component;
 }
Esempio n. 24
0
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (ExternalPractitionerMergeSelectedDuplicateComponent)component;
 }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (OrderEditorComponent)component;
 }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (ExternalPractitionerContactPointSummaryComponent)component;
 }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (PhoneNumberEditorComponent)component;
 }
Esempio n. 28
0
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (AtsConfigurationComponent)component;
 }
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (AimAnnotationComponent)component;
 }
Esempio n. 30
0
			internal Host(Workspace workspace, IApplicationComponent component)
				: base(component)
			{
				Platform.CheckForNullReference(workspace, "workspace");
				_workspace = workspace;
			}
 public void SetComponent(IApplicationComponent component)
 {
     _component = (CommandHistoryComponent)component;
 }
		/// <summary>
		/// Called by the host to assign this view to a component.
		/// </summary>
		public void SetComponent(IApplicationComponent component)
		{
			_component = (DiagnosticServiceEditorComponent)component;
		}
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (TranscriptionComponent)component;
 }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (ReconciliationConfirmComponent)component;
 }
 public OracleCanonicalDataStore(IApplicationComponent director, string cs) : base(director, cs)
 {
 }
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (AIMTCGAComponent)component;
 }
 public OracleCanonicalDataStore(IApplicationComponent director) : base(director)
 {
 }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (DefaultCodeEditorComponent)component;
 }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (MonitorConfigurationApplicationComponent)component;
 }
Esempio n. 40
0
 public CompositeDaemon(IApplicationComponent director) : base(director)
 {
 }
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (RenameStudyComponent)component;
 }
Esempio n. 42
0
 public void SetComponent(IApplicationComponent component)
 {
     _component = (DefaultCodeEditorComponent)component;
 }
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (PerformanceAnalysisComponent)component;
 }
Esempio n. 44
0
        private void listOne(StringBuilder sb, IEnumerable <IApplicationComponent> all, IApplicationComponent cmp, int level)
        {
            if (level > 7)
            {
                return;   //cyclical ref
            }
            var sp   = level <= 0?string.Empty : string.Empty.PadLeft(level * 3);
            var pfx0 = sp + "<f color=darkgray>├▌";
            var pfx  = sp + "<f color=darkgray>├─";
            var pfxL = sp + "<f color=darkgray>└─";


            sb.AppendLine(pfx0 + "<f color={0}>SID: <f color=yellow>{1:D4} <f color=gray>{2} <f color=magenta>{3} <f color=green>{4} "
                          .Args(
                              level == 0 ? "white" : level > 1 ? "darkcyan" : "cyan",
                              cmp.ComponentSID,
                              Cmdlets.App.DetailedComponentDateTime(cmp.ComponentStartTime),
                              cmp.ComponentCommonName,
                              (cmp is INamed ? ((INamed)cmp).Name : "")));

            if (cmp.ComponentDirector != null && !(cmp.ComponentDirector is ApplicationComponent))
            {
                sb.AppendLine(pfx + "<f color=gray>Director: <f color=blue>" + cmp.ComponentDirector.GetType().FullName);
            }

            sb.AppendLine(pfxL + "<f color=gray>{0} <f color=darkgray>{1}".Args(cmp.GetType().FullName, System.IO.Path.GetFileName(cmp.GetType().Assembly.Location)));



            var children = all.Where(c => object.ReferenceEquals(c.ComponentDirector, cmp));

            foreach (var child in children)
            {
                listOne(sb, all, child, level + 1);
            }

            if (level == 0)
            {
                sb.AppendLine();
            }
        }
Esempio n. 45
0
 public void SetComponent(IApplicationComponent component)
 {
     _component = (AlertViewerComponent)component;
 }
Esempio n. 46
0
 public MongoDbDataStore(IApplicationComponent director) : base(director) => ctor();
		public void SetComponent(IApplicationComponent component)
		{
			_component = (ReportingMppsDocumentationComponent)component;
		}
 internal HostImplementation(ApplicationComponentContainer owner, IApplicationComponent component)
     : base(owner, component)
 {
 }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (AddressEditorComponent)component;
 }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (DowntimePrintFormsComponent)component;
 }
Esempio n. 51
0
			internal Host(DialogBox owner, IApplicationComponent component)
				: base(component)
			{
				Platform.CheckForNullReference(owner, "owner");
				_owner = owner;
			}
Esempio n. 52
0
 public void SetComponent(IApplicationComponent component)
 {
     _component = (PriorReportComponent)component;
 }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (ContactPersonEditorComponent)component;
 }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (DicomServerEditComponent)component;
 }
		public void SetComponent(IApplicationComponent component)
		{
			_component = (ThumbnailsConfigurationComponent) component;
		}
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (StaffSelectionComponent)component;
 }
		public void SetComponent(IApplicationComponent component)
		{
			_component = (GalleryComponent) component;
		}
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (AimAnnotationDetailsComponent)component;
 }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (ExternalPractitionerContactPointDetailsEditorComponent)component;
 }
Esempio n. 60
0
 public void SetComponent(IApplicationComponent component)
 {
     _component = (PhoneNumberEditorComponent)component;
 }