Merge dev

This commit is contained in:
VictoriousRaptor 2025-07-27 14:43:31 +08:00
commit 71e0374640
86 changed files with 1309 additions and 903 deletions

View file

@ -4,4 +4,8 @@ ssh
ubuntu
runcount
Firefox
Português
Português (Brasil)
favicons
moz
workaround

View file

@ -104,3 +104,7 @@ metadatas
WMP
VSTHRD
CJK
Msix
dummyprofile
browserbookmark
copyurl

View file

@ -124,6 +124,10 @@
# version suffix <word>v#
(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_]))
# Non-English
[a-zA-Z]*[ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*
\bjjw24\b
\bappref-ms\b
\bTobiasSekan\b
@ -143,3 +147,4 @@
\bXing\s*Kong\s*Jian\s*Dao\b
\bDa\s*Niu\b
\bXiao\s*Lang\b
\b[Ss]ettings [Ss]ettings\b

View file

@ -55,12 +55,12 @@
<ItemGroup>
<PackageReference Include="Droplex" Version="1.7.0" />
<PackageReference Include="FSharp.Core" Version="9.0.201" />
<PackageReference Include="Meziantou.Framework.Win32.Jobs" Version="3.4.0" />
<PackageReference Include="FSharp.Core" Version="9.0.300" />
<PackageReference Include="Meziantou.Framework.Win32.Jobs" Version="3.4.3" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
<PackageReference Include="SemanticVersioning" Version="3.0.0" />
<PackageReference Include="squirrel.windows" Version="1.5.2" NoWarn="NU1701" />
<PackageReference Include="StreamJsonRpc" Version="2.21.10" />
<PackageReference Include="StreamJsonRpc" Version="2.22.11" />
</ItemGroup>
<ItemGroup>

View file

@ -1,38 +0,0 @@
using System;
using System.ComponentModel;
using System.Globalization;
using System.Reflection;
using System.Windows.Data;
namespace Flow.Launcher.Core.Resource
{
[Obsolete("LocalizationConverter is obsolete. Use with Flow.Launcher.Localization NuGet package instead.")]
public class LocalizationConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (targetType == typeof(string) && value != null)
{
FieldInfo fi = value.GetType().GetField(value.ToString());
if (fi != null)
{
string localizedDescription = string.Empty;
var attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false);
if ((attributes.Length > 0) && (!String.IsNullOrEmpty(attributes[0].Description)))
{
localizedDescription = attributes[0].Description;
}
return (!String.IsNullOrEmpty(localizedDescription)) ? localizedDescription : value.ToString();
}
}
return string.Empty;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

View file

@ -0,0 +1,277 @@
{
"version": 1,
"dependencies": {
"net9.0-windows7.0": {
"Droplex": {
"type": "Direct",
"requested": "[1.7.0, )",
"resolved": "1.7.0",
"contentHash": "wutfIus/Ufw/9TDsp86R1ycnIH+wWrj4UhcmrzAHWjsdyC2iM07WEQ9+APTB7pQynsDnYH1r2i58XgAJ3lxUXA==",
"dependencies": {
"YamlDotNet": "9.1.0"
}
},
"FSharp.Core": {
"type": "Direct",
"requested": "[9.0.300, )",
"resolved": "9.0.300",
"contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ=="
},
"Meziantou.Framework.Win32.Jobs": {
"type": "Direct",
"requested": "[3.4.3, )",
"resolved": "3.4.3",
"contentHash": "REjInKnQ0OrhjjtSMPQtLtdURctCroB4L8Sd2gjTOYDysklvsdnrStx1tHS7uLv+fSyFF3aazZmo5Ka0v1oz/w=="
},
"Microsoft.IO.RecyclableMemoryStream": {
"type": "Direct",
"requested": "[3.0.1, )",
"resolved": "3.0.1",
"contentHash": "s/s20YTVY9r9TPfTrN5g8zPF1YhwxyqO6PxUkrYTGI2B+OGPe9AdajWZrLhFqXIvqIW23fnUE4+ztrUWNU1+9g=="
},
"SemanticVersioning": {
"type": "Direct",
"requested": "[3.0.0, )",
"resolved": "3.0.0",
"contentHash": "RR+8GbPQ/gjDqov/1QN1OPoUlbUruNwcL3WjWCeLw+MY7+od/ENhnkYxCfAC6rQLIu3QifaJt3kPYyP3RumqMQ=="
},
"squirrel.windows": {
"type": "Direct",
"requested": "[1.5.2, )",
"resolved": "1.5.2",
"contentHash": "89Y/CFxWm7SEOjvuV2stVa8p+SNM9GOLk4tUNm2nUF792nfkimAgwRA/umVsdyd/OXBH8byXSh4V1qck88ZAyQ==",
"dependencies": {
"DeltaCompressionDotNet": "[1.0.0, 2.0.0)",
"Mono.Cecil": "0.9.6.1",
"Splat": "1.6.2"
}
},
"StreamJsonRpc": {
"type": "Direct",
"requested": "[2.22.11, )",
"resolved": "2.22.11",
"contentHash": "TQcqBFswLNpdSJANjhxZmIIe0Yl0kGqzjZ+uHLdhrkxntofvNu6C53XPEEYQ3Wkj8AorKumkuv/VMvTH4BHOZw==",
"dependencies": {
"MessagePack": "2.5.192",
"Microsoft.VisualStudio.Threading.Only": "17.13.61",
"Microsoft.VisualStudio.Validation": "17.8.8",
"Nerdbank.Streams": "2.12.87",
"Newtonsoft.Json": "13.0.3",
"System.IO.Pipelines": "8.0.0"
}
},
"Ben.Demystifier": {
"type": "Transitive",
"resolved": "0.4.1",
"contentHash": "axFeEMfmEORy3ipAzOXG/lE+KcNptRbei3F0C4kQCdeiQtW+qJW90K5iIovITGrdLt8AjhNCwk5qLSX9/rFpoA==",
"dependencies": {
"System.Reflection.Metadata": "5.0.0"
}
},
"BitFaster.Caching": {
"type": "Transitive",
"resolved": "2.5.4",
"contentHash": "1QroTY1PVCZOSG9FnkkCrmCKk/+bZCgI/YXq376HnYwUDJ4Ho0EaV4YaA/5v5WYLnwIwIO7RZkdWbg9pxIpueQ=="
},
"CommunityToolkit.Mvvm": {
"type": "Transitive",
"resolved": "8.4.0",
"contentHash": "tqVU8yc/ADO9oiTRyTnwhFN68hCwvkliMierptWOudIAvWY1mWCh5VFh+guwHJmpMwfg0J0rY+yyd5Oy7ty9Uw=="
},
"DeltaCompressionDotNet": {
"type": "Transitive",
"resolved": "1.0.0",
"contentHash": "nwbZAYd+DblXAIzlnwDSnl0CiCm8jWLfHSYnoN4wYhtIav6AegB3+T/vKzLbU2IZlPB8Bvl8U3NXpx3eaz+N5w=="
},
"InputSimulator": {
"type": "Transitive",
"resolved": "1.0.4",
"contentHash": "D0LvRCPQMX6/FJHBjng+RO+wRDuHTJrfo7IAc7rmkPvRqchdVGJWg3y70peOtDy3OLNK+HSOwVkH4GiuLnkKgA=="
},
"JetBrains.Annotations": {
"type": "Transitive",
"resolved": "2024.3.0",
"contentHash": "ox5pkeLQXjvJdyAB4b2sBYAlqZGLh3PjSnP1bQNVx72ONuTJ9+34/+Rq91Fc0dG29XG9RgZur9+NcP4riihTug=="
},
"MemoryPack": {
"type": "Transitive",
"resolved": "1.21.4",
"contentHash": "wy3JTBNBsO8LfQcBvvYsWr3lm2Oakolrfu0UQ3oSJSEiD+7ye0GUhYTaXuYYBowqsXBXWD9gf2218ae0JRiYVQ==",
"dependencies": {
"MemoryPack.Core": "1.21.4",
"MemoryPack.Generator": "1.21.4"
}
},
"MemoryPack.Core": {
"type": "Transitive",
"resolved": "1.21.4",
"contentHash": "6RszGorZ0ejNmp37ZcboPBMvvPCuNW2jlrdQfcs/lMzE5b3pmPF6hsm/laDc34hRlbAST1ZxaX/DvYu2DF5sBQ=="
},
"MemoryPack.Generator": {
"type": "Transitive",
"resolved": "1.21.4",
"contentHash": "g14EsSS85yn0lHTi0J9ivqlZMf09A2iI51fmI+0KkzIzyCbWOBWPi5mdaY7YWmXprk12aYh9u/qfWHQUYthlwg=="
},
"MessagePack": {
"type": "Transitive",
"resolved": "2.5.192",
"contentHash": "Jtle5MaFeIFkdXtxQeL9Tu2Y3HsAQGoSntOzrn6Br/jrl6c8QmG22GEioT5HBtZJR0zw0s46OnKU8ei2M3QifA==",
"dependencies": {
"MessagePack.Annotations": "2.5.192",
"Microsoft.NET.StringTools": "17.6.3"
}
},
"MessagePack.Annotations": {
"type": "Transitive",
"resolved": "2.5.192",
"contentHash": "jaJuwcgovWIZ8Zysdyf3b7b34/BrADw4v82GaEZymUhDd3ScMPrYd/cttekeDteJJPXseJxp04yTIcxiVUjTWg=="
},
"Microsoft.NET.StringTools": {
"type": "Transitive",
"resolved": "17.6.3",
"contentHash": "N0ZIanl1QCgvUumEL1laasU0a7sOE5ZwLZVTn0pAePnfhq8P7SvTjF8Axq+CnavuQkmdQpGNXQ1efZtu5kDFbA=="
},
"Microsoft.VisualStudio.Threading": {
"type": "Transitive",
"resolved": "17.14.15",
"contentHash": "1DrCusT3xNLSlaJg77BsUSAzrhjdZBAvvsS0PMzyPM+fGais6SnISOhqdZQop8VVMIBLsYm2gyF9W7THjgavwA==",
"dependencies": {
"Microsoft.VisualStudio.Threading.Analyzers": "17.14.15",
"Microsoft.VisualStudio.Threading.Only": "17.14.15",
"Microsoft.VisualStudio.Validation": "17.8.8"
}
},
"Microsoft.VisualStudio.Threading.Analyzers": {
"type": "Transitive",
"resolved": "17.14.15",
"contentHash": "mXQPJsbuUD2ydq4/ffd8h8tSOFCXec+2xJOVNCvXjuMOq/+5EKHq3D2m2MC2+nUaXeFMSt66VS/J4HdKBixgcw=="
},
"Microsoft.VisualStudio.Threading.Only": {
"type": "Transitive",
"resolved": "17.14.15",
"contentHash": "NqONyw1RXyj9P3k5e1uU2k9kc1ptwuU5NJQzG+MPq7vQVHUzBY8HLuJf/N2Rw5H/myD96CVxziDxmjawPuzntw==",
"dependencies": {
"Microsoft.VisualStudio.Validation": "17.8.8"
}
},
"Microsoft.VisualStudio.Validation": {
"type": "Transitive",
"resolved": "17.8.8",
"contentHash": "rWXThIpyQd4YIXghNkiv2+VLvzS+MCMKVRDR0GAMlflsdo+YcAN2g2r5U1Ah98OFjQMRexTFtXQQ2LkajxZi3g=="
},
"Microsoft.Win32.SystemEvents": {
"type": "Transitive",
"resolved": "9.0.7",
"contentHash": "lFGY2aGgmMREPJEfOmZcA6v0CLjWVpcfNHRgqYMoSQhy80+GxhYqdW5xe+DCLrVqE1M7/0RpOkIo49/KH/cd/A=="
},
"Mono.Cecil": {
"type": "Transitive",
"resolved": "0.9.6.1",
"contentHash": "yMsurNaOxxKIjyW9pEB+tRrR1S3DFnN1+iBgKvYvXG8kW0Y6yknJeMAe/tl3+P78/2C6304TgF7aVqpqXgEQ9Q=="
},
"Nerdbank.Streams": {
"type": "Transitive",
"resolved": "2.12.87",
"contentHash": "oDKOeKZ865I5X8qmU3IXMyrAnssYEiYWTobPGdrqubN3RtTzEHIv+D6fwhdcfrdhPJzHjCkK/ORztR/IsnmA6g==",
"dependencies": {
"Microsoft.VisualStudio.Threading.Only": "17.13.61",
"Microsoft.VisualStudio.Validation": "17.8.8",
"System.IO.Pipelines": "8.0.0"
}
},
"Newtonsoft.Json": {
"type": "Transitive",
"resolved": "13.0.3",
"contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"NHotkey": {
"type": "Transitive",
"resolved": "3.0.0",
"contentHash": "IEghs0QqWsQYH0uUmvIl0Ye6RaebWRh38eB6ToOkDnQucTYRGFOgtig0gSxlwCszTilYFz3n1ZuY762x+kDR3A=="
},
"NHotkey.Wpf": {
"type": "Transitive",
"resolved": "3.0.0",
"contentHash": "BIUKlhTG5KtFf9OQzWvkmVmktt5/FFj6AOEgag8Uf0R2YdZt5ajUzs3sVskcJcT2TztWlEHKQr1jFj3KQ0D9Nw==",
"dependencies": {
"NHotkey": "3.0.0"
}
},
"NLog": {
"type": "Transitive",
"resolved": "6.0.1",
"contentHash": "qDWiqy8/xdpZKtHna/645KbalwP86N2NFJEzfqhcv+Si4V2iNaEfR/dCneuF/4+Dcwl3f7jHMXj3ndWYftV3Ug=="
},
"NLog.OutputDebugString": {
"type": "Transitive",
"resolved": "6.0.1",
"contentHash": "wwJCQLaHVzuRf8TsXB+EEdrzVvE3dnzCSMQMDgwkw3AXp8VSp3JSVF/Q/H0oEqggKgKhPs13hh3a7svyQr4s3A==",
"dependencies": {
"NLog": "6.0.1"
}
},
"SharpVectors.Wpf": {
"type": "Transitive",
"resolved": "1.8.4.2",
"contentHash": "PNxLkMBJnV8A+6yH9OqOlhLJegvWP/dvh0rAJp2l0kcrR+rB4R2tQ9vhUqka+UilH4atN8T6zvjDOizVyfz2Ng=="
},
"Splat": {
"type": "Transitive",
"resolved": "1.6.2",
"contentHash": "DeH0MxPU+D4JchkIDPYG4vUT+hsWs9S41cFle0/4K5EJMXWurx5DzAkj2366DfK14/XKNhsu6tCl4dZXJ3CD4w=="
},
"System.Drawing.Common": {
"type": "Transitive",
"resolved": "9.0.7",
"contentHash": "1k/Pk7hcM3vP2tfIRRS2ECCCN7ya+hvocsM1JMc4ZDCU6qw7yOuUmqmCDfgXZ4Q4FS6jass2EAai5ByKodDi0g==",
"dependencies": {
"Microsoft.Win32.SystemEvents": "9.0.7"
}
},
"System.IO.Pipelines": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "FHNOatmUq0sqJOkTx+UF/9YK1f180cnW5FVqnQMvYUN0elp6wFzbtPSiqbo1/ru8ICp43JM1i7kKkk6GsNGHlA=="
},
"System.Reflection.Metadata": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ=="
},
"ToolGood.Words.Pinyin": {
"type": "Transitive",
"resolved": "3.1.0.3",
"contentHash": "VKcf8sUq/+LyY99WgLhOu7Q32ROEyR30/2xCCj9ADRi45wVC7kpXrYCf9vH1qirkmrIfpL8inoxAbrqAlfXxsQ=="
},
"YamlDotNet": {
"type": "Transitive",
"resolved": "9.1.0",
"contentHash": "fuvGXU4Ec5HrsmEc+BiFTNPCRf1cGBI2kh/3RzMWgddM2M4ALhbSPoI3X3mhXZUD1qqQd9oSkFAtWjpz8z9eRg=="
},
"flow.launcher.infrastructure": {
"type": "Project",
"dependencies": {
"Ben.Demystifier": "[0.4.1, )",
"BitFaster.Caching": "[2.5.4, )",
"CommunityToolkit.Mvvm": "[8.4.0, )",
"Flow.Launcher.Plugin": "[4.7.0, )",
"InputSimulator": "[1.0.4, )",
"MemoryPack": "[1.21.4, )",
"Microsoft.VisualStudio.Threading": "[17.14.15, )",
"NHotkey.Wpf": "[3.0.0, )",
"NLog": "[6.0.1, )",
"NLog.OutputDebugString": "[6.0.1, )",
"SharpVectors.Wpf": "[1.8.4.2, )",
"System.Drawing.Common": "[9.0.7, )",
"ToolGood.Words.Pinyin": "[3.1.0.3, )"
}
},
"flow.launcher.plugin": {
"type": "Project",
"dependencies": {
"JetBrains.Annotations": "[2024.3.0, )"
}
}
}
}
}

View file

@ -54,29 +54,28 @@
<ItemGroup>
<PackageReference Include="Ben.Demystifier" Version="0.4.1" />
<PackageReference Include="BitFaster.Caching" Version="2.5.3" />
<PackageReference Include="BitFaster.Caching" Version="2.5.4" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageReference Include="Fody" Version="6.5.5">
<PackageReference Include="Fody" Version="6.9.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="InputSimulator" Version="1.0.4" />
<PackageReference Include="MemoryPack" Version="1.21.4" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.12.19" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.14.15" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.183">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NHotkey.Wpf" Version="3.0.0" />
<PackageReference Include="NLog" Version="4.7.10" />
<PackageReference Include="PropertyChanged.Fody" Version="3.4.0">
<PackageReference Include="NLog" Version="6.0.1" />
<PackageReference Include="NLog.OutputDebugString" Version="6.0.1" />
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="SharpVectors.Wpf" Version="1.8.4.2" />
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
<!--ToolGood.Words.Pinyin v3.0.2.6 results in high memory usage when search with pinyin is enabled-->
<!--Bumping to it or higher needs to test and ensure this is no longer a problem-->
<PackageReference Include="ToolGood.Words.Pinyin" Version="3.0.1.4" />
<PackageReference Include="System.Drawing.Common" Version="9.0.7" />
<PackageReference Include="ToolGood.Words.Pinyin" Version="3.1.0.3" />
</ItemGroup>
</Project>

View file

@ -34,12 +34,6 @@ WINDOW_STYLE
SetLastError
WINDOW_EX_STYLE
GetSystemMetrics
EnumDisplayMonitors
MonitorFromWindow
GetMonitorInfo
MONITORINFOEXW
WM_ENTERSIZEMOVE
WM_EXITSIZEMOVE
WM_NCLBUTTONDBLCLK
@ -90,3 +84,6 @@ OpenProcess
QueryFullProcessImageName
EVENT_OBJECT_HIDE
EVENT_SYSTEM_DIALOGEND
WM_POWERBROADCAST
PBT_APMRESUMEAUTOMATIC

View file

@ -1,58 +0,0 @@
using System;
using System.Windows.Markup;
namespace Flow.Launcher.Infrastructure.UI
{
[Obsolete("EnumBindingSourceExtension is obsolete. Use with Flow.Launcher.Localization NuGet package instead.")]
public class EnumBindingSourceExtension : MarkupExtension
{
private Type _enumType;
public Type EnumType
{
get { return _enumType; }
set
{
if (value != _enumType)
{
if (value != null)
{
Type enumType = Nullable.GetUnderlyingType(value) ?? value;
if (!enumType.IsEnum)
{
throw new ArgumentException("Type must represent an enum.");
}
}
_enumType = value;
}
}
}
public EnumBindingSourceExtension() { }
public EnumBindingSourceExtension(Type enumType)
{
EnumType = enumType;
}
public override object ProvideValue(IServiceProvider serviceProvider)
{
if (_enumType == null)
{
throw new InvalidOperationException("The EnumType must be specified.");
}
Type actualEnumType = Nullable.GetUnderlyingType(_enumType) ?? _enumType;
Array enumValues = Enum.GetValues(actualEnumType);
if (actualEnumType == _enumType)
{
return enumValues;
}
Array tempArray = Array.CreateInstance(actualEnumType, enumValues.Length + 1);
enumValues.CopyTo(tempArray, 1);
return tempArray;
}
}
}

