Beispiel #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public NBIASearchCriteriaComponentControl(NBIASearchCriteriaComponent component)
            : base(component)
        {
            _component = component;
            InitializeComponent();

            ClearCanvasStyle.SetTitleBarStyle(_titleBar);

            _modality.SetAvailableModalities(_component.AvailableSearchModalities);
            _modality.DataBindings.Add("CheckedModalities", component, "SearchModalities", true, DataSourceUpdateMode.OnPropertyChanged);
            _modality.DataBindings.Add("Enabled", component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);

            _patientID.DataBindings.Add("Value", _component, "PatientId", true, DataSourceUpdateMode.OnPropertyChanged);
            _patientID.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);

            _patientsName.DataBindings.Add("Value", _component, "PatientsName", true, DataSourceUpdateMode.OnPropertyChanged);
            _patientsName.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);

            _patientsSex.DataBindings.Add("Value", _component, "PatientsSex", true, DataSourceUpdateMode.OnPropertyChanged);
            _patientsSex.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);

            _project.DataBindings.Add("Value", _component, "Project", true, DataSourceUpdateMode.OnPropertyChanged);
            _project.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);

            // Not used fields
            //_protocolId.DataBindings.Add("Value", _component, "ProtocolId", true, DataSourceUpdateMode.OnPropertyChanged);
            //_protocolId.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);

            //_protocolName.DataBindings.Add("Value", _component, "ProtocolName", true, DataSourceUpdateMode.OnPropertyChanged);
            //_protocolName.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);

            //_siteName.DataBindings.Add("Value", _component, "SiteName", true, DataSourceUpdateMode.OnPropertyChanged);
            //_siteName.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);

            //_siteId.DataBindings.Add("Value", _component, "SiteId", true, DataSourceUpdateMode.OnPropertyChanged);
            //_siteId.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);

            _sliceThickness.DataBindings.Add("Value", _component, "SliceThickness", true, DataSourceUpdateMode.OnPropertyChanged);
            _sliceThickness.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);

            _studyInstanceUid.DataBindings.Add("Value", _component, "StudyInstanceUid", true, DataSourceUpdateMode.OnPropertyChanged);
            _studyInstanceUid.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);

            _patientsBirthDate.DataBindings.Add("Value", _component, "PatientsBirthDate", true, DataSourceUpdateMode.OnPropertyChanged);
            _patientsBirthDate.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);

            _searchButton.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _cancelButton.DataBindings.Add("Enabled", _component, "CancelEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _resetButton.DataBindings.Add("Enabled", _component, "ResetEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="component"></param>
        public AimDataServiceSearchCriteriaComponentControl(AimDataServiceSearchCriteriaComponent component)
            : base(component)
        {
            InitializeComponent();

            ClearCanvasStyle.SetTitleBarStyle(_titleBar);

            // Hide Advanced Search Criteria controls for now
            _advancedSearchCriteriaListView.Visible = false;
            _advancedSearchCriteriaGroupBox.Visible = false;
            _searchCriteriaLabel.Visible            = false;

            _component = component;
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        public RetrieveProgressComponentControl(RetrieveProgressComponent component)
            : base(component)
        {
            _component = component;
            InitializeComponent();

            ClearCanvasStyle.SetTitleBarStyle(_titleBar);

            _titleBar.DataBindings.Add("Text", _component, "Title", true, DataSourceUpdateMode.OnPropertyChanged);

            _tableView.Table              = _component.Table;
            _tableView.ToolbarModel       = _component.ToolbarModel;
            _tableView.MenuModel          = _component.MenuModel;
            _tableView.SelectionChanged  += OnSelectionChanged;
            _tableView.ItemDoubleClicked += OnItemDoubleClicked;
        }
Beispiel #4
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public SearchResultsComponentControl(SearchResultsComponent component)
            : base(component)
        {
            _component = component;
            InitializeComponent();

            ClearCanvasStyle.SetTitleBarStyle(_titleBar);
            _titleBar.DataBindings.Add("Text", _component, "Title", true, DataSourceUpdateMode.OnPropertyChanged);

            this.DataBindings.Add("ErrorMessage", _component, "ErrorMessage", true, DataSourceUpdateMode.OnPropertyChanged);

            _tableView.Table              = _component.Table;
            _tableView.ToolbarModel       = _component.ToolbarModel;
            _tableView.MenuModel          = _component.MenuModel;
            _tableView.SelectionChanged  += new EventHandler(OnSelectionChanged);
            _tableView.ItemDoubleClicked += new EventHandler(OnItemDoubleClicked);
        }
Beispiel #5
0
        public AIMSearchCriteriaComponentControl(AIMSearchCriteriaComponent component)
            : base(component)
        {
            _component = component;
            InitializeComponent();

            ClearCanvasStyle.SetTitleBarStyle(_titleBar);

            _anatomicEntities.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _anatomicEntities.ValueChanged += OnAnatomicEntitiesValueChanged;

            _imagingObservations.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _imagingObservations.ValueChanged += OnImagingObservationsValueChanged;

            _anatomicEntityCharacteristics.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _anatomicEntityCharacteristics.ValueChanged += OnAnatomicEntityCharacteristicsValueChanged;

            _imagingObservationCharacteristics.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _imagingObservationCharacteristics.ValueChanged += OnImagingObservationCharacteristicsValueChanged;

            _studyInstanceUid.DataBindings.Add("Value", _component, "StudyInstanceUid", true, DataSourceUpdateMode.OnPropertyChanged);
            _studyInstanceUid.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);

            _user.DataBindings.Add("Value", _component, "User", true, DataSourceUpdateMode.OnPropertyChanged);
            _user.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);

            _imageAnnotation.DataBindings.Add("Checked", _component, "ImageAnnotation", true, DataSourceUpdateMode.OnPropertyChanged);
            _imageAnnotation.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);

            _annotationOfAnnotation.DataBindings.Add("Checked", _component, "AnnotationOfAnnotation", true, DataSourceUpdateMode.OnPropertyChanged);
            _annotationOfAnnotation.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);

            _searchButton.DataBindings.Add("Enabled", _component, "Enabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _cancelButton.DataBindings.Add("Enabled", _component, "CancelEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
            _resetButton.DataBindings.Add("Enabled", _component, "ResetEnabled", true, DataSourceUpdateMode.OnPropertyChanged);

            _imageAnnotation.Click        += delegate { _component.ImageAnnotation = true; };
            _annotationOfAnnotation.Click += delegate { _component.AnnotationOfAnnotation = true; };
        }
