Compare commits
13 Commits
v0.8.1
...
601ac548fe
| Author | SHA1 | Date | |
|---|---|---|---|
| 601ac548fe | |||
| 4e477c38e0 | |||
| 46fc0db6ba | |||
| a531e948c1 | |||
| cc4ec6c5db | |||
| ff375e3caf | |||
| 5b952c4eb1 | |||
| 48c441b787 | |||
| be246d6f06 | |||
| 2b10e52ab0 | |||
| e3fd705f52 | |||
| 81e18ac553 | |||
| f95f0f0ef3 |
@@ -48,7 +48,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
$content = [System.IO.File]::ReadAllBytes("Setup/bin/x64/Release/Elwig-${{ env.APP_VERSION }}.exe")
|
$content = [System.IO.File]::ReadAllBytes("Setup/bin/x64/Release/Elwig-${{ env.APP_VERSION }}.exe")
|
||||||
Invoke-WebRequest `
|
Invoke-WebRequest `
|
||||||
-Uri "https://www.necronda.net/elwig/files/Elwig-${{ env.APP_VERSION }}.exe" `
|
-Uri "https://elwig.at/files/Elwig-${{ env.APP_VERSION }}.exe" `
|
||||||
-Method PUT `
|
-Method PUT `
|
||||||
-Body $content `
|
-Body $content `
|
||||||
-Headers @{ Authorization = "${{ secrets.API_AUTHORIZATION }}" } `
|
-Headers @{ Authorization = "${{ secrets.API_AUTHORIZATION }}" } `
|
||||||
|
|||||||
+3
-1
@@ -159,7 +159,9 @@ namespace Elwig {
|
|||||||
list.Add(Scale.FromConfig(s));
|
list.Add(Scale.FromConfig(s));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
list.Add(new InvalidScale(s.Id));
|
list.Add(new InvalidScale(s.Id));
|
||||||
MessageBox.Show($"Unable to create scale {s.Id}:\n\n{e.Message}", "Scale Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
if (Config.Debug || s.Required)
|
||||||
|
MessageBox.Show($"Unable to create scale {s.Id}:\n\n{e.Message}", "Scale Error",
|
||||||
|
MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Scales = list;
|
Scales = list;
|
||||||
|
|||||||
@@ -0,0 +1,106 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Controls.Primitives;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
|
namespace Elwig.Controls {
|
||||||
|
public class IntegerUpDown : TextBox {
|
||||||
|
|
||||||
|
public static readonly DependencyProperty MinimumProperty = DependencyProperty.Register("Miminum", typeof(int?), typeof(IntegerUpDown), new FrameworkPropertyMetadata(null));
|
||||||
|
public int? Minimum {
|
||||||
|
get => (int?)GetValue(MinimumProperty);
|
||||||
|
set => SetValue(MinimumProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register("Maximum", typeof(int?), typeof(IntegerUpDown), new FrameworkPropertyMetadata(null));
|
||||||
|
public int? Maximum {
|
||||||
|
get => (int?)GetValue(MaximumProperty);
|
||||||
|
set => SetValue(MaximumProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int? Value {
|
||||||
|
get => int.TryParse(Text, out var res) ? res : null;
|
||||||
|
set => Text = $"{value}";
|
||||||
|
}
|
||||||
|
|
||||||
|
static IntegerUpDown() {
|
||||||
|
DefaultStyleKeyProperty.OverrideMetadata(typeof(IntegerUpDown), new FrameworkPropertyMetadata(typeof(IntegerUpDown)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public IntegerUpDown() {
|
||||||
|
TextChanged += IntegerUpDown_TextChanged;
|
||||||
|
LostFocus += IntegerUpDown_LostFocus;
|
||||||
|
KeyUp += IntegerUpDown_KeyUp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnApplyTemplate() {
|
||||||
|
var incButton = GetTemplateChild("IncrementButton") as RepeatButton;
|
||||||
|
var decButton = GetTemplateChild("DecrementButton") as RepeatButton;
|
||||||
|
incButton!.Click += IncrementButton_Click;
|
||||||
|
decButton!.Click += DecrementButton_Click;
|
||||||
|
base.OnApplyTemplate();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void IntegerUpDown_TextChanged(object sender, TextChangedEventArgs evt) {
|
||||||
|
var idx = CaretIndex;
|
||||||
|
Text = new string(Text.Where(char.IsAsciiDigit).Take(4).ToArray());
|
||||||
|
CaretIndex = idx;
|
||||||
|
evt.Handled = !(Value >= Minimum && Value <= Maximum);
|
||||||
|
if (idx >= 4) {
|
||||||
|
if (Value < Minimum) {
|
||||||
|
Value = Minimum;
|
||||||
|
} else if (Value > Maximum) {
|
||||||
|
Value = Maximum;
|
||||||
|
}
|
||||||
|
CaretIndex = 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void IntegerUpDown_LostFocus(object sender, RoutedEventArgs evt) {
|
||||||
|
if (Value < Minimum) {
|
||||||
|
Value = Minimum;
|
||||||
|
} else if (Value > Maximum) {
|
||||||
|
Value = Maximum;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void IncrementButton_Click(object sender, RoutedEventArgs evt) {
|
||||||
|
Value = Math.Min((Value ?? 0) + 1, Maximum ?? int.MaxValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DecrementButton_Click(object sender, RoutedEventArgs evt) {
|
||||||
|
Value = Math.Max((Value ?? 0) - 1, Minimum ?? int.MinValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void IntegerUpDown_KeyUp(object sender, KeyEventArgs evt) {
|
||||||
|
switch (evt.Key) {
|
||||||
|
case Key.Up:
|
||||||
|
case Key.Add:
|
||||||
|
case Key.OemPlus:
|
||||||
|
Value = Math.Min((Value ?? 0) + 1, Maximum ?? int.MaxValue);
|
||||||
|
evt.Handled = true;
|
||||||
|
CaretIndex = 4;
|
||||||
|
break;
|
||||||
|
case Key.Down:
|
||||||
|
case Key.Subtract:
|
||||||
|
case Key.OemMinus:
|
||||||
|
Value = Math.Max((Value ?? 0) - 1, Minimum ?? int.MinValue);
|
||||||
|
evt.Handled = true;
|
||||||
|
CaretIndex = 4;
|
||||||
|
break;
|
||||||
|
case Key.PageUp:
|
||||||
|
Value = Math.Min((Value ?? 0) + 10, Maximum ?? int.MaxValue);
|
||||||
|
evt.Handled = true;
|
||||||
|
CaretIndex = 4;
|
||||||
|
break;
|
||||||
|
case Key.PageDown:
|
||||||
|
Value = Math.Max((Value ?? 0) - 10, Minimum ?? int.MinValue);
|
||||||
|
evt.Handled = true;
|
||||||
|
CaretIndex = 4;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:ctrl="clr-namespace:Elwig.Controls">
|
||||||
|
<Style TargetType="ctrl:IntegerUpDown" BasedOn="{StaticResource {x:Type TextBox}}">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ctrl:IntegerUpDown">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="18"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Border x:Name="Border" BorderThickness="1,1,0,1"
|
||||||
|
BorderBrush="{Binding Path=BorderBrush, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay}"
|
||||||
|
SnapsToDevicePixels="True" Grid.RowSpan="2">
|
||||||
|
<ScrollViewer x:Name="PART_ContentHost" VerticalAlignment="Center"/>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<RepeatButton x:Name="IncrementButton" Padding="0" Height="Auto" Width="Auto" BorderThickness="1,1,1,1"
|
||||||
|
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="0" Grid.Column="1">
|
||||||
|
<Path x:Name="IconIncrement" Data="M 0,4 L 4,0 L 8,4 Z" Fill="#FF444444"
|
||||||
|
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||||
|
</RepeatButton>
|
||||||
|
<RepeatButton x:Name="DecrementButton" Padding="0" Height="Auto" Width="Auto" BorderThickness="1,0,1,1"
|
||||||
|
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="1" Grid.Column="1">
|
||||||
|
<Path x:Name="IconDecrement" Data="M 0,0 L 4,4 L 8,0 Z" Fill="#FF444444"
|
||||||
|
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||||
|
</RepeatButton>
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter TargetName="Border" Property="BorderBrush" Value="LightGray"/>
|
||||||
|
<Setter TargetName="IconIncrement" Property="Fill" Value="#FF888888"/>
|
||||||
|
<Setter TargetName="IconDecrement" Property="Fill" Value="#FF888888"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Setter Property="TextAlignment" Value="Right"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Foreground" Value="Gray"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</ResourceDictionary>
|
||||||
+7
-7
@@ -7,7 +7,7 @@
|
|||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||||
<ApplicationIcon>Resources\Images\Elwig.ico</ApplicationIcon>
|
<ApplicationIcon>Resources\Images\Elwig.ico</ApplicationIcon>
|
||||||
<Version>0.8.1</Version>
|
<Version>0.8.2</Version>
|
||||||
<SatelliteResourceLanguages>de-AT</SatelliteResourceLanguages>
|
<SatelliteResourceLanguages>de-AT</SatelliteResourceLanguages>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
@@ -27,15 +27,15 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Extended.Wpf.Toolkit" Version="4.6.0" />
|
<PackageReference Include="Extended.Wpf.Toolkit" Version="4.6.0" />
|
||||||
<PackageReference Include="LinqKit" Version="1.2.5" />
|
<PackageReference Include="LinqKit" Version="1.2.5" />
|
||||||
<PackageReference Include="MailKit" Version="4.5.0" />
|
<PackageReference Include="MailKit" Version="4.6.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Language" Version="6.0.29" />
|
<PackageReference Include="Microsoft.AspNetCore.Razor.Language" Version="6.0.31" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="8.0.4" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="8.0.6" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.4" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.6" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Ini" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Ini" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2478.35" />
|
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2535.41" />
|
||||||
<PackageReference Include="NJsonSchema" Version="11.0.0" />
|
<PackageReference Include="NJsonSchema" Version="11.0.0" />
|
||||||
<PackageReference Include="RazorLight" Version="2.3.1" />
|
<PackageReference Include="RazorLight" Version="2.3.1" />
|
||||||
<PackageReference Include="ScottPlot.WPF" Version="5.0.31" />
|
<PackageReference Include="ScottPlot.WPF" Version="5.0.34" />
|
||||||
<PackageReference Include="System.IO.Ports" Version="8.0.0" />
|
<PackageReference Include="System.IO.Ports" Version="8.0.0" />
|
||||||
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
|
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -13,10 +13,11 @@ namespace Elwig.Helpers {
|
|||||||
public string? Empty;
|
public string? Empty;
|
||||||
public string? Filling;
|
public string? Filling;
|
||||||
public string? Limit;
|
public string? Limit;
|
||||||
|
public bool Required;
|
||||||
public string? Log;
|
public string? Log;
|
||||||
public string? _Log;
|
public string? _Log;
|
||||||
|
|
||||||
public ScaleConfig(string id, string? type, string? model, string? cnx, string? empty, string? filling, string? limit, string? log) {
|
public ScaleConfig(string id, string? type, string? model, string? cnx, string? empty, string? filling, string? limit, bool? required, string? log) {
|
||||||
Id = id;
|
Id = id;
|
||||||
Type = type;
|
Type = type;
|
||||||
Model = model;
|
Model = model;
|
||||||
@@ -24,6 +25,7 @@ namespace Elwig.Helpers {
|
|||||||
Empty = empty;
|
Empty = empty;
|
||||||
Filling = filling;
|
Filling = filling;
|
||||||
Limit = limit;
|
Limit = limit;
|
||||||
|
Required = required ?? true;
|
||||||
_Log = log;
|
_Log = log;
|
||||||
Log = log != null ? Path.Combine(App.DataPath, log) : null;
|
Log = log != null ? Path.Combine(App.DataPath, log) : null;
|
||||||
}
|
}
|
||||||
@@ -91,7 +93,9 @@ namespace Elwig.Helpers {
|
|||||||
foreach (var s in scales) {
|
foreach (var s in scales) {
|
||||||
ScaleList.Add(new(
|
ScaleList.Add(new(
|
||||||
s, config[$"scale.{s}:type"], config[$"scale.{s}:model"], config[$"scale.{s}:connection"],
|
s, config[$"scale.{s}:type"], config[$"scale.{s}:model"], config[$"scale.{s}:connection"],
|
||||||
config[$"scale.{s}:empty"], config[$"scale.{s}:filling"], config[$"scale.{s}:limit"], config[$"scale.{s}:log"]
|
config[$"scale.{s}:empty"], config[$"scale.{s}:filling"], config[$"scale.{s}:limit"],
|
||||||
|
config[$"scale.{s}:required"] != null ? TrueValues.Contains(config[$"scale.{s}:required"]?.ToLower()) : null,
|
||||||
|
config[$"scale.{s}:log"]
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceDictionary Source="/Elwig;component/Controls/UnitTextBox.xaml"/>
|
<ResourceDictionary Source="/Elwig;component/Controls/UnitTextBox.xaml"/>
|
||||||
|
<ResourceDictionary Source="/Elwig;component/Controls/IntegerUpDown.xaml"/>
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ namespace Elwig.Windows {
|
|||||||
|
|
||||||
protected override async Task OnRenewContext(AppDbContext ctx) {
|
protected override async Task OnRenewContext(AppDbContext ctx) {
|
||||||
await base.OnRenewContext(ctx);
|
await base.OnRenewContext(ctx);
|
||||||
FillInputs(App.Client, (await ctx.Seasons.FindAsync(Utils.CurrentLastSeason))!);
|
FillInputs(App.Client, await ctx.Seasons.FindAsync(Utils.CurrentLastSeason));
|
||||||
ControlUtils.RenewItemsSource(SeasonList, await ctx.Seasons
|
ControlUtils.RenewItemsSource(SeasonList, await ctx.Seasons
|
||||||
.OrderByDescending(s => s.Year)
|
.OrderByDescending(s => s.Year)
|
||||||
.Include(s => s.Modifiers)
|
.Include(s => s.Modifiers)
|
||||||
@@ -274,7 +274,7 @@ namespace Elwig.Windows {
|
|||||||
|
|
||||||
using var ctx = new AppDbContext();
|
using var ctx = new AppDbContext();
|
||||||
ClearInputStates();
|
ClearInputStates();
|
||||||
FillInputs(App.Client, (await ctx.Seasons.FindAsync(Utils.CurrentLastSeason))!);
|
FillInputs(App.Client, await ctx.Seasons.FindAsync(Utils.CurrentLastSeason));
|
||||||
LockInputs();
|
LockInputs();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,7 +294,7 @@ namespace Elwig.Windows {
|
|||||||
|
|
||||||
using var ctx = new AppDbContext();
|
using var ctx = new AppDbContext();
|
||||||
ClearInputStates();
|
ClearInputStates();
|
||||||
FillInputs(App.Client, (await ctx.Seasons.FindAsync(Utils.CurrentLastSeason))!);
|
FillInputs(App.Client, await ctx.Seasons.FindAsync(Utils.CurrentLastSeason));
|
||||||
UpdateButtons();
|
UpdateButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -325,14 +325,14 @@ namespace Elwig.Windows {
|
|||||||
|
|
||||||
using (var ctx = new AppDbContext()) {
|
using (var ctx = new AppDbContext()) {
|
||||||
ClearInputStates();
|
ClearInputStates();
|
||||||
FillInputs(App.Client, (await ctx.Seasons.FindAsync(Utils.CurrentLastSeason))!);
|
FillInputs(App.Client, await ctx.Seasons.FindAsync(Utils.CurrentLastSeason));
|
||||||
LockInputs();
|
LockInputs();
|
||||||
}
|
}
|
||||||
|
|
||||||
await HintContextChange();
|
await HintContextChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FillInputs(ClientParameters p, Season s) {
|
private void FillInputs(ClientParameters p, Season? s) {
|
||||||
ClearOriginalValues();
|
ClearOriginalValues();
|
||||||
ClearDefaultValues();
|
ClearDefaultValues();
|
||||||
|
|
||||||
@@ -363,9 +363,9 @@ namespace Elwig.Windows {
|
|||||||
TextElementDeliveryConfirmation.Text = p.TextDeliveryConfirmation;
|
TextElementDeliveryConfirmation.Text = p.TextDeliveryConfirmation;
|
||||||
TextElementCreditNote.Text = p.TextCreditNote;
|
TextElementCreditNote.Text = p.TextCreditNote;
|
||||||
|
|
||||||
ParameterAllowAttrIntoLowerInput.IsChecked = s.Billing_AllowAttrsIntoLower;
|
ParameterAllowAttrIntoLowerInput.IsChecked = s?.Billing_AllowAttrsIntoLower ?? false;
|
||||||
ParameterAvoidUnderDeliveriesInput.IsChecked = s.Billing_AvoidUnderDeliveries;
|
ParameterAvoidUnderDeliveriesInput.IsChecked = s?.Billing_AvoidUnderDeliveries ?? false;
|
||||||
ParameterHonorGebundenInput.IsChecked = s.Billing_HonorGebunden;
|
ParameterHonorGebundenInput.IsChecked = s?.Billing_HonorGebunden ?? false;
|
||||||
|
|
||||||
FinishInputFilling();
|
FinishInputFilling();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,9 +175,9 @@
|
|||||||
</TextBlock>
|
</TextBlock>
|
||||||
</TextBox.ToolTip>
|
</TextBox.ToolTip>
|
||||||
</TextBox>
|
</TextBox>
|
||||||
<xctk:IntegerUpDown x:Name="SeasonInput" Grid.ColumnSpan="3" Height="25" Width="56" FontSize="14" Minimum="1000" Maximum="9999"
|
<ctrl:IntegerUpDown x:Name="SeasonInput" Grid.ColumnSpan="3" Height="25" Width="56" FontSize="14" Minimum="1900" Maximum="9999"
|
||||||
Margin="0,10,100,0" VerticalAlignment="Top" HorizontalAlignment="Right"
|
Margin="0,10,100,0" VerticalAlignment="Top" HorizontalAlignment="Right" Text="2020"
|
||||||
ValueChanged="SeasonInput_ValueChanged"/>
|
TextChanged="SeasonInput_TextChanged"/>
|
||||||
<CheckBox x:Name="TodayOnlyInput" Content="Nur heute"
|
<CheckBox x:Name="TodayOnlyInput" Content="Nur heute"
|
||||||
HorizontalAlignment="Right" Margin="0,7,18,0" VerticalAlignment="Top" Grid.Column="1" Grid.ColumnSpan="2"
|
HorizontalAlignment="Right" Margin="0,7,18,0" VerticalAlignment="Top" Grid.Column="1" Grid.ColumnSpan="2"
|
||||||
Checked="TodayOnlyInput_Changed" Unchecked="TodayOnlyInput_Changed"/>
|
Checked="TodayOnlyInput_Changed" Unchecked="TodayOnlyInput_Changed"/>
|
||||||
|
|||||||
@@ -1344,8 +1344,8 @@ namespace Elwig.Windows {
|
|||||||
await RefreshDeliveryListQuery(true);
|
await RefreshDeliveryListQuery(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void SeasonInput_ValueChanged(object sender, RoutedEventArgs evt) {
|
private async void SeasonInput_TextChanged(object sender, TextChangedEventArgs evt) {
|
||||||
if (SeasonInput.Value == null) return;
|
if (SeasonInput.Value == null || TodayOnlyInput == null || AllSeasonsInput == null) return;
|
||||||
TodayOnlyInput.IsChecked = false;
|
TodayOnlyInput.IsChecked = false;
|
||||||
AllSeasonsInput.IsChecked = false;
|
AllSeasonsInput.IsChecked = false;
|
||||||
await RefreshDeliveryListQuery();
|
await RefreshDeliveryListQuery();
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="clr-namespace:Elwig.Windows"
|
xmlns:local="clr-namespace:Elwig.Windows"
|
||||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
xmlns:ctrl="clr-namespace:Elwig.Controls"
|
||||||
Title="Elwig" Height="390" Width="520" ResizeMode="CanMinimize"
|
Title="Elwig" Height="390" Width="520" ResizeMode="CanMinimize"
|
||||||
Loaded="Window_Loaded" Closing="Window_Closing">
|
Loaded="Window_Loaded" Closing="Window_Closing">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
@@ -71,9 +71,9 @@
|
|||||||
<Grid>
|
<Grid>
|
||||||
<Border BorderBrush="LightGray" BorderThickness="1"/>
|
<Border BorderBrush="LightGray" BorderThickness="1"/>
|
||||||
<Label Content="Saison:" Margin="0,10,100,0" VerticalAlignment="Top" HorizontalAlignment="Center" Padding="2,4,2,4" Height="25"/>
|
<Label Content="Saison:" Margin="0,10,100,0" VerticalAlignment="Top" HorizontalAlignment="Center" Padding="2,4,2,4" Height="25"/>
|
||||||
<xctk:IntegerUpDown Name="SeasonInput" Height="25" Width="56" FontSize="14" Minimum="1000" Maximum="9999"
|
<ctrl:IntegerUpDown x:Name="SeasonInput" Height="25" Width="56" FontSize="14" Minimum="1900" Maximum="9999"
|
||||||
Margin="0,10,0,0" VerticalAlignment="Top" HorizontalAlignment="Center"
|
Margin="0,10,0,0" VerticalAlignment="Top" HorizontalAlignment="Center"
|
||||||
ValueChanged="SeasonInput_ValueChanged"/>
|
TextChanged="SeasonInput_TextChanged"/>
|
||||||
|
|
||||||
<Button x:Name="DeliveryConfirmationButton" Content="Anlieferungsbestätigung"
|
<Button x:Name="DeliveryConfirmationButton" Content="Anlieferungsbestätigung"
|
||||||
Click="DeliveryConfirmationButton_Click"
|
Click="DeliveryConfirmationButton_Click"
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using System.Linq;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace Elwig.Windows {
|
namespace Elwig.Windows {
|
||||||
@@ -147,7 +148,7 @@ namespace Elwig.Windows {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override Task OnRenewContext(AppDbContext ctx) {
|
protected override Task OnRenewContext(AppDbContext ctx) {
|
||||||
SeasonInput_ValueChanged(null, null);
|
SeasonInput_TextChanged(null, null);
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,7 +160,7 @@ namespace Elwig.Windows {
|
|||||||
Height = 390;
|
Height = 390;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void SeasonInput_ValueChanged(object? sender, RoutedEventArgs? evt) {
|
private async void SeasonInput_TextChanged(object? sender, TextChangedEventArgs? evt) {
|
||||||
using var ctx = new AppDbContext();
|
using var ctx = new AppDbContext();
|
||||||
var s0 = await ctx.Seasons.FindAsync(SeasonInput.Value);
|
var s0 = await ctx.Seasons.FindAsync(SeasonInput.Value);
|
||||||
var valid = (s0 != null);
|
var valid = (s0 != null);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
::mkdir "C:\Program Files\Elwig"
|
::mkdir "C:\Program Files\Elwig"
|
||||||
::curl -s -L "http://www.columbia.edu/~em36/PDFtoPrinter.exe" -z "C:\Program Files\Elwig\PDFtoPrinter.exe" -o "C:\Program Files\Elwig\PDFtoPrinter.exe"
|
::curl --fail -s -L "https://github.com/emendelson/pdftoprinter/raw/main/PDFtoPrinter.exe" -z "C:\Program Files\Elwig\PDFtoPrinter.exe" -o "C:\Program Files\Elwig\PDFtoPrinter.exe"
|
||||||
mkdir "C:\ProgramData\Elwig\resources"
|
mkdir "C:\ProgramData\Elwig\resources"
|
||||||
copy /b /y Documents\*.css "C:\ProgramData\Elwig\resources"
|
copy /b /y Documents\*.css "C:\ProgramData\Elwig\resources"
|
||||||
copy /b /y Documents\*.cshtml "C:\ProgramData\Elwig\resources"
|
copy /b /y Documents\*.cshtml "C:\ProgramData\Elwig\resources"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
</Task>
|
</Task>
|
||||||
</UsingTask>
|
</UsingTask>
|
||||||
<Target Name="CustomBeforeBuild" BeforeTargets="BeforeBuild">
|
<Target Name="CustomBeforeBuild" BeforeTargets="BeforeBuild">
|
||||||
<Exec Command="curl -s -L "http://www.columbia.edu/~em36/PDFtoPrinter.exe" -z "$(ProjectDir)\Files\PDFtoPrinter.exe" -o "$(ProjectDir)\Files\PDFtoPrinter.exe"" />
|
<Exec Command="curl --fail -s -L "https://github.com/emendelson/pdftoprinter/raw/main/PDFtoPrinter.exe" -z "$(ProjectDir)\Files\PDFtoPrinter.exe" -o "$(ProjectDir)\Files\PDFtoPrinter.exe"" />
|
||||||
<Exec Command="dotnet publish "$(ProjectDir)\..\Elwig\Elwig.csproj" "/p:PublishProfile=$(ProjectDir)\..\Elwig\Properties\PublishProfiles\FolderProfile.pubxml"" />
|
<Exec Command="dotnet publish "$(ProjectDir)\..\Elwig\Elwig.csproj" "/p:PublishProfile=$(ProjectDir)\..\Elwig\Properties\PublishProfiles\FolderProfile.pubxml"" />
|
||||||
<GetFileVersion AssemblyPath="..\Elwig\bin\Publish\Elwig.exe">
|
<GetFileVersion AssemblyPath="..\Elwig\bin\Publish\Elwig.exe">
|
||||||
<Output TaskParameter="Version" PropertyName="ElwigFileVersion" />
|
<Output TaskParameter="Version" PropertyName="ElwigFileVersion" />
|
||||||
|
|||||||
+2
-2
@@ -5,8 +5,8 @@
|
|||||||
<Cultures>de-AT</Cultures>
|
<Cultures>de-AT</Cultures>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Target Name="CustomBeforeBuild" BeforeTargets="BeforeBuild">
|
<Target Name="CustomBeforeBuild" BeforeTargets="BeforeBuild">
|
||||||
<Exec Command="curl -s -L "https://go.microsoft.com/fwlink/p/?LinkId=2124703" -z "$(ProjectDir)\Files\MicrosoftEdgeWebview2Setup.exe" -o "$(ProjectDir)\Files\MicrosoftEdgeWebview2Setup.exe"" />
|
<Exec Command="curl --fail -s -L "https://go.microsoft.com/fwlink/p/?LinkId=2124703" -z "$(ProjectDir)\Files\MicrosoftEdgeWebview2Setup.exe" -o "$(ProjectDir)\Files\MicrosoftEdgeWebview2Setup.exe"" />
|
||||||
<Exec Command="curl -s -L "https://aka.ms/vs/17/release/vc_redist.x86.exe" -z "$(ProjectDir)\Files\VC_redist.x86.exe" -o "$(ProjectDir)\Files\VC_redist.x86.exe"" />
|
<Exec Command="curl --fail -s -L "https://aka.ms/vs/17/release/vc_redist.x86.exe" -z "$(ProjectDir)\Files\VC_redist.x86.exe" -o "$(ProjectDir)\Files\VC_redist.x86.exe"" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<DefineConstants>ElwigProjectDir=..\Elwig</DefineConstants>
|
<DefineConstants>ElwigProjectDir=..\Elwig</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@
|
|||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
|
||||||
<PackageReference Include="NReco.PdfRenderer" Version="1.5.3" />
|
<PackageReference Include="NReco.PdfRenderer" Version="1.5.3" />
|
||||||
<PackageReference Include="NUnit" Version="4.1.0" />
|
<PackageReference Include="NUnit" Version="4.1.0" />
|
||||||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
|
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
curl -s -L "https://www.necronda.net/elwig/files/create.sql?v=19" -u "elwig:ganzGeheim123!" -o "Resources\Sql\Create.sql"
|
curl --fail -s -L "https://elwig.at/files/create.sql?v=19" -u "elwig:ganzGeheim123!" -o "Resources\Sql\Create.sql"
|
||||||
|
|||||||
Reference in New Issue
Block a user