--- /dev/null
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="InlineQueueConverter.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>
+// A Converter to handle the UI re-arrangement for in-line queue.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Converters.Queue
+{
+ using System;
+ using System.Globalization;
+ using System.Windows;
+ using System.Windows.Data;
+
+ public class InlineQueueConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ // Parameter = True is Flipped logic.
+ if (parameter is string && "true".Equals(parameter))
+ {
+ if (value is bool && (bool)value)
+ {
+ return new GridLength(1, GridUnitType.Star);
+ }
+
+ return GridLength.Auto;
+ }
+
+ // Parameter = False
+ if (value is bool && (bool)value)
+ {
+ return GridLength.Auto;
+ }
+
+ return new GridLength(1, GridUnitType.Star);
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return new GridLength(1, GridUnitType.Star);
+ }
+ }
+}
<Compile Include="Converters\Options\LogLevelConverter.cs" />\r
<Compile Include="Converters\OptionTabConverter.cs" />\r
<Compile Include="Converters\PresetsMenuConverter.cs" />\r
+ <Compile Include="Converters\Queue\InlineQueueConverter.cs" />\r
<Compile Include="Converters\Queue\PictureSettingsDescConveter.cs" />\r
<Compile Include="Converters\Subtitles\CanBurnSubtitleConverter.cs" />\r
<Compile Include="Converters\Subtitles\SubtitleBurnInBehaviourConverter.cs" />\r
}\r
}\r
\r
+ /// <summary>\r
+ /// Looks up a localized string similar to Experimental Features.\r
+ /// </summary>\r
+ public static string Options_Experimental {\r
+ get {\r
+ return ResourceManager.GetString("Options_Experimental", resourceCulture);\r
+ }\r
+ }\r
+ \r
+ /// <summary>\r
+ /// Looks up a localized string similar to Experimental features are ideas we are working on. These may or may not make it into a final release and may not work!.\r
+ /// </summary>\r
+ public static string Options_ExperimentalFeatures {\r
+ get {\r
+ return ResourceManager.GetString("Options_ExperimentalFeatures", resourceCulture);\r
+ }\r
+ }\r
+ \r
/// <summary>\r
/// Looks up a localized string similar to File Format:.\r
/// </summary>\r
}\r
\r
/// <summary>\r
- /// Looks up a localized string similar to Show Queue in place of the tab controls when toggled on..\r
+ /// Looks up a localized string similar to Show Queue in line with the main UI..\r
/// </summary>\r
public static string Options_ShowQueueInline {\r
get {\r
<value>Constant quality fractional granularity:</value>\r
</data>\r
<data name="Options_ShowQueueInline" xml:space="preserve">\r
- <value>Show Queue in place of the tab controls when toggled on.</value>\r
+ <value>Show Queue in line with the main UI.</value>\r
</data>\r
<data name="Options_PauseQueueOnLowDiskSpace" xml:space="preserve">\r
<value>Pause queue if disk space is low before starting a job.</value>\r
<data name="MainView_StopEncodeConfirm" xml:space="preserve">\r
<value>Are you sure you wish to stop thie encode?</value>\r
</data>\r
+ <data name="Options_Experimental" xml:space="preserve">\r
+ <value>Experimental Features</value>\r
+ </data>\r
+ <data name="Options_ExperimentalFeatures" xml:space="preserve">\r
+ <value>Experimental features are ideas we are working on. These may or may not make it into a final release and may not work!</value>\r
+ </data>\r
</root>
\ No newline at end of file
public void OpenQueueWindow()\r
{\r
bool showQueueInline = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowQueueInline);\r
- showQueueInline = false; // Disabled until it's evaluated.\r
\r
if (showQueueInline)\r
{\r
xmlns:commands="clr-namespace:HandBrakeWPF.Commands"\r
xmlns:helpers="clr-namespace:HandBrakeWPF.Helpers"\r
xmlns:loc="clr-namespace:HandBrakeWPF.Services.Presets.Model"\r
+ xmlns:queue="clr-namespace:HandBrakeWPF.Converters.Queue"\r
AllowDrop="True"\r
FontSize="11"\r
cal:Message.Attach="[Event Loaded] = [Action Load]"\r
<Converters:BooleanConverter x:Key="booleanConverter" />\r
<Converters:PresetsMenuConverter x:Key="presetsMenuConverter"/>\r
<Converters:LongToIntConverter x:Key="longToIntConverter" />\r
+ <queue:InlineQueueConverter x:Key="InlineQueueConverter" />\r
\r
<Style TargetType="Button">\r
<Setter Property="Padding" Value="8,2" />\r
<Grid.RowDefinitions>\r
<RowDefinition Height="Auto" />\r
<RowDefinition Height="Auto" />\r
- <RowDefinition Height="*" />\r
+ <RowDefinition x:Name="tabContentArea" Height="{Binding IsQueueShowingInLine, Converter={StaticResource InlineQueueConverter}}" />\r
<RowDefinition Height="Auto" />\r
+ <RowDefinition Height="{Binding IsQueueShowingInLine, Converter={StaticResource InlineQueueConverter}, ConverterParameter=true}"/>\r
</Grid.RowDefinitions>\r
\r
<!-- Main Controls -->\r
\r
</StackPanel>\r
</Grid>\r
-\r
- \r
</Grid>\r
\r
<!-- Presets Options -->\r
</TabItem>\r
</TabControl>\r
\r
- <!-- Queue in-line display if enabled -->\r
- <Grid Grid.Row="2" Grid.Column="0" Margin="10,10,10,5" Visibility="{Binding IsQueueShowingInLine, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}"\r
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch">\r
- <Grid.RowDefinitions>\r
- <RowDefinition Height="Auto" />\r
- <RowDefinition Height="*" />\r
- </Grid.RowDefinitions>\r
- <Label Content="Queue" FontWeight="Bold" Grid.Row="0"/>\r
- <ContentControl x:Name="QueueViewModel" cal:View.Context="Embedded" Margin="5,0,0,0" Grid.Row="1" />\r
- </Grid>\r
-\r
<!-- Destination -->\r
<StackPanel Grid.Row="3" IsEnabled="{Binding HasSource, Converter={StaticResource booleanConverter}, ConverterParameter=false}"\r
Margin="10,5,10,15"\r
</Grid>\r
</StackPanel>\r
\r
+ <!-- Queue in-line display if enabled -->\r
+ <Grid Grid.Row="4" Grid.Column="0" Margin="10,0,10,10" Visibility="{Binding IsQueueShowingInLine, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}"\r
+ HorizontalAlignment="Stretch" VerticalAlignment="Stretch">\r
+ <Grid.RowDefinitions>\r
+ <RowDefinition Height="Auto" />\r
+ <RowDefinition Height="*" />\r
+ </Grid.RowDefinitions>\r
+ <Label Content="Queue" FontWeight="Bold" Grid.Row="0"/>\r
+ <ContentControl x:Name="QueueViewModel" cal:View.Context="Embedded" Grid.Row="1" />\r
+ </Grid>\r
+\r
<!-- Presets -->\r
- <GroupBox Grid.Row="0" Grid.RowSpan="4"\r
+ <GroupBox Grid.Row="0" Grid.RowSpan="5"\r
Grid.Column="1"\r
HorizontalAlignment="Stretch"\r
VerticalAlignment="Stretch"\r
<CheckBox Content="{x:Static Properties:ResourcesUI.Options_MinimiseTray}" IsChecked="{Binding MinimiseToTray}" />\r
<CheckBox Content="{x:Static Properties:ResourcesUI.Options_ClearCompleted}" IsChecked="{Binding ClearQueueOnEncodeCompleted}" />\r
<CheckBox Content="{x:Static Properties:ResourcesUI.Options_AdvancedTab}" IsChecked="{Binding ShowAdvancedTab}" />\r
- <CheckBox Content="{x:Static Properties:ResourcesUI.Options_ShowQueueInline}" IsChecked="{Binding ShowQueueInline}" Visibility="Collapsed" />\r
<CheckBox Content="{x:Static Properties:ResourcesUI.OptionsView_ShowStatusInTitleBar}" IsChecked="{Binding ShowStatusInTitleBar}" />\r
<CheckBox Content="{x:Static Properties:ResourcesUI.OptionsView_ShowPreviewOnSummaryTab}" IsChecked="{Binding ShowPreviewOnSummaryTab}" />\r
</StackPanel>\r
</StackPanel>\r
+\r
+ <StackPanel Orientation="Vertical" Margin="0,0,0,20">\r
+\r
+ <TextBlock Text="{x:Static Properties:ResourcesUI.Options_Experimental}" FontSize="14" Margin="0,0,0,10"/>\r
+\r
+ <StackPanel Orientation="Vertical" Margin="20,0,0,0">\r
+ <TextBlock Text="{x:Static Properties:ResourcesUI.Options_ExperimentalFeatures}"></TextBlock>\r
+ <CheckBox Content="{x:Static Properties:ResourcesUI.Options_ShowQueueInline}" IsChecked="{Binding ShowQueueInline}" />\r
+ </StackPanel>\r
+ </StackPanel>\r
</StackPanel>\r
\r
<StackPanel Name="Output" Orientation="Vertical" Margin="10,5,0,0"\r