Beispiel #1
0
        public void TestJigDrag()
        {
            var circle       = new Circle(new Point3d(), Vector3d.ZAxis, 10.0);
            var promptResult = Interaction.StartDrag("\nCenter:", result =>
            {
                circle.Center = result.Value;
                return(circle);
            });

            if (promptResult.Status != PromptStatus.OK)
            {
                return;
            }
            promptResult = Interaction.StartDrag(new JigPromptDistanceOptions("\nRadius:"), (PromptDoubleResult result) =>
            {
                circle.Radius = result.Value == 0.0 ? 1e-6 : result.Value;
                return(circle);
            });
            if (promptResult.Status == PromptStatus.OK)
            {
                circle.AddToCurrentSpace();
            }
        }