Skip to content
代码片段 群组 项目
提交 b079e795 编辑于 作者: Paddy Xu's avatar Paddy Xu
浏览文件

read version

上级 187fe264
No related branches found
No related tags found
无相关合并请求
......@@ -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)
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册