diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/Controls')
-rw-r--r-- | win/CS/HandBrakeWPF/Controls/SourceSelection.xaml | 18 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Controls/SourceSelection.xaml.cs | 6 |
2 files changed, 20 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml b/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml index 7069fde07..91528e23c 100644 --- a/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml +++ b/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml @@ -5,8 +5,7 @@ xmlns:controls="clr-namespace:HandBrakeWPF.Controls"
xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
xmlns:converters="clr-namespace:HandBrakeWPF.Converters"
- x:Name="sourcePanel"
- >
+ x:Name="sourcePanel">
<UserControl.Resources>
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
@@ -31,6 +30,7 @@ <RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
@@ -109,12 +109,22 @@ </ListBox.ItemTemplate>
</ListBox>
+ <StackPanel Grid.Row="7" Margin="20,10,0,10" Orientation="Horizontal" HorizontalAlignment="Stretch" Visibility="{Binding UpdateAvailable, Converter={StaticResource BooleanToVisibilityConverter}}">
+
+ <Image Source="../Views/Images/information.png" Width="24" />
+ <TextBlock HorizontalAlignment="Center" FontWeight="Bold" Margin="5,0,0,0">
+ <Hyperlink x:Name="UpdateAvailable" NavigateUri="/" RequestNavigate="UpdateAvailable_OnRequestNavigate">
+ <TextBlock Text="{x:Static Properties:Resources.SourceSelection_UpdateAvailable}" TextTrimming="CharacterEllipsis" />
+ </Hyperlink>
+ </TextBlock>
+ </StackPanel>
+
<!-- Cancel Window -->
- <StackPanel Grid.Row="7" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,2,10">
+ <StackPanel Grid.Row="8" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,2,10">
<Button cal:Message.Attach="[Event Click] = [Action CloseSourceSelection]" Content="Cancel" IsCancel="True" Padding="8,2" />
</StackPanel>
- <StackPanel Grid.Row="8" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,2,10">
+ <StackPanel Grid.Row="9" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,2,10">
<TextBlock>
<Hyperlink x:Name="Preferences" NavigateUri="/" RequestNavigate="OpenOptions_OnRequestNavigate" ><TextBlock Text="{x:Static Properties:Resources.Preferences}"/></Hyperlink>
</TextBlock>
diff --git a/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml.cs b/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml.cs index a6e07e7d1..21308d6ab 100644 --- a/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml.cs +++ b/win/CS/HandBrakeWPF/Controls/SourceSelection.xaml.cs @@ -71,5 +71,11 @@ namespace HandBrakeWPF.Controls {
Process.Start("https://handbrake.fr/docs");
}
+
+ private void UpdateAvailable_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
+ {
+ MainViewModel vm = this.DataContext as MainViewModel;
+ vm.CheckForUpdates();
+ }
}
}
|