summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-11-20 18:30:43 +0000
committersr55 <[email protected]>2011-11-20 18:30:43 +0000
commitc0c88720f5f59104770be38f0e84d7c2897ef465 (patch)
treeb1a17f7d388203cf99f5eec0665c1806dd1b8221 /win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs
parent24cfd6cf3e18288052533ea385a6d0b648fac139 (diff)
WinGui: (WPF) Add global exception handler and new wpf exception view.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4361 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs46
1 files changed, 42 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs b/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs
index f9781800c..e226fc549 100644
--- a/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs
@@ -18,12 +18,23 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public class ViewModelBase : Screen, IViewModelBase
{
+ #region Constants and Fields
+
/// <summary>
/// Backing Field to prevent the Load method being called more than once.
/// </summary>
private bool hasLoaded;
/// <summary>
+ /// The title.
+ /// </summary>
+ private string title;
+
+ #endregion
+
+ #region Constructors and Destructors
+
+ /// <summary>
/// Initializes a new instance of the <see cref="ViewModelBase"/> class.
/// </summary>
/// <param name="windowManager">
@@ -34,22 +45,47 @@ namespace HandBrakeWPF.ViewModels
this.WindowManager = windowManager;
}
+ #endregion
+
+ #region Properties
+
+ /// <summary>
+ /// Gets or sets Details.
+ /// </summary>
+ public string Title
+ {
+ get
+ {
+ return this.title;
+ }
+
+ set
+ {
+ this.title = value;
+ this.NotifyOfPropertyChange("Title");
+ }
+ }
+
/// <summary>
/// Gets WindowManager.
/// </summary>
public IWindowManager WindowManager { get; private set; }
+ #endregion
+
+ #region Public Methods
+
/// <summary>
/// Perform any Initialisation for this ViewModelBase.
/// </summary>
public void Load()
{
- if (!hasLoaded)
+ if (!this.hasLoaded)
{
- hasLoaded = true;
+ this.hasLoaded = true;
// Initialise the ViewModels OnLoad method if it exists.
- this.OnLoad();
+ this.OnLoad();
}
}
@@ -60,5 +96,7 @@ namespace HandBrakeWPF.ViewModels
{
// Impliment in the ViewModel to perform viewmodel specific code.
}
+
+ #endregion
}
-}
+} \ No newline at end of file