diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2022-02-02 18:34:32 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2022-02-02 18:34:32 +0300 |
commit | 5001219695090d4a6ead73b2d17434b0805516a3 (patch) | |
tree | d94d40a4b13f907f3315eb81dde0d5d3963e26de /src/AddIn/RegistryUtil.cs | |
parent | 9018d7d504dfebbec9a3c75851314d25d1e8197c (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.cs | 6 |
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; |