public void InitApplication(IAppStart appStart, HelpCommandHandler helpCommandHandler, ISettingsManager settingsManager)
 {
     _appStart        = appStart;
     _settingsManager = settingsManager;
     helpCommandHandler.RegisterHelpCommandBinding();
     RegisterXamlCulture();
 }
Beispiel #2
0
 public App(IAppStart appStart, HelpCommandHandler helpCommandHandler, ISettingsManager settingsManager)
 {
     _appStart        = appStart;
     _settingsManager = settingsManager;
     InitializeComponent();
     helpCommandHandler.RegisterHelpCommandBinding();
     RegisterXamlCulture();
 }
        public void InitApplication(IAppStart appStart, HelpCommandHandler helpCommandHandler, ISettingsManager settingsManager)
        {
            _appStart        = appStart;
            _settingsManager = settingsManager;
            helpCommandHandler.RegisterHelpCommandBinding();
            this.ShutdownMode = ShutdownMode.OnExplicitShutdown;

            RegisterXamlCulture();
        }
        private ExitCode RunAppStart(IAppStart appStart)
        {
            // Run this in a separate thread to avoid deadlocks

            var exitCode = ExitCode.Ok;
            var thread   = new Thread(() => exitCode = appStart.Run().GetAwaiter().GetResult());

            thread.SetApartmentState(ApartmentState.STA);
            thread.Start();
            thread.Join();

            return(exitCode);
        }
Beispiel #5
0
 public App(IAppStart appStart)
 {
     _appStart = appStart;
     InitializeComponent();
 }