diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs | 7 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/InstantViewModel.cs | 6 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 102 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs | 13 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs | 5 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs | 3 |
6 files changed, 70 insertions, 66 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs index 858f9cbda..4235a67dc 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs @@ -19,6 +19,7 @@ namespace HandBrakeWPF.ViewModels using HandBrake.ApplicationServices.Utilities;
using HandBrake.Interop.Model.Encoding;
+ using HandBrakeWPF.Properties;
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
@@ -154,13 +155,13 @@ namespace HandBrakeWPF.ViewModels {
if (string.IsNullOrEmpty(this.Preset.Name))
{
- this.errorService.ShowMessageBox("A Preset must have a Name. Please fill out the Preset Name field.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox("A Preset must have a Name. Please fill out the Preset Name field.", Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
if (this.presetService.CheckIfPresetExists(this.Preset.Name))
{
- MessageBoxResult result = this.errorService.ShowMessageBox("A Preset with this name already exists. Would you like to overwrite it?", "Error", MessageBoxButton.YesNo, MessageBoxImage.Error);
+ MessageBoxResult result = this.errorService.ShowMessageBox("A Preset with this name already exists. Would you like to overwrite it?", Resources.Error, MessageBoxButton.YesNo, MessageBoxImage.Error);
if (result == MessageBoxResult.No)
{
return;
@@ -169,7 +170,7 @@ namespace HandBrakeWPF.ViewModels if (this.SelectedPictureSettingMode == PresetPictureSettingsMode.SourceMaximum && this.selectedTitle == null)
{
- this.errorService.ShowMessageBox("You must first scan a source to use the 'Source Maximum' Option.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox("You must first scan a source to use the 'Source Maximum' Option.", Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/InstantViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/InstantViewModel.cs index d27ef6694..dcaf1a7f4 100644 --- a/win/CS/HandBrakeWPF/ViewModels/InstantViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/InstantViewModel.cs @@ -717,7 +717,7 @@ namespace HandBrakeWPF.ViewModels {
// if (this.queueProcessor.IsProcessing)
// {
- // this.errorService.ShowMessageBox("HandBrake is already encoding.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ // this.errorService.ShowMessageBox("HandBrake is already encoding.", Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
// return;
// }
@@ -731,13 +731,13 @@ namespace HandBrakeWPF.ViewModels //// Otherwise, perform Santiy Checking then add to the queue and start if everything is ok.
// if (this.SelectedTitle == null)
// {
- // this.errorService.ShowMessageBox("You must first scan a source.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ // this.errorService.ShowMessageBox("You must first scan a source.", Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
// return;
// }
// if (string.IsNullOrEmpty(this.Destination))
// {
- // this.errorService.ShowMessageBox("The Destination field was empty.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ // this.errorService.ShowMessageBox("The Destination field was empty.", Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
// return;
// }
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index d15fe931a..5b5b95324 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -227,7 +227,7 @@ namespace HandBrakeWPF.ViewModels this.queueProcessor = IoC.Get<IQueueProcessor>();
// Setup Properties
- this.WindowTitle = "HandBrake";
+ this.WindowTitle = Resources.HandBrake_Title;
this.CurrentTask = new EncodeTask();
this.CurrentTask.PropertyChanged += this.CurrentTask_PropertyChanged;
this.ScannedSource = new Source();
@@ -313,7 +313,7 @@ namespace HandBrakeWPF.ViewModels {
get
{
- return string.IsNullOrEmpty(this.programStatusLabel) ? "Ready" : this.programStatusLabel;
+ return string.IsNullOrEmpty(this.programStatusLabel) ? Resources.State_Ready : this.programStatusLabel;
}
set
@@ -334,7 +334,7 @@ namespace HandBrakeWPF.ViewModels {
get
{
- return string.IsNullOrEmpty(this.statusLabel) ? "Ready" : this.statusLabel;
+ return string.IsNullOrEmpty(this.statusLabel) ? Resources.State_Ready : this.statusLabel;
}
set
@@ -408,7 +408,7 @@ namespace HandBrakeWPF.ViewModels set
{
this.scannedSource = value;
- this.NotifyOfPropertyChange("ScannedSource");
+ this.NotifyOfPropertyChange(() => ScannedSource);
}
}
@@ -425,7 +425,7 @@ namespace HandBrakeWPF.ViewModels {
get
{
- return string.IsNullOrEmpty(this.sourceLabel) ? "Select 'Source' to continue" : this.sourceLabel;
+ return string.IsNullOrEmpty(this.sourceLabel) ? Resources.Main_SelectSource : this.sourceLabel;
}
set
@@ -433,7 +433,7 @@ namespace HandBrakeWPF.ViewModels if (!Equals(this.sourceLabel, value))
{
this.sourceLabel = value;
- this.NotifyOfPropertyChange("SourceLabel");
+ this.NotifyOfPropertyChange(() => SourceLabel);
}
}
}
@@ -550,7 +550,7 @@ namespace HandBrakeWPF.ViewModels set
{
duration = value;
- this.NotifyOfPropertyChange("Duration");
+ this.NotifyOfPropertyChange(() => Duration);
}
}
@@ -858,7 +858,7 @@ namespace HandBrakeWPF.ViewModels this.NotifyOfPropertyChange(() => SelectedOutputFormat);
this.NotifyOfPropertyChange(() => this.CurrentTask.OutputFormat);
this.NotifyOfPropertyChange(() => IsMkv);
- this.SetExtension(string.Format(".{0}", this.selectedOutputFormat.ToString().Replace("av_", string.Empty).ToLower())); // TODO, tidy up
+ this.SetExtension(string.Format(".{0}", this.selectedOutputFormat.ToString().ToLower()));
this.VideoViewModel.RefreshTask();
this.AudioViewModel.RefreshTask();
@@ -989,9 +989,8 @@ namespace HandBrakeWPF.ViewModels this.presetService.Load();
if (this.presetService.CheckIfPresetsAreOutOfDate())
if (!this.userSettingService.GetUserSetting<bool>(UserSettingConstants.PresetNotification))
- this.errorService.ShowMessageBox("HandBrake has determined your built-in presets are out of date... These presets will now be updated." + Environment.NewLine +
- "Your custom presets have not been updated so you may have to re-create these by deleting and re-adding them.",
- "Preset Update", MessageBoxButton.OK, MessageBoxImage.Information);
+ this.errorService.ShowMessageBox(Resources.Main_PresetUpdateNotification,
+ Resources.Notice, MessageBoxButton.OK, MessageBoxImage.Information);
// Queue Recovery
if (!AppArguments.IsInstantHandBrake)
@@ -1132,7 +1131,7 @@ namespace HandBrakeWPF.ViewModels {
if (this.ScannedSource == null || string.IsNullOrEmpty(this.ScannedSource.ScanPath) || this.ScannedSource.Titles.Count == 0)
{
- this.errorService.ShowMessageBox("You must first scan a source and setup your job before adding to the queue.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox(Resources.Main_ScanSourceFirst, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
@@ -1143,12 +1142,12 @@ namespace HandBrakeWPF.ViewModels }
else
{
- this.errorService.ShowMessageBox("There are jobs on the queue with the same destination path. Please choose a different path for this job.", "Error", MessageBoxButton.OK, MessageBoxImage.Warning);
+ this.errorService.ShowMessageBox(Resources.Main_DuplicateDestinationOnQueue, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Warning);
}
if (!this.IsEncoding)
{
- this.ProgramStatusLabel = string.Format("{0} Encodes Pending", this.queueProcessor.Count);
+ this.ProgramStatusLabel = string.Format(Resources.Main_XEncodesPending, this.queueProcessor.Count);
}
}
@@ -1188,13 +1187,13 @@ namespace HandBrakeWPF.ViewModels {
if (this.ScannedSource == null || this.ScannedSource.Titles == null || this.ScannedSource.Titles.Count == 0)
{
- this.errorService.ShowMessageBox("You must first scan a source and setup your job before adding to the queue.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox(Resources.Main_ScanSourceFirst, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
if (!AutoNameHelper.IsAutonamingEnabled())
{
- this.errorService.ShowMessageBox("You must turn on automatic file naming in preferences before you can add to the queue.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox(Resources.Main_TurnOnAutoFileNaming, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
@@ -1225,7 +1224,7 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public void FolderScan()
{
- VistaFolderBrowserDialog dialog = new VistaFolderBrowserDialog { Description = "Please select a folder.", UseDescriptionForTitle = true };
+ VistaFolderBrowserDialog dialog = new VistaFolderBrowserDialog { Description = Resources.Main_PleaseSelectFolder, UseDescriptionForTitle = true };
dialog.ShowDialog();
ShowSourceSelection = false;
@@ -1261,7 +1260,7 @@ namespace HandBrakeWPF.ViewModels {
if (this.queueProcessor.IsProcessing)
{
- this.errorService.ShowMessageBox("HandBrake is already encoding.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox(Resources.Main_AlreadyEncoding, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
@@ -1275,19 +1274,19 @@ namespace HandBrakeWPF.ViewModels // Otherwise, perform Santiy Checking then add to the queue and start if everything is ok.
if (this.SelectedTitle == null)
{
- this.errorService.ShowMessageBox("You must first scan a source.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox(Resources.Main_ScanSource, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
if (string.IsNullOrEmpty(this.Destination))
{
- this.errorService.ShowMessageBox("The Destination field was empty.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ this.errorService.ShowMessageBox(Resources.Main_ChooseDestination, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
if (File.Exists(this.Destination))
{
- MessageBoxResult result = this.errorService.ShowMessageBox("The current file already exists, do you wish to overwrite it?", "Question", MessageBoxButton.YesNo, MessageBoxImage.Question);
+ MessageBoxResult result = this.errorService.ShowMessageBox(Resources.Main_DestinationOverwrite, Resources.Question, MessageBoxButton.YesNo, MessageBoxImage.Question);
if (result == MessageBoxResult.No)
{
return;
@@ -1475,7 +1474,7 @@ namespace HandBrakeWPF.ViewModels if (this.SelectedPreset == null)
{
this.errorService.ShowMessageBox(
- "Please select a preset to update.", "No Preset selected", MessageBoxButton.OK, MessageBoxImage.Warning);
+ Resources.Main_SelectPresetForUpdate, Resources.Main_NoPresetSelected, MessageBoxButton.OK, MessageBoxImage.Warning);
return;
}
@@ -1483,17 +1482,17 @@ namespace HandBrakeWPF.ViewModels if (this.SelectedPreset.IsBuildIn)
{
this.errorService.ShowMessageBox(
- "You can not modify built in presets. Please select one of your own presets.", "No Preset selected", MessageBoxButton.OK, MessageBoxImage.Warning);
+ Resources.Main_NoUpdateOfBuiltInPresets, Resources.Main_NoPresetSelected, MessageBoxButton.OK, MessageBoxImage.Warning);
return;
}
- if (this.errorService.ShowMessageBox("Are you sure you wish to update the selected preset?", "Are you sure?", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
+ if (this.errorService.ShowMessageBox(Resources.Main_PresetUpdateConfrimation, Resources.AreYouSure, MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
{
this.SelectedPreset.Task = new EncodeTask(this.CurrentTask);
this.presetService.Update(this.SelectedPreset);
this.errorService.ShowMessageBox(
- "The Preset has now been updated with your current settings.", "Preset Updated", MessageBoxButton.OK, MessageBoxImage.Information);
+ Resources.Main_PresetUpdated, Resources.Updated, MessageBoxButton.OK, MessageBoxImage.Information);
}
}
@@ -1508,7 +1507,7 @@ namespace HandBrakeWPF.ViewModels }
else
{
- MessageBox.Show("Please select a preset.", "Presets", MessageBoxButton.OK, MessageBoxImage.Warning);
+ MessageBox.Show(Resources.Main_SelectPreset, Resources.Warning, MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
@@ -1520,11 +1519,11 @@ namespace HandBrakeWPF.ViewModels if (this.selectedPreset != null)
{
this.presetService.SetDefault(this.selectedPreset);
- MessageBox.Show(string.Format("New Default Preset Set: {0}", this.selectedPreset.Name), "Presets", MessageBoxButton.OK, MessageBoxImage.Warning);
+ MessageBox.Show(string.Format(Resources.Main_NewDefaultPreset, this.selectedPreset.Name), Resources.Main_Presets, MessageBoxButton.OK, MessageBoxImage.Information);
}
else
{
- MessageBox.Show("Please select a preset.", "Presets", MessageBoxButton.OK, MessageBoxImage.Warning);
+ MessageBox.Show(Resources.Main_SelectPreset, Resources.Warning, MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
@@ -1547,8 +1546,8 @@ namespace HandBrakeWPF.ViewModels if (!presetService.CanUpdatePreset(preset.Name))
{
MessageBox.Show(
- "You can not import a preset with the same name as a built-in preset.",
- "Error",
+ Resources.Main_PresetErrorBuiltInName,
+ Resources.Error,
MessageBoxButton.OK,
MessageBoxImage.Error);
return;
@@ -1556,8 +1555,8 @@ namespace HandBrakeWPF.ViewModels MessageBoxResult result =
MessageBox.Show(
- "This preset appears to already exist. Would you like to overwrite it?",
- "Overwrite preset?",
+ Resources.Main_PresetOverwriteWarning,
+ Resources.Overwrite,
MessageBoxButton.YesNo,
MessageBoxImage.Warning);
if (result == MessageBoxResult.Yes)
@@ -1603,7 +1602,7 @@ namespace HandBrakeWPF.ViewModels }
else
{
- MessageBox.Show("Please select a preset.", "Presets", MessageBoxButton.OK, MessageBoxImage.Warning);
+ MessageBox.Show(Resources.Main_SelectPreset, Resources.Warning, MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
@@ -1613,7 +1612,7 @@ namespace HandBrakeWPF.ViewModels public void PresetReset()
{
this.presetService.UpdateBuiltInPresets();
- this.NotifyOfPropertyChange("Presets");
+ this.NotifyOfPropertyChange(() => this.Presets);
this.SelectedPreset = this.presetService.DefaultPreset;
this.errorService.ShowMessageBox(Resources.Presets_ResetComplete, Resources.Presets_ResetHeader, MessageBoxButton.OK, MessageBoxImage.Information);
}
@@ -1699,7 +1698,7 @@ namespace HandBrakeWPF.ViewModels // Cleanup
this.ShowStatusWindow = false;
this.SourceLabel = this.SourceName;
- this.StatusLabel = "Scan Completed";
+ this.StatusLabel = Resources.Main_ScanCompleted;
});
}
@@ -1804,7 +1803,7 @@ namespace HandBrakeWPF.ViewModels {
if (information.NewVersionAvailable)
{
- this.ProgramStatusLabel = "A New Update is Available. Goto Tools Menu > Options to Install";
+ this.ProgramStatusLabel = Resources.Main_NewUpdate;
}
}
@@ -1822,8 +1821,8 @@ namespace HandBrakeWPF.ViewModels /// </param>
private void ScanStatusChanged(object sender, HandBrake.ApplicationServices.EventArgs.ScanProgressEventArgs e)
{
- this.SourceLabel = string.Format("Scanning Title {0} of {1} ({2}%)", e.CurrentTitle, e.Titles, e.Percentage);
- this.StatusLabel = string.Format("Scanning Title {0} of {1} ({2}%)", e.CurrentTitle, e.Titles, e.Percentage);
+ this.SourceLabel = string.Format(Resources.Main_ScanningTitleXOfY, e.CurrentTitle, e.Titles, e.Percentage);
+ this.StatusLabel = string.Format(Resources.Main_ScanningTitleXOfY, e.CurrentTitle, e.Titles, e.Percentage);
}
/// <summary>
@@ -1852,21 +1851,22 @@ namespace HandBrakeWPF.ViewModels if (e.Successful)
{
this.SourceLabel = this.SourceName;
- this.StatusLabel = "Scan Completed";
+ this.StatusLabel = Resources.Main_ScanCompleted;
}
else if (e.Cancelled)
{
- this.SourceLabel = "Scan Cancelled.";
- this.StatusLabel = "Scan Cancelled.";
+ this.SourceLabel = Resources.Main_ScanCancelled;
+ this.StatusLabel = Resources.Main_ScanCancelled;
}
else if (e.Exception == null && e.ErrorInformation != null)
{
- this.SourceLabel = "Scan failed: " + e.ErrorInformation;
- this.StatusLabel = "Scan failed: " + e.ErrorInformation;
+ this.SourceLabel = Resources.Main_ScanFailed_NoReason + e.ErrorInformation;
+ this.StatusLabel = Resources.Main_ScanFailed_NoReason + e.ErrorInformation;
}
else
{
- this.SourceLabel = "Scan Failed... See Activity Log for details."; this.StatusLabel = "Scan Failed... See Activity Log for details.";
+ this.SourceLabel = Resources.Main_ScanFailled_CheckLog;
+ this.StatusLabel = Resources.Main_ScanFailled_CheckLog;
}
});
}
@@ -1885,7 +1885,7 @@ namespace HandBrakeWPF.ViewModels Execute.OnUIThread(
() =>
{
- this.StatusLabel = "Scanning source, please wait...";
+ this.StatusLabel = Resources.Main_ScanningPleaseWait;
this.ShowStatusWindow = true;
});
}
@@ -1914,12 +1914,12 @@ namespace HandBrakeWPF.ViewModels string josPending = string.Empty;
if (!AppArguments.IsInstantHandBrake)
{
- josPending = ", Pending Jobs {5}";
+ josPending = Resources.Main_JobsPending_addon;
}
this.ProgramStatusLabel =
string.Format(
- "{0:00.00}%, FPS: {1:000.0}, Avg FPS: {2:000.0}, Time Remaining: {3}, Elapsed: {4:hh\\:mm\\:ss}" + josPending,
+ Resources.Main_EncodeStatusDisplay + josPending,
e.PercentComplete,
e.CurrentFrameRate,
e.AverageFrameRate,
@@ -1938,7 +1938,7 @@ namespace HandBrakeWPF.ViewModels }
else
{
- this.ProgramStatusLabel = "Queue Finished";
+ this.ProgramStatusLabel = Resources.Main_QueueFinished;
this.IsEncoding = false;
if (this.windowsSeven.IsWindowsSeven)
@@ -1963,7 +1963,7 @@ namespace HandBrakeWPF.ViewModels Execute.OnUIThread(
() =>
{
- this.ProgramStatusLabel = "Preparing to encode ...";
+ this.ProgramStatusLabel = Resources.Main_PreparingToEncode;
this.IsEncoding = true;
});
}
@@ -1984,7 +1984,7 @@ namespace HandBrakeWPF.ViewModels Execute.OnUIThread(
() =>
{
- this.ProgramStatusLabel = "Queue Finished";
+ this.ProgramStatusLabel = Resources.Main_QueueFinished;
this.IsEncoding = false;
if (this.windowsSeven.IsWindowsSeven)
@@ -2008,7 +2008,7 @@ namespace HandBrakeWPF.ViewModels Execute.OnUIThread(
() =>
{
- this.ProgramStatusLabel = string.Format("{0} Encodes Pending", this.queueProcessor.Count);
+ this.ProgramStatusLabel = string.Format(Resources.Main_XEncodesPending, this.queueProcessor.Count);
});
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs index 5c0913a37..b398a1b5c 100644 --- a/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs @@ -23,6 +23,7 @@ namespace HandBrakeWPF.ViewModels using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrakeWPF.Factories;
+ using HandBrakeWPF.Properties;
using HandBrakeWPF.Services;
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
@@ -85,7 +86,7 @@ namespace HandBrakeWPF.ViewModels public PreviewViewModel(IErrorService errorService, IUserSettingService userSettingService)
{
// Preview needs a seperate instance rather than the shared singleton. This could maybe do with being refactored at some point
- this.encodeService = new EncodeServiceWrapper(userSettingService);
+ this.encodeService = new EncodeServiceWrapper(userSettingService);
this.errorService = errorService;
this.userSettingService = userSettingService;
@@ -262,13 +263,13 @@ namespace HandBrakeWPF.ViewModels {
this.IsEncoding = false;
this.errorService.ShowMessageBox("Unable to delete previous preview file. You may need to restart the application.",
- "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
}
if (this.Task == null || string.IsNullOrEmpty(Task.Source))
{
this.errorService.ShowMessageBox("You must first scan a source and setup your encode before creating a perview.",
- "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
@@ -348,7 +349,7 @@ namespace HandBrakeWPF.ViewModels else
{
this.errorService.ShowMessageBox("Unable to detect VLC Player. \nPlease make sure VLC is installed and the directory specified in HandBrake's options is correct. (See: \"Tools Menu > Options > Picture Tab\")",
- "Error", MessageBoxButton.OK, MessageBoxImage.Warning);
+ Resources.Error, MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
@@ -362,7 +363,7 @@ namespace HandBrakeWPF.ViewModels else
{
this.errorService.ShowMessageBox("Unable to find the preview file. Either the file was deleted or the encode failed. Check the activity log for details.",
- "Error", MessageBoxButton.OK, MessageBoxImage.Warning);
+ Resources.Error, MessageBoxButton.OK, MessageBoxImage.Warning);
}
}
}
@@ -379,7 +380,7 @@ namespace HandBrakeWPF.ViewModels if (encodeService.IsEncoding)
{
this.errorService.ShowMessageBox("Handbrake is already encoding a video! Only one file can be encoded at any one time.",
- "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index 3347cfddd..c7ddac82c 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -19,6 +19,7 @@ namespace HandBrakeWPF.ViewModels using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Interfaces;
+ using HandBrakeWPF.Properties;
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
@@ -259,7 +260,7 @@ namespace HandBrakeWPF.ViewModels MessageBoxResult result =
this.errorService.ShowMessageBox(
"This encode is currently in progress. If you delete it, the encode will be stopped. Are you sure you wish to proceed?",
- "Warning",
+ Resources.Warning,
MessageBoxButton.YesNo,
MessageBoxImage.Question);
@@ -296,7 +297,7 @@ namespace HandBrakeWPF.ViewModels if (this.queueProcessor.Count == 0)
{
this.errorService.ShowMessageBox(
- "There are no pending jobs.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ "There are no pending jobs.", Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs index 162898f68..d933a6afb 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs @@ -16,6 +16,7 @@ namespace HandBrakeWPF.ViewModels using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrakeWPF.Model;
+ using HandBrakeWPF.Properties;
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
@@ -198,7 +199,7 @@ namespace HandBrakeWPF.ViewModels MessageBoxResult result =
errorService.ShowMessageBox(
"An Encode is currently running. Exiting HandBrake will stop this encode.\nAre you sure you wish to continue?",
- "Warning",
+ Resources.Warning,
MessageBoxButton.YesNo,
MessageBoxImage.Warning);
|