Ok, Just Do It!

This commit is contained in:
Vitaliy
2017-02-18 00:15:59 +03:00
parent f0913f9873
commit 5c46ef7b7f
122 changed files with 1712 additions and 2177 deletions

View File

@@ -0,0 +1,31 @@
using System.IO;
using Microsoft.Win32;
namespace BrightSharp.Toolkit.Extra
{
public static class DesignTimeConfig
{
public static void SetNugetPackagesDirectory(string nugetDir)
{
if (Directory.Exists(nugetDir))
{
Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Brightsharp").SetValue("NUGET_PACKAGES", nugetDir);
}
}
public static void DesignTimeUnRegisterNugetPackages()
{
Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Brightsharp").SetValue("NUGET_PACKAGES", null);
}
internal static string GetNugetPackagesDirectory()
{
var regKey = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Brightsharp");
if (regKey != null)
{
var regValue = regKey.GetValue("NUGET_PACKAGES");
return (regValue ?? string.Empty).ToString();
}
return null;
}
}
}