diff options
author | sr55 <[email protected]> | 2012-03-23 20:00:02 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-03-23 20:00:02 +0000 |
commit | f5535905f9ff45c8c25389db9db42049407f8ad8 (patch) | |
tree | 76e786c1d6765c210f437f238c5d07ccf7cc2da7 /win/CS/HandBrakeWPF/Converters/QueueStatusToVisibilityConverter.cs | |
parent | 6758f8b30570df5e7d9fcc90e5f75f0aedcc6d5a (diff) |
WinGui: (WPF) Wired up the queue window and added missing functionality. Fixed issues on the main windows with regards to GUI widgets not updating during encoding.
WinGui: (WinForms): Added >=30fps options in framerate dropdown
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4526 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Converters/QueueStatusToVisibilityConverter.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/Converters/QueueStatusToVisibilityConverter.cs | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Converters/QueueStatusToVisibilityConverter.cs b/win/CS/HandBrakeWPF/Converters/QueueStatusToVisibilityConverter.cs new file mode 100644 index 000000000..68503b741 --- /dev/null +++ b/win/CS/HandBrakeWPF/Converters/QueueStatusToVisibilityConverter.cs @@ -0,0 +1,86 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="QueueStatusToVisibilityConverter.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Defines the QueueStatusToVisibilityConverter type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Converters
+{
+ using System.Globalization;
+ using System.Windows;
+ using System.Windows.Data;
+ using System;
+
+ using HandBrake.ApplicationServices.Model;
+
+ /// <summary>
+ /// Boolean to Visibility Converter
+ /// </summary>
+ public sealed class QueueStatusToVisibilityConverter : IValueConverter
+ {
+ /// <summary>
+ /// Convert a boolean to visibility property.
+ /// </summary>
+ /// <param name="value">
+ /// The value.
+ /// </param>
+ /// <param name="targetType">
+ /// The target type.
+ /// </param>
+ /// <param name="parameter">
+ /// The parameter. (A boolean which inverts the output)
+ /// </param>
+ /// <param name="culture">
+ /// The culture.
+ /// </param>
+ /// <returns>
+ /// Visibility property
+ /// </returns>
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value != null)
+ {
+ QueueItemStatus status = (QueueItemStatus)value;
+ switch (status)
+ {
+ case QueueItemStatus.Waiting:
+ case QueueItemStatus.InProgress:
+ return Visibility.Collapsed;
+ default:
+ return Visibility.Visible;
+ }
+ }
+
+ return Visibility.Collapsed;
+ }
+
+ /// <summary>
+ /// Convert Back for the IValueConverter Interface. Not used!
+ /// </summary>
+ /// <param name="value">
+ /// The value.
+ /// </param>
+ /// <param name="targetType">
+ /// The target type.
+ /// </param>
+ /// <param name="parameter">
+ /// The parameter.
+ /// </param>
+ /// <param name="culture">
+ /// The culture.
+ /// </param>
+ /// <returns>
+ /// Nothing
+ /// </returns>
+ /// <exception cref="NotImplementedException">
+ /// This method is not used!
+ /// </exception>
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
|