From 1666c48a3eea912f664ea7d5b688729173402315 Mon Sep 17 00:00:00 2001 From: "marco.silipo" Date: Sat, 14 Mar 2020 02:27:33 +0100 Subject: [PATCH] Fixed invalid localization for colors (comma vs dot) --- Arma.Studio.UiEditor/UI/UiEditorDataContext.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Arma.Studio.UiEditor/UI/UiEditorDataContext.cs b/Arma.Studio.UiEditor/UI/UiEditorDataContext.cs index 99d4762..51b91f2 100644 --- a/Arma.Studio.UiEditor/UI/UiEditorDataContext.cs +++ b/Arma.Studio.UiEditor/UI/UiEditorDataContext.cs @@ -668,13 +668,13 @@ async Task WriteOutConfig(Type t, object obj) { await stream.WriteAsync("[] = { "); var color = (System.Windows.Media.Color)value; - await stream.WriteAsync(Convert.ToString(color.R / 255.0)); + await stream.WriteAsync(Convert.ToString(color.R / 255.0, System.Globalization.CultureInfo.InvariantCulture)); await stream.WriteAsync(", "); - await stream.WriteAsync(Convert.ToString(color.G / 255.0)); + await stream.WriteAsync(Convert.ToString(color.G / 255.0, System.Globalization.CultureInfo.InvariantCulture)); await stream.WriteAsync(", "); - await stream.WriteAsync(Convert.ToString(color.B / 255.0)); + await stream.WriteAsync(Convert.ToString(color.B / 255.0, System.Globalization.CultureInfo.InvariantCulture)); await stream.WriteAsync(", "); - await stream.WriteAsync(Convert.ToString(color.A / 255.0)); + await stream.WriteAsync(Convert.ToString(color.A / 255.0, System.Globalization.CultureInfo.InvariantCulture)); await stream.WriteAsync(" }"); } else if (propertyInfo.PropertyType.IsEnum) @@ -690,7 +690,7 @@ async Task WriteOutConfig(Type t, object obj) else { await stream.WriteAsync(" = "); - await stream.WriteAsync(Convert.ToString(value)); + await stream.WriteAsync(Convert.ToString(value, System.Globalization.CultureInfo.InvariantCulture)); } await stream.WriteLineAsync(";"); }