summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views/QueueView.xaml
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-12-27 18:41:31 +0000
committersr55 <[email protected]>2011-12-27 18:41:31 +0000
commit20fd52b888f111ac2d7670fa3c41e495661cdebd (patch)
tree9f8f53b17435ed3a8a14df338ec26410a3ecba75 /win/CS/HandBrakeWPF/Views/QueueView.xaml
parent015a2a45691dee523047f3b2a1a3628a2dd106f9 (diff)
WinGui: (WPF) Initial work to implement the "Queue" and "Add Preset" Windows. Additional setup work around the main window.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4389 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views/QueueView.xaml')
-rw-r--r--win/CS/HandBrakeWPF/Views/QueueView.xaml94
1 files changed, 90 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml b/win/CS/HandBrakeWPF/Views/QueueView.xaml
index 8007ae889..c37c88a6a 100644
--- a/win/CS/HandBrakeWPF/Views/QueueView.xaml
+++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml
@@ -2,10 +2,96 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300">
- <Grid Background="Beige">
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:cal="http://www.caliburnproject.org"
+ xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" mc:Ignorable="d" Title="{Binding Title}"
+ Width="600" Height="400"
+ Background="#FFF0F0F0">
+
+ <Window.Resources>
+ <Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
+ </Window.Resources>
+
+ <Grid >
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+ <ToolBar Name="mainToolBar" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SnapsToDevicePixels="False">
+
+ <Button Name="Start" cal:Message.Attach="[Event Click] = [Action StartEncode]" Visibility="{Binding IsEncoding, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}">
+ <StackPanel Orientation="Horizontal">
+ <Image Source="Images/Play.png" Height="32" Width="32" />
+ <Label Content="Start" Margin="8,0,0,0" VerticalAlignment="Center" />
+ </StackPanel>
+ </Button>
+
+ <Button Name="Pause" cal:Message.Attach="[Event Click] = [Action PauseEncode]" Visibility="{Binding IsEncoding, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}">
+ <StackPanel Orientation="Horizontal">
+ <Image Source="Images/Pause.png" Height="32" Width="32" />
+ <Label Content="Pause" Margin="8,0,0,0" VerticalAlignment="Center" />
+ </StackPanel>
+ </Button>
+ </ToolBar>
+
+ <StackPanel Grid.Row="1" Margin="10,20,10,20">
+ <TextBlock Text="{Binding JobsPending}" />
+ <TextBlock Text="{Binding JobStatus}" />
+ </StackPanel>
+
+ <ListBox Grid.Row="2" ItemsSource="{Binding QueueJobs}" SelectionMode="Extended" Background="LightGray" Margin="10,0,10,10">
+ <ListBox.ItemContainerStyle>
+ <Style TargetType="ListBoxItem">
+ <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
+ </Style>
+ </ListBox.ItemContainerStyle>
+ <ListBox.ItemTemplate>
+ <DataTemplate>
+
+ <Grid HorizontalAlignment="Stretch">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <!-- Marker -->
+ <Image Source="Images/Movies.png" Width="16" Height="16" Grid.Column="0" Margin="10,0,10,0" />
+
+ <!-- Settings -->
+ <StackPanel Grid.Column="1" HorizontalAlignment="Stretch">
+ <StackPanel Orientation="Horizontal">
+ <TextBlock Text="Source" FontWeight="Bold" />
+ <TextBlock Text="{Binding Source}"/>
+ </StackPanel>
+
+ <StackPanel Orientation="Horizontal">
+ <TextBlock Text="Destination" FontWeight="Bold" />
+ <TextBlock Text="{Binding Source}"/>
+ </StackPanel>
+ </StackPanel>
+
+ <!-- Delete -->
+ <Image Source="Images/delete.png" Width="16" Height="16" Grid.Column="2" Margin="10,0,10,0">
+ <i:Interaction.Triggers>
+ <i:EventTrigger EventName="MouseDown">
+ <cal:ActionMessage MethodName="RemoveJob">
+ <cal:Parameter Value="{Binding}" />
+ </cal:ActionMessage>
+ </i:EventTrigger>
+ </i:Interaction.Triggers>
+ </Image>
+
+ </Grid>
+
+
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
+
+
</Grid>
</Window>