diff --git a/EliteBGS/EliteBGS.csproj b/EliteBGS/EliteBGS.csproj
index 203f6f9..8366609 100644
--- a/EliteBGS/EliteBGS.csproj
+++ b/EliteBGS/EliteBGS.csproj
@@ -55,11 +55,12 @@
+
-
+
diff --git a/EliteBGS/MainWindow.xaml b/EliteBGS/MainWindow.xaml
index 974b3ee..6208631 100644
--- a/EliteBGS/MainWindow.xaml
+++ b/EliteBGS/MainWindow.xaml
@@ -4,6 +4,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:abc="http://wpfcontrols.com/"
+ xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:local="clr-namespace:EliteBGS"
xmlns:Util="clr-namespace:EliteBGS.Util" d:DataContext="{d:DesignInstance Type=Util:AppConfig}" x:Name="window" x:Class="EliteBGS.MainWindow"
mc:Ignorable="d"
@@ -39,10 +40,10 @@
-
-
+
+
-
+
diff --git a/EliteBGS/MainWindow.xaml.cs b/EliteBGS/MainWindow.xaml.cs
index 016259b..163c6c9 100644
--- a/EliteBGS/MainWindow.xaml.cs
+++ b/EliteBGS/MainWindow.xaml.cs
@@ -11,6 +11,7 @@ using EDPlayerJournal.BGS;
using EDPlayerJournal.Entries;
using EliteBGS.BGS;
using EliteBGS.Util;
+using System.Globalization;
using System.Windows.Forms;
namespace EliteBGS;
@@ -56,11 +57,20 @@ public partial class MainWindow : Window {
journal = new PlayerJournal(Config.Global.JournalLocation);
// Set both to now
- startdate.SelectedDate = DateTime.Now;
- enddate.SelectedDate = DateTime.Now;
+ startdate.CultureInfo = enddate.CultureInfo = CultureInfo.InvariantCulture;
+ ResetTime();
+
journallocation.Text = Config.Global.JournalLocation;
}
+ private void ResetTime() {
+ DateTime today = DateTime.Today;
+ DateTime tomorrow = today.AddDays(1);
+
+ startdate.Value = today;
+ enddate.Value = tomorrow;
+ }
+
private void TreeView_CheckBox_Updated(object sender, RoutedEventArgs args) {
GenerateLog();
}
@@ -86,9 +96,8 @@ public partial class MainWindow : Window {
List transactions = parser.Parse(entries);
// Filter the transactions down to the given time frame
- DateTime actualend = end.AddDays(1);
transactions = transactions
- .Where(t => t.CompletedAtDateTime >= start && t.CompletedAtDateTime <= actualend)
+ .Where(t => t.CompletedAtDateTime >= start && t.CompletedAtDateTime <= end)
.ToList()
;
@@ -120,8 +129,8 @@ public partial class MainWindow : Window {
try {
TransactionParser parser = new TransactionParser();
- DateTime start = startdate.SelectedDate ?? DateTime.Now;
- DateTime end = enddate.SelectedDate ?? DateTime.Now;
+ DateTime start = startdate.Value ?? DateTime.Now;
+ DateTime end = enddate.Value ?? DateTime.Now;
journal.Open(); // Load all files
// Log files only get rotated if you restart the game client. This means that there might