Exemple #1
0
        public static string MobNameFromID(short id, out MobileType type)
        {
            if (NonHumanoid == null)
            {
                Init();
            }
            string name = "Mob Not Found.";

            type = MobileType.None;
            foreach (KeyValuePair <short, string> n in NonHumanoid)
            {
                if (n.Key == id)
                {
                    type = MobileType.NonHumanoid;
                    return(n.Value);
                }
            }
            // Not a non humaniod
            foreach (KeyValuePair <short, string> h in Humanoid)
            {
                if (h.Key == id)
                {
                    type = MobileType.Humaniod;
                    return(h.Value);
                }
            }
            return(name);
        }
Exemple #2
0
        public async Task <ActionResult <MobileType> > PostMobileType(MobileType mobileType)
        {
            _context.MobileType.Add(mobileType);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetMobileType", new { id = mobileType.id }, mobileType));
        }
Exemple #3
0
 public static void ChangePrimaryMobile(MobileType mobileType)
 {
     ServerInformationBroker.Instance.GameServerServiceProvider.RequestQueue.Enqueue(
         NetworkObjectParameters.GameServerRoomChangePrimaryMobile,
         mobileType
         );
 }
Exemple #4
0
        public T InitializeAppiumDriver <T>(MobileType mobileType) where T : AppiumDriver <IWebElement>
        {
            DesiredCapabilities desiredCapabilities = new DesiredCapabilities();

            desiredCapabilities.SetCapability(MobileCapabilityType.PlatformName, Settings.PlatformName);
            desiredCapabilities.SetCapability("deviceName", Settings.DeviceName);
            desiredCapabilities.SetCapability("app", Settings.AUTPath);
            desiredCapabilities.SetCapability("appPackage", Settings.AppPackage);

            //Creation of the instance
            var driver = (T)Activator.CreateInstance(typeof(T), StartAppiumLocalService(), desiredCapabilities);

            switch (mobileType)
            {
            case MobileType.Native:
                return(driver);

            case MobileType.Hybrid:
            {
                desiredCapabilities.SetCapability("chromedriverExecutable",
                                                  Settings.ChromeDriverPath);
                AppiumContext = driver;

                AppiumContext.Context = AppiumContext.Contexts.First(x => x.Contains("WEBVIEW_"));

                return((T)AppiumContext);
            }

            default:
                return((T)AppiumContext);
            }
        }
        public static void FactoryPattern()
        {
            Console.WriteLine("Choose Mobile \n 1. Apple\n 2. Nokia\n 3. Samsung\n");
            var        option     = Convert.ToInt32(Console.ReadLine());
            MobileType mobileType = MobileType.None;

            switch (option)
            {
            case 1:
                mobileType = MobileType.Apple;
                break;

            case 2:
                mobileType = MobileType.Nokia;
                break;

            case 3:
                mobileType = MobileType.Samsung;
                break;
            }

            Mobile mobile = Factory.CreateMobile(mobileType)?.GetMobile();

            Console.WriteLine($"Model : {mobile.ModelName}\nOperating System : {mobile.OperatingSystem}");
            Console.ReadLine();
        }
