/// <summary> /// 消耗显示处理 /// </summary> /// <param name="roomData"></param> private void CostShow(RoomInfoData roomData) { if (CostContainer) { bool showState = false; EnumCostType costtype = (EnumCostType)Enum.Parse(typeof(EnumCostType), roomData.GoldType); if (costtype != null) { if (costtype != EnumCostType.TempCoin) { showState = true; CostContainer.SetActive(true); if (GoldMin) { GoldMin.text = string.Format(MinLabelForMat, roomData.GoldMin); } if (GoldMax) { GoldMax.text = roomData.GoldMax.ToString(); } if (Goldtype) { Goldtype.spriteName = roomData.GoldType; } } } CostContainer.SetActive(showState); } }
public EnumCostType GetEnumCostType() { EnumCostType costType = EnumCostType.其他; string sValue = hdCostType.Value; if (!string.IsNullOrEmpty(sValue)) { costType = (EnumCostType)Enum.Parse(typeof(EnumCostType), sValue); } return(costType); }
private void OnOpenQuickGame() { var userInfo = UserInfoModel.Instance.UserInfo; EnumCostType costType = _curData.CostType; var maxCost = _curData.MaxValue; var minCost = _curData.MinVlaue; double haveValue = 0; string costName = ""; if (maxCost > 0) { switch (costType) { case EnumCostType.Cash: haveValue = userInfo.CashA; costName = CashName; break; case EnumCostType.Gold: haveValue = YxUtiles.GetShowNumber(userInfo.CoinA + userInfo.BankCoin); costName = GoldName; break; case EnumCostType.TempCoin: haveValue = int.MaxValue; break; case EnumCostType.GroupCoin: costName = GroupCoinName; haveValue = int.MaxValue; break; default: haveValue = int.MaxValue; break; } if (minCost > haveValue) { YxMessageBox.Show(string.Format(LowerLimitNotice, minCost, costName, haveValue)); return; } if (maxCost < haveValue) { YxMessageBox.Show(string.Format(UpperLimitNotice, minCost, costName, haveValue)); return; } } RoomUnitModel model = new RoomUnitModel(null); model.TypeId = _curData.GameType.ToString(); model.GameKey = _curData.GameKey; RoomListController.Instance.OnDirectGame(model); }
protected override void ParseData(Dictionary <string, object> dic) { base.ParseData(dic); dic.TryGetValueWitheKey(out _id, KeyId); dic.TryGetValueWitheKey(out _title, KeyTitle); dic.TryGetValueWitheKey(out _startTime, KeyStartTime); dic.TryGetValueWitheKey(out _endTime, KeyEndTime); dic.TryGetValueWitheKey(out _gameKey, KeyGameKey); dic.TryGetValueWitheKey(out _gameType, KeyGameType); dic.TryGetValueWitheKey(out _maxValue, KeyGameMaxValue); dic.TryGetValueWitheKey(out _minVlaue, KeyGameMinValue); var status = 0; dic.TryGetValueWitheKey(out status, KeyStatus); _state = (EnumMatchState)status; var costType = ""; dic.TryGetValueWitheKey(out costType, KeyGameCostType); _costType = YxTools.GetCostTypeByString(costType); }
static JDFAutoMISDetails() { atrInfoTable[0] = new AtrInfoTable(AttributeName.COSTTYPE, 0x33333311, AttributeInfo.EnumAttributeType.enumeration, EnumCostType.getEnum(0), null); atrInfoTable[1] = new AtrInfoTable(AttributeName.DEVICEOPERATIONMODE, 0x33333311, AttributeInfo.EnumAttributeType.enumeration, EnumDeviceOperationMode.getEnum(0), null); atrInfoTable[2] = new AtrInfoTable(AttributeName.WORKTYPE, 0x33333311, AttributeInfo.EnumAttributeType.enumeration, EnumWorkType.getEnum(0), null); atrInfoTable[3] = new AtrInfoTable(AttributeName.WORKTYPEDETAILS, 0x33333311, AttributeInfo.EnumAttributeType.string_, null, null); }
/// /// <summary> * (9) get attribute CostType </summary> /// * <returns> the value of the attribute </returns> /// public virtual EnumCostType getCostType() { return(EnumCostType.getEnum(getAttribute(AttributeName.COSTTYPE, null, null))); }
// ************************************************************************ // * Attribute getter / setter // * ************************************************************************ // // --------------------------------------------------------------------- // Methods for Attribute CostType // --------------------------------------------------------------------- /// /// <summary> * (5) set attribute CostType </summary> /// * <param name="enumVar">: the enumVar to set the attribute to </param> /// public virtual void setCostType(EnumCostType enumVar) { setAttribute(AttributeName.COSTTYPE, enumVar == null ? null : enumVar.getName(), null); }