您目前尚未登陆,请选择【登陆】或【注册
首页->控件插件->功能很全asp.net图片水印组件源码2.0>>Config_XML.aspx.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:功能很全asp.net图片水印组件源码2.0
当前文件:文件类型 ImageWaterMark/Config_XML.aspx.cs打开代码结构图
高亮显示
		            using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Text;
//该源码下载自www.51aspx.com(51aspx.com)

namespace PanRoor
{
    public partial class XML : XMLX
    {
        XMLX bind = new XMLX();
        protected void Page_Load(object sender, EventArgs e)
        {

            if (!IsPostBack)
            {
                colorloading();
                string[] FormValue = new string[] { "Bold", "Underline", "Italic", "Strikeout" };
                string[] FormName = new string[] { "加粗文本", "下划线文本", "倾斜文本", "中划线文本" };
                for (int i = 0; i < FormValue.Length; i++)
                {
                    ddl_Form.Items.Add(new ListItem(FormName[i].ToString(), FormValue[i].ToString()));

                }
                bind.getcolor(ref ddl_font);
                rb_NoAndOff.SelectedValue = bind.XMLRead("NoAndOff");
                rb_PicAndText.SelectedValue = bind.XMLRead("PicAndText");
                tb_picpath.Text = bind.XMLRead("PicPath");
                tb_WM_Text.Text = bind.XMLRead("WM_Text");
                ddl_Location.SelectedValue = bind.XMLRead("WM_Location");
                tb_Transparence.Text = bind.XMLRead("WM_Transparence");
                tb_Angle.Text = bind.XMLRead("WM_Angle");
                ddl_font.SelectedValue = bind.XMLRead("Font");
                tb_FontSize.Text = bind.XMLRead("FontSize");
                tb_FontColor.Text = bind.XMLRead("FontColor");
                tb_FontShadow.Text = bind.XMLRead("FontShadow");
                ddl_Form.SelectedValue = bind.XMLRead("FontForm");
                tb_groundcolor.Text = XMLRead("Grounding");
                tb_PlaceX.Text = XMLRead("PlaceX");
                tb_PlaceY.Text = XMLRead("PlaceY");
                tb_ShadowX.Text = XMLRead("ShadowX");
                tb_ShadowY.Text = XMLRead("ShadowY");
                tb_ZipWidth.Text = XMLRead("ZipWidth");
                tb_ZipHeight.Text = XMLRead("ZipHeight");
                tb_MinWidth.Text = XMLRead("MinWidth");
                tb_MinHeight.Text = XMLRead("MinHeight");
                tb_MinPath.Text = XMLRead("MinPath");
                tb_SavePath.Text = XMLRead("SavePath");
                DropDownList1.SelectedValue = XMLRead("Effect");
                Txtshadowtransparence.Text = XMLRead("Txtshadowtransparence");
                PicVal.Text = XMLRead("PicVal");
                Mosaic.SelectedValue = XMLRead("Mosaic");
                txtmX.Text = XMLRead("txtmX");
                txtmY.Text = XMLRead("txtmY");
                txtmWidth.Text = XMLRead("txtmWidth");
                txtmHeight.Text = XMLRead("txtmHeight");
                Cut.SelectedValue = XMLRead("Cut");
                txtcX.Text = XMLRead("txtcX");
                txtcY.Text = XMLRead("txtcY");
                txtcWidth.Text = XMLRead("txtcWidth");
                txtcHeight.Text = XMLRead("txtcHeight");
                Miniature.SelectedValue = XMLRead("Miniature");
                DelPic.SelectedValue = XMLRead("DelPic");
//51_a_s_p_x.c_o_m

            }
        }

        protected void But_Save_Click1(object sender, EventArgs e)
        {
            try
            {
                if (Convert.ToInt32(tb_Transparence.Text) > 100)
                    Alert("透明度不支持大于100,请重设!");
                else
                    bind.CreateXML(rb_NoAndOff.SelectedValue, rb_PicAndText.SelectedValue, tb_picpath.Text, tb_WM_Text.Text, ddl_Location.SelectedValue, tb_Transparence.Text, tb_Angle.Text, ddl_font.SelectedValue, tb_FontSize.Text, tb_FontColor.Text, tb_FontShadow.Text, ddl_Form.SelectedValue, tb_groundcolor.Text, tb_ShadowX.Text, tb_ShadowY.Text, tb_PlaceX.Text, tb_PlaceY.Text, tb_MinWidth.Text, tb_MinHeight.Text, tb_ZipWidth.Text, tb_ZipHeight.Text, tb_MinPath.Text, tb_SavePath.Text, DropDownList1.SelectedValue,Txtshadowtransparence.Text,PicVal.Text,Mosaic.SelectedValue,txtmX.Text,txtmY.Text,txtmWidth.Text,txtmHeight.Text,Cut.SelectedValue,txtcX.Text,txtcY.Text,txtcWidth.Text,txtcHeight.Text,Miniature.SelectedValue,DelPic.SelectedValue);

                colorloading();
                Alert("保存成功!");
            }
            catch
            {
                Alert("保存失败!");
            }


        }
        private void colorloading()
        {
            tb_groundcolor.BackColor = System.Drawing.ColorTranslator.FromHtml(XMLRead("Grounding"));
            tb_groundcolor.ForeColor = System.Drawing.ColorTranslator.FromHtml(XMLRead("Grounding"));
            tb_FontColor.BackColor = System.Drawing.ColorTranslator.FromHtml(XMLRead("FontColor"));
            tb_FontColor.ForeColor = System.Drawing.ColorTranslator.FromHtml(XMLRead("FontColor"));
            tb_FontShadow.BackColor = System.Drawing.ColorTranslator.FromHtml(XMLRead("FontShadow"));
            tb_FontShadow.ForeColor = System.Drawing.ColorTranslator.FromHtml(XMLRead("FontShadow"));
        }


    }
}

        
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:功能很全asp.net图片水印组件源码2.0
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号