From 06799119fb83cb6b75721c5cf60f4051e50976a7 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Wed, 2 Feb 2022 09:46:47 +0300 Subject: Add Interface namespace --- src/AddIn/RegistryUtil.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/AddIn/RegistryUtil.cs') diff --git a/src/AddIn/RegistryUtil.cs b/src/AddIn/RegistryUtil.cs index 3ec6f6a..dabd74d 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; -- cgit v1.2.3 From 5001219695090d4a6ead73b2d17434b0805516a3 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Wed, 2 Feb 2022 18:34:32 +0300 Subject: Do not delete template path on registry key if cancel pick template dialog --- src/AddIn/RegistryUtil.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/AddIn/RegistryUtil.cs') 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; -- cgit v1.2.3