aboutsummaryrefslogtreecommitdiff
path: root/src/AddIn/RegistryUtil.cs
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2022-02-02 18:34:32 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2022-02-02 18:34:32 +0300
commit5001219695090d4a6ead73b2d17434b0805516a3 (patch)
treed94d40a4b13f907f3315eb81dde0d5d3963e26de /src/AddIn/RegistryUtil.cs
parent9018d7d504dfebbec9a3c75851314d25d1e8197c (diff)
Do not delete template path on registry key if cancel pick template dialog
Diffstat (limited to 'src/AddIn/RegistryUtil.cs')
-rw-r--r--src/AddIn/RegistryUtil.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/AddIn/RegistryUtil.cs b/src/AddIn/RegistryUtil.cs
index dabd74d..5fe2eea 100644
--- a/src/AddIn/RegistryUtil.cs
+++ b/src/AddIn/RegistryUtil.cs
@@ -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;