protected override void OnMouseLeave(EventArgs e) { base.OnMouseLeave(e); if (MouseState != MouseState.DOWN) { Cursor = Cursors.Default; CursorUpdate?.Invoke(this, Cursor); } if (AutoShow) { Hide(); } }
protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (DesignMode) { return; } if (_drawerItemRects == null) { UpdateTabRects(); } Cursor previousCursor = Cursor; if (e.Location.X + this.Location.X < BORDER_WIDTH) { if (e.Location.Y > this.Height - BORDER_WIDTH) { Cursor = Cursors.SizeNESW; //Bottom Left } else { Cursor = Cursors.SizeWE; //Left } } else if (e.Location.Y > this.Height - BORDER_WIDTH) { Cursor = Cursors.SizeNS; //Bottom } else { if (e.Location.Y < _drawerItemRects[_drawerItemRects.Count - 1].Bottom && (e.Location.X + this.Location.X) >= BORDER_WIDTH) { Cursor = Cursors.Hand; } else { Cursor = Cursors.Default; } } if (previousCursor != Cursor) { CursorUpdate?.Invoke(this, Cursor); } }
private async void CenterCursor() { Logger.Log("Centering cursor"); CursorUpdate update_zoom = new CursorUpdate(); update_zoom.x = update_zoom.y = 0; if (update_zoom.x < -cursorThreshold || update_zoom.x > cursorThreshold || update_zoom.y < -cursorThreshold || update_zoom.y > cursorThreshold) { return; } this.t_Transform.TranslateX = update_zoom.x * this.RemoteVideo.ActualWidth; this.t_Transform.TranslateY = update_zoom.y * this.RemoteVideo.ActualHeight; await this.client.SendMessage( "CursorUpdate", "{ x: " + update_zoom.x.ToString() + ", y: " + update_zoom.y.ToString() + "}" ); }
protected override void OnMouseLeave(EventArgs e) { base.OnMouseLeave(e); if (MouseState != MouseState.DOWN) { Cursor = Cursors.Default; CursorUpdate?.Invoke(this, Cursor); } if (AutoShow) { if (DisplayRectangle.Contains(Control.MousePosition) == false) { Hide(); } } }
protected override void OnMouseMove(MouseEventArgs e) { if (DesignMode) { return; } if (e.Button == MouseButtons.Left && e.Y != _lastMouseY && (Location.Y < 0 || Height < (8 + drawerItemHeight) * _drawerItemRects.Count)) { int diff = e.Y - _lastMouseY; if (diff > 0) { if (Location.Y < 0) { Location = new Point(Location.X, Location.Y + diff > 0 ? 0 : Location.Y + diff); Height = Parent.Height + Math.Abs(Location.Y); } } else { if (Height < (8 + drawerItemHeight) * _drawerItemRects.Count) { Location = new Point(Location.X, Location.Y + diff); Height = Parent.Height + Math.Abs(Location.Y); } } //return; } base.OnMouseMove(e); if (_drawerItemRects == null) { UpdateTabRects(); } Cursor previousCursor = Cursor; if (e.Location.X + this.Location.X < BORDER_WIDTH) { if (e.Location.Y > this.Height - BORDER_WIDTH) { Cursor = Cursors.SizeNESW; //Bottom Left } else { Cursor = Cursors.SizeWE; //Left } } else if (e.Location.Y > this.Height - BORDER_WIDTH) { Cursor = Cursors.SizeNS; //Bottom } else { if (e.Location.Y < _drawerItemRects[_drawerItemRects.Count - 1].Bottom && (e.Location.X + this.Location.X) >= BORDER_WIDTH) { Cursor = Cursors.Hand; } else { Cursor = Cursors.Default; } } if (previousCursor != Cursor) { CursorUpdate?.Invoke(this, Cursor); } }
public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext) { base.CopyFrom(from, cloneContext); DxfDimensionStyle dxfDimensionStyle = (DxfDimensionStyle)from; this.standardFlags_0 = dxfDimensionStyle.standardFlags_0; this.string_1 = dxfDimensionStyle.string_1; this.string_2 = dxfDimensionStyle.string_2; this.string_3 = dxfDimensionStyle.string_3; this.double_0 = dxfDimensionStyle.double_0; this.double_1 = dxfDimensionStyle.double_1; this.double_2 = dxfDimensionStyle.double_2; this.double_3 = dxfDimensionStyle.double_3; this.double_4 = dxfDimensionStyle.double_4; this.double_5 = dxfDimensionStyle.double_5; this.double_6 = dxfDimensionStyle.double_6; this.double_7 = dxfDimensionStyle.double_7; this.double_8 = dxfDimensionStyle.double_8; this.double_9 = dxfDimensionStyle.double_9; this.double_10 = dxfDimensionStyle.double_10; this.double_11 = dxfDimensionStyle.double_11; this.double_12 = dxfDimensionStyle.double_12; this.double_13 = dxfDimensionStyle.double_13; this.double_14 = dxfDimensionStyle.double_14; this.double_15 = dxfDimensionStyle.double_15; this.double_16 = dxfDimensionStyle.double_16; this.double_17 = dxfDimensionStyle.double_17; this.bool_0 = dxfDimensionStyle.bool_0; this.bool_1 = dxfDimensionStyle.bool_1; this.bool_2 = dxfDimensionStyle.bool_2; this.bool_3 = dxfDimensionStyle.bool_3; this.bool_4 = dxfDimensionStyle.bool_4; this.bool_5 = dxfDimensionStyle.bool_5; this.dimensionTextVerticalAlignment_0 = dxfDimensionStyle.dimensionTextVerticalAlignment_0; this.zeroHandling_0 = dxfDimensionStyle.zeroHandling_0; this.zeroHandling_1 = dxfDimensionStyle.zeroHandling_1; this.bool_6 = dxfDimensionStyle.bool_6; this.short_0 = dxfDimensionStyle.short_0; this.bool_7 = dxfDimensionStyle.bool_7; this.bool_8 = dxfDimensionStyle.bool_8; this.bool_9 = dxfDimensionStyle.bool_9; this.bool_10 = dxfDimensionStyle.bool_10; this.color_0 = dxfDimensionStyle.color_0; this.color_1 = dxfDimensionStyle.color_1; this.color_2 = dxfDimensionStyle.color_2; this.short_1 = dxfDimensionStyle.short_1; this.short_2 = dxfDimensionStyle.short_2; this.alternateUnitFormat_0 = dxfDimensionStyle.alternateUnitFormat_0; this.short_3 = dxfDimensionStyle.short_3; this.angularUnit_0 = dxfDimensionStyle.angularUnit_0; this.linearUnitFormat_0 = dxfDimensionStyle.linearUnitFormat_0; this.fractionFormat_0 = dxfDimensionStyle.fractionFormat_0; this.char_0 = dxfDimensionStyle.char_0; this.textMovement_0 = dxfDimensionStyle.textMovement_0; this.dimensionTextHorizontalAlignment_0 = dxfDimensionStyle.dimensionTextHorizontalAlignment_0; this.bool_11 = dxfDimensionStyle.bool_11; this.bool_12 = dxfDimensionStyle.bool_12; this.toleranceAlignment_0 = dxfDimensionStyle.toleranceAlignment_0; this.zeroHandling_2 = dxfDimensionStyle.zeroHandling_2; this.short_4 = dxfDimensionStyle.short_4; this.zeroHandling_3 = dxfDimensionStyle.zeroHandling_3; this.zeroHandling_4 = dxfDimensionStyle.zeroHandling_4; this.cursorUpdate_0 = dxfDimensionStyle.cursorUpdate_0; this.short_5 = dxfDimensionStyle.short_5; this.short_6 = dxfDimensionStyle.short_6; this.arrowsTextFitType_0 = dxfDimensionStyle.arrowsTextFitType_0; this.double_18 = dxfDimensionStyle.double_18; this.bool_13 = dxfDimensionStyle.bool_13; this.double_19 = dxfDimensionStyle.double_19; this.dimensionTextBackgroundFillMode_0 = dxfDimensionStyle.dimensionTextBackgroundFillMode_0; this.color_3 = dxfDimensionStyle.color_3; this.arcLengthSymbolPosition_0 = dxfDimensionStyle.arcLengthSymbolPosition_0; this.textDirection_0 = dxfDimensionStyle.textDirection_0; this.double_20 = dxfDimensionStyle.double_20; this.string_4 = dxfDimensionStyle.string_4; this.double_21 = dxfDimensionStyle.double_21; this.string_5 = dxfDimensionStyle.string_5; }