Example #1
0
        /// <summary>
        /// 设置属性
        /// </summary>
        protected override void SetAttributes()
        {
            IonDateTime control = this.ControlHost.Content as IonDateTime;

            if (control.ShowStyle == EIonDateTimeStyle.YYYYMMDD)
            {
                this.HtmlWriter.AddAttribute("displayFormat", "YYYY-MM-DD");
            }
            else if (control.ShowStyle == EIonDateTimeStyle.MMMDDYYYY)
            {
                this.HtmlWriter.AddAttribute("displayFormat", "MMM DD YYYY");
            }
            else if (control.ShowStyle == EIonDateTimeStyle.hmmA)
            {
                this.HtmlWriter.AddAttribute("displayFormat", "h:mm A");
            }

            //控件属性绑定
            string bindPropertyStr = BuildCommon.BuildControlBindProperty(control, this.ScreenDefinition, this.IsPreview);

            if (!string.IsNullOrEmpty(bindPropertyStr))
            {
                this.HtmlWriter.AddAttribute(bindPropertyStr, null);
            }

            base.SetAttributes();
        }
Example #2
0
        /// <summary>
        /// 设置属性
        /// </summary>
        protected override void SetAttributes()
        {
            IonInput control = this.ControlHost.Content as IonInput;

            if (control.IsPassword)
            {
                this.HtmlWriter.AddAttribute("type", "password");
            }
            else
            {
                this.HtmlWriter.AddAttribute("type", "text");
            }
            if (!string.IsNullOrEmpty(control.Watermark))
            {
                this.HtmlWriter.AddAttribute("placeholder", control.Watermark);
            }

            //控件属性绑定
            string bindPropertyStr = BuildCommon.BuildControlBindProperty(control, this.ScreenDefinition, this.IsPreview);

            if (!string.IsNullOrEmpty(bindPropertyStr))
            {
                this.HtmlWriter.AddAttribute(bindPropertyStr, null);
            }

            base.SetAttributes();
        }
Example #3
0
        /// <summary>
        /// 设置属性
        /// </summary>
        protected override void SetAttributes()
        {
            IonSegmentContent control = this.ControlHost.Content as IonSegmentContent;
            //控件属性绑定
            string bindPropertyStr = BuildCommon.BuildControlBindProperty(control, this.ScreenDefinition, this.IsPreview);

            if (!string.IsNullOrEmpty(bindPropertyStr))
            {
                this.HtmlWriter.AddAttribute(bindPropertyStr, null);
            }

            base.SetAttributes();
        }
Example #4
0
        /// <summary>
        /// 设置子元素
        /// </summary>
        protected override void SetChildElements()
        {
            IonContentText control = this.ControlHost.Content as IonContentText;

            if (!string.IsNullOrEmpty(control.Value))
            {
                this.HtmlWriter.WriteEncodedText(control.Value);
            }
            else
            {
                //控件值绑定
                string bindPropertyStr = BuildCommon.BuildControlBindTextProp(control, this.ScreenDefinition, this.IsPreview);
                if (!string.IsNullOrEmpty(bindPropertyStr))
                {
                    this.HtmlWriter.WriteEncodedText(bindPropertyStr);
                }
            }
        }
Example #5
0
        /// <summary>
        /// 设置属性
        /// </summary>
        protected override void SetAttributes()
        {
            IonGridCol control = this.ControlHost.Content as IonGridCol;

            if (control.ColumnSpan != null && control.ColumnSpan > 0)
            {
                this.HtmlWriter.AddAttribute("col-" + control.ColumnSpan.ToString() + "", null);
            }
            //控件属性绑定
            string bindPropertyStr = BuildCommon.BuildControlBindProperty(control, this.ScreenDefinition, this.IsPreview);

            if (!string.IsNullOrEmpty(bindPropertyStr))
            {
                this.HtmlWriter.AddAttribute(bindPropertyStr, null);
            }

            base.SetAttributes();
        }
Example #6
0
        /// <summary>
        /// 设置属性
        /// </summary>
        protected override void SetAttributes()
        {
            IonNav control = this.ControlHost.Content as IonNav;

            this.HtmlWriter.AddAttribute("swipeBackEnabled", "false");
            if (!string.IsNullOrEmpty(control.MenuName))
            {
                this.HtmlWriter.AddAttribute("#" + control.MenuName + "", null);
            }

            //控件属性绑定
            string bindPropertyStr = BuildCommon.BuildControlBindProperty(control, this.ScreenDefinition, this.IsPreview);

            if (!string.IsNullOrEmpty(bindPropertyStr))
            {
                this.HtmlWriter.AddAttribute(bindPropertyStr, null);
            }

            base.SetAttributes();
        }
