diff options
author | sr55 <[email protected]> | 2012-06-14 09:46:46 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-06-14 09:46:46 +0000 |
commit | 9be558d961413ee242da53dfc18a7c819b0faf41 (patch) | |
tree | 713c1334d99293dd3959d48f22dbee799491eeea /win/CS/HandBrakeWPF/Converters | |
parent | 62733781aff54e2f1eff95268d575bdee0c13335 (diff) |
WinGui: Initial layout changes to the options screen.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4729 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Converters')
-rw-r--r-- | win/CS/HandBrakeWPF/Converters/Options/OptionsTabConverter.cs | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Converters/Options/OptionsTabConverter.cs b/win/CS/HandBrakeWPF/Converters/Options/OptionsTabConverter.cs new file mode 100644 index 000000000..5799425d9 --- /dev/null +++ b/win/CS/HandBrakeWPF/Converters/Options/OptionsTabConverter.cs @@ -0,0 +1,66 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="OptionsTabConverter.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>
+// The Options Tab Converter. Controls which tab is dispalyed.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+
+namespace HandBrakeWPF.Converters.Options
+{
+ using System;
+ using System.Globalization;
+ using System.Windows;
+ using System.Windows.Data;
+
+ /// <summary>
+ /// The Options Tab Converter. Controls which tab is dispalyed.
+ /// </summary>
+ class OptionsTabConverter : IValueConverter
+ {
+ /// <summary>
+ /// Converts a value.
+ /// </summary>
+ /// <returns>
+ /// A converted value. If the method returns null, the valid null value is used.
+ /// </returns>
+ /// <param name="value">The value produced by the binding source.</param><param name="targetType">The type of the binding target property.</param><param name="parameter">The converter parameter to use.</param><param name="culture">The culture to use in the converter.</param>
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value != null && parameter != null)
+ {
+ switch (value.ToString())
+ {
+ case "General":
+ if (parameter.ToString() == "General") return Visibility.Visible;
+ break;
+ case "Output Files":
+ if (parameter.ToString() == "Output Files") return Visibility.Visible;
+ break;
+ case "Language":
+ if (parameter.ToString() == "Language") return Visibility.Visible;
+ break;
+ case "Advanced":
+ if (parameter.ToString() == "Advanced") return Visibility.Visible;
+ break;
+ }
+ }
+
+ return Visibility.Collapsed;
+ }
+
+ /// <summary>
+ /// Converts a value.
+ /// </summary>
+ /// <returns>
+ /// A converted value. If the method returns null, the valid null value is used.
+ /// </returns>
+ /// <param name="value">The value that is produced by the binding target.</param><param name="targetType">The type to convert to.</param><param name="parameter">The converter parameter to use.</param><param name="culture">The culture to use in the converter.</param>
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
|