本文整理汇总了C#中System.Web.UI.WebControls.Style.CheckBit方法的典型用法代码示例。如果您正苦于以下问题:C# Style.CheckBit方法的具体用法?C# Style.CheckBit怎么用?C# Style.CheckBit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.UI.WebControls.Style
的用法示例。
在下文中一共展示了Style.CheckBit方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Merge
void Merge (string name, TableStyles s, Style source)
{
if ((!CheckBit ((int) s)) && (source.CheckBit ((int) s))) {
object o = source.ViewState [name];
if (o != null) {
ViewState [name] = o;
SetBit ((int) s);
}
}
}
示例2: CopyTextStylesFrom
internal void CopyTextStylesFrom (Style source) {
// Used primary for TreeView and Menu
if (source.CheckBit ((int) Styles.ForeColor)) {
ForeColor = source.ForeColor;
}
if (source.CheckBit((int) Styles.FontAll)) {
Font.CopyFrom (source.Font);
}
}
示例3: MergeWith
public virtual void MergeWith(Style s)
{
if ((s == null) || (s.IsEmpty))
{
return;
}
if (s.fontinfo != null)
{
Font.MergeWith(s.fontinfo);
}
if ((!CheckBit ((int) Styles.BackColor)) && (s.CheckBit ((int) Styles.BackColor)) && (s.BackColor != Color.Empty))
{
this.BackColor = s.BackColor;
}
if ((!CheckBit ((int) Styles.BorderColor)) && (s.CheckBit ((int) Styles.BorderColor)) && (s.BorderColor != Color.Empty))
{
this.BorderColor = s.BorderColor;
}
if ((!CheckBit ((int) Styles.BorderStyle)) && (s.CheckBit ((int) Styles.BorderStyle)) && (s.BorderStyle != BorderStyle.NotSet))
{
this.BorderStyle = s.BorderStyle;
}
if ((!CheckBit ((int) Styles.BorderWidth)) && (s.CheckBit ((int) Styles.BorderWidth)) && (!s.BorderWidth.IsEmpty))
{
this.BorderWidth = s.BorderWidth;
}
if ((!CheckBit ((int) Styles.CssClass)) && (s.CheckBit ((int) Styles.CssClass)) && (s.CssClass != string.Empty))
{
this.CssClass = s.CssClass;
}
if ((!CheckBit ((int) Styles.ForeColor)) && (s.CheckBit ((int) Styles.ForeColor)) && (s.ForeColor != Color.Empty))
{
this.ForeColor = s.ForeColor;
}
if ((!CheckBit ((int) Styles.Height)) && (s.CheckBit ((int) Styles.Height)) && (!s.Height.IsEmpty))
{
this.Height = s.Height;
}
if ((!CheckBit ((int) Styles.Width)) && (s.CheckBit ((int) Styles.Width)) && (!s.Width.IsEmpty))
{
this.Width = s.Width;
}
}
示例4: Copy
void Copy (string name, TableItemStyles s, Style source)
{
if (source.CheckBit((int) s)) {
object o = source.ViewState [name];
if (o != null) {
ViewState [name] = o;
SetBit ((int) s);
}
}
}
示例5: MergeWith
public override void MergeWith (Style s)
{
if ((s == null) || (s.IsEmpty))
return;
base.MergeWith (s);
PanelStyle ps = s as PanelStyle;
if (ps == null)
return;
if (!CheckBit ((int) PanelStyles.BackImageUrl) && s.CheckBit ((int) PanelStyles.BackImageUrl)) {
this.BackImageUrl = ps.BackImageUrl;
}
if (!CheckBit ((int) PanelStyles.Direction) && s.CheckBit ((int) PanelStyles.Direction)) {
this.Direction = ps.Direction;
}
if (!CheckBit ((int) PanelStyles.HorizontalAlign) && s.CheckBit ((int) PanelStyles.HorizontalAlign)) {
this.HorizontalAlign = ps.HorizontalAlign;
}
if (!CheckBit ((int) PanelStyles.ScrollBars) && s.CheckBit ((int) PanelStyles.ScrollBars)) {
this.ScrollBars = ps.ScrollBars;
}
if (!CheckBit ((int) PanelStyles.Wrap) && s.CheckBit ((int) PanelStyles.Wrap)) {
this.Wrap = ps.Wrap;
}
}
示例6: MergeWith
public override void MergeWith(Style s) {
base.MergeWith (s);
if (s == null || s.IsEmpty) {
return;
}
if (!CheckBit ((int) DataGridPagerStyles.Mode) && s.CheckBit ((int) DataGridPagerStyles.Mode) && (((DataGridPagerStyle) s).Mode != PagerMode.NextPrev)) {
this.Mode = ((DataGridPagerStyle)s).Mode;
}
if (!CheckBit ((int) DataGridPagerStyles.NextPageText) && s.CheckBit ((int) DataGridPagerStyles.NextPageText) && (((DataGridPagerStyle) s).NextPageText != ">")) {
this.NextPageText = ((DataGridPagerStyle)s).NextPageText;
}
if (!CheckBit ((int) DataGridPagerStyles.PageButtonCount) && s.CheckBit ((int) DataGridPagerStyles.PageButtonCount) && (((DataGridPagerStyle) s).PageButtonCount != 10)) {
this.PageButtonCount = ((DataGridPagerStyle)s).PageButtonCount;
}
if (!CheckBit ((int) DataGridPagerStyles.Position) && s.CheckBit ((int) DataGridPagerStyles.Position) && (((DataGridPagerStyle) s).Position != PagerPosition.Bottom)) {
this.Position = ((DataGridPagerStyle)s).Position;
}
if (!CheckBit ((int) DataGridPagerStyles.PrevPageText) && s.CheckBit ((int) DataGridPagerStyles.PrevPageText) && (((DataGridPagerStyle) s).PrevPageText != "<")) {
this.PrevPageText = ((DataGridPagerStyle)s).PrevPageText;
}
if (!CheckBit ((int) DataGridPagerStyles.Visible) && s.CheckBit ((int) DataGridPagerStyles.Visible) && (((DataGridPagerStyle) s).Visible != true)) {
this.Visible = ((DataGridPagerStyle)s).Visible;
}
}