| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- using System;
- using System.ComponentModel;
- namespace GFGGame
- {
- public class ChannelIDUtil
- {
- public static int GetQuickChannelID(int gameChannelID)
- {
- switch (gameChannelID)
- {
- case (int)ChannelID.HYKB:
- return (int)QuickChannelID.HYKB;
- case (int)ChannelID.BiliBili:
- return (int)QuickChannelID.BiliBili;
- case (int)ChannelID.HUAWEI:
- return (int)QuickChannelID.HUAWEI;
- case (int)ChannelID.UC9Y:
- return (int)QuickChannelID.UC9Y;
- case (int)ChannelID.XIAOMI:
- return (int)QuickChannelID.XIAOMI;
- case (int)ChannelID.VIVO:
- return (int)QuickChannelID.VIVO;
- case (int)ChannelID.OPPO:
- return (int)QuickChannelID.OPPO;
- case (int)ChannelID.S4399:
- return (int)QuickChannelID.S4399;
- case (int)ChannelID.LIANXIANG:
- return (int)QuickChannelID.LIANXIANG;
- case (int)ChannelID.YINGYONGBAO:
- return (int)QuickChannelID.YINGYONGBAO;
- case (int)ChannelID.KUPAI:
- return (int)QuickChannelID.KUPAI;
- case (int)ChannelID.MEIZU:
- return (int)QuickChannelID.MEIZU;
- case (int)ChannelID.LEIDIAN:
- return (int)QuickChannelID.LEIDIAN;
- case (int)ChannelID.QuickGameAndroid:
- return (int)QuickChannelID.QuickGameAndroid;
- case (int)ChannelID.WAN665:
- return (int)QuickChannelID.WAN665;
- case (int)ChannelID.TikTok:
- return (int)QuickChannelID.TikTok;
- }
- return 0;
- }
- public static int GetGameChannelID(int quickChannelID)
- {
- switch (quickChannelID)
- {
- case (int)QuickChannelID.HYKB:
- return (int)ChannelID.HYKB;
- case (int)QuickChannelID.BiliBili:
- return (int)ChannelID.BiliBili;
- case (int)QuickChannelID.HUAWEI:
- return (int)ChannelID.HUAWEI;
- case (int)QuickChannelID.UC9Y:
- return (int)ChannelID.UC9Y;
- case (int)QuickChannelID.XIAOMI:
- return (int)ChannelID.XIAOMI;
- case (int)QuickChannelID.VIVO:
- return (int)ChannelID.VIVO;
- case (int)QuickChannelID.OPPO:
- return (int)ChannelID.OPPO;
- case (int)QuickChannelID.S4399:
- return (int)ChannelID.S4399;
- case (int)QuickChannelID.LIANXIANG:
- return (int)ChannelID.LIANXIANG;
- case (int)QuickChannelID.YINGYONGBAO:
- return (int)ChannelID.YINGYONGBAO;
- case (int)QuickChannelID.KUPAI:
- return (int)ChannelID.KUPAI;
- case (int)QuickChannelID.MEIZU:
- return (int)ChannelID.MEIZU;
- case (int)QuickChannelID.LEIDIAN:
- return (int)ChannelID.LEIDIAN;
- case (int)QuickChannelID.QuickGameAndroid:
- return (int)ChannelID.QuickGameAndroid;
- case (int)QuickChannelID.WAN665:
- return (int)ChannelID.WAN665;
- case (int)QuickChannelID.TikTok:
- return (int)ChannelID.TikTok;
- }
- return 0;
- }
- public static bool IsQuickChannels(int gameChannelID)
- {
- int quickChannelID = GetQuickChannelID(gameChannelID);
- return Enum.IsDefined(typeof(QuickChannelID), quickChannelID);
- }
- public static bool IsGameChannelID(int gameChannelID)
- {
- return Enum.IsDefined(typeof(ChannelID), gameChannelID);
- }
- }
- public enum ChannelID
- {
- [Description("TapTap")] TapTap = 1,
- [Description("好游快爆")] HYKB = 2,
- [Description("Bilibil")] BiliBili = 3,
- [Description("华为")] HUAWEI = 4,
- [Description("UC九游(阿里游戏)")] UC9Y = 5,
- [Description("小米")] XIAOMI = 6,
- [Description("VIVO")] VIVO = 7,
- [Description("OPPO")] OPPO = 8,
- [Description("4399")] S4399 = 9,
- [Description("联想")] LIANXIANG = 10,
- [Description("应用宝")] YINGYONGBAO = 11,
- [Description("酷派")] KUPAI = 12,
- [Description("魅族")] MEIZU = 13,
- [Description("雷电游戏")] LEIDIAN = 14,
- [Description("QuickGame_安卓")] QuickGameAndroid = 15,
- [Description("WAN665")] WAN665 = 16,
- [Description("AppStore")] AppStore = 17,
- [Description("抖音")] TikTok = 18,
- [Description("DouYou")] DouYou = 22,
- [Description("DouYouDev")] DouYouDev = 23,
- [Description("官包")] GFG = 24,
- [Description("H5")] H5 = 25,
- [Description("测试")] Test = 101
- }
- public enum QuickChannelID
- {
- //好游快爆
- HYKB = 2258,
- //
- BiliBili = 114,
- //华为
- HUAWEI = 24,
- //UC九游(阿里游戏)
- UC9Y = 9,
- //小米
- XIAOMI = 15,
- //
- VIVO = 17,
- OPPO = 23,
- //4399
- S4399 = 27,
- //联想
- LIANXIANG = 29,
- //应用宝
- YINGYONGBAO = 32,
- //酷派
- KUPAI = 43,
- //魅族
- MEIZU = 70,
- //雷电游戏
- LEIDIAN = 1003,
- //QuickGame_安卓
- QuickGameAndroid = 134,
- //抖音(小手柄)
- TikTok = 1750,
- //wan665
- WAN665 = 2009
- }
- }
|