Compare commits

...

7 Commits

Author SHA1 Message Date
5b952c4eb1 Workflows: Update upload URL
All checks were successful
Test / Run tests (push) Successful in 1m37s
Deploy / Build and Deploy (push) Successful in 2m26s
2024-05-14 23:00:29 +02:00
48c441b787 Bump version to 0.8.2
Some checks failed
Test / Run tests (push) Successful in 1m43s
Deploy / Build and Deploy (push) Failing after 2m17s
2024-05-14 22:51:36 +02:00
be246d6f06 Tests: Fix old url in fetch-resources.bat 2024-05-14 22:51:00 +02:00
2b10e52ab0 Installer: Fix url for PDFtoPrinter once again
Some checks failed
Test / Run tests (push) Failing after 1m36s
Deploy / Build and Deploy (push) Has been cancelled
2024-05-14 22:45:26 +02:00
e3fd705f52 App: Show scale errors always in debug mode
All checks were successful
Test / Run tests (push) Successful in 2m12s
2024-05-13 22:34:19 +02:00
81e18ac553 Config: Add 'required' option to scales
All checks were successful
Test / Run tests (push) Successful in 4m3s
2024-05-13 11:33:27 +02:00
f95f0f0ef3 BaseDataWindow: Fix crash when CurrentLastSeason does not exist
All checks were successful
Test / Run tests (push) Successful in 2m8s
2024-05-12 22:34:53 +02:00
8 changed files with 22 additions and 16 deletions

View File

@ -48,7 +48,7 @@ jobs:
run: |
$content = [System.IO.File]::ReadAllBytes("Setup/bin/x64/Release/Elwig-${{ env.APP_VERSION }}.exe")
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 `
-Body $content `
-Headers @{ Authorization = "${{ secrets.API_AUTHORIZATION }}" } `

View File

@ -159,7 +159,9 @@ namespace Elwig {
list.Add(Scale.FromConfig(s));
} catch (Exception e) {
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;

View File

@ -7,7 +7,7 @@
<UseWPF>true</UseWPF>
<PreserveCompilationContext>true</PreserveCompilationContext>
<ApplicationIcon>Resources\Images\Elwig.ico</ApplicationIcon>
<Version>0.8.1</Version>
<Version>0.8.2</Version>
<SatelliteResourceLanguages>de-AT</SatelliteResourceLanguages>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ApplicationManifest>app.manifest</ApplicationManifest>

View File

@ -13,10 +13,11 @@ namespace Elwig.Helpers {
public string? Empty;
public string? Filling;
public string? Limit;
public bool Required;
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;
Type = type;
Model = model;
@ -24,6 +25,7 @@ namespace Elwig.Helpers {
Empty = empty;
Filling = filling;
Limit = limit;
Required = required ?? true;
_Log = log;
Log = log != null ? Path.Combine(App.DataPath, log) : null;
}
@ -91,7 +93,9 @@ namespace Elwig.Helpers {
foreach (var s in scales) {
ScaleList.Add(new(
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"]
));
}
}

View File

@ -148,7 +148,7 @@ namespace Elwig.Windows {
protected override async Task OnRenewContext(AppDbContext 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
.OrderByDescending(s => s.Year)
.Include(s => s.Modifiers)
@ -274,7 +274,7 @@ namespace Elwig.Windows {
using var ctx = new AppDbContext();
ClearInputStates();
FillInputs(App.Client, (await ctx.Seasons.FindAsync(Utils.CurrentLastSeason))!);
FillInputs(App.Client, await ctx.Seasons.FindAsync(Utils.CurrentLastSeason));
LockInputs();
}
@ -294,7 +294,7 @@ namespace Elwig.Windows {
using var ctx = new AppDbContext();
ClearInputStates();
FillInputs(App.Client, (await ctx.Seasons.FindAsync(Utils.CurrentLastSeason))!);
FillInputs(App.Client, await ctx.Seasons.FindAsync(Utils.CurrentLastSeason));
UpdateButtons();
}
@ -325,14 +325,14 @@ namespace Elwig.Windows {
using (var ctx = new AppDbContext()) {
ClearInputStates();
FillInputs(App.Client, (await ctx.Seasons.FindAsync(Utils.CurrentLastSeason))!);
FillInputs(App.Client, await ctx.Seasons.FindAsync(Utils.CurrentLastSeason));
LockInputs();
}
await HintContextChange();
}
private void FillInputs(ClientParameters p, Season s) {
private void FillInputs(ClientParameters p, Season? s) {
ClearOriginalValues();
ClearDefaultValues();
@ -363,9 +363,9 @@ namespace Elwig.Windows {
TextElementDeliveryConfirmation.Text = p.TextDeliveryConfirmation;
TextElementCreditNote.Text = p.TextCreditNote;
ParameterAllowAttrIntoLowerInput.IsChecked = s.Billing_AllowAttrsIntoLower;
ParameterAvoidUnderDeliveriesInput.IsChecked = s.Billing_AvoidUnderDeliveries;
ParameterHonorGebundenInput.IsChecked = s.Billing_HonorGebunden;
ParameterAllowAttrIntoLowerInput.IsChecked = s?.Billing_AllowAttrsIntoLower ?? false;
ParameterAvoidUnderDeliveriesInput.IsChecked = s?.Billing_AvoidUnderDeliveries ?? false;
ParameterHonorGebundenInput.IsChecked = s?.Billing_HonorGebunden ?? false;
FinishInputFilling();
}

View File

@ -1,5 +1,5 @@
::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 -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"
copy /b /y Documents\*.css "C:\ProgramData\Elwig\resources"
copy /b /y Documents\*.cshtml "C:\ProgramData\Elwig\resources"

View File

@ -25,7 +25,7 @@
</Task>
</UsingTask>
<Target Name="CustomBeforeBuild" BeforeTargets="BeforeBuild">
<Exec Command="curl -s -L &quot;http://www.columbia.edu/~em36/PDFtoPrinter.exe&quot; -z &quot;$(ProjectDir)\Files\PDFtoPrinter.exe&quot; -o &quot;$(ProjectDir)\Files\PDFtoPrinter.exe&quot;" />
<Exec Command="curl -s -L &quot;https://github.com/emendelson/pdftoprinter/raw/main/PDFtoPrinter.exe&quot; -z &quot;$(ProjectDir)\Files\PDFtoPrinter.exe&quot; -o &quot;$(ProjectDir)\Files\PDFtoPrinter.exe&quot;" />
<Exec Command="dotnet publish &quot;$(ProjectDir)\..\Elwig\Elwig.csproj&quot; &quot;/p:PublishProfile=$(ProjectDir)\..\Elwig\Properties\PublishProfiles\FolderProfile.pubxml&quot;" />
<GetFileVersion AssemblyPath="..\Elwig\bin\Publish\Elwig.exe">
<Output TaskParameter="Version" PropertyName="ElwigFileVersion" />

View File

@ -1 +1 @@
curl -s -L "https://www.necronda.net/elwig/files/create.sql?v=19" -u "elwig:ganzGeheim123!" -o "Resources\Sql\Create.sql"
curl -s -L "https://elwig.at/files/create.sql?v=19" -u "elwig:ganzGeheim123!" -o "Resources\Sql\Create.sql"