我正在尝试使用 Visual Studio (C#) 创建 Rhapsody 插件,但无法创建它。我在这里找到了解决我的问题的两个选项,但没有一个可行。
我正在使用以下代码:
using System;
using System.Runtime.InteropServices;
using rhapsody;
public class Class1: IRPInternalOEMPlugin {
public int ActiveProjectAboutToChange() {
throw new NotImplementedException();
}
public int ActiveProjectHasChanged() {
throw new NotImplementedException();
}
public string OnMenuItemSelect(string menuItem) {
RPApplication rpy = (RPApplication)Marshal.GetActiveObject("Rhapsody.Application");
rpProject proj;
proj = rpy.activeProject();
proj.addPackage("PackageTest");
return "Success";
}
public string OnMenuItemSelectWithParameters(string menuItem, string parameters) {
throw new NotImplementedException();
}
public int RhapPluginAnimationStopped() {
throw new NotImplementedException();
}
public int RhpPluginAnimationStarted() {
throw new NotImplementedException();
}
public int RhpPluginCleanup() {
throw new NotImplementedException();
}
public void RhpPluginDoCommand(string theCommand) {
throw new NotImplementedException();
}
public int RhpPluginFinalCleanup() {
throw new NotImplementedException();
}
public int RhpPluginInit() {
throw new NotImplementedException();
}
public int RhpPluginInvokeItem() {
throw new NotImplementedException();
}
public void RhpPluginOnIDEBuildDone(string buildStatus) {
throw new NotImplementedException();
}
public int RhpPluginSetApplication(RPApplication pRPApp) {
throw new NotImplementedException();
}
public int RhpSavingProject() {
throw new NotImplementedException();
}
}
Rhapsody 没有给我任何错误。我该如何解决?