private void Listbox_DoubleClick(object sender, EventArgs e) { if (SelectedItem != null) { ItemDoubleClick?.Invoke(sender, e); } }
private void OnItemClick(ListViewItem item, MouseEventArgs e) { switch (e.Clicks) { case 1: ItemClick?.Invoke(item, e); break; case 2: ItemDoubleClick?.Invoke(item, e); break; default: break; } }
public FilterListView() : base() { InitializeComponent(); _listView = new ListView(); _listView.Dock = DockStyle.Fill; _listView.View = View.Details; _listView.HideSelection = false; _listView.MultiSelect = false; _listView.FullRowSelect = true; _listView.VirtualMode = true; _listView.DoubleClick += (s, e) => { if (_listView.VirtualListSize > 0 && _listView.SelectedIndices.Count > 0) { ItemDoubleClick?.Invoke(this, _filteredItems[_listView.SelectedIndices[0]]); } }; _listView.RetrieveVirtualItem += (s, e) => { e.Item = _filteredItems[e.ItemIndex]; }; Controls.Add(_listView); }
private void dgvMain_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { ItemDoubleClick?.Invoke(this, new EventArgs()); }
private void OnItemDoubleClick(object sender, MouseButtonEventArgs e) { ItemDoubleClick.Invoke(sender, e); }
protected virtual void OnItemDoubleClick(ItemClickedEventArgs args) { ItemDoubleClick?.Invoke(this, args); }
/// <summary> /// 触发双击行事件 /// </summary> /// <param name="p_data"></param> internal void OnItemDoubleClick(object p_data) { ItemDoubleClick?.Invoke(this, p_data); }
/// <inheritdoc /> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (BgColor != null) { hashCode = hashCode * 59 + BgColor.GetHashCode(); } if (BorderColor != null) { hashCode = hashCode * 59 + BorderColor.GetHashCode(); } if (BorderWidth != null) { hashCode = hashCode * 59 + BorderWidth.GetHashCode(); } if (Font != null) { hashCode = hashCode * 59 + Font.GetHashCode(); } if (Orientation != null) { hashCode = hashCode * 59 + Orientation.GetHashCode(); } if (TraceOrder != null) { hashCode = hashCode * 59 + TraceOrder.GetHashCode(); } if (TraceGroupGap != null) { hashCode = hashCode * 59 + TraceGroupGap.GetHashCode(); } if (ItemSizing != null) { hashCode = hashCode * 59 + ItemSizing.GetHashCode(); } if (ItemWidth != null) { hashCode = hashCode * 59 + ItemWidth.GetHashCode(); } if (ItemClick != null) { hashCode = hashCode * 59 + ItemClick.GetHashCode(); } if (ItemDoubleClick != null) { hashCode = hashCode * 59 + ItemDoubleClick.GetHashCode(); } if (X != null) { hashCode = hashCode * 59 + X.GetHashCode(); } if (XAnchor != null) { hashCode = hashCode * 59 + XAnchor.GetHashCode(); } if (Y != null) { hashCode = hashCode * 59 + Y.GetHashCode(); } if (YAnchor != null) { hashCode = hashCode * 59 + YAnchor.GetHashCode(); } if (UiRevision != null) { hashCode = hashCode * 59 + UiRevision.GetHashCode(); } if (VAlign != null) { hashCode = hashCode * 59 + VAlign.GetHashCode(); } if (Title != null) { hashCode = hashCode * 59 + Title.GetHashCode(); } return(hashCode); } }
/// <inheritdoc /> public bool Equals([AllowNull] Legend other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( BgColor == other.BgColor || BgColor != null && BgColor.Equals(other.BgColor) ) && ( BorderColor == other.BorderColor || BorderColor != null && BorderColor.Equals(other.BorderColor) ) && ( BorderWidth == other.BorderWidth || BorderWidth != null && BorderWidth.Equals(other.BorderWidth) ) && ( Font == other.Font || Font != null && Font.Equals(other.Font) ) && ( Orientation == other.Orientation || Orientation != null && Orientation.Equals(other.Orientation) ) && ( TraceOrder == other.TraceOrder || TraceOrder != null && TraceOrder.Equals(other.TraceOrder) ) && ( TraceGroupGap == other.TraceGroupGap || TraceGroupGap != null && TraceGroupGap.Equals(other.TraceGroupGap) ) && ( ItemSizing == other.ItemSizing || ItemSizing != null && ItemSizing.Equals(other.ItemSizing) ) && ( ItemWidth == other.ItemWidth || ItemWidth != null && ItemWidth.Equals(other.ItemWidth) ) && ( ItemClick == other.ItemClick || ItemClick != null && ItemClick.Equals(other.ItemClick) ) && ( ItemDoubleClick == other.ItemDoubleClick || ItemDoubleClick != null && ItemDoubleClick.Equals(other.ItemDoubleClick) ) && ( X == other.X || X != null && X.Equals(other.X) ) && ( XAnchor == other.XAnchor || XAnchor != null && XAnchor.Equals(other.XAnchor) ) && ( Y == other.Y || Y != null && Y.Equals(other.Y) ) && ( YAnchor == other.YAnchor || YAnchor != null && YAnchor.Equals(other.YAnchor) ) && ( UiRevision == other.UiRevision || UiRevision != null && UiRevision.Equals(other.UiRevision) ) && ( VAlign == other.VAlign || VAlign != null && VAlign.Equals(other.VAlign) ) && ( Title == other.Title || Title != null && Title.Equals(other.Title) )); }
private void ItemDoubleClicked(object sender, EventArgs e) { DoubleClickedItem = (UIListBoxItem)sender; ItemDoubleClick?.Invoke(this, flpListBox.Controls.IndexOfKey(((UIListBoxItem)sender).Name)); }
protected virtual void OnItemDoubleClick(TreeListItemEventArgs e) { ItemDoubleClick?.Invoke(this, e); }