Compare commits

..

3 Commits

Author SHA1 Message Date
e8919cc629 Explicitly lock inputs in MemberAdminWindow 2023-07-13 20:15:55 +02:00
8d9e713c81 Fix typo in DeliveryPart 2023-07-13 16:58:21 +02:00
ad538ba767 Set global locale to de-DE 2023-07-13 16:57:39 +02:00
4 changed files with 15 additions and 3 deletions

View File

@@ -8,6 +8,9 @@ using Elwig.Helpers;
using Elwig.Helpers.Weighing; using Elwig.Helpers.Weighing;
using System.Collections.Generic; using System.Collections.Generic;
using System.Windows.Threading; using System.Windows.Threading;
using System.Globalization;
using System.Threading;
using System.Windows.Markup;
namespace Elwig { namespace Elwig {
public partial class App : Application { public partial class App : Application {
@@ -32,6 +35,16 @@ namespace Elwig {
} }
protected override void OnStartup(StartupEventArgs evt) { protected override void OnStartup(StartupEventArgs evt) {
var locale = new CultureInfo("de-DE"); // de-AT uses ' ' as thousands separator :(
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.IetfLanguageTag))
);
Dictionary<string, string> branches = new(); Dictionary<string, string> branches = new();
using (var ctx = new AppDbContext()) { using (var ctx = new AppDbContext()) {
if (!ctx.Database.CanConnect()) { if (!ctx.Database.CanConnect()) {

View File

@@ -105,6 +105,6 @@ namespace Elwig.Models {
public virtual ISet<DeliveryPartModifier> PartModifiers { get; private set; } public virtual ISet<DeliveryPartModifier> PartModifiers { get; private set; }
[NotMapped] [NotMapped]
public IEnumerable<Modifier> Modifiiers => PartModifiers.Select(m => m.Modifier); public IEnumerable<Modifier> Modifiers => PartModifiers.Select(m => m.Modifier);
} }
} }

View File

@@ -18,12 +18,10 @@
<Setter Property="VerticalAlignment" Value="Top"/> <Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="FontSize" Value="14"/> <Setter Property="FontSize" Value="14"/>
<Setter Property="Padding" Value="2"/> <Setter Property="Padding" Value="2"/>
<Setter Property="IsReadOnly" Value="True"/>
<Setter Property="Height" Value="25"/> <Setter Property="Height" Value="25"/>
<Setter Property="TextWrapping" Value="NoWrap"/> <Setter Property="TextWrapping" Value="NoWrap"/>
</Style> </Style>
<Style TargetType="ComboBox"> <Style TargetType="ComboBox">
<Setter Property="IsEnabled" Value="False"/>
<Setter Property="Height" Value="25"/> <Setter Property="Height" Value="25"/>
<Setter Property="FontSize" Value="14"/> <Setter Property="FontSize" Value="14"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/> <Setter Property="HorizontalAlignment" Value="Stretch"/>

View File

@@ -55,6 +55,7 @@ namespace Elwig.Windows {
private void Window_Loaded(object sender, RoutedEventArgs evt) { private void Window_Loaded(object sender, RoutedEventArgs evt) {
ActiveMemberInput.IsChecked = true; ActiveMemberInput.IsChecked = true;
UpdatePhoneNrInputVisibility(); UpdatePhoneNrInputVisibility();
LockInputs();
} }
private async Task RefreshMemberList() { private async Task RefreshMemberList() {