protected void Buttons_ButtonEvent(UISmartObjectButtonCollection buttonCollection, UISmartObjectButtonCollectionEventArgs args) { if (this._ButtonEvent != null) { this._ButtonEvent(this, new UISmartObjectButtonEventArgs(args.Button, args.EventType, args.HoldTime)); } }
public UISmartObjectSpinnerList(SmartObject smartObject, ListData listData, BoolInputSig enableJoin, BoolInputSig visibleJoin) : base(smartObject, enableJoin, visibleJoin) { uint item = 1; this.Data = listData; if (this.Data != null) { this.Data.DataChange += new ListDataChangeEventHandler(Data_DataChange); } Buttons = new UISmartObjectButtonCollection(); try { while (smartObject.BooleanOutput.Contains(string.Format("Item {0} Selected", item))) { Buttons.Add(new UISmartObjectButton(this, item, this.DeviceSmartObject, string.Format("Item {0} Selected", item), null, string.Format("Set Item {0} Text", item))); item++; } this.NumberOfItems = 0; } catch (Exception e) { ErrorLog.Error("Error constructing UISmartObjectSpinnerList: {0}", e.Message); } }