void StockService_OnRcvPower(object sender, RcvPowerEventArgs e) { //StringBuilder Builder = new StringBuilder(); //Builder.Append(string.Format("消息ID{0},收到除权数据{1},显示前20行...", e.Msg.ToString(), e.RcvPowers.Length.ToString())); //Builder.Append(System.Environment.NewLine); //BuildHeader(typeof(StructRcvPower), Builder); //for (int i = 0; i < 20 && i < e.RcvPowers.Length; i++) //{ // BuildData(e.RcvPowers[i], Builder); //} ////由于数据发送采用异步调用,更新界面必须在UI线程上执行。 //this.Invoke(new UpdateRichTextBox(this.UpdateTextBox), Builder.ToString()); }
void StockService_OnRcvPower(object sender, RcvPowerEventArgs e) { //StringBuilder Builder = new StringBuilder(); //Builder.Append(string.Format("消息ID{0},收到除权数据{1},显示前20行...", e.Msg.ToString(), e.RcvPowers.Length.ToString())); //Builder.Append(System.Environment.NewLine); //BuildHeader(typeof(StructRcvPower), Builder); //for (int i = 0; i < 20 && i < e.RcvPowers.Length; i++) //{ // BuildData(e.RcvPowers[i], Builder); //} ////由于数据发送采用异步调用,更新界面必须在UI线程上执行。 //this.Invoke(new UpdateRichTextBox(this.UpdateTextBox), Builder.ToString()); }