ComponentFactory.Krypton.Toolkit.KryptonLabel.ProcessMnemonic C# (CSharp) Method

ProcessMnemonic() protected method

Processes a mnemonic character.
protected ProcessMnemonic ( char charCode ) : bool
charCode char The mnemonic character entered.
return bool
        protected override bool ProcessMnemonic(char charCode)
        {
            // Are we allowed to process mneonics?
            if (UseMnemonic && CanProcessMnemonic())
            {
                // Does the button primary text contain the mnemonic?
                if (Control.IsMnemonic(charCode, Values.Text))
                {
                    // Is target functionality enabled?
                    if (EnabledTarget)
                    {
                        // Do we have a target that can take the focus
                        if ((Target != null) && Target.CanFocus)
                        {
                            Target.Focus();
                            return true;
                        }
                    }
                }
            }

            // No match found, let base class do standard processing
            return base.ProcessMnemonic(charCode);
        }