block size

This commit is contained in:
艾竹
2023-07-29 12:35:09 +08:00
parent 14735f78dc
commit 55678e72ed

View File

@@ -1,16 +1,10 @@
using AIStudio.Wpf.DiagramDesigner;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System;
namespace AIStudio.Wpf.DiagramDesigner
{
public class ConstParameter : BindableBase, IParameter
{
private string _text;
@@ -53,5 +47,26 @@ namespace AIStudio.Wpf.DiagramDesigner
Value = $"{Value}{value}";
}
}
public T GetValue<T>()
{
T var1 = default(T);
if (Value is T double1)
{
var1 = double1;
}
else
{
try
{
var1 = (T)Convert.ChangeType(Value?.ToString(), typeof(T));
}
catch { }
}
return var1;
}
}
}