Пример #1
0
 protected virtual void StyleViewModel_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (CanRefreshPreviewSource(e.PropertyName))
     {
         PreviewSource = ActualObject.GetPreviewImage();
     }
 }
Пример #2
0
 private void InitializePointValueRatio()
 {
     if (!ActualObject.CheckIsValid())
     {
         PointValueRatioY = 100000;
         actualDotDensityStyle.PointToValueRatio = RecommendPointValueRatio;
     }
     else
     {
         PointValueRatioY = 1 / actualDotDensityStyle.PointToValueRatio;
     }
 }
        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);
            }
        }
Пример #5
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));
        }
Пример #6
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));
        }
 private void GeoPen_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     RaisePropertyChanged(e.PropertyName);
     PreviewSource = ActualObject.GetPreviewImage();
 }