diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 30c705381..ddc0f4472 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1,7 +1,11 @@ -/* MainViewModel.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="MainViewModel.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// HandBrakes Main Window
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.ViewModels
{
@@ -30,6 +34,11 @@ namespace HandBrakeWPF.ViewModels #region Private Variables and Services
/// <summary>
+ /// The Backing field for the user setting service.
+ /// </summary>
+ private readonly IUserSettingService userSettingService;
+
+ /// <summary>
/// The Source Scan Service.
/// </summary>
private readonly IScan scanService;
@@ -61,8 +70,6 @@ namespace HandBrakeWPF.ViewModels #endregion
- #region Properties
-
/// <summary>
/// Initializes a new instance of the <see cref="MainViewModel"/> class.
/// The viewmodel for HandBrakes main window.
@@ -70,9 +77,12 @@ namespace HandBrakeWPF.ViewModels /// <param name="windowManager">
/// The window manager.
/// </param>
+ /// <param name="userSettingService">The User Setting Service</param>
[ImportingConstructor]
- public MainViewModel(IWindowManager windowManager) : base(windowManager)
+ public MainViewModel(IWindowManager windowManager, IUserSettingService userSettingService)
+ : base(windowManager)
{
+ this.userSettingService = userSettingService;
// Setup Services (TODO - Bring Castle back into the project to wire these up for us)
this.scanService = File.Exists("hb.dll") ? (IScan)new LibScan() : new ScanService();
this.queueProcessor = new QueueProcessor(Process.GetProcessesByName("HandBrake").Length);
@@ -92,6 +102,7 @@ namespace HandBrakeWPF.ViewModels this.queueProcessor.EncodeService.EncodeStatusChanged += this.EncodeStatusChanged;
}
+ #region Properties
/// <summary>
/// Gets or sets TestProperty.
/// </summary>
@@ -192,22 +203,31 @@ namespace HandBrakeWPF.ViewModels }
#region Menu and Taskbar
-
+
+ /// <summary>
+ /// Open the About Window
+ /// </summary>
public void OpenAboutApplication()
{
- this.WindowManager.ShowWindow(new AboutViewModel(this.WindowManager));
+ this.WindowManager.ShowWindow(new AboutViewModel(this.WindowManager, this.userSettingService));
}
+ /// <summary>
+ /// Open the Options Window
+ /// </summary>
public void OpenOptionsWindow()
{
this.WindowManager.ShowWindow(new OptionsViewModel(this.WindowManager));
}
+ /// <summary>
+ /// Open the Queue Window.
+ /// </summary>
public void OpenQueueWindow()
{
this.WindowManager.ShowWindow(new QueueViewModel(this.WindowManager));
}
-
+
/// <summary>
/// Shutdown the Application
/// </summary>
|