예제 #1
0
        public SimpleComposerAdapterComponent(StudyComposerComponent composer)
        {
            _composer     = composer;
            _composerHost = new LocalComponentHost(this, _composer);

            // initialize data sources
            _listPatients    = new PatientCollection(composer.Patients);
            _selectedPatient = _listPatients.GetFirstPatient();

            if (_selectedPatient != null)
            {
                _listStudies = new StudyCollection(_selectedPatient.Studies);
            }
            else
            {
                _listStudies = new StudyCollection(null);
            }
            _selectedStudy = _listStudies.GetFirstStudy();

            if (_selectedStudy != null)
            {
                _listSeries = new SeriesCollection(_selectedStudy.Series);
            }
            else
            {
                _listSeries = new SeriesCollection(null);
            }
            _selectedSeries = _listSeries.GetFirstSeries();

            if (_selectedSeries != null)
            {
                _listImages = new ImageCollection(_selectedSeries.Images);
            }
            else
            {
                _listImages = new ImageCollection(null);
            }
            _selectedImage = _listImages.GetFirstImage();

            // create gallery components and hosts
            _gvPatients = new PatientGalleryComponent(_listPatients);
            _gvPatients.SelectionChanged += new EventHandler(PatientGallery_SelectionChanged);
            _gvPatientsHost = new LocalComponentHost(this, _gvPatients);

            _gvStudies = new StudyGalleryComponent(_listStudies);
            _gvStudies.SelectionChanged += new EventHandler(StudyGallery_SelectionChanged);
            _gvStudiesHost = new LocalComponentHost(this, _gvStudies);

            _gvSeries = new SeriesGalleryComponent(_listSeries);
            _gvSeries.SelectionChanged += new EventHandler(SeriesGallery_SelectionChanged);
            _gvSeriesHost = new LocalComponentHost(this, _gvSeries);

            _gvImages = new ImageGalleryComponent(_listImages);
            _gvImages.SelectionChanged += new EventHandler(ImageGallery_SelectionChanged);
            _gvImagesHost = new LocalComponentHost(this, _gvImages);
        }
예제 #2
0
 public StudyGalleryComponent(StudyCollection studies) : base(studies, "studies")
 {
 }