private void Application_Startup(object sender, StartupEventArgs e)
{
XmlConfigurator.Configure();
PrintHeader();
Current.DispatcherUnhandledException += (s, ex) => {
LOGGER.Error("DispatcherUnhandledException", ex.Exception as Exception);
};
if (IsAdministrator()) {
if (!InstanceChecker.AlreadyRunning("27ec7e49-6567-4ee2-9ad6-073705189109")) {
// initialization sequence
Kernel.Get<IEnvironmentManager>();
Kernel.Get<Splashscreen>().Show();
Kernel.Get<PluginManager>().Start();
(Kernel.Get<IProfileManager>() as ProfileManager).Start();
(Kernel.Get<IWindowManager>() as WindowManager).Start();
} else {
Application.Current.Shutdown();
}
} else
MessageBox.Show("Administrator Privileges are required to run DMO AdvancedLauncher. Please run application as Administrator.", "Please run application as Administrator", MessageBoxButton.OK, MessageBoxImage.Warning);
}