aboutsummaryrefslogtreecommitdiff
path: root/Source/AddIn/AddIn.cs
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2021-12-17 09:07:03 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2021-12-17 09:07:03 +0300
commit2511d1b4440d7c450eb50e1eafdc2ac11b42a5e0 (patch)
tree543694588518f9da42b82c919ffc014425c705a5 /Source/AddIn/AddIn.cs
parente175a634cefc6e8c0ecd49514a89b1d4f30ce33b (diff)
Add RegistryUtil
Diffstat (limited to 'Source/AddIn/AddIn.cs')
-rw-r--r--Source/AddIn/AddIn.cs18
1 files changed, 2 insertions, 16 deletions
diff --git a/Source/AddIn/AddIn.cs b/Source/AddIn/AddIn.cs
index 5cae777..7a2be5d 100644
--- a/Source/AddIn/AddIn.cs
+++ b/Source/AddIn/AddIn.cs
@@ -1,7 +1,6 @@
using ExcelDna.Integration;
using ExcelDna.IntelliSense;
using ExcelDna.Registration;
-using Microsoft.Win32;
using System.Net.Http;
namespace RehauSku
@@ -18,13 +17,12 @@ namespace RehauSku
public class AddIn : IExcelAddIn
{
public static readonly HttpClient httpClient = new HttpClient();
- public static ResponseOrder StoreResponse { get; set; }
- public static string PriceListPath { get; set; }
+ public static ResponseOrder StoreResponseOrder = RegistryUtil.StoreResponseOrder;
+ public static string PriceListPath = RegistryUtil.PriceListPath;
public void AutoOpen()
{
RegisterFunctions();
- GetRegistryKeys();
IntelliSenseServer.Install();
}
@@ -39,17 +37,5 @@ namespace RehauSku
.ProcessAsyncRegistrations(nativeAsyncIfAvailable: false)
.RegisterFunctions();
}
-
- void GetRegistryKeys()
- {
- RegistryKey addInKeys = Registry
- .CurrentUser
- .OpenSubKey("SOFTWARE")
- .OpenSubKey("REHAU")
- .OpenSubKey("SkuAssist");
-
- StoreResponse = (ResponseOrder)addInKeys.GetValue("ResponseOrder");
- PriceListPath = (string)addInKeys.GetValue("PriceListPath");
- }
}
}