71 lines
1.9 KiB
C#
71 lines
1.9 KiB
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Text;
|
|||
|
|
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;
|
|||
|
|
|
|||
|
|
namespace Song.Extend
|
|||
|
|
{
|
|||
|
|
public class PageControl
|
|||
|
|
{
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
private static readonly PageControl _p = new PageControl();
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ȡϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public static PageControl Gateway
|
|||
|
|
{
|
|||
|
|
get
|
|||
|
|
{
|
|||
|
|
return _p;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
private PageControl()
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵĿؼ<C4BF><D8BC><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>״̬
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="container"></param>
|
|||
|
|
/// <param name="isEnabled"></param>
|
|||
|
|
public void SetInnnerEnabled(System.Web.UI.Control container,bool isEnabled)
|
|||
|
|
{
|
|||
|
|
foreach (Control ctrl in container.Controls)
|
|||
|
|
{
|
|||
|
|
if (ctrl is WebControl)
|
|||
|
|
{
|
|||
|
|
((WebControl)ctrl).Enabled = isEnabled;
|
|||
|
|
}
|
|||
|
|
if (ctrl is HtmlControl)
|
|||
|
|
{
|
|||
|
|
((HtmlControl)ctrl).Disabled = !isEnabled;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵĿؼ<C4BF><D8BC><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ʾ
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="container"></param>
|
|||
|
|
/// <param name="isVisible"></param>
|
|||
|
|
public void SetInnnerVisible(System.Web.UI.Control container, bool isVisible)
|
|||
|
|
{
|
|||
|
|
foreach (Control ctrl in container.Controls)
|
|||
|
|
{
|
|||
|
|
if (ctrl is WebControl)
|
|||
|
|
{
|
|||
|
|
((WebControl)ctrl).Visible = isVisible;
|
|||
|
|
}
|
|||
|
|
if (ctrl is HtmlControl)
|
|||
|
|
{
|
|||
|
|
((HtmlControl)ctrl).Visible = isVisible;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|