private void freshReceiveBox() { if (textBoxReceive.InvokeRequired) { FreshBox freshBox = new FreshBox(freshReceiveBox); textBoxReceive.Invoke((EventHandler) delegate { freshBox(); }); } else { textBoxReceive.AppendText(textReceive); } }
private void freshReceiveBox(int i, int j) { if (textBoxReceive[i, j].InvokeRequired) { FreshBox freshBox = new FreshBox(freshReceiveBox); textBoxReceive[i, j].Invoke((EventHandler) delegate { freshBox(i, j); }); } else { textBoxReceive[j, i].AppendText(textReceive); textBoxReceive[j, i].SelectionStart = textBoxReceive[i, j].TextLength; textBoxReceive[j, i].SelectionLength = 0; textBoxReceive[j, i].ScrollToCaret(); } }