private void viewMouseMove(object sender, MouseEventArgs e) { if (_downHitInfo == null) { return; } var cursorLocation = getCursorLocationRelativeToGrid(sender, e); if (isNotValidMouseMove(e, cursorLocation)) { return; } var curve = _gridBinderCurves.ElementAt(_downHitInfo.RowHandle); if (hitInColorCell(_downHitInfo)) { handleAsDraggingColor(sender as ColorEdit, curve); DXMouseEventArgs.GetMouseArgs(e).Handled = true; } else if (hitInRowIndicator(_downHitInfo)) { handleAsDraggingCurve(curve); DXMouseEventArgs.GetMouseArgs(e).Handled = true; } }
/// <summary> /// Handles the MouseMove event of the grdViewUnsorted control. /// </summary> /// <param name="sender"> /// The source of the event. /// </param> /// <param name="e"> /// The <see cref="System.Windows.Forms.MouseEventArgs"/> instance containing the event data. /// </param> private void grdViewUnsorted_MouseMove(object sender, MouseEventArgs e) { var view = sender as GridView; if (e.Button == MouseButtons.Left && this.downHitInfo != null) { var dragSize = SystemInformation.DragSize; var dragRect = new Rectangle( new Point( this.downHitInfo.HitPoint.X - dragSize.Width / 2, this.downHitInfo.HitPoint.Y - dragSize.Height / 2), dragSize); if (!dragRect.Contains(new Point(e.X, e.Y))) { var notCatagorized = view.GetRow(this.downHitInfo.RowHandle) as ScanNotCatagorized; this.lblStatus.Text = string.Format("{0} selected.", notCatagorized.FilePath); view.GridControl.DoDragDrop(notCatagorized, DragDropEffects.Move); this.downHitInfo = null; DXMouseEventArgs.GetMouseArgs(e).Handled = true; } } }
private void GV_Main_MouseDown(object sender, MouseEventArgs e) { GridHitInfo hitInfo = GV_Main.CalcHitInfo(e.Location); if (hitInfo == null || hitInfo.Column == null) { return; } if (hitInfo.InRowCell) { if (hitInfo.Column.RealColumnEdit is RepositoryItemCheckEdit) { GV_Main.FocusedColumn = hitInfo.Column; GV_Main.FocusedRowHandle = hitInfo.RowHandle; GV_Main.ShowEditor(); CheckEdit edit = GV_Main.ActiveEditor as CheckEdit; if (edit == null) { return; } edit.Toggle(); DXMouseEventArgs.GetMouseArgs(e).Handled = true; GV_Main.CloseEditor(); } } }
private void gridView2_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { GridView view = sender as GridView; GridHitInfo hInfo = view.CalcHitInfo(e.X, e.Y); if (hInfo.InColumn) { GridViewInfo info = view.GetViewInfo() as GridViewInfo; int columnIndex = GetColumnIndex(info, hInfo.Column); for (int i = 0; i < info.ColumnsInfo[columnIndex].InnerElements.Count; i++) { if (info.ColumnsInfo[columnIndex].InnerElements[i].ElementInfo is DevExpress.Utils.Drawing.GlyphElementInfoArgs) { if (info.ColumnsInfo[columnIndex].InnerElements[i].ElementInfo.Bounds.Contains(e.X, e.Y)) { if (Convert.ToInt32(hInfo.Column.Tag) == 0) { hInfo.Column.ImageIndex = 1; hInfo.Column.Tag = 1; this.pmCheckAll(view, hInfo.Column, true); } else { hInfo.Column.ImageIndex = 0; hInfo.Column.Tag = 0; this.pmCheckAll(view, hInfo.Column, false); } DXMouseEventArgs.GetMouseArgs(e).Handled = true; } } } } }
protected override bool OnMouseMove(MouseEventArgs ev) { DXMouseEventArgs e = DXMouseEventArgs.GetMouseArgs(ev); Point p = new Point(e.X, e.Y); UpdateQuickCustumisationIconState(p); return base.OnMouseMove(ev); }
private void OnMouseWheel(object sender, MouseEventArgs e) { if (!m_VScroll.Visible) { return; } //Control control = sender as Control;// NEW LINE //if (control.Bounds.Contains(e.Location)) return; //NEW LINE DXMouseEventArgs.GetMouseArgs(e).Handled = true; int scrollValue = m_VScroll.Value; if (e.Delta < 0) { int delta = m_VScroll.Value + m_VScroll.SmallChange; m_VScroll.Value = Math.Min(delta, m_VScroll.Maximum - m_VScroll.LargeChange + 1); } else if (scrollValue < m_VScroll.SmallChange) { m_VScroll.Value = 0; } else { m_VScroll.Value -= m_VScroll.SmallChange; } ScrollVertically(m_VScroll, new ScrollEventArgs(ScrollEventType.ThumbPosition, scrollValue, m_VScroll.Value, ScrollOrientation.VerticalScroll)); }
protected override bool OnMouseWheel(MouseEventArgs e) { DXMouseEventArgs ee = DXMouseEventArgs.GetMouseArgs(e); //Copied from GridHandler source. //Originally called base.OnMouseWheel, which called View.RaiseMouseWheel. View.RaiseMouseWheel(ee); if (ee.Handled) { return(true); } try { if (View.AllowEditorMouseWheel && View.IsEditing) { return(false); } if (View.FilterPopup != null) { return(true); } View.TopRowIndex += (e.Delta > 0 ? -GetScrollLinesCount() : GetScrollLinesCount()); return(true); } finally { if (View != null && View.ScrollInfo != null && View.ScrollInfo.VScroll != null && View.ScrollInfo.VScroll.Visible) { ee.Handled = true; } } }
bool IsCursorOnColumnButton(System.EventArgs e) { DXMouseEventArgs de = DXMouseEventArgs.GetMouseArgs(View.GridControl, e); object o = View.CalcHitInfo(de.Location); return(View.CalcHitInfo(de.Location).HitTest == GridHitTest.ColumnButton); }
private void gridView1_MouseDown(object sender, MouseEventArgs e) { GridView view = sender as GridView; GridHitInfo hitInfo = view.CalcHitInfo(e.Location); if (hitInfo.InRowCell) { view.FocusedRowHandle = hitInfo.RowHandle; view.FocusedColumn = hitInfo.Column; DXMouseEventArgs.GetMouseArgs(e).Handled = true; if (e.Clicks == 2 && e.Button == System.Windows.Forms.MouseButtons.Left) { if (view.FocusedColumn == gridView1.Columns["MAHOADON"] || view.FocusedColumn == gridView1.Columns["TONGTIEN"] || view.FocusedColumn == gridView1.Columns["CHIETKHAU"] || view.FocusedColumn == gridView1.Columns["KHACHHANG"] || view.FocusedColumn == gridView1.Columns["THUNGAN"]) { } else { view.ShowEditor(); } } if (e.Clicks == 1) { btnXuat.Enabled = true; btnXuat.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; int[] selectedRowHandles = view.GetSelectedRows(); MaHD = view.GetRowCellValue(selectedRowHandles[0], "MAHOADON").ToString(); string maPT = busHD.GetMaPhieuTiemFromHD(MaHD); gridVC.DataSource = busPT.GetVCFromPHIEUTIEM(maPT); } } }
private void controlOnMouseMove(object sender, MouseEventArgs e) { if (Info.ProcessMouse(EventType.MouseMove, DXMouseEventArgs.GetMouseArgs(e))) { Invalidate(); } }
public virtual void TreeMouseMove(MouseEventArgs e) { if (_hitInfo == null) { return; } if (_hitInfo.Node == null) { return; } if (e.Button != MouseButtons.Left) { return; } if (mouseDidNotReallyMove(e, _hitInfo)) { return; } _dragDropInfo = new DragDropInfo(getSelectedTreeNodes()); try { _treeView.DoDragDrop(_dragDropInfo, DragDropEffects.Move); DXMouseEventArgs.GetMouseArgs(e).Handled = true; } finally { _hitInfo = null; _dragDropInfo = null; } }
public override void OnMouseMove(MouseEventArgs ev) { var e = DXMouseEventArgs.GetMouseArgs(ev); var p = new Point(e.X, e.Y); UpdateQuickCustumisationIconState(p); base.OnMouseMove(ev); }
void ActiveEditor_MouseWheel(object sender, MouseEventArgs e) { if (!AllowEditorMouseWheel) { DXMouseEventArgs ee = DXMouseEventArgs.GetMouseArgs(e); this.Handler.ProcessMouseWheel(ee); ee.Handled = true; } }
private void controlOnMouseEnter(object sender, EventArgs e) { var ee = DXMouseEventArgs.GetMouseArgs(control, e); if (Info.ProcessMouse(EventType.MouseEnter, ee)) { Invalidate(); } }
protected override bool OnMouseUp(MouseEventArgs e) { bool result = base.OnMouseUp(e); DXMouseEventArgs ee = DXMouseEventArgs.GetMouseArgs(e); BaseTabPageViewInfoDescendant infodes = ViewInfo.SelectedTabPageViewInfo as BaseTabPageViewInfoDescendant; infodes.PagePanel.ProcessEvent(new ProcessEventEventArgs(EventType.MouseUp, ee)); return(result); }
void view_MouseUp(object sender, MouseEventArgs e) { bool inSelectedCell = GetInSelectedCell(e); if (inSelectedCell) { DXMouseEventArgs.GetMouseArgs(e).Handled = true; view.ShowEditorByMouse(); } }
void vGrid_MouseDown(object sender, MouseEventArgs e) { CloseEditor(); Rectangle editorBounds; if (ClickInEditor(e, out editorBounds)) { ShowEditor(editorBounds); DXMouseEventArgs.GetMouseArgs(e).Handled = true; } }
private void gdcSVNDefaultView_MouseDown(object sender, MouseEventArgs e) { var vw = (GridView)sender; var hitInfo = vw.CalcHitInfo(e.Location); _b = false; if (vw.IsGroupRow(hitInfo.RowHandle)) { _b = SelectChildRows(hitInfo.RowHandle, vw); } DXMouseEventArgs.GetMouseArgs(e).Handled = _b; }
private void gridView1_MouseDown(object sender, MouseEventArgs e) { // SelectCheckBox MouseClick ile secilmesini engelle GridView view = sender as GridView; GridHitInfo hitInfo = view.CalcHitInfo(e.Location); if (hitInfo.Column?.FieldName == "DX$CheckboxSelectorColumn") { DXMouseEventArgs ea = DXMouseEventArgs.GetMouseArgs(e); ea.Handled = true; } }
void view_MouseDown(object sender, MouseEventArgs e) { if (GetInSelectedCell(e)) { GridHitInfo hi = view.CalcHitInfo(e.Location); if (view.FocusedRowHandle == hi.RowHandle) { view.FocusedColumn = hi.Column; DXMouseEventArgs.GetMouseArgs(e).Handled = true; } } }
protected override bool OnMouseDown(MouseEventArgs e) { bool result = base.OnMouseDown(e); DXMouseEventArgs ee = DXMouseEventArgs.GetMouseArgs(e); BaseTabPageViewInfoDescendant infodes = ViewInfo.SelectedTabPageViewInfo as BaseTabPageViewInfoDescendant; if (infodes.PagePanel.Bounds.Contains(e.Location)) { infodes.PagePanel.ProcessEvent(new ProcessEventEventArgs(EventType.MouseDown, ee)); } return(result); }
void OnMouseUp(object sender, MouseEventArgs e) { if (!ColumnHeaderContainsCursor(e.Location)) { return; } if (CheckBoxContainsCursor(e.Location, column)) { ResetChecked(column); SetCheckBoxState(column, ObjectState.Normal); DXMouseEventArgs.GetMouseArgs(e).Handled = true; } }
private void OnMouseDown(MouseEventArgs e) { GridHitInfo hi = _GridView.CalcHitInfo(e.Location); if (!hi.InRow) { return; } _GridView.FocusedRowHandle = hi.RowHandle; _GridView.FocusedColumn = hi.Column; _GridView.InvertRowSelection(hi.RowHandle); DXMouseEventArgs.GetMouseArgs(e).Handled = true; }
private static void ProcessCheckClick(MouseEventArgs e, GridView view, GridHitInfo hi) { view.FocusedColumn = hi.Column; view.FocusedRowHandle = hi.RowHandle; view.ShowEditor(); CheckEdit edit = view.ActiveEditor as CheckEdit; if (edit == null) { return; } edit.Toggle(); DXMouseEventArgs.GetMouseArgs(e).Handled = true; }
public override DXMouseEventArgs OnMouseDown(MouseEventArgs e) { DXMouseEventArgs ee = DXMouseEventArgs.GetMouseArgs(e); if (!ee.Handled) { if (ee.Button == MouseButtons.Left && e.Clicks == 1 && popupListBoxForm.IsSizePoint(e.Location)) { cursor = popupListBoxForm.GetGripCursor(e.Location); ee.Handled = true; StartSizing(); } } return(ee); }
void LayoutView_MouseDown(object sender, MouseEventArgs e) { if (e.Button != MouseButtons.Right || e.Clicks != 1) { return; } DXMouseEventArgs ea = DXMouseEventArgs.GetMouseArgs(e); var hitInfo = ((LayoutView)sender).CalcHitInfo(ea.Location); if (hitInfo.InCard) { var helper = new ColumnViewHelper <TEntity, TID, TUnitOfWork>((ColumnView)sender, ViewModel); ea.Handled = helper.ShowEntityMenu(ea.Location, hitInfo.RowHandle); } }
private void GV_Main_MouseDown(object sender, MouseEventArgs e) { if (IsMuity) { GridHitInfo hitInfo = GV_Main.CalcHitInfo(e.Location); if (hitInfo == null || hitInfo.Column == null) { return; } if (hitInfo.InRowCell) { if (hitInfo.Column.RealColumnEdit is RepositoryItemCheckEdit) { GV_Main.FocusedColumn = hitInfo.Column; GV_Main.FocusedRowHandle = hitInfo.RowHandle; GV_Main.ShowEditor(); CheckEdit edit = GV_Main.ActiveEditor as CheckEdit; if (edit == null) { return; } edit.Toggle(); DXMouseEventArgs.GetMouseArgs(e).Handled = true; GV_Main.CloseEditor(); } } } else { if (e.Button == System.Windows.Forms.MouseButtons.Left) { GridHitInfo hi = GV_Main.CalcHitInfo(e.Location); if (hi == null || hi.Column == null) { return; } if (hi.InRowCell) { if (hi.RowHandle == mouseDownCell.RowHandle && hi.Column == mouseDownCell.Column && mouseDownTime - DateTime.Now < DoubleClickInterval) { DoRowDoubleClick(sender as GridView, e.Location); } } mouseDownCell = new GridCell(hi.RowHandle, hi.Column); mouseDownTime = DateTime.Now; } } }
void OnMouseDown(object sender, MouseEventArgs e) { GridHitInfo hitInfo = view.CalcHitInfo(e.Location); if (e.Button == MouseButtons.Left && HotTrackRectangle.Contains(e.Location)) { if ((SingleClick && e.Clicks == 1) || (!SingleClick && e.Clicks == 2)) { view.FocusedRowHandle = hitInfo.RowHandle; GridViewInfo viewInfo = view.GetViewInfo() as GridViewInfo; GridColumn col = viewInfo.GetNearestColumn(e.Location); ShowGroupEditor(col); DXMouseEventArgs.GetMouseArgs(e).Handled = true; } } }
void OnMouseDown(object sender, MouseEventArgs e) { GridHitInfo hitInfo = view.CalcHitInfo(e.Location); if (hitInfo.HitTest != GridHitTest.Column) { return; } GridColumn column = hitInfo.Column; if (IsButtonRect(e.Location, column)) { SetButtonState(column, ObjectState.Pressed); DXMouseEventArgs.GetMouseArgs(e).Handled = true; } }
private void viewMouseMove(MouseEventArgs e) { if (e.Button == MouseButtons.Left && _downHitInfo != null) { Size dragSize = SystemInformation.DragSize; var dragRect = new Rectangle(new Point(_downHitInfo.HitPoint.X - dragSize.Width / 2, _downHitInfo.HitPoint.Y - dragSize.Height / 2), dragSize); if (!dragRect.Contains(new Point(e.X, e.Y))) { var data = _presenter.SelectedDataColumns; gridControl.DoDragDrop(data, DragDropEffects.Move); _downHitInfo = null; DXMouseEventArgs.GetMouseArgs(e).Handled = true; } } }