Files
Nebula-Auth/NebulaAuth/App.xaml.cs
T
2024-02-01 01:21:56 +02:00

36 lines
772 B
C#

using NebulaAuth.Core;
using NebulaAuth.Model;
using NebulaAuth.Model.Exceptions;
using System;
using System.Windows;
using CodingSeb.Localization;
namespace NebulaAuth;
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
LocManager.Init();
LocManager.SetApplicationLocalization(Settings.Instance.Language);
try
{
Shell.Initialize();
}
catch (Exception ex)
{
var msg = ex.Message;
if (ex is CantAlignTimeException)
{
msg = Loc.Tr(LocManager.GetCodeBehind("CantAlignTimeError"));
}
MessageBox.Show(msg);
throw;
}
}
}