summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-06-08 02:13:59 +0000
committersr55 <[email protected]>2012-06-08 02:13:59 +0000
commita03739f0457ad9211744e540f33ab8a3c05598b9 (patch)
tree2f0dda9a6f9e9c48b2bb58d9cc6462c77bd55715 /win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
parent368023e13a633e9dc94f27696c84f3ce3ca24ed3 (diff)
WinGui: Added a Shell View which can host various windows. By default this will host the Main window. Changed the Options window to be a usercontrol so it can be hosted in this shell view, allowing for a chrome-esk style options within the main window without the need for a dialog window. The options window will need some design changes. (Coming soon)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4721 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 061a1e148..d0a6450c8 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -32,7 +32,9 @@ namespace HandBrakeWPF.ViewModels
using HandBrake.ApplicationServices.Utilities;
using HandBrakeWPF.Helpers;
+ using HandBrakeWPF.Model;
using HandBrakeWPF.ViewModels.Interfaces;
+ using HandBrakeWPF.Views;
using Ookii.Dialogs.Wpf;
@@ -74,6 +76,11 @@ namespace HandBrakeWPF.ViewModels
private readonly IErrorService errorService;
/// <summary>
+ /// The Shell View Model
+ /// </summary>
+ private readonly IShellViewModel shellViewModel;
+
+ /// <summary>
/// Backing field for the user setting service.
/// </summary>
private readonly IUserSettingService userSettingService;
@@ -157,14 +164,18 @@ namespace HandBrakeWPF.ViewModels
/// <param name="errorService">
/// The Error Service
/// </param>
+ /// <param name="shellViewModel">
+ /// The shell View Model.
+ /// </param>
[ImportingConstructor]
public MainViewModel(IWindowManager windowManager, IUserSettingService userSettingService, IScan scanService, IEncode encodeService, IPresetService presetService,
- IErrorService errorService)
+ IErrorService errorService, IShellViewModel shellViewModel)
{
this.scanService = scanService;
this.encodeService = encodeService;
this.presetService = presetService;
this.errorService = errorService;
+ this.shellViewModel = shellViewModel;
this.userSettingService = userSettingService;
this.queueProcessor = IoC.Get<IQueueProcessor>(); // TODO Instance ID!
@@ -836,7 +847,7 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public void OpenOptionsWindow()
{
- this.WindowManager.ShowWindow(IoC.Get<IOptionsViewModel>());
+ this.shellViewModel.DisplayWindow(ShellWindow.OptionsWindow);
}
/// <summary>