Use InvariantCulture instead of replacing ',' with '.'
This commit is contained in:
@ -8,6 +8,7 @@ using Microsoft.EntityFrameworkCore.ChangeTracking;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
@ -391,8 +392,8 @@ namespace Elwig.Windows {
|
||||
if (e.Length == 1) filter.RemoveAt(i--);
|
||||
} else if (e.Length > 1 && Utils.FromToRegex.IsMatch(e)) {
|
||||
var parts = e.Split("-");
|
||||
double? from = (parts[0].Length > 0) ? double.Parse(parts[0].Replace(".", ",")) : null;
|
||||
double? to = (parts[1].Length > 0) ? double.Parse(parts[1].Replace(".", ",")) : null;
|
||||
double? from = (parts[0].Length > 0) ? double.Parse(parts[0], CultureInfo.InvariantCulture) : null;
|
||||
double? to = (parts[1].Length > 0) ? double.Parse(parts[1], CultureInfo.InvariantCulture) : null;
|
||||
switch ((from, to)) {
|
||||
case ( <= 30, <= 30):
|
||||
case ( <= 30, null):
|
||||
|
Reference in New Issue
Block a user