diff options
Diffstat (limited to 'Source/Ribbon')
-rw-r--r-- | Source/Ribbon/RibbonController.cs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Source/Ribbon/RibbonController.cs b/Source/Ribbon/RibbonController.cs index 39cf71a..7e15d09 100644 --- a/Source/Ribbon/RibbonController.cs +++ b/Source/Ribbon/RibbonController.cs @@ -10,17 +10,16 @@ namespace RehauSku.Ribbon { public override string GetCustomUI(string RibbonID) { - return @" <customUI xmlns='http://schemas.microsoft.com/office/2006/01/customui'> <ribbon> <tabs> <tab id='rau' label='REHAU'> <group id='priceList' label='Прайс-лист'> - <button id='exportToPrice' label='Экспорт' size='large' imageMso='PivotExportToExcel' onAction='OnButtonPressed'/> + <button id='exportToPrice' label='Экспорт' size='large' imageMso='PivotExportToExcel' onAction='OnExportPressed'/> </group> <group id='rausettings' label='Настройки'> - <button id='set' label='Настройки' size='large' imageMso='CurrentViewSettings' onAction='OnButtonPressed'/> + <button id='set' label='Настройки' size='large' imageMso='CurrentViewSettings' onAction='OnSettingsPressed'/> </group> </tab> </tabs> @@ -28,14 +27,14 @@ namespace RehauSku.Ribbon </customUI>"; } - public void OnButtonPressed(IRibbonControl control) + public void OnExportPressed(IRibbonControl control) { using (Exporter dw = new Exporter()) { if (!dw.IsRangeValid()) { - MessageBox.Show("Выделен неверный диапазон!", - "Неверный диапазон", + MessageBox.Show("Выделен неверный диапазон!", + "Неверный диапазон", MessageBoxButtons.OK, MessageBoxIcon.Information); return; @@ -48,5 +47,11 @@ namespace RehauSku.Ribbon } } } + + + public void OnSettingsPressed(IRibbonControl control) + { + Application.Run(new Settings.SettingsForm()); + } } } |