sfc界面处理完成,还差顺序逻辑控制过程

This commit is contained in:
艾竹
2021-08-01 22:30:12 +08:00
parent 9a0e85e1a9
commit 0b8258003f
50 changed files with 2682 additions and 155 deletions

View File

@@ -16,6 +16,7 @@ namespace Util.DiagramDesigner
{
//如果是字符串或值类型则直接返回
if (obj == null || obj is string || obj.GetType().IsValueType) return obj;
object retval = Activator.CreateInstance(obj.GetType());
FieldInfo[] fields = obj.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
foreach (FieldInfo field in fields)
@@ -45,6 +46,9 @@ namespace Util.DiagramDesigner
public static T AutoCopy<T>(T source) where T : new()
{
//如果是字符串或值类型则直接返回
if (source == null || source is string || source.GetType().IsValueType) return source;
T target = new T();
var Properties = typeof(T).GetProperties();
foreach (var Propertie in Properties)
@@ -61,7 +65,8 @@ namespace Util.DiagramDesigner
public static T DeepCopy<T>(T obj)
{
if (obj == null) return obj;
//如果是字符串或值类型则直接返回
if (obj == null || obj is string || obj.GetType().IsValueType) return obj;
object retval;
using (MemoryStream ms = new MemoryStream())