using DataFormats = System.Windows.DataFormats;\r
using DragEventArgs = System.Windows.DragEventArgs;\r
using Execute = Caliburn.Micro.Execute;\r
- using HandBrakeInstanceManager = HandBrakeWPF.Instance.HandBrakeInstanceManager;\r
- using LogManager = HandBrakeWPF.Helpers.LogManager;\r
+ using HandBrakeInstanceManager = Instance.HandBrakeInstanceManager;\r
+ using LogManager = Helpers.LogManager;\r
using OpenFileDialog = Microsoft.Win32.OpenFileDialog;\r
using SaveFileDialog = Microsoft.Win32.SaveFileDialog;\r
\r
/// Initializes a new instance of the <see cref="MainViewModel"/> class.\r
/// The viewmodel for HandBrakes main window.\r
/// </summary>\r
- /// <param name="userSettingService">\r
- /// The User Setting Service\r
- /// </param>\r
- /// <param name="scanService">\r
- /// The scan Service.\r
- /// </param>\r
- /// <param name="presetService">\r
- /// The preset Service.\r
- /// </param>\r
- /// <param name="errorService">\r
- /// The Error Service\r
- /// </param>\r
- /// <param name="updateService">\r
- /// The update Service.\r
- /// </param>\r
- /// <param name="whenDoneService">\r
- /// The when Done Service.\r
- /// *** Leave in Constructor. *** \r
- /// </param>\r
- /// <param name="windowManager">\r
- /// The window Manager.\r
- /// </param>\r
- /// <param name="pictureSettingsViewModel">\r
- /// The picture Settings View Model.\r
- /// </param>\r
- /// <param name="videoViewModel">\r
- /// The video View Model.\r
- /// </param>\r
- /// <param name="summaryViewModel">\r
- /// The summary view model.\r
- /// </param>\r
- /// <param name="filtersViewModel">\r
- /// The filters View Model.\r
- /// </param>\r
- /// <param name="audioViewModel">\r
- /// The audio View Model.\r
- /// </param>\r
- /// <param name="subtitlesViewModel">\r
- /// The subtitles View Model.\r
- /// </param>\r
- /// <param name="advancedViewModel">\r
- /// The advanced View Model.\r
- /// </param>\r
- /// <param name="chaptersViewModel">\r
- /// The chapters View Model.\r
- /// </param>\r
- /// <param name="staticPreviewViewModel">\r
- /// The static Preview View Model.\r
- /// </param>\r
- /// <param name="queueViewModel">\r
- /// The queue View Model.\r
- /// </param>\r
- /// <param name="metaDataViewModel">\r
- /// The Meta Data View Model\r
- /// </param>\r
- /// <param name="notifyIconService">Wrapper around the WinForms NotifyIcon for this app. </param>\r
+ /// <remarks>whenDoneService must be a serivce here!</remarks>\r
public MainViewModel(IUserSettingService userSettingService, IScan scanService, IPresetService presetService, \r
IErrorService errorService, IUpdateService updateService, \r
IPrePostActionService whenDoneService, IWindowManager windowManager, IPictureSettingsViewModel pictureSettingsViewModel, IVideoViewModel videoViewModel, ISummaryViewModel summaryViewModel,\r
\r
#region View Model Properties\r
\r
- /// <summary>\r
- /// Gets or sets PictureSettingsViewModel.\r
- /// </summary>\r
public IPictureSettingsViewModel PictureSettingsViewModel { get; set; }\r
-\r
- /// <summary>\r
- /// Gets or sets AudioViewModel.\r
- /// </summary>\r
public IAudioViewModel AudioViewModel { get; set; }\r
-\r
- /// <summary>\r
- /// Gets or sets SubtitleViewModel.\r
- /// </summary>\r
public ISubtitlesViewModel SubtitleViewModel { get; set; }\r
-\r
- /// <summary>\r
- /// Gets or sets ChaptersViewModel.\r
- /// </summary>\r
public IChaptersViewModel ChaptersViewModel { get; set; }\r
-\r
- /// <summary>\r
- /// Gets or sets VideoViewModel.\r
- /// </summary>\r
public IVideoViewModel VideoViewModel { get; set; }\r
-\r
- /// <summary>\r
- /// Gets or sets FiltersViewModel.\r
- /// </summary>\r
public IFiltersViewModel FiltersViewModel { get; set; }\r
-\r
- /// <summary>\r
- /// Gets or sets the queue view model.\r
- /// </summary>\r
public IQueueViewModel QueueViewModel { get; set; }\r
-\r
- /// <summary>\r
- /// Gets or sets the static preview view model.\r
- /// </summary>\r
public IStaticPreviewViewModel StaticPreviewViewModel { get; set; }\r
-\r
- /// <summary>\r
- /// Gets or sets the The MetaData View Model\r
- /// </summary>\r
public IMetaDataViewModel MetaDataViewModel { get; set; }\r
-\r
public ISummaryViewModel SummaryViewModel { get; set; }\r
\r
- /// <summary>\r
- /// Active Tab.\r
- /// </summary>\r
- /// <remarks>\r
- /// Should move this to the view when refactoring the keyboard shotcut handling.\r
- /// </remarks>\r
public int SelectedTab { get; set; }\r
\r
#endregion\r
\r
#region Properties\r
\r
- /// <summary>\r
- /// Gets or sets TestProperty.\r
- /// </summary>\r
public string WindowTitle\r
{\r
get\r
\r
public bool QueueRecoveryArchivesExist { get; set; }\r
\r
- /// <summary>\r
- /// Gets or sets Presets.\r
- /// </summary>\r
public IEnumerable<IPresetObject> PresetsCategories { get; set; }\r
\r
public IPresetObject SelectedPresetCategory\r
}\r
}\r
\r
- /// <summary>\r
- /// Gets or sets SelectedPreset.\r
- /// </summary>\r
public Preset SelectedPreset\r
{\r
get\r
}\r
}\r
\r
- public void TrickPresetDisplayUpdate()\r
- {\r
- this.NotifyOfPropertyChange(() => this.SelectedPreset);\r
- this.selectedPreset.IsSelected = true;\r
- }\r
-\r
/// <summary>\r
/// Gets or sets The Current Encode Task that the user is building\r
/// </summary>\r
/// <summary>\r
/// Gets a value indicating whether ShowTextEntryForPointToPointMode.\r
/// </summary>\r
- public bool ShowTextEntryForPointToPointMode\r
- {\r
- get\r
- {\r
- return this.SelectedPointToPoint != PointToPointMode.Chapters;\r
- }\r
- }\r
+ public bool ShowTextEntryForPointToPointMode => this.SelectedPointToPoint != PointToPointMode.Chapters;\r
\r
/// <summary>\r
/// Gets StartEndRangeItems.\r
{\r
get\r
{\r
- if (this.SelectedTitle == null)\r
- {\r
- return null;\r
- }\r
-\r
- return this.SelectedTitle.Chapters.Select(item => item.ChapterNumber).Select(dummy => dummy).ToList();\r
+ return this.SelectedTitle?.Chapters.Select(item => item.ChapterNumber).Select(dummy => dummy).ToList();\r
}\r
}\r
\r
/// <summary>\r
/// Gets RangeMode.\r
/// </summary>\r
- public IEnumerable<OutputFormat> OutputFormats\r
- {\r
- get\r
- {\r
- return new List<OutputFormat>\r
- {\r
- OutputFormat.Mp4, OutputFormat.Mkv\r
- };\r
- }\r
- }\r
+ public IEnumerable<OutputFormat> OutputFormats => new List<OutputFormat> { OutputFormat.Mp4, OutputFormat.Mkv };\r
\r
/// <summary>\r
/// Gets or sets Destination.\r
/// <summary>\r
/// Gets the cancel action.\r
/// </summary>\r
- public Action CancelAction\r
- {\r
- get\r
- {\r
- return this.CancelScan;\r
- }\r
- }\r
+ public Action CancelAction => this.CancelScan;\r
\r
/// <summary>\r
/// Action for the status window.\r
/// </summary>\r
- public Action OpenLogWindowAction\r
- {\r
- get\r
- {\r
- return this.OpenLogWindow;\r
- }\r
- }\r
+ public Action OpenLogWindowAction => this.OpenLogWindow;\r
\r
/// <summary>\r
/// Gets or sets a value indicating whether show alert window.\r
/// <summary>\r
/// Gets the alert window close.\r
/// </summary>\r
- public Action AlertWindowClose\r
- {\r
- get\r
- {\r
- return this.CloseAlertWindow;\r
- }\r
- }\r
+ public Action AlertWindowClose => this.CloseAlertWindow;\r
\r
/// <summary>\r
/// Gets the add to queue label.\r
/// </summary>\r
- public string QueueLabel\r
- {\r
- get\r
- {\r
- return string.Format(Resources.Main_QueueLabel, this.queueProcessor.Count > 0 ? string.Format(" ({0})", this.queueProcessor.Count) : string.Empty);\r
- }\r
- }\r
+ public string QueueLabel => string.Format(Resources.Main_QueueLabel, this.queueProcessor.Count > 0 ? string.Format(" ({0})", this.queueProcessor.Count) : string.Empty);\r
\r
/// <summary>\r
/// Gets the start label.\r
/// </summary>\r
- public string StartLabel\r
- {\r
- get\r
- {\r
- return this.queueProcessor.Count > 0 ? Resources.Main_StartQueue : Resources.Main_Start;\r
- }\r
- }\r
+ public string StartLabel => this.queueProcessor.Count > 0 ? Resources.Main_StartQueue : Resources.Main_Start;\r
\r
/// <summary>\r
/// Gets or sets a value indicating whether has source.\r
this.AudioViewModel.RefreshTask();\r
}\r
\r
- /// <summary>\r
- /// Shutdown this View\r
- /// </summary>\r
public void Shutdown()\r
{\r
// Shutdown Service\r