diff options
Diffstat (limited to 'win/CS/HandBrakeWPF')
19 files changed, 204 insertions, 111 deletions
diff --git a/win/CS/HandBrakeWPF/Installer/Installer.nsi b/win/CS/HandBrakeWPF/Installer/Installer.nsi index 3110e6703..fd1b72b5b 100644 --- a/win/CS/HandBrakeWPF/Installer/Installer.nsi +++ b/win/CS/HandBrakeWPF/Installer/Installer.nsi @@ -8,8 +8,8 @@ ; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "HandBrake"
-!define PRODUCT_VERSION "0.9.8"
-!define PRODUCT_VERSION_NUMBER "0.9.8"
+!define PRODUCT_VERSION "0.9.9"
+!define PRODUCT_VERSION_NUMBER "0.9.9"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Handbrake.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
diff --git a/win/CS/HandBrakeWPF/Installer/Installer64.nsi b/win/CS/HandBrakeWPF/Installer/Installer64.nsi index 663c6fdcf..6840fb270 100644 --- a/win/CS/HandBrakeWPF/Installer/Installer64.nsi +++ b/win/CS/HandBrakeWPF/Installer/Installer64.nsi @@ -8,8 +8,8 @@ ; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "HandBrake"
-!define PRODUCT_VERSION "0.9.8"
-!define PRODUCT_VERSION_NUMBER "0.9.8"
+!define PRODUCT_VERSION "0.9.9"
+!define PRODUCT_VERSION_NUMBER "0.9.9"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Handbrake.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
diff --git a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs b/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs index a30401a56..a202e0bbb 100644 --- a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs +++ b/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("HandBrake")]
-[assembly: AssemblyDescription("HandBrake is an open-source, GPL-licensed, multiplatform, multithreaded video transcoder.")]
+[assembly: AssemblyDescription("HandBrake is an open-source, GPL-licensed, multiplatform,video transcoder.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("HandBrake Team")]
[assembly: AssemblyProduct("HandBrake")]
@@ -56,5 +56,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.9.8.4532")]
+[assembly: AssemblyVersion("0.9.9.5314")]
[assembly: NeutralResourcesLanguage("")]
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl b/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl index 8d77fdd8a..d42127e97 100644 --- a/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl +++ b/win/CS/HandBrakeWPF/Properties/AssemblyInfo.cs.tmpl @@ -56,5 +56,5 @@ using System.Windows; // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.9.8.$WCREV$")]
+[assembly: AssemblyVersion("0.9.9.$WCREV$")]
[assembly: NeutralResourcesLanguage("")]
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs b/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs index 8f424b65a..2dd1814ee 100644 --- a/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs +++ b/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs @@ -127,6 +127,17 @@ namespace HandBrakeWPF.Services }
/// <summary>
+ /// Gets the log index.
+ /// </summary>
+ public int LogIndex
+ {
+ get
+ {
+ return this.encodeService.LogIndex;
+ }
+ }
+
+ /// <summary>
/// Gets a value indicating whether IsEncoding.
/// </summary>
public bool IsEncoding
diff --git a/win/CS/HandBrakeWPF/ViewModels/EncoderOptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/EncoderOptionsViewModel.cs index e578d9688..f1da43828 100644 --- a/win/CS/HandBrakeWPF/ViewModels/EncoderOptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/EncoderOptionsViewModel.cs @@ -9,6 +9,8 @@ namespace HandBrakeWPF.ViewModels
{
+ using System.Collections.Generic;
+
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Parsing;
using HandBrake.Interop.Model.Encoding;
@@ -21,6 +23,11 @@ namespace HandBrakeWPF.ViewModels public class EncoderOptionsViewModel : ViewModelBase, IEncoderOptionsViewModel, ITabInterface
{
/// <summary>
+ /// The cached options.
+ /// </summary>
+ private readonly Dictionary<VideoEncoder, string> cachedOptions = new Dictionary<VideoEncoder, string>();
+
+ /// <summary>
/// Initializes a new instance of the <see cref="EncoderOptionsViewModel"/> class.
/// </summary>
public EncoderOptionsViewModel()
@@ -34,6 +41,16 @@ namespace HandBrakeWPF.ViewModels public EncodeTask Task { get; set; }
/// <summary>
+ /// Gets or sets the preset.
+ /// </summary>
+ public Preset Preset { get; set; }
+
+ /// <summary>
+ /// Gets or sets the current video encoder.
+ /// </summary>
+ public VideoEncoder CurrentVideoEncoder { get; set; }
+
+ /// <summary>
/// Gets or sets the options string.
/// </summary>
public string AdvancedOptionsString
@@ -64,6 +81,7 @@ namespace HandBrakeWPF.ViewModels public void SetSource(Title selectedTitle, Preset currentPreset, EncodeTask task)
{
this.Task = task;
+ this.Preset = currentPreset;
this.NotifyOfPropertyChange(() => this.AdvancedOptionsString);
}
@@ -79,6 +97,7 @@ namespace HandBrakeWPF.ViewModels public void SetPreset(Preset preset, EncodeTask task)
{
this.Task = task;
+ this.Preset = preset;
this.AdvancedOptionsString = preset.Task.AdvancedEncoderOptions;
}
@@ -102,6 +121,28 @@ namespace HandBrakeWPF.ViewModels /// </param>
public void SetEncoder(VideoEncoder encoder)
{
+ // Cache the existing string so it can be reused if the user changes the encoder back.
+ if (!string.IsNullOrEmpty(this.AdvancedOptionsString))
+ {
+ this.cachedOptions[CurrentVideoEncoder] = this.AdvancedOptionsString;
+ }
+
+ this.CurrentVideoEncoder = encoder;
+
+ // Set the option from the cached version if we have one.
+ string advacnedOptionsString;
+ if (cachedOptions.TryGetValue(encoder, out advacnedOptionsString)
+ && !string.IsNullOrEmpty(advacnedOptionsString))
+ {
+ this.AdvancedOptionsString = advacnedOptionsString;
+ }
+ else
+ {
+ this.AdvancedOptionsString = this.Preset != null && this.Preset.Task != null
+ && !string.IsNullOrEmpty(this.Preset.Task.AdvancedEncoderOptions)
+ ? this.Preset.Task.AdvancedEncoderOptions
+ : string.Empty;
+ }
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/ILogViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/ILogViewModel.cs index 6aa1020d4..6c7a7a2c8 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/ILogViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/ILogViewModel.cs @@ -14,5 +14,9 @@ namespace HandBrakeWPF.ViewModels.Interfaces /// </summary>
public interface ILogViewModel
{
+ /// <summary>
+ /// Gets or sets the selected tab.
+ /// </summary>
+ int SelectedTab { get; set; }
}
}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs index 4c97ab412..ad76a56b2 100644 --- a/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs @@ -10,7 +10,6 @@ namespace HandBrakeWPF.ViewModels
{
using System;
- using System.Collections.Generic;
using System.Diagnostics;
using System.Windows;
@@ -37,9 +36,15 @@ namespace HandBrakeWPF.ViewModels private readonly IScanServiceWrapper scanService;
/// <summary>
- /// Backing field for the selected mode
+ /// The selected tab.
/// </summary>
- private int selectedMode;
+ private int selectedTab;
+
+ /// <summary>
+ /// The encode log index.
+ /// </summary>
+ private int encodeLogIndex;
+
#endregion
/// <summary>
@@ -56,46 +61,44 @@ namespace HandBrakeWPF.ViewModels this.encodeService = encodeService;
this.scanService = scanService;
this.Title = "Log Viewer";
-
- this.SelectedMode = this.encodeService.IsEncoding ? 0 : 1;
+ this.encodeLogIndex = 0;
}
/// <summary>
- /// Gets Log.
+ /// Gets or sets the selected tab.
/// </summary>
- public string Log
+ public int SelectedTab
{
get
{
- return this.SelectedMode == 0 ? this.encodeService.ActivityLog : this.scanService.ActivityLog;
+ return this.selectedTab;
+ }
+ set
+ {
+ this.selectedTab = value;
+ this.NotifyOfPropertyChange(() => this.SelectedTab);
}
}
/// <summary>
- /// Gets LogModes.
+ /// Gets Log.
/// </summary>
- public IEnumerable<string> LogModes
+ public string ScanLog
{
get
{
- return new List<string> { "Encode Log", "Scan Log" };
+ return this.scanService.ActivityLog;
}
}
/// <summary>
- /// Gets or sets SelectedMode.
+ /// Gets the encodelog.
/// </summary>
- public int SelectedMode
+ public string EncodeLog
{
get
{
- return selectedMode;
- }
- set
- {
- selectedMode = value;
- this.NotifyOfPropertyChange(() => this.SelectedMode);
- this.ChangeLogDisplay();
+ return this.encodeService.ActivityLog;
}
}
@@ -115,7 +118,7 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public void CopyLog()
{
- Clipboard.SetDataObject(this.Log, true);
+ Clipboard.SetDataObject(this.SelectedTab == 1 ? this.ScanLog : this.EncodeLog, true);
}
/// <summary>
@@ -123,13 +126,16 @@ namespace HandBrakeWPF.ViewModels /// </summary>
protected override void OnActivate()
{
- this.scanService.ScanStared += ScanServiceScanStared;
this.scanService.ScanCompleted += ScanServiceScanCompleted;
- this.encodeService.EncodeStarted += EncodeServiceEncodeStarted;
this.encodeService.EncodeCompleted += EncodeServiceEncodeCompleted;
this.encodeService.EncodeStatusChanged += this.EncodeServiceEncodeStatusChanged;
this.scanService.ScanStatusChanged += this.ScanServiceScanStatusChanged;
+ this.scanService.ScanStared += this.scanService_ScanStared;
+ this.encodeService.EncodeStarted += this.encodeService_EncodeStarted;
base.OnActivate();
+
+ this.NotifyOfPropertyChange(() => this.ScanLog);
+ this.NotifyOfPropertyChange(() => this.EncodeLog);
}
/// <summary>
@@ -143,7 +149,7 @@ namespace HandBrakeWPF.ViewModels /// </param>
private void ScanServiceScanStatusChanged(object sender, ScanProgressEventArgs e)
{
- this.NotifyOfPropertyChange(() => this.Log);
+ this.NotifyOfPropertyChange(() => this.ScanLog);
}
/// <summary>
@@ -157,7 +163,12 @@ namespace HandBrakeWPF.ViewModels /// </param>
private void EncodeServiceEncodeStatusChanged(object sender, EncodeProgressEventArgs e)
{
- this.NotifyOfPropertyChange(() => this.Log);
+ if (encodeLogIndex != this.encodeService.LogIndex || this.encodeService.LogIndex == -1)
+ {
+ this.NotifyOfPropertyChange(() => this.EncodeLog);
+ }
+
+ encodeLogIndex = this.encodeService.LogIndex;
}
/// <summary>
@@ -168,26 +179,18 @@ namespace HandBrakeWPF.ViewModels /// </param>
protected override void OnDeactivate(bool close)
{
- this.scanService.ScanStared -= ScanServiceScanStared;
this.scanService.ScanCompleted -= ScanServiceScanCompleted;
- this.encodeService.EncodeStarted -= EncodeServiceEncodeStarted;
this.encodeService.EncodeCompleted -= EncodeServiceEncodeCompleted;
this.encodeService.EncodeStatusChanged -= this.EncodeServiceEncodeStatusChanged;
this.scanService.ScanStatusChanged -= this.ScanServiceScanStatusChanged;
+ this.scanService.ScanStared -= this.scanService_ScanStared;
+ this.encodeService.EncodeStarted -= this.encodeService_EncodeStarted;
base.OnDeactivate(close);
}
/// <summary>
- /// Change the Log Display
- /// </summary>
- private void ChangeLogDisplay()
- {
- this.NotifyOfPropertyChange(() => this.Log);
- }
-
- /// <summary>
- /// Encode Started Event Handler
+ /// Scan Completed Event Handler.
/// </summary>
/// <param name="sender">
/// The sender.
@@ -195,13 +198,13 @@ namespace HandBrakeWPF.ViewModels /// <param name="e">
/// The e.
/// </param>
- private void EncodeServiceEncodeStarted(object sender, EventArgs e)
+ private void ScanServiceScanCompleted(object sender, ScanCompletedEventArgs e)
{
- this.SelectedMode = 0;
+ this.NotifyOfPropertyChange(() => this.ScanLog);
}
/// <summary>
- /// Scan Started Event Handler
+ /// Encode Completed Event Handler.
/// </summary>
/// <param name="sender">
/// The sender.
@@ -209,13 +212,13 @@ namespace HandBrakeWPF.ViewModels /// <param name="e">
/// The e.
/// </param>
- private void ScanServiceScanStared(object sender, EventArgs e)
+ private void EncodeServiceEncodeCompleted(object sender, EncodeCompletedEventArgs e)
{
- this.SelectedMode = 1;
+ this.NotifyOfPropertyChange(() => this.EncodeLog);
}
/// <summary>
- /// Scan Completed Event Handler.
+ /// The encode service encode started.
/// </summary>
/// <param name="sender">
/// The sender.
@@ -223,13 +226,13 @@ namespace HandBrakeWPF.ViewModels /// <param name="e">
/// The e.
/// </param>
- private void ScanServiceScanCompleted(object sender, ScanCompletedEventArgs e)
+ private void encodeService_EncodeStarted(object sender, EventArgs e)
{
- this.NotifyOfPropertyChange(() => this.Log);
+ this.SelectedTab = 0;
}
/// <summary>
- /// Encode Completed Event Handler.
+ /// The scan service scan stared.
/// </summary>
/// <param name="sender">
/// The sender.
@@ -237,9 +240,9 @@ namespace HandBrakeWPF.ViewModels /// <param name="e">
/// The e.
/// </param>
- private void EncodeServiceEncodeCompleted(object sender, EncodeCompletedEventArgs e)
+ private void scanService_ScanStared(object sender, EventArgs e)
{
- this.NotifyOfPropertyChange(() => this.Log);
+ this.SelectedTab = 1;
}
}
}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 4875fd6bf..04d466062 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -95,6 +95,11 @@ namespace HandBrakeWPF.ViewModels private readonly IEncodeServiceWrapper encodeService;
/// <summary>
+ /// Windows 7 API Pack wrapper
+ /// </summary>
+ private readonly Win7 windowsSeven = new Win7();
+
+ /// <summary>
/// HandBrakes Main Window Title
/// </summary>
private string windowName;
@@ -173,6 +178,11 @@ namespace HandBrakeWPF.ViewModels /// The Source Menu Backing Field
/// </summary>
private IEnumerable<SourceMenuItem> sourceMenu;
+
+ /// <summary>
+ /// The last percentage complete value.
+ /// </summary>
+ private int lastEncodePercentage;
#endregion
/// <summary>
@@ -1002,11 +1012,15 @@ namespace HandBrakeWPF.ViewModels if (window != null)
{
+ ILogViewModel logvm = (ILogViewModel)window.DataContext;
+ logvm.SelectedTab = this.IsEncoding ? 0 : 1;
window.Activate();
}
else
{
- this.WindowManager.ShowWindow(IoC.Get<ILogViewModel>());
+ ILogViewModel logvm = IoC.Get<ILogViewModel>();
+ logvm.SelectedTab = this.IsEncoding ? 0 : 1;
+ this.WindowManager.ShowWindow(logvm);
}
}
@@ -1749,8 +1763,8 @@ namespace HandBrakeWPF.ViewModels /// </param>
private void ScanStatusChanged(object sender, HandBrake.ApplicationServices.EventArgs.ScanProgressEventArgs e)
{
- this.SourceLabel = "Scanning Title " + e.CurrentTitle + " of " + e.Titles;
- this.StatusLabel = "Scanning Title " + e.CurrentTitle + " of " + e.Titles;
+ 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);
}
/// <summary>
@@ -1847,6 +1861,12 @@ namespace HandBrakeWPF.ViewModels /// </param>
private void EncodeStatusChanged(object sender, HandBrake.ApplicationServices.EventArgs.EncodeProgressEventArgs e)
{
+ int percent;
+ int.TryParse(
+ Math.Round(e.PercentComplete).ToString(CultureInfo.InvariantCulture),
+ out percent);
+
+
Execute.OnUIThread(
() =>
{
@@ -1861,6 +1881,13 @@ namespace HandBrakeWPF.ViewModels e.EstimatedTimeLeft,
e.ElapsedTime,
this.queueProcessor.Count);
+
+ if (lastEncodePercentage != percent && this.windowsSeven.IsWindowsSeven)
+ {
+ this.windowsSeven.SetTaskBarProgress(percent);
+ }
+
+ lastEncodePercentage = percent;
}
});
}
@@ -1902,6 +1929,11 @@ namespace HandBrakeWPF.ViewModels {
this.ProgramStatusLabel = "Queue Finished";
this.IsEncoding = false;
+
+ if (this.windowsSeven.IsWindowsSeven)
+ {
+ this.windowsSeven.SetTaskBarProgressToNoProgress();
+ }
});
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index b611e14d6..4f2bc251b 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -1536,7 +1536,7 @@ namespace HandBrakeWPF.ViewModels this.preferredLanguages.Add(item);
// In the available languages should be no "Any" and no selected language.
- if ((item != "Any") && (!this.userSettingService.GetUserSetting<StringCollection>(UserSettingConstants.SelectedLanguages).Contains(item)))
+ if ((item != "(Any)") && (!this.userSettingService.GetUserSetting<StringCollection>(UserSettingConstants.SelectedLanguages).Contains(item)))
{
this.availableLanguages.Add(item);
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index 4f344db08..79532b9ee 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -101,7 +101,7 @@ namespace HandBrakeWPF.ViewModels this.errorService = errorService;
this.Title = "Queue";
this.JobsPending = "No encodes pending";
- this.JobStatus = "There are no jobs currently encoding";
+ this.JobStatus = "There are no jobs currently encoding";
}
#endregion
@@ -263,9 +263,9 @@ namespace HandBrakeWPF.ViewModels {
MessageBoxResult result =
this.errorService.ShowMessageBox(
- "This encode is currently in progress. If you delete it, the encode will be stoped. Are you sure you wish to proceed?",
- "Warning",
- MessageBoxButton.YesNo,
+ "This encode is currently in progress. If you delete it, the encode will be stoped. Are you sure you wish to proceed?",
+ "Warning",
+ MessageBoxButton.YesNo,
MessageBoxImage.Question);
if (result == MessageBoxResult.Yes)
@@ -330,7 +330,7 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public void Import()
{
- VistaOpenFileDialog dialog = new VistaOpenFileDialog { Filter = "HandBrake Queue Files (*.hbq)|*.hbq", CheckFileExists = true };
+ VistaOpenFileDialog dialog = new VistaOpenFileDialog { Filter = "HandBrake Queue Files (*.hbq)|*.hbq", CheckFileExists = true };
dialog.ShowDialog();
this.queueProcessor.RestoreQueue(dialog.FileName);
@@ -374,7 +374,7 @@ namespace HandBrakeWPF.ViewModels {
this.Load();
- this.WhenDoneAction = this.userSettingService.GetUserSetting<string>(ASUserSettingConstants.WhenCompleteAction);
+ this.WhenDoneAction = this.userSettingService.GetUserSetting<string>(ASUserSettingConstants.WhenCompleteAction);
this.queueProcessor.JobProcessingStarted += this.queueProcessor_JobProcessingStarted;
this.queueProcessor.QueueCompleted += this.queueProcessor_QueueCompleted;
@@ -414,19 +414,23 @@ namespace HandBrakeWPF.ViewModels private void EncodeService_EncodeStatusChanged(
object sender, EncodeProgressEventArgs e)
{
- if (this.IsEncoding)
+ Caliburn.Micro.Execute.OnUIThread(() =>
{
- this.JobStatus =
- string.Format(
- "Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:hh\\:mm\\:ss}",
- e.Task,
- e.TaskCount,
- e.PercentComplete,
- e.CurrentFrameRate,
- e.AverageFrameRate,
- e.EstimatedTimeLeft,
- e.ElapsedTime);
- }
+ if (this.IsEncoding)
+ {
+ this.JobStatus =
+ string.Format(
+ "Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:hh\\:mm\\:ss}",
+ e.Task,
+ e.TaskCount,
+ e.PercentComplete,
+ e.CurrentFrameRate,
+ e.AverageFrameRate,
+ e.EstimatedTimeLeft,
+ e.ElapsedTime);
+ }
+
+ });
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs index 3fcca18aa..9149fde39 100644 --- a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs @@ -14,12 +14,9 @@ namespace HandBrakeWPF.ViewModels using System.IO;
using System.Linq;
- using Caliburn.Micro;
-
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
using HandBrake.ApplicationServices.Parsing;
- using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.ApplicationServices.Utilities;
using HandBrakeWPF.Commands;
@@ -52,13 +49,7 @@ namespace HandBrakeWPF.ViewModels /// <summary>
/// Initializes a new instance of the <see cref="HandBrakeWPF.ViewModels.SubtitlesViewModel"/> class.
/// </summary>
- /// <param name="windowManager">
- /// The window manager.
- /// </param>
- /// <param name="userSettingService">
- /// The user Setting Service.
- /// </param>
- public SubtitlesViewModel(IWindowManager windowManager, IUserSettingService userSettingService)
+ public SubtitlesViewModel()
{
this.Task = new EncodeTask();
diff --git a/win/CS/HandBrakeWPF/Views/ChaptersView.xaml b/win/CS/HandBrakeWPF/Views/ChaptersView.xaml index a5fa6a6da..0895579f5 100644 --- a/win/CS/HandBrakeWPF/Views/ChaptersView.xaml +++ b/win/CS/HandBrakeWPF/Views/ChaptersView.xaml @@ -29,6 +29,11 @@ VerticalAlignment="Stretch" HorizontalAlignment="Stretch" AutoGenerateColumns="False"
CanUserSortColumns="False" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False"
CanUserAddRows="False" CanUserDeleteRows="False">
+ <DataGrid.CellStyle>
+ <Style TargetType="DataGridCell">
+ <Setter Property="MinHeight" Value="22" />
+ </Style>
+ </DataGrid.CellStyle>
<DataGrid.ContextMenu>
<ContextMenu>
<MenuItem Header="Import Names" cal:Message.Attach="[Event Click] = [Action Import]" />
diff --git a/win/CS/HandBrakeWPF/Views/LogView.xaml b/win/CS/HandBrakeWPF/Views/LogView.xaml index cb6687251..f8b2c9327 100644 --- a/win/CS/HandBrakeWPF/Views/LogView.xaml +++ b/win/CS/HandBrakeWPF/Views/LogView.xaml @@ -20,21 +20,7 @@ ToolBarTray.IsLocked="True"
Loaded="ToolBarLoaded"
>
-
-
- <TextBlock Margin="10,0,10,0"
- VerticalAlignment="Center"
- FontWeight="Bold"
- Text="Choose Log:" />
- <ComboBox Width="120
- " Margin="0,0,10,0" Background="LightSteelBlue" Height="22" FontWeight="Black"
- HorizontalAlignment="Right" VerticalAlignment="Center"
- ItemsSource="{Binding LogModes}"
- SelectedIndex="{Binding SelectedMode}"
- />
-
- <Separator />
-
+
<Button cal:Message.Attach="[Event Click] = [Action CopyLog]" Margin="10,0,0,0">
<StackPanel Orientation="Horizontal">
<Image Width="16" Source="Images/copy.png" />
@@ -50,13 +36,26 @@ </ToolBar>
- <TextBox Grid.Row="1"
+ <TabControl Grid.Row="1" SelectedIndex="{Binding SelectedTab}">
+ <TabItem Header="Encode Log">
+ <TextBox Grid.Row="1"
AcceptsReturn="True"
IsReadOnly="True"
ScrollViewer.VerticalScrollBarVisibility="Visible"
- Text="{Binding Log,
- Mode=OneWay}"
+ Text="{Binding EncodeLog, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap" />
+ </TabItem>
+
+ <TabItem Header="Scan Log">
+ <TextBox Grid.Row="1"
+ AcceptsReturn="True"
+ IsReadOnly="True"
+ ScrollViewer.VerticalScrollBarVisibility="Visible"
+ Text="{Binding ScanLog, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
+ TextWrapping="Wrap" />
+ </TabItem>
+
+ </TabControl>
</Grid>
</Grid>
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index 1a020b603..2ffd46574 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -28,6 +28,7 @@ <Setter Property="Padding" Value="5,1" />
<Setter Property="FontSize" Value="11.5" />
<Setter Property="VerticalAlignment" Value="Center" />
+ <Setter Property="MinHeight" Value="22" />
</Style>
<Style x:Key="textBlockOrangeStyle" TargetType="TextBlock">
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index 83735e414..0394adbff 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -12,6 +12,7 @@ <Setter Property="Padding" Value="5,1" />
<Setter Property="FontSize" Value="11.5" />
<Setter Property="VerticalAlignment" Value="Center" />
+ <Setter Property="MinHeight" Value="22" />
</Style>
<Style TargetType="TextBlock">
@@ -20,6 +21,7 @@ <Style TargetType="TextBox">
<Setter Property="Padding" Value="5,2" />
+ <Setter Property="MinHeight" Value="22" />
</Style>
<Style TargetType="CheckBox">
@@ -154,7 +156,7 @@ </StackPanel>
<TextBlock Text="Available Options: {source_path} or {source_folder_name} (Not Both)" />
- <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
+ <StackPanel Orientation="Horizontal" Margin="0,15,0,0">
<TextBlock VerticalAlignment="Center" Text="Format:" />
<TextBox Name="autoNameFormat" Text="{Binding AutonameFormat}" Width="180" ToolTip=" {Source} = Source Name, {Title} = Title Number, {Chapters} = Selected Chapters, {Date} = Todays Date," />
</StackPanel>
diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml b/win/CS/HandBrakeWPF/Views/ShellView.xaml index 9bfee4bc1..bfc65c035 100644 --- a/win/CS/HandBrakeWPF/Views/ShellView.xaml +++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml @@ -4,7 +4,7 @@ xmlns:Data="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" Title="{Data:Binding Path=WindowTitle}"
Width="1015"
- Height="670"
+ Height="680"
MinWidth="1015"
MinHeight="670"
AllowDrop="True"
diff --git a/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml b/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml index 9c3f001c8..407666234 100644 --- a/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml +++ b/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml @@ -16,7 +16,7 @@ </Style>
<Style TargetType="{x:Type ComboBox}">
- <Setter Property="Height" Value="22"/>
+ <Setter Property="MinHeight" Value="22"/>
<Setter Property="Margin" Value="0,2,0,2" />
</Style>
@@ -25,7 +25,7 @@ </Style>
<Style TargetType="{x:Type Button}">
- <Setter Property="Height" Value="22"/>
+ <Setter Property="MinHeight" Value="22"/>
</Style>
<Style TargetType="{x:Type RadioButton}">
diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml index 48576180a..0b10fc645 100644 --- a/win/CS/HandBrakeWPF/defaultsettings.xml +++ b/win/CS/HandBrakeWPF/defaultsettings.xml @@ -229,7 +229,7 @@ <string>daysBetweenUpdateCheck</string>
</key>
<value>
- <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">7</anyType>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:int" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">30</anyType>
</value>
</item>
<item>
@@ -253,7 +253,7 @@ <string>NativeLanguage</string>
</key>
<value>
- <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">Any</anyType>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">(Any)</anyType>
</value>
</item>
<item>
@@ -261,7 +261,7 @@ <string>NativeLanguageSubtitles</string>
</key>
<value>
- <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">Any</anyType>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:string" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">(Any)</anyType>
</value>
</item>
<item>
|