Example #7
0
        /// <summary>
        /// 设置属性
        /// </summary>
        protected override void SetAttributes()
        {
            IonItemSliding control = this.ControlHost.Content as IonItemSliding;
            //Store绑定
            string store = GetStore();

            if (!string.IsNullOrEmpty(store))
            {
                this.HtmlWriter.AddAttribute(store, null);
            }
            //控件属性绑定
            string bindPropertyStr = BuildCommon.BuildControlBindProperty(control, this.ScreenDefinition, this.IsPreview);

            if (!string.IsNullOrEmpty(bindPropertyStr))
            {
                this.HtmlWriter.AddAttribute(bindPropertyStr, null);
            }

            base.SetAttributes();
        }
Example #8
0
        /// <summary>
        /// 设置属性
        /// </summary>
        protected override void SetAttributes()
        {
            IonTab control = this.ControlHost.Content as IonTab;

            if (!string.IsNullOrEmpty(this.ControlHost.Title))
            {
                this.HtmlWriter.AddAttribute("tabTitle", this.ControlHost.Title);
            }
            if (!string.IsNullOrEmpty(control.IconName))
            {
                this.HtmlWriter.AddAttribute("tabIcon", control.IconName);
            }

            //控件属性绑定
            string bindPropertyStr = BuildCommon.BuildControlBindProperty(control, this.ScreenDefinition, this.IsPreview);

            if (!string.IsNullOrEmpty(bindPropertyStr))
            {
                this.HtmlWriter.AddAttribute(bindPropertyStr, null);
            }

            base.SetAttributes();
        }
Example #9
0
        /// <summary>
        /// 设置属性
        /// </summary>
        protected override void SetAttributes()
        {
            IonButton control = this.ControlHost.Content as IonButton;

            if (control.IonItem)
            {
                this.HtmlWriter.AddAttribute("wm-item", null);
            }
            else
            {
                this.HtmlWriter.AddAttribute("wm-button", null);
            }
            if (!control.IsEnable)
            {
                this.HtmlWriter.AddAttribute("disabled", "true");
            }
            if (control.Outline)
            {
                this.HtmlWriter.AddAttribute("outline", null);
            }
            if (control.Clear)
            {
                this.HtmlWriter.AddAttribute("clear", null);
            }
            if (control.Round)
            {
                this.HtmlWriter.AddAttribute("round", null);
            }
            if (control.Block)
            {
                this.HtmlWriter.AddAttribute("block", null);
            }
            if (control.Full)
            {
                this.HtmlWriter.AddAttribute("full", null);
            }
            if (control.IconOnly)
            {
                this.HtmlWriter.AddAttribute("icon-only", null);
            }
            if (control.IconDock == EIonButtonIconDock.Start)
            {
                this.HtmlWriter.AddAttribute("icon-start", null);
            }
            else if (control.IconDock == EIonButtonIconDock.End)
            {
                this.HtmlWriter.AddAttribute("icon-end", null);
            }
            //this.HtmlWriter.AddAttribute("[style.color]", "'" + control.ForeColor.ToString().ToLower() + "'", false);
            //this.HtmlWriter.AddAttribute("[style.background-color]", "'" + control.BackColor.ToString().ToLower() + "'", false);
            //附加属性
            IonItemAttach attachObject = this.ControlHost.AttachObject as IonItemAttach;

            if (attachObject != null)
            {
                if (attachObject.ItemDock == EIonItemDock.Start)
                {
                    this.HtmlWriter.AddAttribute("item-start", null);
                }
                else if (attachObject.ItemDock == EIonItemDock.End)
                {
                    this.HtmlWriter.AddAttribute("item-end", null);
                }
            }
            //控件属性绑定
            string bindPropertyStr = BuildCommon.BuildControlBindProperty(control, this.ScreenDefinition, this.IsPreview);

            if (!string.IsNullOrEmpty(bindPropertyStr))
            {
                this.HtmlWriter.AddAttribute(bindPropertyStr, null);
            }

            base.SetAttributes();
        }