diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r-- | win/CS/HandBrakeWPF/Views/AboutView.xaml | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/AddPresetView.xaml | 80 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/AddPresetView.xaml.cs | 4 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/LogView.xaml | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml | 9 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/OptionsView.xaml | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/PreviewView.xaml | 7 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/PreviewView.xaml.cs | 4 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/QueueView.xaml | 94 |
9 files changed, 180 insertions, 24 deletions
diff --git a/win/CS/HandBrakeWPF/Views/AboutView.xaml b/win/CS/HandBrakeWPF/Views/AboutView.xaml index 1a86c7a76..b764d13bc 100644 --- a/win/CS/HandBrakeWPF/Views/AboutView.xaml +++ b/win/CS/HandBrakeWPF/Views/AboutView.xaml @@ -1,6 +1,6 @@ <Window x:Class="HandBrakeWPF.Views.AboutView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro" Title="AboutView"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro" Title="{Binding Title}"
Height="320" Width="600">
<Grid>
diff --git a/win/CS/HandBrakeWPF/Views/AddPresetView.xaml b/win/CS/HandBrakeWPF/Views/AddPresetView.xaml index 74d79f0c8..97d3974b7 100644 --- a/win/CS/HandBrakeWPF/Views/AddPresetView.xaml +++ b/win/CS/HandBrakeWPF/Views/AddPresetView.xaml @@ -1,11 +1,79 @@ -<UserControl x:Class="HandBrakeWPF.Views.AddPresetView"
+<Window x:Class="HandBrakeWPF.Views.AddPresetView"
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"
+ mc:Ignorable="d"
+ Title="{Binding Title}"
+ Width="350" Height="310">
+
+ <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="#FFF1F0EF">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <!-- Header -->
+ <StackPanel Orientation="Horizontal" Grid.Row="0" Background="White" Height="30" Margin="0,0,0,10" >
+ <Image Source="Images/Add16.png" Margin="10,0,5,0" Width="16" Height="16" VerticalAlignment="Center" />
+ <StackPanel Orientation="Vertical" VerticalAlignment="Center">
+ <TextBlock Text="Add a Preset" FontWeight="Bold" />
+ </StackPanel>
+ </StackPanel>
+
+ <Grid Margin="10,0,10,0" Grid.Row="1">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="100" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <!-- Name -->
+ <TextBlock Text="Preset Name:" Grid.Row="0" Grid.Column="0" />
+ <TextBox Width="150" Text="{Binding Preset.Name}" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left"/>
+
+ <!-- Settings -->
+ <TextBlock Text="Picture Settings:" FontWeight="Bold" Grid.Row="1" Grid.Column="0" Margin="0,20,0,0" />
+
+ <TextBlock Text="Use Picture Size:" Grid.Row="2" Grid.Column="0" />
+ <ComboBox Width="100" ItemsSource="{Binding PictureSettingModes}" SelectedItem="{Binding SelectedPictureMode}" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" />
+
+ <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Grid.Row="3" Grid.Column="1">
+ <TextBox Width="50" Text="{Binding CustomWidth}" />
+ <TextBlock Text="X" FontWeight="Bold" Margin="10,0,10,0" />
+ <TextBox Width="50" Text="{Binding CustomHeight}" />
+ </StackPanel>
+
+ <CheckBox Content="Use Picture Filters" IsChecked="{Binding Preset.UsePictureFilters}" Margin="0,10,0,0" Grid.Row="4" Grid.Column="1"/>
+
+ <!-- Description -->
+ <TextBlock Text="Description:" FontWeight="Bold" Grid.Row="5" Grid.Column="0" />
+ <TextBox Text="{Binding Preset.Description}" Grid.Row="6" Grid.ColumnSpan="2" HorizontalAlignment="Stretch"/>
+ </Grid>
+
+ <!-- Controls -->
+ <Grid Background="LightGray" Grid.Row="3" Margin="0,20,0,0">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <Button Content="Cancel" Padding="8,2" Margin="0,5,10,5" Grid.Column="1" cal:Message.Attach="[Event Click] = [Action Cancel]" />
+ <Button Content="Add" Padding="8,2" Margin="0,5,10,5" Grid.Column="2" cal:Message.Attach="[Event Click] = [Action Add]" />
+ </Grid>
+
</Grid>
-</UserControl>
+</Window>
diff --git a/win/CS/HandBrakeWPF/Views/AddPresetView.xaml.cs b/win/CS/HandBrakeWPF/Views/AddPresetView.xaml.cs index 9cb9e39e1..91968fdc0 100644 --- a/win/CS/HandBrakeWPF/Views/AddPresetView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/AddPresetView.xaml.cs @@ -9,12 +9,12 @@ namespace HandBrakeWPF.Views
{
- using System.Windows.Controls;
+ using System.Windows;
/// <summary>
/// Interaction logic for VideoView.xaml
/// </summary>
- public partial class AddPresetView : UserControl
+ public partial class AddPresetView : Window
{
/// <summary>
/// Initializes a new instance of the <see cref="AddPresetView"/> class.
diff --git a/win/CS/HandBrakeWPF/Views/LogView.xaml b/win/CS/HandBrakeWPF/Views/LogView.xaml index 908cee484..1d26ef28c 100644 --- a/win/CS/HandBrakeWPF/Views/LogView.xaml +++ b/win/CS/HandBrakeWPF/Views/LogView.xaml @@ -1,7 +1,7 @@ <Window x:Class="HandBrakeWPF.Views.LogView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- Title="LogView" Height="600" Width="420">
+ Title="{Binding Title}" Height="600" Width="420">
<Grid>
<Grid>
<Grid.RowDefinitions>
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index 483fbde1b..cd4e5ccc4 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -36,7 +36,7 @@ </MenuItem>
<MenuItem Header="Tools">
- <MenuItem Header="Show Queue" Micro:Message.Attach="[Event Click] = [Action ExitApplication]" />
+ <MenuItem Header="Show Queue" Micro:Message.Attach="[Event Click] = [Action OpenQueueWindow]" />
<MenuItem Header="Activity Window" Micro:Message.Attach="[Event Click] = [Action OpenLogWindow]" />
<Separator />
<MenuItem Header="Options" Micro:Message.Attach="[Event Click] = [Action OpenOptionsWindow]" />
@@ -98,14 +98,14 @@ </StackPanel>
</Button>
- <Button Name="AddToQueue">
+ <Button Name="AddToQueue" Micro:Message.Attach="[Event Click] = [Action AddToQueue]">
<StackPanel Orientation="Horizontal">
<Image Source="Images/AddToQueue.png" Height="32" Width="32" />
<Label Content="Add To Queue" Margin="8,0,0,0" VerticalAlignment="Center" />
</StackPanel>
</Button>
- <Button Name="ShowQueue">
+ <Button Name="ShowQueue" Micro:Message.Attach="[Event Click] = [Action OpenQueueWindow]">
<StackPanel Orientation="Horizontal">
<Image Source="Images/Queue.png" Height="32" Width="32" />
<Label Content="Show Queue" Margin="8,0,0,0" VerticalAlignment="Center" />
@@ -114,12 +114,13 @@ <Separator />
- <Button Name="Preview">
+ <Button Name="Preview" Micro:Message.Attach="[Event Click] = [Action OpenPreviewWindow]">
<StackPanel Orientation="Horizontal">
<Image Source="Images/window.png" Height="32" Width="32" />
<Label Content="Preview" Margin="8,0,0,0" VerticalAlignment="Center" />
</StackPanel>
</Button>
+
<Button Name="ActivityWindow" Micro:Message.Attach="[Event Click] = [Action OpenLogWindow]">
<StackPanel Orientation="Horizontal">
<Image Source="Images/ActivityWindow.png" Height="32" Width="32" />
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index 4976800f8..7b58e5511 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -1,7 +1,7 @@ <Window x:Class="HandBrakeWPF.Views.OptionsView"
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:Helpers="clr-namespace:HandBrakeWPF.Helpers" Title="OptionsView" MinWidth="620" MinHeight="550" Width="620" Height="550">
+ xmlns:Helpers="clr-namespace:HandBrakeWPF.Helpers" Title="{Binding Title}" MinWidth="620" MinHeight="550" Width="620" Height="550">
<Window.Resources>
<Style TargetType="Button">
diff --git a/win/CS/HandBrakeWPF/Views/PreviewView.xaml b/win/CS/HandBrakeWPF/Views/PreviewView.xaml index e3bd0be52..caf0aaca8 100644 --- a/win/CS/HandBrakeWPF/Views/PreviewView.xaml +++ b/win/CS/HandBrakeWPF/Views/PreviewView.xaml @@ -1,11 +1,12 @@ -<UserControl x:Class="HandBrakeWPF.Views.PreviewView"
+<Window x:Class="HandBrakeWPF.Views.PreviewView"
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">
+ Title="{Binding Title}"
+ Width="300" Height="300">
<Grid Background="Beige">
</Grid>
-</UserControl>
+</Window>
diff --git a/win/CS/HandBrakeWPF/Views/PreviewView.xaml.cs b/win/CS/HandBrakeWPF/Views/PreviewView.xaml.cs index e64f70411..a8203245a 100644 --- a/win/CS/HandBrakeWPF/Views/PreviewView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/PreviewView.xaml.cs @@ -9,12 +9,12 @@ namespace HandBrakeWPF.Views
{
- using System.Windows.Controls;
+ using System.Windows;
/// <summary>
/// Interaction logic for VideoView.xaml
/// </summary>
- public partial class PreviewView : UserControl
+ public partial class PreviewView : Window
{
/// <summary>
/// Initializes a new instance of the <see cref="PreviewView"/> class.
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>
|