/// <summary>
        /// Called by the framework when the user clicks the "apply" menu item or toolbar button.
        /// </summary>
        public void Apply()
        {
            if (ComponentShelf == null)
            {
                try
                {
                    IDesktopWindow desktopWindow = this.Context.DesktopWindow;

                    IShelf shelf = AimAnnotationDetailsComponent.Launch(desktopWindow);
                    shelf.Closed += delegate
                    {
                        _shelves.Remove(desktopWindow);
                    };

                    _shelves[Context.DesktopWindow] = shelf;
                }
                catch (Exception e)
                {
                    ExceptionHandler.Report(e, Context.DesktopWindow);
                }
            }
            else
            {
                ComponentShelf.Show();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public AimAnnotationDetailsComponentControl(AimAnnotationDetailsComponent component)
            : base(component)
        {
            _component = component;
            InitializeComponent();

            BindingSource bindingSource = new BindingSource();

            bindingSource.DataSource = _component;

            // TODO add .NET databindings to bindingSource
            _tboxCalculations.DataBindings.Add("Lines", bindingSource, "CalculationDescriptions", true, DataSourceUpdateMode.OnPropertyChanged);
            _infoTabs.DataBindings.Add("Visible", bindingSource, "IsImageViewerActive", true, DataSourceUpdateMode.OnPropertyChanged);

            this._tabAnatomicEntities.SuspendLayout();
            this._tabImagingObservations.SuspendLayout();
            this._infoTabs.SuspendLayout();
            this.SuspendLayout();

            // Anatomic Entities
            _anatomicEntitiesDetailsControl               = new AimCodeSequenceDetailsControl(component, "AnatomicEntities");
            this._anatomicEntitiesDetailsControl.Dock     = DockStyle.Fill;
            this._anatomicEntitiesDetailsControl.Location = new Point(3, 3);
            this._anatomicEntitiesDetailsControl.Name     = "_anatomicEntitiesDetailsControl";
            this._anatomicEntitiesDetailsControl.Size     = new Size(543, 458);
            this._anatomicEntitiesDetailsControl.TabIndex = 0;
            this._tabAnatomicEntities.Controls.Add(_anatomicEntitiesDetailsControl);

            _imagingObsDetailsControl               = new AimCodeSequenceDetailsControl(component, "ImagingObservations");
            this._imagingObsDetailsControl.Dock     = DockStyle.Fill;
            this._imagingObsDetailsControl.Location = new Point(3, 3);
            this._imagingObsDetailsControl.Name     = "_imagingObsDetailsControl";
            this._imagingObsDetailsControl.Size     = new Size(543, 458);
            this._imagingObsDetailsControl.TabIndex = 0;
            this._tabImagingObservations.Controls.Add(_imagingObsDetailsControl);

            this._wbDetails.DataBindings.Add("DocumentText", bindingSource, "AllDetailsHtml", true, DataSourceUpdateMode.OnPropertyChanged);
            DisableClickSounds();             // no annoying "click" sound when databinding is in progress for the WebBrowser

            this._tabAnatomicEntities.ResumeLayout(false);
            this._tabImagingObservations.ResumeLayout(false);
            this._infoTabs.ResumeLayout(false);
            this.ResumeLayout(false);
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        public AimAnnotationDetailsComponentControl(AimAnnotationDetailsComponent component)
            : base(component)
        {
            _component = component;
            InitializeComponent();

            BindingSource bindingSource = new BindingSource();
            bindingSource.DataSource = _component;

            // TODO add .NET databindings to bindingSource
            _tboxCalculations.DataBindings.Add("Lines", bindingSource, "CalculationDescriptions", true, DataSourceUpdateMode.OnPropertyChanged);
            _infoTabs.DataBindings.Add("Visible", bindingSource, "IsImageViewerActive", true, DataSourceUpdateMode.OnPropertyChanged);

            this._tabAnatomicEntities.SuspendLayout();
            this._tabImagingObservations.SuspendLayout();
            this._infoTabs.SuspendLayout();
            this.SuspendLayout();

            // Anatomic Entities
            _anatomicEntitiesDetailsControl = new AimCodeSequenceDetailsControl(component, "AnatomicEntities");
            this._anatomicEntitiesDetailsControl.Dock = DockStyle.Fill;
            this._anatomicEntitiesDetailsControl.Location = new Point(3, 3);
            this._anatomicEntitiesDetailsControl.Name = "_anatomicEntitiesDetailsControl";
            this._anatomicEntitiesDetailsControl.Size = new Size(543, 458);
            this._anatomicEntitiesDetailsControl.TabIndex = 0;
            this._tabAnatomicEntities.Controls.Add(_anatomicEntitiesDetailsControl);

            _imagingObsDetailsControl = new AimCodeSequenceDetailsControl(component, "ImagingObservations");
            this._imagingObsDetailsControl.Dock = DockStyle.Fill;
            this._imagingObsDetailsControl.Location = new Point(3, 3);
            this._imagingObsDetailsControl.Name = "_imagingObsDetailsControl";
            this._imagingObsDetailsControl.Size = new Size(543, 458);
            this._imagingObsDetailsControl.TabIndex = 0;
            this._tabImagingObservations.Controls.Add(_imagingObsDetailsControl);

            this._wbDetails.DataBindings.Add("DocumentText", bindingSource, "AllDetailsHtml", true, DataSourceUpdateMode.OnPropertyChanged);
            DisableClickSounds(); // no annoying "click" sound when databinding is in progress for the WebBrowser

            this._tabAnatomicEntities.ResumeLayout(false);
            this._tabImagingObservations.ResumeLayout(false);
            this._infoTabs.ResumeLayout(false);
            this.ResumeLayout(false);
        }
        public AimCodeSequenceDetailsControl(AimAnnotationDetailsComponent component, string bindingCollectionName)
        {
            Platform.CheckForNullReference(bindingCollectionName, "bindingCollectionName");

            InitializeComponent();

            _component = component;
            _bindingCollectionName = bindingCollectionName;

            var bindingSource = new BindingSource();
            bindingSource.DataSource = _component;

            DataBindings.Add("SetupCodeSequenceList", bindingSource, _bindingCollectionName, true, DataSourceUpdateMode.OnPropertyChanged);

            _dgvCodeSequenceDetails.AutoGenerateColumns = false;
            _dgvCodeSequenceDetails.DataBindings.Add("DataSource", this, "CodeSequenceList", true, DataSourceUpdateMode.OnPropertyChanged);
            _codeValue.DataPropertyName = "CodeValue";
            _codeMeaning.DataPropertyName = "CodeMeaning";
            _codingSchemeDesignator.DataPropertyName = "CodingSchemeDesignator";
        }
Esempio n. 5
0
        public AimCodeSequenceDetailsControl(AimAnnotationDetailsComponent component, string bindingCollectionName)
        {
            Platform.CheckForNullReference(bindingCollectionName, "bindingCollectionName");

            InitializeComponent();

            _component             = component;
            _bindingCollectionName = bindingCollectionName;

            BindingSource bindingSource = new BindingSource();

            bindingSource.DataSource = _component;

            this.DataBindings.Add("SetupCodeSequenceList", bindingSource, _bindingCollectionName, true, DataSourceUpdateMode.OnPropertyChanged);

            _dgvCodeSequenceDetails.AutoGenerateColumns = false;
            _dgvCodeSequenceDetails.DataBindings.Add("DataSource", this, "CodeSequenceList", true, DataSourceUpdateMode.OnPropertyChanged);
            _codeValue.DataPropertyName              = "CodeValue";
            _codeMeaning.DataPropertyName            = "CodeMeaning";
            _codingSchemeDesignator.DataPropertyName = "CodingSchemeDesignator";
        }
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (AimAnnotationDetailsComponent)component;
 }
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (AimAnnotationDetailsComponent)component;
 }