コード例 #1
0
        /// <summary>
        /// After the plugin has been created Media Center will call the following method,
        /// giving us a reference to the Media Center interface.
        /// </summary>
        /// <param name="mediaCenterReference">Media Center Reference</param>
        public void Init(MCAutomation mediaCenterReference)
        {
            try
            {
                // ErrorTest();

                this.MediaCenterReference = mediaCenterReference;

                // This tells MC to also call our MJEvent method
                this.MediaCenterReference.FireMJEvent += new IMJAutomationEvents_FireMJEventEventHandler(MJEvent);

                this.Process();
            }
            catch (Exception ex)
            {
                ErrorHandler(ex);
            }

            // Placing anything outside of this try catch may cause MC to fail to open.
            // Play safe and insert it in the try area!
        }
コード例 #2
0
ファイル: MCHelper.cs プロジェクト: BustyLoli-Chan/TwitchBot
 MCHelper()
 {
     mcAuto = new MCAutomation();
 }