public object Clone() { LiveScript liveScript = new LiveScript(); liveScript.LEVEL = mLevel; liveScript.ID = mScriptid; liveScript.UID = mScriptuid; liveScript.CONTENT = mContent; liveScript.NAME = mScriptName; return(liveScript); }
/// <summary> /// 解析战旗弹幕 /// </summary> /// <param name="content"></param> //protected void ParseZqContent(string content) //{ // int nindex, nIndex; // if ((nindex = content.IndexOf('{')) != -1 && (nIndex = content.IndexOf('}')) != -1) // { // string substr = content.Substring(nindex, nIndex - nindex + 1); // JsonReader reader = new JsonTextReader(new StringReader(substr)); // } //} /// <summary> /// 抽奖线程 /// </summary> private void UpdateLotteryManList() { string level; string scriptId; string scriptUid; string content; string scriptName; Action update = delegate { info.Text = "参与抽奖的人数:" + mCountPrizeList.Count; }; while (mCount) { CppInterface.LoadScriptMsg((int)mLiveType, out level, out scriptId, out scriptUid, out content, out scriptName); if (level != null && level.Length > 0) { long uid = long.Parse(scriptUid.ToString()); bool bFind = mCountPrizeList.Any <LiveScript>(P => P.UID == uid); if (bFind == false) { LiveScript livescript = new LiveScript(); livescript.LEVEL = int.Parse(level.ToString()); livescript.ID = long.Parse(scriptId.ToString()); livescript.UID = long.Parse(scriptUid.ToString()); livescript.CONTENT = content.ToString(); livescript.NAME = scriptName.ToString(); mCountPrizeList.Add(livescript); this.Dispatcher.BeginInvoke(update); } } level = null; } CppInterface.CloseNetDevice(); }