diff --git a/src/BreCalClient/App.xaml b/src/BreCalClient/App.xaml index e74dc10..376a37a 100644 --- a/src/BreCalClient/App.xaml +++ b/src/BreCalClient/App.xaml @@ -2,7 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:BreCalClient" - StartupUri="MainWindow.xaml" Exit="Application_Exit"> + StartupUri="MainWindow.xaml" Exit="Application_Exit" Startup="Application_Startup" > diff --git a/src/BreCalClient/App.xaml.cs b/src/BreCalClient/App.xaml.cs index 191a183..c4407b8 100644 --- a/src/BreCalClient/App.xaml.cs +++ b/src/BreCalClient/App.xaml.cs @@ -1,4 +1,5 @@ using BreCalClient.misc.Model; +using BreCalClient.Properties; using System.Windows; namespace BreCalClient @@ -14,5 +15,20 @@ namespace BreCalClient { BreCalClient.Properties.Settings.Default.Save(); } + + private void Application_Startup(object sender, StartupEventArgs e) + { + // Window size sanity check + if(Settings.Default.Width == 0) + { + Settings.Default.Width = 800; + Settings.Default.Save(); + } + if(Settings.Default.Height == 0) + { + Settings.Default.Height = 450; + Settings.Default.Save(); + } + } } } diff --git a/src/BreCalClient/EditShipcallControl.xaml b/src/BreCalClient/EditShipcallControl.xaml index d54a4d8..4e098cd 100644 --- a/src/BreCalClient/EditShipcallControl.xaml +++ b/src/BreCalClient/EditShipcallControl.xaml @@ -47,7 +47,7 @@