コード例 #1
0
 protected override void ParseData(Dictionary <string, object> dic)
 {
     YxTools.TryGetValueWitheKey(dic, out _replayId, KeyReplayId);
     YxTools.TryGetValueWitheKey(dic, out _userInfoHeads, KeyHeads);
     YxTools.TryGetValueWitheKey(dic, out _createTime, KeyTime);
     YxTools.TryGetValueWitheKey(dic, out _url, KeyUrl);
 }
コード例 #2
0
        protected virtual void TryGetDic(Dictionary <string, object> dic)
        {
            Dictionary <string, object> dataDic;

            YxTools.TryGetValueWitheKey(dic, out dataDic, KeyData);
            Dic = GetDatas(dataDic);
        }
コード例 #3
0
        protected virtual void TryGetList(Dictionary <string, object> dic)
        {
            List <object> list;

            YxTools.TryGetValueWitheKey(dic, out list, KeyData);
            Items = GetDatas(list);
        }
コード例 #4
0
 protected override void ParseData(Dictionary <string, object> dic)
 {
     YxTools.TryGetValueWitheKey(dic, out _title, KeyTitle);
     YxTools.TryGetValueWitheKey(dic, out _time, KeyTime);
     YxTools.TryGetValueWitheKey(dic, out _mailId, KeyId);
     YxTools.TryGetValueWitheKey(dic, out _status, KeyStatus);
 }
コード例 #5
0
 protected override void ParseData(Dictionary <string, object> dic)
 {
     base.ParseData(dic);
     YxTools.TryGetValueWitheKey(dic, out _dataCount, KeyCount);
     YxTools.TryGetValueWitheKey(dic, out _pageCount, KeyPageCount);
     YxTools.TryGetValueWitheKey(dic, out _pageNum, KeyPageNumber);
     YxTools.TryGetValueWitheKey(dic, out _totalCount, KeyTotalCount);
 }
コード例 #6
0
 protected override void ParseData(Dictionary <string, object> dic)
 {
     YxTools.TryGetValueWitheKey(dic, out _status, KeyStatus);
     YxTools.TryGetValueWitheKey(dic, out _content, KeyContent);
     YxTools.TryGetValueWitheKey(dic, out _mid, KeyMid);
     YxTools.TryGetValueWitheKey(dic, out _title, KeyTitle);
     YxTools.TryGetValueWitheKey(dic, out _sender, KeySender);
     YxTools.TryGetValueWitheKey(dic, out _time, KeyCreateTime);
 }
コード例 #7
0
ファイル: MatchItem.cs プロジェクト: narakai/chessgame
 protected override void ParseData(Dictionary <string, object> dic)
 {
     base.ParseData(dic);
     YxTools.TryGetValueWitheKey(dic, out _selfInfo, _keySelf);
     if (dic.ContainsKey(_keyStatus))
     {
         _status = (EnumMatchState)Enum.Parse(typeof(EnumMatchState), dic[_keyStatus].ToString());
     }
 }
コード例 #8
0
 protected override void TryGetList(Dictionary <string, object> dic)
 {
     base.TryGetList(dic);
     if (dic.ContainsKey(_keyDetail))
     {
         List <object> list;
         YxTools.TryGetValueWitheKey(dic, out list, _keyDetail);
         Items = GetDatas(list);
     }
 }
コード例 #9
0
 protected override void OnFreshView()
 {
     if (Data == null)
     {
         return;
     }
     if (Data is Dictionary <string, object> )
     {
         var  dics = Data as Dictionary <string, object>;
         long coin_t;
         YxTools.TryGetValueWitheKey(dics, out coin_t, KeyCoinT);
         YxTools.TrySetComponentValue(CoinTLabel, coin_t.ToString());
         YxTools.TrySetComponentValue(CoinALabel, YxUtiles.GetShowNumber(UserInfoModel.Instance.UserInfo.CoinA).ToString());
     }
 }
コード例 #10
0
ファイル: WebViewWindow.cs プロジェクト: xinrui5577/roomgame
        public WebData(object mes)
        {
            var           dic = (Dictionary <string, object>)mes;
            List <object> datas;

            YxTools.TryGetValueWitheKey(dic, out datas, _keyData);
            YxTools.TryGetValueWitheKey(dic, out _fullScreen, _keyFullScreen);
            YxTools.TryGetValueWitheKey(dic, out _cleanCache, _keyCleanCache);
            foreach (var item in datas)
            {
                var     itemData = (Dictionary <string, object>)item;
                TabData tabData  = new TabData()
                {
                    Name = itemData[_keyName].ToString(),
                    Data = itemData[_keyUrl].ToString()
                };
                _datas.Add(tabData);
            }
        }
