diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2022-01-09 15:47:54 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2022-01-09 15:47:54 +0300 |
commit | 846547d6d905e0dbee73cd9c62760ea43bb88134 (patch) | |
tree | d14ea8875b8b348c1f3e03256ec304ea992d635f /src/Ribbon/RibbonController.cs | |
parent | 0c307e985faab3a1510beac3a4740354ef23f585 (diff) |
Add SaveAs Dialog after export
Diffstat (limited to 'src/Ribbon/RibbonController.cs')
-rw-r--r-- | src/Ribbon/RibbonController.cs | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/Ribbon/RibbonController.cs b/src/Ribbon/RibbonController.cs index 15bd1a0..ed59541 100644 --- a/src/Ribbon/RibbonController.cs +++ b/src/Ribbon/RibbonController.cs @@ -40,10 +40,13 @@ namespace RehauSku.Ribbon using (MergeTool mergeTool = new MergeTool()) { string[] files = Dialog.GetMultiplyFiles(); - mergeTool.GetSource(files); - string exportFile = PriceList.CreateNewFile(); - mergeTool.OpenNewPrice(exportFile); - mergeTool.FillPriceList(); + if (files.Length != 0) + { + mergeTool.GetSource(files); + string exportFile = RegistryUtil.PriceListPath; + mergeTool.OpenNewPrice(exportFile); + mergeTool.FillPriceList(); + } } } @@ -52,10 +55,13 @@ namespace RehauSku.Ribbon using (CombineTool combineTool = new CombineTool()) { string[] files = Dialog.GetMultiplyFiles(); - combineTool.GetSource(files); - string exportFile = PriceList.CreateNewFile(); - combineTool.OpenNewPrice(exportFile); - combineTool.FillPriceList(); + if (files.Length != 0) + { + combineTool.GetSource(files); + string exportFile = RegistryUtil.PriceListPath; + combineTool.OpenNewPrice(exportFile); + combineTool.FillPriceList(); + } } } @@ -66,7 +72,7 @@ namespace RehauSku.Ribbon using (ExportTool exportTool = new ExportTool()) { exportTool.GetSource(); - string exportFile = PriceList.CreateNewFile(); + string exportFile = RegistryUtil.PriceListPath; exportTool.OpenNewPrice(exportFile); exportTool.FillPriceList(); } |