aboutsummaryrefslogtreecommitdiff
path: root/src/AddIn
diff options
context:
space:
mode:
Diffstat (limited to 'src/AddIn')
-rw-r--r--src/AddIn/AddIn.cs9
-rw-r--r--src/AddIn/Functions.cs4
-rw-r--r--src/AddIn/RegistryUtil.cs20
3 files changed, 1 insertions, 32 deletions
diff --git a/src/AddIn/AddIn.cs b/src/AddIn/AddIn.cs
index b532bfb..035e50f 100644
--- a/src/AddIn/AddIn.cs
+++ b/src/AddIn/AddIn.cs
@@ -7,15 +7,6 @@ using System.Runtime.Caching;
namespace RehauSku
{
- enum ResponseOrder
- {
- Default,
- Relevance,
- Name,
- Price,
- Series
- }
-
class AddIn : IExcelAddIn
{
public static HttpClient httpClient;
diff --git a/src/AddIn/Functions.cs b/src/AddIn/Functions.cs
index 867e246..efdec66 100644
--- a/src/AddIn/Functions.cs
+++ b/src/AddIn/Functions.cs
@@ -56,9 +56,7 @@ namespace RehauSku
[ExcelFunction(Description = "Получение корректного артикула из строки")]
public static object GETRAUSKU([ExcelArgument(Name = "\"Строка\"", Description = "строка, содержащая актикул")] string line)
{
- RauSku rausku;
-
- if (RauSku.TryParse(line, out rausku))
+ if (RauSku.TryParse(line, out RauSku rausku))
{
return rausku.ToString();
}
diff --git a/src/AddIn/RegistryUtil.cs b/src/AddIn/RegistryUtil.cs
index a13e941..54e071e 100644
--- a/src/AddIn/RegistryUtil.cs
+++ b/src/AddIn/RegistryUtil.cs
@@ -9,14 +9,12 @@ namespace RehauSku
static class RegistryUtil
{
private static string priceListPath;
- private static int? storeResponseOrder;
private static RegistryKey RootKey { get; set; }
public static void Initialize()
{
RootKey = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\REHAU\SkuAssist");
priceListPath = RootKey.GetValue("PriceListPath") as string;
- storeResponseOrder = RootKey.GetValue("StoreResponseOrder") as int?;
}
public static void Uninitialize()
@@ -71,23 +69,5 @@ namespace RehauSku
{
return Path.GetFileName(priceListPath);
}
-
- public static ResponseOrder StoreResponseOrder
- {
- get
- {
- if (storeResponseOrder == null)
- {
- RootKey.SetValue("StoreResponseOrder", (int)ResponseOrder.Default);
- storeResponseOrder = (int)ResponseOrder.Default;
- return (ResponseOrder)storeResponseOrder.Value;
- }
-
- else
- {
- return (ResponseOrder)storeResponseOrder.Value;
- }
- }
- }
}
}