void PlayPlot() { int iterN = GetIterN(); _Closing = false; if (iterN >= maxIter) { return; } PlotStatusN = PlotStatus.Play; UpdatePlotControls(); for (int iter = iterN; iter < maxIter; iter++) { if (_Closing) { _Closing = false; return; } PlotSwarmIter_Point(); PauseForMilliSeconds(Math.Max((Math.Min((maxIter - iter) / maxSwarm, 70)), 30)); } PlotStatusN = PlotStatus.Pause; UpdatePlotControls(); }
protected override object this[string index] { get { #region switch (index) { case "UserID": return UserID; case "PlotID": return PlotID; case "PlotStatus": return PlotStatus; case "ScoreNum": return ScoreNum; case "AttackScore": return AttackScore; case "DefenseScore": return DefenseScore; case "StarScore": return StarScore; case "ExpNum": return ExpNum; case "Experience": return Experience; case "PennyNum": return PennyNum; case "GoldNum": return GoldNum; case "ItemID": return ItemID; case "CompleteDate": return CompleteDate; case "RefleshDate": return RefleshDate; case "CreateDate": return CreateDate; case "BlessPennyNum": return BlessPennyNum; case "BlessExperience": return BlessExperience; case "EnchantID": return EnchantID; case "PlotSuccessType": return EnchantID; case "PlotFailureType": return EnchantID; case "HonourNum": return HonourNum; case "ItemList": return ItemList; case "PlotNum": return PlotNum; default: throw new ArgumentException(string.Format("UserPlot index[{0}] isn't exist.", index)); } #endregion } set { #region switch (index) { case "UserID": _UserID = value.ToNotNullString(); break; case "PlotID": _PlotID = value.ToInt(); break; case "PlotStatus": _PlotStatus = value.ToEnum<PlotStatus>(); break; case "ScoreNum": _ScoreNum = value.ToShort(); break; case "AttackScore": _AttackScore = value.ToShort(); break; case "DefenseScore": _DefenseScore = value.ToShort(); break; case "StarScore": _StarScore = value.ToShort(); break; case "ExpNum": _ExpNum = value.ToInt(); break; case "Experience": _Experience = value.ToInt(); break; case "PennyNum": _PennyNum = value.ToInt(); break; case "GoldNum": _GoldNum = value.ToInt(); break; case "ItemID": _ItemID = value.ToInt(); break; case "CompleteDate": _CompleteDate = value.ToDateTime(); break; case "RefleshDate": _RefleshDate = value.ToDateTime(); break; case "CreateDate": _CreateDate = value.ToDateTime(); break; case "BlessPennyNum": _BlessPennyNum = value.ToInt(); break; case "BlessExperience": _BlessExperience = value.ToInt(); break; case "EnchantID": _EnchantID = value.ToInt(); break; case "PlotSuccessType": _PlotSuccessType = value.ToEnum<PlotSuccessType>(); break; case "PlotFailureType": _PlotFailureType = value.ToEnum<PlotFailureType>(); break; case "HonourNum": _HonourNum = value.ToInt(); break; case "ItemList": _ItemList = ConvertCustomField<CacheList<UniversalInfo>>(value, index); break; case "PlotNum": _PlotNum = value.ToInt(); break; default: throw new ArgumentException(string.Format("UserPlot index[{0}] isn't exist.", index)); } #endregion } }
private void btnPause_Click(object sender, EventArgs e) { PlotStatusN = PlotStatus.Pause; UpdatePlotControls(); _Closing = true; }
protected override object this[string index] { get { #region switch (index) { case "UserID": return(UserID); case "PlotID": return(PlotID); case "PlotStatus": return(PlotStatus); case "ScoreNum": return(ScoreNum); case "AttackScore": return(AttackScore); case "DefenseScore": return(DefenseScore); case "StarScore": return(StarScore); case "ExpNum": return(ExpNum); case "Experience": return(Experience); case "PennyNum": return(PennyNum); case "GoldNum": return(GoldNum); case "ItemID": return(ItemID); case "CompleteDate": return(CompleteDate); case "RefleshDate": return(RefleshDate); case "CreateDate": return(CreateDate); case "BlessPennyNum": return(BlessPennyNum); case "BlessExperience": return(BlessExperience); case "EnchantID": return(EnchantID); case "PlotSuccessType": return(EnchantID); case "PlotFailureType": return(EnchantID); case "HonourNum": return(HonourNum); case "ItemList": return(ItemList); case "PlotNum": return(PlotNum); default: throw new ArgumentException(string.Format("UserPlot index[{0}] isn't exist.", index)); } #endregion } set { #region switch (index) { case "UserID": _UserID = value.ToNotNullString(); break; case "PlotID": _PlotID = value.ToInt(); break; case "PlotStatus": _PlotStatus = value.ToEnum <PlotStatus>(); break; case "ScoreNum": _ScoreNum = value.ToShort(); break; case "AttackScore": _AttackScore = value.ToShort(); break; case "DefenseScore": _DefenseScore = value.ToShort(); break; case "StarScore": _StarScore = value.ToShort(); break; case "ExpNum": _ExpNum = value.ToInt(); break; case "Experience": _Experience = value.ToInt(); break; case "PennyNum": _PennyNum = value.ToInt(); break; case "GoldNum": _GoldNum = value.ToInt(); break; case "ItemID": _ItemID = value.ToInt(); break; case "CompleteDate": _CompleteDate = value.ToDateTime(); break; case "RefleshDate": _RefleshDate = value.ToDateTime(); break; case "CreateDate": _CreateDate = value.ToDateTime(); break; case "BlessPennyNum": _BlessPennyNum = value.ToInt(); break; case "BlessExperience": _BlessExperience = value.ToInt(); break; case "EnchantID": _EnchantID = value.ToInt(); break; case "PlotSuccessType": _PlotSuccessType = value.ToEnum <PlotSuccessType>(); break; case "PlotFailureType": _PlotFailureType = value.ToEnum <PlotFailureType>(); break; case "HonourNum": _HonourNum = value.ToInt(); break; case "ItemList": _ItemList = ConvertCustomField <CacheList <UniversalInfo> >(value, index); break; case "PlotNum": _PlotNum = value.ToInt(); break; default: throw new ArgumentException(string.Format("UserPlot index[{0}] isn't exist.", index)); } #endregion } }