src/Misc/EFTools/DesignXmlCore/Base/Shell/TreeGridDesignerTreeControl.cs
/// <summary>
///     Overridden to use IUIService for displaying error messages to the user, and to
///     prevent CheckoutException.Canceled from being redisplayed to user
/// </summary>
/// <param name="ex">an exception thrown to the underlying VirtualTreeControl</param>
/// <returns>Return true to swallow an exception, false to rethrow it.</returns>
Overridden to use IUIService for displaying error messages to the user, and to
prevent CheckoutException.Canceled from being redisplayed to user
Overridden to use IUIService for displaying error messages to the user and to prevent CheckoutException . Canceled from being redisplayed to user
protected override bool DisplayException(Exception ex)
        {
            TreeGridDesignerBranch.AbortVirtualTreeEdit = true;
            if (ex == CheckoutException.Canceled)
            {
                return true;
            }
            if (Site != null)
            {
                var uiService = Site.GetService(typeof(IUIService)) as IUIService;
                if (uiService != null)
                {
                    uiService.ShowError(ex.Message);
                    return true;
                }
            }
            Debug.Fail("unable to retrieve IUIService interface to show error message: " + ex.Message);
            return base.DisplayException(ex);
        }
protected override bool DisplayException ( Exception ex ) { TreeGridDesignerBranch . AbortVirtualTreeEdit = true ; if ( ex == CheckoutException . Canceled ) { return true ; } if ( Site != null ) { var uiService = Site . GetService ( typeof ( IUIService ) ) as IUIService ; if ( uiService != null ) { uiService . ShowError ( ex . Message ) ; return true ; } } Debug . Fail ( " " + ex . Message ) ; return base . DisplayException ( ex ) ; }
Overridden to use IUIService for displaying error messages to the user, and to
prevent CheckoutException.Canceled from being redisplayed to user
Overridden to use IUIService for displaying error messages to the user and to prevent CheckoutException . Canceled from being redisplayed to user
// set "abort" flag // don't display "Checkout Canceled". User doesn't need to be told again that he/she canceled Checkout
Return true to swallow an exception, false to rethrow it.
Return true to swallow an exception false to rethrow it .
ex
Exception
an exception thrown to the underlying VirtualTreeControl
an exception thrown to the underlying VirtualTreeControl