/// <summary>
        /// Occurs when the <see cref="ExclusionsControl"/> index has changed.
        /// </summary>
        /// <param name="sender">The <see cref="System.Object"/> that raised the event.</param>
        /// <param name="e">An <see cref="EnableButtonsEventArgs"/> containing event data.</param>
        private void ExclusionsControl_SelectedIndexChanged(object sender, EnableButtonsEventArgs e)
        {
            IPolicyExclusion exclusion = (IPolicyExclusion)e.Item.Tag;

            if (exclusion != null)
            {
                e.EnableButton  = !exclusion.Active;
                e.DisableButton = exclusion.Active;
            }
        }
示例#2
0
        /// <summary>
        /// Occurs when the <see cref="ExclusionsControl"/> index has changed.
        /// </summary>
        /// <param name="sender">The <see cref="System.Object"/> that raised the event.</param>
        /// <param name="e">An <see cref="EnableButtonsEventArgs"/> containing event data.</param>
        private void ExclusionControl_SelectedIndexChanged(object sender, EnableButtonsEventArgs e)
        {
            PolicyExclusionConfigInfo exclusion = (PolicyExclusionConfigInfo)e.Item.Tag;

            if (exclusion != null)
            {
                bool enabled = bool.Parse(exclusion.Configuration[PolicyExclusion.EnabledProperty]);

                e.EnableButton  = !enabled;
                e.DisableButton = enabled;
            }
        }