public override bool ProcessMouseButtonDown( CanonicalMouseEventArgs e, InteractionContext context) { this.OnChanged((EventArgs)null); return(this.IsActive); }
public override bool ProcessMouseButtonUp(CanonicalMouseEventArgs e, InteractionContext context) { bool isActive = this.IsActive; if (this.IsActive) { WW.Math.Point2D position = e.Position; WW.Math.Point2D vertex = context.InverseProjectionTransform.TransformTo2D(position); if (this.dxfLwPolyline_0.Vertices.Count > 0 && WW.Math.Point2D.AreApproxEqual(context.ProjectionTransform.TransformTo2D(this.dxfLwPolyline_0.Vertices[0].Position), position, this.double_0)) { this.dxfLwPolyline_0.Closed = true; this.Deactivate(); } if (this.IsActive) { this.dxfLwPolyline_0.Vertices.Add(vertex); if (e.LeftButtonDown) { if (this.dxfLwPolyline_0.Vertices.Count == 1) { this.node_0 = new WW.Cad.Drawing.Node((WW.Math.Point3D)vertex); this.dxfLwPolyline_0.Vertices.Add(vertex); } this.OnChanged((EventArgs)null); } else if (e.RightButtonDown) { this.Deactivate(); } } } return(isActive); }
public override bool ProcessMouseButtonUp( CanonicalMouseEventArgs e, InteractionContext context) { this.int_2 = this.method_1(context, e.Position); bool isActive = this.IsActive; if (this.IsActive) { if (this.int_0 > 0) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type DxfEntity.EditInteractor.Class16 class16 = new DxfEntity.EditInteractor.Class16(); // ISSUE: reference to a compiler-generated field class16.editInteractor_0 = this; int int1 = this.int_1; WW.Math.Point3D point3D0 = this.point3D_0; WW.Math.Point3D newOcsPoint = this.Entity.Transform.GetInverse().Transform(this.GetWcsPosition(e, context)); // ISSUE: reference to a compiler-generated field class16.action_0 = this.CreateDoAction(int1, newOcsPoint); // ISSUE: reference to a compiler-generated field class16.action_1 = this.CreateUndoAction(int1, point3D0); // ISSUE: reference to a compiler-generated method // ISSUE: reference to a compiler-generated method this.OnCommandCreated(new CommandEventArgs((ICommand) new WW.Actions.Command((object)this.Entity, new System.Action(class16.method_0), new System.Action(class16.method_1)))); this.Deactivate(); } else { ++this.int_0; } } return(isActive); }
public override bool ProcessMouseMove(CanonicalMouseEventArgs e, InteractionContext context) { bool flag = base.ProcessMouseMove(e, context); this.OnMouseMoveProcessed(new InteractorMouseEventArgs(e, context)); return(flag); }
public override bool ProcessMouseButtonUp(CanonicalMouseEventArgs e, InteractionContext context) { if (this.IsActive) { this.Deactivate(); } return(true); }
public override bool ProcessMouseMove(CanonicalMouseEventArgs e, InteractionContext context) { if (this.IsActive) { this.nullable_0 = new WW.Math.Point3D?(this.GetWcsPosition(e, context)); this.bool_0 = e.WcsPositionIsSnapped; } return(this.IsActive); }
public override bool ProcessMouseMove(CanonicalMouseEventArgs e, InteractionContext context) { base.ProcessMouseMove(e, context); this.int_2 = this.method_1(context, e.Position); if (this.IsActive && this.int_0 > 0) { this.method_0(e, context); } return(this.IsActive); }
public override bool ProcessMouseMove(CanonicalMouseEventArgs e, InteractionContext context) { if (this.IsActive) { Vector2D vector2D = e.Position - this.point2D_0; this.vector2D_0 = this.vector2D_1 + new Vector2D(vector2D.X * 2.0 / context.CanvasRectangle.Size.X, -vector2D.Y * 2.0 / context.CanvasRectangle.Size.Y); this.OnTranslationChanged((EventArgs)e); } return(true); }
public override bool ProcessKeyDown( CanonicalMouseEventArgs e, System.Windows.Input.Key key, System.Windows.Input.ModifierKeys modifierKeys, InteractionContext context ) { MessageBox.Show(e.GetWcsPosition(context).ToString()); return(true); }
public override bool ProcessMouseMove(CanonicalMouseEventArgs e, InteractionContext context) { if (this.node_0 != null) { this.node_0.HighLighted = WW.Math.Point2D.AreApproxEqual(context.ProjectionTransform.TransformTo2D(this.node_0.Position), e.Position, 0.5 * this.double_0); } this.dxfLine_0.End = context.InverseProjectionTransform.TransformTo3D(e.Position); this.OnChanged((EventArgs)null); return(this.IsActive); }
public override bool ProcessMouseButtonDown( CanonicalMouseEventArgs e, InteractionContext context) { if (e.MouseButtonFlags != this.mouseButtonFlags_0) { return(false); } this.Activate(); return(base.ProcessMouseButtonDown(e, context)); }
public override bool ProcessMouseButtonDown( CanonicalMouseEventArgs e, InteractionContext context) { if (this.IsActive) { this.vector2D_1 = this.vector2D_0; this.point2D_0 = e.Position; } return(true); }
public override bool ProcessMouseButtonDown( CanonicalMouseEventArgs e, InteractionContext context) { if (!this.IsActive) { return(false); } if (!e.LeftButtonDown) { return(e.RightButtonDown); } return(true); }
public override bool ProcessMouseMove(CanonicalMouseEventArgs e, InteractionContext context) { base.ProcessMouseMove(e, context); if (this.IsActive) { WW.Math.Point3D point3D = this.Entity.Transform.GetInverse().Transform(this.GetWcsPosition(e, context)); if (this.int_0 >= 0 && this.int_0 < this.icontrolPointCollection_0.Count) { for (int int0 = this.int_0; int0 < this.icontrolPointCollection_0.Count; ++int0) { this.icontrolPointCollection_0.Set(int0, point3D); } this.UpdateEntityPostAction(); this.OnEntityChanged(new EntityEventArgs(this.Entity)); } } return(this.IsActive); }
public override bool ProcessMouseButtonUp( CanonicalMouseEventArgs e, InteractionContext context) { bool flag; if (flag = this.IsActive && (e.LeftButtonDown || e.RightButtonDown)) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type DxfEntity.DefaultCreateInteractor.Class19 class19 = new DxfEntity.DefaultCreateInteractor.Class19(); WW.Math.Point3D wcsPosition = this.GetWcsPosition(e, context); // ISSUE: reference to a compiler-generated field class19.point3D_0 = this.Entity.Transform.GetInverse().Transform(wcsPosition); if (this.int_0 >= 0 && this.int_0 < this.icontrolPointCollection_0.Count || !this.Entity.InteractionControlPoints.IsCountFixed) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type DxfEntity.DefaultCreateInteractor.Class20 class20 = new DxfEntity.DefaultCreateInteractor.Class20(); // ISSUE: reference to a compiler-generated field class20.class19_0 = class19; // ISSUE: reference to a compiler-generated field class20.defaultCreateInteractor_0 = this; // ISSUE: reference to a compiler-generated field class20.bool_0 = !this.Entity.InteractionControlPoints.IsCountFixed ? e.RightButtonDown : this.int_0 >= this.ControlPointCommitIndex; CommandGroup commandGroup = new CommandGroup((object)this.Entity); commandGroup.DoStack.Push((ICommand) new WW.Actions.Command((object)this.Entity, (System.Action)(() => ++ this.int_0), (System.Action)(() => -- this.int_0))); // ISSUE: reference to a compiler-generated method // ISSUE: reference to a compiler-generated method WW.Actions.Command command = new WW.Actions.Command((object)this.Entity, new System.Action(class20.method_0), new System.Action(class20.method_1)); commandGroup.DoStack.Push((ICommand)command); this.itransaction_0.Add((ICommand)commandGroup); // ISSUE: reference to a compiler-generated field if (class20.bool_0) { this.itransaction_0.Commit(); } } } return(flag); }
public override bool ProcessMouseButtonUp(CanonicalMouseEventArgs e, InteractionContext context) { bool isActive = this.IsActive; if (this.IsActive) { WW.Math.Point2D position1 = e.Position; WW.Math.Point3D position2 = context.InverseProjectionTransform.TransformTo3D(position1); if (this.node_0 == null) { this.dxfLine_0.Start = position2; this.node_0 = new WW.Cad.Drawing.Node(position2); this.OnChanged((EventArgs)null); } else { this.dxfLine_0.End = position2; this.Deactivate(); } } return(isActive); }
public override bool ProcessMouseButtonDown( CanonicalMouseEventArgs e, InteractionContext context) { if (!this.IsActive) { if (this.int_0 == 0) { this.int_1 = this.int_2 = this.method_1(context, e.Position); if (this.int_1 >= 0) { this.Activate(); this.point3D_0 = this.Entity.InteractionControlPoints.Get(this.int_1); } } else if (this.int_0 > 0) { this.method_0(e, context); } } return(this.IsActive); }
private void method_0(CanonicalMouseEventArgs e, InteractionContext context) { this.Entity.InteractionControlPoints.Set(this.int_1, this.GetWcsPosition(e, context)); this.UpdateEntityPostAction(); this.OnEntityChanged(new EntityEventArgs(this.Entity)); }
public WW.Math.Point3D GetWcsPosition( CanonicalMouseEventArgs e, InteractionContext context) { return(this.ProcessWcsPosition(context, e.GetWcsPosition(context))); }