defaultcs.aspx.cs

来自「Telerik是很大的第三方软件制造商」· CS 代码 · 共 82 行

CS
82
字号
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Telerik.QuickStart;
using Telerik.WebControls;

namespace Telerik.CallbackExamplesCSharp.Controls.CheckBoxList
{
	/// <summary>
	/// Summary description for _Default.
	/// </summary>
	public class DefaultCS: XhtmlPage
	{
		protected System.Web.UI.WebControls.Label Label1;
		protected System.Web.UI.WebControls.Label label11;
		protected System.Web.UI.WebControls.Label statusLabel;
		protected System.Web.UI.HtmlControls.HtmlImage Img1;
		protected Telerik.WebControls.LoadingPanel LoadingPanel1;
		protected CallbackCheckBoxList CallbackCheckBoxList1;

		private void Page_Load(object sender, System.EventArgs e)
		{
			// Put user code to initialize the page here
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		///		Required method for Designer support - do not modify
		///		the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{						
			this.CallbackCheckBoxList1.KeyUp += new Telerik.WebControls.CallbackControls.KeyPressEventHandler(this.CallbackCheckBoxList1_KeyUp);
			this.CallbackCheckBoxList1.SelectedIndexChanged += new System.EventHandler(this.CallbackCheckBoxList1_SelectedIndexChanged);
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion

		private void UpdateStyle()
		{
			Label1.Font.Bold		= CallbackCheckBoxList1.Items[0].Selected;
			Label1.Font.Italic		= CallbackCheckBoxList1.Items[1].Selected;
			Label1.Font.Underline	= CallbackCheckBoxList1.Items[2].Selected;
			Label1.Font.Strikeout	= CallbackCheckBoxList1.Items[3].Selected;
		}

		private void CallbackCheckBoxList1_SelectedIndexChanged(object sender, System.EventArgs e)
		{
			UpdateStyle();
		}

		private void CallbackCheckBoxList1_KeyPress(object sender, Telerik.WebControls.CallbackControls.KeyEventArgs args)
		{
			UpdateStyle();
		}

		private void CallbackCheckBoxList1_KeyUp(object sender, Telerik.WebControls.CallbackControls.KeyEventArgs args)
		{
			
		}


	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?