diff options
author | sr55 <[email protected]> | 2015-04-20 20:54:35 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-04-20 20:54:35 +0000 |
commit | fae5fb8d9927d3814af84baa7bd3796a03211698 (patch) | |
tree | b1852d378dd1f0551bb371cbe07fa44d0411ecb1 /win | |
parent | 69a4cf5c8b880bd69be890a043dd3abae31b07bf (diff) |
WinGui: Minor design tweaks to the No Titles found dialog.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7109 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrakeWPF/Controls/AlertPanel.xaml | 4 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Controls/AlertPanel.xaml.cs | 131 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/Resources.Designer.cs | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/Resources.resx | 2 |
4 files changed, 135 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/Controls/AlertPanel.xaml b/win/CS/HandBrakeWPF/Controls/AlertPanel.xaml index 2960a7292..5e8b756ee 100644 --- a/win/CS/HandBrakeWPF/Controls/AlertPanel.xaml +++ b/win/CS/HandBrakeWPF/Controls/AlertPanel.xaml @@ -35,14 +35,14 @@ Text="{Binding Message, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
/>
- <TextBlock SnapsToDevicePixels="True" VerticalAlignment="Top" FontSize="12" FontFamily="Segoe UI Light" Margin="0,5" HorizontalAlignment="Left"
+ <TextBlock SnapsToDevicePixels="True" VerticalAlignment="Top" FontSize="14" FontFamily="Segoe UI Light" Margin="0,5" HorizontalAlignment="Left"
Text="{Binding SubMessage, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
TextWrapping="WrapWithOverflow"
/>
</StackPanel>
<Button Content="{Binding ActionText, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" Margin="0,10,0,0"
- x:Name="StatusActionButton" Click="StatusActionButton_OnClick" Padding="8,2" HorizontalAlignment="Right"
+ x:Name="StatusActionButton" Click="StatusActionButton_OnClick" Padding="8,2" HorizontalAlignment="Right" IsDefault="True"
Visibility="{Binding IsActionButtonVisible, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Converter={StaticResource boolTovisibility}}" />
</StackPanel>
diff --git a/win/CS/HandBrakeWPF/Controls/AlertPanel.xaml.cs b/win/CS/HandBrakeWPF/Controls/AlertPanel.xaml.cs new file mode 100644 index 000000000..8c2b39e03 --- /dev/null +++ b/win/CS/HandBrakeWPF/Controls/AlertPanel.xaml.cs @@ -0,0 +1,131 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="AlertPanel.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Interaction logic for AlertPanel.xaml
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Controls
+{
+ using System;
+ using System.Windows;
+ using System.Windows.Controls;
+
+ /// <summary>
+ /// Interaction logic for AlertPanel.xaml
+ /// </summary>
+ public partial class AlertPanel : UserControl
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="AlertPanel"/> class.
+ /// </summary>
+ public AlertPanel()
+ {
+ InitializeComponent();
+ this.Message = "Message";
+ }
+
+ /// <summary>
+ /// Dependancy Property for the Message Property
+ /// </summary>
+ public static readonly DependencyProperty MessageProperty =
+ DependencyProperty.Register("Message", typeof(string), typeof(AlertPanel), new UIPropertyMetadata("Loading..."));
+
+ /// <summary>
+ /// Dependancy Property for the submessage propery
+ /// </summary>
+ public static readonly DependencyProperty SubMessageProperty =
+ DependencyProperty.Register("SubMessage", typeof(string), typeof(AlertPanel), new FrameworkPropertyMetadata("Please Wait", FrameworkPropertyMetadataOptions.AffectsRender));
+
+ /// <summary>
+ /// Dependancy Property for the submessage propery
+ /// </summary>
+ public static readonly DependencyProperty DefaultActionProperty =
+ DependencyProperty.Register("DefaultAction", typeof(Action), typeof(AlertPanel), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.None, DefaultActionSet));
+
+ /// <summary>
+ /// Dependancy Property for the submessage propery
+ /// </summary>
+ public static readonly DependencyProperty ActionTextProperty =
+ DependencyProperty.Register("ActionText", typeof(string), typeof(AlertPanel), new UIPropertyMetadata("Cancel"));
+
+ /// <summary>
+ /// Gets or sets Message.
+ /// </summary>
+ public string Message
+ {
+ get { return (string)GetValue(MessageProperty); }
+ set { SetValue(MessageProperty, value); }
+ }
+
+ /// <summary>
+ /// Gets or sets SubMessage.
+ /// </summary>
+ public string SubMessage
+ {
+ get { return (string)GetValue(SubMessageProperty); }
+ set { SetValue(SubMessageProperty, value); }
+ }
+
+ /// <summary>
+ /// Gets or sets the cancel action.
+ /// </summary>
+ public Action DefaultAction
+ {
+ get { return (Action)GetValue(DefaultActionProperty); }
+ set { SetValue(DefaultActionProperty, value); }
+ }
+
+ /// <summary>
+ /// The on cancel action set.
+ /// </summary>
+ /// <param name="d">
+ /// The d.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private static void DefaultActionSet(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ }
+
+ /// <summary>
+ /// Gets or sets the action text.
+ /// </summary>
+ public string ActionText
+ {
+ get { return (string)GetValue(ActionTextProperty); }
+ set { SetValue(ActionTextProperty, value); }
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether is action button visible.
+ /// </summary>
+ public bool IsActionButtonVisible
+ {
+ get
+ {
+ return true; // this.CancelAction != null;
+ }
+ }
+
+ /// <summary>
+ /// The status action button_ on click.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void StatusActionButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ if (this.DefaultAction != null)
+ {
+ this.DefaultAction();
+ }
+ }
+ }
+}
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index 4d30f9191..3d98340ec 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -652,7 +652,7 @@ namespace HandBrakeWPF.Properties { /// Looks up a localized string similar to HandBrake will not be able to encode the seleteced source as it did not find a valid source with titles to encode.
///This could be due to one of the following reasons:
///- The source file is not a valid video file or is in a format that HandBrake does not support.
- ///- The source may be copy protected or include DRM. Please note that HandBrake is not a ripper.
+ ///- The source may be copy protected or include DRM. Please note that HandBrake does not support the removal of copy protections.
///
///The Activity log may have further information..
/// </summary>
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index c0cbc37b7..17eae8444 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -569,7 +569,7 @@ Foreign Audio Preferred, else First - If the foreign audio track exists, it will <value>HandBrake will not be able to encode the seleteced source as it did not find a valid source with titles to encode.
This could be due to one of the following reasons:
- The source file is not a valid video file or is in a format that HandBrake does not support.
-- The source may be copy protected or include DRM. Please note that HandBrake is not a ripper.
+- The source may be copy protected or include DRM. Please note that HandBrake does not support the removal of copy protections.
The Activity log may have further information.</value>
</data>
|