diff options
Diffstat (limited to 'src/Ribbon')
-rw-r--r-- | src/Ribbon/RibbonController.cs | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/Ribbon/RibbonController.cs b/src/Ribbon/RibbonController.cs index df6f327..ad27bc2 100644 --- a/src/Ribbon/RibbonController.cs +++ b/src/Ribbon/RibbonController.cs @@ -17,8 +17,11 @@ namespace RehauSku.Ribbon <tabs> <tab id='rau' label='REHAU'> <group id='priceList' label='Прайс-лист'> - <button id='exportToPrice' label='Экспорт в новый файл' size='normal' imageMso='PivotExportToExcel' onAction='OnExportPressed'/> - <button id='mergeFiles' label='Объединить' size='normal' imageMso='Copy' onAction='OnMergePressed'/> + <button id='exportToPrice' label='Экспорт в новый файл' size='normal' imageMso='PivotExportToExcel' onAction='OnExportPressed'/> + <menu id='conjoinMenu' label='Объединить' imageMso='Copy'> + <button id='mergeFiles' label='Сложить' onAction='OnMergePressed'/> + <button id='combineFiles' label='По колонкам' onAction='OnCombinePressed'/> + </menu> </group> <group id='rausettings' label='Настройки'> <button id='setPriceList' label='Файл прайс-листа' size='normal' imageMso='CurrentViewSettings' onAction='OnSetPricePressed'/> @@ -29,14 +32,27 @@ namespace RehauSku.Ribbon </customUI>"; } + // <dropDown id = 'dd1' label = 'Drop dynamic' getItemCount = 'fncGetItemCountDrop' getItemLabel = 'fncGetItemLabelDrop' onAction = 'fncOnActionDrop'/> + public void OnMergePressed(IRibbonControl control) { using (MergeTool mergeTool = new MergeTool()) { string[] files = Dialog.GetMultiplyFiles(); - mergeTool.AddSkuAmountToDict(files); + mergeTool.CollectSkuAmount(files); + string exportFile = PriceListUtil.CreateNewExportFile(); + mergeTool.ExportToFile(exportFile); + } + } + + public void OnCombinePressed(IRibbonControl control) + { + using (CombineTool combineTool = new CombineTool()) + { + string[] files = Dialog.GetMultiplyFiles(); + combineTool.CollectSkuAmount(files); string exportFile = PriceListUtil.CreateNewExportFile(); - mergeTool.ExportToNewFile(exportFile); + combineTool.ExportToFile(exportFile); } } |