View file

@ -13,6 +13,7 @@ using System.Windows.Interop;
using System.Windows.Markup;
using System.Windows.Media;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin.SharedModels;
using Microsoft.Win32;
using Microsoft.Win32.SafeHandles;
using Windows.Win32;
@ -120,9 +121,9 @@ namespace Flow.Launcher.Infrastructure
#region Window Foreground
public static nint GetForegroundWindow()
public static unsafe nint GetForegroundWindow()
{
return PInvoke.GetForegroundWindow().Value;
return (nint)PInvoke.GetForegroundWindow().Value;
}
public static bool SetForegroundWindow(Window window)
@ -286,15 +287,15 @@ namespace Flow.Launcher.Infrastructure
{
var hWndDesktop = PInvoke.FindWindowEx(hWnd, HWND.Null, "SHELLDLL_DefView", null);
hWndDesktop = PInvoke.FindWindowEx(hWndDesktop, HWND.Null, "SysListView32", "FolderView");
if (hWndDesktop.Value != IntPtr.Zero)
if (hWndDesktop != HWND.Null)
{
return false;
}
}
var monitorInfo = MonitorInfo.GetNearestDisplayMonitor(hWnd);
return (appBounds.bottom - appBounds.top) == monitorInfo.RectMonitor.Height &&
(appBounds.right - appBounds.left) == monitorInfo.RectMonitor.Width;
return (appBounds.bottom - appBounds.top) == monitorInfo.Bounds.Height &&
(appBounds.right - appBounds.left) == monitorInfo.Bounds.Width;
}
#endregion
@ -337,6 +338,9 @@ namespace Flow.Launcher.Infrastructure
public const int SC_MAXIMIZE = (int)PInvoke.SC_MAXIMIZE;
public const int SC_MINIMIZE = (int)PInvoke.SC_MINIMIZE;
public const int WM_POWERBROADCAST = (int)PInvoke.WM_POWERBROADCAST;
public const int PBT_APMRESUMEAUTOMATIC = (int)PInvoke.PBT_APMRESUMEAUTOMATIC;
#endregion
#region Window Handle
@ -497,7 +501,7 @@ namespace Flow.Launcher.Infrastructure
/// Restores the previously backed-up keyboard layout.
/// If it wasn't backed up or has already been restored, this method does nothing.
/// </summary>
public static void RestorePreviousKeyboardLayout()
public unsafe static void RestorePreviousKeyboardLayout()
{
if (_previousLayout == HKL.Null) return;
@ -508,7 +512,7 @@ namespace Flow.Launcher.Infrastructure
hwnd,
PInvoke.WM_INPUTLANGCHANGEREQUEST,
PInvoke.INPUTLANGCHANGE_FORWARD,
_previousLayout.Value
new LPARAM((nint)_previousLayout.Value)
);
_previousLayout = HKL.Null;
@ -816,20 +820,17 @@ namespace Flow.Launcher.Infrastructure
if (threadId == 0) return string.Empty;
var process = PInvoke.OpenProcess(PROCESS_ACCESS_RIGHTS.PROCESS_QUERY_LIMITED_INFORMATION, false, pid);
if (process.Value != IntPtr.Zero)
if (process != HWND.Null)
{
using var safeHandle = new SafeProcessHandle(process.Value, true);
using var safeHandle = new SafeProcessHandle((nint)process.Value, true);
uint capacity = 2000;
Span<char> buffer = new char[capacity];
fixed (char* pBuffer = buffer)
if (!PInvoke.QueryFullProcessImageName(safeHandle, PROCESS_NAME_FORMAT.PROCESS_NAME_WIN32, buffer, ref capacity))
{
if (!PInvoke.QueryFullProcessImageName(safeHandle, PROCESS_NAME_FORMAT.PROCESS_NAME_WIN32, (PWSTR)pBuffer, ref capacity))
{
return string.Empty;
}
return buffer[..(int)capacity].ToString();
return string.Empty;
}
return buffer[..(int)capacity].ToString();
}
return string.Empty;

View file

@ -13,9 +13,9 @@
},
"BitFaster.Caching": {
"type": "Direct",
"requested": "[2.5.3, )",
"resolved": "2.5.3",
"contentHash": "Vo/39qcam5Xe+DbyfH0JZyqPswdOoa7jv4PGtRJ6Wj8AU+aZ+TuJRlJcIe+MQjRTJwliI8k8VSQpN8sEoBIv2g=="
"requested": "[2.5.4, )",
"resolved": "2.5.4",
"contentHash": "1QroTY1PVCZOSG9FnkkCrmCKk/+bZCgI/YXq376HnYwUDJ4Ho0EaV4YaA/5v5WYLnwIwIO7RZkdWbg9pxIpueQ=="
},
"CommunityToolkit.Mvvm": {
"type": "Direct",
@ -25,9 +25,9 @@
},
"Fody": {
"type": "Direct",
"requested": "[6.5.5, )",
"resolved": "6.5.5",
"contentHash": "Krca41L/PDva1VsmDec5n52cQZxQAQp/bsHdzsNi8iLLI0lqKL94fNIkNaC8tVolUkCyWsbzvxfxJCeD2789fA=="
"requested": "[6.9.2, )",
"resolved": "6.9.2",
"contentHash": "YBHobPGogb0vYhGYIxn/ndWqTjNWZveDi5jdjrcshL2vjwU3gQGyDeI7vGgye+2rAM5fGRvlLgNWLW3DpviS/w=="
},
"InputSimulator": {
"type": "Direct",
@ -47,23 +47,24 @@
},
"Microsoft.VisualStudio.Threading": {
"type": "Direct",
"requested": "[17.12.19, )",
"resolved": "17.12.19",
"contentHash": "eLiGMkMYyaSguqHs3lsrFxy3tAWSLuPEL2pIWRcADMDVAs2xqm3dr1d9QYjiEusTgiClF9KD6OB2NdZP72Oy0Q==",
"requested": "[17.14.15, )",
"resolved": "17.14.15",
"contentHash": "1DrCusT3xNLSlaJg77BsUSAzrhjdZBAvvsS0PMzyPM+fGais6SnISOhqdZQop8VVMIBLsYm2gyF9W7THjgavwA==",
"dependencies": {
"Microsoft.VisualStudio.Threading.Analyzers": "17.12.19",
"Microsoft.VisualStudio.Threading.Analyzers": "17.14.15",
"Microsoft.VisualStudio.Threading.Only": "17.14.15",
"Microsoft.VisualStudio.Validation": "17.8.8"
}
},
"Microsoft.Windows.CsWin32": {
"type": "Direct",
"requested": "[0.3.106, )",
"resolved": "0.3.106",
"contentHash": "Mx5fK7uN6fwLR4wUghs6//HonAnwPBNmC2oonyJVhCUlHS/r6SUS3NkBc3+gaQiv+0/9bqdj1oSCKQFkNI+21Q==",
"requested": "[0.3.183, )",
"resolved": "0.3.183",
"contentHash": "Ze3aE2y7xgzKxEWtNb4SH0CExXpCHr3sbmwnvMiWMzJhWDX/G4Rs5wgg2UNs3VN+qVHh/DkDWLCPaVQv/b//Nw==",
"dependencies": {
"Microsoft.Windows.SDK.Win32Docs": "0.1.42-alpha",
"Microsoft.Windows.SDK.Win32Metadata": "60.0.34-preview",
"Microsoft.Windows.WDK.Win32Metadata": "0.11.4-experimental"
"Microsoft.Windows.SDK.Win32Metadata": "61.0.15-preview",
"Microsoft.Windows.WDK.Win32Metadata": "0.12.8-experimental"
}
},
"NHotkey.Wpf": {
@ -77,17 +78,26 @@
},
"NLog": {
"type": "Direct",
"requested": "[4.7.10, )",
"resolved": "4.7.10",
"contentHash": "rcegW7kYOCjl7wX0SzsqpPBqnJ51JKi1WkYb6QBVX0Wc5IgH19Pv4t/co+T0s06OS0Ne44xgkY/mHg0PdrmJow=="
"requested": "[6.0.1, )",
"resolved": "6.0.1",
"contentHash": "qDWiqy8/xdpZKtHna/645KbalwP86N2NFJEzfqhcv+Si4V2iNaEfR/dCneuF/4+Dcwl3f7jHMXj3ndWYftV3Ug=="
},
"NLog.OutputDebugString": {
"type": "Direct",
"requested": "[6.0.1, )",
"resolved": "6.0.1",
"contentHash": "wwJCQLaHVzuRf8TsXB+EEdrzVvE3dnzCSMQMDgwkw3AXp8VSp3JSVF/Q/H0oEqggKgKhPs13hh3a7svyQr4s3A==",
"dependencies": {
"NLog": "6.0.1"
}
},
"PropertyChanged.Fody": {
"type": "Direct",
"requested": "[3.4.0, )",
"resolved": "3.4.0",
"contentHash": "IAZyq0uolKo2WYm4mjx+q7A8fSGFT0x2e1s3y+ODn4JI0kqTDoo9GF2tdaypUzRFJZfdMxfC5HZW9QzdJLtOnA==",
"requested": "[4.1.0, )",
"resolved": "4.1.0",
"contentHash": "6v+f9cI8YjnZH2WBHuOqWEAo8DFFNGFIdU8xD3AsL6fhV6Y8oAmVWd7XKk49t8DpeUBwhR/X+97+6Epvek0Y3A==",
"dependencies": {
"Fody": "6.5.1"
"Fody": "6.6.4"
}
},
"SharpVectors.Wpf": {
@ -98,18 +108,18 @@
},
"System.Drawing.Common": {
"type": "Direct",
"requested": "[7.0.0, )",
"resolved": "7.0.0",
"contentHash": "KIX+oBU38pxkKPxvLcLfIkOV5Ien8ReN78wro7OF5/erwcmortzeFx+iBswlh2Vz6gVne0khocQudGwaO1Ey6A==",
"requested": "[9.0.7, )",
"resolved": "9.0.7",
"contentHash": "1k/Pk7hcM3vP2tfIRRS2ECCCN7ya+hvocsM1JMc4ZDCU6qw7yOuUmqmCDfgXZ4Q4FS6jass2EAai5ByKodDi0g==",
"dependencies": {
"Microsoft.Win32.SystemEvents": "7.0.0"
"Microsoft.Win32.SystemEvents": "9.0.7"
}
},
"ToolGood.Words.Pinyin": {
"type": "Direct",
"requested": "[3.0.1.4, )",
"resolved": "3.0.1.4",
"contentHash": "uQo97618y9yzLDxrnehPN+/tuiOlk5BqieEdwctHZOAS9miMXnHKgMFYVw8CSGXRglyTYXlrW7qtUlU7Fje5Ew=="
"requested": "[3.1.0.3, )",
"resolved": "3.1.0.3",
"contentHash": "VKcf8sUq/+LyY99WgLhOu7Q32ROEyR30/2xCCj9ADRi45wVC7kpXrYCf9vH1qirkmrIfpL8inoxAbrqAlfXxsQ=="
},
"JetBrains.Annotations": {
"type": "Transitive",
@ -128,8 +138,16 @@
},
"Microsoft.VisualStudio.Threading.Analyzers": {
"type": "Transitive",
"resolved": "17.12.19",
"contentHash": "v3IYeedjoktvZ+GqYmLudxZJngmf/YWIxNT2Uy6QMMN19cvw+nkWoip1Gr1RtnFkUo1MPUVMis4C8Kj8d8DpSQ=="
"resolved": "17.14.15",
"contentHash": "mXQPJsbuUD2ydq4/ffd8h8tSOFCXec+2xJOVNCvXjuMOq/+5EKHq3D2m2MC2+nUaXeFMSt66VS/J4HdKBixgcw=="
},
"Microsoft.VisualStudio.Threading.Only": {
"type": "Transitive",
"resolved": "17.14.15",
"contentHash": "NqONyw1RXyj9P3k5e1uU2k9kc1ptwuU5NJQzG+MPq7vQVHUzBY8HLuJf/N2Rw5H/myD96CVxziDxmjawPuzntw==",
"dependencies": {
"Microsoft.VisualStudio.Validation": "17.8.8"
}
},
"Microsoft.VisualStudio.Validation": {
"type": "Transitive",
@ -138,8 +156,8 @@
},
"Microsoft.Win32.SystemEvents": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "2nXPrhdAyAzir0gLl8Yy8S5Mnm/uBSQQA7jEsILOS1MTyS7DbmV1NgViMtvV1sfCD1ebITpNwb1NIinKeJgUVQ=="
"resolved": "9.0.7",
"contentHash": "lFGY2aGgmMREPJEfOmZcA6v0CLjWVpcfNHRgqYMoSQhy80+GxhYqdW5xe+DCLrVqE1M7/0RpOkIo49/KH/cd/A=="
},
"Microsoft.Windows.SDK.Win32Docs": {
"type": "Transitive",
@ -148,15 +166,15 @@
},
"Microsoft.Windows.SDK.Win32Metadata": {
"type": "Transitive",
"resolved": "60.0.34-preview",
"contentHash": "TA3DUNi4CTeo+ItTXBnGZFt2159XOGSl0UOlG5vjDj4WHqZjhwYyyUnzOtrbCERiSaP2Hzg7otJNWwOSZgutyA=="
"resolved": "61.0.15-preview",
"contentHash": "cysex3dazKtCPALCluC2XX3f5Aedy9H2pw5jb+TW5uas2rkem1Z7FRnbUrg2vKx0pk0Qz+4EJNr37HdYTEcvEQ=="
},
"Microsoft.Windows.WDK.Win32Metadata": {
"type": "Transitive",
"resolved": "0.11.4-experimental",
"contentHash": "bf5MCmUyZf0gBlYQjx9UpRAZWBkRndyt9XicR+UNLvAUAFTZQbu6YaX/sNKZlR98Grn0gydfh/yT4I3vc0AIQA==",
"resolved": "0.12.8-experimental",
"contentHash": "3n8R44/Z96Ly+ty4eYVJfESqbzvpw96lRLs3zOzyDmr1x1Kw7FNn5CyE416q+bZQV3e1HRuMUvyegMeRE/WedA==",
"dependencies": {
"Microsoft.Windows.SDK.Win32Metadata": "60.0.34-preview"
"Microsoft.Windows.SDK.Win32Metadata": "61.0.15-preview"
}
},
"NHotkey": {

View file

@ -68,17 +68,17 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Fody" Version="6.5.5">
<PackageReference Include="Fody" Version="6.9.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.183">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="PropertyChanged.Fody" Version="3.4.0">
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

View file

@ -5,4 +5,12 @@ GetWindowTextLength
WM_KEYDOWN
WM_KEYUP
WM_SYSKEYDOWN
WM_SYSKEYUP
WM_SYSKEYUP
GetSystemMetrics
EnumDisplayMonitors
MonitorFromWindow
GetMonitorInfo
MONITORINFOEXW
GetCursorPos
MonitorFromPoint

View file

@ -1,5 +1,4 @@
using System.Collections.Generic;
using System;
using System.Runtime.InteropServices;
using System.Windows;
using Windows.Win32;
@ -7,13 +6,16 @@ using Windows.Win32.Foundation;
using Windows.Win32.Graphics.Gdi;
using Windows.Win32.UI.WindowsAndMessaging;
namespace Flow.Launcher.Infrastructure;
namespace Flow.Launcher.Plugin.SharedModels;
/// <summary>
/// Contains full information about a display monitor.
/// Codes are edited from: <see href="https://github.com/Jack251970/DesktopWidgets3">.
/// Inspired from: https://github.com/Jack251970/DesktopWidgets3.
/// </summary>
internal class MonitorInfo
/// <remarks>
/// Use this class to replace the System.Windows.Forms.Screen class which can cause possible System.PlatformNotSupportedException.
/// </remarks>
public class MonitorInfo
{
/// <summary>
/// Gets the display monitors (including invisible pseudo-monitors associated with the mirroring drivers).
@ -23,14 +25,14 @@ internal class MonitorInfo
{
var monitorCount = PInvoke.GetSystemMetrics(SYSTEM_METRICS_INDEX.SM_CMONITORS);
var list = new List<MonitorInfo>(monitorCount);
var callback = new MONITORENUMPROC((HMONITOR monitor, HDC deviceContext, RECT* rect, LPARAM data) =>
var callback = new MONITORENUMPROC((monitor, deviceContext, rect, data) =>
{
list.Add(new MonitorInfo(monitor, rect));
return true;
});
var dwData = new LPARAM();
var hdc = new HDC();
bool ok = PInvoke.EnumDisplayMonitors(hdc, (RECT?)null, callback, dwData);
bool ok = PInvoke.EnumDisplayMonitors(hdc, null, callback, dwData);
if (!ok)
{
Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error());
@ -43,11 +45,11 @@ internal class MonitorInfo
/// </summary>
/// <param name="hwnd">Window handle</param>
/// <returns>The display monitor that is nearest to a given window, or null if no monitor is found.</returns>
public static unsafe MonitorInfo GetNearestDisplayMonitor(HWND hwnd)
public static unsafe MonitorInfo GetNearestDisplayMonitor(nint hwnd)
{
var nearestMonitor = PInvoke.MonitorFromWindow(hwnd, MONITOR_FROM_FLAGS.MONITOR_DEFAULTTONEAREST);
var nearestMonitor = PInvoke.MonitorFromWindow(new(hwnd), MONITOR_FROM_FLAGS.MONITOR_DEFAULTTONEAREST);
MonitorInfo nearestMonitorInfo = null;
var callback = new MONITORENUMPROC((HMONITOR monitor, HDC deviceContext, RECT* rect, LPARAM data) =>
var callback = new MONITORENUMPROC((monitor, deviceContext, rect, data) =>
{
if (monitor == nearestMonitor)
{
@ -58,7 +60,7 @@ internal class MonitorInfo
});
var dwData = new LPARAM();
var hdc = new HDC();
bool ok = PInvoke.EnumDisplayMonitors(hdc, (RECT?)null, callback, dwData);
bool ok = PInvoke.EnumDisplayMonitors(hdc, null, callback, dwData);
if (!ok)
{
Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error());
@ -66,17 +68,75 @@ internal class MonitorInfo
return nearestMonitorInfo;
}
/// <summary>
/// Gets the primary display monitor (the one that contains the taskbar).
/// </summary>
/// <returns>The primary display monitor, or null if no monitor is found.</returns>
public static unsafe MonitorInfo GetPrimaryDisplayMonitor()
{
var primaryMonitor = PInvoke.MonitorFromWindow(new HWND(nint.Zero), MONITOR_FROM_FLAGS.MONITOR_DEFAULTTOPRIMARY);
MonitorInfo primaryMonitorInfo = null;
var callback = new MONITORENUMPROC((monitor, deviceContext, rect, data) =>
{
if (monitor == primaryMonitor)
{
primaryMonitorInfo = new MonitorInfo(monitor, rect);
return false;
}
return true;
});
var dwData = new LPARAM();
var hdc = new HDC();
bool ok = PInvoke.EnumDisplayMonitors(hdc, null, callback, dwData);
if (!ok)
{
Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error());
}
return primaryMonitorInfo;
}
/// <summary>
/// Gets the display monitor that contains the cursor.
/// </summary>
/// <returns>The display monitor that contains the cursor, or null if no monitor is found.</returns>
public static unsafe MonitorInfo GetCursorDisplayMonitor()
{
if (!PInvoke.GetCursorPos(out var pt))
{
Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error());
}
var cursorMonitor = PInvoke.MonitorFromPoint(pt, MONITOR_FROM_FLAGS.MONITOR_DEFAULTTONEAREST);
MonitorInfo cursorMonitorInfo = null;
var callback = new MONITORENUMPROC((monitor, deviceContext, rect, data) =>
{
if (monitor == cursorMonitor)
{
cursorMonitorInfo = new MonitorInfo(monitor, rect);
return false;
}
return true;
});
var dwData = new LPARAM();
var hdc = new HDC();
bool ok = PInvoke.EnumDisplayMonitors(hdc, null, callback, dwData);
if (!ok)
{
Marshal.ThrowExceptionForHR(Marshal.GetLastWin32Error());
}
return cursorMonitorInfo;
}
private readonly HMONITOR _monitor;
internal unsafe MonitorInfo(HMONITOR monitor, RECT* rect)
{
RectMonitor =
Bounds =
new Rect(new Point(rect->left, rect->top),
new Point(rect->right, rect->bottom));
_monitor = monitor;
var info = new MONITORINFOEXW() { monitorInfo = new MONITORINFO() { cbSize = (uint)sizeof(MONITORINFOEXW) } };
GetMonitorInfo(monitor, ref info);
RectWork =
WorkingArea =
new Rect(new Point(info.monitorInfo.rcWork.left, info.monitorInfo.rcWork.top),
new Point(info.monitorInfo.rcWork.right, info.monitorInfo.rcWork.bottom));
Name = new string(info.szDevice.AsSpan()).Replace("\0", "").Trim();
@ -93,7 +153,7 @@ internal class MonitorInfo
/// <remarks>
/// <note>If the monitor is not the primary display monitor, some of the rectangle's coordinates may be negative values.</note>
/// </remarks>
public Rect RectMonitor { get; }
public Rect Bounds { get; }
/// <summary>
/// Gets the work area rectangle of the display monitor, expressed in virtual-screen coordinates.
@ -101,15 +161,15 @@ internal class MonitorInfo
/// <remarks>
/// <note>If the monitor is not the primary display monitor, some of the rectangle's coordinates may be negative values.</note>
/// </remarks>
public Rect RectWork { get; }
public Rect WorkingArea { get; }
/// <summary>
/// Gets if the monitor is the the primary display monitor.
/// Gets if the monitor is the primary display monitor.
/// </summary>
public bool IsPrimary => _monitor == PInvoke.MonitorFromWindow(new(IntPtr.Zero), MONITOR_FROM_FLAGS.MONITOR_DEFAULTTOPRIMARY);
public bool IsPrimary => _monitor == PInvoke.MonitorFromWindow(new(nint.Zero), MONITOR_FROM_FLAGS.MONITOR_DEFAULTTOPRIMARY);
/// <inheritdoc />
public override string ToString() => $"{Name} {RectMonitor.Width}x{RectMonitor.Height}";
public override string ToString() => $"{Name} {Bounds.Width}x{Bounds.Height}";
private static unsafe bool GetMonitorInfo(HMONITOR hMonitor, ref MONITORINFOEXW lpmi)
{

View file

@ -0,0 +1,77 @@
{
"version": 1,
"dependencies": {
"net9.0-windows7.0": {
"Fody": {
"type": "Direct",
"requested": "[6.9.2, )",
"resolved": "6.9.2",
"contentHash": "YBHobPGogb0vYhGYIxn/ndWqTjNWZveDi5jdjrcshL2vjwU3gQGyDeI7vGgye+2rAM5fGRvlLgNWLW3DpviS/w=="
},
"JetBrains.Annotations": {
"type": "Direct",
"requested": "[2024.3.0, )",
"resolved": "2024.3.0",
"contentHash": "ox5pkeLQXjvJdyAB4b2sBYAlqZGLh3PjSnP1bQNVx72ONuTJ9+34/+Rq91Fc0dG29XG9RgZur9+NcP4riihTug=="
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[8.0.0, )",
"resolved": "8.0.0",
"contentHash": "G5q7OqtwIyGTkeIOAc3u2ZuV/kicQaec5EaRnc0pIeSnh9LUjj+PYQrJYBURvDt7twGl2PKA7nSN0kz1Zw5bnQ==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "8.0.0",
"Microsoft.SourceLink.Common": "8.0.0"
}
},
"Microsoft.Windows.CsWin32": {
"type": "Direct",
"requested": "[0.3.183, )",
"resolved": "0.3.183",
"contentHash": "Ze3aE2y7xgzKxEWtNb4SH0CExXpCHr3sbmwnvMiWMzJhWDX/G4Rs5wgg2UNs3VN+qVHh/DkDWLCPaVQv/b//Nw==",
"dependencies": {
"Microsoft.Windows.SDK.Win32Docs": "0.1.42-alpha",
"Microsoft.Windows.SDK.Win32Metadata": "61.0.15-preview",
"Microsoft.Windows.WDK.Win32Metadata": "0.12.8-experimental"
}
},
"PropertyChanged.Fody": {
"type": "Direct",
"requested": "[4.1.0, )",
"resolved": "4.1.0",
"contentHash": "6v+f9cI8YjnZH2WBHuOqWEAo8DFFNGFIdU8xD3AsL6fhV6Y8oAmVWd7XKk49t8DpeUBwhR/X+97+6Epvek0Y3A==",
"dependencies": {
"Fody": "6.6.4"
}
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
},
"Microsoft.Windows.SDK.Win32Docs": {
"type": "Transitive",
"resolved": "0.1.42-alpha",
"contentHash": "Z/9po23gUA9aoukirh2ItMU2ZS9++Js9Gdds9fu5yuMojDrmArvY2y+tq9985tR3cxFxpZO1O35Wjfo0khj5HA=="
},
"Microsoft.Windows.SDK.Win32Metadata": {
"type": "Transitive",
"resolved": "61.0.15-preview",
"contentHash": "cysex3dazKtCPALCluC2XX3f5Aedy9H2pw5jb+TW5uas2rkem1Z7FRnbUrg2vKx0pk0Qz+4EJNr37HdYTEcvEQ=="
},
"Microsoft.Windows.WDK.Win32Metadata": {
"type": "Transitive",
"resolved": "0.12.8-experimental",
"contentHash": "3n8R44/Z96Ly+ty4eYVJfESqbzvpw96lRLs3zOzyDmr1x1Kw7FNn5CyE416q+bZQV3e1HRuMUvyegMeRE/WedA==",
"dependencies": {
"Microsoft.Windows.SDK.Win32Metadata": "61.0.15-preview"
}
}
}
}
}

View file

@ -48,13 +48,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="nunit" Version="4.3.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0">
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
</ItemGroup>
</Project>

View file

@ -86,7 +86,7 @@
<ItemGroup>
<PackageReference Include="ChefKeys" Version="0.1.2" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageReference Include="Fody" Version="6.5.5">
<PackageReference Include="Fody" Version="6.9.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
@ -95,19 +95,18 @@
<PackageReference Include="MdXaml.Html" Version="1.27.0" />
<PackageReference Include="MdXaml.Plugins" Version="1.27.0" />
<PackageReference Include="MdXaml.Svg" Version="1.27.0" />
<!-- Do not upgrade Microsoft.Extensions.DependencyInjection and Microsoft.Extensions.Hosting since we are .Net7.0 -->
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.7" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.7" />
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
<!-- ModernWpfUI v0.9.5 introduced WinRT changes that causes Notification platform unavailable error on some machines -->
<!-- https://github.com/Flow-Launcher/Flow.Launcher/issues/1772#issuecomment-1502440801 -->
<PackageReference Include="ModernWpfUI" Version="0.9.4" />
<PackageReference Include="PropertyChanged.Fody" Version="3.4.0">
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="SemanticVersioning" Version="3.0.0" />
<PackageReference Include="TaskScheduler" Version="2.12.1" />
<PackageReference Include="VirtualizingWrapPanel" Version="2.1.1" />
<PackageReference Include="TaskScheduler" Version="2.12.2" />
<PackageReference Include="VirtualizingWrapPanel" Version="2.3.0" />
</ItemGroup>
<ItemGroup>

View file

@ -121,7 +121,7 @@
<system:String x:Key="SearchPrecisionLow">Low</system:String>
<system:String x:Key="SearchPrecisionRegular">Regular</system:String>
<system:String x:Key="ShouldUsePinyin">Search with Pinyin</system:String>
<system:String x:Key="ShouldUsePinyinToolTip">Allows using Pinyin to search. Pinyin is the standard system of romanized spelling for translating Chinese.</system:String>
<system:String x:Key="ShouldUsePinyinToolTip">Pinyin is the standard system of romanized spelling for translating Chinese. Please note, enabling this can significantly increase memory usage during search.</system:String>
<system:String x:Key="ShouldUseDoublePinyin">Use Double Pinyin</system:String>
<system:String x:Key="ShouldUseDoublePinyinToolTip">Use Double Pinyin instead of Full Pinyin to search.</system:String>
<system:String x:Key="DoublePinyinSchema">Double Pinyin Schema</system:String>

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.ComponentModel;
using System.Linq;
using System.Media;
@ -23,14 +23,13 @@ using Flow.Launcher.Infrastructure.DialogJump;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin;
using Flow.Launcher.Plugin.SharedCommands;
using Flow.Launcher.Plugin.SharedModels;
using Flow.Launcher.ViewModel;
using Microsoft.Win32;
using ModernWpf.Controls;
using DataObject = System.Windows.DataObject;
using Key = System.Windows.Input.Key;
using MouseButtons = System.Windows.Forms.MouseButtons;
using NotifyIcon = System.Windows.Forms.NotifyIcon;
using Screen = System.Windows.Forms.Screen;
namespace Flow.Launcher
{
@ -96,7 +95,6 @@ namespace Flow.Launcher
InitSoundEffects();
DataObject.AddPastingHandler(QueryTextBox, QueryTextBox_OnPaste);
SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;
_viewModel.ActualApplicationThemeChanged += ViewModel_ActualApplicationThemeChanged;
}
@ -532,7 +530,7 @@ namespace Flow.Launcher
double yRatio = mousePos.Y / maxHeight;
// Current monitor information
var screen = Screen.FromHandle(new WindowInteropHelper(this).Handle);
var screen = MonitorInfo.GetNearestDisplayMonitor(new WindowInteropHelper(this).Handle);
var workingArea = screen.WorkingArea;
var screenLeftTop = Win32Helper.TransformPixelsToDIP(this, workingArea.X, workingArea.Y);
@ -670,6 +668,16 @@ namespace Flow.Launcher
handled = true;
}
break;
case Win32Helper.WM_POWERBROADCAST: // Handle power broadcast messages
// https://learn.microsoft.com/en-us/windows/win32/power/wm-powerbroadcast
if (wParam.ToInt32() == Win32Helper.PBT_APMRESUMEAUTOMATIC)
{
// Fix for sound not playing after sleep / hibernate
// https://stackoverflow.com/questions/64805186/mediaplayer-doesnt-play-after-computer-sleeps
InitSoundEffects();
}
handled = true;
break;
}
return IntPtr.Zero;
@ -679,16 +687,6 @@ namespace Flow.Launcher
#region Window Sound Effects
private void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
{
// Fix for sound not playing after sleep / hibernate
// https://stackoverflow.com/questions/64805186/mediaplayer-doesnt-play-after-computer-sleeps
if (e.Mode == PowerModes.Resume)
{
InitSoundEffects();
}
}
private void InitSoundEffects()
{
if (_settings.WMPInstalled)
@ -954,36 +952,36 @@ namespace Flow.Launcher
}
}
private Screen SelectedScreen()
private MonitorInfo SelectedScreen()
{
Screen screen;
MonitorInfo screen;
switch (_settings.SearchWindowScreen)
{
case SearchWindowScreens.Cursor:
screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position);
break;
case SearchWindowScreens.Primary:
screen = Screen.PrimaryScreen;
screen = MonitorInfo.GetCursorDisplayMonitor();
break;
case SearchWindowScreens.Focus:
var foregroundWindowHandle = Win32Helper.GetForegroundWindow();
screen = Screen.FromHandle(foregroundWindowHandle);
screen = MonitorInfo.GetNearestDisplayMonitor(Win32Helper.GetForegroundWindow());
break;
case SearchWindowScreens.Primary:
screen = MonitorInfo.GetPrimaryDisplayMonitor();
break;
case SearchWindowScreens.Custom:
if (_settings.CustomScreenNumber <= Screen.AllScreens.Length)
screen = Screen.AllScreens[_settings.CustomScreenNumber - 1];
var allScreens = MonitorInfo.GetDisplayMonitors();
if (_settings.CustomScreenNumber <= allScreens.Count)
screen = allScreens[_settings.CustomScreenNumber - 1];
else
screen = Screen.AllScreens[0];
screen = allScreens[0];
break;
default:
screen = Screen.AllScreens[0];
screen = MonitorInfo.GetDisplayMonitors()[0];
break;
}
return screen ?? Screen.AllScreens[0];
return screen ?? MonitorInfo.GetDisplayMonitors()[0];
}
private double HorizonCenter(Screen screen)
private double HorizonCenter(MonitorInfo screen)
{
var dip1 = Win32Helper.TransformPixelsToDIP(this, screen.WorkingArea.X, 0);
var dip2 = Win32Helper.TransformPixelsToDIP(this, screen.WorkingArea.Width, 0);
@ -991,7 +989,7 @@ namespace Flow.Launcher
return left;
}
private double VerticalCenter(Screen screen)
private double VerticalCenter(MonitorInfo screen)
{
var dip1 = Win32Helper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y);
var dip2 = Win32Helper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Height);
@ -999,7 +997,7 @@ namespace Flow.Launcher
return top;
}
private double HorizonRight(Screen screen)
private double HorizonRight(MonitorInfo screen)
{
var dip1 = Win32Helper.TransformPixelsToDIP(this, screen.WorkingArea.X, 0);
var dip2 = Win32Helper.TransformPixelsToDIP(this, screen.WorkingArea.Width, 0);
@ -1007,14 +1005,14 @@ namespace Flow.Launcher
return left;
}
private double HorizonLeft(Screen screen)
private double HorizonLeft(MonitorInfo screen)
{
var dip1 = Win32Helper.TransformPixelsToDIP(this, screen.WorkingArea.X, 0);
var left = dip1.X + 10;
return left;
}
public double VerticalTop(Screen screen)
private double VerticalTop(MonitorInfo screen)
{
var dip1 = Win32Helper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y);
var top = dip1.Y + 10;
@ -1443,7 +1441,6 @@ namespace Flow.Launcher
animationSoundWMP?.Close();
animationSoundWPF?.Dispose();
_viewModel.ActualApplicationThemeChanged -= ViewModel_ActualApplicationThemeChanged;
SystemEvents.PowerModeChanged -= SystemEvents_PowerModeChanged;
}
_disposed = true;

