Esempio n. 1
0
        public void TrayBringToForeground()
        {
            if (IsMainWindowOpen)
            {
                Execute.PostToUIThread(FocusMainWindow);
                return;
            }

            // Initialize the shared UI when first showing the window
            if (!UI.Shared.Bootstrapper.Initialized)
            {
                UI.Shared.Bootstrapper.Initialize(_kernel);
            }

            Execute.OnUIThreadSync(() =>
            {
                _splashViewModel?.RequestClose();
                _splashViewModel       = null;
                _rootViewModel         = _kernel.Get <RootViewModel>();
                _rootViewModel.Closed += RootViewModelOnClosed;
                _windowManager.ShowWindow(_rootViewModel);
            });

            OnMainWindowOpened();
        }
Esempio n. 2
0
 private void ShowMainWindow(IWindowManager windowManager, SplashViewModel splashViewModel)
 {
     Execute.OnUIThread(() =>
     {
         windowManager.ShowWindow(RootViewModel);
         splashViewModel.RequestClose();
     });
 }