forked from Excel-DNA/Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using ExcelDna.Integration; | ||
using static ExcelDna.Integration.XlCall; | ||
|
||
namespace MasterSlave | ||
{ | ||
public static class SlaveDriver | ||
{ | ||
// Passing this as a parameter makes it hard to call from the ribbon... | ||
const string path = @"C:\Work\Excel-DNA\Samples\MasterSlave\Slave\bin\Debug\Slave-AddIn.xll"; | ||
public static void RegisterSlave() | ||
{ | ||
Console.Beep(); | ||
Console.Beep(); | ||
Console.Beep(); | ||
Console.Beep(); | ||
Excel(xlcMessage, true, $"Loading {path}"); | ||
Thread.Sleep(1000); | ||
ExcelIntegration.RegisterXLL(path); | ||
} | ||
|
||
public static void UnregisterSlave() | ||
{ | ||
ExcelIntegration.UnregisterXLL(path); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="ExcelDna.AddIn" version="0.33.9" targetFramework="net45" /> | ||
<package id="ExcelDna.Integration" version="0.33.9" targetFramework="net45" /> | ||
</packages> |