private static string GetPlaneStyleVariant(DrawingPlane drawing)
        {
            // Style variants of DrawingPlane: Plane, Grid.
            if (!drawing.DrawingStyle.Elements.ContainsKey("perspective"))
            {
                return("Plane");
            }

            StyleElementToggle elementPerspective = drawing.DrawingStyle.Elements["perspective"] as StyleElementToggle;

            if (elementPerspective == null)
            {
                return("Plane");
            }

            bool valuePerspective = (bool)elementPerspective.Value;

            if (valuePerspective)
            {
                return("Plane");
            }
            else
            {
                return("Grid");
            }
        }
Example #2
0
        public FormCalibratePlane(CalibrationHelper calibrationHelper, DrawingPlane drawingPlane)
        {
            this.calibrationHelper = calibrationHelper;
            this.drawingPlane      = drawingPlane;
            this.quadrilateral     = drawingPlane.QuadImage;

            InitializeComponent();
            LocalizeForm();
            InitializeValues();
        }