View file

@ -1,10 +1,10 @@
using System;
using System.IO;
using System.Windows;
using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Media.Animation;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Plugin.SharedModels;
namespace Flow.Launcher
{
@ -16,7 +16,7 @@ namespace Flow.Launcher
public Msg()
{
InitializeComponent();
var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position);
var screen = MonitorInfo.GetCursorDisplayMonitor();
var dipWorkingArea = Win32Helper.TransformPixelsToDIP(this,
screen.WorkingArea.Width,
screen.WorkingArea.Height);

View file

@ -1,10 +1,10 @@
using System;
using System.IO;
using System.Windows;
using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Media.Animation;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Plugin.SharedModels;
namespace Flow.Launcher
{
@ -16,7 +16,7 @@ namespace Flow.Launcher
public MsgWithButton()
{
InitializeComponent();
var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position);
var screen = MonitorInfo.GetCursorDisplayMonitor();
var dipWorkingArea = Win32Helper.TransformPixelsToDIP(this,
screen.WorkingArea.Width,
screen.WorkingArea.Height);

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
@ -111,9 +111,9 @@ public partial class SettingsPaneGeneralViewModel : BaseModel
{
get
{
var screens = Screen.AllScreens;
var screens = MonitorInfo.GetDisplayMonitors();
var screenNumbers = new List<int>();
for (int i = 1; i <= screens.Length; i++)
for (int i = 1; i <= screens.Count; i++)
{
screenNumbers.Add(i);
}

View file

@ -7,10 +7,10 @@ using System.Windows.Interop;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin.SharedModels;
using Flow.Launcher.SettingPages.Views;
using Flow.Launcher.ViewModel;
using ModernWpf.Controls;
using Screen = System.Windows.Forms.Screen;
namespace Flow.Launcher;
@ -202,7 +202,7 @@ public partial class SettingWindow
private static bool IsPositionValid(double top, double left)
{
foreach (var screen in Screen.AllScreens)
foreach (var screen in MonitorInfo.GetDisplayMonitors())
{
var workingArea = screen.WorkingArea;
@ -217,7 +217,7 @@ public partial class SettingWindow
private double WindowLeft()
{
var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position);
var screen = MonitorInfo.GetCursorDisplayMonitor();
var dip1 = Win32Helper.TransformPixelsToDIP(this, screen.WorkingArea.X, 0);
var dip2 = Win32Helper.TransformPixelsToDIP(this, screen.WorkingArea.Width, 0);
var left = (dip2.X - ActualWidth) / 2 + dip1.X;
@ -226,7 +226,7 @@ public partial class SettingWindow
private double WindowTop()
{
var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position);
var screen = MonitorInfo.GetCursorDisplayMonitor();
var dip1 = Win32Helper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y);
var dip2 = Win32Helper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Height);
var top = (dip2.Y - ActualHeight) / 2 + dip1.Y - 20;

View file

@ -16,9 +16,9 @@
},
"Fody": {
"type": "Direct",
"requested": "[6.5.5, )",
"resolved": "6.5.5",
"contentHash": "Krca41L/PDva1VsmDec5n52cQZxQAQp/bsHdzsNi8iLLI0lqKL94fNIkNaC8tVolUkCyWsbzvxfxJCeD2789fA=="
"requested": "[6.9.2, )",
"resolved": "6.9.2",
"contentHash": "YBHobPGogb0vYhGYIxn/ndWqTjNWZveDi5jdjrcshL2vjwU3gQGyDeI7vGgye+2rAM5fGRvlLgNWLW3DpviS/w=="
},
"MdXaml": {
"type": "Direct",
@ -71,41 +71,41 @@
},
"Microsoft.Extensions.DependencyInjection": {
"type": "Direct",
"requested": "[7.0.0, )",
"resolved": "7.0.0",
"contentHash": "elNeOmkeX3eDVG6pYVeV82p29hr+UKDaBhrZyWvWLw/EVZSYEkZlQdkp0V39k/Xehs2Qa0mvoCvkVj3eQxNQ1Q==",
"requested": "[9.0.7, )",
"resolved": "9.0.7",
"contentHash": "i05AYA91vgq0as84ROVCyltD2gnxaba/f1Qw2rG7mUsS0gv8cPTr1Gm7jPQHq7JTr4MJoQUcanLVs16tIOUJaQ==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0"
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.7"
}
},
"Microsoft.Extensions.Hosting": {
"type": "Direct",
"requested": "[7.0.1, )",
"resolved": "7.0.1",
"contentHash": "aoeMou6XSW84wiqd895OdaGyO9PfH6nohQJ0XBcshRDafbdIU6PQIVl8TpOCssPYq3ciRseP5064hbFyCR9J9w==",
"requested": "[9.0.7, )",
"resolved": "9.0.7",
"contentHash": "Dkv55VfitwJjPUk9mFHxT9MJAd8su7eJNaCHhBU/Y9xFqw3ZNHwrpeptXeaXiaPtfQq+alMmawIz1Impk5pHkQ==",
"dependencies": {
"Microsoft.Extensions.Configuration": "7.0.0",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0",
"Microsoft.Extensions.Configuration.Binder": "7.0.3",
"Microsoft.Extensions.Configuration.CommandLine": "7.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "7.0.0",
"Microsoft.Extensions.Configuration.FileExtensions": "7.0.0",
"Microsoft.Extensions.Configuration.Json": "7.0.0",
"Microsoft.Extensions.Configuration.UserSecrets": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.FileProviders.Abstractions": "7.0.0",
"Microsoft.Extensions.FileProviders.Physical": "7.0.0",
"Microsoft.Extensions.Hosting.Abstractions": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0",
"Microsoft.Extensions.Logging.Abstractions": "7.0.0",
"Microsoft.Extensions.Logging.Configuration": "7.0.0",
"Microsoft.Extensions.Logging.Console": "7.0.0",
"Microsoft.Extensions.Logging.Debug": "7.0.0",
"Microsoft.Extensions.Logging.EventLog": "7.0.0",
"Microsoft.Extensions.Logging.EventSource": "7.0.0",
"Microsoft.Extensions.Options": "7.0.1",
"System.Diagnostics.DiagnosticSource": "7.0.1"
"Microsoft.Extensions.Configuration": "9.0.7",
"Microsoft.Extensions.Configuration.Abstractions": "9.0.7",
"Microsoft.Extensions.Configuration.Binder": "9.0.7",
"Microsoft.Extensions.Configuration.CommandLine": "9.0.7",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "9.0.7",
"Microsoft.Extensions.Configuration.FileExtensions": "9.0.7",
"Microsoft.Extensions.Configuration.Json": "9.0.7",
"Microsoft.Extensions.Configuration.UserSecrets": "9.0.7",
"Microsoft.Extensions.DependencyInjection": "9.0.7",
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.7",
"Microsoft.Extensions.Diagnostics": "9.0.7",
"Microsoft.Extensions.FileProviders.Abstractions": "9.0.7",
"Microsoft.Extensions.FileProviders.Physical": "9.0.7",
"Microsoft.Extensions.Hosting.Abstractions": "9.0.7",
"Microsoft.Extensions.Logging": "9.0.7",
"Microsoft.Extensions.Logging.Abstractions": "9.0.7",
"Microsoft.Extensions.Logging.Configuration": "9.0.7",
"Microsoft.Extensions.Logging.Console": "9.0.7",
"Microsoft.Extensions.Logging.Debug": "9.0.7",
"Microsoft.Extensions.Logging.EventLog": "9.0.7",
"Microsoft.Extensions.Logging.EventSource": "9.0.7",
"Microsoft.Extensions.Options": "9.0.7"
}
},
"Microsoft.Toolkit.Uwp.Notifications": {
@ -128,11 +128,11 @@
},
"PropertyChanged.Fody": {
"type": "Direct",
"requested": "[3.4.0, )",
"resolved": "3.4.0",
"contentHash": "IAZyq0uolKo2WYm4mjx+q7A8fSGFT0x2e1s3y+ODn4JI0kqTDoo9GF2tdaypUzRFJZfdMxfC5HZW9QzdJLtOnA==",
"requested": "[4.1.0, )",
"resolved": "4.1.0",
"contentHash": "6v+f9cI8YjnZH2WBHuOqWEAo8DFFNGFIdU8xD3AsL6fhV6Y8oAmVWd7XKk49t8DpeUBwhR/X+97+6Epvek0Y3A==",
"dependencies": {
"Fody": "6.5.1"
"Fody": "6.6.4"
}
},
"SemanticVersioning": {
@ -143,9 +143,9 @@
},
"TaskScheduler": {
"type": "Direct",
"requested": "[2.12.1, )",
"resolved": "2.12.1",
"contentHash": "DzSVmVs0i5yHmuDy9ZMcTtKg48GU0aEFBbhp2XJrzA4saTRec/KbU5aGE/4P4FE499G3PDx9KPOHysoKzS/i3g==",
"requested": "[2.12.2, )",
"resolved": "2.12.2",
"contentHash": "glpAb3VrwfdAofp6PIyAzL0ZeTV7XUJ8muu0oZoTeyU5jtk2sMJ6QAMRRuFbovcaj+SBJiEUGklxIWOqQoxshA==",
"dependencies": {
"Microsoft.Win32.Registry": "5.0.0",
"System.Diagnostics.EventLog": "9.0.2",
@ -154,9 +154,9 @@
},
"VirtualizingWrapPanel": {
"type": "Direct",
"requested": "[2.1.1, )",
"resolved": "2.1.1",
"contentHash": "Fc/yjU8jqC3qpIsNxeO5RjK2lPU7xnJtBLMSQ6L9egA2PyJLQeVeXpG8WBb5N1kN15rlJEYG8dHWJ5qUGgaNrg=="
"requested": "[2.3.0, )",
"resolved": "2.3.0",
"contentHash": "Dpmtcpn2HqAWZR0NkN7Qd4YCjf+sdQcemIMKm2suZVbOIB9NsmKZnYaQDIpXWTh87a9+nArVto6Od1cM2ohzCQ=="
},
"AvalonEdit": {
"type": "Transitive",
@ -173,8 +173,8 @@
},
"BitFaster.Caching": {
"type": "Transitive",
"resolved": "2.5.3",
"contentHash": "Vo/39qcam5Xe+DbyfH0JZyqPswdOoa7jv4PGtRJ6Wj8AU+aZ+TuJRlJcIe+MQjRTJwliI8k8VSQpN8sEoBIv2g=="
"resolved": "2.5.4",
"contentHash": "1QroTY1PVCZOSG9FnkkCrmCKk/+bZCgI/YXq376HnYwUDJ4Ho0EaV4YaA/5v5WYLnwIwIO7RZkdWbg9pxIpueQ=="
},
"DeltaCompressionDotNet": {
"type": "Transitive",
@ -196,8 +196,8 @@
},
"FSharp.Core": {
"type": "Transitive",
"resolved": "9.0.201",
"contentHash": "Ozq4T0ISTkqTYJ035XW/JkdDDaXofbykvfyVwkjLSqaDZ/4uNXfpf92cjcMI9lf9CxWqmlWHScViPh/4AvnWcw=="
"resolved": "9.0.300",
"contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ=="
},
"HtmlAgilityPack": {
"type": "Transitive",
@ -235,243 +235,263 @@
},
"MessagePack": {
"type": "Transitive",
"resolved": "2.5.187",
"contentHash": "uW4j8m4Nc+2Mk5n6arOChavJ9bLjkis0qWASOj2h2OwmfINuzYv+mjCHUymrYhmyyKTu3N+ObtTXAY4uQ7jIhg==",
"resolved": "2.5.192",
"contentHash": "Jtle5MaFeIFkdXtxQeL9Tu2Y3HsAQGoSntOzrn6Br/jrl6c8QmG22GEioT5HBtZJR0zw0s46OnKU8ei2M3QifA==",
"dependencies": {
"MessagePack.Annotations": "2.5.187",
"MessagePack.Annotations": "2.5.192",
"Microsoft.NET.StringTools": "17.6.3"
}
},
"MessagePack.Annotations": {
"type": "Transitive",
"resolved": "2.5.187",
"contentHash": "/IvvMMS8opvlHjEJ/fR2Cal4Co726Kj77Z8KiohFhuHfLHHmb9uUxW5+tSCL4ToKFfkQlrS3HD638mRq83ySqA=="
"resolved": "2.5.192",
"contentHash": "jaJuwcgovWIZ8Zysdyf3b7b34/BrADw4v82GaEZymUhDd3ScMPrYd/cttekeDteJJPXseJxp04yTIcxiVUjTWg=="
},
"Meziantou.Framework.Win32.Jobs": {
"type": "Transitive",
"resolved": "3.4.0",
"contentHash": "5GGLckfpwoC1jznInEYfK2INrHyD7K1RtwZJ98kNPKBU6jeu24i4zfgDGHHfb+eK3J+eFPAxo0aYcbUxNXIbNw=="
"resolved": "3.4.3",
"contentHash": "REjInKnQ0OrhjjtSMPQtLtdURctCroB4L8Sd2gjTOYDysklvsdnrStx1tHS7uLv+fSyFF3aazZmo5Ka0v1oz/w=="
},
"Microsoft.Extensions.Configuration": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "tldQUBWt/xeH2K7/hMPPo5g8zuLc3Ro9I5d4o/XrxvxOCA2EZBtW7bCHHTc49fcBtvB8tLAb/Qsmfrq+2SJ4vA==",
"resolved": "9.0.7",
"contentHash": "oxGR51+w5cXm5B9gU6XwpAB2sTiyPSmZm7hjvv0rzRnmL5o/KZzE103AuQj7sK26OBupjVzU/bZxDWvvU4nhEg==",
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0",
"Microsoft.Extensions.Primitives": "7.0.0"
"Microsoft.Extensions.Configuration.Abstractions": "9.0.7",
"Microsoft.Extensions.Primitives": "9.0.7"
}
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "f34u2eaqIjNO9YLHBz8rozVZ+TcFiFs0F3r7nUJd7FRkVSxk8u4OpoK226mi49MwexHOR2ibP9MFvRUaLilcQQ==",
"resolved": "9.0.7",
"contentHash": "lut/kiVvNsQ120VERMUYSFhpXPpKjjql+giy03LesASPBBcC0o6+aoFdzJH9GaYpFTQ3fGVhVjKjvJDoAW5/IQ==",
"dependencies": {
"Microsoft.Extensions.Primitives": "7.0.0"
"Microsoft.Extensions.Primitives": "9.0.7"
}
},
"Microsoft.Extensions.Configuration.Binder": {
"type": "Transitive",
"resolved": "7.0.3",
"contentHash": "1eRFwJBrkkncTpvh6mivB8zg4uBVm6+Y6stEJERrVEqZZc8Hvf+N1iIgj2ySYDUQko4J1Gw1rLf1M8bG83F0eA==",
"resolved": "9.0.7",
"contentHash": "ExY+zXHhU4o9KC2alp3ZdLWyVWVRSn5INqax5ABk+HEOHlAHzomhJ7ek9HHliyOMiVGoYWYaMFOGr9q59mSAGA==",
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
"Microsoft.Extensions.Configuration.Abstractions": "9.0.7"
}
},
"Microsoft.Extensions.Configuration.CommandLine": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "a8Iq8SCw5m8W5pZJcPCgBpBO4E89+NaObPng+ApIhrGSv9X4JPrcFAaGM4sDgR0X83uhLgsNJq8VnGP/wqhr8A==",
"resolved": "9.0.7",
"contentHash": "LqwdkMNFeRyuqExewBSaWj8roEgZH8JQ9zEAmHl5ZFcnhCvjAdHICdYVRIiSEq9RWGB731LL8kZJM8tdTKEscA==",
"dependencies": {
"Microsoft.Extensions.Configuration": "7.0.0",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
"Microsoft.Extensions.Configuration": "9.0.7",
"Microsoft.Extensions.Configuration.Abstractions": "9.0.7"
}
},
"Microsoft.Extensions.Configuration.EnvironmentVariables": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "RIkfqCkvrAogirjsqSrG1E1FxgrLsOZU2nhRbl07lrajnxzSU2isj2lwQah0CtCbLWo/pOIukQzM1GfneBUnxA==",
"resolved": "9.0.7",
"contentHash": "R8kgazVpDr4k1K7MeWPLAwsi5VpwrhE3ubXK38D9gpHEvf9XhZhJ8kWHKK00LDg5hJ7pMQLggdZ7XFdQ5182Ug==",
"dependencies": {
"Microsoft.Extensions.Configuration": "7.0.0",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0"
"Microsoft.Extensions.Configuration": "9.0.7",
"Microsoft.Extensions.Configuration.Abstractions": "9.0.7"
}
},
"Microsoft.Extensions.Configuration.FileExtensions": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "xk2lRJ1RDuqe57BmgvRPyCt6zyePKUmvT6iuXqiHR+/OIIgWVR8Ff5k2p6DwmqY8a17hx/OnrekEhziEIeQP6Q==",
"resolved": "9.0.7",
"contentHash": "3LVg32iMfR9ENeegXAo73L+877iOcQauLJsXlKZNVSsLA/HbPgClZdeMGdjLSkaidYw3l02XbXTlOdGYNgu91Q==",
"dependencies": {
"Microsoft.Extensions.Configuration": "7.0.0",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0",
"Microsoft.Extensions.FileProviders.Abstractions": "7.0.0",
"Microsoft.Extensions.FileProviders.Physical": "7.0.0",
"Microsoft.Extensions.Primitives": "7.0.0"
"Microsoft.Extensions.Configuration": "9.0.7",
"Microsoft.Extensions.Configuration.Abstractions": "9.0.7",
"Microsoft.Extensions.FileProviders.Abstractions": "9.0.7",
"Microsoft.Extensions.FileProviders.Physical": "9.0.7",
"Microsoft.Extensions.Primitives": "9.0.7"
}
},
"Microsoft.Extensions.Configuration.Json": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "LDNYe3uw76W35Jci+be4LDf2lkQZe0A7EEYQVChFbc509CpZ4Iupod8li4PUXPBhEUOFI/rlQNf5xkzJRQGvtA==",
"resolved": "9.0.7",
"contentHash": "3HQV326liEInT9UKEc+k73f1ECwNhvDS/DJAe5WvtMKDJTJqTH2ujrUC2ZlK/j6pXyPbV9f0Ku8JB20JveGImg==",
"dependencies": {
"Microsoft.Extensions.Configuration": "7.0.0",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0",
"Microsoft.Extensions.Configuration.FileExtensions": "7.0.0",
"Microsoft.Extensions.FileProviders.Abstractions": "7.0.0",
"System.Text.Json": "7.0.0"
"Microsoft.Extensions.Configuration": "9.0.7",
"Microsoft.Extensions.Configuration.Abstractions": "9.0.7",
"Microsoft.Extensions.Configuration.FileExtensions": "9.0.7",
"Microsoft.Extensions.FileProviders.Abstractions": "9.0.7"
}
},
"Microsoft.Extensions.Configuration.UserSecrets": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "33HPW1PmB2RS0ietBQyvOxjp4O3wlt+4tIs8KPyMn1kqp04goiZGa7+3mc69NRLv6bphkLDy0YR7Uw3aZyf8Zw==",
"resolved": "9.0.7",
"contentHash": "ouDuPgRdeF4TJXKUh+lbm6QwyWwnCy+ijiqfFM2cI5NmW83MwKg1WNp2nCdMVcwQW8wJXteF/L9lA6ZPS3bCIQ==",
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0",
"Microsoft.Extensions.Configuration.Json": "7.0.0",
"Microsoft.Extensions.FileProviders.Abstractions": "7.0.0",
"Microsoft.Extensions.FileProviders.Physical": "7.0.0"
"Microsoft.Extensions.Configuration.Abstractions": "9.0.7",
"Microsoft.Extensions.Configuration.Json": "9.0.7",
"Microsoft.Extensions.FileProviders.Abstractions": "9.0.7",
"Microsoft.Extensions.FileProviders.Physical": "9.0.7"
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "h3j/QfmFN4S0w4C2A6X7arXij/M/OVw3uQHSOFxnND4DyAzO1F9eMX7Eti7lU/OkSthEE0WzRsfT/Dmx86jzCw=="
"resolved": "9.0.7",
"contentHash": "iPK1FxbGFr2Xb+4Y+dTYI8Gupu9pOi8I3JPuPsrogUmEhe2hzZ9LpCmolMEBhVDo2ikcSr7G5zYiwaapHSQTew=="
},
"Microsoft.Extensions.Diagnostics": {
"type": "Transitive",
"resolved": "9.0.7",
"contentHash": "6ykfInm6yw7pPHJACgnrPUXxUWVslFnzad44K/siXk6Ovan6fNMnXxI5X9vphHJuZ4JbMOdPIgsfTmLD+Dyxug==",
"dependencies": {
"Microsoft.Extensions.Configuration": "9.0.7",
"Microsoft.Extensions.Diagnostics.Abstractions": "9.0.7",
"Microsoft.Extensions.Options.ConfigurationExtensions": "9.0.7"
}
},
"Microsoft.Extensions.Diagnostics.Abstractions": {
"type": "Transitive",
"resolved": "9.0.7",
"contentHash": "d39Ov1JpeWCGLCOTinlaDkujhrSAQ0HFxb7Su1BjhCKBfmDcQ6Ia1i3JI6kd3NFgwi1dexTunu82daDNwt7E6w==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.7",
"Microsoft.Extensions.Options": "9.0.7"
}
},
"Microsoft.Extensions.FileProviders.Abstractions": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "NyawiW9ZT/liQb34k9YqBSNPLuuPkrjMgQZ24Y/xXX1RoiBkLUdPMaQTmxhZ5TYu8ZKZ9qayzil75JX95vGQUg==",
"resolved": "9.0.7",
"contentHash": "y9djCca1cz/oz/J8jTxtoecNiNvaiGBJeWd7XOPxonH+FnfHqcfslJMcSr5JMinmWFyS7eh3C9L6m6oURZ5lSA==",
"dependencies": {
"Microsoft.Extensions.Primitives": "7.0.0"
"Microsoft.Extensions.Primitives": "9.0.7"
}
},
"Microsoft.Extensions.FileProviders.Physical": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "K8D2MTR+EtzkbZ8z80LrG7Ur64R7ZZdRLt1J5cgpc/pUWl0C6IkAUapPuK28oionHueCPELUqq0oYEvZfalNdg==",
"resolved": "9.0.7",
"contentHash": "JYEPYrb+YBpFTCdmSBrk8cg3wAi1V4so7ccq04qbhg3FQHQqgJk28L3heEOKMXcZobOBUjTnGCFJD49Ez9kG5w==",
"dependencies": {
"Microsoft.Extensions.FileProviders.Abstractions": "7.0.0",
"Microsoft.Extensions.FileSystemGlobbing": "7.0.0",
"Microsoft.Extensions.Primitives": "7.0.0"
"Microsoft.Extensions.FileProviders.Abstractions": "9.0.7",
"Microsoft.Extensions.FileSystemGlobbing": "9.0.7",
"Microsoft.Extensions.Primitives": "9.0.7"
}
},
"Microsoft.Extensions.FileSystemGlobbing": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "2jONjKHiF+E92ynz2ZFcr9OvxIw+rTGMPEH+UZGeHTEComVav93jQUWGkso8yWwVBcEJGcNcZAaqY01FFJcj7w=="
"resolved": "9.0.7",
"contentHash": "5VKpTH2ME0SSs0lrtkpKgjCeHzXR5ka/H+qThPwuWi78wHubApZ/atD7w69FDt0OOM7UMV6LIbkqEQgoby4IXA=="
},
"Microsoft.Extensions.Hosting.Abstractions": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "43n9Je09z0p/7ViPxfRqs5BUItRLNVh5b6JH40F2Agkh2NBsY/jpNYTtbCcxrHCsA3oRmbR6RJBzUutB4VZvNQ==",
"resolved": "9.0.7",
"contentHash": "yG2JCXAR+VqI1mKqynLPNJlNlrUJeEISEpX4UznOp2uM4IEFz3pDDauzyMvTjICutEJtOigJ1yWBvxbaIlibBw==",
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.FileProviders.Abstractions": "7.0.0"
"Microsoft.Extensions.Configuration.Abstractions": "9.0.7",
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.7",
"Microsoft.Extensions.Diagnostics.Abstractions": "9.0.7",
"Microsoft.Extensions.FileProviders.Abstractions": "9.0.7",
"Microsoft.Extensions.Logging.Abstractions": "9.0.7"
}
},
"Microsoft.Extensions.Logging": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "Nw2muoNrOG5U5qa2ZekXwudUn2BJcD41e65zwmDHb1fQegTX66UokLWZkJRpqSSHXDOWZ5V0iqhbxOEky91atA==",
"resolved": "9.0.7",
"contentHash": "fdIeQpXYV8yxSWG03cCbU2Otdrq4NWuhnQLXokWLv3L9YcK055E7u8WFJvP+uuP4CFeCEoqZQL4yPcjuXhCZrg==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.Logging.Abstractions": "7.0.0",
"Microsoft.Extensions.Options": "7.0.0"
"Microsoft.Extensions.DependencyInjection": "9.0.7",
"Microsoft.Extensions.Logging.Abstractions": "9.0.7",
"Microsoft.Extensions.Options": "9.0.7"
}
},
"Microsoft.Extensions.Logging.Abstractions": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "kmn78+LPVMOWeITUjIlfxUPDsI0R6G0RkeAMBmQxAJ7vBJn4q2dTva7pWi65ceN5vPGjJ9q/Uae2WKgvfktJAw=="
"resolved": "9.0.7",
"contentHash": "sMM6NEAdUTE/elJ2wqjOi0iBWqZmSyaTByLF9e8XHv6DRJFFnOe0N+s8Uc6C91E4SboQCfLswaBIZ+9ZXA98AA==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.7"
}
},
"Microsoft.Extensions.Logging.Configuration": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "FLDA0HcffKA8ycoDQLJuCNGIE42cLWPxgdQGRBaSzZrYTkMBjnf9zrr8pGT06psLq9Q+RKWmmZczQ9bCrXEBcA==",
"resolved": "9.0.7",
"contentHash": "AEBty9rvFGvdFRqgIDEhQmiCnIfQWyzVoOZrO244cfu+n9M+wI1QLDpuROVILlplIBtLVmOezAF7d1H3Qog6Xw==",
"dependencies": {
"Microsoft.Extensions.Configuration": "7.0.0",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0",
"Microsoft.Extensions.Configuration.Binder": "7.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0",
"Microsoft.Extensions.Logging.Abstractions": "7.0.0",
"Microsoft.Extensions.Options": "7.0.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "7.0.0"
"Microsoft.Extensions.Configuration": "9.0.7",
"Microsoft.Extensions.Configuration.Abstractions": "9.0.7",
"Microsoft.Extensions.Configuration.Binder": "9.0.7",
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.7",
"Microsoft.Extensions.Logging": "9.0.7",
"Microsoft.Extensions.Logging.Abstractions": "9.0.7",
"Microsoft.Extensions.Options": "9.0.7",
"Microsoft.Extensions.Options.ConfigurationExtensions": "9.0.7"
}
},
"Microsoft.Extensions.Logging.Console": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "qt5n8bHLZPUfuRnFxJKW5q9ZwOTncdh96rtWzWpX3Y/064MlxzCSw2ELF5Jlwdo+Y4wK3I47NmUTFsV7Sg8rqg==",
"resolved": "9.0.7",
"contentHash": "pEHlNa8iCfKsBFA3YVDn/8EicjSU/m8uDfyoR0i4svONDss4Yu9Kznw53E/TyI+TveTo7CwRid4kfd4pLYXBig==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0",
"Microsoft.Extensions.Logging.Abstractions": "7.0.0",
"Microsoft.Extensions.Logging.Configuration": "7.0.0",
"Microsoft.Extensions.Options": "7.0.0",
"System.Text.Json": "7.0.0"
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.7",
"Microsoft.Extensions.Logging": "9.0.7",
"Microsoft.Extensions.Logging.Abstractions": "9.0.7",
"Microsoft.Extensions.Logging.Configuration": "9.0.7",
"Microsoft.Extensions.Options": "9.0.7"
}
},
"Microsoft.Extensions.Logging.Debug": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "tFGGyPDpJ8ZdQdeckCArP7nZuoY3am9zJWuvp4OD1bHq65S0epW9BNHzAWeaIO4eYwWnGm1jRNt3vRciH8H6MA==",
"resolved": "9.0.7",
"contentHash": "MxzZj7XbsYJwfjclVTjJym2/nVIkksu7l7tC/4HYy+YRdDmpE4B+hTzCXu3BNfLNhdLPZsWpyXuYe6UGgWDm3g==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0",
"Microsoft.Extensions.Logging.Abstractions": "7.0.0"
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.7",
"Microsoft.Extensions.Logging": "9.0.7",
"Microsoft.Extensions.Logging.Abstractions": "9.0.7"
}
},
"Microsoft.Extensions.Logging.EventLog": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "Rp7cYL9xQRVTgjMl77H5YDxszAaO+mlA+KT0BnLSVhuCoKQQOOs1sSK2/x8BK2dZ/lKeAC/CVF+20Ef2dpKXwg==",
"resolved": "9.0.7",
"contentHash": "usrMVsY7c8M8fESt34Y3eEIQIlRlKXfPDlI+vYEb6xT7SUjhua2ey3NpHgQktiTgz8Uo5RiWqGD8ieiyo2WaDA==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0",
"Microsoft.Extensions.Logging.Abstractions": "7.0.0",
"Microsoft.Extensions.Options": "7.0.0",
"System.Diagnostics.EventLog": "7.0.0"
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.7",
"Microsoft.Extensions.Logging": "9.0.7",
"Microsoft.Extensions.Logging.Abstractions": "9.0.7",
"Microsoft.Extensions.Options": "9.0.7",
"System.Diagnostics.EventLog": "9.0.7"
}
},
"Microsoft.Extensions.Logging.EventSource": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "MxQXndQFviIyOPqyMeLNshXnmqcfzEHE2wWcr7BF1unSisJgouZ3tItnq+aJLGPojrW8OZSC/ZdRoR6wAq+c7w==",
"resolved": "9.0.7",
"contentHash": "/wwi6ckTEegCExFV6gVToCO7CvysZnmE50fpdkYUsSMh0ue9vRkQ7uOqkHyHol93ASYTEahrp+guMtS/+fZKaA==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.Logging": "7.0.0",
"Microsoft.Extensions.Logging.Abstractions": "7.0.0",
"Microsoft.Extensions.Options": "7.0.0",
"Microsoft.Extensions.Primitives": "7.0.0",
"System.Text.Json": "7.0.0"
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.7",
"Microsoft.Extensions.Logging": "9.0.7",
"Microsoft.Extensions.Logging.Abstractions": "9.0.7",
"Microsoft.Extensions.Options": "9.0.7",
"Microsoft.Extensions.Primitives": "9.0.7"
}
},
"Microsoft.Extensions.Options": {
"type": "Transitive",
"resolved": "7.0.1",
"contentHash": "pZRDYdN1FpepOIfHU62QoBQ6zdAoTvnjxFfqAzEd9Jhb2dfhA5i6jeTdgGgcgTWFRC7oT0+3XrbQu4LjvgX1Nw==",
"resolved": "9.0.7",
"contentHash": "trJnF6cRWgR5uMmHpGoHmM1wOVFdIYlELlkO9zX+RfieK0321Y55zrcs4AaEymKup7dxgEN/uJU25CAcMNQRXw==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.Primitives": "7.0.0"
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.7",
"Microsoft.Extensions.Primitives": "9.0.7"
}
},
"Microsoft.Extensions.Options.ConfigurationExtensions": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "95UnxZkkFdXxF6vSrtJsMHCzkDeSMuUWGs2hDT54cX+U5eVajrCJ3qLyQRW+CtpTt5OJ8bmTvpQVHu1DLhH+cA==",
"resolved": "9.0.7",
"contentHash": "pE/jeAWHEIy/8HsqYA+I1+toTsdvsv+WywAcRoNSvPoFwjOREa8Fqn7D0/i0PbiXsDLFupltTTctliePx8ib4w==",
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0",
"Microsoft.Extensions.Configuration.Binder": "7.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.Options": "7.0.0",
"Microsoft.Extensions.Primitives": "7.0.0"
"Microsoft.Extensions.Configuration.Abstractions": "9.0.7",
"Microsoft.Extensions.Configuration.Binder": "9.0.7",
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.7",
"Microsoft.Extensions.Options": "9.0.7",
"Microsoft.Extensions.Primitives": "9.0.7"
}
},
"Microsoft.Extensions.Primitives": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "um1KU5kxcRp3CNuI8o/GrZtD4AIOXDk+RLsytjZ9QPok3ttLUelLKpilVPuaFT3TFjOhSibUAso0odbOaCDj3Q=="
"resolved": "9.0.7",
"contentHash": "ti/zD9BuuO50IqlvhWQs9GHxkCmoph5BHjGiWKdg2t6Or8XoyAfRJiKag+uvd/fpASnNklfsB01WpZ4fhAe0VQ=="
},
"Microsoft.IO.RecyclableMemoryStream": {
"type": "Transitive",
@ -495,17 +515,26 @@
},
"Microsoft.VisualStudio.Threading": {
"type": "Transitive",
"resolved": "17.12.19",
"contentHash": "eLiGMkMYyaSguqHs3lsrFxy3tAWSLuPEL2pIWRcADMDVAs2xqm3dr1d9QYjiEusTgiClF9KD6OB2NdZP72Oy0Q==",
"resolved": "17.14.15",
"contentHash": "1DrCusT3xNLSlaJg77BsUSAzrhjdZBAvvsS0PMzyPM+fGais6SnISOhqdZQop8VVMIBLsYm2gyF9W7THjgavwA==",
"dependencies": {
"Microsoft.VisualStudio.Threading.Analyzers": "17.12.19",
"Microsoft.VisualStudio.Threading.Analyzers": "17.14.15",
"Microsoft.VisualStudio.Threading.Only": "17.14.15",
"Microsoft.VisualStudio.Validation": "17.8.8"
}
},
"Microsoft.VisualStudio.Threading.Analyzers": {
"type": "Transitive",
"resolved": "17.12.19",
"contentHash": "v3IYeedjoktvZ+GqYmLudxZJngmf/YWIxNT2Uy6QMMN19cvw+nkWoip1Gr1RtnFkUo1MPUVMis4C8Kj8d8DpSQ=="
"resolved": "17.14.15",
"contentHash": "mXQPJsbuUD2ydq4/ffd8h8tSOFCXec+2xJOVNCvXjuMOq/+5EKHq3D2m2MC2+nUaXeFMSt66VS/J4HdKBixgcw=="
},
"Microsoft.VisualStudio.Threading.Only": {
"type": "Transitive",
"resolved": "17.14.15",
"contentHash": "NqONyw1RXyj9P3k5e1uU2k9kc1ptwuU5NJQzG+MPq7vQVHUzBY8HLuJf/N2Rw5H/myD96CVxziDxmjawPuzntw==",
"dependencies": {
"Microsoft.VisualStudio.Validation": "17.8.8"
}
},
"Microsoft.VisualStudio.Validation": {
"type": "Transitive",
@ -523,8 +552,8 @@
},
"Microsoft.Win32.SystemEvents": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "2nXPrhdAyAzir0gLl8Yy8S5Mnm/uBSQQA7jEsILOS1MTyS7DbmV1NgViMtvV1sfCD1ebITpNwb1NIinKeJgUVQ=="
"resolved": "9.0.7",
"contentHash": "lFGY2aGgmMREPJEfOmZcA6v0CLjWVpcfNHRgqYMoSQhy80+GxhYqdW5xe+DCLrVqE1M7/0RpOkIo49/KH/cd/A=="
},
"Mono.Cecil": {
"type": "Transitive",
@ -533,18 +562,18 @@
},
"Nerdbank.Streams": {
"type": "Transitive",
"resolved": "2.11.74",
"contentHash": "r4G7uHHfoo8LCilPOdtf2C+Q5ymHOAXtciT4ZtB2xRlAvv4gPkWBYNAijFblStv3+uidp81j5DP11jMZl4BfJw==",
"resolved": "2.12.87",
"contentHash": "oDKOeKZ865I5X8qmU3IXMyrAnssYEiYWTobPGdrqubN3RtTzEHIv+D6fwhdcfrdhPJzHjCkK/ORztR/IsnmA6g==",
"dependencies": {
"Microsoft.VisualStudio.Threading": "17.10.48",
"Microsoft.VisualStudio.Threading.Only": "17.13.61",
"Microsoft.VisualStudio.Validation": "17.8.8",
"System.IO.Pipelines": "8.0.0"
}
},
"Newtonsoft.Json": {
"type": "Transitive",
"resolved": "13.0.1",
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
"resolved": "13.0.3",
"contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"NHotkey": {
"type": "Transitive",
@ -561,8 +590,16 @@
},
"NLog": {
"type": "Transitive",
"resolved": "4.7.10",
"contentHash": "rcegW7kYOCjl7wX0SzsqpPBqnJ51JKi1WkYb6QBVX0Wc5IgH19Pv4t/co+T0s06OS0Ne44xgkY/mHg0PdrmJow=="
"resolved": "6.0.1",
"contentHash": "qDWiqy8/xdpZKtHna/645KbalwP86N2NFJEzfqhcv+Si4V2iNaEfR/dCneuF/4+Dcwl3f7jHMXj3ndWYftV3Ug=="
},
"NLog.OutputDebugString": {
"type": "Transitive",
"resolved": "6.0.1",
"contentHash": "wwJCQLaHVzuRf8TsXB+EEdrzVvE3dnzCSMQMDgwkw3AXp8VSp3JSVF/Q/H0oEqggKgKhPs13hh3a7svyQr4s3A==",
"dependencies": {
"NLog": "6.0.1"
}
},
"runtime.osx.10.10-x64.CoreCompat.System.Drawing": {
"type": "Transitive",
@ -591,15 +628,14 @@
},
"StreamJsonRpc": {
"type": "Transitive",
"resolved": "2.21.10",
"contentHash": "wjBlFiaE+npUco9Jj4K11EEZfmAg4poRFYhcCJOiVdiHZ3UxapbGemtLNRcVYGXa/p8nqvZ38TfJPHnlrromDg==",
"resolved": "2.22.11",
"contentHash": "TQcqBFswLNpdSJANjhxZmIIe0Yl0kGqzjZ+uHLdhrkxntofvNu6C53XPEEYQ3Wkj8AorKumkuv/VMvTH4BHOZw==",
"dependencies": {
"MessagePack": "2.5.187",
"Microsoft.VisualStudio.Threading": "17.10.48",
"Microsoft.VisualStudio.Threading.Analyzers": "17.10.48",
"MessagePack": "2.5.192",
"Microsoft.VisualStudio.Threading.Only": "17.13.61",
"Microsoft.VisualStudio.Validation": "17.8.8",
"Nerdbank.Streams": "2.11.74",
"Newtonsoft.Json": "13.0.1",
"Nerdbank.Streams": "2.12.87",
"Newtonsoft.Json": "13.0.3",
"System.IO.Pipelines": "8.0.0"
}
},
@ -634,22 +670,17 @@
"System.Runtime": "4.3.0"
}
},
"System.Diagnostics.DiagnosticSource": {
"type": "Transitive",
"resolved": "7.0.1",
"contentHash": "T9SLFxzDp0SreCffRDXSAS5G+lq6E8qP4knHS2IBjwCdx2KEvGnGZsq7gFpselYOda7l6gXsJMD93TQsFj/URA=="
},
"System.Diagnostics.EventLog": {
"type": "Transitive",
"resolved": "9.0.2",
"contentHash": "i+Fe6Fpst/onydFLBGilCr/Eh9OFdlaTU/c3alPp6IbLZXQJOgpIu3l4MOnmsN8fDYq5nAyHSqNIJesc74Yw3Q=="
"resolved": "9.0.7",
"contentHash": "AJ+9fyCtQUImntxAJ9l4PZiCd4iepuk4pm7Qcno7PBIWQnfXlvwKuFsGk2H+QyY69GUVzDP2heELW6ho5BCXUg=="
},
"System.Drawing.Common": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "KIX+oBU38pxkKPxvLcLfIkOV5Ien8ReN78wro7OF5/erwcmortzeFx+iBswlh2Vz6gVne0khocQudGwaO1Ey6A==",
"resolved": "9.0.7",
"contentHash": "1k/Pk7hcM3vP2tfIRRS2ECCCN7ya+hvocsM1JMc4ZDCU6qw7yOuUmqmCDfgXZ4Q4FS6jass2EAai5ByKodDi0g==",
"dependencies": {
"Microsoft.Win32.SystemEvents": "7.0.0"
"Microsoft.Win32.SystemEvents": "9.0.7"
}
},
"System.Globalization": {
@ -764,19 +795,6 @@
"System.Runtime": "4.3.0"
}
},
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "OP6umVGxc0Z0MvZQBVigj4/U31Pw72ITihDWP9WiWDm+q5aoe0GaJivsfYGq53o6dxH7DcXWiCTl7+0o2CGdmg=="
},
"System.Text.Json": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "DaGSsVqKsn/ia6RG8frjwmJonfos0srquhw09TlT8KRw5I43E+4gs+/bZj4K0vShJ5H9imCuXupb4RmS+dBy3w==",
"dependencies": {
"System.Text.Encodings.Web": "7.0.0"
}
},
"System.Threading": {
"type": "Transitive",
"resolved": "4.3.0",
@ -803,8 +821,8 @@
},
"ToolGood.Words.Pinyin": {
"type": "Transitive",
"resolved": "3.0.1.4",
"contentHash": "uQo97618y9yzLDxrnehPN+/tuiOlk5BqieEdwctHZOAS9miMXnHKgMFYVw8CSGXRglyTYXlrW7qtUlU7Fje5Ew=="
"resolved": "3.1.0.3",
"contentHash": "VKcf8sUq/+LyY99WgLhOu7Q32ROEyR30/2xCCj9ADRi45wVC7kpXrYCf9vH1qirkmrIfpL8inoxAbrqAlfXxsQ=="
},
"WpfAnimatedGif": {
"type": "Transitive",
@ -820,13 +838,13 @@
"type": "Project",
"dependencies": {
"Droplex": "[1.7.0, )",
"FSharp.Core": "[9.0.201, )",
"FSharp.Core": "[9.0.300, )",
"Flow.Launcher.Infrastructure": "[1.0.0, )",
"Flow.Launcher.Plugin": "[4.7.0, )",
"Meziantou.Framework.Win32.Jobs": "[3.4.0, )",
"Meziantou.Framework.Win32.Jobs": "[3.4.3, )",
"Microsoft.IO.RecyclableMemoryStream": "[3.0.1, )",
"SemanticVersioning": "[3.0.0, )",
"StreamJsonRpc": "[2.21.10, )",
"StreamJsonRpc": "[2.22.11, )",
"squirrel.windows": "[1.5.2, )"
}
},
@ -834,17 +852,18 @@
"type": "Project",
"dependencies": {
"Ben.Demystifier": "[0.4.1, )",
"BitFaster.Caching": "[2.5.3, )",
"BitFaster.Caching": "[2.5.4, )",
"CommunityToolkit.Mvvm": "[8.4.0, )",
"Flow.Launcher.Plugin": "[4.7.0, )",
"InputSimulator": "[1.0.4, )",
"MemoryPack": "[1.21.4, )",
"Microsoft.VisualStudio.Threading": "[17.12.19, )",
"Microsoft.VisualStudio.Threading": "[17.14.15, )",
"NHotkey.Wpf": "[3.0.0, )",
"NLog": "[4.7.10, )",
"NLog": "[6.0.1, )",
"NLog.OutputDebugString": "[6.0.1, )",
"SharpVectors.Wpf": "[1.8.4.2, )",
"System.Drawing.Common": "[7.0.0, )",
"ToolGood.Words.Pinyin": "[3.0.1.4, )"
"System.Drawing.Common": "[9.0.7, )",
"ToolGood.Words.Pinyin": "[3.1.0.3, )"
}
},
"flow.launcher.plugin": {

View file

@ -45,7 +45,7 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader
}
catch (Exception ex)
{
Main._context.API.LogException(ClassName, $"Failed to register bookmark file monitoring: {bookmarkPath}", ex);
Main.Context.API.LogException(ClassName, $"Failed to register bookmark file monitoring: {bookmarkPath}", ex);
continue;
}
@ -58,7 +58,7 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader
var faviconDbPath = Path.Combine(profile, "Favicons");
if (File.Exists(faviconDbPath))
{
Main._context.API.StopwatchLogInfo(ClassName, $"Load {profileBookmarks.Count} favicons cost", () =>
Main.Context.API.StopwatchLogInfo(ClassName, $"Load {profileBookmarks.Count} favicons cost", () =>
{
LoadFaviconsFromDb(faviconDbPath, profileBookmarks);
});
@ -125,7 +125,7 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader
}
else
{
Main._context.API.LogError(ClassName, $"type property not found for {subElement.GetString()}");
Main.Context.API.LogError(ClassName, $"type property not found for {subElement.GetString()}");
}
}
}
@ -190,7 +190,7 @@ public abstract class ChromiumBookmarkLoader : IBookmarkLoader
}
catch (Exception ex)
{
Main._context.API.LogException(ClassName, $"Failed to extract bookmark favicon: {bookmark.Url}", ex);
Main.Context.API.LogException(ClassName, $"Failed to extract bookmark favicon: {bookmark.Url}", ex);
}
finally
{

View file

@ -9,11 +9,11 @@ internal static class BookmarkLoader
{
internal static MatchResult MatchProgram(Bookmark bookmark, string queryString)
{
var match = Main._context.API.FuzzySearch(queryString, bookmark.Name);
var match = Main.Context.API.FuzzySearch(queryString, bookmark.Name);
if (match.IsSearchPrecisionScoreMet())
return match;
return Main._context.API.FuzzySearch(queryString, bookmark.Url);
return Main.Context.API.FuzzySearch(queryString, bookmark.Url);
}
internal static List<Bookmark> LoadAllBookmarks(Settings setting)

View file

@ -49,7 +49,7 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
}
catch (Exception ex)
{
Main._context.API.LogException(ClassName, $"Failed to register Firefox bookmark file monitoring: {placesPath}", ex);
Main.Context.API.LogException(ClassName, $"Failed to register Firefox bookmark file monitoring: {placesPath}", ex);
return bookmarks;
}
@ -84,7 +84,7 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
var faviconDbPath = Path.Combine(Path.GetDirectoryName(placesPath), "favicons.sqlite");
if (File.Exists(faviconDbPath))
{
Main._context.API.StopwatchLogInfo(ClassName, $"Load {bookmarks.Count} favicons cost", () =>
Main.Context.API.StopwatchLogInfo(ClassName, $"Load {bookmarks.Count} favicons cost", () =>
{
LoadFaviconsFromDb(faviconDbPath, bookmarks);
});
@ -98,7 +98,7 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
}
catch (Exception ex)
{
Main._context.API.LogException(ClassName, $"Failed to load Firefox bookmarks: {placesPath}", ex);
Main.Context.API.LogException(ClassName, $"Failed to load Firefox bookmarks: {placesPath}", ex);
}
// Delete temporary file
@ -111,7 +111,7 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
}
catch (Exception ex)
{
Main._context.API.LogException(ClassName, $"Failed to delete temporary favicon DB: {tempDbPath}", ex);
Main.Context.API.LogException(ClassName, $"Failed to delete temporary favicon DB: {tempDbPath}", ex);
}
return bookmarks;
@ -186,7 +186,7 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
}
catch (Exception ex)
{
Main._context.API.LogException(ClassName, $"Failed to extract Firefox favicon: {bookmark.Url}", ex);
Main.Context.API.LogException(ClassName, $"Failed to extract Firefox favicon: {bookmark.Url}", ex);
}
finally
{

View file

@ -81,7 +81,6 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Flow.Launcher.Infrastructure\Flow.Launcher.Infrastructure.csproj" />
<ProjectReference Include="..\..\Flow.Launcher.Plugin\Flow.Launcher.Plugin.csproj" />
</ItemGroup>
@ -96,7 +95,8 @@
<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="9.0.3" />
<PackageReference Include="Flow.Launcher.Localization" Version="0.0.4" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="9.0.7" />
</ItemGroup>
</Project>

View file

@ -27,9 +27,9 @@ public static class FaviconHelper
}
catch (Exception ex1)
{
Main._context.API.LogException(ClassName, $"Failed to delete temporary favicon DB: {tempDbPath}", ex1);
Main.Context.API.LogException(ClassName, $"Failed to delete temporary favicon DB: {tempDbPath}", ex1);
}
Main._context.API.LogException(ClassName, $"Failed to copy favicon DB: {dbPath}", ex);
Main.Context.API.LogException(ClassName, $"Failed to copy favicon DB: {dbPath}", ex);
return;
}
@ -39,7 +39,7 @@ public static class FaviconHelper
}
catch (Exception ex)
{
Main._context.API.LogException(ClassName, $"Failed to connect to SQLite: {tempDbPath}", ex);
Main.Context.API.LogException(ClassName, $"Failed to connect to SQLite: {tempDbPath}", ex);
}
// Delete temporary file
@ -49,7 +49,7 @@ public static class FaviconHelper
}
catch (Exception ex)
{
Main._context.API.LogException(ClassName, $"Failed to delete temporary favicon DB: {tempDbPath}", ex);
Main.Context.API.LogException(ClassName, $"Failed to delete temporary favicon DB: {tempDbPath}", ex);
}
}
@ -61,7 +61,7 @@ public static class FaviconHelper
}
catch (Exception ex)
{
Main._context.API.LogException(ClassName, $"Failed to save image: {outputPath}", ex);
Main.Context.API.LogException(ClassName, $"Failed to save image: {outputPath}", ex);
}
}