Exemple #6
0
        public async Task <IActionResult> PutMobileType(int id, MobileType mobileType)
        {
            if (id != mobileType.id)
            {
                return(BadRequest());
            }

            _context.Entry(mobileType).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!MobileTypeExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Exemple #7
0
 public HelicoidalTrace(MobileType mobileType, ShotType shotType, Color color, Projectile projectile)
     : base(mobileType, color, projectile)
 {
     this.mobileType = mobileType;
     leadTrace = SpawnFlipbook(mobileType, shotType, traceLeadAnimationInstance);
     leadTrace.Color = color;
     this.shotType = shotType;
 }
Exemple #8
0
        public Mobile(Player player, Vector2 position, MobileType mobileType, bool IsSummon = false) : base()
        {
            ProjectileList              = new List <Projectile>();
            UnusedProjectile            = new List <Projectile>();
            LastCreatedProjectileList   = new List <Projectile>();
            UninitializedProjectileList = new List <Projectile>();
            ItemsUnderEffectList        = new List <ItemType>();

            MobileType = mobileType;
            Owner      = player;

            movingSE       = AssetHandler.Instance.RequestSoundEffect(SoundEffectParameter.MobileMovement(mobileType));
            unableToMoveSE = AssetHandler.Instance.RequestSoundEffect(SoundEffectParameter.MobileUnableToMove(mobileType));

            this.IsSummon = IsSummon;

            IsPlayable = GameInformation.Instance.IsOwnedByPlayer(this) && !IsSummon;

            if (IsPlayable)
            {
                Movement = new LocalMovement(this);
            }
            else if (!IsSummon)
            {
                Movement = new RemoteMovement(this);
            }

            MobileMetadata = MobileMetadata.BuildMobileMetadata(player, mobileType);

            Position       = position;
            MobileFlipbook = MobileFlipbook.CreateMobileFlipbook(MobileType, position);

            if (!IsSummon)
            {
                Rider = new Rider(this);

                if (MobileType != MobileType.Random)
                {
                    Crosshair = new Crosshair(this);
                }
            }

            //Sync
            SyncMobile                = new SyncMobile();
            SyncMobile.Owner          = player;
            SyncMobile.Position       = Position.ToArray <int>();
            SyncMobile.MobileMetadata = MobileMetadata.BuildMobileMetadata(player, player.PrimaryMobile);
            SyncPosition              = Position;

            IsAlive                = true;
            IsActionsLocked        = false;
            hasShotSequenceStarted = false;

#if DEBUG
            DebugHandler.Instance.Add(debugCrosshair);
            DebugHandler.Instance.Add(debugCrosshair2);
#endif
        }
Exemple #9
0
        private MobileMetadata(Player player, MobileType mobileType, int baseHealth, int healthRegeneration, int healthRegenerationProtection, int baseShield, int shieldRegeneration)
        {
            MobileType                   = mobileType;
            CurrentHealth                = BaseHealth = (int)(baseHealth * (1 + player.Health / 100f));
            HealthRegeneration           = healthRegeneration;
            HealthRegenerationProtection = healthRegenerationProtection;

            CurrentShield      = BaseShield = baseShield;
            ShieldRegeneration = shieldRegeneration;
        }
Exemple #10
0
        public static IMobile CreateTestMobile(MobileType mobileType)
        {
            switch (mobileType)
            {
            case MobileType.Android:
                return(new AndroidPhone());

            case MobileType.IPhone:
                return(new IPhone());

            default:
                return(new NullPhone());
            }
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (MobileType != 0)
            {
                hash ^= MobileType.GetHashCode();
            }
            if (DeviceId.Length != 0)
            {
                hash ^= DeviceId.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (MobileType != 0)
            {
                hash ^= MobileType.GetHashCode();
            }
            if (CurVersion.Length != 0)
            {
                hash ^= CurVersion.GetHashCode();
            }
            return(hash);
        }
Exemple #13
0
        public static Mobile Create(MobileType type)
        {
            switch (type)
            {
            case MobileType.IPhone:
                return(new IPhone());

            case MobileType.Nokia:
                return(new Nokia());

            case MobileType.XiaoMi:
                return(new XiaoMi());

            default:
                throw new Exception("未知的手机品牌类别");
            }
        }
Exemple #14
0
        public static MobileMetadata BuildMobileMetadata(Player player, MobileType mobileType)
        {
            switch (mobileType)
            {
            case MobileType.Aduka:        return(new MobileMetadata(player, mobileType, 1000, 0, 35, 0, 0));

            case MobileType.Armor:        return(new MobileMetadata(player, mobileType, 1000, 0, 35, 0, 0));

            case MobileType.ASate:        return(new MobileMetadata(player, mobileType, 760, 0, 35, 220, 20));

            case MobileType.Bigfoot:      return(new MobileMetadata(player, mobileType, 1100, 0, 35, 0, 0));

            case MobileType.Boomer:       return(new MobileMetadata(player, mobileType, 1000, 10, 70, 0, 0));

            case MobileType.Dragon:       return(new MobileMetadata(player, mobileType, 1000, 10, 70, 0, 0));

            case MobileType.Grub:         return(new MobileMetadata(player, mobileType, 1000, 10, 70, 0, 0));

            case MobileType.Ice:          return(new MobileMetadata(player, mobileType, 1200, 10, 70, 0, 0));

            case MobileType.JD:           return(new MobileMetadata(player, mobileType, 750, 0, 35, 250, 20));

            case MobileType.JFrog:        return(new MobileMetadata(player, mobileType, 930, 10, 70, 0, 0));

            case MobileType.Kalsiddon:    return(new MobileMetadata(player, mobileType, 1100, 0, 35, 0, 0));

            case MobileType.Knight:       return(new MobileMetadata(player, mobileType, 1000, 0, 35, 0, 0));

            case MobileType.Lightning:    return(new MobileMetadata(player, mobileType, 760, 0, 35, 220, 20));

            case MobileType.Mage:         return(new MobileMetadata(player, mobileType, 760, 0, 35, 220, 20));

            case MobileType.Nak:          return(new MobileMetadata(player, mobileType, 1100, 0, 35, 0, 0));

            case MobileType.RaonLauncher: return(new MobileMetadata(player, mobileType, 1000, 0, 35, 0, 0));

            case MobileType.Trico:        return(new MobileMetadata(player, mobileType, 1100, 10, 70, 0, 0));

            case MobileType.Turtle:       return(new MobileMetadata(player, mobileType, 950, 10, 70, 0, 0));
            }

            return(null);
        }
Exemple #15
0
        public void UpdateMobilePortrait()
        {
            MobileStatus mS             = MobileMetadata.BestMobileStatus;
            MobileStatus selectedStatus = MobileMetadata.MobileStatusPresets[GameInformation.Instance.PlayerInformation.PrimaryMobile];

            //Max size = 110;
            mobilePortraitAtkBar.Scale = new Vector2(110 * selectedStatus.Attack / mS.Attack, 1);
            mobilePortraitDefBar.Scale = new Vector2(110 * selectedStatus.Defence / mS.Defence, 1);
            mobilePortraitMobBar.Scale = new Vector2(110 * selectedStatus.Mobility / mS.Mobility, 1);

            //UpdatePortrait
            MobileType mt = GameInformation.Instance.PlayerInformation.PrimaryMobile;

            if (!portraitPresets.ContainsKey(mt))
            {
                mt = MobileType.Random;
            }

            mobilePortrait.SourceRectangle = portraitPresets[mt];
        }
Exemple #16
0
        /// <summary>
        /// 接收用户请求的参数,并根据相应类进行检测
        /// </summary>
        /// <returns></returns>
        public override bool GetUrlElement()
        {
            ////if (actionGetter.GetString("UserName", ref UserName) &&
            ////    actionGetter.GetByte("Sex", ref Sex) &&
            ////    actionGetter.GetString("HeadID", ref HeadID) &&
            ////    actionGetter.GetString("RetailID", ref RetailID) &&
            ////    actionGetter.GetString("Pid", ref Pid, 1, int.MaxValue) &&
            ////    actionGetter.GetEnum("MobileType", ref MobileType)
            ////    )
            ////{
            ////    UserName = UserName.Trim();
            ////    actionGetter.GetWord("ScreenX", ref ScreenX);
            ////    actionGetter.GetWord("ScreenY", ref ScreenY);
            ////    actionGetter.GetWord("ClientAppVersion", ref ReqAppVersion);
            ////    actionGetter.GetString("DeviceID", ref DeviceID);
            ////    actionGetter.GetInt("GameID", ref GameID);
            ////    actionGetter.GetInt("ServerID", ref ServerID);
            ////    return GetActionParam();
            ////}
            string _dataEx = "";

            if (actionGetter.GetString("_dataEx", ref _dataEx))
            {
                cs_create1005 _tempdata = JsonUtils.Deserialize <cs_create1005>(_dataEx);
                _createData   = _tempdata;
                UserName      = _tempdata.roleName;
                ScreenX       = _tempdata.ScreenX;
                ScreenY       = _tempdata.ScreenY;
                ReqAppVersion = _tempdata.ClientAppVersion;
                DeviceID      = _tempdata.ServerID;
                GameID        = _tempdata.GameID;
                ServerID      = _tempdata.ServerID;
                _Sex          = _tempdata._Sex;
                HeadID        = _tempdata.HeadID;
                RetailID      = _tempdata.RetailID;
                Pid           = _tempdata.Pid;
                MobileType    = (MobileType)_tempdata.MobileType;
                return(GetActionParam());
            }
            return(false);
        }
Exemple #17
0
        public void OnCollision(Vector3 pForceVector, MobileType ptype)
        {
            m_rb.velocity = Vector3.zero;
            m_rb.AddForce(pForceVector);

            switch (ptype)
            {
            case MobileType.Enemy:
                m_material.color   = Color.red;
                m_trail.startColor = Color.red;
                break;

            case MobileType.Player:
                m_material.color   = Color.blue;
                m_trail.startColor = Color.blue;
                break;

            default:
                throw new ArgumentOutOfRangeException("ptype", ptype, null);
            }
        }
Exemple #18
0
        /// <summary>
        /// 获取短信内容实际产生总的短信条数
        /// </summary>
        /// <param name="smsContentSendComplete">要发送的完整的短信内容</param>
        /// <param name="smsType">短信号码类型</param>
        /// <returns></returns>
        private int GetSmsTotalCount(string smsContentSendComplete, MobileType smsType)
        {
            //1条短信所占的字符长度
            int oneSmsLength = 70;
            //总的实际短信条数
            int messageFaceCount = 1;

            switch (smsType)
            {
            case MobileType.Mobiel: oneSmsLength = 70; break;

            case MobileType.Phs: oneSmsLength = 45; break;
            }

            if (smsContentSendComplete.Length > oneSmsLength)
            {
                messageFaceCount = (smsContentSendComplete.Length + oneSmsLength - 1) / oneSmsLength;
            }

            return(messageFaceCount);
        }
Exemple #19
0
        private static void Run()
        {
            var mobileTypes = new MobileType[]
            {
                MobileType.Android,
                MobileType.IPhone,
                MobileType.WindowsPhone,
                MobileType.QNXPhone,
                MobileType.Other
            };

            foreach (var mobileType in mobileTypes)
            {
                var    mobile   = MobileFactory.CreateTestMobile(mobileType);
                string fileName = "This is a test file name for mms.";
                string message  = "This is a test message for sms.";

                mobile.SendMMS(fileName);
                mobile.SendSMS(message);
            }
        }
Exemple #20
0
        public static IMobile CreateMobile(MobileType type)
        {
            IMobile objIMobile = null;

            switch (type)
            {
            case MobileType.Samsung:
                objIMobile = new Samsung();
                return(objIMobile);

            case MobileType.Apple:
                objIMobile = new Apple();
                return(objIMobile);

            case MobileType.Nokia:
                objIMobile = new Nokia();
                return(objIMobile);

            default:
                return(null);
            }
        }
Exemple #21
0
        public void ButtonAction(object button)
        {
            MobileType mt = (MobileType)((Button)button).Tag;

            OnSelectMobile.Invoke(mt);

            //Button Animation triggering
            foreach (Button b in buttonList)
            {
                if (b.IsEnabled)
                {
                    b.IsActivated = false;
                    b.ChangeButtonState(ButtonAnimationState.Normal, true);
                }
            }

            ((Button)button).ChangeButtonState(ButtonAnimationState.Activated, true);

            //Button Actions - Status bars
            MobileStatus mobS = MobileMetadata.MobileStatusPresets[mt];

            spriteList[0].Scale = Vector2.One * new Vector2(200 * mobS.Attack / MobileMetadata.BestMobileStatus.Attack, 1);
            spriteList[1].Scale = Vector2.One * new Vector2(200 * mobS.Defence / MobileMetadata.BestMobileStatus.Defence, 1);
            spriteList[2].Scale = Vector2.One * new Vector2(200 * mobS.Delay / MobileMetadata.BestMobileStatus.Delay, 1);
            spriteList[3].Scale = Vector2.One * new Vector2(200 * mobS.Mobility / MobileMetadata.BestMobileStatus.Mobility, 1);

            //Text Updating
            portraitMobileName.Text = mt.ToString();

            if (!portraitPresets.ContainsKey(mt))
            {
                mt = MobileType.Random;
            }

            spriteList[4].SourceRectangle = portraitPresets[mt];

            GameInformation.Instance.PlayerInformation.PrimaryMobile = mt;
        }
Exemple #22
0
        public static Mobile BuildMobile(MobileType mobileType, Player player, Vector2 position, bool isInGame = true)
        {
            Mobile mobile = null;

            switch (mobileType)
            {
            case MobileType.Random:       mobile = new Random(player, position);       break;

            case MobileType.Armor:        mobile = new Armor(player, position);        break;

            case MobileType.Bigfoot:      mobile = new Bigfoot(player, position);      break;

            case MobileType.Dragon:       mobile = new Dragon(player, position);       break;

            case MobileType.Mage:         mobile = new Mage(player, position);         break;

            case MobileType.Ice:          mobile = new Ice(player, position);          break;

            case MobileType.Knight:       mobile = new Knight(player, position);       break;

            case MobileType.RaonLauncher: mobile = new RaonLauncher(player, position); break;

            case MobileType.Trico:        mobile = new Trico(player, position);        break;

            case MobileType.Turtle:       mobile = new Turtle(player, position);       break;

            case MobileType.Lightning:    mobile = new Lightning(player, position);    break;
            }

            if (isInGame)
            {
                mobile.HideLobbyExclusiveAvatars();
            }

            return(mobile);
        }
Exemple #23
0
        public static Mobile CreateMobileObject(MobileType mobileType)
        {
            Mobile objIMobile = null;

            switch (mobileType)
            {
            case MobileType.Samsung:
                objIMobile = new Samsung();
                break;

            case MobileType.Xiaomi:
                objIMobile = new Xiaomi();
                break;

            case MobileType.Apple:
                objIMobile = new Apple();
                break;

            default:
                return(null);
            }

            return(objIMobile);
        }
Exemple #24
0
 public static string MobileProjectileExplosion(MobileType mobileType, ShotType shotType) => $"Audio/SFX/Tank/Blast/{mobileType}{shotType}";
Exemple #25
0
 public Mobile(MobileBrand brand, MobileType type)
 {
     Brand = brand;
     Type = type;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ZyGames.Framework.Game.Sns.LoginUC"/> class.
 /// </summary>
 /// <param name="retailID">Retail I.</param>
 /// <param name="sid">Sid.</param>
 /// <param name="mobileType">Mobile type.</param>
 public LoginUC(string retailID, string sid, string mobileType)
 {
     this._retailID   = retailID;
     this._sessionID  = sid;
     this._mobileType = mobileType.ToEnum <MobileType>();
 }
Exemple #27
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ZyGames.Framework.Game.Sns.LoginUC"/> class.
 /// </summary>
 /// <param name="retailID">Retail I.</param>
 /// <param name="sid">Sid.</param>
 /// <param name="mobileType">Mobile type.</param>
 public LoginUC(string retailID, string sid, string mobileType)
 {
     this._retailID = retailID;
     this._sessionID = sid;
     this._mobileType = mobileType.ToEnum<MobileType>();
 }
Exemple #28
0
        protected override object this[string index]
        {
            get
            {
                #region
                switch (index)
                {
                case "ID": return(ID);

                case "SessionID": return(SessionID);

                case "MobileType": return(MobileType);

                case "ScreenX": return(ScreenX);

                case "ScreenY": return(ScreenY);

                case "RetailId": return(RetailId);

                case "Model": return(Model);

                case "NetWork": return(NetWork);

                case "UserId": return(UserId);

                case "AddTime": return(AddTime);

                case "State": return(State);

                case "DeviceID": return(DeviceID);

                case "Ip": return(Ip);

                case "Pid": return(Pid);

                case "UserLv": return(UserLv);

                case "PlotID": return(PlotID);

                case "PlotName": return(PlotName);

                default: throw new ArgumentException(string.Format("UserLoginLog index[{0}] isn't exist.", index));
                }
                #endregion
            }
            set
            {
                #region
                switch (index)
                {
                case "ID":
                    _ID = value.ToInt();
                    break;

                case "SessionID":
                    _SessionID = value.ToNotNullString();
                    break;

                case "MobileType":
                    _MobileType = value.ToEnum <MobileType>();
                    break;

                case "ScreenX":
                    _ScreenX = value.ToShort();
                    break;

                case "ScreenY":
                    _ScreenY = value.ToShort();
                    break;

                case "RetailId":
                    _RetailId = value.ToNotNullString();
                    break;

                case "Model":
                    _Model = value.ToNotNullString();
                    break;

                case "NetWork":
                    _NetWork = value.ToShort();
                    break;

                case "UserId":
                    _UserId = value.ToNotNullString();
                    break;

                case "AddTime":
                    _AddTime = value.ToDateTime();
                    break;

                case "State":
                    _State = value.ToEnum <LoginStatus>();
                    break;

                case "DeviceID":
                    _DeviceID = value.ToNotNullString();
                    break;

                case "Ip":
                    _Ip = value.ToNotNullString();
                    break;

                case "Pid":
                    _Pid = value.ToNotNullString();
                    break;

                case "UserLv":
                    _UserLv = value.ToShort();
                    break;

                case "PlotID":
                    _PlotID = value.ToInt();
                    break;

                case "PlotName":
                    _PlotName = value.ToNotNullString();
                    break;

                default: throw new ArgumentException(string.Format("UserLoginLog index[{0}] isn't exist.", index));
                }
                #endregion
            }
        }
Exemple #29
0
 protected override object this[string index]
 {
     get
     {
         #region
         switch (index)
         {
             case "ID": return ID;
             case "SessionID": return SessionID;
             case "MobileType": return MobileType;
             case "ScreenX": return ScreenX;
             case "ScreenY": return ScreenY;
             case "RetailId": return RetailId;
             case "Model": return Model;
             case "NetWork": return NetWork;
             case "UserId": return UserId;
             case "AddTime": return AddTime;
             case "State": return State;
             case "DeviceID": return DeviceID;
             case "Ip": return Ip;
             case "Pid": return Pid;
             case "UserLv": return UserLv;
             case "PlotID": return PlotID;
             case "PlotName": return PlotName;
             default: throw new ArgumentException(string.Format("UserLoginLog index[{0}] isn't exist.", index));
         }
         #endregion
     }
     set
     {
         #region
         switch (index)
         {
             case "ID":
                 _ID = value.ToInt();
                 break;
             case "SessionID":
                 _SessionID = value.ToNotNullString();
                 break;
             case "MobileType":
                 _MobileType = value.ToEnum<MobileType>();
                 break;
             case "ScreenX":
                 _ScreenX = value.ToShort();
                 break;
             case "ScreenY":
                 _ScreenY = value.ToShort();
                 break;
             case "RetailId":
                 _RetailId = value.ToNotNullString();
                 break;
             case "Model":
                 _Model = value.ToNotNullString();
                 break;
             case "NetWork":
                 _NetWork = value.ToShort();
                 break;
             case "UserId":
                 _UserId = value.ToNotNullString();
                 break;
             case "AddTime":
                 _AddTime = value.ToDateTime();
                 break;
             case "State":
                 _State = value.ToEnum<LoginStatus>();
                 break;
             case "DeviceID":
                 _DeviceID = value.ToNotNullString();
                 break;
             case "Ip":
                 _Ip = value.ToNotNullString();
                 break;
             case "Pid":
                 _Pid = value.ToNotNullString();
                 break;
             case "UserLv":
                 _UserLv = value.ToShort();
                 break;
             case "PlotID":
                 _PlotID = value.ToInt();
                 break;
             case "PlotName":
                 _PlotName = value.ToNotNullString();
                 break;
             default: throw new ArgumentException(string.Format("UserLoginLog index[{0}] isn't exist.", index));
         }
         #endregion
     }
 }
Exemple #30
0
 protected override object this[string index]
 {
     get
     {
         #region
         switch (index)
         {
             case "LogID": return LogID;
             case "RetailID": return RetailID;
             case "MobileType": return MobileType;
             case "Pid": return Pid;
             case "Uid": return Uid;
             case "ItemID": return ItemID;
             case "PropType": return PropType;
             case "ItemName": return ItemName;
             case "ItemNum": return ItemNum;
             case "Amount": return Amount;
             case "CreateDate": return CreateDate;
             default: throw new ArgumentException(string.Format("MallItemLog index[{0}] isn't exist.", index));
         }
         #endregion
     }
     set
     {
         #region
         switch (index)
         {
             case "LogID":
                 _LogID = value.ToInt();
                 break;
             case "RetailID":
                 _RetailID = value.ToNotNullString();
                 break;
             case "MobileType":
                 _MobileType = value.ToEnum<MobileType>();
                 break;
             case "Pid":
                 _Pid = value.ToNotNullString();
                 break;
             case "Uid":
                 _Uid = value.ToInt();
                 break;
             case "ItemID":
                 _ItemID = value.ToInt();
                 break;
             case "PropType":
                 _PropType = value.ToInt();
                 break;
             case "ItemName":
                 _ItemName = value.ToNotNullString();
                 break;
             case "ItemNum":
                 _ItemNum = value.ToInt();
                 break;
             case "Amount":
                 _Amount = value.ToInt();
                 break;
             case "CreateDate":
                 _CreateDate = value.ToDateTime();
                 break;
             default: throw new ArgumentException(string.Format("MallItemLog index[{0}] isn't exist.", index));
         }
         #endregion
     }
 }
Exemple #31
0
 protected override object this[string index]
 {
     get
     {
         #region
         switch (index)
         {
             case "ID": return _iD;
             case "ItemID": return _itemID;
             case "Uid": return _uid;
             case "Num": return _num;
             case "CurrencyType": return _currencyType;
             case "Amount": return _amount;
             case "CreateDate": return _createDate;
             case "RetailID": return _RetailID;
             case "MobileType": return _MobileType;
             case "Pid": return _Pid;
             case "ItemName": return _ItemName;
             default: throw new ArgumentException(string.Format("MallItemLog index[{0}] isn't exist.", index));
         }
         #endregion
     }
     set
     {
         #region
         switch (index)
         {
             case "ID":
                 _iD = MathUtils.ToLong(value);
                 break;
             case "ItemID":
                 _itemID = value.ToInt();
                 break;
             case "Uid":
                 _uid = value.ToInt();
                 break;
             case "Num":
                 _num = value.ToInt();
                 break;
             case "CurrencyType":
                 _currencyType = value.ToInt();
                 break;
             case "Amount":
                 _amount = value.ToInt();
                 break;
             case "CreateDate":
                 _createDate = value.ToDateTime();
                 break;
             case "RetailID":
                 _RetailID = value.ToNotNullString();
                 break;
             case "MobileType":
                 _MobileType = value.ToEnum<MobileType>();
                 break;
             case "Pid":
                 _Pid = value.ToNotNullString();
                 break;
             case "ItemName":
                 _ItemName = value.ToNotNullString();
                 break;
             default: throw new ArgumentException(string.Format("MallItemLog index[{0}] isn't exist.", index));
         }
         #endregion
     }
 }
Exemple #32
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ZyGames.Framework.Game.Sns.LoginUC"/> class.
 /// </summary>
 /// <param name="retailId">Retail id.</param>
 /// <param name="sessionId">Session id.</param>
 /// <param name="mobileType">Mobile type.</param>
 public LoginUC(string retailId, string sessionId, string mobileType) {
     this.retailId = retailId;
     this.sessionId = sessionId;
     this.mobileType = mobileType.ToEnum<MobileType>();
 }
Exemple #33
0
 //-- Projectile
 public static string MobileProjectileLaunch(MobileType mobileType, ShotType shotType) => $"Audio/SFX/Tank/Shoot/{mobileType}{shotType}";
Exemple #34
0
        protected override object this[string index]
        {
            get
            {
                #region
                switch (index)
                {
                case "LogID": return(LogID);

                case "RetailID": return(RetailID);

                case "MobileType": return(MobileType);

                case "Pid": return(Pid);

                case "Uid": return(Uid);

                case "ItemID": return(ItemID);

                case "PropType": return(PropType);

                case "ItemName": return(ItemName);

                case "ItemNum": return(ItemNum);

                case "Amount": return(Amount);

                case "CreateDate": return(CreateDate);

                default: throw new ArgumentException(string.Format("MallItemLog index[{0}] isn't exist.", index));
                }
                #endregion
            }
            set
            {
                #region
                switch (index)
                {
                case "LogID":
                    _LogID = value.ToInt();
                    break;

                case "RetailID":
                    _RetailID = value.ToNotNullString();
                    break;

                case "MobileType":
                    _MobileType = value.ToEnum <MobileType>();
                    break;

                case "Pid":
                    _Pid = value.ToNotNullString();
                    break;

                case "Uid":
                    _Uid = value.ToInt();
                    break;

                case "ItemID":
                    _ItemID = value.ToInt();
                    break;

                case "PropType":
                    _PropType = value.ToInt();
                    break;

                case "ItemName":
                    _ItemName = value.ToNotNullString();
                    break;

                case "ItemNum":
                    _ItemNum = value.ToInt();
                    break;

                case "Amount":
                    _Amount = value.ToInt();
                    break;

                case "CreateDate":
                    _CreateDate = value.ToDateTime();
                    break;

                default: throw new ArgumentException(string.Format("MallItemLog index[{0}] isn't exist.", index));
                }
                #endregion
            }
        }
Exemple #35
0
 protected override object this[string index]
 {
     get
     {
         #region
         switch (index)
         {
             case "UserID": return UserID;
             case "CountryID": return CountryID;
             case "CityID": return CityID;
             case "PointX": return PointX;
             case "PointY": return PointY;
             case "NickName": return NickName;
             case "Sex": return Sex;
             case "MercenariesID": return MercenariesID;
             case "UserLv": return UserLv;
             case "ObtainNum": return ObtainNum;
             case "EnergyNum": return EnergyNum;
             case "GiftGold": return GiftGold;
             case "PayGold": return PayGold;
             case "ItemGold": return ItemGold;
             case "UseGold": return UseGold;
             case "GameCoin": return GameCoin;
             case "ExpNum": return ExpNum;
             case "VipLv": return VipLv;
             case "UserStatus": return UserStatus;
             case "MsgState": return MsgState;
             case "GridNum": return GridNum;
             case "WarehouseNum": return WarehouseNum;
             case "CrystalNum": return CrystalNum;
             case "QueueNum": return QueueNum;
             case "UseMagicID": return UseMagicID;
             case "TaskProgress": return TaskProgress;
             case "PlotProgress": return PlotProgress;
             case "PlotCompleteDate": return PlotCompleteDate;
             case "RankID": return RankID;
             case "RetailID": return RetailID;
             case "Pid": return Pid;
             case "MobileType": return MobileType;
             case "ScreenX": return ScreenX;
             case "ScreenY": return ScreenY;
             case "ClientAppVersion": return ClientAppVersion;
             case "CreateDate": return CreateDate;
             case "UserLocation": return UserLocation;
             case "SweepPool": return SweepPool;
             case "ExtGold": return ExtGold;
             case "LoginTime": return LoginTime;
             case "SurplusEnergy": return SurplusEnergy;
             case "UserExtend": return UserExtend;
             case "SessionID": return SessionID;
             case "CardID": return CardID;
             case "CardTimes": return CardTimes;
             case "VictoryNum": return VictoryNum;
             case "CombatNum": return CombatNum;
             case "Leadership": return Leadership;
             case "AbilityExperienceNum": return AbilityExperienceNum;
             case "HonourNum": return HonourNum;
             case "SportsIntegral": return SportsIntegral;
             case "RankDate": return RankDate;
             case "IsLv": return IsLv;
             case "WizardDate": return WizardDate;
             case "WizardNum": return WizardNum;
             default: throw new ArgumentException(string.Format("GameUser index[{0}] isn't exist.", index));
         }
         #endregion
     }
     set
     {
         #region
         switch (index)
         {
             case "UserID":
                 _UserID = value.ToNotNullString();
                 break;
             case "CountryID":
                 _CountryID = value.ToEnum<CountryType>();
                 break;
             case "CityID":
                 _CityID = value.ToInt();
                 break;
             case "PointX":
                 _PointX = value.ToShort();
                 break;
             case "PointY":
                 _PointY = value.ToShort();
                 break;
             case "NickName":
                 _NickName = value.ToNotNullString();
                 break;
             case "Sex":
                 _Sex = value.ToBool();
                 break;
             case "MercenariesID":
                 _MercenariesID = value.ToNotNullString();
                 break;
             case "UserLv":
                 _UserLv = value.ToShort();
                 break;
             case "ObtainNum":
                 _ObtainNum = value.ToInt();
                 break;
             case "EnergyNum":
                 _EnergyNum = value.ToShort();
                 break;
             case "GiftGold":
                 _GiftGold = value.ToInt();
                 break;
             case "PayGold":
                 _PayGold = value.ToInt();
                 break;
             case "ItemGold":
                 _ItemGold = value.ToInt();
                 break;
             case "UseGold":
                 _UseGold = value.ToInt();
                 break;
             case "GameCoin":
                 _GameCoin = value.ToInt();
                 break;
             case "ExpNum":
                 _ExpNum = value.ToInt();
                 break;
             case "VipLv":
                 _VipLv = value.ToInt();
                 break;
             case "UserStatus":
                 _UserStatus = value.ToEnum<UserStatus>();
                 break;
             case "MsgState":
                 _MsgState = value.ToBool();
                 break;
             case "GridNum":
                 _GridNum = value.ToInt();
                 break;
             case "WarehouseNum":
                 _WarehouseNum = value.ToInt();
                 break;
             case "CrystalNum":
                 _CrystalNum = value.ToInt();
                 break;
             case "QueueNum":
                 _QueueNum = value.ToShort();
                 break;
             case "UseMagicID":
                 _UseMagicID = value.ToInt();
                 break;
             case "TaskProgress":
                 _TaskProgress = value.ToInt();
                 break;
             case "PlotProgress":
                 _PlotProgress = value.ToInt();
                 break;
             case "PlotCompleteDate":
                 _PlotCompleteDate = value.ToDateTime();
                 break;
             case "RankID":
                 _RankID = value.ToInt();
                 break;
             case "RetailID":
                 _RetailID = value.ToNotNullString();
                 break;
             case "Pid":
                 _Pid = value.ToNotNullString();
                 break;
             case "MobileType":
                 _MobileType = value.ToEnum<MobileType>();
                 break;
             case "ScreenX":
                 _ScreenX = value.ToShort();
                 break;
             case "ScreenY":
                 _ScreenY = value.ToShort();
                 break;
             case "ClientAppVersion":
                 _ClientAppVersion = value.ToShort();
                 break;
             case "CreateDate":
                 _CreateDate = value.ToDateTime();
                 break;
             case "UserLocation":
                 _UserLocation = value.ToEnum<Location>();
                 break;
             case "SweepPool":
                 _SweepPool = ConvertCustomField<SweepPoolInfo>(value, index);
                 break;
             case "ExtGold":
                 _ExtGold = value.ToInt();
                 break;
             case "LoginTime":
                 _LoginTime = value.ToDateTime();
                 break;
             case "SurplusEnergy":
                 _SurplusEnergy = value.ToShort();
                 break;
             case "UserExtend":
                 _UserExtend = ConvertCustomField<GameUserExtend>(value, index);
                 break;
             case "CardID":
                 _CardID = value.ToNotNullString();
                 break;
             case "CardTimes":
                 _CardTimes = value.ToInt();
                 break;
             case "VictoryNum":
                 _VictoryNum = value.ToInt();
                 break;
             case "CombatNum":
                 _CombatNum = value.ToInt();
                 break;
             case "Leadership":
                 _Leadership = value.ToInt();
                 break;
             case "AbilityExperienceNum":
                 _AbilityExperienceNum = value.ToInt();
                 break;
             case "HonourNum":
                 _HonourNum = value.ToInt();
                 break;
             case "IsLv":
                 _IsLv = value.ToBool();
                 break;
             case "SportsIntegral":
                 _SportsIntegral = value.ToDecimal();
                 break;
             case "RankDate":
                 _RankDate = value.ToDateTime();
                 break;
             case "WizardDate":
                 _WizardDate = value.ToDateTime();
                 break;
             case "WizardNum":
                 _WizardNum = value.ToInt();
                 break;
             default: throw new ArgumentException(string.Format("GameUser index[{0}] isn't exist.", index));
         }
         #endregion
     }
 }
Exemple #36
0
 protected override object this[string index]
 {
     get
     {
         #region
         switch (index)
         {
             case "UserId": return _userId;
             case "Pid": return _pid;
             case "NickName": return _nickName;
             case "HeadIcon": return _headIcon;
             case "Sex": return _sex;
             case "RetailId": return _retailId;
             case "PayGold": return _payGold;
             case "GiftGold": return _giftGold;
             case "ExtGold": return _extGold;
             case "UseGold": return _useGold;
             case "GameCoin": return _gameCoin;
             case "UserLv": return _userLv;
             case "VipLv": return _vipLv;
             case "RankId": return _rankId;
             case "UserStatus": return _userStatus;
             case "MsgState": return _msgState;
             case "MobileType": return _mobileType;
             case "ScreenX": return _screenX;
             case "ScreenY": return _screenY;
             case "ClientAppVersion": return _clientAppVersion;
             case "CreateDate": return _createDate;
             case "LoginDate": return _loginDate;
             case "LastLoginDate": return _lastLoginDate;
             case "WinNum": return _winNum;
             case "FailNum": return _failNum;
             case "ScoreNum": return _scoreNum;
             case "TitleId": return _titleId;
             case "RealName": return _realName;
             case "Birthday": return _birthday;
             case "Hobby": return _hobby;
             case "Profession": return _profession;
             default: throw new ArgumentException(string.Format("GameUser index[{0}] isn't exist.", index));
         }
         #endregion
     }
     set
     {
         #region
         switch (index)
         {
             case "UserId":
                 _userId = value.ToInt();
                 break;
             case "Pid":
                 _pid = value.ToNotNullString();
                 break;
             case "NickName":
                 _nickName = value.ToNotNullString();
                 break;
             case "HeadIcon":
                 _headIcon = value.ToNotNullString();
                 break;
             case "Sex":
                 _sex = value.ToBool();
                 break;
             case "RetailId":
                 _retailId = value.ToNotNullString();
                 break;
             case "PayGold":
                 _payGold = value.ToInt();
                 break;
             case "GiftGold":
                 _giftGold = value.ToInt();
                 break;
             case "ExtGold":
                 _extGold = value.ToInt();
                 break;
             case "UseGold":
                 _useGold = value.ToInt();
                 break;
             case "GameCoin":
                 _gameCoin = value.ToInt();
                 break;
             case "UserLv":
                 _userLv = value.ToShort();
                 break;
             case "VipLv":
                 _vipLv = value.ToInt();
                 break;
             case "RankId":
                 _rankId = value.ToInt();
                 break;
             case "UserStatus":
                 _userStatus = value.ToEnum<UserStatus>();
                 break;
             case "MsgState":
                 _msgState = value.ToBool();
                 break;
             case "MobileType":
                 _mobileType = value.ToEnum<MobileType>();
                 break;
             case "ScreenX":
                 _screenX = value.ToShort();
                 break;
             case "ScreenY":
                 _screenY = value.ToShort();
                 break;
             case "ClientAppVersion":
                 _clientAppVersion = value.ToShort();
                 break;
             case "CreateDate":
                 _createDate = value.ToDateTime();
                 break;
             case "LoginDate":
                 _loginDate = value.ToDateTime();
                 break;
             case "LastLoginDate":
                 _lastLoginDate = value.ToDateTime();
                 break;
             case "WinNum":
                 _winNum = value.ToInt();
                 break;
             case "FailNum":
                 _failNum = value.ToInt();
                 break;
             case "ScoreNum":
                 _scoreNum = value.ToInt();
                 break;
             case "TitleId":
                 _titleId = value.ToInt();
                 break;
             case "RealName":
                 _realName = value.ToNotNullString();
                 break;
             case "Birthday":
                 _birthday = value.ToDateTime();
                 break;
             case "Hobby":
                 _hobby = value.ToNotNullString();
                 break;
             case "Profession":
                 _profession = value.ToNotNullString();
                 break;
             default: throw new ArgumentException(string.Format("GameUser index[{0}] isn't exist.", index));
         }
         #endregion
     }
 }
Exemple #37
0
        protected override object this[string index]
        {
            get
            {
                #region
                switch (index)
                {
                case "UserId": return(_userId);

                case "Pid": return(_pid);

                case "NickName": return(_nickName);

                case "HeadIcon": return(_headIcon);

                case "Sex": return(_sex);

                case "RetailId": return(_retailId);

                case "PayGold": return(_payGold);

                case "GiftGold": return(_giftGold);

                case "ExtGold": return(_extGold);

                case "UseGold": return(_useGold);

                case "GameCoin": return(_gameCoin);

                case "UserLv": return(_userLv);

                case "VipLv": return(_vipLv);

                case "RankId": return(_rankId);

                case "UserStatus": return(_userStatus);

                case "MsgState": return(_msgState);

                case "MobileType": return(_mobileType);

                case "ScreenX": return(_screenX);

                case "ScreenY": return(_screenY);

                case "ClientAppVersion": return(_clientAppVersion);

                case "CreateDate": return(_createDate);

                case "LoginDate": return(_loginDate);

                case "LastLoginDate": return(_lastLoginDate);

                case "WinNum": return(_winNum);

                case "FailNum": return(_failNum);

                case "ScoreNum": return(_scoreNum);

                case "TitleId": return(_titleId);

                case "RealName": return(_realName);

                case "Birthday": return(_birthday);

                case "Hobby": return(_hobby);

                case "Profession": return(_profession);

                default: throw new ArgumentException(string.Format("GameUser index[{0}] isn't exist.", index));
                }
                #endregion
            }
            set
            {
                #region
                switch (index)
                {
                case "UserId":
                    _userId = value.ToInt();
                    break;

                case "Pid":
                    _pid = value.ToNotNullString();
                    break;

                case "NickName":
                    _nickName = value.ToNotNullString();
                    break;

                case "HeadIcon":
                    _headIcon = value.ToNotNullString();
                    break;

                case "Sex":
                    _sex = value.ToBool();
                    break;

                case "RetailId":
                    _retailId = value.ToNotNullString();
                    break;

                case "PayGold":
                    _payGold = value.ToInt();
                    break;

                case "GiftGold":
                    _giftGold = value.ToInt();
                    break;

                case "ExtGold":
                    _extGold = value.ToInt();
                    break;

                case "UseGold":
                    _useGold = value.ToInt();
                    break;

                case "GameCoin":
                    _gameCoin = value.ToInt();
                    break;

                case "UserLv":
                    _userLv = value.ToShort();
                    break;

                case "VipLv":
                    _vipLv = value.ToInt();
                    break;

                case "RankId":
                    _rankId = value.ToInt();
                    break;

                case "UserStatus":
                    _userStatus = value.ToEnum <UserStatus>();
                    break;

                case "MsgState":
                    _msgState = value.ToBool();
                    break;

                case "MobileType":
                    _mobileType = value.ToEnum <MobileType>();
                    break;

                case "ScreenX":
                    _screenX = value.ToShort();
                    break;

                case "ScreenY":
                    _screenY = value.ToShort();
                    break;

                case "ClientAppVersion":
                    _clientAppVersion = value.ToShort();
                    break;

                case "CreateDate":
                    _createDate = value.ToDateTime();
                    break;

                case "LoginDate":
                    _loginDate = value.ToDateTime();
                    break;

                case "LastLoginDate":
                    _lastLoginDate = value.ToDateTime();
                    break;

                case "WinNum":
                    _winNum = value.ToInt();
                    break;

                case "FailNum":
                    _failNum = value.ToInt();
                    break;

                case "ScoreNum":
                    _scoreNum = value.ToInt();
                    break;

                case "TitleId":
                    _titleId = value.ToInt();
                    break;

                case "RealName":
                    _realName = value.ToNotNullString();
                    break;

                case "Birthday":
                    _birthday = value.ToDateTime();
                    break;

                case "Hobby":
                    _hobby = value.ToNotNullString();
                    break;

                case "Profession":
                    _profession = value.ToNotNullString();
                    break;

                default: throw new ArgumentException(string.Format("GameUser index[{0}] isn't exist.", index));
                }
                #endregion
            }
        }
 public void Start(int needCount)
 {
     this.ptType = XmlConfig <SeleniumConfig> .Current.PhonePtType;
     ThreadPoolX.QueueUserWorkItem <int>(new Action <int>(this.Process), needCount);
 }