private void OnWebsocketMessage(object sender, AudioStreamTextArgs e) { if (e.Message.flag == "1") { RT_FullSentence.Invoke(new UpdateContent(UpdateLongText), e.Message.body); } else { RT_ShortSentence.Invoke(new UpdateContent(UpdateShortText), e.Message.body); } }
private void UpdateLongText(string text) { RT_FullSentence.AppendText(String.Format(" {0}", text)); // scroll it automatically RT_FullSentence.ScrollToCaret(); }