aboutsummaryrefslogtreecommitdiff
path: root/src/AddIn/AddIn.cs
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2022-02-05 12:59:16 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2022-02-05 12:59:16 +0300
commit880b95f8625830e85b9eac816a4cd672d850297b (patch)
tree14a82a481614deee837b5a9460a1c454ebc8a1e8 /src/AddIn/AddIn.cs
parentcc96e1ebe7255c7278c70cef0f951103e9844487 (diff)
Create EventsUtil
Diffstat (limited to 'src/AddIn/AddIn.cs')
-rw-r--r--src/AddIn/AddIn.cs23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/AddIn/AddIn.cs b/src/AddIn/AddIn.cs
index ad77247..b532bfb 100644
--- a/src/AddIn/AddIn.cs
+++ b/src/AddIn/AddIn.cs
@@ -5,7 +5,6 @@ using Microsoft.Office.Interop.Excel;
using System.Net.Http;
using System.Runtime.Caching;
-
namespace RehauSku
{
enum ResponseOrder
@@ -27,34 +26,18 @@ namespace RehauSku
{
httpClient = new HttpClient();
memoryCache = new MemoryCache("RehauSku");
+ Excel = (Application)ExcelDnaUtil.Application;
RegisterFunctions();
IntelliSenseServer.Install();
RegistryUtil.Initialize();
- Excel = (Application)ExcelDnaUtil.Application;
- AddEvents();
- }
-
- private void AddEvents()
- {
- Excel.SheetSelectionChange += RefreshExportButton;
- Excel.SheetActivate += RefreshConvertButton;
- Excel.WorkbookActivate += RefreshConvertButton;
- }
-
- private void RefreshConvertButton(object sh)
- {
- Interface.RibbonController.RefreshControl("convertPrice");
- }
-
- private void RefreshExportButton(object sh, Range target)
- {
- Interface.RibbonController.RefreshControl("exportToPrice");
+ EventsUtil.Initialize();
}
public void AutoClose()
{
IntelliSenseServer.Uninstall();
RegistryUtil.Uninitialize();
+ EventsUtil.Uninitialize();
memoryCache.Dispose();
}