本文整理汇总了C#中XPTable.Events.HeaderMouseEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# HeaderMouseEventArgs类的具体用法?C# HeaderMouseEventArgs怎么用?C# HeaderMouseEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HeaderMouseEventArgs类属于XPTable.Events命名空间,在下文中一共展示了HeaderMouseEventArgs类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnClick
/// <summary>
/// Raises the Click event
/// </summary>
/// <param name="e">A HeaderMouseEventArgs that contains the event data</param>
public virtual void OnClick(HeaderMouseEventArgs e)
{
this.Bounds = e.HeaderRect;
}
开发者ID:adarmus,项目名称:XPTable,代码行数:8,代码来源:HeaderRenderer.cs
示例2: OnMouseDown
/// <summary>
/// Raises the MouseDown event
/// </summary>
/// <param name="e">A HeaderMouseEventArgs that contains the event data</param>
public virtual void OnMouseDown(HeaderMouseEventArgs e)
{
if (!e.Table.Focused)
{
e.Table.Focus();
}
this.Bounds = e.HeaderRect;
}
开发者ID:adarmus,项目名称:XPTable,代码行数:13,代码来源:HeaderRenderer.cs
示例3: OnMouseEnter
/// <summary>
/// Raises the MouseEnter event
/// </summary>
/// <param name="e">A HeaderMouseEventArgs that contains the event data</param>
public virtual void OnMouseEnter(HeaderMouseEventArgs e)
{
this.Bounds = e.HeaderRect;
bool tooltipActive = e.Table.ToolTip.Active;
if (tooltipActive)
e.Table.ToolTip.Active = false;
e.Table.ResetMouseEventArgs();
if (tooltipActive)
{
if (e.Column != null)
{
HeaderToolTipEventArgs args = new HeaderToolTipEventArgs(e.Column, new Point(e.X, e.Y));
// The default tooltip is to show the full text for any cell that has been truncated
if (e.Column.IsTextTrimmed)
args.ToolTipText = e.Column.Text;
// Allow the outside world to modify the text or cancel this tooltip
e.Table.OnHeaderToolTipPopup(args);
if (args.Cancel)
e.Table.ToolTip.SetToolTip(e.Table, string.Empty);
else
e.Table.ToolTip.SetToolTip(e.Table, args.ToolTipText);
}
else
{
e.Table.ToolTip.SetToolTip(e.Table, string.Empty);
}
e.Table.ToolTip.Active = true;
}
}
开发者ID:adarmus,项目名称:XPTable,代码行数:40,代码来源:HeaderRenderer.cs
示例4: OnHeaderMouseHover
/// <summary>
/// Raises the HeaderMouseHover event
/// </summary>
/// <param name="e">A HeaderMouseEventArgs that contains the event data</param>
protected virtual void OnHeaderMouseHover(HeaderMouseEventArgs e)
{
if (this.CanRaiseEvents)
{
if (HeaderMouseHover != null)
{
HeaderMouseHover(e.Column, e);
}
}
}
开发者ID:nithinphilips,项目名称:SMOz,代码行数:14,代码来源:Table.cs
示例5: OnHeaderDoubleClick
/// <summary>
/// Raises the HeaderDoubleClick event
/// </summary>
/// <param name="e">A HeaderMouseEventArgs that contains the event data</param>
protected virtual void OnHeaderDoubleClick(HeaderMouseEventArgs e)
{
if (this.CanRaiseEvents)
{
if (this.HeaderRenderer != null)
{
this.HeaderRenderer.OnDoubleClick(e);
}
if (HeaderDoubleClick != null)
{
HeaderDoubleClick(e.Column, e);
}
}
}
开发者ID:nithinphilips,项目名称:SMOz,代码行数:19,代码来源:Table.cs
示例6: OnHeaderMouseMove
/// <summary>
/// Raises the HeaderMouseMove event
/// </summary>
/// <param name="e">A HeaderMouseEventArgs that contains the event data</param>
protected virtual void OnHeaderMouseMove(HeaderMouseEventArgs e)
{
if (this.CanRaiseEvents)
{
if (this.HeaderRenderer != null)
{
this.HeaderRenderer.OnMouseMove(e);
}
if (HeaderMouseMove != null)
{
HeaderMouseMove(e.Column, e);
}
}
}
开发者ID:nithinphilips,项目名称:SMOz,代码行数:19,代码来源:Table.cs
示例7: RaiseHeaderMouseMove
/// <summary>
/// Raises a MouseMove event for the Column header at the specified colunm
/// index position
/// </summary>
/// <param name="index">The index of the column to recieve the event</param>
/// <param name="e">A HeaderMouseEventArgs that contains the event data</param>
protected void RaiseHeaderMouseMove(int index, MouseEventArgs e)
{
if (index < 0 || this.ColumnModel == null || index >= this.ColumnModel.Columns.Count)
{
return;
}
if (this.HeaderRenderer != null)
{
Column column = this.ColumnModel.Columns[index];
HeaderMouseEventArgs mhea = new HeaderMouseEventArgs(column, this, index, this.DisplayRectToClient(this.ColumnModel.ColumnHeaderRect(index)), e);
this.OnHeaderMouseMove(mhea);
}
}
开发者ID:nithinphilips,项目名称:SMOz,代码行数:22,代码来源:Table.cs
示例8: OnMouseClick
/// <summary>
/// Raises the Click event
/// </summary>
/// <param name="e">An EventArgs that contains the event data</param>
protected override void OnMouseClick(MouseEventArgs e)
{
base.OnMouseClick(e);
if (this.IsValidCell(this.LastMouseCell))
{
// Adjust this to take colspan into account
// LastMouseCell may be a cell that is 'under' a colspan cell
CellPos realCell = this.ResolveColspan(this.LastMouseCell);
var cellMouseEventArgs = new CellMouseEventArgs(
this.TableModel[realCell],
this,
realCell,
this.CellRect(realCell),
e);
this.OnCellClick(cellMouseEventArgs);
}
else if (this.hotColumn != -1)
{
var columnHeaderRect = this.ColumnModel.ColumnHeaderRect(this.hotColumn);
var headerRect = this.DisplayRectToClient(columnHeaderRect);
bool handled = false;
// Column filters
if (this.EnableFilters && this.ColumnModel.Columns[hotColumn].Filterable)
{
Point client = this.DisplayRectToClient(e.X, e.Y);
ColumnHeaderRegion region = this.HeaderRenderer.HitTest(client.X, client.Y);
if (region == ColumnHeaderRegion.FilterButton)
{
handled = true;
var mouseEventArgs = new HeaderMouseEventArgs(
this.ColumnModel.Columns[this.hotColumn],
this,
this.hotColumn,
headerRect,
e);
this.OnHeaderFilterClick(mouseEventArgs);
}
}
if (!handled)
{
var mouseEventArgs = new HeaderMouseEventArgs(
this.ColumnModel.Columns[this.hotColumn],
this,
this.hotColumn,
headerRect,
e);
this.OnHeaderClick(mouseEventArgs);
}
}
}
开发者ID:schoetbi,项目名称:XPTable,代码行数:62,代码来源:Table.cs
示例9: OnMouseEnter
/// <summary>
/// Raises the MouseEnter event
/// </summary>
/// <param name="e">A HeaderMouseEventArgs that contains the event data</param>
public virtual void OnMouseEnter(HeaderMouseEventArgs e)
{
this.Bounds = e.HeaderRect;
bool tooltipActive = e.Table.ToolTip.Active;
if (tooltipActive)
{
e.Table.ToolTip.Active = false;
}
e.Table.ResetMouseEventArgs();
e.Table.ToolTip.SetToolTip(e.Table, e.Column.ToolTipText);
if (tooltipActive)
{
e.Table.ToolTip.Active = true;
}
}
开发者ID:nithinphilips,项目名称:SMOz,代码行数:24,代码来源:HeaderRenderer.cs
示例10: OnHeaderFilterClick
/// <summary>
/// Raises the HeaderFilterClick event
/// </summary>
/// <param name="e">A HeaderMouseEventArgs that contains the event data</param>
protected virtual void OnHeaderFilterClick(HeaderMouseEventArgs e)
{
if (this.CanRaiseEvents)
{
var args = new HandledHeaderMouseEventArgs(e);
if (HeaderFilterClick != null)
{
HeaderFilterClick(e.Column, args);
}
if (!args.Handled)
{
if (e.Column.Filter != null)
{
e.Column.Filter.OnHeaderFilterClick(e);
}
}
}
}
开发者ID:schoetbi,项目名称:XPTable,代码行数:24,代码来源:Table.cs
示例11: HandledHeaderMouseEventArgs
/// <summary>
/// Initializes a new instance of the HandledHeaderMouseEventArgs class with
/// the specified source Column, Table, column index, column header bounds
/// and MouseEventArgs
/// </summary>
/// <param name="e"></param>
public HandledHeaderMouseEventArgs(HeaderMouseEventArgs e)
: base(e.Column, e.Table, e.Index, e.HeaderRect, e)
{
this.Handled = false;
}
开发者ID:adarmus,项目名称:XPTable,代码行数:11,代码来源:HandledHeaderMouseEventArgs.cs
示例12: UpdateFilter
void UpdateFilter(HeaderMouseEventArgs e, TextColumnFilterDialog dialog)
{
if (dialog.AnyUncheckedItems())
SetFilterItems(dialog.GetCheckedItems());
else
SetFilterItems(null); // The user has ticked every item - so no filtering is needed
e.Table.OnHeaderFilterChanged(e);
}
开发者ID:adarmus,项目名称:XPTable,代码行数:9,代码来源:TextColumnFilter.cs
示例13: CreateFilterDialog
TextColumnFilterDialog CreateFilterDialog(HeaderMouseEventArgs e)
{
var dialog = new TextColumnFilterDialog();
Point screenPos = e.Table.PointToScreen(new Point(e.HeaderRect.Left, e.HeaderRect.Bottom));
dialog.StartPosition = FormStartPosition.Manual;
dialog.Location = screenPos;
return dialog;
}
开发者ID:adarmus,项目名称:XPTable,代码行数:12,代码来源:TextColumnFilter.cs
示例14: OnHeaderFilterClick
/// <summary>
/// Called when the filter button is clicked on this column
/// </summary>
/// <param name="e"></param>
public void OnHeaderFilterClick(HeaderMouseEventArgs e)
{
TextColumnFilterDialog dialog = CreateFilterDialog(e);
AddItems(dialog, e.Table, e.Index);
DialogResult result = dialog.ShowDialog();
if (result == DialogResult.Cancel)
return;
UpdateFilter(e, dialog);
}
开发者ID:adarmus,项目名称:XPTable,代码行数:17,代码来源:TextColumnFilter.cs
注:本文中的XPTable.Events.HeaderMouseEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论