点击回首页
我的浏览记录 | | 帮助?
当前位置:

源码截图

源码目录树

当前路径:控件源码/Design/PowerTalkBoxDesigner.cs     using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.UI;
using System.Web;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.Design;
using System.Resources;
using System.Collections;
using System.Collections.Specialized;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;
using System.Drawing;
using PowerTalkBox;
namespace PowerTalkBoxContrls.Design
{
    public class PowerTalkBoxDesigner : ControlDesigner
    {
        /// <summary>
        /// 最外层的框框
        /// </summary>
        Panel PTB = new Panel();
        private PowerTalkBox.PowerTalkBox ptbc = null;
        public override void Initialize(IComponent component)
        {
            ptbc = (PowerTalkBox.PowerTalkBox)component;
            base.Initialize(component);
        }
        public string TableContentDesigner()
        {            


            StringWriter sw = new StringWriter();

            HtmlTextWriter htw = new HtmlTextWriter(sw);
            HtmlTable t = new HtmlTable();
            t.CellPadding = 3;
            t.CellSpacing = 0;
            t.BorderColor = "#6699cc";
            t.BgColor = "#6699cc";
            t.Width = ptbc.Width.ToString();
            t.Height = ptbc.Height.ToString();
            HtmlTableRow tr = new HtmlTableRow();
            HtmlTableCell td = new HtmlTableCell();
            td.VAlign = "top";
            td.Align = "center";

            // inner table for iframe
            HtmlTable iframe = new HtmlTable();
            iframe.BgColor = "#FFFFFF";
            iframe.Width = "600px";
            iframe.Height = "500px";
            iframe.CellPadding = 0;
            iframe.CellSpacing = 0;
            iframe.Style.Add("border", "1 solid " + "#6699cc");
            HtmlTableRow tr2 = new HtmlTableRow();
            HtmlTableCell td2 = new HtmlTableCell();
            td2.VAlign = "middle";
            td2.Align = "center";
            td2.Controls.Add(new LiteralControl("<b><font face=arial size=2><font color=green>Power</font>TalkBox:</b> " + ptbc.ID+ "</font>"));
            tr2.Cells.Add(td2);
            iframe.Rows.Add(tr2);

            td.Controls.Add(iframe);
            td.Controls.Add(new LiteralControl("<br><br><br>"));
            tr.Cells.Add(td);
            t.Rows.Add(tr);
            t.RenderControl(htw);
            return sw.ToString();
        }
       public override string GetDesignTimeHtml()
     {
   
         return TableContentDesigner();
        }
    }
}
关于我们 | 顾问团队 | 发展历程 | 联系我们 | 源码上传
联系电话(Tel):4008-010-151(免长途) 企业QQ:4000410510
地址:北京市海淀区中关村鼎好大厦A座二层 邮编:100080
Room A-801,Dinghao Building,Zhongguancun,Beijing,China,100080
51Aspx.com 版权所有 CopyRight © 2006-2015. 京ICP备09089570号 | 京公网安备11010702000869号
在线客服
分享该页面
关闭侧边栏