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

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

                    _shelves[this.Context.DesktopWindow] = shelf;
                }
                catch (Exception e)
                {
                    ExceptionHandler.Report(e, this.Context.DesktopWindow);
                }
            }
            else
            {
                this.ComponentShelf.Show();
            }
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        public AimAnnotationsListComponentControl(AimAnnotationsListComponent component)
            : base(component)
        {
            _component = component;
            InitializeComponent();

            BuildAnnotationsDictionary();

            LayoutTableContainer();
            _component.AvailableAnnotationsChanged += OnAvailableAnnotationsChanged;
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        public AimAnnotationsListComponentControl(AimAnnotationsListComponent component)
            : base(component)
        {
            _component = component;
            InitializeComponent();

            BuildAnnotationsDictionary();

            LayoutTableContainer();
            _component.AvailableAnnotationsChanged += OnAvailableAnnotationsChanged;
        }
示例#4
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public AimAnnotationsListComponentControl(AimAnnotationsListComponent component)
            : base(component)
        {
            _component = component;
            InitializeComponent();

            BindingSource bindingSource = new BindingSource();

            bindingSource.DataSource = _component;

            //_aimDetailsListControl.DataBindings.Add("AvailableAnnotations", bindingSource, "AvailableAnnotations", true, DataSourceUpdateMode.OnPropertyChanged);
            //_aimDetailsListControl.DataBindings.Add("SelectedAnnotation", bindingSource, "SelectedAnnotation", true, DataSourceUpdateMode.OnPropertyChanged);

            _aimDetailsListControl.AvailableAnnotations = _component.AvailableAnnotations;
            _aimDetailsListControl.SelectedAnnotation   = _component.SelectedAnnotation;

            _aimDetailsListControl.ShowImageClicked += OnShowImageClicked;

            _component.SelectedAnnotationChanged   += OnSelectedAnnotationChanged;
            _component.AvailableAnnotationsChanged += OnAvailableAnnotationsChanged;
        }
示例#5
0
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (AimAnnotationsListComponent)component;
 }
        /// <summary>
        /// Constructor.
        /// </summary>
        public AimAnnotationsListComponentControl(AimAnnotationsListComponent component)
            :base(component)
        {
			_component = component;
            InitializeComponent();

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

			//_aimDetailsListControl.DataBindings.Add("AvailableAnnotations", bindingSource, "AvailableAnnotations", true, DataSourceUpdateMode.OnPropertyChanged);
			//_aimDetailsListControl.DataBindings.Add("SelectedAnnotation", bindingSource, "SelectedAnnotation", true, DataSourceUpdateMode.OnPropertyChanged);

			_aimDetailsListControl.AvailableAnnotations = _component.AvailableAnnotations;
			_aimDetailsListControl.SelectedAnnotation = _component.SelectedAnnotation;

			_aimDetailsListControl.ShowImageClicked += OnShowImageClicked;

			_component.SelectedAnnotationChanged += OnSelectedAnnotationChanged;
			_component.AvailableAnnotationsChanged += OnAvailableAnnotationsChanged;
        }
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (AimAnnotationsListComponent)component;
 }