コード例 #1
0
ファイル: DataCenter.cs プロジェクト: linguoyuan/CodeLibrary
    async void GetBaseDataFromFile()
    {
        TextAsset content = await Addressables.LoadAssetAsync <TextAsset>("").Task;

        JSONObject js = JSONObject.Create(content.text);

        JSONObject nowFiled;

        //颜色
        nowFiled = js.GetField("color");
        for (int i = 0; i < nowFiled.list.Count; i++)
        {
            string3 _str3 = new string3(nowFiled.list[i].GetField("name").str, nowFiled.list[i].GetField("audio").str, nowFiled.list[i].GetField("pic").str);
            colorNames.Add(_str3);
        }

        //类型
        nowFiled = js.GetField("types");
        for (int i = 0; i < nowFiled.list.Count; i++)
        {
            string3 _str3 = new string3(nowFiled.list[i].GetField("name").str, nowFiled.list[i].GetField("audio").str, nowFiled.list[i].GetField("pic").str);
            typeNames.Add(_str3);
        }

        //数字
        nowFiled = js.GetField("nums");
        for (int i = 0; i < nowFiled.list.Count; i++)
        {
            string  key   = nowFiled.list[i].keys[0];
            string3 _str2 = new string3(key, nowFiled.list[i].GetField(key).str, "");
            numAudios.Add(_str2);
        }
    }
コード例 #2
0
ファイル: Class1.cs プロジェクト: liuwei0925/myPrj
        public QchatQEDService getQchatQEDService(string username, string password, string deviceID, string urlIp)
        {
            QchatQEDService qqs = new QchatQEDService();

            ServicePointManager.ServerCertificateValidationCallback += RemoteCertificateValidate; //验证服务器证书回调自动验证
            @string strUn = new @string();

            strUn.Text = new string[] { username }; //用户名
            string1 str    = new string1();
            string  _pword = E_MD5(password);       //md5加密

            str.Text     = new string[] { _pword };
            qqs.Username = strUn;
            qqs.Password = str;

            string2 s2 = new string2();

            s2.Text      = new string[] { deviceID }; //关于 deviceID 如果有问题请咨询电信相关人员
            qqs.DeviceID = s2;

            //qqs.Url = "https://114.81.253.12:8443/CPS_QED/services/QchatQEDService";
            qqs.Url = "https://" + urlIp + ":8443/CPS_QED/services/QchatQEDService";
            string3 s3 = new string3();
            string  s  = Environment.TickCount.ToString();

            s3.Text      = new string[] { DateTime.Now.ToString("yyyyMMddHHmmss") + s.Substring(s.Length - 4, 4) };
            qqs.Sequence = s3;

            return(qqs);
        }