private void SetupHighlighting(IGeometryEditor editor) { mnuHighlightCurrent.Checked = editor.HighlightVertices == LayerSelectionMode.ActiveLayer; mnuHighlightAll.Checked = editor.HighlightVertices == LayerSelectionMode.AllLayers; mnuHighlightNone.Checked = editor.HighlightVertices == LayerSelectionMode.NoLayer; ctxHighlighting.Enabled = true; }
private void SetupSnapping(IGeometryEditor editor) { ctxSnapAll.Checked = editor.SnapBehavior == LayerSelectionMode.AllLayers; ctxSnapNone.Checked = editor.SnapBehavior == LayerSelectionMode.NoLayer; ctxSnapCurrent.Checked = editor.SnapBehavior == LayerSelectionMode.ActiveLayer; ctxSnapToLines.Checked = editor.SnapMode == SnapMode.VerticesAndLines; ctxSnapToVertices.Checked = editor.SnapMode == SnapMode.Vertices; ctxSnapToLines.Checked = editor.SnapMode == SnapMode.Lines; ctxSnapping.Enabled = true; }
private static void UpdateShapeEditorSettings(IGeometryEditor editor, AppConfig config) { Logger.Current.Trace("Start UpdateShapeEditorSettings"); var settings = editor.Settings; editor.ShowArea = config.ShapeEditorShowArea; settings.PointLabelsVisible = config.ShapeEditorShowLabels; settings.ShowBearing = config.ShapeEditorShowBearing; settings.BearingType = config.ShapeEditorBearingType; settings.AnglePrecision = config.ShapeEditorBearingPrecision; settings.AngleFormat = config.ShapeEditorAngleFormat; settings.ShowLength = config.ShapeEditorShowLength; settings.AreaUnits = config.ShapeEditorUnits == LengthDisplay.Metric ? AreaDisplay.Metric : AreaDisplay.American; settings.LengthUnits = config.ShapeEditorUnits == LengthDisplay.Metric ? LengthDisplay.Metric : LengthDisplay.American; settings.LengthPrecision = config.ShapeEditorUnitPrecision; settings.AreaPrecision = config.ShapeEditorUnitPrecision; Logger.Current.Trace("End UpdateShapeEditorSettings"); }