Compare commits
13 Commits
dev/migrie
...
v0.90.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a641b46f57 | ||
|
|
51e9e9d46a | ||
|
|
5157ffc895 | ||
|
|
60bbf070e1 | ||
|
|
d597bd267d | ||
|
|
2623eb10f3 | ||
|
|
8e27940b77 | ||
|
|
c6750d3a62 | ||
|
|
37836c656d | ||
|
|
39e8231831 | ||
|
|
2cb63f5fbe | ||
|
|
e931135d50 | ||
|
|
5b39d1551d |
@@ -10,7 +10,6 @@ using System.Linq;
|
||||
using System.ServiceProcess;
|
||||
using Microsoft.CmdPal.Ext.WindowsServices.Commands;
|
||||
using Microsoft.CmdPal.Ext.WindowsServices.Properties;
|
||||
using Microsoft.CommandPalette.Extensions;
|
||||
using Microsoft.CommandPalette.Extensions.Toolkit;
|
||||
using Microsoft.Win32;
|
||||
using Windows.System;
|
||||
@@ -44,9 +43,14 @@ public static class ServiceHelper
|
||||
serviceList = servicesStartsWith.Concat(servicesContains);
|
||||
}
|
||||
|
||||
return serviceList.Select(s =>
|
||||
var result = serviceList.Select(s =>
|
||||
{
|
||||
var serviceResult = new ServiceResult(s);
|
||||
var serviceResult = ServiceResult.CreateServiceController(s);
|
||||
if (serviceResult == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
ServiceCommand serviceCommand;
|
||||
CommandContextItem[] moreCommands;
|
||||
if (serviceResult.IsRunning)
|
||||
@@ -93,7 +97,9 @@ public static class ServiceHelper
|
||||
// ToolTipData = new ToolTipData(serviceResult.DisplayName, serviceResult.ServiceName),
|
||||
// IcoPath = icoPath,
|
||||
};
|
||||
});
|
||||
}).Where(s => s != null);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// TODO GH #118 IPublicAPI contextAPI isn't used anymore, but we need equivalent ways to show notifications and status
|
||||
|
||||
@@ -17,7 +17,7 @@ public class ServiceResult
|
||||
|
||||
public bool IsRunning { get; }
|
||||
|
||||
public ServiceResult(ServiceController serviceController)
|
||||
private ServiceResult(ServiceController serviceController)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(serviceController);
|
||||
|
||||
@@ -26,4 +26,21 @@ public class ServiceResult
|
||||
StartMode = serviceController.StartType;
|
||||
IsRunning = serviceController.Status != ServiceControllerStatus.Stopped && serviceController.Status != ServiceControllerStatus.StopPending;
|
||||
}
|
||||
|
||||
public static ServiceResult CreateServiceController(ServiceController serviceController)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = new ServiceResult(serviceController);
|
||||
|
||||
return result;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// try to log the exception in the future
|
||||
// retrieve properties from serviceController will throw exception. Such as PlatformNotSupportedException.
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using ManagedCommon;
|
||||
using Microsoft.CmdPal.Common.Services;
|
||||
using Microsoft.CommandPalette.Extensions;
|
||||
using Windows.ApplicationModel;
|
||||
@@ -49,7 +48,6 @@ public class ExtensionService : IExtensionService, IDisposable
|
||||
{
|
||||
if (args.IsComplete)
|
||||
{
|
||||
Logger.LogDebug($"{args.Package.DisplayName} completed installing");
|
||||
lock (_lock)
|
||||
{
|
||||
InstallPackageUnderLock(args.Package);
|
||||
@@ -61,7 +59,6 @@ public class ExtensionService : IExtensionService, IDisposable
|
||||
{
|
||||
if (args.IsComplete)
|
||||
{
|
||||
Logger.LogDebug($"{args.Package.DisplayName} completed uninstalling");
|
||||
lock (_lock)
|
||||
{
|
||||
UninstallPackageUnderLock(args.Package);
|
||||
@@ -73,7 +70,6 @@ public class ExtensionService : IExtensionService, IDisposable
|
||||
{
|
||||
if (args.IsComplete)
|
||||
{
|
||||
Logger.LogDebug($"{args.TargetPackage.DisplayName} completed updating");
|
||||
lock (_lock)
|
||||
{
|
||||
// Get any extension providers that we previously had from this app
|
||||
|
||||
@@ -207,12 +207,11 @@ public sealed partial class TopLevelViewModel : ObservableObject, IListItem
|
||||
tags.Add(new Tag() { Text = Alias.SearchPrefix });
|
||||
}
|
||||
|
||||
PropChanged?.Invoke(this, new PropChangedEventArgs(nameof(Tags)));
|
||||
|
||||
DoOnUiThread(
|
||||
() =>
|
||||
{
|
||||
ListHelpers.InPlaceUpdateList(Tags, tags);
|
||||
PropChanged?.Invoke(this, new PropChangedEventArgs(nameof(Tags)));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 255 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 295 B After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 435 B After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 826 B After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 178 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 723 B After Width: | Height: | Size: 660 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 723 B After Width: | Height: | Size: 660 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 520 B After Width: | Height: | Size: 660 B |
|
After Width: | Height: | Size: 863 B |
|
Before Width: | Height: | Size: 864 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 52 KiB |
31
src/modules/cmdpal/Microsoft.CmdPal.UI/Assets/Dev/icon.svg
Normal file
@@ -0,0 +1,31 @@
|
||||
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_4303_1230)">
|
||||
<g clip-path="url(#clip1_4303_1230)">
|
||||
<path d="M68.6048 46.5117C69.1572 47.4784 69.1288 48.6715 68.5311 49.6108L47.5311 82.6108C47.1611 83.1921 46.6024 83.6283 45.9488 83.8462L9.94876 95.8462C8.84743 96.2133 7.63315 95.9121 6.83113 95.0728C6.0291 94.2334 5.7833 93.0067 6.20004 91.9232L18.4781 60.0001L42.7686 49.9034L67.059 43.8066L68.6048 46.5117Z" fill="url(#paint0_linear_4303_1230)"/>
|
||||
<path d="M56.8013 0.488769C57.5681 0.989947 58.0639 1.81404 58.1475 2.72632L60.9281 33.0774L67.059 43.8065L18.4781 60H3.00002C2.01162 60 1.08665 59.5132 0.527081 58.6984C-0.0324852 57.8837 -0.154834 56.8456 0.199979 55.9231L16.3538 13.9231C16.6756 13.0863 17.3548 12.4374 18.2053 12.1539L54.2115 0.153915C55.0806 -0.135737 56.0344 -0.0124095 56.8013 0.488769Z" fill="url(#paint1_linear_4303_1230)"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M52.3538 1.92306C52.7994 0.764487 53.9125 0 55.1539 0H75C75.9884 0 76.9134 0.486845 77.4729 1.30159C78.0325 2.11634 78.1549 3.15442 77.8001 4.07694L67.0604 32H93C94.225 32 95.327 32.7448 95.7837 33.8815C96.2404 35.0182 95.9602 36.3184 95.0757 37.166L47.0757 83.166C46.0614 84.138 44.5084 84.276 43.3386 83.4979C42.1688 82.7199 41.6957 81.2343 42.2 79.9231L54.4781 48H39C38.0116 48 37.0866 47.5132 36.5271 46.6984C35.9675 45.8837 35.8452 44.8456 36.2 43.9231L52.3538 1.92306Z" fill="url(#paint2_radial_4303_1230)"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_4303_1230" x1="29.3743" y1="43.8066" x2="44.9485" y2="96.2016" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#7A41DC"/>
|
||||
<stop offset="0.75" stop-color="#A931D8"/>
|
||||
<stop offset="0.841927" stop-color="#7A41DC"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_4303_1230" x1="24.8802" y1="3.90205e-07" x2="43.9581" y2="59.4288" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#7A41DC"/>
|
||||
<stop offset="0.75" stop-color="#A931D8"/>
|
||||
<stop offset="0.841927" stop-color="#7A41DC"/>
|
||||
</linearGradient>
|
||||
<radialGradient id="paint2_radial_4303_1230" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(66.0001) rotate(79.3315) scale(69.4504 51.0523)">
|
||||
<stop stop-color="#FAB500"/>
|
||||
<stop offset="1" stop-color="#FE8401"/>
|
||||
</radialGradient>
|
||||
<clipPath id="clip0_4303_1230">
|
||||
<rect width="96" height="96" fill="white"/>
|
||||
</clipPath>
|
||||
<clipPath id="clip1_4303_1230">
|
||||
<rect width="96" height="96" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 165 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 181 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 722 B After Width: | Height: | Size: 648 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 722 B After Width: | Height: | Size: 648 B |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 648 B |
|
Before Width: | Height: | Size: 867 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.0 KiB |