[PT Run] Service Plugin (#8076)

* PT Run service plugin

* icon, localization and fixes

* basic toast notification

* service start mode

* improved keys

* fixed setup

* improvements

* added _ keyword
* better shortcuts
* action for open services.msc

* pt run service plugin dll signing

* renamed Microsoft.Plugin.Service

* changed output dir

* set ! action keyword

* launcher dll

Co-authored-by: Clint Rutkas <clint@rutkas.com>
This commit is contained in:
Davide Giacometti
2021-01-06 11:40:07 +01:00
committed by GitHub
parent f0600f1725
commit 3a87c4909c
18 changed files with 1071 additions and 4 deletions

View File

@@ -0,0 +1,277 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Microsoft.PowerToys.Run.Plugin.Service.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.PowerToys.Run.Plugin.Service.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to Continue.
/// </summary>
internal static string wox_plugin_service_continue_pending {
get {
return ResourceManager.GetString("wox_plugin_service_continue_pending", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Open services (Ctrl+Shift+O).
/// </summary>
internal static string wox_plugin_service_open_services {
get {
return ResourceManager.GetString("wox_plugin_service_open_services", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Pausing.
/// </summary>
internal static string wox_plugin_service_pause_pending {
get {
return ResourceManager.GetString("wox_plugin_service_pause_pending", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Paused.
/// </summary>
internal static string wox_plugin_service_paused {
get {
return ResourceManager.GetString("wox_plugin_service_paused", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Manages Windows services.
/// </summary>
internal static string wox_plugin_service_plugin_description {
get {
return ResourceManager.GetString("wox_plugin_service_plugin_description", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Service.
/// </summary>
internal static string wox_plugin_service_plugin_name {
get {
return ResourceManager.GetString("wox_plugin_service_plugin_name", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Restart (Ctrl+Shift+R).
/// </summary>
internal static string wox_plugin_service_restart {
get {
return ResourceManager.GetString("wox_plugin_service_restart", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} has been restarted.
/// </summary>
internal static string wox_plugin_service_restarted_notification {
get {
return ResourceManager.GetString("wox_plugin_service_restarted_notification", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Running.
/// </summary>
internal static string wox_plugin_service_running {
get {
return ResourceManager.GetString("wox_plugin_service_running", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Start (Enter).
/// </summary>
internal static string wox_plugin_service_start {
get {
return ResourceManager.GetString("wox_plugin_service_start", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Automatic.
/// </summary>
internal static string wox_plugin_service_start_mode_automatic {
get {
return ResourceManager.GetString("wox_plugin_service_start_mode_automatic", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Boot.
/// </summary>
internal static string wox_plugin_service_start_mode_boot {
get {
return ResourceManager.GetString("wox_plugin_service_start_mode_boot", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Disabled.
/// </summary>
internal static string wox_plugin_service_start_mode_disabled {
get {
return ResourceManager.GetString("wox_plugin_service_start_mode_disabled", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Manual.
/// </summary>
internal static string wox_plugin_service_start_mode_manual {
get {
return ResourceManager.GetString("wox_plugin_service_start_mode_manual", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to System.
/// </summary>
internal static string wox_plugin_service_start_mode_system {
get {
return ResourceManager.GetString("wox_plugin_service_start_mode_system", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Starting.
/// </summary>
internal static string wox_plugin_service_start_pending {
get {
return ResourceManager.GetString("wox_plugin_service_start_pending", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Started.
/// </summary>
internal static string wox_plugin_service_started {
get {
return ResourceManager.GetString("wox_plugin_service_started", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} has been started.
/// </summary>
internal static string wox_plugin_service_started_notification {
get {
return ResourceManager.GetString("wox_plugin_service_started_notification", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Startup.
/// </summary>
internal static string wox_plugin_service_startup {
get {
return ResourceManager.GetString("wox_plugin_service_startup", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Status.
/// </summary>
internal static string wox_plugin_service_status {
get {
return ResourceManager.GetString("wox_plugin_service_status", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Stop (Enter).
/// </summary>
internal static string wox_plugin_service_stop {
get {
return ResourceManager.GetString("wox_plugin_service_stop", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Stopping.
/// </summary>
internal static string wox_plugin_service_stop_pending {
get {
return ResourceManager.GetString("wox_plugin_service_stop_pending", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Stopped.
/// </summary>
internal static string wox_plugin_service_stopped {
get {
return ResourceManager.GetString("wox_plugin_service_stopped", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} has been stopped.
/// </summary>
internal static string wox_plugin_service_stopped_notification {
get {
return ResourceManager.GetString("wox_plugin_service_stopped_notification", resourceCulture);
}
}
}
}

View File

@@ -0,0 +1,192 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="wox_plugin_service_continue_pending" xml:space="preserve">
<value>Continue</value>
</data>
<data name="wox_plugin_service_open_services" xml:space="preserve">
<value>Open services (Ctrl+Shift+O)</value>
</data>
<data name="wox_plugin_service_paused" xml:space="preserve">
<value>Paused</value>
</data>
<data name="wox_plugin_service_pause_pending" xml:space="preserve">
<value>Pausing</value>
</data>
<data name="wox_plugin_service_plugin_description" xml:space="preserve">
<value>Manages Windows services</value>
</data>
<data name="wox_plugin_service_plugin_name" xml:space="preserve">
<value>Service</value>
</data>
<data name="wox_plugin_service_restart" xml:space="preserve">
<value>Restart (Ctrl+Shift+R)</value>
</data>
<data name="wox_plugin_service_restarted_notification" xml:space="preserve">
<value>{0} has been restarted</value>
</data>
<data name="wox_plugin_service_running" xml:space="preserve">
<value>Running</value>
</data>
<data name="wox_plugin_service_start" xml:space="preserve">
<value>Start (Enter)</value>
</data>
<data name="wox_plugin_service_started" xml:space="preserve">
<value>Started</value>
</data>
<data name="wox_plugin_service_started_notification" xml:space="preserve">
<value>{0} has been started</value>
</data>
<data name="wox_plugin_service_startup" xml:space="preserve">
<value>Startup</value>
</data>
<data name="wox_plugin_service_start_mode_automatic" xml:space="preserve">
<value>Automatic</value>
</data>
<data name="wox_plugin_service_start_mode_boot" xml:space="preserve">
<value>Boot</value>
</data>
<data name="wox_plugin_service_start_mode_disabled" xml:space="preserve">
<value>Disabled</value>
</data>
<data name="wox_plugin_service_start_mode_manual" xml:space="preserve">
<value>Manual</value>
</data>
<data name="wox_plugin_service_start_mode_system" xml:space="preserve">
<value>System</value>
</data>
<data name="wox_plugin_service_start_pending" xml:space="preserve">
<value>Starting</value>
</data>
<data name="wox_plugin_service_status" xml:space="preserve">
<value>Status</value>
</data>
<data name="wox_plugin_service_stop" xml:space="preserve">
<value>Stop (Enter)</value>
</data>
<data name="wox_plugin_service_stopped" xml:space="preserve">
<value>Stopped</value>
</data>
<data name="wox_plugin_service_stopped_notification" xml:space="preserve">
<value>{0} has been stopped</value>
</data>
<data name="wox_plugin_service_stop_pending" xml:space="preserve">
<value>Stopping</value>
</data>
</root>