Ejemplo n.º 1
0
        protected override void OnViewAttached(object view, object context)
        {
            base.OnViewAttached(view, context);

            WinRTWrappersService.RegisterSearchQueryHandler((sender, args) => SendSearchQueryMessage(args.QueryText));
            WinRTWrappersService.RegisterSettingsRequestedHandler(
                (sender, args) => args.AddSetting <SettingsViewModel>());
            WinRTWrappersService.RegisterSettingsRequestedHandler(
                (sender, args) => args.AddSetting <PrivacyPolicyViewModel>());
            WinRTWrappersService.RegisterMediaControlHandler(new MediaControlHandler(_eventAggregator));

            PlayerControls = (IPlayerControls)view;

            var dispatcher = CoreWindow.GetForCurrentThread().Dispatcher;

            dispatcher.RunAsync(
                CoreDispatcherPriority.Normal,
                async() =>
            {
                HookBugFreak();

                RegisterPlayers();

                InstantiateRequiredSingletons();

                await LoadSettings();

                await RestoreLastViewOrGoToMain((ShellView)view);
            });
        }
Ejemplo n.º 2
0
        protected override void OnViewAttached(object view, object context)
        {
            base.OnViewAttached(view, context);

            WinRTWrappersService.RegisterSearchQueryHandler((sender, args) => SendSearchQueryMessage(args.QueryText));
            WinRTWrappersService.RegisterSettingsRequestedHandler((sender, args) => args.AddSetting <SettingsViewModel>());
            WinRTWrappersService.RegisterSettingsRequestedHandler((sender, args) => args.AddSetting <PrivacyPolicyViewModel>());

            PlayerControls = (IPlayerControls)view;
        }