Cleanup, refactoring and SVG package removed

Reenable dark mode colored SVG icons
This commit is contained in:
Peter Kirmeier 2022-12-03 22:41:03 +01:00
parent ece80ebc3f
commit 813912d08c
12 changed files with 290 additions and 456 deletions

View file

@ -31,17 +31,17 @@ namespace SystemTrayMenu.Handler
this.menus = menus;
}
internal event Action HotKeyPressed;
internal event Action? HotKeyPressed;
internal event Action ClosePressed;
internal event Action? ClosePressed;
internal event Action<ListView, int> RowSelected;
internal event Action<ListView, int>? RowSelected;
internal event Action<int, ListView> RowDeselected;
internal event Action<int, ListView>? RowDeselected;
internal event Action<ListView, int> EnterPressed;
internal event Action<ListView, int>? EnterPressed;
internal event Action Cleared;
internal event Action? Cleared;
internal bool InUse { get; set; }
@ -153,17 +153,18 @@ namespace SystemTrayMenu.Handler
case Key.Apps:
if (modifiers == ModifierKeys.None)
{
ListView dgv = menus[iMenuKey]?.GetDataGridView();
if (iRowKey > -1 &&
dgv.Items.Count > iRowKey)
ListView? dgv = menus[iMenuKey]?.GetDataGridView();
if (dgv != null)
{
if (iRowKey > -1 && dgv.Items.Count > iRowKey)
{
#if TODO // WPF: Better way to open context menu (as it looks like this is the code's intention)
Point point = dgv.GetCellDisplayRectangle(2, iRowKey, false).Location;
RowData trigger = (RowData)dgv.Rows[iRowKey].Cells[2].Value;
MouseEventArgs mouseEventArgs = new(MouseButtons.Right, 1, point.X, point.Y, 0);
trigger.MouseDown(dgv, mouseEventArgs);
Point point = dgv.GetCellDisplayRectangle(2, iRowKey, false).Location;
RowData trigger = (RowData)dgv.Rows[iRowKey].Cells[2].Value;
MouseEventArgs mouseEventArgs = new(MouseButtons.Right, 1, point.X, point.Y, 0);
trigger.MouseDown(dgv, mouseEventArgs);
#endif
}
}
}
@ -196,14 +197,20 @@ namespace SystemTrayMenu.Handler
internal void SearchTextChanged(Menu menu, bool isSearchStringEmpty)
{
ListView dgv = menu.GetDataGridView();
if (isSearchStringEmpty)
{
ClearIsSelectedByKey();
}
else if (dgv.Items.Count > 0)
else
{
Select(dgv, 0, true);
ListView? dgv = menu.GetDataGridView();
if (dgv != null)
{
if (dgv.Items.Count > 0)
{
Select(dgv, 0, true);
}
}
}
}
@ -245,7 +252,7 @@ namespace SystemTrayMenu.Handler
}
private bool IsAnyMenuSelectedByKey(
ref ListView dgv,
ref ListView? dgv,
ref Menu menuFromSelected,
ref string textselected)
{
@ -255,15 +262,18 @@ namespace SystemTrayMenu.Handler
iRowKey > -1)
{
dgv = menu.GetDataGridView();
if (dgv.Items.Count > iRowKey)
if (dgv != null)
{
Menu.ListViewItemData itemData = (Menu.ListViewItemData)dgv.Items[iRowKey];
RowData rowData = itemData.data;
if (rowData.IsSelected)
if (dgv.Items.Count > iRowKey)
{
isStillSelected = true;
menuFromSelected = rowData.SubMenu;
textselected = itemData.ColumnText;
Menu.ListViewItemData itemData = (Menu.ListViewItemData)dgv.Items[iRowKey];
RowData rowData = itemData.data;
if (rowData.IsSelected)
{
isStillSelected = true;
menuFromSelected = rowData.SubMenu;
textselected = itemData.ColumnText;
}
}
}
}

View file