Beispiel #6
0
 // TODO: Refactor this.
 // This code is replicated (almost) in all toolbar button classes
 // Also consider using Visual State Manager when doing it
 private void IndicateChecked(bool isChecked)
 {
     if (isChecked)
     {
         var outerGlow = new DropShadowEffect();
         outerGlow.ShadowDepth    = 0;
         outerGlow.BlurRadius     = 20;
         outerGlow.Opacity        = 1;
         outerGlow.Color          = ClearCanvasStyle.ClearCanvasCheckedButtonGlow;
         ButtonComponent.Effect   = outerGlow;
         CheckedIndicator.Stroke  = new SolidColorBrush(ClearCanvasStyle.GetPredefinedColor("Yellow"));
         CheckedIndicator.Fill    = new SolidColorBrush(ClearCanvasStyle.GetPredefinedColor("Yellow"));
         CheckedIndicator.Opacity = 1;
     }
     else
     {
         ButtonComponent.Effect   = null;
         CheckedIndicator.Stroke  = new SolidColorBrush(ClearCanvasStyle.GetPredefinedColor("Silver"));
         CheckedIndicator.Fill    = new SolidColorBrush(ClearCanvasStyle.GetPredefinedColor("Silver"));
         CheckedIndicator.Opacity = 0.25;
     }
 }