Fix guess tool button id

This commit is contained in:
Sergey Chebotar 2023-06-20 09:50:03 +03:00
parent 98bb135b62
commit dc92388748
3 changed files with 4 additions and 3 deletions

View File

@ -28,7 +28,7 @@ public class RibbonController : ExcelRibbon
<button id='export' getEnabled='GetExportEnabled' label='Экспорт в новый файл' size='normal' imageMso='PivotExportToExcel' onAction='OnToolPressed'/>
<button id='convert' getEnabled='GetConvertEnabled' label='Актуализировать' size='normal' imageMso='FileUpdate' onAction='OnToolPressed'/>
<button id='merge' label='Объединить' size='normal' imageMso='Copy' onAction='OnToolPressed'/>
<button id='Guessexport' getEnabled='GetGuessEnabled' label='Найти и экспортировать' size='normal' imageMso='ControlWizards' onAction='OnToolPressed'/>
<button id='guess' getEnabled='GetGuessEnabled' label='Найти и экспортировать' size='normal' imageMso='ControlWizards' onAction='OnToolPressed'/>
<button id='dxfexport' getEnabled='GetDxfEnabled' label='Экспортировать в DXF' size='normal' imageMso='ExportExcel' onAction='OnToolPressed'/>
</group>
<group id='rausettings' getLabel='GetVersionLabel'>

View File

@ -34,7 +34,7 @@ namespace RhSolutions.Tools
RibbonController.UpdateWorkbookValidation();
RibbonController.RefreshControl("convert");
RibbonController.RefreshControl("dxfexport");
RibbonController.RefreshControl("Guessexport");
RibbonController.RefreshControl("guess");
}
private static void RefreshExportButton(object sh, Range target)

View File

@ -10,7 +10,8 @@ internal class ToolFactory
"convert" => new ConvertTool(RhSolutionsAddIn.ServiceProvider),
"merge" => new MergeTool(RhSolutionsAddIn.ServiceProvider),
"dxfexport" => new DxfTool(RhSolutionsAddIn.ServiceProvider),
"Guessexport" => new GuessTool(RhSolutionsAddIn.ServiceProvider),
"guess" => new GuessTool(RhSolutionsAddIn.ServiceProvider),
"fillsleeves" => new SleevesTool(RhSolutionsAddIn.ServiceProvider),
_ => throw new Exception($"Неизвестный инструмент {toolName}"),
};
return tool;