当前位置: 首页>>代码示例>>C#>>正文


C# MgaProject.CreateAddOn方法代码示例

本文整理汇总了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.
        }
开发者ID:neemask,项目名称:meta-core,代码行数:27,代码来源:CyPhyMetaLinkAddon.cs

示例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;
     }
 }
开发者ID:pombredanne,项目名称:metamorphosys-desktop,代码行数:10,代码来源:CyPhyMdaoAddOn.cs

示例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);
        }
开发者ID:metamorph-inc,项目名称:meta-core,代码行数:26,代码来源:CyPhySignalBlocksAddOn.cs

示例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);
        }
开发者ID:metamorph-inc,项目名称:meta-core,代码行数:16,代码来源:ComponentLibraryManagerAddOn.cs


注:本文中的MgaProject.CreateAddOn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。