Пример #1
0
        public virtual void Visit(FormDatePicker formDatePicker, HtmlContainer htmlContainer)
        {
            if (formDatePicker.Icon == FormIcon.NotSet)
            {
                return;
            }

            HtmlTextBox htmlTextBox = null;
            int         i;

            for (i = 0; i < htmlContainer.Contents.Count; i++)
            {
                if (htmlContainer.Contents[i] is HtmlTextBox)
                {
                    htmlTextBox = (HtmlTextBox)htmlContainer.Contents[i];
                    break;
                }
            }

            if (htmlTextBox == null)
            {
                return;
            }

            htmlContainer.Remove(htmlTextBox);

            HtmlItalic htmlItalic = new HtmlItalic();

            htmlItalic.Class.AddRange(IconClass(formDatePicker.Icon));

            HtmlDiv htmlDiv = new HtmlDiv();

            htmlDiv.Add(htmlTextBox);
            htmlDiv.Insert(prepend ? 0 : 1, htmlItalic);

            htmlContainer.Insert(i, htmlDiv);
        }