Esempio n. 1
0
        private static void OnWindowCloseNotBlocked(object sender, EventArgs args)
        {
            bool flag1 = SyncControls.Instance.CurrentDeviceOverride.UIFirmwareUpdater != null && SyncControls.Instance.CurrentDeviceOverride.UIFirmwareUpdater.UpdateInProgress;
            bool flag2 = SyncControls.Instance.CurrentDeviceOverride.UIFirmwareRestorer != null && SyncControls.Instance.CurrentDeviceOverride.UIFirmwareRestorer.RestoreInProgress;

            if (CDAccess.Instance.Notification != null || CDAccess.Instance.BurnNotification != null || Download.IsCreated && Download.Instance.Notification != null || (flag1 || flag2))
            {
                if (Application.RenderingType == RenderingType.GDI && SingletonModelItem <TransportControls> .Instance.PlayingVideo)
                {
                    SingletonModelItem <TransportControls> .Instance.Stop.Invoke();
                }
                string ui = "res://ZuneShellResources!ConfirmClose.uix#ConfirmCloseContentUI";
                if (flag1)
                {
                    ui = "res://ZuneShellResources!ConfirmClose.uix#ConfirmFirmwareUpdateCloseContentUI";
                }
                else if (flag2)
                {
                    ui = "res://ZuneShellResources!ConfirmClose.uix#ConfirmFirmwareRestoreCloseContentUI";
                }
                ConfirmCloseDialog.Show(ui, delegate
                {
                    ForceClose(sender, args);
                });
            }
            else
            {
                ForceClose(sender, args);
            }
        }
Esempio n. 2
0
        private static void CorePhase3Ready(int hr, bool fSuc)
        {
            if (!fSuc)
            {
                ZuneUI.Shell.ShowErrorDialog(hr, StringId.IDS_ZUNELAUNCH_ERRORTITLE, StringId.IDS_ZUNELAUNCH_COMPONENT_ERROR);
                ConfirmCloseDialog.ShowDefault();
            }
            else
            {
                SingletonModelItem <WindowSnapSimulator> .Instance.Phase3Init();

                Service.Phase3Initialize();
                SignIn.Instance.Phase3Init();
                MetadataNotifications.Instance.Phase2Init();
                SingletonModelItem <UIDeviceList> .Instance.Phase2Init();

                CDAccess.Phase2Catchup();
                SingletonModelItem <TransportControls> .Instance.Phase2Init();

                SubscriptionEventsListener.Instance.StartListening();
                SoftwareUpdates.Instance.StartUp();
                _interopNotifications = new InteropNotifications();
                if (_interopNotifications != null)
                {
                    _interopNotifications.ShowErrorDialog += new OnShowErrorDialogHandler(OnShowErrorDialog);
                }
                Download.Instance.Phase3Init();
                SyncControls.Instance.Phase3Init();
                PodcastCredentials.Instance.Phase2Init();
                ProxyCredentials.Instance.Phase2Init();
                Win7ShellManager.Instance.SubprocWindow(Application.Window.Handle);
                PhotoManager.Instance.SetWindowHandle(Application.Window.Handle);
                if (OSVersion.IsWin7())
                {
                    SingletonModelItem <ThumbBarButtons> .Instance.Phase3Init();

                    SingletonModelItem <JumpListManager> .Instance.JumpListPinUpdateRequested.Invoke();
                }
                if (!QuickMix.QuickMix.Instance.IsReady)
                {
                    _quickMixProgress = new QuickMixProgress();
                    _quickMixProgress.PropertyChanged += new PropertyChangedEventHandler(OnQuickMixPropertyChanged);
                }
                Telemetry.Instance.StartUpload();
                FeaturesChanged.Instance.StartUp();
                CultureHelper.CheckValidRegionAndLanguage();
                ((ZuneUI.Shell)ZuneShell.DefaultInstance).ApplicationInitializationIsComplete = true;
            }
        }