mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 11:39:16 +08:00
Revert last two commits pushed by @aaroncampf, which will cause build erros.
This commit is contained in:
parent
6aed2ec311
commit
e1c7705182
@ -1,39 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wox.Plugin.SystemPlugins {
|
||||
namespace Wox.Plugin.SystemPlugins
|
||||
{
|
||||
|
||||
public abstract class BaseSystemPlugin : ISystemPlugin {
|
||||
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; } }
|
||||
public virtual bool Enabled { get; set; }
|
||||
|
||||
protected abstract List<Result> QueryInternal(Query query);
|
||||
|
||||
protected abstract void InitInternal(PluginInitContext context);
|
||||
|
||||
|
||||
|
||||
public List<Result> Query(Query query) {
|
||||
if (Enabled && string.IsNullOrEmpty(query.RawQuery)) {
|
||||
//if (string.IsNullOrEmpty(query.RawQuery)) return new List<Result>();
|
||||
public List<Result> Query(Query query)
|
||||
{
|
||||
if (string.IsNullOrEmpty(query.RawQuery)) return new List<Result>();
|
||||
return QueryInternal(query);
|
||||
}
|
||||
else {
|
||||
new List<Result>();
|
||||
}
|
||||
}
|
||||
|
||||
public void Init(PluginInitContext context) {
|
||||
public void Init(PluginInitContext context)
|
||||
{
|
||||
InitInternal(context);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Used to save settings
|
||||
/// </summary>
|
||||
public virtual string PluginId {
|
||||
get { return null; }
|
||||
}
|
||||
}
|
||||
}
|
@ -3,8 +3,10 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Wox.Plugin.SystemPlugins {
|
||||
public interface ISystemPlugin : IPlugin {
|
||||
namespace Wox.Plugin.SystemPlugins
|
||||
{
|
||||
public interface ISystemPlugin : IPlugin
|
||||
{
|
||||
string Name { get; }
|
||||
string Description { get; }
|
||||
}
|
||||
|
@ -1,13 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wox.Plugin {
|
||||
public interface IPlugin {
|
||||
namespace Wox.Plugin
|
||||
{
|
||||
public interface IPlugin
|
||||
{
|
||||
List<Result> Query(Query query);
|
||||
void Init(PluginInitContext context);
|
||||
|
||||
/// <summary>
|
||||
/// Used when saving Plug-in settings
|
||||
/// </summary>
|
||||
string PluginId { get; }
|
||||
}
|
||||
}
|
@ -74,7 +74,7 @@
|
||||
<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" IsChecked="{Binding Enabled}" />
|
||||
<CheckBox Content="Enabled" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type woxPlugin:PluginPair}">
|
||||
|
Loading…
Reference in New Issue
Block a user