mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-22 01:16:36 +08:00
项目结构调整
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
namespace Fluent.Tests.Helper
|
||||
{
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
public static class ReflectionHelper
|
||||
{
|
||||
public static T GetFieldValue<T>(this object obj, string fieldName)
|
||||
{
|
||||
return (T)GetPrivateFieldInfo(obj.GetType(), fieldName).GetValue(obj);
|
||||
}
|
||||
|
||||
private static FieldInfo GetPrivateFieldInfo(Type type, string fieldName)
|
||||
{
|
||||
return type.GetField(fieldName, BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
}
|
||||
}
|
||||
}
|
||||
18
Others/Fluent.Ribbon/Fluent.Ribbon.Tests/Helper/UIHelper.cs
Normal file
18
Others/Fluent.Ribbon/Fluent.Ribbon.Tests/Helper/UIHelper.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace Fluent.Tests.Helper
|
||||
{
|
||||
using System;
|
||||
using System.Windows.Threading;
|
||||
|
||||
public static class UIHelper
|
||||
{
|
||||
public static void DoEvents()
|
||||
{
|
||||
Dispatcher.CurrentDispatcher.DoEvents();
|
||||
}
|
||||
|
||||
public static void DoEvents(this Dispatcher dispatcher)
|
||||
{
|
||||
dispatcher.Invoke(DispatcherPriority.Background, new Action(() => { }));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user