diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2022-12-20 12:41:46 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2022-12-20 12:41:46 +0300 |
commit | 6137433aefde1257fa42e0823242e66f5bd57e22 (patch) | |
tree | b2f3e99c9144b8568894547f9546c323cee4b3a9 /src/AddIn/AddIn.cs | |
parent | 73569a43644309d0342817580bcfd86c1face5b8 (diff) |
Refactoring
Diffstat (limited to 'src/AddIn/AddIn.cs')
-rw-r--r-- | src/AddIn/AddIn.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/AddIn/AddIn.cs b/src/AddIn/AddIn.cs new file mode 100644 index 0000000..b747264 --- /dev/null +++ b/src/AddIn/AddIn.cs @@ -0,0 +1,30 @@ +using ExcelDna.Integration; +using ExcelDna.IntelliSense; +using Microsoft.Office.Interop.Excel; +using RhSolutions.Services; +using System.Net.Http; + +namespace RhSolutions.AddIn +{ + class RhSolutionsAddIn : IExcelAddIn + { + public static Application Excel; + public static HttpClient httpClient; + + public void AutoOpen() + { + Excel = (Application)ExcelDnaUtil.Application; + httpClient = new HttpClient(); + IntelliSenseServer.Install(); + RegistryUtil.Initialize(); + EventsUtil.Initialize(); + } + + public void AutoClose() + { + IntelliSenseServer.Uninstall(); + RegistryUtil.Uninitialize(); + EventsUtil.Uninitialize(); + } + } +} |