Example #1
0
            public void ApplyAttribute(ulong attributeEventHandlerId, string attributeName, object attributeValue, string attributeEventUpdatesAttributeName)
            {
                switch (attributeName)
                {
                case nameof(Text):
                    Text = (string)attributeValue;
                    break;

                case nameof(Multiline):
                    Multiline = AttributeHelper.GetBool(attributeValue);
                    break;

                case nameof(ReadOnly):
                    ReadOnly = AttributeHelper.GetBool(attributeValue);
                    break;

                case nameof(WordWrap):
                    WordWrap = AttributeHelper.GetBool(attributeValue);
                    break;

                case nameof(ScrollBars):
                    ScrollBars = (ScrollBars)AttributeHelper.GetInt(attributeValue);
                    break;

                case "ontextchanged":
                    Renderer.RegisterEvent(attributeEventHandlerId, () => TextChangedEventHandlerId = 0);
                    TextChangedEventHandlerId = attributeEventHandlerId;
                    break;

                default:
                    FormsComponentBase.ApplyAttribute(this, attributeEventHandlerId, attributeName, attributeValue, attributeEventUpdatesAttributeName);
                    break;
                }
            }
            public void ApplyAttribute(ulong attributeEventHandlerId, string attributeName, object attributeValue, string attributeEventUpdatesAttributeName)
            {
                switch (attributeName)
                {
                case nameof(Text):
                    Text = (string)attributeValue;
                    break;

                case nameof(Checked):
                    Checked = AttributeHelper.GetBool(attributeValue);
                    break;

                case nameof(CheckState):
                    CheckState = (CheckState)AttributeHelper.GetInt(attributeValue);
                    break;

                case nameof(ThreeState):
                    ThreeState = AttributeHelper.GetBool(attributeValue);
                    break;

                case "oncheckedchanged":
                    Renderer.RegisterEvent(attributeEventHandlerId, () => CheckedChangedEventHandlerId = 0);
                    CheckedChangedEventHandlerId = attributeEventHandlerId;
                    break;

                case "oncheckstatechanged":
                    Renderer.RegisterEvent(attributeEventHandlerId, () => CheckStateChangedEventHandlerId = 0);
                    CheckStateChangedEventHandlerId = attributeEventHandlerId;
                    break;

                default:
                    FormsComponentBase.ApplyAttribute(this, attributeEventHandlerId, attributeName, attributeValue, attributeEventUpdatesAttributeName);
                    break;
                }
            }
Example #3
0
            public void ApplyAttribute(ulong attributeEventHandlerId, string attributeName, object attributeValue, string attributeEventUpdatesAttributeName)
            {
                switch (attributeName)
                {
                case nameof(Text):
                    Text = (string)attributeValue;
                    break;

                default:
                    FormsComponentBase.ApplyAttribute(this, attributeEventHandlerId, attributeName, attributeValue, attributeEventUpdatesAttributeName);
                    break;
                }
            }
Example #4
0
            public void ApplyAttribute(ulong attributeEventHandlerId, string attributeName, object attributeValue, string attributeEventUpdatesAttributeName)
            {
                switch (attributeName)
                {
                case nameof(AutoScroll):
                    AutoScroll = AttributeHelper.GetBool(attributeValue);
                    break;

                default:
                    FormsComponentBase.ApplyAttribute(this, attributeEventHandlerId, attributeName, attributeValue, attributeEventUpdatesAttributeName);
                    break;
                }
            }
Example #5
0
            public void ApplyAttribute(ulong attributeEventHandlerId, string attributeName, object attributeValue, string attributeEventUpdatesAttributeName)
            {
                switch (attributeName)
                {
                case nameof(Orientation):
                    Orientation = (Orientation)AttributeHelper.GetInt(attributeValue);
                    break;

                case nameof(SplitterDistance):
                    SplitterDistance = AttributeHelper.GetInt(attributeValue);
                    break;

                default:
                    FormsComponentBase.ApplyAttribute(this, attributeEventHandlerId, attributeName, attributeValue, attributeEventUpdatesAttributeName);
                    break;
                }
            }
            public void ApplyAttribute(ulong attributeEventHandlerId, string attributeName, object attributeValue, string attributeEventUpdatesAttributeName)
            {
                switch (attributeName)
                {
                case nameof(Text):
                    Text = (string)attributeValue;
                    break;

                case "onclick":
                    Renderer.RegisterEvent(attributeEventHandlerId, () => ClickEventHandlerId = 0);
                    ClickEventHandlerId = attributeEventHandlerId;
                    break;

                default:
                    FormsComponentBase.ApplyAttribute(this, attributeEventHandlerId, attributeName, attributeValue, attributeEventUpdatesAttributeName);
                    break;
                }
            }