* UIToolStripDropDown:增加一个显示方法

This commit is contained in:
Sunny 2021-12-27 22:17:25 +08:00
parent cb71e45243
commit 7b7f378880
2 changed files with 41 additions and 0 deletions

Binary file not shown.

View File

@ -17,6 +17,7 @@
* : 2021-07-10 * : 2021-07-10
* *
* 2021-07-10: V3.0.4 * 2021-07-10: V3.0.4
* 2021-12-27: V3.0.9
******************************************************************************/ ******************************************************************************/
using System; using System;
@ -78,9 +79,34 @@ namespace Sunny.UI
/// <param name="area">区域</param> /// <param name="area">区域</param>
public void Show(Control control, Rectangle area, Point offset) public void Show(Control control, Rectangle area, Point offset)
{ {
if (control == null)
{
throw new ArgumentNullException(nameof(control));
}
itemForm.Show(control, area, offset); itemForm.Show(control, area, offset);
} }
public void Show(Control control, Point offset)
{
if (control == null)
{
throw new ArgumentNullException(nameof(control));
}
itemForm.Show(control, offset);
}
public void Show(Control control, int x, int y)
{
if (control == null)
{
throw new ArgumentNullException(nameof(control));
}
itemForm.Show(control, x, y);
}
/// <summary> /// <summary>
/// 显示 /// 显示
/// </summary> /// </summary>
@ -88,6 +114,11 @@ namespace Sunny.UI
/// <param name="size">大小</param> /// <param name="size">大小</param>
public void Show(Control control, Size size) public void Show(Control control, Size size)
{ {
if (control == null)
{
throw new ArgumentNullException(nameof(control));
}
itemForm.Show(control, size); itemForm.Show(control, size);
} }
@ -98,6 +129,11 @@ namespace Sunny.UI
/// <param name="size">大小</param> /// <param name="size">大小</param>
public void Show(Control control, Size size, Point offset) public void Show(Control control, Size size, Point offset)
{ {
if (control == null)
{
throw new ArgumentNullException(nameof(control));
}
itemForm.Show(control, size, offset); itemForm.Show(control, size, offset);
} }
@ -107,6 +143,11 @@ namespace Sunny.UI
/// <param name="control">Control</param> /// <param name="control">Control</param>
public void Show(Control control) public void Show(Control control)
{ {
if (control == null)
{
throw new ArgumentNullException(nameof(control));
}
itemForm.Show(control); itemForm.Show(control);
} }