Do not delete template path on registry key if cancel pick template dialog
This commit is contained in:
parent
9018d7d504
commit
5001219695
@ -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;
|
||||
|
@ -16,9 +16,9 @@ namespace RehauSku.Interface
|
||||
{
|
||||
return dialog.FileName;
|
||||
}
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
else return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public static string[] GetMultiplyFiles()
|
||||
|
@ -91,7 +91,11 @@ namespace RehauSku.Interface
|
||||
public void OnSetPricePressed(IRibbonControl control)
|
||||
{
|
||||
string path = Dialog.GetFilePath();
|
||||
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
RegistryUtil.PriceListPath = path;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user