View file

@ -19,7 +19,7 @@ public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContex
internal static string _faviconCacheDir;
internal static PluginInitContext _context;
internal static PluginInitContext Context { get; set; }
internal static Settings _settings;
@ -29,7 +29,7 @@ public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContex
public void Init(PluginInitContext context)
{
_context = context;
Context = context;
_settings = context.API.LoadSettingJsonStorage<Settings>();
@ -42,7 +42,7 @@ public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContex
private static void LoadBookmarksIfEnabled()
{
if (_context.CurrentPluginMetadata.Disabled)
if (Context.CurrentPluginMetadata.Disabled)
{
// Don't load or monitor files if disabled
return;
@ -84,7 +84,7 @@ public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContex
Score = BookmarkLoader.MatchProgram(c, param).Score,
Action = _ =>
{
_context.API.OpenUrl(c.Url);
Context.API.OpenUrl(c.Url);
return true;
},
@ -108,7 +108,7 @@ public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContex
Score = 5,
Action = _ =>
{
_context.API.OpenUrl(c.Url);
Context.API.OpenUrl(c.Url);
return true;
},
ContextData = new BookmarkAttributes { Url = c.Url }
@ -192,12 +192,12 @@ public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContex
public string GetTranslatedPluginTitle()
{
return _context.API.GetTranslation("flowlauncher_plugin_browserbookmark_plugin_name");
return Localize.flowlauncher_plugin_browserbookmark_plugin_name();
}
public string GetTranslatedPluginDescription()
{
return _context.API.GetTranslation("flowlauncher_plugin_browserbookmark_plugin_description");
return Localize.flowlauncher_plugin_browserbookmark_plugin_description();
}
public Control CreateSettingPanel()
@ -211,20 +211,20 @@ public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, IContex
{
new()
{
Title = _context.API.GetTranslation("flowlauncher_plugin_browserbookmark_copyurl_title"),
SubTitle = _context.API.GetTranslation("flowlauncher_plugin_browserbookmark_copyurl_subtitle"),
Title = Localize.flowlauncher_plugin_browserbookmark_copyurl_title(),
SubTitle = Localize.flowlauncher_plugin_browserbookmark_copyurl_subtitle(),
Action = _ =>
{
try
{
_context.API.CopyToClipboard(((BookmarkAttributes)selectedResult.ContextData).Url);
Context.API.CopyToClipboard(((BookmarkAttributes)selectedResult.ContextData).Url);
return true;
}
catch (Exception e)
{
_context.API.LogException(ClassName, "Failed to set url in clipboard", e);
_context.API.ShowMsgError(_context.API.GetTranslation("flowlauncher_plugin_browserbookmark_copy_failed"));
Context.API.LogException(ClassName, "Failed to set url in clipboard", e);
Context.API.ShowMsgError(Localize.flowlauncher_plugin_browserbookmark_copy_failed());
return false;
}
},

View file

@ -1,4 +1,7 @@
namespace Flow.Launcher.Plugin.BrowserBookmark.Models;
using System.Collections.Generic;
using Flow.Launcher.Localization.Attributes;
namespace Flow.Launcher.Plugin.BrowserBookmark.Models;
public class CustomBrowser : BaseModel
{
@ -11,8 +14,11 @@ public class CustomBrowser : BaseModel
get => _name;
set
{
_name = value;
OnPropertyChanged();
if (_name != value)
{
_name = value;
OnPropertyChanged();
}
}
}
@ -21,24 +27,36 @@ public class CustomBrowser : BaseModel
get => _dataDirectoryPath;
set
{
_dataDirectoryPath = value;
OnPropertyChanged();
if (_dataDirectoryPath != value)
{
_dataDirectoryPath = value;
OnPropertyChanged();
}
}
}
public List<BrowserTypeLocalized> AllBrowserTypes { get; } = BrowserTypeLocalized.GetValues();
public BrowserType BrowserType
{
get => _browserType;
set
{
_browserType = value;
OnPropertyChanged();
if (_browserType != value)
{
_browserType = value;
OnPropertyChanged();
}
}
}
}
[EnumLocalize]
public enum BrowserType
{
[EnumLocalizeValue("Chromium")]
Chromium,
[EnumLocalizeValue("Firefox")]
Firefox,
}

View file

@ -5,7 +5,6 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Flow.Launcher.Plugin.BrowserBookmark.Models"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="clr-namespace:Flow.Launcher.Infrastructure.UI;assembly=Flow.Launcher.Infrastructure"
Title="{DynamicResource flowlauncher_plugin_browserbookmark_bookmarkDataSetting}"
Width="550"
Background="{DynamicResource PopuBGColor}"
@ -142,8 +141,10 @@
Margin="5 10 10 0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
ItemsSource="{Binding Source={ui:EnumBindingSource {x:Type local:BrowserType}}}"
SelectedItem="{Binding BrowserType}" />
DisplayMemberPath="Display"
ItemsSource="{Binding AllBrowserTypes}"
SelectedValue="{Binding BrowserType}"
SelectedValuePath="Value" />
<TextBlock
Grid.Row="3"
Grid.Column="0"

View file

@ -1,18 +1,17 @@
using System.ComponentModel;
using Flow.Launcher.Core.Resource;
using Flow.Launcher.Localization.Attributes;
namespace Flow.Launcher.Plugin.Calculator
{
[TypeConverter(typeof(LocalizationConverter))]
[EnumLocalize]
public enum DecimalSeparator
{
[LocalizedDescription("flowlauncher_plugin_calculator_decimal_seperator_use_system_locale")]
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_calculator_decimal_separator_use_system_locale))]
UseSystemLocale,
[LocalizedDescription("flowlauncher_plugin_calculator_decimal_seperator_dot")]
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_calculator_decimal_separator_dot))]
Dot,
[LocalizedDescription("flowlauncher_plugin_calculator_decimal_seperator_comma")]
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_calculator_decimal_separator_comma))]
Comma
}
}

