2021-11-29 15:50:24 +03:00
|
|
|
|
using ExcelDna.Integration;
|
2021-12-13 20:39:41 +03:00
|
|
|
|
using ExcelDna.IntelliSense;
|
2022-01-09 15:47:54 +03:00
|
|
|
|
using Microsoft.Office.Interop.Excel;
|
2022-12-20 12:27:47 +03:00
|
|
|
|
using RhSolutions.Services;
|
2021-12-03 12:57:22 +03:00
|
|
|
|
using System.Net.Http;
|
2021-12-24 16:22:03 +03:00
|
|
|
|
using System.Runtime.Caching;
|
|
|
|
|
|
2022-12-19 20:25:35 +03:00
|
|
|
|
namespace RhSolutions
|
2021-11-29 15:50:24 +03:00
|
|
|
|
{
|
2022-12-20 12:27:47 +03:00
|
|
|
|
class RhSolutionsAddIn : IExcelAddIn
|
2021-11-29 15:50:24 +03:00
|
|
|
|
{
|
2022-01-09 15:47:54 +03:00
|
|
|
|
public static Application Excel;
|
2022-12-19 09:13:14 +03:00
|
|
|
|
public static HttpClient httpClient;
|
2021-12-03 12:57:22 +03:00
|
|
|
|
|
2021-11-29 15:50:24 +03:00
|
|
|
|
public void AutoOpen()
|
|
|
|
|
{
|
2022-02-05 12:59:16 +03:00
|
|
|
|
Excel = (Application)ExcelDnaUtil.Application;
|
2022-12-19 09:13:14 +03:00
|
|
|
|
httpClient = new HttpClient();
|
2021-12-13 20:39:41 +03:00
|
|
|
|
IntelliSenseServer.Install();
|
2021-12-22 17:07:37 +03:00
|
|
|
|
RegistryUtil.Initialize();
|
2022-02-05 12:59:16 +03:00
|
|
|
|
EventsUtil.Initialize();
|
2021-11-29 15:50:24 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void AutoClose()
|
|
|
|
|
{
|
2021-12-13 20:39:41 +03:00
|
|
|
|
IntelliSenseServer.Uninstall();
|
2021-12-23 15:31:23 +03:00
|
|
|
|
RegistryUtil.Uninitialize();
|
2022-02-05 12:59:16 +03:00
|
|
|
|
EventsUtil.Uninitialize();
|
2021-11-29 15:50:24 +03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|