删除一个函数
This commit is contained in:
parent
877aec6ee2
commit
9cef9a6608
@ -90,22 +90,6 @@ namespace Sunny.UI
|
||||
return ctrl.PointToScreen(new Point(0, 0));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 控件的根窗体
|
||||
/// </summary>
|
||||
/// <param name="ctrl">控件</param>
|
||||
/// <returns>根窗体</returns>
|
||||
public static Form RootForm(this Control ctrl)
|
||||
{
|
||||
if (ctrl == null) return null;
|
||||
while (ctrl.Parent != null)
|
||||
{
|
||||
ctrl = ctrl.Parent;
|
||||
}
|
||||
|
||||
return ctrl as Form;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置控件位于容器的中心
|
||||
/// </summary>
|
||||
|
Loading…
x
Reference in New Issue
Block a user