[#65] MailLogWindow: Fix initial loading
All checks were successful
Test / Run tests (push) Successful in 1m49s
All checks were successful
Test / Run tests (push) Successful in 1m49s
This commit is contained in:
@ -3,7 +3,8 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:Elwig.Windows"
|
xmlns:local="clr-namespace:Elwig.Windows"
|
||||||
Title="Ausgangs-Protokoll - Rundschreiben - Elwig" Height="600" Width="1000">
|
Title="Ausgangs-Protokoll - Rundschreiben - Elwig" Height="600" Width="1000"
|
||||||
|
Loaded="Window_Loaded">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="3*"/>
|
<ColumnDefinition Width="3*"/>
|
||||||
|
@ -2,6 +2,7 @@ using Elwig.Helpers;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
namespace Elwig.Windows {
|
namespace Elwig.Windows {
|
||||||
@ -18,8 +19,16 @@ namespace Elwig.Windows {
|
|||||||
FilterInput.TextChanged -= FilterInput_TextChanged;
|
FilterInput.TextChanged -= FilterInput_TextChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async void Window_Loaded(object sender, RoutedEventArgs evt) {
|
||||||
|
await Load();
|
||||||
|
}
|
||||||
|
|
||||||
private async void TimeSpanInput_SelectionChanged(object sender, RoutedEventArgs evt) {
|
private async void TimeSpanInput_SelectionChanged(object sender, RoutedEventArgs evt) {
|
||||||
if (!IsLoaded) return;
|
if (!IsLoaded) return;
|
||||||
|
await Load();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task Load() {
|
||||||
DateTime? fromDate = DateTime.Now;
|
DateTime? fromDate = DateTime.Now;
|
||||||
if (TimeSpanInput.SelectedIndex == 0) {
|
if (TimeSpanInput.SelectedIndex == 0) {
|
||||||
fromDate = fromDate.Value.AddDays(-7);
|
fromDate = fromDate.Value.AddDays(-7);
|
||||||
|
Reference in New Issue
Block a user