View file

@ -42,7 +42,6 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Flow.Launcher.Core\Flow.Launcher.Core.csproj" />
<ProjectReference Include="..\..\Flow.Launcher.Plugin\Flow.Launcher.Plugin.csproj" />
</ItemGroup>
@ -63,6 +62,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Flow.Launcher.Localization" Version="0.0.4" />
<PackageReference Include="Mages" Version="3.0.0" />
</ItemGroup>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">ليست رقمًا (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">التعبير خاطئ أو غير مكتمل (هل نسيت بعض الأقواس؟)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">نسخ هذا الرقم إلى الحافظة</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">فاصل عشري</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">الفاصل العشري الذي سيتم استخدامه في الناتج.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">استخدام إعدادات النظام المحلية</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">فاصلة (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">نقطة (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">فاصل عشري</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">الفاصل العشري الذي سيتم استخدامه في الناتج.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">استخدام إعدادات النظام المحلية</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">فاصلة (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">نقطة (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">أقصى عدد من المنازل العشرية</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Není číslo (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Nesprávný nebo neúplný výraz (Nezapomněli jste na závorky?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Kopírování výsledku do schránky</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Oddělovač desetinných míst</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">Oddělovač desetinných míst použitý ve výsledku.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Použít podle systému</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Čárka (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Tečka (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Oddělovač desetinných míst</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">Oddělovač desetinných míst použitý ve výsledku.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Použít podle systému</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Čárka (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Tečka (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Desetinná místa</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Not a number (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Expression wrong or incomplete (Did you forget some parentheses?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Copy this number to the clipboard</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Decimal separator</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">The decimal separator to be used in the output.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Use system locale</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Comma (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Dot (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Decimal separator</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">The decimal separator to be used in the output.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Use system locale</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Comma (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Dot (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Max. decimal places</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Nicht eine Zahl (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Ausdruck falsch oder unvollständig (Haben Sie einige Klammern vergessen?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Diese Zahl in die Zwischenablage kopieren</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Dezimaltrennzeichen</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">Das Dezimaltrennzeichen, das in der Ausgabe verwendet werden soll.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Systemgebietsschema verwenden</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Komma (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Punkt (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Dezimaltrennzeichen</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">Das Dezimaltrennzeichen, das in der Ausgabe verwendet werden soll.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Systemgebietsschema verwenden</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Komma (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Punkt (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Max. Dezimalstellen</system:String>
</ResourceDictionary>

View file

@ -8,11 +8,11 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Not a number (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Expression wrong or incomplete (Did you forget some parentheses?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Copy this number to the clipboard</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Decimal separator</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">The decimal separator to be used in the output.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Use system locale</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Comma (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Dot (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Decimal separator</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">The decimal separator to be used in the output.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Use system locale</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Comma (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Dot (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Max. decimal places</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_failed_to_copy">Copy failed, please try later</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">No es un número (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Expresión incorrecta o incompleta (¿Olvidó algún paréntesis?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Copiar este número al portapapeles</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Separador decimal</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">El separador decimal que se usará en el resultado.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Usar configuración del sistema</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Coma (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Punto (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Separador decimal</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">El separador decimal que se usará en el resultado.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Usar configuración del sistema</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Coma (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Punto (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Número máximo de decimales</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">No es un número (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Expresión incorrecta o incompleta (¿Ha olvidado algunos paréntesis?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Copiar este número al portapapeles</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Separador decimal</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">El separador decimal que se utilizará en la salida.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Usar configuración regional del sistema</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Coma (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Punto (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Separador decimal</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">El separador decimal que se utilizará en la salida.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Usar configuración regional del sistema</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Coma (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Punto (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Número máximo de decimales</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Pas un nombre (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Expression incorrecte ou incomplète (avez-vous oublié certaines parenthèses ?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Copier ce chiffre dans le presse-papiers</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Séparateur décimal</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">Le séparateur décimal à utiliser dans la sortie.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Utiliser les paramètres régionaux du système</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Virgule (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Point (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Séparateur décimal</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">Le séparateur décimal à utiliser dans la sortie.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Utiliser les paramètres régionaux du système</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Virgule (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Point (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Décimales max.</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">לא מספר (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">הביטוי שגוי או לא שלם (האם שכחת סוגריים?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">העתק מספר זה ללוח</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">מפריד עשרוני</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">מפריד עשרוני שישמש בתוצאה.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">השתמש בהגדרת מערכת</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">פסיק (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">נקודה (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">מפריד עשרוני</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">מפריד עשרוני שישמש בתוצאה.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">השתמש בהגדרת מערכת</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">פסיק (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">נקודה (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">מספר מקסימלי של מקומות עשרוניים</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Non è un numero (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Espressione sbagliata o incompleta (avete dimenticato delle parentesi?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Copiare questo numero negli appunti</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Separatore decimale</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">Il separatore decimale da usare nell'output.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Usa il locale del sistema</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Virgola (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Punto (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Separatore decimale</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">Il separatore decimale da usare nell'output.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Usa il locale del sistema</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Virgola (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Punto (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Max. cifre decimali</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Not a number (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Expression wrong or incomplete (Did you forget some parentheses?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">この数字をクリップボードにコピーします</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Decimal separator</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">The decimal separator to be used in the output.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Use system locale</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Comma (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Dot (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Decimal separator</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">The decimal separator to be used in the output.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Use system locale</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Comma (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Dot (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Max. decimal places</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">숫자가 아님 (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">표현식이 잘못되었거나 불완전합니다. (괄호를 깜빡하셨나요?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">해당 숫자를 클립보드에 복사</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">소수 구분자</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">출력에 사용할 소수점 구분자</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">시스템 설정 사용</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">쉼표 (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">마침표 (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">소수 구분자</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">출력에 사용할 소수점 구분자</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">시스템 설정 사용</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">쉼표 (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">마침표 (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">최대 소수점 아래 자릿 수</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Ikke et tall (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Uttrykk feil eller ufullstendig (glem noen parenteser?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Kopier dette nummeret til utklippstavlen</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Desimalskille</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">Desimalskilletegnet som skal brukes i utdataene.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Bruk systemets nasjonale innstilling</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Komma (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Prikk (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Desimalskille</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">Desimalskilletegnet som skal brukes i utdataene.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Bruk systemets nasjonale innstilling</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Komma (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Prikk (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Maks. desimaler</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Not a number (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Expression wrong or incomplete (Did you forget some parentheses?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Copy this number to the clipboard</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Decimal separator</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">The decimal separator to be used in the output.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Use system locale</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Comma (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Dot (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Decimal separator</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">The decimal separator to be used in the output.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Use system locale</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Comma (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Dot (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Max. decimal places</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Nie liczba (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Wyrażenie niepoprawne lub niekompletne (Czy zapomniałeś o nawiasach?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Skopiuj ten numer do schowka</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Separator dziesiętny</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">Separator dziesiętny używany w wyniku.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Użyj ustawień regionalnych systemu</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Przecinek (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Kropka (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Separator dziesiętny</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">Separator dziesiętny używany w wyniku.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Użyj ustawień regionalnych systemu</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Przecinek (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Kropka (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Maks. liczba miejsc po przecinku</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Não é um número (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Expressão errada ou incompleta (Você esqueceu de adicionar parênteses?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Copiar este numero para a área de transferência</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Separador decimal</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">O separador decimal a ser usado no resultado.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Use system locale</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Vírgula (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Ponto (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Separador decimal</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">O separador decimal a ser usado no resultado.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Use system locale</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Vírgula (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Ponto (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Max. decimal places</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Não é número (NN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Expressão errada ou incompleta (esqueceu-se de algum parêntese?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Copiar número para a área de transferência</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Separador decimal</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">O separador decimal para utilizar no resultado.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Utilizar definições do sistema</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Vírgula (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Ponto (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Separador decimal</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">O separador decimal para utilizar no resultado.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Utilizar definições do sistema</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Vírgula (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Ponto (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Número máximo de casas decimais</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Не является числом (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Выражение неправильное или неполное (Вы забыли скобки?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Скопировать этот номер в буфер обмена</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Десятичный разделитель</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">Десятичный разделитель, который будет использоваться в результате.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Использовать системный язык</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Запятая (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Точка (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Десятичный разделитель</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">Десятичный разделитель, который будет использоваться в результате.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Использовать системный язык</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Запятая (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Точка (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Макс. число знаков после запятой</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Nie je číslo (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Nesprávny alebo neúplný výraz (Nezabudli ste na zátvorky?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Kopírovať výsledok do schránky</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Oddeľovač desatinných miest</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">Oddeľovač desatinných miest použitý vo výsledku.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Použiť podľa systému</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Čiarka (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Bodka (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Oddeľovač desatinných miest</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">Oddeľovač desatinných miest použitý vo výsledku.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Použiť podľa systému</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Čiarka (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Bodka (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Desatinné miesta</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Not a number (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Expression wrong or incomplete (Did you forget some parentheses?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Copy this number to the clipboard</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Decimal separator</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">The decimal separator to be used in the output.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Use system locale</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Comma (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Dot (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Decimal separator</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">The decimal separator to be used in the output.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Use system locale</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Comma (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Dot (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Max. decimal places</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Sayı değil (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">İfade hatalı ya da eksik. (Parantez koymayı mı unuttunuz?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Bu sayıyı panoya kopyala</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Ondalık ayracı</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">Ondalık kısımları ayırmak için kullanılacak işaret.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Sistem yerelleştirme ayarını kullan</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Virgül (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Nokta (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Ondalık ayracı</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">Ondalık kısımları ayırmak için kullanılacak işaret.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Sistem yerelleştirme ayarını kullan</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Virgül (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Nokta (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Maks. ondalık basamak</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Не є числом (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Вираз неправильний або неповний (Ви забули якісь дужки?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Скопіюйте це число в буфер обміну</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Десятковий роздільник</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">Десятковий роздільник, який буде використовуватися у виведенні.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Використовувати системну локаль</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Кома (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">Крапка (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Десятковий роздільник</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">Десятковий роздільник, який буде використовуватися у виведенні.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Використовувати системну локаль</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Кома (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Крапка (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Макс. кількість знаків після коми</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Không phải là số (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Biểu thức sai hoặc không đầy đủ (Bạn có quên một số dấu ngoặc đơn không?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Sao chép số này vào clipboard</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">Dấu tách thập phân</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">Dấu phân cách thập phân được sử dụng ở đầu ra.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">Sử dụng ngôn ngữ hệ thống</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">Dấu phẩy (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">dấu chấm (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">Dấu tách thập phân</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">Dấu phân cách thập phân được sử dụng ở đầu ra.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">Sử dụng ngôn ngữ hệ thống</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">Dấu phẩy (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">dấu chấm (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Tối đa. chữ số thập phân</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">请输入数字</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">表达错误或不完整(您是否忘记了一些括号?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">将结果复制到剪贴板</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">十进制分隔符</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">在输出中使用的十进制分隔符</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">使用系统区域设置</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">逗号(,</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">点(.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">十进制分隔符</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">在输出中使用的十进制分隔符</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">使用系统区域设置</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">逗号(,</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">点(.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">小数点后最大位数</system:String>
</ResourceDictionary>

View file

@ -6,10 +6,10 @@
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">不是一個數 (NaN)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Expression wrong or incomplete (Did you forget some parentheses?)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">複製此數至剪貼簿</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator">小數點分隔符號</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_seperator_help">The decimal separator to be used in the output.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_use_system_locale">使用系統區域設定</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_comma">逗號 (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_seperator_dot">點 (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator">小數點分隔符號</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_output_decimal_separator_help">The decimal separator to be used in the output.</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_use_system_locale">使用系統區域設定</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_comma">逗號 (,)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">點 (.)</system:String>
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">小數點後最大位數</system:String>
</ResourceDictionary>

View file

@ -6,35 +6,27 @@ using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Windows.Controls;
using Mages.Core;
using Flow.Launcher.Plugin.Calculator.ViewModels;
using Flow.Launcher.Plugin.Calculator.Views;
using Flow.Launcher.Plugin.Calculator.ViewModels;
namespace Flow.Launcher.Plugin.Calculator
{
public class Main : IPlugin, IPluginI18n, ISettingProvider
{
private static readonly Regex RegValidExpressChar = new Regex(
@"^(" +
@"ceil|floor|exp|pi|e|max|min|det|abs|log|ln|sqrt|" +
@"sin|cos|tan|arcsin|arccos|arctan|" +
@"eigval|eigvec|eig|sum|polar|plot|round|sort|real|zeta|" +
@"bin2dec|hex2dec|oct2dec|" +
@"factorial|sign|isprime|isinfty|" +
@"==|~=|&&|\|\||(?:\<|\>)=?|" +
@"[ei]|[0-9]|0x[\da-fA-F]+|[\+\%\-\*\/\^\., ""]|[\(\)\|\!\[\]]" +
@")+$", RegexOptions.Compiled);
private static readonly Regex RegBrackets = new Regex(@"[\(\)\[\]]", RegexOptions.Compiled);
private static readonly Regex RegValidExpressChar = MainRegexHelper.GetRegValidExpressChar();
private static readonly Regex RegBrackets = MainRegexHelper.GetRegBrackets();
private static readonly Regex ThousandGroupRegex = new Regex(@"\B(?=(\d{3})+(?!\d))", RegexOptions.Compiled);
private static readonly Regex NumberRegex = new Regex(@"[\d\.,]+", RegexOptions.Compiled);
private static Engine MagesEngine;
private const string comma = ",";
private const string dot = ".";
private const string Comma = ",";
private const string Dot = ".";
private PluginInitContext Context { get; set; }
internal static PluginInitContext Context { get; set; } = null!;
private static Settings _settings;
private static SettingsViewModel _viewModel;
private Settings _settings;
private SettingsViewModel _viewModel;
/// <summary>
/// Holds the formatting information for a single query.
@ -77,10 +69,10 @@ namespace Flow.Launcher.Plugin.Calculator
var result = MagesEngine.Interpret(expression);
if (result?.ToString() == "NaN")
result = Context.API.GetTranslation("flowlauncher_plugin_calculator_not_a_number");
result = Localize.flowlauncher_plugin_calculator_not_a_number();
if (result is Function)
result = Context.API.GetTranslation("flowlauncher_plugin_calculator_expression_not_complete");
result = Localize.flowlauncher_plugin_calculator_expression_not_complete();
if (!string.IsNullOrEmpty(result?.ToString()))
{
@ -94,7 +86,7 @@ namespace Flow.Launcher.Plugin.Calculator
Title = newResult,
IcoPath = "Images/calculator.png",
Score = 300,
SubTitle = Context.API.GetTranslation("flowlauncher_plugin_calculator_copy_number_to_clipboard"),
SubTitle = Localize.flowlauncher_plugin_calculator_copy_number_to_clipboard(),
CopyText = newResult,
Action = c =>
{
@ -105,7 +97,7 @@ namespace Flow.Launcher.Plugin.Calculator
}
catch (ExternalException)
{
Context.API.ShowMsgBox(Context.API.GetTranslation("flowlauncher_plugin_calculator_failed_to_copy"));
Context.API.ShowMsgBox(Localize.flowlauncher_plugin_calculator_failed_to_copy());
return false;
}
}
@ -139,13 +131,13 @@ namespace Flow.Launcher.Plugin.Calculator
context.InputUsesGroupSeparators = true;
if (numberStr.LastIndexOf('.') > numberStr.LastIndexOf(','))
{
context.InputDecimalSeparator = dot;
return numberStr.Replace(comma, string.Empty);
context.InputDecimalSeparator = Dot;
return numberStr.Replace(Comma, string.Empty);
}
else
{
context.InputDecimalSeparator = comma;
return numberStr.Replace(dot, string.Empty).Replace(comma, dot);
context.InputDecimalSeparator = Comma;
return numberStr.Replace(Dot, string.Empty).Replace(Comma, Dot);
}
}
@ -155,29 +147,29 @@ namespace Flow.Launcher.Plugin.Calculator
if (dotCount > 1)
{
context.InputUsesGroupSeparators = true;
return numberStr.Replace(dot, string.Empty);
return numberStr.Replace(Dot, string.Empty);
}
// A number is ambiguous if it has a single dot in the thousands position,
// A number is ambiguous if it has a single Dot in the thousands position,
// and does not start with a "0." or "."
bool isAmbiguous = numberStr.Length - numberStr.LastIndexOf('.') == 4
&& !numberStr.StartsWith("0.")
&& !numberStr.StartsWith(".");
if (isAmbiguous)
{
if (systemGroupSep == dot)
if (systemGroupSep == Dot)
{
context.InputUsesGroupSeparators = true;
return numberStr.Replace(dot, string.Empty);
return numberStr.Replace(Dot, string.Empty);
}
else
{
context.InputDecimalSeparator = dot;
context.InputDecimalSeparator = Dot;
return numberStr;
}
}
else // Unambiguous decimal (e.g., "12.34" or "0.123" or ".123")
{
context.InputDecimalSeparator = dot;
context.InputDecimalSeparator = Dot;
return numberStr;
}
}
@ -188,30 +180,30 @@ namespace Flow.Launcher.Plugin.Calculator
if (commaCount > 1)
{
context.InputUsesGroupSeparators = true;
return numberStr.Replace(comma, string.Empty);
return numberStr.Replace(Comma, string.Empty);
}
// A number is ambiguous if it has a single comma in the thousands position,
// A number is ambiguous if it has a single Comma in the thousands position,
// and does not start with a "0," or ","
bool isAmbiguous = numberStr.Length - numberStr.LastIndexOf(',') == 4
&& !numberStr.StartsWith("0,")
&& !numberStr.StartsWith(",");
if (isAmbiguous)
{
if (systemGroupSep == comma)
if (systemGroupSep == Comma)
{
context.InputUsesGroupSeparators = true;
return numberStr.Replace(comma, string.Empty);
return numberStr.Replace(Comma, string.Empty);
}
else
{
context.InputDecimalSeparator = comma;
return numberStr.Replace(comma, dot);
context.InputDecimalSeparator = Comma;
return numberStr.Replace(Comma, Dot);
}
}
else // Unambiguous decimal (e.g., "12,34" or "0,123" or ",123")
{
context.InputDecimalSeparator = comma;
return numberStr.Replace(comma, dot);
context.InputDecimalSeparator = Comma;
return numberStr.Replace(Comma, Dot);
}
}
@ -247,7 +239,7 @@ namespace Flow.Launcher.Plugin.Calculator
{
// This logic is now independent of the system's group separator
// to ensure consistent output for unit testing.
return decimalSeparator == dot ? comma : dot;
return decimalSeparator == Dot ? Comma : Dot;
}
private bool CanCalculate(Query query)
@ -270,19 +262,19 @@ namespace Flow.Launcher.Plugin.Calculator
return true;
}
private static string GetDecimalSeparator()
private string GetDecimalSeparator()
{
string systemDecimalSeparator = CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator;
return _settings.DecimalSeparator switch
{
DecimalSeparator.UseSystemLocale => systemDecimalSeparator,
DecimalSeparator.Dot => dot,
DecimalSeparator.Comma => comma,
DecimalSeparator.Dot => Dot,
DecimalSeparator.Comma => Comma,
_ => systemDecimalSeparator,
};
}
private bool IsBracketComplete(string query)
private static bool IsBracketComplete(string query)
{
var matchs = RegBrackets.Matches(query);
var leftBracketCount = 0;
@ -303,17 +295,22 @@ namespace Flow.Launcher.Plugin.Calculator
public string GetTranslatedPluginTitle()
{
return Context.API.GetTranslation("flowlauncher_plugin_caculator_plugin_name");
return Localize.flowlauncher_plugin_caculator_plugin_name();
}
public string GetTranslatedPluginDescription()
{
return Context.API.GetTranslation("flowlauncher_plugin_caculator_plugin_description");
return Localize.flowlauncher_plugin_caculator_plugin_description();
}
public Control CreateSettingPanel()
{
return new CalculatorSettings(_viewModel);
return new CalculatorSettings(_settings);
}
public void OnCultureInfoChanged(CultureInfo newCulture)
{
DecimalSeparatorLocalized.UpdateLabels(_viewModel.AllDecimalSeparator);
}
}
}

View file

@ -0,0 +1,13 @@
using System.Text.RegularExpressions;
namespace Flow.Launcher.Plugin.Calculator;
internal static partial class MainRegexHelper
{
[GeneratedRegex(@"[\(\)\[\]]", RegexOptions.Compiled)]
public static partial Regex GetRegBrackets();
[GeneratedRegex(@"^(ceil|floor|exp|pi|e|max|min|det|abs|log|ln|sqrt|sin|cos|tan|arcsin|arccos|arctan|eigval|eigvec|eig|sum|polar|plot|round|sort|real|zeta|bin2dec|hex2dec|oct2dec|factorial|sign|isprime|isinfty|==|~=|&&|\|\||(?:\<|\>)=?|[ei]|[0-9]|0x[\da-fA-F]+|[\+\%\-\*\/\^\., ""]|[\(\)\|\!\[\]])+$", RegexOptions.Compiled)]
public static partial Regex GetRegValidExpressChar();
}

View file

@ -12,6 +12,21 @@ namespace Flow.Launcher.Plugin.Calculator.ViewModels
public Settings Settings { get; init; }
public IEnumerable<int> MaxDecimalPlacesRange => Enumerable.Range(1, 20);
public static IEnumerable<int> MaxDecimalPlacesRange => Enumerable.Range(1, 20);
public List<DecimalSeparatorLocalized> AllDecimalSeparator { get; } = DecimalSeparatorLocalized.GetValues();
public DecimalSeparator SelectedDecimalSeparator
{
get => Settings.DecimalSeparator;
set
{
if (Settings.DecimalSeparator != value)
{
Settings.DecimalSeparator = value;
OnPropertyChanged();
}
}
}
}
}

View file

@ -3,19 +3,14 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:calculator="clr-namespace:Flow.Launcher.Plugin.Calculator"
xmlns:core="clr-namespace:Flow.Launcher.Core.Resource;assembly=Flow.Launcher.Core"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="clr-namespace:Flow.Launcher.Infrastructure.UI;assembly=Flow.Launcher.Infrastructure"
xmlns:viewModels="clr-namespace:Flow.Launcher.Plugin.Calculator.ViewModels"
d:DataContext="{d:DesignInstance Type=viewModels:SettingsViewModel}"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<UserControl.Resources>
<core:LocalizationConverter x:Key="LocalizationConverter" />
</UserControl.Resources>
<Grid Margin="{StaticResource SettingPanelMargin}">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
@ -32,7 +27,7 @@
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_calculator_output_decimal_seperator}" />
Text="{DynamicResource flowlauncher_plugin_calculator_output_decimal_separator}" />
<ComboBox
x:Name="DecimalSeparatorComboBox"
Grid.Row="0"
@ -41,14 +36,10 @@
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
ItemsSource="{Binding Source={ui:EnumBindingSource {x:Type calculator:DecimalSeparator}}}"
SelectedItem="{Binding Settings.DecimalSeparator}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock FontSize="14" Text="{Binding Converter={StaticResource LocalizationConverter}}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
DisplayMemberPath="Display"
ItemsSource="{Binding AllDecimalSeparator}"
SelectedValue="{Binding SelectedDecimalSeparator, Mode=TwoWay}"
SelectedValuePath="Value" />
<TextBlock
Grid.Row="1"

View file

@ -1,4 +1,4 @@
using System.Windows.Controls;
using System.Windows.Controls;
using Flow.Launcher.Plugin.Calculator.ViewModels;
namespace Flow.Launcher.Plugin.Calculator.Views
@ -11,13 +11,12 @@ namespace Flow.Launcher.Plugin.Calculator.Views
private readonly SettingsViewModel _viewModel;
private readonly Settings _settings;
public CalculatorSettings(SettingsViewModel viewModel)
public CalculatorSettings(Settings settings)
{
_viewModel = viewModel;
_settings = viewModel.Settings;
DataContext = viewModel;
_viewModel = new SettingsViewModel(settings);
_settings = _viewModel.Settings;
DataContext = _viewModel;
InitializeComponent();
}
}
}
}

View file

@ -21,13 +21,10 @@ namespace Flow.Launcher.Plugin.Explorer
private Settings Settings { get; set; }
private SettingsViewModel ViewModel { get; set; }
public ContextMenu(PluginInitContext context, Settings settings, SettingsViewModel vm)
public ContextMenu(PluginInitContext context, Settings settings)
{
Context = context;
Settings = settings;
ViewModel = vm;
}
public List<Result> LoadContextMenus(Result selectedResult)
@ -84,7 +81,7 @@ namespace Flow.Launcher.Plugin.Explorer
Context.API.GetTranslation("plugin_explorer_addfilefoldersuccess_detail"),
Constants.ExplorerIconImageFullPath);
ViewModel.Save();
return true;
},
@ -108,7 +105,7 @@ namespace Flow.Launcher.Plugin.Explorer
Context.API.GetTranslation("plugin_explorer_removefilefoldersuccess_detail"),
Constants.ExplorerIconImageFullPath);
ViewModel.Save();
return true;
},

View file

@ -47,9 +47,9 @@
<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageReference Include="Droplex" Version="1.7.0" />
<!-- Do not upgrade System.Data.OleDb since we are .Net7.0 -->
<PackageReference Include="System.Data.OleDb" Version="9.0.3" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<PackageReference Include="Flow.Launcher.Localization" Version="0.0.4" />
<PackageReference Include="System.Data.OleDb" Version="9.0.7" />
<PackageReference Include="System.Linq.Async" Version="6.0.3" />
<PackageReference Include="tlbimp-Microsoft.Search.Interop" Version="1.0.0" />
</ItemGroup>

View file

@ -1,25 +0,0 @@
using Flow.Launcher.Plugin.Everything.Everything;
using JetBrains.Annotations;
using System;
namespace Flow.Launcher.Plugin.Explorer.Helper;
public static class SortOptionTranslationHelper
{
[CanBeNull]
public static IPublicAPI API { get; internal set; }
public static string GetTranslatedName(this SortOption sortOption)
{
const string prefix = "flowlauncher_plugin_everything_sort_by_";
ArgumentNullException.ThrowIfNull(API);
var enumName = Enum.GetName(sortOption);
var splited = enumName!.Split('_');
var name = string.Join('_', splited[..^1]);
var direction = splited[^1];
return $"{API.GetTranslation(prefix + name.ToLower())} {API.GetTranslation(prefix + direction.ToLower())}";
}
}

View file

@ -150,19 +150,32 @@
<system:String x:Key="flowlauncher_plugin_everything_is_not_running">Warning: Everything service is not running</system:String>
<system:String x:Key="flowlauncher_plugin_everything_query_error">Error while querying Everything</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by">Sort By</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_name">Name</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_path">Path</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_size">Size</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_extension">Extension</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_type_name">Type Name</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_created">Date Created</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_modified">Date Modified</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_attributes">Attributes</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_file_list_filename">File List FileName</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_run_count">Run Count</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_recently_changed">Date Recently Changed</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_accessed">Date Accessed</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_run">Date Run</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_name_ascending">Name &#x2191;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_name_descending">Name &#x2193;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_path_ascending">Path &#x2191;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_path_descending">Path &#x2193;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_size_ascending">Size &#x2191;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_size_descending">Size &#x2193;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_extension_ascending">Extension &#x2191;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_extension_descending">Extension &#x2193;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_type_name_ascending">Type Name &#x2191;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_type_name_descending">Type Name &#x2193;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_created_ascending">Date Created &#x2191;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_created_descending">Date Created &#x2193;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_modified_ascending">Date Modified &#x2191;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_modified_descending">Date Modified &#x2193;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_attributes_ascending">Attributes &#x2191;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_attributes_descending">Attributes &#x2193;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_file_list_filename_ascending">File List FileName &#x2191;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_file_list_filename_descending">File List FileName &#x2193;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_run_count_ascending">Run Count &#x2191;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_run_count_descending">Run Count &#x2193;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_recently_changed_ascending">Date Recently Changed &#x2191;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_recently_changed_descending">Date Recently Changed &#x2193;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_accessed_ascending">Date Accessed &#x2191;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_accessed_descending">Date Accessed &#x2193;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_run_ascending">Date Run &#x2191;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_run_descending">Date Run &#x2193;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_ascending">&#x2191;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_sort_by_descending">&#x2193;</system:String>
<system:String x:Key="flowlauncher_plugin_everything_nonfastsort_warning">Warning: This is not a Fast Sort option, searches may be slow</system:String>

View file

@ -1,4 +1,4 @@
using Flow.Launcher.Plugin.Explorer.Helper;
using Flow.Launcher.Plugin.Explorer.Helper;
using Flow.Launcher.Plugin.Explorer.Search;
using Flow.Launcher.Plugin.Explorer.Search.Everything;
using Flow.Launcher.Plugin.Explorer.ViewModels;
@ -11,6 +11,7 @@ using System.Threading.Tasks;
using System.Windows.Controls;
using Flow.Launcher.Plugin.Explorer.Exceptions;
using System.Linq;
using System.Globalization;
namespace Flow.Launcher.Plugin.Explorer
{
@ -22,7 +23,7 @@ namespace Flow.Launcher.Plugin.Explorer
private SettingsViewModel viewModel;
private IContextMenu contextMenu;
private ContextMenu contextMenu;
private SearchManager searchManager;
@ -41,12 +42,9 @@ namespace Flow.Launcher.Plugin.Explorer
FillQuickAccessLinkNames();
viewModel = new SettingsViewModel(context, Settings);
contextMenu = new ContextMenu(Context, Settings, viewModel);
contextMenu = new ContextMenu(Context, Settings);
searchManager = new SearchManager(Settings, Context);
ResultManager.Init(Context, Settings);
SortOptionTranslationHelper.API = context.API;
EverythingApiDllImport.Load(Path.Combine(Context.CurrentPluginMetadata.PluginDirectory, "EverythingSDK",
Environment.Is64BitProcess ? "x64" : "x86"));
@ -100,6 +98,12 @@ namespace Flow.Launcher.Plugin.Explorer
return Context.API.GetTranslation("plugin_explorer_plugin_description");
}
public void OnCultureInfoChanged(CultureInfo newCulture)
{
// Update labels for setting view model
EverythingSortOptionLocalized.UpdateLabels(viewModel.AllEverythingSortOptions);
}
private static void FillQuickAccessLinkNames()
{
// Legacy version does not have names for quick access links, so we fill them with the path name.

View file

@ -1,5 +1,4 @@
using Flow.Launcher.Plugin.Everything.Everything;
using Flow.Launcher.Plugin.Explorer.Search.Everything.Exceptions;
using Flow.Launcher.Plugin.Explorer.Search.Everything.Exceptions;
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
@ -36,7 +35,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything
/// <summary>
/// Checks whether the sort option is Fast Sort.
/// </summary>
public static bool IsFastSortOption(SortOption sortOption)
public static bool IsFastSortOption(EverythingSortOption sortOption)
{
var fastSortOptionEnabled = EverythingApiDllImport.Everything_IsFastSort(sortOption);
@ -112,7 +111,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything
EverythingApiDllImport.Everything_SetSort(option.SortOption);
EverythingApiDllImport.Everything_SetMatchPath(option.IsFullPathSearch);
if (option.SortOption == SortOption.RUN_COUNT_DESCENDING)
if (option.SortOption == EverythingSortOption.RUN_COUNT_DESCENDING)
{
EverythingApiDllImport.Everything_SetRequestFlags(EVERYTHING_REQUEST_FULL_PATH_AND_FILE_NAME | EVERYTHING_REQUEST_RUN_COUNT);
}

View file

@ -1,5 +1,4 @@
using Flow.Launcher.Plugin.Everything.Everything;
using System;
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
@ -114,11 +113,11 @@ namespace Flow.Launcher.Plugin.Explorer.Search.Everything
// Everything 1.4
[DllImport(DLL)]
public static extern void Everything_SetSort(SortOption dwSortType);
public static extern void Everything_SetSort(EverythingSortOption dwSortType);
[DllImport(DLL)]
public static extern bool Everything_IsFastSort(SortOption dwSortType);
public static extern bool Everything_IsFastSort(EverythingSortOption dwSortType);
[DllImport(DLL)]
public static extern SortOption Everything_GetSort();
public static extern EverythingSortOption Everything_GetSort();
[DllImport(DLL)]
public static extern uint Everything_GetResultListSort();
[DllImport(DLL)]

View file

@ -1,10 +1,8 @@
using Flow.Launcher.Plugin.Everything.Everything;
namespace Flow.Launcher.Plugin.Explorer.Search.Everything
namespace Flow.Launcher.Plugin.Explorer.Search.Everything
{
public record struct EverythingSearchOption(
string Keyword,
SortOption SortOption,
EverythingSortOption SortOption,
bool IsContentSearch = false,
string ContentSearchKeyword = default,
string ParentPath = default,

View file

@ -0,0 +1,59 @@
using Flow.Launcher.Localization.Attributes;
namespace Flow.Launcher.Plugin.Explorer.Search.Everything
{
[EnumLocalize]
public enum EverythingSortOption : uint
{
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_name_ascending))]
NAME_ASCENDING = 1u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_name_descending))]
NAME_DESCENDING = 2u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_path_ascending))]
PATH_ASCENDING = 3u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_path_descending))]
PATH_DESCENDING = 4u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_size_ascending))]
SIZE_ASCENDING = 5u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_size_descending))]
SIZE_DESCENDING = 6u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_extension_ascending))]
EXTENSION_ASCENDING = 7u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_extension_descending))]
EXTENSION_DESCENDING = 8u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_type_name_ascending))]
TYPE_NAME_ASCENDING = 9u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_type_name_descending))]
TYPE_NAME_DESCENDING = 10u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_date_created_ascending))]
DATE_CREATED_ASCENDING = 11u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_date_created_descending))]
DATE_CREATED_DESCENDING = 12u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_date_modified_ascending))]
DATE_MODIFIED_ASCENDING = 13u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_date_modified_descending))]
DATE_MODIFIED_DESCENDING = 14u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_attributes_ascending))]
ATTRIBUTES_ASCENDING = 15u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_attributes_descending))]
ATTRIBUTES_DESCENDING = 16u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_file_list_filename_ascending))]
FILE_LIST_FILENAME_ASCENDING = 17u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_file_list_filename_descending))]
FILE_LIST_FILENAME_DESCENDING = 18u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_run_count_descending))]
RUN_COUNT_DESCENDING = 20u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_date_recently_changed_ascending))]
DATE_RECENTLY_CHANGED_ASCENDING = 21u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_date_recently_changed_descending))]
DATE_RECENTLY_CHANGED_DESCENDING = 22u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_date_accessed_ascending))]
DATE_ACCESSED_ASCENDING = 23u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_date_accessed_descending))]
DATE_ACCESSED_DESCENDING = 24u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_date_run_ascending))]
DATE_RUN_ASCENDING = 25u,
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_everything_sort_by_date_run_descending))]
DATE_RUN_DESCENDING = 26u
}
}

