diff options
author | sr55 <[email protected]> | 2015-07-22 18:04:29 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-07-22 18:04:29 +0000 |
commit | 144d696814bbfc133e05293ce53da520267ae6e0 (patch) | |
tree | 18964e05388f0bc269f78bd8278cdd311b0a77b7 /win/CS | |
parent | 1b2edec9062e482a7d3c6f45fd1b36c6737c6376 (diff) |
WinGui: Minor tidy up of the Main VM constructor.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7365 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs | 11 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 46 |
2 files changed, 46 insertions, 11 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs index da068d193..c4fc78868 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AdvancedViewModel.cs @@ -30,6 +30,17 @@ namespace HandBrakeWPF.ViewModels #endregion
+ /// <summary>
+ /// Initializes a new instance of the <see cref="AdvancedViewModel"/> class.
+ /// </summary>
+ /// <param name="x264ViewModel">
+ /// The x 264 view model.
+ /// </param>
+ public AdvancedViewModel(IX264ViewModel x264ViewModel)
+ {
+ this.X264ViewModel = x264ViewModel;
+ }
+
#region Properties
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 638264d84..320ffbf23 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -239,9 +239,35 @@ namespace HandBrakeWPF.ViewModels /// <param name="windowManager">
/// The window Manager.
/// </param>
+ /// <param name="pictureSettingsViewModel">
+ /// The picture Settings View Model.
+ /// </param>
+ /// <param name="videoViewModel">
+ /// The video View Model.
+ /// </param>
+ /// <param name="filtersViewModel">
+ /// The filters View Model.
+ /// </param>
+ /// <param name="audioViewModel">
+ /// The audio View Model.
+ /// </param>
+ /// <param name="subtitlesViewModel">
+ /// The subtitles View Model.
+ /// </param>
+ /// <param name="advancedViewModel">
+ /// The advanced View Model.
+ /// </param>
+ /// <param name="chaptersViewModel">
+ /// The chapters View Model.
+ /// </param>
+ /// <param name="staticPreviewViewModel">
+ /// The static Preview View Model.
+ /// </param>
public MainViewModel(IUserSettingService userSettingService, IScan scanService, IEncode encodeService, IPresetService presetService,
IErrorService errorService, IUpdateService updateService, INotificationService notificationService,
- IPrePostActionService whenDoneService, IWindowManager windowManager)
+ IPrePostActionService whenDoneService, IWindowManager windowManager, IPictureSettingsViewModel pictureSettingsViewModel, IVideoViewModel videoViewModel,
+ IFiltersViewModel filtersViewModel, IAudioViewModel audioViewModel, ISubtitlesViewModel subtitlesViewModel,
+ IAdvancedViewModel advancedViewModel, IChaptersViewModel chaptersViewModel, IStaticPreviewViewModel staticPreviewViewModel)
{
this.scanService = scanService;
this.encodeService = encodeService;
@@ -253,16 +279,14 @@ namespace HandBrakeWPF.ViewModels this.userSettingService = userSettingService;
this.queueProcessor = IoC.Get<IQueueProcessor>();
- // TODO tidy up. The new Simple Container IOC isn't doing property injection for some reason, so temp IoC.get the properties set by it.
- this.PictureSettingsViewModel = IoC.Get<IPictureSettingsViewModel>();
- this.VideoViewModel = IoC.Get<IVideoViewModel>();
- this.FiltersViewModel = IoC.Get<IFiltersViewModel>();
- this.AudioViewModel = IoC.Get<IAudioViewModel>();
- this.SubtitleViewModel = IoC.Get<ISubtitlesViewModel>();
- this.ChaptersViewModel = IoC.Get<IChaptersViewModel>();
- this.AdvancedViewModel = IoC.Get<IAdvancedViewModel>();
- IoC.BuildUp(this.AdvancedViewModel);
- this.StaticPreviewViewModel = IoC.Get<IStaticPreviewViewModel>();
+ this.PictureSettingsViewModel = pictureSettingsViewModel;
+ this.VideoViewModel = videoViewModel;
+ this.FiltersViewModel = filtersViewModel;
+ this.AudioViewModel = audioViewModel;
+ this.SubtitleViewModel = subtitlesViewModel;
+ this.ChaptersViewModel = chaptersViewModel;
+ this.AdvancedViewModel = advancedViewModel;
+ this.StaticPreviewViewModel = staticPreviewViewModel;
// Setup Properties
this.WindowTitle = Resources.HandBrake_Title;
|