diff --git a/Bin/net40/SunnyUI.dll b/Bin/net40/SunnyUI.dll index 1df9adcd..7ac44c16 100644 Binary files a/Bin/net40/SunnyUI.dll and b/Bin/net40/SunnyUI.dll differ diff --git a/SunnyUI/Controls/DropItem/UIToolStripDropDown.cs b/SunnyUI/Controls/DropItem/UIToolStripDropDown.cs index 4dafafe7..9c4bd101 100644 --- a/SunnyUI/Controls/DropItem/UIToolStripDropDown.cs +++ b/SunnyUI/Controls/DropItem/UIToolStripDropDown.cs @@ -17,6 +17,7 @@ * 创建日期: 2021-07-10 * * 2021-07-10: V3.0.4 增加文件说明 + * 2021-12-27: V3.0.9 增加一个显示方法 ******************************************************************************/ using System; @@ -78,9 +79,34 @@ namespace Sunny.UI /// 区域 public void Show(Control control, Rectangle area, Point offset) { + if (control == null) + { + throw new ArgumentNullException(nameof(control)); + } + 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); + } + /// /// 显示 /// @@ -88,6 +114,11 @@ namespace Sunny.UI /// 大小 public void Show(Control control, Size size) { + if (control == null) + { + throw new ArgumentNullException(nameof(control)); + } + itemForm.Show(control, size); } @@ -98,6 +129,11 @@ namespace Sunny.UI /// 大小 public void Show(Control control, Size size, Point offset) { + if (control == null) + { + throw new ArgumentNullException(nameof(control)); + } + itemForm.Show(control, size, offset); } @@ -107,6 +143,11 @@ namespace Sunny.UI /// Control public void Show(Control control) { + if (control == null) + { + throw new ArgumentNullException(nameof(control)); + } + itemForm.Show(control); }