App: Fix errors on startup
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ctrl="clr-namespace:Elwig.Controls"
|
||||
StartupUri="Windows\MainWindow.xaml"
|
||||
Exit="Application_Exit">
|
||||
<Application.Resources>
|
||||
<ctrl:BoolToStringConverter x:Key="BoolToStarConverter" FalseValue="" TrueValue="*"/>
|
||||
|
@ -17,6 +17,7 @@ using Elwig.Dialogs;
|
||||
using System.Threading.Tasks;
|
||||
using Elwig.Helpers.Billing;
|
||||
using Elwig.Models.Entities;
|
||||
using System.Text;
|
||||
|
||||
namespace Elwig {
|
||||
public partial class App : Application {
|
||||
@ -65,7 +66,7 @@ namespace Elwig {
|
||||
private readonly DispatcherTimer ContextTimer = new() { Interval = TimeSpan.FromSeconds(2) };
|
||||
|
||||
public App() : base() {
|
||||
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
|
||||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
||||
Directory.CreateDirectory(TempPath);
|
||||
Directory.CreateDirectory(DataPath);
|
||||
MainDispatcher = Dispatcher;
|
||||
@ -178,6 +179,9 @@ namespace Elwig {
|
||||
}
|
||||
|
||||
base.OnStartup(evt);
|
||||
|
||||
var window = new MainWindow();
|
||||
window.Show();
|
||||
}
|
||||
|
||||
private async void Application_Exit(object sender, ExitEventArgs evt) {
|
||||
|
Reference in New Issue
Block a user