/******************************
* 说明:BaseUserControl 扩展类
* 创建人:龚宇超
* 创建日期:2017-12-15
* 修改人:
* 修改日期:
* 修改备注:
* 版本:1.0.0.0
******************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Lskj.Control.Model
{
///
/// BaseUserControl 扩展类
///
public static class BaseUserControlExtend
{
///
/// 说明:将Control转换为BaseUserControl
/// 创建人:龚宇超
/// 创建日期:2017-12-15
/// 修改人:
/// 修改日期:
/// 修改备注:
/// 版本:1.0
///
/// The control.
/// BaseUserControl.
public static BaseUserControl ToBaseUserControl(this System.Windows.Forms.Control control)
{
if (control == null) return null;
control = control.Parent;
if (control != null && control.Tag == null)
control = control.Parent;
return (control != null && control is BaseUserControl) ? control as BaseUserControl : null;
}
}
}