diff options
author | sr55 <[email protected]> | 2012-03-23 20:00:02 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-03-23 20:00:02 +0000 |
commit | f5535905f9ff45c8c25389db9db42049407f8ad8 (patch) | |
tree | 76e786c1d6765c210f437f238c5d07ccf7cc2da7 /win/CS/HandBrakeWPF/Views | |
parent | 6758f8b30570df5e7d9fcc90e5f75f0aedcc6d5a (diff) |
WinGui: (WPF) Wired up the queue window and added missing functionality. Fixed issues on the main windows with regards to GUI widgets not updating during encoding.
WinGui: (WinForms): Added >=30fps options in framerate dropdown
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4526 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r-- | win/CS/HandBrakeWPF/Views/Images/Complete.png | bin | 0 -> 314 bytes | |||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/Images/Refresh.ico | bin | 0 -> 29926 bytes | |||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/Images/WarningSmall.png | bin | 0 -> 618 bytes | |||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/Images/Working0.png | bin | 0 -> 350 bytes | |||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml | 9 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/QueueView.xaml | 125 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/Styles/Styles.xaml | 18 |
7 files changed, 114 insertions, 38 deletions
diff --git a/win/CS/HandBrakeWPF/Views/Images/Complete.png b/win/CS/HandBrakeWPF/Views/Images/Complete.png Binary files differnew file mode 100644 index 000000000..503e52c8e --- /dev/null +++ b/win/CS/HandBrakeWPF/Views/Images/Complete.png diff --git a/win/CS/HandBrakeWPF/Views/Images/Refresh.ico b/win/CS/HandBrakeWPF/Views/Images/Refresh.ico Binary files differnew file mode 100644 index 000000000..3267a092a --- /dev/null +++ b/win/CS/HandBrakeWPF/Views/Images/Refresh.ico diff --git a/win/CS/HandBrakeWPF/Views/Images/WarningSmall.png b/win/CS/HandBrakeWPF/Views/Images/WarningSmall.png Binary files differnew file mode 100644 index 000000000..78f246f04 --- /dev/null +++ b/win/CS/HandBrakeWPF/Views/Images/WarningSmall.png diff --git a/win/CS/HandBrakeWPF/Views/Images/Working0.png b/win/CS/HandBrakeWPF/Views/Images/Working0.png Binary files differnew file mode 100644 index 000000000..200606b54 --- /dev/null +++ b/win/CS/HandBrakeWPF/Views/Images/Working0.png diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index e6a4e6997..4f243237f 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -16,7 +16,8 @@ </i:EventTrigger>
</i:Interaction.Triggers>
- <Window.Resources>
+ <Window.Resources>
+
<Style TargetType="Button">
<Setter Property="Foreground" Value="DarkOrange" />
<Setter Property="FontWeight" Value="Bold" />
@@ -94,7 +95,7 @@ </MenuItem>
<MenuItem Header="Help">
- <MenuItem Header="HandBrake User Guide" Micro:Message.Attach="[Event Click] = [Action LaunchHelp]" >
+ <MenuItem Header="HandBrake User Guide (HTTP)" Micro:Message.Attach="[Event Click] = [Action LaunchHelp]" >
<MenuItem.Icon>
<Image Source="Images/Help16.png" Width="16" />
</MenuItem.Icon>
@@ -345,8 +346,8 @@ </StackPanel>
<!-- Status Bar -->
- <StatusBar Grid.Row="6" Height="28" Grid.ColumnSpan="2" VerticalAlignment="Bottom">
- <Label Content="{Binding Path=ProgramStatusLabel}" FontSize="10" VerticalAlignment="Center" />
+ <StatusBar Padding="0" Margin="0" Grid.Row="6" Height="32" Grid.ColumnSpan="2" VerticalAlignment="Bottom" >
+ <Label Content="{Binding Path=StatusLabel}" FontSize="11" Padding="0,0,0,5" VerticalAlignment="Center" />
</StatusBar>
</StackPanel>
diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml b/win/CS/HandBrakeWPF/Views/QueueView.xaml index 982b8f1ec..1c5d09861 100644 --- a/win/CS/HandBrakeWPF/Views/QueueView.xaml +++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml @@ -5,13 +5,17 @@ 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"
- xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop" mc:Ignorable="d" Title="{Binding Title}"
+ xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
+ xmlns:Model="clr-namespace:HandBrake.ApplicationServices.Model;assembly=HandBrake.ApplicationServices"
+ mc:Ignorable="d" Title="{Binding Title}"
Width="600" Height="400"
Background="#FFF0F0F0">
<Window.Resources>
<Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
<Converters:FullPathToFileNameConverter x:Key="filePathToFilenameConverter" />
+ <Converters:EnumComboConverter x:Key="enumComboConverter" />
+ <Converters:QueueStatusToVisibilityConverter x:Key="queueStatusVisConverter" />
</Window.Resources>
<Grid >
@@ -46,6 +50,17 @@ <ListBox Grid.Row="2" ItemsSource="{Binding QueueJobs}" SelectionMode="Extended" Background="LightGray" Margin="10,0,10,10"
dd:DragDrop.IsDragSource="True" dd:DragDrop.IsDropTarget="True"
dd:DragDrop.DropHandler="{Binding}">
+
+ <ListBox.ContextMenu>
+ <ContextMenu>
+ <MenuItem Header="Import Queue" cal:Message.Attach="[Event Click] = [Action Import]" />
+ <MenuItem Header="Export Queue" cal:Message.Attach="[Event Click] = [Action Export]" />
+ <Separator />
+ <MenuItem Header="Clear" cal:Message.Attach="[Event Click] = [Action Clear]" />
+ <MenuItem Header="Clear Completed" cal:Message.Attach="[Event Click] = [Action ClearCompleted]" />
+ </ContextMenu>
+ </ListBox.ContextMenu>
+
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
@@ -65,43 +80,85 @@ </Grid.ColumnDefinitions>
<!-- Marker -->
- <Image Source="Images/Movies.png" Width="16" Height="16" Grid.Column="0" Margin="10,0,10,0" />
+ <Image Width="16" Height="16" Grid.Column="0" Margin="10,0,10,0" >
+ <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>
+ <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 -->
- <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="0,5,0,5">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Title: " FontWeight="Bold" />
- <TextBlock Text="{Binding Task.Title}"/>
-
- <TextBlock Text="{Binding Task.PointToPointMode}" FontWeight="Bold" Margin="10,0,0,0" />
- <TextBlock Text=": " />
- <TextBlock Text="{Binding Task.StartPoint}"/>
- <TextBlock Text="to" Margin="5,0,5,0" />
- <TextBlock Text="{Binding Task.EndPoint}"/>
- </StackPanel>
-
- <!-- TODO Support Drive Label Name-->
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Source: " FontWeight="Bold" />
- <TextBlock Text="{Binding Task.Source, Converter={StaticResource filePathToFilenameConverter}}"/>
- </StackPanel>
-
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Destination: " FontWeight="Bold" />
- <TextBlock Text="{Binding Task.Destination, Converter={StaticResource filePathToFilenameConverter}}"/>
- </StackPanel>
+ <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" Margin="0,5,0,5">
+ <StackPanel Orientation="Horizontal">
+ <TextBlock Text="Title: " FontWeight="Bold" />
+ <TextBlock Text="{Binding Task.Title}"/>
+
+ <TextBlock Text="{Binding Task.PointToPointMode}" FontWeight="Bold" Margin="10,0,0,0" />
+ <TextBlock Text=": " />
+ <TextBlock Text="{Binding Task.StartPoint}"/>
+ <TextBlock Text="to" Margin="5,0,5,0" />
+ <TextBlock Text="{Binding Task.EndPoint}"/>
+ </StackPanel>
+
+ <!-- TODO Support Drive Label Name-->
+ <StackPanel Orientation="Horizontal">
+ <TextBlock Text="Source: " FontWeight="Bold" />
+ <TextBlock Text="{Binding Task.Source, Converter={StaticResource filePathToFilenameConverter}}"/>
+ </StackPanel>
+
+ <StackPanel Orientation="Horizontal">
+ <TextBlock Text="Destination: " FontWeight="Bold" />
+ <TextBlock Text="{Binding Task.Destination, Converter={StaticResource filePathToFilenameConverter}}"/>
</StackPanel>
-
+
+ <StackPanel Orientation="Horizontal">
+ <TextBlock Text="Status: " FontWeight="Bold" />
+ <TextBlock Text="{Binding Status, Converter={StaticResource enumComboConverter}}"/>
+ </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 VerticalAlignment="Center" Grid.Column="2" Margin="10,0,10,0">
+ <StackPanel Orientation="Vertical">
+ <Image Source="Images/Refresh.ico" Width="20" Height="20" ToolTip="Reset job status to Waiting."
+ Visibility="{Binding Status, Converter={StaticResource queueStatusVisConverter}}" >
+ <i:Interaction.Triggers>
+ <i:EventTrigger EventName="MouseDown">
+ <cal:ActionMessage MethodName="RetryJob">
+ <cal:Parameter Value="{Binding}" />
+ </cal:ActionMessage>
+ </i:EventTrigger>
+ </i:Interaction.Triggers>
+ </Image>
+
+ <Image Source="Images/delete.png" Width="20" Height="20" Margin="0,5,0,0" ToolTip="Remove this Job">
+ <i:Interaction.Triggers>
+ <i:EventTrigger EventName="MouseDown">
+ <cal:ActionMessage MethodName="RemoveJob">
+ <cal:Parameter Value="{Binding}" />
+ </cal:ActionMessage>
+ </i:EventTrigger>
+ </i:Interaction.Triggers>
+ </Image>
+ </StackPanel>
+ </Grid>
+
+
+
</Grid>
diff --git a/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml b/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml new file mode 100644 index 000000000..ada586ec4 --- /dev/null +++ b/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml @@ -0,0 +1,18 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+
+ <Style x:Key="{x:Type StatusBar}" TargetType="{x:Type StatusBar}">
+ <Setter Property="SnapsToDevicePixels" Value="True"/>
+ <Setter Property="OverridesDefaultStyle" Value="true"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type StatusBar}">
+ <Border Background="#FAFAFA" Padding="1">
+ <ItemsPresenter Margin="0" />
+ </Border>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+</ResourceDictionary>
\ No newline at end of file |