summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-05-26 02:29:13 +0000
committersr55 <[email protected]>2012-05-26 02:29:13 +0000
commitcdcf2526b9b85befc27a29431f71c917b59a6f9d (patch)
treef0b370a5bd21a6fa29eade50396d7302d2bb6f30 /win/CS/HandBrakeWPF/Views
parent39c79db9e18a6e3c13c8d6818474e8fe74dba2cc (diff)
WinGui: Improvements and fixes to the Queue Window. Added WhenDone option. Fixed an issue where the progress counter would not display if you started an encode before opening the queue window.
Updated the Options Window to keep settings displayed up to date. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4698 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r--win/CS/HandBrakeWPF/Views/QueueView.xaml80
1 files changed, 57 insertions, 23 deletions
diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml b/win/CS/HandBrakeWPF/Views/QueueView.xaml
index 1c5d09861..affd2b959 100644
--- a/win/CS/HandBrakeWPF/Views/QueueView.xaml
+++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml
@@ -6,8 +6,7 @@
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"
- xmlns:Model="clr-namespace:HandBrake.ApplicationServices.Model;assembly=HandBrake.ApplicationServices"
- mc:Ignorable="d" Title="{Binding Title}"
+ xmlns:YourNamespace="clr-namespace:HandBrakeWPF.AttachedProperties" mc:Ignorable="d" Title="{Binding Title}"
Width="600" Height="400"
Background="#FFF0F0F0">
@@ -25,21 +24,56 @@
<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 Name="mainToolBar" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SnapsToDevicePixels="True">
+
+ <DockPanel Background="Transparent" Width="{Binding Path=ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type ToolBarPanel}}}">
+ <DockPanel.Resources>
+ <Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
+ <Style TargetType="{x:Type Menu}" BasedOn="{StaticResource {x:Static ToolBar.MenuStyleKey}}" />
+ </DockPanel.Resources>
+
+ <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>
+
+ <Menu Background="Transparent" HorizontalAlignment="Right">
+ <MenuItem>
+ <MenuItem.Header>
+ <StackPanel Orientation="Horizontal" Height="32">
+ <TextBlock FontWeight="Bold" Text="When Done: " VerticalAlignment="Center" />
+ <Label Content="{Binding WhenDoneAction}" Margin="8,0,0,0" VerticalAlignment="Center" />
+ <Path Fill="{DynamicResource GlyphBrush}" Data="M 0 0 L 4 4 L 8 0 Z" Height="5" Margin="2,2,2,0"/>
+ </StackPanel>
+ </MenuItem.Header>
+ <MenuItem Header="Do nothing" IsCheckable="True" YourNamespace:MenuItemExtensions.GroupName="whenDone"
+ cal:Message.Attach="[Event Click] = [Action WhenDone(doNothing.Header)]" x:Name="doNothing" />
+ <MenuItem Header="Shutdown" IsCheckable="True" YourNamespace:MenuItemExtensions.GroupName="whenDone"
+ cal:Message.Attach="[Event Click] = [Action WhenDone(shutdown.Header)]" x:Name="shutdown" />
+ <MenuItem Header="Suspend" IsCheckable="True" YourNamespace:MenuItemExtensions.GroupName="whenDone"
+ cal:Message.Attach="[Event Click] = [Action WhenDone(suspend.Header)]" x:Name="suspend" />
+ <MenuItem Header="Hibernate" IsCheckable="True" YourNamespace:MenuItemExtensions.GroupName="whenDone"
+ cal:Message.Attach="[Event Click] = [Action WhenDone(hibernate.Header)]" x:Name="hibernate" />
+ <MenuItem Header="Lock system" IsCheckable="True" YourNamespace:MenuItemExtensions.GroupName="whenDone"
+ cal:Message.Attach="[Event Click] = [Action WhenDone(lock.Header)]" x:Name="lock" />
+ <MenuItem Header="Log off" IsCheckable="True" YourNamespace:MenuItemExtensions.GroupName="whenDone"
+ cal:Message.Attach="[Event Click] = [Action WhenDone(logoff.Header)]" x:Name="logoff" />
+ <MenuItem Header="Quit HandBrake" IsCheckable="True" YourNamespace:MenuItemExtensions.GroupName="whenDone"
+ cal:Message.Attach="[Event Click] = [Action WhenDone(quit.Header)]" x:Name="quit" />
+ </MenuItem>
+ </Menu>
+ </DockPanel>
</ToolBar>
<StackPanel Grid.Row="1" Margin="10,20,10,20">
@@ -50,7 +84,7 @@
<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]" />
@@ -60,7 +94,7 @@
<MenuItem Header="Clear Completed" cal:Message.Attach="[Event Click] = [Action ClearCompleted]" />
</ContextMenu>
</ListBox.ContextMenu>
-
+
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
@@ -98,7 +132,7 @@
</DataTrigger>
</Style.Triggers>
</Style>
- </Image.Style>
+ </Image.Style>
</Image>
<!-- Settings -->
@@ -156,9 +190,9 @@
</Image>
</StackPanel>
</Grid>
-
-
-
+
+
+
</Grid>