Compare commits
4 Commits
77cee53f2d
...
v0.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
| b2a78907cf | |||
| 7bcf532b26 | |||
| 595f9a049c | |||
| 80ed90941d |
@@ -26,7 +26,7 @@ namespace Elwig.Dialogs {
|
||||
}
|
||||
|
||||
private void UpdateButtons() {
|
||||
ConfirmButton.IsEnabled = WeightInput.Text.Length > 0 && ReasonInput.Text.Trim().Length > 0;
|
||||
ConfirmButton.IsEnabled = WeightInput.Text.Length > 0;
|
||||
}
|
||||
|
||||
private void WeightInput_TextChanged(object sender, TextChangedEventArgs evt) {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<UseWPF>true</UseWPF>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<ApplicationIcon>elwig.ico</ApplicationIcon>
|
||||
<Version>0.1.0</Version>
|
||||
<Version>0.2.0</Version>
|
||||
<SatelliteResourceLanguages>de-AT</SatelliteResourceLanguages>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -179,8 +179,8 @@ namespace Elwig.Windows {
|
||||
bool ch = HasChanged, v = IsValid;
|
||||
ResetButton.IsEnabled = ch;
|
||||
SaveButton.IsEnabled = v && ch;
|
||||
FinishButton.IsEnabled = v || !ch;
|
||||
NewDeliveryPartButton.IsEnabled = v;
|
||||
FinishButton.IsEnabled = v && ch;
|
||||
NewDeliveryPartButton.IsEnabled = v && ch;
|
||||
CancelCreatingButton.IsEnabled = DeliveryList.SelectedItem == null || DeliveryPartList.SelectedItem == null;
|
||||
}
|
||||
|
||||
@@ -331,7 +331,7 @@ namespace Elwig.Windows {
|
||||
.ToList();
|
||||
}
|
||||
|
||||
ControlUtils.RenewItemsSource(DeliveryList, deliveries, d => ((d as Delivery)?.Year, (d as Delivery)?.DId), DeliveryList_SelectionChanged, ControlUtils.RenewSourceDefault.IfOnly, !updateSort);
|
||||
ControlUtils.RenewItemsSource(DeliveryList, deliveries, d => ((d as Delivery)?.Year, (d as Delivery)?.DId), DeliveryList_SelectionChanged, IsCreating ? ControlUtils.RenewSourceDefault.None : ControlUtils.RenewSourceDefault.IfOnly, !updateSort);
|
||||
|
||||
var members = deliveries.Select(d => d.Member).DistinctBy(m => m.MgNr).ToList();
|
||||
StatusMembers.Text = $"Mitglieder: {members.Count}" + (members.Count > 0 && members.Count <= 4 ? $" ({string.Join(", ", members.Select(m => m.AdministrativeName))})" : "");
|
||||
@@ -423,10 +423,11 @@ namespace Elwig.Windows {
|
||||
Menu_Export_Bki.Items.Add(i);
|
||||
}
|
||||
|
||||
// FIXME on "only one" delivery, RenewContext doees not work
|
||||
await RefreshDeliveryList();
|
||||
var d = DeliveryList.SelectedItem as Delivery;
|
||||
var y = d?.Year ?? Utils.CurrentLastSeason;
|
||||
ControlUtils.RenewItemsSource(MemberInput, await Context.Members.Where(m => m.IsActive || !IsReceipt).OrderBy(m => m.FamilyName).ThenBy(m => m.GivenName).ToListAsync(), i => (i as Member)?.MgNr);
|
||||
ControlUtils.RenewItemsSource(MemberInput, await Context.Members.Where(m => m.IsActive || !IsCreating).OrderBy(m => m.FamilyName).ThenBy(m => m.GivenName).ToListAsync(), i => (i as Member)?.MgNr);
|
||||
ControlUtils.RenewItemsSource(BranchInput, await Context.Branches.OrderBy(b => b.Name).ToListAsync(), i => (i as Branch)?.ZwstId);
|
||||
ControlUtils.RenewItemsSource(WineVarietyInput, await Context.WineVarieties.OrderBy(v => v.Name).ToListAsync(), i => (i as WineVar)?.SortId);
|
||||
ControlUtils.RenewItemsSource(AttributesInput, await Context.WineAttributes.Where(a => IsCreating || a.IsActive).OrderBy(a => a.Name).ToListAsync(), i => (i as WineAttr)?.AttrId);
|
||||
@@ -729,7 +730,7 @@ namespace Elwig.Windows {
|
||||
MemberInput.SelectedItem = valid ? Context.Members.Find(int.Parse(MgNrInput.Text)) : null;
|
||||
}
|
||||
|
||||
private void MemberInput_SelectionChanged(object sender, SelectionChangedEventArgs evt) {
|
||||
private void MemberInput_SelectionChanged(object? sender, SelectionChangedEventArgs? evt) {
|
||||
var m = MemberInput.SelectedItem as Member;
|
||||
if (m != null) MgNrInput.Text = m.MgNr.ToString();
|
||||
MemberAddressField.Text = m?.FullAddress;
|
||||
@@ -753,6 +754,7 @@ namespace Elwig.Windows {
|
||||
NewDeliveryPartButton.Cursor = null;
|
||||
DeliveryList.SelectedItem = p?.Delivery;
|
||||
DeliveryPartList.SelectedItem = null;
|
||||
RefreshInputs();
|
||||
InitialInputs();
|
||||
}
|
||||
|
||||
@@ -768,12 +770,13 @@ namespace Elwig.Windows {
|
||||
Mouse.OverrideCursor = Cursors.Wait;
|
||||
using var doc = new DeliveryNote(p.Delivery, Context);
|
||||
await doc.Generate();
|
||||
Mouse.OverrideCursor = Cursors.Wait;
|
||||
Mouse.OverrideCursor = null;
|
||||
doc.Show();
|
||||
//await doc.Print(2);
|
||||
}
|
||||
FinishButton.Cursor = null;
|
||||
DeliveryList.SelectedItem = null;
|
||||
RefreshInputs();
|
||||
InitInputs();
|
||||
}
|
||||
|
||||
@@ -1099,8 +1102,8 @@ namespace Elwig.Windows {
|
||||
}
|
||||
|
||||
private void ShowFinishNewPartDeliveryCancelButtons() {
|
||||
FinishButton.IsEnabled = IsCreating && IsValid;
|
||||
NewDeliveryPartButton.IsEnabled = IsCreating && IsValid;
|
||||
FinishButton.IsEnabled = false;
|
||||
NewDeliveryPartButton.IsEnabled = false;
|
||||
CancelCreatingButton.IsEnabled = true;
|
||||
FinishButton.Visibility = Visibility.Visible;
|
||||
NewDeliveryPartButton.Visibility = Visibility.Visible;
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
|
||||
<Fragment>
|
||||
<ComponentGroup Id="DocumentTemplateComponents" Directory="ConfigFolderResources">
|
||||
<Component>
|
||||
<File Source="$(TargetDir)\paged.polyfill.js" />
|
||||
</Component>
|
||||
<Component>
|
||||
<File Source="$(var.ElwigProjectDir)\Documents\style.css" />
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
@@ -23,10 +23,10 @@
|
||||
-->
|
||||
<xsl:key
|
||||
name="FileToRemove"
|
||||
match="wix:Component[ substring( wix:File/@Source, string-length( wix:File/@Source ) - 6 ) != '.cshtml' ]"
|
||||
match="wix:Component[ substring( wix:File/@Source, string-length( wix:File/@Source ) - 2 ) = '.cs' ]"
|
||||
use="@Id"
|
||||
/>
|
||||
<!-- Get the last 4 characters of a string using `substring( s, len(s) - 3 )`, it uses -3 and not -4 because XSLT uses 1-based indexes, not 0-based indexes. -->
|
||||
<!-- Get the last 3 characters of a string using `substring( s, len(s) - 2 )`, it uses -2 and not -3 because XSLT uses 1-based indexes, not 0-based indexes. -->
|
||||
|
||||
<!-- By default, copy all elements and nodes into the output... -->
|
||||
<xsl:template match="@*|node()">
|
||||
@@ -25,14 +25,13 @@
|
||||
</Task>
|
||||
</UsingTask>
|
||||
<Target Name="CustomBeforeBuild" BeforeTargets="BeforeBuild">
|
||||
<Exec Command="curl -s -L "https://unpkg.com/pagedjs/dist/paged.polyfill.js" -o "$(TargetDir)paged.polyfill.js"" />
|
||||
<Exec Command="curl -s "http://www.columbia.edu/~em36/PDFtoPrinter.exe" -z "$(TargetDir)PDFtoPrinter.exe" -o "$(TargetDir)PDFtoPrinter.exe"" />
|
||||
<Exec Command="dotnet publish "$(SolutionDir)Elwig\Elwig.csproj" "/p:PublishProfile=$(SolutionDir)\Elwig\Properties\PublishProfiles\FolderProfile.pubxml"" />
|
||||
<GetFileVersion AssemblyPath="..\Elwig\bin\Publish\Elwig.exe">
|
||||
<Output TaskParameter="Version" PropertyName="ElwigFileVersion" />
|
||||
</GetFileVersion>
|
||||
<PropertyGroup>
|
||||
<DefineConstants>ProductVersion=$(ElwigFileVersion);BuildPath=..\Elwig\bin\Publish;DocumentTemplatesPath=..\Elwig\Documents;ElwigProjectDir=..\Elwig</DefineConstants>
|
||||
<DefineConstants>ProductVersion=$(ElwigFileVersion);BuildPath=..\Elwig\bin\Publish;DocumentPath=..\Elwig\Documents;ElwigProjectDir=..\Elwig</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
<ItemGroup>
|
||||
@@ -50,13 +49,13 @@
|
||||
<ComponentGroupName>DocumentTemplates</ComponentGroupName>
|
||||
<DirectoryRefId>ConfigFolderResources</DirectoryRefId>
|
||||
<SuppressRootDirectory>true</SuppressRootDirectory>
|
||||
<PreprocessorVariable>DocumentTemplatesPath</PreprocessorVariable>
|
||||
<Transforms>DocumentTemplatesTransform.xslt</Transforms>
|
||||
<PreprocessorVariable>DocumentPath</PreprocessorVariable>
|
||||
<Transforms>DocumentTransform.xslt</Transforms>
|
||||
</HarvestDirectory>
|
||||
<BindPath BindName="DocumentTemplateBindPath" Include="../Elwig/Documents" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="DocumentTemplatesTransform.xslt" />
|
||||
<None Include="DocumentTransform.xslt" />
|
||||
<None Include="BuildFilesTransform.xslt" />
|
||||
<None Include="Files\config.ini" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
<ComponentGroupRef Id="MainComponents"/>
|
||||
<ComponentGroupRef Id="BuildFiles"/>
|
||||
<ComponentGroupRef Id="DocumentTemplates"/>
|
||||
<ComponentGroupRef Id="DocumentTemplateComponents"/>
|
||||
</Feature>
|
||||
</Package>
|
||||
</Wix>
|
||||
|
||||
Reference in New Issue
Block a user