mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
Add system plugin descriptions.
This commit is contained in:
@@ -160,7 +160,7 @@ namespace Wox.Plugin.SystemPlugins.CMD
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return base.Description; }
|
||||
get { return "Provide executing commands from Wox. Commands should start with >"; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,10 @@ namespace Wox.Plugin.SystemPlugins
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return base.Description; }
|
||||
get
|
||||
{
|
||||
return "Provide mathematical calculations.(Try 5*3-2 in Wox)";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Wox.Plugin.SystemPlugins
|
||||
{
|
||||
public sealed class ColorsPlugin : BaseSystemPlugin
|
||||
{
|
||||
private const string DIR_PATH = ".\\Plugins\\Colors\\";
|
||||
private string DIR_PATH = Path.Combine(Path.GetTempPath(), @"Plugins\Colors\");
|
||||
private const int IMG_SIZE = 32;
|
||||
|
||||
private DirectoryInfo ColorsDirectory { get; set; }
|
||||
@@ -82,7 +82,7 @@ namespace Wox.Plugin.SystemPlugins
|
||||
return ColorsDirectory.GetFiles(file, SearchOption.TopDirectoryOnly);
|
||||
}
|
||||
|
||||
public string CreateImage(string name)
|
||||
private string CreateImage(string name)
|
||||
{
|
||||
using (var bitmap = new Bitmap(IMG_SIZE, IMG_SIZE))
|
||||
using (var graphics = Graphics.FromImage(bitmap))
|
||||
@@ -108,7 +108,10 @@ namespace Wox.Plugin.SystemPlugins
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return string.Empty; }
|
||||
get
|
||||
{
|
||||
return "Provide hex color preview.(Try #000 in Wox)";
|
||||
}
|
||||
}
|
||||
|
||||
public override string IcoPath
|
||||
|
||||
@@ -7,17 +7,23 @@ using System.Windows.Forms;
|
||||
using Wox.Infrastructure;
|
||||
using Wox.Infrastructure.Storage.UserSettings;
|
||||
|
||||
namespace Wox.Plugin.SystemPlugins.FileSystem {
|
||||
namespace Wox.Plugin.SystemPlugins.Folder {
|
||||
|
||||
public class FileSystemPlugin : BaseSystemPlugin, ISettingProvider {
|
||||
public class FolderPlugin : BaseSystemPlugin, ISettingProvider {
|
||||
|
||||
#region Properties
|
||||
|
||||
private PluginInitContext context;
|
||||
private static List<string> driverNames = null;
|
||||
private static Dictionary<string, DirectoryInfo[]> parentDirectories = new Dictionary<string, DirectoryInfo[]>();
|
||||
public override string Description { get { return base.Description; } }
|
||||
public override string Name { get { return "File System"; } }
|
||||
public override string Description {
|
||||
get
|
||||
{
|
||||
return "Provide opening folder from wox directorily. You can add your favorite folders.";
|
||||
}
|
||||
}
|
||||
|
||||
public override string Name { get { return "Folder"; } }
|
||||
public override string IcoPath { get { return @"Images\folder.png"; } }
|
||||
|
||||
#endregion Properties
|
||||
@@ -1,4 +1,4 @@
|
||||
<UserControl x:Class="Wox.Plugin.SystemPlugins.FileSystem.FileSystemSettings"
|
||||
<UserControl x:Class="Wox.Plugin.SystemPlugins.Folder.FileSystemSettings"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
@@ -1,18 +1,18 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using Wox.Infrastructure.Storage.UserSettings;
|
||||
|
||||
namespace Wox.Plugin.SystemPlugins.FileSystem {
|
||||
namespace Wox.Plugin.SystemPlugins.Folder {
|
||||
|
||||
/// <summary>
|
||||
/// Interaction logic for FileSystemSettings.xaml
|
||||
/// </summary>
|
||||
public partial class FileSystemSettings : UserControl {
|
||||
public FileSystemSettings() {
|
||||
InitializeComponent();
|
||||
lbxFolders.ItemsSource = Wox.Infrastructure.Storage.UserSettings.UserSettingStorage.Instance.FolderLinks;
|
||||
lbxFolders.ItemsSource = UserSettingStorage.Instance.FolderLinks;
|
||||
}
|
||||
|
||||
private void btnDelete_Click(object sender, RoutedEventArgs e) {
|
||||
@@ -55,7 +55,7 @@ namespace Wox.Plugin.SystemPlugins.FileSystem {
|
||||
private void btnAdd_Click(object sender, RoutedEventArgs e) {
|
||||
var folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog();
|
||||
if (folderBrowserDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
|
||||
var newFolder = new Wox.Infrastructure.Storage.UserSettings.FolderLink() {
|
||||
var newFolder = new FolderLink() {
|
||||
Path = folderBrowserDialog.SelectedPath
|
||||
};
|
||||
|
||||
@@ -147,12 +147,12 @@ namespace Wox.Plugin.SystemPlugins.Program
|
||||
|
||||
public override string IcoPath
|
||||
{
|
||||
get { return @"Images\app.png"; }
|
||||
get { return @"Images\program.png"; }
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return base.Description; }
|
||||
get { return "Provide searching programs in your computer."; }
|
||||
}
|
||||
|
||||
#region ISettingProvider Members
|
||||
|
||||
@@ -130,7 +130,7 @@ namespace Wox.Plugin.SystemPlugins
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return base.Description; }
|
||||
get { return "Provide System related commands. e.g. shutdown,lock,setting etc."; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,17 +63,17 @@ namespace Wox.Plugin.SystemPlugins
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get { return "Plugins"; }
|
||||
get { return "Third-party Plugin Indicator"; }
|
||||
}
|
||||
|
||||
public override string IcoPath
|
||||
{
|
||||
get { return @"Images\work.png"; }
|
||||
get { return @"Images\list.png"; }
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return base.Description; }
|
||||
get { return "Provide Third-party plugin actionword suggeestion."; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Wox.Plugin.SystemPlugins
|
||||
}
|
||||
|
||||
public override string Name { get { return "URL handler"; } }
|
||||
public override string Description { get { return "Open the typed URL..."; } }
|
||||
public override string Description { get { return "Provide Opening the typed URL from Wox."; } }
|
||||
public override string IcoPath { get { return "Images/url2.png"; } }
|
||||
|
||||
protected override void InitInternal(PluginInitContext context)
|
||||
|
||||
@@ -88,12 +88,12 @@ namespace Wox.Plugin.SystemPlugins
|
||||
|
||||
public override string IcoPath
|
||||
{
|
||||
get { return @"Images\app.png"; }
|
||||
get { return @"Images\web_search.png"; }
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return base.Description; }
|
||||
get { return "Provide the web search ability."; }
|
||||
}
|
||||
|
||||
#region ISettingProvider Members
|
||||
|
||||
@@ -1,16 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using Wox.Infrastructure.Storage.UserSettings;
|
||||
|
||||
namespace Wox.Plugin.SystemPlugins
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="CMD\CMDStorage.cs" />
|
||||
<Compile Include="ColorsPlugin.cs" />
|
||||
<Compile Include="FileSystem\FileSystemSettings.xaml.cs">
|
||||
<DependentUpon>FileSystemSettings.xaml</DependentUpon>
|
||||
<Compile Include="Folder\FolderPluginSettings.xaml.cs">
|
||||
<DependentUpon>FolderPluginSettings.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program\ProgramSetting.xaml.cs">
|
||||
<DependentUpon>ProgramSetting.xaml</DependentUpon>
|
||||
@@ -79,7 +79,7 @@
|
||||
</Compile>
|
||||
<Compile Include="WebSearch\WebSearchPlugin.cs" />
|
||||
<Compile Include="CMD\CMD.cs" />
|
||||
<Compile Include="FileSystem\FileSystemPlugin.cs" />
|
||||
<Compile Include="Folder\FolderPlugin.cs" />
|
||||
<Compile Include="ISystemPlugin.cs" />
|
||||
<Compile Include="Program\Programs.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
@@ -102,7 +102,7 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="FileSystem\FileSystemSettings.xaml">
|
||||
<Page Include="Folder\FolderPluginSettings.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
|
||||
Reference in New Issue
Block a user