本文整理汇总了C#中MgaProject.CreateAddOn方法的典型用法代码示例。如果您正苦于以下问题:C# MgaProject.CreateAddOn方法的具体用法?C# MgaProject.CreateAddOn怎么用?C# MgaProject.CreateAddOn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MgaProject
的用法示例。
在下文中一共展示了MgaProject.CreateAddOn方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
public void Initialize(MgaProject project)
{
try
{
Configuration = MetaLinkConfiguration.Create(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "metalink.config"));
}
catch (Exception e)
{
GMEConsole.Warning.WriteLine("Unable to read Meta-Link configuration: " + e.Message);
Configuration = new MetaLinkConfiguration();
}
// Creating addon
project.CreateAddOn(this, out addon);
// Setting event mask (see ComponentConfig.eventMask)
unchecked
{
addon.EventMask = (uint)ComponentConfig_Addon.eventMask;
}
// DISABLE BY DEFAULT
Enable(false);
// Create the proxy windows control which sends-receives messages
this.SyncControl = new System.Windows.Forms.Control();
IntPtr handle = SyncControl.Handle; // If the handle has not yet been created, referencing this property will force the handle to be created.
}
示例2: Initialize
public void Initialize(MgaProject p)
{
// Creating addon
p.CreateAddOn(this, out addon);
// Setting event mask (see ComponentConfig.eventMask)
unchecked
{
addon.EventMask = (uint)ComponentConfig.eventMask;
}
}
示例3: Initialize
public void Initialize(MgaProject p)
{
// Creating addon
p.CreateAddOn(this, out addon);
// Setting event mask (see ComponentConfig.eventMask)
unchecked
{
addon.EventMask = (uint)ComponentConfig.eventMask;
}
this.project = p;
if (metaPath == null)
{
metaPath = Path.Combine(META.VersionInfo.MetaPath, "meta");
}
if (!Directory.Exists(metaPath))
{
throw new ApplicationException(metaPath + " doesn't exist");
}
//qudtTimer = new LibraryTimer("QudtTimer", new TimerLogicDelegate(QudtTimerHandler), project, control);
//portLibTimer = new LibraryTimer("PortLibTimer", new TimerLogicDelegate(PortLibTimerHandler), project, control);
QudtLibraryInfo = new LibraryInfo("CyPhyMLQudt", "UnitLibrary QUDT", new Action(QudtTimerHandler), project, control);
PortLibraryInfo = new LibraryInfo("CyPhy_PortLib", "PortLibrary CyPhy_PortLib", new Action(PortLibTimerHandler), project, control);
MaterialLibraryInfo = new LibraryInfo("CyPhy_MaterialLib", "MaterialLibrary CyPhy_MaterialLib", new Action(MaterialLibTimerHandler), project, control);
CADResourceLibraryInfo = new LibraryInfo("CyPhy_CADResourceLib", "CADResourceLibrary", new Action(CADResourceLibTimerHandler), project, control);
}
示例4: Initialize
public void Initialize(MgaProject project)
{
// Creating addon
project.CreateAddOn(this, out addon);
// Setting event mask (see ComponentConfig.eventMask)
unchecked
{
addon.EventMask = (uint)ComponentConfig.eventMask;
}
if (Logger == null)
{
Logger = new CyPhyGUIs.GMELogger(project, this.ComponentName);
}
GetMetaRefs(project);
}