View file

@ -1,31 +0,0 @@
namespace Flow.Launcher.Plugin.Everything.Everything
{
public enum SortOption : uint
{
NAME_ASCENDING = 1u,
NAME_DESCENDING = 2u,
PATH_ASCENDING = 3u,
PATH_DESCENDING = 4u,
SIZE_ASCENDING = 5u,
SIZE_DESCENDING = 6u,
EXTENSION_ASCENDING = 7u,
EXTENSION_DESCENDING = 8u,
TYPE_NAME_ASCENDING = 9u,
TYPE_NAME_DESCENDING = 10u,
DATE_CREATED_ASCENDING = 11u,
DATE_CREATED_DESCENDING = 12u,
DATE_MODIFIED_ASCENDING = 13u,
DATE_MODIFIED_DESCENDING = 14u,
ATTRIBUTES_ASCENDING = 15u,
ATTRIBUTES_DESCENDING = 16u,
FILE_LIST_FILENAME_ASCENDING = 17u,
FILE_LIST_FILENAME_DESCENDING = 18u,
RUN_COUNT_DESCENDING = 20u,
DATE_RECENTLY_CHANGED_ASCENDING = 21u,
DATE_RECENTLY_CHANGED_DESCENDING = 22u,
DATE_ACCESSED_ASCENDING = 23u,
DATE_ACCESSED_DESCENDING = 24u,
DATE_RUN_ASCENDING = 25u,
DATE_RUN_DESCENDING = 26u
}
}

