メソッドをwpfプロジェクトからwinformsプロジェクトに移行していました。
このセクション以外はすべて問題なく移動されました。
private void ServerProcErrorDataReceived(object sender, DataReceivedEventArgs e)
{
// You have to do this through the Dispatcher because this method is called by a different Thread
Dispatcher.Invoke(new Action(() =>
{
richTextBox_Console.Text += e.Data + Environment.NewLine;
richTextBox_Console.SelectionStart = richTextBox_Console.Text.Length;
richTextBox_Console.ScrollToCaret();
ParseServerInput(e.Data);
}));
}
winformsに変換する方法がわかりませんDispatcher
。
誰でも私を助けることができますか?