diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index 52ef447e0..706009107 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -26,6 +26,7 @@ namespace HandBrakeWPF.ViewModels using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.ApplicationServices.Utilities;
+ using HandBrakeWPF.Model;
using HandBrakeWPF.ViewModels.Interfaces;
using Ookii.Dialogs.Wpf;
@@ -44,6 +45,11 @@ namespace HandBrakeWPF.ViewModels private readonly IUserSettingService userSettingService;
/// <summary>
+ /// The Shell View Model
+ /// </summary>
+ private readonly IShellViewModel shellViewModel;
+
+ /// <summary>
/// The add audio mode options.
/// </summary>
private BindingList<string> addAudioModeOptions = new BindingList<string>();
@@ -317,10 +323,14 @@ namespace HandBrakeWPF.ViewModels /// <param name="userSettingService">
/// The user Setting Service.
/// </param>
- public OptionsViewModel(IWindowManager windowManager, IUserSettingService userSettingService)
+ /// <param name="shellViewModel">
+ /// The shell View Model.
+ /// </param>
+ public OptionsViewModel(IWindowManager windowManager, IUserSettingService userSettingService, IShellViewModel shellViewModel)
{
this.Title = "Options";
this.userSettingService = userSettingService;
+ this.shellViewModel = shellViewModel;
this.OnLoad();
}
@@ -1466,7 +1476,7 @@ namespace HandBrakeWPF.ViewModels public void Close()
{
this.Save();
- this.TryClose();
+ this.shellViewModel.DisplayWindow(ShellWindow.MainWindow);
}
/// <summary>
|