diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 15 |
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>
|