Esempio n. 1
0
        public UISmartObjectTabBar(SmartObject smartObject)
            : base(smartObject)
        {
            uint item = 1;

            try
            {
                while (smartObject.BooleanOutput.Contains(string.Format("Tab Button {0} Press", item)))
                {
                    UISmartObjectButton tabButton = new UISmartObjectButton(this,
                                                                            item, this.DeviceSmartObject,
                                                                            string.Format("Tab Button {0} Press", item),
                                                                            string.Format("Tab Button {0} Select", item)
                                                                            );
                    this.AddButton(tabButton);

                    item++;
                }

                this.NumberOfItems = (ushort)(item - 1);
            }
            catch (Exception e)
            {
                ErrorLog.Error("Error constructing UISmartObjectTabBar with KeyName: {0}", e.Message);
            }
        }
Esempio n. 2
0
        public UISmartObjectList(SmartObject smartObject, ListData listData, BoolInputSig enableJoin, BoolInputSig visibleJoin)
            : base(smartObject, enableJoin, visibleJoin)
        {
            this.Data             = listData;
            this.Data.DataChange += new ListDataChangeEventHandler(Data_DataChange);
            try
            {
                for (uint item = 1; item <= this.MaxNumberOfItems; item++)
                {
                    UISmartObjectButton listButton = new UISmartObjectButton(this,
                                                                             item, this.DeviceSmartObject,
                                                                             string.Format("Item {0} Pressed", item),
                                                                             string.Format("Item {0} Selected", item),
                                                                             string.Format("Set Item {0} Text", item),
                                                                             string.Format("Set Item {0} Icon Serial", item),
                                                                             string.Format("Item {0} Enabled", item),
                                                                             string.Format("Item {0} Visible", item)
                                                                             );
                    this.AddButton(listButton);
                }

                this.NumberOfItems = 0;
            }
            catch (Exception e)
            {
                ErrorLog.Error("Error constructing UISmartObjectList with KeyName: {0}", e.Message);
            }
        }
 public UISmartObjectButtonCollectionEventArgs(UISmartObjectButton button, UIButtonEventType type, long holdTime)
     : base()
 {
     this.Button    = button;
     this.EventType = type;
     this.HoldTime  = holdTime;
 }
Esempio n. 4
0
 public void AddButton(uint itemIndex, string digitalPressSigNam, string digitalFeedbackSigName)
 {
     if (this.DeviceSmartObject.BooleanOutput[digitalPressSigNam] != null)
     {
         UISmartObjectButton newButton = new UISmartObjectButton(this,
                                                                 itemIndex, this.DeviceSmartObject, digitalPressSigNam, digitalFeedbackSigName
                                                                 );
         this.Buttons.Add(newButton);
     }
 }
Esempio n. 5
0
 public void AddButton(UISmartObjectButton button)
 {
     this.Buttons.Add(button);
 }