void api_ReceiveMessage(string obj) { this.Invoke(new Action <string>((str) => { txt_MSG.AppendText(str + "\r\n"); SM sm = new SM(); string[] s = str.Split('\n'); sm.Type = "msg"; sm.Number = s[0]; sm.Message = s[2]; ms.Receive(sm); }), obj); }
void api_ReceiveMessage(string obj) { this.Invoke(new Action <string>((str) => { txt_CallId.AppendText(str + "\r\n\r\n"); }), obj); ms.Receive(obj + "\r\n\r\n"); }