mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-13 02:39:22 +08:00
#87 Add plugin deatails in Plugin tab. [WIP]
This commit is contained in:
parent
e1c7705182
commit
c8d865e26b
@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Security.RightsManagement;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Wox.Plugin
|
namespace Wox.Plugin
|
||||||
@ -26,6 +27,8 @@ namespace Wox.Plugin
|
|||||||
public string Language { get; set; }
|
public string Language { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
public string Website { get; set; }
|
||||||
|
|
||||||
public string ExecuteFilePath
|
public string ExecuteFilePath
|
||||||
{
|
{
|
||||||
get { return Path.Combine(PluginDirecotry, ExecuteFileName); }
|
get { return Path.Combine(PluginDirecotry, ExecuteFileName); }
|
||||||
|
@ -32,6 +32,7 @@ namespace Wox.PluginLoader {
|
|||||||
Name = "System Plugins",
|
Name = "System Plugins",
|
||||||
Author = "System",
|
Author = "System",
|
||||||
Description = "system plugins collection",
|
Description = "system plugins collection",
|
||||||
|
Website = "http://www.getwox.com",
|
||||||
Language = AllowedLanguage.CSharp,
|
Language = AllowedLanguage.CSharp,
|
||||||
Version = "1.0",
|
Version = "1.0",
|
||||||
PluginType = PluginType.System,
|
PluginType = PluginType.System,
|
||||||
|
@ -51,9 +51,7 @@
|
|||||||
<DataTemplate DataType="{x:Type system:BaseSystemPlugin}">
|
<DataTemplate DataType="{x:Type system:BaseSystemPlugin}">
|
||||||
<Grid Height="36" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3">
|
<Grid Height="36" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
<ColumnDefinition Width="32"></ColumnDefinition>
|
||||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
||||||
<ColumnDefinition Width="5"></ColumnDefinition>
|
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Width="32" Height="32" HorizontalAlignment="Left">
|
<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 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>
|
<TextBlock ToolTip="{Binding Description}" Visibility="{Binding Description, Converter={converters:StringNullOrEmptyToVisibilityConverter}}" Grid.Row="1" x:Name="tbSubTitle" Text="{Binding Description}" Opacity="0.5"></TextBlock>
|
||||||
</Grid>
|
</Grid>
|
||||||
<CheckBox Content="Enabled" />
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type woxPlugin:PluginPair}">
|
<DataTemplate DataType="{x:Type woxPlugin:PluginPair}">
|
||||||
@ -107,7 +104,7 @@
|
|||||||
</ListBox>
|
</ListBox>
|
||||||
<Grid Margin="0" Grid.Column="1">
|
<Grid Margin="0" Grid.Column="1">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="58"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<ContentControl x:Name="PluginInfoPanel" Grid.ColumnSpan="1" Grid.Row="0" Margin="10 10 10 0">
|
<ContentControl x:Name="PluginInfoPanel" Grid.ColumnSpan="1" Grid.Row="0" Margin="10 10 10 0">
|
||||||
@ -116,15 +113,24 @@
|
|||||||
<ColumnDefinition Width="48"></ColumnDefinition>
|
<ColumnDefinition Width="48"></ColumnDefinition>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</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 Margin="10,0,0,0" Grid.Column="1" HorizontalAlignment="Stretch">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition></RowDefinition>
|
<RowDefinition></RowDefinition>
|
||||||
<RowDefinition Height="Auto"></RowDefinition>
|
<RowDefinition></RowDefinition>
|
||||||
|
<RowDefinition></RowDefinition>
|
||||||
|
<RowDefinition></RowDefinition>
|
||||||
|
<RowDefinition></RowDefinition>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock VerticalAlignment="Center" x:Name="pluginTitle" ToolTip="{Binding Source=pluginTitle, Path=Text}" FontSize="24"></TextBlock>
|
<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="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 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>
|
</Grid>
|
||||||
</ContentControl>
|
</ContentControl>
|
||||||
|
|
||||||
|
@ -458,6 +458,9 @@ namespace Wox
|
|||||||
{
|
{
|
||||||
provider = pair.Plugin as ISettingProvider;
|
provider = pair.Plugin as ISettingProvider;
|
||||||
pluginTitle.Text = pair.Metadata.Name;
|
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;
|
pluginSubTitle.Text = pair.Metadata.Description;
|
||||||
SyntaxSugars.CallOrRescueDefault(
|
SyntaxSugars.CallOrRescueDefault(
|
||||||
() =>
|
() =>
|
||||||
@ -476,6 +479,9 @@ namespace Wox
|
|||||||
{
|
{
|
||||||
pluginTitle.Text = sys.Name;
|
pluginTitle.Text = sys.Name;
|
||||||
pluginSubTitle.Text = sys.Description;
|
pluginSubTitle.Text = sys.Description;
|
||||||
|
pluginAuthor.Text = "Author: Wox";
|
||||||
|
pluginActionKeyword.Text = "ActionKeyword: auto trigger";
|
||||||
|
pluginWebsite.Text = "Website: http://www.getwox.com";
|
||||||
SyntaxSugars.CallOrRescueDefault(
|
SyntaxSugars.CallOrRescueDefault(
|
||||||
() =>
|
() =>
|
||||||
pluginIcon.Source =
|
pluginIcon.Source =
|
||||||
|
Loading…
Reference in New Issue
Block a user