ModuleName.cs 802 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Runtime.Serialization;
  6. namespace Aitex.Triton160.Common
  7. {
  8. [DataContract]
  9. [Serializable]
  10. public enum ModuleName
  11. {
  12. [EnumMember]
  13. System = 0,
  14. }
  15. public class ModuleNameString
  16. {
  17. public const string System = "System";
  18. public static string ToCstring(ModuleName value)
  19. {
  20. switch (value)
  21. {
  22. case ModuleName.System:
  23. return "系统";
  24. default:
  25. return "未知腔";
  26. }
  27. }
  28. public static ModuleName ToEnum(string value)
  29. {
  30. return (ModuleName)Enum.Parse(typeof(ModuleName), value, true);
  31. }
  32. }
  33. }