[#11] Tests: Add DeliveryServiceTest
All checks were successful
Test / Run tests (push) Successful in 1m56s
All checks were successful
Test / Run tests (push) Successful in 1m56s
This commit is contained in:
@ -28,6 +28,9 @@ using LinqKit;
|
||||
using System.Linq.Expressions;
|
||||
using Elwig.Models;
|
||||
using Microsoft.Win32;
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace Elwig.Helpers {
|
||||
public static partial class Utils {
|
||||
@ -118,6 +121,23 @@ namespace Elwig.Helpers {
|
||||
0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040,
|
||||
];
|
||||
|
||||
public static void OverrideCulture() {
|
||||
var locale = new CultureInfo("de-AT", false);
|
||||
locale.NumberFormat.CurrencyGroupSeparator = Utils.GroupSeparator;
|
||||
locale.NumberFormat.NumberGroupSeparator = Utils.GroupSeparator;
|
||||
locale.NumberFormat.PercentGroupSeparator = Utils.GroupSeparator;
|
||||
CultureInfo.CurrentCulture = locale;
|
||||
CultureInfo.CurrentUICulture = locale;
|
||||
Thread.CurrentThread.CurrentCulture = locale;
|
||||
Thread.CurrentThread.CurrentUICulture = locale;
|
||||
CultureInfo.DefaultThreadCurrentCulture = locale;
|
||||
CultureInfo.DefaultThreadCurrentUICulture = locale;
|
||||
FrameworkElement.LanguageProperty.OverrideMetadata(
|
||||
typeof(FrameworkElement),
|
||||
new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.Name))
|
||||
);
|
||||
}
|
||||
|
||||
public static SerialPort OpenSerialConnection(string connection) {
|
||||
var m = SerialRegex.Match(connection);
|
||||
if (!m.Success)
|
||||
|
Reference in New Issue
Block a user