Compare commits

..

No commits in common. "master" and "v1.0.19.0" have entirely different histories.

268 changed files with 14402 additions and 57991 deletions

View file

@ -1,79 +0,0 @@
[*.cs]
# WFAC010: Unsupported high DPI configuration
dotnet_diagnostic.WFAC010.severity = silent
csharp_indent_labels = one_less_than_current
csharp_using_directive_placement = outside_namespace:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_prefer_braces = true:silent
csharp_style_namespace_declarations = block_scoped:silent
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
dotnet_diagnostic.SX1101.severity = warning
dotnet_diagnostic.SA1101.severity = silent
[*.{cs,vb}]
#### Naming styles ####
# Naming rules
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
# Symbol specifications
dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =
# Naming styles
dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
indent_size = 4
end_of_line = crlf
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion

View file

@ -4,11 +4,9 @@
namespace SystemTrayMenu
{
using System;
using System.Threading;
using System.Windows.Forms;
using Microsoft.Win32;
using SystemTrayMenu.Business;
using SystemTrayMenu.Helper.Updater;
using SystemTrayMenu.UserInterface;
using SystemTrayMenu.Utilities;
@ -17,98 +15,32 @@ namespace SystemTrayMenu
/// </summary>
internal class App : IDisposable
{
private readonly AppNotifyIcon menuNotifyIcon = new();
private readonly Menus menus = new();
private readonly TaskbarForm taskbarForm = null;
private readonly AppNotifyIcon menuNotifyIcon = new AppNotifyIcon();
private readonly Menus menus = new Menus();
public App()
{
AppRestart.BeforeRestarting += Dispose;
SystemEvents.DisplaySettingsChanged += SystemEvents_DisplaySettingsChanged;
SystemEvents.DisplaySettingsChanged += AppRestart.ByDisplaySettings;
menus.LoadStarted += menuNotifyIcon.LoadingStart;
menus.LoadStopped += menuNotifyIcon.LoadingStop;
menuNotifyIcon.Exit += Application.Exit;
menuNotifyIcon.Restart += AppRestart.ByMenuNotifyIcon;
menuNotifyIcon.Click += MenuNotifyIcon_Click;
void MenuNotifyIcon_Click()
{
menus.SwitchOpenClose(true);
}
menuNotifyIcon.OpenLog += Log.OpenLogFile;
menus.MainPreload();
if (Properties.Settings.Default.ShowInTaskbar)
{
taskbarForm = new TaskbarForm();
taskbarForm.FormClosed += TaskbarForm_FormClosed;
taskbarForm.Deactivate += SetStateNormal;
taskbarForm.Resize += SetStateNormal;
taskbarForm.Activated += TasbkarItemActivated;
}
DllImports.NativeMethods.User32ShowInactiveTopmost(taskbarForm);
if (Properties.Settings.Default.CheckForUpdates)
{
new Thread((obj) => GitHubUpdate.ActivateNewVersionFormOrCheckForUpdates(
showWhenUpToDate: false))
.Start();
}
}
public void Dispose()
{
if (taskbarForm?.InvokeRequired == true)
{
taskbarForm.Invoke(Dispose);
}
else
{
AppRestart.BeforeRestarting -= Dispose;
SystemEvents.DisplaySettingsChanged -= SystemEvents_DisplaySettingsChanged;
menus.LoadStarted -= menuNotifyIcon.LoadingStart;
menus.LoadStopped -= menuNotifyIcon.LoadingStop;
menus.Dispose();
menuNotifyIcon.Click -= MenuNotifyIcon_Click;
menuNotifyIcon.OpenLog -= Log.OpenLogFile;
menuNotifyIcon.Dispose();
if (taskbarForm != null)
{
taskbarForm.FormClosed -= TaskbarForm_FormClosed;
taskbarForm.Deactivate -= SetStateNormal;
taskbarForm.Resize -= SetStateNormal;
taskbarForm.Activated -= TasbkarItemActivated;
taskbarForm.Dispose();
}
}
}
private void SystemEvents_DisplaySettingsChanged(object sender, EventArgs e)
{
menus.ReAdjustSizeAndLocation();
}
private void MenuNotifyIcon_Click()
{
menus.SwitchOpenClose(true);
}
private void TaskbarForm_FormClosed(object sender, FormClosedEventArgs e)
{
Application.Exit();
}
/// <summary>
/// This ensures that next click on taskbaritem works as activate event/click event.
/// </summary>
private void SetStateNormal(object sender, EventArgs e)
{
if (Form.ActiveForm == taskbarForm)
{
taskbarForm.WindowState = FormWindowState.Normal;
}
}
private void TasbkarItemActivated(object sender, EventArgs e)
{
SetStateNormal(sender, e);
taskbarForm.Activate();
taskbarForm.Focus();
menus.SwitchOpenCloseByTaskbarItem();
SystemEvents.DisplaySettingsChanged -= AppRestart.ByDisplaySettings;
menus.Dispose();
menuNotifyIcon.Dispose();
}
}
}

View file

@ -17,7 +17,7 @@ namespace SystemTrayMenu.Handler
internal class KeyboardInput : IDisposable
{
private readonly Menu[] menus;
private readonly KeyboardHook hook = new();
private readonly KeyboardHook hook = new KeyboardHook();
private int iRowKey = -1;
private int iMenuKey;
@ -27,27 +27,26 @@ namespace SystemTrayMenu.Handler
this.menus = menus;
}
public event Action HotKeyPressed;
internal event EventHandlerEmpty HotKeyPressed;
public event Action ClosePressed;
internal event EventHandlerEmpty ClosePressed;
public event Action<DataGridView, int> RowSelected;
internal event Action<DataGridView, int> RowSelected;
public event Action<DataGridView, int> RowDeselected;
internal event Action<int, DataGridView> RowDeselected;
public event Action<DataGridView, int> EnterPressed;
internal event Action<DataGridView, int> EnterPressed;
public event Action Cleared;
internal event EventHandlerEmpty Cleared;
public bool InUse { get; set; }
internal bool InUse { get; set; }
public void Dispose()
{
hook.KeyPressed -= Hook_KeyPressed;
hook.Dispose();
}
public void RegisterHotKey()
internal void RegisterHotKey()
{
if (!string.IsNullOrEmpty(Properties.Settings.Default.HotKey))
{
@ -55,6 +54,10 @@ namespace SystemTrayMenu.Handler
{
hook.RegisterHotKey();
hook.KeyPressed += Hook_KeyPressed;
void Hook_KeyPressed(object sender, KeyPressedEventArgs e)
{
HotKeyPressed?.Invoke();
}
}
catch (InvalidOperationException ex)
{
@ -65,38 +68,27 @@ namespace SystemTrayMenu.Handler
}
}
public void ResetSelectedByKey()
internal void ResetSelectedByKey()
{
iRowKey = -1;
iMenuKey = 0;
}
public void CmdKeyProcessed(object sender, Keys keys)
internal void CmdKeyProcessed(object sender, Keys keys)
{
sender ??= menus[iMenuKey];
switch (keys)
{
case Keys.Enter:
SelectByKey(keys);
menus[iMenuKey]?.FocusTextBox();
break;
case Keys.Left:
SelectByKey(keys);
break;
case Keys.Right:
SelectByKey(keys);
break;
case Keys.Home:
case Keys.End:
case Keys.Up:
case Keys.Down:
case Keys.Left:
case Keys.Right:
case Keys.Escape:
case Keys.Alt | Keys.F4:
SelectByKey(keys);
break;
case Keys.Control | Keys.F:
menus[iMenuKey]?.FocusTextBox();
Menu menu = menus[iMenuKey];
menu.FocusTextBox();
break;
case Keys.Tab:
{
@ -113,7 +105,7 @@ namespace SystemTrayMenu.Handler
indexNew = indexMax;
}
menus[indexNew]?.FocusTextBox();
menus[indexNew].FocusTextBox();
}
break;
@ -132,21 +124,21 @@ namespace SystemTrayMenu.Handler
indexNew = 0;
}
menus[indexNew]?.FocusTextBox();
menus[indexNew].FocusTextBox();
}
break;
case Keys.Apps:
{
DataGridView dgv = menus[iMenuKey]?.GetDataGridView();
DataGridView dgv = menus[iMenuKey].GetDataGridView();
if (iRowKey > -1 &&
dgv.Rows.Count > iRowKey)
{
Point point = dgv.GetCellDisplayRectangle(2, iRowKey, false).Location;
Point pt = 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);
MouseEventArgs mea = new MouseEventArgs(MouseButtons.Right, 1, pt.X, pt.Y, 0);
trigger.MouseDown(dgv, mea, out bool toCloseByDoubleClick);
}
}
@ -172,30 +164,47 @@ namespace SystemTrayMenu.Handler
}
}
public void SearchTextChanging()
/// <summary>
/// While menu is open user presses a key to search for specific entries.
/// </summary>
/// <param name="sender">not used.</param>
/// <param name="e">Key data of the pressed key.</param>
internal void KeyPress(object sender, KeyPressEventArgs e)
{
if (char.IsLetterOrDigit(e.KeyChar) ||
char.IsPunctuation(e.KeyChar) ||
char.IsWhiteSpace(e.KeyChar) ||
char.IsSeparator(e.KeyChar))
{
string letter = e.KeyChar.ToString(CultureInfo.InvariantCulture);
Menu menu = menus[iMenuKey];
menu.KeyPressedSearch(letter);
e.Handled = true;
}
}
internal void SearchTextChanging()
{
ClearIsSelectedByKey();
}
public void SearchTextChanged(Menu menu, bool isSearchStringEmpty)
internal void SearchTextChanged(Menu menu)
{
DataGridView dgv = menu.GetDataGridView();
if (isSearchStringEmpty)
{
ClearIsSelectedByKey();
}
else if (dgv.Rows.Count > 0)
if (dgv.Rows.Count > 0)
{
Select(dgv, 0, true);
}
}
public void ClearIsSelectedByKey()
internal void ClearIsSelectedByKey()
{
ClearIsSelectedByKey(iMenuKey, iRowKey);
}
public void Select(DataGridView dgv, int i, bool refreshview)
internal void Select(DataGridView dgv, int i, bool refreshview)
{
int newiMenuKey = ((Menu)dgv.TopLevelControl).Level;
if (i != iRowKey || newiMenuKey != iMenuKey)
@ -210,11 +219,7 @@ namespace SystemTrayMenu.Handler
{
DataGridViewRow row = dgv.Rows[i];
RowData rowData = (RowData)row.Cells[2].Value;
if (rowData != null)
{
rowData.IsSelected = true;
}
rowData.IsSelected = true;
if (refreshview)
{
row.Selected = false;
@ -223,11 +228,6 @@ namespace SystemTrayMenu.Handler
}
}
private void Hook_KeyPressed(object sender, KeyPressedEventArgs e)
{
HotKeyPressed?.Invoke();
}
private bool IsAnyMenuSelectedByKey(
ref DataGridView dgv,
ref Menu menuFromSelected,
@ -291,29 +291,27 @@ namespace SystemTrayMenu.Handler
switch (keys)
{
case Keys.Enter:
if (iRowKey > -1 && dgv.Rows.Count > iRowKey)
if (iRowKey > -1 &&
dgv.Rows.Count > iRowKey)
{
RowData trigger = (RowData)dgv.Rows[iRowKey].Cells[2].Value;
if (trigger.IsMenuOpen || !trigger.ContainsMenu)
{
trigger.MouseClick(null, out bool toCloseByMouseClick);
trigger.MouseDown(
dgv,
null,
out bool toCloseByMouseDown);
trigger.DoubleClick(
new MouseEventArgs(MouseButtons.Left, 0, 0, 0, 0),
out bool toCloseByDoubleClick);
if (toCloseByMouseClick || toCloseByDoubleClick)
if (toCloseByMouseDown || toCloseByDoubleClick)
{
ClosePressed?.Invoke();
}
if (iRowKey > -1 && dgv.Rows.Count > iRowKey)
{
// Raise Dgv_RowPostPaint to show ProcessStarted
dgv.InvalidateRow(iRowKey);
}
}
else
{
RowDeselected(dgvBefore, iRowBefore);
RowDeselected(iRowBefore, dgvBefore);
SelectRow(dgv, iRowKey);
EnterPressed.Invoke(dgv, iRowKey);
}
@ -324,7 +322,7 @@ namespace SystemTrayMenu.Handler
if (SelectMatchedReverse(dgv, iRowKey) ||
SelectMatchedReverse(dgv, dgv.Rows.Count - 1))
{
RowDeselected(dgvBefore, iRowBefore);
RowDeselected(iRowBefore, dgvBefore);
SelectRow(dgv, iRowKey);
toClear = true;
}
@ -334,59 +332,82 @@ namespace SystemTrayMenu.Handler
if (SelectMatched(dgv, iRowKey) ||
SelectMatched(dgv, 0))
{
RowDeselected(dgvBefore, iRowBefore);
SelectRow(dgv, iRowKey);
toClear = true;
}
break;
case Keys.Home:
if (SelectMatched(dgv, 0))
{
RowDeselected(dgvBefore, iRowBefore);
SelectRow(dgv, iRowKey);
toClear = true;
}
break;
case Keys.End:
if (SelectMatchedReverse(dgv, dgv.Rows.Count - 1))
{
RowDeselected(dgvBefore, iRowBefore);
RowDeselected(iRowBefore, dgvBefore);
SelectRow(dgv, iRowKey);
toClear = true;
}
break;
case Keys.Left:
bool nextMenuLocationIsLeft = menus[iMenuKey + 1] != null && menus[iMenuKey + 1].Location.X < menus[iMenuKey].Location.X;
bool previousMenuLocationIsRight = iMenuKey > 0 && menus[iMenuKey]?.Location.X < menus[iMenuKey - 1]?.Location.X;
if (nextMenuLocationIsLeft || previousMenuLocationIsRight)
int iMenuKeyNext = iMenuKey + 1;
if (isStillSelected)
{
SelectNextMenu(iRowBefore, ref dgv, dgvBefore, menuFromSelected, isStillSelected, ref toClear);
if (menuFromSelected != null &&
menuFromSelected == menus[iMenuKeyNext])
{
dgv = menuFromSelected.GetDataGridView();
if (dgv.Rows.Count > 0)
{
iMenuKey += 1;
iRowKey = -1;
if (SelectMatched(dgv, iRowKey) ||
SelectMatched(dgv, 0))
{
RowDeselected(iRowBefore, dgvBefore);
SelectRow(dgv, iRowKey);
toClear = true;
}
}
}
}
else if (iMenuKey > 0)
else
{
SelectPreviousMenu(iRowBefore, ref menu, ref dgv, dgvBefore, ref toClear);
iRowKey = -1;
iMenuKey = menus.Where(m => m != null).Count() - 1;
if (menus[iMenuKey] != null)
{
dgv = menus[iMenuKey].GetDataGridView();
if (SelectMatched(dgv, iRowKey) ||
SelectMatched(dgv, 0))
{
RowDeselected(iRowBefore, dgvBefore);
SelectRow(dgv, iRowKey);
toClear = true;
}
}
}
break;
case Keys.Right:
bool nextMenuLocationIsRight = menus[iMenuKey + 1]?.Location.X > menus[iMenuKey]?.Location.X;
bool previousMenuLocationIsLeft = iMenuKey > 0 && menus[iMenuKey]?.Location.X > menus[iMenuKey - 1]?.Location.X;
if (nextMenuLocationIsRight || previousMenuLocationIsLeft)
if (iMenuKey > 0)
{
SelectNextMenu(iRowBefore, ref dgv, dgvBefore, menuFromSelected, isStillSelected, ref toClear);
if (menus[iMenuKey - 1] != null)
{
iMenuKey -= 1;
iRowKey = -1;
menu = menus[iMenuKey];
dgv = menu.GetDataGridView();
if (SelectMatched(dgv, dgv.SelectedRows[0].Index) ||
SelectMatched(dgv, 0))
{
RowDeselected(iRowBefore, dgvBefore);
SelectRow(dgv, iRowKey);
toClear = true;
}
}
}
else if (iMenuKey > 0)
else
{
SelectPreviousMenu(iRowBefore, ref menu, ref dgv, dgvBefore, ref toClear);
RowDeselected(iRowBefore, dgvBefore);
iMenuKey = 0;
iRowKey = -1;
toClear = true;
Cleared?.Invoke();
}
break;
case Keys.Escape:
case Keys.Alt | Keys.F4:
RowDeselected(dgvBefore, iRowBefore);
RowDeselected(iRowBefore, dgvBefore);
iMenuKey = 0;
iRowKey = -1;
toClear = true;
@ -398,7 +419,7 @@ namespace SystemTrayMenu.Handler
if (SelectMatched(dgv, iRowKey, keyInput) ||
SelectMatched(dgv, 0, keyInput))
{
RowDeselected(null, iRowBefore);
RowDeselected(iRowBefore, null);
SelectRow(dgv, iRowKey);
toClear = true;
}
@ -408,7 +429,7 @@ namespace SystemTrayMenu.Handler
if (SelectMatched(dgv, iRowKey, keyInput) ||
SelectMatched(dgv, 0, keyInput))
{
RowDeselected(null, iRowBefore);
RowDeselected(iRowBefore, null);
SelectRow(dgv, iRowKey);
}
else
@ -427,77 +448,6 @@ namespace SystemTrayMenu.Handler
}
}
private void SelectPreviousMenu(int iRowBefore, ref Menu menu, ref DataGridView dgv, DataGridView dgvBefore, ref bool toClear)
{
if (iMenuKey > 0)
{
if (menus[iMenuKey - 1] != null)
{
iMenuKey -= 1;
iRowKey = -1;
menu = menus[iMenuKey];
dgv = menu.GetDataGridView();
if ((dgv.SelectedRows.Count > 0 &&
SelectMatched(dgv, dgv.SelectedRows[0].Index)) ||
SelectMatched(dgv, 0))
{
RowDeselected(dgvBefore, iRowBefore);
SelectRow(dgv, iRowKey);
toClear = true;
}
}
}
else
{
RowDeselected(dgvBefore, iRowBefore);
iMenuKey = 0;
iRowKey = -1;
toClear = true;
Cleared?.Invoke();
}
}
private void SelectNextMenu(int iRowBefore, ref DataGridView dgv, DataGridView dgvBefore, Menu menuFromSelected, bool isStillSelected, ref bool toClear)
{
int iMenuKeyNext = iMenuKey + 1;
if (isStillSelected)
{
if (menuFromSelected != null &&
menuFromSelected == menus[iMenuKeyNext])
{
dgv = menuFromSelected.GetDataGridView();
if (dgv.Rows.Count > 0)
{
iMenuKey += 1;
iRowKey = -1;
if (SelectMatched(dgv, iRowKey) ||
SelectMatched(dgv, 0))
{
RowDeselected(dgvBefore, iRowBefore);
SelectRow(dgv, iRowKey);
toClear = true;
}
}
}
}
else
{
iRowKey = -1;
iMenuKey = menus.Where(m => m != null).Count() - 1;
if (menus[iMenuKey] != null)
{
dgv = menus[iMenuKey].GetDataGridView();
if (SelectMatched(dgv, iRowKey) ||
SelectMatched(dgv, 0))
{
RowDeselected(dgvBefore, iRowBefore);
SelectRow(dgv, iRowKey);
toClear = true;
}
}
}
}
private void SelectRow(DataGridView dgv, int iRowKey)
{
InUse = true;
@ -578,13 +528,9 @@ namespace SystemTrayMenu.Handler
if (dgv.Rows.Count > rowIndex)
{
DataGridViewRow row = dgv.Rows[rowIndex];
row.Selected = false;
RowData rowData = (RowData)row.Cells[2].Value;
if (rowData != null)
{
rowData.IsSelected = false;
rowData.IsClicking = false;
}
rowData.IsSelected = false;
row.Selected = false;
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,269 +0,0 @@
// <copyright file="MenusHelpers.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace SystemTrayMenu.Business
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Linq;
using SystemTrayMenu.DataClasses;
using SystemTrayMenu.Helper;
using SystemTrayMenu.Utilities;
internal static class MenusHelpers
{
internal static void GetItemsForMainMenu(BackgroundWorker worker, string path, ref MenuData menuData)
{
menuData.IsNetworkRoot = FileLnk.IsNetworkRoot(path);
if (menuData.IsNetworkRoot)
{
GetNetworkRootDirectories(path, ref menuData);
}
else
{
GetDirectories(worker, path, ref menuData);
GetFiles(worker, path, ref menuData);
}
}
internal static void GetAddionalItemsForMainMenu(ref MenuData menuData)
{
if (menuData.Level != 0)
{
return;
}
foreach (var path in GetAddionalPathsForMainMenu())
{
GetDirectoriesAndFilesRecursive(ref menuData, path.Path, path.OnlyFiles, path.Recursive);
}
}
internal static IEnumerable<(string Path, bool Recursive, bool OnlyFiles)> GetAddionalPathsForMainMenu()
{
foreach (string pathAndRecursivString in Properties.Settings.Default.PathsAddToMainMenu.Split(@"|"))
{
if (string.IsNullOrEmpty(pathAndRecursivString))
{
continue;
}
string pathAddForMainMenu = pathAndRecursivString.Split("recursiv:")[0].Trim();
bool recursive = pathAndRecursivString.Split("recursiv:")[1].StartsWith("True");
bool onlyFiles = pathAndRecursivString.Split("onlyFiles:")[1].StartsWith("True");
yield return (Path: pathAddForMainMenu, Recursive: recursive, OnlyFiles: onlyFiles);
}
}
internal static void ReadHiddenAndReadIcons(BackgroundWorker worker, ref MenuData menuData)
{
List<RowData> rowDatasToRemove = new();
foreach (RowData rowData in menuData.RowDatas)
{
if (worker?.CancellationPending == true)
{
return;
}
if (!menuData.IsNetworkRoot && FolderOptions.IsHidden(rowData))
{
rowDatasToRemove.Add(rowData);
continue;
}
rowData.ReadIcon(true);
}
menuData.RowDatas = menuData.RowDatas.Except(rowDatasToRemove).ToList();
}
internal static void CheckIfValid(ref MenuData menuData)
{
if (menuData.Validity == MenuDataValidity.Undefined)
{
if (menuData.RowDatas.Count == 0)
{
menuData.Validity = MenuDataValidity.Empty;
}
else
{
menuData.Validity = MenuDataValidity.Valid;
}
}
}
internal static void SortItemsWhenValid(ref MenuData menuData)
{
if (menuData.Validity != MenuDataValidity.Valid)
{
return;
}
menuData.RowDatas = SortItems(menuData.RowDatas);
}
internal static List<RowData> SortItems(List<RowData> rowDatas)
{
if (Properties.Settings.Default.SortByTypeAndNameWindowsExplorerSort)
{
rowDatas = rowDatas.OrderByDescending(x => x.IsFolder)
.ThenBy(x => x.Text, new WindowsExplorerSort()).ToList();
}
else if (Properties.Settings.Default.SortByTypeAndDate)
{
rowDatas = rowDatas.OrderByDescending(x => x.IsFolder)
.ThenByDescending(x => x.FileInfo.LastWriteTime).ToList();
}
else if (Properties.Settings.Default.SortByFileExtensionAndName)
{
rowDatas = rowDatas.OrderBy(x => x.FileExtension).ThenBy(x => x.Text).ToList();
}
else if (Properties.Settings.Default.SortByName)
{
rowDatas = rowDatas.OrderBy(x => x.Text).ToList();
}
else if (Properties.Settings.Default.SortByDate)
{
rowDatas = rowDatas.OrderByDescending(x => x.FileInfo.LastWriteTime).ToList();
}
return rowDatas;
}
private static void GetNetworkRootDirectories(string path, ref MenuData menuData)
{
Process cmd = new();
cmd.StartInfo.FileName = "cmd.exe";
cmd.StartInfo.RedirectStandardInput = true;
cmd.StartInfo.RedirectStandardOutput = true;
cmd.StartInfo.CreateNoWindow = true;
cmd.StartInfo.UseShellExecute = false;
cmd.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
try
{
bool resolvedSomething = false;
cmd.Start();
cmd.StandardInput.WriteLine($"net view {path}");
cmd.StandardInput.Flush();
cmd.StandardInput.Close();
string output = cmd.StandardOutput.ReadToEnd();
cmd.WaitForExit();
cmd.Close();
List<string> lines = output
.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries).ToList();
if (lines.Count > 8)
{
foreach (string line in lines.Skip(6).SkipLast(2))
{
int indexOfFirstSpace = line.IndexOf(" ", StringComparison.InvariantCulture);
if (indexOfFirstSpace > 0)
{
string directory = Path.Combine(path, line[..indexOfFirstSpace]);
menuData.RowDatas.Add(new RowData(true, false, true, menuData.Level, directory));
resolvedSomething = true;
}
}
}
if (!resolvedSomething)
{
Log.Info($"Could not resolve network root folder: {path} , output:{output}");
}
}
catch (Exception ex)
{
Log.Warn($"path:'{path}'", ex);
if (ex is UnauthorizedAccessException)
{
menuData.Validity = MenuDataValidity.NoAccess;
}
}
}
private static void GetDirectories(BackgroundWorker worker, string path, ref MenuData menuData)
{
try
{
foreach (var directory in Directory.GetDirectories(path))
{
if (worker?.CancellationPending == true)
{
return;
}
menuData.RowDatas.Add(new RowData(true, false, false, menuData.Level, directory));
}
}
catch (Exception ex)
{
Log.Warn($"path:'{path}'", ex);
if (ex is UnauthorizedAccessException)
{
menuData.Validity = MenuDataValidity.NoAccess;
}
}
}
private static void GetFiles(BackgroundWorker worker, string path, ref MenuData menuData)
{
try
{
foreach (string file in DirectoryBySearchPattern.GetFiles(path, Config.SearchPattern))
{
if (worker?.CancellationPending == true)
{
return;
}
menuData.RowDatas.Add(new RowData(false, false, false, menuData.Level, file));
}
}
catch (Exception ex)
{
Log.Warn($"path:'{path}'", ex);
if (ex is UnauthorizedAccessException)
{
menuData.Validity = MenuDataValidity.NoAccess;
}
}
}
private static void GetDirectoriesAndFilesRecursive(
ref MenuData menuData,
string path,
bool onlyFiles,
bool recursiv)
{
try
{
foreach (string file in DirectoryBySearchPattern.GetFiles(path, Config.SearchPattern))
{
menuData.RowDatas.Add(new RowData(false, true, false, menuData.Level, file));
}
foreach (string directory in Directory.GetDirectories(path))
{
if (!onlyFiles)
{
menuData.RowDatas.Add(new RowData(true, true, false, menuData.Level, directory));
}
if (recursiv)
{
GetDirectoriesAndFilesRecursive(ref menuData, directory, onlyFiles, recursiv);
}
}
}
catch (Exception ex)
{
Log.Warn($"GetDirectoriesAndFilesRecursive path:'{path}'", ex);
}
}
}
}

View file

@ -6,6 +6,7 @@ namespace SystemTrayMenu
{
using System;
using System.Reflection;
using System.Threading;
using System.Windows.Forms;
using SystemTrayMenu.Utilities;
@ -19,17 +20,20 @@ namespace SystemTrayMenu
try
{
Log.Initialize();
SingleAppInstance.Initialize();
Translator.Initialize();
Config.SetFolderByWindowsContextMenu(args);
Config.LoadOrSetByUser();
Config.Initialize();
PrivilegeChecker.Initialize();
if (SingleAppInstance.Initialize())
Config.SetFolderByWindowsContextMenu(args);
if (Config.LoadOrSetByUser())
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.ThreadException += Application_ThreadException;
Application.ThreadException += ThreadException;
static void ThreadException(object s, ThreadExceptionEventArgs t)
{
AskUserSendError(t.Exception);
}
Scaling.Initialize();
FolderOptions.Initialize();
@ -41,7 +45,6 @@ namespace SystemTrayMenu
}
}
Application.ThreadException -= Application_ThreadException;
Config.Dispose();
}
catch (Exception ex)
@ -52,37 +55,28 @@ namespace SystemTrayMenu
{
Log.Close();
}
}
private static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
{
AskUserSendError(e.Exception);
}
private static void AskUserSendError(Exception ex)
{
Log.Error("Application Crashed", ex);
DialogResult dialogResult = MessageBox.Show(
"A problem has been encountered and the application needs to restart. " +
"Reporting this error will help us make our product better. " +
"Press 'Yes' to open your standard email app (emailto: Markus@Hofknecht.eu). " + Environment.NewLine +
@"You can also create an issue manually here https://github.com/Hofknecht/SystemTrayMenu/issues" + Environment.NewLine +
"Press 'Cancel' to quit SystemTrayMenu.",
"SystemTrayMenu Crashed",
MessageBoxButtons.YesNoCancel);
if (dialogResult == DialogResult.Yes)
static void AskUserSendError(Exception ex)
{
Log.ProcessStart("mailto:" + "markus@hofknecht.eu" +
"?subject=SystemTrayMenu Bug reported " +
Assembly.GetEntryAssembly().GetName().Version +
"&body=" + ex.ToString());
}
Log.Error("Application Crashed", ex);
if (!isStartup && dialogResult != DialogResult.Cancel)
{
AppRestart.ByThreadException();
if (MessageBox.Show(
"A problem has been encountered and the application needs to restart. " +
"Reporting this error will help us make our product better. " +
"Press yes to open your standard email app.",
"SystemTrayMenu BugSplat",
MessageBoxButtons.YesNo) == DialogResult.Yes)
{
Log.ProcessStart("mailto:" + "markus@hofknecht.eu" +
"?subject=SystemTrayMenu Bug reported " +
Assembly.GetEntryAssembly().GetName().Version +
"&body=" + ex.ToString());
}
if (!isStartup)
{
AppRestart.ByThreadException();
}
}
}
}

