ConnectorType.cs 943 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace PhihongSystemID
  7. {
  8. public enum ConnectorType
  9. {
  10. Unknown, None, CHadeMO, CCS1, CCS2, GBT, AC, ChaoJi, Wireless
  11. }
  12. public static class ConnectorTypeExtention
  13. {
  14. public static bool GetIsAc(this ConnectorType type)
  15. {
  16. if (type == ConnectorType.GBT || type == ConnectorType.AC)
  17. return true;
  18. return false;
  19. }
  20. public static bool GetIsCCS(this ConnectorType type)
  21. {
  22. if (type == ConnectorType.CCS1 ||
  23. type == ConnectorType.CCS2)
  24. return true;
  25. return false;
  26. }
  27. public static bool GetIsCHadeMO(this ConnectorType type)
  28. {
  29. if (type == ConnectorType.CHadeMO)
  30. return true;
  31. return false;
  32. }
  33. }
  34. }