diff options
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r-- | win/CS/HandBrakeWPF/HandBrakeWPF.csproj | 14 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Presets/PresetService.cs | 6 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/UserSettingConstants.cs | 1 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs | 5 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 3 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | 15 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/OptionsView.xaml | 1 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml | 544 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml.cs | 108 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/Queue/QueueTwoView.xaml | 15 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/Queue/QueueTwoView.xaml.cs | 35 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/QueueView.xaml | 773 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/QueueView.xaml.cs | 28 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/defaultsettings.xml | 8 |
15 files changed, 464 insertions, 1094 deletions
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index b47ed425c..cef8114cc 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -349,12 +349,6 @@ <Compile Include="Views\MiniView.xaml.cs">
<DependentUpon>MiniView.xaml</DependentUpon>
</Compile>
- <Compile Include="Views\Queue\QueueTwoContent.xaml.cs">
- <DependentUpon>QueueTwoContent.xaml</DependentUpon>
- </Compile>
- <Compile Include="Views\Queue\QueueTwoView.xaml.cs">
- <DependentUpon>QueueTwoView.xaml</DependentUpon>
- </Compile>
<Compile Include="Views\Queue\Embedded.xaml.cs">
<DependentUpon>Embedded.xaml</DependentUpon>
</Compile>
@@ -546,14 +540,6 @@ <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
- <Page Include="Views\Queue\QueueTwoContent.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Views\Queue\QueueTwoView.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
<Page Include="Views\Queue\Embedded.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
diff --git a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs index 9f11a7b0a..a8a06d74d 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs @@ -830,12 +830,12 @@ namespace HandBrakeWPF.Services.Presets Dictionary<string, PresetCategory> presetCategories = new Dictionary<string, PresetCategory>();
List<HBPreset> uncategorisedPresets = new List<HBPreset>();
+ // Handle User Presets.
+ this.HandlePresetListsForSave(this.flatPresetList.Where(o => !o.IsBuildIn).ToList(), presetCategories, uncategorisedPresets);
+
// Handle Built-in Presets
this.HandlePresetListsForSave(this.flatPresetList.Where(o => o.IsBuildIn).ToList(), presetCategories, uncategorisedPresets);
- // Handle User Presets.
- this.HandlePresetListsForSave(this.flatPresetList.Where(o => !o.IsBuildIn).ToList(), presetCategories, uncategorisedPresets);
-
// Wrap the categories in a container.
JsonSerializerSettings settings = new JsonSerializerSettings { MissingMemberHandling = MissingMemberHandling.Ignore };
PresetTransportContainer container = new PresetTransportContainer(
diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs index 964270960..a646fba53 100644 --- a/win/CS/HandBrakeWPF/UserSettingConstants.cs +++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs @@ -67,7 +67,6 @@ namespace HandBrakeWPF public const string EnableQuickSyncEncoding = "EnableQuickSyncEncoding";
public const string EnableVceEncoder = "EnableVceEncoder";
public const string EnableNvencEncoder = "EnableNvencEncoder";
- public const string ShowExperimentalQueue = "ShowExperimentalQueue";
public const string UiLanguage = "UiLanguage";
public const string ShowAddAllToQueue = "ShowAddAllToQueue";
public const string ShowAddSelectionToQueue = "ShowAddSelectionToQueue";
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs index 2e1de25a4..07f2a06bf 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs @@ -14,11 +14,6 @@ namespace HandBrakeWPF.ViewModels.Interfaces /// </summary>
public interface IQueueViewModel
{
- /// <summary>
- /// Temporary variable to toggle the new style experimental queue.
- /// </summary>
- bool IsNewQueueVisible { set; }
-
bool IsInline { set; }
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 9c054b9dd..041f818d3 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1254,9 +1254,6 @@ namespace HandBrakeWPF.ViewModels public void OpenQueueWindow()
{
bool showQueueInline = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowQueueInline) && VersionHelper.IsNightly();
- bool showNewQueue = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowExperimentalQueue) && VersionHelper.IsNightly();
-
- this.QueueViewModel.IsNewQueueVisible = showNewQueue;
this.QueueViewModel.IsInline = showQueueInline;
if (showQueueInline)
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index f4daf2e23..1baeca994 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -101,7 +101,6 @@ namespace HandBrakeWPF.ViewModels private bool enableQuickSyncEncoding;
private bool enableVceEncoder;
private bool enableNvencEncoder;
- private bool showExperimentalQueue;
private InterfaceLanguage selectedLanguage;
@@ -398,17 +397,6 @@ namespace HandBrakeWPF.ViewModels }
}
- public bool ShowExperimentalQueue
- {
- get => this.showExperimentalQueue;
- set
- {
- if (value == this.showExperimentalQueue) return;
- this.showExperimentalQueue = value;
- this.NotifyOfPropertyChange(() => this.ShowExperimentalQueue);
- }
- }
-
/// <summary>
/// Gets or sets a value indicating whether to show encode status in the tile bar.
/// </summary>
@@ -1407,7 +1395,6 @@ namespace HandBrakeWPF.ViewModels this.WhenDoneAudioFileFullPath = this.userSettingService.GetUserSetting<string>(UserSettingConstants.WhenDoneAudioFile);
this.PlaySoundWhenDone = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.PlaySoundWhenDone);
this.PlaySoundWhenQueueDone = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.PlaySoundWhenQueueDone);
- this.ShowExperimentalQueue = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowExperimentalQueue);
this.ShowAddAllToQueue = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAddAllToQueue);
this.ShowAddSelectionToQueue = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAddSelectionToQueue);
@@ -1582,8 +1569,6 @@ namespace HandBrakeWPF.ViewModels /* Experiments */
this.userSettingService.SetUserSetting(UserSettingConstants.ShowQueueInline, this.ShowQueueInline);
- this.userSettingService.SetUserSetting(UserSettingConstants.ShowExperimentalQueue, this.ShowExperimentalQueue);
-
/* Output Files */
this.userSettingService.SetUserSetting(UserSettingConstants.AutoNaming, this.AutomaticallyNameFiles);
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index 0b4e954a5..20cc0bbbe 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -247,8 +247,6 @@ namespace HandBrakeWPF.ViewModels }
}
- public bool IsNewQueueVisible { get; set; }
-
public bool IsInline { get; set; }
public bool StatsVisible
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index 31769f4a3..b98bf35c3 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -198,7 +198,6 @@ <StackPanel Orientation="Vertical" Margin="20,0,0,0">
<TextBlock Text="{x:Static Properties:Resources.Options_ExperimentalFeatures}" Margin="0,0,0,10" TextWrapping="Wrap" />
- <CheckBox Content="{x:Static Properties:Resources.Options_ShowExperimentalQueueDesign}" IsChecked="{Binding ShowExperimentalQueue}" />
<CheckBox Content="{x:Static Properties:Resources.Options_ShowQueueInline}" IsChecked="{Binding ShowQueueInline}" Margin="20,5,0,0" />
</StackPanel>
</StackPanel>
diff --git a/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml b/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml deleted file mode 100644 index d97c85deb..000000000 --- a/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml +++ /dev/null @@ -1,544 +0,0 @@ -<UserControl x:Class="HandBrakeWPF.Views.Queue.QueueTwoContent" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:cal="http://www.caliburnproject.org" - xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop" - xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:Audio="clr-namespace:HandBrakeWPF.Converters.Audio" - xmlns:Subtitles="clr-namespace:HandBrakeWPF.Converters.Subtitles" - xmlns:video="clr-namespace:HandBrakeWPF.Converters.Video" - xmlns:commands="clr-namespace:HandBrakeWPF.Commands" - xmlns:helpers="clr-namespace:HandBrakeWPF.Helpers" - xmlns:Properties="clr-namespace:HandBrakeWPF.Properties" - xmlns:queue="clr-namespace:HandBrakeWPF.Converters.Queue" - TextOptions.TextFormattingMode="Display" - mc:Ignorable="d"> - - <UserControl.Resources> - <Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" /> - <Converters:FullPathToFileNameConverter x:Key="filePathToFilenameConverter" /> - <Converters:EnumComboConverter x:Key="enumComboConverter" /> - <Converters:QueueStatusToVisibilityConverter x:Key="queueStatusVisConverter" /> - <Converters:InverseBooleanConverter x:Key="notBooleanConverter" /> - <Audio:AudioQueueDisplayConverter x:Key="audioTrackDisplayConverter" /> - <Subtitles:SubtitlesQueueDisplayConverter x:Key="subtitleTrackDisplayConverter" /> - <video:EncoderOptionsTooltipConverter x:Key="encoderOptionsTooltipConverter" /> - <video:VideoOptionsTooltipConverter x:Key="videoOptionsTooltipConverter" /> - <queue:PictureSettingsDescConveter x:Key="pictureSettingsDescConverter" /> - - <Style x:Key="LongToolTipHolder" TargetType="FrameworkElement"> - <Setter Property="ToolTipService.ShowDuration" Value="10000" /> - </Style> - - </UserControl.Resources> - - <Grid> - - <Grid.RowDefinitions> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - <RowDefinition Height="*" /> - </Grid.RowDefinitions> - - <Grid HorizontalAlignment="Stretch" Grid.Row="0" Visibility="{Binding IsNewQueueVisible, Converter={StaticResource boolToVisConverter}}"> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="Auto" /> - <ColumnDefinition Width="Auto" /> - <ColumnDefinition Width="*" /> - <ColumnDefinition Width="Auto" /> - </Grid.ColumnDefinitions> - - <TextBlock Text="{x:Static Properties:Resources.MainView_ShowQueue}" FontSize="28" VerticalAlignment="Center" FontFamily="Segoe UI Light" Margin="10,0,0,0" /> - <TextBlock Text="{Binding JobsPending}" Grid.Column="1" Margin="15,0,0,5 " VerticalAlignment="Bottom" TextWrapping="WrapWithOverflow" TextTrimming="CharacterEllipsis" /> - - <Menu HorizontalAlignment="Right" Background="Transparent" VerticalAlignment="Bottom" Grid.Column="3" Margin="0,0,10,0" > - <MenuItem> - <MenuItem.Header> - <StackPanel Height="32" Orientation="Horizontal"> - <Image Source="../Images/Advanced.png" Width="20" Height="20" VerticalAlignment="Center" /> - <TextBlock VerticalAlignment="Center" - Text="{x:Static Properties:Resources.QueueView_Options}" Margin="5,0,0,0" /> - <Path Height="5" - Margin="2,2,0,0" - Data="M 0 0 L 4 4 L 8 0 Z" - Fill="{DynamicResource GlyphBrush}" /> - </StackPanel> - </MenuItem.Header> - <MenuItem cal:Message.Attach="[Event Click] = [Action ResetFailed]" Header="{x:Static Properties:Resources.QueueView_ResetFailed}" /> - <MenuItem cal:Message.Attach="[Event Click] = [Action ResetSelectedJobs]" Header="{x:Static Properties:Resources.QueueView_ResetSelectedJobs}" /> - <MenuItem cal:Message.Attach="[Event Click] = [Action ResetAllJobs]" Header="{x:Static Properties:Resources.QueueView_ResetAllJobs}" /> - <Separator /> - <MenuItem cal:Message.Attach="[Event Click] = [Action ClearCompleted]" Header="{x:Static Properties:Resources.QueueView_ClearCompleted}" /> - <MenuItem cal:Message.Attach="[Event Click] = [Action Clear]" Header="{x:Static Properties:Resources.QueueView_ClearAll}" /> - <MenuItem cal:Message.Attach="[Event Click] = [Action RemoveSelectedJobs]" Header="{x:Static Properties:Resources.QueueView_ClearSelected}" /> - <Separator /> - <!--<MenuItem cal:Message.Attach="[Event Click] = [Action Import]" Header="{x:Static Properties:Resources.QueueView_Import}" />--> - <MenuItem cal:Message.Attach="[Event Click] = [Action Export]" Header="{x:Static Properties:Resources.QueueView_Export}" /> - </MenuItem> - </Menu> - - </Grid> - - <Grid Grid.Row="2" Margin="0,15,0,0"> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="3*" MaxWidth="600" x:Name="leftTabPanel" /> - <ColumnDefinition Width="5*" x:Name="rightTabPanel" /> - </Grid.ColumnDefinitions> - - <Grid> - <Grid.RowDefinitions> - <RowDefinition Height="Auto" /> - <RowDefinition Height="*" /> - <RowDefinition Height="Auto" /> - </Grid.RowDefinitions> - - <Grid Grid.Row="0" HorizontalAlignment="Stretch" Margin="10,0,5,5"> - - <Grid.RowDefinitions> - <RowDefinition Height="Auto" /> - </Grid.RowDefinitions> - - <Grid.ColumnDefinitions> - <ColumnDefinition Width="Auto" /> - <ColumnDefinition Width="Auto" /> - <ColumnDefinition Width="*" /> - <ColumnDefinition Width="Auto" /> - </Grid.ColumnDefinitions> - - <Button Name="Start" AutomationProperties.Name="Start Queue" cal:Message.Attach="[Event Click] = [Action StartQueue]" Grid.Column="0" - IsEnabled="{Binding IsQueueRunning, Converter={StaticResource notBooleanConverter}}" - Visibility="{Binding IsQueueRunning, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}"> - <StackPanel Orientation="Horizontal"> - <Image Width="16" Height="16" Margin="2,0,0,0" Source="../Images/Play.png" /> - <Label Margin="5,0,5,0" VerticalAlignment="Center" Content="{x:Static Properties:Resources.QueueView_Start}" /> - </StackPanel> - </Button> - - <Button Name="Pause" AutomationProperties.Name="Pause Queue" cal:Message.Attach="[Event Click] = [Action PauseQueueToolbar]" Grid.Column="1" - Visibility="{Binding IsQueueRunning, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}"> - <StackPanel Orientation="Horizontal"> - <Image Width="16" Height="16" Margin="2,0,0,0" Source="../Images/Pause.png" /> - <Label Margin="5,0,0,0" VerticalAlignment="Center" Content="{x:Static Properties:Resources.QueueView_Pause}" /> - </StackPanel> - </Button> - - <StackPanel Grid.Row="0" Grid.Column="3" Orientation="Horizontal"> - <Button Content="^" Width="20" Height="20" Margin="0" cal:Message.Attach="[Event Click] = [Action MoveUp]" /> - <Button Content="v" Width="20" Height="20" Margin="5,0,0,0" cal:Message.Attach="[Event Click] = [Action MoveDown]" /> - </StackPanel> - </Grid> - - <ListBox Tag="{Binding}" x:Name="queueJobs" Grid.Row="1" Margin="10,0,5,0" - - dd:DragDrop.DropHandler="{Binding}" - dd:DragDrop.IsDragSource="True" - dd:DragDrop.IsDropTarget="True" - ItemsSource="{Binding QueueTasks, Mode=OneWay}" - helpers:ListBoxHelper.SelectedItems="{Binding SelectedItems}" - SelectedItem="{Binding SelectedTask}" - SelectionMode="Extended" - BorderThickness="1" - ScrollViewer.HorizontalScrollBarVisibility="Disabled" > - - <i:Interaction.Triggers> - <commands:InputBindingTrigger> - <commands:InputBindingTrigger.InputBinding> - <KeyBinding Key="Delete"/> - </commands:InputBindingTrigger.InputBinding> - <cal:ActionMessage MethodName="RemoveSelectedJobs" /> - </commands:InputBindingTrigger> - </i:Interaction.Triggers> - - <ListBox.ContextMenu> - <ContextMenu cal:Action.TargetWithoutContext="{Binding Path=PlacementTarget.Tag, RelativeSource={RelativeSource Self}}" Opened="ContextMenu_OnOpened"> - <MenuItem cal:Message.Attach="[Event Click] = [Action StartQueue]" Header="{x:Static Properties:Resources.QueueView_Start}" /> - <MenuItem cal:Message.Attach="[Event Click] = [Action PauseQueue]" Header="{x:Static Properties:Resources.QueueView_Pause}" /> - <Separator /> - <MenuItem cal:Message.Attach="[Event Click] = [Action ResetFailed]" Header="{x:Static Properties:Resources.QueueView_ResetFailed}" /> - <MenuItem cal:Message.Attach="[Event Click] = [Action ResetSelectedJobs]" Header="{x:Static Properties:Resources.QueueView_ResetSelectedJobs}" /> - <MenuItem cal:Message.Attach="[Event Click] = [Action ResetAllJobs]" Header="{x:Static Properties:Resources.QueueView_ResetAllJobs}" /> - <Separator /> - <MenuItem cal:Message.Attach="[Event Click] = [Action ClearCompleted]" Header="{x:Static Properties:Resources.QueueView_ClearCompleted}" /> - <MenuItem cal:Message.Attach="[Event Click] = [Action Clear]" Header="{x:Static Properties:Resources.QueueView_ClearAll}" /> - <MenuItem cal:Message.Attach="[Event Click] = [Action RemoveSelectedJobs]" Header="{x:Static Properties:Resources.QueueView_ClearSelected}" /> - <Separator /> - <MenuItem Header="{x:Static Properties:Resources.QueueView_OpenSourceDir}" x:Name="openSourceDir" Click="OpenSourceDir_OnClick" /> - <MenuItem Header="{x:Static Properties:Resources.QueueView_OpenDestDir}" x:Name="openDestDir" Click="OpenDestDir_OnClick" /> - <Separator /> - <MenuItem cal:Message.Attach="[Event Click] = [Action Export]" Header="{x:Static Properties:Resources.QueueView_Export}" /> - </ContextMenu> - </ListBox.ContextMenu> - - <ListBox.ItemContainerStyle> - <Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}"> - <Setter Property="HorizontalContentAlignment" Value="Stretch" /> - <Setter Property="Margin" Value="0,0,0,1" /> - </Style> - </ListBox.ItemContainerStyle> - - <ListBox.ItemTemplate> - <DataTemplate x:Name="QueueItemTemplate"> - - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="40" /> - <ColumnDefinition Width="*" /> - <ColumnDefinition Width="Auto" /> - </Grid.ColumnDefinitions> - - <!-- Marker --> - <Image Grid.Column="0" Width="16" Height="16" SnapsToDevicePixels="True"> - - <Image.LayoutTransform> - <RotateTransform CenterX="8" CenterY="8" Angle="0"/> - </Image.LayoutTransform> - - <Image.Style> - <Style TargetType="{x:Type Image}"> - <Style.Triggers> - <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="Waiting"> - <Setter Property="Source" Value="..\Images\Movies.png" /> - </DataTrigger> - <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="In Progress"> - <Setter Property="Source" Value="..\Images\Working0.png" /> - <DataTrigger.EnterActions> - <BeginStoryboard> - <Storyboard> - <DoubleAnimation Duration="0:0:2" To="180" Storyboard.TargetProperty="(Image.LayoutTransform).(RotateTransform.Angle)" RepeatBehavior="Forever" /> - </Storyboard> - </BeginStoryboard> - </DataTrigger.EnterActions> - <DataTrigger.ExitActions> - <BeginStoryboard> - <Storyboard> - <DoubleAnimation Duration="0:0:0" To="0" Storyboard.TargetProperty="(Image.LayoutTransform).(RotateTransform.Angle)"/> - </Storyboard> - </BeginStoryboard> - </DataTrigger.ExitActions> - </DataTrigger> - <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="Completed"> - <Setter Property="Source" Value="..\Images\Complete.png" /> - </DataTrigger> - <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="Error"> - <Setter Property="Source" Value="..\Images\WarningSmall.png" /> - </DataTrigger> - </Style.Triggers> - </Style> - </Image.Style> - </Image> - - <!-- Settings --> - <Grid Grid.Column="1" Margin="0,3,15,3"> - <Grid.RowDefinitions> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - </Grid.RowDefinitions> - - <Grid.ColumnDefinitions> - <ColumnDefinition Width="Auto" /> - <ColumnDefinition Width="*" /> - </Grid.ColumnDefinitions> - - <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="2"> - <TextBlock FontWeight="Bold" Text="Title: " /> - <TextBlock Text="{Binding Task.Title}" /> - - <TextBlock Text="{Binding Task.PointToPointMode}" Margin="10,0,0,0" FontWeight="Bold" /> - <TextBlock Text=": " /> - <TextBlock Text="{Binding Task.StartPoint}" /> - <TextBlock Margin="5,0,5,0" Text="to" /> - <TextBlock Text="{Binding Task.EndPoint}" /> - </StackPanel> - - - <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Source}" Grid.Row="1" /> - <TextBlock Text="{Binding Task.Source, Converter={StaticResource filePathToFilenameConverter}}" Margin="2,0,0,0" Grid.Row="1" Grid.Column="1"/> - <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Destination}" Grid.Row="2" /> - <TextBlock Text="{Binding Task.Destination, Converter={StaticResource filePathToFilenameConverter}}" Margin="2,0,0,0" TextTrimming="CharacterEllipsis" Grid.Row="2" Grid.Column="1" /> - - <ProgressBar Minimum="0" Height="4" Maximum="100" Name="pbStatus" Margin="0,2,5,0" Grid.Row="3" Grid.ColumnSpan="2" - Value="{Binding DataContext.ProgressValue, ElementName=queueJobs}" IsIndeterminate="{Binding DataContext.IntermediateProgress, ElementName=queueJobs}" - Visibility="{Binding ShowEncodeProgress, Converter={StaticResource boolToVisConverter}}" /> - </Grid> - </Grid> - </DataTemplate> - </ListBox.ItemTemplate> - </ListBox> - - <Border BorderThickness="1,0,1,1" BorderBrush="DarkGray" Grid.Row="2" Margin="10,0,5,10" SnapsToDevicePixels="True" > - <Menu HorizontalAlignment="Center" VerticalAlignment="Center" Background="Transparent" - AutomationProperties.Name="{x:Static Properties:Resources.QueueView_WhenDone}"> - <MenuItem> - <MenuItem.Header> - <StackPanel Height="32" Orientation="Horizontal"> - <TextBlock VerticalAlignment="Center" - FontWeight="Bold" - Text="{x:Static Properties:Resources.QueueView_WhenDone}" /> - <Label Margin="8,0,0,0" - VerticalAlignment="Center" - Content="{Binding WhenDoneAction}" /> - <Path Height="5" - Margin="2,2,2,0" - Data="M 0 0 L 4 4 L 8 0 Z" - Fill="{DynamicResource GlyphBrush}" /> - </StackPanel> - </MenuItem.Header> - - <MenuItem x:Name="doNothing" - cal:Message.Attach="[Event Click] = [Action WhenDone(doNothing.Header)]" - Header="{x:Static Properties:Resources.QueueView_DoNothing}" /> - <MenuItem x:Name="shutdown" - cal:Message.Attach="[Event Click] = [Action WhenDone(shutdown.Header)]" - Header="{x:Static Properties:Resources.QueueView_Shutdown}" /> - <MenuItem x:Name="suspend" - cal:Message.Attach="[Event Click] = [Action WhenDone(suspend.Header)]" - Header="{x:Static Properties:Resources.QueueView_Suspend}" /> - <MenuItem x:Name="hibernate" - cal:Message.Attach="[Event Click] = [Action WhenDone(hibernate.Header)]" - Header="{x:Static Properties:Resources.QueueView_Hibernate}"/> - <MenuItem x:Name="lock" - cal:Message.Attach="[Event Click] = [Action WhenDone(lock.Header)]" - Header="{x:Static Properties:Resources.QueueView_LockSystem}" /> - <MenuItem x:Name="logoff" - cal:Message.Attach="[Event Click] = [Action WhenDone(logoff.Header)]" - Header="{x:Static Properties:Resources.QueueView_Logoff}"/> - <MenuItem x:Name="quit" - cal:Message.Attach="[Event Click] = [Action WhenDone(quit.Header)]" - Header="{x:Static Properties:Resources.QueueView_QuitHandBrake}"/> - </MenuItem> - </Menu> - </Border> - </Grid> - - <TabControl x:Name="summaryTabControl" Grid.Column="1" Margin="5,0,10,10" > - <TabItem Header="{x:Static Properties:Resources.QueueView_Summary}" > - <ScrollViewer VerticalScrollBarVisibility="Auto" Margin="5,5,0,5"> - - <StackPanel Orientation="Vertical" Margin="5,5,0,5"> - - <StackPanel Orientation="Horizontal" > - - <StackPanel.Resources> - <Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}"> - <Setter Property="Padding" Value="8,2" /> - </Style> - </StackPanel.Resources> - - <Button AutomationProperties.Name="{x:Static Properties:Resources.QueueView_Retry}" ToolTip="{x:Static Properties:ResourcesTooltips.QueueView_ResetJobStatus}"> - <Button.Content> - <StackPanel Orientation="Horizontal"> - <Image Width="20" Height="20" VerticalAlignment="Center" Margin="0,0,5,0" - Source="../Images/Refresh.ico"> - </Image> - <TextBlock Text="{x:Static Properties:Resources.QueueView_Retry}" /> - </StackPanel> - - </Button.Content> - <i:Interaction.Triggers> - <i:EventTrigger EventName="Click"> - <cal:ActionMessage MethodName="RetryJob"> - <cal:Parameter Value="{Binding SelectedTask}" /> - </cal:ActionMessage> - </i:EventTrigger> - </i:Interaction.Triggers> - </Button> - - <Button Margin="10,0,0,0" AutomationProperties.Name="{x:Static Properties:Resources.QueueView_Edit}" ToolTip="{x:Static Properties:ResourcesTooltips.QueueView_SendJobBack}"> - <Button.Content> - <StackPanel Orientation="Horizontal"> - <Image Width="20" Margin="0,0,5,0" Height="20" VerticalAlignment="Center" - Source="../Images/options24.png"> - </Image> - <TextBlock Text="{x:Static Properties:Resources.QueueView_Edit}" /> - </StackPanel> - </Button.Content> - <i:Interaction.Triggers> - <i:EventTrigger EventName="Click"> - <cal:ActionMessage MethodName="EditJob"> - <cal:Parameter Value="{Binding SelectedTask}" /> - </cal:ActionMessage> - </i:EventTrigger> - </i:Interaction.Triggers> - </Button> - - <Button Margin="10,0,0,0" AutomationProperties.Name="{x:Static Properties:Resources.QueueView_Delete}" ToolTip="{x:Static Properties:ResourcesTooltips.QueueView_DeleteJob}"> - <Button.Content> - <StackPanel Orientation="Horizontal"> - <Image Width="20" Height="20" VerticalAlignment="Center" Margin="0,0,5,0" - Source="../Images/delete.png"> - </Image> - <TextBlock Text="{x:Static Properties:Resources.QueueView_Delete}" /> - </StackPanel> - </Button.Content> - <i:Interaction.Triggers> - <i:EventTrigger EventName="Click"> - <cal:ActionMessage MethodName="RemoveJob"> - <cal:Parameter Value="{Binding SelectedTask}" /> - </cal:ActionMessage> - </i:EventTrigger> - </i:Interaction.Triggers> - </Button> - - - <Button x:Name="queueOptionsDropButton" Margin="10,0,0,0" Click="QueueOptionsDropButton_OnClick" - AutomationProperties.Name="{x:Static Properties:Resources.QueueView_Actions}" IsEnabled="{Binding CanPerformActionOnSource}"> - <Button.Content> - <StackPanel Orientation="Horizontal"> - <Image Width="20" Height="20" VerticalAlignment="Center" Margin="0,0,5,0" - Source="../Images/Advanced.png"> - </Image> - - <TextBlock Margin="0,0,5,0" Padding="0" - VerticalAlignment="Center" - Text="{x:Static Properties:Resources.QueueView_Actions}" /> - - <Path Height="5" Margin="2,2,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" - Data="M 0 0 L 4 4 L 8 0 Z" - Fill="{DynamicResource GlyphBrush}" x:Name="dropdownArrowPreset" /> - </StackPanel> - </Button.Content> - - <Button.ContextMenu> - <ContextMenu cal:Action.TargetWithoutContext="{Binding DataContext, RelativeSource={RelativeSource Self}}"> - <MenuItem Header="{x:Static Properties:Resources.QueueView_PlayMediaFile}" cal:Message.Attach="[Event Click] = [Action PlayFile]" /> - <Separator /> - <MenuItem Header="{x:Static Properties:Resources.QueueView_OpenSourceDir}" cal:Message.Attach="[Event Click] = [Action OpenSourceDir]" /> - <MenuItem Header="{x:Static Properties:Resources.QueueView_OpenDestDir}" cal:Message.Attach="[Event Click] = [Action OpenDestDir]" /> - </ContextMenu> - </Button.ContextMenu> - </Button> - </StackPanel> - - <TextBlock Text="{Binding JobStatus}" Visibility="{Binding IsJobStatusVisible, Converter={StaticResource boolToVisConverter}}" - Margin="0,15,10,5" TextWrapping="WrapWithOverflow" TextTrimming="CharacterEllipsis" /> - - <Grid Style="{StaticResource LongToolTipHolder}" Margin="0,10,0,0" > - <Grid.Resources> - <Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}"> - <Setter Property="Margin" Value="0,5,0,5" /> - </Style> - </Grid.Resources> - - <Grid.RowDefinitions> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - </Grid.RowDefinitions> - - <Grid.ColumnDefinitions> - <ColumnDefinition Width="Auto" MinWidth="100" /> - <ColumnDefinition Width="*" /> - </Grid.ColumnDefinitions> - - <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Source}" VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" /> - <TextBlock Text="{Binding SelectedTask.Task.Source}" TextWrapping="Wrap" Grid.Row="0" Grid.Column="1" /> - - <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Destination}" VerticalAlignment="Top" Grid.Row="1" Grid.Column="0" /> - <TextBlock Text="{Binding SelectedTask.Task.Destination}" TextWrapping="Wrap" Grid.Row="1" Grid.Column="1" /> - - <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_PictureSettings}" VerticalAlignment="Top" Grid.Row="2" Grid.Column="0" /> - <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource pictureSettingsDescConverter}}" TextWrapping="Wrap" Grid.Row="2" Grid.Column="1" /> - - <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Video}" Grid.Row="3" Grid.Column="0" /> - <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource videoOptionsTooltipConverter}}" Grid.Row="3" Grid.Column="1" TextWrapping="Wrap" /> - - <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Audio}" Grid.Row="4" Grid.Column="0"/> - <TextBlock Text="{Binding SelectedTask.Task.AudioTracks, Converter={StaticResource audioTrackDisplayConverter}}" - Grid.Row="4" Grid.Column="1"/> - - <TextBlock FontWeight="Bold" VerticalAlignment="Top" Text="{x:Static Properties:Resources.QueueView_Subtitles}" Grid.Row="5" Grid.Column="0" /> - <TextBlock Text="{Binding SelectedTask.Task.SubtitleTracks, Converter={StaticResource subtitleTrackDisplayConverter}}" - Grid.Row="5" Grid.Column="1" /> - - <TextBlock FontWeight="Bold" VerticalAlignment="Top" Grid.Row="6" Grid.Column="0" Text="{x:Static Properties:Resources.QueueView_Advanced}" /> - <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource encoderOptionsTooltipConverter}}" Grid.Row="6" Grid.Column="1" TextWrapping="Wrap" /> - </Grid> - - </StackPanel> - </ScrollViewer> - </TabItem> - - <TabItem Header="{x:Static Properties:Resources.QueueView_Statistics}" > - <ScrollViewer VerticalScrollBarVisibility="Auto" Margin="10,0,0,5"> - <StackPanel> - <TextBlock Text="{x:Static Properties:Resources.QueueView_StatsNotAvailableYet}" Margin="0,10,0,0" Visibility="{Binding StatsVisible, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" /> - - <Grid Style="{StaticResource LongToolTipHolder}" Margin="0,5,0,0" Visibility="{Binding StatsVisible, Converter={StaticResource boolToVisConverter}}"> - <Grid.Resources> - <Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}"> - <Setter Property="Margin" Value="0,5,0,5" /> - </Style> - </Grid.Resources> - - <Grid.RowDefinitions> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - <RowDefinition Height="Auto" /> - </Grid.RowDefinitions> - - <Grid.ColumnDefinitions> - <ColumnDefinition Width="Auto" MinWidth="100" /> - <ColumnDefinition Width="*" /> - </Grid.ColumnDefinitions> - - <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_StartTime}" VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" /> - <TextBlock Text="{Binding SelectedTask.Statistics.StartTime}" TextWrapping="Wrap" Grid.Row="0" Grid.Column="1" /> - - <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_EndTime}" VerticalAlignment="Top" Grid.Row="1" Grid.Column="0" /> - <TextBlock Text="{Binding SelectedTask.Statistics.EndTime}" TextWrapping="Wrap" Grid.Row="1" Grid.Column="1" /> - - <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_PausedDuration}" VerticalAlignment="Top" Grid.Row="2" Grid.Column="0" /> - <TextBlock Text="{Binding SelectedTask.Statistics.PausedDuration,StringFormat=hh\\:mm\\:ss}" TextWrapping="Wrap" Grid.Row="2" Grid.Column="1" /> - - <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Duration}" VerticalAlignment="Top" Grid.Row="3" Grid.Column="0" /> - <TextBlock Text="{Binding SelectedTask.Statistics.Duration,StringFormat=hh\\:mm\\:ss}" TextWrapping="Wrap" Grid.Row="3" Grid.Column="1" /> - - <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_FileSize}" VerticalAlignment="Top" Grid.Row="4" Grid.Column="0" /> - <StackPanel Orientation="Horizontal" Grid.Row="4" Grid.Column="1" > - <TextBlock Text="{Binding SelectedTask.Statistics.FinalFileSizeInMegaBytes}" TextWrapping="Wrap" /> - <TextBlock Text=" MB" /> - </StackPanel> - - </Grid> - - </StackPanel> - </ScrollViewer> - </TabItem> - - <TabItem Header="{x:Static Properties:Resources.MainView_ActivityLog}"> - <TextBox ScrollViewer.VerticalScrollBarVisibility="Visible" Text="{Binding ActivityLog, Mode=OneWay}" TextWrapping="Wrap" x:Name="logText"> - <TextBox.ContextMenu> - <ContextMenu> - <MenuItem Header="{x:Static Properties:Resources.LogView_CopyClipboard}" cal:Message.Attach="[Event Click] = [Action CopyLog]" > - <MenuItem.Icon> - <Image Width="16" Source="../Images/copy.png" /> - </MenuItem.Icon> - </MenuItem> - <MenuItem Header="{x:Static Properties:Resources.LogView_OpenLogDir}" cal:Message.Attach="[Event Click] = [Action OpenLogDirectory]"> - <MenuItem.Icon> - <Image Width="16" Source="../Images/folder.png" /> - </MenuItem.Icon> - </MenuItem> - </ContextMenu> - </TextBox.ContextMenu> - </TextBox> - </TabItem> - </TabControl> - - </Grid> - </Grid> -</UserControl> - diff --git a/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml.cs b/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml.cs deleted file mode 100644 index e6fe29971..000000000 --- a/win/CS/HandBrakeWPF/Views/Queue/QueueTwoContent.xaml.cs +++ /dev/null @@ -1,108 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// <copyright file="QueueTwoView.xaml.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> -// Interaction logic for QueueTwoView.xaml -// </summary> -// -------------------------------------------------------------------------------------------------------------------- - -namespace HandBrakeWPF.Views.Queue -{ - using System.Windows; - using System.Windows.Controls; - using System.Windows.Input; - using System.Windows.Media; - - using HandBrakeWPF.Services.Queue.Model; - using HandBrakeWPF.ViewModels; - - /// <summary> - /// Interaction logic for VideoView - /// </summary> - public partial class QueueTwoContent : UserControl - { - private QueueTask mouseActiveQueueTask; - - /// <summary> - /// Initializes a new instance of the <see cref="QueueTwoContent"/> class. - /// </summary> - public QueueTwoContent() - { - this.InitializeComponent(); - this.SizeChanged += this.Queue2View_SizeChanged; - } - - private void Queue2View_SizeChanged(object sender, SizeChangedEventArgs e) - { - // Make the view adaptive. - if (e.WidthChanged) - { - this.summaryTabControl.Visibility = this.ActualWidth < 600 ? Visibility.Collapsed : Visibility.Visible; - this.leftTabPanel.Width = this.ActualWidth < 600 ? new GridLength(this.ActualWidth - 10, GridUnitType.Star) : new GridLength(3, GridUnitType.Star); - this.leftTabPanel.MaxWidth = this.ActualWidth < 600 ? 650 : 400; - } - } - private void ContextMenu_OnOpened(object sender, RoutedEventArgs e) - { - ContextMenu menu = sender as ContextMenu; - this.mouseActiveQueueTask = null; - - if (menu != null) - { - Point p = Mouse.GetPosition(this); - HitTestResult result = VisualTreeHelper.HitTest(this, p); - - if (result != null) - { - ListBoxItem listBoxItem = FindParent<ListBoxItem>(result.VisualHit); - if (listBoxItem != null) - { - this.mouseActiveQueueTask = listBoxItem.DataContext as QueueTask; - } - } - } - - this.openSourceDir.IsEnabled = this.mouseActiveQueueTask != null; - this.openDestDir.IsEnabled = this.mouseActiveQueueTask != null; - } - - private static T FindParent<T>(DependencyObject from) where T : class - { - DependencyObject parent = VisualTreeHelper.GetParent(from); - - T result = null; - if (parent is T) - { - result = parent as T; - } - else if (parent != null) - { - result = FindParent<T>(parent); - } - - return result; - } - - private void OpenSourceDir_OnClick(object sender, RoutedEventArgs e) - { - ((QueueViewModel)this.DataContext).OpenSourceDirectory(this.mouseActiveQueueTask); - } - - private void OpenDestDir_OnClick(object sender, RoutedEventArgs e) - { - ((QueueViewModel)this.DataContext).OpenDestinationDirectory(this.mouseActiveQueueTask); - } - - private void QueueOptionsDropButton_OnClick(object sender, RoutedEventArgs e) - { - var button = sender as FrameworkElement; - if (button != null && button.ContextMenu != null) - { - button.ContextMenu.PlacementTarget = button; - button.ContextMenu.Placement = System.Windows.Controls.Primitives.PlacementMode.Bottom; - button.ContextMenu.IsOpen = true; - } - } - } -} diff --git a/win/CS/HandBrakeWPF/Views/Queue/QueueTwoView.xaml b/win/CS/HandBrakeWPF/Views/Queue/QueueTwoView.xaml deleted file mode 100644 index a49d2503b..000000000 --- a/win/CS/HandBrakeWPF/Views/Queue/QueueTwoView.xaml +++ /dev/null @@ -1,15 +0,0 @@ -<Window x:Class="HandBrakeWPF.Views.Queue.QueueTwoView" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:queue1="clr-namespace:HandBrakeWPF.Views.Queue" - Title="{Binding Title}" - WindowStartupLocation="CenterScreen" - TextOptions.TextFormattingMode="Display" - mc:Ignorable="d"> - - <queue1:QueueTwoContent DataContext="{Binding DataContext}" /> - -</Window> - diff --git a/win/CS/HandBrakeWPF/Views/Queue/QueueTwoView.xaml.cs b/win/CS/HandBrakeWPF/Views/Queue/QueueTwoView.xaml.cs deleted file mode 100644 index 550ab4b85..000000000 --- a/win/CS/HandBrakeWPF/Views/Queue/QueueTwoView.xaml.cs +++ /dev/null @@ -1,35 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// <copyright file="QueueTwoView.xaml.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> -// Interaction logic for QueueTwoView.xaml -// </summary> -// -------------------------------------------------------------------------------------------------------------------- - -namespace HandBrakeWPF.Views.Queue -{ - using System.Windows; - using System.Windows.Controls; - using System.Windows.Input; - using System.Windows.Media; - - using HandBrakeWPF.Services.Queue.Model; - using HandBrakeWPF.ViewModels; - - /// <summary> - /// Interaction logic for VideoView - /// </summary> - public partial class QueueTwoView : Window - { - - /// <summary> - /// Initializes a new instance of the <see cref="Queue2View"/> class. - /// </summary> - public QueueTwoView() - { - } - - - } -} diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml b/win/CS/HandBrakeWPF/Views/QueueView.xaml index 33710d000..75c324536 100644 --- a/win/CS/HandBrakeWPF/Views/QueueView.xaml +++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml @@ -14,7 +14,6 @@ xmlns:helpers="clr-namespace:HandBrakeWPF.Helpers"
xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
xmlns:queue="clr-namespace:HandBrakeWPF.Converters.Queue"
- xmlns:queue1="clr-namespace:HandBrakeWPF.Views.Queue"
Title="{Binding Title}"
Width="750"
Height="520"
@@ -35,7 +34,7 @@ <video:EncoderOptionsTooltipConverter x:Key="encoderOptionsTooltipConverter" />
<video:VideoOptionsTooltipConverter x:Key="videoOptionsTooltipConverter" />
<queue:PictureSettingsDescConveter x:Key="pictureSettingsDescConverter" />
-
+
<Style x:Key="LongToolTipHolder" TargetType="FrameworkElement">
<Setter Property="ToolTipService.ShowDuration" Value="10000" />
</Style>
@@ -45,405 +44,505 @@ <Grid>
<Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
- <queue1:QueueTwoContent DataContext="{Binding}" Visibility="{Binding IsNewQueueVisible, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />
-
- <Grid Visibility="{Binding IsNewQueueVisible, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}">
-
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
-
- <ToolBar Name="mainToolBar"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- SnapsToDevicePixels="True"
- AllowDrop="False" Focusable="False" >
- <ToolBar.Resources>
- <Style TargetType="{x:Type ToolBarPanel}">
- <Setter Property="Orientation" Value="Vertical"/>
- </Style>
-
- <Style BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" TargetType="{x:Type Button}" />
- </ToolBar.Resources>
-
- <DockPanel Background="Transparent" HorizontalAlignment="Stretch">
-
- <Button Name="Start" DockPanel.Dock="Left" AutomationProperties.Name="Start Queue"
- cal:Message.Attach="[Event Click] = [Action StartQueue]"
- IsEnabled="{Binding IsQueueRunning, Converter={StaticResource notBooleanConverter}}"
- Visibility="{Binding IsQueueRunning,
- Converter={StaticResource boolToVisConverter},
- ConverterParameter=true}">
+ <Grid HorizontalAlignment="Stretch" Grid.Row="0" Visibility="{Binding IsNewQueueVisible, Converter={StaticResource boolToVisConverter}}">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <TextBlock Text="{x:Static Properties:Resources.MainView_ShowQueue}" FontSize="28" VerticalAlignment="Center" FontFamily="Segoe UI Light" Margin="10,0,0,0" />
+ <TextBlock Text="{Binding JobsPending}" Grid.Column="1" Margin="15,0,0,5 " VerticalAlignment="Bottom" TextWrapping="WrapWithOverflow" TextTrimming="CharacterEllipsis" />
+
+ <Menu HorizontalAlignment="Right" Background="Transparent" VerticalAlignment="Bottom" Grid.Column="3" Margin="0,0,10,0" >
+ <MenuItem>
+ <MenuItem.Header>
+ <StackPanel Height="32" Orientation="Horizontal">
+ <Image Source="Images/Advanced.png" Width="20" Height="20" VerticalAlignment="Center" />
+ <TextBlock VerticalAlignment="Center"
+ Text="{x:Static Properties:Resources.QueueView_Options}" Margin="5,0,0,0" />
+ <Path Height="5"
+ Margin="2,2,0,0"
+ Data="M 0 0 L 4 4 L 8 0 Z"
+ Fill="{DynamicResource GlyphBrush}" />
+ </StackPanel>
+ </MenuItem.Header>
+ <MenuItem cal:Message.Attach="[Event Click] = [Action ResetFailed]" Header="{x:Static Properties:Resources.QueueView_ResetFailed}" />
+ <MenuItem cal:Message.Attach="[Event Click] = [Action ResetSelectedJobs]" Header="{x:Static Properties:Resources.QueueView_ResetSelectedJobs}" />
+ <MenuItem cal:Message.Attach="[Event Click] = [Action ResetAllJobs]" Header="{x:Static Properties:Resources.QueueView_ResetAllJobs}" />
+ <Separator />
+ <MenuItem cal:Message.Attach="[Event Click] = [Action ClearCompleted]" Header="{x:Static Properties:Resources.QueueView_ClearCompleted}" />
+ <MenuItem cal:Message.Attach="[Event Click] = [Action Clear]" Header="{x:Static Properties:Resources.QueueView_ClearAll}" />
+ <MenuItem cal:Message.Attach="[Event Click] = [Action RemoveSelectedJobs]" Header="{x:Static Properties:Resources.QueueView_ClearSelected}" />
+ <Separator />
+ <!--<MenuItem cal:Message.Attach="[Event Click] = [Action Import]" Header="{x:Static Properties:Resources.QueueView_Import}" />-->
+ <MenuItem cal:Message.Attach="[Event Click] = [Action Export]" Header="{x:Static Properties:Resources.QueueView_Export}" />
+ </MenuItem>
+ </Menu>
+
+ </Grid>
+
+ <Grid Grid.Row="2" Margin="0,15,0,0">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="3*" MaxWidth="600" x:Name="leftTabPanel" />
+ <ColumnDefinition Width="5*" x:Name="rightTabPanel" />
+ </Grid.ColumnDefinitions>
+
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid Grid.Row="0" HorizontalAlignment="Stretch" Margin="10,0,5,5">
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <Button Name="Start" AutomationProperties.Name="Start Queue" cal:Message.Attach="[Event Click] = [Action StartQueue]" Grid.Column="0"
+ IsEnabled="{Binding IsQueueRunning, Converter={StaticResource notBooleanConverter}}"
+ Visibility="{Binding IsQueueRunning, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}">
<StackPanel Orientation="Horizontal">
- <Image Width="32"
- Height="32"
- Source="Images/Play.png" />
- <Label Margin="8,0,0,0"
- VerticalAlignment="Center"
- Content="{x:Static Properties:Resources.QueueView_Start}" />
+ <Image Width="16" Height="16" Margin="2,0,0,0" Source="Images/Play.png" />
+ <Label Margin="5,0,5,0" VerticalAlignment="Center" Content="{x:Static Properties:Resources.QueueView_Start}" />
</StackPanel>
</Button>
- <Button Name="Pause" DockPanel.Dock="Left" AutomationProperties.Name="Pause Queue"
- cal:Message.Attach="[Event Click] = [Action PauseQueueToolbar]"
- Visibility="{Binding IsQueueRunning,
- Converter={StaticResource boolToVisConverter},
- ConverterParameter=false}">
+ <Button Name="Pause" AutomationProperties.Name="Pause Queue" cal:Message.Attach="[Event Click] = [Action PauseQueueToolbar]" Grid.Column="1"
+ Visibility="{Binding IsQueueRunning, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}">
<StackPanel Orientation="Horizontal">
- <Image Width="32"
- Height="32"
- Source="Images/Pause.png" />
- <Label Margin="8,0,0,0"
- VerticalAlignment="Center"
- Content="{x:Static Properties:Resources.QueueView_Pause}" />
+ <Image Width="16" Height="16" Margin="2,0,0,0" Source="Images/Pause.png" />
+ <Label Margin="5,0,0,0" VerticalAlignment="Center" Content="{x:Static Properties:Resources.QueueView_Pause}" />
</StackPanel>
</Button>
- <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" HorizontalAlignment="Right">
- <Menu HorizontalAlignment="Right" VerticalAlignment="Center" Background="Transparent"
- AutomationProperties.Name="{x:Static Properties:Resources.QueueView_WhenDone}">
- <MenuItem>
- <MenuItem.Header>
- <StackPanel Height="32" Orientation="Horizontal">
- <TextBlock VerticalAlignment="Center"
- FontWeight="Bold"
- Text="{x:Static Properties:Resources.QueueView_WhenDone}" />
- <Label Margin="8,0,0,0"
- VerticalAlignment="Center"
- Content="{Binding WhenDoneAction}" />
- <Path Height="5"
- Margin="2,2,2,0"
- Data="M 0 0 L 4 4 L 8 0 Z"
- Fill="{DynamicResource GlyphBrush}" />
- </StackPanel>
- </MenuItem.Header>
-
- <MenuItem x:Name="doNothing"
- cal:Message.Attach="[Event Click] = [Action WhenDone(doNothing.Header)]"
- Header="{x:Static Properties:Resources.QueueView_DoNothing}" />
- <MenuItem x:Name="shutdown"
- cal:Message.Attach="[Event Click] = [Action WhenDone(shutdown.Header)]"
- Header="{x:Static Properties:Resources.QueueView_Shutdown}" />
- <MenuItem x:Name="suspend"
- cal:Message.Attach="[Event Click] = [Action WhenDone(suspend.Header)]"
- Header="{x:Static Properties:Resources.QueueView_Suspend}" />
- <MenuItem x:Name="hibernate"
- cal:Message.Attach="[Event Click] = [Action WhenDone(hibernate.Header)]"
- Header="{x:Static Properties:Resources.QueueView_Hibernate}"/>
- <MenuItem x:Name="lock"
- cal:Message.Attach="[Event Click] = [Action WhenDone(lock.Header)]"
- Header="{x:Static Properties:Resources.QueueView_LockSystem}" />
- <MenuItem x:Name="logoff"
- cal:Message.Attach="[Event Click] = [Action WhenDone(logoff.Header)]"
- Header="{x:Static Properties:Resources.QueueView_Logoff}"/>
- <MenuItem x:Name="quit"
- cal:Message.Attach="[Event Click] = [Action WhenDone(quit.Header)]"
- Header="{x:Static Properties:Resources.QueueView_QuitHandBrake}"/>
- </MenuItem>
- </Menu>
-
- <Menu HorizontalAlignment="Right" Background="Transparent" VerticalAlignment="Center">
- <MenuItem>
- <MenuItem.Header>
- <StackPanel Height="32" Orientation="Horizontal">
- <Image Source="Images\Advanced.png" Width="20" Height="20" VerticalAlignment="Center" />
- <TextBlock VerticalAlignment="Center"
- Text="{x:Static Properties:Resources.QueueView_Options}" Margin="5,0,0,0" />
- <Path Height="5"
- Margin="2,2,2,0"
- Data="M 0 0 L 4 4 L 8 0 Z"
- Fill="{DynamicResource GlyphBrush}" />
- </StackPanel>
- </MenuItem.Header>
- <MenuItem cal:Message.Attach="[Event Click] = [Action ResetFailed]" Header="{x:Static Properties:Resources.QueueView_ResetFailed}" />
- <MenuItem cal:Message.Attach="[Event Click] = [Action ResetAllJobs]" Header="{x:Static Properties:Resources.QueueView_ResetAllJobs}" />
- <Separator />
- <MenuItem cal:Message.Attach="[Event Click] = [Action ClearCompleted]" Header="{x:Static Properties:Resources.QueueView_ClearCompleted}" />
- <MenuItem cal:Message.Attach="[Event Click] = [Action Clear]" Header="{x:Static Properties:Resources.QueueView_ClearQueue}" />
- <Separator />
- <MenuItem cal:Message.Attach="[Event Click] = [Action Export]" Header="{x:Static Properties:Resources.QueueView_Export}" />
- </MenuItem>
- </Menu>
+ <StackPanel Grid.Row="0" Grid.Column="3" Orientation="Horizontal">
+ <Button Content="^" Width="20" Height="20" Margin="0" cal:Message.Attach="[Event Click] = [Action MoveUp]" />
+ <Button Content="v" Width="20" Height="20" Margin="5,0,0,0" cal:Message.Attach="[Event Click] = [Action MoveDown]" />
</StackPanel>
+ </Grid>
+
+ <ListBox Tag="{Binding}" x:Name="queueJobs" Grid.Row="1" Margin="10,0,5,0"
+
+ dd:DragDrop.DropHandler="{Binding}"
+ dd:DragDrop.IsDragSource="True"
+ dd:DragDrop.IsDropTarget="True"
+ ItemsSource="{Binding QueueTasks, Mode=OneWay}"
+ helpers:ListBoxHelper.SelectedItems="{Binding SelectedItems}"
+ SelectedItem="{Binding SelectedTask}"
+ SelectionMode="Extended"
+ BorderThickness="1"
+ ScrollViewer.HorizontalScrollBarVisibility="Disabled" >
+
+ <i:Interaction.Triggers>
+ <commands:InputBindingTrigger>
+ <commands:InputBindingTrigger.InputBinding>
+ <KeyBinding Key="Delete"/>
+ </commands:InputBindingTrigger.InputBinding>
+ <cal:ActionMessage MethodName="RemoveSelectedJobs" />
+ </commands:InputBindingTrigger>
+ </i:Interaction.Triggers>
+
+ <ListBox.ContextMenu>
+ <ContextMenu cal:Action.TargetWithoutContext="{Binding Path=PlacementTarget.Tag, RelativeSource={RelativeSource Self}}" Opened="ContextMenu_OnOpened">
+ <MenuItem cal:Message.Attach="[Event Click] = [Action StartQueue]" Header="{x:Static Properties:Resources.QueueView_Start}" />
+ <MenuItem cal:Message.Attach="[Event Click] = [Action PauseQueue]" Header="{x:Static Properties:Resources.QueueView_Pause}" />
+ <Separator />
+ <MenuItem cal:Message.Attach="[Event Click] = [Action ResetFailed]" Header="{x:Static Properties:Resources.QueueView_ResetFailed}" />
+ <MenuItem cal:Message.Attach="[Event Click] = [Action ResetSelectedJobs]" Header="{x:Static Properties:Resources.QueueView_ResetSelectedJobs}" />
+ <MenuItem cal:Message.Attach="[Event Click] = [Action ResetAllJobs]" Header="{x:Static Properties:Resources.QueueView_ResetAllJobs}" />
+ <Separator />
+ <MenuItem cal:Message.Attach="[Event Click] = [Action ClearCompleted]" Header="{x:Static Properties:Resources.QueueView_ClearCompleted}" />
+ <MenuItem cal:Message.Attach="[Event Click] = [Action Clear]" Header="{x:Static Properties:Resources.QueueView_ClearAll}" />
+ <MenuItem cal:Message.Attach="[Event Click] = [Action RemoveSelectedJobs]" Header="{x:Static Properties:Resources.QueueView_ClearSelected}" />
+ <Separator />
+ <MenuItem Header="{x:Static Properties:Resources.QueueView_OpenSourceDir}" x:Name="openSourceDir" Click="OpenSourceDir_OnClick" />
+ <MenuItem Header="{x:Static Properties:Resources.QueueView_OpenDestDir}" x:Name="openDestDir" Click="OpenDestDir_OnClick" />
+ <Separator />
+ <MenuItem cal:Message.Attach="[Event Click] = [Action Export]" Header="{x:Static Properties:Resources.QueueView_Export}" />
+ </ContextMenu>
+ </ListBox.ContextMenu>
+
+ <ListBox.ItemContainerStyle>
+ <Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
+ <Setter Property="HorizontalContentAlignment" Value="Stretch" />
+ <Setter Property="Margin" Value="0,0,0,1" />
+ </Style>
+ </ListBox.ItemContainerStyle>
+
+ <ListBox.ItemTemplate>
+ <DataTemplate x:Name="QueueItemTemplate">
+
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="40" />
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
- </DockPanel>
- </ToolBar>
-
- <StackPanel Grid.Row="1" Margin="10,20,10,0">
- <TextBlock Text="{Binding JobsPending}" TextWrapping="WrapWithOverflow" TextTrimming="CharacterEllipsis" />
- <TextBlock Text="{Binding JobStatus}" Visibility="{Binding IsJobStatusVisible, Converter={StaticResource boolToVisConverter}}" TextWrapping="WrapWithOverflow" TextTrimming="CharacterEllipsis"/>
- </StackPanel>
-
- <ListBox Grid.Row="2" Tag="{Binding}" x:Name="queueJobs"
- Margin="10,20,10,10"
- dd:DragDrop.DropHandler="{Binding}"
- dd:DragDrop.IsDragSource="True"
- dd:DragDrop.IsDropTarget="True"
- ItemsSource="{Binding QueueTasks, Mode=OneWay}"
- helpers:ListBoxHelper.SelectedItems="{Binding SelectedItems}"
- SelectedItem="{Binding SelectedTask}"
- SelectionMode="Extended"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled">
-
- <i:Interaction.Triggers>
- <commands:InputBindingTrigger>
- <commands:InputBindingTrigger.InputBinding>
- <KeyBinding Key="Delete"/>
- </commands:InputBindingTrigger.InputBinding>
- <cal:ActionMessage MethodName="RemoveSelectedJobs" />
- </commands:InputBindingTrigger>
- </i:Interaction.Triggers>
-
- <ListBox.ContextMenu>
- <ContextMenu cal:Action.TargetWithoutContext="{Binding Path=PlacementTarget.Tag, RelativeSource={RelativeSource Self}}" Opened="ContextMenu_OnOpened">
- <MenuItem cal:Message.Attach="[Event Click] = [Action StartQueue]" Header="{x:Static Properties:Resources.QueueView_Start}" />
- <MenuItem cal:Message.Attach="[Event Click] = [Action PauseQueue]" Header="{x:Static Properties:Resources.QueueView_Pause}" />
- <Separator />
- <MenuItem cal:Message.Attach="[Event Click] = [Action ResetFailed]" Header="{x:Static Properties:Resources.QueueView_ResetFailed}" />
- <MenuItem cal:Message.Attach="[Event Click] = [Action ResetSelectedJobs]" Header="{x:Static Properties:Resources.QueueView_ResetSelectedJobs}" />
- <MenuItem cal:Message.Attach="[Event Click] = [Action ResetAllJobs]" Header="{x:Static Properties:Resources.QueueView_ResetAllJobs}" />
- <Separator />
- <MenuItem cal:Message.Attach="[Event Click] = [Action ClearCompleted]" Header="{x:Static Properties:Resources.QueueView_ClearCompleted}" />
- <MenuItem cal:Message.Attach="[Event Click] = [Action Clear]" Header="{x:Static Properties:Resources.QueueView_ClearAll}" />
- <MenuItem cal:Message.Attach="[Event Click] = [Action RemoveSelectedJobs]" Header="{x:Static Properties:Resources.QueueView_ClearSelected}" />
- <Separator />
- <MenuItem Header="{x:Static Properties:Resources.QueueView_OpenSourceDir}" x:Name="openSourceDir" Click="OpenSourceDir_OnClick" />
- <MenuItem Header="{x:Static Properties:Resources.QueueView_OpenDestDir}" x:Name="openDestDir" Click="OpenDestDir_OnClick" />
- <Separator />
- <MenuItem cal:Message.Attach="[Event Click] = [Action Export]" Header="{x:Static Properties:Resources.QueueView_Export}" />
- </ContextMenu>
- </ListBox.ContextMenu>
-
- <ListBox.ItemContainerStyle>
- <Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}">
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="Margin" Value="0,0,0,1" />
- <Setter Property="ToolTip">
- <Setter.Value>
- <Grid MaxWidth="650" Margin="0,5,0,5" Style="{StaticResource LongToolTipHolder}">
- <Grid.Resources>
- <Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
- <Setter Property="Margin" Value="0,5,0,5" />
+ <!-- Marker -->
+ <Image Grid.Column="0" Width="16" Height="16" SnapsToDevicePixels="True">
+
+ <Image.LayoutTransform>
+ <RotateTransform CenterX="8" CenterY="8" Angle="0"/>
+ </Image.LayoutTransform>
+
+ <Image.Style>
+ <Style TargetType="{x:Type Image}">
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="Waiting">
+ <Setter Property="Source" Value="Images\Movies.png" />
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="In Progress">
+ <Setter Property="Source" Value="Images\Working0.png" />
+ <DataTrigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Duration="0:0:2" To="180" Storyboard.TargetProperty="(Image.LayoutTransform).(RotateTransform.Angle)" RepeatBehavior="Forever" />
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.EnterActions>
+ <DataTrigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Duration="0:0:0" To="0" Storyboard.TargetProperty="(Image.LayoutTransform).(RotateTransform.Angle)"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.ExitActions>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="Completed">
+ <Setter Property="Source" Value="Images\Complete.png" />
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="Error">
+ <Setter Property="Source" Value="Images\WarningSmall.png" />
+ </DataTrigger>
+ </Style.Triggers>
</Style>
- </Grid.Resources>
+ </Image.Style>
+ </Image>
+ <!-- Settings -->
+ <Grid Grid.Column="1" Margin="0,3,15,3">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
- <ColumnDefinition Width="95" />
+ <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
- <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Source}" VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" />
- <TextBlock Text="{Binding Task.Source}" TextWrapping="Wrap" Grid.Row="0" Grid.Column="1" />
+ <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="2">
+ <TextBlock FontWeight="Bold" Text="Title: " />
+ <TextBlock Text="{Binding Task.Title}" />
- <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Destination}" VerticalAlignment="Top" Grid.Row="1" Grid.Column="0" />
- <TextBlock Text="{Binding Task.Destination}" TextWrapping="Wrap" Grid.Row="1" Grid.Column="1" />
-
- <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_PictureSettings}" VerticalAlignment="Top" Grid.Row="2" Grid.Column="0" />
- <TextBlock Text="{Binding Task, Converter={StaticResource pictureSettingsDescConverter}}" TextWrapping="Wrap" Grid.Row="2" Grid.Column="1" />
-
- <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Video}" Grid.Row="3" Grid.Column="0" />
- <TextBlock Text="{Binding Task, Converter={StaticResource videoOptionsTooltipConverter}}" Grid.Row="3" Grid.Column="1" TextWrapping="Wrap" />
-
- <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Audio}" Grid.Row="4" Grid.Column="0"/>
- <TextBlock Text="{Binding Task.AudioTracks, Converter={StaticResource audioTrackDisplayConverter}}"
- Grid.Row="4" Grid.Column="1"/>
-
- <TextBlock FontWeight="Bold" VerticalAlignment="Top" Text="{x:Static Properties:Resources.QueueView_Subtitles}" Grid.Row="5" Grid.Column="0" />
- <TextBlock Text="{Binding Task.SubtitleTracks, Converter={StaticResource subtitleTrackDisplayConverter}}"
- Grid.Row="5" Grid.Column="1" />
-
- <TextBlock FontWeight="Bold" VerticalAlignment="Top" Grid.Row="6" Grid.Column="0" Text="{x:Static Properties:Resources.QueueView_Advanced}" />
- <TextBlock Text="{Binding Task, Converter={StaticResource encoderOptionsTooltipConverter}}" Grid.Row="6" Grid.Column="1" TextWrapping="Wrap" />
- </Grid>
-
- </Setter.Value>
- </Setter>
-
- </Style>
- </ListBox.ItemContainerStyle>
-
- <ListBox.ItemTemplate>
- <DataTemplate x:Name="QueueItemTemplate">
-
- <Grid HorizontalAlignment="Stretch">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="40" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
-
- <!-- Marker -->
- <Image Grid.Column="0" Width="16" Height="16" SnapsToDevicePixels="True">
-
- <Image.LayoutTransform>
- <RotateTransform CenterX="8" CenterY="8" Angle="0"/>
- </Image.LayoutTransform>
-
- <Image.Style>
- <Style TargetType="{x:Type Image}">
- <Style.Triggers>
- <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="Waiting">
- <Setter Property="Source" Value="Images\Movies.png" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="In Progress">
- <Setter Property="Source" Value="Images\Working0.png" />
- <DataTrigger.EnterActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Duration="0:0:2" To="180" Storyboard.TargetProperty="(Image.LayoutTransform).(RotateTransform.Angle)" RepeatBehavior="Forever" />
- </Storyboard>
- </BeginStoryboard>
- </DataTrigger.EnterActions>
- <DataTrigger.ExitActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Duration="0:0:0" To="0" Storyboard.TargetProperty="(Image.LayoutTransform).(RotateTransform.Angle)"/>
- </Storyboard>
- </BeginStoryboard>
- </DataTrigger.ExitActions>
- </DataTrigger>
- <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="Completed">
- <Setter Property="Source" Value="Images\Complete.png" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Status, Converter={StaticResource enumComboConverter}}" Value="Error">
- <Setter Property="Source" Value="Images\WarningSmall.png" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Image.Style>
- </Image>
-
- <!-- Settings -->
- <Grid Grid.Column="1" Margin="0,3,15,3">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
-
- <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="2">
- <TextBlock FontWeight="Bold" Text="Title: " />
- <TextBlock Text="{Binding Task.Title}" />
-
- <TextBlock Text="{Binding Task.PointToPointMode}" Margin="10,0,0,0" FontWeight="Bold" />
- <TextBlock Text=": " />
- <TextBlock Text="{Binding Task.StartPoint}" />
- <TextBlock Margin="5,0,5,0" Text="to" />
- <TextBlock Text="{Binding Task.EndPoint}" />
- </StackPanel>
+ <TextBlock Text="{Binding Task.PointToPointMode}" Margin="10,0,0,0" FontWeight="Bold" />
+ <TextBlock Text=": " />
+ <TextBlock Text="{Binding Task.StartPoint}" />
+ <TextBlock Margin="5,0,5,0" Text="to" />
+ <TextBlock Text="{Binding Task.EndPoint}" />
+ </StackPanel>
- <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Source}" Grid.Row="1" />
- <TextBlock Text="{Binding Task.Source, Converter={StaticResource filePathToFilenameConverter}}" Margin="2,0,0,0" Grid.Row="1" Grid.Column="1"/>
- <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Destination}" Grid.Row="2" />
- <TextBlock Text="{Binding Task.Destination, Converter={StaticResource filePathToFilenameConverter}}" Margin="2,0,0,0" TextTrimming="CharacterEllipsis" Grid.Row="2" Grid.Column="1" />
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Source}" Grid.Row="1" />
+ <TextBlock Text="{Binding Task.Source, Converter={StaticResource filePathToFilenameConverter}}" Margin="2,0,0,0" Grid.Row="1" Grid.Column="1"/>
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Destination}" Grid.Row="2" />
+ <TextBlock Text="{Binding Task.Destination, Converter={StaticResource filePathToFilenameConverter}}" Margin="2,0,0,0" TextTrimming="CharacterEllipsis" Grid.Row="2" Grid.Column="1" />
- <ProgressBar Minimum="0" Height="4" Maximum="100" Name="pbStatus" Margin="0,2,5,0" Grid.Row="3" Grid.ColumnSpan="2"
+ <ProgressBar Minimum="0" Height="4" Maximum="100" Name="pbStatus" Margin="0,2,5,0" Grid.Row="3" Grid.ColumnSpan="2"
Value="{Binding DataContext.ProgressValue, ElementName=queueJobs}" IsIndeterminate="{Binding DataContext.IntermediateProgress, ElementName=queueJobs}"
Visibility="{Binding ShowEncodeProgress, Converter={StaticResource boolToVisConverter}}" />
+ </Grid>
</Grid>
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
- <!-- Delete -->
- <Grid Grid.Column="2"
- Margin="10,0,10,0"
- VerticalAlignment="Center">
-
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
+ <Border BorderThickness="1,0,1,1" BorderBrush="DarkGray" Grid.Row="2" Margin="10,0,5,10" SnapsToDevicePixels="True" >
+ <Menu HorizontalAlignment="Center" VerticalAlignment="Center" Background="Transparent"
+ AutomationProperties.Name="{x:Static Properties:Resources.QueueView_WhenDone}">
+ <MenuItem>
+ <MenuItem.Header>
+ <StackPanel Height="32" Orientation="Horizontal">
+ <TextBlock VerticalAlignment="Center"
+ FontWeight="Bold"
+ Text="{x:Static Properties:Resources.QueueView_WhenDone}" />
+ <Label Margin="8,0,0,0"
+ VerticalAlignment="Center"
+ Content="{Binding WhenDoneAction}" />
+ <Path Height="5"
+ Margin="2,2,2,0"
+ Data="M 0 0 L 4 4 L 8 0 Z"
+ Fill="{DynamicResource GlyphBrush}" />
+ </StackPanel>
+ </MenuItem.Header>
+
+ <MenuItem x:Name="doNothing"
+ cal:Message.Attach="[Event Click] = [Action WhenDone(doNothing.Header)]"
+ Header="{x:Static Properties:Resources.QueueView_DoNothing}" />
+ <MenuItem x:Name="shutdown"
+ cal:Message.Attach="[Event Click] = [Action WhenDone(shutdown.Header)]"
+ Header="{x:Static Properties:Resources.QueueView_Shutdown}" />
+ <MenuItem x:Name="suspend"
+ cal:Message.Attach="[Event Click] = [Action WhenDone(suspend.Header)]"
+ Header="{x:Static Properties:Resources.QueueView_Suspend}" />
+ <MenuItem x:Name="hibernate"
+ cal:Message.Attach="[Event Click] = [Action WhenDone(hibernate.Header)]"
+ Header="{x:Static Properties:Resources.QueueView_Hibernate}"/>
+ <MenuItem x:Name="lock"
+ cal:Message.Attach="[Event Click] = [Action WhenDone(lock.Header)]"
+ Header="{x:Static Properties:Resources.QueueView_LockSystem}" />
+ <MenuItem x:Name="logoff"
+ cal:Message.Attach="[Event Click] = [Action WhenDone(logoff.Header)]"
+ Header="{x:Static Properties:Resources.QueueView_Logoff}"/>
+ <MenuItem x:Name="quit"
+ cal:Message.Attach="[Event Click] = [Action WhenDone(quit.Header)]"
+ Header="{x:Static Properties:Resources.QueueView_QuitHandBrake}"/>
+ </MenuItem>
+ </Menu>
+ </Border>
+ </Grid>
+
+ <TabControl x:Name="summaryTabControl" Grid.Column="1" Margin="5,0,10,10" >
+ <TabItem Header="{x:Static Properties:Resources.QueueView_Summary}" >
+ <ScrollViewer VerticalScrollBarVisibility="Auto" Margin="5,5,0,5">
+
+ <StackPanel Orientation="Vertical" Margin="5,5,0,5">
+
+ <StackPanel Orientation="Horizontal" >
+
+ <StackPanel.Resources>
+ <Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
+ <Setter Property="Padding" Value="8,2" />
+ </Style>
+ </StackPanel.Resources>
- <Button Visibility="{Binding Status, Converter={StaticResource queueStatusVisConverter}}"
- AutomationProperties.Name="{x:Static Properties:Resources.QueueView_Retry}" ToolTip="{x:Static Properties:ResourcesTooltips.QueueView_ResetJobStatus}"
- Grid.Row="0" Grid.Column="0" Margin="0,5,0,0">
- <Button.Template>
- <ControlTemplate>
- <Image Width="20"
- Height="20" VerticalAlignment="Center"
+ <Button AutomationProperties.Name="{x:Static Properties:Resources.QueueView_Retry}" ToolTip="{x:Static Properties:ResourcesTooltips.QueueView_ResetJobStatus}">
+ <Button.Content>
+ <StackPanel Orientation="Horizontal">
+ <Image Width="20" Height="20" VerticalAlignment="Center" Margin="0,0,5,0"
Source="Images/Refresh.ico">
</Image>
- </ControlTemplate>
- </Button.Template>
+ <TextBlock Text="{x:Static Properties:Resources.QueueView_Retry}" />
+ </StackPanel>
+
+ </Button.Content>
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<cal:ActionMessage MethodName="RetryJob">
- <cal:Parameter Value="{Binding}" />
+ <cal:Parameter Value="{Binding SelectedTask}" />
</cal:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
- <Button Grid.Row="0" Grid.Column="1" Margin="10,5,0,0"
- AutomationProperties.Name="{x:Static Properties:Resources.QueueView_Edit}" ToolTip="{x:Static Properties:ResourcesTooltips.QueueView_SendJobBack}" >
- <Button.Template>
- <ControlTemplate>
- <Image Width="20"
- Height="20" VerticalAlignment="Center"
- Source="Images/Options24.png"
- ToolTip="{x:Static Properties:ResourcesTooltips.QueueView_SendJobBack}">
+ <Button Margin="10,0,0,0" AutomationProperties.Name="{x:Static Properties:Resources.QueueView_Edit}" ToolTip="{x:Static Properties:ResourcesTooltips.QueueView_SendJobBack}">
+ <Button.Content>
+ <StackPanel Orientation="Horizontal">
+ <Image Width="20" Margin="0,0,5,0" Height="20" VerticalAlignment="Center"
+ Source="Images/options24.png">
</Image>
- </ControlTemplate>
- </Button.Template>
+ <TextBlock Text="{x:Static Properties:Resources.QueueView_Edit}" />
+ </StackPanel>
+ </Button.Content>
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<cal:ActionMessage MethodName="EditJob">
- <cal:Parameter Value="{Binding}" />
+ <cal:Parameter Value="{Binding SelectedTask}" />
</cal:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
- <Button Grid.Row="0" Grid.Column="2" Margin="10,5,0,0"
- AutomationProperties.Name="{x:Static Properties:Resources.QueueView_Delete}" ToolTip="{x:Static Properties:ResourcesTooltips.QueueView_DeleteJob}">
- <Button.Template>
- <ControlTemplate>
- <Image Width="20"
- Height="20" VerticalAlignment="Center"
- Source="Images/delete.png"
- ToolTip="{x:Static Properties:ResourcesTooltips.QueueView_DeleteJob}">
+ <Button Margin="10,0,0,0" AutomationProperties.Name="{x:Static Properties:Resources.QueueView_Delete}" ToolTip="{x:Static Properties:ResourcesTooltips.QueueView_DeleteJob}">
+ <Button.Content>
+ <StackPanel Orientation="Horizontal">
+ <Image Width="20" Height="20" VerticalAlignment="Center" Margin="0,0,5,0"
+ Source="Images/delete.png">
</Image>
- </ControlTemplate>
- </Button.Template>
+ <TextBlock Text="{x:Static Properties:Resources.QueueView_Delete}" />
+ </StackPanel>
+ </Button.Content>
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<cal:ActionMessage MethodName="RemoveJob">
- <cal:Parameter Value="{Binding}" />
+ <cal:Parameter Value="{Binding SelectedTask}" />
</cal:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
+
+
+ <Button x:Name="queueOptionsDropButton" Margin="10,0,0,0" Click="QueueOptionsDropButton_OnClick"
+ AutomationProperties.Name="{x:Static Properties:Resources.QueueView_Actions}" IsEnabled="{Binding CanPerformActionOnSource}">
+ <Button.Content>
+ <StackPanel Orientation="Horizontal">
+ <Image Width="20" Height="20" VerticalAlignment="Center" Margin="0,0,5,0"
+ Source="Images/Advanced.png">
+ </Image>
+
+ <TextBlock Margin="0,0,5,0" Padding="0"
+ VerticalAlignment="Center"
+ Text="{x:Static Properties:Resources.QueueView_Actions}" />
+
+ <Path Height="5" Margin="2,2,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"
+ Data="M 0 0 L 4 4 L 8 0 Z"
+ Fill="{DynamicResource GlyphBrush}" x:Name="dropdownArrowPreset" />
+ </StackPanel>
+ </Button.Content>
+
+ <Button.ContextMenu>
+ <ContextMenu cal:Action.TargetWithoutContext="{Binding DataContext, RelativeSource={RelativeSource Self}}">
+ <MenuItem Header="{x:Static Properties:Resources.QueueView_PlayMediaFile}" cal:Message.Attach="[Event Click] = [Action PlayFile]" />
+ <Separator />
+ <MenuItem Header="{x:Static Properties:Resources.QueueView_OpenSourceDir}" cal:Message.Attach="[Event Click] = [Action OpenSourceDir]" />
+ <MenuItem Header="{x:Static Properties:Resources.QueueView_OpenDestDir}" cal:Message.Attach="[Event Click] = [Action OpenDestDir]" />
+ </ContextMenu>
+ </Button.ContextMenu>
+ </Button>
+ </StackPanel>
+
+ <TextBlock Text="{Binding JobStatus}" Visibility="{Binding IsJobStatusVisible, Converter={StaticResource boolToVisConverter}}"
+ Margin="0,15,10,5" TextWrapping="WrapWithOverflow" TextTrimming="CharacterEllipsis" />
+
+ <Grid Style="{StaticResource LongToolTipHolder}" Margin="0,10,0,0" >
+ <Grid.Resources>
+ <Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
+ <Setter Property="Margin" Value="0,5,0,5" />
+ </Style>
+ </Grid.Resources>
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" MinWidth="100" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Source}" VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" />
+ <TextBlock Text="{Binding SelectedTask.Task.Source}" TextWrapping="Wrap" Grid.Row="0" Grid.Column="1" />
+
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Destination}" VerticalAlignment="Top" Grid.Row="1" Grid.Column="0" />
+ <TextBlock Text="{Binding SelectedTask.Task.Destination}" TextWrapping="Wrap" Grid.Row="1" Grid.Column="1" />
+
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_PictureSettings}" VerticalAlignment="Top" Grid.Row="2" Grid.Column="0" />
+ <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource pictureSettingsDescConverter}}" TextWrapping="Wrap" Grid.Row="2" Grid.Column="1" />
+
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Video}" Grid.Row="3" Grid.Column="0" />
+ <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource videoOptionsTooltipConverter}}" Grid.Row="3" Grid.Column="1" TextWrapping="Wrap" />
+
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Audio}" Grid.Row="4" Grid.Column="0"/>
+ <TextBlock Text="{Binding SelectedTask.Task.AudioTracks, Converter={StaticResource audioTrackDisplayConverter}}"
+ Grid.Row="4" Grid.Column="1"/>
+
+ <TextBlock FontWeight="Bold" VerticalAlignment="Top" Text="{x:Static Properties:Resources.QueueView_Subtitles}" Grid.Row="5" Grid.Column="0" />
+ <TextBlock Text="{Binding SelectedTask.Task.SubtitleTracks, Converter={StaticResource subtitleTrackDisplayConverter}}"
+ Grid.Row="5" Grid.Column="1" />
+
+ <TextBlock FontWeight="Bold" VerticalAlignment="Top" Grid.Row="6" Grid.Column="0" Text="{x:Static Properties:Resources.QueueView_Advanced}" />
+ <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource encoderOptionsTooltipConverter}}" Grid.Row="6" Grid.Column="1" TextWrapping="Wrap" />
+ </Grid>
+
+ </StackPanel>
+ </ScrollViewer>
+ </TabItem>
+
+ <TabItem Header="{x:Static Properties:Resources.QueueView_Statistics}" >
+ <ScrollViewer VerticalScrollBarVisibility="Auto" Margin="10,0,0,5">
+ <StackPanel>
+ <TextBlock Text="{x:Static Properties:Resources.QueueView_StatsNotAvailableYet}" Margin="0,10,0,0" Visibility="{Binding StatsVisible, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}" />
+
+ <Grid Style="{StaticResource LongToolTipHolder}" Margin="0,5,0,0" Visibility="{Binding StatsVisible, Converter={StaticResource boolToVisConverter}}">
+ <Grid.Resources>
+ <Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
+ <Setter Property="Margin" Value="0,5,0,5" />
+ </Style>
+ </Grid.Resources>
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" MinWidth="100" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_StartTime}" VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" />
+ <TextBlock Text="{Binding SelectedTask.Statistics.StartTime}" TextWrapping="Wrap" Grid.Row="0" Grid.Column="1" />
+
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_EndTime}" VerticalAlignment="Top" Grid.Row="1" Grid.Column="0" />
+ <TextBlock Text="{Binding SelectedTask.Statistics.EndTime}" TextWrapping="Wrap" Grid.Row="1" Grid.Column="1" />
+
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_PausedDuration}" VerticalAlignment="Top" Grid.Row="2" Grid.Column="0" />
+ <TextBlock Text="{Binding SelectedTask.Statistics.PausedDuration,StringFormat=hh\\:mm\\:ss}" TextWrapping="Wrap" Grid.Row="2" Grid.Column="1" />
+
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Duration}" VerticalAlignment="Top" Grid.Row="3" Grid.Column="0" />
+ <TextBlock Text="{Binding SelectedTask.Statistics.Duration,StringFormat=hh\\:mm\\:ss}" TextWrapping="Wrap" Grid.Row="3" Grid.Column="1" />
+
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_FileSize}" VerticalAlignment="Top" Grid.Row="4" Grid.Column="0" />
+ <StackPanel Orientation="Horizontal" Grid.Row="4" Grid.Column="1" >
+ <TextBlock Text="{Binding SelectedTask.Statistics.FinalFileSizeInMegaBytes}" TextWrapping="Wrap" />
+ <TextBlock Text=" MB" />
+ </StackPanel>
+
</Grid>
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
+ </StackPanel>
+ </ScrollViewer>
+ </TabItem>
+
+ <TabItem Header="{x:Static Properties:Resources.MainView_ActivityLog}">
+ <TextBox ScrollViewer.VerticalScrollBarVisibility="Visible" Text="{Binding ActivityLog, Mode=OneWay}" TextWrapping="Wrap" x:Name="logText">
+ <TextBox.ContextMenu>
+ <ContextMenu>
+ <MenuItem Header="{x:Static Properties:Resources.LogView_CopyClipboard}" cal:Message.Attach="[Event Click] = [Action CopyLog]" >
+ <MenuItem.Icon>
+ <Image Width="16" Source="../Images/copy.png" />
+ </MenuItem.Icon>
+ </MenuItem>
+ <MenuItem Header="{x:Static Properties:Resources.LogView_OpenLogDir}" cal:Message.Attach="[Event Click] = [Action OpenLogDirectory]">
+ <MenuItem.Icon>
+ <Image Width="16" Source="../Images/folder.png" />
+ </MenuItem.Icon>
+ </MenuItem>
+ </ContextMenu>
+ </TextBox.ContextMenu>
+ </TextBox>
+ </TabItem>
+ </TabControl>
</Grid>
</Grid>
diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs b/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs index a04a6c77a..53b4256aa 100644 --- a/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs @@ -1,9 +1,9 @@ // --------------------------------------------------------------------------------------------------------------------
-// <copyright file="QueueView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
+// <copyright file="QueueTwoView.xaml.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>
-// Interaction logic for VideoView.xaml
+// Interaction logic for QueueTwoView.xaml
// </summary>
// --------------------------------------------------------------------------------------------------------------------
@@ -25,13 +25,24 @@ namespace HandBrakeWPF.Views private QueueTask mouseActiveQueueTask;
/// <summary>
- /// Initializes a new instance of the <see cref="QueueView"/> class.
+ /// Initializes a new instance of the <see cref="QueueTwoContent"/> class.
/// </summary>
public QueueView()
{
this.InitializeComponent();
+ this.SizeChanged += this.Queue2View_SizeChanged;
}
+ private void Queue2View_SizeChanged(object sender, SizeChangedEventArgs e)
+ {
+ // Make the view adaptive.
+ if (e.WidthChanged)
+ {
+ this.summaryTabControl.Visibility = this.ActualWidth < 600 ? Visibility.Collapsed : Visibility.Visible;
+ this.leftTabPanel.Width = this.ActualWidth < 600 ? new GridLength(this.ActualWidth - 10, GridUnitType.Star) : new GridLength(3, GridUnitType.Star);
+ this.leftTabPanel.MaxWidth = this.ActualWidth < 600 ? 650 : 400;
+ }
+ }
private void ContextMenu_OnOpened(object sender, RoutedEventArgs e)
{
ContextMenu menu = sender as ContextMenu;
@@ -82,5 +93,16 @@ namespace HandBrakeWPF.Views {
((QueueViewModel)this.DataContext).OpenDestinationDirectory(this.mouseActiveQueueTask);
}
+
+ private void QueueOptionsDropButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ var button = sender as FrameworkElement;
+ if (button != null && button.ContextMenu != null)
+ {
+ button.ContextMenu.PlacementTarget = button;
+ button.ContextMenu.Placement = System.Windows.Controls.Primitives.PlacementMode.Bottom;
+ button.ContextMenu.IsOpen = true;
+ }
+ }
}
}
diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml index acdd5de52..4667abb27 100644 --- a/win/CS/HandBrakeWPF/defaultsettings.xml +++ b/win/CS/HandBrakeWPF/defaultsettings.xml @@ -521,12 +521,4 @@ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
</value>
</item>
- <item>
- <key>
- <string>ShowExperimentalQueue</string>
- </key>
- <value>
- <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">true</anyType>
- </value>
- </item>
</dictionary>
\ No newline at end of file |