Beispiel #1
0
        async void StateChanged(object sender, MvxSetup.MvxSetupStateEventArgs e)
        {
            if (e.SetupState == MvxSetup.MvxSetupState.Initialized)
            {
                await Mvx.Resolve <ITrackFacade>().Initialize();

                _setup.StateChanged -= StateChanged;
                _setup = null;
            }
        }
Beispiel #2
0
        async void StateChanged(object sender, MvxSetup.MvxSetupStateEventArgs e)
        {
            if (e.SetupState == MvxSetup.MvxSetupState.Initialized)
            {
                await Mvx.Resolve <ITrackFacade>().CheckAreWeStillOnTheRoadAsync();

                await Mvx.Resolve <ITrackFacade>().InitializeAsync();

                _setup.StateChanged -= StateChanged;
                _setup = null;
            }
        }
Beispiel #3
0
        public static void Initialize()
        {
            if (!IsInDesignTime)
            {
                return;
            }

            if (MvxSingleton <IMvxIoCProvider> .Instance == null)
            {
                var iocProvider = MvxIoCProvider.Initialize();
                Mvx.IoCProvider.RegisterSingleton(iocProvider);
            }

            MvxSetup.RegisterSetupType <MvxWpfSetup <App> >(System.Reflection.Assembly.GetExecutingAssembly());
            var instance = MvxWpfSetupSingleton.EnsureSingletonAvailable(Application.Current.Dispatcher, new Content());
        }
 public SplashScreen()
     : base(Resource.Layout.SplashScreen)
 {
     MvxSetup.RegisterSetupType <Setup>(this.GetType().Assembly);
 }
Beispiel #5
0
 public static void InstallShiny(this MvxSetup setup)
 {
     ShinyHost.Populate((serviceType, func, lifetime) =>
                        Mvx.IoCProvider.RegisterType(serviceType, func)
                        );
 }
Beispiel #6
0
 public App(MvxSetup setup)
 {
     _setup = setup;
     _setup.StateChanged += StateChanged;
 }