diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 35 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | 46 |
2 files changed, 34 insertions, 47 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index a47b6c8c0..fe1e333eb 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -108,6 +108,11 @@ namespace HandBrakeWPF.ViewModels private string statusLabel;
/// <summary>
+ /// Program Status Label
+ /// </summary>
+ private string programStatusLabel;
+
+ /// <summary>
/// Backing field for the scanned source.
/// </summary>
private Source scannedSource;
@@ -255,6 +260,27 @@ namespace HandBrakeWPF.ViewModels /// Gets or sets the Program Status Toolbar Label
/// This indicates the status of HandBrake
/// </summary>
+ public string ProgramStatusLabel
+ {
+ get
+ {
+ return string.IsNullOrEmpty(this.programStatusLabel) ? "Ready" : this.programStatusLabel;
+ }
+
+ set
+ {
+ if (!Equals(this.statusLabel, value))
+ {
+ this.programStatusLabel = value;
+ this.NotifyOfPropertyChange(() => this.ProgramStatusLabel);
+ }
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the Program Status Toolbar Label
+ /// This indicates the status of HandBrake
+ /// </summary>
public string StatusLabel
{
get
@@ -913,7 +939,7 @@ namespace HandBrakeWPF.ViewModels if (!this.IsEncoding)
{
- this.StatusLabel = string.Format("{0} Encodes Pending", this.queueProcessor.QueueManager.Count);
+ this.ProgramStatusLabel = string.Format("{0} Encodes Pending", this.queueProcessor.QueueManager.Count);
}
}
@@ -1463,7 +1489,6 @@ namespace HandBrakeWPF.ViewModels this.StatusLabel = "Scanning source, please wait...";
this.ShowStatusWindow = true;
});
- // TODO - Disable relevant parts of the UI.
}
/// <summary>
@@ -1480,7 +1505,7 @@ namespace HandBrakeWPF.ViewModels Execute.OnUIThread(
() =>
{
- this.StatusLabel =
+ this.ProgramStatusLabel =
string.Format(
"{0:00.00}%, FPS: {1:000.0}, Avg FPS: {2:000.0}, Time Remaining: {3}, Elapsed: {4:hh\\:mm\\:ss}, Pending Jobs {5}",
e.PercentComplete,
@@ -1506,7 +1531,7 @@ namespace HandBrakeWPF.ViewModels Execute.OnUIThread(
() =>
{
- this.StatusLabel = "Preparing to encode ...";
+ this.ProgramStatusLabel = "Preparing to encode ...";
this.IsEncoding = true;
});
@@ -1544,7 +1569,7 @@ namespace HandBrakeWPF.ViewModels Execute.OnUIThread(
() =>
{
- this.StatusLabel = "Queue Finished";
+ this.ProgramStatusLabel = "Queue Finished";
this.IsEncoding = false;
});
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index ff402a9ed..bb2bff804 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -1393,6 +1393,7 @@ namespace HandBrakeWPF.ViewModels this.SelectedLangaugesToMove = new BindingList<string>();
IDictionary<string, string> langList = LanguageUtilities.MapLanguages();
+ langList = (from entry in langList orderby entry.Key ascending select entry).ToDictionary(pair => pair.Key, pair => pair.Value);
this.selectedLangauges.Clear();
foreach (string selectedItem in this.userSettingService.GetUserSetting<StringCollection>(UserSettingConstants.SelectedLanguages))
@@ -1553,7 +1554,7 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public void LanguageMoveLeft()
{
- if (this.SelectedLangauges.Count > 0)
+ if (this.SelectedAvailableToMove.Count > 0)
{
List<string> copiedList = SelectedAvailableToMove.ToList();
foreach (string item in copiedList)
@@ -1580,6 +1581,8 @@ namespace HandBrakeWPF.ViewModels this.AvailableLanguages.Add(item);
}
}
+
+ this.AvailableLanguages = new BindingList<string>(this.AvailableLanguages.OrderBy(o => o).ToList());
}
/// <summary>
@@ -1597,47 +1600,6 @@ namespace HandBrakeWPF.ViewModels }
/// <summary>
- /// Audio List Language Move UP
- /// </summary>
- public void LanguageMoveUp()
- {
- List<string> langauges = this.SelectedLangauges.ToList();
- foreach (string item in langauges)
- {
- if (this.SelectedLangaugesToMove.Contains(item))
- {
- int index = this.SelectedLangauges.IndexOf(item);
- if (index != 0)
- {
- this.SelectedLangauges.Remove(item);
- this.SelectedLangauges.Insert(index - 1, item);
- }
- }
- }
- }
-
- /// <summary>
- /// Audio List Language Move Down
- /// </summary>
- public void LanguageMoveDown()
- {
- List<string> langauges = this.SelectedLangauges.ToList();
- int count = this.SelectedLangauges.Count;
- foreach (string item in langauges)
- {
- if (this.SelectedLangaugesToMove.Contains(item))
- {
- int index = this.SelectedLangauges.IndexOf(item);
- if ((index + 1) != count)
- {
- this.SelectedLangauges.Remove(item);
- this.SelectedLangauges.Insert(index + 1, item);
- }
- }
- }
- }
-
- /// <summary>
/// Browse - Log Path
/// </summary>
public void BrowseLogPath()
|