internal void Save(XElement xParent) { var nfi = new NumberFormatInfo(); nfi.NumberDecimalSeparator = "."; xParent.Add( new XElement("Drawing", new XAttribute("Name", DrawingName), new XElement("ExportFormat", ExportFormat.ToString()), new XElement("DrawingSize", DrawingSize.ToString(nfi)), new XElement("SaveDrawingSize", SaveDrawingSize.ToString()))); }
public void SaveTo(string filename) { var file = new IniFile(); file["PARAMETERS"]["WIDTH"] = Width.ToString(CultureInfo.InvariantCulture); file["PARAMETERS"]["HEIGHT"] = Height.ToString(CultureInfo.InvariantCulture); file["PARAMETERS"]["X_OFFSET"] = XOffset.ToString(CultureInfo.InvariantCulture); file["PARAMETERS"]["Z_OFFSET"] = ZOffset.ToString(CultureInfo.InvariantCulture); file["PARAMETERS"]["MARGIN"] = Margin.ToString(CultureInfo.InvariantCulture); file["PARAMETERS"]["SCALE_FACTOR"] = ScaleFactor.ToString(CultureInfo.InvariantCulture); file["PARAMETERS"]["DRAWING_SIZE"] = DrawingSize.ToString(CultureInfo.InvariantCulture); file.Save(filename); }