20 changed files with 172 additions and 48 deletions
@ -0,0 +1,31 @@ |
|||||||
|
using System; |
||||||
|
|
||||||
|
namespace Tools.ExcelResolver.Editor |
||||||
|
{ |
||||||
|
internal class TEnum : TType |
||||||
|
{ |
||||||
|
public TEnum() { } |
||||||
|
public TEnum(string typeText = null, Type enumType = null) : base(typeText) |
||||||
|
{ |
||||||
|
RealType = enumType; |
||||||
|
FieldWriteFormat = RealType.Name; |
||||||
|
} |
||||||
|
internal override Type RealType { get; } |
||||||
|
internal override object DefaultValue => 0; |
||||||
|
internal override string FieldWriteFormat { get; } |
||||||
|
|
||||||
|
internal override bool String2TType(string typeText) |
||||||
|
{ |
||||||
|
return false; |
||||||
|
} |
||||||
|
|
||||||
|
internal override object TryParseFrom(string cellText) |
||||||
|
{ |
||||||
|
if (Enum.TryParse(RealType, cellText, true, out var result)) |
||||||
|
{ |
||||||
|
return result; |
||||||
|
} |
||||||
|
return null; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,3 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 47d4bdd2042649beb4d0f93fd4369ad8 |
||||||
|
timeCreated: 1737819504 |
Binary file not shown.
@ -0,0 +1,18 @@ |
|||||||
|
namespace Tools.ExcelResolver |
||||||
|
{ |
||||||
|
public enum CustomizeColor |
||||||
|
{ |
||||||
|
yellow = 0, |
||||||
|
red = 1, |
||||||
|
green = 2, |
||||||
|
blue = 3, |
||||||
|
} |
||||||
|
|
||||||
|
public enum Attribute |
||||||
|
{ |
||||||
|
hp = 0, |
||||||
|
atk = 1, |
||||||
|
speed = 2, |
||||||
|
def = 3, |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,3 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: 81d32f9fda7b4ebaaf639491e017be02 |
||||||
|
timeCreated: 1737819941 |
Loading…
Reference in new issue