private static void Load() { if (SystemIOFile.Exists(FileName)) { var streamFile = new FileStream(FileName, FileMode.OpenOrCreate); _constantsViewer = (ConstantsViewer) XmlConstantsViewer.Deserialize(streamFile); streamFile.Close(); } }
private static ConstantsViewer Create() { var result = new ConstantsViewer { MinVectorLayerZoomLevel = 7, MaxViewers = 4, OverlayDrawDistance = 30.0, AddressLanguageCode = "nl", CrossCheckSize = 10.0, MeasurementPointSize = 5.0, MeasurementFontSize = 8.0f, MeasurementName = "my measurement" }; result.Save(); return result; }