mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-13 19:19:23 +08:00
Working on Adding CheckBox
This commit is contained in:
parent
cefa8326e3
commit
d748e34d7e
@ -1,50 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wox.Plugin.SystemPlugins {
|
||||
|
||||
public abstract class BaseSystemPlugin : ISystemPlugin {
|
||||
public string PluginDirectory { get; set; }
|
||||
public virtual string Name { get { return "System workflow"; } }
|
||||
public virtual string Description { get { return "System workflow"; } }
|
||||
public virtual string IcoPath { get { return null; } }
|
||||
|
||||
namespace Wox.Plugin.SystemPlugins
|
||||
{
|
||||
public abstract class BaseSystemPlugin :ISystemPlugin
|
||||
{
|
||||
protected abstract List<Result> QueryInternal(Query query);
|
||||
|
||||
protected abstract void InitInternal(PluginInitContext context);
|
||||
|
||||
public List<Result> Query(Query query)
|
||||
{
|
||||
public List<Result> Query(Query query) {
|
||||
if (string.IsNullOrEmpty(query.RawQuery)) return new List<Result>();
|
||||
return QueryInternal(query);
|
||||
}
|
||||
|
||||
public void Init(PluginInitContext context)
|
||||
{
|
||||
public void Init(PluginInitContext context) {
|
||||
InitInternal(context);
|
||||
}
|
||||
|
||||
public virtual string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "System workflow";
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return "System workflow";
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string IcoPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public string PluginDirectory { get; set; }
|
||||
}
|
||||
}
|
@ -50,7 +50,9 @@
|
||||
<DataTemplate DataType="{x:Type system:BaseSystemPlugin}">
|
||||
<Grid Height="36" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="32"></ColumnDefinition>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="5"></ColumnDefinition>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Width="32" Height="32" HorizontalAlignment="Left">
|
||||
@ -71,6 +73,7 @@
|
||||
<TextBlock VerticalAlignment="Center" ToolTip="{Binding Name}" x:Name="tbTitle" Text="{Binding Name}"></TextBlock>
|
||||
<TextBlock ToolTip="{Binding Description}" Visibility="{Binding Description, Converter={wox: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}">
|
||||
|
Loading…
Reference in New Issue
Block a user