diff options
Diffstat (limited to 'Source/ExcelDNA')
-rw-r--r-- | Source/ExcelDNA/AddIn.cs | 53 | ||||
-rw-r--r-- | Source/ExcelDNA/Functions.cs | 19 |
2 files changed, 0 insertions, 72 deletions
diff --git a/Source/ExcelDNA/AddIn.cs b/Source/ExcelDNA/AddIn.cs deleted file mode 100644 index 3c82406..0000000 --- a/Source/ExcelDNA/AddIn.cs +++ /dev/null @@ -1,53 +0,0 @@ -using ExcelDna.Integration; -using ExcelDna.Registration; -using Microsoft.Win32; -using System.Net.Http; - -namespace RehauSku.Assist -{ - public enum ResponseOrder - { - Default, - Relevance, - Name, - Price, - Series - } - - public class AddIn : IExcelAddIn - { - public static readonly HttpClient httpClient = new HttpClient(); - public static ResponseOrder responseOrder; - public static string priceListPath; - - public void AutoOpen() - { - RegisterFunctions(); - GetRegistryKeys(); - } - - public void AutoClose() - { - - } - - void RegisterFunctions() - { - ExcelRegistration.GetExcelFunctions() - .ProcessAsyncRegistrations(nativeAsyncIfAvailable: false) - .RegisterFunctions(); - } - - void GetRegistryKeys() - { - RegistryKey addInKeys = Registry - .CurrentUser - .OpenSubKey("SOFTWARE") - .OpenSubKey("REHAU") - .OpenSubKey("SkuAssist"); - - responseOrder = (ResponseOrder)addInKeys.GetValue("ResponseOrder"); - priceListPath = (string)addInKeys.GetValue("PriceListPath"); - } - } -} diff --git a/Source/ExcelDNA/Functions.cs b/Source/ExcelDNA/Functions.cs deleted file mode 100644 index 6d94e24..0000000 --- a/Source/ExcelDNA/Functions.cs +++ /dev/null @@ -1,19 +0,0 @@ -using ExcelDna.Integration; - -namespace RehauSku.Assist -{ - public class Functions - { - [ExcelFunction] - public static object RAUNAME(string request) - => SkuAssist.GetProduct(request, ProductField.Name); - - [ExcelFunction] - public static object RAUSKU(string request) - => SkuAssist.GetProduct(request, ProductField.Id); - - [ExcelFunction] - public static object RAUPRICE(string request) - => SkuAssist.GetProduct(request, ProductField.Price); - } -}
\ No newline at end of file |