File tree Expand file tree Collapse file tree 4 files changed +50
-5
lines changed Expand file tree Collapse file tree 4 files changed +50
-5
lines changed Original file line number Diff line number Diff line change 4444 <Reference Include =" System.Xml" />
4545 </ItemGroup >
4646 <ItemGroup >
47+ <Compile Include =" MasterRibbon.cs" />
4748 <Compile Include =" SlaveDriver.cs" />
4849 <Compile Include =" Properties\AssemblyInfo.cs" />
4950 </ItemGroup >
Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . Diagnostics ;
4+ using System . Linq ;
5+ using System . Runtime . InteropServices ;
6+ using System . Text ;
7+ using System . Threading . Tasks ;
8+ using ExcelDna . Integration ;
9+ using ExcelDna . Integration . CustomUI ;
10+
11+ namespace MasterSlave
12+ {
13+ [ ComVisible ( true ) ]
14+ public class MasterRibbon : ExcelRibbon
15+ {
16+ public MasterRibbon ( )
17+ {
18+ }
19+
20+ public override string GetCustomUI ( string RibbonID )
21+ {
22+ // XlCall.Excel(XlCall.xlcMessage, "BANG!!!!");
23+ Console . Beep ( ) ;
24+ Console . Beep ( ) ;
25+ Console . Beep ( ) ;
26+ return
27+ @"
28+ <customUI xmlns = 'http://schemas.microsoft.com/office/2006/01/customui' >
29+ <ribbon>
30+ <tabs>
31+ <tab id = 'MyTab' label = 'Master' >
32+ <group id = 'MyGroup' label = 'Slave Driver' >
33+ <button id = 'RegisterSlave' label = 'Register Slave' onAction = 'RunTagMacro' tag = 'RegisterSlave' />
34+ <button id = 'UnregisterSlave' label = 'Unregister Slave' onAction = 'RunTagMacro' tag = 'UnregisterSlave' />
35+ </group>
36+ </tab>
37+ </tabs>
38+ </ribbon>
39+ </customUI>
40+ " ;
41+ }
42+ }
43+
44+ }
Original file line number Diff line number Diff line change 4646 <ItemGroup >
4747 <Compile Include =" SlaveAddIn.cs" />
4848 <Compile Include =" Properties\AssemblyInfo.cs" />
49- <Compile Include =" Ribbon .cs" />
49+ <Compile Include =" SlaveRibbon .cs" />
5050 </ItemGroup >
5151 <ItemGroup >
5252 <Content Include =" Slave-AddIn.dna" >
Original file line number Diff line number Diff line change 1111namespace MasterSlave
1212{
1313 [ ComVisible ( true ) ]
14- public class Ribbon : ExcelRibbon
14+ public class SlaveRibbon : ExcelRibbon
1515 {
16- public Ribbon ( )
16+ public SlaveRibbon ( )
1717 {
1818 }
1919
@@ -28,8 +28,8 @@ public override string GetCustomUI(string RibbonID)
2828 <customUI xmlns = 'http://schemas.microsoft.com/office/2006/01/customui' >
2929 <ribbon>
3030 <tabs>
31- <tab id = 'CustomTab ' label = 'My Tab ' >
32- <group id = 'SampleGroup ' label = 'My Sample Group' >
31+ <tab id = 'MyTab ' label = 'Slave ' >
32+ <group id = 'MyGroup ' label = 'My Sample Group' >
3333 <button id = 'Button1' label = 'My Button Label' size = 'large' onAction = 'RunTagMacro' tag = 'ShowHelloMessage' />
3434 <button id = 'Button2' label = 'My Second Button' size = 'normal' onAction = 'OnButtonPressed' />
3535 </group>
You can’t perform that action at this time.
0 commit comments