mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
Add Feature Tab in Settings. (Still WIP)
This commit is contained in:
@@ -21,7 +21,7 @@ namespace Wox.Plugin.System
|
||||
InitInternal(context);
|
||||
}
|
||||
|
||||
public string Name
|
||||
public virtual string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -29,12 +29,22 @@ namespace Wox.Plugin.System
|
||||
}
|
||||
}
|
||||
|
||||
public string Description
|
||||
public virtual string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return "System workflow";
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string IcoPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public string PluginDirectory { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,6 +121,21 @@ namespace Wox.Plugin.System
|
||||
Regex reg = new Regex(@"(?i)\\[uU]([0-9a-f]{4})");
|
||||
return reg.Replace(dataStr, m => ((char)Convert.ToInt32(m.Groups[1].Value, 16)).ToString());
|
||||
}
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get { return "Bookmarks"; }
|
||||
}
|
||||
|
||||
public override string IcoPath
|
||||
{
|
||||
get { return @"Images\bookmark.png"; }
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return base.Description; }
|
||||
}
|
||||
}
|
||||
|
||||
public class Bookmark : IEquatable<Bookmark>, IEqualityComparer<Bookmark>
|
||||
|
||||
@@ -148,5 +148,19 @@ namespace Wox.Plugin.System.CMD
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get { return "Shell"; }
|
||||
}
|
||||
|
||||
public override string IcoPath
|
||||
{
|
||||
get { return @"Images\cmd.png"; }
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return base.Description; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +86,19 @@ namespace Wox.Plugin.System
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get { return "Calculator"; }
|
||||
}
|
||||
|
||||
public override string IcoPath
|
||||
{
|
||||
get { return @"Images\calculator.png"; }
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return base.Description; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,5 +157,19 @@ namespace Wox.Plugin.System
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get { return "File System"; }
|
||||
}
|
||||
|
||||
public override string IcoPath
|
||||
{
|
||||
get { return @"Images\folder.png"; }
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return base.Description; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,5 +145,21 @@ namespace Wox.Plugin.System
|
||||
if (p.Title.Contains("卸载") || p.Title.ToLower().Contains("uninstall"))
|
||||
p.Score -= 20;
|
||||
}
|
||||
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get { return "Programs"; }
|
||||
}
|
||||
|
||||
public override string IcoPath
|
||||
{
|
||||
get { return @"Images\app.png"; }
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return base.Description; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Wox.Plugin.System
|
||||
{
|
||||
public class Setting : BaseSystemPlugin
|
||||
{
|
||||
private PluginInitContext context;
|
||||
protected override List<Result> QueryInternal(Query query)
|
||||
{
|
||||
List<Result> results = new List<Result>();
|
||||
if ("setting".Contains(query.RawQuery.ToLower()))
|
||||
{
|
||||
results.Add(new Result()
|
||||
{
|
||||
Title = "Wox Setting",
|
||||
Score = 40,
|
||||
IcoPath = "Images/app.png",
|
||||
Action = (contenxt) =>
|
||||
{
|
||||
context.OpenSettingDialog();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
protected override void InitInternal(PluginInitContext context)
|
||||
{
|
||||
this.context = context;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,6 +85,34 @@ namespace Wox.Plugin.System
|
||||
return true;
|
||||
}
|
||||
});
|
||||
availableResults.Add(new Result
|
||||
{
|
||||
Title = "Setting",
|
||||
SubTitle = "Tweak this app",
|
||||
Score = 40,
|
||||
IcoPath = "Images\\app.png",
|
||||
Action = (c) =>
|
||||
{
|
||||
context.OpenSettingDialog();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get { return "System Commands"; }
|
||||
}
|
||||
|
||||
public override string IcoPath
|
||||
{
|
||||
get { return @"Images\lock.png"; }
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return base.Description; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,5 +62,19 @@ namespace Wox.Plugin.System
|
||||
}
|
||||
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get { return "Plugins"; }
|
||||
}
|
||||
|
||||
public override string IcoPath
|
||||
{
|
||||
get { return @"Images\work.png"; }
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return base.Description; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,5 +81,20 @@ namespace Wox.Plugin.System
|
||||
if (UserSettingStorage.Instance.WebSearches == null)
|
||||
UserSettingStorage.Instance.WebSearches = UserSettingStorage.Instance.LoadDefaultWebSearches();
|
||||
}
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get { return "Web Searches"; }
|
||||
}
|
||||
|
||||
public override string IcoPath
|
||||
{
|
||||
get { return @"Images\app.png"; }
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return base.Description; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@
|
||||
<Compile Include="ISystemPlugin.cs" />
|
||||
<Compile Include="Programs.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Setting.cs" />
|
||||
<Compile Include="Sys.cs" />
|
||||
<Compile Include="ThirdpartyPluginIndicator.cs" />
|
||||
<Compile Include="SuggestionSources\Google.cs" />
|
||||
|
||||
Reference in New Issue
Block a user