Skip to content

Commit

Permalink
- Added ability to automatically refresh the folder contents
Browse files Browse the repository at this point in the history
- Additional translations for Chinese, Russian, Korean
- Code cleanup
  • Loading branch information
brondavies committed Apr 4, 2024
1 parent 7c119bf commit 64ef3e8
Show file tree
Hide file tree
Showing 19 changed files with 616 additions and 50 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# TrayToolbar
Places a menu with all your favorite shortcuts within easy reach just by putting them in a local folder.

[![CodeQL](https://github.com/brondavies/TrayToolbar/actions/workflows/codeql.yml/badge.svg?branch=master&event=push)](https://github.com/brondavies/TrayToolbar/actions/workflows/codeql.yml) [![Download](https://badge.fury.io/gh/brondavies%2FTrayToolbar.svg)](https://github.com/brondavies/TrayToolbar/releases)

- Replaces the Windows 7-10 feature that no longer exists in Windows 11 for custom toolbars on the taskbar
- Choose the folder and customize the file filter
- Launches links, files and apps from this menu which exist in the chosen folder
- Includes support for English, Spanish, French, German, Portuguese, Italian, and Japanese

> 💡Can also be used in Windows 8 and 10!
<p style="background:#f9f9f9">💡 Can also be used in Windows 8 and 10!</p>

## Download
[Check the releases](https://github.com/brondavies/TrayToolbar/releases) or compile the source code in any modern version of Visual Studio.
Expand Down
13 changes: 0 additions & 13 deletions src/TrayToolbar/ConfigHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,5 @@ internal static void SetShowInTray()
key.SetValue("StartupTNotiTrayToolbar", 1, RegistryValueKind.DWord);
key.Close();
}

internal static void RunConfig(bool runOnLogin)
{
var yes = runOnLogin ? "yes" : "";
var startinfo = new ProcessStartInfo
{
UseShellExecute = true,
FileName = Assembly.GetExecutingAssembly().Location,
Arguments = $"--runonlogin {yes}",
Verb = "runas"
};
Process.Start(startinfo);
}
}
}
5 changes: 5 additions & 0 deletions src/TrayToolbar/ExtensionMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@ public static string Join(this string[] value, string separator = ", ")
{
return string.Join(separator, value);
}

public static Bitmap GetImage(this string file)
{
return (Icon.ExtractAssociatedIcon(file) ?? SystemIcons.Application).ToBitmap();
}
}
}
10 changes: 10 additions & 0 deletions src/TrayToolbar/MenuItemCollection.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System.Collections.ObjectModel;

namespace TrayToolbar
{
public class MenuItemCollection : ObservableCollection<ToolStripMenuItem>
{
public MenuItemCollection() { }
public bool NeedsRefresh { get; set; } = true;
}
}
6 changes: 0 additions & 6 deletions src/TrayToolbar/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ internal static class Program
[STAThread]
static void Main()
{
var args = Environment.GetCommandLineArgs();
if (args.Length > 0 && args[0] == "--runonlogin")
{
ConfigHelper.SetStartupKey(args.Length > 1);
return;
}
ApplicationConfiguration.Initialize();
Application.Run(new SettingsForm());
}
Expand Down
9 changes: 9 additions & 0 deletions src/TrayToolbar/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/TrayToolbar/Resources.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,7 @@
<data name="TrayToolbar Settings" xml:space="preserve">
<value>TrayToolbar-Einstellungen</value>
</data>
<data name="Refresh" xml:space="preserve">
<value>Aktualisierung</value>
</data>
</root>
3 changes: 3 additions & 0 deletions src/TrayToolbar/Resources.es.resx
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,7 @@
<data name="TrayToolbar Settings" xml:space="preserve">
<value>Configuración de la barra de herramientas de la bandeja</value>
</data>
<data name="Refresh" xml:space="preserve">
<value>Actualizar</value>
</data>
</root>
3 changes: 3 additions & 0 deletions src/TrayToolbar/Resources.fr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,7 @@
<data name="TrayToolbar Settings" xml:space="preserve">
<value>Paramètres de TrayToolbar</value>
</data>
<data name="Refresh" xml:space="preserve">
<value>Rafraîchir</value>
</data>
</root>
3 changes: 3 additions & 0 deletions src/TrayToolbar/Resources.it.resx
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,7 @@
<data name="TrayToolbar Settings" xml:space="preserve">
<value>Impostazioni della barra degli strumenti</value>
</data>
<data name="Refresh" xml:space="preserve">
<value>ricaricare</value>
</data>
</root>
3 changes: 3 additions & 0 deletions src/TrayToolbar/Resources.ja.resx
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,7 @@
<data name="TrayToolbar Settings" xml:space="preserve">
<value>トレイツールバーの設定</value>
</data>
<data name="Refresh" xml:space="preserve">
<value>リフレッシュ</value>
</data>
</root>
159 changes: 159 additions & 0 deletions src/TrayToolbar/Resources.ko.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
<?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="Cancel" xml:space="preserve">
<value>취소</value>
</data>
<data name="Error" xml:space="preserve">
<value>오류</value>
</data>
<data name="Exclude files" xml:space="preserve">
<value>파일 제외</value>
</data>
<data name="Exit" xml:space="preserve">
<value>출구</value>
</data>
<data name="Folder" xml:space="preserve">
<value>폴더</value>
</data>
<data name="Options" xml:space="preserve">
<value>옵션</value>
</data>
<data name="Refresh" xml:space="preserve">
<value>새로 고치다</value>
</data>
<data name="Run on log in" xml:space="preserve">
<value>로그인 시 실행</value>
</data>
<data name="Save" xml:space="preserve">
<value>구하다</value>
</data>
<data name="The folder does not exist" xml:space="preserve">
<value>폴더가 존재하지 않습니다.</value>
</data>
<data name="The folder value must be set" xml:space="preserve">
<value>폴더 값을 설정해야 합니다.</value>
</data>
<data name="TrayToolbar" xml:space="preserve">
<value>트레이툴바</value>
</data>
<data name="TrayToolbar Settings" xml:space="preserve">
<value>트레이툴바 설정</value>
</data>
</root>
3 changes: 3 additions & 0 deletions src/TrayToolbar/Resources.pt.resx
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,7 @@
<data name="TrayToolbar Settings" xml:space="preserve">
<value>Configurações da barra de ferramentas da bandeja</value>
</data>
<data name="Refresh" xml:space="preserve">
<value>Atualizar</value>
</data>
</root>
3 changes: 3 additions & 0 deletions src/TrayToolbar/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@
<data name="Options" xml:space="preserve">
<value>Options</value>
</data>
<data name="Refresh" xml:space="preserve">
<value>Refresh</value>
</data>
<data name="Run on log in" xml:space="preserve">
<value>Run on log in</value>
</data>
Expand Down
Loading

0 comments on commit 64ef3e8

Please sign in to comment.