ChannelID.cs 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. using System;
  2. using System.ComponentModel;
  3. namespace GFGGame
  4. {
  5. public class ChannelIDUtil
  6. {
  7. public static int GetQuickChannelID(int gameChannelID)
  8. {
  9. switch (gameChannelID)
  10. {
  11. case (int)ChannelID.HYKB:
  12. return (int)QuickChannelID.HYKB;
  13. case (int)ChannelID.BiliBili:
  14. return (int)QuickChannelID.BiliBili;
  15. case (int)ChannelID.HUAWEI:
  16. return (int)QuickChannelID.HUAWEI;
  17. case (int)ChannelID.UC9Y:
  18. return (int)QuickChannelID.UC9Y;
  19. case (int)ChannelID.XIAOMI:
  20. return (int)QuickChannelID.XIAOMI;
  21. case (int)ChannelID.VIVO:
  22. return (int)QuickChannelID.VIVO;
  23. case (int)ChannelID.OPPO:
  24. return (int)QuickChannelID.OPPO;
  25. case (int)ChannelID.S4399:
  26. return (int)QuickChannelID.S4399;
  27. case (int)ChannelID.LIANXIANG:
  28. return (int)QuickChannelID.LIANXIANG;
  29. case (int)ChannelID.YINGYONGBAO:
  30. return (int)QuickChannelID.YINGYONGBAO;
  31. case (int)ChannelID.KUPAI:
  32. return (int)QuickChannelID.KUPAI;
  33. case (int)ChannelID.MEIZU:
  34. return (int)QuickChannelID.MEIZU;
  35. case (int)ChannelID.LEIDIAN:
  36. return (int)QuickChannelID.LEIDIAN;
  37. case (int)ChannelID.QuickGameAndroid:
  38. return (int)QuickChannelID.QuickGameAndroid;
  39. case (int)ChannelID.WAN665:
  40. return (int)QuickChannelID.WAN665;
  41. case (int)ChannelID.TikTok:
  42. return (int)QuickChannelID.TikTok;
  43. }
  44. return 0;
  45. }
  46. public static int GetGameChannelID(int quickChannelID)
  47. {
  48. switch (quickChannelID)
  49. {
  50. case (int)QuickChannelID.HYKB:
  51. return (int)ChannelID.HYKB;
  52. case (int)QuickChannelID.BiliBili:
  53. return (int)ChannelID.BiliBili;
  54. case (int)QuickChannelID.HUAWEI:
  55. return (int)ChannelID.HUAWEI;
  56. case (int)QuickChannelID.UC9Y:
  57. return (int)ChannelID.UC9Y;
  58. case (int)QuickChannelID.XIAOMI:
  59. return (int)ChannelID.XIAOMI;
  60. case (int)QuickChannelID.VIVO:
  61. return (int)ChannelID.VIVO;
  62. case (int)QuickChannelID.OPPO:
  63. return (int)ChannelID.OPPO;
  64. case (int)QuickChannelID.S4399:
  65. return (int)ChannelID.S4399;
  66. case (int)QuickChannelID.LIANXIANG:
  67. return (int)ChannelID.LIANXIANG;
  68. case (int)QuickChannelID.YINGYONGBAO:
  69. return (int)ChannelID.YINGYONGBAO;
  70. case (int)QuickChannelID.KUPAI:
  71. return (int)ChannelID.KUPAI;
  72. case (int)QuickChannelID.MEIZU:
  73. return (int)ChannelID.MEIZU;
  74. case (int)QuickChannelID.LEIDIAN:
  75. return (int)ChannelID.LEIDIAN;
  76. case (int)QuickChannelID.QuickGameAndroid:
  77. return (int)ChannelID.QuickGameAndroid;
  78. case (int)QuickChannelID.WAN665:
  79. return (int)ChannelID.WAN665;
  80. case (int)QuickChannelID.TikTok:
  81. return (int)ChannelID.TikTok;
  82. }
  83. return 0;
  84. }
  85. public static bool IsQuickChannels(int gameChannelID)
  86. {
  87. int quickChannelID = GetQuickChannelID(gameChannelID);
  88. return Enum.IsDefined(typeof(QuickChannelID), quickChannelID);
  89. }
  90. public static bool IsGameChannelID(int gameChannelID)
  91. {
  92. return Enum.IsDefined(typeof(ChannelID), gameChannelID);
  93. }
  94. }
  95. public enum ChannelID
  96. {
  97. [Description("TapTap")] TapTap = 1,
  98. [Description("好游快爆")] HYKB = 2,
  99. [Description("Bilibil")] BiliBili = 3,
  100. [Description("华为")] HUAWEI = 4,
  101. [Description("UC九游(阿里游戏)")] UC9Y = 5,
  102. [Description("小米")] XIAOMI = 6,
  103. [Description("VIVO")] VIVO = 7,
  104. [Description("OPPO")] OPPO = 8,
  105. [Description("4399")] S4399 = 9,
  106. [Description("联想")] LIANXIANG = 10,
  107. [Description("应用宝")] YINGYONGBAO = 11,
  108. [Description("酷派")] KUPAI = 12,
  109. [Description("魅族")] MEIZU = 13,
  110. [Description("雷电游戏")] LEIDIAN = 14,
  111. [Description("QuickGame_安卓")] QuickGameAndroid = 15,
  112. [Description("WAN665")] WAN665 = 16,
  113. [Description("AppStore")] AppStore = 17,
  114. [Description("抖音")] TikTok = 18,
  115. [Description("DouYou")] DouYou = 22,
  116. [Description("DouYouDev")] DouYouDev = 23,
  117. [Description("官包")] GFG = 24,
  118. [Description("H5")] H5 = 25,
  119. [Description("测试")] Test = 101
  120. }
  121. public enum QuickChannelID
  122. {
  123. //好游快爆
  124. HYKB = 2258,
  125. //
  126. BiliBili = 114,
  127. //华为
  128. HUAWEI = 24,
  129. //UC九游(阿里游戏)
  130. UC9Y = 9,
  131. //小米
  132. XIAOMI = 15,
  133. //
  134. VIVO = 17,
  135. OPPO = 23,
  136. //4399
  137. S4399 = 27,
  138. //联想
  139. LIANXIANG = 29,
  140. //应用宝
  141. YINGYONGBAO = 32,
  142. //酷派
  143. KUPAI = 43,
  144. //魅族
  145. MEIZU = 70,
  146. //雷电游戏
  147. LEIDIAN = 1003,
  148. //QuickGame_安卓
  149. QuickGameAndroid = 134,
  150. //抖音(小手柄)
  151. TikTok = 1750,
  152. //wan665
  153. WAN665 = 2009
  154. }
  155. }