Esempio n. 1
0
        void SelectedAllowedTermsCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
        {
            if (e.NewItems != null)
            {
                foreach (var item in e.NewItems)
                {
                    var term = item as AimTemplateTreeAllowedTerm;
                    if (term != null && CheckBoxControls.ContainsKey(term))
                    {
                        CheckBoxControls[term].IsChecked = true;
                    }
                }
            }

            if (e.OldItems != null)
            {
                foreach (var item in e.OldItems)
                {
                    var term = item as AimTemplateTreeAllowedTerm;
                    if (term != null && CheckBoxControls.ContainsKey(term))
                    {
                        CheckBoxControls[term].IsChecked = false;
                    }
                }
            }

            if (ImagingObservation.SelectedAllowedTerms.Count > 0)
            {
                _comboBox.SelectedItem = ImagingObservation.SelectedAllowedTerms[0];
            }
        }
Esempio n. 2
0
        private void CheckBoxInitialized(object sender, EventArgs e)
        {
            var term = ((CheckBox)sender).Content as CharacteristicQuantificationAllowedTerm;

            if (term != null)
            {
                if (Characteristic.SelectedCharacteristicQuantificationAllowedTerms.Contains(term))
                {
                    ((CheckBox)sender).IsChecked = true;
                }
                if (!CheckBoxControls.ContainsKey(term))
                {
                    CheckBoxControls.Add(term, (CheckBox)sender);
                }
            }
        }
Esempio n. 3
0
        void SelectedAllowedTermsCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
        {
            if (e.NewItems != null)
            {
                foreach (var item in e.NewItems)
                {
                    var term = item as CharacteristicQuantificationAllowedTerm;
                    if (term != null && CheckBoxControls.ContainsKey(term))
                    {
                        CheckBoxControls[term].IsChecked = true;
                    }
                }
            }

            if (e.OldItems != null)
            {
                foreach (var item in e.OldItems)
                {
                    var term = item as CharacteristicQuantificationAllowedTerm;
                    if (term != null && CheckBoxControls.ContainsKey(term))
                    {
                        CheckBoxControls[term].IsChecked = false;
                    }
                }
            }

            if (Characteristic.SelectedCharacteristicQuantificationAllowedTerms.Count > 0)
            {
                _comboBox.SelectedItem = Characteristic.SelectedCharacteristicQuantificationAllowedTerms[0];
            }

            ClearQuantificationDetailsControls();

            foreach (var term in Characteristic.SelectedCharacteristicQuantificationAllowedTerms)
            {
                foreach (var quantification in term.CharacteristicQuantifications)
                {
                    var characteristicControl = new CharacteristicQuantificationDetailsWpfControl(quantification);
                    _stackPanel.Children.Add(characteristicControl);
                }
            }
        }