diff --git a/src/Infrastructure/Probel.Lanceur.Infrastructure/Probel.Lanceur.Infrastructure.csproj b/src/Infrastructure/Probel.Lanceur.Infrastructure/Probel.Lanceur.Infrastructure.csproj index 7217c24..d9ee52a 100644 --- a/src/Infrastructure/Probel.Lanceur.Infrastructure/Probel.Lanceur.Infrastructure.csproj +++ b/src/Infrastructure/Probel.Lanceur.Infrastructure/Probel.Lanceur.Infrastructure.csproj @@ -21,6 +21,7 @@ DEBUG;TRACE prompt 4 + x64 pdbonly diff --git a/src/Infrastructure/Probel.Lanceur.Plugin/Probel.Lanceur.Plugin.csproj b/src/Infrastructure/Probel.Lanceur.Plugin/Probel.Lanceur.Plugin.csproj index f11f689..a6ad6d7 100644 --- a/src/Infrastructure/Probel.Lanceur.Plugin/Probel.Lanceur.Plugin.csproj +++ b/src/Infrastructure/Probel.Lanceur.Plugin/Probel.Lanceur.Plugin.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 @@ -13,6 +13,10 @@ Wox slickrun plugin + + x64 + + diff --git a/src/Infrastructure/Probel.Lanceur.Repositories/Probel.Lanceur.Repositories.csproj b/src/Infrastructure/Probel.Lanceur.Repositories/Probel.Lanceur.Repositories.csproj index 113f421..2ace2da 100644 --- a/src/Infrastructure/Probel.Lanceur.Repositories/Probel.Lanceur.Repositories.csproj +++ b/src/Infrastructure/Probel.Lanceur.Repositories/Probel.Lanceur.Repositories.csproj @@ -10,6 +10,10 @@ LGPL-3.0-only + + x64 + + diff --git a/src/Libraries/Probel.UwpHelpers/UwpAppFactory.cs b/src/Libraries/Probel.UwpHelpers/UwpAppFactory.cs index 5c06b82..d3a91c1 100644 --- a/src/Libraries/Probel.UwpHelpers/UwpAppFactory.cs +++ b/src/Libraries/Probel.UwpHelpers/UwpAppFactory.cs @@ -17,7 +17,7 @@ public class UwpAppFactory #region Fields private readonly AppxPackageHelper _helper = new AppxPackageHelper(); - private readonly ILogService _log= LogServiceFactory.Get(); + private readonly ILogService _log = LogServiceFactory.Get(); #endregion Fields @@ -331,7 +331,7 @@ public UwpApp Create(Package package) public bool IsUwp(string userId, string alias, out Package package) { - if (alias == null) + if (string.IsNullOrWhiteSpace(alias)) { package = null; return false; diff --git a/src/Probel.Lanceur.Core/Entities/AliasTextCollection.cs b/src/Probel.Lanceur.Core/Entities/AliasTextCollection.cs index dca48ff..cec3d18 100644 --- a/src/Probel.Lanceur.Core/Entities/AliasTextCollection.cs +++ b/src/Probel.Lanceur.Core/Entities/AliasTextCollection.cs @@ -9,7 +9,7 @@ public static IEnumerable Refresh(this IEnumerable collect var template = "package:"; foreach (var item in collection) { - if (item.FileName.ToLower().StartsWith(template)) + if (item?.FileName?.ToLower()?.StartsWith(template) ?? false) { item.IsPackaged = true; diff --git a/src/Probel.Lanceur/Converters/StringToBooleanConverter.cs b/src/Probel.Lanceur/Converters/StringToBooleanConverter.cs new file mode 100644 index 0000000..f070cb3 --- /dev/null +++ b/src/Probel.Lanceur/Converters/StringToBooleanConverter.cs @@ -0,0 +1,25 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace Probel.Lanceur.Converters +{ + public class StringToBooleanConverter : IValueConverter + { + #region Methods + + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is string str) { return !string.IsNullOrWhiteSpace(str); } + else if (value == null) { return false; } + else { return value; } + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + + #endregion Methods + } +} \ No newline at end of file diff --git a/src/Probel.Lanceur/Probel.Lanceur.csproj b/src/Probel.Lanceur/Probel.Lanceur.csproj index 59445cc..10699d9 100644 --- a/src/Probel.Lanceur/Probel.Lanceur.csproj +++ b/src/Probel.Lanceur/Probel.Lanceur.csproj @@ -210,6 +210,7 @@ + diff --git a/src/Probel.Lanceur/Views/EditAliasView.xaml b/src/Probel.Lanceur/Views/EditAliasView.xaml index e768a73..c893c0c 100644 --- a/src/Probel.Lanceur/Views/EditAliasView.xaml +++ b/src/Probel.Lanceur/Views/EditAliasView.xaml @@ -20,6 +20,7 @@ 5 5 5 5 +