public void ShowText(string message, sbyte id, RichTextBox writingPad) { if (!userInterface.Dispatcher.CheckAccess()) { delShowText method = new delShowText(ShowText); userInterface.Dispatcher.Invoke(method, new object[] { message, id, writingPad }); } else { userInterface.ShowMessage(message, id, writingPad); } }
public void ShowText(string message, sbyte colorInd) { if (!userInterface.Dispatcher.CheckAccess()) { delShowText method = new delShowText(ShowText); userInterface.Dispatcher.Invoke(method, new object[] { message, colorInd }); } else { userInterface.WriteTextToRTB(message, colorInd); } }