Ejemplo n.º 1
0
 public override string ConstructionHintText(Drawing.ConstructionStepCompleteEventArgs args)
 {
     if (FoundDependencies.Count == 0)
     {
         return("Select the source figure.");
     }
     else if (FoundDependencies.Count == 1)
     {
         return("Select a mirror. The mirror can be a point, line, segment, ray, or circle (if the source is a point).");
     }
     return(base.ConstructionHintText(args));
 }
Ejemplo n.º 2
0
 private void mCurrentDrawing_ConstructionStepComplete(object sender, Drawing.ConstructionStepCompleteEventArgs args)
 {
     if (args.ConstructionComplete)
     {
         ConstructionInProgress = false;
         UpdateUndoRedo();
         Drawing.ClearStatus();
     }
     else
     {
         Drawing.RaiseDisplayProperties(Drawing.Behavior.PropertyBag);
         CommandRedo.Enabled = false;
         Drawing.RaiseStatusNotification(Drawing.Behavior.ConstructionHintText(args));
     }
 }
Ejemplo n.º 3
0
 public override string ConstructionHintText(Drawing.ConstructionStepCompleteEventArgs args)
 {
     if (FoundDependencies.Count == 0)
     {
         return("Select the source figure.");
     }
     else if (FoundDependencies.Count == 1)
     {
         return("Select a point to use for the center of dilation.");
     }
     else if (FoundDependencies.Count == 2)
     {
         return("Define the dilation factor by selecting a figure with length or entering a value.");
     }
     return(base.ConstructionHintText(args));
 }
Ejemplo n.º 4
0
 public override string ConstructionHintText(Drawing.ConstructionStepCompleteEventArgs args)
 {
     if (FoundDependencies.Count == 0)
     {
         return("Select the source figure.");
     }
     else if (FoundDependencies.Count == 1)
     {
         return("Select a point to use for the center of rotation.");
     }
     else if (FoundDependencies.Count == 2)
     {
         return("Define the angle by selecting a figure with an angle (such as an arc or angle measurement) or entering the value.");
     }
     return(base.ConstructionHintText(args));
 }
Ejemplo n.º 5
0
 public override string ConstructionHintText(Drawing.ConstructionStepCompleteEventArgs args)
 {
     if (FoundDependencies.Count == 0)
     {
         return("Select the source figure.");
     }
     else if (FoundDependencies.Count == 1)
     {
         return("Define the translation magnitude by selecting a vector, figure with length, or entering the value.");
     }
     else if (FoundDependencies.Count == 2)
     {
         return("Define the translation direction by selecting a vector, figure with an angle or entering the value.");
     }
     return(base.ConstructionHintText(args));
 }
Ejemplo n.º 6
0
        public virtual string ConstructionHintText(Drawing.ConstructionStepCompleteEventArgs args)
        {
            string expectedFigure = "";

            if (args.FigureTypeNeeded.HasInterface <IPoint>())
            {
                expectedFigure = "point";
            }
            else if (args.FigureTypeNeeded == typeof(Vector))
            {
                expectedFigure = "vector or enter values";
            }
            else if (args.FigureTypeNeeded == typeof(IAngleProvider))
            {
                expectedFigure = "figure with an angle such as an arc or enter value";
            }
            else if (args.FigureTypeNeeded == typeof(ILengthProvider))
            {
                expectedFigure = "figure with length such as a segment or enter value";
            }
            else if (args.FigureTypeNeeded.HasInterface <ILine>())
            {
                expectedFigure = "line, ray or a segment";
            }
            else if (args.FigureTypeNeeded.HasInterface <ICircle>())
            {
                expectedFigure = "circle";
            }
            else if (args.FigureTypeNeeded.HasInterface <IEllipse>())
            {
                expectedFigure = "circle or ellipse";
            }
            else if (args.FigureTypeNeeded.HasInterface <ILinearFigure>())
            {
                expectedFigure = "line or a circle";
            }
            else
            {
                expectedFigure = args.FigureTypeNeeded.Name;
            }
            string hint = string.Format("Select a {0}.", expectedFigure);

            return(hint);
        }