?? preferences.ascx.cs
字號:
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace BookShop.Web.Controls {
public abstract class Preferences : UserControl {
protected System.Web.UI.WebControls.DropDownList listLanguage;
protected System.Web.UI.WebControls.DropDownList listCategory;
protected System.Web.UI.WebControls.CheckBox chkShowFavorites;
protected System.Web.UI.WebControls.CheckBox chkShowBanners;
// Control property to show list of language
public string Language {
get { return WebComponents.CleanString.InputText(listLanguage.SelectedItem.Value, 50); }
set {
ListItem item = listLanguage.Items.FindByValue(value);
if (item != null){
item.Selected = true;
}
}
}
// Control property to show list of categorys
public string Category {
get { return WebComponents.CleanString.InputText(listCategory.SelectedItem.Value, 50); }
set {
ListItem item = listCategory.Items.FindByValue(value);
if (item != null){
item.Selected = true;
}
}
}
// Control property to show checkbox for show favorites list
public bool IsShowFavorites {
get { return chkShowFavorites.Checked; }
set { chkShowFavorites.Checked = value; }
}
// Control property to show checkbox for show banners
public bool IsShowBanners {
get { return chkShowBanners.Checked; }
set { chkShowBanners.Checked = value; }
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -