aboutsummaryrefslogtreecommitdiff
path: root/src/AddIn/RegistryUtil.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/AddIn/RegistryUtil.cs')
-rw-r--r--src/AddIn/RegistryUtil.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/AddIn/RegistryUtil.cs b/src/AddIn/RegistryUtil.cs
index 3ec6f6a..5fe2eea 100644
--- a/src/AddIn/RegistryUtil.cs
+++ b/src/AddIn/RegistryUtil.cs
@@ -1,5 +1,5 @@
using Microsoft.Win32;
-using RehauSku.Forms;
+using RehauSku.Interface;
using System;
using System.IO;
using System.Windows.Forms;
@@ -38,6 +38,12 @@ namespace RehauSku
if (result == DialogResult.OK)
{
string fileName = Dialog.GetFilePath();
+
+ if (string.IsNullOrEmpty(fileName))
+ {
+ throw new Exception("Нет файла шаблона");
+ }
+
priceListPath = fileName;
RootKey.SetValue("PriceListPath", fileName);
return priceListPath;