Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

</p>
<p align="center">
<b>Taskbar groups is a lightweight utility for Windows that lets the users create groups of shortcuts in the taskbar.</b>
<b>Taskbar groups is a lightweight utility for Windows that lets the users create groups of shortcuts in the taskbar.</b><br>
<b>Fully compatible with Windows 10 and Windows 11.</b>

<p align="center">
<a href="https://github.com/tjackenpacken/taskbar-groups/releases">Download & Release Notes</a>
Expand Down
28 changes: 15 additions & 13 deletions main/Classes/Category.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ public Category(string path)
public void CreateConfig(Image groupImage)
{

string path = @"config\" + this.Name;
string path = Path.Combine(MainPath.path, "config", this.Name);
//string filePath = path + @"\" + this.Name + "Group.exe";
//
// Directory and .exe
//
System.IO.Directory.CreateDirectory(@path);
System.IO.Directory.CreateDirectory(path);

//System.IO.File.Copy(@"config\config.exe", @filePath);
//
Expand All @@ -76,7 +76,7 @@ public void CreateConfig(Image groupImage)
System.Xml.Serialization.XmlSerializer writer =
new System.Xml.Serialization.XmlSerializer(typeof(Category));

using (FileStream file = System.IO.File.Create(@path + @"\ObjectData.xml"))
using (FileStream file = System.IO.File.Create(Path.Combine(path, "ObjectData.xml")))
{
writer.Serialize(file, this);
file.Close();
Expand All @@ -86,14 +86,16 @@ public void CreateConfig(Image groupImage)
//

Image img = ImageFunctions.ResizeImage(groupImage, 256, 256); // Resize img if too big
img.Save(path + @"\GroupImage.png");
img.Save(Path.Combine(path, "GroupImage.png"));

string iconPath = Path.Combine(path, "GroupIcon.ico");

if (GetMimeType(groupImage).ToString() == "*.PNG")
{
createMultiIcon(groupImage, path + @"\GroupIcon.ico");
createMultiIcon(groupImage, iconPath);
}
else {
using (FileStream fs = new FileStream(path + @"\GroupIcon.ico", FileMode.Create))
using (FileStream fs = new FileStream(iconPath, FileMode.Create))
{
ImageFunctions.IconFromImage(img).Save(fs);
fs.Close();
Expand All @@ -105,21 +107,21 @@ public void CreateConfig(Image groupImage)
// Needed due to needing to set a unique AppUserModelID so the shortcut applications don't stack on the taskbar with the main application
// Tricks Windows to think they are from different applications even though they are from the same .exe
ShellLink.InstallShortcut(
Path.GetFullPath(@System.AppDomain.CurrentDomain.FriendlyName),
MainPath.exeString,
"tjackenpacken.taskbarGroup.menu." + this.Name,
path + " shortcut",
Path.GetFullPath(@path),
Path.GetFullPath(path + @"\GroupIcon.ico"),
path + "\\" + this.Name + ".lnk",
this.Name + " shortcut",
path,
iconPath,
Path.Combine(path, this.Name + ".lnk"),
this.Name
);


// Build the icon cache
cacheIcons();

System.IO.File.Move(@path + "\\" + this.Name + ".lnk",
Path.GetFullPath(@"Shortcuts\" + Regex.Replace(this.Name, @"(_)+", " ") + ".lnk")); // Move .lnk to correct directory
System.IO.File.Move(Path.Combine(path, this.Name + ".lnk"),
Path.Combine(MainPath.path, "Shortcuts", Regex.Replace(this.Name, @"(_)+", " ") + ".lnk")); // Move .lnk to correct directory
}

private static void createMultiIcon(Image iconImage, string filePath)
Expand Down
75 changes: 75 additions & 0 deletions main/Properties/app.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.

<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />

Specifying requestedExecutionLevel element will disable file and registry virtualization.
Remove this element if your application requires this virtualization for backward
compatibility.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on
and is designed to work with. Uncomment the appropriate elements
and Windows will automatically select the most compatible environment. -->

<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->

<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />

<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />

<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />

<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />

</application>
</compatibility>
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config.

Makes the application long-path aware. See https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
-->
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>
1 change: 1 addition & 0 deletions main/client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Icon.ico</ApplicationIcon>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="ChinhDo.Transactions.FileManager, Version=1.4.0.36, Culture=neutral, processorArchitecture=MSIL">
Expand Down