* UIFlowLayoutPanel: 删除AddControl、RemoveControl方法

This commit is contained in:
Sunny 2022-11-13 09:36:42 +08:00
parent 191113a38e
commit b5c019362c

View File

@ -24,6 +24,7 @@
* 2021-11-05: V3.0.8 DPI缩放滚动条未覆盖的问题
* 2022-11-03: V3.2.6
* 2022-11-13: V3.2.8
* 2022-11-13: V3.2.8 AddControlRemoveControl方法
******************************************************************************/
using System;
@ -236,30 +237,6 @@ namespace Sunny.UI
}
}
[Obsolete("此方法已优化用Add代替")]
public void AddControl(Control control)
{
if (control is IStyleInterface ctrl)
{
if (!ctrl.StyleCustomMode) ctrl.Style = Style;
}
if (Panel != null)
{
Panel.Controls.Add(control);
}
}
[Obsolete("此方法已优化用Remove代替")]
public void RemoveControl(Control control)
{
if (Panel != null)
{
if (Panel.Controls.Contains(control))
Panel.Controls.Remove(control);
}
}
public void Clear()
{
foreach (Control control in Panel.Controls)