diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs | 37 |
2 files changed, 38 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs index c051b0aad..b10c0f292 100644 --- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs @@ -1049,7 +1049,7 @@ namespace HandBrakeWPF.ViewModels double dispWidth = Math.Round((result.OutputWidth * result.OutputParWidth / result.OutputParHeight), 0);
this.DisplaySize = this.sourceResolution.IsEmpty
- ? string.Empty
+ ? string.Format(Properties.Resources.PictureSettings_OutputResolution, "None")
: string.Format("Output: {0}x{1}, Anamorphic: {2}x{3}", result.OutputWidth, result.OutputHeight, dispWidth, result.OutputHeight);
}
else
diff --git a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs index fd683fc2a..279cc6fc8 100644 --- a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs @@ -10,6 +10,7 @@ namespace HandBrakeWPF.ViewModels
{
using System;
+ using System.Windows;
using System.Windows.Media.Imaging;
using HandBrake.ApplicationServices.Model;
@@ -22,6 +23,12 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public class StaticPreviewViewModel : ViewModelBase, IStaticPreviewViewModel
{
+ /*
+ * TODO
+ * - Screen needs to be made DPI Aware
+ * - Integrate Video Preview panel.
+ */
+
#region Fields
/// <summary>
@@ -63,6 +70,7 @@ namespace HandBrakeWPF.ViewModels {
this.scanService = scanService;
this.selectedPreviewImage = 1;
+ this.Title = Properties.Resources.Preview;
}
#endregion
@@ -172,11 +180,18 @@ namespace HandBrakeWPF.ViewModels #region Public Methods and Operators
+ /// <summary>
+ /// The update preview frame.
+ /// </summary>
+ /// <param name="task">
+ /// The task.
+ /// </param>
public void UpdatePreviewFrame(EncodeTask task)
{
this.Task = task;
this.UpdatePreviewFrame();
this.DisplayName = "Picture Preview";
+ this.Title = Properties.Resources.Preview;
}
/// <summary>
@@ -193,6 +208,28 @@ namespace HandBrakeWPF.ViewModels this.PreviewImage = image;
}
}
+
+ /// <summary>
+ /// The preview size changed.
+ /// </summary>
+ /// <param name="ea">
+ /// The ea.
+ /// </param>
+ public void PreviewSizeChanged(SizeChangedEventArgs ea)
+ {
+ Rect workArea = SystemParameters.WorkArea;
+ if (ea.NewSize.Width > workArea.Width)
+ {
+ this.Width = (int)Math.Round(workArea.Width, 0) - 20;
+ this.Title = Properties.Resources.Preview_Scaled;
+ }
+
+ if (ea.NewSize.Height > workArea.Height)
+ {
+ this.Height = (int)Math.Round(workArea.Height, 0) - 20;
+ this.Title = Properties.Resources.Preview_Scaled;
+ }
+ }
#endregion
}
}
\ No newline at end of file |