View file

@ -10,7 +10,7 @@ namespace SystemTrayMenu.Handler
internal class WaitLeave : IDisposable
{
private readonly Timer timerLeaveCheck = new();
private readonly Timer timerLeaveCheck = new Timer();
public WaitLeave(int timeUntilTriggered)
{
@ -18,11 +18,10 @@ namespace SystemTrayMenu.Handler
timerLeaveCheck.Tick += TimerLeaveCheckTick;
}
public event Action LeaveTriggered;
public event EventHandlerEmpty LeaveTriggered;
public void Dispose()
{
timerLeaveCheck.Tick -= TimerLeaveCheckTick;
timerLeaveCheck.Dispose();
}

View file

@ -13,7 +13,7 @@ namespace SystemTrayMenu.Handler
internal class WaitToLoadMenu : IDisposable
{
private readonly Timer timerStartLoad = new();
private readonly Timer timerStartLoad = new Timer();
private DataGridView dgv;
private int rowIndex;
private DataGridView dgvTmp;
@ -33,7 +33,7 @@ namespace SystemTrayMenu.Handler
internal event Action<int> CloseMenu;
internal event Action StopLoadMenu;
internal event EventHandlerEmpty StopLoadMenu;
internal event Action<DataGridView, int> MouseEnterOk;
@ -41,7 +41,6 @@ namespace SystemTrayMenu.Handler
public void Dispose()
{
timerStartLoad.Tick -= WaitStartLoad_Tick;
timerStartLoad.Stop();
timerStartLoad.Dispose();
dgv?.Dispose();
@ -93,7 +92,7 @@ namespace SystemTrayMenu.Handler
}
}
internal void RowDeselected(DataGridView dgv, int rowIndex)
internal void RowDeselected(int rowIndex, DataGridView dgv)
{
timerStartLoad.Stop();
StopLoadMenu?.Invoke();
@ -130,7 +129,7 @@ namespace SystemTrayMenu.Handler
{
if (!MouseActive)
{
if (mouseMoveEvents > 6)
if (mouseMoveEvents > 3)
{
MouseActive = true;
if (dgvTmp != null && !dgvTmp.IsDisposed)
@ -169,17 +168,17 @@ namespace SystemTrayMenu.Handler
{
RowData rowData = (RowData)dgv.Rows[rowIndex].Cells[2].Value;
Menu menu = (Menu)dgv.FindForm();
rowData.Level = menu.Level;
rowData.MenuLevel = menu.Level;
if (rowData.ContainsMenu)
{
CloseMenu.Invoke(rowData.Level + 2);
CloseMenu.Invoke(rowData.MenuLevel + 2);
}
CloseMenu.Invoke(rowData.Level + 1);
CloseMenu.Invoke(rowData.MenuLevel + 1);
if (!rowData.IsContextMenuOpen &&
rowData.ContainsMenu &&
rowData.Level + 1 < MenuDefines.MenusMax)
rowData.MenuLevel + 1 < MenuDefines.MenusMax)
{
StartLoadMenu.Invoke(rowData);
}
@ -192,11 +191,7 @@ namespace SystemTrayMenu.Handler
this.dgv = dgv;
this.rowIndex = rowIndex;
RowData rowData = (RowData)dgv.Rows[rowIndex].Cells[2].Value;
if (rowData != null)
{
rowData.IsSelected = true;
}
rowData.IsSelected = true;
dgv.Rows[rowIndex].Selected = false;
dgv.Rows[rowIndex].Selected = true;
}
@ -209,7 +204,6 @@ namespace SystemTrayMenu.Handler
if (rowData != null)
{
rowData.IsSelected = false;
rowData.IsClicking = false;
dgv.Rows[rowIndex].Selected = false;
this.dgv = null;
this.rowIndex = 0;

View file

@ -64,6 +64,14 @@ namespace SystemTrayMenu
public static Color DarkModeOpenFolderBorder { get; set; }
public static Color Warning { get; set; }
public static Color DarkModeWarning { get; set; }
public static Color Title { get; set; }
public static Color DarkModeTitle { get; set; }
public static Color Background { get; set; }
public static Color DarkModeBackground { get; set; }
@ -80,14 +88,14 @@ namespace SystemTrayMenu
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 Bitmap BitmapFoldersCount { get; set; }
public static Bitmap BitmapFilesCount { get; set; }
public static Color Icons { get; set; }
public static Color DarkModeIcons { get; set; }

View file

@ -5,6 +5,8 @@
namespace SystemTrayMenu
{
using System;
using System.Configuration;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Text;
@ -14,53 +16,24 @@ namespace SystemTrayMenu
using SystemTrayMenu.Properties;
using SystemTrayMenu.UserInterface.FolderBrowseDialog;
using SystemTrayMenu.Utilities;
using static SystemTrayMenu.Utilities.IconReader;
public static class Config
{
private static readonly Icon SystemTrayMenu = new Icon(Properties.Resources.SystemTrayMenu, SystemInformation.SmallIconSize);
private static readonly Icon IconRootFolder = GetIconSTA(Path, Path, false, IconSize.Small, true);
private static bool readDarkModeDone;
private static bool isDarkMode;
private static bool readHideFileExtdone;
private static bool isHideFileExtension;
public static bool IsHideFileExtdone => IsHideFileExtension();
public static string Path => Settings.Default.PathDirectory;
public static string SearchPattern => Settings.Default.SearchPattern;
public static bool ShowDirectoryTitleAtTop => Settings.Default.ShowDirectoryTitleAtTop;
public static bool ShowSearchBar => Settings.Default.ShowSearchBar;
public static bool ShowCountOfElementsBelow => Settings.Default.ShowCountOfElementsBelow;
public static bool ShowFunctionKeyOpenFolder => Settings.Default.ShowFunctionKeyOpenFolder;
public static bool ShowFunctionKeyPinMenu => Settings.Default.ShowFunctionKeyPinMenu;
public static bool ShowFunctionKeySettings => Settings.Default.ShowFunctionKeySettings;
public static bool ShowFunctionKeyRestart => Settings.Default.ShowFunctionKeyRestart;
public static bool AlwaysOpenByPin { get; internal set; }
public static void Initialize()
{
UpgradeIfNotUpgraded();
InitializeColors();
if (string.IsNullOrEmpty(Settings.Default.PathIcoDirectory))
{
Settings.Default.PathIcoDirectory = System.IO.Path.Combine(
System.IO.Path.Combine(
Environment.GetFolderPath(
Environment.SpecialFolder.ApplicationData), $"SystemTrayMenu"), "ico");
if (!Directory.Exists(Settings.Default.PathIcoDirectory))
{
Directory.CreateDirectory(Settings.Default.PathIcoDirectory);
}
}
}
public static void Dispose()
@ -68,26 +41,14 @@ namespace SystemTrayMenu
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)
{
return IconRootFolder;
}
else
{
return SystemTrayMenu;
}
AppColors.BitmapFoldersCount.Dispose();
AppColors.BitmapFilesCount.Dispose();
}
public static void SetFolderByWindowsContextMenu(string[] args)
{
if (args != null && args.Length > 0 && args[0] != "-r")
if (args != null && args.Length > 0)
{
string path = args[0];
Log.Info($"SetFolderByWindowsContextMenu() path: {path}");
@ -96,55 +57,88 @@ namespace SystemTrayMenu
}
}
public static void LoadOrSetByUser()
public static bool LoadOrSetByUser()
{
if (string.IsNullOrEmpty(Path))
bool pathOK = IsPathOK(Path);
if (!pathOK)
{
string textFirstStart = Translator.GetText(
"Read the FAQ and then choose a root directory for SystemTrayMenu.");
string textFirstStart = Translator.GetText("TextFirstStart");
MessageBox.Show(
textFirstStart,
"SystemTrayMenu",
Translator.GetText("SystemTrayMenu"),
MessageBoxButtons.OK);
ShowHelpFAQ();
SetFolderByUser();
pathOK = SetFolderByUser();
}
return pathOK;
}
public static void SetFolderByUser(bool save = true)
public static bool SetFolderByUser(bool save = true)
{
using FolderDialog dialog = new();
dialog.InitialFolder = Path;
if (dialog.ShowDialog() == DialogResult.OK)
bool pathOK = false;
bool userAborted = false;
using (FolderDialog dialog = new FolderDialog())
{
Settings.Default.PathDirectory = dialog.Folder;
if (save)
dialog.InitialFolder = Path;
do
{
Settings.Default.Save();
if (dialog.ShowDialog() == DialogResult.OK)
{
if (IsPathOK(dialog.Folder))
{
pathOK = true;
Settings.Default.PathDirectory =
dialog.Folder;
if (save)
{
Settings.Default.Save();
}
}
}
else
{
userAborted = true;
}
}
while (!pathOK && !userAborted);
}
return pathOK;
}
public static void SetFolderIcoByUser()
private static bool IsPathOK(string path)
{
using FolderDialog dialog = new();
dialog.InitialFolder = Settings.Default.PathIcoDirectory;
bool isPathOK = false;
if (dialog.ShowDialog() == DialogResult.OK)
bool folderContainsFiles = false;
try
{
Settings.Default.PathIcoDirectory = dialog.Folder;
folderContainsFiles = Directory.GetFiles(path).Length > 0;
}
catch (UnauthorizedAccessException ex)
{
Log.Warn($"path:'{path}'", ex);
}
catch (IOException ex)
{
Log.Warn($"path:'{path}'", ex);
}
isPathOK = FileLnk.IsNetworkPath(path) ||
(Directory.Exists(path) && folderContainsFiles);
return isPathOK;
}
internal static void ShowHelpFAQ()
{
Log.ProcessStart("https://github.com/Hofknecht/SystemTrayMenu#FAQ");
}
internal static void ShowSupportSystemTrayMenu()
{
Log.ProcessStart("https://github.com/Hofknecht/SystemTrayMenu#donations");
if (FileUrl.GetDefaultBrowserPath(out string browserPath))
{
Process.Start(browserPath, "https://github.com/Hofknecht/SystemTrayMenu#FAQ");
}
}
/// <summary>
@ -180,7 +174,7 @@ namespace SystemTrayMenu
/// <summary>
/// Read the OS setting whether HideFileExt enabled.
/// </summary>
/// <returns>isHideFileExtension.</returns>
/// <returns>true = Dark mode; false = Light mode.</returns>
internal static bool IsHideFileExtension()
{
if (!readHideFileExtdone)
@ -202,7 +196,7 @@ namespace SystemTrayMenu
internal static void InitializeColors(bool save = true)
{
ColorConverter converter = new();
ColorConverter converter = new ColorConverter();
ColorAndCode colorAndCode = default;
bool changed = false;
@ -254,6 +248,30 @@ namespace SystemTrayMenu
Settings.Default.ColorDarkModeOpenFolderBorder = colorAndCode.HtmlColorCode;
AppColors.DarkModeOpenFolderBorder = colorAndCode.Color;
colorAndCode.HtmlColorCode = Settings.Default.ColorWarning;
colorAndCode.Color = Color.FromArgb(255, 204, 232);
colorAndCode = ProcessColorAndCode(converter, colorAndCode, ref changed);
Settings.Default.ColorWarning = colorAndCode.HtmlColorCode;
AppColors.Warning = colorAndCode.Color;
colorAndCode.HtmlColorCode = Settings.Default.ColorDarkModeWarning;
colorAndCode.Color = Color.FromArgb(75, 24, 52);
colorAndCode = ProcessColorAndCode(converter, colorAndCode, ref changed);
Settings.Default.ColorDarkModeWarning = colorAndCode.HtmlColorCode;
AppColors.DarkModeWarning = colorAndCode.Color;
colorAndCode.HtmlColorCode = Settings.Default.ColorTitle;
colorAndCode.Color = Color.Azure;
colorAndCode = ProcessColorAndCode(converter, colorAndCode, ref changed);
Settings.Default.ColorTitle = colorAndCode.HtmlColorCode;
AppColors.Title = colorAndCode.Color;
colorAndCode.HtmlColorCode = Settings.Default.ColorDarkModeTitle;
colorAndCode.Color = Color.FromArgb(43, 43, 43);
colorAndCode = ProcessColorAndCode(converter, colorAndCode, ref changed);
Settings.Default.ColorDarkModeTitle = colorAndCode.HtmlColorCode;
AppColors.DarkModeTitle = colorAndCode.Color;
colorAndCode.HtmlColorCode = Settings.Default.ColorIcons;
colorAndCode.Color = Color.FromArgb(149, 160, 166);
colorAndCode = ProcessColorAndCode(converter, colorAndCode, ref changed);
@ -276,18 +294,12 @@ namespace SystemTrayMenu
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);
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.BitmapPinActive = ReadSvg(Properties.Resources.ic_fluent_pin_48_filled, htmlColorCodeIcons);
AppColors.BitmapSearch = ReadSvg(Properties.Resources.ic_fluent_search_48_regular, htmlColorCodeIcons);
AppColors.BitmapFoldersCount = ReadSvg(Properties.Resources.ic_fluent_folder_48_regular, htmlColorCodeIcons);
AppColors.BitmapFilesCount = ReadSvg(Properties.Resources.ic_fluent_document_48_regular, htmlColorCodeIcons);
colorAndCode.HtmlColorCode = Settings.Default.ColorSearchField;
colorAndCode.Color = Color.FromArgb(255, 255, 255);
@ -457,10 +469,12 @@ namespace SystemTrayMenu
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();
using (var stream = new MemoryStream(byteArray))
{
var svgDocument = SvgDocument.Open<SvgDocument>(stream);
svgDocument.Color = new SvgColourServer(Color.Black);
return svgDocument.Draw();
}
}
private static bool IsRegistryValueThisValue(string keyName, string valueName, string value)
@ -498,6 +512,8 @@ namespace SystemTrayMenu
private static void UpgradeIfNotUpgraded()
{
var path = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoaming).FilePath;
path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
if (!Settings.Default.IsUpgraded)
{
Settings.Default.Upgrade();

View file

@ -72,6 +72,51 @@ namespace SystemTrayMenu
}
}
public static Color ColorTitleWarning
{
get
{
if (Config.IsDarkMode())
{
return AppColors.DarkModeWarning;
}
else
{
return AppColors.Warning;
}
}
}
public static Color ColorTitleSelected
{
get
{
if (Config.IsDarkMode())
{
return AppColors.DarkModeSelecetedItem;
}
else
{
return AppColors.SelectedItem;
}
}
}
public static Color ColorTitleBackground
{
get
{
if (Config.IsDarkMode())
{
return AppColors.DarkModeTitle;
}
else
{
return AppColors.Title;
}
}
}
public static Color ColorIcons
{
get

View file

@ -8,7 +8,7 @@ namespace SystemTrayMenu.DataClasses
internal enum MenuDataValidity
{
Undefined,
AbortedOrUnknown,
Valid,
Empty,
NoAccess,
@ -16,23 +16,9 @@ namespace SystemTrayMenu.DataClasses
internal struct MenuData
{
public MenuData(int level)
{
RowDatas = new List<RowData>();
Validity = MenuDataValidity.Undefined;
Level = level;
RowDataParent = null;
IsNetworkRoot = false;
}
internal List<RowData> RowDatas { get; set; }
internal MenuDataValidity Validity { get; set; }
internal int Level { get; }
internal RowData RowDataParent { get; set; }
internal bool IsNetworkRoot { get; set; }
internal List<RowData> RowDatas;
internal MenuDataValidity Validity;
internal int Level;
internal RowData RowDataParent;
}
}

View file

@ -5,144 +5,75 @@
namespace SystemTrayMenu.DataClasses
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Security;
using System.Text;
using System.Windows.Forms;
using IWshRuntimeLibrary;
using SystemTrayMenu.Utilities;
using static SystemTrayMenu.Utilities.IconReader;
using TAFactory.IconPack;
using Menu = SystemTrayMenu.UserInterface.Menu;
internal class RowData
internal class RowData : IDisposable
{
private static readonly Icon White50PercentageIcon = Properties.Resources.White50Percentage;
private static readonly Icon NotFoundIcon = Properties.Resources.NotFound;
private static DateTime contextMenuClosed;
private string workingDirectory;
private string arguments;
private string text;
private Icon icon;
private bool diposeIcon = true;
private bool isDisposed;
/// <summary>
/// Initializes a new instance of the <see cref="RowData"/> class.
/// empty dummy.
/// </summary>
internal RowData()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="RowData"/> class.
/// (Related replace "\x00" see #171.)
/// </summary>
/// <param name="isFolder">Flag if file or folder.</param>
/// <param name="isAddionalItem">Flag if addional item, from other folder than root folder.</param>
/// <param name="isNetworkRoot">Flag if resolved from network root folder.</param>
/// <param name="level">The number of the menu level.</param>
/// <param name="path">Path to item.</param>
internal RowData(bool isFolder, bool isAddionalItem, bool isNetworkRoot, int level, string path)
{
IsFolder = isFolder;
IsAddionalItem = isAddionalItem;
IsNetworkRoot = isNetworkRoot;
Level = level;
try
{
FileInfo = new FileInfo(path.Replace("\x00", string.Empty));
Path = IsFolder ? $@"{FileInfo.FullName}\" : FileInfo.FullName;
FileExtension = System.IO.Path.GetExtension(Path);
IsLink = FileExtension.Equals(".lnk", StringComparison.InvariantCultureIgnoreCase);
if (IsLink)
{
ResolvedPath = FileLnk.GetResolvedFileName(Path, out bool isLinkToFolder);
IsLinkToFolder = isLinkToFolder || FileLnk.IsNetworkRoot(ResolvedPath);
ShowOverlay = Properties.Settings.Default.ShowLinkOverlay;
Text = System.IO.Path.GetFileNameWithoutExtension(Path);
if (string.IsNullOrEmpty(ResolvedPath))
{
Log.Info($"Resolved path is empty: '{Path}'");
ResolvedPath = Path;
}
}
else
{
ResolvedPath = Path;
if (string.IsNullOrEmpty(FileInfo.Name))
{
int nameBegin = FileInfo.FullName.LastIndexOf(@"\", StringComparison.InvariantCulture) + 1;
Text = FileInfo.FullName[nameBegin..];
}
else if (FileExtension.Equals(".url", StringComparison.InvariantCultureIgnoreCase) ||
FileExtension.Equals(".appref-ms", StringComparison.InvariantCultureIgnoreCase))
{
ShowOverlay = Properties.Settings.Default.ShowLinkOverlay;
Text = System.IO.Path.GetFileNameWithoutExtension(FileInfo.Name);
}
else if (!IsFolder && Config.IsHideFileExtension())
{
Text = System.IO.Path.GetFileNameWithoutExtension(FileInfo.Name);
}
else
{
Text = FileInfo.Name;
}
}
ContainsMenu = IsFolder;
if (Properties.Settings.Default.ResolveLinksToFolders)
{
ContainsMenu |= IsLinkToFolder;
}
IsMainMenu = Level == 0;
}
catch (Exception ex)
{
Log.Warn($"path:'{path}'", ex);
}
}
internal FileInfo FileInfo { get; }
internal string Path { get; }
internal bool IsFolder { get; }
internal bool IsAddionalItem { get; }
internal bool IsNetworkRoot { get; }
internal int Level { get; set; }
internal string FileExtension { get; }
internal bool IsLink { get; }
internal string ResolvedPath { get; }
internal bool IsLinkToFolder { get; }
internal bool ShowOverlay { get; }
internal string Text { get; }
internal bool ContainsMenu { get; }
internal bool IsMainMenu { get; }
internal FileInfo FileInfo { get; set; }
internal Menu SubMenu { get; set; }
internal bool IsMenuOpen { get; set; }
internal bool IsClicking { get; set; }
internal bool IsSelected { get; set; }
internal bool ContainsMenu { get; set; }
internal bool IsContextMenuOpen { get; set; }
internal bool IsResolvedLnk { get; set; }
internal bool HiddenEntry { get; set; }
internal string TargetFilePath { get; set; }
internal string TargetFilePathOrig { get; set; }
internal int RowIndex { get; set; }
internal int MenuLevel { get; set; }
internal bool IconLoading { get; set; }
internal bool ProcessStarted { get; set; }
public void Dispose()
{
Dispose(true);
#if DEBUG
GC.SuppressFinalize(this);
#endif
}
internal void SetText(string text)
{
this.text = text;
}
internal void SetData(RowData data, DataTable dataTable)
{
@ -151,51 +82,107 @@ namespace SystemTrayMenu.DataClasses
if (HiddenEntry)
{
row[0] = AddIconOverlay(data.icon, Properties.Resources.White50Percentage);
row[0] = IconReader.AddIconOverlay(
data.icon,
White50PercentageIcon);
}
else
{
row[0] = data.icon;
}
row[1] = data.Text;
row[2] = data;
}
internal Icon ReadIcon(bool updateIconInBackground)
{
if (IsFolder || IsLinkToFolder)
if (!ContainsMenu &&
Config.IsHideFileExtension())
{
icon = GetFolderIconWithCache(Path, ShowOverlay, updateIconInBackground, IsMainMenu, out bool loading);
IconLoading = loading;
row[1] = Path.GetFileNameWithoutExtension(data.text);
}
else
{
icon = GetFileIconWithCache(Path, ResolvedPath, ShowOverlay, updateIconInBackground, IsMainMenu, out bool loading);
IconLoading = loading;
row[1] = data.text;
}
if (!IconLoading)
{
if (icon == null)
{
icon = Properties.Resources.NotFound;
}
else if (HiddenEntry)
{
icon = AddIconOverlay(icon, Properties.Resources.White50Percentage);
}
}
return icon;
row[2] = data;
}
internal void MouseDown(DataGridView dgv, MouseEventArgs e)
internal bool ReadIcon(bool isDirectory, ref string resolvedLnkPath)
{
if (e.Button == MouseButtons.Left)
bool isLnkDirectory = false;
if (string.IsNullOrEmpty(TargetFilePath))
{
IsClicking = true;
Log.Info($"TargetFilePath from {resolvedLnkPath} empty");
}
else if (isDirectory)
{
icon = IconReader.GetFolderIconSTA(
TargetFilePath,
IconReader.FolderType.Closed,
false);
}
else
{
bool handled = false;
bool showOverlay = false;
string fileExtension = Path.GetExtension(TargetFilePath);
if (fileExtension == ".lnk")
{
handled = SetLnk(
ref isLnkDirectory,
ref resolvedLnkPath);
showOverlay = true;
}
else if (fileExtension == ".url")
{
handled = SetUrl();
showOverlay = true;
}
else if (fileExtension == ".sln")
{
handled = SetSln();
}
if (!handled)
{
try
{
icon = IconReader.GetFileIconWithCache(
TargetFilePath,
showOverlay,
true,
out bool loading);
IconLoading = loading;
diposeIcon = false;
}
catch (Exception ex)
{
if (ex is SecurityException ||
ex is ArgumentException ||
ex is UnauthorizedAccessException ||
ex is PathTooLongException ||
ex is NotSupportedException)
{
Log.Warn($"path:'{TargetFilePath}'", ex);
}
else
{
throw;
}
}
}
}
if (icon == null)
{
icon = NotFoundIcon;
}
return isLnkDirectory;
}
internal void MouseDown(DataGridView dgv, MouseEventArgs e, out bool toCloseByDoubleClick)
{
toCloseByDoubleClick = false;
if (e != null &&
e.Button == MouseButtons.Right &&
@ -206,77 +193,46 @@ namespace SystemTrayMenu.DataClasses
{
IsContextMenuOpen = true;
ShellContextMenu ctxMnu = new();
ShellContextMenu ctxMnu = new ShellContextMenu();
Point location = dgv.FindForm().Location;
Point point = new(
Point point = new Point(
e.X + location.X + dgv.Location.X,
e.Y + location.Y + dgv.Location.Y);
if (ContainsMenu)
{
DirectoryInfo[] dir = new DirectoryInfo[1];
dir[0] = new DirectoryInfo(Path);
dir[0] = new DirectoryInfo(TargetFilePathOrig);
ctxMnu.ShowContextMenu(dir, point);
TriggerFileWatcherChangeWorkaround();
}
else
{
FileInfo[] arrFI = new FileInfo[1];
arrFI[0] = FileInfo;
arrFI[0] = new FileInfo(TargetFilePathOrig);
ctxMnu.ShowContextMenu(arrFI, point);
TriggerFileWatcherChangeWorkaround();
}
IsContextMenuOpen = false;
contextMenuClosed = DateTime.Now;
}
void TriggerFileWatcherChangeWorkaround()
{
try
{
string parentFolder = System.IO.Path.GetDirectoryName(Path);
Directory.GetFiles(parentFolder);
}
catch (Exception ex)
{
Log.Warn($"{nameof(TriggerFileWatcherChangeWorkaround)} '{Path}'", ex);
}
}
}
internal void MouseClick(MouseEventArgs e, out bool toCloseByDoubleClick)
{
IsClicking = false;
toCloseByDoubleClick = false;
if (Properties.Settings.Default.OpenItemWithOneClick)
{
OpenItem(e, ref toCloseByDoubleClick);
}
if (Properties.Settings.Default.OpenDirectoryWithOneClick &&
ContainsMenu && (e == null || e.Button == MouseButtons.Left))
{
Log.ProcessStart(Path);
if (!Properties.Settings.Default.StaysOpenWhenItemClicked)
{
toCloseByDoubleClick = true;
}
}
}
internal void DoubleClick(MouseEventArgs e, out bool toCloseByDoubleClick)
{
IsClicking = false;
toCloseByDoubleClick = false;
if (!Properties.Settings.Default.OpenItemWithOneClick)
{
OpenItem(e, ref toCloseByDoubleClick);
}
if (!Properties.Settings.Default.OpenDirectoryWithOneClick &&
ContainsMenu && (e == null || e.Button == MouseButtons.Left))
if (ContainsMenu &&
(e == null || e.Button == MouseButtons.Left))
{
Log.ProcessStart(Path);
Log.ProcessStart(TargetFilePath);
if (!Properties.Settings.Default.StaysOpenWhenItemClicked)
{
toCloseByDoubleClick = true;
@ -284,19 +240,211 @@ namespace SystemTrayMenu.DataClasses
}
}
internal Icon ReadLoadedIcon()
{
bool showOverlay = false;
string fileExtension = Path.GetExtension(TargetFilePath);
if (fileExtension == ".lnk" || fileExtension == ".url")
{
showOverlay = true;
}
string path = TargetFilePath;
if (ContainsMenu)
{
path = TargetFilePathOrig;
}
icon = IconReader.GetFileIconWithCache(
path,
showOverlay,
false,
out bool loading);
IconLoading = loading;
if (!loading && icon == null)
{
icon = NotFoundIcon;
}
return icon;
}
protected virtual void Dispose(bool disposing)
{
if (!isDisposed)
{
if (diposeIcon)
{
icon?.Dispose();
}
}
isDisposed = true;
}
private void OpenItem(MouseEventArgs e, ref bool toCloseByOpenItem)
{
if (!ContainsMenu &&
(e == null || e.Button == MouseButtons.Left))
{
ProcessStarted = true;
string workingDirectory = System.IO.Path.GetDirectoryName(ResolvedPath);
Log.ProcessStart(Path, string.Empty, false, workingDirectory, true, ResolvedPath);
Log.ProcessStart(TargetFilePathOrig, arguments, true, workingDirectory, true);
if (!Properties.Settings.Default.StaysOpenWhenItemClicked)
{
toCloseByOpenItem = true;
}
}
}
private bool SetLnk(
ref bool isLnkDirectory,
ref string resolvedLnkPath)
{
bool handled = false;
resolvedLnkPath = FileLnk.GetResolvedFileName(TargetFilePath);
if (FileLnk.IsNetworkPath(resolvedLnkPath))
{
string nameOrAdress = resolvedLnkPath.Split(@"\\")[1].Split(@"\").First();
if (!FileLnk.PingHost(nameOrAdress))
{
return handled;
}
}
if (FileLnk.IsDirectory(resolvedLnkPath))
{
icon = IconReader.GetFolderIconSTA(TargetFilePath, IconReader.FolderType.Open, true);
handled = true;
isLnkDirectory = true;
}
else if (FileLnk.IsNetworkRoot(resolvedLnkPath))
{
isLnkDirectory = true;
}
else if (string.IsNullOrEmpty(resolvedLnkPath))
{
Log.Info($"Resolve *.LNK '{TargetFilePath}' has no icon");
}
else
{
IWshShell shell = new WshShell();
IWshShortcut lnk = shell.CreateShortcut(TargetFilePath)
as IWshShortcut;
arguments = lnk.Arguments;
workingDirectory = lnk.WorkingDirectory;
string iconLocation = lnk.IconLocation;
if (iconLocation.Length > 2)
{
iconLocation = iconLocation[0..^2];
if (System.IO.File.Exists(iconLocation))
{
try
{
icon = Icon.ExtractAssociatedIcon(iconLocation);
handled = true;
}
catch (ArgumentException ex)
{
Log.Warn($"iconLocation:'{iconLocation}'", ex);
}
}
}
TargetFilePath = resolvedLnkPath;
}
SetText(Path.GetFileNameWithoutExtension(TargetFilePathOrig));
return handled;
}
private bool SetUrl()
{
bool handled = false;
string iconFile = string.Empty;
try
{
FileIni file = new FileIni(TargetFilePath);
iconFile = file.Value("IconFile", string.Empty);
if (string.IsNullOrEmpty(iconFile))
{
if (FileUrl.GetDefaultBrowserPath(out string browserPath))
{
icon = IconReader.GetFileIconWithCache(browserPath, true, true, out bool loading);
IconLoading = loading;
diposeIcon = false;
handled = true;
}
}
else if (System.IO.File.Exists(iconFile))
{
icon = Icon.ExtractAssociatedIcon(iconFile);
handled = true;
}
else
{
Log.Info($"Resolve *.URL '{TargetFilePath}' has no icon");
}
}
catch (Exception ex)
{
if (ex is SecurityException ||
ex is ArgumentException ||
ex is UnauthorizedAccessException ||
ex is PathTooLongException ||
ex is NotSupportedException)
{
Log.Warn(
$"path:'{TargetFilePath}', " +
$"iconFile:'{iconFile}'",
ex);
}
else
{
throw;
}
}
SetText($"{FileInfo.Name[0..^4]}");
return handled;
}
private bool SetSln()
{
bool handled = false;
StringBuilder executable = new StringBuilder(1024);
try
{
DllImports.NativeMethods.Shell32FindExecutable(TargetFilePath, string.Empty, executable);
// icon = IconReader.GetFileIcon(executable, false);
// e.g. VS 2019 icon, need another icom in imagelist
List<Icon> extractedIcons = IconHelper.ExtractAllIcons(
executable.ToString());
icon = extractedIcons.Last();
handled = true;
}
catch (Exception ex)
{
if (ex is SecurityException ||
ex is ArgumentException ||
ex is UnauthorizedAccessException ||
ex is PathTooLongException ||
ex is NotSupportedException)
{
Log.Warn(
$"path:'{TargetFilePath}', " +
$"executable:'{executable}'",
ex);
}
else
{
throw;
}
}
return handled;
}
}
}

View file

@ -10,7 +10,4 @@ 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 = "this is a long way to get platform compatibility")]

View file

@ -9,19 +9,19 @@ namespace SystemTrayMenu.Helper
public class DgvMouseRow : IDisposable
{
private readonly Timer timerRaiseRowMouseLeave = new();
private readonly Timer timerRaiseRowMouseLeave = new Timer();
private DataGridView dgv;
private DataGridViewCellEventArgs eventArgs;
internal DgvMouseRow()
{
timerRaiseRowMouseLeave.Interval = 200;
timerRaiseRowMouseLeave.Tick += TimerRaiseRowMouseLeave_Tick;
}
~DgvMouseRow() // the finalizer
{
Dispose(false);
timerRaiseRowMouseLeave.Tick += Elapsed;
void Elapsed(object sender, EventArgs e)
{
timerRaiseRowMouseLeave.Stop();
TriggerRowMouseLeave();
}
}
internal event Action<object, DataGridViewCellEventArgs> RowMouseEnter;
@ -31,7 +31,9 @@ namespace SystemTrayMenu.Helper
public void Dispose()
{
Dispose(true);
#if DEBUG
GC.SuppressFinalize(this);
#endif
}
internal void CellMouseEnter(object sender, DataGridViewCellEventArgs newEventArgs)
@ -75,18 +77,11 @@ namespace SystemTrayMenu.Helper
{
if (disposing)
{
timerRaiseRowMouseLeave.Tick -= TimerRaiseRowMouseLeave_Tick;
timerRaiseRowMouseLeave.Dispose();
dgv = null;
dgv?.Dispose();
}
}
private void TimerRaiseRowMouseLeave_Tick(object sender, EventArgs e)
{
timerRaiseRowMouseLeave.Stop();
TriggerRowMouseLeave();
}
private void TriggerRowMouseLeave()
{
if (dgv != null)

View file

@ -2,27 +2,25 @@
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace SystemTrayMenu.Helper
namespace SystemTrayMenu.Helpers
{
using System;
using System.IO;
using System.Net.Http;
using System.Net;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using SystemTrayMenu.DataClasses;
using SystemTrayMenu.UserInterface;
using SystemTrayMenu.Utilities;
public static class DragDropHelper
{
public static void DragEnter(object sender, DragEventArgs e)
{
object data = e.Data.GetData("UniformResourceLocator");
if (data is MemoryStream memoryStream)
MemoryStream ms = data as MemoryStream;
if (ms != null)
{
byte[] bytes = memoryStream.ToArray();
byte[] bytes = ms.ToArray();
Encoding encod = Encoding.ASCII;
string url = encod.GetString(bytes);
if (!string.IsNullOrEmpty(url))
@ -36,21 +34,14 @@ namespace SystemTrayMenu.Helper
{
Menu menu = (Menu)sender;
string path;
if (menu != null)
if (menu == null)
{
RowData rowData = (RowData)menu.Tag;
if (rowData != null)
{
path = rowData.ResolvedPath;
}
else
{
path = Config.Path;
}
path = Config.Path;
}
else
{
path = Config.Path;
RowData rowData = (RowData)menu.Tag;
path = rowData.TargetFilePath;
}
object data = e.Data.GetData("UniformResourceLocator");
@ -58,133 +49,63 @@ namespace SystemTrayMenu.Helper
byte[] bytes = ms.ToArray();
Encoding encod = Encoding.ASCII;
string url = encod.GetString(bytes);
new Thread(CreateShortcutInBackground).Start();
void CreateShortcutInBackground()
{
CreateShortcut(url.Replace("\0", string.Empty), path);
}
CreateShortcut(url.Replace("\0", string.Empty), path);
}
private static void CreateShortcut(string url, string pathToStoreFile)
{
string title = GetUrlShortcutTitle(url);
string fileNamePathShortcut = pathToStoreFile + "\\" + title.Trim() + ".url";
WriteShortcut(url, null, fileNamePathShortcut);
string pathIcon = DownloadUrlIcon(url);
if (!string.IsNullOrEmpty(pathIcon))
string pathToStoreIcons = Path.Combine(pathToStoreFile, "ico");
var client = new WebClient();
if (!Directory.Exists(pathToStoreIcons))
{
WriteShortcut(url, pathIcon, fileNamePathShortcut);
Directory.CreateDirectory(pathToStoreIcons);
}
}
private static string GetUrlShortcutTitle(string url)
{
string title = url
.Replace("/", " ")
.Replace("https", string.Empty)
.Replace("http", string.Empty);
string invalid =
new string(Path.GetInvalidFileNameChars()) +
new string(Path.GetInvalidPathChars());
foreach (char character in invalid)
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);
var 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(character.ToString(), string.Empty);
title = title.Replace(c.ToString(), string.Empty);
}
title = Truncate(title, 128); // max 255
return title;
}
private static string Truncate(string value, int maxLength)
{
if (!string.IsNullOrEmpty(value) &&
value.Length > maxLength)
string Truncate(string value, int maxLength)
{
value = value[..maxLength];
}
return value;
}
private static void WriteShortcut(string url, string pathIcon, string fileNamePathShortcut)
{
try
{
if (File.Exists(fileNamePathShortcut))
if (!string.IsNullOrEmpty(value) &&
value.Length > maxLength)
{
File.Delete(fileNamePathShortcut);
value = value.Substring(0, maxLength);
}
StreamWriter writer = new(fileNamePathShortcut);
return value;
}
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=");
if (!string.IsNullOrEmpty(pathIcon))
{
writer.WriteLine($"IconFile={pathIcon}");
}
writer.WriteLine($"IconFile={pathIcon}");
writer.Flush();
writer.Close();
}
catch (Exception ex)
{
Log.Warn($"{nameof(WriteShortcut)} failed", ex);
}
}
private static string DownloadUrlIcon(string url)
{
string pathIcon = string.Empty;
string pathToStoreIcons = Properties.Settings.Default.PathIcoDirectory;
Uri uri = new(url);
string hostname = uri.Host.ToString();
string pathIconPng = Path.Combine(pathToStoreIcons, $"{hostname}.png");
string urlGoogleIconDownload = @"http://www.google.com/s2/favicons?sz=32&domain=" + url;
HttpClient client = new();
try
{
if (!Directory.Exists(pathToStoreIcons))
{
Directory.CreateDirectory(pathToStoreIcons);
}
using HttpResponseMessage response = client.GetAsync(urlGoogleIconDownload).Result;
using HttpContent content = response.Content;
Stream stream = content.ReadAsStreamAsync().Result;
using var fileStream = File.Create(pathIconPng);
stream.Seek(0, SeekOrigin.Begin);
stream.CopyTo(fileStream);
fileStream.Close();
pathIcon = Path.Combine(pathToStoreIcons, $"{hostname}.ico");
if (!ImagingHelper.ConvertToIcon(pathIconPng, pathIcon, 32))
{
Log.Info("Failed to convert icon.");
}
}
catch (Exception ex)
{
Log.Warn($"{nameof(DownloadUrlIcon)} failed", ex);
}
try
{
if (File.Exists(pathIconPng))
{
File.Delete(pathIconPng);
}
}
catch (Exception ex)
{
Log.Warn($"{nameof(DownloadUrlIcon)} failed to delete {pathIconPng}", ex);
}
return pathIcon;
}
}
}

View file

@ -2,7 +2,7 @@
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace SystemTrayMenu.Helper
namespace SystemTrayMenu.UserInterface
{
using System;
using System.Windows.Forms;
@ -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();
private readonly Timer timer = new Timer();
private FadingState state = FadingState.Idle;
private double opacity;
private bool visible;
@ -28,19 +28,18 @@ namespace SystemTrayMenu.Helper
internal Fading()
{
timer.Interval = Interval100FPS;
timer.Tick += Timer_Tick;
timer.Tick += Tick;
void Tick(object sender, EventArgs e)
{
FadeStep();
}
}
~Fading() // the finalizer
{
Dispose(false);
}
internal event EventHandlerEmpty Hide;
internal event Action Hide;
internal event EventHandlerEmpty Show;
internal event Action Show;
internal event Action<double> ChangeOpacity;
internal event EventHandler<double> ChangeOpacity;
internal enum FadingState
{
@ -55,7 +54,9 @@ namespace SystemTrayMenu.Helper
public void Dispose()
{
Dispose(true);
#if DEBUG
GC.SuppressFinalize(this);
#endif
}
internal void Fade(FadingState state)
@ -67,7 +68,6 @@ namespace SystemTrayMenu.Helper
{
if (disposing)
{
timer.Tick -= Timer_Tick;
timer.Dispose();
}
}
@ -83,14 +83,10 @@ namespace SystemTrayMenu.Helper
{
state = newState;
timer.Start();
FadeStep();
}
}
private void Timer_Tick(object sender, EventArgs e)
{
FadeStep();
}
private void FadeStep()
{
switch (state)
@ -101,25 +97,17 @@ namespace SystemTrayMenu.Helper
visible = true;
Show?.Invoke();
opacity = 0;
ChangeOpacity?.Invoke(opacity);
ChangeOpacity?.Invoke(this, opacity);
}
else if (Properties.Settings.Default.UseFading &&
opacity < ShownMinus)
else if (opacity < ShownMinus)
{
opacity += StepIn;
ChangeOpacity?.Invoke(opacity);
ChangeOpacity?.Invoke(this, opacity);
}
else
else if (opacity != Shown)
{
if (!Properties.Settings.Default.UseFading)
{
// #393 provoke a redraw for the CS_DROPSHADOW to work
opacity = ShownMinus;
ChangeOpacity?.Invoke(opacity);
}
opacity = Shown;
ChangeOpacity?.Invoke(opacity);
ChangeOpacity?.Invoke(this, Shown);
StartStopTimer(FadingState.Idle);
}
@ -130,47 +118,39 @@ namespace SystemTrayMenu.Helper
visible = true;
Show?.Invoke();
opacity = 0;
ChangeOpacity?.Invoke(opacity);
ChangeOpacity?.Invoke(this, opacity);
}
else if (Properties.Settings.Default.UseFading &&
opacity < TransparentMinus)
else if (opacity < TransparentMinus)
{
opacity += StepIn;
ChangeOpacity?.Invoke(opacity);
ChangeOpacity?.Invoke(this, opacity);
}
else if (Properties.Settings.Default.UseFading &&
opacity > TransparentPlus)
else if (opacity > TransparentPlus)
{
opacity -= StepOut;
ChangeOpacity?.Invoke(opacity);
ChangeOpacity?.Invoke(this, opacity);
}
else
else if (opacity != Transparent)
{
opacity = Transparent;
ChangeOpacity?.Invoke(opacity);
ChangeOpacity?.Invoke(this, Transparent);
StartStopTimer(FadingState.Idle);
}
break;
case FadingState.Hide:
if (Properties.Settings.Default.UseFading &&
opacity > StepOut)
if (opacity > StepOut)
{
opacity -= StepOut;
ChangeOpacity?.Invoke(opacity);
ChangeOpacity?.Invoke(this, opacity);
}
else if (visible)
{
opacity = 0;
ChangeOpacity?.Invoke(opacity);
ChangeOpacity?.Invoke(this, opacity);
visible = false;
Hide?.Invoke();
StartStopTimer(FadingState.Idle);
}
else
{
StartStopTimer(FadingState.Idle);
}
break;
case FadingState.Idle:

View file

@ -2,10 +2,9 @@
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace SystemTrayMenu.Helper
namespace SystemTrayMenu.Helpers
{
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.IO;
@ -24,7 +23,7 @@ namespace SystemTrayMenu.Helper
/// <returns>Wether or not the icon was succesfully generated.</returns>
public static bool ConvertToIcon(Stream input, Stream output, int size = 16, bool preserveAspectRatio = false)
{
Bitmap inputBitmap = (Bitmap)Image.FromStream(input);
Bitmap inputBitmap = (Bitmap)Bitmap.FromStream(input);
if (inputBitmap != null)
{
int width, height;
@ -38,58 +37,60 @@ namespace SystemTrayMenu.Helper
width = height = size;
}
Bitmap newBitmap = new(inputBitmap, new Size(width, height));
Bitmap newBitmap = new Bitmap(inputBitmap, new Size(width, height));
if (newBitmap != null)
{
// save the resized png into a memory stream for future use
using MemoryStream memoryStream = new();
newBitmap.Save(memoryStream, ImageFormat.Png);
BinaryWriter iconWriter = new(output);
if (output != null && iconWriter != null)
using (MemoryStream memoryStream = new MemoryStream())
{
// 0-1 reserved, 0
iconWriter.Write((byte)0);
iconWriter.Write((byte)0);
newBitmap.Save(memoryStream, ImageFormat.Png);
// 2-3 image type, 1 = icon, 2 = cursor
iconWriter.Write((short)1);
BinaryWriter iconWriter = new BinaryWriter(output);
if (output != null && iconWriter != null)
{
// 0-1 reserved, 0
iconWriter.Write((byte)0);
iconWriter.Write((byte)0);
// 4-5 number of images
iconWriter.Write((short)1);
// 2-3 image type, 1 = icon, 2 = cursor
iconWriter.Write((short)1);
// image entry 1
// 0 image width
iconWriter.Write((byte)width);
// 4-5 number of images
iconWriter.Write((short)1);
// 1 image height
iconWriter.Write((byte)height);
// image entry 1
// 0 image width
iconWriter.Write((byte)width);
// 2 number of colors
iconWriter.Write((byte)0);
// 1 image height
iconWriter.Write((byte)height);
// 3 reserved
iconWriter.Write((byte)0);
// 2 number of colors
iconWriter.Write((byte)0);
// 4-5 color planes
iconWriter.Write((short)0);
// 3 reserved
iconWriter.Write((byte)0);
// 6-7 bits per pixel
iconWriter.Write((short)32);
// 4-5 color planes
iconWriter.Write((short)0);
// 8-11 size of image data
iconWriter.Write((int)memoryStream.Length);
// 6-7 bits per pixel
iconWriter.Write((short)32);
// 12-15 offset of image data
iconWriter.Write(6 + 16);
// 8-11 size of image data
iconWriter.Write((int)memoryStream.Length);
// write image data
// png data must contain the whole png data file
iconWriter.Write(memoryStream.ToArray());
// 12-15 offset of image data
iconWriter.Write((int)(6 + 16));
iconWriter.Flush();
// write image data
// png data must contain the whole png data file
iconWriter.Write(memoryStream.ToArray());
return true;
iconWriter.Flush();
return true;
}
}
}
@ -109,39 +110,11 @@ 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(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(img.Width, img.Height);
// turn the Bitmap into a Graphics object
Graphics gfx = Graphics.FromImage(bmp);
// now we set the rotation point to the center of our image
gfx.TranslateTransform(0.5f + ((float)bmp.Width / 2), 0.5f + ((float)bmp.Height / 2));
// now rotate the image
gfx.RotateTransform(rotationAngle);
gfx.TranslateTransform(0.5f - ((float)bmp.Width / 2), 0.5f - ((float)bmp.Height / 2));
// set the InterpolationMode to HighQualityBicubic so to ensure a high
// quality image once it is transformed to the specified size
gfx.InterpolationMode = InterpolationMode.HighQualityBicubic;
// now draw our new image onto the graphics object
gfx.DrawImage(img, new Point(0, 0));
// dispose of our Graphics object
gfx.Dispose();
// return the image
return bmp;
using (FileStream inputStream = new FileStream(inputPath, FileMode.Open))
using (FileStream outputStream = new FileStream(outputPath, FileMode.OpenOrCreate))
{
return ConvertToIcon(inputStream, outputStream, size, preserveAspectRatio);
}
}
}
}

View file

@ -1,215 +0,0 @@
// <copyright file="JoystickHelper.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace SystemTrayMenu.Helpers
{
using System;
using System.Diagnostics;
using System.Diagnostics.Metrics;
using System.Reflection.Metadata;
using System.Threading;
using System.Windows.Forms;
using SharpDX.DirectInput;
public class JoystickHelper : IDisposable
{
private readonly System.Timers.Timer timerReadJoystick = new();
private readonly object lockRead = new();
private Joystick joystick;
private Keys pressingKey;
private int pressingKeyCounter;
private bool joystickHelperEnabled;
public JoystickHelper()
{
timerReadJoystick.Interval = 80;
timerReadJoystick.Elapsed += ReadJoystickLoop;
timerReadJoystick.Enabled = false;
if (Properties.Settings.Default.SupportGamepad)
{
timerReadJoystick.Start();
}
}
~JoystickHelper() // the finalizer
{
Dispose(false);
}
public event Action<Keys> KeyPressed;
public void Enable()
{
joystickHelperEnabled = true;
}
public void Disable()
{
joystickHelperEnabled = false;
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (disposing)
{
timerReadJoystick.Elapsed -= ReadJoystickLoop;
timerReadJoystick?.Dispose();
joystick?.Dispose();
}
}
private static Keys ReadKeyFromState(JoystickUpdate state)
{
Keys keys = Keys.None;
switch (state.Offset)
{
case JoystickOffset.PointOfViewControllers0:
switch (state.Value)
{
case 0:
keys = Keys.Up;
break;
case 9000:
keys = Keys.Right;
break;
case 18000:
keys = Keys.Down;
break;
case 27000:
keys = Keys.Left;
break;
default:
break;
}
break;
case JoystickOffset.Buttons0:
if (state.Value == 128)
{
keys = Keys.Enter;
}
break;
default:
break;
}
return keys;
}
private void ReadJoystickLoop(object sender, System.Timers.ElapsedEventArgs e)
{
if (joystickHelperEnabled)
{
lock (lockRead)
{
timerReadJoystick.Stop();
if (joystick == null)
{
Thread.Sleep(3000);
InitializeJoystick();
}
else
{
ReadJoystick();
}
timerReadJoystick.Start();
}
}
}
private void ReadJoystick()
{
try
{
joystick.Poll();
JoystickUpdate[] datas = joystick.GetBufferedData();
foreach (JoystickUpdate state in datas)
{
if (state.Value < 0)
{
pressingKey = Keys.None;
pressingKeyCounter = 0;
continue;
}
Keys key = ReadKeyFromState(state);
if (key != Keys.None)
{
KeyPressed?.Invoke(key);
if (state.Offset == JoystickOffset.PointOfViewControllers0)
{
pressingKeyCounter = 0;
pressingKey = key;
}
}
}
if (pressingKey != Keys.None)
{
pressingKeyCounter += 1;
if (pressingKeyCounter > 1)
{
KeyPressed?.Invoke(pressingKey);
}
}
}
catch
{
joystick?.Dispose();
joystick = null;
}
}
private void InitializeJoystick()
{
// Initialize DirectInput
DirectInput directInput = new();
// Find a Joystick Guid
Guid joystickGuid = Guid.Empty;
foreach (DeviceInstance deviceInstance in directInput.GetDevices(
DeviceType.Gamepad,
DeviceEnumerationFlags.AllDevices))
{
joystickGuid = deviceInstance.InstanceGuid;
}
// If Gamepad not found, look for a Joystick
if (joystickGuid == Guid.Empty)
{
foreach (DeviceInstance deviceInstance in directInput.GetDevices(
DeviceType.Joystick,
DeviceEnumerationFlags.AllDevices))
{
joystickGuid = deviceInstance.InstanceGuid;
}
}
// If Joystick found
if (joystickGuid != Guid.Empty)
{
// Instantiate the joystick
joystick = new Joystick(directInput, joystickGuid);
// Set BufferSize in order to use buffered data.
joystick.Properties.BufferSize = 128;
var handle = Process.GetCurrentProcess().MainWindowHandle;
joystick.SetCooperativeLevel(handle, CooperativeLevel.NonExclusive | CooperativeLevel.Background);
// Acquire the joystick
joystick.Acquire();
}
}
}
}

View file

@ -12,15 +12,16 @@ namespace SystemTrayMenu.Helper
/// </summary>
internal class KeyPressedEventArgs : EventArgs
{
private readonly KeyboardHookModifierKeys modifier;
private readonly Keys key;
internal KeyPressedEventArgs(KeyboardHookModifierKeys modifier, Keys key)
{
Modifier = modifier;
this.modifier = modifier;
this.key = key;
}
internal KeyboardHookModifierKeys Modifier { get; }
internal KeyboardHookModifierKeys Modifier => modifier;
internal Keys Key => key;
}

View file

@ -13,7 +13,7 @@ namespace SystemTrayMenu.Helper
/// The enumeration of possible modifiers.
/// </summary>
[Flags]
public enum KeyboardHookModifierKeys : uint
internal enum KeyboardHookModifierKeys : uint
{
None = 0,
Alt = 1,
@ -24,13 +24,16 @@ namespace SystemTrayMenu.Helper
public sealed class KeyboardHook : IDisposable
{
private readonly Window window = new();
private readonly Window window = new Window();
private int currentId;
public KeyboardHook()
{
// register the event of the inner native window.
window.KeyPressed += Window_KeyPressed;
window.KeyPressed += (sender, args) =>
{
KeyPressed?.Invoke(this, args);
};
}
/// <summary>
@ -47,7 +50,6 @@ namespace SystemTrayMenu.Helper
}
// dispose the inner native window.
window.KeyPressed -= Window_KeyPressed;
window.Dispose();
}
@ -105,11 +107,6 @@ namespace SystemTrayMenu.Helper
RegisterHotKey((uint)modifier, key);
}
private void Window_KeyPressed(object sender, KeyPressedEventArgs e)
{
KeyPressed?.Invoke(this, e);
}
private void RegisterHotKey(uint modifier, Keys key)
{
currentId += 1;

View file

@ -1,251 +0,0 @@
// <copyright file="GitHubUpdate.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace SystemTrayMenu.Helper.Updater
{
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Net.Http;
using System.Reflection;
using System.Windows.Forms;
using SystemTrayMenu.Utilities;
public class GitHubUpdate
{
private static List<Dictionary<string, object>> releases;
private static Form newVersionForm;
public static void ActivateNewVersionFormOrCheckForUpdates(bool showWhenUpToDate)
{
if (newVersionForm != null)
{
newVersionForm.HandleInvoke(newVersionForm.Activate);
}
else
{
CheckForUpdates(showWhenUpToDate);
}
}
private static void CheckForUpdates(bool showWhenUpToDate)
{
string urlGithubReleases = @"http://api.github.com/repos/Hofknecht/SystemTrayMenu/releases";
HttpClient client = new();
// https://developer.github.com/v3/#user-agent-required
client.DefaultRequestHeaders.Add("User-Agent", "SystemTrayMenu/" + Application.ProductVersion.ToString());
// https://developer.github.com/v3/media/#request-specific-version
client.DefaultRequestHeaders.Add("Accept", "application/vnd.github.v3.text+json");
try
{
using HttpResponseMessage response = client.GetAsync(urlGithubReleases).Result;
using HttpContent content = response.Content;
string responseString = content.ReadAsStringAsync().Result;
releases = responseString.FromJson<List<Dictionary<string, object>>>();
}
catch (Exception ex)
{
Log.Warn($"{nameof(CheckForUpdates)} failed", ex);
}
if (releases == null)
{
Log.Info($"{nameof(CheckForUpdates)} failed.");
}
else
{
RemoveCurrentAndOlderVersions();
ShowNewVersionOrUpToDateDialog(showWhenUpToDate);
}
newVersionForm?.Dispose();
newVersionForm = null;
}
private static void RemoveCurrentAndOlderVersions()
{
int releasesCount = releases.Count;
Version versionCurrent = Assembly.GetExecutingAssembly().GetName().Version;
for (int i = 0; i < releasesCount; i++)
{
string tagName = releases[i]["tag_name"].ToString();
Version versionGitHub = new(tagName.Replace("v", string.Empty));
if (versionGitHub.CompareTo(versionCurrent) < 1)
{
releases.RemoveRange(i, releasesCount - i);
break;
}
}
}
private static void ShowNewVersionOrUpToDateDialog(bool showWhenUpToDate)
{
if (releases.Count > 0)
{
if (NewVersionDialog() == DialogResult.Yes)
{
Log.ProcessStart("https://github.com/Hofknecht/SystemTrayMenu/releases");
}
}
else if (showWhenUpToDate)
{
MessageBox.Show(Translator.GetText("You have the latest version of SystemTrayMenu!"));
}
}
/// <summary>
/// Creates a window to show changelog of new available versions.
/// </summary>
/// <param name="LatestVersionTitle">Name of latest release.</param>
/// <param name="Changelog">Pathnotes.</param>
/// <returns>OK = OK, Yes = Website, else = Cancel.</returns>
private static DialogResult NewVersionDialog()
{
const int ClientPad = 15;
newVersionForm = new()
{
StartPosition = FormStartPosition.CenterScreen,
FormBorderStyle = FormBorderStyle.FixedDialog,
Icon = Config.GetAppIcon(),
ShowInTaskbar = false,
};
newVersionForm.FormBorderStyle = FormBorderStyle.Sizable;
newVersionForm.MaximizeBox = true;
newVersionForm.MinimizeBox = false;
newVersionForm.ClientSize = new Size(600, 400);
newVersionForm.MinimumSize = newVersionForm.ClientSize;
newVersionForm.Text = Translator.GetText("New version available!");
Label label = new()
{
Size = new Size(newVersionForm.ClientSize.Width - ClientPad, 20),
Location = new Point(ClientPad, ClientPad),
Text = $"{Translator.GetText("Latest available version:")} {GetLatestVersionName()}",
};
newVersionForm.Controls.Add(label);
Button buttonOK = new()
{
DialogResult = DialogResult.OK,
Name = "buttonOK",
};
buttonOK.Location = new Point(
newVersionForm.ClientSize.Width - buttonOK.Size.Width - ClientPad,
newVersionForm.ClientSize.Height - buttonOK.Size.Height - ClientPad);
buttonOK.MinimumSize = new Size(75, 23);
buttonOK.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
buttonOK.Text = Translator.GetText("OK");
buttonOK.AutoSizeMode = AutoSizeMode.GrowAndShrink;
buttonOK.AutoSize = true;
newVersionForm.Controls.Add(buttonOK);
Button buttonGoToDownloadPage = new()
{
DialogResult = DialogResult.Yes,
Name = "buttonGoToDownloadPage",
};
buttonGoToDownloadPage.Location = new Point(
newVersionForm.ClientSize.Width - buttonGoToDownloadPage.Size.Width - ClientPad - buttonOK.Size.Width - ClientPad,
newVersionForm.ClientSize.Height - buttonGoToDownloadPage.Size.Height - ClientPad);
buttonGoToDownloadPage.MinimumSize = new Size(75, 23);
buttonGoToDownloadPage.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
buttonGoToDownloadPage.Text = Translator.GetText("Go to download page");
buttonGoToDownloadPage.AutoSizeMode = AutoSizeMode.GrowAndShrink;
buttonGoToDownloadPage.AutoSize = true;
newVersionForm.Controls.Add(buttonGoToDownloadPage);
TextBox textBox = new()
{
Location = new Point(ClientPad, label.Location.Y + label.Size.Height + 5),
};
textBox.Size = new Size(
newVersionForm.ClientSize.Width - (ClientPad * 2),
buttonOK.Location.Y - ClientPad - textBox.Location.Y);
textBox.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
textBox.Multiline = true;
textBox.Text = GetChangelog();
textBox.ReadOnly = true;
textBox.ScrollBars = ScrollBars.Both;
textBox.BackColor = Color.FromKnownColor(KnownColor.Window);
textBox.ForeColor = Color.FromKnownColor(KnownColor.ControlText);
newVersionForm.Controls.Add(textBox);
newVersionForm.AcceptButton = buttonOK;
return newVersionForm.ShowDialog();
}
/// <summary>
/// Returns the latest release version name.
/// </summary>
/// <returns>Version name.</returns>
private static string GetLatestVersionName()
{
string result = "Unknown";
if (releases == null)
{
return result;
}
try
{
result = releases[0]["tag_name"].ToString().Replace("v", string.Empty);
}
catch (Exception ex)
{
Log.Warn($"{nameof(GetLatestVersionName)} failed", ex);
}
return result;
}
/// <summary>
/// Returns the change log from current version up to the latest release version.
/// </summary>
/// <returns>Change log summary or error text.</returns>
private static string GetChangelog()
{
string result = string.Empty;
string errorstr = "An error occurred during update check!" + Environment.NewLine;
if (releases == null)
{
return errorstr + "Could not receive changelog!";
}
try
{
for (int i = 0; i < releases.Count; i++)
{
Dictionary<string, object> release = releases[i];
result += release["name"].ToString()
+ Environment.NewLine
+ release["body_text"].ToString()
.Replace("\n\n", Environment.NewLine)
.Replace("\n \n", Environment.NewLine)
+ Environment.NewLine + Environment.NewLine;
if (i < releases.Count)
{
result += "--------------------------------------------------" +
"-------------------------------------------------------"
+ Environment.NewLine;
}
}
result = result.Replace("\n", Environment.NewLine);
}
catch (Exception ex)
{
Log.Warn($"{nameof(GetChangelog)}", ex);
result = errorstr + ex.Message.ToString();
}
return result;
}
}
}

View file

@ -1,480 +0,0 @@
// <copyright file="JsonParser.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace SystemTrayMenu.Helper.Updater
{
// Copyright (c) 2018 Alex Parker
// Copyright (c) 2018-2019 Peter Kirmeier
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.Serialization;
using System.Text;
// Really simple JSON parser in ~300 lines
// - Attempts to parse JSON files with minimal GC allocation
// - Nice and simple "[1,2,3]".FromJson<List<int>>() API
// - Classes and structs can be parsed too!
// class Foo { public int Value; }
// "{\"Value\":10}".FromJson<Foo>()
// - Can parse JSON without type information into Dictionary<string,object> and List<object> e.g.
// "[1,2,3]".FromJson<object>().GetType() == typeof(List<object>)
// "{\"Value\":10}".FromJson<object>().GetType() == typeof(Dictionary<string,object>)
// - No JIT Emit support to support AOT compilation on iOS
// - Attempts are made to NOT throw an exception if the JSON is corrupted or invalid: returns null instead.
// - Only public fields and property setters on classes/structs will be written to
//
// Limitations:
// - No JIT Emit support to parse structures quickly
// - Limited to parsing <2GB JSON files (due to int.MaxValue)
// - Parsing of abstract classes or interfaces is NOT supported and will throw an exception.
public static class JSONParser
{
[ThreadStatic]
private static Stack<List<string>> splitArrayPool;
[ThreadStatic]
private static StringBuilder stringBuilder;
[ThreadStatic]
private static Dictionary<Type, Dictionary<string, FieldInfo>> fieldInfoCache;
[ThreadStatic]
private static Dictionary<Type, Dictionary<string, PropertyInfo>> propertyInfoCache;
public static T FromJson<T>(this string json)
{
// Initialize, if needed, the ThreadStatic variables
propertyInfoCache ??= new Dictionary<Type, Dictionary<string, PropertyInfo>>();
fieldInfoCache ??= new Dictionary<Type, Dictionary<string, FieldInfo>>();
stringBuilder ??= new StringBuilder();
splitArrayPool ??= new Stack<List<string>>();
// Remove all whitespace not within strings to make parsing simpler
stringBuilder.Length = 0;
for (int i = 0; i < json.Length; i++)
{
char c = json[i];
if (c == '"')
{
i = AppendUntilStringEnd(true, i, json);
continue;
}
if (char.IsWhiteSpace(c))
{
continue;
}
stringBuilder.Append(c);
}
// Parse the thing!
return (T)ParseValue(typeof(T), stringBuilder.ToString());
}
internal static object ParseValue(Type type, string json)
{
if (type == typeof(string))
{
if (json.Length <= 2)
{
return string.Empty;
}
StringBuilder parseStringBuilder = new(json.Length);
for (int i = 1; i < json.Length - 1; ++i)
{
if (json[i] == '\\' && i + 1 < json.Length - 1)
{
int j = "\"\\nrtbf/".IndexOf(json[i + 1]);
if (j >= 0)
{
parseStringBuilder.Append("\"\\\n\r\t\b\f/"[j]);
++i;
continue;
}
if (json[i + 1] == 'u' && i + 5 < json.Length - 1)
{
if (uint.TryParse(json.AsSpan(i + 2, 4), System.Globalization.NumberStyles.AllowHexSpecifier, null, out uint c))
{
parseStringBuilder.Append((char)c);
i += 5;
continue;
}
}
}
parseStringBuilder.Append(json[i]);
}
return parseStringBuilder.ToString();
}
if (type.IsPrimitive)
{
var result = Convert.ChangeType(json, type, System.Globalization.CultureInfo.InvariantCulture);
return result;
}
if (type == typeof(decimal))
{
decimal.TryParse(json, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out decimal result);
return result;
}
if (json == "null")
{
return null;
}
if (type.IsEnum)
{
if (json[0] == '"')
{
json = json[1..^1];
}
try
{
return Enum.Parse(type, json, false);
}
catch
{
return 0;
}
}
if (type.IsArray)
{
Type arrayType = type.GetElementType();
if (json[0] != '[' || json[^1] != ']')
{
return null;
}
List<string> elems = Split(json);
Array newArray = Array.CreateInstance(arrayType, elems.Count);
for (int i = 0; i < elems.Count; i++)
{
newArray.SetValue(ParseValue(arrayType, elems[i]), i);
}
splitArrayPool.Push(elems);
return newArray;
}
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(List<>))
{
Type listType = type.GetGenericArguments()[0];
if (json[0] != '[' || json[^1] != ']')
{
return null;
}
List<string> elems = Split(json);
var list = (IList)type.GetConstructor(new Type[] { typeof(int) }).Invoke(new object[] { elems.Count });
for (int i = 0; i < elems.Count; i++)
{
list.Add(ParseValue(listType, elems[i]));
}
splitArrayPool.Push(elems);
return list;
}
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Dictionary<,>))
{
Type keyType, valueType;
{
Type[] args = type.GetGenericArguments();
keyType = args[0];
valueType = args[1];
}
// Refuse to parse dictionary keys that aren't of type string
if (keyType != typeof(string))
{
return null;
}
// Must be a valid dictionary element
if (json[0] != '{' || json[^1] != '}')
{
return null;
}
// The list is split into key/value pairs only, this means the split must be divisible by 2 to be valid JSON
List<string> elems = Split(json);
if (elems.Count % 2 != 0)
{
return null;
}
var dictionary = (IDictionary)type.GetConstructor(new Type[] { typeof(int) }).Invoke(new object[] { elems.Count / 2 });
for (int i = 0; i < elems.Count; i += 2)
{
if (elems[i].Length <= 2)
{
continue;
}
string keyValue = elems[i][1..^1];
object val = ParseValue(valueType, elems[i + 1]);
dictionary.Add(keyValue, val);
}
return dictionary;
}
if (type == typeof(object))
{
return ParseAnonymousValue(json);
}
if (json[0] == '{' && json[^1] == '}')
{
return ParseObject(type, json);
}
return null;
}
private static int AppendUntilStringEnd(bool appendEscapeCharacter, int startIdx, string json)
{
stringBuilder.Append(json[startIdx]);
for (int i = startIdx + 1; i < json.Length; i++)
{
if (json[i] == '\\')
{
if (appendEscapeCharacter)
{
stringBuilder.Append(json[i]);
}
stringBuilder.Append(json[i + 1]);
i++; // Skip next character as it is escaped
}
else if (json[i] == '"')
{
stringBuilder.Append(json[i]);
return i;
}
else
{
stringBuilder.Append(json[i]);
}
}
return json.Length - 1;
}
// Splits { <value>:<value>, <value>:<value> } and [ <value>, <value> ] into a list of <value> strings
private static List<string> Split(string json)
{
List<string> splitArray = splitArrayPool.Count > 0 ? splitArrayPool.Pop() : new List<string>();
splitArray.Clear();
if (json.Length == 2)
{
return splitArray;
}
int parseDepth = 0;
stringBuilder.Length = 0;
for (int i = 1; i < json.Length - 1; i++)
{
switch (json[i])
{
case '[':
case '{':
parseDepth++;
break;
case ']':
case '}':
parseDepth--;
break;
case '"':
i = AppendUntilStringEnd(true, i, json);
continue;
case ',':
case ':':
if (parseDepth == 0)
{
splitArray.Add(stringBuilder.ToString());
stringBuilder.Length = 0;
continue;
}
break;
}
stringBuilder.Append(json[i]);
}
splitArray.Add(stringBuilder.ToString());
return splitArray;
}
private static object ParseAnonymousValue(string json)
{
if (json.Length == 0)
{
return null;
}
if (json[0] == '{' && json[^1] == '}')
{
List<string> elems = Split(json);
if (elems.Count % 2 != 0)
{
return null;
}
var dict = new Dictionary<string, object>(elems.Count / 2);
for (int i = 0; i < elems.Count; i += 2)
{
dict.Add(elems[i][1..^1], ParseAnonymousValue(elems[i + 1]));
}
return dict;
}
if (json[0] == '[' && json[^1] == ']')
{
List<string> items = Split(json);
var finalList = new List<object>(items.Count);
for (int i = 0; i < items.Count; i++)
{
finalList.Add(ParseAnonymousValue(items[i]));
}
return finalList;
}
if (json[0] == '"' && json[^1] == '"')
{
return ParseValue(typeof(string), json); // fix https://github.com/zanders3/json/issues/29
}
if (char.IsDigit(json[0]) || json[0] == '-')
{
if (json.Contains('.'))
{
double.TryParse(json, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out double result);
return result;
}
else
{
_ = int.TryParse(json, out int result);
return result;
}
}
if (json == "true")
{
return true;
}
if (json == "false")
{
return false;
}
// handles json == "null" as well as invalid JSON
return null;
}
private static Dictionary<string, T> CreateMemberNameDictionary<T>(T[] members)
where T : MemberInfo
{
Dictionary<string, T> nameToMember = new(StringComparer.OrdinalIgnoreCase);
for (int i = 0; i < members.Length; i++)
{
/*T member = members[i];
if (member.IsDefined(typeof(IgnoreDataMemberAttribute), true))
continue;
string name = member.Name;
if (member.IsDefined(typeof(DataMemberAttribute), true))
{
DataMemberAttribute dataMemberAttribute = (DataMemberAttribute)Attribute.GetCustomAttribute(member, typeof(DataMemberAttribute), true);
if (!string.IsNullOrEmpty(dataMemberAttribute.Name))
name = dataMemberAttribute.Name;
}
nameToMember.Add(name, member);*/
// The above code is not working with .Net framework 2.0, so we ignore these attributes for compatibility reasons:
nameToMember.Add(members[i].Name, members[i]);
}
return nameToMember;
}
private static object ParseObject(Type type, string json)
{
object instance = FormatterServices.GetUninitializedObject(type);
// The list is split into key/value pairs only, this means the split must be divisible by 2 to be valid JSON
List<string> elems = Split(json);
if (elems.Count % 2 != 0)
{
return instance;
}
if (!fieldInfoCache.TryGetValue(type, out Dictionary<string, FieldInfo> nameToField))
{
nameToField = CreateMemberNameDictionary(type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.FlattenHierarchy));
fieldInfoCache.Add(type, nameToField);
}
if (!propertyInfoCache.TryGetValue(type, out Dictionary<string, PropertyInfo> nameToProperty))
{
nameToProperty = CreateMemberNameDictionary(type.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.FlattenHierarchy));
propertyInfoCache.Add(type, nameToProperty);
}
for (int i = 0; i < elems.Count; i += 2)
{
if (elems[i].Length <= 2)
{
continue;
}
string key = elems[i][1..^1];
string value = elems[i + 1];
if (nameToField.TryGetValue(key, out FieldInfo fieldInfo))
{
fieldInfo.SetValue(instance, ParseValue(fieldInfo.FieldType, value));
}
else if (nameToProperty.TryGetValue(key, out PropertyInfo propertyInfo))
{
propertyInfo.SetValue(instance, ParseValue(propertyInfo.PropertyType, value), null);
}
}
return instance;
}
}
}

View file

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

View file

@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
TAMAHO SystemTrayMenu - browse and open your files easily
Copyright (C) 2022 Markus Hofknecht
Copyright (C) 2021 Markus Hofknecht
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -652,7 +652,7 @@ You can contact me by mail Markus@Hofknecht.eu
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
TAMAHO SystemTrayMenu Copyright (C) 2022 Markus Hofknecht
TAMAHO SystemTrayMenu Copyright (C) 2021 Markus Hofknecht
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

View file

@ -1,40 +0,0 @@
// <copyright file="CreateRoundRectRgn.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace SystemTrayMenu.DllImports
{
using System;
using System.Runtime.InteropServices;
/// <summary>
/// wraps the methodcalls to native windows dll's.
/// </summary>
public static partial class NativeMethods
{
public static bool GetRegionRoundCorners(int width, int height, int widthEllipse, int heightEllipse, out System.Drawing.Region region)
{
bool success = false;
region = null;
IntPtr handle = CreateRoundRectRgn(0, 0, width, height, widthEllipse, heightEllipse);
if (handle != IntPtr.Zero)
{
region = System.Drawing.Region.FromHrgn(handle);
_ = DeleteObject(handle);
success = true;
}
return success;
}
[DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn", SetLastError = true, CharSet = CharSet.Unicode)]
private static extern IntPtr CreateRoundRectRgn(
int nLeftRect, // x-coordinate of upper-left corner
int nTopRect, // y-coordinate of upper-left corner
int nRightRect, // x-coordinate of lower-right corner
int nBottomRect, // y-coordinate of lower-right corner
int nWidthEllipse, // width of ellipse
int nHeightEllipse); // height of ellipse
}
}

View file

@ -1,4 +1,4 @@
// <copyright file="DeleteObject.cs" company="PlaceholderCompany">
// <copyright file="GetDeviceCaps.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
@ -12,8 +12,13 @@ namespace SystemTrayMenu.DllImports
/// </summary>
public static partial class NativeMethods
{
public static int Gdi32GetDeviceCaps(IntPtr hdc, int nIndex)
{
return GetDeviceCaps(hdc, nIndex);
}
[DllImport("gdi32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
[DefaultDllImportSearchPaths(DllImportSearchPath.UserDirectories)]
private static extern int DeleteObject(IntPtr hIcon);
private static extern int GetDeviceCaps(IntPtr hdc, int nIndex);
}
}

View file

@ -12,6 +12,7 @@ namespace SystemTrayMenu.DllImports
/// </summary>
public static partial class NativeMethods
{
#pragma warning disable SA1600 // Elements should be documented
public const uint ShgfiIcon = 0x000000100; // get icon
public const uint ShgfiSYSICONINDEX = 0x000004000; // get system icon index
public const uint ShgfiLINKOVERLAY = 0x000008000; // put a link overlay on icon
@ -21,6 +22,16 @@ namespace SystemTrayMenu.DllImports
public const uint FileAttributeDirectory = 0x00000010;
public const uint FileAttributeNormal = 0x00000080;
public const int IldTransparent = 0x00000001;
#pragma warning restore SA1600 // Elements should be documented
/// <summary>
/// comctl32 ImageList_GetIcon(IntPtr hIcon).
/// </summary>
/// <param name="hIcon">hIcon.</param>
public static void Comctl32ImageListGetIcon(IntPtr hIcon)
{
_ = DestroyIcon(hIcon);
}
/// <summary>
/// comctl32 ImageList_GetIcon(IntPtr himl, int i, int flags).

View file

@ -0,0 +1,25 @@
// <copyright file="GetMenuDefaultItem.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace SystemTrayMenu.DllImports
{
using System;
using System.Runtime.InteropServices;
/// <summary>
/// wraps the methodcalls to native windows dll's.
/// </summary>
public static partial class NativeMethods
{
public static int User32GetMenuDefaultItem(IntPtr hMenu, bool fByPos, uint gmdiFlags)
{
return GetMenuDefaultItem(hMenu, fByPos, gmdiFlags);
}
// Determines the default menu item on the specified menu
[DllImport("user32", SetLastError = true, CharSet = CharSet.Unicode)]
[DefaultDllImportSearchPaths(DllImportSearchPath.UserDirectories)]
private static extern int GetMenuDefaultItem(IntPtr hMenu, bool fByPos, uint gmdiFlags);
}
}

View file

@ -18,6 +18,7 @@ namespace SystemTrayMenu.DllImports
[Flags]
internal enum TPM : uint
{
#pragma warning disable SA1602 // Enumeration items should be documented
LEFTBUTTON = 0x0000, // LEFTALIGN = 0x0000, // TOPALIGN = 0x0000, // HORIZONTAL = 0x0000,
RIGHTBUTTON = 0x0002,
CENTERALIGN = 0x0004,
@ -34,6 +35,7 @@ namespace SystemTrayMenu.DllImports
VERNEGANIMATION = 0x2000,
NOANIMATION = 0x4000,
LAYOUTRTL = 0x8000,
#pragma warning restore SA1602 // Enumeration items should be documented
}
/// <summary>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 B

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 B

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 860 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 KiB

After

Width:  |  Height:  |  Size: 472 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 732 B

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 732 B

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 517 B

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 883 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View file

@ -3,14 +3,13 @@
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
<Identity
Name="49543SystemTrayMenu.SystemTrayMenu"
Publisher="CN=5884501C-92ED-45DE-9508-9D987C314243"
Version="1.3.5.0" />
Version="1.0.19.0" />
<Properties>
<DisplayName>SystemTrayMenu</DisplayName>
@ -41,15 +40,6 @@
<uap:SplashScreen Image="Images\SplashScreen.png" />
<uap:LockScreen BadgeLogo="Images\BadgeLogo.png" Notification="badge"/>
</uap:VisualElements>
<Extensions>
<uap5:Extension
Category="windows.startupTask">
<uap5:StartupTask
TaskId="MyStartupId"
Enabled="false"
DisplayName="SystemTrayMenu" />
</uap5:Extension>
</Extensions>
</Application>
</Applications>

View file

@ -47,18 +47,17 @@
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
<PropertyGroup>
<ProjectGuid>01d77f37-786a-4dc4-a1ad-bc1eec54eae3</ProjectGuid>
<TargetPlatformVersion>10.0.22000.0</TargetPlatformVersion>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<DefaultLanguage>en-US</DefaultLanguage>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
<AppxBundlePlatforms>x86|x64</AppxBundlePlatforms>
<AppxSymbolPackageEnabled>True</AppxSymbolPackageEnabled>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppxPackageDir>C:\Users\Marku\Desktop\</AppxPackageDir>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
<EntryPointProjectUniqueName>..\SystemTrayMenu.csproj</EntryPointProjectUniqueName>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
<AppxBundlePlatforms>x86|x64</AppxBundlePlatforms>
<AppInstallerUri>https://github.com/Hofknecht/SystemTrayMenu/releases</AppInstallerUri>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<AppxBundle>Always</AppxBundle>
@ -92,12 +91,6 @@
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>
<ItemGroup>
<None Include="Package.StoreAssociation.xml" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<Content Include="Images\BadgeLogo.scale-100.png" />
<Content Include="Images\BadgeLogo.scale-125.png" />
@ -118,6 +111,7 @@
<Content Include="Images\SplashScreen.scale-125.png" />
<Content Include="Images\SplashScreen.scale-150.png" />
<Content Include="Images\SplashScreen.scale-200.png" />
<Content Include="Images\LockScreenLogo.scale-200.png" />
<Content Include="Images\SplashScreen.scale-400.png" />
<Content Include="Images\Square150x150Logo.scale-100.png" />
<Content Include="Images\Square150x150Logo.scale-125.png" />
@ -130,7 +124,6 @@
<Content Include="Images\Square44x44Logo.altform-lightunplated_targetsize-32.png" />
<Content Include="Images\Square44x44Logo.altform-lightunplated_targetsize-48.png" />
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-16.png" />
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-24.png" />
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-256.png" />
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-32.png" />
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-48.png" />
@ -141,6 +134,7 @@
<Content Include="Images\Square44x44Logo.scale-400.png" />
<Content Include="Images\Square44x44Logo.targetsize-16.png" />
<Content Include="Images\Square44x44Logo.targetsize-24.png" />
<Content Include="Images\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Images\Square44x44Logo.targetsize-256.png" />
<Content Include="Images\Square44x44Logo.targetsize-32.png" />
<Content Include="Images\Square44x44Logo.targetsize-48.png" />
@ -154,9 +148,12 @@
<Content Include="Images\Wide310x150Logo.scale-150.png" />
<Content Include="Images\Wide310x150Logo.scale-200.png" />
<Content Include="Images\Wide310x150Logo.scale-400.png" />
<None Include="Package.StoreAssociation.xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SystemTrayMenu.csproj" />
<ProjectReference Include="..\SystemTrayMenu.csproj">
<SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties>
</ProjectReference>
</ItemGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
</Project>

View file

@ -14,7 +14,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("TAMAHO")]
[assembly: AssemblyProduct("TAMAHO SystemTrayMenu")]
[assembly: AssemblyCopyright("Copyright © 2022, TAMAHO SystemTrayMenu")]
[assembly: AssemblyCopyright("Copyright © 2021, TAMAHO SystemTrayMenu")]
[assembly: AssemblyTrademark("TAMAHO")]
[assembly: AssemblyCulture("")]
@ -39,5 +39,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.5.0")]
[assembly: AssemblyFileVersion("1.3.5.0")]
[assembly: AssemblyVersion("1.0.19.0")]
[assembly: AssemblyFileVersion("1.0.19.0")]

View file

@ -43,10 +43,6 @@ namespace SystemTrayMenu.Properties
$"SystemTrayMenu"),
$"user-{Environment.MachineName}.config");
public static string ConfigPathAssembly => Path.Combine(
Directory.GetParent(Assembly.GetEntryAssembly().Location).FullName,
$"user.config");
/// <summary>
/// Gets or sets override.
/// </summary>
@ -60,6 +56,10 @@ namespace SystemTrayMenu.Properties
}
}
private static string ConfigPathAssembly => Path.Combine(
Directory.GetParent(Assembly.GetEntryAssembly().Location).FullName,
$"user.config");
/// <summary>
/// Gets or sets in memory storage of the settings values.
/// </summary>
@ -116,12 +116,12 @@ namespace SystemTrayMenu.Properties
}
// collection that will be returned.
SettingsPropertyValueCollection values = new();
SettingsPropertyValueCollection values = new SettingsPropertyValueCollection();
// 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(setting)
SettingsPropertyValue value = new SettingsPropertyValue(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 setting = new SettingStruct()
{
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();
XDeclaration declaration = new("1.0", "utf-8", "true");
XElement config = new(Config);
XElement userSettings = new(UserSettings);
XElement group = new(typeof(Settings).FullName);
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);
userSettings.Add(group);
config.Add(userSettings);
doc.Add(config);
@ -222,31 +222,6 @@ namespace SystemTrayMenu.Properties
return isconfigPathAssembly;
}
private static XDocument LoadOrGetNew(string path)
{
XDocument xDocument = null;
try
{
xDocument = XDocument.Load(path);
}
catch (Exception exceptionWarning)
{
Log.Warn($"Could not load {path}", exceptionWarning);
try
{
File.Delete(path);
CreateEmptyConfigIfNotExists(path);
xDocument = XDocument.Load(path);
}
catch (Exception exceptionError)
{
Log.Error($"Could not delete and create {path}", exceptionError);
}
}
return xDocument;
}
/// <summary>
/// Loads the values of the file into memory.
/// </summary>
@ -258,30 +233,27 @@ namespace SystemTrayMenu.Properties
XDocument configXml;
if (IsConfigPathAssembly())
{
configXml = LoadOrGetNew(ConfigPathAssembly);
configXml = XDocument.Load(ConfigPathAssembly);
}
else
{
configXml = LoadOrGetNew(UserConfigPath);
configXml = XDocument.Load(UserConfigPath);
}
if (configXml != null)
{
// get all of the <setting name="..." serializeAs="..."> elements.
IEnumerable<XElement> settingElements = configXml.Element(Config).Element(UserSettings).Element(typeof(Settings).FullName).Elements(Setting);
// get all of the <setting name="..." serializeAs="..."> elements.
IEnumerable<XElement> settingElements = configXml.Element(Config).Element(UserSettings).Element(typeof(Settings).FullName).Elements(Setting);
// iterate through, adding them to the dictionary, (checking for nulls, xml no likey nulls)
// using "String" as default serializeAs...just in case, no real good reason.
foreach (XElement element in settingElements)
// iterate through, adding them to the dictionary, (checking for nulls, xml no likey nulls)
// 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,
Value = element.Value ?? string.Empty,
};
SettingsDictionary.Add(element.Attribute(NameOf).Value, newSetting);
}
Name = element.Attribute(NameOf) == null ? string.Empty : element.Attribute(NameOf).Value,
SerializeAs = element.Attribute(SerializeAs) == null ? "String" : element.Attribute(SerializeAs).Value,
Value = element.Value ?? string.Empty,
};
SettingsDictionary.Add(element.Attribute(NameOf).Value, newSetting);
}
}
@ -291,48 +263,45 @@ namespace SystemTrayMenu.Properties
private void SaveValuesToFile()
{
// load the current xml from the file.
XDocument configXml;
XDocument import;
if (IsConfigPathAssembly())
{
configXml = LoadOrGetNew(ConfigPathAssembly);
import = XDocument.Load(ConfigPathAssembly);
}
else
{
configXml = LoadOrGetNew(UserConfigPath);
import = XDocument.Load(UserConfigPath);
}
if (configXml != null)
// get the settings group (e.g. <Company.Project.Desktop.Settings>)
XElement settingsSection = import.Element(Config).Element(UserSettings).Element(typeof(Settings).FullName);
// iterate though the dictionary, either updating the value or adding the new setting.
foreach (KeyValuePair<string, SettingStruct> entry in SettingsDictionary)
{
// get the settings group (e.g. <Company.Project.Desktop.Settings>)
XElement settingsSection = configXml.Element(Config).Element(UserSettings).Element(typeof(Settings).FullName);
// iterate though the dictionary, either updating the value or adding the new setting.
foreach (KeyValuePair<string, SettingStruct> entry in SettingsDictionary)
XElement setting = settingsSection.Elements().FirstOrDefault(e => e.Attribute(NameOf).Value == entry.Key);
if (setting == null)
{
XElement setting = settingsSection.Elements().FirstOrDefault(e => e.Attribute(NameOf).Value == entry.Key);
if (setting == null)
{
// this can happen if a new setting is added via the .settings designer.
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;
settingsSection.Add(newSetting);
}
else
{
// update the value if it exists.
setting.Value = entry.Value.Value ?? string.Empty;
}
// this can happen if a new setting is added via the .settings designer.
XElement newSetting = new XElement(Setting);
newSetting.Add(new XAttribute(NameOf, entry.Value.Name));
newSetting.Add(new XAttribute(SerializeAs, entry.Value.SerializeAs));
newSetting.Value = entry.Value.Value ?? string.Empty;
settingsSection.Add(newSetting);
}
if (IsConfigPathAssembly())
else
{
configXml.Save(ConfigPathAssembly);
// update the value if it exists.
setting.Value = entry.Value.Value ?? string.Empty;
}
configXml.Save(UserConfigPath);
}
if (IsConfigPathAssembly())
{
import.Save(ConfigPathAssembly);
}
import.Save(UserConfigPath);
}
/// <summary>

