mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge branch 'dev' into administrator_mode
This commit is contained in:
commit
aac717c011
68 changed files with 726 additions and 688 deletions
4
.github/actions/spelling/allow.txt
vendored
4
.github/actions/spelling/allow.txt
vendored
|
|
@ -4,4 +4,8 @@ ssh
|
|||
ubuntu
|
||||
runcount
|
||||
Firefox
|
||||
Português
|
||||
Português (Brasil)
|
||||
favicons
|
||||
moz
|
||||
workaround
|
||||
|
|
|
|||
4
.github/actions/spelling/expect.txt
vendored
4
.github/actions/spelling/expect.txt
vendored
|
|
@ -104,3 +104,7 @@ metadatas
|
|||
WMP
|
||||
VSTHRD
|
||||
CJK
|
||||
Msix
|
||||
dummyprofile
|
||||
browserbookmark
|
||||
copyurl
|
||||
|
|
|
|||
5
.github/actions/spelling/patterns.txt
vendored
5
.github/actions/spelling/patterns.txt
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
|
||||
<!-- Work around https://github.com/dotnet/runtime/issues/109682 -->
|
||||
<CETCompat>false</CETCompat>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -136,7 +136,6 @@
|
|||
|
||||
<Target Name="RemoveDuplicateAnalyzers" BeforeTargets="CoreCompile">
|
||||
<!-- Work around https://github.com/dotnet/wpf/issues/6792 -->
|
||||
|
||||
<ItemGroup>
|
||||
<FilteredAnalyzer Include="@(Analyzer->Distinct())" />
|
||||
<Analyzer Remove="@(Analyzer)" />
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@
|
|||
FontSize="14"
|
||||
ItemContainerStyle="{StaticResource PluginList}"
|
||||
ItemsSource="{Binding Source={StaticResource PluginCollectionView}}"
|
||||
Loaded="PluginListBox_Loaded"
|
||||
ScrollViewer.CanContentScroll="False"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
SnapsToDevicePixels="True"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
using System.ComponentModel;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Navigation;
|
||||
|
|
@ -33,6 +35,14 @@ public partial class SettingsPanePlugins
|
|||
base.OnNavigatedTo(e);
|
||||
}
|
||||
|
||||
private void PluginListBox_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// After list is loaded, we need to clear selection to make sure all items can be mouse hovered
|
||||
// because the selected item cannot be hovered.
|
||||
if (sender is not ListBox listBox) return;
|
||||
listBox.SelectedIndex = -1;
|
||||
}
|
||||
|
||||
private void ViewModel_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
if (e.PropertyName == nameof(SettingsPanePluginsViewModel.FilterText))
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Flow.Launcher.Plugin.BrowserBookmark.Helper;
|
||||
|
|
@ -49,7 +50,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 +85,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 +99,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 +112,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;
|
||||
|
|
@ -134,10 +135,6 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
|
|||
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(bookmark.Url))
|
||||
return;
|
||||
|
||||
// Extract domain from URL
|
||||
if (!Uri.TryCreate(bookmark.Url, UriKind.Absolute, out Uri uri))
|
||||
return;
|
||||
|
||||
|
|
@ -146,47 +143,53 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
|
|||
// Query for latest Firefox version favicon structure
|
||||
using var cmd = connection.CreateCommand();
|
||||
cmd.CommandText = @"
|
||||
SELECT i.data
|
||||
SELECT i.id, i.data
|
||||
FROM moz_icons i
|
||||
JOIN moz_icons_to_pages ip ON i.id = ip.icon_id
|
||||
JOIN moz_pages_w_icons p ON ip.page_id = p.id
|
||||
WHERE p.page_url LIKE @url
|
||||
AND i.data IS NOT NULL
|
||||
ORDER BY i.width DESC -- Select largest icon available
|
||||
WHERE p.page_url LIKE @domain
|
||||
ORDER BY i.width DESC
|
||||
LIMIT 1";
|
||||
|
||||
cmd.Parameters.AddWithValue("@url", $"%{domain}%");
|
||||
cmd.Parameters.AddWithValue("@domain", $"%{domain}%");
|
||||
|
||||
using var reader = cmd.ExecuteReader();
|
||||
if (!reader.Read() || reader.IsDBNull(0))
|
||||
if (!reader.Read() || reader.IsDBNull(1))
|
||||
return;
|
||||
|
||||
var iconId = reader.GetInt64(0).ToString();
|
||||
var imageData = (byte[])reader["data"];
|
||||
|
||||
if (imageData is not { Length: > 0 })
|
||||
return;
|
||||
|
||||
string faviconPath;
|
||||
if (FaviconHelper.IsSvgData(imageData))
|
||||
// Check if the image data is compressed (GZip)
|
||||
if (imageData.Length > 2 && imageData[0] == 0x1f && imageData[1] == 0x8b)
|
||||
{
|
||||
faviconPath = Path.Combine(_faviconCacheDir, $"firefox_{domain}.svg");
|
||||
}
|
||||
else
|
||||
{
|
||||
faviconPath = Path.Combine(_faviconCacheDir, $"firefox_{domain}.png");
|
||||
using var inputStream = new MemoryStream(imageData);
|
||||
using var gZipStream = new GZipStream(inputStream, CompressionMode.Decompress);
|
||||
using var outputStream = new MemoryStream();
|
||||
gZipStream.CopyTo(outputStream);
|
||||
imageData = outputStream.ToArray();
|
||||
}
|
||||
|
||||
// Filter out duplicate favicons
|
||||
if (savedPaths.TryAdd(faviconPath, true))
|
||||
// Convert the image data to WebP format
|
||||
var webpData = FaviconHelper.TryConvertToWebp(imageData);
|
||||
if (webpData != null)
|
||||
{
|
||||
FaviconHelper.SaveBitmapData(imageData, faviconPath);
|
||||
}
|
||||
var faviconPath = Path.Combine(_faviconCacheDir, $"firefox_{domain}_{iconId}.webp");
|
||||
|
||||
bookmark.FaviconPath = faviconPath;
|
||||
if (savedPaths.TryAdd(faviconPath, true))
|
||||
{
|
||||
FaviconHelper.SaveBitmapData(webpData, faviconPath);
|
||||
}
|
||||
|
||||
bookmark.FaviconPath = faviconPath;
|
||||
}
|
||||
}
|
||||
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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,12 +45,14 @@
|
|||
$(OutputPath)runtimes\linux-musl-arm;
|
||||
$(OutputPath)runtimes\linux-musl-arm64;
|
||||
$(OutputPath)runtimes\linux-musl-x64;
|
||||
$(OutputPath)runtimes\linux-musl-s390x;
|
||||
$(OutputPath)runtimes\linux-ppc64le;
|
||||
$(OutputPath)runtimes\linux-s390x;
|
||||
$(OutputPath)runtimes\linux-x64;
|
||||
$(OutputPath)runtimes\linux-x86;
|
||||
$(OutputPath)runtimes\maccatalyst-arm64;
|
||||
$(OutputPath)runtimes\maccatalyst-x64;
|
||||
$(OutputPath)runtimes\osx;
|
||||
$(OutputPath)runtimes\osx-arm64;
|
||||
$(OutputPath)runtimes\osx-x64"/>
|
||||
</Target>
|
||||
|
|
@ -64,12 +66,14 @@
|
|||
$(PublishDir)runtimes\linux-musl-arm;
|
||||
$(PublishDir)runtimes\linux-musl-arm64;
|
||||
$(PublishDir)runtimes\linux-musl-x64;
|
||||
$(PublishDir)runtimes\linux-musl-s390x;
|
||||
$(PublishDir)runtimes\linux-ppc64le;
|
||||
$(PublishDir)runtimes\linux-s390x;
|
||||
$(PublishDir)runtimes\linux-x64;
|
||||
$(PublishDir)runtimes\linux-x86;
|
||||
$(PublishDir)runtimes\maccatalyst-arm64;
|
||||
$(PublishDir)runtimes\maccatalyst-x64;
|
||||
$(PublishDir)runtimes\osx;
|
||||
$(PublishDir)runtimes\osx-arm64;
|
||||
$(PublishDir)runtimes\osx-x64"/>
|
||||
</Target>
|
||||
|
|
@ -81,7 +85,6 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Flow.Launcher.Infrastructure\Flow.Launcher.Infrastructure.csproj" />
|
||||
<ProjectReference Include="..\..\Flow.Launcher.Plugin\Flow.Launcher.Plugin.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
@ -96,7 +99,10 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
||||
<PackageReference Include="Microsoft.Data.Sqlite" Version="9.0.7" />
|
||||
<PackageReference Include="Flow.Launcher.Localization" Version="0.0.4" />
|
||||
<PackageReference Include="Microsoft.Data.Sqlite" Version="9.0.8" />
|
||||
<PackageReference Include="Svg.Skia" Version="3.0.4" />
|
||||
<PackageReference Include="SkiaSharp" Version="3.119.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using SkiaSharp;
|
||||
using Svg.Skia;
|
||||
|
||||
namespace Flow.Launcher.Plugin.BrowserBookmark.Helper;
|
||||
|
||||
|
|
@ -27,9 +29,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 +41,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 +51,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,16 +63,62 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsSvgData(byte[] data)
|
||||
public static byte[] TryConvertToWebp(byte[] data)
|
||||
{
|
||||
if (data.Length < 5)
|
||||
return false;
|
||||
string start = System.Text.Encoding.ASCII.GetString(data, 0, Math.Min(100, data.Length));
|
||||
return start.Contains("<svg") ||
|
||||
(start.StartsWith("<?xml") && start.Contains("<svg"));
|
||||
if (data == null || data.Length == 0)
|
||||
return null;
|
||||
|
||||
SKBitmap bitmap = null;
|
||||
|
||||
try
|
||||
{
|
||||
using (var ms = new MemoryStream(data))
|
||||
{
|
||||
var svg = new SKSvg();
|
||||
if (svg.Load(ms) != null && svg.Picture != null)
|
||||
{
|
||||
bitmap = new SKBitmap((int)svg.Picture.CullRect.Width, (int)svg.Picture.CullRect.Height);
|
||||
using (var canvas = new SKCanvas(bitmap))
|
||||
{
|
||||
canvas.Clear(SKColors.Transparent);
|
||||
canvas.DrawPicture(svg.Picture);
|
||||
canvas.Flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { /* Not an SVG */ }
|
||||
|
||||
if (bitmap == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
bitmap = SKBitmap.Decode(data);
|
||||
}
|
||||
catch { /* Not a decodable bitmap */ }
|
||||
}
|
||||
|
||||
if (bitmap != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var image = SKImage.FromBitmap(bitmap))
|
||||
using (var webp = image.Encode(SKEncodedImageFormat.Webp, 65))
|
||||
{
|
||||
if (webp != null)
|
||||
return webp.ToArray();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
bitmap.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">آلة حاسبة</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">تمكنك من إجراء العمليات الحسابية. (جرب 5*3-2 في Flow Launcher)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">آلة حاسبة</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">تمكنك من إجراء العمليات الحسابية. (جرب 5*3-2 في Flow Launcher)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Kalkulačka</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Umožňuje provádět matematické výpočty.(Try 5*3-2 v průtokovém spouštěči)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Kalkulačka</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Umožňuje provádět matematické výpočty.(Try 5*3-2 v průtokovém spouštěči)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Calculator</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Allows to do mathematical calculations.(Try 5*3-2 in Flow Launcher)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Calculator</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Allows to do mathematical calculations.(Try 5*3-2 in Flow Launcher)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Rechner</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Ermöglicht mathematische Berechnungen. (Versuchen Sie 5*3-2 in Flow Launcher)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Rechner</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Ermöglicht mathematische Berechnungen. (Versuchen Sie 5*3-2 in Flow Launcher)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Calculator</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Allows to do mathematical calculations.(Try 5*3-2 in Flow Launcher)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Calculator</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Perform mathematical calculations (including hexadecimal values). Use ',' or '.' as thousand separator or decimal place.</system:String>
|
||||
<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>
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Calculadora</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Permite hacer cálculos matemáticos. (Pruebe con 5*3-2 en Flow Launcher)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Calculadora</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Permite hacer cálculos matemáticos. (Pruebe con 5*3-2 en Flow Launcher)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Calculadora</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Permite hacer cálculos matemáticos. (Pruebe 5*3-2 en Flow Launcher)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Calculadora</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Permite hacer cálculos matemáticos. (Pruebe 5*3-2 en Flow Launcher)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Calculatrice</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Permet de faire des calculs mathématiques.(Essayez 5*3-2 dans Flow Launcher)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Calculatrice</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Permet de faire des calculs mathématiques.(Essayez 5*3-2 dans Flow Launcher)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">מחשבון</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">מאפשר לבצע חישובים מתמטיים. (נסה 5*3-2 ב-Flow Launcher)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">מחשבון</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">מאפשר לבצע חישובים מתמטיים. (נסה 5*3-2 ב-Flow Launcher)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Calcolatrice</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Consente di eseguire calcoli matematici (provare 5*3-2 in Flow Launcher)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Calcolatrice</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Consente di eseguire calcoli matematici (provare 5*3-2 in Flow Launcher)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">電卓</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">数式の計算ができます(Flow Launcherで「5*3-2」と入力してみてください)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">電卓</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">数式の計算ができます(Flow Launcherで「5*3-2」と入力してみてください)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">계산기</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">수학 계산을 할 수 있습니다. Flow Launcher에서 5*3-2를 입력해보세요.</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">계산기</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">수학 계산을 할 수 있습니다. Flow Launcher에서 5*3-2를 입력해보세요.</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Kalkulator</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Lar deg gjøre matematiske beregninger. (Prøv 5*3-2 i Flow Launcher)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Kalkulator</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Lar deg gjøre matematiske beregninger. (Prøv 5*3-2 i Flow Launcher)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Calculator</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Allows to do mathematical calculations.(Try 5*3-2 in Flow Launcher)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Calculator</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Allows to do mathematical calculations.(Try 5*3-2 in Flow Launcher)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Kalkulator</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Szybkie wykonywanie obliczeń matematycznych. (Spróbuj wpisać 5*3-2 w oknie Flow Launchera)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Kalkulator</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Szybkie wykonywanie obliczeń matematycznych. (Spróbuj wpisać 5*3-2 w oknie Flow Launchera)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Calculadora</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Permite fazer cálculos matemáticos.(Tente 5*3-2 no Flow Launcher)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Calculadora</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Permite fazer cálculos matemáticos.(Tente 5*3-2 no Flow Launcher)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Calculadora</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Permite a execução de cálculos matemáticos (experimente 5*3-2)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Calculadora</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Permite a execução de cálculos matemáticos (experimente 5*3-2)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Калькулятор</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Позволяет выполнять математические вычисления. (Попробуйте 5*3-2 в Flow Launcher)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Калькулятор</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Позволяет выполнять математические вычисления. (Попробуйте 5*3-2 в Flow Launcher)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Kalkulačka</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Spracúva matematické operácie. (Skúste 5*3-2 vo Flow Launcheri)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Kalkulačka</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Spracúva matematické operácie. (Skúste 5*3-2 vo Flow Launcheri)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Calculator</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Allows to do mathematical calculations.(Try 5*3-2 in Flow Launcher)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Calculator</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Allows to do mathematical calculations.(Try 5*3-2 in Flow Launcher)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Hesap Makinesi</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Matematiksel hesaplamalar yapmaya yarar. (5*3-2 yazmayı deneyin)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Hesap Makinesi</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Matematiksel hesaplamalar yapmaya yarar. (5*3-2 yazmayı deneyin)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Калькулятор</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Дозволяє виконувати математичні обчислення (спробуйте 5*3-2 у Flow Launcher)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Калькулятор</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Дозволяє виконувати математичні обчислення (спробуйте 5*3-2 у Flow Launcher)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Máy tính</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Cho phép thực hiện các phép tính toán học. (Thử 5*3-2 trong Flow Launcher)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Máy tính</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Cho phép thực hiện các phép tính toán học. (Thử 5*3-2 trong Flow Launcher)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">计算器</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">为 Flow Launcher 提供数学计算能力。(试着在 Flow Launcher 输入 5*3-2)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">计算器</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">为 Flow Launcher 提供数学计算能力。(试着在 Flow Launcher 输入 5*3-2)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">計算機</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">為 Flow Launcher 提供數學計算功能。(試著在 Flow Launcher 輸入 5*3-2)</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">計算機</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">為 Flow Launcher 提供數學計算功能。(試著在 Flow Launcher 輸入 5*3-2)</system:String>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,36 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
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 = MainRegexHelper.GetThousandGroupRegex();
|
||||
private static readonly Regex NumberRegex = MainRegexHelper.GetNumberRegex();
|
||||
|
||||
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.
|
||||
/// This is used to ensure thread safety by keeping query state local.
|
||||
/// </summary>
|
||||
private class ParsingContext
|
||||
{
|
||||
public string InputDecimalSeparator { get; set; }
|
||||
public bool InputUsesGroupSeparators { get; set; }
|
||||
}
|
||||
|
||||
public void Init(PluginInitContext context)
|
||||
{
|
||||
|
|
@ -54,33 +59,24 @@ namespace Flow.Launcher.Plugin.Calculator
|
|||
return new List<Result>();
|
||||
}
|
||||
|
||||
var context = new ParsingContext();
|
||||
|
||||
try
|
||||
{
|
||||
string expression;
|
||||
|
||||
switch (_settings.DecimalSeparator)
|
||||
{
|
||||
case DecimalSeparator.Comma:
|
||||
case DecimalSeparator.UseSystemLocale when CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator == ",":
|
||||
expression = query.Search.Replace(",", ".");
|
||||
break;
|
||||
default:
|
||||
expression = query.Search;
|
||||
break;
|
||||
}
|
||||
var expression = NumberRegex.Replace(query.Search, m => NormalizeNumber(m.Value, context));
|
||||
|
||||
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()))
|
||||
{
|
||||
decimal roundedResult = Math.Round(Convert.ToDecimal(result), _settings.MaxDecimalPlaces, MidpointRounding.AwayFromZero);
|
||||
string newResult = ChangeDecimalSeparator(roundedResult, GetDecimalSeparator());
|
||||
string newResult = FormatResult(roundedResult, context);
|
||||
|
||||
return new List<Result>
|
||||
{
|
||||
|
|
@ -89,7 +85,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 =>
|
||||
{
|
||||
|
|
@ -100,7 +96,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;
|
||||
}
|
||||
}
|
||||
|
|
@ -116,9 +112,137 @@ namespace Flow.Launcher.Plugin.Calculator
|
|||
return new List<Result>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses a string representation of a number, detecting its format. It uses structural analysis
|
||||
/// and falls back to system culture for truly ambiguous cases (e.g., "1,234").
|
||||
/// It populates the provided ParsingContext with the detected format for later use.
|
||||
/// </summary>
|
||||
/// <returns>A normalized number string with '.' as the decimal separator for the Mages engine.</returns>
|
||||
private string NormalizeNumber(string numberStr, ParsingContext context)
|
||||
{
|
||||
var systemGroupSep = CultureInfo.CurrentCulture.NumberFormat.NumberGroupSeparator;
|
||||
int dotCount = numberStr.Count(f => f == '.');
|
||||
int commaCount = numberStr.Count(f => f == ',');
|
||||
|
||||
// Case 1: Unambiguous mixed separators (e.g., "1.234,56")
|
||||
if (dotCount > 0 && commaCount > 0)
|
||||
{
|
||||
context.InputUsesGroupSeparators = true;
|
||||
if (numberStr.LastIndexOf('.') > numberStr.LastIndexOf(','))
|
||||
{
|
||||
context.InputDecimalSeparator = Dot;
|
||||
return numberStr.Replace(Comma, string.Empty);
|
||||
}
|
||||
else
|
||||
{
|
||||
context.InputDecimalSeparator = Comma;
|
||||
return numberStr.Replace(Dot, string.Empty).Replace(Comma, Dot);
|
||||
}
|
||||
}
|
||||
|
||||
// Case 2: Only dots
|
||||
if (dotCount > 0)
|
||||
{
|
||||
if (dotCount > 1)
|
||||
{
|
||||
context.InputUsesGroupSeparators = true;
|
||||
return numberStr.Replace(Dot, string.Empty);
|
||||
}
|
||||
// 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)
|
||||
{
|
||||
context.InputUsesGroupSeparators = true;
|
||||
return numberStr.Replace(Dot, string.Empty);
|
||||
}
|
||||
else
|
||||
{
|
||||
context.InputDecimalSeparator = Dot;
|
||||
return numberStr;
|
||||
}
|
||||
}
|
||||
else // Unambiguous decimal (e.g., "12.34" or "0.123" or ".123")
|
||||
{
|
||||
context.InputDecimalSeparator = Dot;
|
||||
return numberStr;
|
||||
}
|
||||
}
|
||||
|
||||
// Case 3: Only commas
|
||||
if (commaCount > 0)
|
||||
{
|
||||
if (commaCount > 1)
|
||||
{
|
||||
context.InputUsesGroupSeparators = true;
|
||||
return numberStr.Replace(Comma, string.Empty);
|
||||
}
|
||||
// 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)
|
||||
{
|
||||
context.InputUsesGroupSeparators = true;
|
||||
return numberStr.Replace(Comma, string.Empty);
|
||||
}
|
||||
else
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
// Case 4: No separators
|
||||
return numberStr;
|
||||
}
|
||||
|
||||
private string FormatResult(decimal roundedResult, ParsingContext context)
|
||||
{
|
||||
string decimalSeparator = context.InputDecimalSeparator ?? GetDecimalSeparator();
|
||||
string groupSeparator = GetGroupSeparator(decimalSeparator);
|
||||
|
||||
string resultStr = roundedResult.ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
string[] parts = resultStr.Split('.');
|
||||
string integerPart = parts[0];
|
||||
string fractionalPart = parts.Length > 1 ? parts[1] : string.Empty;
|
||||
|
||||
if (context.InputUsesGroupSeparators && integerPart.Length > 3)
|
||||
{
|
||||
integerPart = ThousandGroupRegex.Replace(integerPart, groupSeparator);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(fractionalPart))
|
||||
{
|
||||
return integerPart + decimalSeparator + fractionalPart;
|
||||
}
|
||||
|
||||
return integerPart;
|
||||
}
|
||||
|
||||
private string GetGroupSeparator(string decimalSeparator)
|
||||
{
|
||||
// This logic is now independent of the system's group separator
|
||||
// to ensure consistent output for unit testing.
|
||||
return decimalSeparator == Dot ? Comma : Dot;
|
||||
}
|
||||
|
||||
private bool CanCalculate(Query query)
|
||||
{
|
||||
// Don't execute when user only input "e" or "i" keyword
|
||||
if (query.Search.Length < 2)
|
||||
{
|
||||
return false;
|
||||
|
|
@ -134,40 +258,22 @@ namespace Flow.Launcher.Plugin.Calculator
|
|||
return false;
|
||||
}
|
||||
|
||||
if ((query.Search.Contains(dot) && GetDecimalSeparator() != dot) ||
|
||||
(query.Search.Contains(comma) && GetDecimalSeparator() != comma))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private string ChangeDecimalSeparator(decimal value, string newDecimalSeparator)
|
||||
{
|
||||
if (String.IsNullOrEmpty(newDecimalSeparator))
|
||||
{
|
||||
return value.ToString();
|
||||
}
|
||||
|
||||
var numberFormatInfo = new NumberFormatInfo
|
||||
{
|
||||
NumberDecimalSeparator = newDecimalSeparator
|
||||
};
|
||||
return value.ToString(numberFormatInfo);
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
@ -188,17 +294,22 @@ namespace Flow.Launcher.Plugin.Calculator
|
|||
|
||||
public string GetTranslatedPluginTitle()
|
||||
{
|
||||
return Context.API.GetTranslation("flowlauncher_plugin_caculator_plugin_name");
|
||||
return Localize.flowlauncher_plugin_calculator_plugin_name();
|
||||
}
|
||||
|
||||
public string GetTranslatedPluginDescription()
|
||||
{
|
||||
return Context.API.GetTranslation("flowlauncher_plugin_caculator_plugin_description");
|
||||
return Localize.flowlauncher_plugin_calculator_plugin_description();
|
||||
}
|
||||
|
||||
public Control CreateSettingPanel()
|
||||
{
|
||||
return new CalculatorSettings(_viewModel);
|
||||
return new CalculatorSettings(_settings);
|
||||
}
|
||||
|
||||
public void OnCultureInfoChanged(CultureInfo newCulture)
|
||||
{
|
||||
DecimalSeparatorLocalized.UpdateLabels(_viewModel.AllDecimalSeparator);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
19
Plugins/Flow.Launcher.Plugin.Calculator/MainRegexHelper.cs
Normal file
19
Plugins/Flow.Launcher.Plugin.Calculator/MainRegexHelper.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
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();
|
||||
|
||||
[GeneratedRegex(@"[\d\.,]+", RegexOptions.Compiled)]
|
||||
public static partial Regex GetNumberRegex();
|
||||
|
||||
[GeneratedRegex(@"\B(?=(\d{3})+(?!\d))", RegexOptions.Compiled)]
|
||||
public static partial Regex GetThousandGroupRegex();
|
||||
}
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Flow.Launcher.Plugin.Calculator
|
||||
{
|
||||
/// <summary>
|
||||
/// Tries to convert all numbers in a text from one culture format to another.
|
||||
/// </summary>
|
||||
public class NumberTranslator
|
||||
{
|
||||
private readonly CultureInfo sourceCulture;
|
||||
private readonly CultureInfo targetCulture;
|
||||
private readonly Regex splitRegexForSource;
|
||||
private readonly Regex splitRegexForTarget;
|
||||
|
||||
private NumberTranslator(CultureInfo sourceCulture, CultureInfo targetCulture)
|
||||
{
|
||||
this.sourceCulture = sourceCulture;
|
||||
this.targetCulture = targetCulture;
|
||||
|
||||
this.splitRegexForSource = GetSplitRegex(this.sourceCulture);
|
||||
this.splitRegexForTarget = GetSplitRegex(this.targetCulture);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new <see cref="NumberTranslator"/> - returns null if no number conversion
|
||||
/// is required between the cultures.
|
||||
/// </summary>
|
||||
/// <param name="sourceCulture">source culture</param>
|
||||
/// <param name="targetCulture">target culture</param>
|
||||
/// <returns></returns>
|
||||
public static NumberTranslator Create(CultureInfo sourceCulture, CultureInfo targetCulture)
|
||||
{
|
||||
bool conversionRequired = sourceCulture.NumberFormat.NumberDecimalSeparator != targetCulture.NumberFormat.NumberDecimalSeparator
|
||||
|| sourceCulture.NumberFormat.PercentGroupSeparator != targetCulture.NumberFormat.PercentGroupSeparator
|
||||
|| sourceCulture.NumberFormat.NumberGroupSizes != targetCulture.NumberFormat.NumberGroupSizes;
|
||||
return conversionRequired
|
||||
? new NumberTranslator(sourceCulture, targetCulture)
|
||||
: null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Translate from source to target culture.
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public string Translate(string input)
|
||||
{
|
||||
return this.Translate(input, this.sourceCulture, this.targetCulture, this.splitRegexForSource);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Translate from target to source culture.
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public string TranslateBack(string input)
|
||||
{
|
||||
return this.Translate(input, this.targetCulture, this.sourceCulture, this.splitRegexForTarget);
|
||||
}
|
||||
|
||||
private string Translate(string input, CultureInfo cultureFrom, CultureInfo cultureTo, Regex splitRegex)
|
||||
{
|
||||
var outputBuilder = new StringBuilder();
|
||||
|
||||
string[] tokens = splitRegex.Split(input);
|
||||
foreach (string token in tokens)
|
||||
{
|
||||
decimal number;
|
||||
outputBuilder.Append(
|
||||
decimal.TryParse(token, NumberStyles.Number, cultureFrom, out number)
|
||||
? number.ToString(cultureTo)
|
||||
: token);
|
||||
}
|
||||
|
||||
return outputBuilder.ToString();
|
||||
}
|
||||
|
||||
private Regex GetSplitRegex(CultureInfo culture)
|
||||
{
|
||||
var splitPattern = $"((?:\\d|{Regex.Escape(culture.NumberFormat.NumberDecimalSeparator)}";
|
||||
if (!string.IsNullOrEmpty(culture.NumberFormat.NumberGroupSeparator))
|
||||
{
|
||||
splitPattern += $"|{Regex.Escape(culture.NumberFormat.NumberGroupSeparator)}";
|
||||
}
|
||||
splitPattern += ")+)";
|
||||
return new Regex(splitPattern);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,20 +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"
|
||||
Loaded="CalculatorSettings_Loaded"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<UserControl.Resources>
|
||||
<core:LocalizationConverter x:Key="LocalizationConverter" />
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid Margin="{StaticResource SettingPanelMargin}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
|
|
@ -33,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"
|
||||
|
|
@ -42,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"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls;
|
||||
using Flow.Launcher.Plugin.Calculator.ViewModels;
|
||||
|
||||
namespace Flow.Launcher.Plugin.Calculator.Views
|
||||
|
|
@ -12,20 +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();
|
||||
}
|
||||
|
||||
private void CalculatorSettings_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
DecimalSeparatorComboBox.SelectedItem = _settings.DecimalSeparator;
|
||||
MaxDecimalPlaces.SelectedItem = _settings.MaxDecimalPlaces;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
"ID": "CEA0FDFC6D3B4085823D60DC76F28855",
|
||||
"ActionKeyword": "*",
|
||||
"Name": "Calculator",
|
||||
"Description": "Perform mathematical calculations (including hexadecimal values)",
|
||||
"Author": "cxfksword",
|
||||
"Description": "Perform mathematical calculations (including hexadecimal values). Use ',' or '.' as thousand separator or decimal place.",
|
||||
"Author": "cxfksword, dcog989",
|
||||
"Version": "1.0.0",
|
||||
"Language": "csharp",
|
||||
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
||||
<PackageReference Include="Droplex" Version="1.7.0" />
|
||||
<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" />
|
||||
|
|
|
|||
|
|
@ -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())}";
|
||||
}
|
||||
}
|
||||
|
|
@ -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 ↑</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_name_descending">Name ↓</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_path_ascending">Path ↑</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_path_descending">Path ↓</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_size_ascending">Size ↑</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_size_descending">Size ↓</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_extension_ascending">Extension ↑</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_extension_descending">Extension ↓</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_type_name_ascending">Type Name ↑</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_type_name_descending">Type Name ↓</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_created_ascending">Date Created ↑</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_created_descending">Date Created ↓</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_modified_ascending">Date Modified ↑</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_modified_descending">Date Modified ↓</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_attributes_ascending">Attributes ↑</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_attributes_descending">Attributes ↓</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_file_list_filename_ascending">File List FileName ↑</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_file_list_filename_descending">File List FileName ↓</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_run_count_ascending">Run Count ↑</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_run_count_descending">Run Count ↓</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_recently_changed_ascending">Date Recently Changed ↑</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_recently_changed_descending">Date Recently Changed ↓</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_accessed_ascending">Date Accessed ↑</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_accessed_descending">Date Accessed ↓</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_run_ascending">Date Run ↑</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_date_run_descending">Date Run ↓</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_ascending">↑</system:String>
|
||||
<system:String x:Key="flowlauncher_plugin_everything_sort_by_descending">↓</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>
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -593,6 +593,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
|
||||
|
|
@ -613,6 +629,7 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string SortOptionWarningMessage
|
||||
{
|
||||
get
|
||||
|
|
@ -622,15 +639,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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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="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>
|
||||
|
|
@ -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>());
|
||||
|
|
|
|||
Loading…
Reference in a new issue