@ -96,7 +96,7 @@ namespace SystemTrayMenu.Business
if (IconReader.MainPreload)
{
workerMainMenu.DoWork -= LoadMenu;
menus[0] = Create(menuData, new DirectoryInfo(Config.Path).Name, Config.Path);
menus[0] = Create(menuData, new DirectoryInfo(Config.Path).Name);
menus[0].Loaded += (s, e) => ExecuteWatcherHistory();
IconReader.MainPreload = false;
@ -161,8 +161,7 @@ namespace SystemTrayMenu.Business
DirectoryState = MenuDataDirectoryState.Valid,
};
// TODO: Check: Is Config.Path as path parameter correct? (topeterk: should be rowData.Path?)
Menu menuLoading = Create(menuDataLoading, new DirectoryInfo(rowData.Path).Name, Config.Path);
Menu menuLoading = Create(menuDataLoading, new DirectoryInfo(rowData.Path).Name);
menus[rowData.Level + 1] = menuLoading;
menuLoading.Tag = menuDataLoading.RowDataParent = rowData;
menuDataLoading.RowDataParent.SubMenu = menuLoading;
@ -477,6 +476,16 @@ namespace SystemTrayMenu.Business
}
}
internal static void OpenFolder(string? path = null)
{
if (string.IsNullOrEmpty(path))
{
path = Config.Path;
}
Log.ProcessStart(path);
}
private static void LoadMenu(object senderDoWork, DoWorkEventArgs eDoWork)
{
string path;
@ -497,17 +506,6 @@ namespace SystemTrayMenu.Business
eDoWork.Result = menuData;
}
private static void OpenFolder(string pathToFolder = "")
{
string path = pathToFolder;
if (string.IsNullOrEmpty(path))
{
path = Config.Path;
}
Log.ProcessStart(path);
}
private static int GetRowUnderCursor(ListView dgv, Point location)
{
#if TODO // TOUCH
@ -586,11 +584,13 @@ namespace SystemTrayMenu.Business
return (App.TaskbarLogo != null && App.TaskbarLogo.IsActive) || IsShellContextMenuOpen();
}
private Menu Create(MenuData menuData, string title, string path)
private Menu Create(MenuData menuData, string title, string? path = null)
{
Menu menu = new(title, menuData.Level, menuData.DirectoryState);
Menu menu = new(title, menuData.Level, menuData.DirectoryState)
{
FolderPath = path,
};
menu.UserClickedOpenFolder += () => OpenFolder(path);
menu.MenuScrolled += AdjustMenusSizeAndLocation; // TODO: Only update vertical location while scrolling?
#if TODO // Misc MouseEvents
menu.MouseLeave += waitLeave.Start;

View file

@ -41,8 +41,6 @@ namespace SystemTrayMenu
app.Run();
}
}
Config.Dispose();
}
catch (Exception ex)
{
@ -68,9 +66,10 @@ namespace SystemTrayMenu
if (dialogResult == MessageBoxResult.Yes)
{
Version? version = Assembly.GetEntryAssembly()?.GetName().Version;
Log.ProcessStart("mailto:" + "markus@hofknecht.eu" +
"?subject=SystemTrayMenu Bug reported " +
Assembly.GetEntryAssembly().GetName().Version +
(version != null ? version.ToString() : string.Empty) +
"&body=" + ex.ToString());
}

View file

@ -1,103 +1,95 @@
// <copyright file="AppColors.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace SystemTrayMenu
{
using System.Drawing;
// <copyright file="AppColors.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace SystemTrayMenu
{
using System.Windows.Media;
using Color = System.Drawing.Color;
internal static class AppColors
{
public static Color Arrow { get; internal set; }
public static Color ArrowHoverBackground { get; internal set; }
public static Color ArrowHover { get; internal set; }
public static Color ArrowClick { get; internal set; }
public static Color ArrowClickBackground { get; internal set; }
public static Color SliderArrowsAndTrackHover { get; internal set; }
public static Color Slider { get; internal set; }
public static Color SliderHover { get; internal set; }
public static Color SliderDragging { get; internal set; }
public static Color ScrollbarBackground { get; internal set; }
public static Color ArrowDarkMode { get; internal set; }
public static Color ArrowHoverBackgroundDarkMode { get; internal set; }
public static Color ArrowHoverDarkMode { get; internal set; }
public static Color ArrowClickDarkMode { get; internal set; }
public static Color ArrowClickBackgroundDarkMode { get; internal set; }
public static Color SliderArrowsAndTrackHoverDarkMode { get; internal set; }
public static Color SliderDarkMode { get; internal set; }
public static Color SliderHoverDarkMode { get; internal set; }
public static Color SliderDraggingDarkMode { get; internal set; }
public static Color ScrollbarBackgroundDarkMode { get; internal set; }
public static Color SelectedItem { get; set; }
public static Color DarkModeSelecetedItem { get; set; }
public static Color SelectedItemBorder { get; set; }
public static Color DarkModeSelectedItemBorder { get; set; }
public static Color OpenFolder { get; set; }
public static Color DarkModeOpenFolder { get; set; }
public static Color OpenFolderBorder { get; set; }
public static Color DarkModeOpenFolderBorder { get; set; }
public static Color Background { get; set; }
public static Color DarkModeBackground { get; set; }
public static Color BackgroundBorder { get; set; }
public static Color DarkModeBackgroundBorder { get; set; }
public static Color SearchField { get; set; }
public static Color DarkModeSearchField { get; set; }
public static Bitmap BitmapOpenFolder { get; set; }
public static Bitmap BitmapPin { get; set; }
public static Bitmap BitmapSettings { get; set; }
public static Bitmap BitmapRestart { get; set; }
public static Bitmap BitmapPinActive { get; set; }
public static Bitmap BitmapSearch { get; set; }
public static Color Icons { get; set; }
internal static class AppColors
{
public static Color Arrow { get; internal set; }
public static Color ArrowHoverBackground { get; internal set; }
public static Color ArrowHover { get; internal set; }
public static Color ArrowClick { get; internal set; }
public static Color ArrowClickBackground { get; internal set; }
public static Color SliderArrowsAndTrackHover { get; internal set; }
public static Color Slider { get; internal set; }
public static Color SliderHover { get; internal set; }
public static Color SliderDragging { get; internal set; }
public static Color ScrollbarBackground { get; internal set; }
public static Color ArrowDarkMode { get; internal set; }
public static Color ArrowHoverBackgroundDarkMode { get; internal set; }
public static Color ArrowHoverDarkMode { get; internal set; }
public static Color ArrowClickDarkMode { get; internal set; }
public static Color ArrowClickBackgroundDarkMode { get; internal set; }
public static Color SliderArrowsAndTrackHoverDarkMode { get; internal set; }
public static Color SliderDarkMode { get; internal set; }
public static Color SliderHoverDarkMode { get; internal set; }
public static Color SliderDraggingDarkMode { get; internal set; }
public static Color ScrollbarBackgroundDarkMode { get; internal set; }
public static Color SelectedItem { get; set; }
public static Color DarkModeSelecetedItem { get; set; }
public static Color SelectedItemBorder { get; set; }
public static Color DarkModeSelectedItemBorder { get; set; }
public static Color OpenFolder { get; set; }
public static Color DarkModeOpenFolder { get; set; }
public static Color OpenFolderBorder { get; set; }
public static Color DarkModeOpenFolderBorder { get; set; }
public static Color Background { get; set; }
public static Color DarkModeBackground { get; set; }
public static Color BackgroundBorder { get; set; }
public static Color DarkModeBackgroundBorder { get; set; }
public static Color SearchField { get; set; }
public static Color DarkModeSearchField { get; set; }
public static Color Icons { get; set; }
public static Color DarkModeIcons { get; set; }
// TODO: WPF: Remove by not using system drawing colors
public static SolidColorBrush ToSolidColorBrush(this Color color)
{
return new SolidColorBrush(System.Windows.Media.Color.FromArgb(color.A, color.R, color.G, color.B));
}
}
}
public static SolidColorBrush SolidColorBrushFromString(string value)
{
return new SolidColorBrush((System.Windows.Media.Color)ColorConverter.ConvertFromString(value));
}
}
}

View file

@ -7,10 +7,8 @@ namespace SystemTrayMenu
using System;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows;
using Microsoft.Win32;
using Svg;
using SystemTrayMenu.Properties;
using SystemTrayMenu.UserInterface.FolderBrowseDialog;
using SystemTrayMenu.Utilities;
@ -63,16 +61,6 @@ namespace SystemTrayMenu
}
}
public static void Dispose()
{
AppColors.BitmapOpenFolder.Dispose();
AppColors.BitmapPin.Dispose();
AppColors.BitmapPinActive.Dispose();
AppColors.BitmapSettings.Dispose();
AppColors.BitmapRestart.Dispose();
AppColors.BitmapSearch.Dispose();
}
public static Icon GetAppIcon()
{
if (Settings.Default.UseIconFromRootFolder)
@ -266,29 +254,6 @@ namespace SystemTrayMenu
Settings.Default.ColorDarkModeIcons = colorAndCode.HtmlColorCode;
AppColors.DarkModeIcons = colorAndCode.Color;
string htmlColorCodeIcons;
if (IsDarkMode())
{
htmlColorCodeIcons = Settings.Default.ColorDarkModeIcons;
}
else
{
htmlColorCodeIcons = Settings.Default.ColorIcons;
}
AppColors.BitmapOpenFolder =
ReadSvg(Properties.Resources.ic_fluent_folder_arrow_right_48_regular, htmlColorCodeIcons);
AppColors.BitmapPin =
ReadSvg(Properties.Resources.ic_fluent_pin_48_regular, htmlColorCodeIcons);
AppColors.BitmapSettings =
ReadSvg(Properties.Resources.ic_fluent_settings_28_regular, htmlColorCodeIcons);
AppColors.BitmapRestart =
ReadSvg(Properties.Resources.ic_fluent_arrow_sync_24_regular, htmlColorCodeIcons);
AppColors.BitmapPinActive =
ReadSvg(Properties.Resources.ic_fluent_pin_48_filled, htmlColorCodeIcons);
AppColors.BitmapSearch =
ReadSvg(Properties.Resources.ic_fluent_search_48_regular, htmlColorCodeIcons);
colorAndCode.HtmlColorCode = Settings.Default.ColorSearchField;
colorAndCode.Color = Color.FromArgb(255, 255, 255);
colorAndCode = ProcessColorAndCode(converter, colorAndCode, ref changed);
@ -451,18 +416,6 @@ namespace SystemTrayMenu
}
}
private static Bitmap ReadSvg(byte[] byteArray, string htmlColorCode)
{
string str = Encoding.UTF8.GetString(byteArray);
str = str.Replace("#585858", htmlColorCode);
byteArray = Encoding.UTF8.GetBytes(str);
using MemoryStream stream = new(byteArray);
SvgDocument svgDocument = SvgDocument.Open<SvgDocument>(stream);
svgDocument.Color = new SvgColourServer(Color.Black);
return svgDocument.Draw();
}
private static bool IsRegistryValueThisValue(string keyName, string valueName, string value)
{
bool isRegistryValueThisValue = false;

View file

@ -1,173 +1,113 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SystemTrayMenu.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SystemTrayMenu.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] ic_fluent_arrow_sync_24_regular {
get {
object obj = ResourceManager.GetObject("ic_fluent_arrow_sync_24_regular", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] ic_fluent_folder_arrow_right_48_regular {
get {
object obj = ResourceManager.GetObject("ic_fluent_folder_arrow_right_48_regular", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] ic_fluent_pin_48_filled {
get {
object obj = ResourceManager.GetObject("ic_fluent_pin_48_filled", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] ic_fluent_pin_48_regular {
get {
object obj = ResourceManager.GetObject("ic_fluent_pin_48_regular", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] ic_fluent_search_48_regular {
get {
object obj = ResourceManager.GetObject("ic_fluent_search_48_regular", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] ic_fluent_settings_28_regular {
get {
object obj = ResourceManager.GetObject("ic_fluent_settings_28_regular", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon LinkArrow {
get {
object obj = ResourceManager.GetObject("LinkArrow", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon Loading {
get {
object obj = ResourceManager.GetObject("Loading", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon NotFound {
get {
object obj = ResourceManager.GetObject("NotFound", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon SystemTrayMenu {
get {
object obj = ResourceManager.GetObject("SystemTrayMenu", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon White50Percentage {
get {
object obj = ResourceManager.GetObject("White50Percentage", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SystemTrayMenu.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SystemTrayMenu.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon LinkArrow {
get {
object obj = ResourceManager.GetObject("LinkArrow", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon Loading {
get {
object obj = ResourceManager.GetObject("Loading", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon NotFound {
get {
object obj = ResourceManager.GetObject("NotFound", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon SystemTrayMenu {
get {
object obj = ResourceManager.GetObject("SystemTrayMenu", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon White50Percentage {
get {
object obj = ResourceManager.GetObject("White50Percentage", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
}
}

View file

@ -124,30 +124,12 @@
<data name="SystemTrayMenu" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SystemTrayMenu.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ic_fluent_pin_48_filled" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ic_fluent_pin_48_filled.svg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="ic_fluent_pin_48_regular" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ic_fluent_pin_48_regular.svg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="ic_fluent_search_48_regular" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ic_fluent_search_48_regular.svg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="ic_fluent_folder_arrow_right_48_regular" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ic_fluent_folder_arrow_right_48_regular.svg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="NotFound" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\NotFound.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Loading" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Loading.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ic_fluent_arrow_sync_24_regular" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ic_fluent_arrow_sync_24_regular.svg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="ic_fluent_settings_28_regular" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ic_fluent_settings_28_regular.svg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="LinkArrow" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LinkArrow.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>

View file

@ -177,7 +177,6 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Svg" Version="3.4.3" />
</ItemGroup>
<ItemGroup>
<Folder Include="Packaging\AppPackages\" />

View file

@ -14,79 +14,64 @@
<Window.Effect>
<DropShadowEffect/>
</Window.Effect>
<!-- TODO WPF: Replace Fading class with built-in fading animations, like..
<Window.Style>
<Style>
<Style.Triggers>
<DataTrigger Binding="{Binding Visibility}" Value="Visible">
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetProperty="Opacity"
From="0.0" To="1.0" Duration="0:0:5"
/>
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
<DataTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetProperty="Opacity"
From="1.0" To="0.0" Duration="0:0:5"
/>
</Storyboard>
</BeginStoryboard>
</DataTrigger.ExitActions>
</DataTrigger>
</Style.Triggers>
</Style>
</Window.Style>-->
<Window.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetProperty="Opacity"
From="0.0" To="1.0" Duration="0:0:1" />
<!-- Completed="fadeCompleted" -->
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Window.Triggers>
<Window.Resources>
<!-- TODO WPF Move them into separate dictionary? -->
<Brush x:Key="ic_fluent_svgColor">#FF585858</Brush>
<!-- Converted SVG images using https://github.com/BerndK/SvgToXaml/releases/tag/Ver_1.3.0 -->
<DrawingImage x:Key="ic_fluent_arrow_sync_24_regularDrawingImage">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
<GeometryDrawing Brush="#FF585858" Geometry="F1 M24,24z M0,0z M16.2506,5.18011C15.9994,5.50947 16.0627,5.9801 16.3921,6.23128 18.1804,7.59515 19.25,9.70821 19.25,12 19.25,15.736 16.4242,18.812 12.7933,19.2071L13.4697,18.5303C13.7626,18.2374 13.7626,17.7626 13.4697,17.4697 13.2034,17.2034 12.7867,17.1792 12.4931,17.3971L12.409,17.4697 10.409,19.4697C10.1427,19.7359,10.1185,20.1526,10.3364,20.4462L10.409,20.5303 12.409,22.5303C12.7019,22.8232 13.1768,22.8232 13.4697,22.5303 13.7359,22.2641 13.7601,21.8474 13.5423,21.5538L13.4697,21.4697 12.7194,20.7208C17.2154,20.355 20.75,16.5903 20.75,12 20.75,9.23526 19.4582,6.68321 17.3017,5.03856 16.9724,4.78738 16.5017,4.85075 16.2506,5.18011z M10.5303,1.46967C10.2374,1.76256,10.2374,2.23744,10.5303,2.53033L11.2796,3.27923C6.78409,3.6456 3.25,7.41008 3.25,12 3.25,14.6445 4.43126,17.0974 6.43081,18.7491 6.75016,19.0129 7.22289,18.9679 7.48669,18.6485 7.75048,18.3292 7.70545,17.8564 7.3861,17.5926 5.72793,16.2229 4.75,14.1922 4.75,12 4.75,8.26436 7.57532,5.18861 11.2057,4.79301L10.5303,5.46967C10.2374,5.76256 10.2374,6.23744 10.5303,6.53033 10.8232,6.82322 11.2981,6.82322 11.591,6.53033L13.591,4.53033C13.8839,4.23744,13.8839,3.76256,13.591,3.46967L11.591,1.46967C11.2981,1.17678,10.8232,1.17678,10.5303,1.46967z" />
<GeometryDrawing Brush="{DynamicResource ic_fluent_svgColor}" Geometry="F1 M24,24z M0,0z M16.2506,5.18011C15.9994,5.50947 16.0627,5.9801 16.3921,6.23128 18.1804,7.59515 19.25,9.70821 19.25,12 19.25,15.736 16.4242,18.812 12.7933,19.2071L13.4697,18.5303C13.7626,18.2374 13.7626,17.7626 13.4697,17.4697 13.2034,17.2034 12.7867,17.1792 12.4931,17.3971L12.409,17.4697 10.409,19.4697C10.1427,19.7359,10.1185,20.1526,10.3364,20.4462L10.409,20.5303 12.409,22.5303C12.7019,22.8232 13.1768,22.8232 13.4697,22.5303 13.7359,22.2641 13.7601,21.8474 13.5423,21.5538L13.4697,21.4697 12.7194,20.7208C17.2154,20.355 20.75,16.5903 20.75,12 20.75,9.23526 19.4582,6.68321 17.3017,5.03856 16.9724,4.78738 16.5017,4.85075 16.2506,5.18011z M10.5303,1.46967C10.2374,1.76256,10.2374,2.23744,10.5303,2.53033L11.2796,3.27923C6.78409,3.6456 3.25,7.41008 3.25,12 3.25,14.6445 4.43126,17.0974 6.43081,18.7491 6.75016,19.0129 7.22289,18.9679 7.48669,18.6485 7.75048,18.3292 7.70545,17.8564 7.3861,17.5926 5.72793,16.2229 4.75,14.1922 4.75,12 4.75,8.26436 7.57532,5.18861 11.2057,4.79301L10.5303,5.46967C10.2374,5.76256 10.2374,6.23744 10.5303,6.53033 10.8232,6.82322 11.2981,6.82322 11.591,6.53033L13.591,4.53033C13.8839,4.23744,13.8839,3.76256,13.591,3.46967L11.591,1.46967C11.2981,1.17678,10.8232,1.17678,10.5303,1.46967z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="ic_fluent_folder_arrow_right_48_regularDrawingImage">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V48 H48 V0 H0 Z">
<GeometryDrawing Brush="#FF585858" Geometry="F1 M48,48z M0,0z M17.0607,9C17.8933,9,18.7,9.27703,19.3552,9.78393L19.5301,9.92784 22.1162,12.1907C22.3061,12.3569,22.5409,12.4609,22.7891,12.4909L22.9393,12.5 40.25,12.5C42.2543,12.5,43.8913,14.0724,43.9948,16.0508L44,16.25 44.0009,24.0564C43.2472,23.3816,42.4076,22.8008,41.5007,22.3322L41.5,16.25C41.5,15.6028,41.0081,15.0705,40.3778,15.0065L40.25,15 22.8474,14.9989 20.7205,17.6147C20.0559,18.4327,19.0803,18.9305,18.035,18.9933L17.8101,19 6.5,18.999 6.5,35.25C6.5,35.8972,6.99187,36.4295,7.62219,36.4935L7.75,36.5 24.5186,36.5005C24.7868,37.3812,25.1535,38.219,25.606,39.0011L7.75,39C5.74574,39,4.10873,37.4276,4.0052,35.4492L4,35.25 4,12.75C4,10.7457,5.57236,9.10873,7.55084,9.0052L7.75,9 17.0607,9z M17.0607,11.5L7.75,11.5C7.10279,11.5,6.57047,11.9919,6.50645,12.6222L6.5,12.75 6.5,16.499 17.8101,16.5C18.1394,16.5,18.4534,16.3701,18.6858,16.142L18.7802,16.0382 20.415,14.025 17.8838,11.8093C17.6939,11.6431,17.4591,11.5391,17.2109,11.5091L17.0607,11.5z M36,23C41.5228,23 46,27.4772 46,33 46,38.5228 41.5228,43 36,43 30.4772,43 26,38.5228 26,33 26,27.4772 30.4772,23 36,23z M35.9991,27.6342L35.8871,27.7097 35.7929,27.7929 35.7097,27.8871C35.4301,28.2467,35.4301,28.7533,35.7097,29.1129L35.7929,29.2071 38.585,32 31,32 30.8834,32.0067C30.4243,32.0601,30.06,32.4243,30.0067,32.8834L30,33 30.0067,33.1166C30.06,33.5757,30.4243,33.9399,30.8834,33.9933L31,34 38.585,34 35.7929,36.7929 35.7097,36.8871C35.4047,37.2794 35.4324,37.8466 35.7929,38.2071 36.1534,38.5676 36.7206,38.5953 37.1129,38.2903L37.2071,38.2071 41.7071,33.7071 41.7578,33.6525 41.8296,33.5585 41.8751,33.4843 41.9063,33.4232 41.9503,33.3121 41.9726,33.2335 41.9932,33.1175 42,33 41.997,32.924 41.9798,32.7992 41.9505,32.6883 41.9288,32.6287 41.8753,32.5159 41.8296,32.4415 41.7872,32.3833 41.7485,32.3369 41.7071,32.2929 37.2071,27.7929 37.1129,27.7097C36.7893,27.4581,36.3465,27.4329,35.9991,27.6342z" />
<GeometryDrawing Brush="{DynamicResource ic_fluent_svgColor}" Geometry="F1 M48,48z M0,0z M17.0607,9C17.8933,9,18.7,9.27703,19.3552,9.78393L19.5301,9.92784 22.1162,12.1907C22.3061,12.3569,22.5409,12.4609,22.7891,12.4909L22.9393,12.5 40.25,12.5C42.2543,12.5,43.8913,14.0724,43.9948,16.0508L44,16.25 44.0009,24.0564C43.2472,23.3816,42.4076,22.8008,41.5007,22.3322L41.5,16.25C41.5,15.6028,41.0081,15.0705,40.3778,15.0065L40.25,15 22.8474,14.9989 20.7205,17.6147C20.0559,18.4327,19.0803,18.9305,18.035,18.9933L17.8101,19 6.5,18.999 6.5,35.25C6.5,35.8972,6.99187,36.4295,7.62219,36.4935L7.75,36.5 24.5186,36.5005C24.7868,37.3812,25.1535,38.219,25.606,39.0011L7.75,39C5.74574,39,4.10873,37.4276,4.0052,35.4492L4,35.25 4,12.75C4,10.7457,5.57236,9.10873,7.55084,9.0052L7.75,9 17.0607,9z M17.0607,11.5L7.75,11.5C7.10279,11.5,6.57047,11.9919,6.50645,12.6222L6.5,12.75 6.5,16.499 17.8101,16.5C18.1394,16.5,18.4534,16.3701,18.6858,16.142L18.7802,16.0382 20.415,14.025 17.8838,11.8093C17.6939,11.6431,17.4591,11.5391,17.2109,11.5091L17.0607,11.5z M36,23C41.5228,23 46,27.4772 46,33 46,38.5228 41.5228,43 36,43 30.4772,43 26,38.5228 26,33 26,27.4772 30.4772,23 36,23z M35.9991,27.6342L35.8871,27.7097 35.7929,27.7929 35.7097,27.8871C35.4301,28.2467,35.4301,28.7533,35.7097,29.1129L35.7929,29.2071 38.585,32 31,32 30.8834,32.0067C30.4243,32.0601,30.06,32.4243,30.0067,32.8834L30,33 30.0067,33.1166C30.06,33.5757,30.4243,33.9399,30.8834,33.9933L31,34 38.585,34 35.7929,36.7929 35.7097,36.8871C35.4047,37.2794 35.4324,37.8466 35.7929,38.2071 36.1534,38.5676 36.7206,38.5953 37.1129,38.2903L37.2071,38.2071 41.7071,33.7071 41.7578,33.6525 41.8296,33.5585 41.8751,33.4843 41.9063,33.4232 41.9503,33.3121 41.9726,33.2335 41.9932,33.1175 42,33 41.997,32.924 41.9798,32.7992 41.9505,32.6883 41.9288,32.6287 41.8753,32.5159 41.8296,32.4415 41.7872,32.3833 41.7485,32.3369 41.7071,32.2929 37.2071,27.7929 37.1129,27.7097C36.7893,27.4581,36.3465,27.4329,35.9991,27.6342z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="ic_fluent_pin_48_filledDrawingImage">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V48 H48 V0 H0 Z">
<GeometryDrawing Brush="#FF585858" Geometry="F1 M48,48z M0,0z M31.8176,5.54984L42.4502,16.1824C44.7427,18.475,44.1155,22.3398,41.2157,23.7897L30.6711,29.062C30.3788,29.2082,30.1553,29.463,30.0486,29.7719L27.3645,37.5418C26.7012,39.4617,24.257,40.0247,22.8207,38.5884L17,32.7678 7.76777,42 6,42 6,40.2322 15.2323,31 9.41167,25.1794C7.97536,23.7431,8.53836,21.2988,10.4583,20.6356L18.2281,17.9515C18.537,17.8447,18.7919,17.6213,18.938,17.329L24.2103,6.78435C25.6602,3.88447,29.525,3.25729,31.8176,5.54984z" />
<GeometryDrawing Brush="{DynamicResource ic_fluent_svgColor}" Geometry="F1 M48,48z M0,0z M31.8176,5.54984L42.4502,16.1824C44.7427,18.475,44.1155,22.3398,41.2157,23.7897L30.6711,29.062C30.3788,29.2082,30.1553,29.463,30.0486,29.7719L27.3645,37.5418C26.7012,39.4617,24.257,40.0247,22.8207,38.5884L17,32.7678 7.76777,42 6,42 6,40.2322 15.2323,31 9.41167,25.1794C7.97536,23.7431,8.53836,21.2988,10.4583,20.6356L18.2281,17.9515C18.537,17.8447,18.7919,17.6213,18.938,17.329L24.2103,6.78435C25.6602,3.88447,29.525,3.25729,31.8176,5.54984z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="ic_fluent_pin_48_regularDrawingImage">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V48 H48 V0 H0 Z">
<GeometryDrawing Brush="#FF585858" Geometry="F1 M48,48z M0,0z M42.4502,16.1824L31.8176,5.54984C29.525,3.25729,25.6602,3.88447,24.2103,6.78435L18.938,17.329C18.7919,17.6213,18.537,17.8447,18.2281,17.9515L10.4583,20.6356C8.53836,21.2988,7.97536,23.7431,9.41167,25.1794L15.2323,31 6,40.2322 6,42 7.76777,42 17,32.7678 22.8207,38.5884C24.257,40.0247,26.7012,39.4617,27.3645,37.5418L30.0486,29.7719C30.1553,29.463,30.3788,29.2082,30.6711,29.062L41.2157,23.7897C44.1155,22.3398,44.7427,18.475,42.4502,16.1824z M30.0498,7.31761L40.6824,17.9502C41.7683,19.0361,41.4713,20.8668,40.0976,21.5536L29.553,26.826C28.6761,27.2644,28.0058,28.0289,27.6856,28.9556L25.0015,36.7255C24.9412,36.9,24.719,36.9512,24.5884,36.8206L11.1794,23.4116C11.0489,23.2811,11.1,23.0589,11.2746,22.9986L19.0444,20.3144C19.9711,19.9943,20.7356,19.324,21.1741,18.447L26.4464,7.90237C27.1332,6.52875,28.9639,6.23166,30.0498,7.31761z" />
<GeometryDrawing Brush="{DynamicResource ic_fluent_svgColor}" Geometry="F1 M48,48z M0,0z M42.4502,16.1824L31.8176,5.54984C29.525,3.25729,25.6602,3.88447,24.2103,6.78435L18.938,17.329C18.7919,17.6213,18.537,17.8447,18.2281,17.9515L10.4583,20.6356C8.53836,21.2988,7.97536,23.7431,9.41167,25.1794L15.2323,31 6,40.2322 6,42 7.76777,42 17,32.7678 22.8207,38.5884C24.257,40.0247,26.7012,39.4617,27.3645,37.5418L30.0486,29.7719C30.1553,29.463,30.3788,29.2082,30.6711,29.062L41.2157,23.7897C44.1155,22.3398,44.7427,18.475,42.4502,16.1824z M30.0498,7.31761L40.6824,17.9502C41.7683,19.0361,41.4713,20.8668,40.0976,21.5536L29.553,26.826C28.6761,27.2644,28.0058,28.0289,27.6856,28.9556L25.0015,36.7255C24.9412,36.9,24.719,36.9512,24.5884,36.8206L11.1794,23.4116C11.0489,23.2811,11.1,23.0589,11.2746,22.9986L19.0444,20.3144C19.9711,19.9943,20.7356,19.324,21.1741,18.447L26.4464,7.90237C27.1332,6.52875,28.9639,6.23166,30.0498,7.31761z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="ic_fluent_search_48_regularDrawingImage">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V48 H48 V0 H0 Z">
<GeometryDrawing Brush="#FF585858" Geometry="F1 M48,48z M0,0z M28,6C35.732,6 42,12.268 42,20 42,27.732 35.732,34 28,34 24.5841,34 21.4539,32.7766 19.0237,30.7441L8.1338,41.6339C7.6457,42.122 6.8542,42.122 6.3661,41.6339 5.8779,41.1457 5.8779,40.3543 6.3661,39.8661L17.2559,28.9763C15.2234,26.5461 14,23.4159 14,20 14,12.268 20.268,6 28,6z M39.5,20C39.5,13.6487 34.3513,8.5 28,8.5 21.6487,8.5 16.5,13.6487 16.5,20 16.5,26.3513 21.6487,31.5 28,31.5 34.3513,31.5 39.5,26.3513 39.5,20z" />
<GeometryDrawing Brush="{DynamicResource ic_fluent_svgColor}" Geometry="F1 M48,48z M0,0z M28,6C35.732,6 42,12.268 42,20 42,27.732 35.732,34 28,34 24.5841,34 21.4539,32.7766 19.0237,30.7441L8.1338,41.6339C7.6457,42.122 6.8542,42.122 6.3661,41.6339 5.8779,41.1457 5.8779,40.3543 6.3661,39.8661L17.2559,28.9763C15.2234,26.5461 14,23.4159 14,20 14,12.268 20.268,6 28,6z M39.5,20C39.5,13.6487 34.3513,8.5 28,8.5 21.6487,8.5 16.5,13.6487 16.5,20 16.5,26.3513 21.6487,31.5 28,31.5 34.3513,31.5 39.5,26.3513 39.5,20z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="ic_fluent_settings_28_regularDrawingImage">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V28 H28 V0 H0 Z">
<GeometryDrawing Brush="#FF585858" Geometry="F1 M28,28z M0,0z M14,9.5C11.5147,9.5 9.5,11.5147 9.5,14 9.5,16.4853 11.5147,18.5 14,18.5 15.3488,18.5 16.559,17.9066 17.3838,16.9666 18.0787,16.1745 18.5,15.1365 18.5,14 18.5,13.5401 18.431,13.0962 18.3028,12.6783 17.7382,10.838 16.0253,9.5 14,9.5z M11,14C11,12.3431 12.3431,11 14,11 15.6569,11 17,12.3431 17,14 17,15.6569 15.6569,17 14,17 12.3431,17 11,15.6569 11,14z" />
<GeometryDrawing Brush="#FF585858" Geometry="F1 M28,28z M0,0z M21.7093,22.3947L19.9818,21.6364C19.4876,21.4197 18.9071,21.4514 18.44,21.7219 17.9729,21.9923 17.675,22.4692 17.6157,23.0065L17.408,24.8855C17.3651,25.2729 17.084,25.5917 16.7055,25.6819 14.9263,26.106 13.0725,26.106 11.2933,25.6819 10.9148,25.5917 10.6336,25.2729 10.5908,24.8855L10.3834,23.0093C10.3225,22.473 10.0112,21.9976 9.54452,21.728 9.07783,21.4585 8.51117,21.4269 8.01859,21.6424L6.29071,22.4009C5.93281,22.558 5.51493,22.4718 5.24806,22.1858 4.00474,20.8536 3.07924,19.2561 2.54122,17.5136 2.42533,17.1383 2.55922,16.7307 2.8749,16.4976L4.40219,15.3703C4.83721,15.05 5.09414,14.5415 5.09414,14.0006 5.09414,13.4597 4.83721,12.9512 4.40162,12.6305L2.87529,11.5051C2.55914,11.272 2.42513,10.8638 2.54142,10.4881 3.08038,8.74728 4.00637,7.15157 5.24971,5.82108 5.51684,5.53522 5.93492,5.44935 6.29276,5.60685L8.01296,6.36398C8.50793,6.58162 9.07696,6.54875 9.54617,6.27409 10.0133,6.00258 10.3244,5.52521 10.3844,4.98787L10.5933,3.11011C10.637,2.71797 10.9245,2.39697 11.3089,2.31131 12.19,2.11498 13.0891,2.01065 14.0131,2 14.9147,2.01041 15.8128,2.11478 16.6928,2.31143 17.077,2.39728 17.3643,2.71817 17.4079,3.11011L17.617,4.98931C17.7116,5.85214 18.4387,6.50566 19.3055,6.50657 19.5385,6.50694 19.769,6.45832 19.9843,6.36288L21.7048,5.60562C22.0626,5.44812 22.4807,5.53399 22.7478,5.81984 23.9912,7.15034 24.9172,8.74605 25.4561,10.4869 25.5723,10.8623 25.4386,11.2702 25.1228,11.5034L23.5978,12.6297C23.1628,12.9499 22.9,13.4585 22.9,13.9994 22.9,14.5402 23.1628,15.0488 23.5988,15.3697L25.1251,16.4964C25.441,16.7296 25.5748,17.1376 25.4586,17.513 24.9198,19.2536 23.9944,20.8491 22.7517,22.1799 22.4849,22.4657 22.0671,22.5518 21.7093,22.3947z M16.263,22.1965C16.4982,21.4684 16.9889,20.8288 17.6884,20.4238 18.5702,19.9132 19.6536,19.8546 20.5841,20.2626L21.9281,20.8526C22.791,19.8537,23.4593,18.7013,23.8981,17.4551L22.7095,16.5777 22.7086,16.577C21.898,15.9799 21.4,15.0276 21.4,13.9994 21.4,12.9718 21.8974,12.0195 22.7073,11.4227L22.7085,11.4217 23.8957,10.545C23.4567,9.29874,22.7881,8.1463,21.9248,7.14764L20.5922,7.73419 20.5899,7.73521C20.1844,7.91457 19.7472,8.00716 19.3039,8.00657 17.6715,8.00447 16.3046,6.77425 16.1261,5.15459L16.1259,5.15285 15.9635,3.69298C15.3202,3.57322 14.6677,3.50866 14.013,3.50011 13.3389,3.50885 12.6821,3.57361 12.0377,3.69322L11.8751,5.15446C11.7625,6.16266 11.1793,7.05902 10.3019,7.5698 9.41937,8.08554 8.34453,8.14837 7.40869,7.73688L6.07273,7.14887C5.20949,8.14745,4.54092,9.29977,4.10196,10.5459L5.29181,11.4232C6.11115,12.0268 6.59414,12.9836 6.59414,14.0006 6.59414,15.0172 6.11142,15.9742 5.29237,16.5776L4.10161,17.4565C4.54002,18.7044,5.2085,19.8584,6.07205,20.8587L7.41742,20.2681C8.34745,19.8613 9.41573,19.9214 10.2947,20.4291 11.174,20.9369 11.7593,21.8319 11.8738,22.84L11.8744,22.8445 12.0362,24.3087C13.3326,24.5638,14.6662,24.5638,15.9626,24.3087L16.1247,22.8417C16.1491,22.6217,16.1955,22.4054,16.263,22.1965z" />
<GeometryDrawing Brush="{DynamicResource ic_fluent_svgColor}" Geometry="F1 M28,28z M0,0z M14,9.5C11.5147,9.5 9.5,11.5147 9.5,14 9.5,16.4853 11.5147,18.5 14,18.5 15.3488,18.5 16.559,17.9066 17.3838,16.9666 18.0787,16.1745 18.5,15.1365 18.5,14 18.5,13.5401 18.431,13.0962 18.3028,12.6783 17.7382,10.838 16.0253,9.5 14,9.5z M11,14C11,12.3431 12.3431,11 14,11 15.6569,11 17,12.3431 17,14 17,15.6569 15.6569,17 14,17 12.3431,17 11,15.6569 11,14z" />
<GeometryDrawing Brush="{DynamicResource ic_fluent_svgColor}" Geometry="F1 M28,28z M0,0z M21.7093,22.3947L19.9818,21.6364C19.4876,21.4197 18.9071,21.4514 18.44,21.7219 17.9729,21.9923 17.675,22.4692 17.6157,23.0065L17.408,24.8855C17.3651,25.2729 17.084,25.5917 16.7055,25.6819 14.9263,26.106 13.0725,26.106 11.2933,25.6819 10.9148,25.5917 10.6336,25.2729 10.5908,24.8855L10.3834,23.0093C10.3225,22.473 10.0112,21.9976 9.54452,21.728 9.07783,21.4585 8.51117,21.4269 8.01859,21.6424L6.29071,22.4009C5.93281,22.558 5.51493,22.4718 5.24806,22.1858 4.00474,20.8536 3.07924,19.2561 2.54122,17.5136 2.42533,17.1383 2.55922,16.7307 2.8749,16.4976L4.40219,15.3703C4.83721,15.05 5.09414,14.5415 5.09414,14.0006 5.09414,13.4597 4.83721,12.9512 4.40162,12.6305L2.87529,11.5051C2.55914,11.272 2.42513,10.8638 2.54142,10.4881 3.08038,8.74728 4.00637,7.15157 5.24971,5.82108 5.51684,5.53522 5.93492,5.44935 6.29276,5.60685L8.01296,6.36398C8.50793,6.58162 9.07696,6.54875 9.54617,6.27409 10.0133,6.00258 10.3244,5.52521 10.3844,4.98787L10.5933,3.11011C10.637,2.71797 10.9245,2.39697 11.3089,2.31131 12.19,2.11498 13.0891,2.01065 14.0131,2 14.9147,2.01041 15.8128,2.11478 16.6928,2.31143 17.077,2.39728 17.3643,2.71817 17.4079,3.11011L17.617,4.98931C17.7116,5.85214 18.4387,6.50566 19.3055,6.50657 19.5385,6.50694 19.769,6.45832 19.9843,6.36288L21.7048,5.60562C22.0626,5.44812 22.4807,5.53399 22.7478,5.81984 23.9912,7.15034 24.9172,8.74605 25.4561,10.4869 25.5723,10.8623 25.4386,11.2702 25.1228,11.5034L23.5978,12.6297C23.1628,12.9499 22.9,13.4585 22.9,13.9994 22.9,14.5402 23.1628,15.0488 23.5988,15.3697L25.1251,16.4964C25.441,16.7296 25.5748,17.1376 25.4586,17.513 24.9198,19.2536 23.9944,20.8491 22.7517,22.1799 22.4849,22.4657 22.0671,22.5518 21.7093,22.3947z M16.263,22.1965C16.4982,21.4684 16.9889,20.8288 17.6884,20.4238 18.5702,19.9132 19.6536,19.8546 20.5841,20.2626L21.9281,20.8526C22.791,19.8537,23.4593,18.7013,23.8981,17.4551L22.7095,16.5777 22.7086,16.577C21.898,15.9799 21.4,15.0276 21.4,13.9994 21.4,12.9718 21.8974,12.0195 22.7073,11.4227L22.7085,11.4217 23.8957,10.545C23.4567,9.29874,22.7881,8.1463,21.9248,7.14764L20.5922,7.73419 20.5899,7.73521C20.1844,7.91457 19.7472,8.00716 19.3039,8.00657 17.6715,8.00447 16.3046,6.77425 16.1261,5.15459L16.1259,5.15285 15.9635,3.69298C15.3202,3.57322 14.6677,3.50866 14.013,3.50011 13.3389,3.50885 12.6821,3.57361 12.0377,3.69322L11.8751,5.15446C11.7625,6.16266 11.1793,7.05902 10.3019,7.5698 9.41937,8.08554 8.34453,8.14837 7.40869,7.73688L6.07273,7.14887C5.20949,8.14745,4.54092,9.29977,4.10196,10.5459L5.29181,11.4232C6.11115,12.0268 6.59414,12.9836 6.59414,14.0006 6.59414,15.0172 6.11142,15.9742 5.29237,16.5776L4.10161,17.4565C4.54002,18.7044,5.2085,19.8584,6.07205,20.8587L7.41742,20.2681C8.34745,19.8613 9.41573,19.9214 10.2947,20.4291 11.174,20.9369 11.7593,21.8319 11.8738,22.84L11.8744,22.8445 12.0362,24.3087C13.3326,24.5638,14.6662,24.5638,15.9626,24.3087L16.1247,22.8417C16.1491,22.6217,16.1955,22.4054,16.263,22.1965z" />
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>

View file

@ -13,9 +13,11 @@ namespace SystemTrayMenu.UserInterface
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Threading;
using SystemTrayMenu.Business;
using SystemTrayMenu.DataClasses;
using SystemTrayMenu.DllImports;
using SystemTrayMenu.Helper;
using SystemTrayMenu.Properties;
using SystemTrayMenu.Utilities;
using KeyEventArgs = System.Windows.Input.KeyEventArgs;
@ -151,6 +153,11 @@ namespace SystemTrayMenu.UserInterface
backColor = AppColors.DarkModeBackground.ToSolidColorBrush();
backColorSearch = AppColors.DarkModeSearchField.ToSolidColorBrush();
backgroundBorder = AppColors.DarkModeBackgroundBorder.ToSolidColorBrush();
Resources["ic_fluent_svgColor"] = AppColors.SolidColorBrushFromString(Settings.Default.ColorDarkModeIcons);
}
else
{
Resources["ic_fluent_svgColor"] = AppColors.SolidColorBrushFromString(Settings.Default.ColorIcons);
}
labelTitle.Foreground = foreColor;
@ -224,7 +231,7 @@ namespace SystemTrayMenu.UserInterface
};
}
internal event Action MenuScrolled;
internal event Action? MenuScrolled;
#if TODO // Misc MouseEvents
internal new event Action MouseEnter;
@ -232,15 +239,13 @@ namespace SystemTrayMenu.UserInterface
internal new event Action MouseLeave;
#endif
internal event Action? UserClickedOpenFolder;
internal event Action<Menu, Key, ModifierKeys> CmdKeyProcessed;
internal event Action<Menu, Key, ModifierKeys>? CmdKeyProcessed;
#if TODO // Misc MouseEvents and TOUCH
internal event EventHandler<KeyPressEventArgs> KeyPressCheck;
#endif
internal event Action SearchTextChanging;
internal event Action? SearchTextChanging;
#if TODO // SEARCH
internal event EventHandler<bool> SearchTextChanged;
@ -276,6 +281,8 @@ namespace SystemTrayMenu.UserInterface
internal int Level { get; set; }
internal string? FolderPath { get; set; }
internal bool IsUsable => Visibility == Visibility.Visible && !fading.IsHiding && !IsDisposed && !Disposing;
#if TODO // TOUCH
@ -1028,34 +1035,12 @@ namespace SystemTrayMenu.UserInterface
}
#endif
}
#if TODO // Misc MouseEvents and BorderColors
private void PictureBox_MouseEnter(object sender, EventArgs e)
{
PictureBox pictureBox = (PictureBox)sender;
pictureBox.BackColor = MenuDefines.ColorSelectedItem;
pictureBox.Tag = true;
}
private void PictureBox_MouseLeave(object sender, EventArgs e)
{
PictureBox pictureBox = (PictureBox)sender;
pictureBox.BackColor = Color.Transparent;
pictureBox.Tag = false;
}
private void PictureBox_Resize(object sender, EventArgs e)
{
PictureBox pictureBox = (PictureBox)sender;
pictureBox.Invalidate();
}
private void PictureBoxOpenFolder_Paint(object sender, PaintEventArgs e)
{
PictureBox pictureBox = (PictureBox)sender;
e.Graphics.DrawImage(AppColors.BitmapOpenFolder, new Rectangle(Point.Empty, pictureBox.ClientSize));
if (pictureBox.Tag != null && (bool)pictureBox.Tag)
{
Rectangle rowBounds = new(0, 0, pictureBox.Width, pictureBox.Height);
@ -1066,7 +1051,7 @@ namespace SystemTrayMenu.UserInterface
private void PictureBoxOpenFolder_Click(object sender, RoutedEventArgs e)
{
UserClickedOpenFolder?.Invoke();
Menus.OpenFolder(FolderPath);
}
#if TODO // BorderColors
@ -1098,8 +1083,6 @@ namespace SystemTrayMenu.UserInterface
{
PictureBox pictureBox = (PictureBox)sender;
e.Graphics.DrawImage(AppColors.BitmapSettings, new Rectangle(Point.Empty, pictureBox.ClientSize));
if (pictureBox.Tag != null && (bool)pictureBox.Tag)
{
Rectangle rowBounds = new(0, 0, pictureBox.Width, pictureBox.Height);
@ -1117,8 +1100,6 @@ namespace SystemTrayMenu.UserInterface
{
PictureBox pictureBox = (PictureBox)sender;
e.Graphics.DrawImage(AppColors.BitmapRestart, new Rectangle(Point.Empty, pictureBox.ClientSize));
if (pictureBox.Tag != null && (bool)pictureBox.Tag)
{
Rectangle rowBounds = new(0, 0, pictureBox.Width, pictureBox.Height);
@ -1131,13 +1112,6 @@ namespace SystemTrayMenu.UserInterface
AppRestart.ByMenuButton();
}
#if TODO // BorderColors
private void PictureBoxSearch_Paint(object sender, PaintEventArgs e)
{
PictureBox pictureBox = (PictureBox)sender;
e.Graphics.DrawImage(AppColors.BitmapSearch, new Rectangle(Point.Empty, pictureBox.ClientSize));
}
#endif
private void TimerUpdateIcons_Tick(object? sender, EventArgs e)
{
int iconsToUpdate = 0;

View file

@ -18,6 +18,6 @@ namespace SystemTrayMenu.Utilities
this.original = original;
}
public override object ProvideValue(IServiceProvider serviceProvider) => Translator.GetText(original) ?? original;
public override object ProvideValue(IServiceProvider serviceProvider) => Translator.GetText(original);
}
}

View file

@ -11,7 +11,7 @@ namespace SystemTrayMenu.Utilities
internal static class Translator
{
private static CultureInfo culture;
private static CultureInfo? culture;
internal static void Initialize()
{
@ -31,7 +31,7 @@ namespace SystemTrayMenu.Utilities
ResourceManager rm = new(
"SystemTrayMenu.Resources.Languages.lang",
typeof(Menu).Assembly);
return rm.GetString(id, culture);
return rm.GetString(id, culture) ?? id;
}
}
}