/// <summary> /// Handles the OnInvalidate event of the Model. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param> void mModel_OnInvalidate(object sender, EventArgs e) { if (!mIsSuspended) { parentControl.Invalidate(); } }
void mModel_OnInvalidateRectangle(object sender, RectangleEventArgs e) { try { parentControl.Invalidate(Rectangle.Round(e.Rectangle)); } catch (StackOverflowException) { //TODO: automatic exception report here? throw; } }