improved notifyicon

added mouseenter and mouseleave events
This commit is contained in:
NaBian committed 2019-04-20 23:36:44 +08:00
1 parent 9aa6df87cb
commit 3aa0f09d39
6 files changed
+388 -16

No files matched your search

@@ -1,15 +1,31 @@
using System;
using System.Collections.Generic;
namespace HandyControlDemo.Tools
{
public class AssemblyHelper
internal class AssemblyHelper
{
private static readonly string NameSpaceStr = typeof(AssemblyHelper).Assembly.GetName().Name;
private static readonly Dictionary<string, object> CacheDic = new Dictionary<string, object>();
public static void Register(string name, object instance) => CacheDic[name] = instance;
public static object ResolveByKey(string key)
{
if (CacheDic.TryGetValue(key, out var value))
{
return value;
}
return null;
}
public static object CreateInternalInstance(string className)
{
try
{
var type = Type.GetType($"{NameSpaceStr}.{className}");
return type == null ? null : Activator.CreateInstance(type);
}