View file

@ -7,6 +7,7 @@ using System.Windows.Input;
using Flow.Launcher.Plugin.Explorer.Search.Everything;
using Flow.Launcher.Plugin.Explorer.Views;
using Flow.Launcher.Plugin.SharedCommands;
using Flow.Launcher.Plugin.SharedModels;
using Peter;
using Path = System.IO.Path;
@ -72,10 +73,10 @@ namespace Flow.Launcher.Plugin.Explorer.Search
internal static void ShowNativeContextMenu(string path, ResultType type)
{
var screenWithMouseCursor = System.Windows.Forms.Screen.FromPoint(System.Windows.Forms.Cursor.Position);
var screenWithMouseCursor = MonitorInfo.GetCursorDisplayMonitor();
var xOfScreenCenter = screenWithMouseCursor.WorkingArea.Left + screenWithMouseCursor.WorkingArea.Width / 2;
var yOfScreenCenter = screenWithMouseCursor.WorkingArea.Top + screenWithMouseCursor.WorkingArea.Height / 2;
var showPosition = new System.Drawing.Point(xOfScreenCenter, yOfScreenCenter);
var showPosition = new System.Drawing.Point((int)xOfScreenCenter, (int)yOfScreenCenter);
switch (type)
{

View file

@ -1,5 +1,4 @@
using Flow.Launcher.Plugin.Everything.Everything;
using Flow.Launcher.Plugin.Explorer.Search;
using Flow.Launcher.Plugin.Explorer.Search;
using Flow.Launcher.Plugin.Explorer.Search.Everything;
using Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks;
using Flow.Launcher.Plugin.Explorer.Search.WindowsIndex;
@ -145,10 +144,7 @@ namespace Flow.Launcher.Plugin.Explorer
public string EverythingInstalledPath { get; set; }
[JsonIgnore]
public SortOption[] SortOptions { get; set; } = Enum.GetValues<SortOption>();
public SortOption SortOption { get; set; } = SortOption.NAME_ASCENDING;
public EverythingSortOption SortOption { get; set; } = EverythingSortOption.NAME_ASCENDING;
public bool EnableEverythingContentSearch { get; set; } = false;

View file

@ -592,6 +592,22 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels
#region Everything FastSortWarning
public List<EverythingSortOptionLocalized> AllEverythingSortOptions = EverythingSortOptionLocalized.GetValues();
public EverythingSortOption SelectedEverythingSortOption
{
get => Settings.SortOption;
set
{
if (value == Settings.SortOption)
return;
Settings.SortOption = value;
OnPropertyChanged();
OnPropertyChanged(nameof(FastSortWarningVisibility));
OnPropertyChanged(nameof(SortOptionWarningMessage));
}
}
public Visibility FastSortWarningVisibility
{
get
@ -612,6 +628,7 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels
}
}
}
public string SortOptionWarningMessage
{
get
@ -621,15 +638,15 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels
// this method is used to determine if Everything service is running because as at Everything v1.4.1
// the sdk does not provide a dedicated interface to determine if it is running.
return EverythingApi.IsFastSortOption(Settings.SortOption) ? string.Empty
: Context.API.GetTranslation("flowlauncher_plugin_everything_nonfastsort_warning");
: Localize.flowlauncher_plugin_everything_nonfastsort_warning();
}
catch (IPCErrorException)
{
return Context.API.GetTranslation("flowlauncher_plugin_everything_is_not_running");
return Localize.flowlauncher_plugin_everything_is_not_running();
}
catch (DllNotFoundException)
{
return Context.API.GetTranslation("flowlauncher_plugin_everything_sdk_issue");
return Localize.flowlauncher_plugin_everything_sdk_issue();
}
}
}

