add live select pannel

This commit is contained in:
CroakFang
2023-01-20 07:13:54 +08:00
parent 3b18268252
commit a4dc2516e3
1543 changed files with 107369 additions and 9227 deletions
@@ -0,0 +1,44 @@
using System;
namespace DereTore.Common
{
public static class EventExtensions
{
public static void Raise<T>(this EventHandler<T> handler, object sender, T e) where T : EventArgs
{
if (handler != null)
{
handler.Invoke(sender, e);
}
}
public static void Raise(this EventHandler handler, object sender, EventArgs e)
{
if (handler != null)
{
handler.Invoke(sender, e);
}
}
public static IAsyncResult RaiseAsync<T>(this EventHandler<T> handler, object sender, T e) where T : EventArgs
{
if (handler != null)
{
return handler.BeginInvoke(sender, e, handler.EndInvoke, null);
}
return null;
}
public static IAsyncResult RaiseAsync(this EventHandler handler, object sender, EventArgs e)
{
if (handler != null)
{
return handler.BeginInvoke(sender, e, handler.EndInvoke, null);
}
return null;
}
}
}