Added Led-Images as layout-part

This commit is contained in:
DarthAffe committed 2017-02-11 09:39:03 +01:00
1 parent 6d48cae4b3
commit 256c6dea74
19 files changed
+184 -51

No files matched your search

@@ -0,0 +1,24 @@
using System.IO;
using System.Reflection;
namespace RGB.NET.Devices.Corsair.Helper
{
/// <summary>
/// Offers some helper-methods for file-path related things.
/// </summary>
public static class PathHelper
{
/// <summary>
/// Returns an absolute path created from an relative path relatvie to the location of the executung assembly.
/// </summary>
/// <param name="relativePath">The relative path to convert.</param>
/// <returns>The absolute path.</returns>
public static string GetAbsolutePath(string relativePath)
{
string assemblyLocation = Assembly.GetEntryAssembly()?.Location;
if (assemblyLocation == null) return relativePath;
return Path.Combine(Path.GetDirectoryName(assemblyLocation), relativePath);
}
}
}