View file

@ -1,20 +0,0 @@
using Flow.Launcher.Plugin.Everything.Everything;
using Flow.Launcher.Plugin.Explorer.Helper;
using System;
using System.Globalization;
using System.Windows.Data;
namespace Flow.Launcher.Plugin.Explorer.Views.Converters;
public class EnumNameConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return value is SortOption option ? option.GetTranslatedName() : value;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}

View file

@ -2,7 +2,6 @@
x:Class="Flow.Launcher.Plugin.Explorer.Views.ExplorerSettings"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:Flow.Launcher.Plugin.Explorer.Views.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:qa="clr-namespace:Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks"
@ -74,8 +73,6 @@
</Grid>
</DataTemplate>
<converters:EnumNameConverter x:Key="EnumNameConverter" />
<Style x:Key="CustomExpanderStyle" TargetType="Expander">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
<Setter Property="Background" Value="Transparent" />
@ -631,16 +628,10 @@
Grid.Column="1"
Margin="{StaticResource SettingPanelItemLeftTopBottomMargin}"
VerticalAlignment="Center"
ItemsSource="{Binding Settings.SortOptions, Mode=OneWay}"
SelectedItem="{Binding Settings.SortOption}"
SelectionChanged="EverythingSortOptionChanged">
<ComboBox.ItemTemplate>
<DataTemplate>
<Grid>
<TextBlock Text="{Binding Converter={StaticResource EnumNameConverter}}" />
</Grid>
</DataTemplate>
</ComboBox.ItemTemplate>
ItemsSource="{Binding AllEverythingSortOptions}"
SelectedValue="{Binding SelectedEverythingSortOption, Mode=TwoWay}"
SelectedValuePath="Value"
DisplayMemberPath="Display">
</ComboBox>
<TextBlock
@ -666,10 +657,10 @@
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
VerticalAlignment="Center"
Foreground="Orange"
Text="{Binding SortOptionWarningMessage, Mode=OneTime}"
Text="{Binding SortOptionWarningMessage, Mode=OneWay}"
TextAlignment="Left"
TextWrapping="Wrap"
Visibility="{Binding FastSortWarningVisibility, Mode=OneTime}" />
Visibility="{Binding FastSortWarningVisibility, Mode=OneWay}" />
</Grid>
</Expander>

View file

@ -44,7 +44,7 @@ namespace Flow.Launcher.Plugin.Explorer.Views
{
var files = (string[])e.Data.GetData(DataFormats.FileDrop);
if (files == null || !files.Any())
if (files == null || files.Length == 0)
{
return;
}
@ -77,14 +77,7 @@ namespace Flow.Launcher.Plugin.Explorer.Views
{
SettingsViewModel.OpenWindowsIndexingOptions();
}
private void EverythingSortOptionChanged(object sender, SelectionChangedEventArgs e)
{
if (tbFastSortWarning is not null)
{
tbFastSortWarning.Visibility = _viewModel.FastSortWarningVisibility;
tbFastSortWarning.Text = _viewModel.SortOptionWarningMessage;
}
}
private void LbxAccessLinks_OnDrop(object sender, DragEventArgs e)
{
AccessLinkDragDrop("QuickAccessLink", e);
@ -104,7 +97,7 @@ namespace Flow.Launcher.Plugin.Explorer.Views
if (sender is Expander expandedExpander)
{
// Ensure _expanders is not null and contains items
if (_expanders == null || !_expanders.Any()) return;
if (_expanders == null || _expanders.Count == 0) return;
foreach (var expander in _expanders)
{

View file

@ -52,7 +52,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.183">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

View file

@ -163,23 +163,20 @@ namespace Flow.Launcher.Plugin.ProcessKiller
try
{
var handle = PInvoke.OpenProcess(PROCESS_ACCESS_RIGHTS.PROCESS_QUERY_LIMITED_INFORMATION, false, (uint)p.Id);
if (handle.Value == IntPtr.Zero)
if (handle == HWND.Null)
{
return string.Empty;
}
using var safeHandle = new SafeProcessHandle(handle.Value, true);
using var safeHandle = new SafeProcessHandle((nint)handle.Value, true);
uint capacity = 2000;
Span<char> buffer = new char[capacity];
fixed (char* pBuffer = buffer)
if (!PInvoke.QueryFullProcessImageName(safeHandle, PROCESS_NAME_FORMAT.PROCESS_NAME_WIN32, buffer, ref capacity))
{
if (!PInvoke.QueryFullProcessImageName(safeHandle, PROCESS_NAME_FORMAT.PROCESS_NAME_WIN32, (PWSTR)pBuffer, ref capacity))
{
return string.Empty;
}
return buffer[..(int)capacity].ToString();
return string.Empty;
}
return buffer[..(int)capacity].ToString();
}
catch
{

View file

@ -58,17 +58,18 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Flow.Launcher.Infrastructure\Flow.Launcher.Infrastructure.csproj" />
<ProjectReference Include="..\..\Flow.Launcher.Plugin\Flow.Launcher.Plugin.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ini-parser" Version="2.5.2" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.0" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<PackageReference Include="MemoryPack" Version="1.21.4" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.7" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.183">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NLog" Version="4.7.10" />
</ItemGroup>
</Project>

View file

@ -6,7 +6,6 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Controls;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin.Program.Programs;
using Flow.Launcher.Plugin.Program.Views;
using Flow.Launcher.Plugin.Program.Views.Models;
@ -234,13 +233,21 @@ namespace Flow.Launcher.Plugin.Program
}
}
// Move old cache files to the new cache directory
var oldWin32CacheFile = Path.Combine(DataLocation.CacheDirectory, $"{Win32CacheName}.cache");
var newWin32CacheFile = Path.Combine(pluginCacheDirectory, $"{Win32CacheName}.cache");
MoveFile(oldWin32CacheFile, newWin32CacheFile);
var oldUWPCacheFile = Path.Combine(DataLocation.CacheDirectory, $"{UwpCacheName}.cache");
var newUWPCacheFile = Path.Combine(pluginCacheDirectory, $"{UwpCacheName}.cache");
MoveFile(oldUWPCacheFile, newUWPCacheFile);
// If plugin cache directory is this: D:\\Data\\Cache\\Plugins\\Flow.Launcher.Plugin.Program
// then the parent directory is: D:\\Data\\Cache
// So we can use the parent of the parent directory to get the cache directory path
var directoryInfo = new DirectoryInfo(pluginCacheDirectory);
var cacheDirectory = directoryInfo.Parent?.Parent?.FullName;
// Move old cache files to the new cache directory if cache directory exists
if (!string.IsNullOrEmpty(cacheDirectory))
{
var oldWin32CacheFile = Path.Combine(cacheDirectory, $"{Win32CacheName}.cache");
var newWin32CacheFile = Path.Combine(pluginCacheDirectory, $"{Win32CacheName}.cache");
MoveFile(oldWin32CacheFile, newWin32CacheFile);
var oldUWPCacheFile = Path.Combine(cacheDirectory, $"{UwpCacheName}.cache");
var newUWPCacheFile = Path.Combine(pluginCacheDirectory, $"{UwpCacheName}.cache");
MoveFile(oldUWPCacheFile, newUWPCacheFile);
}
await _win32sLock.WaitAsync();
_win32s = await context.API.LoadCacheBinaryStorageAsync(Win32CacheName, pluginCacheDirectory, new List<Win32>());

View file

@ -27,28 +27,36 @@ namespace Flow.Launcher.Plugin.Program.Programs
// If there is no resource to localize a file name the method returns a non zero value.
fixed (char* bufferPtr = buffer)
{
var result = PInvoke.SHGetLocalizedName(path, bufferPtr, capacity, out var id);
if (result != HRESULT.S_OK)
int id;
fixed (char* pathPtr = path)
{
return string.Empty;
}
var result = PInvoke.SHGetLocalizedName(new PCWSTR(pathPtr), bufferPtr, capacity, &id);
var resourcePathStr = MemoryMarshal.CreateReadOnlySpanFromNullTerminated(bufferPtr).ToString();
_ = PInvoke.ExpandEnvironmentStrings(resourcePathStr, bufferPtr, capacity);
using var handle = PInvoke.LoadLibraryEx(resourcePathStr,
LOAD_LIBRARY_FLAGS.DONT_RESOLVE_DLL_REFERENCES | LOAD_LIBRARY_FLAGS.LOAD_LIBRARY_AS_DATAFILE);
if (handle.IsInvalid)
{
return string.Empty;
}
if (result != HRESULT.S_OK)
{
return string.Empty;
}
// not sure about the behavior of Pinvoke.LoadString, so we clear the buffer before using it (so it must be a null-terminated string)
buffer.Clear();
var resourcePathStr = MemoryMarshal.CreateReadOnlySpanFromNullTerminated(bufferPtr).ToString();
fixed (char* resourcePathPtr = resourcePathStr)
{
_ = PInvoke.ExpandEnvironmentStrings(new PCWSTR(resourcePathPtr), bufferPtr, capacity);
using var handle = PInvoke.LoadLibraryEx(resourcePathStr,
LOAD_LIBRARY_FLAGS.DONT_RESOLVE_DLL_REFERENCES | LOAD_LIBRARY_FLAGS.LOAD_LIBRARY_AS_DATAFILE);
if (handle.IsInvalid)
{
return string.Empty;
}
if (PInvoke.LoadString(handle, (uint)id, bufferPtr, capacity) != 0)
{
var lString = MemoryMarshal.CreateReadOnlySpanFromNullTerminated(bufferPtr).ToString();
return lString;
// not sure about the behavior of Pinvoke.LoadString, so we clear the buffer before using it (so it must be a null-terminated string)
buffer.Clear();
if (PInvoke.LoadString(handle, (uint)id, buffer, capacity) != 0)
{
var lString = MemoryMarshal.CreateReadOnlySpanFromNullTerminated(bufferPtr).ToString();
return lString;
}
}
}
}

View file

@ -58,7 +58,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.183">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>