diff options
author | sr55 <[email protected]> | 2011-12-30 18:57:30 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-12-30 18:57:30 +0000 |
commit | cd3e951792f05944fb9ba4f1bc17e581318bfe8f (patch) | |
tree | cc36dcf807b7d371132429fd7a7a5550233ee737 /win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | |
parent | 1a4342793d9c7054b1a70030787af46f77208288 (diff) |
WinGui: (WPF) Move all the main UI tab UserControls into an MVVM format. Mostly code shuffling.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4393 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 49 |
1 files changed, 40 insertions, 9 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index d742eea5c..daf8bcce0 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -42,11 +42,6 @@ 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;
@@ -153,9 +148,7 @@ namespace HandBrakeWPF.ViewModels [ImportingConstructor]
public MainViewModel(IWindowManager windowManager, IUserSettingService userSettingService, IScan scanService, IEncode encodeService, IPresetService presetService,
IErrorService errorService)
- : base(windowManager)
{
- this.userSettingService = userSettingService;
this.scanService = scanService;
this.encodeService = encodeService;
this.presetService = presetService;
@@ -178,6 +171,44 @@ namespace HandBrakeWPF.ViewModels this.queueProcessor.EncodeService.EncodeStatusChanged += this.EncodeStatusChanged;
}
+ #region View Model Properties
+ /// <summary>
+ /// Gets or sets PictureSettingsViewModel.
+ /// </summary>
+ public IPictureSettingsViewModel PictureSettingsViewModel { get; set; }
+
+ /// <summary>
+ /// Gets or sets AudioViewModel.
+ /// </summary>
+ public IAudioViewModel AudioViewModel { get; set; }
+
+ /// <summary>
+ /// Gets or sets SubtitleViewModel.
+ /// </summary>
+ public ISubtitlesViewModel SubtitleViewModel { get; set; }
+
+ /// <summary>
+ /// Gets or sets ChaptersViewModel.
+ /// </summary>
+ public IChaptersViewModel ChaptersViewModel { get; set; }
+
+ /// <summary>
+ /// Gets or sets AdvancedViewModel.
+ /// </summary>
+ public IAdvancedViewModel AdvancedViewModel { get; set; }
+
+ /// <summary>
+ /// Gets or sets VideoViewModel.
+ /// </summary>
+ public IVideoViewModel VideoViewModel { get; set; }
+
+ /// <summary>
+ /// Gets or sets FiltersViewModel.
+ /// </summary>
+ public IFiltersViewModel FiltersViewModel { get; set; }
+
+ #endregion
+
#region Properties
/// <summary>
/// Gets or sets TestProperty.
@@ -934,7 +965,7 @@ namespace HandBrakeWPF.ViewModels // TODO
// 1. Disable GUI.
this.sourcePath = filename;
- this.scanService.Scan(filename, title, this.userSettingService.GetUserSetting<int>(ASUserSettingConstants.PreviewScanCount));
+ this.scanService.Scan(filename, title, this.UserSettingService.GetUserSetting<int>(ASUserSettingConstants.PreviewScanCount));
}
/// <summary>
@@ -948,7 +979,7 @@ namespace HandBrakeWPF.ViewModels // Make sure the output extension is set correctly based on the users preferences and selection.
if (newExtension == ".mp4" || newExtension == ".m4v")
{
- switch (this.userSettingService.GetUserSetting<int>(UserSettingConstants.UseM4v))
+ switch (this.UserSettingService.GetUserSetting<int>(UserSettingConstants.UseM4v))
{
case 0: // Auto
newExtension = this.CurrentTask.RequiresM4v ? ".m4v" : ".mp4";
|