コード例 #1
0
        private void Init(int modnr, string id)
        {
            ObjectIDs = new List <ObjectID>();
            ObjectIDs.Add(new ObjectID(RGOBase.CalcID(modnr, id), ElementTypeEnum.Read));
            RGObject = RGOBase.GetFromID(modnr, id);

            if (RGObject != null)
            {
                errorString      = (ControlsHelper.RemoveSpaces(Error)).Split(',');
                onString         = (ControlsHelper.RemoveSpaces(On)).Split(',');
                transitionString = (ControlsHelper.RemoveSpaces(Transition)).Split(',');

                if (Error != "" || On != "" || Transition != "")
                {
                    IsStatusVariableString = true;
                }
                //add this element to the list of all elementrs so that the request and reply classes can be created for the RGOServices
                UpdatableControlCollector.AllControls.Add(this);

                //subscribe to the update delegate of the RGObject
                RGObject.Update += Update;

                Background = ControlsHelper.Transparent;
            }
            else
            {
                Background = ControlsHelper.ErrorColor;
            }
        }
コード例 #2
0
        private void Init(int modnr, string id)
        {
            ObjectIDs = new List <ObjectID>();
            ObjectIDs.Add(new ObjectID(RGOBase.CalcID(modnr, id), ElementTypeEnum.ReadWrite));
            command = RGOBase.GetFromID(modnr, id) as CMD;

            if (command != null)
            {
                UpdatableControlCollector.AllControls.Add(this);
                command.Update += Update;
            }
        }
コード例 #3
0
        private void Init(int modnr, string id)
        {
            ObjectIDs = new List <ObjectID>();
            ObjectIDs.Add(new ObjectID(RGOBase.CalcID(modnr, id), ElementTypeEnum.ReadWrite));
            stp = RGOBase.GetFromID(modnr, id) as EnumSTP;

            Options     = stp.OptionsString.Split(',');
            ItemsSource = Options;

            if (stp != null)
            {
                UpdatableControlCollector.AllControls.Add(this);
                stp.Update += Update;
            }
        }
コード例 #4
0
        private void Init(int modnr, string id)
        {
            ObjectIDs = new List <ObjectID>();
            ObjectIDs.Add(new ObjectID(RGOBase.CalcID(modnr, id), ElementTypeEnum.ReadWrite));
            stp = RGOBase.GetFromID(modnr, id);

            if (MinEQPID != "")
            {
                MinEQP = RGOBase.GetFromID(RGOBase.CalcID(modnr, MinEQPID));
            }
            if (MaxEQPID != "")
            {
                MaxEQP = RGOBase.GetFromID(RGOBase.CalcID(modnr, MaxEQPID));
            }

            if (stp != null && stp.GetType().Name.Contains("STP"))
            {
                UpdatableControlCollector.AllControls.Add(this);
                stp.Update += Update;
            }
        }