aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2022-12-19 08:37:26 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2022-12-19 08:37:26 +0300
commita7e5a500e1c78ebc556f09831402838903fa4b79 (patch)
tree6a974a96e2d9012fe05d22eb2cd5cdd0206589ba /src
parente7d590bd2387f656d0b12db6fbe09abf647623bd (diff)
parentb66cc8fdce099daaf42f90ca8ae488bebd47d125 (diff)
Merge branch 'dev'
Diffstat (limited to 'src')
-rw-r--r--src/AddIn/AddIn.cs14
-rw-r--r--src/AddIn/Functions.cs48
-rw-r--r--src/AddIn/MemoryCacheUtil.cs37
-rw-r--r--src/AddIn/RegistryUtil.cs20
-rw-r--r--src/AddIn/RehauSku.cs67
-rw-r--r--src/Assistant/HttpClientUtil.cs53
-rw-r--r--src/Assistant/IProduct.cs9
-rw-r--r--src/Assistant/ParseUtil.cs44
-rw-r--r--src/Assistant/RequestModifier.cs67
-rw-r--r--src/Assistant/SkuAssist.cs22
-rw-r--r--src/Assistant/StoreResponse.cs21
-rw-r--r--src/PriceListTools/ExportTool.cs4
-rw-r--r--src/Properties/AssemblyInfo.cs4
-rw-r--r--src/Properties/ExcelDna.Build.props11
-rw-r--r--src/RehauSku.Assist-AddIn.dna7
-rw-r--r--src/RehauSku.Assist.csproj74
-rw-r--r--src/packages.config23
17 files changed, 109 insertions, 416 deletions
diff --git a/src/AddIn/AddIn.cs b/src/AddIn/AddIn.cs
index b532bfb..1606624 100644
--- a/src/AddIn/AddIn.cs
+++ b/src/AddIn/AddIn.cs
@@ -7,25 +7,12 @@ using System.Runtime.Caching;
namespace RehauSku
{
- enum ResponseOrder
- {
- Default,
- Relevance,
- Name,
- Price,
- Series
- }
-
class AddIn : IExcelAddIn
{
- public static HttpClient httpClient;
- public static MemoryCache memoryCache;
public static Application Excel;
public void AutoOpen()
{
- httpClient = new HttpClient();
- memoryCache = new MemoryCache("RehauSku");
Excel = (Application)ExcelDnaUtil.Application;
RegisterFunctions();
IntelliSenseServer.Install();
@@ -38,7 +25,6 @@ namespace RehauSku
IntelliSenseServer.Uninstall();
RegistryUtil.Uninitialize();
EventsUtil.Uninitialize();
- memoryCache.Dispose();
}
void RegisterFunctions()
diff --git a/src/AddIn/Functions.cs b/src/AddIn/Functions.cs
index 618d17d..c202a3b 100644
--- a/src/AddIn/Functions.cs
+++ b/src/AddIn/Functions.cs
@@ -1,56 +1,18 @@
using ExcelDna.Integration;
-using RehauSku.Assistant;
namespace RehauSku
{
public class Functions
{
- [ExcelFunction(description: "Получение названия первого продукта в поиске")]
- public static object RAUNAME([ExcelArgument(Name = "\"Запрос\"", Description = "в свободной форме или ячейка с запросом")] string request)
- => MakeRequest(request, ProductField.Name);
-
- [ExcelFunction(Description = "Получение артикула первого продукта в поиске")]
- public static object RAUSKU([ExcelArgument(Name = "\"Запрос\"", Description = "в свободной форме или ячейка с запросом")] string request)
- => MakeRequest(request, ProductField.Id);
-
- [ExcelFunction(Description = "Получение цены первого продукта в поиске")]
- public static object RAUPRICE([ExcelArgument(Name = "\"Запрос\"", Description = "в свободной форме или ячейка с запросом")] string request)
- => MakeRequest(request, ProductField.Price);
-
- private static object MakeRequest(string request, ProductField field)
+ [ExcelFunction(Description = "Получение корректного артикула из строки")]
+ public static object GETRAUSKU([ExcelArgument(Name = "\"Строка\"", Description = "строка, содержащая актикул")] string line)
{
- object result;
-
- if (request.IsCached())
- result = request.GetFromCache();
-
- else
+ if (RauSku.TryParse(line, out RauSku rausku))
{
- result = ExcelAsyncUtil.Run("Request", request, delegate
- {
- return request.RequestAndCache().GetAwaiter().GetResult();
- });
+ return rausku.ToString();
}
- if (result == null)
- return "Не найдено :(";
-
- if (result.Equals(ExcelError.ExcelErrorNA))
- return "Загрузка...";
-
- IProduct product = result as IProduct;
-
- switch (field)
- {
- case ProductField.Name:
- return product.Name;
- case ProductField.Id:
- return product.Id;
- case ProductField.Price:
- return double.Parse(product.Price, System.Globalization.CultureInfo.InvariantCulture);
- default:
- return null;
- }
+ else return ExcelError.ExcelErrorNA;
}
}
} \ No newline at end of file
diff --git a/src/AddIn/MemoryCacheUtil.cs b/src/AddIn/MemoryCacheUtil.cs
deleted file mode 100644
index 1d42e14..0000000
--- a/src/AddIn/MemoryCacheUtil.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System;
-using System.Runtime.Caching;
-using System.Threading.Tasks;
-using RehauSku.Assistant;
-
-namespace RehauSku
-{
- static class MemoryCacheUtil
- {
- public static bool IsCached(this string request)
- {
- return AddIn.memoryCache.Contains(request);
- }
-
- public static IProduct GetFromCache(this string request)
- {
- return AddIn.memoryCache[request] as IProduct;
- }
-
- public static async Task<IProduct> RequestAndCache(this string request)
- {
- IProduct product = await SkuAssist.GetProductAsync(request);
-
- if (product == null)
- return null;
-
- AddIn.memoryCache.Add(request, product, DateTime.Now.AddMinutes(10));
- return product;
- }
-
- public static void ClearCache()
- {
- AddIn.memoryCache.Dispose();
- AddIn.memoryCache = new MemoryCache("RehauSku");
- }
- }
-} \ No newline at end of file
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;
- }
- }
- }
}
}
diff --git a/src/AddIn/RehauSku.cs b/src/AddIn/RehauSku.cs
new file mode 100644
index 0000000..40e5d30
--- /dev/null
+++ b/src/AddIn/RehauSku.cs
@@ -0,0 +1,67 @@
+using System.Text.RegularExpressions;
+
+namespace RehauSku
+{
+ internal class RauSku
+ {
+ public string Sku { get; private set; }
+ public string Variant { get; private set; }
+
+ public RauSku(string sku, string variant)
+ {
+ Sku = sku;
+ Variant = variant;
+ }
+
+ public static bool TryParse(string line, out RauSku rehauSku)
+ {
+ Match match;
+ match = Regex.Match(line, @"\b[1]\d{6}[1]\d{3}\b");
+ if (match.Success)
+ {
+ string sku = match.Value.Substring(1, 6);
+ string variant = match.Value.Substring(8, 3);
+ rehauSku = new RauSku(sku, variant);
+ return true;
+ }
+
+ match = Regex.Match(line, @"\b\d{6}\D\d{3}\b");
+ if (match.Success)
+ {
+ string sku = match.Value.Substring(0, 6);
+ string variant = match.Value.Substring(7, 3);
+ rehauSku = new RauSku(sku, variant);
+ return true;
+ }
+
+ match = Regex.Match(line, @"\b\d{9}\b");
+ if (match.Success)
+ {
+ string sku = match.Value.Substring(0, 6);
+ string variant = match.Value.Substring(6, 3);
+ rehauSku = new RauSku(sku, variant);
+ return true;
+ }
+
+ match = Regex.Match(line, @"\b\d{6}\b");
+ if (match.Success)
+ {
+ string sku = match.Value.Substring(0, 6);
+ string variant = "001";
+ rehauSku = new RauSku(sku, variant);
+ return true;
+ }
+
+ else
+ {
+ rehauSku = null;
+ return false;
+ }
+ }
+
+ public override string ToString()
+ {
+ return $"1{Sku}1{Variant}";
+ }
+ }
+} \ No newline at end of file
diff --git a/src/Assistant/HttpClientUtil.cs b/src/Assistant/HttpClientUtil.cs
deleted file mode 100644
index 316ea07..0000000
--- a/src/Assistant/HttpClientUtil.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using System;
-using System.Net;
-using System.Net.Http;
-using System.Threading.Tasks;
-
-namespace RehauSku.Assistant
-{
- static class HttpClientUtil
- {
- private static HttpClient _httpClient = AddIn.httpClient;
-
- public async static Task<string> GetContentByRequest(string request)
- {
- Uri uri = request.ConvertToUri();
-
- ServicePointManager.SecurityProtocol =
- SecurityProtocolType.Tls12 |
- SecurityProtocolType.Tls11 |
- SecurityProtocolType.Tls;
-
- return await _httpClient.GetStringAsync(uri);
- }
-
- private static Uri ConvertToUri(this string request)
- {
- UriBuilder baseUri = new UriBuilder("https", "shop-rehau.ru");
-
- baseUri.Path = "/catalogsearch/result/index/";
- string cleanedRequest = request.CleanRequest();
-
- switch (RegistryUtil.StoreResponseOrder)
- {
- case ResponseOrder.Relevance:
- baseUri.Query = "dir=asc&order=relevance&q=" + cleanedRequest;
- break;
- case ResponseOrder.Name:
- baseUri.Query = "dir=asc&order=name&q=" + cleanedRequest;
- break;
- case ResponseOrder.Price:
- baseUri.Query = "dir=asc&order=price&q=" + cleanedRequest;
- break;
- case ResponseOrder.Series:
- baseUri.Query = "dir=asc&order=sch_product_series&q=" + cleanedRequest;
- break;
- default:
- baseUri.Query = "q=" + cleanedRequest;
- break;
- }
-
- return baseUri.Uri;
- }
- }
-} \ No newline at end of file
diff --git a/src/Assistant/IProduct.cs b/src/Assistant/IProduct.cs
deleted file mode 100644
index 9494eeb..0000000
--- a/src/Assistant/IProduct.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace RehauSku.Assistant
-{
- interface IProduct
- {
- string Id { get; }
- string Name { get; }
- string Price { get; }
- }
-}
diff --git a/src/Assistant/ParseUtil.cs b/src/Assistant/ParseUtil.cs
deleted file mode 100644
index a93c658..0000000
--- a/src/Assistant/ParseUtil.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using AngleSharp;
-using AngleSharp.Dom;
-using Newtonsoft.Json;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace RehauSku.Assistant
-{
- static class ParseUtil
- {
- public async static Task<IDocument> ContentToDocAsync(string content)
- {
- IConfiguration config = Configuration.Default;
- IBrowsingContext context = BrowsingContext.New(config);
-
- return await context.OpenAsync(req => req.Content(content));
- }
-
- public static IProduct GetProduct(IDocument document)
- {
- string script = document
- .Scripts
- .Where(s => s.InnerHtml.Contains("dataLayer"))
- .FirstOrDefault()
- .InnerHtml;
-
- string json = script
- .Substring(script.IndexOf("push(") + 5)
- .TrimEnd(new[] { ')', ';', '\n', ' ' });
-
- if (!json.Contains("impressions"))
- return null;
-
- StoreResponce storeResponse = JsonConvert.DeserializeObject<StoreResponce>(json);
- IProduct product = storeResponse
- .Ecommerce
- .Impressions
- .Where(p => p.Id.IsRehauSku())
- .FirstOrDefault();
-
- return product;
- }
- }
-} \ No newline at end of file
diff --git a/src/Assistant/RequestModifier.cs b/src/Assistant/RequestModifier.cs
deleted file mode 100644
index c2c3436..0000000
--- a/src/Assistant/RequestModifier.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
-
-namespace RehauSku.Assistant
-{
- static class RequestModifier
- {
- public static string CleanRequest(this string input)
- {
- string replace = new StringBuilder(input)
- .Replace("+", " plus ")
- .Replace("РХ", "")
- .Replace("º", " ")
- .Replace(".", " ")
- .Replace("Ø", " ")
- .ToString();
-
- return replace._tPieceNormalize();
- }
-
- private static string _tPieceNormalize(this string line)
- {
- Regex regex = new Regex(@"\d{2}.\d{2}.\d{2}");
-
- if (!regex.IsMatch(line))
- return line;
-
- string match = regex.Match(line).Value;
-
- int side = int.Parse($"{match[3]}{match[4]}");
- int[] endFaces = new int[]
- {
- int.Parse($"{match[0]}{match[1]}"),
- int.Parse($"{match[6]}{match[7]}")
- };
-
- if (new[] { endFaces[0], endFaces[1], side }.Any(x => x == 45 || x == 90 || x == 87))
- return line;
-
- List<string> additions = new List<string>();
-
- if (endFaces.All(x => x < side))
- additions.Add("увеличенный боковой");
-
- else
- {
- if (new[] { endFaces[0], endFaces[1], side }.Distinct().Count() == 1)
- additions.Add("равнопроходной");
- else
- additions.Add("уменьшенный");
-
- if (endFaces.Any(x => x > side))
- additions.Add("боковой");
-
- if (endFaces[0] != endFaces[1])
- additions.Add("торцевой");
- }
-
- string piece = $" {endFaces.Max()}-{side}-{endFaces.Min()} ";
- string modifiedMatch = string.Join(" ", additions) + piece;
-
- return line.Replace(match, modifiedMatch);
- }
- }
-} \ No newline at end of file
diff --git a/src/Assistant/SkuAssist.cs b/src/Assistant/SkuAssist.cs
deleted file mode 100644
index 85a084c..0000000
--- a/src/Assistant/SkuAssist.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using System.Threading.Tasks;
-
-namespace RehauSku.Assistant
-{
- enum ProductField
- {
- Name,
- Id,
- Price
- }
-
- static class SkuAssist
- {
- public static async Task<IProduct> GetProductAsync(string request)
- {
- var content = await HttpClientUtil.GetContentByRequest(request);
- var document = await ParseUtil.ContentToDocAsync(content);
-
- return ParseUtil.GetProduct(document);
- }
- }
-} \ No newline at end of file
diff --git a/src/Assistant/StoreResponse.cs b/src/Assistant/StoreResponse.cs
deleted file mode 100644
index 1a9b1c5..0000000
--- a/src/Assistant/StoreResponse.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.Collections.Generic;
-
-namespace RehauSku.Assistant
-{
- class StoreResponce
- {
- public Ecommerce Ecommerce { get; set; }
- }
-
- class Ecommerce
- {
- public List<Product> Impressions { get; set; }
- }
-
- class Product : IProduct
- {
- public string Id { get; set; }
- public string Name { get; set; }
- public string Price { get; set; }
- }
-} \ No newline at end of file
diff --git a/src/PriceListTools/ExportTool.cs b/src/PriceListTools/ExportTool.cs
index 1a24d48..4e51563 100644
--- a/src/PriceListTools/ExportTool.cs
+++ b/src/PriceListTools/ExportTool.cs
@@ -56,9 +56,9 @@ namespace RehauSku.PriceListTools
{
object current = cells[row, column];
- if (current.ToString().IsRehauSku())
+ if (RauSku.TryParse(current.ToString(), out RauSku rauSku))
{
- sku = current.ToString();
+ sku = rauSku.ToString();
}
else if (current.GetType() == typeof(string)
diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs
index d254dfc..6a5c3a2 100644
--- a/src/Properties/AssemblyInfo.cs
+++ b/src/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.4.3")]
-[assembly: AssemblyFileVersion("1.0.4.3")]
+[assembly: AssemblyVersion("1.0.5.0")]
+[assembly: AssemblyFileVersion("1.0.5.0")]
diff --git a/src/Properties/ExcelDna.Build.props b/src/Properties/ExcelDna.Build.props
index 1fed993..f5fdab1 100644
--- a/src/Properties/ExcelDna.Build.props
+++ b/src/Properties/ExcelDna.Build.props
@@ -72,6 +72,15 @@
Suffix used for packed .xll files e.g. MyAddIn-packed.xll
-->
<ExcelDnaPackXllSuffix Condition="'$(ExcelDnaPackXllSuffix)' == ''">-packed</ExcelDnaPackXllSuffix>
+
+ <!--
+ Options used when packing .xll files.
+ When in trouble with your virus scanner, try uncommenting at least the resource compression properties.
+ The default is true for both compression and multithreaded runs when not specified.
+ -->
+ <!--<ExcelDnaPackCompressResources Condition="'$(ConfigurationName)' == 'Debug'">false</ExcelDnaPackCompressResources>-->
+ <!--<ExcelDnaPackRunMultithreaded Condition="'$(ConfigurationName)' == 'Debug'">false</ExcelDnaPackRunMultithreaded>-->
+ <!--<ExcelDnaPackCompressResources Condition="'$(ConfigurationName)' == 'Release'">false</ExcelDnaPackCompressResources>-->
+ <!--<ExcelDnaPackRunMultithreaded Condition="'$(ConfigurationName)' == 'Release'">false</ExcelDnaPackRunMultithreaded>-->
</PropertyGroup>
</Project>
-
diff --git a/src/RehauSku.Assist-AddIn.dna b/src/RehauSku.Assist-AddIn.dna
index 1bef6e1..0b173b3 100644
--- a/src/RehauSku.Assist-AddIn.dna
+++ b/src/RehauSku.Assist-AddIn.dna
@@ -1,13 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<DnaLibrary Name="RehauSku.Assist Add-In" RuntimeVersion="v4.0" xmlns="http://schemas.excel-dna.net/addin/2020/07/dnalibrary">
<ExternalLibrary Path="RehauSku.Assist.dll" ExplicitRegistration="true" LoadFromBytes="true" Pack="true" IncludePdb="false" />
- <Reference Path="AngleSharp.dll" Pack="true" />
<Reference Path="ExcelDna.Registration.dll" Pack="true" />
- <Reference Path="Newtonsoft.Json.dll" Pack="true" />
- <Reference Path="System.Buffers.dll" Pack="true" />
- <Reference Path="System.Memory.dll" Pack="true" />
- <Reference Path="System.Numerics.Vectors.dll" Pack="true" />
- <Reference Path="System.Runtime.CompilerServices.Unsafe.dll" Pack="true" />
- <Reference Path="System.Text.Encoding.CodePages.dll" Pack="true" />
<Reference Path="ExcelDna.IntelliSense.dll" Pack="true" />
</DnaLibrary> \ No newline at end of file
diff --git a/src/RehauSku.Assist.csproj b/src/RehauSku.Assist.csproj
index 8a2990b..b74f82f 100644
--- a/src/RehauSku.Assist.csproj
+++ b/src/RehauSku.Assist.csproj
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="..\packages\ExcelDna.AddIn.1.6.0\build\ExcelDna.AddIn.props" Condition="Exists('..\packages\ExcelDna.AddIn.1.6.0\build\ExcelDna.AddIn.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -34,76 +35,37 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="AngleSharp, Version=0.16.1.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea, processorArchitecture=MSIL">
- <HintPath>packages\AngleSharp.0.16.1\lib\net472\AngleSharp.dll</HintPath>
- <Private>True</Private>
- </Reference>
<Reference Include="ExcelDna.Integration, Version=1.1.0.0, Culture=neutral, PublicKeyToken=f225e9659857edbe, processorArchitecture=MSIL">
- <HintPath>packages\ExcelDna.Integration.1.5.1\lib\net452\ExcelDna.Integration.dll</HintPath>
- <Private>True</Private>
+ <HintPath>..\packages\ExcelDna.Integration.1.6.0\lib\net452\ExcelDna.Integration.dll</HintPath>
</Reference>
- <Reference Include="ExcelDna.IntelliSense, Version=1.5.1.0, Culture=neutral, PublicKeyToken=f225e9659857edbe, processorArchitecture=MSIL">
- <HintPath>packages\ExcelDna.IntelliSense.1.5.1\lib\net452\ExcelDna.IntelliSense.dll</HintPath>
+ <Reference Include="ExcelDna.IntelliSense, Version=1.1.0.0, Culture=neutral, PublicKeyToken=f225e9659857edbe, processorArchitecture=MSIL">
+ <HintPath>..\packages\ExcelDna.IntelliSense.1.6.0\lib\net452\ExcelDna.IntelliSense.dll</HintPath>
</Reference>
<Reference Include="ExcelDna.Registration, Version=1.1.0.0, Culture=neutral, PublicKeyToken=f225e9659857edbe, processorArchitecture=MSIL">
- <HintPath>packages\ExcelDna.Registration.1.5.1\lib\net452\ExcelDna.Registration.dll</HintPath>
- <Private>True</Private>
+ <HintPath>..\packages\ExcelDna.Registration.1.6.0\lib\net452\ExcelDna.Registration.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
- <HintPath>packages\ExcelDna.Interop.14.0.1\lib\Microsoft.Office.Interop.Excel.dll</HintPath>
+ <Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
+ <HintPath>..\packages\ExcelDna.Interop.15.0.0\lib\net452\Microsoft.Office.Interop.Excel.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
- <Private>True</Private>
</Reference>
- <Reference Include="Microsoft.Vbe.Interop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
- <HintPath>packages\ExcelDna.Interop.14.0.1\lib\Microsoft.Vbe.Interop.dll</HintPath>
+ <Reference Include="Microsoft.Vbe.Interop, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
+ <HintPath>..\packages\ExcelDna.Interop.15.0.0\lib\net452\Microsoft.Vbe.Interop.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
- <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
- <HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
- </Reference>
- <Reference Include="Office, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
- <HintPath>packages\ExcelDna.Interop.14.0.1\lib\Office.dll</HintPath>
+ <Reference Include="Office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
+ <HintPath>..\packages\ExcelDna.Interop.15.0.0\lib\net452\Office.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="System" />
- <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
- <HintPath>packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
- </Reference>
<Reference Include="System.Configuration" />
- <Reference Include="System.Configuration.ConfigurationManager, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
- <HintPath>packages\System.Configuration.ConfigurationManager.6.0.0\lib\net461\System.Configuration.ConfigurationManager.dll</HintPath>
- </Reference>
<Reference Include="System.Core" />
<Reference Include="System.Data.OracleClient" />
<Reference Include="System.Drawing" />
- <Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
- <HintPath>packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
- </Reference>
<Reference Include="System.Net" />
<Reference Include="System.Numerics" />
- <Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
- </Reference>
<Reference Include="System.Runtime.Caching" />
- <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
- <Private>True</Private>
- </Reference>
<Reference Include="System.Security" />
- <Reference Include="System.Security.AccessControl, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>packages\System.Security.AccessControl.6.0.0\lib\net461\System.Security.AccessControl.dll</HintPath>
- </Reference>
- <Reference Include="System.Security.Permissions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
- <HintPath>packages\System.Security.Permissions.6.0.0\lib\net461\System.Security.Permissions.dll</HintPath>
- </Reference>
- <Reference Include="System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
- </Reference>
<Reference Include="System.ServiceProcess" />
- <Reference Include="System.Text.Encoding.CodePages, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>packages\System.Text.Encoding.CodePages.6.0.0\lib\net461\System.Text.Encoding.CodePages.dll</HintPath>
- <Private>True</Private>
- </Reference>
<Reference Include="System.Transactions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
@@ -116,12 +78,10 @@
</ItemGroup>
<ItemGroup>
<Compile Include="AddIn\EventsUtil.cs" />
+ <Compile Include="AddIn\RehauSku.cs" />
<Compile Include="Interface\AbstractBar.cs" />
<Compile Include="Interface\Dialog.cs" />
<Compile Include="AddIn\RegistryUtil.cs" />
- <Compile Include="AddIn\MemoryCacheUtil.cs" />
- <Compile Include="Assistant\ParseUtil.cs" />
- <Compile Include="Assistant\RequestModifier.cs" />
<Compile Include="AddIn\SkuExtensions.cs" />
<Compile Include="Interface\ProgressBar.cs" />
<Compile Include="Interface\ResultBar.cs" />
@@ -135,15 +95,11 @@
<Compile Include="PriceListTools\SourcePriceList.cs" />
<Compile Include="PriceListTools\TargetPriceList.cs" />
<Compile Include="Interface\RibbonController.cs" />
- <Compile Include="Assistant\HttpClientUtil.cs" />
- <Compile Include="Assistant\StoreResponse.cs" />
<Compile Include="PriceListTools\ExportTool.cs" />
<Compile Include="AddIn\AddIn.cs" />
- <Compile Include="Assistant\IProduct.cs" />
<Compile Include="AddIn\Functions.cs" />
<Compile Include="AddIn\WorksheetExtensions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Assistant\SkuAssist.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
@@ -158,6 +114,10 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('packages\ExcelDna.AddIn.1.5.1\build\ExcelDna.AddIn.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\ExcelDna.AddIn.1.5.1\build\ExcelDna.AddIn.targets'))" />
+ <Error Condition="!Exists('..\packages\ExcelDna.AddIn.1.6.0\build\ExcelDna.AddIn.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ExcelDna.AddIn.1.6.0\build\ExcelDna.AddIn.props'))" />
+ <Error Condition="!Exists('..\packages\ExcelDna.AddIn.1.6.0\build\ExcelDna.AddIn.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ExcelDna.AddIn.1.6.0\build\ExcelDna.AddIn.targets'))" />
+ <Error Condition="!Exists('..\packages\ExcelDna.Interop.15.0.0\build\ExcelDna.Interop.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ExcelDna.Interop.15.0.0\build\ExcelDna.Interop.targets'))" />
</Target>
+ <Import Project="..\packages\ExcelDna.AddIn.1.6.0\build\ExcelDna.AddIn.targets" Condition="Exists('..\packages\ExcelDna.AddIn.1.6.0\build\ExcelDna.AddIn.targets')" />
+ <Import Project="..\packages\ExcelDna.Interop.15.0.0\build\ExcelDna.Interop.targets" Condition="Exists('..\packages\ExcelDna.Interop.15.0.0\build\ExcelDna.Interop.targets')" />
</Project> \ No newline at end of file
diff --git a/src/packages.config b/src/packages.config
index b92606b..3820e62 100644
--- a/src/packages.config
+++ b/src/packages.config
@@ -1,20 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="AngleSharp" version="0.16.1" targetFramework="net48" />
- <package id="ExcelDna.AddIn" version="1.5.1" targetFramework="net48" />
- <package id="ExcelDna.Integration" version="1.5.1" targetFramework="net48" />
- <package id="ExcelDna.IntelliSense" version="1.5.1" targetFramework="net48" />
- <package id="ExcelDna.Interop" version="14.0.1" targetFramework="net48" />
- <package id="ExcelDna.Registration" version="1.5.1" targetFramework="net48" />
- <package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
- <package id="System.Buffers" version="4.5.1" targetFramework="net48" />
- <package id="System.Configuration.ConfigurationManager" version="6.0.0" targetFramework="net48" />
- <package id="System.Memory" version="4.5.4" targetFramework="net48" />
- <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
- <package id="System.Runtime.Caching" version="6.0.0" targetFramework="net48" />
- <package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
- <package id="System.Security.AccessControl" version="6.0.0" targetFramework="net48" />
- <package id="System.Security.Permissions" version="6.0.0" targetFramework="net48" />
- <package id="System.Security.Principal.Windows" version="5.0.0" targetFramework="net48" />
- <package id="System.Text.Encoding.CodePages" version="6.0.0" targetFramework="net48" />
+ <package id="ExcelDna.AddIn" version="1.6.0" targetFramework="net48" />
+ <package id="ExcelDna.Integration" version="1.6.0" targetFramework="net48" />
+ <package id="ExcelDna.IntelliSense" version="1.6.0" targetFramework="net48" />
+ <package id="ExcelDna.Interop" version="15.0.0" targetFramework="net48" />
+ <package id="ExcelDna.Registration" version="1.6.0" targetFramework="net48" />
+ <package id="Microsoft.CSharp" version="4.7.0" targetFramework="net48" />
</packages> \ No newline at end of file