aboutsummaryrefslogtreecommitdiff
path: root/Source/Ribbon
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2021-12-17 09:07:34 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2021-12-17 09:07:34 +0300
commitaaaa6b45859e74c791f35e18c220118a54a345ad (patch)
treeaf9f3e183f03eb77285de4d932633a7e6c89ad79 /Source/Ribbon
parent2511d1b4440d7c450eb50e1eafdc2ac11b42a5e0 (diff)
Create simple base form for settings window
Diffstat (limited to 'Source/Ribbon')
-rw-r--r--Source/Ribbon/RibbonController.cs17
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());
+ }
}
}