summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs15
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs27
2 files changed, 23 insertions, 19 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index f48902aec..3c6261641 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -1819,21 +1819,6 @@ namespace HandBrakeWPF.ViewModels
this.Destination = saveFileDialog.FileName;
- // Disk Space Check
- string drive = Path.GetPathRoot(this.Destination);
- if (drive != null && !drive.StartsWith(@"\\"))
- {
- DriveInfo c = new DriveInfo(drive);
- if (c.AvailableFreeSpace < this.userSettingService.GetUserSetting<long>(UserSettingConstants.PauseOnLowDiskspaceLevel))
- {
- this.errorService.ShowMessageBox(
- Resources.MainViewModel_LowDiskSpaceWarning,
- Resources.MainViewModel_LowDiskSpace,
- MessageBoxButton.OK,
- MessageBoxImage.Warning);
- }
- }
-
// Set the Extension Dropdown. This will also set Mp4/m4v correctly.
if (!string.IsNullOrEmpty(saveFileDialog.FileName))
{
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
index 17154f922..d261ff16b 100644
--- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
@@ -91,8 +91,8 @@ namespace HandBrakeWPF.ViewModels
private bool isClScaling;
private bool showQueueInline;
private bool pauseOnLowDiskspace;
-
- private bool useQsvDecodeForNonQsvEnc;
+ private long pauseOnLowDiskspaceLevel;
+ private bool useQsvDecodeForNonQsvEnc;
#endregion
@@ -616,7 +616,24 @@ namespace HandBrakeWPF.ViewModels
this.pauseOnLowDiskspace = value;
this.NotifyOfPropertyChange(() => this.PauseOnLowDiskspace);
}
- }
+ }
+
+ /// <summary>
+ /// Get or sets the value that HB warns about low disk space.
+ /// </summary>
+ public long PauseOnLowDiskspaceLevel
+ {
+ get
+ {
+ return this.pauseOnLowDiskspaceLevel;
+ }
+
+ set
+ {
+ this.pauseOnLowDiskspaceLevel = value;
+ this.NotifyOfPropertyChange(() => this.pauseOnLowDiskspaceLevel);
+ }
+ }
/// <summary>
/// Gets or sets PriorityLevelOptions.
@@ -1264,7 +1281,8 @@ namespace HandBrakeWPF.ViewModels
this.PreventSleep = userSettingService.GetUserSetting<bool>(UserSettingConstants.PreventSleep);
this.PauseOnLowDiskspace = userSettingService.GetUserSetting<bool>(UserSettingConstants.PauseOnLowDiskspace);
-
+ this.PauseOnLowDiskspaceLevel = this.userSettingService.GetUserSetting<long>(UserSettingConstants.PauseOnLowDiskspaceLevel);
+
// Log Verbosity Level
this.logVerbosityOptions.Clear();
this.logVerbosityOptions.Add(0);
@@ -1374,6 +1392,7 @@ namespace HandBrakeWPF.ViewModels
userSettingService.SetUserSetting(UserSettingConstants.ProcessPriority, this.SelectedPriority);
userSettingService.SetUserSetting(UserSettingConstants.PreventSleep, this.PreventSleep);
userSettingService.SetUserSetting(UserSettingConstants.PauseOnLowDiskspace, this.PauseOnLowDiskspace);
+ userSettingService.SetUserSetting(UserSettingConstants.PauseOnLowDiskspaceLevel, this.PauseOnLowDiskspaceLevel);
userSettingService.SetUserSetting(UserSettingConstants.Verbosity, this.SelectedVerbosity);
userSettingService.SetUserSetting(UserSettingConstants.SaveLogWithVideo, this.CopyLogToEncodeDirectory);
userSettingService.SetUserSetting(UserSettingConstants.SaveLogToCopyDirectory, this.CopyLogToSepcficedLocation);