tip可能为空

This commit is contained in:
蓝点lilac
2020-11-24 05:19:04 +08:00
parent aa6f7d0e76
commit 831289fb63

View File

@@ -1,4 +1,5 @@
using System.Windows.Forms;
using BulePointLilac.Methods;
using System.Windows.Forms;
namespace BulePointLilac.Controls
{
@@ -6,6 +7,7 @@ namespace BulePointLilac.Controls
{
public static void SetToolTip(Control ctr, string tip)
{
if(tip.IsNullOrWhiteSpace()) return;
ToolTip toolTip = new ToolTip();
toolTip.SetToolTip(ctr, tip);
ctr.Disposed += (sender, e) => toolTip.Dispose();