[Feature] Update to .NET 6 (#157), version 1.0.27.1

This commit is contained in:
Markus Hofknecht 2021-11-17 00:13:46 +01:00
parent 5830f530c2
commit 78325f1c61
35 changed files with 307 additions and 299 deletions

View file

@ -15,8 +15,8 @@ namespace SystemTrayMenu
/// </summary>
internal class App : IDisposable
{
private readonly AppNotifyIcon menuNotifyIcon = new AppNotifyIcon();
private readonly Menus menus = new Menus();
private readonly AppNotifyIcon menuNotifyIcon = new();
private readonly Menus menus = new();
private readonly TaskbarForm taskbarForm = null;
public App()

View file

@ -17,7 +17,7 @@ namespace SystemTrayMenu.Handler
internal class KeyboardInput : IDisposable
{
private readonly Menu[] menus;
private readonly KeyboardHook hook = new KeyboardHook();
private readonly KeyboardHook hook = new();
private int iRowKey = -1;
private int iMenuKey;
@ -155,7 +155,7 @@ namespace SystemTrayMenu.Handler
{
Point pt = dgv.GetCellDisplayRectangle(2, iRowKey, false).Location;
RowData trigger = (RowData)dgv.Rows[iRowKey].Cells[2].Value;
MouseEventArgs mea = new MouseEventArgs(MouseButtons.Right, 1, pt.X, pt.Y, 0);
MouseEventArgs mea = new(MouseButtons.Right, 1, pt.X, pt.Y, 0);
trigger.MouseDown(dgv, mea, out bool toCloseByDoubleClick);
}
}

View file

@ -23,15 +23,15 @@ namespace SystemTrayMenu.Business
internal class Menus : IDisposable
{
private readonly Menu[] menus = new Menu[MenuDefines.MenusMax];
private readonly BackgroundWorker workerMainMenu = new BackgroundWorker();
private readonly List<BackgroundWorker> workersSubMenu = new List<BackgroundWorker>();
private readonly BackgroundWorker workerMainMenu = new();
private readonly List<BackgroundWorker> workersSubMenu = new();
private readonly DgvMouseRow dgvMouseRow = new DgvMouseRow();
private readonly WaitToLoadMenu waitToOpenMenu = new WaitToLoadMenu();
private readonly DgvMouseRow dgvMouseRow = new();
private readonly WaitToLoadMenu waitToOpenMenu = new();
private readonly KeyboardInput keyboardInput;
private readonly Timer timerShowProcessStartedAsLoadingIcon = new Timer();
private readonly Timer timerStillActiveCheck = new Timer();
private readonly WaitLeave waitLeave = new WaitLeave(Properties.Settings.Default.TimeUntilCloses);
private readonly Timer timerShowProcessStartedAsLoadingIcon = new();
private readonly Timer timerStillActiveCheck = new();
private readonly WaitLeave waitLeave = new(Properties.Settings.Default.TimeUntilCloses);
private DateTime deactivatedTime = DateTime.MinValue;
private DateTime dateTimeLastOpening = DateTime.MinValue;
private DateTime dateTimeDisplaySettingsChanged = DateTime.MinValue;
@ -161,7 +161,7 @@ namespace SystemTrayMenu.Business
CreateAndShowLoadingMenu(rowData);
void CreateAndShowLoadingMenu(RowData rowData)
{
MenuData menuDataLoading = new MenuData
MenuData menuDataLoading = new()
{
RowDatas = new List<RowData>(),
Validity = MenuDataValidity.Valid,
@ -329,7 +329,7 @@ namespace SystemTrayMenu.Business
internal static MenuData GetData(BackgroundWorker worker, string path, int level)
{
MenuData menuData = new MenuData
MenuData menuData = new()
{
RowDatas = new List<RowData>(),
Validity = MenuDataValidity.AbortedOrUnknown,
@ -358,8 +358,8 @@ namespace SystemTrayMenu.Business
directories = GetDirectoriesInNetworkLocation(path);
static string[] GetDirectoriesInNetworkLocation(string networkLocationRootPath)
{
List<string> directories = new List<string>();
Process cmd = new Process();
List<string> directories = new();
Process cmd = new();
cmd.StartInfo.FileName = "cmd.exe";
cmd.StartInfo.RedirectStandardInput = true;
cmd.StartInfo.RedirectStandardOutput = true;
@ -794,7 +794,7 @@ namespace SystemTrayMenu.Business
private Menu Create(MenuData menuData, string title = null)
{
Menu menu = new Menu();
Menu menu = new();
string path = Config.Path;
if (title == null)
@ -854,7 +854,7 @@ namespace SystemTrayMenu.Business
foldersCount = 0;
filesCount = 0;
DataGridView dgv = menu.GetDataGridView();
DataTable dataTable = new DataTable();
DataTable dataTable = new();
dataTable.Columns.Add(dgv.Columns[0].Name, typeof(Icon));
dataTable.Columns.Add(dgv.Columns[1].Name, typeof(string));
dataTable.Columns.Add("data", typeof(RowData));
@ -1019,7 +1019,7 @@ namespace SystemTrayMenu.Business
RowData rowData = (RowData)row.Cells[2].Value;
int width = dgv.Columns[0].Width + dgv.Columns[1].Width;
Rectangle rowBounds = new Rectangle(0, e.RowBounds.Top, width, e.RowBounds.Height);
Rectangle rowBounds = new(0, e.RowBounds.Top, width, e.RowBounds.Height);
if (rowData.IsContextMenuOpen || (rowData.IsMenuOpen && rowData.IsSelected))
{
@ -1152,7 +1152,7 @@ namespace SystemTrayMenu.Business
// Only apply taskbar position change when no menu is currently open
List<Menu> list = AsList;
WindowsTaskbar taskbar = new WindowsTaskbar();
WindowsTaskbar taskbar = new();
if (list.Count == 1)
{
taskbarPosition = taskbar.Position;

View file

@ -10,7 +10,7 @@ namespace SystemTrayMenu.Handler
internal class WaitLeave : IDisposable
{
private readonly Timer timerLeaveCheck = new Timer();
private readonly Timer timerLeaveCheck = new();
public WaitLeave(int timeUntilTriggered)
{

View file

@ -13,7 +13,7 @@ namespace SystemTrayMenu.Handler
internal class WaitToLoadMenu : IDisposable
{
private readonly Timer timerStartLoad = new Timer();
private readonly Timer timerStartLoad = new();
private DataGridView dgv;
private int rowIndex;
private DataGridView dgvTmp;

View file

@ -72,7 +72,7 @@ namespace SystemTrayMenu
public static void SetFolderByUser(bool save = true)
{
using FolderDialog dialog = new FolderDialog();
using FolderDialog dialog = new();
dialog.InitialFolder = Path;
if (dialog.ShowDialog() == DialogResult.OK)
@ -148,7 +148,7 @@ namespace SystemTrayMenu
internal static void InitializeColors(bool save = true)
{
ColorConverter converter = new ColorConverter();
ColorConverter converter = new();
ColorAndCode colorAndCode = default;
bool changed = false;
@ -421,7 +421,7 @@ namespace SystemTrayMenu
str = str.Replace("#585858", htmlColorCode);
byteArray = Encoding.UTF8.GetBytes(str);
using MemoryStream stream = new MemoryStream(byteArray);
using MemoryStream stream = new(byteArray);
SvgDocument svgDocument = SvgDocument.Open<SvgDocument>(stream);
svgDocument.Color = new SvgColourServer(Color.Black);
return svgDocument.Draw();

View file

@ -162,9 +162,9 @@ namespace SystemTrayMenu.DataClasses
{
IsContextMenuOpen = true;
ShellContextMenu ctxMnu = new ShellContextMenu();
ShellContextMenu ctxMnu = new();
Point location = dgv.FindForm().Location;
Point point = new Point(
Point point = new(
e.X + location.X + dgv.Location.X,
e.Y + location.Y + dgv.Location.Y);
if (ContainsMenu)
@ -296,7 +296,7 @@ namespace SystemTrayMenu.DataClasses
string iconFile = string.Empty;
try
{
FileIni file = new FileIni(TargetFilePath);
FileIni file = new(TargetFilePath);
iconFile = file.Value("IconFile", string.Empty);
if (string.IsNullOrEmpty(iconFile))
{

View file

@ -10,4 +10,7 @@ using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1601:Partial elements should be documented", Justification = "we need to document")]
[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1602:Enumeration items should be documented", Justification = "we need to document")]
[assembly: SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1000:Keywords should be spaced correctly", Justification = "new() should not be replaced by new() ")]
[assembly: SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1101:Prefix local calls with this", Justification = "Standard codecleanup removes the this")]
[assembly: SuppressMessage("Interoperability", "CA1416:Check platform compatibility", Justification = "<todo>")]

View file

@ -9,7 +9,7 @@ namespace SystemTrayMenu.Helper
public class DgvMouseRow : IDisposable
{
private readonly Timer timerRaiseRowMouseLeave = new Timer();
private readonly Timer timerRaiseRowMouseLeave = new();
private DataGridView dgv;
private DataGridViewCellEventArgs eventArgs;

View file

@ -7,6 +7,7 @@ namespace SystemTrayMenu.Helper
using System;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Windows.Forms;
using SystemTrayMenu.DataClasses;
@ -55,55 +56,58 @@ namespace SystemTrayMenu.Helper
private static void CreateShortcut(string url, string pathToStoreFile)
{
string pathToStoreIcons = Path.Combine(pathToStoreFile, "ico");
WebClient client = new WebClient();
if (!Directory.Exists(pathToStoreIcons))
using (WebClient client = new())
{
Directory.CreateDirectory(pathToStoreIcons);
}
Uri uri = new Uri(url);
string hostname = uri.Host.ToString();
string pathIconPng = Path.Combine(pathToStoreIcons, $"{hostname}.png");
client.DownloadFile(
@"http://www.google.com/s2/favicons?sz=32&domain=" + url,
pathIconPng);
string pathIcon = Path.Combine(pathToStoreIcons, $"{hostname}.ico");
ImagingHelper.ConvertToIcon(pathIconPng, pathIcon, 32);
File.Delete(pathIconPng);
string title = url;
title = title.Replace("/", " ").
Replace("https", string.Empty).
Replace("http", string.Empty);
string invalid = new string(Path.GetInvalidFileNameChars()) + new string(Path.GetInvalidPathChars());
foreach (char c in invalid)
{
title = title.Replace(c.ToString(), string.Empty);
}
title = Truncate(title, 128); // max 255
static string Truncate(string value, int maxLength)
{
if (!string.IsNullOrEmpty(value) &&
value.Length > maxLength)
if (!Directory.Exists(pathToStoreIcons))
{
value = value.Substring(0, maxLength);
Directory.CreateDirectory(pathToStoreIcons);
}
return value;
}
Uri uri = new(url);
string hostname = uri.Host.ToString();
using StreamWriter writer = new StreamWriter(pathToStoreFile + "\\" + title.Trim() + ".url");
writer.WriteLine("[InternetShortcut]");
writer.WriteLine($"URL={url.TrimEnd('\0')}");
writer.WriteLine("IconIndex=0");
writer.WriteLine($"HotKey=0");
writer.WriteLine($"IDList=");
writer.WriteLine($"IconFile={pathIcon}");
writer.Flush();
string pathIconPng = Path.Combine(pathToStoreIcons, $"{hostname}.png");
client.DownloadFile(
@"http://www.google.com/s2/favicons?sz=32&domain=" + url,
pathIconPng);
string pathIcon = Path.Combine(pathToStoreIcons, $"{hostname}.ico");
ImagingHelper.ConvertToIcon(pathIconPng, pathIcon, 32);
File.Delete(pathIconPng);
string title = url;
title = title.Replace("/", " ").
Replace("https", string.Empty).
Replace("http", string.Empty);
string invalid = new string(Path.GetInvalidFileNameChars()) + new string(Path.GetInvalidPathChars());
foreach (char c in invalid)
{
title = title.Replace(c.ToString(), string.Empty);
}
title = Truncate(title, 128); // max 255
static string Truncate(string value, int maxLength)
{
if (!string.IsNullOrEmpty(value) &&
value.Length > maxLength)
{
value = value.Substring(0, maxLength);
}
return value;
}
using StreamWriter writer = new(pathToStoreFile + "\\" + title.Trim() + ".url");
writer.WriteLine("[InternetShortcut]");
writer.WriteLine($"URL={url.TrimEnd('\0')}");
writer.WriteLine("IconIndex=0");
writer.WriteLine($"HotKey=0");
writer.WriteLine($"IDList=");
writer.WriteLine($"IconFile={pathIcon}");
writer.Flush();
}
}
}
}

View file

@ -20,7 +20,7 @@ namespace SystemTrayMenu.Helper
private const double Shown = 1.00;
private const double ShownMinus = 0.80; // Shown - StepIn
private readonly Timer timer = new Timer();
private readonly Timer timer = new();
private FadingState state = FadingState.Idle;
private double opacity;
private bool visible;

View file

@ -38,14 +38,14 @@ namespace SystemTrayMenu.Helper
width = height = size;
}
Bitmap newBitmap = new Bitmap(inputBitmap, new Size(width, height));
Bitmap newBitmap = new(inputBitmap, new Size(width, height));
if (newBitmap != null)
{
// save the resized png into a memory stream for future use
using MemoryStream memoryStream = new MemoryStream();
using MemoryStream memoryStream = new();
newBitmap.Save(memoryStream, ImageFormat.Png);
BinaryWriter iconWriter = new BinaryWriter(output);
BinaryWriter iconWriter = new(output);
if (output != null && iconWriter != null)
{
// 0-1 reserved, 0
@ -109,15 +109,15 @@ namespace SystemTrayMenu.Helper
/// <returns>Wether or not the icon was succesfully generated.</returns>
public static bool ConvertToIcon(string inputPath, string outputPath, int size = 16, bool preserveAspectRatio = false)
{
using FileStream inputStream = new FileStream(inputPath, FileMode.Open);
using FileStream outputStream = new FileStream(outputPath, FileMode.OpenOrCreate);
using FileStream inputStream = new(inputPath, FileMode.Open);
using FileStream outputStream = new(outputPath, FileMode.OpenOrCreate);
return ConvertToIcon(inputStream, outputStream, size, preserveAspectRatio);
}
public static Image RotateImage(Image img, float rotationAngle)
{
// create an empty Bitmap image
Bitmap bmp = new Bitmap(img.Width, img.Height);
Bitmap bmp = new(img.Width, img.Height);
// turn the Bitmap into a Graphics object
Graphics gfx = Graphics.FromImage(bmp);

View file

@ -24,7 +24,7 @@ namespace SystemTrayMenu.Helper
public sealed class KeyboardHook : IDisposable
{
private readonly Window window = new Window();
private readonly Window window = new();
private int currentId;
public KeyboardHook()

View file

@ -26,7 +26,7 @@ namespace SystemTrayMenu.Helper
{
IntPtr taskbarHandle = User32FindWindow(ClassName, null);
APPBARDATA data = new APPBARDATA
APPBARDATA data = new()
{
cbSize = (uint)Marshal.SizeOf(typeof(APPBARDATA)),
hWnd = taskbarHandle,

View file

@ -10,7 +10,7 @@
<Identity
Name="49543SystemTrayMenu.SystemTrayMenu"
Publisher="CN=5884501C-92ED-45DE-9508-9D987C314243"
Version="1.0.27.0" />
Version="1.0.28.0" />
<Properties>
<DisplayName>SystemTrayMenu</DisplayName>

View file

@ -47,7 +47,7 @@
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
<PropertyGroup>
<ProjectGuid>01d77f37-786a-4dc4-a1ad-bc1eec54eae3</ProjectGuid>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
<TargetPlatformVersion>10.0.22000.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<DefaultLanguage>en-US</DefaultLanguage>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>

View file

@ -116,12 +116,12 @@ namespace SystemTrayMenu.Properties
}
// collection that will be returned.
SettingsPropertyValueCollection values = new SettingsPropertyValueCollection();
SettingsPropertyValueCollection values = new();
// itterate thought the properties we get from the designer, checking to see if the setting is in the dictionary
foreach (SettingsProperty setting in collection)
{
SettingsPropertyValue value = new SettingsPropertyValue(setting)
SettingsPropertyValue value = new(setting)
{
IsDirty = false,
};
@ -157,7 +157,7 @@ namespace SystemTrayMenu.Properties
// grab the values from the collection parameter and update the values in our dictionary.
foreach (SettingsPropertyValue value in collection)
{
SettingStruct setting = new SettingStruct()
SettingStruct setting = new()
{
Value = value.PropertyValue == null ? string.Empty : value.PropertyValue.ToString(),
Name = value.Name,
@ -187,11 +187,11 @@ namespace SystemTrayMenu.Properties
if (!File.Exists(path))
{
// if the config file is not where it's supposed to be create a new one.
XDocument doc = new XDocument();
XDeclaration declaration = new XDeclaration("1.0", "utf-8", "true");
XElement config = new XElement(Config);
XElement userSettings = new XElement(UserSettings);
XElement group = new XElement(typeof(Settings).FullName);
XDocument doc = new();
XDeclaration declaration = new("1.0", "utf-8", "true");
XElement config = new(Config);
XElement userSettings = new(UserSettings);
XElement group = new(typeof(Settings).FullName);
userSettings.Add(group);
config.Add(userSettings);
doc.Add(config);
@ -274,7 +274,7 @@ namespace SystemTrayMenu.Properties
// using "String" as default serializeAs...just in case, no real good reason.
foreach (XElement element in settingElements)
{
SettingStruct newSetting = new SettingStruct()
SettingStruct newSetting = new()
{
Name = element.Attribute(NameOf) == null ? string.Empty : element.Attribute(NameOf).Value,
SerializeAs = element.Attribute(SerializeAs) == null ? "String" : element.Attribute(SerializeAs).Value,
@ -313,7 +313,7 @@ namespace SystemTrayMenu.Properties
if (setting == null)
{
// this can happen if a new setting is added via the .settings designer.
XElement newSetting = new XElement(Setting);
XElement newSetting = new(Setting);
newSetting.Add(new XAttribute(NameOf, entry.Value.Name));
newSetting.Add(new XAttribute(SerializeAs, entry.Value.SerializeAs));
newSetting.Value = entry.Value.Value ?? string.Empty;

View file

@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
@ -13,13 +13,13 @@ namespace SystemTrayMenu.Properties {
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </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", "16.0.0.0")]
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[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 {
@ -33,7 +33,7 @@ namespace SystemTrayMenu.Properties {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
@ -47,8 +47,8 @@ namespace SystemTrayMenu.Properties {
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
@ -61,7 +61,7 @@ namespace SystemTrayMenu.Properties {
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
/// </summary>
public static byte[] ic_fluent_document_48_regular {
get {
@ -71,7 +71,7 @@ namespace SystemTrayMenu.Properties {
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
/// </summary>
public static byte[] ic_fluent_folder_48_regular {
get {
@ -81,7 +81,7 @@ namespace SystemTrayMenu.Properties {
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
/// </summary>
public static byte[] ic_fluent_folder_arrow_right_48_regular {
get {
@ -91,7 +91,7 @@ namespace SystemTrayMenu.Properties {
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
/// </summary>
public static byte[] ic_fluent_pin_48_filled {
get {
@ -101,7 +101,7 @@ namespace SystemTrayMenu.Properties {
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
/// </summary>
public static byte[] ic_fluent_pin_48_regular {
get {
@ -111,7 +111,7 @@ namespace SystemTrayMenu.Properties {
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
/// </summary>
public static byte[] ic_fluent_search_48_regular {
get {
@ -121,7 +121,7 @@ namespace SystemTrayMenu.Properties {
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol).
/// </summary>
public static System.Drawing.Icon Loading {
get {
@ -131,7 +131,7 @@ namespace SystemTrayMenu.Properties {
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol).
/// </summary>
public static System.Drawing.Icon NotFound {
get {
@ -141,7 +141,7 @@ namespace SystemTrayMenu.Properties {
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol).
/// </summary>
public static System.Drawing.Icon SystemTrayMenu {
get {
@ -151,7 +151,7 @@ namespace SystemTrayMenu.Properties {
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol).
/// </summary>
public static System.Drawing.Icon White50Percentage {
get {

View file

@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
@ -13,13 +13,13 @@ namespace SystemTrayMenu.Resources {
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </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", "16.0.0.0")]
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class lang {
@ -33,7 +33,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
@ -47,8 +47,8 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
@ -61,7 +61,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to About.
/// Sucht eine lokalisierte Zeichenfolge, die About ähnelt.
/// </summary>
internal static string About {
get {
@ -70,7 +70,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Activated.
/// Sucht eine lokalisierte Zeichenfolge, die Activated ähnelt.
/// </summary>
internal static string Activated {
get {
@ -79,7 +79,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Add folder.
/// Sucht eine lokalisierte Zeichenfolge, die Add folder ähnelt.
/// </summary>
internal static string Add_folder {
get {
@ -88,7 +88,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Add folders to main menu.
/// Sucht eine lokalisierte Zeichenfolge, die Add folders to main menu ähnelt.
/// </summary>
internal static string Add_folders_to_main_menu {
get {
@ -97,7 +97,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Add sample &apos;Start Menu&apos; folder.
/// Sucht eine lokalisierte Zeichenfolge, die Add sample &apos;Start Menu&apos; folder ähnelt.
/// </summary>
internal static string Add_sample__Start_Menu__folder {
get {
@ -106,7 +106,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Advanced.
/// Sucht eine lokalisierte Zeichenfolge, die Advanced ähnelt.
/// </summary>
internal static string Advanced {
get {
@ -115,7 +115,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Appear at mouse location.
/// Sucht eine lokalisierte Zeichenfolge, die Appear at mouse location ähnelt.
/// </summary>
internal static string Appear_at_mouse_location {
get {
@ -124,7 +124,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Appear at the bottom left.
/// Sucht eine lokalisierte Zeichenfolge, die Appear at the bottom left ähnelt.
/// </summary>
internal static string Appear_at_the_bottom_left {
get {
@ -133,7 +133,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Arrow.
/// Sucht eine lokalisierte Zeichenfolge, die Arrow ähnelt.
/// </summary>
internal static string Arrow {
get {
@ -142,7 +142,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Arrow when clicking.
/// Sucht eine lokalisierte Zeichenfolge, die Arrow when clicking ähnelt.
/// </summary>
internal static string Arrow_when_clicking {
get {
@ -151,7 +151,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Arrow while mouse hovers.
/// Sucht eine lokalisierte Zeichenfolge, die Arrow while mouse hovers ähnelt.
/// </summary>
internal static string Arrow_while_mouse_hovers {
get {
@ -160,7 +160,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Autostart.
/// Sucht eine lokalisierte Zeichenfolge, die Autostart ähnelt.
/// </summary>
internal static string Autostart {
get {
@ -169,7 +169,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Background.
/// Sucht eine lokalisierte Zeichenfolge, die Background ähnelt.
/// </summary>
internal static string Background {
get {
@ -178,7 +178,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Background of arrow when clicking.
/// Sucht eine lokalisierte Zeichenfolge, die Background of arrow when clicking ähnelt.
/// </summary>
internal static string Background_of_arrow_when_clicking {
get {
@ -187,7 +187,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Background of arrow while mouse hovers.
/// Sucht eine lokalisierte Zeichenfolge, die Background of arrow while mouse hovers ähnelt.
/// </summary>
internal static string Background_of_arrow_while_mouse_hovers {
get {
@ -196,7 +196,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Border of menu.
/// Sucht eine lokalisierte Zeichenfolge, die Border of menu ähnelt.
/// </summary>
internal static string Border_of_menu {
get {
@ -205,7 +205,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Border of opened folder.
/// Sucht eine lokalisierte Zeichenfolge, die Border of opened folder ähnelt.
/// </summary>
internal static string Border_of_opened_folder {
get {
@ -214,7 +214,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Border of selected item.
/// Sucht eine lokalisierte Zeichenfolge, die Border of selected item ähnelt.
/// </summary>
internal static string Border_of_selected_item {
get {
@ -223,7 +223,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Cancel.
/// Sucht eine lokalisierte Zeichenfolge, die Cancel ähnelt.
/// </summary>
internal static string buttonCancel {
get {
@ -232,7 +232,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Details.
/// Sucht eine lokalisierte Zeichenfolge, die Details ähnelt.
/// </summary>
internal static string buttonDetails {
get {
@ -241,7 +241,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to OK.
/// Sucht eine lokalisierte Zeichenfolge, die OK ähnelt.
/// </summary>
internal static string buttonOk {
get {
@ -250,7 +250,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to System Info.
/// Sucht eine lokalisierte Zeichenfolge, die System Info ähnelt.
/// </summary>
internal static string buttonSystemInfo {
get {
@ -259,7 +259,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Cache main menu.
/// Sucht eine lokalisierte Zeichenfolge, die Cache main menu ähnelt.
/// </summary>
internal static string Cache_main_menu {
get {
@ -268,7 +268,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Change folder.
/// Sucht eine lokalisierte Zeichenfolge, die Change folder ähnelt.
/// </summary>
internal static string Change_folder {
get {
@ -277,7 +277,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Change to relative folder.
/// Sucht eine lokalisierte Zeichenfolge, die Change to relative folder ähnelt.
/// </summary>
internal static string Change_to_relative_folder {
get {
@ -286,7 +286,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Clear cache if more than this number of items.
/// Sucht eine lokalisierte Zeichenfolge, die Clear cache if more than this number of items ähnelt.
/// </summary>
internal static string Clear_cache_if_more_than_this_number_of_items {
get {
@ -295,7 +295,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Click.
/// Sucht eine lokalisierte Zeichenfolge, die Click ähnelt.
/// </summary>
internal static string Click {
get {
@ -304,7 +304,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Colors Dark Mode.
/// Sucht eine lokalisierte Zeichenfolge, die Colors Dark Mode ähnelt.
/// </summary>
internal static string Colors_Dark_Mode {
get {
@ -313,7 +313,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Colors Light Mode.
/// Sucht eine lokalisierte Zeichenfolge, die Colors Light Mode ähnelt.
/// </summary>
internal static string Colors_Light_Mode {
get {
@ -322,7 +322,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Couldnt register the hot key..
/// Sucht eine lokalisierte Zeichenfolge, die Couldnt register the hot key. ähnelt.
/// </summary>
internal static string Could_not_register_the_hot_key_ {
get {
@ -331,7 +331,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Customize.
/// Sucht eine lokalisierte Zeichenfolge, die Customize ähnelt.
/// </summary>
internal static string Customize {
get {
@ -340,7 +340,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Dark Mode always active.
/// Sucht eine lokalisierte Zeichenfolge, die Dark Mode always active ähnelt.
/// </summary>
internal static string Dark_Mode_always_active {
get {
@ -349,7 +349,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Deactivated.
/// Sucht eine lokalisierte Zeichenfolge, die Deactivated ähnelt.
/// </summary>
internal static string Deactivated {
get {
@ -358,7 +358,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Default.
/// Sucht eine lokalisierte Zeichenfolge, die Default ähnelt.
/// </summary>
internal static string Default {
get {
@ -367,7 +367,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Exit.
/// Sucht eine lokalisierte Zeichenfolge, die Exit ähnelt.
/// </summary>
internal static string Exit {
get {
@ -376,7 +376,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Expert.
/// Sucht eine lokalisierte Zeichenfolge, die Expert ähnelt.
/// </summary>
internal static string Expert {
get {
@ -385,7 +385,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Folder.
/// Sucht eine lokalisierte Zeichenfolge, die Folder ähnelt.
/// </summary>
internal static string Folder {
get {
@ -394,7 +394,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Folder empty.
/// Sucht eine lokalisierte Zeichenfolge, die Folder empty ähnelt.
/// </summary>
internal static string Folder_empty {
get {
@ -403,7 +403,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Folder inaccessible.
/// Sucht eine lokalisierte Zeichenfolge, die Folder inaccessible ähnelt.
/// </summary>
internal static string Folder_inaccessible {
get {
@ -412,7 +412,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Folder paths.
/// Sucht eine lokalisierte Zeichenfolge, die Folder paths ähnelt.
/// </summary>
internal static string Folder_paths {
get {
@ -421,7 +421,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Folders.
/// Sucht eine lokalisierte Zeichenfolge, die Folders ähnelt.
/// </summary>
internal static string Folders {
get {
@ -430,7 +430,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to General.
/// Sucht eine lokalisierte Zeichenfolge, die General ähnelt.
/// </summary>
internal static string General {
get {
@ -439,7 +439,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Help / FAQ.
/// Sucht eine lokalisierte Zeichenfolge, die Help / FAQ ähnelt.
/// </summary>
internal static string HelpFAQ {
get {
@ -448,7 +448,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Hotkey.
/// Sucht eine lokalisierte Zeichenfolge, die Hotkey ähnelt.
/// </summary>
internal static string Hotkey {
get {
@ -457,7 +457,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Icons.
/// Sucht eine lokalisierte Zeichenfolge, die Icons ähnelt.
/// </summary>
internal static string Icons {
get {
@ -466,7 +466,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to If an item was clicked.
/// Sucht eine lokalisierte Zeichenfolge, die If an item was clicked ähnelt.
/// </summary>
internal static string If_an_item_was_clicked {
get {
@ -475,7 +475,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to If the focus is lost and if the mouse is still on the menu.
/// Sucht eine lokalisierte Zeichenfolge, die If the focus is lost and if the mouse is still on the menu ähnelt.
/// </summary>
internal static string If_the_focus_is_lost_and_if_the_mouse_is_still_on_the_menu {
get {
@ -484,7 +484,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to If the focus is lost and the Enter key was pressed.
/// Sucht eine lokalisierte Zeichenfolge, die If the focus is lost and the Enter key was pressed ähnelt.
/// </summary>
internal static string If_the_focus_is_lost_and_the_Enter_key_was_pressed {
get {
@ -493,7 +493,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Language.
/// Sucht eine lokalisierte Zeichenfolge, die Language ähnelt.
/// </summary>
internal static string Language {
get {
@ -502,7 +502,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Launch on startup.
/// Sucht eine lokalisierte Zeichenfolge, die Launch on startup ähnelt.
/// </summary>
internal static string Launch_on_startup {
get {
@ -511,7 +511,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to loading.
/// Sucht eine lokalisierte Zeichenfolge, die loading ähnelt.
/// </summary>
internal static string loading {
get {
@ -520,7 +520,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Log File.
/// Sucht eine lokalisierte Zeichenfolge, die Log File ähnelt.
/// </summary>
internal static string Log_File {
get {
@ -529,7 +529,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Menu.
/// Sucht eine lokalisierte Zeichenfolge, die Menu ähnelt.
/// </summary>
internal static string Menu {
get {
@ -538,7 +538,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Your root folder for the SystemTrayMenu does not exist or is empty! Put some files, folders or shortcuts into the folder or change the root folder..
/// Sucht eine lokalisierte Zeichenfolge, die Your root folder for the SystemTrayMenu does not exist or is empty! Put some files, folders or shortcuts into the folder or change the root folder. ähnelt.
/// </summary>
internal static string MessageRootFolderEmpty {
get {
@ -547,7 +547,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to You have no access to the root folder for the SystemTrayMenu. Grant access to the folder or change the root folder..
/// Sucht eine lokalisierte Zeichenfolge, die You have no access to the root folder for the SystemTrayMenu. Grant access to the folder or change the root folder. ähnelt.
/// </summary>
internal static string MessageRootFolderNoAccess {
get {
@ -556,7 +556,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Milliseconds until a menu opens when the mouse is on it.
/// Sucht eine lokalisierte Zeichenfolge, die Milliseconds until a menu opens when the mouse is on it ähnelt.
/// </summary>
internal static string Milliseconds_until_a_menu_opens_when_the_mouse_is_on_it {
get {
@ -565,7 +565,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Milliseconds until the menu closes if in this case the menu is not reactivated.
/// Sucht eine lokalisierte Zeichenfolge, die Milliseconds until the menu closes if in this case the menu is not reactivated ähnelt.
/// </summary>
internal static string Milliseconds_until_the_menu_closes_if_in_this_case_the_menu_is_not_reactivated {
get {
@ -574,7 +574,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Milliseconds until the menu closes if in this case the mouse then leaves the menu.
/// Sucht eine lokalisierte Zeichenfolge, die Milliseconds until the menu closes if in this case the mouse then leaves the menu ähnelt.
/// </summary>
internal static string Milliseconds_until_the_menu_closes_if_in_this_case_the_mouse_then_leaves_the_menu {
get {
@ -584,7 +584,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Only Files.
/// Sucht eine lokalisierte Zeichenfolge, die Only Files ähnelt.
/// </summary>
internal static string Only_Files {
get {
@ -593,7 +593,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Open Folder.
/// Sucht eine lokalisierte Zeichenfolge, die Open Folder ähnelt.
/// </summary>
internal static string Open_Folder {
get {
@ -602,7 +602,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Open the assembly location.
/// Sucht eine lokalisierte Zeichenfolge, die Open the assembly location ähnelt.
/// </summary>
internal static string Open_the_assembly_location {
get {
@ -611,7 +611,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Opened folder.
/// Sucht eine lokalisierte Zeichenfolge, die Opened folder ähnelt.
/// </summary>
internal static string Opened_folder {
get {
@ -620,7 +620,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Pixels maximum menu height.
/// Sucht eine lokalisierte Zeichenfolge, die Pixels maximum menu height ähnelt.
/// </summary>
internal static string Pixels_maximum_menu_height {
get {
@ -629,7 +629,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Pixels maximum menu width.
/// Sucht eine lokalisierte Zeichenfolge, die Pixels maximum menu width ähnelt.
/// </summary>
internal static string Pixels_maximum_menu_width {
get {
@ -638,7 +638,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Problem with Shortcut.
/// Sucht eine lokalisierte Zeichenfolge, die Problem with Shortcut ähnelt.
/// </summary>
internal static string Problem_with_Shortcut {
get {
@ -647,7 +647,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Recursive.
/// Sucht eine lokalisierte Zeichenfolge, die Recursive ähnelt.
/// </summary>
internal static string Recursive {
get {
@ -656,7 +656,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Remove folder.
/// Sucht eine lokalisierte Zeichenfolge, die Remove folder ähnelt.
/// </summary>
internal static string Remove_folder {
get {
@ -665,7 +665,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Restart.
/// Sucht eine lokalisierte Zeichenfolge, die Restart ähnelt.
/// </summary>
internal static string Restart {
get {
@ -674,7 +674,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Round corners.
/// Sucht eine lokalisierte Zeichenfolge, die Round corners ähnelt.
/// </summary>
internal static string Round_corners {
get {
@ -683,7 +683,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Row height in percentage.
/// Sucht eine lokalisierte Zeichenfolge, die Row height in percentage ähnelt.
/// </summary>
internal static string Row_height_in_percentage {
get {
@ -692,7 +692,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Scrollbar.
/// Sucht eine lokalisierte Zeichenfolge, die Scrollbar ähnelt.
/// </summary>
internal static string Scrollbar {
get {
@ -701,7 +701,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Search field.
/// Sucht eine lokalisierte Zeichenfolge, die Search field ähnelt.
/// </summary>
internal static string Search_field {
get {
@ -710,7 +710,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Select Folder.
/// Sucht eine lokalisierte Zeichenfolge, die Select Folder ähnelt.
/// </summary>
internal static string Select_Folder {
get {
@ -719,7 +719,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Selected item.
/// Sucht eine lokalisierte Zeichenfolge, die Selected item ähnelt.
/// </summary>
internal static string Selected_item {
get {
@ -728,7 +728,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Set as SystemTrayMenu folder.
/// Sucht eine lokalisierte Zeichenfolge, die Set as SystemTrayMenu folder ähnelt.
/// </summary>
internal static string Set_as_SystemTrayMenu_folder {
get {
@ -737,7 +737,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Set by context menu .
/// Sucht eine lokalisierte Zeichenfolge, die Set by context menu ähnelt.
/// </summary>
internal static string Set_by_context_menu_ {
get {
@ -746,7 +746,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Settings.
/// Sucht eine lokalisierte Zeichenfolge, die Settings ähnelt.
/// </summary>
internal static string Settings {
get {
@ -755,7 +755,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Show in Taskbar.
/// Sucht eine lokalisierte Zeichenfolge, die Show in Taskbar ähnelt.
/// </summary>
internal static string Show_in_Taskbar {
get {
@ -764,7 +764,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Single click to open an item instead of double click.
/// Sucht eine lokalisierte Zeichenfolge, die Single click to open an item instead of double click ähnelt.
/// </summary>
internal static string Single_click_to_start_item {
get {
@ -773,7 +773,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Size.
/// Sucht eine lokalisierte Zeichenfolge, die Size ähnelt.
/// </summary>
internal static string Size {
get {
@ -782,7 +782,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Size and location.
/// Sucht eine lokalisierte Zeichenfolge, die Size and location ähnelt.
/// </summary>
internal static string Size_and_location {
get {
@ -791,7 +791,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Slider.
/// Sucht eine lokalisierte Zeichenfolge, die Slider ähnelt.
/// </summary>
internal static string Slider {
get {
@ -800,7 +800,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Slider while dragging.
/// Sucht eine lokalisierte Zeichenfolge, die Slider while dragging ähnelt.
/// </summary>
internal static string Slider_while_dragging {
get {
@ -809,7 +809,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Slider while mouse hovers 1.
/// Sucht eine lokalisierte Zeichenfolge, die Slider while mouse hovers 1 ähnelt.
/// </summary>
internal static string Slider_while_mouse_hovers_1 {
get {
@ -818,7 +818,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Slider while mouse hovers 2.
/// Sucht eine lokalisierte Zeichenfolge, die Slider while mouse hovers 2 ähnelt.
/// </summary>
internal static string Slider_while_mouse_hovers_2 {
get {
@ -827,7 +827,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Stays open.
/// Sucht eine lokalisierte Zeichenfolge, die Stays open ähnelt.
/// </summary>
internal static string Stays_open {
get {
@ -836,7 +836,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Store config at the assembly location.
/// Sucht eine lokalisierte Zeichenfolge, die Store config at the assembly location ähnelt.
/// </summary>
internal static string Store_config_at_the_assembly_location {
get {
@ -845,7 +845,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to SystemTrayMenu.
/// Sucht eine lokalisierte Zeichenfolge, die SystemTrayMenu ähnelt.
/// </summary>
internal static string SystemTrayMenu {
get {
@ -854,7 +854,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Task Manger.
/// Sucht eine lokalisierte Zeichenfolge, die Task Manger ähnelt.
/// </summary>
internal static string Task_Manger {
get {
@ -863,7 +863,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Read the FAQ and then choose a root directory for the SystemTrayMenu..
/// Sucht eine lokalisierte Zeichenfolge, die Read the FAQ and then choose a root directory for the SystemTrayMenu. ähnelt.
/// </summary>
internal static string TextFirstStart {
get {
@ -872,7 +872,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to The item that this shortcut refers to has been changed or moved, so this shortcut will no longer work properly..
/// Sucht eine lokalisierte Zeichenfolge, die The item that this shortcut refers to has been changed or moved, so this shortcut will no longer work properly. ähnelt.
/// </summary>
internal static string The_item_that_this_shortcut_refers_to_has_been_changed_or_moved__so_this_shortcut_will_no_longer_work_properly_ {
get {
@ -882,7 +882,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Time until a menu opens.
/// Sucht eine lokalisierte Zeichenfolge, die Time until a menu opens ähnelt.
/// </summary>
internal static string Time_until_a_menu_opens {
get {
@ -891,7 +891,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Title.
/// Sucht eine lokalisierte Zeichenfolge, die Title ähnelt.
/// </summary>
internal static string Title {
get {
@ -900,7 +900,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to USB.
/// Sucht eine lokalisierte Zeichenfolge, die USB ähnelt.
/// </summary>
internal static string USB {
get {
@ -909,7 +909,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Use icon from folder.
/// Sucht eine lokalisierte Zeichenfolge, die Use icon from folder ähnelt.
/// </summary>
internal static string Use_icon_from_folder {
get {
@ -918,7 +918,7 @@ namespace SystemTrayMenu.Resources {
}
/// <summary>
/// Looks up a localized string similar to Warning.
/// Sucht eine lokalisierte Zeichenfolge, die Warning ähnelt.
/// </summary>
internal static string Warning {
get {

View file

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0-windows10.0.22000.0</TargetFramework>
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
@ -77,10 +77,12 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleasePackage|x64'">
<ErrorReport>none</ErrorReport>
<DebugSymbols>true</DebugSymbols>
<Optimize>True</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleasePackage|AnyCPU'">
<ErrorReport>none</ErrorReport>
<DebugSymbols>true</DebugSymbols>
<Optimize>True</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
<ErrorReport>none</ErrorReport>
@ -89,6 +91,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleasePackage|x86'">
<ErrorReport>none</ErrorReport>
<DebugSymbols>true</DebugSymbols>
<Optimize>True</Optimize>
</PropertyGroup>
<ItemGroup>
<Reference Include="Clearcove.Logging, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
@ -282,7 +285,7 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="5.0.3">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
@ -315,5 +318,6 @@ EXIT 0</PreBuildEvent>
<RepositoryType></RepositoryType>
<PackageTags>SystemTrayMenu</PackageTags>
<ApplicationManifest>Resources\app.manifest</ApplicationManifest>
<SupportedOSPlatformVersion>10.0.17763.0</SupportedOSPlatformVersion>
</PropertyGroup>
</Project>

View file

@ -261,8 +261,8 @@ namespace SystemTrayMenu.UserInterface
string typeName;
string name;
string value;
NameValueCollection nvc = new NameValueCollection();
Regex r = new Regex(@"(\.Assembly|\.)(?<Name>[^.]*)Attribute$", RegexOptions.IgnoreCase);
NameValueCollection nvc = new();
Regex r = new(@"(\.Assembly|\.)(?<Name>[^.]*)Attribute$", RegexOptions.IgnoreCase);
foreach (object attrib in a.GetCustomAttributes(false))
{
@ -340,7 +340,7 @@ namespace SystemTrayMenu.UserInterface
{
if (!a.IsDynamic)
{
nvc.Add("CodeBase", a.CodeBase.Replace("file:///", string.Empty, StringComparison.InvariantCulture));
nvc.Add("CodeBase", a.Location.Replace("file:///", string.Empty, StringComparison.InvariantCulture));
}
}
catch (NotSupportedException)
@ -419,7 +419,7 @@ namespace SystemTrayMenu.UserInterface
{
if (!string.IsNullOrEmpty(value))
{
ListViewItem lvi = new ListViewItem
ListViewItem lvi = new()
{
Text = key,
};
@ -435,9 +435,7 @@ namespace SystemTrayMenu.UserInterface
{
lvw.Items.Clear();
// this assembly property is only available in framework versions 1.1+
Populate(lvw, "Image Runtime Version", a.ImageRuntimeVersion);
Populate(lvw, "Loaded from GAC", a.GlobalAssemblyCache.ToString(CultureInfo.InvariantCulture));
NameValueCollection nvc = AssemblyAttribs(a);
foreach (string strKey in nvc)
@ -533,7 +531,7 @@ namespace SystemTrayMenu.UserInterface
string strAssemblyName = a.GetName().Name;
ListViewItem lvi = new ListViewItem
ListViewItem lvi = new()
{
Text = strAssemblyName,
Tag = strAssemblyName,

View file

@ -22,12 +22,12 @@ namespace SystemTrayMenu.Helper
public ContextMenuStrip Create()
{
ContextMenuStrip menu = new ContextMenuStrip
ContextMenuStrip menu = new()
{
BackColor = SystemColors.Control,
};
ToolStripMenuItem settings = new ToolStripMenuItem()
ToolStripMenuItem settings = new()
{
ImageScaling = ToolStripItemImageScaling.SizeToFit,
Text = Translator.GetText("Settings"),
@ -35,7 +35,7 @@ namespace SystemTrayMenu.Helper
settings.Click += Settings_Click;
static void Settings_Click(object sender, EventArgs e)
{
SettingsForm settingsForm = new SettingsForm();
SettingsForm settingsForm = new();
if (settingsForm.ShowDialog() == DialogResult.OK)
{
AppRestart.ByConfigChange();
@ -44,13 +44,13 @@ namespace SystemTrayMenu.Helper
menu.Items.Add(settings);
ToolStripSeparator seperator = new ToolStripSeparator
ToolStripSeparator seperator = new()
{
BackColor = SystemColors.Control,
};
menu.Items.Add(seperator);
ToolStripMenuItem openLog = new ToolStripMenuItem
ToolStripMenuItem openLog = new()
{
Text = Translator.GetText("Log File"),
};
@ -64,7 +64,7 @@ namespace SystemTrayMenu.Helper
menu.Items.Add(new ToolStripSeparator());
ToolStripMenuItem helpFAQ = new ToolStripMenuItem
ToolStripMenuItem helpFAQ = new()
{
Text = Translator.GetText("HelpFAQ"),
};
@ -76,7 +76,7 @@ namespace SystemTrayMenu.Helper
menu.Items.Add(helpFAQ);
ToolStripMenuItem about = new ToolStripMenuItem
ToolStripMenuItem about = new()
{
Text = Translator.GetText("About"),
};
@ -85,7 +85,7 @@ namespace SystemTrayMenu.Helper
{
FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(
Assembly.GetEntryAssembly().Location);
AboutBox ab = new AboutBox
AboutBox ab = new()
{
AppTitle = versionInfo.ProductName,
AppDescription = versionInfo.FileDescription,
@ -117,7 +117,7 @@ namespace SystemTrayMenu.Helper
menu.Items.Add(new ToolStripSeparator());
ToolStripMenuItem restart = new ToolStripMenuItem
ToolStripMenuItem restart = new()
{
Text = Translator.GetText("Restart"),
};
@ -129,7 +129,7 @@ namespace SystemTrayMenu.Helper
menu.Items.Add(restart);
ToolStripMenuItem exit = new ToolStripMenuItem
ToolStripMenuItem exit = new()
{
Text = Translator.GetText("Exit"),
};

View file

@ -14,8 +14,8 @@ namespace SystemTrayMenu.UserInterface
internal class AppNotifyIcon : IDisposable
{
private static Icon systemTrayMenu = Properties.Resources.SystemTrayMenu;
private readonly Timer load = new Timer();
private readonly NotifyIcon notifyIcon = new NotifyIcon();
private readonly Timer load = new();
private readonly NotifyIcon notifyIcon = new();
private bool threadsLoading;
private int rotationAngle;
@ -36,7 +36,7 @@ namespace SystemTrayMenu.UserInterface
}
notifyIcon.Icon = systemTrayMenu;
AppContextMenu contextMenus = new AppContextMenu();
AppContextMenu contextMenus = new();
contextMenus.ClickedOpenLog += ClickedOpenLog;
void ClickedOpenLog()
@ -111,7 +111,7 @@ namespace SystemTrayMenu.UserInterface
{
rotationAngle += 5;
using Bitmap bitmapLoading = Resources.StaticResources.LoadingIcon.ToBitmap();
using Bitmap bitmapLoadingRotated = new Bitmap(ImagingHelper.RotateImage(bitmapLoading, rotationAngle));
using Bitmap bitmapLoadingRotated = new(ImagingHelper.RotateImage(bitmapLoading, rotationAngle));
DisposeIconIfNotDefaultIcon();
IntPtr hIcon = bitmapLoadingRotated.GetHicon();
notifyIcon.Icon = (Icon)Icon.FromHandle(hIcon).Clone();

View file

@ -12,7 +12,7 @@ namespace SystemTrayMenu.UserInterface
[Designer(typeof(ScrollbarControlDesigner))]
public class CustomScrollbar : UserControl
{
private readonly Timer timerMouseStillClicked = new Timer();
private readonly Timer timerMouseStillClicked = new();
private float largeChange = 10;
private float smallChange = 1;
private int minimum = 0;
@ -299,9 +299,9 @@ namespace SystemTrayMenu.UserInterface
int widthDevidedBy2 = Width / 2;
int widthDevidedBy6 = Width / 6;
int widthDevidedBy2PluswidthDevidedBy8 = widthDevidedBy2 + (Width / 8);
PointF pointArrowUp1 = new PointF(widthDevidedBy2 - widthDevidedBy6, widthDevidedBy2PluswidthDevidedBy8);
PointF pointArrowUp2 = new PointF(widthDevidedBy2 + widthDevidedBy6, widthDevidedBy2PluswidthDevidedBy8);
PointF pointArrowUp3 = new PointF(widthDevidedBy2, widthDevidedBy2PluswidthDevidedBy8 - widthDevidedBy6);
PointF pointArrowUp1 = new(widthDevidedBy2 - widthDevidedBy6, widthDevidedBy2PluswidthDevidedBy8);
PointF pointArrowUp2 = new(widthDevidedBy2 + widthDevidedBy6, widthDevidedBy2PluswidthDevidedBy8);
PointF pointArrowUp3 = new(widthDevidedBy2, widthDevidedBy2PluswidthDevidedBy8 - widthDevidedBy6);
PointF pointArrowUp4 = pointArrowUp1;
PointF[] curvePoints =
{
@ -336,7 +336,7 @@ namespace SystemTrayMenu.UserInterface
}
}
Rectangle rectangleSlider = new Rectangle(1, top, Width - 2, sliderHeight);
Rectangle rectangleSlider = new(1, top, Width - 2, sliderHeight);
e.Graphics.FillRectangle(solidBrushSlider, rectangleSlider);
// Draw arrowDown
@ -366,9 +366,9 @@ namespace SystemTrayMenu.UserInterface
e.Graphics.FillRectangle(solidBrushArrowDownBackground, GetDownArrowRectangleWithoutBorder(trackHeight));
PointF pointArrowDown1 = new PointF(widthDevidedBy2 - widthDevidedBy6, Height - widthDevidedBy2PluswidthDevidedBy8);
PointF pointArrowDown2 = new PointF(widthDevidedBy2 + widthDevidedBy6, Height - widthDevidedBy2PluswidthDevidedBy8);
PointF pointArrowDown3 = new PointF(widthDevidedBy2, Height - widthDevidedBy2PluswidthDevidedBy8 + widthDevidedBy6);
PointF pointArrowDown1 = new(widthDevidedBy2 - widthDevidedBy6, Height - widthDevidedBy2PluswidthDevidedBy8);
PointF pointArrowDown2 = new(widthDevidedBy2 + widthDevidedBy6, Height - widthDevidedBy2PluswidthDevidedBy8);
PointF pointArrowDown3 = new(widthDevidedBy2, Height - widthDevidedBy2PluswidthDevidedBy8 + widthDevidedBy6);
PointF pointArrowDown4 = pointArrowDown1;
PointF[] curvePointsArrowDown =
{

View file

@ -59,7 +59,7 @@ namespace SystemTrayMenu.UserInterface.FolderBrowseDialog
frm.SetOptions(options);
if (InitialFolder != null)
{
Guid riid = new Guid("43826D1E-E718-42EE-BC55-A1E261C37BFE"); // IShellItem
Guid riid = new("43826D1E-E718-42EE-BC55-A1E261C37BFE"); // IShellItem
if (NativeMethods.SHCreateItemFromParsingName(
InitialFolder,
IntPtr.Zero,
@ -72,7 +72,7 @@ namespace SystemTrayMenu.UserInterface.FolderBrowseDialog
if (DefaultFolder != null)
{
Guid riid = new Guid("43826D1E-E718-42EE-BC55-A1E261C37BFE"); // IShellItem
Guid riid = new("43826D1E-E718-42EE-BC55-A1E261C37BFE"); // IShellItem
if (NativeMethods.SHCreateItemFromParsingName(
DefaultFolder,
IntPtr.Zero,
@ -119,7 +119,7 @@ namespace SystemTrayMenu.UserInterface.FolderBrowseDialog
public DialogResult ShowLegacyDialog(IWin32Window owner)
{
using SaveFileDialog frm = new SaveFileDialog
using SaveFileDialog frm = new()
{
CheckFileExists = false,
CheckPathExists = true,

View file

@ -20,7 +20,7 @@ namespace SystemTrayMenu.UserInterface.HotkeyTextboxControl
{
private const uint WmHotkey = 0x312;
private static readonly EventDelay EventDelay = new EventDelay(TimeSpan.FromMilliseconds(600).Ticks);
private static readonly EventDelay EventDelay = new(TimeSpan.FromMilliseconds(600).Ticks);
private static readonly bool IsWindows7OrOlder = Environment.OSVersion.Version.Major >= 6 && Environment.OSVersion.Version.Minor >= 1;
// Holds the list of hotkeys
@ -33,7 +33,7 @@ namespace SystemTrayMenu.UserInterface.HotkeyTextboxControl
private readonly IList<int> needNonShiftModifier = new List<int>();
private readonly IList<int> needNonAltGrModifier = new List<int>();
private readonly ContextMenuStrip dummy = new ContextMenuStrip();
private readonly ContextMenuStrip dummy = new();
// These variables store the current hotkey and modifier(s)
private Keys hotkey = Keys.None;
@ -135,7 +135,7 @@ namespace SystemTrayMenu.UserInterface.HotkeyTextboxControl
public static string HotkeyModifiersToString(Keys modifierKeyCode)
{
StringBuilder hotkeyString = new StringBuilder();
StringBuilder hotkeyString = new();
if ((modifierKeyCode & Keys.Alt) > 0)
{
hotkeyString.Append("Alt").Append(" + ");
@ -166,7 +166,7 @@ namespace SystemTrayMenu.UserInterface.HotkeyTextboxControl
public static string HotkeyModifiersToLocalizedString(Keys modifierKeyCode)
{
StringBuilder hotkeyString = new StringBuilder();
StringBuilder hotkeyString = new();
if ((modifierKeyCode & Keys.Alt) > 0)
{
hotkeyString.Append(GetKeyName(Keys.Alt)).Append(" + ");
@ -366,7 +366,7 @@ namespace SystemTrayMenu.UserInterface.HotkeyTextboxControl
#pragma warning disable CA1308
public static string GetKeyName(Keys givenKey)
{
StringBuilder keyName = new StringBuilder();
StringBuilder keyName = new();
const uint numpad = 55;
Keys virtualKey = givenKey;

View file

@ -14,9 +14,9 @@ namespace SystemTrayMenu.UserInterface
private void InitializeComponentControlsTheDesignerRemoves()
{
DataGridViewCellStyle dataGridViewCellStyle1 = new DataGridViewCellStyle();
DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();
DataGridViewCellStyle dataGridViewCellStyle1 = new();
DataGridViewCellStyle dataGridViewCellStyle2 = new();
DataGridViewCellStyle dataGridViewCellStyle3 = new();
labelTitle = new LabelNoCopy();
ColumnText = new DataGridViewTextBoxColumn();

View file

@ -17,7 +17,7 @@ namespace SystemTrayMenu.UserInterface
internal partial class Menu : Form
{
private readonly Fading fading = new Fading();
private readonly Fading fading = new();
private bool isShowing;
private bool directionToRight;
private int rotationAngle;
@ -93,7 +93,7 @@ namespace SystemTrayMenu.UserInterface
backgroundBorder = AppColors.DarkModeBackgroundBorder;
}
ColorConverter colorConverter = new ColorConverter();
ColorConverter colorConverter = new();
labelFoldersCount.ForeColor = MenuDefines.ColorIcons;
labelFilesCount.ForeColor = MenuDefines.ColorIcons;
@ -813,7 +813,7 @@ namespace SystemTrayMenu.UserInterface
if (pictureBox.Tag != null && (bool)pictureBox.Tag)
{
Rectangle rowBounds = new Rectangle(0, 0, pictureBox.Width, pictureBox.Height);
Rectangle rowBounds = new(0, 0, pictureBox.Width, pictureBox.Height);
ControlPaint.DrawBorder(e.Graphics, rowBounds, MenuDefines.ColorSelectedItemBorder, ButtonBorderStyle.Solid);
}
}
@ -840,7 +840,7 @@ namespace SystemTrayMenu.UserInterface
if (pictureBox.Tag != null && (bool)pictureBox.Tag)
{
Rectangle rowBounds = new Rectangle(0, 0, pictureBox.Width, pictureBox.Height);
Rectangle rowBounds = new(0, 0, pictureBox.Width, pictureBox.Height);
ControlPaint.DrawBorder(e.Graphics, rowBounds, MenuDefines.ColorSelectedItemBorder, ButtonBorderStyle.Solid);
}
}

View file

@ -25,7 +25,7 @@ namespace SystemTrayMenu.UserInterface
private const string Command = @"Software\Classes\directory\shell\SystemTrayMenu_SetAsRootFolder\command";
private static readonly Icon SystemTrayMenu = Resources.SystemTrayMenu;
private readonly ColorConverter colorConverter = new ColorConverter();
private readonly ColorConverter colorConverter = new();
private bool inHotkey;
public SettingsForm()
@ -251,7 +251,7 @@ namespace SystemTrayMenu.UserInterface
InitializeLanguage();
void InitializeLanguage()
{
List<Language> dataSource = new List<Language>
List<Language> dataSource = new()
{
new Language() { Name = "čeština", Value = "cs" },
new Language() { Name = "Deutsch", Value = "de" },
@ -510,7 +510,7 @@ namespace SystemTrayMenu.UserInterface
private static bool RegisterHotkeys(bool ignoreFailedRegistration)
{
bool success = true;
StringBuilder failedKeys = new StringBuilder();
StringBuilder failedKeys = new();
if (!RegisterWrapper(failedKeys, Handler))
{
success = false;
@ -882,7 +882,7 @@ namespace SystemTrayMenu.UserInterface
private void ButtonAddFolderToRootFolder_Click(object sender, EventArgs e)
{
using FolderDialog dialog = new FolderDialog();
using FolderDialog dialog = new();
dialog.InitialFolder = Config.Path;
if (dialog.ShowDialog() == DialogResult.OK)

View file

@ -47,10 +47,10 @@ namespace SystemTrayMenu.Utilities
private static readonly int CbMenuItemInfo = Marshal.SizeOf(typeof(MENUITEMINFO));
private static readonly int CbInvokeCommand = Marshal.SizeOf(typeof(CMINVOKECOMMANDINFOEX));
private static Guid iidIShellFolder = new Guid("{000214E6-0000-0000-C000-000000000046}");
private static Guid iidIContextMenu = new Guid("{000214e4-0000-0000-c000-000000000046}");
private static Guid iidIContextMenu2 = new Guid("{000214f4-0000-0000-c000-000000000046}");
private static Guid iidIContextMenu3 = new Guid("{bcfce0a0-ec17-11d0-8d10-00a0c90f2719}");
private static Guid iidIShellFolder = new("{000214E6-0000-0000-C000-000000000046}");
private static Guid iidIContextMenu = new("{000214e4-0000-0000-c000-000000000046}");
private static Guid iidIContextMenu2 = new("{000214f4-0000-0000-c000-000000000046}");
private static Guid iidIContextMenu3 = new("{bcfce0a0-ec17-11d0-8d10-00a0c90f2719}");
private IContextMenu oContextMenu;
private IContextMenu2 oContextMenu2;
@ -953,7 +953,7 @@ namespace SystemTrayMenu.Utilities
private static void InvokeCommand(IContextMenu contextMenu, uint nCmd, string strFolder, Point pointInvoke)
{
CMINVOKECOMMANDINFOEX invoke = new CMINVOKECOMMANDINFOEX
CMINVOKECOMMANDINFOEX invoke = new()
{
CbSize = CbInvokeCommand,
LpVerb = (IntPtr)(nCmd - CmdFirst),
@ -1099,7 +1099,7 @@ namespace SystemTrayMenu.Utilities
IntPtr pStrRet = Marshal.AllocCoTaskMem((MaxPath * 2) + 4);
Marshal.WriteInt32(pStrRet, 0, 0);
_ = this.oDesktopFolder.GetDisplayNameOf(pPIDL, SHGNO.FORPARSING, pStrRet);
StringBuilder strFolder = new StringBuilder(MaxPath);
StringBuilder strFolder = new(MaxPath);
_ = DllImports.NativeMethods.ShlwapiStrRetToBuf(pStrRet, pPIDL, strFolder, MaxPath);
Marshal.FreeCoTaskMem(pStrRet);
strParentFolder = strFolder.ToString();

View file

@ -40,7 +40,7 @@ namespace SystemTrayMenu.Utilities
Log.Info($"Restart by '{reason}'");
Log.Close();
using (Process p = new Process())
using (Process p = new())
{
p.StartInfo = new ProcessStartInfo(
Process.GetCurrentProcess().
@ -61,7 +61,7 @@ namespace SystemTrayMenu.Utilities
[MethodImpl(MethodImplOptions.NoInlining)]
private static string GetCurrentMethod()
{
StackTrace st = new StackTrace();
StackTrace st = new();
StackFrame sf = st.GetFrame(1);
return sf.GetMethod().Name;

View file

@ -21,7 +21,7 @@ namespace SystemTrayMenu.Utilities
}
else
{
Thread staThread = new Thread(new ParameterizedThreadStart(StaThreadMethod));
Thread staThread = new(new ParameterizedThreadStart(StaThreadMethod));
void StaThreadMethod(object obj)
{
resolvedFilename = GetShortcutFileNamePath(shortcutFilename);
@ -73,7 +73,7 @@ namespace SystemTrayMenu.Utilities
string pathOnly = Path.GetDirectoryName((string)shortcutFilename);
string filenameOnly = Path.GetFileName((string)shortcutFilename);
Shell shell = new Shell();
Shell shell = new();
Folder folder = shell.NameSpace(pathOnly);
FolderItem folderItem = folder.ParseName(filenameOnly);
if (folderItem != null)

View file

@ -22,8 +22,8 @@ namespace SystemTrayMenu.Utilities
/// </summary>
public static class IconReader
{
private static readonly ConcurrentDictionary<string, Icon> DictIconCacheMainMenu = new ConcurrentDictionary<string, Icon>();
private static readonly ConcurrentDictionary<string, Icon> DictIconCacheSubMenus = new ConcurrentDictionary<string, Icon>();
private static readonly ConcurrentDictionary<string, Icon> DictIconCacheMainMenu = new();
private static readonly ConcurrentDictionary<string, Icon> DictIconCacheSubMenus = new();
public enum IconSize
{
@ -117,7 +117,7 @@ namespace SystemTrayMenu.Utilities
}
else
{
Thread staThread = new Thread(new ParameterizedThreadStart(StaThreadMethod));
Thread staThread = new(new ParameterizedThreadStart(StaThreadMethod));
void StaThreadMethod(object obj)
{
icon = GetExtractAllIconsLast(filePath);
@ -130,7 +130,7 @@ namespace SystemTrayMenu.Utilities
static Icon GetExtractAllIconsLast(string filePath)
{
StringBuilder executable = new StringBuilder(1024);
StringBuilder executable = new(1024);
DllImports.NativeMethods.Shell32FindExecutable(filePath, string.Empty, executable);
// icon = IconReader.GetFileIcon(executable, false);
@ -204,7 +204,7 @@ namespace SystemTrayMenu.Utilities
}
else
{
Thread staThread = new Thread(new ParameterizedThreadStart(StaThreadMethod));
Thread staThread = new(new ParameterizedThreadStart(StaThreadMethod));
void StaThreadMethod(object obj)
{
icon = GetFileIcon(filePath, linkOverlay, size);
@ -284,7 +284,7 @@ namespace SystemTrayMenu.Utilities
}
else
{
Thread staThread = new Thread(new ParameterizedThreadStart(StaThreadMethod));
Thread staThread = new(new ParameterizedThreadStart(StaThreadMethod));
void StaThreadMethod(object obj)
{
icon = GetFolderIcon(
@ -365,7 +365,7 @@ namespace SystemTrayMenu.Utilities
Icon icon = null;
if (originalIcon != null)
{
using Bitmap target = new Bitmap(originalIcon.Width, originalIcon.Height, PixelFormat.Format32bppArgb);
using Bitmap target = new(originalIcon.Width, originalIcon.Height, PixelFormat.Format32bppArgb);
using Graphics graphics = Graphics.FromImage(target);
graphics.DrawIcon(originalIcon, 0, 0);
graphics.DrawIcon(overlay, 0, 0);
@ -393,8 +393,7 @@ namespace SystemTrayMenu.Utilities
private static bool IsExtensionWithSameIcon(string fileExtension)
{
bool isExtensionWithSameIcon = true;
List<string> extensionsWithDiffIcons = new List<string>
{ string.Empty, ".EXE", ".LNK", ".ICO", ".URL" };
List<string> extensionsWithDiffIcons = new() { string.Empty, ".EXE", ".LNK", ".ICO", ".URL" };
if (extensionsWithDiffIcons.Contains(fileExtension.ToUpperInvariant()))
{
isExtensionWithSameIcon = false;

View file

@ -15,9 +15,9 @@ namespace SystemTrayMenu.Utilities
internal static class Log
{
private static readonly Logger LogValue = new Logger(string.Empty);
private static readonly List<string> Warnings = new List<string>();
private static readonly List<string> Infos = new List<string>();
private static readonly Logger LogValue = new(string.Empty);
private static readonly List<string> Warnings = new();
private static readonly List<string> Infos = new();
internal static void Initialize()
{
@ -91,7 +91,7 @@ namespace SystemTrayMenu.Utilities
try
{
using Process p = new Process
using Process p = new()
{
StartInfo = new ProcessStartInfo(fileName)
{

View file

@ -28,7 +28,7 @@ namespace SystemTrayMenu.Utilities
internal static string GetText(string id)
{
ResourceManager rm = new ResourceManager(
ResourceManager rm = new(
"SystemTrayMenu.Resources.lang",
typeof(Menu).Assembly);
return rm.GetString(id, culture);