本文整理汇总了C#中DevComponents.DotNetBar.BaseItem.InternalKeyDown方法的典型用法代码示例。如果您正苦于以下问题:C# BaseItem.InternalKeyDown方法的具体用法?C# BaseItem.InternalKeyDown怎么用?C# BaseItem.InternalKeyDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DevComponents.DotNetBar.BaseItem
的用法示例。
在下文中一共展示了BaseItem.InternalKeyDown方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExKeyDown
internal void ExKeyDown(KeyEventArgs e)
{
if(m_ParentItem==null || m_ParentItem.SubItems.Count==0 || m_ParentItem.DesignMode)
return;
if(m_HotSubItem==null || m_HotSubItem!=null && !m_HotSubItem.Expanded)
{
if(e.KeyCode==Keys.Down)
{
if (m_ParentItem is ItemContainer)
{
m_ParentItem.InternalKeyDown(e);
}
else
{
if (m_HotSubItem is ItemContainer)
m_HotSubItem.InternalKeyDown(e);
if (!e.Handled)
{
int i = 0;
if (m_HotSubItem != null)
{
m_HotSubItem.InternalMouseLeave();
i = m_ParentItem.SubItems.IndexOf(m_HotSubItem) + 1;
if (i == m_ParentItem.SubItems.Count && m_ExpandButton.ShowExpandButton)
{
m_ExpandButton.MouseOver = true;
RefreshExpandButton();
}
else if (i < 0 || i == m_ParentItem.SubItems.Count)
{
i = 0;
}
m_HotSubItem = null;
}
else if (m_ExpandButton.MouseOver)
{
m_ExpandButton.MouseOver = false;
RefreshExpandButton();
i = 0;
}
BaseItem objTmp;
for (int f = i; f < m_ParentItem.SubItems.Count; f++)
{
objTmp = m_ParentItem.SubItems[f];
if (objTmp.Displayed && objTmp.Visible && CanGetMouseFocus(objTmp))
{
m_HotSubItem = objTmp;
m_HotSubItem.InternalMouseEnter();
m_HotSubItem.InternalMouseMove(new MouseEventArgs(MouseButtons.None, 0, m_HotSubItem.LeftInternal + 2, m_HotSubItem.TopInternal + 2, 0));
if (m_HotSubItem.IsContainer)
m_HotSubItem.InternalKeyDown(e);
break;
}
}
if (m_HotSubItem == null && m_ExpandButton.ShowExpandButton && !m_ExpandButton.MouseOver)
{
m_ExpandButton.MouseOver = true;
RefreshExpandButton();
}
}
}
e.Handled=true;
m_IgnoreDuplicateMouseMove=true;
}
else if(e.KeyCode==Keys.Up)
{
if (m_ParentItem is ItemContainer)
{
m_ParentItem.InternalKeyDown(e);
}
else
{
if (m_HotSubItem is ItemContainer)
m_HotSubItem.InternalKeyDown(e);
if (!e.Handled)
{
int i = 0;
if (m_HotSubItem != null)
{
m_HotSubItem.InternalMouseLeave();
i = m_ParentItem.SubItems.IndexOf(m_HotSubItem) - 1;
if (i < 0 && m_ExpandButton.ShowExpandButton)
{
m_ExpandButton.MouseOver = true;
RefreshExpandButton();
}
else if (i < 0)
i = m_ParentItem.SubItems.Count - 1;
m_HotSubItem = null;
}
else if (m_ExpandButton.MouseOver)
{
m_ExpandButton.MouseOver = false;
RefreshExpandButton();
i = m_ParentItem.SubItems.Count - 1;
}
else if (m_ExpandButton.ShowExpandButton)
{
//.........这里部分代码省略.........