From acc52477100589c854cd3410a09949dd86fac754 Mon Sep 17 00:00:00 2001 From: sr55 Date: Tue, 19 Nov 2013 23:18:43 +0000 Subject: WinGui: Putting in place the framework for a static preview window. Initial window created and now displays a static preview. This feature is not enabled in the UI yet. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5901 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../ViewModels/StaticPreviewViewModel.cs | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs (limited to 'win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs') diff --git a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs new file mode 100644 index 000000000..dc851864a --- /dev/null +++ b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs @@ -0,0 +1,58 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// +// +// The Static Preview View Model +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.ViewModels +{ + using System.Windows.Media.Imaging; + + using HandBrakeWPF.ViewModels.Interfaces; + + /// + /// The Static Preview View Model + /// + public class StaticPreviewViewModel : ViewModelBase, IStaticPreviewViewModel + { + /// + /// The preview image. + /// + private BitmapImage previewImage; + + /// + /// Gets or sets the preview image. + /// + public BitmapImage PreviewImage + { + get + { + return this.previewImage; + } + set + { + if (Equals(value, this.previewImage)) + { + return; + } + + this.previewImage = value; + this.NotifyOfPropertyChange(() => this.PreviewImage); + } + } + + /// + /// The preview frame. + /// + /// + /// The image. + /// + public void PreviewFrame(BitmapImage image) + { + this.PreviewImage = image; + } + } +} -- cgit v1.2.3