protected void InternalSetCustomName( )
        {
            try
            {
                StringBuilder newCustomName = new StringBuilder(m_customName);

                //InvokeEntityMethod(ActualObject, TerminalBlockSetCustomNameMethod, new object[] { newCustomName });
                InvokeStaticMethod(ActualObject.GetType( ), TerminalBlockBroadcastCustomNameMethod, new object[] { ActualObject, newCustomName });
            }
            catch (Exception ex)
            {
                ApplicationLog.BaseLog.Error(ex);
            }
        }
        protected void InternalSetCustomName()
        {
            try
            {
                StringBuilder newCustomName = new StringBuilder(m_customName);

                InvokeEntityMethod(ActualObject, TerminalBlockSetCustomNameMethod, new object[] { newCustomName });
                InvokeStaticMethod(ActualObject.GetType(), TerminalBlockBroadcastCustomNameMethod, new object[] { ActualObject, newCustomName.ToString() });
            }
            catch (Exception ex)
            {
                LogManager.ErrorLog.WriteLine(ex);
            }
        }
Exemplo n.º 3
0
        protected virtual Object InternalGetPowerReceiver()
        {
            bool oldDebuggingSetting = SandboxGameAssemblyWrapper.IsDebugging;

            SandboxGameAssemblyWrapper.IsDebugging = false;
            bool hasPowerReceiver = HasMethod(ActualObject.GetType(), FunctionalBlockGetPowerReceiverMethod);

            SandboxGameAssemblyWrapper.IsDebugging = oldDebuggingSetting;
            if (!hasPowerReceiver)
            {
                return(null);
            }

            return(InvokeEntityMethod(ActualObject, FunctionalBlockGetPowerReceiverMethod));
        }
Exemplo n.º 4
0
        protected virtual Object InternalGetPowerReceiver( )
        {
            bool oldDebuggingSetting = ExtenderOptions.IsDebugging;

            ExtenderOptions.IsDebugging = false;
            bool hasPowerReceiver = Reflection.HasMethod(ActualObject.GetType( ), FunctionalBlockGetPowerReceiverMethod);

            ExtenderOptions.IsDebugging = oldDebuggingSetting;
            if (!hasPowerReceiver)
            {
                return(null);
            }

            return(InvokeEntityMethod(ActualObject, FunctionalBlockGetPowerReceiverMethod));
        }