本文整理汇总了C#中Rendering.DrawKeyTips方法的典型用法代码示例。如果您正苦于以下问题:C# Rendering.DrawKeyTips方法的具体用法?C# Rendering.DrawKeyTips怎么用?C# Rendering.DrawKeyTips使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rendering
的用法示例。
在下文中一共展示了Rendering.DrawKeyTips方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PaintContainerKeyTips
internal override void PaintContainerKeyTips(BaseItem container, Rendering.BaseRenderer renderer, KeyTipsRendererEventArgs e)
{
base.PaintContainerKeyTips(container, renderer, e);
if (this.DialogLauncherVisible && this.DialogLauncherKeyTip != "")
{
string stack = ((IKeyTipsControl)this).KeyTipsKeysStack;
string keyTip = this.DialogLauncherKeyTip;
if (stack != "" && !keyTip.StartsWith(stack))
return;
e.ReferenceObject = this;
e.KeyTip = keyTip;
Size padding = KeyTipsPainter.KeyTipsPadding;
Size size = TextDrawing.MeasureString(e.Graphics, keyTip, e.Font);
size.Width += padding.Width;
size.Height += padding.Height;
Rectangle r = new Rectangle(this.Width - size.Width, this.Height + 4, size.Width, size.Height);
e.Bounds = r;
renderer.DrawKeyTips(e);
}
}
示例2: PaintItemKeyTip
private void PaintItemKeyTip(BaseItem item, Rendering.BaseRenderer renderer, KeyTipsRendererEventArgs e)
{
if (!item.Visible || !item.Displayed)
return;
if (item.IsContainer)
PaintContainerKeyTips(item, renderer, e);
if (item.AccessKey == Char.MinValue && item.KeyTips == "" || m_KeyTipsKeysStack != "" && !item.KeyTips.StartsWith(m_KeyTipsKeysStack)
|| item.KeyTips == "" && m_KeyTipsKeysStack != "")
return;
if (item.KeyTips != "")
e.KeyTip = item.KeyTips;
else
e.KeyTip = item.AccessKey.ToString().ToUpper();
e.Bounds = GetKeyTipRectangle(e.Graphics, item, e.Font, e.KeyTip);
e.ReferenceObject = item;
renderer.DrawKeyTips(e);
}