示例#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();
        }
示例#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);
        }
示例#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);
        }
示例#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();
        }