コード例 #11
0
ファイル: MatchItem.cs プロジェクト: xinrui5577/roomgame
        protected override void ParseData(Dictionary <string, object> dic)
        {
            base.ParseData(dic);
            YxTools.TryGetValueWitheKey(dic, out _id, KeyId);
            YxTools.TryGetValueWitheKey(dic, out _title, KeyTitle);
            YxTools.TryGetValueWitheKey(dic, out _startTime, KeyStartTime);
            YxTools.TryGetValueWitheKey(dic, out _endTime, KeyEndTime);
            YxTools.TryGetValueWitheKey(dic, out _gameKey, KeyGameKey);
            YxTools.TryGetValueWitheKey(dic, out _gameType, KeyGameType);
            YxTools.TryGetValueWitheKey(dic, out _maxValue, KeyGameMaxValue);
            YxTools.TryGetValueWitheKey(dic, out _minVlaue, KeyGameMinValue);
            var status = 0;

            YxTools.TryGetValueWitheKey(dic, out status, KeyStatus);
            _state = (EnumMatchState)status;
            var costType = "";

            YxTools.TryGetValueWitheKey(dic, out costType, KeyGameCostType);
            _costType = YxTools.GetCostTypeByString(costType);
        }
コード例 #12
0
        protected override void OnFreshView()
        {
            base.OnFreshView();
            var data = Data as Dictionary <string, object>;

            if (data == null)
            {
                return;
            }
            int type;

            YxTools.TryGetValueWitheKey(data, out type, _keyType);
            long coin;

            YxTools.TryGetValueWitheKey(data, out coin, "coin_num_a");
            var tempFormat = type > 0? "玩家【{0}】赠送给您":"您赠送给玩家【{0}】";

            LogLabel.text  = string.Format(tempFormat, data["nick_m"]);
            DateLabel.text = data["create_dt"].ToString();
            YxTools.TrySetComponentValue(CoinLabel, string.Format("x{0}金币", coin));
            YxTools.TrySetComponentValue(CoinLabelAdapter, coin, "1", "x{0}金币");
        }
コード例 #13
0
 protected override void ParseData(Dictionary <string, object> dic)
 {
     YxTools.TryGetValueWitheKey(dic, out _roomId, KeyRoomId);
     YxTools.TryGetValueWitheKey(dic, out _createTime, KeyCreateTime);
     YxTools.TryGetValueWitheKey(dic, out _headDatas, KeyOverInfo);
     YxTools.TryGetValueWitheKey(dic, out _detailRoundNum, KeyRound);
     YxTools.TryGetValueWitheKey(dic, out _functionName, KeyFunction);
     YxTools.TryGetValueWitheKey(dic, out _gamekey, KeyGameKey);
     YxTools.TryGetValueWitheKey(dic, out _gameName, KeyGameName);
     if (dic.ContainsKey(KeyPlayBack))
     {
         YxDebug.LogError("存在回放标识");
         var success = int.TryParse(dic[KeyPlayBack].ToString(), out _playBack);
         if (!success)
         {
             _playBack = 1;
         }
     }
     else
     {
         _playBack = 1;
     }
 }
コード例 #14
0
 protected override void ParseData(Dictionary <string, object> dic)
 {
     YxTools.TryGetValueWitheKey(dic, out _platformType, KeyType);
     YxTools.TryGetValueWitheKey(dic, out _costType, KeyCostType);
     YxTools.TryGetValueWitheKey(dic, out _rate, KeyRate);
 }
コード例 #15
0
 protected override void ParseData(Dictionary <string, object> dic)
 {
     base.ParseData(dic);
     YxTools.TryGetValueWitheKey(dic, out _roomId, _keyRoomId);
     YxTools.TryGetValueWitheKey(dic, out _webHost, _keyWebHost);
 }
コード例 #16
0
ファイル: BankExtractView.cs プロジェクト: narakai/chessgame
 protected override void ParseData(Dictionary <string, object> dic)
 {
     YxTools.TryGetValueWitheKey(dic, out _platformType, KeyType);
     YxTools.TryGetValueWitheKey(dic, out _bindAccount, KeyAccount);
     YxTools.TryGetValueWitheKey(dic, out _phoneNumber, KeyPhone);
 }
コード例 #17
0
 protected override void ParseData(Dictionary <string, object> dic)
 {
     base.ParseData(dic);
     YxTools.TryGetValueWitheKey(dic, out _visible, KeyVissible);
 }