diff options
author | sr55 <[email protected]> | 2012-06-08 02:13:59 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-06-08 02:13:59 +0000 |
commit | a03739f0457ad9211744e540f33ab8a3c05598b9 (patch) | |
tree | 2f0dda9a6f9e9c48b2bb58d9cc6462c77bd55715 /win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | |
parent | 368023e13a633e9dc94f27696c84f3ce3ca24ed3 (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/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>
|