Flowchart

This commit is contained in:
艾竹
2022-12-04 23:07:20 +08:00
parent dc42f75610
commit 0487857d7b
30 changed files with 1621 additions and 383 deletions

View File

@@ -6,6 +6,17 @@ namespace AIStudio.Wpf.DiagramDesigner
{
public static class EnumExtension
{
/// <summary>
/// Converts to enum.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="str">The string.</param>
/// <returns></returns>
public static T ToEnum<T>(this string str)
{
return (T)Enum.Parse(typeof(T), str);
}
public static string GetDescription(this Enum value)
{
FieldInfo field = value.GetType().GetField(value.ToString());