Use de-AT locale with narrow nbsp
This commit is contained in:
@ -35,7 +35,10 @@ namespace Elwig {
|
||||
}
|
||||
|
||||
protected override void OnStartup(StartupEventArgs evt) {
|
||||
var locale = new CultureInfo("de-DE"); // de-AT uses ' ' as thousands separator :(
|
||||
var locale = new CultureInfo("de-AT");
|
||||
locale.NumberFormat.CurrencyGroupSeparator = "\u202f";
|
||||
locale.NumberFormat.NumberGroupSeparator = "\u202f";
|
||||
locale.NumberFormat.PercentGroupSeparator = "\u202f";
|
||||
Thread.CurrentThread.CurrentCulture = locale;
|
||||
Thread.CurrentThread.CurrentUICulture = locale;
|
||||
CultureInfo.DefaultThreadCurrentCulture = locale;
|
||||
|
@ -15,7 +15,7 @@ namespace Elwig.Dialogs {
|
||||
|
||||
private void ConfirmButton_Click(object sender, RoutedEventArgs evt) {
|
||||
DialogResult = true;
|
||||
Weight = int.Parse(WeightInput.Text.Replace(".", ""));
|
||||
Weight = int.Parse(WeightInput.Text.Replace("\u202f", ""));
|
||||
Reason = Regex.Replace(ReasonInput.Text, @"\s+", "").Trim();
|
||||
if (Reason == "") {
|
||||
Reason = null;
|
||||
|
@ -297,7 +297,7 @@ namespace Elwig.Windows {
|
||||
d.Comment = (CommentInput.Text == "") ? null : CommentInput.Text;
|
||||
|
||||
p.SortId = (WineVarietyInput.SelectedItem as WineVar)?.SortId;
|
||||
p.Weight = int.Parse(WeightInput.Text.Replace(".", ""));
|
||||
p.Weight = int.Parse(WeightInput.Text.Replace("\u202f", ""));
|
||||
p.Kmw = double.Parse(GradationKmwInput.Text);
|
||||
p.QualId = (WineQualityLevelInput.SelectedItem as WineQualLevel)?.QualId;
|
||||
p.HkId = (WineOriginInput.SelectedItem as WineOrigin)?.HkId;
|
||||
|
Reference in New Issue
Block a user