Example #1
0
        private static void AccessEditModePropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ComponentAccessPicker instance = d as ComponentAccessPicker;

            if (instance == null)
            {
                return;
            }

            // re-display information
            instance.Children.Clear();
            instance.PopulteGrid();
            instance.SetUserMark();
        }
Example #2
0
        private static object ComponentToDisplayCoerceValueCallback(DependencyObject d, object baseValue)
        {
            ComponentAccessPicker instance = d as ComponentAccessPicker;

            if (instance == null)
            {
                return(baseValue);
            }
            if (instance.ComponentToDisplay != null)
            {
                instance.ComponentToDisplay.PropertyChanged -= instance.ComponentToDisplay_PropertyChanged;
            }

            return(baseValue);
        }
Example #3
0
        private static void LoggedUserPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ComponentAccessPicker instance = d as ComponentAccessPicker;

            if (instance == null)
            {
                return;
            }

            if (instance.IsLoaded)
            {
                instance.SetUserMark();
            }

            instance.AccessEditMode = (instance.LoggedUser == ComponentManagerType.ADMINISTRATOR);
        }
Example #4
0
        private static void ComponentToDisplayPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ComponentAccessPicker instance = d as ComponentAccessPicker;

            if (instance == null)
            {
                return;
            }

            // event handler, if the profile changes
            if (instance.ComponentToDisplay != null)
            {
                instance.ComponentToDisplay.PropertyChanged += instance.ComponentToDisplay_PropertyChanged;
            }

            // display information
            instance.access_adapted_to_slot_once = false;
            instance.AccessEditMode = (instance.LoggedUser == ComponentManagerType.ADMINISTRATOR);
            instance.Children.Clear();
            instance.PopulteGrid();
            instance.SetUserMark();
        }