public static void SetPara(Dictionary <string, string> dicPara) { foreach (KeyValuePair <string, string> pair in dicPara) { Logger.d("key " + pair.Key + ": " + pair.Value); } if (dicPara.ContainsKey("sOpenId")) { user.strOpenId = dicPara["sOpenId"]; } if (dicPara.ContainsKey("sServiceType")) { user.sServiceType = dicPara["sServiceType"]; } if (dicPara.ContainsKey("sAcountType")) { user.acctype = dicPara["sAcountType"]; } if (dicPara.ContainsKey("sArea")) { user.strArea = dicPara["sArea"]; } if (dicPara.ContainsKey("sPartition")) { user.sPartition = dicPara["sPartition"]; user.pay_zone = dicPara["sPartition"]; } if (dicPara.ContainsKey("sAppId")) { user.strAppid = dicPara["sAppId"]; } if (dicPara.ContainsKey("sAppId")) { user.strAppid = dicPara["sAppId"]; } if (dicPara.ContainsKey("sRoleId")) { user.strRoleId = dicPara["sRoleId"]; } if (dicPara.ContainsKey("sAccessToken")) { user.sAccessToken = dicPara["sAccessToken"]; } if (dicPara.ContainsKey("sPayToken")) { user.pay_token = dicPara["sPayToken"]; } if (dicPara.ContainsKey("sGameVer")) { user.gameVer = dicPara["sGameVer"]; } if (dicPara.ContainsKey("sPlatID")) { user.platid = dicPara["sPlatID"]; } if (dicPara.ContainsKey("sQQInstalled")) { user.sQQInstalled = dicPara["sQQInstalled"]; } if (dicPara.ContainsKey("sWXInstalled")) { user.sWXInstalled = dicPara["sWXInstalled"]; } if (dicPara.ContainsKey("sGameName")) { user.sGameName = dicPara["sGameName"]; } }
public static void SendPandoraLibCmd(int iCmdId, string sData, int iLength, int iFlag) { Logger.d("enter C# SendPandoraLibCmd"); SendPdrLibCmd(iCmdId, sData, iLength, iFlag); }
public void midaspayCallBack(string callback) { Logger.d("XXXXXXXXXX midaspayCallBack:" + callback); listInfoSO.Enqueue(new infoFromSo(callback, callback.Length, 9)); }
public static int PraseConnect(string strContent, int iLen, int iFlag) { try { Dictionary <string, object> dictionary = Json.Deserialize(strContent) as Dictionary <string, object>; if (dictionary.ContainsKey("iPdrLibRet")) { int num = Convert.ToInt32(dictionary["iPdrLibRet"] as string); int num2 = -1; if (dictionary.ContainsKey("ret")) { num2 = Convert.ToInt32(dictionary["ret"] as string); } if (num == 0) { strCloudConfigInfo = strContent; if (dictionary.ContainsKey("isDebug")) { string str = dictionary["isDebug"] as string; if (str.Equals("1")) { Logger.INEED_LOG_TEXT = 1; } else { Logger.INEED_LOG_TEXT = 0; } } if (dictionary.ContainsKey("log_level")) { string s = dictionary["log_level"] as string; int result = 0; int.TryParse(s, out result); Logger.LOG_LEVEL = result; } if (dictionary.ContainsKey("isNetLog")) { string str3 = dictionary["isNetLog"] as string; if (str3 == "1") { Configer.strSendLogFlag = "1"; } else { Configer.strSendLogFlag = "0"; } } if (dictionary.ContainsKey("totalSwitch")) { Logger.d("ret:" + num2.ToString()); if (((num2 != 0) && (num2 != 1)) && (num2 != 2)) { Logger.LogNetError(0x3f1, "cgi return exception:" + dictionary["ret"].ToString()); } else { Logger.d("cgi return: " + num2.ToString()); } if (dictionary.ContainsKey("curr_lua_dir") && (dictionary["curr_lua_dir"].ToString() != string.Empty)) { Configer.m_CurHotUpdatePath = dictionary["curr_lua_dir"].ToString(); if (Configer.m_CurHotUpdatePath != string.Empty) { Configer.m_CurHotUpdatePath = Configer.m_CurHotUpdatePath + "/res/"; } Logger.d("m_CurHotUpdatePath:" + Configer.m_CurHotUpdatePath); } string strCurState = string.Empty; string strFile = string.Empty; if (dictionary.ContainsKey("filelist")) { strCurState = dictionary["filelist"].ToString(); } if (dictionary.ContainsKey("filename")) { strFile = dictionary["filename"].ToString(); } if (dictionary.ContainsKey("lua_newversion")) { int curTimestamp; if (!int.TryParse(dictionary["lua_newversion"].ToString(), out curTimestamp)) { Logger.d("云端lua_newversion获取不成功,使用时间戳为版本号:" + dictionary["lua_newversion"].ToString()); curTimestamp = DateUtils.GetCurTimestamp(); } ResourceManager.iLuaVer = curTimestamp; } else if (ResourceManager.iLuaVer == 1) { Logger.d("use time ver"); ResourceManager.iLuaVer = DateUtils.GetCurTimestamp(); } string strConfigInfo = string.Empty; if (dictionary.ContainsKey("dependency")) { strConfigInfo = dictionary["dependency"].ToString(); } Configer.strCtrFlagTotalSwitch = dictionary["totalSwitch"] as string; if (Configer.strCtrFlagTotalSwitch.Equals("1")) { if ((dictionary["ret"].ToString() == "1") || (dictionary["ret"].ToString() == "2")) { Logger.d("初始化下载列表"); GetInstance().increaceUpdate.SetUpdateInfo(strConfigInfo, strCurState); } if (dictionary["ret"].ToString() == "0") { Logger.d("下载成功回调:" + strFile); GetInstance().increaceUpdate.AddDownSuccFile(strFile); } } } else { Logger.d("totalSwitch no data"); } } else { Logger.d("connect iRet:" + num.ToString()); } } else { Logger.d("no para iPdrLibRet"); } } catch (Exception exception) { Logger.e("connect fail,retry:" + exception.ToString()); } return(0); }
protected override void InitFramework() { Logger.d("init StartUpCommand"); base.InitFramework(); this.RegisterCommand("StartUp", typeof(StartUpCommand)); }