RhSolutions-AddIn/Source/ExcelDNA/AddIn.cs

39 lines
848 B
C#
Raw Normal View History

2021-11-29 15:50:24 +03:00
using ExcelDna.Integration;
using ExcelDna.Registration;
using System.Net.Http;
2021-11-29 15:50:24 +03:00
namespace Rehau.Sku.Assist
{
public enum ResponseOrder
{
NoSettings,
Relevance,
Name,
Price,
Series
}
2021-11-29 15:50:24 +03:00
public class AddIn : IExcelAddIn
{
2021-12-05 21:14:33 +03:00
public static readonly HttpClient httpClient = new HttpClient();
public static ResponseOrder responseOrder;
2021-11-29 15:50:24 +03:00
public void AutoOpen()
{
RegisterFunctions();
responseOrder = ResponseOrder.NoSettings;
2021-11-29 15:50:24 +03:00
}
public void AutoClose()
{
}
void RegisterFunctions()
{
ExcelRegistration.GetExcelFunctions()
.ProcessAsyncRegistrations(nativeAsyncIfAvailable: false)
.RegisterFunctions();
}
}
}