From 539d22fb1ef9302e6df6aea7be848ea0bfb62aa2 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Fri, 28 Jan 2022 09:27:19 +0300 Subject: [PATCH] Edit dialog --- src/PriceListTools/ConvertTool.cs | 19 +++++++++++++++++-- src/RehauSku.Assist.csproj | 1 + 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/PriceListTools/ConvertTool.cs b/src/PriceListTools/ConvertTool.cs index 4c95988..1af27f5 100644 --- a/src/PriceListTools/ConvertTool.cs +++ b/src/PriceListTools/ConvertTool.cs @@ -1,4 +1,6 @@ -namespace RehauSku.PriceListTools +using System; + +namespace RehauSku.PriceListTools { internal class ConvertTool : PriceListTool { @@ -6,7 +8,20 @@ public void GetCurrent() { - Current = new Source(ExcelApp.ActiveWorkbook); + try + { + Current = new Source(ExcelApp.ActiveWorkbook); + } + + catch (Exception exception) + { + System.Windows.Forms.MessageBox.Show + (exception.Message, + "Ошибка распознавания", + System.Windows.Forms.MessageBoxButtons.OK, + System.Windows.Forms.MessageBoxIcon.Information); + throw exception; + } } public void FillTarget() diff --git a/src/RehauSku.Assist.csproj b/src/RehauSku.Assist.csproj index 8953924..be4a8b0 100644 --- a/src/RehauSku.Assist.csproj +++ b/src/RehauSku.Assist.csproj @@ -122,6 +122,7 @@ +