mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-11 17:59:17 +00:00
read version
This commit is contained in:
@@ -22,21 +22,27 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="10" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="10" />
|
||||
<RowDefinition Height="5" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="5" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition Height="10" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="20" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock x:Name="filename" Grid.Row="1" Grid.Column="1" FontSize="19" Padding="3"
|
||||
TextWrapping="Wrap"
|
||||
LineHeight="25" MaxHeight="60" TextTrimming="CharacterEllipsis" FontWeight="SemiBold">
|
||||
QuickLook.Plugin.PluginInstaller
|
||||
</TextBlock>
|
||||
<TextBlock x:Name="description" Grid.Row="3" Grid.Column="1" Padding="3"
|
||||
<TextBlock x:Name="version" Grid.Row="3" Grid.Column="1" Padding="3"
|
||||
Foreground="{DynamicResource WindowTextForegroundAlternative}">
|
||||
Version 0
|
||||
</TextBlock>
|
||||
<TextBlock x:Name="description" Grid.Row="5" Grid.Column="1" Padding="3"
|
||||
Foreground="{DynamicResource WindowTextForegroundAlternative}">
|
||||
I am a potato.
|
||||
</TextBlock>
|
||||
<Button x:Name="btnInstall" Content="Click here to install this plugin." Grid.Column="1" Grid.Row="4"
|
||||
<Button x:Name="btnInstall" Content="Click here to install this plugin." Grid.Column="1" Grid.Row="6"
|
||||
|
||||
FontWeight="SemiBold" Foreground="{DynamicResource WindowTextForegroundAlternative}"
|
||||
Style="{StaticResource CaptionTextButtonStyle}" HorizontalAlignment="Right" Margin="0,0,20,0" />
|
||||
|
@@ -111,6 +111,7 @@ namespace QuickLook.Plugin.PluginInstaller
|
||||
var okay = _namespace != null && _namespace.StartsWith("QuickLook.Plugin.");
|
||||
|
||||
filename.Text = okay ? _namespace : "Invalid plugin.";
|
||||
version.Text = "Version " + GetString(xml, @"/Metadata/Version", "not defined");
|
||||
description.Text = GetString(xml, @"/Metadata/Description", string.Empty);
|
||||
|
||||
btnInstall.Visibility = okay ? Visibility.Visible : Visibility.Collapsed;
|
||||
@@ -120,7 +121,7 @@ namespace QuickLook.Plugin.PluginInstaller
|
||||
{
|
||||
var n = xml?.SelectSingleNode(xpath);
|
||||
|
||||
return n?.InnerText;
|
||||
return n?.InnerText ?? def;
|
||||
}
|
||||
|
||||
private static XmlDocument LoadXml(Stream data)
|
||||
|
Reference in New Issue
Block a user