View file

@ -19,7 +19,7 @@ namespace SystemTrayMenu.Properties {
// 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.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
@ -63,9 +63,19 @@ namespace SystemTrayMenu.Properties {
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] ic_fluent_arrow_sync_24_regular {
public static byte[] ic_fluent_document_48_regular {
get {
object obj = ResourceManager.GetObject("ic_fluent_arrow_sync_24_regular", resourceCulture);
object obj = ResourceManager.GetObject("ic_fluent_document_48_regular", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
public static byte[] ic_fluent_folder_48_regular {
get {
object obj = ResourceManager.GetObject("ic_fluent_folder_48_regular", resourceCulture);
return ((byte[])(obj));
}
}
@ -111,21 +121,181 @@ namespace SystemTrayMenu.Properties {
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static byte[] ic_fluent_settings_28_regular {
public static System.Drawing.Icon L010 {
get {
object obj = ResourceManager.GetObject("ic_fluent_settings_28_regular", resourceCulture);
return ((byte[])(obj));
object obj = ResourceManager.GetObject("L010", 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 LinkArrow {
public static System.Drawing.Icon L020 {
get {
object obj = ResourceManager.GetObject("LinkArrow", resourceCulture);
object obj = ResourceManager.GetObject("L020", 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 L030 {
get {
object obj = ResourceManager.GetObject("L030", 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 L040 {
get {
object obj = ResourceManager.GetObject("L040", 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 L050 {
get {
object obj = ResourceManager.GetObject("L050", 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 L060 {
get {
object obj = ResourceManager.GetObject("L060", 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 L070 {
get {
object obj = ResourceManager.GetObject("L070", 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 L080 {
get {
object obj = ResourceManager.GetObject("L080", 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 L090 {
get {
object obj = ResourceManager.GetObject("L090", 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 L100 {
get {
object obj = ResourceManager.GetObject("L100", 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 L110 {
get {
object obj = ResourceManager.GetObject("L110", 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 L120 {
get {
object obj = ResourceManager.GetObject("L120", 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 L130 {
get {
object obj = ResourceManager.GetObject("L130", 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 L140 {
get {
object obj = ResourceManager.GetObject("L140", 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 L150 {
get {
object obj = ResourceManager.GetObject("L150", 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 L160 {
get {
object obj = ResourceManager.GetObject("L160", 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 L170 {
get {
object obj = ResourceManager.GetObject("L170", 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 L180 {
get {
object obj = ResourceManager.GetObject("L180", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
@ -150,6 +320,16 @@ namespace SystemTrayMenu.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon search {
get {
object obj = ResourceManager.GetObject("search", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>

View file

@ -118,37 +118,91 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="L080" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingIcon\L080.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="L020" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingIcon\L020.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="L070" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingIcon\L070.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="L140" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingIcon\L140.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="L160" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingIcon\L160.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="L100" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingIcon\L100.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="L060" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingIcon\L060.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="L180" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingIcon\L180.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="White50Percentage" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\White50Percentage.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="L150" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingIcon\L150.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="L120" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingIcon\L120.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="L170" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingIcon\L170.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<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="L090" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingIcon\L090.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="L040" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingIcon\L040.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="L010" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingIcon\L010.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="L030" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingIcon\L030.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="L050" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingIcon\L050.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="L130" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingIcon\L130.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="L110" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingIcon\L110.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="search" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\search.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_folder_48_regular" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ic_fluent_folder_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_document_48_regular" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ic_fluent_document_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 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>
</root>

File diff suppressed because it is too large Load diff

330
README.md
View file

@ -1,201 +1,72 @@
SystemTrayMenu<img src="https://raw.githubusercontent.com/Hofknecht/SystemTrayMenu/master/Resources/SystemTrayMenu.ico" alt="Trulli" width="24" height="24">
------------------
[![Build Status](https://dev.azure.com/MarkusHofknecht/SystemTrayMenu/_apis/build/status/Hofknecht.SystemTrayMenu?branchName=master)](https://dev.azure.com/MarkusHofknecht/SystemTrayMenu/_build)
[![Build Version](https://img.shields.io/github/v/release/hofknecht/systemtraymenu)](https://github.com/Hofknecht/SystemTrayMenu/releases)
[![GitHub](https://github.com/favicon.ico)](https://github.com/Hofknecht/SystemTrayMenu/releases) [![Downloads GitHub](https://img.shields.io/github/downloads/Hofknecht/SystemTrayMenu/total.svg)](https://github.com/Hofknecht/SystemTrayMenu/releases)&nbsp;[![SourceForge](https://user-images.githubusercontent.com/52528841/89990756-1aff8000-dc83-11ea-828a-a70a4d567399.png)](https://sourceforge.net/projects/systemtraymenu/files/latest/download) [![Downloads SourceForge](https://img.shields.io/sourceforge/dt/systemtraymenu.svg)](https://sourceforge.net/projects/systemtraymenu/files/latest/download)&nbsp;[![MicrosoftStore](https://user-images.githubusercontent.com/52528841/88452959-371db780-ce63-11ea-9076-11920156456a.png)](https://www.microsoft.com/store/apps/9N24F8ZBJMT1) [![CHIP](https://user-images.githubusercontent.com/52528841/88452975-5583b300-ce63-11ea-8256-6e69a2bb3e2d.png)](https://www.chip.de/downloads/SystemTrayMenu_182854219.html) [![computerbild](https://user-images.githubusercontent.com/52528841/121583122-2735a480-ca30-11eb-82a4-b4f6054e4d8f.png)](https://www.computerbild.de/download/SystemTrayMenu-26748523.html) [![netzwelt](https://user-images.githubusercontent.com/52528841/121585548-015dcf00-ca33-11eb-8436-b1f5231d5c2d.png)](https://www.netzwelt.de/download/25705-systemtraymenu.html) [![softpedia](https://user-images.githubusercontent.com/52528841/121581852-a033fc80-ca2e-11eb-8aee-4a8cd3043bd1.png)](https://www.softpedia.com/get/System/Launchers-Shutdown-Tools/SystemTrayMenu.shtml) [![softonic](https://user-images.githubusercontent.com/52528841/121586781-5a7a3280-ca34-11eb-8a03-618b4661f859.png)](https://systemtraymenu.en.softonic.com/) [![heise](https://user-images.githubusercontent.com/52528841/125174840-53c41400-e1c8-11eb-8992-2de3e078c7b2.png)](https://www.heise.de/download/product/systemtraymenu) [![majorgeeks](https://user-images.githubusercontent.com/52528841/116281616-2d2a3b80-a78a-11eb-948c-bde9a8ccb1ed.png)](https://www.majorgeeks.com/files/details/systemtraymenu.html) [![downloaddrivers](https://user-images.githubusercontent.com/52528841/116524789-0f6aec80-a8d8-11eb-9037-06b2c101fa72.png)](https://www.downloaddrivers.info/download-systemtraymenu-1-0-17-43/) [![baominh](https://user-images.githubusercontent.com/52528841/120082388-0c277400-c0c3-11eb-97c8-ee35e692b38d.png)](https://baominh.tech/systemtraymenu-tao-menu-start-tuy-chinh-duoi-khai-he-thong.html)[![rjno1](https://user-images.githubusercontent.com/52528841/121582195-04ef5700-ca2f-11eb-9c22-cf8239c6e99b.png)](https://www.rjno1.com/systemtraymenu/) [![geekotg](https://user-images.githubusercontent.com/52528841/121582114-eb4e0f80-ca2e-11eb-814d-fbe3a864676b.png)](http://www.geekotg.com/pc/48484.html) [![softaro](https://user-images.githubusercontent.com/52528841/121581997-c9548d00-ca2e-11eb-9145-fab017925475.png)](https://softaro.net/systemtraymenu/) [![rsload](https://user-images.githubusercontent.com/52528841/121584316-a1b2f400-ca31-11eb-8a90-242b9ba80dc4.png)](https://rsload.net/soft/desktop/35219-systemtraymenu.html) [![mirsofta](https://user-images.githubusercontent.com/52528841/121584682-0706e500-ca32-11eb-8629-4599579a1620.png)](https://mirsofta.ru/index.php?id=1623024195)
<!-- [![Gitter](https://badges.gitter.im/SystemTrayMenu/community.svg)](https://gitter.im/SystemTrayMenu/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -->
<!--
[![Windows 11 neues Startmenü hinzufügen! - SystemTrayMenu _ PathTM - YouTube](https://user-images.githubusercontent.com/52528841/145684486-44e98d8f-c2ba-42fa-837d-91a6a397549a.png)](https://www.youtube.com/watch?v=xsi4Uv3-ZLg)
-->
[![Release](https://img.shields.io/github/v/release/hofknecht/systemtraymenu?label=Download%20release%20(click%20here))](https://github.com/Hofknecht/SystemTrayMenu/releases)
[![Tweet](https://img.shields.io/badge/Tweet-blue&logo=twitter?&labelColor=white&logo=twitter&color=white)](https://twitter.com/intent/tweet?text=SystemTrayMenu%20is%20an%20open-source%20%27Desktop%20Toolbar%27%20or%20%27Start%20Menu%27%20alternative.%20It%20offers%20a%20clear%2C%20personalized%20menu%20which%20can%20be%20opened%20via%20keyboard%20or%20mouse.%20Files%2C%20links%20and%20folders%20are%20organized%20in%20several%20levels%20as%20drop-down%20menus.%0A%0Ahttps%3A%2F%2Fgithub.com%2FHofknecht%2FSystemTrayMenu%23systemtraymenu%0A%0A)
[![Facebook](https://img.shields.io/badge/Share-blue&logo=facebook?&labelColor=white&logo=facebook&color=white)](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fgithub.com%2FHofknecht%2FSystemTrayMenu%23systemtraymenu%0A%0ASystemTrayMenu)
SystemTrayMenu&nbsp;<img src="https://raw.githubusercontent.com/Hofknecht/SystemTrayMenu/master/Resources/SystemTrayMenu.ico" alt="Trulli" width="32" height="32" align="left">
------------------
**Browse and open your files easily**
SystemTrayMenu is an open source 'Desktop Toolbar' or 'Start Menu' alternative. It offers a clear, personalized menu which can be controlled via keyboard, mouse or touchscreen. Files, links and folders are organized in several levels as dropdown menus. Various options like appearance, hotkey, autostart and behavior can be adjusted.
SystemTrayMenu is a free, open-source start menu alternative for Microsoft Windows. It offers a clear, personalized menu in the system tray. Files, links and folders are organized in several levels as drop-down menus.
* Shortcuts to folders or to network paths are resolved. Their content is displayed like a folder.
* The search function allows you to define hotkey sequences to find and open items.
* The menu stays open, if starting several applications and mouse still on the menu or if a script steals the focus for a short time.
* Menu appears transparent in case it has no focus and closes automatically when you leave the menu.
* A scrollbar appears when there are too many items, which can also be controlled via mouse wheel.
* Supports drag and drop to open an item with an application or to copy it to the desktop.
* There is a possiblity to create URL shortcuts including the browser icon via drag and drop the URL from the browser into the menu.
We are using C# and .Net Core 3.1
**Controlled via keyboard and like the 'Start Menu' - Demo**
![20200812_125923](https://user-images.githubusercontent.com/52528841/90009201-ee0c9680-dc9d-11ea-9b8a-b34108152f9b.gif)
![20200812_130823](https://user-images.githubusercontent.com/52528841/90009212-f1078700-dc9d-11ea-943a-d5fde4d6f2dc.gif)
![20220311_182732 (2)](https://user-images.githubusercontent.com/52528841/157929743-2ba4d11b-e0b1-4ab1-8eee-a2a7ff631adf.gif)
**Controlled via mouse and like the 'Desktop Toolbar' - Demo**
![20220311_183519 (1)](https://user-images.githubusercontent.com/52528841/157929241-1906b180-3839-425a-bc71-5486a1d54156.gif)
Keyboard shortcuts
Download the latest official version:
https://github.com/Hofknecht/SystemTrayMenu/releases
Blogs and reviews
------------------
| Shortcut | Function |
|-------------------------------------------------------|---------------------------------------|
| <kbd>Ctrl</kbd>+<kbd>Win</kbd> | Open SystemTrayMenu (Shortcut can be configured) |
| <kbd>&#8593;</kbd>/<kbd>&#8595;</kbd> | Navigate items within a menu |
| <kbd>&#8592;</kbd>/<kbd>&#8594;</kbd> | Navigate through menus |
| <kbd>Return</kbd> | Open selected item |
| <kbd>Apps</kbd> | Open Explorer Context Menu |
| <kbd>Tab</kbd> | Switch to next/previous menu (also via <kbd>Shift</kbd>+<kbd>Tab</kbd>) |
| <kbd>Esc</kbd> | Close SystemTrayMenu |
Sources
------------------
[![GitHub all releases](https://img.shields.io/github/downloads/Hofknecht/SystemTrayMenu/total?label=GitHub)](https://github.com/Hofknecht/SystemTrayMenu/releases)
[![Downloads SourceForge](https://img.shields.io/sourceforge/dt/systemtraymenu.svg?label=Sourceforge)](https://sourceforge.net/projects/systemtraymenu/)&nbsp;
[![Downloads Chocolatey](https://img.shields.io/chocolatey/dt/SystemTrayMenu?label=Chocolatey)](https://community.chocolatey.org/packages/systemtraymenu)
[![GitHub](https://github.com/favicon.ico)](https://github.com/Hofknecht/SystemTrayMenu/releases)&nbsp;
[![MicrosoftStore](https://user-images.githubusercontent.com/52528841/88452959-371db780-ce63-11ea-9076-11920156456a.png)](https://www.microsoft.com/store/apps/9N24F8ZBJMT1)&nbsp;
[![SourceForge](https://user-images.githubusercontent.com/52528841/89990756-1aff8000-dc83-11ea-828a-a70a4d567399.png)](https://sourceforge.net/projects/systemtraymenu/)&nbsp;
[![majorgeeks](https://user-images.githubusercontent.com/52528841/116281616-2d2a3b80-a78a-11eb-948c-bde9a8ccb1ed.png)](https://www.majorgeeks.com/files/details/systemtraymenu.html)
[![heise](https://user-images.githubusercontent.com/52528841/125174840-53c41400-e1c8-11eb-8992-2de3e078c7b2.png)](https://www.heise.de/download/product/systemtraymenu)
[![chocolatey](https://user-images.githubusercontent.com/52528841/153746103-47e7edd7-1bc3-4c29-b712-bab052b473eb.png)](https://community.chocolatey.org/packages/systemtraymenu)
[![scoop](https://user-images.githubusercontent.com/52528841/153939000-a8fd62b7-068b-48c3-8ad2-a09b1552f3a8.png)](https://github.com/Hofknecht/SystemTrayMenu/issues/325)
[![computerbild](https://user-images.githubusercontent.com/52528841/121583122-2735a480-ca30-11eb-82a4-b4f6054e4d8f.png)](https://www.computerbild.de/download/SystemTrayMenu-26748523.html)
[![CHIP](https://user-images.githubusercontent.com/52528841/88452975-5583b300-ce63-11ea-8256-6e69a2bb3e2d.png)](https://www.chip.de/downloads/SystemTrayMenu_182854219.html)&nbsp;
[![softpedia](https://user-images.githubusercontent.com/52528841/121581852-a033fc80-ca2e-11eb-8aee-4a8cd3043bd1.png)](https://www.softpedia.com/get/System/Launchers-Shutdown-Tools/SystemTrayMenu.shtml)
[![freeware-base](https://user-images.githubusercontent.com/52528841/136707080-a64c8eeb-d563-44e6-aee3-1fb2921221e0.png)](https://www.freeware-base.de/freeware-zeige-details-31811-SystemTrayMenu.html)
[![netzwelt](https://user-images.githubusercontent.com/52528841/121585548-015dcf00-ca33-11eb-8436-b1f5231d5c2d.png)](https://www.netzwelt.de/download/25705-systemtraymenu.html) [![aiiguide](https://user-images.githubusercontent.com/52528841/136708010-1f7a7d04-0b0b-4fe8-b70c-83bd48733d9c.png)](https://aiiguide.com/download-systemtraymenu.html)[![taiwebs](https://user-images.githubusercontent.com/52528841/136708061-6384d536-88a7-4c5d-a13a-a1b0cff00e68.png)](https://de.taiwebs.com/windows/download-systemtraymenu-6812.html)
[![rjno1](https://user-images.githubusercontent.com/52528841/121582195-04ef5700-ca2f-11eb-9c22-cf8239c6e99b.png)](https://www.rjno1.com/systemtraymenu/)&nbsp;
[![softaro](https://user-images.githubusercontent.com/52528841/121581997-c9548d00-ca2e-11eb-9145-fab017925475.png)](https://softaro.net/systemtraymenu/)&nbsp;
[![bytesin](https://user-images.githubusercontent.com/52528841/136706178-0bd2e812-f087-40f4-8c30-301ba645f10d.png)](https://www.bytesin.com/software/SystemTrayMenu/)&nbsp;
[![softonic](https://user-images.githubusercontent.com/52528841/121586781-5a7a3280-ca34-11eb-8a03-618b4661f859.png)](https://systemtraymenu.en.softonic.com/)
[![downloaddrivers](https://user-images.githubusercontent.com/52528841/116524789-0f6aec80-a8d8-11eb-9037-06b2c101fa72.png)](https://www.downloaddrivers.info/download-systemtraymenu-1-2-4-0/)
[![baominh](https://user-images.githubusercontent.com/52528841/120082388-0c277400-c0c3-11eb-97c8-ee35e692b38d.png)](https://baominh.tech/systemtraymenu-tao-menu-start-tuy-chinh-duoi-khai-he-thong.html)
[![softodrom](https://user-images.githubusercontent.com/52528841/142266835-80248737-60d6-4e80-9ce3-e9b68bb217c0.png)](https://soft.softodrom.ru/%D0%A1%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C/28225)
[![lo4d](https://github.com/Hofknecht/SystemTrayMenu/assets/52528841/3ba7d63a-5882-42e6-9cc7-0a7fa167f2c6)](https://systemtraymenu.en.lo4d.com/windows)&nbsp;
Reviews
------------------
[![2022-02-15 00_04_52-Window](https://user-images.githubusercontent.com/52528841/153961695-be5f50ab-9ce5-423e-871a-cf1062023d31.png)](https://www.youtube.com/watch?v=xsi4Uv3-ZLg)
[![Youtube](https://img.shields.io/youtube/views/xsi4Uv3-ZLg?style=social)](https://www.youtube.com/watch?v=xsi4Uv3-ZLg)
[deskmodder.de 2020/07/18](https://www.deskmodder.de/blog/2020/07/18/systemtraymenu-nun-auch-als-windows-10-app-neben-der-portablen-version/) |
[deskmodder.de 2021/11/14](https://www.deskmodder.de/blog/2021/11/14/systemtraymenu-als-ersatz-fuer-die-symbolleiste-unter-windows-11/) |
[trishtech.com](https://www.trishtech.com/2020/07/systemtraymenu-is-simple-and-lightweight-start-menu-alternative/) |
[ghacks.net](https://www.ghacks.net/2021/04/10/create-a-custom-start-menu-that-you-can-access-with-a-hotkey-using-systemtraymenu/) |
[shrayas.com](http://www.shrayas.com/posts/quick-access-everything-with-systemtraymenu/) |
[reviewsapp.org](https://reviewsapp.org/systemtraymenu-better-organization-of-windows) |
[thewindowsclub.com](https://www.thewindowsclub.com/systemtraymenu-for-windows) |
[br.atsit.in](https://br.atsit.in/id/?p=100192) |
[nesabamedia.com](https://www.nesabamedia.com/systemtraymenu-alternatif-start-menu-untuk-windows/) |
[soluciones.link](https://soluciones.link/windows/systemtraymenu-es-una-alternativa-gratuita-del-menu-de-inicio-para-windows-11-10/) |
[de.moyens.net](https://de.moyens.net/windows/systemtraymenu-ist-eine-kostenlose-startmenue-alternative-fuer-windows-11-10/) |
[windowsreport.com](https://windowsreport.com/windows-11-free-start-menu-replacement/) |
[onmsft.com](https://www.onmsft.com/how-to/how-to-edit-windows-11-start-menu-layout) |
[starchart.cc](https://starchart.cc/hofknecht/systemtraymenu.svg)
* https://www.deskmodder.de/blog/2020/07/18/systemtraymenu-nun-auch-als-windows-10-app-neben-der-portablen-version/
* https://www.trishtech.com/2020/07/systemtraymenu-is-simple-and-lightweight-start-menu-alternative/
* https://www.ghacks.net/2021/04/10/create-a-custom-start-menu-that-you-can-access-with-a-hotkey-using-systemtraymenu/
* http://www.shrayas.com/posts/quick-access-everything-with-systemtraymenu/
* https://reviewsapp.org/systemtraymenu-better-organization-of-windows
FAQ
------------------
**What do I have to do as first steps?**
SystemTrayMenu is portable, so it does not need to be installed. After downloading e.g. SystemTrayMenu-1.2.6.0.zip, **unzip the folder**, then **start SystemTrayMenu.exe**. If you prefer an installation there is the possibility to install SystemTrayMenu via the [Microsoft Store](https://www.microsoft.com/store/apps/9N24F8ZBJMT1).
**What do I have to do now as first steps?**
SystemTrayMenu is portable, so it does not need to be installed. After downloading e.g. SystemTrayMenu-1.0.17.24.zip, **unzip the folder**, then **start SystemTrayMenu.exe**.
If you prefer an installation there is the possibility to install SystemTrayMenu via the Windows Store.
1. Step: After starting the application the first time you have to **choose the root directory**.
In this directory you should put shortcuts, files and folders (App, Game, Script, URL, Network),
which you are often using and especially when you can not find them over the windows start menu search.
You can also consider to put there all files from your desktop.
2. Step: **Move the SystemTrayMenu icon** by drag and drop from the system tray **into the taskbar** below.
![group icon out](https://user-images.githubusercontent.com/52528841/83349567-1ab74000-a336-11ea-8676-3db33615a57a.gif)
![group systemtray](https://user-images.githubusercontent.com/52528841/157921582-ac6350c0-4c6d-4a02-9bd2-224a264e4329.gif)
3. Step: 'Right click' on taskbar item -> '**Pin to taskbar**'
![pin to taskbar](https://user-images.githubusercontent.com/52528841/157921722-123a7694-e3f4-4cce-951a-94ddb3d4b60f.png)
Now it is ready to start - just **click on the icon** in the system tray or the taskbar or press the hotkey (Ctrl + LWin) to open the SystemTrayMenu.
---
3. Step: Now it is ready to start - just **click on the icon** in the taskbar to open the SystemTrayMenu.
**How can I change the root directory?**
You can change the root directory in the settings menu, which can be opened by right clicking on the icon in the system tray.
---
You can change the root directory in the settings menu, that you can open by right clicking on the SystemTrayMenu icon.
**What does the hotkey do?**
In the settings menu you can choose a hotkey to open and close the SystemTrayMenu.
---
**Can the SystemTrayMenu launch on windows startup?**
Yes, you can select this option in the settings menu, which can be opened by right clicking on the icon in the systen tray.
Yes, you can select this option in the settings menu, that you can open by right clicking on the SystemTrayMenu icon.
---
**What can I do if I have a problem, idea or question?**
**How can I add Windows 'Shutdown' or Windows 'Restart'?**
Create a file 'Shutdown.bat' : `Shutdown.exe -s -t 00`. Create a file 'Restart.bat'. `Shutdown.exe -r -t 00`.
Make shortcuts of the files and maybe also set an icon to the shortcut. Rename the link to e.g. 'xx Shutdown'. Either put it directly into the root folder or include the files via option 'Folders'. There you could also hide the scripts by default and only show it when searching e.g. 'xx'. Then you can shutdown your PC with: hotkey + xx + Enter
![2022-02-06 11_09_12-Window](https://user-images.githubusercontent.com/52528841/152676102-30eccd6a-2ae6-4964-9631-c06497f491e7.png)
---
**How can I switch sound between 'Speaker' and 'Headset'?**
Download NirCmd, put nircmd.exe to your preferred location.
<br>
Create a file 'Speaker - Audio.bat':
`"D:\<preffered location>\nircmd\nircmd.exe" setdefaultsounddevice "VSX-521" 1`
<br>
Create a file 'Headset - Audio.bat':
`"D:\<preffered location>\nircmd\nircmd.exe" setdefaultsounddevice "Speakers" 1`.
Then you can switch between speaker and headset with: hotkey + headset + Enter
![2022-02-06 11_16_30-Window](https://user-images.githubusercontent.com/52528841/152676337-349666dd-da7d-4b1e-ae02-e297935fd5b7.png)
---
**How can I move the 'Recycle Bin' from the Desktop into the STM?**
Create a shortcut of 'Recycle Bin' and put it into STM. Then hide it from desktop:
To find the option, right-click on the desktop, choose “Personalize,” and then click “Desktop Icon Settings” in the left sidebar. Uncheck the “Recycle Bin” box and click “OK” to save your changes.
Then you can e.g. empty your 'Recycle Bin' with: hotkey + recycle + Keys.App (to open context menu) + b (context menu shortcut for 'Empty Recycle Bin') + Enter
![2022-02-06 12_37_51-Window](https://user-images.githubusercontent.com/52528841/152679061-ae7c30c5-92c5-4b4c-abb3-5316aabf9c6a.png)
---
**Which options are there to control the behavior via taskbar item?**
By default, the 'Show in Taskbar' option is activated, which means there is shown an active form in the taskbar which can be used to open and close the menu via activate and deactivate event, e.g. also via Alt + Tab.
![2022-02-06 15_35_02-Window](https://user-images.githubusercontent.com/52528841/152685888-1b746858-dd45-41ab-a082-da7710298c74.png)
When you switch off the option, there is no active form in the taskbar. When you start the application, then other instances will be killed and a new one started.
This behavior can be changed via
![2022-03-11 13_02_28-Window](https://user-images.githubusercontent.com/52528841/157863638-663c4792-1c4c-4468-a731-acd79a23906e.png)
If the shortcut is pressed then via the taskbar item, we need more time to show the menu (because we have to start an extra process which tells the first to open).
---
What can I do if I have a problem, idea or question?
------------------
If a problem has occured or you have ideas or questions, you are welcome to contact us:
* [Create an issue](https://github.com/Hofknecht/SystemTrayMenu/issues/new/choose)
* [Suggest your idea](https://github.com/Hofknecht/SystemTrayMenu/discussions/categories/ideas)
* [Start a discussion](https://github.com/Hofknecht/SystemTrayMenu/discussions/new)
* [Write us an email](mailto:Markus@Hofknecht.eu)
If a problem has occured or you have any ideas or questions, you are welcome to contact us.
Our contact information you can find in the About window, that can be opened by right clicking on the SystemTrayMenu icon.
**Find more FAQ topics here:**
[SystemTrayMenu FAQ](https://github.com/Hofknecht/SystemTrayMenu/issues?q=is%3Aissue+is%3Aclosed+label%3AFAQ)
Security
------------------
@ -205,19 +76,18 @@ Some antiviruses might flag this program as malicious, but it is not! The source
Build
------------------
[![Build Status](https://dev.azure.com/MarkusHofknecht/SystemTrayMenu/_apis/build/status/Hofknecht.SystemTrayMenu?branchName=master)](https://dev.azure.com/MarkusHofknecht/SystemTrayMenu/_build)
[![IDE](https://img.shields.io/badge/framework-2022-darkturquoise?label=Downlaod%20Visual%20Studio%202022%20(click%20here))](https://visualstudio.microsoft.com/de/downloads/)
[![Framework](https://img.shields.io/badge/framework-.NET%207%20SDK%20(Win%2010/11)-darkturquoise?label=Download%20framework%20(click%20here))](https://dotnet.microsoft.com/download/dotnet/7.0)
Install Visual Studio 2019.
Install .NET Core 3.1 SDK [https://dotnet.microsoft.com](https://dotnet.microsoft.com/download/dotnet-core/thank-you/sdk-3.1.300-windows-x64-installer).
Contributing
------------------
If you would like to contribute, you are very welcome.
If you are considering a feature, need guidance, or want to talk about an idea, don't hesitate to create an issue or a discussion here.
If you would like to contribute, everyone is welcome to.
If you are considering a feature, need guidance, or want to talk about an idea, don't hesitate to create an issue here.
When contributing please respect the style used by the codebase and consider the following rules:
* Fix warnings shown by code analyzers.
* Run FixCop.
* Increase the version in the assembly file.
* Add a commit message like:
* Add a commit message like:
```
[Feature] Show icon in taskbar when application is running (#115), version 0.11.1.9
```
@ -233,122 +103,24 @@ Special thanks to our productive contibutors!
* [Tanja Hofknecht](https://github.com/Tanjalibertatis)
* [Peter Kirmeier](https://github.com/topeterk)
Thanks for ideas, reporting issues and contributing!
#123 [Mordecai00](https://github.com/Mordecai00),
#125 [Holgermh](https://github.com/Holgermh),
#135 #153 #154 #164 [jakkaas](https://github.com/jakkaas),
#145 [Pascal Aloy](mailto:paloy@wanadoo.fr),
#153 #158 #160 [blackcrack](https://github.com/blackcrack),
#162 [HansieNL](https://github.com/HansieNL),
#163 [igorruckert](https://github.com/igorruckert),
#171 [kehoen](https://github.com/kehoen),
#186 [Dtrieb](https://github.com/Dtrieb),
#188 #189 #191 #195 [iJahangard](https://github.com/iJahangard),
#195 #197 #225 #238 [the-phuctran](https://github.com/the-phuctran),
#205 [kristofzerbe](https://github.com/kristofzerbe),
#209 [jonaskohl](https://github.com/jonaskohl),
#211 [blacksparrow15](https://github.com/blacksparrow15),
#220 #403 [Yavuz E.](mailto:yavuzelektronik@gmail.com),
#229 #230 #239 [Peter O.](pohle@htp-tel.de),
#231 [Ryonez](https://www.youtube.com/user/Ryonez),
#235 #242 243 #247, #271 Tom,
#237 Torsten S.,
#240 [video](https://www.youtube.com/watch?v=xsi4Uv3-ZLg) [Patrick](https://www.youtube.com/user/DyRexLP),
#244 Gunter D.,
#246 #329 [MACE4GITHUB](https://github.com/MACE4GITHUB),
#259 #310 [vanjac](https://github.com/vanjac),
#262 [terencemcdonnell](https://github.com/terencemcdonnell),
#269 [petersnows25](https://github.com/petersnows25),
#272 Peter M.,
#273 #274 [ParasiteDelta](https://github.com/ParasiteDelta),
#275 #276 #278 [donaldaken](https://github.com/donaldaken),
#277 Jan S.,
#282 [akuznets](https://github.com/akuznets),
#283 #284 #289 [RuSieg](https://github.com/RuSieg),
#285 #286 [dao-net](https://github.com/dao-net),
#288 William P.,
#294 #295 #296 Stefan M.,
#225 #297 #299 #317 #321 #324 #330 #386 #390 #401 #402 #407 #409 #414 #416 #418 #428 #430 #443 [chip33](https://github.com/chip33),
#298 [phanirithvij](https://github.com/phanirithvij),
#306 [wini2](https://github.com/wini2),
#370 [dna5589](https://github.com/dna5589),
#372 [not-nef](https://github.com/not-nef),
#376 Michelle H.,
#377 [SoenkeHob](https://github.com/SoenkeHob),
#380 #394 [TransLucida](https://github.com/TransLucida),
#384 #434 #435 [boydfields](https://github.com/boydfields),
#386 [visusys](https://github.com/visusys),
#387 #411 #444 [yrctw](https://github.com/yrctw),
#446 [timinformatica](https://github.com/timinformatica),
#450 [ppt-oldoerp](https://github.com/ppt-oldoerp),
#453 [fubaWoW](https://github.com/fubaWoW),
#454 [WouterVanGoey](https://github.com/WouterVanGoey),
#462 [verdammt89x](https://github.com/verdammt89x),
#463 #494 Dirk S.,
#466 [Dean-Corso](https://github.com/Dean-Corso),
#488 [DailenG](https://github.com/DailenG),
#490 [TrampiPW](https://github.com/TrampiPW),
#497 Aziz,
#499 [spitzlbergerj](https://github.com/spitzlbergerj),
Thanks for translations!
* French by [Pascal Aloy](mailto:paloy@wanadoo.fr)
* Dutch by [HansieNL](https://github.com/HansieNL)
* Portuguese (Brazil) by [igorruckert](https://github.com/igorruckert)
Donations
------------------
* Give a star, follow, watch, fork [![stars](https://img.shields.io/github/stars/hofknecht/systemtraymenu?style=social)](https://github.com/Hofknecht/SystemTrayMenu/stargazers) [![followers](https://img.shields.io/github/followers/hofknecht?style=social)](https://github.com/Hofknecht?tab=followers) [![watchers](https://img.shields.io/github/watchers/hofknecht/systemtraymenu?style=social)](https://github.com/Hofknecht/SystemTrayMenu/watchers) [![forks](https://img.shields.io/github/forks/hofknecht/systemtraymenu?style=social)](https://github.com/Hofknecht/SystemTrayMenu/network/members)
* Help us to improve SystemTrayMenu via [Feedback](https://github.com/Hofknecht/SystemTrayMenu/edit/master/README.md#what-can-i-do-if-i-have-a-problem-idea-or-question) or [Show and tell](https://github.com/Hofknecht/SystemTrayMenu/discussions/categories/show-and-tell) how you use it
* Don't hesitate to donate via PayPal if you appreciate SystemTrayMenu and would like to support our work:
[![PayPal](https://www.paypalobjects.com/webstatic/de_DE/i/de-pp-logo-200px.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Y9W6H5HXQPPUQ&source=url)
* Become a &nbsp;[![Downloads Releases](https://img.shields.io/badge/-GitHub%20Sponsor-fafbfc?logo=GitHub%20Sponsors)](https://github.com/sponsors/Hofknecht)
* Like, rate, share, comment, watch, tweet, join SystemTrayMenu (see also list in the top of readme)
[![Twitter](https://img.shields.io/twitter/follow/markushofknecht?style=social)](https://twitter.com/MarkusHofknecht)
[![Reddit](https://img.shields.io/reddit/subreddit-subscribers/systemtraymenu?style=social)](https://www.reddit.com/r/SystemTrayMenu/)
[![Facebook](https://img.shields.io/badge/Like-blue&logo=facebook?&labelColor=white&logo=facebook&color=white)](https://www.facebook.com/Systemtraymenu-114069060335483)
<!--* We are trying to apply for the amazon affiliate program with an amazon link, in the future we might get ~1.5% per purchase, for you the price stays the same. All you have to do is doing your purchases via the link. As an Amazon partner, we earn from qualified sales. This only works with certain products and we can e.g. create these category links (please tell us if you need other special categories):
Popular offers: -->
<!--a target="_blank" href="https://www.amazon.de/deal/0c0ca0e6?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=2563e96525666067f86f307dc0dbb3ce&ref_=ihub_rc_td_c_deals-promotions_0c0ca0e6">External and internal hard drives & SSDs</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/00e8adff?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=3f230f3b20a20179d13865a261eebcbb&ref_=ihub_rc_td_c_deals-promotions_00e8adff">USB sticks Micro SD cards & RAM memory</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/6e1b3fdd?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=a564059235d38cc1f7cacb21a9b55d4d&ref_=ihub_rc_td_c_deals-promotions_6e1b3fdd">Gaming Mice Keyboards Headsets and Accessories</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/6be9721b?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=4f277b38dfc3bb1bd7f03ede8ccc2fdc&ref_=ihub_rc_td_c_deals-promotions_6be9721b">Top sellers for your home</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/92352ca0?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=42616447ce672851de0e49131fde37a7&ref_=ihub_rc_td_c_deals-promotions_92352ca0">ASUS gaming motherboard socket</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/28f2bc0f?showVariations=true&_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=ad1215bb0830e568b5c7d859b2c90d37&ref_=ihub_rc_td_c_deals-promotions_28f2bc0f">Gaming monitors from different manufacturers</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/634e16ae?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=044709e2c9f34d3949aad05c5dad578d&ref_=ihub_rc_td_c_deals-promotions_634e16ae">Headphones from Sony Denon and much more</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/2a2abb33?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=b25df70dec6da6986aa18eb1d3baa6cd&ref_=ihub_rc_td_c_deals-promotions_2a2abb33">Bluetooth Headphones & Speakers by Soundcore</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/5e70f674?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=612481a6d72e08029a0091e9fcc07f82&ref_=ihub_rc_td_c_deals-promotions_5e70f674">Lighting</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/8b218d21?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=8d433699b562dd9c7e6873194811bb4e&ref_=ihub_rc_td_c_deals-promotions_8b218d21">Gaming Laptops</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/e45ea2b7?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=788ad1176bd69dc2e6980317ff4e2b67&ref_=ihub_rc_td_c_deals-promotions_e45ea2b7">Headphones from Bose Sennheiser Philips Audio and much more</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/e4af7b7a?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=4c808d1c3bcbb720b52bdd3d0622fa74&ref_=ihub_rc_td_c_deals-promotions_e4af7b7a">Coffee machines and accessories</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/4666dc4a?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=588b33399f734e20c04d82ff41ba45e3&ref_=ihub_rc_td_c_deals-promotions_4666dc4a">Computer accessories</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/d7117d73?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=62aff0fd7572235fde50c13413f8fd28&ref_=ihub_rc_td_c_deals-promotions_d7117d73">HyperX Gaming</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/9644446b?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=8dd2b17705164603a6b55a3f8e461c2e&ref_=ihub_rc_td_c_deals-promotions_9644446b">Netatmo smart home products</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/e693926e?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=e27d8ac861d8f33041872ff21fdff02c&ref_=ihub_rc_td_c_deals-promotions_e693926e">Smartphones Smartwatches and accessories</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/f9a5261d?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=8a12373dc9b5ceaa67a1a2a2e1dfc606&ref_=ihub_rc_td_c_deals-promotions_f9a5261d">Audio cable</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/8b13c2f5?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=1302ff8212f930791293b411851a6bdc&ref_=ihub_rc_td_c_deals-promotions_8b13c2f5">WLAN and mesh systems, switches and surveillance cameras</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/fc813eed?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=ff134e03141d366eac0518528d1c999e&ref_=ihub_rc_td_c_deals-promotions_fc813eed">Smarthome and Home Security</a-->
<!--a target="_blank" href="https://www.amazon.de/deal/0f10758d?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=3325789289a03d743fe5b46981c82edc&ref_=ihub_rc_td_c_deals-promotions_0f10758d">Soundbars & speakers from Denon Polk Philips Audio and much more</a-->
<!--a target="_blank" href="https://www.amazon.de/dp/B07ZNGT8K4?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=764abbfc6ac54f3a5abd298af0105b28&ref_=ihub_rc_td_c_deals-promotions_b77be80b">Monitor mount</a-->
<!--a target="_blank" href="https://www.amazon.de/dp/B00L2442H0?_encoding=UTF8&linkCode=r02&tag=systemtraymen-21&linkId=1c3e9143da0adfd2c667d6451ebaca6b&ref_=ihub_rc_td_c_deals-promotions_8333037a">PCs & accessories</a-->
We would be delighted if you could help us with the following:
* a star on this github project
* a like on [Facebook](https://www.facebook.com/Systemtraymenu-114069060335483)
* a review or rating on [Sourceforge](https://sourceforge.net/projects/systemtraymenu/)
* your ideas either as issues here in github or directly per mail
<!--a target="_blank" href="https://www.amazon.de/b?_encoding=UTF8&tag=systemtraymen-21&linkCode=ur2&linkId=6151ac8258f44adda610cc05e57967a2&camp=1638&creative=6742&node=340843031">Computers &amp; Accessories</a>, <a target="_blank" href="https://www.amazon.de/b?_encoding=UTF8&tag=systemtraymen-21&linkCode=ur2&linkId=ca8480de9bc1ef726d5a1280f593ac9f&camp=1638&creative=6742&node=562066">Electronics &amp; Photography</a>, <a target="_blank" href="https://www.amazon.de/b?_encoding=UTF8&tag=systemtraymen-21&linkCode=ur2&linkId=7ff79addfbdbfcaae04818d279a7e973&camp=1638&creative=6742&node=301927">Software</a>, <a target="_blank" href="https://www.amazon.de/b?_encoding=UTF8&tag=systemtraymen-21&linkCode=ur2&linkId=100c22e7db187d7cce9ae20f8a4e024a&camp=1638&creative=6742&node=300992">Video Games</a-->
Don't hesitate to donate if you appreciate SystemTrayMenu and would like to support our work.
[![PayPal](https://www.paypalobjects.com/webstatic/de_DE/i/de-pp-logo-100px.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Y9W6H5HXQPPUQ&source=url)
PayPal/GitHub Sponsors - Thank you!
Sponsors - Thank you!
------------------
(Sponsors are listed here in the ReadMe and in the application about menu)
* Stefan Mahrer
* [boydfields](https://github.com/boydfields)
* [RuSieg](https://github.com/RuSieg)
* [igor-davidov](https://github.com/igor-davidov)
* Ralf K.
* Tim K.
* Georg W.
* [donaldaken](https://github.com/donaldaken)
* Marc Speer
* [Cito](https://github.com/Cito)
* Peter G.
* [Traditional_Tap3954](https://www.reddit.com/user/Traditional_Tap3954/)
* Maximilian H.
* Jens B.
* [spitzlbergerj](https://github.com/spitzlbergerj)
* Udo N.

View file

@ -1,576 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="About SystemTrayMenu" xml:space="preserve">
<value>Oor SystemTrayMenu</value>
</data>
<data name="OK" xml:space="preserve">
<value>OK</value>
</data>
<data name="App start" xml:space="preserve">
<value>App begin</value>
</data>
<data name="Exit app" xml:space="preserve">
<value>Verlaat toepassing</value>
</data>
<data name="Directory" xml:space="preserve">
<value>Gids</value>
</data>
<data name="Directory empty" xml:space="preserve">
<value>Gids leeg</value>
</data>
<data name="Details" xml:space="preserve">
<value>Besonderhede</value>
</data>
<data name="System Info" xml:space="preserve">
<value>Stelsel inligting</value>
</data>
<data name="Directory inaccessible" xml:space="preserve">
<value>Gids ontoeganklik</value>
</data>
<data name="Language" xml:space="preserve">
<value>Taal</value>
</data>
<data name="Log File" xml:space="preserve">
<value>Log lêer</value>
</data>
<data name="Restart" xml:space="preserve">
<value>Begin oor</value>
</data>
<data name="Could not register the hot key." xml:space="preserve">
<value>Kon nie die snelsleutel registreer nie.</value>
</data>
<data name="Abort" xml:space="preserve">
<value>Aborteer</value>
</data>
<data name="General" xml:space="preserve">
<value>Algemeen</value>
</data>
<data name="Hotkey" xml:space="preserve">
<value>Sneltoets</value>
</data>
<data name="Start with Windows" xml:space="preserve">
<value>Begin met Windows</value>
</data>
<data name="Settings" xml:space="preserve">
<value>Instellings</value>
</data>
<data name="Frequently Asked Questions" xml:space="preserve">
<value>Gereelde Vrae</value>
</data>
<data name="Read the FAQ and then choose a root directory for SystemTrayMenu." xml:space="preserve">
<value>Lees die FAQ en kies dan 'n wortelgids vir SystemTrayMenu.</value>
</data>
<data name="Select directory" xml:space="preserve">
<value>Kies gids</value>
</data>
<data name="Your root directory for the app does not exist or is empty! Change the root directory or put some files, directories or shortcuts into the root directory." xml:space="preserve">
<value>Jou wortelgids vir die toepassing bestaan nie of is leeg! Verander die wortelgids of plaas 'n paar lêers, gidse of kortpaaie in die wortelgids.</value>
</data>
<data name="You have no access to the root directory of the app. Grant access to the directory or change the root directory." xml:space="preserve">
<value>Jy het geen toegang tot die wortelgids van die toepassing nie. Verleen toegang tot die gids of verander die wortelgids.</value>
</data>
<data name="Single click to open an element" xml:space="preserve">
<value>Enkelklik om 'n element oop te maak</value>
</data>
<data name="Color scheme dark always active" xml:space="preserve">
<value>Kleurskema donker altyd aktief</value>
</data>
<data name="Expanded" xml:space="preserve">
<value>Uitgebreid</value>
</data>
<data name="At mouse location" xml:space="preserve">
<value>Op die plek van die muis</value>
</data>
<data name="Changing directory" xml:space="preserve">
<value>Verander gids</value>
</data>
<data name="Click" xml:space="preserve">
<value>Klik</value>
</data>
<data name="Customize" xml:space="preserve">
<value>Pasmaak</value>
</data>
<data name="Default" xml:space="preserve">
<value>Verstek</value>
</data>
<data name="If the focus is lost and the mouse is still on the menu" xml:space="preserve">
<value>As die fokus verloor word en die muis is steeds op die spyskaart</value>
</data>
<data name="Milliseconds until a menu opens when the mouse is on it" xml:space="preserve">
<value>Millisekondes totdat 'n spyskaart oopmaak wanneer die muis daarop is</value>
</data>
<data name="Milliseconds until the menu closes if the mouse then leaves the menu" xml:space="preserve">
<value>Millisekondes totdat die spyskaart toemaak as die muis dan die spyskaart verlaat</value>
</data>
<data name="Maximum menu width" xml:space="preserve">
<value>Maksimum spyskaart breedte</value>
</data>
<data name="Menu stays open" xml:space="preserve">
<value>Spyskaart bly oop</value>
</data>
<data name="Time until a menu opens" xml:space="preserve">
<value>Tyd totdat 'n spyskaart oopmaak</value>
</data>
<data name="If an element was clicked" xml:space="preserve">
<value>As 'n element geklik is</value>
</data>
<data name="Background" xml:space="preserve">
<value>Agtergrond</value>
</data>
<data name="Opened directory" xml:space="preserve">
<value>Geopende gids</value>
</data>
<data name="Border of opened directory" xml:space="preserve">
<value>Rand van oop gids</value>
</data>
<data name="Search field" xml:space="preserve">
<value>Soek veld</value>
</data>
<data name="Selected element" xml:space="preserve">
<value>Geselekteerde element</value>
</data>
<data name="Border of selected element" xml:space="preserve">
<value>Rand van geselekteerde element</value>
</data>
<data name="Relative directory" xml:space="preserve">
<value>Relatiewe gids</value>
</data>
<data name="Save configuration file in application directory" xml:space="preserve">
<value>Stoor konfigurasielêer in toepassingsgids</value>
</data>
<data name="Configuration and log files" xml:space="preserve">
<value>Konfigurasie en loglêers</value>
</data>
<data name="Open application directory" xml:space="preserve">
<value>Maak toepassingsgids oop</value>
</data>
<data name="Maximum menu height" xml:space="preserve">
<value>Maksimum spyskaart hoogte</value>
</data>
<data name="Arrow" xml:space="preserve">
<value>Pyltjie</value>
</data>
<data name="Arrow when clicking" xml:space="preserve">
<value>Pyltjie wanneer jy klik</value>
</data>
<data name="Arrow while mouse hovers over it" xml:space="preserve">
<value>Pyltjie terwyl die muis daaroor beweeg</value>
</data>
<data name="Background of arrow when clicking" xml:space="preserve">
<value>Agtergrond van pyl wanneer u klik</value>
</data>
<data name="Background of arrow while mouse hovers over it" xml:space="preserve">
<value>Agtergrond van pyl terwyl die muis daaroor beweeg</value>
</data>
<data name="Color scheme dark" xml:space="preserve">
<value>Kleurskema donker</value>
</data>
<data name="Color scheme bright" xml:space="preserve">
<value>Kleurskema helder</value>
</data>
<data name="App menu" xml:space="preserve">
<value>Toepassingskieslys</value>
</data>
<data name="Scrollbar" xml:space="preserve">
<value>Rolbalk</value>
</data>
<data name="Slider" xml:space="preserve">
<value>Skuifbalk</value>
</data>
<data name="Slider while dragging" xml:space="preserve">
<value>Skuif terwyl jy sleep</value>
</data>
<data name="Slider while mouse hovers over it 1" xml:space="preserve">
<value>Skuif terwyl die muis daaroor beweeg 1</value>
</data>
<data name="Slider while mouse hovers over it 2" xml:space="preserve">
<value>Skuif terwyl die muis daaroor beweeg 2</value>
</data>
<data name="Use icon from directory" xml:space="preserve">
<value>Gebruik ikoon uit die gids</value>
</data>
<data name="Sizes in percent" xml:space="preserve">
<value>Groottes in persentasie</value>
</data>
<data name="Border of menu" xml:space="preserve">
<value>Rand van spyskaart</value>
</data>
<data name="Icons" xml:space="preserve">
<value>Ikone</value>
</data>
<data name="Set by context menu " xml:space="preserve">
<value>Stel deur konteks kieslys</value>
</data>
<data name="Set as directory" xml:space="preserve">
<value>Stel as gids</value>
</data>
<data name="loading" xml:space="preserve">
<value>laai</value>
</data>
<data name="Problem with shortcut link" xml:space="preserve">
<value>Probleem met kortpadskakel</value>
</data>
<data name="The item that this shortcut refers to has been changed or moved, so this shortcut will no longer work properly." xml:space="preserve">
<value>Die item waarna hierdie kortpad verwys is verander of geskuif, so hierdie kortpad sal nie meer behoorlik werk nie.</value>
</data>
<data name="Open directory" xml:space="preserve">
<value>Maak gids oop</value>
</data>
<data name="Task Manager" xml:space="preserve">
<value>Taak bestuurder</value>
</data>
<data name="Deactivated" xml:space="preserve">
<value>Gedeaktiveer</value>
</data>
<data name="Activated" xml:space="preserve">
<value>Geaktiveer</value>
</data>
<data name="Expert" xml:space="preserve">
<value>Kenner</value>
</data>
<data name="If the focus is lost and the Enter key was pressed" xml:space="preserve">
<value>As die fokus verloor word en die Enter-sleutel gedruk is</value>
</data>
<data name="Milliseconds until the menu closes if the menu is not reactivated" xml:space="preserve">
<value>Millisekondes totdat die spyskaart sluit as die spyskaart nie heraktiveer word nie</value>
</data>
<data name="Show in Taskbar" xml:space="preserve">
<value>Wys in taakbalk</value>
</data>
<data name="Add directory" xml:space="preserve">
<value>Voeg gids by</value>
</data>
<data name="Add content of directory to root directory" xml:space="preserve">
<value>Voeg inhoud van gids by wortelgids</value>
</data>
<data name="Directory paths" xml:space="preserve">
<value>Gidspaaie</value>
</data>
<data name="Directories" xml:space="preserve">
<value>Gidse</value>
</data>
<data name="Recursive" xml:space="preserve">
<value>Rekursief</value>
</data>
<data name="Remove directory" xml:space="preserve">
<value>Verwyder gids</value>
</data>
<data name="Only Files" xml:space="preserve">
<value>Slegs lêers</value>
</data>
<data name="Clear cache if more than this number of items" xml:space="preserve">
<value>Vee kas uit as meer as hierdie aantal items</value>
</data>
<data name="Add sample directory 'Start Menu'" xml:space="preserve">
<value>Voeg voorbeeldgids 'Start Menu' by</value>
</data>
<data name="Row height" xml:space="preserve">
<value>Ry hoogte</value>
</data>
<data name="Round corners" xml:space="preserve">
<value>Ronde hoeke</value>
</data>
<data name="Appearance" xml:space="preserve">
<value>Voorkoms</value>
</data>
<data name="Bottom left" xml:space="preserve">
<value>Links onder</value>
</data>
<data name="Bottom right" xml:space="preserve">
<value>Onder regs</value>
</data>
<data name="Main menu appears" xml:space="preserve">
<value>Hoofkieslys verskyn</value>
</data>
<data name="Mouse location (above Taskbar icon)" xml:space="preserve">
<value>Muisligging (bo die taakbalkikoon)</value>
</data>
<data name="Custom (drag it to the appropriate position)" xml:space="preserve">
<value>Pasgemaak (sleep dit na die toepaslike posisie)</value>
</data>
<data name="element" xml:space="preserve">
<value>element</value>
</data>
<data name="elements" xml:space="preserve">
<value>elemente</value>
</data>
<data name="Generate drive shortcuts on startup" xml:space="preserve">
<value>Genereer ritkortpaaie tydens opstart</value>
</data>
<data name="Cache" xml:space="preserve">
<value>Kas</value>
</data>
<data name="Always show" xml:space="preserve">
<value>Wys altyd</value>
</data>
<data name="Hidden files and directories" xml:space="preserve">
<value>Versteekte lêers en gidse</value>
</data>
<data name="Never show" xml:space="preserve">
<value>Moet nooit wys nie</value>
</data>
<data name="Size and location" xml:space="preserve">
<value>Grootte en ligging</value>
</data>
<data name="Use operating system settings" xml:space="preserve">
<value>Gebruik bedryfstelsel instellings</value>
</data>
<data name="Show only as search result" xml:space="preserve">
<value>Wys slegs as soekresultaat</value>
</data>
<data name="Single click to open a directory" xml:space="preserve">
<value>Enkelklik om 'n gids oop te maak</value>
</data>
<data name="Support Gamepad" xml:space="preserve">
<value>Ondersteun Gamepad</value>
</data>
<data name="Next to the previous one" xml:space="preserve">
<value>Langs die vorige een</value>
</data>
<data name="Offset by pixels" xml:space="preserve">
<value>Verreken deur pixels</value>
</data>
<data name="Overlapping" xml:space="preserve">
<value>Oorvleuel</value>
</data>
<data name="Sub menu appears" xml:space="preserve">
<value>Sub-kieslys verskyn</value>
</data>
<data name="Icon size" xml:space="preserve">
<value>Ikoon grootte</value>
</data>
<data name="Support SystemTrayMenu" xml:space="preserve">
<value>Ondersteun SystemTrayMenu</value>
</data>
<data name="Fading" xml:space="preserve">
<value>Vervaag</value>
</data>
<data name="Send hotkey to other instance" xml:space="preserve">
<value>Stuur sneltoets na ander instansie</value>
</data>
<data name="Sorted by date" xml:space="preserve">
<value>Gesorteer volgens datum</value>
</data>
<data name="Sorted by name" xml:space="preserve">
<value>Gesorteer volgens naam</value>
</data>
<data name="Sorting" xml:space="preserve">
<value>Sorteer</value>
</data>
<data name="Copy row element via drag and drop" xml:space="preserve">
<value>Kopieer ry-element deur te sleep en te laat val</value>
</data>
<data name="Drag" xml:space="preserve">
<value>Sleep</value>
</data>
<data name="Scroll via swipe" xml:space="preserve">
<value>Blaai deur te vee</value>
</data>
<data name="Filter menu by file type e.g.: *.exe|*.dll" xml:space="preserve">
<value>Filtreer spyskaart volgens lêertipe, bv.: *.exe|*.dll</value>
</data>
<data name="Show count of elements" xml:space="preserve">
<value>Toon telling van elemente</value>
</data>
<data name="Show directory title at top" xml:space="preserve">
<value>Wys gidstitel bo-aan</value>
</data>
<data name="Show function key 'Open Folder'" xml:space="preserve">
<value>Wys funksie sleutel 'Open Folder'</value>
</data>
<data name="Show function key 'Pin menu'" xml:space="preserve">
<value>Wys funksie sleutel 'Pin spyskaart'</value>
</data>
<data name="Show function key 'Settings'" xml:space="preserve">
<value>Wys funksiesleutel 'Instellings'</value>
</data>
<data name="Show function key 'Restart'" xml:space="preserve">
<value>Wys funksiesleutel 'Herbegin'</value>
</data>
<data name="Show search bar" xml:space="preserve">
<value>Wys soekbalk</value>
</data>
<data name="Saving log file in application directory" xml:space="preserve">
<value>Stoor tans loglêer in toepassingsgids</value>
</data>
<data name="Show link overlay" xml:space="preserve">
<value>Wys skakeloorleg</value>
</data>
<data name="Directory of Internet Shortcut Icons" xml:space="preserve">
<value>Gids van internetkortpad-ikone</value>
</data>
<data name="Sorted by type (folder or file) and date" xml:space="preserve">
<value>Gesorteer volgens tipe (vouer of lêer) en datum</value>
</data>
<data name="Sorted by type (folder or file) and name" xml:space="preserve">
<value>Gesorteer volgens tipe (vouer of lêer) en naam</value>
</data>
<data name="Check for updates" xml:space="preserve">
<value>Kyk vir opdaterings</value>
</data>
<data name="Go to download page" xml:space="preserve">
<value>Gaan na die aflaai bladsy</value>
</data>
<data name="Latest available version:" xml:space="preserve">
<value>Nuutste beskikbare weergawe:</value>
</data>
<data name="New version available!" xml:space="preserve">
<value>Nuwe weergawe beskikbaar!</value>
</data>
<data name="You have the latest version of SystemTrayMenu!" xml:space="preserve">
<value>Jy het die nuutste weergawe van SystemTrayMenu!</value>
</data>
<data name="Application size" xml:space="preserve">
<value>Toepassingsgrootte</value>
</data>
<data name="Optional Features" xml:space="preserve">
<value>Opsionele kenmerke</value>
</data>
<data name="Resolve links to folders and show content" xml:space="preserve">
<value>Los skakels na vouers op en wys inhoud</value>
</data>
<data name="Sorted by file extension and name" xml:space="preserve">
<value>Gesorteer volgens lêeruitbreiding en naam</value>
</data>
<data name="Copy" xml:space="preserve">
<value>Kopieer</value>
</data>
<data name="To cut out" xml:space="preserve">
<value>Om uit te sny</value>
</data>
<data name="To paste" xml:space="preserve">
<value>Om te plak</value>
</data>
<data name="Selecting All" xml:space="preserve">
<value>Kies alles</value>
</data>
<data name="Undo" xml:space="preserve">
<value>Ontdoen</value>
</data>
<data name="Don't show this hint again." xml:space="preserve">
<value>Moenie hierdie wenk weer wys nie.</value>
</data>
<data name="Hint" xml:space="preserve">
<value>Wenk</value>
</data>
<data name="The settings menu can also be opened by right-clicking the icon in the system tray at the bottom right, in case you can no longer open it via the menu." xml:space="preserve">
<value>Die instellingskieslys kan ook oopgemaak word deur met die rechtermuisknop op die ikoon in die stelselbalk regs onder te klik, ingeval jy dit nie meer via die spyskaart kan oopmaak nie.</value>
</data>
</root>

View file

@ -1,576 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="About SystemTrayMenu" xml:space="preserve">
<value>حول SystemTrayMenu</value>
</data>
<data name="OK" xml:space="preserve">
<value>نعم</value>
</data>
<data name="App start" xml:space="preserve">
<value>بدء التطبيق</value>
</data>
<data name="Exit app" xml:space="preserve">
<value>الخروج من التطبيق</value>
</data>
<data name="Directory" xml:space="preserve">
<value>الدليل</value>
</data>
<data name="Directory empty" xml:space="preserve">
<value>الدليل فارغ</value>
</data>
<data name="Details" xml:space="preserve">
<value>تفاصيل</value>
</data>
<data name="System Info" xml:space="preserve">
<value>معلومات النظام</value>
</data>
<data name="Directory inaccessible" xml:space="preserve">
<value>الدليل لا يمكن الوصول إليه</value>
</data>
<data name="Language" xml:space="preserve">
<value>لغة</value>
</data>
<data name="Log File" xml:space="preserve">
<value>ملف تسجيل</value>
</data>
<data name="Restart" xml:space="preserve">
<value>إعادة تشغيل</value>
</data>
<data name="Could not register the hot key." xml:space="preserve">
<value>تعذر تسجيل مفتاح التشغيل السريع.</value>
</data>
<data name="Abort" xml:space="preserve">
<value>إحباط</value>
</data>
<data name="General" xml:space="preserve">
<value>عام</value>
</data>
<data name="Hotkey" xml:space="preserve">
<value>مفتاح التشغيل السريع</value>
</data>
<data name="Start with Windows" xml:space="preserve">
<value>ابدأ بنظام Windows</value>
</data>
<data name="Settings" xml:space="preserve">
<value>إعدادات</value>
</data>
<data name="Frequently Asked Questions" xml:space="preserve">
<value>أسئلة مكررة</value>
</data>
<data name="Read the FAQ and then choose a root directory for SystemTrayMenu." xml:space="preserve">
<value>اقرأ الأسئلة الشائعة ثم اختر الدليل الجذر لـ SystemTrayMenu.</value>
</data>
<data name="Select directory" xml:space="preserve">
<value>حدد الدليل</value>
</data>
<data name="Your root directory for the app does not exist or is empty! Change the root directory or put some files, directories or shortcuts into the root directory." xml:space="preserve">
<value>الدليل الجذر للتطبيق غير موجود أو أنه فارغ! قم بتغيير الدليل الجذر أو ضع بعض الملفات أو الدلائل أو الاختصارات في الدليل الجذر.</value>
</data>
<data name="You have no access to the root directory of the app. Grant access to the directory or change the root directory." xml:space="preserve">
<value>ليس لديك حق الوصول إلى الدليل الجذر للتطبيق. امنح حق الوصول إلى الدليل أو قم بتغيير الدليل الجذر.</value>
</data>
<data name="Single click to open an element" xml:space="preserve">
<value>نقرة واحدة لفتح عنصر</value>
</data>
<data name="Color scheme dark always active" xml:space="preserve">
<value>نظام الألوان داكن نشط دائمًا</value>
</data>
<data name="Expanded" xml:space="preserve">
<value>موسع</value>
</data>
<data name="At mouse location" xml:space="preserve">
<value>في موقع الماوس</value>
</data>
<data name="Changing directory" xml:space="preserve">
<value>تغيير الدليل</value>
</data>
<data name="Click" xml:space="preserve">
<value>انقر</value>
</data>
<data name="Customize" xml:space="preserve">
<value>يعدل أو يكيف</value>
</data>
<data name="Default" xml:space="preserve">
<value>تقصير</value>
</data>
<data name="If the focus is lost and the mouse is still on the menu" xml:space="preserve">
<value>في حالة فقد التركيز والماوس لا يزال على القائمة</value>
</data>
<data name="Milliseconds until a menu opens when the mouse is on it" xml:space="preserve">
<value>ملي ثانية حتى تفتح القائمة عندما يكون الماوس عليها</value>
</data>
<data name="Milliseconds until the menu closes if the mouse then leaves the menu" xml:space="preserve">
<value>مللي ثانية حتى يتم إغلاق القائمة إذا غادر الماوس القائمة</value>
</data>
<data name="Maximum menu width" xml:space="preserve">
<value>أقصى عرض للقائمة</value>
</data>
<data name="Menu stays open" xml:space="preserve">
<value>تظل القائمة مفتوحة</value>
</data>
<data name="Time until a menu opens" xml:space="preserve">
<value>الوقت حتى تفتح القائمة</value>
</data>
<data name="If an element was clicked" xml:space="preserve">
<value>إذا تم النقر فوق عنصر</value>
</data>
<data name="Background" xml:space="preserve">
<value>خلفية</value>
</data>
<data name="Opened directory" xml:space="preserve">
<value>الدليل المفتوح</value>
</data>
<data name="Border of opened directory" xml:space="preserve">
<value>حدود الدليل المفتوح</value>
</data>
<data name="Search field" xml:space="preserve">
<value>مجال البحث</value>
</data>
<data name="Selected element" xml:space="preserve">
<value>العنصر المحدد</value>
</data>
<data name="Border of selected element" xml:space="preserve">
<value>حدود العنصر المحدد</value>
</data>
<data name="Relative directory" xml:space="preserve">
<value>دليل نسبي</value>
</data>
<data name="Save configuration file in application directory" xml:space="preserve">
<value>احفظ ملف التكوين في دليل التطبيق</value>
</data>
<data name="Configuration and log files" xml:space="preserve">
<value>التكوين وملفات السجل</value>
</data>
<data name="Open application directory" xml:space="preserve">
<value>افتح دليل التطبيق</value>
</data>
<data name="Maximum menu height" xml:space="preserve">
<value>أقصى ارتفاع للقائمة</value>
</data>
<data name="Arrow" xml:space="preserve">
<value>سهم</value>
</data>
<data name="Arrow when clicking" xml:space="preserve">
<value>السهم عند النقر</value>
</data>
<data name="Arrow while mouse hovers over it" xml:space="preserve">
<value>السهم بينما تحوم الماوس فوقه</value>
</data>
<data name="Background of arrow when clicking" xml:space="preserve">
<value>خلفية السهم عند النقر</value>
</data>
<data name="Background of arrow while mouse hovers over it" xml:space="preserve">
<value>خلفية السهم أثناء تحوم الماوس فوقه</value>
</data>
<data name="Color scheme dark" xml:space="preserve">
<value>مخطط الألوان الداكن</value>
</data>
<data name="Color scheme bright" xml:space="preserve">
<value>نظام الألوان مشرق</value>
</data>
<data name="App menu" xml:space="preserve">
<value>قائمة التطبيق</value>
</data>
<data name="Scrollbar" xml:space="preserve">
<value>شريط التمرير</value>
</data>
<data name="Slider" xml:space="preserve">
<value>المنزلق</value>
</data>
<data name="Slider while dragging" xml:space="preserve">
<value>المنزلق أثناء السحب</value>
</data>
<data name="Slider while mouse hovers over it 1" xml:space="preserve">
<value>شريط التمرير أثناء تحريك الماوس فوقه 1</value>
</data>
<data name="Slider while mouse hovers over it 2" xml:space="preserve">
<value>شريط التمرير أثناء تحريك الماوس فوقه 2</value>
</data>
<data name="Use icon from directory" xml:space="preserve">
<value>استخدم رمز من الدليل</value>
</data>
<data name="Sizes in percent" xml:space="preserve">
<value>الأحجام في المئة</value>
</data>
<data name="Border of menu" xml:space="preserve">
<value>حدود القائمة</value>
</data>
<data name="Icons" xml:space="preserve">
<value>الأيقونات</value>
</data>
<data name="Set by context menu " xml:space="preserve">
<value>مجموعة حسب قائمة السياق</value>
</data>
<data name="Set as directory" xml:space="preserve">
<value>تعيين كدليل</value>
</data>
<data name="loading" xml:space="preserve">
<value>تحميل</value>
</data>
<data name="Problem with shortcut link" xml:space="preserve">
<value>مشكلة في ارتباط الاختصار</value>
</data>
<data name="The item that this shortcut refers to has been changed or moved, so this shortcut will no longer work properly." xml:space="preserve">
<value>تم تغيير العنصر الذي يشير إليه هذا الاختصار أو نقله ، لذا لن يعمل هذا الاختصار بشكل صحيح بعد الآن.</value>
</data>
<data name="Open directory" xml:space="preserve">
<value>الدليل المفتوح</value>
</data>
<data name="Task Manager" xml:space="preserve">
<value>مدير المهام</value>
</data>
<data name="Deactivated" xml:space="preserve">
<value>معطل</value>
</data>
<data name="Activated" xml:space="preserve">
<value>مفعل</value>
</data>
<data name="Expert" xml:space="preserve">
<value>خبير</value>
</data>
<data name="If the focus is lost and the Enter key was pressed" xml:space="preserve">
<value>إذا فقد التركيز وتم الضغط على مفتاح Enter</value>
</data>
<data name="Milliseconds until the menu closes if the menu is not reactivated" xml:space="preserve">
<value>مللي ثانية حتى يتم إغلاق القائمة إذا لم يتم إعادة تنشيط القائمة</value>
</data>
<data name="Show in Taskbar" xml:space="preserve">
<value>إظهار في شريط المهام</value>
</data>
<data name="Add directory" xml:space="preserve">
<value>أضف الدليل</value>
</data>
<data name="Add content of directory to root directory" xml:space="preserve">
<value>أضف محتوى الدليل إلى الدليل الجذر</value>
</data>
<data name="Directory paths" xml:space="preserve">
<value>مسارات الدليل</value>
</data>
<data name="Directories" xml:space="preserve">
<value>الدلائل</value>
</data>
<data name="Recursive" xml:space="preserve">
<value>العودية</value>
</data>
<data name="Remove directory" xml:space="preserve">
<value>إزالة الدليل</value>
</data>
<data name="Only Files" xml:space="preserve">
<value>الملفات فقط</value>
</data>
<data name="Clear cache if more than this number of items" xml:space="preserve">
<value>امسح ذاكرة التخزين المؤقت إذا كان هناك أكثر من هذا العدد من العناصر</value>
</data>
<data name="Add sample directory 'Start Menu'" xml:space="preserve">
<value>إضافة دليل نموذج "قائمة ابدأ"</value>
</data>
<data name="Row height" xml:space="preserve">
<value>ارتفاع الصف</value>
</data>
<data name="Round corners" xml:space="preserve">
<value>زوايا مستديرة</value>
</data>
<data name="Appearance" xml:space="preserve">
<value>مظهر</value>
</data>
<data name="Bottom left" xml:space="preserve">
<value>أسفل اليسار</value>
</data>
<data name="Bottom right" xml:space="preserve">
<value>أسفل اليمين</value>
</data>
<data name="Main menu appears" xml:space="preserve">
<value>تظهر القائمة الرئيسية</value>
</data>
<data name="Mouse location (above Taskbar icon)" xml:space="preserve">
<value>موقع الماوس (فوق رمز شريط المهام)</value>
</data>
<data name="Custom (drag it to the appropriate position)" xml:space="preserve">
<value>مخصص (اسحبه إلى الموضع المناسب)</value>
</data>
<data name="element" xml:space="preserve">
<value>عنصر</value>
</data>
<data name="elements" xml:space="preserve">
<value>عناصر</value>
</data>
<data name="Generate drive shortcuts on startup" xml:space="preserve">
<value>إنشاء اختصارات محرك الأقراص عند بدء التشغيل</value>
</data>
<data name="Cache" xml:space="preserve">
<value>مخبأ</value>
</data>
<data name="Always show" xml:space="preserve">
<value>تظهر دائما</value>
</data>
<data name="Hidden files and directories" xml:space="preserve">
<value>الملفات والأدلة المخفية</value>
</data>
<data name="Never show" xml:space="preserve">
<value>لا تظهر أبدا</value>
</data>
<data name="Size and location" xml:space="preserve">
<value>الحجم والموقع</value>
</data>
<data name="Use operating system settings" xml:space="preserve">
<value>استخدم إعدادات نظام التشغيل</value>
</data>
<data name="Show only as search result" xml:space="preserve">
<value>تظهر فقط كنتيجة بحث</value>
</data>
<data name="Single click to open a directory" xml:space="preserve">
<value>نقرة واحدة لفتح دليل</value>
</data>
<data name="Support Gamepad" xml:space="preserve">
<value>دعم Gamepad</value>
</data>
<data name="Next to the previous one" xml:space="preserve">
<value>بجانب السابق</value>
</data>
<data name="Offset by pixels" xml:space="preserve">
<value>الإزاحة بالبكسل</value>
</data>
<data name="Overlapping" xml:space="preserve">
<value>تداخل</value>
</data>
<data name="Sub menu appears" xml:space="preserve">
<value>تظهر القائمة الفرعية</value>
</data>
<data name="Icon size" xml:space="preserve">
<value>حجم الرمز</value>
</data>
<data name="Support SystemTrayMenu" xml:space="preserve">
<value>دعم SystemTrayMenu</value>
</data>
<data name="Fading" xml:space="preserve">
<value>بهوت</value>
</data>
<data name="Send hotkey to other instance" xml:space="preserve">
<value>إرسال مفتاح التشغيل السريع إلى حالة أخرى</value>
</data>
<data name="Sorted by date" xml:space="preserve">
<value>مرتبة حسب التاريخ</value>
</data>
<data name="Sorted by name" xml:space="preserve">
<value>مرتبة حسب الاسم</value>
</data>
<data name="Sorting" xml:space="preserve">
<value>فرز</value>
</data>
<data name="Copy row element via drag and drop" xml:space="preserve">
<value>انسخ عنصر الصف عن طريق السحب والإفلات</value>
</data>
<data name="Drag" xml:space="preserve">
<value>يجر</value>
</data>
<data name="Scroll via swipe" xml:space="preserve">
<value>انتقل عبر انتقاد</value>
</data>
<data name="Filter menu by file type e.g.: *.exe|*.dll" xml:space="preserve">
<value>قائمة التصفية حسب نوع الملف على سبيل المثال: * .exe | * .dll</value>
</data>
<data name="Show count of elements" xml:space="preserve">
<value>إظهار عدد العناصر</value>
</data>
<data name="Show directory title at top" xml:space="preserve">
<value>إظهار عنوان الدليل في الأعلى</value>
</data>
<data name="Show function key 'Open Folder'" xml:space="preserve">
<value>إظهار مفتاح الوظيفة "فتح مجلد"</value>
</data>
<data name="Show function key 'Pin menu'" xml:space="preserve">
<value>إظهار مفتاح الوظيفة "Pin menu"</value>
</data>
<data name="Show function key 'Settings'" xml:space="preserve">
<value>إظهار مفتاح الوظيفة "الإعدادات"</value>
</data>
<data name="Show function key 'Restart'" xml:space="preserve">
<value>إظهار مفتاح الوظيفة "إعادة التشغيل"</value>
</data>
<data name="Show search bar" xml:space="preserve">
<value>إظهار شريط البحث</value>
</data>
<data name="Saving log file in application directory" xml:space="preserve">
<value>حفظ ملف السجل في دليل التطبيق</value>
</data>
<data name="Show link overlay" xml:space="preserve">
<value>إظهار تراكب الارتباط</value>
</data>
<data name="Directory of Internet Shortcut Icons" xml:space="preserve">
<value>دليل أيقونات اختصارات الإنترنت</value>
</data>
<data name="Sorted by type (folder or file) and date" xml:space="preserve">
<value>مرتبة حسب النوع (مجلد أو ملف) والتاريخ</value>
</data>
<data name="Sorted by type (folder or file) and name" xml:space="preserve">
<value>مرتبة حسب النوع (المجلد أو الملف) والاسم</value>
</data>
<data name="Check for updates" xml:space="preserve">
<value>تحقق من وجود تحديثات</value>
</data>
<data name="Go to download page" xml:space="preserve">
<value>انتقل إلى صفحة التنزيل</value>
</data>
<data name="Latest available version:" xml:space="preserve">
<value>أحدث إصدار متاح:</value>
</data>
<data name="New version available!" xml:space="preserve">
<value>نسخة جديدة متاحة!</value>
</data>
<data name="You have the latest version of SystemTrayMenu!" xml:space="preserve">
<value>لديك أحدث إصدار من SystemTrayMenu!</value>
</data>
<data name="Application size" xml:space="preserve">
<value>حجم التطبيق</value>
</data>
<data name="Optional Features" xml:space="preserve">
<value>ميزات اختيارية</value>
</data>
<data name="Resolve links to folders and show content" xml:space="preserve">
<value>حل روابط المجلدات وإظهار المحتوى</value>
</data>
<data name="Sorted by file extension and name" xml:space="preserve">
<value>مرتبة حسب امتداد الملف والاسم</value>
</data>
<data name="Copy" xml:space="preserve">
<value>ينسخ</value>
</data>
<data name="To cut out" xml:space="preserve">
<value>لقطع</value>
</data>
<data name="To paste" xml:space="preserve">
<value>لصق</value>
</data>
<data name="Selecting All" xml:space="preserve">
<value>اختيار الكل</value>
</data>
<data name="Undo" xml:space="preserve">
<value>الغاء التحميل</value>
</data>
<data name="Don't show this hint again." xml:space="preserve">
<value>لا تظهر هذا التلميح مرة أخرى.</value>
</data>
<data name="Hint" xml:space="preserve">
<value>تَلمِيح</value>
</data>
<data name="The settings menu can also be opened by right-clicking the icon in the system tray at the bottom right, in case you can no longer open it via the menu." xml:space="preserve">
<value>يمكن أيضًا فتح قائمة الإعدادات بالنقر بزر الماوس الأيمن فوق الرمز الموجود في علبة النظام أسفل اليمين ، في حالة عدم قدرتك على فتحه عبر القائمة.</value>
</data>
</root>

Some files were not shown because too many files have changed in this diff Show more