DeliveryConfirmationsWindow: Remove Stichprobe Button

This commit is contained in:
2023-11-29 13:18:42 +01:00
parent 2bca2aed97
commit b1c7b45523
2 changed files with 1 additions and 19 deletions

View File

@ -23,10 +23,7 @@
<TextBox x:Name="TextElement" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible" AcceptsReturn="True"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="200,10,10,10" Height="Auto"/>
<ProgressBar x:Name="ProgressBar" Margin="10,10,10,106" Height="27" Width="180"
VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
<Button x:Name="TestButton" Content="Stichprobe" FontSize="14" Width="180" Margin="10,10,10,74" Height="27" Tag="Print" IsEnabled="False"
Click="TestButton_Click"
<ProgressBar x:Name="ProgressBar" Margin="10,0,0,74" Height="27" Width="180"
VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
<Button x:Name="ShowButton" Content="Vorschau" FontSize="14" Width="180" Margin="10,10,10,42" Height="27" Tag="Print" IsEnabled="False"
Click="ShowButton_Click"

View File

@ -20,15 +20,9 @@ namespace Elwig.Dialogs {
Year = year;
Title = $"Anlieferungsbestätigungen - Lese {Year} - Elwig";
TextElement.Text = App.Client.TextDeliveryConfirmation;
if (!App.Config.Debug) {
TestButton.Visibility = Visibility.Hidden;
var m = ProgressBar.Margin;
ProgressBar.Margin = new(m.Left, m.Top, m.Right, m.Bottom - 32);
}
}
private void Window_Loaded(object sender, RoutedEventArgs evt) {
TestButton.IsEnabled = App.IsPrintingReady;
ShowButton.IsEnabled = App.IsPrintingReady;
PrintButton.IsEnabled = App.IsPrintingReady;
}
@ -80,11 +74,6 @@ namespace Elwig.Dialogs {
}
IEnumerable<Member> list = await members.ToListAsync();
if (mode == 0) {
var r = new Random().Next(0, 10);
list = list.Where((_, n) => n % 10 == r);
}
var data = await DeliveryConfirmationData.ForSeason(Context.DeliveryParts, Year);
using var doc = Document.Merge(list.Select(m =>
new DeliveryConfirmation(Context, Year, m, data[m.MgNr]) {
@ -109,10 +98,6 @@ namespace Elwig.Dialogs {
Close();
}
private async void TestButton_Click(object sender, RoutedEventArgs evt) {
await Generate(0);
}
private async void ShowButton_Click(object sender, RoutedEventArgs evt) {
await Generate(1);
}