protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); if (SeparatorMouseEvent != null) { SeparatorMouseEventArgs args = new SeparatorMouseEventArgs(); args.Location = PointToScreen(e.Location); args.SeparatorIndex = SeparatorIndex; SeparatorMouseEvent(this, args); } }
private void OnSeparatorMouseEvent(object sender, SeparatorMouseEventArgs e) { if (e.SeparatorIndex == 0) { _fieldControls[0].TakeFocus(Direction.Forward, Selection.None); } else if (e.SeparatorIndex == FieldCount) { _fieldControls[FieldCount - 1].TakeFocus(Direction.Reverse, Selection.None); } else { Point location = PointToClient(e.Location); HandleMouseDown(location); } }
protected override void OnMouseDown(MouseEventArgs e) { if (null == e) { throw new ArgumentNullException("e"); } base.OnMouseDown(e); if (SeparatorMouseEvent != null) { SeparatorMouseEventArgs args = new SeparatorMouseEventArgs(); args.Location = PointToScreen(e.Location); args.SeparatorIndex = SeparatorIndex; SeparatorMouseEvent(this, args); } }
protected override void OnMouseDown( MouseEventArgs e ) { base.OnMouseDown( e ); if ( SeparatorMouseEvent != null ) { SeparatorMouseEventArgs args = new SeparatorMouseEventArgs(); args.Location = PointToScreen( e.Location ); args.SeparatorIndex = SeparatorIndex; SeparatorMouseEvent( this, args ); } }
private void OnSeparatorMouseEvent( object sender, SeparatorMouseEventArgs e ) { if ( e.SeparatorIndex == 0 ) { _fieldControls[ 0 ].TakeFocus( Direction.Forward, Selection.None ); } else if ( e.SeparatorIndex == FieldCount ) { _fieldControls[ FieldCount - 1 ].TakeFocus( Direction.Reverse, Selection.None ); } else { Point location = PointToClient( e.Location ); HandleMouseDown( location ); } }