private void RunMainView()
        {
            var mainView = ServiceLocationContainer.Resolve <IMainView>();

            mainView.Loaded += mainViewLoaded;
            mainView.Closed += mainViewClosed;
            mainView.Run();
        }
 private void mainViewLoaded(object sender, EventArgs e)
 {
     if (ServiceLocationContainer.CanResolve <ISplashScreen>())
     {
         ServiceLocationContainer.Resolve <ISplashScreen>().Close();
     }
     uiWaitHandle.Set();
 }
 protected override void ExecuteAction(IAction action, ActionExecutionContext context)
 {
     if (action is IUiAction)
     {
         var syncContext = ServiceLocationContainer.Resolve <ISynchronizationContextManager>();
         syncContext.Execute(action, context);
     }
     else
     {
         action.Execute(context);
     }
 }
        private void StartUI()
        {
            if (ServiceLocationContainer.CanResolve <ISplashScreen>())
            {
                ServiceLocationContainer.Resolve <ISplashScreen>().Show();
            }

            if (ServiceLocationContainer.CanResolve <IUiApplicationBehavior>())
            {
                ServiceLocationContainer.Resolve <IUiApplicationBehavior>()
                .Initialize();
            }

            CheckApplicationResources();
            RunMainView();
        }
        protected virtual void CheckApplicationResources()
        {
            var resourceCheckers = ServiceLocationContainer.ResolveAbsolutelyAll <IApplicationResource>();

            foreach (var resource in resourceCheckers)
            {
                if (!resource.CheckAvailability())
                {
                    if (resource.HasUI && ServiceLocationContainer.CanResolve <ISplashScreen>())
                    {
                        ServiceLocationContainer.Resolve <ISplashScreen>().Close();
                    }
                    resource.MakeAvailable();
                }
            }
        }