Example #1
0
        private static IApplicationComponent BuildComponent()
        {
            PatientSearchComponent searchComponent  = new PatientSearchComponent();
            PreviewComponent       previewComponent = new PreviewComponent();

            searchComponent.SelectedProfileChanged += delegate
            {
                previewComponent.PatientProfile = (PatientProfileSummary)searchComponent.SelectedProfile.Item;
            };

            SplitComponentContainer splitComponent = new SplitComponentContainer(SplitOrientation.Vertical);

            splitComponent.Pane1 = new SplitPane("Search", searchComponent, 1.0f);
            splitComponent.Pane2 = new SplitPane("Preview", previewComponent, 1.0f);

            return(splitComponent);
        }
        public static DicomExplorerComponent Create()
        {
            var serverTreeComponent = new ServerTreeComponent {
                ShowLocalServerNode = StudyStore.IsSupported
            };

            bool hasEditPermission = PermissionsHelper.IsInRole(AuthorityTokens.Configuration.MyServers);

            serverTreeComponent.IsReadOnly = !hasEditPermission;

            var studyBrowserComponent
                = CreateComponentFromExtensionPoint <StudyBrowserComponentExtensionPoint, IStudyBrowserComponent>()
                  ?? new StudyBrowserComponent();

            serverTreeComponent.SelectedServerChanged +=
                delegate { studyBrowserComponent.SelectedServers = serverTreeComponent.SelectedServers; };

            var searchPanelComponent
                = CreateComponentFromExtensionPoint <SearchPanelComponentExtensionPoint, ISearchPanelComponent>()
                  ?? new SearchPanelComponent();

            SelectPriorsServerNode(serverTreeComponent);

            var leftPane  = new SplitPane(SR.TitleServerTreePane, serverTreeComponent, 0.25f);
            var rightPane = new SplitPane(SR.TitleStudyBrowserPane, studyBrowserComponent, 0.75f);

            var bottomContainer =
                new SplitComponentContainer(
                    leftPane,
                    rightPane,
                    SplitOrientation.Vertical);

            var topPane    = new SplitPane(SR.TitleSearchPanelPane, searchPanelComponent, true);
            var bottomPane = new SplitPane(SR.TitleStudyNavigatorPane, bottomContainer, false);

            var component = new DicomExplorerComponent(topPane, bottomPane)
            {
                _studyBrowserComponent = studyBrowserComponent,
                _searchPanelComponent  = searchPanelComponent,
                _serverTreeComponent   = serverTreeComponent
            };

            return(component);
        }
		public HomePageContainer(List<IFolderSystem> folderSystems, IPreviewComponent preview)
			: base(SplitOrientation.Vertical)
		{
			_folderContentComponent = new FolderContentsComponent();
			_folderSystemGroup = new FolderExplorerGroupComponent(folderSystems, _folderContentComponent);

			// Construct the default content view
			_previewComponent = preview;
			_defaultContentComponent = new SplitComponentContainer(
				new SplitPane("FolderItems", _folderContentComponent, 0.4f),
				new SplitPane("ItemPreview", _previewComponent, 0.6f),
				SplitOrientation.Vertical);

			_contentArea = new StackedComponentContainer();
			_contentArea.Show(_defaultContentComponent);

			this.Pane1 = new SplitPane("Folders", _folderSystemGroup, 0.2f);
			this.Pane2 = new SplitPane("Contents", _contentArea, 0.8f);
		}
Example #4
0
        public HomePageContainer(List <IFolderSystem> folderSystems, IPreviewComponent preview)
            : base(SplitOrientation.Vertical)
        {
            _folderContentComponent = new FolderContentsComponent();
            _folderSystemGroup      = new FolderExplorerGroupComponent(folderSystems, _folderContentComponent);

            // Construct the default content view
            _previewComponent        = preview;
            _defaultContentComponent = new SplitComponentContainer(
                new SplitPane("FolderItems", _folderContentComponent, 0.4f),
                new SplitPane("ItemPreview", _previewComponent, 0.6f),
                SplitOrientation.Vertical);

            _contentArea = new StackedComponentContainer();
            _contentArea.Show(_defaultContentComponent);

            this.Pane1 = new SplitPane("Folders", _folderSystemGroup, 0.2f);
            this.Pane2 = new SplitPane("Contents", _contentArea, 0.8f);
        }
Example #5
0
        public SplitComponentContainerControl(SplitComponentContainer component)
        {
            _component = component;

            _vertical  = _component.SplitOrientation == SplitOrientation.Vertical;
            _resetting = false;

            SplitPane pane1 = _component.Pane1;
            SplitPane pane2 = _component.Pane2;

            Control control1 = (Control)pane1.ComponentHost.ComponentView.GuiElement;

            control1.Dock = DockStyle.Fill;

            Control control2 = (Control)pane2.ComponentHost.ComponentView.GuiElement;

            control2.Dock = DockStyle.Fill;

            control1.FontChanged += ContainedControlFontChanged;
            control2.FontChanged += ContainedControlFontChanged;

            InitializeComponent();

            // assemble the split container control
            _splitContainer.Orientation = _vertical ? Orientation.Vertical : Orientation.Horizontal;
            _splitContainer.Panel1.Controls.Add(control1);
            _splitContainer.Panel2.Controls.Add(control2);

            if (!PaneFixed)
            {
                // initialize the split ratio
                _splitRatio = pane1.Weight / (pane1.Weight + pane2.Weight);
            }
            else
            {
                FixPane();
            }

            // initialize the splitter distance
            ResetSplitterDistance();
        }
		public SplitComponentContainerControl(SplitComponentContainer component)
		{
			_component = component;

			_vertical = _component.SplitOrientation == SplitOrientation.Vertical;
			_resetting = false;

			SplitPane pane1 = _component.Pane1;
			SplitPane pane2 = _component.Pane2;

			Control control1 = (Control)pane1.ComponentHost.ComponentView.GuiElement;
            control1.Dock = DockStyle.Fill;

            Control control2 = (Control)pane2.ComponentHost.ComponentView.GuiElement;
			control2.Dock = DockStyle.Fill;

			control1.FontChanged += ContainedControlFontChanged;
			control2.FontChanged += ContainedControlFontChanged;

			InitializeComponent();

			// assemble the split container control
			_splitContainer.Orientation = _vertical ? Orientation.Vertical : Orientation.Horizontal;
			_splitContainer.Panel1.Controls.Add(control1);
			_splitContainer.Panel2.Controls.Add(control2);

			if (!PaneFixed)
			{
				// initialize the split ratio
				_splitRatio = pane1.Weight / (pane1.Weight + pane2.Weight);
			}
			else
			{
				FixPane();
			}

			// initialize the splitter distance
            ResetSplitterDistance();
		}
		public void SetComponent(IApplicationComponent component)
		{
			_component = (SplitComponentContainer)component;
		}
 public void SetComponent(IApplicationComponent component)
 {
     _component = (SplitComponentContainer)component;
 }