This commit is contained in:
qianlifeng 2014-06-04 16:47:39 +08:00
commit f6803a2c52
4 changed files with 27 additions and 11 deletions

View File

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.RightsManagement;
using System.Text;
namespace Wox.Plugin
@ -26,6 +27,8 @@ namespace Wox.Plugin
public string Language { get; set; }
public string Description { get; set; }
public string Website { get; set; }
public string ExecuteFilePath
{
get { return Path.Combine(PluginDirecotry, ExecuteFileName); }

View File

@ -32,6 +32,7 @@ namespace Wox.PluginLoader {
Name = "System Plugins",
Author = "System",
Description = "system plugins collection",
Website = "http://www.getwox.com",
Language = AllowedLanguage.CSharp,
Version = "1.0",
PluginType = PluginType.System,

View File

@ -51,9 +51,7 @@
<DataTemplate DataType="{x:Type system:BaseSystemPlugin}">
<Grid Height="36" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="5"></ColumnDefinition>
<ColumnDefinition Width="32"></ColumnDefinition>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Image Width="32" Height="32" HorizontalAlignment="Left">
@ -74,7 +72,6 @@
<TextBlock VerticalAlignment="Center" ToolTip="{Binding Name}" x:Name="tbTitle" Text="{Binding Name}"></TextBlock>
<TextBlock ToolTip="{Binding Description}" Visibility="{Binding Description, Converter={converters:StringNullOrEmptyToVisibilityConverter}}" Grid.Row="1" x:Name="tbSubTitle" Text="{Binding Description}" Opacity="0.5"></TextBlock>
</Grid>
<CheckBox Content="Enabled" />
</Grid>
</DataTemplate>
<DataTemplate DataType="{x:Type woxPlugin:PluginPair}">
@ -107,7 +104,7 @@
</ListBox>
<Grid Margin="0" Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="58"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<ContentControl x:Name="PluginInfoPanel" Grid.ColumnSpan="1" Grid.Row="0" Margin="10 10 10 0">
@ -116,15 +113,24 @@
<ColumnDefinition Width="48"></ColumnDefinition>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Image Width="48" Height="48" HorizontalAlignment="Left" x:Name="pluginIcon"/>
<Image Width="48" Height="48" HorizontalAlignment="Left" VerticalAlignment="Top" x:Name="pluginIcon"/>
<Grid Margin="10,0,0,0" Grid.Column="1" HorizontalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<TextBlock VerticalAlignment="Center" x:Name="pluginTitle" ToolTip="{Binding Source=pluginTitle, Path=Text}" FontSize="24"></TextBlock>
<TextBlock Grid.Row="1" x:Name="pluginSubTitle" Opacity="0.5" ToolTip="{Binding Source=pluginSubTitle, Path=Text}" Visibility="{Binding Source=pluginSubTitle, Path=Text, Converter={converters:StringNullOrEmptyToVisibilityConverter}}" ></TextBlock>
</Grid>
<TextBlock x:Name="pluginTitle" ToolTip="{Binding Source=pluginTitle, Path=Text}" FontSize="24"></TextBlock>
<TextBlock Grid.Row="1" x:Name="pluginSubTitle" Opacity="0.5" ToolTip="{Binding Source=pluginSubTitle, Path=Text}" Visibility="{Binding Source=pluginSubTitle, Path=Text, Converter={converters:StringNullOrEmptyToVisibilityConverter}}" ></TextBlock>
<TextBlock Grid.Row="2" Opacity="0.5" x:Name="pluginActionKeyword"></TextBlock>
<DockPanel Grid.Row="3">
<TextBlock Opacity="0.5" x:Name="pluginAuthor"></TextBlock>
<TextBlock Opacity="0.5" x:Name="pluginWebsite" HorizontalAlignment="Right"></TextBlock>
</DockPanel>
<CheckBox Grid.Row="4" x:Name="pluginEnabled">Enable</CheckBox>
</Grid>
</Grid>
</ContentControl>

View File

@ -458,6 +458,9 @@ namespace Wox
{
provider = pair.Plugin as ISettingProvider;
pluginTitle.Text = pair.Metadata.Name;
pluginActionKeyword.Text = "ActionKeyword: " + pair.Metadata.ActionKeyword;
pluginAuthor.Text = "Author: " + pair.Metadata.Author;
pluginWebsite.Text = "Website: " + pair.Metadata.Website;
pluginSubTitle.Text = pair.Metadata.Description;
SyntaxSugars.CallOrRescueDefault(
() =>
@ -476,6 +479,9 @@ namespace Wox
{
pluginTitle.Text = sys.Name;
pluginSubTitle.Text = sys.Description;
pluginAuthor.Text = "Author: Wox";
pluginActionKeyword.Text = "ActionKeyword: auto trigger";
pluginWebsite.Text = "Website: http://www.getwox.com";
SyntaxSugars.CallOrRescueDefault(
() =>
pluginIcon.Source =