コード例 #1
0
ファイル: CyPhyMetaLinkAddon.cs プロジェクト: daoos/meta-core
        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
0
        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.
        }