Fix merge of not selected files behaviour
This commit is contained in:
parent
3043756014
commit
17e1a1681e
@ -17,9 +17,12 @@ internal class MergeTool : Tool
|
|||||||
{
|
{
|
||||||
IFileDialog dialog = RhSolutionsAddIn.ServiceProvider.GetRequiredService<IFileDialog>();
|
IFileDialog dialog = RhSolutionsAddIn.ServiceProvider.GetRequiredService<IFileDialog>();
|
||||||
string[] files = dialog.GetFiles();
|
string[] files = dialog.GetFiles();
|
||||||
|
if (files.Length > 0)
|
||||||
|
{
|
||||||
_reader = _readerFactory.GetReader("Excel");
|
_reader = _readerFactory.GetReader("Excel");
|
||||||
var products = _reader.ReadProducts(files);
|
var products = _reader.ReadProducts(files);
|
||||||
_writer = _writerFactory.GetWriter("NewPrice");
|
_writer = _writerFactory.GetWriter("NewPrice");
|
||||||
_writer.WriteProducts(products);
|
_writer.WriteProducts(products);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user