示例#1
0
 private void mainViewLoaded(object sender, EventArgs e)
 {
     if (ServiceLocationContainer.CanResolve <ISplashScreen>())
     {
         ServiceLocationContainer.Resolve <ISplashScreen>().Close();
     }
     uiWaitHandle.Set();
 }
示例#2
0
        private void StartUI()
        {
            if (ServiceLocationContainer.CanResolve <ISplashScreen>())
            {
                ServiceLocationContainer.Resolve <ISplashScreen>().Show();
            }

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

            CheckApplicationResources();
            RunMainView();
        }
示例#3
0
        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();
                }
            }
        }