Exemple #1
0
        internal void SwitchToSlideShow(FacebookPhotoCollection photos, FacebookPhoto startPhoto)
        {
            if (_viewMode == _WindowMode.SlideShow)
            {
                Assert.IsNotNull(_slideshowWindow);
                _slideshowWindow.Activate();
                return;
            }

            _previousViewMode = _viewMode;
            _viewMode         = _WindowMode.SlideShow;

            if (_chatWindow != null)
            {
                _chatWindow.Hide();
            }

            if (_minimodeWindow.IsVisible)
            {
                _minimodeWindow.Hide();
            }

            if (_mainWindow.IsVisible)
            {
                _mainWindow.Hide();
            }

            _slideshowWindow = new SlideShowWindow(photos, startPhoto);
            _slideshowWindow.Show();
            _slideshowWindow.Closing += (sender, e) => ExitSlideShow();
        }
Exemple #2
0
        internal void SwitchToMainMode()
        {
            Dispatcher.VerifyAccess();

            ExitSlideShow();

            if (_viewMode == _WindowMode.Normal)
            {
                return;
            }
            _viewMode = _WindowMode.Normal;

            _minimodeWindow.Hide();
            _mainWindow.Show();

            if (_mainWindow.WindowState == WindowState.Minimized)
            {
                _mainWindow.WindowState = WindowState.Normal;
            }

            _mainWindow.Activate();

            var      mainJumpList    = (JumpList)Resources["MainModeJumpList"];
            JumpList currentJumpList = JumpList.GetJumpList(this);

            // Remove and replace all tasks.
            currentJumpList.JumpItems.RemoveAll(item => item.CustomCategory == null);
            currentJumpList.JumpItems.AddRange(mainJumpList.JumpItems);

            currentJumpList.Apply();
        }
Exemple #3
0
        internal void ExitSlideShow()
        {
            if (_viewMode != _WindowMode.SlideShow)
            {
                return;
            }

            _viewMode = _previousViewMode;
            if (_viewMode == _WindowMode.MiniMode)
            {
                _minimodeWindow.Show();
            }
            else
            {
                _mainWindow.Show();
            }

            if (_chatWindow != null)
            {
                _chatWindow.Show();
            }
        }