예제 #1
0
        /// <summary>
        /// Creates a base class for subpage reference list items
        /// </summary>
        /// <param name="list">The subpage list</param>
        /// <param name="index">The index of the item</param>
        internal UIDynamicButtonListItem(UIDynamicButtonList list, uint index)
            : base(list.SmartObject)
        {
            try
            {
                _list  = list;
                _index = index;

                VisibleJoin = list.SmartObject.BooleanInput[string.Format("Item {0} Visible", index)];
                EnableJoin  = list.SmartObject.BooleanInput[string.Format("Item {0} Enabled", index)];

                var boolInputSig  = list.SmartObject.BooleanInput[string.Format("Item {0} Selected", index)];
                var boolOutputSig = list.SmartObject.BooleanOutput[string.Format("Item {0} Pressed", index)];
                _iconAnalogSig = list.SmartObject.UShortInput[string.Format("Set Item {0} Icon Analog", index)];
                _iconSerialSig = list.SmartObject.StringInput[string.Format("Set Item {0} Icon Serial", index)];
                var nameStringSig = list.SmartObject.StringInput[string.Format("Set Item {0} Text", index)];

                _button = new UIButton(list.SmartObject, boolOutputSig.Name, boolInputSig.Name,
                                       nameStringSig.Name);
            }
            catch (Exception e)
            {
                CloudLog.Exception(e);
            }
        }
예제 #2
0
        private void OnIsMovingChange(UIDynamicButtonList list, bool ismoving)
        {
            var handler = IsMovingChange;

            if (handler != null)
            {
                handler(list, ismoving);
            }
        }
예제 #3
0
        private void OnSelectedItemChange(UIDynamicButtonList list)
        {
            var handler = SelectedItemChange;

            if (handler != null)
            {
                handler(list);
            }
        }