SetRedirectStates() public méthode

Set the redirection states.
public SetRedirectStates ( IPaletteDouble disabled, IPaletteDouble normal ) : void
disabled IPaletteDouble Redirection for disabled state requests.
normal IPaletteDouble Redirection for normal state requests.
Résultat void
        /// <summary>
        /// Update the redirector with new reference.
        /// </summary>
        /// <param name="provider">Provider for acquiring context menu information.</param>
        public void SetRedirector(IContextMenuProvider provider)
        {
            _itemHighlight.Target    = provider.ProviderStateCommon.ItemHighlight.GetRedirector();
            _itemImage.Target        = provider.ProviderStateCommon.ItemImage.GetRedirector();
            _itemShortcutText.Target = provider.ProviderStateCommon.ItemShortcutTextRedirect.GetRedirector();
            _itemSplit.Target        = provider.ProviderStateCommon.ItemSplit.GetRedirector();
            _itemStandard.Target     = provider.ProviderStateCommon.ItemTextStandardRedirect.GetRedirector();
            _itemAlternate.Target    = provider.ProviderStateCommon.ItemTextAlternateRedirect.GetRedirector();

            _itemHighlight.SetRedirectStates(provider.ProviderStateDisabled.ItemHighlight, provider.ProviderStateNormal.ItemHighlight);
            _itemImage.SetRedirectStates(provider.ProviderStateDisabled.ItemImage, provider.ProviderStateNormal.ItemImage);
            _itemShortcutText.SetRedirectStates(provider.ProviderStateDisabled.ItemShortcutText, provider.ProviderStateNormal.ItemShortcutText);
            _itemSplit.SetRedirectStates(provider.ProviderStateDisabled.ItemSplit, provider.ProviderStateNormal.ItemSplit, provider.ProviderStateHighlight.ItemSplit, provider.ProviderStateHighlight.ItemSplit);
            _itemStandard.SetRedirectStates(provider.ProviderStateDisabled.ItemTextStandard, provider.ProviderStateNormal.ItemTextStandard);
            _itemAlternate.SetRedirectStates(provider.ProviderStateDisabled.ItemTextAlternate, provider.ProviderStateNormal.ItemTextAlternate);
        }
 internal void SetPaletteRedirect(PaletteDoubleRedirect redirector)
 {
     _redirectSeparator.SetRedirectStates(redirector, redirector);
 }
Exemple #3
0
 internal void SetPaletteRedirect(PaletteDoubleRedirect redirector)
 {
     _redirectImageColumn.SetRedirectStates(redirector, redirector);
 }