/// <summary> /// Synchronize on a commit. /// </summary> /// <returns><c>true</c> if an open composition got cancelled, otherwise <c>false</c>. /// </returns> private void ResetAndWaitForCommit(Control control) { _ibusComm.Reset(); // This should allow any generated commits to be handled by the message pump. // TODO: find a better way to synchronize Application.DoEvents(); var eventHandler = GetEventHandlerForControl(control); if (eventHandler != null) { eventHandler.CommitOrReset(); } }
/// <summary> /// Synchronize on a commit. /// </summary> /// <returns><c>true</c> if an open composition got cancelled, otherwise <c>false</c>. /// </returns> private bool ResetAndWaitForCommit(Control control) { IBusCommunicator.Reset(); // This should allow any generated commits to be handled by the message pump. // TODO: find a better way to synchronize Application.DoEvents(); var eventHandler = GetEventHandlerForControl(control); if (eventHandler != null) { return(eventHandler.CommitOrReset()); } return(false); }