diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r-- | win/CS/HandBrakeWPF/Views/AudioView.xaml | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml | 21 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml.cs | 30 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/QueueView.xaml | 44 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/SubtitlesView.xaml | 2 |
5 files changed, 52 insertions, 47 deletions
diff --git a/win/CS/HandBrakeWPF/Views/AudioView.xaml b/win/CS/HandBrakeWPF/Views/AudioView.xaml index 89093d2e2..c14d81b2d 100644 --- a/win/CS/HandBrakeWPF/Views/AudioView.xaml +++ b/win/CS/HandBrakeWPF/Views/AudioView.xaml @@ -29,6 +29,8 @@ <ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
+ <Setter Property="Background" Value="WhiteSmoke" />
+ <Setter Property="Margin" Value="0,0,0,1" />
</Style>
</ListBox.ItemContainerStyle>
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index a92948ce2..1ec10a830 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -3,7 +3,16 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Data="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
- Title="{Data:Binding Path=WindowTitle}" Height="655" Width="1015" FontSize="11" Background="#FFF0F0F0">
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" Title="{Data:Binding Path=WindowTitle}" Height="655" Width="1015" FontSize="11" Background="#FFF0F0F0"
+ AllowDrop="True">
+
+ <i:Interaction.Triggers>
+ <i:EventTrigger EventName="Drop">
+ <Micro:ActionMessage MethodName="FilesDroppedOnWindow">
+ <Micro:Parameter Value="$eventArgs"></Micro:Parameter>
+ </Micro:ActionMessage>
+ </i:EventTrigger>
+ </i:Interaction.Triggers>
<Window.Resources>
<Style TargetType="Button">
@@ -215,7 +224,15 @@ <StackPanel Margin="5,5,5,5" Orientation="Vertical">
<GroupBox Header="Presets" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<StackPanel Orientation="Vertical">
- <TreeView ItemsSource="{Binding Presets}" Width="240" Height="460" SelectedItemChanged="TreeView_SelectedItemChanged">
+ <TreeView ItemsSource="{Binding Presets}" Width="240" Height="460">
+
+ <i:Interaction.Triggers>
+ <i:EventTrigger EventName="SelectedItemChanged">
+ <Micro:ActionMessage MethodName="SetSelectedPreset">
+ <Micro:Parameter Value="$eventArgs"></Micro:Parameter>
+ </Micro:ActionMessage>
+ </i:EventTrigger>
+ </i:Interaction.Triggers>
</TreeView>
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml.cs b/win/CS/HandBrakeWPF/Views/MainView.xaml.cs index 347b83547..165e74923 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml.cs @@ -11,10 +11,6 @@ namespace HandBrakeWPF.Views {
using System.Windows;
- using HandBrake.ApplicationServices.Model;
-
- using HandBrakeWPF.ViewModels.Interfaces;
-
/// <summary>
/// Interaction logic for MainView.xaml
/// </summary>
@@ -27,31 +23,5 @@ namespace HandBrakeWPF.Views {
InitializeComponent();
}
-
- /// <summary>
- /// Gets ViewModel.
- /// </summary>
- private IMainViewModel ViewModel
- {
- get
- {
- return ((IMainViewModel)this.DataContext);
- }
- }
-
- /// <summary>
- /// Set the Selected Preset Property.
- /// The SelectedItem property of a treeview is readonly.
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The RoutedPropertyChangedEventArgs.
- /// </param>
- private void TreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
- {
- this.ViewModel.SelectedPreset = e.NewValue as Preset;
- }
}
}
diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml b/win/CS/HandBrakeWPF/Views/QueueView.xaml index c37c88a6a..658b3d0c1 100644 --- a/win/CS/HandBrakeWPF/Views/QueueView.xaml +++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml @@ -10,6 +10,7 @@ <Window.Resources>
<Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
+ <Converters:FullPathToFileNameConverter x:Key="filePathToFilenameConverter" />
</Window.Resources>
<Grid >
@@ -44,14 +45,16 @@ <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>
+ <Setter Property="HorizontalContentAlignment" Value="Stretch" />
+ <Setter Property="Background" Value="WhiteSmoke" />
+ <Setter Property="Margin" Value="0,0,0,1" />
</Style>
</ListBox.ItemContainerStyle>
-
+
<ListBox.ItemTemplate>
<DataTemplate>
- <Grid HorizontalAlignment="Stretch">
+ <Grid HorizontalAlignment="Stretch" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
@@ -62,18 +65,30 @@ <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 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>
- </StackPanel>
-
+
<!-- Delete -->
<Image Source="Images/delete.png" Width="16" Height="16" Grid.Column="2" Margin="10,0,10,0">
<i:Interaction.Triggers>
@@ -84,7 +99,6 @@ </i:EventTrigger>
</i:Interaction.Triggers>
</Image>
-
</Grid>
diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml index 0e302fd4c..1e49fc3c2 100644 --- a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml +++ b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml @@ -30,6 +30,8 @@ <ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
+ <Setter Property="Background" Value="WhiteSmoke" />
+ <Setter Property="Margin" Value="0,0,0,1" />
</Style>
</ListBox.ItemContainerStyle>
|