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(); }
public SlideShowWindow(FacebookPhotoCollection photos, FacebookPhoto startPhoto) { Verify.IsNotNull(photos, "photos"); InitializeComponent(); SlideShowControl.FacebookPhotoCollection = photos; SlideShowControl.StartingPhoto = startPhoto; DependencyPropertyDescriptor desc = DependencyPropertyDescriptor.FromProperty(PhotoSlideShowControl.IsStoppedProperty, typeof(PhotoSlideShowControl)); desc.AddValueChanged(SlideShowControl, _OnSlideShowControlIsStoppedChanged); }