Possible Duplicate:
Cross-thread operation not valid
我试图操纵这2条线,以控制 un子和雷多顿,使之得以或无法做到,但一刀切的十字路口不有效,即试图利用 but子制造援引,而使用 could子。
here is my code
private Thread _undoThread;
private Thread _redoThread;
_undoThread = new Thread(UndoEnabledCheck);
_undoThread.Start();
_redoThread = new Thread(RedoEnabledCheck);
_redoThread.Start();
private void UndoEnabledCheck()
{
UndoButton.Enabled = _undoBuffer.CanUndo;
}
private void RedoEnabledCheck()
{
RedoButton.Enabled = _undoBuffer.CanRedo;
}