public Form11( DxfEntity.Interactor interactor, Control hostControl, IInteractorWinFormsDrawable baseDrawable) : base(interactor, baseDrawable) { this.control_0 = hostControl; this.fieldEditControl_0 = FieldEditControl.Create(Class675.Length); this.fieldEditControl_0.TextBox.KeyPress += new KeyPressEventHandler(this.method_0); interactor.Activated += new EventHandler(this.method_2); interactor.Deactivated += new EventHandler(this.method_4); if (!interactor.IsActive) { return; } this.method_3(); }
public override void Draw( PaintEventArgs e, GraphicsHelper graphicsHelper, InteractionContext context) { base.Draw(e, graphicsHelper, context); IControlPointCollection controlPoints = this.Interactor.ControlPoints; Matrix4D matrix4D1 = context.ProjectionTransform * this.Interactor.Entity.Transform; for (int index = 0; index < controlPoints.Count; ++index) { graphicsHelper.DrawEditHandle(e.Graphics, graphicsHelper.DefaultPen, matrix4D1.TransformTo2D(controlPoints.Get(index))); } DxfEntity.Interactor interactor = this.Interactor; if (!interactor.MouseWcsPosition.HasValue) { return; } Matrix4D matrix4D2 = context.ProjectionTransform * this.Interactor.Entity.Transform; graphicsHelper.DrawEditHandle(e.Graphics, interactor.PositionIsSnapped ? graphicsHelper.HighlightPen : graphicsHelper.DefaultPen, matrix4D2.TransformTo2D(interactor.MouseWcsPosition.Value)); }
public static WW.Math.Point3D SnapHorizontalOrVertical( DxfEntity.Interactor interactor, WW.Math.Point3D p, InteractionContext context, int controlPointIndex) { bool flag = InputUtil.IsShiftPressed(); CadInteractionContext interactionContext = context as CadInteractionContext; if (interactionContext != null) { flag ^= interactionContext.DefaultNonDiagonalLines; } if (interactor.IsActive && flag) { DxfLine entity = (DxfLine)interactor.Entity; WW.Math.Point2D point2D1 = context.ProjectionTransform.TransformTo2D(controlPointIndex == 0 ? entity.point3D_1 : entity.point3D_0); WW.Math.Point3D point3D = p; WW.Math.Point2D point2D2 = context.ProjectionTransform.TransformTo2D((WW.Math.Point2D)point3D); Vector2D vector2D = point2D2 - point2D1; p = System.Math.Abs(vector2D.X) >= System.Math.Abs(vector2D.Y) ? context.InverseProjectionTransform.TransformTo3D(new WW.Math.Point2D(point2D2.X, point2D1.Y)) : context.InverseProjectionTransform.TransformTo3D(new WW.Math.Point2D(point2D1.X, point2D2.Y)); } return(p); }
public WinFormsDrawable(DxfEntity.Interactor interactor) { this.interactor_0 = interactor; }
public WinFormsDrawable(DxfEntity.Interactor interactor) : base(interactor) { }
public Form10(DxfEntity.Interactor interactor, IInteractorWinFormsDrawable baseDrawable) { this.interactor_0 = interactor; this.iinteractorWinFormsDrawable_0 = baseDrawable; }