forked from rubberduck-vba/Rubberduck
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rubberduck-vba#964 from ThunderFrame/next
Adds CorelDRAW
- Loading branch information
Showing
10 changed files
with
80 additions
and
9 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
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
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
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
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,28 @@ | ||
using Corel.GraphicsSuite.Interop.CorelDRAW; | ||
using Microsoft.Vbe.Interop; | ||
|
||
namespace Rubberduck.VBEditor.VBEHost | ||
{ | ||
public class CorelDRAWApp : HostApplicationBase<Corel.GraphicsSuite.Interop.CorelDRAW.Application> | ||
{ | ||
public CorelDRAWApp() : base("CorelDRAW") { } | ||
public CorelDRAWApp(VBE vbe) : base(vbe, "CorelDRAW") { } | ||
|
||
//Function RunMacro(ModuleName As String, MacroName As String, Parameter() As Variant) As Variant | ||
//Where ModuleName appears to mean ProjectName, and MacroName has to be provided as "ModuleName.ProcName" | ||
|
||
//TODO:RunMacro can only execute methods in stand-alone projects (not document hosted projects) | ||
//TODO:Can only get a CorelDraw application if at least one document is open in CorelDraw. | ||
|
||
public override void Run(QualifiedMemberName qualifiedMemberName) | ||
{ | ||
var projectName = qualifiedMemberName.QualifiedModuleName.ProjectName; | ||
var memberName = qualifiedMemberName.QualifiedModuleName.ComponentName + "." + qualifiedMemberName.MemberName; | ||
|
||
if (Application != null) | ||
{ | ||
Application.GMSManager.RunMacro(projectName, memberName, new object[] {}); | ||
} | ||
} | ||
} | ||
} |
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
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
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
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
Binary file not shown.