Example #1
0
        public TheVTimer(TheThing pThing, IBaseEngine pEngine)
            : base(pThing)
        {
            if (pThing != null)
            {
                MyBaseThing = pThing;
            }
            else
            {
                MyBaseThing = new TheThing();
            }

            cdeP tfirstTrigger = MyBaseThing.DeclareNMIProperty("MsToTrigger", ePropertyTypes.TNumber);

            tfirstTrigger.RegisterEvent(eThingEvents.PropertySet, sinkLoopChanged);

            cdeP tLoop = MyBaseThing.DeclareNMIProperty("LoopPeriod", ePropertyTypes.TNumber);

            tLoop.RegisterEvent(eThingEvents.PropertySet, sinkLoopChanged);
            cdeP tTrigger = MyBaseThing.DeclareNMIProperty("TriggerTimer", ePropertyTypes.TString);

            tTrigger.RegisterEvent(eThingEvents.PropertySet, sinkTriggered);

            MyBaseEngine           = pEngine;
            MyBaseThing.DeviceType = eVThings.eVTimer;
            MyBaseThing.EngineName = pEngine.GetEngineName();
            MyBaseThing.SetIThingObject(this);
        }
        /// <summary>
        /// Constructor of the LiveTag
        /// </summary>
        /// <param name="pThing"></param>
        public TheNMILiveTag(TheThing pThing)
        {
            if (pThing == null)
            {
                MyBaseThing = new TheThing();
            }
            else
            {
                MyBaseThing = pThing;
            }

            MyBaseThing.DeclareNMIProperty("ControlType", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("FormTitle", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("Caption", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("TileLeft", ePropertyTypes.TNumber);
            MyBaseThing.DeclareNMIProperty("TileTop", ePropertyTypes.TNumber);
            MyBaseThing.DeclareNMIProperty("TileWidth", ePropertyTypes.TNumber);
            MyBaseThing.DeclareNMIProperty("TileHeight", ePropertyTypes.TNumber);
            MyBaseThing.DeclareNMIProperty("Flags", ePropertyTypes.TNumber);
            MyBaseThing.DeclareNMIProperty("FldOrder", ePropertyTypes.TNumber);
            MyBaseThing.DeclareNMIProperty("ClassName", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("Style", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("IsAbsolute", ePropertyTypes.TBoolean);
            MyBaseThing.DeclareNMIProperty("IsVertical", ePropertyTypes.TBoolean);
            MyBaseThing.DeclareNMIProperty("IsInverted", ePropertyTypes.TBoolean);
            MyBaseThing.DeclareNMIProperty("MinValue", ePropertyTypes.TNumber);
            MyBaseThing.DeclareNMIProperty("MaxValue", ePropertyTypes.TNumber);
            MyBaseThing.DeclareNMIProperty("SeriesNames", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("Title", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("NoTE", ePropertyTypes.TBoolean);
            MyBaseThing.DeclareNMIProperty("Units", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("Format", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("Options", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("MainBackground", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("Background", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("Foreground", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("ForegroundOpacity", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("Opacity", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("Disabled", ePropertyTypes.TBoolean);
            MyBaseThing.DeclareNMIProperty("Visibility", ePropertyTypes.TBoolean);
            MyBaseThing.DeclareNMIProperty("Speed", ePropertyTypes.TNumber);
            MyBaseThing.DeclareNMIProperty("Delay", ePropertyTypes.TNumber);
            MyBaseThing.DeclareNMIProperty("Throttle", ePropertyTypes.TNumber);
            MyBaseThing.DeclareNMIProperty("Group", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("NUITags", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("Label", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("LabelClassName", ePropertyTypes.TString);
            MyBaseThing.DeclareNMIProperty("LabelForeground", ePropertyTypes.TString);
            MyBaseThing.SetIThingObject(this);
        }
 /// <summary>
 /// Creates a new NMI Screen
 /// </summary>
 /// <param name="pThing"></param>
 public TheNMIScreen(TheThing pThing)
 {
     if (pThing == null)
     {
         MyBaseThing = new TheThing();
     }
     else
     {
         MyBaseThing = pThing;
     }
     MyBaseThing.DeviceType = eKnownDeviceTypes.TheNMIScreen;
     MyBaseThing.EngineName = eEngineName.NMIService;
     MyBaseThing.DeclareNMIProperty("Category", ePropertyTypes.TString);
     MyBaseThing.DeclareNMIProperty("ScreenTitle", ePropertyTypes.TString);
     MyBaseThing.DeclareNMIProperty("TileWidth", ePropertyTypes.TNumber);
     MyBaseThing.DeclareNMIProperty("TileHeight", ePropertyTypes.TNumber);
 }