zoukankan      html  css  js  c++  java
  • 一个类控制不同种类控件的同时启用或停用

          先声明下,这个类是老外写的,非原创,但挺有用的。分享一下

    1,枚举

     1using System;
     2
     3namespace Clingingboy
     4{
     5    /// <summary>
     6    /// 启用控件枚举
     7    /// </summary>

     8    public enum ControlName
     9    {
    10        /// <summary>
    11        /// Includes asp.net button, image button, link button, html button.
    12        /// </summary>

    13        Button,
    14        /// <summary>
    15        /// Includes asp.net text box, html input text, html text area server controls.
    16        /// </summary>

    17        TextBox,
    18        /// <summary>
    19        /// Includes asp.net check box and html input check box.
    20        /// </summary>

    21        CheckBox,
    22        /// <summary>
    23        ///    Includes asp.net drop down list, list box, html select.
    24        /// </summary>

    25        ListControl,
    26        /// <summary>
    27        /// Includes asp.net validators.
    28        /// </summary>

    29        Validator,
    30        /// <summary>
    31        /// All the controls that are defined in this enum.
    32        /// </summary>

    33        All
    34    }

    35}

    36

    2,最后一个方法无效,因为Control不存在此属性
      1using System;
      2using System.Text;
      3using System.Web;
      4using System.Web.UI;
      5using System.IO;
      6using System.Net;
      7using System.Text.RegularExpressions;
      8using System.Web.UI.WebControls;
      9using System.Web.UI.HtmlControls;
     10
     11
     12namespace Clingingboy
     13{
     14    /// <summary>
     15    /// 控件启用状态
     16    /// </summary>

     17    public class ControlEnabler
     18    {
     19
     20        Page Control Enabling / Disabling Utility
    167    }

    168}
  • 相关阅读:
    自定义TabBarController
    UITabBarController剖析
    IOS中UIScrollView的contentSize、contentOffset和contentInset属性
    iOS开发 剖析网易新闻标签栏视图切换
    transitionFromViewController方法的使用
    ViewController生命周期
    1816. Truncate Sentence
    1290. 二进制链表转整数
    1302. 层数最深叶子节点的和
    102.二叉树的层次遍历
  • 原文地址:https://www.cnblogs.com/Clingingboy/p/454410.html
Copyright © 2011-2022 走看看