コード例 #1
0
        /// <internalonly/>
        /// <devdoc>
        ///   Renders out the caption of the table if needed, before any rows get rendered.
        /// </devdoc>
        public override void RenderBeginTag(HtmlTextWriter writer)
        {
            base.RenderBeginTag(writer);

            string caption = Caption;

            if (caption.Length != 0)
            {
                TableCaptionAlign alignment = CaptionAlign;

                if (alignment != TableCaptionAlign.NotSet)
                {
                    string alignValue = "Right";

                    switch (alignment)
                    {
                    case TableCaptionAlign.Top:
                        alignValue = "Top";
                        break;

                    case TableCaptionAlign.Bottom:
                        alignValue = "Bottom";
                        break;

                    case TableCaptionAlign.Left:
                        alignValue = "Left";
                        break;
                    }
                    writer.AddAttribute(HtmlTextWriterAttribute.Align, alignValue);
                }
                writer.RenderBeginTag(HtmlTextWriterTag.Caption);
                writer.Write(caption);
                writer.RenderEndTag();
            }
        }
コード例 #2
0
        public override void RenderBeginTag(HtmlTextWriter writer)
        {
            base.RenderBeginTag(writer);
            string caption = this.Caption;

            if (caption.Length != 0)
            {
                TableCaptionAlign captionAlign = this.CaptionAlign;
                if (captionAlign != TableCaptionAlign.NotSet)
                {
                    string str2 = "Right";
                    switch (captionAlign)
                    {
                    case TableCaptionAlign.Top:
                        str2 = "Top";
                        break;

                    case TableCaptionAlign.Bottom:
                        str2 = "Bottom";
                        break;

                    case TableCaptionAlign.Left:
                        str2 = "Left";
                        break;
                    }
                    writer.AddAttribute(HtmlTextWriterAttribute.Align, str2);
                }
                writer.RenderBeginTag(HtmlTextWriterTag.Caption);
                writer.Write(caption);
                writer.RenderEndTag();
            }
        }
コード例 #3
0
ファイル: Table.cs プロジェクト: samcf111/unityMono5.5.0
        // new in Fx 1.1 SP1 (to support Caption and CaptionAlign)

        public override void RenderBeginTag(HtmlTextWriter writer)
        {
            base.RenderBeginTag(writer);

            string s = Caption;

            if (s.Length > 0)
            {
                TableCaptionAlign tca = CaptionAlign;
                if (tca != TableCaptionAlign.NotSet)
                {
                    writer.AddAttribute(HtmlTextWriterAttribute.Align, tca.ToString());
                }

                writer.RenderBeginTag(HtmlTextWriterTag.Caption);
                writer.Write(s);
                writer.RenderEndTag();
            }
        }
コード例 #4
0
        // new in Fx 1.1 SP1 (to support Caption and CaptionAlign)

        public override void RenderBeginTag(HtmlTextWriter writer)
        {
            base.RenderBeginTag(writer);

            string s = Caption;

            if (s.Length > 0)
            {
                TableCaptionAlign tca = CaptionAlign;
                if (tca != TableCaptionAlign.NotSet)
                {
                    writer.AddAttribute(HtmlTextWriterAttribute.Align, tca.ToString());
                }

                writer.RenderBeginTag(HtmlTextWriterTag.Caption);
                writer.Write(s);
                writer.RenderEndTag();
            }
// #if !NET_4_0
//          else if (HasControls ()) {
//              writer.Indent++;
//          }
// #endif
        }