summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-05-17 21:01:30 +0000
committersr55 <[email protected]>2015-05-17 21:01:30 +0000
commit525d9fae34a7981eb5f6de46135d909551480043 (patch)
treea38306689787207fbd346fe32e69f261b455f6ec /win/CS/HandBrakeWPF/ViewModels
parentf44ed828e6e1fa5f64d48be8f19bb5525434f263 (diff)
WinGui: General tidy up and remove the custom styling for the app. The app will now always honour the system defaults.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7207 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs12
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs8
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs22
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs12
4 files changed, 7 insertions, 47 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
index a7c905f67..f568a5ddf 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
@@ -16,14 +16,12 @@ namespace HandBrakeWPF.ViewModels
using Caliburn.Micro;
- using HandBrake.ApplicationServices.Model;
+ using HandBrake.ApplicationServices.Interop.Model.Encoding;
using HandBrake.ApplicationServices.Services.Encode.Model;
using HandBrake.ApplicationServices.Services.Encode.Model.Models;
using HandBrake.ApplicationServices.Services.Scan.Model;
using HandBrake.ApplicationServices.Utilities;
- using HandBrake.ApplicationServices.Interop.Model.Encoding;
- using HandBrakeWPF.Commands;
using HandBrakeWPF.Model.Audio;
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.Services.Presets.Model;
@@ -287,7 +285,7 @@ namespace HandBrakeWPF.ViewModels
{
this.NotifyOfPropertyChange(() => this.Task);
- if (Task.OutputFormat == OutputFormat.Mp4)
+ if (this.Task.OutputFormat == OutputFormat.Mp4)
{
foreach (AudioTrack track in this.Task.AudioTracks.Where(track => track.Encoder == AudioEncoder.ffflac || track.Encoder == AudioEncoder.Vorbis))
{
@@ -321,7 +319,7 @@ namespace HandBrakeWPF.ViewModels
{
if (this.SelectedAvailableToMove.Count > 0)
{
- List<string> copiedList = SelectedAvailableToMove.ToList();
+ List<string> copiedList = this.SelectedAvailableToMove.ToList();
foreach (string item in copiedList)
{
this.AvailableLanguages.Remove(item);
@@ -339,7 +337,7 @@ namespace HandBrakeWPF.ViewModels
{
if (this.SelectedLangaugesToMove.Count > 0)
{
- List<string> copiedList = SelectedLangaugesToMove.ToList();
+ List<string> copiedList = this.SelectedLangaugesToMove.ToList();
foreach (string item in copiedList)
{
this.AudioBehaviours.SelectedLangauges.Remove(item);
@@ -404,7 +402,7 @@ namespace HandBrakeWPF.ViewModels
public void UpdateTask(EncodeTask task)
{
this.Task = task;
- this.NotifyOfPropertyChange(() => Task.AudioTracks);
+ this.NotifyOfPropertyChange(() => this.Task.AudioTracks);
this.NotifyOfPropertyChange(() => this.Task);
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index d5ed439bb..b16b73573 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -273,8 +273,9 @@ namespace HandBrakeWPF.ViewModels
this.userSettingService.SettingChanged += this.UserSettingServiceSettingChanged;
this.Presets = this.presetService.Presets;
- this.CancelScanCommand = new CancelScanCommand(this.scanService);
this.Drives = new BindingList<SourceMenuItem>();
+
+ HandBrakeInstanceManager.Init();
}
#region View Model Properties
@@ -670,11 +671,6 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
- /// Gets or sets the cancel scan command.
- /// </summary>
- public CancelScanCommand CancelScanCommand { get; set; }
-
- /// <summary>
/// Gets or sets Destination.
/// </summary>
public string Destination
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
index 2e73657cb..01c0d38f9 100644
--- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
@@ -273,11 +273,6 @@ namespace HandBrakeWPF.ViewModels
private bool removePunctuation;
/// <summary>
- /// The use system colours for styles.
- /// </summary>
- private bool useSystemColoursForStyles;
-
- /// <summary>
/// The reset when done action.
/// </summary>
private bool resetWhenDoneAction;
@@ -566,21 +561,6 @@ namespace HandBrakeWPF.ViewModels
}
}
- /// <summary>
- /// Gets or sets a value indicating whether use system colours.
- /// </summary>
- public bool UseSystemColoursForStylesForStyles
- {
- get
- {
- return this.useSystemColoursForStyles;
- }
- set
- {
- this.useSystemColoursForStyles = value;
- this.NotifyOfPropertyChange(() => UseSystemColoursForStylesForStyles);
- }
- }
#endregion
@@ -1387,7 +1367,6 @@ namespace HandBrakeWPF.ViewModels
this.SendFileTo = Path.GetFileNameWithoutExtension(this.userSettingService.GetUserSetting<string>(UserSettingConstants.SendFileTo)) ?? string.Empty;
this.SendFileToPath = this.userSettingService.GetUserSetting<string>(UserSettingConstants.SendFileTo) ?? string.Empty;
this.Arguments = this.userSettingService.GetUserSetting<string>(UserSettingConstants.SendFileToArgs) ?? string.Empty;
- this.UseSystemColoursForStylesForStyles = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.UseSystemColours);
this.ResetWhenDoneAction = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ResetWhenDoneAction);
// #############################
@@ -1517,7 +1496,6 @@ namespace HandBrakeWPF.ViewModels
this.userSettingService.SetUserSetting(UserSettingConstants.SendFileTo, this.SendFileToPath);
this.userSettingService.SetUserSetting(UserSettingConstants.SendFile, this.SendFileAfterEncode);
this.userSettingService.SetUserSetting(UserSettingConstants.SendFileToArgs, this.Arguments);
- this.userSettingService.SetUserSetting(UserSettingConstants.UseSystemColours, this.UseSystemColoursForStylesForStyles);
this.userSettingService.SetUserSetting(UserSettingConstants.ResetWhenDoneAction, this.ResetWhenDoneAction);
/* Output Files */
diff --git a/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs b/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs
index 1e6946b8a..a0e2a8301 100644
--- a/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs
@@ -11,7 +11,6 @@ namespace HandBrakeWPF.ViewModels
{
using Caliburn.Micro;
- using HandBrakeWPF.Helpers;
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
@@ -65,17 +64,6 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
- /// Gets a value indicating whether use system colours.
- /// </summary>
- public bool UseSystemColours
- {
- get
- {
- return AppStyleHelper.UseSystemColours;
- }
- }
-
- /// <summary>
/// Gets or sets WindowManager.
/// </summary>
public IWindowManager WindowManager { get; set; }