|
using System.Windows;
using System.Windows.Media;
using RZWScreenSaver.SlidePages;
namespace RZWScreenSaver{
public class PageHost : Window{
public PageHost(){
Background = Brushes.Black;
WindowStyle = WindowStyle.None;
ResizeMode = ResizeMode.NoResize;
ShowInTaskbar = false;
}
public PageHost(IPictureSource source, Rect displayArea) : this(){
Left = (displayArea.Left);
Top = (displayArea.Top);
Width = (displayArea.Width);
Height = (displayArea.Height);
pictureSource = source;
}
public ISlidePage SlidePage{
get { return slide; }
set{
if (slide != null){
pictureSource.PictureSetChanged -= slide.OnPictureSetChanged;
pictureSource.PictureChanged -= slide.OnShowPicture;
}
Content = slide = value;
pictureSource.PictureChanged += slide.OnShowPicture;
pictureSource.PictureSetChanged += slide.OnPictureSetChanged;
}
}
public void SendToBottom(){
this.SetNoActivate();
this.SetBottomMost();
}
protected readonly IPictureSource pictureSource;
protected ISlidePage slide;
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.