private void InitFormat(IFrame frame) { Frame = frame; numberFormatInfo = (NumberFormatInfo)CultureInfo.CurrentCulture.NumberFormat.Clone(); int decsym = Settings.GlobalSettings.GetIntValue("Formatting.Decimal", 0); // Systemeinstellung | Punkt | Komma if (decsym == 1) { numberFormatInfo.NumberDecimalSeparator = "."; } else if (decsym == 2) { numberFormatInfo.NumberDecimalSeparator = ","; } numberFormatInfo.NumberDecimalDigits = frame.GetIntSetting("Formatting.Coordinate.Digits", 3); componentsDigits = frame.GetIntSetting("Formatting.Coordinate.ComponentsDigits", 3); }
private void InitFormat(IFrame frame) { MultipleChoiceSetting formattingSystem = frame.GetSetting("Formatting.System") as MultipleChoiceSetting; if (formattingSystem != null && formattingSystem.CurrentSelection >= 0) { displayCoordinateSystem = (DisplayCoordinateSystem)formattingSystem.CurrentSelection; } else { displayCoordinateSystem = DisplayCoordinateSystem.local; } MultipleChoiceSetting formattingZValue = frame.GetSetting("Formatting.Coordinate.ZValue") as MultipleChoiceSetting; if (formattingZValue != null && formattingZValue.CurrentSelection >= 0) { displayZComponent = formattingZValue.CurrentSelection == 0; } else { displayZComponent = true; } alwaysAbsoluteCoordinateSystem = false; alwaysZComponent = false; displayMode = (DisplayMode)frame.GetIntSetting("Formatting.Vector.Mode", 0); numberFormatInfo = (NumberFormatInfo)CultureInfo.CurrentCulture.NumberFormat.Clone(); int decsym = Settings.GlobalSettings.GetIntValue("Formatting.Decimal", 0); // Systemeinstellung | Punkt | Komma // wenn 0, dann unverändert if (decsym == 1) { numberFormatInfo.NumberDecimalSeparator = "."; } else if (decsym == 2) { numberFormatInfo.NumberDecimalSeparator = ","; } numberFormatInfo.NumberDecimalDigits = frame.GetIntSetting("Formatting.Coordinate.Digits", 3); componentsDigits = frame.GetIntSetting("Formatting.Coordinate.ComponentsDigits", 3); angleMode = (AngleMode)frame.GetIntSetting("Formatting.Angle.Mode", 0); angleDigits = frame.GetIntSetting("Formatting.Angle.Digits", 3); this.Frame = frame; }
internal static void Approximate(IFrame frame, IGeoObject toApproximate) { // die Approximation gemäß globaler Einstellung aus einem ShowProperty heraus, // also mit SelectObjectsAction als aktiver Aktion ICurve app = (toApproximate as ICurve).Approximate(frame.GetIntSetting("Approximate.Mode", 0) == 0, frame.GetDoubleSetting("Approximate.Precision", 0.01)); Actions.SelectObjectsAction soa = frame.ActiveAction as Actions.SelectObjectsAction; IGeoObjectOwner addTo = toApproximate.Owner; if (addTo == null) { addTo = frame.ActiveView.Model; } using (frame.Project.Undo.UndoFrame) { addTo.Remove(toApproximate); IGeoObject go = app as IGeoObject; go.CopyAttributes(toApproximate); addTo.Add(go); soa.SetSelectedObjects(new GeoObjectList(go)); } }
private void InitFormat(IFrame frame) { numberFormatInfo = (NumberFormatInfo)CultureInfo.CurrentCulture.NumberFormat.Clone(); int decsym = Settings.GlobalSettings.GetIntValue("Formatting.Decimal", 0); // Systemeinstellung | Punkt | Komma // wenn 0, dann unverändert if (decsym == 1) { numberFormatInfo.NumberDecimalSeparator = "."; } else if (decsym == 2) { numberFormatInfo.NumberDecimalSeparator = ","; } if (frame != null) { numberFormatInfo.NumberDecimalDigits = frame.GetIntSetting("Formatting.GeneralDouble", 3); } else { numberFormatInfo.NumberDecimalDigits = 3; } }