コード例 #1
0
 public void FireEvent(string pEventName, ICDEThing sender, object pPara, bool FireAsync)
 {
     if (MyBaseThing != null)
     {
         MyBaseThing.FireEvent(pEventName, sender, pPara, FireAsync);
     }
 }
コード例 #2
0
        /// <summary>
        /// Initializes the NMI Screen
        /// </summary>
        /// <returns></returns>
        public override bool Init()
        {
            if (mIsInitCalled)
            {
                return(false);
            }

            mIsInitCalled = true;
            if (string.IsNullOrEmpty(MyBaseThing.ID))
            {
                MyBaseThing.ID = Guid.NewGuid().ToString();
            }
            mIsInitialized = DoInit();
            MyBaseThing.FireEvent("OnInitialized", this, new TSM(MyBaseThing.cdeMID.ToString(), "Was Init"), false);
            return(mIsInitialized);
        }
コード例 #3
0
        public override bool Init()
        {
            if (mIsInitCalled)
            {
                return(false);
            }
            {
                mIsInitCalled = true;
                if (string.IsNullOrEmpty(MyBaseThing.ID))
                {
                    MyBaseThing.ID = Guid.NewGuid().ToString();
                }
                MyBaseThing.FireEvent("OnInitialized", this, new TSM(MyBaseThing.cdeMID.ToString(), "Was Init"), false);

                TheBaseEngine.WaitForStorageReadiness(sinkStorageStationIsReadyFired, true);
            }
            return(false);
        }
コード例 #4
0
        /// <summary>
        /// Initializes the Live Tag
        /// </summary>
        /// <returns></returns>
        public override bool Init()
        {
            if (mIsInitCalled)
            {
                return(false);
            }
            mIsInitCalled = true;

            TheThing.SetSafePropertyBool(MyBaseThing, "IsLiveTag", true);
            MyBaseThing.FireEvent("OnInitialized", this, new TSM(MyBaseThing.cdeMID.ToString(), "Was Init"), false);
            cdeP tThrot = GetProperty("Throttle", true);

            tThrot.RegisterEvent(eThingEvents.PropertyChanged, sinkThrottleChanged);
            mIsInitialized = DoInit();
            if (string.IsNullOrEmpty(MyBaseThing.ID))
            {
                MyBaseThing.ID = Guid.NewGuid().ToString();
            }
            return(mIsInitialized);
        }